@banyan_cloud/roots 1.0.59 → 1.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1462,13 +1462,13 @@ var getInitialsOfName = function getInitialsOfName() {
1462
1462
  }
1463
1463
  return initials;
1464
1464
  };
1465
- function safeJSONParse(object) {
1465
+ var safeJSONParse = function safeJSONParse(object) {
1466
1466
  try {
1467
1467
  return JSON.parse(object);
1468
1468
  } catch (error) {
1469
1469
  return null;
1470
1470
  }
1471
- }
1471
+ };
1472
1472
  function cloneDeep(object) {
1473
1473
  return safeJSONParse(JSON.stringify(object));
1474
1474
  }
@@ -1574,9 +1574,14 @@ var getDayInfo = function getDayInfo(date) {
1574
1574
  meridian: meridian
1575
1575
  };
1576
1576
  };
1577
- var getDatesInAMonth = function getDatesInAMonth(_ref) {
1578
- var month = _ref.month,
1579
- year = _ref.year;
1577
+ var getDatesInStringFormat = function getDatesInStringFormat(_ref) {
1578
+ var startingDate = _ref.startingDate,
1579
+ endingDate = _ref.endingDate;
1580
+ return ["".concat(startingDate.getDate(), " ").concat(MONTHS[startingDate.getMonth()].substring(0, 3), " ").concat(startingDate.getFullYear()), "".concat(endingDate.getDate(), " ").concat(MONTHS[endingDate.getMonth()].substring(0, 3), " ").concat(endingDate.getFullYear())];
1581
+ };
1582
+ var getDatesInAMonth = function getDatesInAMonth(_ref2) {
1583
+ var month = _ref2.month,
1584
+ year = _ref2.year;
1580
1585
  var date = new Date(Date.UTC(year, month, 1));
1581
1586
  var dates = [];
1582
1587
  var days = [];
@@ -1794,7 +1799,7 @@ var css$V = ".Chip_module_root__0aa07630[data-elem=base-cell] {\n position: rel
1794
1799
  var modules_31aa5fd7 = {"root":"Chip_module_root__0aa07630","sm":"Chip_module_sm__0aa07630","md":"Chip_module_md__0aa07630","status":"Chip_module_status__0aa07630","success":"Chip_module_success__0aa07630","info":"Chip_module_info__0aa07630","danger":"Chip_module_danger__0aa07630","warning":"Chip_module_warning__0aa07630","default":"Chip_module_default__0aa07630","input":"Chip_module_input__0aa07630"};
1795
1800
  n(css$V,{});
1796
1801
 
1797
- var Chip = function Chip(props) {
1802
+ var Chip = /*#__PURE__*/React.forwardRef(function Chip(props, ref) {
1798
1803
  var className = props.className,
1799
1804
  type = props.type,
1800
1805
  LeftComponent = props.leftComponent,
@@ -1808,6 +1813,7 @@ var Chip = function Chip(props) {
1808
1813
  variant = props.variant,
1809
1814
  color = props.color;
1810
1815
  return /*#__PURE__*/jsxRuntime.jsx(BaseButton, {
1816
+ ref: ref,
1811
1817
  type: type,
1812
1818
  component1: LeftComponent && /*#__PURE__*/jsxRuntime.jsx(LeftComponent, {}),
1813
1819
  title: title,
@@ -1820,7 +1826,7 @@ var Chip = function Chip(props) {
1820
1826
  variant: 'contained',
1821
1827
  className: classes(modules_31aa5fd7.root, modules_31aa5fd7["radius-".concat(radius)], modules_31aa5fd7[variant], modules_31aa5fd7[color], modules_31aa5fd7[size], className)
1822
1828
  });
1823
- };
1829
+ });
1824
1830
  Chip.propTypes = _objectSpread2(_objectSpread2({}, BaseButton.propTypes), {}, {
1825
1831
  size: propTypes$1.exports.oneOf(['sm', 'md']),
1826
1832
  variant: propTypes$1.exports.oneOf(['status', 'input']),
@@ -7732,7 +7738,7 @@ var checkForListedLanguage = (function (astGenerator, language) {
7732
7738
  return langs.indexOf(language) !== -1;
7733
7739
  });
7734
7740
 
7735
- var _excluded$1 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
7741
+ var _excluded$2 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
7736
7742
 
7737
7743
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7738
7744
 
@@ -8077,7 +8083,7 @@ function highlight$1 (defaultAstGenerator, defaultStyle) {
8077
8083
  _ref7$code = _ref7.code,
8078
8084
  code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,
8079
8085
  astGenerator = _ref7.astGenerator,
8080
- rest = _objectWithoutProperties(_ref7, _excluded$1);
8086
+ rest = _objectWithoutProperties(_ref7, _excluded$2);
8081
8087
 
8082
8088
  astGenerator = astGenerator || defaultAstGenerator;
8083
8089
  var allLineNumbers = showLineNumbers ? /*#__PURE__*/React.createElement(AllLineNumbers, {
@@ -17252,126 +17258,134 @@ function c(Prism) {
17252
17258
  delete Prism.languages.c['boolean'];
17253
17259
  }
17254
17260
 
17255
- var refractorC$1 = c_1;
17256
- var cpp_1 = cpp;
17257
- cpp.displayName = 'cpp';
17258
- cpp.aliases = [];
17259
- function cpp(Prism) {
17260
- Prism.register(refractorC$1)
17261
- ;(function (Prism) {
17262
- var keyword =
17263
- /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
17264
- var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
17265
- /<keyword>/g,
17266
- function () {
17267
- return keyword.source
17268
- }
17269
- );
17270
- Prism.languages.cpp = Prism.languages.extend('c', {
17271
- 'class-name': [
17272
- {
17273
- pattern: RegExp(
17274
- /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
17275
- /<keyword>/g,
17276
- function () {
17277
- return keyword.source
17278
- }
17279
- )
17280
- ),
17281
- lookbehind: true
17282
- }, // This is intended to capture the class name of method implementations like:
17283
- // void foo::bar() const {}
17284
- // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
17285
- // it starts with an uppercase letter. This approximation should give decent results.
17286
- /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
17287
- // Foo::~Foo() {}
17288
- /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, // This also intends to capture the class name of method implementations but here the class has template
17289
- // parameters, so it can't be a namespace (until C++ adds generic namespaces).
17290
- /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
17291
- ],
17292
- keyword: keyword,
17293
- number: {
17294
- pattern:
17295
- /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
17296
- greedy: true
17297
- },
17298
- operator:
17299
- />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
17300
- boolean: /\b(?:false|true)\b/
17301
- });
17302
- Prism.languages.insertBefore('cpp', 'string', {
17303
- module: {
17304
- // https://en.cppreference.com/w/cpp/language/modules
17305
- pattern: RegExp(
17306
- /(\b(?:import|module)\s+)/.source +
17307
- '(?:' + // header-name
17308
- /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
17309
- '|' + // module name or partition or both
17310
- /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
17311
- /<mod-name>/g,
17312
- function () {
17313
- return modName
17314
- }
17315
- ) +
17316
- ')'
17317
- ),
17318
- lookbehind: true,
17319
- greedy: true,
17320
- inside: {
17321
- string: /^[<"][\s\S]+/,
17322
- operator: /:/,
17323
- punctuation: /\./
17324
- }
17325
- },
17326
- 'raw-string': {
17327
- pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
17328
- alias: 'string',
17329
- greedy: true
17330
- }
17331
- });
17332
- Prism.languages.insertBefore('cpp', 'keyword', {
17333
- 'generic-function': {
17334
- pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
17335
- inside: {
17336
- function: /^\w+/,
17337
- generic: {
17338
- pattern: /<[\s\S]+/,
17339
- alias: 'class-name',
17340
- inside: Prism.languages.cpp
17341
- }
17342
- }
17343
- }
17344
- });
17345
- Prism.languages.insertBefore('cpp', 'operator', {
17346
- 'double-colon': {
17347
- pattern: /::/,
17348
- alias: 'punctuation'
17349
- }
17350
- });
17351
- Prism.languages.insertBefore('cpp', 'class-name', {
17352
- // the base clause is an optional list of parent classes
17353
- // https://en.cppreference.com/w/cpp/language/class
17354
- 'base-clause': {
17355
- pattern:
17356
- /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
17357
- lookbehind: true,
17358
- greedy: true,
17359
- inside: Prism.languages.extend('cpp', {})
17360
- }
17361
- });
17362
- Prism.languages.insertBefore(
17363
- 'inside',
17364
- 'double-colon',
17365
- {
17366
- // All untokenized words that are not namespaces should be class names
17367
- 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
17368
- },
17369
- Prism.languages.cpp['base-clause']
17370
- );
17371
- })(Prism);
17261
+ var cpp_1;
17262
+ var hasRequiredCpp;
17263
+
17264
+ function requireCpp () {
17265
+ if (hasRequiredCpp) return cpp_1;
17266
+ hasRequiredCpp = 1;
17267
+ var refractorC = c_1;
17268
+ cpp_1 = cpp;
17269
+ cpp.displayName = 'cpp';
17270
+ cpp.aliases = [];
17271
+ function cpp(Prism) {
17272
+ Prism.register(refractorC)
17273
+ ;(function (Prism) {
17274
+ var keyword =
17275
+ /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
17276
+ var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
17277
+ /<keyword>/g,
17278
+ function () {
17279
+ return keyword.source
17280
+ }
17281
+ );
17282
+ Prism.languages.cpp = Prism.languages.extend('c', {
17283
+ 'class-name': [
17284
+ {
17285
+ pattern: RegExp(
17286
+ /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
17287
+ /<keyword>/g,
17288
+ function () {
17289
+ return keyword.source
17290
+ }
17291
+ )
17292
+ ),
17293
+ lookbehind: true
17294
+ }, // This is intended to capture the class name of method implementations like:
17295
+ // void foo::bar() const {}
17296
+ // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
17297
+ // it starts with an uppercase letter. This approximation should give decent results.
17298
+ /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
17299
+ // Foo::~Foo() {}
17300
+ /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, // This also intends to capture the class name of method implementations but here the class has template
17301
+ // parameters, so it can't be a namespace (until C++ adds generic namespaces).
17302
+ /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
17303
+ ],
17304
+ keyword: keyword,
17305
+ number: {
17306
+ pattern:
17307
+ /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
17308
+ greedy: true
17309
+ },
17310
+ operator:
17311
+ />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
17312
+ boolean: /\b(?:false|true)\b/
17313
+ });
17314
+ Prism.languages.insertBefore('cpp', 'string', {
17315
+ module: {
17316
+ // https://en.cppreference.com/w/cpp/language/modules
17317
+ pattern: RegExp(
17318
+ /(\b(?:import|module)\s+)/.source +
17319
+ '(?:' + // header-name
17320
+ /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
17321
+ '|' + // module name or partition or both
17322
+ /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
17323
+ /<mod-name>/g,
17324
+ function () {
17325
+ return modName
17326
+ }
17327
+ ) +
17328
+ ')'
17329
+ ),
17330
+ lookbehind: true,
17331
+ greedy: true,
17332
+ inside: {
17333
+ string: /^[<"][\s\S]+/,
17334
+ operator: /:/,
17335
+ punctuation: /\./
17336
+ }
17337
+ },
17338
+ 'raw-string': {
17339
+ pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
17340
+ alias: 'string',
17341
+ greedy: true
17342
+ }
17343
+ });
17344
+ Prism.languages.insertBefore('cpp', 'keyword', {
17345
+ 'generic-function': {
17346
+ pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
17347
+ inside: {
17348
+ function: /^\w+/,
17349
+ generic: {
17350
+ pattern: /<[\s\S]+/,
17351
+ alias: 'class-name',
17352
+ inside: Prism.languages.cpp
17353
+ }
17354
+ }
17355
+ }
17356
+ });
17357
+ Prism.languages.insertBefore('cpp', 'operator', {
17358
+ 'double-colon': {
17359
+ pattern: /::/,
17360
+ alias: 'punctuation'
17361
+ }
17362
+ });
17363
+ Prism.languages.insertBefore('cpp', 'class-name', {
17364
+ // the base clause is an optional list of parent classes
17365
+ // https://en.cppreference.com/w/cpp/language/class
17366
+ 'base-clause': {
17367
+ pattern:
17368
+ /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
17369
+ lookbehind: true,
17370
+ greedy: true,
17371
+ inside: Prism.languages.extend('cpp', {})
17372
+ }
17373
+ });
17374
+ Prism.languages.insertBefore(
17375
+ 'inside',
17376
+ 'double-colon',
17377
+ {
17378
+ // All untokenized words that are not namespaces should be class names
17379
+ 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
17380
+ },
17381
+ Prism.languages.cpp['base-clause']
17382
+ );
17383
+ })(Prism);
17384
+ }
17385
+ return cpp_1;
17372
17386
  }
17373
17387
 
17374
- var refractorCpp$1 = cpp_1;
17388
+ var refractorCpp$1 = requireCpp();
17375
17389
  var arduino_1 = arduino;
17376
17390
  arduino.displayName = 'arduino';
17377
17391
  arduino.aliases = ['ino'];
@@ -17715,470 +17729,479 @@ function asmatmel(Prism) {
17715
17729
  };
17716
17730
  }
17717
17731
 
17718
- var csharp_1 = csharp;
17719
- csharp.displayName = 'csharp';
17720
- csharp.aliases = ['dotnet', 'cs'];
17721
- function csharp(Prism) {
17732
+ var csharp_1;
17733
+ var hasRequiredCsharp;
17734
+
17735
+ function requireCsharp () {
17736
+ if (hasRequiredCsharp) return csharp_1;
17737
+ hasRequiredCsharp = 1;
17738
+
17739
+ csharp_1 = csharp;
17740
+ csharp.displayName = 'csharp';
17741
+ csharp.aliases = ['dotnet', 'cs'];
17742
+ function csharp(Prism) {
17722
17743
  (function (Prism) {
17723
- /**
17724
- * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
17725
- *
17726
- * Note: This is a simple text based replacement. Be careful when using backreferences!
17727
- *
17728
- * @param {string} pattern the given pattern.
17729
- * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
17730
- * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
17731
- * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
17732
- */
17733
- function replace(pattern, replacements) {
17734
- return pattern.replace(/<<(\d+)>>/g, function (m, index) {
17735
- return '(?:' + replacements[+index] + ')'
17736
- })
17737
- }
17738
- /**
17739
- * @param {string} pattern
17740
- * @param {string[]} replacements
17741
- * @param {string} [flags]
17742
- * @returns {RegExp}
17743
- */
17744
- function re(pattern, replacements, flags) {
17745
- return RegExp(replace(pattern, replacements), flags || '')
17746
- }
17747
- /**
17748
- * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
17749
- *
17750
- * @param {string} pattern
17751
- * @param {number} depthLog2
17752
- * @returns {string}
17753
- */
17754
- function nested(pattern, depthLog2) {
17755
- for (var i = 0; i < depthLog2; i++) {
17756
- pattern = pattern.replace(/<<self>>/g, function () {
17757
- return '(?:' + pattern + ')'
17758
- });
17759
- }
17760
- return pattern.replace(/<<self>>/g, '[^\\s\\S]')
17761
- } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
17762
- var keywordKinds = {
17763
- // keywords which represent a return or variable type
17764
- type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
17765
- // keywords which are used to declare a type
17766
- typeDeclaration: 'class enum interface record struct',
17767
- // contextual keywords
17768
- // ("var" and "dynamic" are missing because they are used like types)
17769
- contextual:
17770
- 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)',
17771
- // all other keywords
17772
- other:
17773
- 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
17774
- }; // keywords
17775
- function keywordsToPattern(words) {
17776
- return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
17777
- }
17778
- var typeDeclarationKeywords = keywordsToPattern(
17779
- keywordKinds.typeDeclaration
17780
- );
17781
- var keywords = RegExp(
17782
- keywordsToPattern(
17783
- keywordKinds.type +
17784
- ' ' +
17785
- keywordKinds.typeDeclaration +
17786
- ' ' +
17787
- keywordKinds.contextual +
17788
- ' ' +
17789
- keywordKinds.other
17790
- )
17791
- );
17792
- var nonTypeKeywords = keywordsToPattern(
17793
- keywordKinds.typeDeclaration +
17794
- ' ' +
17795
- keywordKinds.contextual +
17796
- ' ' +
17797
- keywordKinds.other
17798
- );
17799
- var nonContextualKeywords = keywordsToPattern(
17800
- keywordKinds.type +
17801
- ' ' +
17802
- keywordKinds.typeDeclaration +
17803
- ' ' +
17804
- keywordKinds.other
17805
- ); // types
17806
- var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
17807
- var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
17808
- var name = /@?\b[A-Za-z_]\w*\b/.source;
17809
- var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
17810
- var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
17811
- nonTypeKeywords,
17812
- genericName
17813
- ]);
17814
- var array = /\[\s*(?:,\s*)*\]/.source;
17815
- var typeExpressionWithoutTuple = replace(
17816
- /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
17817
- [identifier, array]
17818
- );
17819
- var tupleElement = replace(
17820
- /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
17821
- [generic, nestedRound, array]
17822
- );
17823
- var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
17824
- var typeExpression = replace(
17825
- /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
17826
- [tuple, identifier, array]
17827
- );
17828
- var typeInside = {
17829
- keyword: keywords,
17830
- punctuation: /[<>()?,.:[\]]/
17831
- }; // strings & characters
17832
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
17833
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
17834
- var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
17835
- var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
17836
- var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
17837
- Prism.languages.csharp = Prism.languages.extend('clike', {
17838
- string: [
17839
- {
17840
- pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
17841
- lookbehind: true,
17842
- greedy: true
17843
- },
17844
- {
17845
- pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
17846
- lookbehind: true,
17847
- greedy: true
17848
- }
17849
- ],
17850
- 'class-name': [
17851
- {
17852
- // Using static
17853
- // using static System.Math;
17854
- pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
17855
- identifier
17856
- ]),
17857
- lookbehind: true,
17858
- inside: typeInside
17859
- },
17860
- {
17861
- // Using alias (type)
17862
- // using Project = PC.MyCompany.Project;
17863
- pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
17864
- name,
17865
- typeExpression
17866
- ]),
17867
- lookbehind: true,
17868
- inside: typeInside
17869
- },
17870
- {
17871
- // Using alias (alias)
17872
- // using Project = PC.MyCompany.Project;
17873
- pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
17874
- lookbehind: true
17875
- },
17876
- {
17877
- // Type declarations
17878
- // class Foo<A, B>
17879
- // interface Foo<out A, B>
17880
- pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
17881
- typeDeclarationKeywords,
17882
- genericName
17883
- ]),
17884
- lookbehind: true,
17885
- inside: typeInside
17886
- },
17887
- {
17888
- // Single catch exception declaration
17889
- // catch(Foo)
17890
- // (things like catch(Foo e) is covered by variable declaration)
17891
- pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
17892
- lookbehind: true,
17893
- inside: typeInside
17894
- },
17895
- {
17896
- // Name of the type parameter of generic constraints
17897
- // where Foo : class
17898
- pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
17899
- lookbehind: true
17900
- },
17901
- {
17902
- // Casts and checks via as and is.
17903
- // as Foo<A>, is Bar<B>
17904
- // (things like if(a is Foo b) is covered by variable declaration)
17905
- pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
17906
- typeExpressionWithoutTuple
17907
- ]),
17908
- lookbehind: true,
17909
- inside: typeInside
17910
- },
17911
- {
17912
- // Variable, field and parameter declaration
17913
- // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
17914
- pattern: re(
17915
- /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
17916
- .source,
17917
- [typeExpression, nonContextualKeywords, name]
17918
- ),
17919
- inside: typeInside
17920
- }
17921
- ],
17922
- keyword: keywords,
17923
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
17924
- number:
17925
- /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
17926
- operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
17927
- punctuation: /\?\.?|::|[{}[\];(),.:]/
17928
- });
17929
- Prism.languages.insertBefore('csharp', 'number', {
17930
- range: {
17931
- pattern: /\.\./,
17932
- alias: 'operator'
17933
- }
17934
- });
17935
- Prism.languages.insertBefore('csharp', 'punctuation', {
17936
- 'named-parameter': {
17937
- pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
17938
- lookbehind: true,
17939
- alias: 'punctuation'
17940
- }
17941
- });
17942
- Prism.languages.insertBefore('csharp', 'class-name', {
17943
- namespace: {
17944
- // namespace Foo.Bar {}
17945
- // using Foo.Bar;
17946
- pattern: re(
17947
- /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
17948
- [name]
17949
- ),
17950
- lookbehind: true,
17951
- inside: {
17952
- punctuation: /\./
17953
- }
17954
- },
17955
- 'type-expression': {
17956
- // default(Foo), typeof(Foo<Bar>), sizeof(int)
17957
- pattern: re(
17958
- /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
17959
- .source,
17960
- [nestedRound]
17961
- ),
17962
- lookbehind: true,
17963
- alias: 'class-name',
17964
- inside: typeInside
17965
- },
17966
- 'return-type': {
17967
- // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
17968
- // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
17969
- // int Foo => 0; int Foo { get; set } = 0;
17970
- pattern: re(
17971
- /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
17972
- [typeExpression, identifier]
17973
- ),
17974
- inside: typeInside,
17975
- alias: 'class-name'
17976
- },
17977
- 'constructor-invocation': {
17978
- // new List<Foo<Bar[]>> { }
17979
- pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
17980
- lookbehind: true,
17981
- inside: typeInside,
17982
- alias: 'class-name'
17983
- },
17984
- /*'explicit-implementation': {
17985
- // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
17986
- pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
17987
- inside: classNameInside,
17988
- alias: 'class-name'
17989
- },*/
17990
- 'generic-method': {
17991
- // foo<Bar>()
17992
- pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
17993
- inside: {
17994
- function: re(/^<<0>>/.source, [name]),
17995
- generic: {
17996
- pattern: RegExp(generic),
17997
- alias: 'class-name',
17998
- inside: typeInside
17999
- }
18000
- }
18001
- },
18002
- 'type-list': {
18003
- // The list of types inherited or of generic constraints
18004
- // class Foo<F> : Bar, IList<FooBar>
18005
- // where F : Bar, IList<int>
18006
- pattern: re(
18007
- /\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/
18008
- .source,
18009
- [
18010
- typeDeclarationKeywords,
18011
- genericName,
18012
- name,
18013
- typeExpression,
18014
- keywords.source,
18015
- nestedRound,
18016
- /\bnew\s*\(\s*\)/.source
18017
- ]
18018
- ),
18019
- lookbehind: true,
18020
- inside: {
18021
- 'record-arguments': {
18022
- pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
18023
- genericName,
18024
- nestedRound
18025
- ]),
18026
- lookbehind: true,
18027
- greedy: true,
18028
- inside: Prism.languages.csharp
18029
- },
18030
- keyword: keywords,
18031
- 'class-name': {
18032
- pattern: RegExp(typeExpression),
18033
- greedy: true,
18034
- inside: typeInside
18035
- },
18036
- punctuation: /[,()]/
18037
- }
18038
- },
18039
- preprocessor: {
18040
- pattern: /(^[\t ]*)#.*/m,
18041
- lookbehind: true,
18042
- alias: 'property',
18043
- inside: {
18044
- // highlight preprocessor directives as keywords
18045
- directive: {
18046
- pattern:
18047
- /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
18048
- lookbehind: true,
18049
- alias: 'keyword'
18050
- }
18051
- }
18052
- }
18053
- }); // attributes
18054
- var regularStringOrCharacter = regularString + '|' + character;
18055
- var regularStringCharacterOrComment = replace(
18056
- /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
18057
- [regularStringOrCharacter]
18058
- );
18059
- var roundExpression = nested(
18060
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18061
- regularStringCharacterOrComment
18062
- ]),
18063
- 2
18064
- ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
18065
- var attrTarget =
18066
- /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
18067
- .source;
18068
- var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
18069
- identifier,
18070
- roundExpression
18071
- ]);
18072
- Prism.languages.insertBefore('csharp', 'class-name', {
18073
- attribute: {
18074
- // Attributes
18075
- // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
18076
- pattern: re(
18077
- /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
18078
- .source,
18079
- [attrTarget, attr]
18080
- ),
18081
- lookbehind: true,
18082
- greedy: true,
18083
- inside: {
18084
- target: {
18085
- pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
18086
- alias: 'keyword'
18087
- },
18088
- 'attribute-arguments': {
18089
- pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
18090
- inside: Prism.languages.csharp
18091
- },
18092
- 'class-name': {
18093
- pattern: RegExp(identifier),
18094
- inside: {
18095
- punctuation: /\./
18096
- }
18097
- },
18098
- punctuation: /[:,]/
18099
- }
18100
- }
18101
- }); // string interpolation
18102
- var formatString = /:[^}\r\n]+/.source; // multi line
18103
- var mInterpolationRound = nested(
18104
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18105
- regularStringCharacterOrComment
18106
- ]),
18107
- 2
18108
- );
18109
- var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18110
- mInterpolationRound,
18111
- formatString
18112
- ]); // single line
18113
- var sInterpolationRound = nested(
18114
- replace(
18115
- /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
18116
- .source,
18117
- [regularStringOrCharacter]
18118
- ),
18119
- 2
18120
- );
18121
- var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18122
- sInterpolationRound,
18123
- formatString
18124
- ]);
18125
- function createInterpolationInside(interpolation, interpolationRound) {
18126
- return {
18127
- interpolation: {
18128
- pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
18129
- lookbehind: true,
18130
- inside: {
18131
- 'format-string': {
18132
- pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
18133
- interpolationRound,
18134
- formatString
18135
- ]),
18136
- lookbehind: true,
18137
- inside: {
18138
- punctuation: /^:/
18139
- }
18140
- },
18141
- punctuation: /^\{|\}$/,
18142
- expression: {
18143
- pattern: /[\s\S]+/,
18144
- alias: 'language-csharp',
18145
- inside: Prism.languages.csharp
18146
- }
18147
- }
18148
- },
18149
- string: /[\s\S]+/
18150
- }
18151
- }
18152
- Prism.languages.insertBefore('csharp', 'string', {
18153
- 'interpolation-string': [
18154
- {
18155
- pattern: re(
18156
- /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
18157
- [mInterpolation]
18158
- ),
18159
- lookbehind: true,
18160
- greedy: true,
18161
- inside: createInterpolationInside(mInterpolation, mInterpolationRound)
18162
- },
18163
- {
18164
- pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
18165
- sInterpolation
18166
- ]),
18167
- lookbehind: true,
18168
- greedy: true,
18169
- inside: createInterpolationInside(sInterpolation, sInterpolationRound)
18170
- }
18171
- ],
18172
- char: {
18173
- pattern: RegExp(character),
18174
- greedy: true
18175
- }
18176
- });
18177
- Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
18178
- })(Prism);
17744
+ /**
17745
+ * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
17746
+ *
17747
+ * Note: This is a simple text based replacement. Be careful when using backreferences!
17748
+ *
17749
+ * @param {string} pattern the given pattern.
17750
+ * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
17751
+ * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
17752
+ * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
17753
+ */
17754
+ function replace(pattern, replacements) {
17755
+ return pattern.replace(/<<(\d+)>>/g, function (m, index) {
17756
+ return '(?:' + replacements[+index] + ')'
17757
+ })
17758
+ }
17759
+ /**
17760
+ * @param {string} pattern
17761
+ * @param {string[]} replacements
17762
+ * @param {string} [flags]
17763
+ * @returns {RegExp}
17764
+ */
17765
+ function re(pattern, replacements, flags) {
17766
+ return RegExp(replace(pattern, replacements), flags || '')
17767
+ }
17768
+ /**
17769
+ * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
17770
+ *
17771
+ * @param {string} pattern
17772
+ * @param {number} depthLog2
17773
+ * @returns {string}
17774
+ */
17775
+ function nested(pattern, depthLog2) {
17776
+ for (var i = 0; i < depthLog2; i++) {
17777
+ pattern = pattern.replace(/<<self>>/g, function () {
17778
+ return '(?:' + pattern + ')'
17779
+ });
17780
+ }
17781
+ return pattern.replace(/<<self>>/g, '[^\\s\\S]')
17782
+ } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
17783
+ var keywordKinds = {
17784
+ // keywords which represent a return or variable type
17785
+ type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
17786
+ // keywords which are used to declare a type
17787
+ typeDeclaration: 'class enum interface record struct',
17788
+ // contextual keywords
17789
+ // ("var" and "dynamic" are missing because they are used like types)
17790
+ contextual:
17791
+ 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)',
17792
+ // all other keywords
17793
+ other:
17794
+ 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
17795
+ }; // keywords
17796
+ function keywordsToPattern(words) {
17797
+ return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
17798
+ }
17799
+ var typeDeclarationKeywords = keywordsToPattern(
17800
+ keywordKinds.typeDeclaration
17801
+ );
17802
+ var keywords = RegExp(
17803
+ keywordsToPattern(
17804
+ keywordKinds.type +
17805
+ ' ' +
17806
+ keywordKinds.typeDeclaration +
17807
+ ' ' +
17808
+ keywordKinds.contextual +
17809
+ ' ' +
17810
+ keywordKinds.other
17811
+ )
17812
+ );
17813
+ var nonTypeKeywords = keywordsToPattern(
17814
+ keywordKinds.typeDeclaration +
17815
+ ' ' +
17816
+ keywordKinds.contextual +
17817
+ ' ' +
17818
+ keywordKinds.other
17819
+ );
17820
+ var nonContextualKeywords = keywordsToPattern(
17821
+ keywordKinds.type +
17822
+ ' ' +
17823
+ keywordKinds.typeDeclaration +
17824
+ ' ' +
17825
+ keywordKinds.other
17826
+ ); // types
17827
+ var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
17828
+ var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
17829
+ var name = /@?\b[A-Za-z_]\w*\b/.source;
17830
+ var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
17831
+ var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
17832
+ nonTypeKeywords,
17833
+ genericName
17834
+ ]);
17835
+ var array = /\[\s*(?:,\s*)*\]/.source;
17836
+ var typeExpressionWithoutTuple = replace(
17837
+ /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
17838
+ [identifier, array]
17839
+ );
17840
+ var tupleElement = replace(
17841
+ /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
17842
+ [generic, nestedRound, array]
17843
+ );
17844
+ var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
17845
+ var typeExpression = replace(
17846
+ /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
17847
+ [tuple, identifier, array]
17848
+ );
17849
+ var typeInside = {
17850
+ keyword: keywords,
17851
+ punctuation: /[<>()?,.:[\]]/
17852
+ }; // strings & characters
17853
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
17854
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
17855
+ var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
17856
+ var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
17857
+ var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
17858
+ Prism.languages.csharp = Prism.languages.extend('clike', {
17859
+ string: [
17860
+ {
17861
+ pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
17862
+ lookbehind: true,
17863
+ greedy: true
17864
+ },
17865
+ {
17866
+ pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
17867
+ lookbehind: true,
17868
+ greedy: true
17869
+ }
17870
+ ],
17871
+ 'class-name': [
17872
+ {
17873
+ // Using static
17874
+ // using static System.Math;
17875
+ pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
17876
+ identifier
17877
+ ]),
17878
+ lookbehind: true,
17879
+ inside: typeInside
17880
+ },
17881
+ {
17882
+ // Using alias (type)
17883
+ // using Project = PC.MyCompany.Project;
17884
+ pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
17885
+ name,
17886
+ typeExpression
17887
+ ]),
17888
+ lookbehind: true,
17889
+ inside: typeInside
17890
+ },
17891
+ {
17892
+ // Using alias (alias)
17893
+ // using Project = PC.MyCompany.Project;
17894
+ pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
17895
+ lookbehind: true
17896
+ },
17897
+ {
17898
+ // Type declarations
17899
+ // class Foo<A, B>
17900
+ // interface Foo<out A, B>
17901
+ pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
17902
+ typeDeclarationKeywords,
17903
+ genericName
17904
+ ]),
17905
+ lookbehind: true,
17906
+ inside: typeInside
17907
+ },
17908
+ {
17909
+ // Single catch exception declaration
17910
+ // catch(Foo)
17911
+ // (things like catch(Foo e) is covered by variable declaration)
17912
+ pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
17913
+ lookbehind: true,
17914
+ inside: typeInside
17915
+ },
17916
+ {
17917
+ // Name of the type parameter of generic constraints
17918
+ // where Foo : class
17919
+ pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
17920
+ lookbehind: true
17921
+ },
17922
+ {
17923
+ // Casts and checks via as and is.
17924
+ // as Foo<A>, is Bar<B>
17925
+ // (things like if(a is Foo b) is covered by variable declaration)
17926
+ pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
17927
+ typeExpressionWithoutTuple
17928
+ ]),
17929
+ lookbehind: true,
17930
+ inside: typeInside
17931
+ },
17932
+ {
17933
+ // Variable, field and parameter declaration
17934
+ // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
17935
+ pattern: re(
17936
+ /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
17937
+ .source,
17938
+ [typeExpression, nonContextualKeywords, name]
17939
+ ),
17940
+ inside: typeInside
17941
+ }
17942
+ ],
17943
+ keyword: keywords,
17944
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
17945
+ number:
17946
+ /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
17947
+ operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
17948
+ punctuation: /\?\.?|::|[{}[\];(),.:]/
17949
+ });
17950
+ Prism.languages.insertBefore('csharp', 'number', {
17951
+ range: {
17952
+ pattern: /\.\./,
17953
+ alias: 'operator'
17954
+ }
17955
+ });
17956
+ Prism.languages.insertBefore('csharp', 'punctuation', {
17957
+ 'named-parameter': {
17958
+ pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
17959
+ lookbehind: true,
17960
+ alias: 'punctuation'
17961
+ }
17962
+ });
17963
+ Prism.languages.insertBefore('csharp', 'class-name', {
17964
+ namespace: {
17965
+ // namespace Foo.Bar {}
17966
+ // using Foo.Bar;
17967
+ pattern: re(
17968
+ /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
17969
+ [name]
17970
+ ),
17971
+ lookbehind: true,
17972
+ inside: {
17973
+ punctuation: /\./
17974
+ }
17975
+ },
17976
+ 'type-expression': {
17977
+ // default(Foo), typeof(Foo<Bar>), sizeof(int)
17978
+ pattern: re(
17979
+ /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
17980
+ .source,
17981
+ [nestedRound]
17982
+ ),
17983
+ lookbehind: true,
17984
+ alias: 'class-name',
17985
+ inside: typeInside
17986
+ },
17987
+ 'return-type': {
17988
+ // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
17989
+ // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
17990
+ // int Foo => 0; int Foo { get; set } = 0;
17991
+ pattern: re(
17992
+ /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
17993
+ [typeExpression, identifier]
17994
+ ),
17995
+ inside: typeInside,
17996
+ alias: 'class-name'
17997
+ },
17998
+ 'constructor-invocation': {
17999
+ // new List<Foo<Bar[]>> { }
18000
+ pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
18001
+ lookbehind: true,
18002
+ inside: typeInside,
18003
+ alias: 'class-name'
18004
+ },
18005
+ /*'explicit-implementation': {
18006
+ // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
18007
+ pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
18008
+ inside: classNameInside,
18009
+ alias: 'class-name'
18010
+ },*/
18011
+ 'generic-method': {
18012
+ // foo<Bar>()
18013
+ pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
18014
+ inside: {
18015
+ function: re(/^<<0>>/.source, [name]),
18016
+ generic: {
18017
+ pattern: RegExp(generic),
18018
+ alias: 'class-name',
18019
+ inside: typeInside
18020
+ }
18021
+ }
18022
+ },
18023
+ 'type-list': {
18024
+ // The list of types inherited or of generic constraints
18025
+ // class Foo<F> : Bar, IList<FooBar>
18026
+ // where F : Bar, IList<int>
18027
+ pattern: re(
18028
+ /\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/
18029
+ .source,
18030
+ [
18031
+ typeDeclarationKeywords,
18032
+ genericName,
18033
+ name,
18034
+ typeExpression,
18035
+ keywords.source,
18036
+ nestedRound,
18037
+ /\bnew\s*\(\s*\)/.source
18038
+ ]
18039
+ ),
18040
+ lookbehind: true,
18041
+ inside: {
18042
+ 'record-arguments': {
18043
+ pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
18044
+ genericName,
18045
+ nestedRound
18046
+ ]),
18047
+ lookbehind: true,
18048
+ greedy: true,
18049
+ inside: Prism.languages.csharp
18050
+ },
18051
+ keyword: keywords,
18052
+ 'class-name': {
18053
+ pattern: RegExp(typeExpression),
18054
+ greedy: true,
18055
+ inside: typeInside
18056
+ },
18057
+ punctuation: /[,()]/
18058
+ }
18059
+ },
18060
+ preprocessor: {
18061
+ pattern: /(^[\t ]*)#.*/m,
18062
+ lookbehind: true,
18063
+ alias: 'property',
18064
+ inside: {
18065
+ // highlight preprocessor directives as keywords
18066
+ directive: {
18067
+ pattern:
18068
+ /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
18069
+ lookbehind: true,
18070
+ alias: 'keyword'
18071
+ }
18072
+ }
18073
+ }
18074
+ }); // attributes
18075
+ var regularStringOrCharacter = regularString + '|' + character;
18076
+ var regularStringCharacterOrComment = replace(
18077
+ /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
18078
+ [regularStringOrCharacter]
18079
+ );
18080
+ var roundExpression = nested(
18081
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18082
+ regularStringCharacterOrComment
18083
+ ]),
18084
+ 2
18085
+ ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
18086
+ var attrTarget =
18087
+ /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
18088
+ .source;
18089
+ var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
18090
+ identifier,
18091
+ roundExpression
18092
+ ]);
18093
+ Prism.languages.insertBefore('csharp', 'class-name', {
18094
+ attribute: {
18095
+ // Attributes
18096
+ // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
18097
+ pattern: re(
18098
+ /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
18099
+ .source,
18100
+ [attrTarget, attr]
18101
+ ),
18102
+ lookbehind: true,
18103
+ greedy: true,
18104
+ inside: {
18105
+ target: {
18106
+ pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
18107
+ alias: 'keyword'
18108
+ },
18109
+ 'attribute-arguments': {
18110
+ pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
18111
+ inside: Prism.languages.csharp
18112
+ },
18113
+ 'class-name': {
18114
+ pattern: RegExp(identifier),
18115
+ inside: {
18116
+ punctuation: /\./
18117
+ }
18118
+ },
18119
+ punctuation: /[:,]/
18120
+ }
18121
+ }
18122
+ }); // string interpolation
18123
+ var formatString = /:[^}\r\n]+/.source; // multi line
18124
+ var mInterpolationRound = nested(
18125
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18126
+ regularStringCharacterOrComment
18127
+ ]),
18128
+ 2
18129
+ );
18130
+ var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18131
+ mInterpolationRound,
18132
+ formatString
18133
+ ]); // single line
18134
+ var sInterpolationRound = nested(
18135
+ replace(
18136
+ /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
18137
+ .source,
18138
+ [regularStringOrCharacter]
18139
+ ),
18140
+ 2
18141
+ );
18142
+ var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18143
+ sInterpolationRound,
18144
+ formatString
18145
+ ]);
18146
+ function createInterpolationInside(interpolation, interpolationRound) {
18147
+ return {
18148
+ interpolation: {
18149
+ pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
18150
+ lookbehind: true,
18151
+ inside: {
18152
+ 'format-string': {
18153
+ pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
18154
+ interpolationRound,
18155
+ formatString
18156
+ ]),
18157
+ lookbehind: true,
18158
+ inside: {
18159
+ punctuation: /^:/
18160
+ }
18161
+ },
18162
+ punctuation: /^\{|\}$/,
18163
+ expression: {
18164
+ pattern: /[\s\S]+/,
18165
+ alias: 'language-csharp',
18166
+ inside: Prism.languages.csharp
18167
+ }
18168
+ }
18169
+ },
18170
+ string: /[\s\S]+/
18171
+ }
18172
+ }
18173
+ Prism.languages.insertBefore('csharp', 'string', {
18174
+ 'interpolation-string': [
18175
+ {
18176
+ pattern: re(
18177
+ /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
18178
+ [mInterpolation]
18179
+ ),
18180
+ lookbehind: true,
18181
+ greedy: true,
18182
+ inside: createInterpolationInside(mInterpolation, mInterpolationRound)
18183
+ },
18184
+ {
18185
+ pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
18186
+ sInterpolation
18187
+ ]),
18188
+ lookbehind: true,
18189
+ greedy: true,
18190
+ inside: createInterpolationInside(sInterpolation, sInterpolationRound)
18191
+ }
18192
+ ],
18193
+ char: {
18194
+ pattern: RegExp(character),
18195
+ greedy: true
18196
+ }
18197
+ });
18198
+ Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
18199
+ })(Prism);
18200
+ }
18201
+ return csharp_1;
18179
18202
  }
18180
18203
 
18181
- var refractorCsharp = csharp_1;
18204
+ var refractorCsharp = requireCsharp();
18182
18205
  var aspnet_1 = aspnet;
18183
18206
  aspnet.displayName = 'aspnet';
18184
18207
  aspnet.aliases = [];
@@ -19372,7 +19395,7 @@ function cfscript(Prism) {
19372
19395
  Prism.languages.cfc = Prism.languages['cfscript'];
19373
19396
  }
19374
19397
 
19375
- var refractorCpp = cpp_1;
19398
+ var refractorCpp = requireCpp();
19376
19399
  var chaiscript_1 = chaiscript;
19377
19400
  chaiscript.displayName = 'chaiscript';
19378
19401
  chaiscript.aliases = [];
@@ -19439,40 +19462,31 @@ function chaiscript(Prism) {
19439
19462
  });
19440
19463
  }
19441
19464
 
19442
- var cil_1;
19443
- var hasRequiredCil;
19444
-
19445
- function requireCil () {
19446
- if (hasRequiredCil) return cil_1;
19447
- hasRequiredCil = 1;
19448
-
19449
- cil_1 = cil;
19450
- cil.displayName = 'cil';
19451
- cil.aliases = [];
19452
- function cil(Prism) {
19453
- Prism.languages.cil = {
19454
- comment: /\/\/.*/,
19455
- string: {
19456
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
19457
- greedy: true
19458
- },
19459
- directive: {
19460
- pattern: /(^|\W)\.[a-z]+(?=\s)/,
19461
- lookbehind: true,
19462
- alias: 'class-name'
19463
- },
19464
- // Actually an assembly reference
19465
- variable: /\[[\w\.]+\]/,
19466
- keyword:
19467
- /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
19468
- function:
19469
- /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
19470
- boolean: /\b(?:false|true)\b/,
19471
- number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
19472
- punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
19473
- };
19474
- }
19475
- return cil_1;
19465
+ var cil_1 = cil;
19466
+ cil.displayName = 'cil';
19467
+ cil.aliases = [];
19468
+ function cil(Prism) {
19469
+ Prism.languages.cil = {
19470
+ comment: /\/\/.*/,
19471
+ string: {
19472
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
19473
+ greedy: true
19474
+ },
19475
+ directive: {
19476
+ pattern: /(^|\W)\.[a-z]+(?=\s)/,
19477
+ lookbehind: true,
19478
+ alias: 'class-name'
19479
+ },
19480
+ // Actually an assembly reference
19481
+ variable: /\[[\w\.]+\]/,
19482
+ keyword:
19483
+ /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
19484
+ function:
19485
+ /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
19486
+ boolean: /\b(?:false|true)\b/,
19487
+ number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
19488
+ punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
19489
+ };
19476
19490
  }
19477
19491
 
19478
19492
  var clojure_1 = clojure;
@@ -19554,541 +19568,594 @@ function cmake(Prism) {
19554
19568
  };
19555
19569
  }
19556
19570
 
19557
- var cobol_1 = cobol;
19558
- cobol.displayName = 'cobol';
19559
- cobol.aliases = [];
19560
- function cobol(Prism) {
19561
- Prism.languages.cobol = {
19562
- comment: {
19563
- pattern: /\*>.*|(^[ \t]*)\*.*/m,
19564
- lookbehind: true,
19565
- greedy: true
19566
- },
19567
- string: {
19568
- pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
19569
- greedy: true
19570
- },
19571
- level: {
19572
- pattern: /(^[ \t]*)\d+\b/m,
19573
- lookbehind: true,
19574
- greedy: true,
19575
- alias: 'number'
19576
- },
19577
- 'class-name': {
19578
- // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
19579
- pattern:
19580
- /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
19581
- lookbehind: true,
19582
- inside: {
19583
- number: {
19584
- pattern: /(\()\d+/,
19585
- lookbehind: true
19586
- },
19587
- punctuation: /[()]/
19588
- }
19589
- },
19590
- keyword: {
19591
- pattern:
19592
- /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
19593
- lookbehind: true
19594
- },
19595
- boolean: {
19596
- pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
19597
- lookbehind: true
19598
- },
19599
- number: {
19600
- pattern:
19601
- /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
19602
- lookbehind: true
19603
- },
19604
- operator: [
19605
- /<>|[<>]=?|[=+*/&]/,
19606
- {
19607
- pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
19608
- lookbehind: true
19609
- }
19610
- ],
19611
- punctuation: /[.:,()]/
19612
- };
19571
+ var cobol_1;
19572
+ var hasRequiredCobol;
19573
+
19574
+ function requireCobol () {
19575
+ if (hasRequiredCobol) return cobol_1;
19576
+ hasRequiredCobol = 1;
19577
+
19578
+ cobol_1 = cobol;
19579
+ cobol.displayName = 'cobol';
19580
+ cobol.aliases = [];
19581
+ function cobol(Prism) {
19582
+ Prism.languages.cobol = {
19583
+ comment: {
19584
+ pattern: /\*>.*|(^[ \t]*)\*.*/m,
19585
+ lookbehind: true,
19586
+ greedy: true
19587
+ },
19588
+ string: {
19589
+ pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
19590
+ greedy: true
19591
+ },
19592
+ level: {
19593
+ pattern: /(^[ \t]*)\d+\b/m,
19594
+ lookbehind: true,
19595
+ greedy: true,
19596
+ alias: 'number'
19597
+ },
19598
+ 'class-name': {
19599
+ // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
19600
+ pattern:
19601
+ /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
19602
+ lookbehind: true,
19603
+ inside: {
19604
+ number: {
19605
+ pattern: /(\()\d+/,
19606
+ lookbehind: true
19607
+ },
19608
+ punctuation: /[()]/
19609
+ }
19610
+ },
19611
+ keyword: {
19612
+ pattern:
19613
+ /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
19614
+ lookbehind: true
19615
+ },
19616
+ boolean: {
19617
+ pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
19618
+ lookbehind: true
19619
+ },
19620
+ number: {
19621
+ pattern:
19622
+ /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
19623
+ lookbehind: true
19624
+ },
19625
+ operator: [
19626
+ /<>|[<>]=?|[=+*/&]/,
19627
+ {
19628
+ pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
19629
+ lookbehind: true
19630
+ }
19631
+ ],
19632
+ punctuation: /[.:,()]/
19633
+ };
19634
+ }
19635
+ return cobol_1;
19613
19636
  }
19614
19637
 
19615
- var coffeescript_1 = coffeescript;
19616
- coffeescript.displayName = 'coffeescript';
19617
- coffeescript.aliases = ['coffee'];
19618
- function coffeescript(Prism) {
19638
+ var coffeescript_1;
19639
+ var hasRequiredCoffeescript;
19640
+
19641
+ function requireCoffeescript () {
19642
+ if (hasRequiredCoffeescript) return coffeescript_1;
19643
+ hasRequiredCoffeescript = 1;
19644
+
19645
+ coffeescript_1 = coffeescript;
19646
+ coffeescript.displayName = 'coffeescript';
19647
+ coffeescript.aliases = ['coffee'];
19648
+ function coffeescript(Prism) {
19619
19649
  (function (Prism) {
19620
- // Ignore comments starting with { to privilege string interpolation highlighting
19621
- var comment = /#(?!\{).+/;
19622
- var interpolation = {
19623
- pattern: /#\{[^}]+\}/,
19624
- alias: 'variable'
19625
- };
19626
- Prism.languages.coffeescript = Prism.languages.extend('javascript', {
19627
- comment: comment,
19628
- string: [
19629
- // Strings are multiline
19630
- {
19631
- pattern: /'(?:\\[\s\S]|[^\\'])*'/,
19632
- greedy: true
19633
- },
19634
- {
19635
- // Strings are multiline
19636
- pattern: /"(?:\\[\s\S]|[^\\"])*"/,
19637
- greedy: true,
19638
- inside: {
19639
- interpolation: interpolation
19640
- }
19641
- }
19642
- ],
19643
- keyword:
19644
- /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
19645
- 'class-member': {
19646
- pattern: /@(?!\d)\w+/,
19647
- alias: 'variable'
19648
- }
19649
- });
19650
- Prism.languages.insertBefore('coffeescript', 'comment', {
19651
- 'multiline-comment': {
19652
- pattern: /###[\s\S]+?###/,
19653
- alias: 'comment'
19654
- },
19655
- // Block regexp can contain comments and interpolation
19656
- 'block-regex': {
19657
- pattern: /\/{3}[\s\S]*?\/{3}/,
19658
- alias: 'regex',
19659
- inside: {
19660
- comment: comment,
19661
- interpolation: interpolation
19662
- }
19663
- }
19664
- });
19665
- Prism.languages.insertBefore('coffeescript', 'string', {
19666
- 'inline-javascript': {
19667
- pattern: /`(?:\\[\s\S]|[^\\`])*`/,
19668
- inside: {
19669
- delimiter: {
19670
- pattern: /^`|`$/,
19671
- alias: 'punctuation'
19672
- },
19673
- script: {
19674
- pattern: /[\s\S]+/,
19675
- alias: 'language-javascript',
19676
- inside: Prism.languages.javascript
19677
- }
19678
- }
19679
- },
19680
- // Block strings
19681
- 'multiline-string': [
19682
- {
19683
- pattern: /'''[\s\S]*?'''/,
19684
- greedy: true,
19685
- alias: 'string'
19686
- },
19687
- {
19688
- pattern: /"""[\s\S]*?"""/,
19689
- greedy: true,
19690
- alias: 'string',
19691
- inside: {
19692
- interpolation: interpolation
19693
- }
19694
- }
19695
- ]
19696
- });
19697
- Prism.languages.insertBefore('coffeescript', 'keyword', {
19698
- // Object property
19699
- property: /(?!\d)\w+(?=\s*:(?!:))/
19700
- });
19701
- delete Prism.languages.coffeescript['template-string'];
19702
- Prism.languages.coffee = Prism.languages.coffeescript;
19703
- })(Prism);
19650
+ // Ignore comments starting with { to privilege string interpolation highlighting
19651
+ var comment = /#(?!\{).+/;
19652
+ var interpolation = {
19653
+ pattern: /#\{[^}]+\}/,
19654
+ alias: 'variable'
19655
+ };
19656
+ Prism.languages.coffeescript = Prism.languages.extend('javascript', {
19657
+ comment: comment,
19658
+ string: [
19659
+ // Strings are multiline
19660
+ {
19661
+ pattern: /'(?:\\[\s\S]|[^\\'])*'/,
19662
+ greedy: true
19663
+ },
19664
+ {
19665
+ // Strings are multiline
19666
+ pattern: /"(?:\\[\s\S]|[^\\"])*"/,
19667
+ greedy: true,
19668
+ inside: {
19669
+ interpolation: interpolation
19670
+ }
19671
+ }
19672
+ ],
19673
+ keyword:
19674
+ /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
19675
+ 'class-member': {
19676
+ pattern: /@(?!\d)\w+/,
19677
+ alias: 'variable'
19678
+ }
19679
+ });
19680
+ Prism.languages.insertBefore('coffeescript', 'comment', {
19681
+ 'multiline-comment': {
19682
+ pattern: /###[\s\S]+?###/,
19683
+ alias: 'comment'
19684
+ },
19685
+ // Block regexp can contain comments and interpolation
19686
+ 'block-regex': {
19687
+ pattern: /\/{3}[\s\S]*?\/{3}/,
19688
+ alias: 'regex',
19689
+ inside: {
19690
+ comment: comment,
19691
+ interpolation: interpolation
19692
+ }
19693
+ }
19694
+ });
19695
+ Prism.languages.insertBefore('coffeescript', 'string', {
19696
+ 'inline-javascript': {
19697
+ pattern: /`(?:\\[\s\S]|[^\\`])*`/,
19698
+ inside: {
19699
+ delimiter: {
19700
+ pattern: /^`|`$/,
19701
+ alias: 'punctuation'
19702
+ },
19703
+ script: {
19704
+ pattern: /[\s\S]+/,
19705
+ alias: 'language-javascript',
19706
+ inside: Prism.languages.javascript
19707
+ }
19708
+ }
19709
+ },
19710
+ // Block strings
19711
+ 'multiline-string': [
19712
+ {
19713
+ pattern: /'''[\s\S]*?'''/,
19714
+ greedy: true,
19715
+ alias: 'string'
19716
+ },
19717
+ {
19718
+ pattern: /"""[\s\S]*?"""/,
19719
+ greedy: true,
19720
+ alias: 'string',
19721
+ inside: {
19722
+ interpolation: interpolation
19723
+ }
19724
+ }
19725
+ ]
19726
+ });
19727
+ Prism.languages.insertBefore('coffeescript', 'keyword', {
19728
+ // Object property
19729
+ property: /(?!\d)\w+(?=\s*:(?!:))/
19730
+ });
19731
+ delete Prism.languages.coffeescript['template-string'];
19732
+ Prism.languages.coffee = Prism.languages.coffeescript;
19733
+ })(Prism);
19734
+ }
19735
+ return coffeescript_1;
19704
19736
  }
19705
19737
 
19706
- var concurnas_1 = concurnas;
19707
- concurnas.displayName = 'concurnas';
19708
- concurnas.aliases = ['conc'];
19709
- function concurnas(Prism) {
19710
- Prism.languages.concurnas = {
19711
- comment: {
19712
- pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
19713
- lookbehind: true,
19714
- greedy: true
19715
- },
19716
- langext: {
19717
- pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
19718
- greedy: true,
19719
- inside: {
19720
- 'class-name': /^\w+/,
19721
- string: {
19722
- pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
19723
- lookbehind: true
19724
- },
19725
- punctuation: /\|\|/
19726
- }
19727
- },
19728
- function: {
19729
- pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
19730
- lookbehind: true
19731
- },
19732
- keyword:
19733
- /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
19734
- boolean: /\b(?:false|true)\b/,
19735
- number:
19736
- /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
19737
- punctuation: /[{}[\];(),.:]/,
19738
- operator:
19739
- /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
19740
- annotation: {
19741
- pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
19742
- alias: 'builtin'
19743
- }
19744
- };
19745
- Prism.languages.insertBefore('concurnas', 'langext', {
19746
- 'regex-literal': {
19747
- pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19748
- greedy: true,
19749
- inside: {
19750
- interpolation: {
19751
- pattern:
19752
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19753
- lookbehind: true,
19754
- inside: Prism.languages.concurnas
19755
- },
19756
- regex: /[\s\S]+/
19757
- }
19758
- },
19759
- 'string-literal': {
19760
- pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19761
- greedy: true,
19762
- inside: {
19763
- interpolation: {
19764
- pattern:
19765
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19766
- lookbehind: true,
19767
- inside: Prism.languages.concurnas
19768
- },
19769
- string: /[\s\S]+/
19770
- }
19771
- }
19772
- });
19773
- Prism.languages.conc = Prism.languages.concurnas;
19738
+ var concurnas_1;
19739
+ var hasRequiredConcurnas;
19740
+
19741
+ function requireConcurnas () {
19742
+ if (hasRequiredConcurnas) return concurnas_1;
19743
+ hasRequiredConcurnas = 1;
19744
+
19745
+ concurnas_1 = concurnas;
19746
+ concurnas.displayName = 'concurnas';
19747
+ concurnas.aliases = ['conc'];
19748
+ function concurnas(Prism) {
19749
+ Prism.languages.concurnas = {
19750
+ comment: {
19751
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
19752
+ lookbehind: true,
19753
+ greedy: true
19754
+ },
19755
+ langext: {
19756
+ pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
19757
+ greedy: true,
19758
+ inside: {
19759
+ 'class-name': /^\w+/,
19760
+ string: {
19761
+ pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
19762
+ lookbehind: true
19763
+ },
19764
+ punctuation: /\|\|/
19765
+ }
19766
+ },
19767
+ function: {
19768
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
19769
+ lookbehind: true
19770
+ },
19771
+ keyword:
19772
+ /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
19773
+ boolean: /\b(?:false|true)\b/,
19774
+ number:
19775
+ /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
19776
+ punctuation: /[{}[\];(),.:]/,
19777
+ operator:
19778
+ /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
19779
+ annotation: {
19780
+ pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
19781
+ alias: 'builtin'
19782
+ }
19783
+ };
19784
+ Prism.languages.insertBefore('concurnas', 'langext', {
19785
+ 'regex-literal': {
19786
+ pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19787
+ greedy: true,
19788
+ inside: {
19789
+ interpolation: {
19790
+ pattern:
19791
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19792
+ lookbehind: true,
19793
+ inside: Prism.languages.concurnas
19794
+ },
19795
+ regex: /[\s\S]+/
19796
+ }
19797
+ },
19798
+ 'string-literal': {
19799
+ pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19800
+ greedy: true,
19801
+ inside: {
19802
+ interpolation: {
19803
+ pattern:
19804
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19805
+ lookbehind: true,
19806
+ inside: Prism.languages.concurnas
19807
+ },
19808
+ string: /[\s\S]+/
19809
+ }
19810
+ }
19811
+ });
19812
+ Prism.languages.conc = Prism.languages.concurnas;
19813
+ }
19814
+ return concurnas_1;
19774
19815
  }
19775
19816
 
19776
- var coq_1 = coq;
19777
- coq.displayName = 'coq';
19778
- coq.aliases = [];
19779
- function coq(Prism) {
19817
+ var coq_1;
19818
+ var hasRequiredCoq;
19819
+
19820
+ function requireCoq () {
19821
+ if (hasRequiredCoq) return coq_1;
19822
+ hasRequiredCoq = 1;
19823
+
19824
+ coq_1 = coq;
19825
+ coq.displayName = 'coq';
19826
+ coq.aliases = [];
19827
+ function coq(Prism) {
19780
19828
  (function (Prism) {
19781
- // https://github.com/coq/coq
19782
- var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
19783
- for (var i = 0; i < 2; i++) {
19784
- commentSource = commentSource.replace(/<self>/g, function () {
19785
- return commentSource
19786
- });
19787
- }
19788
- commentSource = commentSource.replace(/<self>/g, '[]');
19789
- Prism.languages.coq = {
19790
- comment: RegExp(commentSource),
19791
- string: {
19792
- pattern: /"(?:[^"]|"")*"(?!")/,
19793
- greedy: true
19794
- },
19795
- attribute: [
19796
- {
19797
- pattern: RegExp(
19798
- /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
19799
- /<comment>/g,
19800
- function () {
19801
- return commentSource
19802
- }
19803
- )
19804
- ),
19805
- greedy: true,
19806
- alias: 'attr-name',
19807
- inside: {
19808
- comment: RegExp(commentSource),
19809
- string: {
19810
- pattern: /"(?:[^"]|"")*"(?!")/,
19811
- greedy: true
19812
- },
19813
- operator: /=/,
19814
- punctuation: /^#\[|\]$|[,()]/
19815
- }
19816
- },
19817
- {
19818
- pattern:
19819
- /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
19820
- alias: 'attr-name'
19821
- }
19822
- ],
19823
- keyword:
19824
- /\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,
19825
- number:
19826
- /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
19827
- punct: {
19828
- pattern: /@\{|\{\||\[=|:>/,
19829
- alias: 'punctuation'
19830
- },
19831
- operator:
19832
- /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
19833
- punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
19834
- };
19835
- })(Prism);
19829
+ // https://github.com/coq/coq
19830
+ var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
19831
+ for (var i = 0; i < 2; i++) {
19832
+ commentSource = commentSource.replace(/<self>/g, function () {
19833
+ return commentSource
19834
+ });
19835
+ }
19836
+ commentSource = commentSource.replace(/<self>/g, '[]');
19837
+ Prism.languages.coq = {
19838
+ comment: RegExp(commentSource),
19839
+ string: {
19840
+ pattern: /"(?:[^"]|"")*"(?!")/,
19841
+ greedy: true
19842
+ },
19843
+ attribute: [
19844
+ {
19845
+ pattern: RegExp(
19846
+ /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
19847
+ /<comment>/g,
19848
+ function () {
19849
+ return commentSource
19850
+ }
19851
+ )
19852
+ ),
19853
+ greedy: true,
19854
+ alias: 'attr-name',
19855
+ inside: {
19856
+ comment: RegExp(commentSource),
19857
+ string: {
19858
+ pattern: /"(?:[^"]|"")*"(?!")/,
19859
+ greedy: true
19860
+ },
19861
+ operator: /=/,
19862
+ punctuation: /^#\[|\]$|[,()]/
19863
+ }
19864
+ },
19865
+ {
19866
+ pattern:
19867
+ /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
19868
+ alias: 'attr-name'
19869
+ }
19870
+ ],
19871
+ keyword:
19872
+ /\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,
19873
+ number:
19874
+ /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
19875
+ punct: {
19876
+ pattern: /@\{|\{\||\[=|:>/,
19877
+ alias: 'punctuation'
19878
+ },
19879
+ operator:
19880
+ /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
19881
+ punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
19882
+ };
19883
+ })(Prism);
19884
+ }
19885
+ return coq_1;
19836
19886
  }
19837
19887
 
19838
- var ruby_1 = ruby;
19839
- ruby.displayName = 'ruby';
19840
- ruby.aliases = ['rb'];
19841
- function ruby(Prism) {
19888
+ var ruby_1;
19889
+ var hasRequiredRuby;
19890
+
19891
+ function requireRuby () {
19892
+ if (hasRequiredRuby) return ruby_1;
19893
+ hasRequiredRuby = 1;
19894
+
19895
+ ruby_1 = ruby;
19896
+ ruby.displayName = 'ruby';
19897
+ ruby.aliases = ['rb'];
19898
+ function ruby(Prism) {
19842
19899
  (function (Prism) {
19843
- Prism.languages.ruby = Prism.languages.extend('clike', {
19844
- comment: {
19845
- pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
19846
- greedy: true
19847
- },
19848
- 'class-name': {
19849
- pattern:
19850
- /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
19851
- lookbehind: true,
19852
- inside: {
19853
- punctuation: /[.\\]/
19854
- }
19855
- },
19856
- keyword:
19857
- /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
19858
- operator:
19859
- /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
19860
- punctuation: /[(){}[\].,;]/
19861
- });
19862
- Prism.languages.insertBefore('ruby', 'operator', {
19863
- 'double-colon': {
19864
- pattern: /::/,
19865
- alias: 'punctuation'
19866
- }
19867
- });
19868
- var interpolation = {
19869
- pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
19870
- lookbehind: true,
19871
- inside: {
19872
- content: {
19873
- pattern: /^(#\{)[\s\S]+(?=\}$)/,
19874
- lookbehind: true,
19875
- inside: Prism.languages.ruby
19876
- },
19877
- delimiter: {
19878
- pattern: /^#\{|\}$/,
19879
- alias: 'punctuation'
19880
- }
19881
- }
19882
- };
19883
- delete Prism.languages.ruby.function;
19884
- var percentExpression =
19885
- '(?:' +
19886
- [
19887
- /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
19888
- /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
19889
- /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
19890
- /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
19891
- /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
19892
- ].join('|') +
19893
- ')';
19894
- var symbolName =
19895
- /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
19896
- .source;
19897
- Prism.languages.insertBefore('ruby', 'keyword', {
19898
- 'regex-literal': [
19899
- {
19900
- pattern: RegExp(
19901
- /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
19902
- ),
19903
- greedy: true,
19904
- inside: {
19905
- interpolation: interpolation,
19906
- regex: /[\s\S]+/
19907
- }
19908
- },
19909
- {
19910
- pattern:
19911
- /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
19912
- lookbehind: true,
19913
- greedy: true,
19914
- inside: {
19915
- interpolation: interpolation,
19916
- regex: /[\s\S]+/
19917
- }
19918
- }
19919
- ],
19920
- variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
19921
- symbol: [
19922
- {
19923
- pattern: RegExp(/(^|[^:]):/.source + symbolName),
19924
- lookbehind: true,
19925
- greedy: true
19926
- },
19927
- {
19928
- pattern: RegExp(
19929
- /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
19930
- ),
19931
- lookbehind: true,
19932
- greedy: true
19933
- }
19934
- ],
19935
- 'method-definition': {
19936
- pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
19937
- lookbehind: true,
19938
- inside: {
19939
- function: /\b\w+$/,
19940
- keyword: /^self\b/,
19941
- 'class-name': /^\w+/,
19942
- punctuation: /\./
19943
- }
19944
- }
19945
- });
19946
- Prism.languages.insertBefore('ruby', 'string', {
19947
- 'string-literal': [
19948
- {
19949
- pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
19950
- greedy: true,
19951
- inside: {
19952
- interpolation: interpolation,
19953
- string: /[\s\S]+/
19954
- }
19955
- },
19956
- {
19957
- pattern:
19958
- /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
19959
- greedy: true,
19960
- inside: {
19961
- interpolation: interpolation,
19962
- string: /[\s\S]+/
19963
- }
19964
- },
19965
- {
19966
- pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
19967
- alias: 'heredoc-string',
19968
- greedy: true,
19969
- inside: {
19970
- delimiter: {
19971
- pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
19972
- inside: {
19973
- symbol: /\b\w+/,
19974
- punctuation: /^<<[-~]?/
19975
- }
19976
- },
19977
- interpolation: interpolation,
19978
- string: /[\s\S]+/
19979
- }
19980
- },
19981
- {
19982
- pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
19983
- alias: 'heredoc-string',
19984
- greedy: true,
19985
- inside: {
19986
- delimiter: {
19987
- pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
19988
- inside: {
19989
- symbol: /\b\w+/,
19990
- punctuation: /^<<[-~]?'|'$/
19991
- }
19992
- },
19993
- string: /[\s\S]+/
19994
- }
19995
- }
19996
- ],
19997
- 'command-literal': [
19998
- {
19999
- pattern: RegExp(/%x/.source + percentExpression),
20000
- greedy: true,
20001
- inside: {
20002
- interpolation: interpolation,
20003
- command: {
20004
- pattern: /[\s\S]+/,
20005
- alias: 'string'
20006
- }
20007
- }
20008
- },
20009
- {
20010
- pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
20011
- greedy: true,
20012
- inside: {
20013
- interpolation: interpolation,
20014
- command: {
20015
- pattern: /[\s\S]+/,
20016
- alias: 'string'
20017
- }
20018
- }
20019
- }
20020
- ]
20021
- });
20022
- delete Prism.languages.ruby.string;
20023
- Prism.languages.insertBefore('ruby', 'number', {
20024
- builtin:
20025
- /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
20026
- constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
20027
- });
20028
- Prism.languages.rb = Prism.languages.ruby;
20029
- })(Prism);
19900
+ Prism.languages.ruby = Prism.languages.extend('clike', {
19901
+ comment: {
19902
+ pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
19903
+ greedy: true
19904
+ },
19905
+ 'class-name': {
19906
+ pattern:
19907
+ /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
19908
+ lookbehind: true,
19909
+ inside: {
19910
+ punctuation: /[.\\]/
19911
+ }
19912
+ },
19913
+ keyword:
19914
+ /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
19915
+ operator:
19916
+ /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
19917
+ punctuation: /[(){}[\].,;]/
19918
+ });
19919
+ Prism.languages.insertBefore('ruby', 'operator', {
19920
+ 'double-colon': {
19921
+ pattern: /::/,
19922
+ alias: 'punctuation'
19923
+ }
19924
+ });
19925
+ var interpolation = {
19926
+ pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
19927
+ lookbehind: true,
19928
+ inside: {
19929
+ content: {
19930
+ pattern: /^(#\{)[\s\S]+(?=\}$)/,
19931
+ lookbehind: true,
19932
+ inside: Prism.languages.ruby
19933
+ },
19934
+ delimiter: {
19935
+ pattern: /^#\{|\}$/,
19936
+ alias: 'punctuation'
19937
+ }
19938
+ }
19939
+ };
19940
+ delete Prism.languages.ruby.function;
19941
+ var percentExpression =
19942
+ '(?:' +
19943
+ [
19944
+ /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
19945
+ /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
19946
+ /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
19947
+ /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
19948
+ /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
19949
+ ].join('|') +
19950
+ ')';
19951
+ var symbolName =
19952
+ /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
19953
+ .source;
19954
+ Prism.languages.insertBefore('ruby', 'keyword', {
19955
+ 'regex-literal': [
19956
+ {
19957
+ pattern: RegExp(
19958
+ /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
19959
+ ),
19960
+ greedy: true,
19961
+ inside: {
19962
+ interpolation: interpolation,
19963
+ regex: /[\s\S]+/
19964
+ }
19965
+ },
19966
+ {
19967
+ pattern:
19968
+ /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
19969
+ lookbehind: true,
19970
+ greedy: true,
19971
+ inside: {
19972
+ interpolation: interpolation,
19973
+ regex: /[\s\S]+/
19974
+ }
19975
+ }
19976
+ ],
19977
+ variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
19978
+ symbol: [
19979
+ {
19980
+ pattern: RegExp(/(^|[^:]):/.source + symbolName),
19981
+ lookbehind: true,
19982
+ greedy: true
19983
+ },
19984
+ {
19985
+ pattern: RegExp(
19986
+ /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
19987
+ ),
19988
+ lookbehind: true,
19989
+ greedy: true
19990
+ }
19991
+ ],
19992
+ 'method-definition': {
19993
+ pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
19994
+ lookbehind: true,
19995
+ inside: {
19996
+ function: /\b\w+$/,
19997
+ keyword: /^self\b/,
19998
+ 'class-name': /^\w+/,
19999
+ punctuation: /\./
20000
+ }
20001
+ }
20002
+ });
20003
+ Prism.languages.insertBefore('ruby', 'string', {
20004
+ 'string-literal': [
20005
+ {
20006
+ pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
20007
+ greedy: true,
20008
+ inside: {
20009
+ interpolation: interpolation,
20010
+ string: /[\s\S]+/
20011
+ }
20012
+ },
20013
+ {
20014
+ pattern:
20015
+ /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
20016
+ greedy: true,
20017
+ inside: {
20018
+ interpolation: interpolation,
20019
+ string: /[\s\S]+/
20020
+ }
20021
+ },
20022
+ {
20023
+ pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
20024
+ alias: 'heredoc-string',
20025
+ greedy: true,
20026
+ inside: {
20027
+ delimiter: {
20028
+ pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
20029
+ inside: {
20030
+ symbol: /\b\w+/,
20031
+ punctuation: /^<<[-~]?/
20032
+ }
20033
+ },
20034
+ interpolation: interpolation,
20035
+ string: /[\s\S]+/
20036
+ }
20037
+ },
20038
+ {
20039
+ pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
20040
+ alias: 'heredoc-string',
20041
+ greedy: true,
20042
+ inside: {
20043
+ delimiter: {
20044
+ pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
20045
+ inside: {
20046
+ symbol: /\b\w+/,
20047
+ punctuation: /^<<[-~]?'|'$/
20048
+ }
20049
+ },
20050
+ string: /[\s\S]+/
20051
+ }
20052
+ }
20053
+ ],
20054
+ 'command-literal': [
20055
+ {
20056
+ pattern: RegExp(/%x/.source + percentExpression),
20057
+ greedy: true,
20058
+ inside: {
20059
+ interpolation: interpolation,
20060
+ command: {
20061
+ pattern: /[\s\S]+/,
20062
+ alias: 'string'
20063
+ }
20064
+ }
20065
+ },
20066
+ {
20067
+ pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
20068
+ greedy: true,
20069
+ inside: {
20070
+ interpolation: interpolation,
20071
+ command: {
20072
+ pattern: /[\s\S]+/,
20073
+ alias: 'string'
20074
+ }
20075
+ }
20076
+ }
20077
+ ]
20078
+ });
20079
+ delete Prism.languages.ruby.string;
20080
+ Prism.languages.insertBefore('ruby', 'number', {
20081
+ builtin:
20082
+ /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
20083
+ constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
20084
+ });
20085
+ Prism.languages.rb = Prism.languages.ruby;
20086
+ })(Prism);
20087
+ }
20088
+ return ruby_1;
20030
20089
  }
20031
20090
 
20032
- var refractorRuby = ruby_1;
20033
- var crystal_1 = crystal;
20034
- crystal.displayName = 'crystal';
20035
- crystal.aliases = [];
20036
- function crystal(Prism) {
20037
- Prism.register(refractorRuby)
20038
- ;(function (Prism) {
20039
- Prism.languages.crystal = Prism.languages.extend('ruby', {
20040
- keyword: [
20041
- /\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,
20042
- {
20043
- pattern: /(\.\s*)(?:is_a|responds_to)\?/,
20044
- lookbehind: true
20045
- }
20046
- ],
20047
- number:
20048
- /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
20049
- operator: [/->/, Prism.languages.ruby.operator],
20050
- punctuation: /[(){}[\].,;\\]/
20051
- });
20052
- Prism.languages.insertBefore('crystal', 'string-literal', {
20053
- attribute: {
20054
- pattern: /@\[.*?\]/,
20055
- inside: {
20056
- delimiter: {
20057
- pattern: /^@\[|\]$/,
20058
- alias: 'punctuation'
20059
- },
20060
- attribute: {
20061
- pattern: /^(\s*)\w+/,
20062
- lookbehind: true,
20063
- alias: 'class-name'
20064
- },
20065
- args: {
20066
- pattern: /\S(?:[\s\S]*\S)?/,
20067
- inside: Prism.languages.crystal
20068
- }
20069
- }
20070
- },
20071
- expansion: {
20072
- pattern: /\{(?:\{.*?\}|%.*?%)\}/,
20073
- inside: {
20074
- content: {
20075
- pattern: /^(\{.)[\s\S]+(?=.\}$)/,
20076
- lookbehind: true,
20077
- inside: Prism.languages.crystal
20078
- },
20079
- delimiter: {
20080
- pattern: /^\{[\{%]|[\}%]\}$/,
20081
- alias: 'operator'
20082
- }
20083
- }
20084
- },
20085
- char: {
20086
- pattern:
20087
- /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
20088
- greedy: true
20089
- }
20090
- });
20091
- })(Prism);
20091
+ var crystal_1;
20092
+ var hasRequiredCrystal;
20093
+
20094
+ function requireCrystal () {
20095
+ if (hasRequiredCrystal) return crystal_1;
20096
+ hasRequiredCrystal = 1;
20097
+ var refractorRuby = requireRuby();
20098
+ crystal_1 = crystal;
20099
+ crystal.displayName = 'crystal';
20100
+ crystal.aliases = [];
20101
+ function crystal(Prism) {
20102
+ Prism.register(refractorRuby)
20103
+ ;(function (Prism) {
20104
+ Prism.languages.crystal = Prism.languages.extend('ruby', {
20105
+ keyword: [
20106
+ /\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,
20107
+ {
20108
+ pattern: /(\.\s*)(?:is_a|responds_to)\?/,
20109
+ lookbehind: true
20110
+ }
20111
+ ],
20112
+ number:
20113
+ /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
20114
+ operator: [/->/, Prism.languages.ruby.operator],
20115
+ punctuation: /[(){}[\].,;\\]/
20116
+ });
20117
+ Prism.languages.insertBefore('crystal', 'string-literal', {
20118
+ attribute: {
20119
+ pattern: /@\[.*?\]/,
20120
+ inside: {
20121
+ delimiter: {
20122
+ pattern: /^@\[|\]$/,
20123
+ alias: 'punctuation'
20124
+ },
20125
+ attribute: {
20126
+ pattern: /^(\s*)\w+/,
20127
+ lookbehind: true,
20128
+ alias: 'class-name'
20129
+ },
20130
+ args: {
20131
+ pattern: /\S(?:[\s\S]*\S)?/,
20132
+ inside: Prism.languages.crystal
20133
+ }
20134
+ }
20135
+ },
20136
+ expansion: {
20137
+ pattern: /\{(?:\{.*?\}|%.*?%)\}/,
20138
+ inside: {
20139
+ content: {
20140
+ pattern: /^(\{.)[\s\S]+(?=.\}$)/,
20141
+ lookbehind: true,
20142
+ inside: Prism.languages.crystal
20143
+ },
20144
+ delimiter: {
20145
+ pattern: /^\{[\{%]|[\}%]\}$/,
20146
+ alias: 'operator'
20147
+ }
20148
+ }
20149
+ },
20150
+ char: {
20151
+ pattern:
20152
+ /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
20153
+ greedy: true
20154
+ }
20155
+ });
20156
+ })(Prism);
20157
+ }
20158
+ return crystal_1;
20092
20159
  }
20093
20160
 
20094
20161
  var cshtml_1;
@@ -20097,7 +20164,7 @@ var hasRequiredCshtml;
20097
20164
  function requireCshtml () {
20098
20165
  if (hasRequiredCshtml) return cshtml_1;
20099
20166
  hasRequiredCshtml = 1;
20100
- var refractorCsharp = csharp_1;
20167
+ var refractorCsharp = requireCsharp();
20101
20168
  cshtml_1 = cshtml;
20102
20169
  cshtml.displayName = 'cshtml';
20103
20170
  cshtml.aliases = ['razor'];
@@ -21861,7 +21928,7 @@ var hasRequiredErb;
21861
21928
  function requireErb () {
21862
21929
  if (hasRequiredErb) return erb_1;
21863
21930
  hasRequiredErb = 1;
21864
- var refractorRuby = ruby_1;
21931
+ var refractorRuby = requireRuby();
21865
21932
  var refractorMarkupTemplating = requireMarkupTemplating();
21866
21933
  erb_1 = erb;
21867
21934
  erb.displayName = 'erb';
@@ -24343,7 +24410,7 @@ var hasRequiredHaml;
24343
24410
  function requireHaml () {
24344
24411
  if (hasRequiredHaml) return haml_1;
24345
24412
  hasRequiredHaml = 1;
24346
- var refractorRuby = ruby_1;
24413
+ var refractorRuby = requireRuby();
24347
24414
  haml_1 = haml;
24348
24415
  haml.displayName = 'haml';
24349
24416
  haml.aliases = [];
@@ -36779,7 +36846,7 @@ function requireT4Cs () {
36779
36846
  if (hasRequiredT4Cs) return t4Cs_1;
36780
36847
  hasRequiredT4Cs = 1;
36781
36848
  var refractorT4Templating = requireT4Templating();
36782
- var refractorCsharp = csharp_1;
36849
+ var refractorCsharp = requireCsharp();
36783
36850
  t4Cs_1 = t4Cs;
36784
36851
  t4Cs.displayName = 't4Cs';
36785
36852
  t4Cs.aliases = [];
@@ -39553,16 +39620,16 @@ refractor.register(bsl_1);
39553
39620
  refractor.register(c_1);
39554
39621
  refractor.register(cfscript_1);
39555
39622
  refractor.register(chaiscript_1);
39556
- refractor.register(requireCil());
39623
+ refractor.register(cil_1);
39557
39624
  refractor.register(clojure_1);
39558
39625
  refractor.register(cmake_1);
39559
- refractor.register(cobol_1);
39560
- refractor.register(coffeescript_1);
39561
- refractor.register(concurnas_1);
39562
- refractor.register(coq_1);
39563
- refractor.register(cpp_1);
39564
- refractor.register(crystal_1);
39565
- refractor.register(csharp_1);
39626
+ refractor.register(requireCobol());
39627
+ refractor.register(requireCoffeescript());
39628
+ refractor.register(requireConcurnas());
39629
+ refractor.register(requireCoq());
39630
+ refractor.register(requireCpp());
39631
+ refractor.register(requireCrystal());
39632
+ refractor.register(requireCsharp());
39566
39633
  refractor.register(requireCshtml());
39567
39634
  refractor.register(requireCsp());
39568
39635
  refractor.register(requireCssExtras());
@@ -39727,7 +39794,7 @@ refractor.register(requireRest());
39727
39794
  refractor.register(requireRip());
39728
39795
  refractor.register(requireRoboconf());
39729
39796
  refractor.register(requireRobotframework());
39730
- refractor.register(ruby_1);
39797
+ refractor.register(requireRuby());
39731
39798
  refractor.register(requireRust());
39732
39799
  refractor.register(requireSas());
39733
39800
  refractor.register(requireSass());
@@ -41811,8 +41878,8 @@ var css$G = ".Body_module_root__85b1b679 {\n padding: 0.5rem 0.5rem;\n display
41811
41878
  var modules_e6b80d99 = {"root":"Body_module_root__85b1b679"};
41812
41879
  n(css$G,{});
41813
41880
 
41814
- var css$F = ".Dates_module_dates__e3e1fc43 {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n align-items: center;\n flex-wrap: wrap;\n}\n.Dates_module_dates__e3e1fc43 div {\n flex-basis: 14.28%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.25rem;\n cursor: pointer;\n align-self: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_date__e3e1fc43 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n text-align: center;\n vertical-align: middle;\n border-radius: 1.5rem;\n height: 2.5rem;\n width: 2.5rem;\n font-weight: 400;\n font-size: 0.875rem;\n color: var(--black);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_selected__e3e1fc43 {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_unSelected__e3e1fc43 {\n background-color: var(--white);\n border-color: var(--highlight);\n border-width: 0.125rem;\n border-style: solid;\n color: var(--black);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_disabled__e3e1fc43 {\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_diffMonth__e3e1fc43 {\n opacity: 0.6;\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_date__e3e1fc43 {\n background: var(--background);\n color: var(--highlight);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_selected__e3e1fc43 {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_disabled__e3e1fc43 {\n background: transparent;\n box-shadow: none;\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43 {\n background-color: var(--highlight);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43:hover .Dates_module_date__e3e1fc43 {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43 {\n background-color: var(--highlight);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43:hover .Dates_module_date__e3e1fc43 {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_midInRange__e3e1fc43 {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_midInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_firstHovered__e3e1fc43 {\n background: var(--background);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_firstHovered__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_lastHovered__e3e1fc43 {\n background: var(--background);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_lastHovered__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}";
41815
- var modules_b02dadcc = {"dates":"Dates_module_dates__e3e1fc43","date":"Dates_module_date__e3e1fc43","selected":"Dates_module_selected__e3e1fc43","unSelected":"Dates_module_unSelected__e3e1fc43","disabled":"Dates_module_disabled__e3e1fc43","diffMonth":"Dates_module_diffMonth__e3e1fc43","minInRange":"Dates_module_minInRange__e3e1fc43","maxInRange":"Dates_module_maxInRange__e3e1fc43","midInRange":"Dates_module_midInRange__e3e1fc43","first-hovered":"Dates_module_firstHovered__e3e1fc43","last-hovered":"Dates_module_lastHovered__e3e1fc43"};
41881
+ var css$F = ".Dates_module_dates__e964f6bf {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n align-items: center;\n flex-wrap: wrap;\n}\n.Dates_module_dates__e964f6bf div {\n flex-basis: 14.28%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.25rem;\n cursor: pointer;\n align-self: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Dates_module_dates__e964f6bf div .Dates_module_date__e964f6bf {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n text-align: center;\n vertical-align: middle;\n border-radius: 1.5rem;\n height: 2.5rem;\n width: 2.5rem;\n font-weight: 400;\n font-size: 0.875rem;\n color: var(--black);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_selected__e964f6bf {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_unSelected__e964f6bf {\n background-color: var(--white);\n border-color: var(--highlight);\n border-width: 0.125rem;\n border-style: solid;\n color: var(--black);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_disabled__e964f6bf {\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_diffMonth__e964f6bf {\n opacity: 0.6;\n}\n.Dates_module_dates__e964f6bf div:hover .Dates_module_date__e964f6bf {\n background: var(--background);\n color: var(--highlight);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e964f6bf div:hover .Dates_module_selected__e964f6bf {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf div:hover .Dates_module_disabled__e964f6bf {\n background: transparent;\n box-shadow: none;\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e964f6bf .Dates_module_minInRange__e964f6bf {\n background-color: var(--highlight);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_minInRange__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf .Dates_module_minInRange__e964f6bf:hover .Dates_module_date__e964f6bf {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e964f6bf .Dates_module_maxInRange__e964f6bf {\n background-color: var(--highlight);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_maxInRange__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf .Dates_module_maxInRange__e964f6bf:hover .Dates_module_date__e964f6bf {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRange__e964f6bf {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRange__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--highlight);\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRangeSelected__e964f6bf {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRangeSelected__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf .Dates_module_firstHovered__e964f6bf {\n background: var(--background);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_firstHovered__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--highlight);\n}\n.Dates_module_dates__e964f6bf .Dates_module_lastHovered__e964f6bf {\n background: var(--background);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_lastHovered__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--highlight);\n}";
41882
+ var modules_b02dadcc = {"dates":"Dates_module_dates__e964f6bf","date":"Dates_module_date__e964f6bf","selected":"Dates_module_selected__e964f6bf","unSelected":"Dates_module_unSelected__e964f6bf","disabled":"Dates_module_disabled__e964f6bf","diffMonth":"Dates_module_diffMonth__e964f6bf","minInRange":"Dates_module_minInRange__e964f6bf","maxInRange":"Dates_module_maxInRange__e964f6bf","midInRange":"Dates_module_midInRange__e964f6bf","midInRangeSelected":"Dates_module_midInRangeSelected__e964f6bf","first-hovered":"Dates_module_firstHovered__e964f6bf","last-hovered":"Dates_module_lastHovered__e964f6bf"};
41816
41883
  n(css$F,{});
41817
41884
 
41818
41885
  var getDatesOfLastWeekOfLastMonth = function getDatesOfLastWeekOfLastMonth(_ref) {
@@ -42039,9 +42106,9 @@ var Dates = function Dates(props) {
42039
42106
  if (hoveredEndingDate) {
42040
42107
  isMidItem = isBefore(date, fromUnixTime(hoveredEndingDate)) && isAfter(date, fromUnixTime(firstItem)) || isAfter(date, fromUnixTime(hoveredEndingDate)) && isBefore(date, fromUnixTime(firstItem));
42041
42108
  } else {
42042
- isMidItem = isBefore(date, fromUnixTime(lastItem)) && isAfter(date, fromUnixTime(firstItem).setHours(23, 59, 59, 59));
42109
+ isMidItem = isBefore(date, fromUnixTime(lastItem).setHours(0, 0, 0, 0)) && isAfter(date, fromUnixTime(firstItem).setHours(23, 59, 59, 59));
42043
42110
  }
42044
- var parentClassNames = classes(isMidItem ? modules_b02dadcc.midInRange : '', isFirstItem ? isHoveringBeforeSelectedDate ? modules_b02dadcc.maxInRange : modules_b02dadcc.minInRange : '', isLastItem ? modules_b02dadcc.maxInRange : '', isLastItemHovered ? modules_b02dadcc['first-hovered'] : '', isFirstItemHovered ? modules_b02dadcc['last-hovered'] : '');
42111
+ var parentClassNames = classes(isMidItem ? selectedSingleDate ? modules_b02dadcc.midInRangeSelected : modules_b02dadcc.midInRange : '', isFirstItem ? isHoveringBeforeSelectedDate ? modules_b02dadcc.maxInRange : modules_b02dadcc.minInRange : '', isLastItem ? modules_b02dadcc.maxInRange : '', isLastItemHovered ? modules_b02dadcc['first-hovered'] : '', isFirstItemHovered ? modules_b02dadcc['last-hovered'] : '');
42045
42112
  var childClassNames = classes(date ? modules_b02dadcc.date : '', selectedSingleDate ? modules_b02dadcc.selected : '', isUnSelected ? modules_b02dadcc.unSelected : '', notSameMonth ? modules_b02dadcc.diffMonth : '', isDisabled ? modules_b02dadcc.disabled : '');
42046
42113
  return /*#__PURE__*/jsxRuntime.jsx("div", {
42047
42114
  className: parentClassNames,
@@ -43036,29 +43103,48 @@ var getDateAndUnixRange = function getDateAndUnixRange(duration) {
43036
43103
  startingDate.setHours(0, 0, 0, 0);
43037
43104
  var endingDate = new Date();
43038
43105
  endingDate.setHours(0, 0, 0, 0);
43039
- var dates = ["".concat(startingDate.getDate(), " ").concat(MONTHS[startingDate.getMonth()].substring(0, 3), " ").concat(startingDate.getFullYear()), "".concat(endingDate.getDate(), " ").concat(MONTHS[endingDate.getMonth()].substring(0, 3), " ").concat(endingDate.getFullYear())];
43106
+ var dates = getDatesInStringFormat({
43107
+ startingDate: startingDate,
43108
+ endingDate: endingDate
43109
+ });
43040
43110
  var unix = [getUnixTime(startingDate), getUnixTime(endingDate)];
43041
43111
  return {
43042
43112
  dates: dates,
43043
43113
  unix: unix
43044
43114
  };
43045
43115
  };
43046
- var dateRanges = [{
43047
- title: '7 Days',
43048
- dateRange: getDateAndUnixRange({
43049
- days: 7
43050
- })
43051
- }, {
43052
- title: '15 Days',
43053
- dateRange: getDateAndUnixRange({
43054
- days: 15
43055
- })
43056
- }, {
43057
- title: '1 Month',
43058
- dateRange: getDateAndUnixRange({
43059
- months: 1
43060
- })
43061
- }];
43116
+ var dateRanges = function dateRanges() {
43117
+ var customRanges = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
43118
+ if ((customRanges === null || customRanges === void 0 ? void 0 : customRanges.length) > 0) {
43119
+ return customRanges.map(function (range) {
43120
+ return {
43121
+ title: range.title,
43122
+ dateRange: getDateAndUnixRange(_defineProperty$1({}, range.type, [range.value]))
43123
+ };
43124
+ });
43125
+ }
43126
+ return [{
43127
+ title: 'Last 24 Hours',
43128
+ dateRange: getDateAndUnixRange({
43129
+ hours: 24
43130
+ })
43131
+ }, {
43132
+ title: 'Last 7 Days',
43133
+ dateRange: getDateAndUnixRange({
43134
+ days: 7
43135
+ })
43136
+ }, {
43137
+ title: 'Last 15 Days',
43138
+ dateRange: getDateAndUnixRange({
43139
+ days: 15
43140
+ })
43141
+ }, {
43142
+ title: 'Last 1 Month',
43143
+ dateRange: getDateAndUnixRange({
43144
+ months: 1
43145
+ })
43146
+ }];
43147
+ };
43062
43148
 
43063
43149
  var SelectedDateView = function SelectedDateView(props) {
43064
43150
  var value = props.value,
@@ -43089,7 +43175,9 @@ var Footer = function Footer(props) {
43089
43175
  setSelectedRange = props.setSelectedRange,
43090
43176
  range = props.range,
43091
43177
  goToDate = props.goToDate,
43092
- onApply = props.onApply;
43178
+ onApply = props.onApply,
43179
+ setFixedRange = props.setFixedRange,
43180
+ customRanges = props.customRanges;
43093
43181
  var date = selectedDate.date,
43094
43182
  month = selectedDate.month,
43095
43183
  year = selectedDate.year;
@@ -43097,8 +43185,9 @@ var Footer = function Footer(props) {
43097
43185
  dates = _selectedRange$dates === void 0 ? [] : _selectedRange$dates;
43098
43186
  var monthInShort = month === null || month === void 0 ? void 0 : month.substr(0, 3);
43099
43187
  var datesSelected = date || dates.length === 2;
43100
- var selectFixedDateRange = function selectFixedDateRange(dateRange) {
43188
+ var selectFixedDateRange = function selectFixedDateRange(dateRange, title) {
43101
43189
  setSelectedRange(dateRange);
43190
+ setFixedRange(title);
43102
43191
  };
43103
43192
  var resetDate = function resetDate() {
43104
43193
  goToDate(getUnixTime(new Date()));
@@ -43152,7 +43241,7 @@ var Footer = function Footer(props) {
43152
43241
  var timeValue = "".concat(getTimePickerValue().hours, ":").concat(getTimePickerValue().minutes, " ").concat(getTimePickerValue().meridian);
43153
43242
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
43154
43243
  className: modules_b490bd5d.root,
43155
- children: [/*#__PURE__*/jsxRuntime.jsx(TimePicker, {
43244
+ children: [!range && /*#__PURE__*/jsxRuntime.jsx(TimePicker, {
43156
43245
  value: getTimePickerValue(),
43157
43246
  onChange: onTimeChange,
43158
43247
  className: modules_b490bd5d['time-picker']
@@ -43173,7 +43262,7 @@ var Footer = function Footer(props) {
43173
43262
  action: resetDate
43174
43263
  }), range && /*#__PURE__*/jsxRuntime.jsx("div", {
43175
43264
  className: modules_b490bd5d['date-ranges'],
43176
- children: dateRanges.map(function (_ref) {
43265
+ children: dateRanges(customRanges).map(function (_ref) {
43177
43266
  var _selectedRange$unix;
43178
43267
  var dateRange = _ref.dateRange,
43179
43268
  title = _ref.title;
@@ -43181,7 +43270,7 @@ var Footer = function Footer(props) {
43181
43270
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
43182
43271
  className: classes(modules_b490bd5d['date-range'], selectedFixedDateRange ? modules_b490bd5d.selected : ''),
43183
43272
  onClick: function onClick() {
43184
- selectFixedDateRange(dateRange);
43273
+ selectFixedDateRange(dateRange, title);
43185
43274
  },
43186
43275
  children: [/*#__PURE__*/jsxRuntime.jsx(HalfShade, {}), /*#__PURE__*/jsxRuntime.jsx("span", {
43187
43276
  children: title
@@ -43205,7 +43294,9 @@ var Calender = function Calender(props) {
43205
43294
  onApply = props.onApply,
43206
43295
  disabledDates = props.disabledDates,
43207
43296
  disableDatesBefore = props.disableDatesBefore,
43208
- value = props.value;
43297
+ value = props.value,
43298
+ setFixedRange = props.setFixedRange,
43299
+ customRanges = props.customRanges;
43209
43300
  var _getDayInfo = getDayInfo(new Date()),
43210
43301
  month = _getDayInfo.month,
43211
43302
  year = _getDayInfo.year,
@@ -43221,10 +43312,16 @@ var Calender = function Calender(props) {
43221
43312
  selectedMonth = _useState2[0],
43222
43313
  setSelectedMonth = _useState2[1];
43223
43314
  React.useEffect(function () {
43224
- if (value) {
43225
- var _date = fromUnixTime(value);
43226
- var dateAsNumber = _date.getDate();
43227
- var selectedDayInfo = getDayInfo(_date);
43315
+ if (range && value) {
43316
+ setSelectedRange({
43317
+ dates: getDatesInStringFormat({
43318
+ startingDate: fromUnixTime(value[0]),
43319
+ endingDate: fromUnixTime(value[1])
43320
+ }),
43321
+ unix: [value[0], value[1]]
43322
+ });
43323
+ var dateAsNumber = fromUnixTime(value[0]).getDate();
43324
+ var selectedDayInfo = getDayInfo(fromUnixTime(value[0]));
43228
43325
  var selectedDateMonth = {
43229
43326
  month: selectedDayInfo.month,
43230
43327
  monthAsNumber: selectedDayInfo.monthAsNumber,
@@ -43240,19 +43337,40 @@ var Calender = function Calender(props) {
43240
43337
  month: selectedDateMonth.month,
43241
43338
  year: selectedDateMonth.year,
43242
43339
  date: dateAsNumber,
43243
- unix: getUnixTime(_date)
43340
+ unix: getUnixTime(fromUnixTime(value[0]))
43244
43341
  }));
43245
- return;
43246
- }
43247
- var date = new Date();
43248
- if (!range && !isBefore(date, disableDatesBefore)) {
43342
+ } else if (value) {
43343
+ var date = fromUnixTime(value);
43249
43344
  var _dateAsNumber = date.getDate();
43345
+ var _selectedDayInfo = getDayInfo(date);
43346
+ var _selectedDateMonth = {
43347
+ month: _selectedDayInfo.month,
43348
+ monthAsNumber: _selectedDayInfo.monthAsNumber,
43349
+ year: _selectedDayInfo.year,
43350
+ dayAsNumber: _selectedDayInfo.dayAsNumber
43351
+ };
43352
+ setSelectedMonth({
43353
+ month: _selectedDayInfo.month,
43354
+ monthAsNumber: _selectedDayInfo.monthAsNumber,
43355
+ year: _selectedDayInfo.year
43356
+ });
43250
43357
  setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
43251
- month: selectedMonth.month,
43252
- year: selectedMonth.year,
43358
+ month: _selectedDateMonth.month,
43359
+ year: _selectedDateMonth.year,
43253
43360
  date: _dateAsNumber,
43254
43361
  unix: getUnixTime(date)
43255
43362
  }));
43363
+ } else {
43364
+ var _date = new Date();
43365
+ if (!range && !isBefore(_date, disableDatesBefore)) {
43366
+ var _dateAsNumber2 = _date.getDate();
43367
+ setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
43368
+ month: selectedMonth.month,
43369
+ year: selectedMonth.year,
43370
+ date: _dateAsNumber2,
43371
+ unix: getUnixTime(_date)
43372
+ }));
43373
+ }
43256
43374
  }
43257
43375
  }, []);
43258
43376
  var goToDate = function goToDate(unix) {
@@ -43329,7 +43447,9 @@ var Calender = function Calender(props) {
43329
43447
  selectedRange: selectedRange,
43330
43448
  setSelectedRange: setSelectedRange,
43331
43449
  onApply: onApply,
43332
- goToDate: goToDate
43450
+ goToDate: goToDate,
43451
+ customRanges: customRanges,
43452
+ setFixedRange: setFixedRange
43333
43453
  })]
43334
43454
  });
43335
43455
  };
@@ -43373,7 +43493,9 @@ var DatePicker = function DatePicker(props) {
43373
43493
  className = props.className,
43374
43494
  disableDatesBefore = props.disableDatesBefore,
43375
43495
  theme = props.theme,
43376
- onClear = props.onClear;
43496
+ onClear = props.onClear,
43497
+ displayDateSelectionValue = props.displayValue,
43498
+ customRanges = props.customRanges;
43377
43499
  var _useState = React.useState(false),
43378
43500
  _useState2 = _slicedToArray(_useState, 2),
43379
43501
  open = _useState2[0],
@@ -43387,25 +43509,38 @@ var DatePicker = function DatePicker(props) {
43387
43509
  _useState4 = _slicedToArray(_useState3, 2),
43388
43510
  selectedRange = _useState4[0],
43389
43511
  setSelectedRange = _useState4[1];
43390
- var _useState5 = React.useState(function () {
43391
- return '';
43392
- }),
43512
+ var _useState5 = React.useState(null),
43393
43513
  _useState6 = _slicedToArray(_useState5, 2),
43394
- selectedDate = _useState6[0],
43395
- setSelectedDate = _useState6[1];
43514
+ fixedRange = _useState6[0],
43515
+ setFixedRange = _useState6[1];
43396
43516
  var _useState7 = React.useState(function () {
43397
43517
  return '';
43398
43518
  }),
43399
43519
  _useState8 = _slicedToArray(_useState7, 2),
43400
- error = _useState8[0],
43401
- setError = _useState8[1];
43520
+ selectedDate = _useState8[0],
43521
+ setSelectedDate = _useState8[1];
43522
+ var _useState9 = React.useState(function () {
43523
+ return '';
43524
+ }),
43525
+ _useState10 = _slicedToArray(_useState9, 2),
43526
+ error = _useState10[0],
43527
+ setError = _useState10[1];
43402
43528
  var datePickerRef = React.useRef();
43403
- var sDate = fromUnixTime(value);
43404
- var displayValue = '';
43529
+ var displayValue = displayDateSelectionValue;
43530
+ if (range) {
43531
+ var _sDate$getMonth$toStr, _eDate$getMonth$toStr;
43532
+ var sDate = fromUnixTime(value[0]);
43533
+ var eDate = fromUnixTime(value[1]);
43534
+ displayValue = " ".concat(sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr = sDate.getMonth().toString()) === null || _sDate$getMonth$toStr === void 0 ? void 0 : _sDate$getMonth$toStr.substring(0, 3)], " - ").concat(eDate.getDate(), " ").concat(MONTHS[(_eDate$getMonth$toStr = eDate.getMonth().toString()) === null || _eDate$getMonth$toStr === void 0 ? void 0 : _eDate$getMonth$toStr.substring(0, 3)], " ").concat(eDate.getFullYear());
43535
+ }
43405
43536
  if (!range && value) {
43406
- var _sDate$getMonth$toStr;
43407
- var timeValue = "".concat((sDate.getHours() + 11) % 12 + 1, ":").concat(sDate.getMinutes(), " ").concat(sDate.getHours() >= 12 ? 'PM' : 'AM');
43408
- displayValue = " ".concat(sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr = sDate.getMonth().toString()) === null || _sDate$getMonth$toStr === void 0 ? void 0 : _sDate$getMonth$toStr.substring(0, 3)], " ").concat(sDate.getFullYear(), " ").concat(timeValue);
43537
+ var _sDate$getMonth$toStr2;
43538
+ var _sDate = fromUnixTime(value);
43539
+ var timeValue = "".concat((_sDate.getHours() + 11) % 12 + 1, ":").concat(_sDate.getMinutes(), " ").concat(_sDate.getHours() >= 12 ? 'PM' : 'AM');
43540
+ displayValue = " ".concat(_sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr2 = _sDate.getMonth().toString()) === null || _sDate$getMonth$toStr2 === void 0 ? void 0 : _sDate$getMonth$toStr2.substring(0, 3)], " ").concat(_sDate.getFullYear(), " ").concat(timeValue);
43541
+ }
43542
+ if (fixedRange) {
43543
+ displayValue = fixedRange;
43409
43544
  }
43410
43545
  var _useFloating = useFloating({
43411
43546
  open: open,
@@ -43445,7 +43580,7 @@ var DatePicker = function DatePicker(props) {
43445
43580
  getFloatingProps = _useInteractions.getFloatingProps;
43446
43581
  var apply = function apply() {
43447
43582
  if (selectedRange.dates.length === 2) {
43448
- if (!isMaxRangeExceeded({
43583
+ if (maxRange !== null && !isMaxRangeExceeded({
43449
43584
  maxRange: maxRange,
43450
43585
  selectedRange: selectedRange
43451
43586
  })) {
@@ -43454,7 +43589,7 @@ var DatePicker = function DatePicker(props) {
43454
43589
  return;
43455
43590
  }
43456
43591
  setError('');
43457
- onApply(selectedRange.unix);
43592
+ onApply(selectedRange.unix, fixedRange);
43458
43593
  setOpen(false);
43459
43594
  } else {
43460
43595
  onApply(selectedDate.unix);
@@ -43472,7 +43607,9 @@ var DatePicker = function DatePicker(props) {
43472
43607
  },
43473
43608
  disabledDates: disabledDates,
43474
43609
  disableDatesBefore: disableDatesBefore,
43475
- value: value
43610
+ value: value,
43611
+ setFixedRange: setFixedRange,
43612
+ customRanges: customRanges
43476
43613
  };
43477
43614
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
43478
43615
  className: classes(modules_5b831cd1.root, className),
@@ -43553,7 +43690,13 @@ DatePicker.propTypes = {
43553
43690
  }),
43554
43691
  className: propTypes$1.exports.string,
43555
43692
  disableDatesBefore: propTypes$1.exports.arrayOf(propTypes$1.exports.string),
43556
- theme: propTypes$1.exports.string
43693
+ theme: propTypes$1.exports.string,
43694
+ displayValue: propTypes$1.exports.string,
43695
+ customRanges: propTypes$1.exports.arrayOf(propTypes$1.exports.shape({
43696
+ title: propTypes$1.exports.string,
43697
+ type: propTypes$1.exports.string,
43698
+ value: propTypes$1.exports.string
43699
+ }))
43557
43700
  };
43558
43701
  DatePicker.defaultProps = {
43559
43702
  placeholder: '',
@@ -43567,6 +43710,8 @@ DatePicker.defaultProps = {
43567
43710
  className: '',
43568
43711
  disableDatesBefore: [],
43569
43712
  theme: 'dark',
43713
+ customRanges: null,
43714
+ displayValue: '',
43570
43715
  onClear: function onClear() {}
43571
43716
  };
43572
43717
 
@@ -45778,8 +45923,8 @@ Tabs.defaultProps = {
45778
45923
 
45779
45924
  function o(f){return r=>{f.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r);});}}
45780
45925
 
45781
- var css$8 = ".Tooltip_module_tooltip__1cb07177 {\n text-align: center;\n position: fixed;\n border-radius: 0.25rem;\n min-width: auto;\n max-width: 12rem;\n padding: 0.375rem;\n font-size: 0.875rem;\n font-family: sans-serif;\n line-height: 1;\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_light__1cb07177 {\n color: var(--black);\n background: var(--grey7);\n border-color: var(--black);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_light__1cb07177 .Tooltip_module_arrow__1cb07177 {\n background: var(--grey7);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_dark__1cb07177 {\n color: var(--white);\n background: var(--black);\n border-color: var(--white);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_dark__1cb07177 .Tooltip_module_arrow__1cb07177 {\n background: var(--black);\n}\n.Tooltip_module_tooltip__1cb07177 .Tooltip_module_arrow__1cb07177 {\n position: absolute;\n width: 1rem;\n height: 1rem;\n z-index: -1;\n pointer-events: none;\n transform: rotate(45deg);\n}";
45782
- var modules_e4619b04 = {"tooltip":"Tooltip_module_tooltip__1cb07177","light":"Tooltip_module_light__1cb07177","arrow":"Tooltip_module_arrow__1cb07177","dark":"Tooltip_module_dark__1cb07177"};
45926
+ var css$8 = ".Tooltip_module_tooltip__04fbc763 {\n text-align: center;\n border-radius: 0.25rem;\n min-width: auto;\n max-width: 12rem;\n padding: 0.375rem;\n font-size: 0.875rem;\n font-family: sans-serif;\n line-height: 1;\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_light__04fbc763 {\n color: var(--black);\n background: var(--grey7);\n border-color: var(--black);\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_light__04fbc763 .Tooltip_module_arrow__04fbc763 {\n background: var(--grey7);\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_dark__04fbc763 {\n color: var(--white);\n background: var(--black);\n border-color: var(--white);\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_dark__04fbc763 .Tooltip_module_arrow__04fbc763 {\n background: var(--black);\n}\n.Tooltip_module_tooltip__04fbc763 .Tooltip_module_arrow__04fbc763 {\n position: absolute;\n width: 1rem;\n height: 1rem;\n z-index: -1;\n pointer-events: none;\n transform: rotate(45deg);\n}";
45927
+ var modules_e4619b04 = {"tooltip":"Tooltip_module_tooltip__04fbc763","light":"Tooltip_module_light__04fbc763","arrow":"Tooltip_module_arrow__04fbc763","dark":"Tooltip_module_dark__04fbc763"};
45783
45928
  n(css$8,{});
45784
45929
 
45785
45930
  var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
@@ -45799,7 +45944,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
45799
45944
  var _useFloating = useFloating({
45800
45945
  open: open,
45801
45946
  onOpenChange: setOpen,
45802
- strategy: 'fixed',
45947
+ // strategy: 'fixed',
45803
45948
  placement: position,
45804
45949
  // Make sure the tooltip stays on the screen
45805
45950
  whileElementsMounted: autoUpdate,
@@ -45847,7 +45992,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
45847
45992
  }[side];
45848
45993
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
45849
45994
  children: [clonedChildren, /*#__PURE__*/jsxRuntime.jsx(Popper, {
45850
- open: open,
45995
+ open: open && content != null,
45851
45996
  backdrop: false,
45852
45997
  wrapperId: "tooltip",
45853
45998
  children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, getFloatingProps({
@@ -45860,7 +46005,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
45860
46005
  zIndex: 100
45861
46006
  }
45862
46007
  })), {}, {
45863
- children: [content, /*#__PURE__*/jsxRuntime.jsx("div", {
46008
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
45864
46009
  className: modules_e4619b04.arrow,
45865
46010
  ref: arrowEl,
45866
46011
  style: _defineProperty$1({
@@ -45869,7 +46014,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
45869
46014
  right: '',
45870
46015
  bottom: ''
45871
46016
  }, staticSide, '-0.5rem')
45872
- })]
46017
+ }), content]
45873
46018
  }))
45874
46019
  })]
45875
46020
  });
@@ -45882,7 +46027,7 @@ Tooltip.propTypes = {
45882
46027
  };
45883
46028
  Tooltip.defaultProps = {
45884
46029
  variant: 'light',
45885
- content: 'Tooltip Info',
46030
+ content: null,
45886
46031
  position: 'top',
45887
46032
  className: ''
45888
46033
  };
@@ -105613,7 +105758,7 @@ function useDeepCompareMemoize(value) {
105613
105758
  return ref.current;
105614
105759
  }
105615
105760
 
105616
- var _excluded = ["onClick", "onIdle", "children", "style", "mapId", "clustered", "fitBounds"];
105761
+ var _excluded$1 = ["onClick", "onIdle", "children", "style", "mapId", "clustered", "fitBounds"];
105617
105762
  var BaseMap = function BaseMap(props) {
105618
105763
  // eslint-disable-next-line object-curly-newline
105619
105764
  var onClick = props.onClick,
@@ -105623,7 +105768,7 @@ var BaseMap = function BaseMap(props) {
105623
105768
  mapId = props.mapId,
105624
105769
  clustered = props.clustered,
105625
105770
  fitBounds = props.fitBounds,
105626
- options = _objectWithoutProperties$1(props, _excluded);
105771
+ options = _objectWithoutProperties$1(props, _excluded$1);
105627
105772
  var ref = React.useRef(null);
105628
105773
  var _useState = React.useState(),
105629
105774
  _useState2 = _slicedToArray(_useState, 2),
@@ -105740,11 +105885,15 @@ Map$1.defaultProps = {
105740
105885
  libraries: undefined
105741
105886
  };
105742
105887
 
105743
- var Marker = function Marker(options) {
105888
+ var _excluded = ["children"];
105889
+ var Marker = function Marker(_ref) {
105890
+ var children = _ref.children,
105891
+ options = _objectWithoutProperties$1(_ref, _excluded);
105744
105892
  var _useState = React.useState(),
105745
105893
  _useState2 = _slicedToArray(_useState, 2),
105746
105894
  marker = _useState2[0],
105747
105895
  setMarker = _useState2[1];
105896
+ var infoWindowRef = React.useRef(null);
105748
105897
  React.useEffect(function () {
105749
105898
  if (!marker) {
105750
105899
  setMarker(new google.maps.Marker());
@@ -105757,14 +105906,57 @@ var Marker = function Marker(options) {
105757
105906
  }
105758
105907
  };
105759
105908
  }, [marker]);
105909
+ React.useEffect(function () {
105910
+ if (marker && React.Children.count(children) === 1 && infoWindowRef !== null && infoWindowRef !== void 0 && infoWindowRef.current) {
105911
+ var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
105912
+ console.log(marker, infoWindow);
105913
+ marker.addListener('click', function () {
105914
+ infoWindow.open({
105915
+ anchor: marker,
105916
+ map: options.map
105917
+ });
105918
+ });
105919
+ }
105920
+ }, [marker, children]);
105760
105921
  React.useEffect(function () {
105761
105922
  if (marker) {
105762
105923
  marker.setOptions(options);
105763
105924
  }
105764
105925
  }, [marker, options]);
105926
+ if (React.Children.count(children) === 1) {
105927
+ var _Children$toArray;
105928
+ var child = (_Children$toArray = React.Children.toArray(children)) === null || _Children$toArray === void 0 ? void 0 : _Children$toArray[0];
105929
+ if ( /*#__PURE__*/React.isValidElement(child)) {
105930
+ // set the map prop on the child component
105931
+ return /*#__PURE__*/React.cloneElement(child, {
105932
+ ref: infoWindowRef
105933
+ });
105934
+ }
105935
+ }
105765
105936
  return null;
105766
105937
  };
105767
105938
 
105939
+ // eslint-disable-next-line prefer-arrow-callback
105940
+ var InfoWindow = /*#__PURE__*/React.forwardRef(function InfoWindow(options, ref) {
105941
+ var _useState = React.useState(),
105942
+ _useState2 = _slicedToArray(_useState, 2),
105943
+ infoWindow = _useState2[0],
105944
+ setInfoWindow = _useState2[1];
105945
+ React.useEffect(function () {
105946
+ if (!infoWindow) {
105947
+ var newInfoWindow = new google.maps.InfoWindow();
105948
+ setInfoWindow(newInfoWindow);
105949
+ ref.current = newInfoWindow;
105950
+ }
105951
+ }, [infoWindow]);
105952
+ React.useEffect(function () {
105953
+ if (infoWindow) {
105954
+ infoWindow.setOptions(options);
105955
+ }
105956
+ }, [infoWindow, options]);
105957
+ return null;
105958
+ });
105959
+
105768
105960
  exports.Accordion = Accordion;
105769
105961
  exports.Alert = Alert;
105770
105962
  exports.AlertIcon = AlertIcon;
@@ -105814,6 +106006,7 @@ exports.FilterIcon = Filter;
105814
106006
  exports.HalfShadeIcon = HalfShade;
105815
106007
  exports.HierarchyBrowser = HierarchyBrowser;
105816
106008
  exports.HierarchyItem = HierarchyItem;
106009
+ exports.InfoWindow = InfoWindow;
105817
106010
  exports.Link = Link;
105818
106011
  exports.MONTHS = MONTHS;
105819
106012
  exports.MagnifyingGlassIcon = MagnifyingGlass;
@@ -105859,6 +106052,7 @@ exports.getCSSVariableValue = getCSSVariableValue;
105859
106052
  exports.getCurrentSearchParams = getCurrentSearchParams;
105860
106053
  exports.getDateFromEpoch = getDateFromEpoch;
105861
106054
  exports.getDatesInAMonth = getDatesInAMonth;
106055
+ exports.getDatesInStringFormat = getDatesInStringFormat;
105862
106056
  exports.getDayInfo = getDayInfo;
105863
106057
  exports.getInitialsOfName = getInitialsOfName;
105864
106058
  exports.getJSDateFromEpoch = getJSDateFromEpoch;
@@ -105867,6 +106061,7 @@ exports.getSpacedDisplayName = getSpacedDisplayName;
105867
106061
  exports.getTimeFromEpoch = getTimeFromEpoch;
105868
106062
  exports.inputHelper = inputHelper;
105869
106063
  exports.propTypes = propTypes;
106064
+ exports.safeJSONParse = safeJSONParse;
105870
106065
  exports.stringToPath = stringToPath;
105871
106066
  exports.sumArrayOfObjects = sumArrayOfObjects;
105872
106067
  exports.uniqueArray = uniqueArray;