react-ai-renderer 0.1.6 → 0.1.8

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/index.js CHANGED
@@ -5753,126 +5753,134 @@ function c(Prism) {
5753
5753
  delete Prism.languages.c['boolean'];
5754
5754
  }
5755
5755
 
5756
- var refractorC$1 = c_1;
5757
- var cpp_1 = cpp;
5758
- cpp.displayName = 'cpp';
5759
- cpp.aliases = [];
5760
- function cpp(Prism) {
5761
- Prism.register(refractorC$1)
5762
- ;(function (Prism) {
5763
- var keyword =
5764
- /\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/;
5765
- var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
5766
- /<keyword>/g,
5767
- function () {
5768
- return keyword.source
5769
- }
5770
- );
5771
- Prism.languages.cpp = Prism.languages.extend('c', {
5772
- 'class-name': [
5773
- {
5774
- pattern: RegExp(
5775
- /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
5776
- /<keyword>/g,
5777
- function () {
5778
- return keyword.source
5779
- }
5780
- )
5781
- ),
5782
- lookbehind: true
5783
- }, // This is intended to capture the class name of method implementations like:
5784
- // void foo::bar() const {}
5785
- // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
5786
- // it starts with an uppercase letter. This approximation should give decent results.
5787
- /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
5788
- // Foo::~Foo() {}
5789
- /\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
5790
- // parameters, so it can't be a namespace (until C++ adds generic namespaces).
5791
- /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
5792
- ],
5793
- keyword: keyword,
5794
- number: {
5795
- pattern:
5796
- /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
5797
- greedy: true
5798
- },
5799
- operator:
5800
- />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
5801
- boolean: /\b(?:false|true)\b/
5802
- });
5803
- Prism.languages.insertBefore('cpp', 'string', {
5804
- module: {
5805
- // https://en.cppreference.com/w/cpp/language/modules
5806
- pattern: RegExp(
5807
- /(\b(?:import|module)\s+)/.source +
5808
- '(?:' + // header-name
5809
- /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
5810
- '|' + // module name or partition or both
5811
- /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
5812
- /<mod-name>/g,
5813
- function () {
5814
- return modName
5815
- }
5816
- ) +
5817
- ')'
5818
- ),
5819
- lookbehind: true,
5820
- greedy: true,
5821
- inside: {
5822
- string: /^[<"][\s\S]+/,
5823
- operator: /:/,
5824
- punctuation: /\./
5825
- }
5826
- },
5827
- 'raw-string': {
5828
- pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
5829
- alias: 'string',
5830
- greedy: true
5831
- }
5832
- });
5833
- Prism.languages.insertBefore('cpp', 'keyword', {
5834
- 'generic-function': {
5835
- pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
5836
- inside: {
5837
- function: /^\w+/,
5838
- generic: {
5839
- pattern: /<[\s\S]+/,
5840
- alias: 'class-name',
5841
- inside: Prism.languages.cpp
5842
- }
5843
- }
5844
- }
5845
- });
5846
- Prism.languages.insertBefore('cpp', 'operator', {
5847
- 'double-colon': {
5848
- pattern: /::/,
5849
- alias: 'punctuation'
5850
- }
5851
- });
5852
- Prism.languages.insertBefore('cpp', 'class-name', {
5853
- // the base clause is an optional list of parent classes
5854
- // https://en.cppreference.com/w/cpp/language/class
5855
- 'base-clause': {
5856
- pattern:
5857
- /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
5858
- lookbehind: true,
5859
- greedy: true,
5860
- inside: Prism.languages.extend('cpp', {})
5861
- }
5862
- });
5863
- Prism.languages.insertBefore(
5864
- 'inside',
5865
- 'double-colon',
5866
- {
5867
- // All untokenized words that are not namespaces should be class names
5868
- 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
5869
- },
5870
- Prism.languages.cpp['base-clause']
5871
- );
5872
- })(Prism);
5756
+ var cpp_1;
5757
+ var hasRequiredCpp;
5758
+
5759
+ function requireCpp () {
5760
+ if (hasRequiredCpp) return cpp_1;
5761
+ hasRequiredCpp = 1;
5762
+ var refractorC = c_1;
5763
+ cpp_1 = cpp;
5764
+ cpp.displayName = 'cpp';
5765
+ cpp.aliases = [];
5766
+ function cpp(Prism) {
5767
+ Prism.register(refractorC)
5768
+ ;(function (Prism) {
5769
+ var keyword =
5770
+ /\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/;
5771
+ var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
5772
+ /<keyword>/g,
5773
+ function () {
5774
+ return keyword.source
5775
+ }
5776
+ );
5777
+ Prism.languages.cpp = Prism.languages.extend('c', {
5778
+ 'class-name': [
5779
+ {
5780
+ pattern: RegExp(
5781
+ /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
5782
+ /<keyword>/g,
5783
+ function () {
5784
+ return keyword.source
5785
+ }
5786
+ )
5787
+ ),
5788
+ lookbehind: true
5789
+ }, // This is intended to capture the class name of method implementations like:
5790
+ // void foo::bar() const {}
5791
+ // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
5792
+ // it starts with an uppercase letter. This approximation should give decent results.
5793
+ /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
5794
+ // Foo::~Foo() {}
5795
+ /\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
5796
+ // parameters, so it can't be a namespace (until C++ adds generic namespaces).
5797
+ /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
5798
+ ],
5799
+ keyword: keyword,
5800
+ number: {
5801
+ pattern:
5802
+ /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
5803
+ greedy: true
5804
+ },
5805
+ operator:
5806
+ />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
5807
+ boolean: /\b(?:false|true)\b/
5808
+ });
5809
+ Prism.languages.insertBefore('cpp', 'string', {
5810
+ module: {
5811
+ // https://en.cppreference.com/w/cpp/language/modules
5812
+ pattern: RegExp(
5813
+ /(\b(?:import|module)\s+)/.source +
5814
+ '(?:' + // header-name
5815
+ /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
5816
+ '|' + // module name or partition or both
5817
+ /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
5818
+ /<mod-name>/g,
5819
+ function () {
5820
+ return modName
5821
+ }
5822
+ ) +
5823
+ ')'
5824
+ ),
5825
+ lookbehind: true,
5826
+ greedy: true,
5827
+ inside: {
5828
+ string: /^[<"][\s\S]+/,
5829
+ operator: /:/,
5830
+ punctuation: /\./
5831
+ }
5832
+ },
5833
+ 'raw-string': {
5834
+ pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
5835
+ alias: 'string',
5836
+ greedy: true
5837
+ }
5838
+ });
5839
+ Prism.languages.insertBefore('cpp', 'keyword', {
5840
+ 'generic-function': {
5841
+ pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
5842
+ inside: {
5843
+ function: /^\w+/,
5844
+ generic: {
5845
+ pattern: /<[\s\S]+/,
5846
+ alias: 'class-name',
5847
+ inside: Prism.languages.cpp
5848
+ }
5849
+ }
5850
+ }
5851
+ });
5852
+ Prism.languages.insertBefore('cpp', 'operator', {
5853
+ 'double-colon': {
5854
+ pattern: /::/,
5855
+ alias: 'punctuation'
5856
+ }
5857
+ });
5858
+ Prism.languages.insertBefore('cpp', 'class-name', {
5859
+ // the base clause is an optional list of parent classes
5860
+ // https://en.cppreference.com/w/cpp/language/class
5861
+ 'base-clause': {
5862
+ pattern:
5863
+ /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
5864
+ lookbehind: true,
5865
+ greedy: true,
5866
+ inside: Prism.languages.extend('cpp', {})
5867
+ }
5868
+ });
5869
+ Prism.languages.insertBefore(
5870
+ 'inside',
5871
+ 'double-colon',
5872
+ {
5873
+ // All untokenized words that are not namespaces should be class names
5874
+ 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
5875
+ },
5876
+ Prism.languages.cpp['base-clause']
5877
+ );
5878
+ })(Prism);
5879
+ }
5880
+ return cpp_1;
5873
5881
  }
5874
5882
 
5875
- var refractorCpp$1 = cpp_1;
5883
+ var refractorCpp$1 = requireCpp();
5876
5884
  var arduino_1 = arduino;
5877
5885
  arduino.displayName = 'arduino';
5878
5886
  arduino.aliases = ['ino'];
@@ -6216,475 +6224,484 @@ function asmatmel(Prism) {
6216
6224
  };
6217
6225
  }
6218
6226
 
6219
- var csharp_1 = csharp;
6220
- csharp.displayName = 'csharp';
6221
- csharp.aliases = ['dotnet', 'cs'];
6222
- function csharp(Prism) {
6227
+ var csharp_1;
6228
+ var hasRequiredCsharp;
6229
+
6230
+ function requireCsharp () {
6231
+ if (hasRequiredCsharp) return csharp_1;
6232
+ hasRequiredCsharp = 1;
6233
+
6234
+ csharp_1 = csharp;
6235
+ csharp.displayName = 'csharp';
6236
+ csharp.aliases = ['dotnet', 'cs'];
6237
+ function csharp(Prism) {
6223
6238
  (function (Prism) {
6224
- /**
6225
- * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
6226
- *
6227
- * Note: This is a simple text based replacement. Be careful when using backreferences!
6228
- *
6229
- * @param {string} pattern the given pattern.
6230
- * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
6231
- * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
6232
- * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
6233
- */
6234
- function replace(pattern, replacements) {
6235
- return pattern.replace(/<<(\d+)>>/g, function (m, index) {
6236
- return '(?:' + replacements[+index] + ')'
6237
- })
6238
- }
6239
- /**
6240
- * @param {string} pattern
6241
- * @param {string[]} replacements
6242
- * @param {string} [flags]
6243
- * @returns {RegExp}
6244
- */
6245
- function re(pattern, replacements, flags) {
6246
- return RegExp(replace(pattern, replacements), flags || '')
6247
- }
6248
- /**
6249
- * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
6250
- *
6251
- * @param {string} pattern
6252
- * @param {number} depthLog2
6253
- * @returns {string}
6254
- */
6255
- function nested(pattern, depthLog2) {
6256
- for (var i = 0; i < depthLog2; i++) {
6257
- pattern = pattern.replace(/<<self>>/g, function () {
6258
- return '(?:' + pattern + ')'
6259
- });
6260
- }
6261
- return pattern.replace(/<<self>>/g, '[^\\s\\S]')
6262
- } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
6263
- var keywordKinds = {
6264
- // keywords which represent a return or variable type
6265
- type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
6266
- // keywords which are used to declare a type
6267
- typeDeclaration: 'class enum interface record struct',
6268
- // contextual keywords
6269
- // ("var" and "dynamic" are missing because they are used like types)
6270
- contextual:
6271
- '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*{)',
6272
- // all other keywords
6273
- other:
6274
- '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'
6275
- }; // keywords
6276
- function keywordsToPattern(words) {
6277
- return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
6278
- }
6279
- var typeDeclarationKeywords = keywordsToPattern(
6280
- keywordKinds.typeDeclaration
6281
- );
6282
- var keywords = RegExp(
6283
- keywordsToPattern(
6284
- keywordKinds.type +
6285
- ' ' +
6286
- keywordKinds.typeDeclaration +
6287
- ' ' +
6288
- keywordKinds.contextual +
6289
- ' ' +
6290
- keywordKinds.other
6291
- )
6292
- );
6293
- var nonTypeKeywords = keywordsToPattern(
6294
- keywordKinds.typeDeclaration +
6295
- ' ' +
6296
- keywordKinds.contextual +
6297
- ' ' +
6298
- keywordKinds.other
6299
- );
6300
- var nonContextualKeywords = keywordsToPattern(
6301
- keywordKinds.type +
6302
- ' ' +
6303
- keywordKinds.typeDeclaration +
6304
- ' ' +
6305
- keywordKinds.other
6306
- ); // types
6307
- var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
6308
- var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
6309
- var name = /@?\b[A-Za-z_]\w*\b/.source;
6310
- var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
6311
- var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
6312
- nonTypeKeywords,
6313
- genericName
6314
- ]);
6315
- var array = /\[\s*(?:,\s*)*\]/.source;
6316
- var typeExpressionWithoutTuple = replace(
6317
- /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
6318
- [identifier, array]
6319
- );
6320
- var tupleElement = replace(
6321
- /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
6322
- [generic, nestedRound, array]
6323
- );
6324
- var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
6325
- var typeExpression = replace(
6326
- /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
6327
- [tuple, identifier, array]
6328
- );
6329
- var typeInside = {
6330
- keyword: keywords,
6331
- punctuation: /[<>()?,.:[\]]/
6332
- }; // strings & characters
6333
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
6334
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
6335
- var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
6336
- var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
6337
- var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
6338
- Prism.languages.csharp = Prism.languages.extend('clike', {
6339
- string: [
6340
- {
6341
- pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
6342
- lookbehind: true,
6343
- greedy: true
6344
- },
6345
- {
6346
- pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
6347
- lookbehind: true,
6348
- greedy: true
6349
- }
6350
- ],
6351
- 'class-name': [
6352
- {
6353
- // Using static
6354
- // using static System.Math;
6355
- pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
6356
- identifier
6357
- ]),
6358
- lookbehind: true,
6359
- inside: typeInside
6360
- },
6361
- {
6362
- // Using alias (type)
6363
- // using Project = PC.MyCompany.Project;
6364
- pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
6365
- name,
6366
- typeExpression
6367
- ]),
6368
- lookbehind: true,
6369
- inside: typeInside
6370
- },
6371
- {
6372
- // Using alias (alias)
6373
- // using Project = PC.MyCompany.Project;
6374
- pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
6375
- lookbehind: true
6376
- },
6377
- {
6378
- // Type declarations
6379
- // class Foo<A, B>
6380
- // interface Foo<out A, B>
6381
- pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
6382
- typeDeclarationKeywords,
6383
- genericName
6384
- ]),
6385
- lookbehind: true,
6386
- inside: typeInside
6387
- },
6388
- {
6389
- // Single catch exception declaration
6390
- // catch(Foo)
6391
- // (things like catch(Foo e) is covered by variable declaration)
6392
- pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
6393
- lookbehind: true,
6394
- inside: typeInside
6395
- },
6396
- {
6397
- // Name of the type parameter of generic constraints
6398
- // where Foo : class
6399
- pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
6400
- lookbehind: true
6401
- },
6402
- {
6403
- // Casts and checks via as and is.
6404
- // as Foo<A>, is Bar<B>
6405
- // (things like if(a is Foo b) is covered by variable declaration)
6406
- pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
6407
- typeExpressionWithoutTuple
6408
- ]),
6409
- lookbehind: true,
6410
- inside: typeInside
6411
- },
6412
- {
6413
- // Variable, field and parameter declaration
6414
- // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
6415
- pattern: re(
6416
- /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
6417
- .source,
6418
- [typeExpression, nonContextualKeywords, name]
6419
- ),
6420
- inside: typeInside
6421
- }
6422
- ],
6423
- keyword: keywords,
6424
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
6425
- number:
6426
- /(?:\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,
6427
- operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
6428
- punctuation: /\?\.?|::|[{}[\];(),.:]/
6429
- });
6430
- Prism.languages.insertBefore('csharp', 'number', {
6431
- range: {
6432
- pattern: /\.\./,
6433
- alias: 'operator'
6434
- }
6435
- });
6436
- Prism.languages.insertBefore('csharp', 'punctuation', {
6437
- 'named-parameter': {
6438
- pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
6439
- lookbehind: true,
6440
- alias: 'punctuation'
6441
- }
6442
- });
6443
- Prism.languages.insertBefore('csharp', 'class-name', {
6444
- namespace: {
6445
- // namespace Foo.Bar {}
6446
- // using Foo.Bar;
6447
- pattern: re(
6448
- /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
6449
- [name]
6450
- ),
6451
- lookbehind: true,
6452
- inside: {
6453
- punctuation: /\./
6454
- }
6455
- },
6456
- 'type-expression': {
6457
- // default(Foo), typeof(Foo<Bar>), sizeof(int)
6458
- pattern: re(
6459
- /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
6460
- .source,
6461
- [nestedRound]
6462
- ),
6463
- lookbehind: true,
6464
- alias: 'class-name',
6465
- inside: typeInside
6466
- },
6467
- 'return-type': {
6468
- // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
6469
- // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
6470
- // int Foo => 0; int Foo { get; set } = 0;
6471
- pattern: re(
6472
- /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
6473
- [typeExpression, identifier]
6474
- ),
6475
- inside: typeInside,
6476
- alias: 'class-name'
6477
- },
6478
- 'constructor-invocation': {
6479
- // new List<Foo<Bar[]>> { }
6480
- pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
6481
- lookbehind: true,
6482
- inside: typeInside,
6483
- alias: 'class-name'
6484
- },
6485
- /*'explicit-implementation': {
6486
- // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
6487
- pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
6488
- inside: classNameInside,
6489
- alias: 'class-name'
6490
- },*/
6491
- 'generic-method': {
6492
- // foo<Bar>()
6493
- pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
6494
- inside: {
6495
- function: re(/^<<0>>/.source, [name]),
6496
- generic: {
6497
- pattern: RegExp(generic),
6498
- alias: 'class-name',
6499
- inside: typeInside
6500
- }
6501
- }
6502
- },
6503
- 'type-list': {
6504
- // The list of types inherited or of generic constraints
6505
- // class Foo<F> : Bar, IList<FooBar>
6506
- // where F : Bar, IList<int>
6507
- pattern: re(
6508
- /\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|[{;]|=>|$))/
6509
- .source,
6510
- [
6511
- typeDeclarationKeywords,
6512
- genericName,
6513
- name,
6514
- typeExpression,
6515
- keywords.source,
6516
- nestedRound,
6517
- /\bnew\s*\(\s*\)/.source
6518
- ]
6519
- ),
6520
- lookbehind: true,
6521
- inside: {
6522
- 'record-arguments': {
6523
- pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
6524
- genericName,
6525
- nestedRound
6526
- ]),
6527
- lookbehind: true,
6528
- greedy: true,
6529
- inside: Prism.languages.csharp
6530
- },
6531
- keyword: keywords,
6532
- 'class-name': {
6533
- pattern: RegExp(typeExpression),
6534
- greedy: true,
6535
- inside: typeInside
6536
- },
6537
- punctuation: /[,()]/
6538
- }
6539
- },
6540
- preprocessor: {
6541
- pattern: /(^[\t ]*)#.*/m,
6542
- lookbehind: true,
6543
- alias: 'property',
6544
- inside: {
6545
- // highlight preprocessor directives as keywords
6546
- directive: {
6547
- pattern:
6548
- /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
6549
- lookbehind: true,
6550
- alias: 'keyword'
6551
- }
6552
- }
6553
- }
6554
- }); // attributes
6555
- var regularStringOrCharacter = regularString + '|' + character;
6556
- var regularStringCharacterOrComment = replace(
6557
- /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
6558
- [regularStringOrCharacter]
6559
- );
6560
- var roundExpression = nested(
6561
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
6562
- regularStringCharacterOrComment
6563
- ]),
6564
- 2
6565
- ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
6566
- var attrTarget =
6567
- /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
6568
- .source;
6569
- var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
6570
- identifier,
6571
- roundExpression
6572
- ]);
6573
- Prism.languages.insertBefore('csharp', 'class-name', {
6574
- attribute: {
6575
- // Attributes
6576
- // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
6577
- pattern: re(
6578
- /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
6579
- .source,
6580
- [attrTarget, attr]
6581
- ),
6582
- lookbehind: true,
6583
- greedy: true,
6584
- inside: {
6585
- target: {
6586
- pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
6587
- alias: 'keyword'
6588
- },
6589
- 'attribute-arguments': {
6590
- pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
6591
- inside: Prism.languages.csharp
6592
- },
6593
- 'class-name': {
6594
- pattern: RegExp(identifier),
6595
- inside: {
6596
- punctuation: /\./
6597
- }
6598
- },
6599
- punctuation: /[:,]/
6600
- }
6601
- }
6602
- }); // string interpolation
6603
- var formatString = /:[^}\r\n]+/.source; // multi line
6604
- var mInterpolationRound = nested(
6605
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
6606
- regularStringCharacterOrComment
6607
- ]),
6608
- 2
6609
- );
6610
- var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
6611
- mInterpolationRound,
6612
- formatString
6613
- ]); // single line
6614
- var sInterpolationRound = nested(
6615
- replace(
6616
- /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
6617
- .source,
6618
- [regularStringOrCharacter]
6619
- ),
6620
- 2
6621
- );
6622
- var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
6623
- sInterpolationRound,
6624
- formatString
6625
- ]);
6626
- function createInterpolationInside(interpolation, interpolationRound) {
6627
- return {
6628
- interpolation: {
6629
- pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
6630
- lookbehind: true,
6631
- inside: {
6632
- 'format-string': {
6633
- pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
6634
- interpolationRound,
6635
- formatString
6636
- ]),
6637
- lookbehind: true,
6638
- inside: {
6639
- punctuation: /^:/
6640
- }
6641
- },
6642
- punctuation: /^\{|\}$/,
6643
- expression: {
6644
- pattern: /[\s\S]+/,
6645
- alias: 'language-csharp',
6646
- inside: Prism.languages.csharp
6647
- }
6648
- }
6649
- },
6650
- string: /[\s\S]+/
6651
- }
6652
- }
6653
- Prism.languages.insertBefore('csharp', 'string', {
6654
- 'interpolation-string': [
6655
- {
6656
- pattern: re(
6657
- /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
6658
- [mInterpolation]
6659
- ),
6660
- lookbehind: true,
6661
- greedy: true,
6662
- inside: createInterpolationInside(mInterpolation, mInterpolationRound)
6663
- },
6664
- {
6665
- pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
6666
- sInterpolation
6667
- ]),
6668
- lookbehind: true,
6669
- greedy: true,
6670
- inside: createInterpolationInside(sInterpolation, sInterpolationRound)
6671
- }
6672
- ],
6673
- char: {
6674
- pattern: RegExp(character),
6675
- greedy: true
6676
- }
6677
- });
6678
- Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
6679
- })(Prism);
6239
+ /**
6240
+ * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
6241
+ *
6242
+ * Note: This is a simple text based replacement. Be careful when using backreferences!
6243
+ *
6244
+ * @param {string} pattern the given pattern.
6245
+ * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
6246
+ * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
6247
+ * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
6248
+ */
6249
+ function replace(pattern, replacements) {
6250
+ return pattern.replace(/<<(\d+)>>/g, function (m, index) {
6251
+ return '(?:' + replacements[+index] + ')'
6252
+ })
6253
+ }
6254
+ /**
6255
+ * @param {string} pattern
6256
+ * @param {string[]} replacements
6257
+ * @param {string} [flags]
6258
+ * @returns {RegExp}
6259
+ */
6260
+ function re(pattern, replacements, flags) {
6261
+ return RegExp(replace(pattern, replacements), flags || '')
6262
+ }
6263
+ /**
6264
+ * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
6265
+ *
6266
+ * @param {string} pattern
6267
+ * @param {number} depthLog2
6268
+ * @returns {string}
6269
+ */
6270
+ function nested(pattern, depthLog2) {
6271
+ for (var i = 0; i < depthLog2; i++) {
6272
+ pattern = pattern.replace(/<<self>>/g, function () {
6273
+ return '(?:' + pattern + ')'
6274
+ });
6275
+ }
6276
+ return pattern.replace(/<<self>>/g, '[^\\s\\S]')
6277
+ } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
6278
+ var keywordKinds = {
6279
+ // keywords which represent a return or variable type
6280
+ type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
6281
+ // keywords which are used to declare a type
6282
+ typeDeclaration: 'class enum interface record struct',
6283
+ // contextual keywords
6284
+ // ("var" and "dynamic" are missing because they are used like types)
6285
+ contextual:
6286
+ '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*{)',
6287
+ // all other keywords
6288
+ other:
6289
+ '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'
6290
+ }; // keywords
6291
+ function keywordsToPattern(words) {
6292
+ return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
6293
+ }
6294
+ var typeDeclarationKeywords = keywordsToPattern(
6295
+ keywordKinds.typeDeclaration
6296
+ );
6297
+ var keywords = RegExp(
6298
+ keywordsToPattern(
6299
+ keywordKinds.type +
6300
+ ' ' +
6301
+ keywordKinds.typeDeclaration +
6302
+ ' ' +
6303
+ keywordKinds.contextual +
6304
+ ' ' +
6305
+ keywordKinds.other
6306
+ )
6307
+ );
6308
+ var nonTypeKeywords = keywordsToPattern(
6309
+ keywordKinds.typeDeclaration +
6310
+ ' ' +
6311
+ keywordKinds.contextual +
6312
+ ' ' +
6313
+ keywordKinds.other
6314
+ );
6315
+ var nonContextualKeywords = keywordsToPattern(
6316
+ keywordKinds.type +
6317
+ ' ' +
6318
+ keywordKinds.typeDeclaration +
6319
+ ' ' +
6320
+ keywordKinds.other
6321
+ ); // types
6322
+ var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
6323
+ var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
6324
+ var name = /@?\b[A-Za-z_]\w*\b/.source;
6325
+ var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
6326
+ var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
6327
+ nonTypeKeywords,
6328
+ genericName
6329
+ ]);
6330
+ var array = /\[\s*(?:,\s*)*\]/.source;
6331
+ var typeExpressionWithoutTuple = replace(
6332
+ /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
6333
+ [identifier, array]
6334
+ );
6335
+ var tupleElement = replace(
6336
+ /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
6337
+ [generic, nestedRound, array]
6338
+ );
6339
+ var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
6340
+ var typeExpression = replace(
6341
+ /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
6342
+ [tuple, identifier, array]
6343
+ );
6344
+ var typeInside = {
6345
+ keyword: keywords,
6346
+ punctuation: /[<>()?,.:[\]]/
6347
+ }; // strings & characters
6348
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
6349
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
6350
+ var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
6351
+ var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
6352
+ var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
6353
+ Prism.languages.csharp = Prism.languages.extend('clike', {
6354
+ string: [
6355
+ {
6356
+ pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
6357
+ lookbehind: true,
6358
+ greedy: true
6359
+ },
6360
+ {
6361
+ pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
6362
+ lookbehind: true,
6363
+ greedy: true
6364
+ }
6365
+ ],
6366
+ 'class-name': [
6367
+ {
6368
+ // Using static
6369
+ // using static System.Math;
6370
+ pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
6371
+ identifier
6372
+ ]),
6373
+ lookbehind: true,
6374
+ inside: typeInside
6375
+ },
6376
+ {
6377
+ // Using alias (type)
6378
+ // using Project = PC.MyCompany.Project;
6379
+ pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
6380
+ name,
6381
+ typeExpression
6382
+ ]),
6383
+ lookbehind: true,
6384
+ inside: typeInside
6385
+ },
6386
+ {
6387
+ // Using alias (alias)
6388
+ // using Project = PC.MyCompany.Project;
6389
+ pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
6390
+ lookbehind: true
6391
+ },
6392
+ {
6393
+ // Type declarations
6394
+ // class Foo<A, B>
6395
+ // interface Foo<out A, B>
6396
+ pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
6397
+ typeDeclarationKeywords,
6398
+ genericName
6399
+ ]),
6400
+ lookbehind: true,
6401
+ inside: typeInside
6402
+ },
6403
+ {
6404
+ // Single catch exception declaration
6405
+ // catch(Foo)
6406
+ // (things like catch(Foo e) is covered by variable declaration)
6407
+ pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
6408
+ lookbehind: true,
6409
+ inside: typeInside
6410
+ },
6411
+ {
6412
+ // Name of the type parameter of generic constraints
6413
+ // where Foo : class
6414
+ pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
6415
+ lookbehind: true
6416
+ },
6417
+ {
6418
+ // Casts and checks via as and is.
6419
+ // as Foo<A>, is Bar<B>
6420
+ // (things like if(a is Foo b) is covered by variable declaration)
6421
+ pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
6422
+ typeExpressionWithoutTuple
6423
+ ]),
6424
+ lookbehind: true,
6425
+ inside: typeInside
6426
+ },
6427
+ {
6428
+ // Variable, field and parameter declaration
6429
+ // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
6430
+ pattern: re(
6431
+ /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
6432
+ .source,
6433
+ [typeExpression, nonContextualKeywords, name]
6434
+ ),
6435
+ inside: typeInside
6436
+ }
6437
+ ],
6438
+ keyword: keywords,
6439
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
6440
+ number:
6441
+ /(?:\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,
6442
+ operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
6443
+ punctuation: /\?\.?|::|[{}[\];(),.:]/
6444
+ });
6445
+ Prism.languages.insertBefore('csharp', 'number', {
6446
+ range: {
6447
+ pattern: /\.\./,
6448
+ alias: 'operator'
6449
+ }
6450
+ });
6451
+ Prism.languages.insertBefore('csharp', 'punctuation', {
6452
+ 'named-parameter': {
6453
+ pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
6454
+ lookbehind: true,
6455
+ alias: 'punctuation'
6456
+ }
6457
+ });
6458
+ Prism.languages.insertBefore('csharp', 'class-name', {
6459
+ namespace: {
6460
+ // namespace Foo.Bar {}
6461
+ // using Foo.Bar;
6462
+ pattern: re(
6463
+ /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
6464
+ [name]
6465
+ ),
6466
+ lookbehind: true,
6467
+ inside: {
6468
+ punctuation: /\./
6469
+ }
6470
+ },
6471
+ 'type-expression': {
6472
+ // default(Foo), typeof(Foo<Bar>), sizeof(int)
6473
+ pattern: re(
6474
+ /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
6475
+ .source,
6476
+ [nestedRound]
6477
+ ),
6478
+ lookbehind: true,
6479
+ alias: 'class-name',
6480
+ inside: typeInside
6481
+ },
6482
+ 'return-type': {
6483
+ // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
6484
+ // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
6485
+ // int Foo => 0; int Foo { get; set } = 0;
6486
+ pattern: re(
6487
+ /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
6488
+ [typeExpression, identifier]
6489
+ ),
6490
+ inside: typeInside,
6491
+ alias: 'class-name'
6492
+ },
6493
+ 'constructor-invocation': {
6494
+ // new List<Foo<Bar[]>> { }
6495
+ pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
6496
+ lookbehind: true,
6497
+ inside: typeInside,
6498
+ alias: 'class-name'
6499
+ },
6500
+ /*'explicit-implementation': {
6501
+ // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
6502
+ pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
6503
+ inside: classNameInside,
6504
+ alias: 'class-name'
6505
+ },*/
6506
+ 'generic-method': {
6507
+ // foo<Bar>()
6508
+ pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
6509
+ inside: {
6510
+ function: re(/^<<0>>/.source, [name]),
6511
+ generic: {
6512
+ pattern: RegExp(generic),
6513
+ alias: 'class-name',
6514
+ inside: typeInside
6515
+ }
6516
+ }
6517
+ },
6518
+ 'type-list': {
6519
+ // The list of types inherited or of generic constraints
6520
+ // class Foo<F> : Bar, IList<FooBar>
6521
+ // where F : Bar, IList<int>
6522
+ pattern: re(
6523
+ /\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|[{;]|=>|$))/
6524
+ .source,
6525
+ [
6526
+ typeDeclarationKeywords,
6527
+ genericName,
6528
+ name,
6529
+ typeExpression,
6530
+ keywords.source,
6531
+ nestedRound,
6532
+ /\bnew\s*\(\s*\)/.source
6533
+ ]
6534
+ ),
6535
+ lookbehind: true,
6536
+ inside: {
6537
+ 'record-arguments': {
6538
+ pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
6539
+ genericName,
6540
+ nestedRound
6541
+ ]),
6542
+ lookbehind: true,
6543
+ greedy: true,
6544
+ inside: Prism.languages.csharp
6545
+ },
6546
+ keyword: keywords,
6547
+ 'class-name': {
6548
+ pattern: RegExp(typeExpression),
6549
+ greedy: true,
6550
+ inside: typeInside
6551
+ },
6552
+ punctuation: /[,()]/
6553
+ }
6554
+ },
6555
+ preprocessor: {
6556
+ pattern: /(^[\t ]*)#.*/m,
6557
+ lookbehind: true,
6558
+ alias: 'property',
6559
+ inside: {
6560
+ // highlight preprocessor directives as keywords
6561
+ directive: {
6562
+ pattern:
6563
+ /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
6564
+ lookbehind: true,
6565
+ alias: 'keyword'
6566
+ }
6567
+ }
6568
+ }
6569
+ }); // attributes
6570
+ var regularStringOrCharacter = regularString + '|' + character;
6571
+ var regularStringCharacterOrComment = replace(
6572
+ /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
6573
+ [regularStringOrCharacter]
6574
+ );
6575
+ var roundExpression = nested(
6576
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
6577
+ regularStringCharacterOrComment
6578
+ ]),
6579
+ 2
6580
+ ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
6581
+ var attrTarget =
6582
+ /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
6583
+ .source;
6584
+ var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
6585
+ identifier,
6586
+ roundExpression
6587
+ ]);
6588
+ Prism.languages.insertBefore('csharp', 'class-name', {
6589
+ attribute: {
6590
+ // Attributes
6591
+ // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
6592
+ pattern: re(
6593
+ /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
6594
+ .source,
6595
+ [attrTarget, attr]
6596
+ ),
6597
+ lookbehind: true,
6598
+ greedy: true,
6599
+ inside: {
6600
+ target: {
6601
+ pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
6602
+ alias: 'keyword'
6603
+ },
6604
+ 'attribute-arguments': {
6605
+ pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
6606
+ inside: Prism.languages.csharp
6607
+ },
6608
+ 'class-name': {
6609
+ pattern: RegExp(identifier),
6610
+ inside: {
6611
+ punctuation: /\./
6612
+ }
6613
+ },
6614
+ punctuation: /[:,]/
6615
+ }
6616
+ }
6617
+ }); // string interpolation
6618
+ var formatString = /:[^}\r\n]+/.source; // multi line
6619
+ var mInterpolationRound = nested(
6620
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
6621
+ regularStringCharacterOrComment
6622
+ ]),
6623
+ 2
6624
+ );
6625
+ var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
6626
+ mInterpolationRound,
6627
+ formatString
6628
+ ]); // single line
6629
+ var sInterpolationRound = nested(
6630
+ replace(
6631
+ /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
6632
+ .source,
6633
+ [regularStringOrCharacter]
6634
+ ),
6635
+ 2
6636
+ );
6637
+ var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
6638
+ sInterpolationRound,
6639
+ formatString
6640
+ ]);
6641
+ function createInterpolationInside(interpolation, interpolationRound) {
6642
+ return {
6643
+ interpolation: {
6644
+ pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
6645
+ lookbehind: true,
6646
+ inside: {
6647
+ 'format-string': {
6648
+ pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
6649
+ interpolationRound,
6650
+ formatString
6651
+ ]),
6652
+ lookbehind: true,
6653
+ inside: {
6654
+ punctuation: /^:/
6655
+ }
6656
+ },
6657
+ punctuation: /^\{|\}$/,
6658
+ expression: {
6659
+ pattern: /[\s\S]+/,
6660
+ alias: 'language-csharp',
6661
+ inside: Prism.languages.csharp
6662
+ }
6663
+ }
6664
+ },
6665
+ string: /[\s\S]+/
6666
+ }
6667
+ }
6668
+ Prism.languages.insertBefore('csharp', 'string', {
6669
+ 'interpolation-string': [
6670
+ {
6671
+ pattern: re(
6672
+ /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
6673
+ [mInterpolation]
6674
+ ),
6675
+ lookbehind: true,
6676
+ greedy: true,
6677
+ inside: createInterpolationInside(mInterpolation, mInterpolationRound)
6678
+ },
6679
+ {
6680
+ pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
6681
+ sInterpolation
6682
+ ]),
6683
+ lookbehind: true,
6684
+ greedy: true,
6685
+ inside: createInterpolationInside(sInterpolation, sInterpolationRound)
6686
+ }
6687
+ ],
6688
+ char: {
6689
+ pattern: RegExp(character),
6690
+ greedy: true
6691
+ }
6692
+ });
6693
+ Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
6694
+ })(Prism);
6695
+ }
6696
+ return csharp_1;
6680
6697
  }
6681
6698
 
6682
- var refractorCsharp$1 = csharp_1;
6699
+ var refractorCsharp = requireCsharp();
6683
6700
  var aspnet_1 = aspnet;
6684
6701
  aspnet.displayName = 'aspnet';
6685
6702
  aspnet.aliases = [];
6686
6703
  function aspnet(Prism) {
6687
- Prism.register(refractorCsharp$1);
6704
+ Prism.register(refractorCsharp);
6688
6705
  Prism.languages.aspnet = Prism.languages.extend('markup', {
6689
6706
  'page-directive': {
6690
6707
  pattern: /<%\s*@.*%>/,
@@ -6997,59 +7014,68 @@ function avisynth(Prism) {
6997
7014
  })(Prism);
6998
7015
  }
6999
7016
 
7000
- var avroIdl_1 = avroIdl;
7001
- avroIdl.displayName = 'avroIdl';
7002
- avroIdl.aliases = [];
7003
- function avroIdl(Prism) {
7004
- // GitHub: https://github.com/apache/avro
7005
- // Docs: https://avro.apache.org/docs/current/idl.html
7006
- Prism.languages['avro-idl'] = {
7007
- comment: {
7008
- pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
7009
- greedy: true
7010
- },
7011
- string: {
7012
- pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
7013
- lookbehind: true,
7014
- greedy: true
7015
- },
7016
- annotation: {
7017
- pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,
7018
- greedy: true,
7019
- alias: 'function'
7020
- },
7021
- 'function-identifier': {
7022
- pattern: /`[^\r\n`]+`(?=\s*\()/,
7023
- greedy: true,
7024
- alias: 'function'
7025
- },
7026
- identifier: {
7027
- pattern: /`[^\r\n`]+`/,
7028
- greedy: true
7029
- },
7030
- 'class-name': {
7031
- pattern: /(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,
7032
- lookbehind: true,
7033
- greedy: true
7034
- },
7035
- keyword:
7036
- /\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,
7037
- function: /\b[a-z_]\w*(?=\s*\()/i,
7038
- number: [
7039
- {
7040
- pattern:
7041
- /(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,
7042
- lookbehind: true
7043
- },
7044
- /-?\b(?:Infinity|NaN)\b/
7045
- ],
7046
- operator: /=/,
7047
- punctuation: /[()\[\]{}<>.:,;-]/
7048
- };
7049
- Prism.languages.avdl = Prism.languages['avro-idl'];
7050
- }
7017
+ var avroIdl_1;
7018
+ var hasRequiredAvroIdl;
7051
7019
 
7052
- var bash_1 = bash;
7020
+ function requireAvroIdl () {
7021
+ if (hasRequiredAvroIdl) return avroIdl_1;
7022
+ hasRequiredAvroIdl = 1;
7023
+
7024
+ avroIdl_1 = avroIdl;
7025
+ avroIdl.displayName = 'avroIdl';
7026
+ avroIdl.aliases = [];
7027
+ function avroIdl(Prism) {
7028
+ // GitHub: https://github.com/apache/avro
7029
+ // Docs: https://avro.apache.org/docs/current/idl.html
7030
+ Prism.languages['avro-idl'] = {
7031
+ comment: {
7032
+ pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
7033
+ greedy: true
7034
+ },
7035
+ string: {
7036
+ pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
7037
+ lookbehind: true,
7038
+ greedy: true
7039
+ },
7040
+ annotation: {
7041
+ pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,
7042
+ greedy: true,
7043
+ alias: 'function'
7044
+ },
7045
+ 'function-identifier': {
7046
+ pattern: /`[^\r\n`]+`(?=\s*\()/,
7047
+ greedy: true,
7048
+ alias: 'function'
7049
+ },
7050
+ identifier: {
7051
+ pattern: /`[^\r\n`]+`/,
7052
+ greedy: true
7053
+ },
7054
+ 'class-name': {
7055
+ pattern: /(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,
7056
+ lookbehind: true,
7057
+ greedy: true
7058
+ },
7059
+ keyword:
7060
+ /\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,
7061
+ function: /\b[a-z_]\w*(?=\s*\()/i,
7062
+ number: [
7063
+ {
7064
+ pattern:
7065
+ /(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,
7066
+ lookbehind: true
7067
+ },
7068
+ /-?\b(?:Infinity|NaN)\b/
7069
+ ],
7070
+ operator: /=/,
7071
+ punctuation: /[()\[\]{}<>.:,;-]/
7072
+ };
7073
+ Prism.languages.avdl = Prism.languages['avro-idl'];
7074
+ }
7075
+ return avroIdl_1;
7076
+ }
7077
+
7078
+ var bash_1 = bash;
7053
7079
  bash.displayName = 'bash';
7054
7080
  bash.aliases = ['shell'];
7055
7081
  function bash(Prism) {
@@ -7628,30 +7654,39 @@ function bnf(Prism) {
7628
7654
  Prism.languages.rbnf = Prism.languages.bnf;
7629
7655
  }
7630
7656
 
7631
- var brainfuck_1 = brainfuck;
7632
- brainfuck.displayName = 'brainfuck';
7633
- brainfuck.aliases = [];
7634
- function brainfuck(Prism) {
7635
- Prism.languages.brainfuck = {
7636
- pointer: {
7637
- pattern: /<|>/,
7638
- alias: 'keyword'
7639
- },
7640
- increment: {
7641
- pattern: /\+/,
7642
- alias: 'inserted'
7643
- },
7644
- decrement: {
7645
- pattern: /-/,
7646
- alias: 'deleted'
7647
- },
7648
- branching: {
7649
- pattern: /\[|\]/,
7650
- alias: 'important'
7651
- },
7652
- operator: /[.,]/,
7653
- comment: /\S+/
7654
- };
7657
+ var brainfuck_1;
7658
+ var hasRequiredBrainfuck;
7659
+
7660
+ function requireBrainfuck () {
7661
+ if (hasRequiredBrainfuck) return brainfuck_1;
7662
+ hasRequiredBrainfuck = 1;
7663
+
7664
+ brainfuck_1 = brainfuck;
7665
+ brainfuck.displayName = 'brainfuck';
7666
+ brainfuck.aliases = [];
7667
+ function brainfuck(Prism) {
7668
+ Prism.languages.brainfuck = {
7669
+ pointer: {
7670
+ pattern: /<|>/,
7671
+ alias: 'keyword'
7672
+ },
7673
+ increment: {
7674
+ pattern: /\+/,
7675
+ alias: 'inserted'
7676
+ },
7677
+ decrement: {
7678
+ pattern: /-/,
7679
+ alias: 'deleted'
7680
+ },
7681
+ branching: {
7682
+ pattern: /\[|\]/,
7683
+ alias: 'important'
7684
+ },
7685
+ operator: /[.,]/,
7686
+ comment: /\S+/
7687
+ };
7688
+ }
7689
+ return brainfuck_1;
7655
7690
  }
7656
7691
 
7657
7692
  var brightscript_1 = brightscript;
@@ -7873,7 +7908,7 @@ function cfscript(Prism) {
7873
7908
  Prism.languages.cfc = Prism.languages['cfscript'];
7874
7909
  }
7875
7910
 
7876
- var refractorCpp = cpp_1;
7911
+ var refractorCpp = requireCpp();
7877
7912
  var chaiscript_1 = chaiscript;
7878
7913
  chaiscript.displayName = 'chaiscript';
7879
7914
  chaiscript.aliases = [];
@@ -8195,813 +8230,883 @@ function coffeescript(Prism) {
8195
8230
  })(Prism);
8196
8231
  }
8197
8232
 
8198
- var concurnas_1 = concurnas;
8199
- concurnas.displayName = 'concurnas';
8200
- concurnas.aliases = ['conc'];
8201
- function concurnas(Prism) {
8202
- Prism.languages.concurnas = {
8203
- comment: {
8204
- pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
8205
- lookbehind: true,
8206
- greedy: true
8207
- },
8208
- langext: {
8209
- pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
8210
- greedy: true,
8211
- inside: {
8212
- 'class-name': /^\w+/,
8213
- string: {
8214
- pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
8215
- lookbehind: true
8216
- },
8217
- punctuation: /\|\|/
8218
- }
8219
- },
8220
- function: {
8221
- pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
8222
- lookbehind: true
8223
- },
8224
- keyword:
8225
- /\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/,
8226
- boolean: /\b(?:false|true)\b/,
8227
- number:
8228
- /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
8229
- punctuation: /[{}[\];(),.:]/,
8230
- operator:
8231
- /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
8232
- annotation: {
8233
- pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
8234
- alias: 'builtin'
8235
- }
8236
- };
8237
- Prism.languages.insertBefore('concurnas', 'langext', {
8238
- 'regex-literal': {
8239
- pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
8240
- greedy: true,
8241
- inside: {
8242
- interpolation: {
8243
- pattern:
8244
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
8245
- lookbehind: true,
8246
- inside: Prism.languages.concurnas
8247
- },
8248
- regex: /[\s\S]+/
8249
- }
8250
- },
8251
- 'string-literal': {
8252
- pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
8253
- greedy: true,
8254
- inside: {
8255
- interpolation: {
8256
- pattern:
8257
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
8258
- lookbehind: true,
8259
- inside: Prism.languages.concurnas
8260
- },
8261
- string: /[\s\S]+/
8262
- }
8263
- }
8264
- });
8265
- Prism.languages.conc = Prism.languages.concurnas;
8233
+ var concurnas_1;
8234
+ var hasRequiredConcurnas;
8235
+
8236
+ function requireConcurnas () {
8237
+ if (hasRequiredConcurnas) return concurnas_1;
8238
+ hasRequiredConcurnas = 1;
8239
+
8240
+ concurnas_1 = concurnas;
8241
+ concurnas.displayName = 'concurnas';
8242
+ concurnas.aliases = ['conc'];
8243
+ function concurnas(Prism) {
8244
+ Prism.languages.concurnas = {
8245
+ comment: {
8246
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
8247
+ lookbehind: true,
8248
+ greedy: true
8249
+ },
8250
+ langext: {
8251
+ pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
8252
+ greedy: true,
8253
+ inside: {
8254
+ 'class-name': /^\w+/,
8255
+ string: {
8256
+ pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
8257
+ lookbehind: true
8258
+ },
8259
+ punctuation: /\|\|/
8260
+ }
8261
+ },
8262
+ function: {
8263
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
8264
+ lookbehind: true
8265
+ },
8266
+ keyword:
8267
+ /\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/,
8268
+ boolean: /\b(?:false|true)\b/,
8269
+ number:
8270
+ /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
8271
+ punctuation: /[{}[\];(),.:]/,
8272
+ operator:
8273
+ /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
8274
+ annotation: {
8275
+ pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
8276
+ alias: 'builtin'
8277
+ }
8278
+ };
8279
+ Prism.languages.insertBefore('concurnas', 'langext', {
8280
+ 'regex-literal': {
8281
+ pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
8282
+ greedy: true,
8283
+ inside: {
8284
+ interpolation: {
8285
+ pattern:
8286
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
8287
+ lookbehind: true,
8288
+ inside: Prism.languages.concurnas
8289
+ },
8290
+ regex: /[\s\S]+/
8291
+ }
8292
+ },
8293
+ 'string-literal': {
8294
+ pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
8295
+ greedy: true,
8296
+ inside: {
8297
+ interpolation: {
8298
+ pattern:
8299
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
8300
+ lookbehind: true,
8301
+ inside: Prism.languages.concurnas
8302
+ },
8303
+ string: /[\s\S]+/
8304
+ }
8305
+ }
8306
+ });
8307
+ Prism.languages.conc = Prism.languages.concurnas;
8308
+ }
8309
+ return concurnas_1;
8266
8310
  }
8267
8311
 
8268
- var coq_1 = coq;
8269
- coq.displayName = 'coq';
8270
- coq.aliases = [];
8271
- function coq(Prism) {
8312
+ var coq_1;
8313
+ var hasRequiredCoq;
8314
+
8315
+ function requireCoq () {
8316
+ if (hasRequiredCoq) return coq_1;
8317
+ hasRequiredCoq = 1;
8318
+
8319
+ coq_1 = coq;
8320
+ coq.displayName = 'coq';
8321
+ coq.aliases = [];
8322
+ function coq(Prism) {
8272
8323
  (function (Prism) {
8273
- // https://github.com/coq/coq
8274
- var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
8275
- for (var i = 0; i < 2; i++) {
8276
- commentSource = commentSource.replace(/<self>/g, function () {
8277
- return commentSource
8278
- });
8279
- }
8280
- commentSource = commentSource.replace(/<self>/g, '[]');
8281
- Prism.languages.coq = {
8282
- comment: RegExp(commentSource),
8283
- string: {
8284
- pattern: /"(?:[^"]|"")*"(?!")/,
8285
- greedy: true
8286
- },
8287
- attribute: [
8288
- {
8289
- pattern: RegExp(
8290
- /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
8291
- /<comment>/g,
8292
- function () {
8293
- return commentSource
8294
- }
8295
- )
8296
- ),
8297
- greedy: true,
8298
- alias: 'attr-name',
8299
- inside: {
8300
- comment: RegExp(commentSource),
8301
- string: {
8302
- pattern: /"(?:[^"]|"")*"(?!")/,
8303
- greedy: true
8304
- },
8305
- operator: /=/,
8306
- punctuation: /^#\[|\]$|[,()]/
8307
- }
8308
- },
8309
- {
8310
- pattern:
8311
- /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
8312
- alias: 'attr-name'
8313
- }
8314
- ],
8315
- keyword:
8316
- /\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/,
8317
- number:
8318
- /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
8319
- punct: {
8320
- pattern: /@\{|\{\||\[=|:>/,
8321
- alias: 'punctuation'
8322
- },
8323
- operator:
8324
- /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
8325
- punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
8326
- };
8327
- })(Prism);
8324
+ // https://github.com/coq/coq
8325
+ var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
8326
+ for (var i = 0; i < 2; i++) {
8327
+ commentSource = commentSource.replace(/<self>/g, function () {
8328
+ return commentSource
8329
+ });
8330
+ }
8331
+ commentSource = commentSource.replace(/<self>/g, '[]');
8332
+ Prism.languages.coq = {
8333
+ comment: RegExp(commentSource),
8334
+ string: {
8335
+ pattern: /"(?:[^"]|"")*"(?!")/,
8336
+ greedy: true
8337
+ },
8338
+ attribute: [
8339
+ {
8340
+ pattern: RegExp(
8341
+ /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
8342
+ /<comment>/g,
8343
+ function () {
8344
+ return commentSource
8345
+ }
8346
+ )
8347
+ ),
8348
+ greedy: true,
8349
+ alias: 'attr-name',
8350
+ inside: {
8351
+ comment: RegExp(commentSource),
8352
+ string: {
8353
+ pattern: /"(?:[^"]|"")*"(?!")/,
8354
+ greedy: true
8355
+ },
8356
+ operator: /=/,
8357
+ punctuation: /^#\[|\]$|[,()]/
8358
+ }
8359
+ },
8360
+ {
8361
+ pattern:
8362
+ /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
8363
+ alias: 'attr-name'
8364
+ }
8365
+ ],
8366
+ keyword:
8367
+ /\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/,
8368
+ number:
8369
+ /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
8370
+ punct: {
8371
+ pattern: /@\{|\{\||\[=|:>/,
8372
+ alias: 'punctuation'
8373
+ },
8374
+ operator:
8375
+ /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
8376
+ punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
8377
+ };
8378
+ })(Prism);
8379
+ }
8380
+ return coq_1;
8328
8381
  }
8329
8382
 
8330
- var ruby_1 = ruby;
8331
- ruby.displayName = 'ruby';
8332
- ruby.aliases = ['rb'];
8333
- function ruby(Prism) {
8383
+ var ruby_1;
8384
+ var hasRequiredRuby;
8385
+
8386
+ function requireRuby () {
8387
+ if (hasRequiredRuby) return ruby_1;
8388
+ hasRequiredRuby = 1;
8389
+
8390
+ ruby_1 = ruby;
8391
+ ruby.displayName = 'ruby';
8392
+ ruby.aliases = ['rb'];
8393
+ function ruby(Prism) {
8334
8394
  (function (Prism) {
8335
- Prism.languages.ruby = Prism.languages.extend('clike', {
8336
- comment: {
8337
- pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
8338
- greedy: true
8339
- },
8340
- 'class-name': {
8341
- pattern:
8342
- /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
8343
- lookbehind: true,
8344
- inside: {
8345
- punctuation: /[.\\]/
8346
- }
8347
- },
8348
- keyword:
8349
- /\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/,
8350
- operator:
8351
- /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
8352
- punctuation: /[(){}[\].,;]/
8353
- });
8354
- Prism.languages.insertBefore('ruby', 'operator', {
8355
- 'double-colon': {
8356
- pattern: /::/,
8357
- alias: 'punctuation'
8358
- }
8359
- });
8360
- var interpolation = {
8361
- pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
8362
- lookbehind: true,
8363
- inside: {
8364
- content: {
8365
- pattern: /^(#\{)[\s\S]+(?=\}$)/,
8366
- lookbehind: true,
8367
- inside: Prism.languages.ruby
8368
- },
8369
- delimiter: {
8370
- pattern: /^#\{|\}$/,
8371
- alias: 'punctuation'
8372
- }
8373
- }
8374
- };
8375
- delete Prism.languages.ruby.function;
8376
- var percentExpression =
8377
- '(?:' +
8378
- [
8379
- /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
8380
- /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
8381
- /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
8382
- /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
8383
- /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
8384
- ].join('|') +
8385
- ')';
8386
- var symbolName =
8387
- /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
8388
- .source;
8389
- Prism.languages.insertBefore('ruby', 'keyword', {
8390
- 'regex-literal': [
8391
- {
8392
- pattern: RegExp(
8393
- /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
8394
- ),
8395
- greedy: true,
8396
- inside: {
8397
- interpolation: interpolation,
8398
- regex: /[\s\S]+/
8399
- }
8400
- },
8401
- {
8402
- pattern:
8403
- /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
8404
- lookbehind: true,
8405
- greedy: true,
8406
- inside: {
8407
- interpolation: interpolation,
8408
- regex: /[\s\S]+/
8409
- }
8410
- }
8411
- ],
8412
- variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
8413
- symbol: [
8414
- {
8415
- pattern: RegExp(/(^|[^:]):/.source + symbolName),
8416
- lookbehind: true,
8417
- greedy: true
8418
- },
8419
- {
8420
- pattern: RegExp(
8421
- /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
8422
- ),
8423
- lookbehind: true,
8424
- greedy: true
8425
- }
8426
- ],
8427
- 'method-definition': {
8428
- pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
8429
- lookbehind: true,
8430
- inside: {
8431
- function: /\b\w+$/,
8432
- keyword: /^self\b/,
8433
- 'class-name': /^\w+/,
8434
- punctuation: /\./
8435
- }
8436
- }
8437
- });
8438
- Prism.languages.insertBefore('ruby', 'string', {
8439
- 'string-literal': [
8440
- {
8441
- pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
8442
- greedy: true,
8443
- inside: {
8444
- interpolation: interpolation,
8445
- string: /[\s\S]+/
8446
- }
8447
- },
8448
- {
8449
- pattern:
8450
- /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
8451
- greedy: true,
8452
- inside: {
8453
- interpolation: interpolation,
8454
- string: /[\s\S]+/
8455
- }
8456
- },
8457
- {
8458
- pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
8459
- alias: 'heredoc-string',
8460
- greedy: true,
8461
- inside: {
8462
- delimiter: {
8463
- pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
8464
- inside: {
8465
- symbol: /\b\w+/,
8466
- punctuation: /^<<[-~]?/
8467
- }
8468
- },
8469
- interpolation: interpolation,
8470
- string: /[\s\S]+/
8471
- }
8472
- },
8473
- {
8474
- pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
8475
- alias: 'heredoc-string',
8476
- greedy: true,
8477
- inside: {
8478
- delimiter: {
8479
- pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
8480
- inside: {
8481
- symbol: /\b\w+/,
8482
- punctuation: /^<<[-~]?'|'$/
8483
- }
8484
- },
8485
- string: /[\s\S]+/
8486
- }
8487
- }
8488
- ],
8489
- 'command-literal': [
8490
- {
8491
- pattern: RegExp(/%x/.source + percentExpression),
8492
- greedy: true,
8493
- inside: {
8494
- interpolation: interpolation,
8495
- command: {
8496
- pattern: /[\s\S]+/,
8497
- alias: 'string'
8498
- }
8499
- }
8500
- },
8501
- {
8502
- pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
8503
- greedy: true,
8504
- inside: {
8505
- interpolation: interpolation,
8506
- command: {
8507
- pattern: /[\s\S]+/,
8508
- alias: 'string'
8509
- }
8510
- }
8511
- }
8512
- ]
8513
- });
8514
- delete Prism.languages.ruby.string;
8515
- Prism.languages.insertBefore('ruby', 'number', {
8516
- builtin:
8517
- /\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/,
8518
- constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
8519
- });
8520
- Prism.languages.rb = Prism.languages.ruby;
8521
- })(Prism);
8395
+ Prism.languages.ruby = Prism.languages.extend('clike', {
8396
+ comment: {
8397
+ pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
8398
+ greedy: true
8399
+ },
8400
+ 'class-name': {
8401
+ pattern:
8402
+ /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
8403
+ lookbehind: true,
8404
+ inside: {
8405
+ punctuation: /[.\\]/
8406
+ }
8407
+ },
8408
+ keyword:
8409
+ /\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/,
8410
+ operator:
8411
+ /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
8412
+ punctuation: /[(){}[\].,;]/
8413
+ });
8414
+ Prism.languages.insertBefore('ruby', 'operator', {
8415
+ 'double-colon': {
8416
+ pattern: /::/,
8417
+ alias: 'punctuation'
8418
+ }
8419
+ });
8420
+ var interpolation = {
8421
+ pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
8422
+ lookbehind: true,
8423
+ inside: {
8424
+ content: {
8425
+ pattern: /^(#\{)[\s\S]+(?=\}$)/,
8426
+ lookbehind: true,
8427
+ inside: Prism.languages.ruby
8428
+ },
8429
+ delimiter: {
8430
+ pattern: /^#\{|\}$/,
8431
+ alias: 'punctuation'
8432
+ }
8433
+ }
8434
+ };
8435
+ delete Prism.languages.ruby.function;
8436
+ var percentExpression =
8437
+ '(?:' +
8438
+ [
8439
+ /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
8440
+ /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
8441
+ /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
8442
+ /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
8443
+ /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
8444
+ ].join('|') +
8445
+ ')';
8446
+ var symbolName =
8447
+ /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
8448
+ .source;
8449
+ Prism.languages.insertBefore('ruby', 'keyword', {
8450
+ 'regex-literal': [
8451
+ {
8452
+ pattern: RegExp(
8453
+ /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
8454
+ ),
8455
+ greedy: true,
8456
+ inside: {
8457
+ interpolation: interpolation,
8458
+ regex: /[\s\S]+/
8459
+ }
8460
+ },
8461
+ {
8462
+ pattern:
8463
+ /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
8464
+ lookbehind: true,
8465
+ greedy: true,
8466
+ inside: {
8467
+ interpolation: interpolation,
8468
+ regex: /[\s\S]+/
8469
+ }
8470
+ }
8471
+ ],
8472
+ variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
8473
+ symbol: [
8474
+ {
8475
+ pattern: RegExp(/(^|[^:]):/.source + symbolName),
8476
+ lookbehind: true,
8477
+ greedy: true
8478
+ },
8479
+ {
8480
+ pattern: RegExp(
8481
+ /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
8482
+ ),
8483
+ lookbehind: true,
8484
+ greedy: true
8485
+ }
8486
+ ],
8487
+ 'method-definition': {
8488
+ pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
8489
+ lookbehind: true,
8490
+ inside: {
8491
+ function: /\b\w+$/,
8492
+ keyword: /^self\b/,
8493
+ 'class-name': /^\w+/,
8494
+ punctuation: /\./
8495
+ }
8496
+ }
8497
+ });
8498
+ Prism.languages.insertBefore('ruby', 'string', {
8499
+ 'string-literal': [
8500
+ {
8501
+ pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
8502
+ greedy: true,
8503
+ inside: {
8504
+ interpolation: interpolation,
8505
+ string: /[\s\S]+/
8506
+ }
8507
+ },
8508
+ {
8509
+ pattern:
8510
+ /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
8511
+ greedy: true,
8512
+ inside: {
8513
+ interpolation: interpolation,
8514
+ string: /[\s\S]+/
8515
+ }
8516
+ },
8517
+ {
8518
+ pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
8519
+ alias: 'heredoc-string',
8520
+ greedy: true,
8521
+ inside: {
8522
+ delimiter: {
8523
+ pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
8524
+ inside: {
8525
+ symbol: /\b\w+/,
8526
+ punctuation: /^<<[-~]?/
8527
+ }
8528
+ },
8529
+ interpolation: interpolation,
8530
+ string: /[\s\S]+/
8531
+ }
8532
+ },
8533
+ {
8534
+ pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
8535
+ alias: 'heredoc-string',
8536
+ greedy: true,
8537
+ inside: {
8538
+ delimiter: {
8539
+ pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
8540
+ inside: {
8541
+ symbol: /\b\w+/,
8542
+ punctuation: /^<<[-~]?'|'$/
8543
+ }
8544
+ },
8545
+ string: /[\s\S]+/
8546
+ }
8547
+ }
8548
+ ],
8549
+ 'command-literal': [
8550
+ {
8551
+ pattern: RegExp(/%x/.source + percentExpression),
8552
+ greedy: true,
8553
+ inside: {
8554
+ interpolation: interpolation,
8555
+ command: {
8556
+ pattern: /[\s\S]+/,
8557
+ alias: 'string'
8558
+ }
8559
+ }
8560
+ },
8561
+ {
8562
+ pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
8563
+ greedy: true,
8564
+ inside: {
8565
+ interpolation: interpolation,
8566
+ command: {
8567
+ pattern: /[\s\S]+/,
8568
+ alias: 'string'
8569
+ }
8570
+ }
8571
+ }
8572
+ ]
8573
+ });
8574
+ delete Prism.languages.ruby.string;
8575
+ Prism.languages.insertBefore('ruby', 'number', {
8576
+ builtin:
8577
+ /\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/,
8578
+ constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
8579
+ });
8580
+ Prism.languages.rb = Prism.languages.ruby;
8581
+ })(Prism);
8582
+ }
8583
+ return ruby_1;
8522
8584
  }
8523
8585
 
8524
- var refractorRuby = ruby_1;
8525
- var crystal_1 = crystal;
8526
- crystal.displayName = 'crystal';
8527
- crystal.aliases = [];
8528
- function crystal(Prism) {
8529
- Prism.register(refractorRuby)
8530
- ;(function (Prism) {
8531
- Prism.languages.crystal = Prism.languages.extend('ruby', {
8532
- keyword: [
8533
- /\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/,
8534
- {
8535
- pattern: /(\.\s*)(?:is_a|responds_to)\?/,
8536
- lookbehind: true
8537
- }
8538
- ],
8539
- number:
8540
- /\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/,
8541
- operator: [/->/, Prism.languages.ruby.operator],
8542
- punctuation: /[(){}[\].,;\\]/
8543
- });
8544
- Prism.languages.insertBefore('crystal', 'string-literal', {
8545
- attribute: {
8546
- pattern: /@\[.*?\]/,
8547
- inside: {
8548
- delimiter: {
8549
- pattern: /^@\[|\]$/,
8550
- alias: 'punctuation'
8551
- },
8552
- attribute: {
8553
- pattern: /^(\s*)\w+/,
8554
- lookbehind: true,
8555
- alias: 'class-name'
8556
- },
8557
- args: {
8558
- pattern: /\S(?:[\s\S]*\S)?/,
8559
- inside: Prism.languages.crystal
8560
- }
8561
- }
8562
- },
8563
- expansion: {
8564
- pattern: /\{(?:\{.*?\}|%.*?%)\}/,
8565
- inside: {
8566
- content: {
8567
- pattern: /^(\{.)[\s\S]+(?=.\}$)/,
8568
- lookbehind: true,
8569
- inside: Prism.languages.crystal
8570
- },
8571
- delimiter: {
8572
- pattern: /^\{[\{%]|[\}%]\}$/,
8573
- alias: 'operator'
8574
- }
8575
- }
8576
- },
8577
- char: {
8578
- pattern:
8579
- /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
8580
- greedy: true
8581
- }
8582
- });
8583
- })(Prism);
8586
+ var crystal_1;
8587
+ var hasRequiredCrystal;
8588
+
8589
+ function requireCrystal () {
8590
+ if (hasRequiredCrystal) return crystal_1;
8591
+ hasRequiredCrystal = 1;
8592
+ var refractorRuby = requireRuby();
8593
+ crystal_1 = crystal;
8594
+ crystal.displayName = 'crystal';
8595
+ crystal.aliases = [];
8596
+ function crystal(Prism) {
8597
+ Prism.register(refractorRuby)
8598
+ ;(function (Prism) {
8599
+ Prism.languages.crystal = Prism.languages.extend('ruby', {
8600
+ keyword: [
8601
+ /\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/,
8602
+ {
8603
+ pattern: /(\.\s*)(?:is_a|responds_to)\?/,
8604
+ lookbehind: true
8605
+ }
8606
+ ],
8607
+ number:
8608
+ /\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/,
8609
+ operator: [/->/, Prism.languages.ruby.operator],
8610
+ punctuation: /[(){}[\].,;\\]/
8611
+ });
8612
+ Prism.languages.insertBefore('crystal', 'string-literal', {
8613
+ attribute: {
8614
+ pattern: /@\[.*?\]/,
8615
+ inside: {
8616
+ delimiter: {
8617
+ pattern: /^@\[|\]$/,
8618
+ alias: 'punctuation'
8619
+ },
8620
+ attribute: {
8621
+ pattern: /^(\s*)\w+/,
8622
+ lookbehind: true,
8623
+ alias: 'class-name'
8624
+ },
8625
+ args: {
8626
+ pattern: /\S(?:[\s\S]*\S)?/,
8627
+ inside: Prism.languages.crystal
8628
+ }
8629
+ }
8630
+ },
8631
+ expansion: {
8632
+ pattern: /\{(?:\{.*?\}|%.*?%)\}/,
8633
+ inside: {
8634
+ content: {
8635
+ pattern: /^(\{.)[\s\S]+(?=.\}$)/,
8636
+ lookbehind: true,
8637
+ inside: Prism.languages.crystal
8638
+ },
8639
+ delimiter: {
8640
+ pattern: /^\{[\{%]|[\}%]\}$/,
8641
+ alias: 'operator'
8642
+ }
8643
+ }
8644
+ },
8645
+ char: {
8646
+ pattern:
8647
+ /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
8648
+ greedy: true
8649
+ }
8650
+ });
8651
+ })(Prism);
8652
+ }
8653
+ return crystal_1;
8654
+ }
8655
+
8656
+ var cshtml_1;
8657
+ var hasRequiredCshtml;
8658
+
8659
+ function requireCshtml () {
8660
+ if (hasRequiredCshtml) return cshtml_1;
8661
+ hasRequiredCshtml = 1;
8662
+ var refractorCsharp = requireCsharp();
8663
+ cshtml_1 = cshtml;
8664
+ cshtml.displayName = 'cshtml';
8665
+ cshtml.aliases = ['razor'];
8666
+ function cshtml(Prism) {
8667
+ Prism.register(refractorCsharp)
8668
+ // Docs:
8669
+ // https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio
8670
+ // https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0
8671
+ ;(function (Prism) {
8672
+ var commentLike = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//
8673
+ .source;
8674
+ var stringLike =
8675
+ /@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source +
8676
+ '|' +
8677
+ /'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;
8678
+ /**
8679
+ * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
8680
+ *
8681
+ * @param {string} pattern
8682
+ * @param {number} depthLog2
8683
+ * @returns {string}
8684
+ */
8685
+ function nested(pattern, depthLog2) {
8686
+ for (var i = 0; i < depthLog2; i++) {
8687
+ pattern = pattern.replace(/<self>/g, function () {
8688
+ return '(?:' + pattern + ')'
8689
+ });
8690
+ }
8691
+ return pattern
8692
+ .replace(/<self>/g, '[^\\s\\S]')
8693
+ .replace(/<str>/g, '(?:' + stringLike + ')')
8694
+ .replace(/<comment>/g, '(?:' + commentLike + ')')
8695
+ }
8696
+ var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2);
8697
+ var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 2);
8698
+ var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2);
8699
+ var angle = nested(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source, 2); // Note about the above bracket patterns:
8700
+ // They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and
8701
+ // comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which
8702
+ // messes up the bracket and string counting implemented by the above patterns.
8703
+ //
8704
+ // This problem is not fixable because 1) HTML expression are highly context sensitive and very difficult to detect
8705
+ // and 2) they require one capturing group at every nested level. See the `tagRegion` pattern to admire the
8706
+ // complexity of an HTML expression.
8707
+ //
8708
+ // To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
8709
+ // allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
8710
+ var tagAttrs =
8711
+ /(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/
8712
+ .source;
8713
+ var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source;
8714
+ var tagRegion =
8715
+ /\B@?/.source +
8716
+ '(?:' +
8717
+ /<([a-zA-Z][\w:]*)/.source +
8718
+ tagAttrs +
8719
+ /\s*>/.source +
8720
+ '(?:' +
8721
+ (/[^<]/.source +
8722
+ '|' + // all tags that are not the start tag
8723
+ // eslint-disable-next-line regexp/strict
8724
+ /<\/?(?!\1\b)/.source +
8725
+ tagContent +
8726
+ '|' + // nested start tag
8727
+ nested(
8728
+ // eslint-disable-next-line regexp/strict
8729
+ /<\1/.source +
8730
+ tagAttrs +
8731
+ /\s*>/.source +
8732
+ '(?:' +
8733
+ (/[^<]/.source +
8734
+ '|' + // all tags that are not the start tag
8735
+ // eslint-disable-next-line regexp/strict
8736
+ /<\/?(?!\1\b)/.source +
8737
+ tagContent +
8738
+ '|' +
8739
+ '<self>') +
8740
+ ')*' + // eslint-disable-next-line regexp/strict
8741
+ /<\/\1\s*>/.source,
8742
+ 2
8743
+ )) +
8744
+ ')*' + // eslint-disable-next-line regexp/strict
8745
+ /<\/\1\s*>/.source +
8746
+ '|' +
8747
+ /</.source +
8748
+ tagContent +
8749
+ ')'; // Now for the actual language definition(s):
8750
+ //
8751
+ // Razor as a language has 2 parts:
8752
+ // 1) CSHTML: A markup-like language that has been extended with inline C# code expressions and blocks.
8753
+ // 2) C#+HTML: A variant of C# that can contain CSHTML tags as expressions.
8754
+ //
8755
+ // In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
8756
+ // other. However, only CSHTML will be exported via `Prism.languages`.
8757
+ Prism.languages.cshtml = Prism.languages.extend('markup', {});
8758
+ var csharpWithHtml = Prism.languages.insertBefore(
8759
+ 'csharp',
8760
+ 'string',
8761
+ {
8762
+ html: {
8763
+ pattern: RegExp(tagRegion),
8764
+ greedy: true,
8765
+ inside: Prism.languages.cshtml
8766
+ }
8767
+ },
8768
+ {
8769
+ csharp: Prism.languages.extend('csharp', {})
8770
+ }
8771
+ );
8772
+ var cs = {
8773
+ pattern: /\S[\s\S]*/,
8774
+ alias: 'language-csharp',
8775
+ inside: csharpWithHtml
8776
+ };
8777
+ Prism.languages.insertBefore('cshtml', 'prolog', {
8778
+ 'razor-comment': {
8779
+ pattern: /@\*[\s\S]*?\*@/,
8780
+ greedy: true,
8781
+ alias: 'comment'
8782
+ },
8783
+ block: {
8784
+ pattern: RegExp(
8785
+ /(^|[^@])@/.source +
8786
+ '(?:' +
8787
+ [
8788
+ // @{ ... }
8789
+ curly, // @code{ ... }
8790
+ /(?:code|functions)\s*/.source + curly, // @for (...) { ... }
8791
+ /(?:for|foreach|lock|switch|using|while)\s*/.source +
8792
+ round +
8793
+ /\s*/.source +
8794
+ curly, // @do { ... } while (...);
8795
+ /do\s*/.source +
8796
+ curly +
8797
+ /\s*while\s*/.source +
8798
+ round +
8799
+ /(?:\s*;)?/.source, // @try { ... } catch (...) { ... } finally { ... }
8800
+ /try\s*/.source +
8801
+ curly +
8802
+ /\s*catch\s*/.source +
8803
+ round +
8804
+ /\s*/.source +
8805
+ curly +
8806
+ /\s*finally\s*/.source +
8807
+ curly, // @if (...) {...} else if (...) {...} else {...}
8808
+ /if\s*/.source +
8809
+ round +
8810
+ /\s*/.source +
8811
+ curly +
8812
+ '(?:' +
8813
+ /\s*else/.source +
8814
+ '(?:' +
8815
+ /\s+if\s*/.source +
8816
+ round +
8817
+ ')?' +
8818
+ /\s*/.source +
8819
+ curly +
8820
+ ')*'
8821
+ ].join('|') +
8822
+ ')'
8823
+ ),
8824
+ lookbehind: true,
8825
+ greedy: true,
8826
+ inside: {
8827
+ keyword: /^@\w*/,
8828
+ csharp: cs
8829
+ }
8830
+ },
8831
+ directive: {
8832
+ pattern:
8833
+ /^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,
8834
+ lookbehind: true,
8835
+ greedy: true,
8836
+ inside: {
8837
+ keyword: /^@\w+/,
8838
+ csharp: cs
8839
+ }
8840
+ },
8841
+ value: {
8842
+ pattern: RegExp(
8843
+ /(^|[^@])@/.source +
8844
+ /(?:await\b\s*)?/.source +
8845
+ '(?:' +
8846
+ /\w+\b/.source +
8847
+ '|' +
8848
+ round +
8849
+ ')' +
8850
+ '(?:' +
8851
+ /[?!]?\.\w+\b/.source +
8852
+ '|' +
8853
+ round +
8854
+ '|' +
8855
+ square +
8856
+ '|' +
8857
+ angle +
8858
+ round +
8859
+ ')*'
8860
+ ),
8861
+ lookbehind: true,
8862
+ greedy: true,
8863
+ alias: 'variable',
8864
+ inside: {
8865
+ keyword: /^@/,
8866
+ csharp: cs
8867
+ }
8868
+ },
8869
+ 'delegate-operator': {
8870
+ pattern: /(^|[^@])@(?=<)/,
8871
+ lookbehind: true,
8872
+ alias: 'operator'
8873
+ }
8874
+ });
8875
+ Prism.languages.razor = Prism.languages.cshtml;
8876
+ })(Prism);
8877
+ }
8878
+ return cshtml_1;
8584
8879
  }
8585
8880
 
8586
- var refractorCsharp = csharp_1;
8587
- var cshtml_1 = cshtml;
8588
- cshtml.displayName = 'cshtml';
8589
- cshtml.aliases = ['razor'];
8590
- function cshtml(Prism) {
8591
- Prism.register(refractorCsharp)
8592
- // Docs:
8593
- // https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio
8594
- // https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0
8595
- ;(function (Prism) {
8596
- var commentLike = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//
8597
- .source;
8598
- var stringLike =
8599
- /@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source +
8600
- '|' +
8601
- /'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;
8602
- /**
8603
- * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
8604
- *
8605
- * @param {string} pattern
8606
- * @param {number} depthLog2
8607
- * @returns {string}
8608
- */
8609
- function nested(pattern, depthLog2) {
8610
- for (var i = 0; i < depthLog2; i++) {
8611
- pattern = pattern.replace(/<self>/g, function () {
8612
- return '(?:' + pattern + ')'
8613
- });
8614
- }
8615
- return pattern
8616
- .replace(/<self>/g, '[^\\s\\S]')
8617
- .replace(/<str>/g, '(?:' + stringLike + ')')
8618
- .replace(/<comment>/g, '(?:' + commentLike + ')')
8619
- }
8620
- var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2);
8621
- var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 2);
8622
- var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2);
8623
- var angle = nested(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source, 2); // Note about the above bracket patterns:
8624
- // They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and
8625
- // comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which
8626
- // messes up the bracket and string counting implemented by the above patterns.
8627
- //
8628
- // This problem is not fixable because 1) HTML expression are highly context sensitive and very difficult to detect
8629
- // and 2) they require one capturing group at every nested level. See the `tagRegion` pattern to admire the
8630
- // complexity of an HTML expression.
8631
- //
8632
- // To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
8633
- // allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
8634
- var tagAttrs =
8635
- /(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/
8636
- .source;
8637
- var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source;
8638
- var tagRegion =
8639
- /\B@?/.source +
8640
- '(?:' +
8641
- /<([a-zA-Z][\w:]*)/.source +
8642
- tagAttrs +
8643
- /\s*>/.source +
8644
- '(?:' +
8645
- (/[^<]/.source +
8646
- '|' + // all tags that are not the start tag
8647
- // eslint-disable-next-line regexp/strict
8648
- /<\/?(?!\1\b)/.source +
8649
- tagContent +
8650
- '|' + // nested start tag
8651
- nested(
8652
- // eslint-disable-next-line regexp/strict
8653
- /<\1/.source +
8654
- tagAttrs +
8655
- /\s*>/.source +
8656
- '(?:' +
8657
- (/[^<]/.source +
8658
- '|' + // all tags that are not the start tag
8659
- // eslint-disable-next-line regexp/strict
8660
- /<\/?(?!\1\b)/.source +
8661
- tagContent +
8662
- '|' +
8663
- '<self>') +
8664
- ')*' + // eslint-disable-next-line regexp/strict
8665
- /<\/\1\s*>/.source,
8666
- 2
8667
- )) +
8668
- ')*' + // eslint-disable-next-line regexp/strict
8669
- /<\/\1\s*>/.source +
8670
- '|' +
8671
- /</.source +
8672
- tagContent +
8673
- ')'; // Now for the actual language definition(s):
8674
- //
8675
- // Razor as a language has 2 parts:
8676
- // 1) CSHTML: A markup-like language that has been extended with inline C# code expressions and blocks.
8677
- // 2) C#+HTML: A variant of C# that can contain CSHTML tags as expressions.
8678
- //
8679
- // In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
8680
- // other. However, only CSHTML will be exported via `Prism.languages`.
8681
- Prism.languages.cshtml = Prism.languages.extend('markup', {});
8682
- var csharpWithHtml = Prism.languages.insertBefore(
8683
- 'csharp',
8684
- 'string',
8685
- {
8686
- html: {
8687
- pattern: RegExp(tagRegion),
8688
- greedy: true,
8689
- inside: Prism.languages.cshtml
8690
- }
8691
- },
8692
- {
8693
- csharp: Prism.languages.extend('csharp', {})
8694
- }
8695
- );
8696
- var cs = {
8697
- pattern: /\S[\s\S]*/,
8698
- alias: 'language-csharp',
8699
- inside: csharpWithHtml
8700
- };
8701
- Prism.languages.insertBefore('cshtml', 'prolog', {
8702
- 'razor-comment': {
8703
- pattern: /@\*[\s\S]*?\*@/,
8704
- greedy: true,
8705
- alias: 'comment'
8706
- },
8707
- block: {
8708
- pattern: RegExp(
8709
- /(^|[^@])@/.source +
8710
- '(?:' +
8711
- [
8712
- // @{ ... }
8713
- curly, // @code{ ... }
8714
- /(?:code|functions)\s*/.source + curly, // @for (...) { ... }
8715
- /(?:for|foreach|lock|switch|using|while)\s*/.source +
8716
- round +
8717
- /\s*/.source +
8718
- curly, // @do { ... } while (...);
8719
- /do\s*/.source +
8720
- curly +
8721
- /\s*while\s*/.source +
8722
- round +
8723
- /(?:\s*;)?/.source, // @try { ... } catch (...) { ... } finally { ... }
8724
- /try\s*/.source +
8725
- curly +
8726
- /\s*catch\s*/.source +
8727
- round +
8728
- /\s*/.source +
8729
- curly +
8730
- /\s*finally\s*/.source +
8731
- curly, // @if (...) {...} else if (...) {...} else {...}
8732
- /if\s*/.source +
8733
- round +
8734
- /\s*/.source +
8735
- curly +
8736
- '(?:' +
8737
- /\s*else/.source +
8738
- '(?:' +
8739
- /\s+if\s*/.source +
8740
- round +
8741
- ')?' +
8742
- /\s*/.source +
8743
- curly +
8744
- ')*'
8745
- ].join('|') +
8746
- ')'
8747
- ),
8748
- lookbehind: true,
8749
- greedy: true,
8750
- inside: {
8751
- keyword: /^@\w*/,
8752
- csharp: cs
8753
- }
8754
- },
8755
- directive: {
8756
- pattern:
8757
- /^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,
8758
- lookbehind: true,
8759
- greedy: true,
8760
- inside: {
8761
- keyword: /^@\w+/,
8762
- csharp: cs
8763
- }
8764
- },
8765
- value: {
8766
- pattern: RegExp(
8767
- /(^|[^@])@/.source +
8768
- /(?:await\b\s*)?/.source +
8769
- '(?:' +
8770
- /\w+\b/.source +
8771
- '|' +
8772
- round +
8773
- ')' +
8774
- '(?:' +
8775
- /[?!]?\.\w+\b/.source +
8776
- '|' +
8777
- round +
8778
- '|' +
8779
- square +
8780
- '|' +
8781
- angle +
8782
- round +
8783
- ')*'
8784
- ),
8785
- lookbehind: true,
8786
- greedy: true,
8787
- alias: 'variable',
8788
- inside: {
8789
- keyword: /^@/,
8790
- csharp: cs
8791
- }
8792
- },
8793
- 'delegate-operator': {
8794
- pattern: /(^|[^@])@(?=<)/,
8795
- lookbehind: true,
8796
- alias: 'operator'
8797
- }
8798
- });
8799
- Prism.languages.razor = Prism.languages.cshtml;
8800
- })(Prism);
8881
+ var csp_1;
8882
+ var hasRequiredCsp;
8883
+
8884
+ function requireCsp () {
8885
+ if (hasRequiredCsp) return csp_1;
8886
+ hasRequiredCsp = 1;
8887
+
8888
+ csp_1 = csp;
8889
+ csp.displayName = 'csp';
8890
+ csp.aliases = [];
8891
+ function csp(Prism) {
8892
+ (function (Prism) {
8893
+ /**
8894
+ * @param {string} source
8895
+ * @returns {RegExp}
8896
+ */
8897
+ function value(source) {
8898
+ return RegExp(
8899
+ /([ \t])/.source + '(?:' + source + ')' + /(?=[\s;]|$)/.source,
8900
+ 'i'
8901
+ )
8902
+ }
8903
+ Prism.languages.csp = {
8904
+ directive: {
8905
+ pattern:
8906
+ /(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
8907
+ lookbehind: true,
8908
+ alias: 'property'
8909
+ },
8910
+ scheme: {
8911
+ pattern: value(/[a-z][a-z0-9.+-]*:/.source),
8912
+ lookbehind: true
8913
+ },
8914
+ none: {
8915
+ pattern: value(/'none'/.source),
8916
+ lookbehind: true,
8917
+ alias: 'keyword'
8918
+ },
8919
+ nonce: {
8920
+ pattern: value(/'nonce-[-+/\w=]+'/.source),
8921
+ lookbehind: true,
8922
+ alias: 'number'
8923
+ },
8924
+ hash: {
8925
+ pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
8926
+ lookbehind: true,
8927
+ alias: 'number'
8928
+ },
8929
+ host: {
8930
+ pattern: value(
8931
+ /[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source +
8932
+ '|' +
8933
+ /\*[^\s;,']*/.source +
8934
+ '|' +
8935
+ /[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
8936
+ ),
8937
+ lookbehind: true,
8938
+ alias: 'url',
8939
+ inside: {
8940
+ important: /\*/
8941
+ }
8942
+ },
8943
+ keyword: [
8944
+ {
8945
+ pattern: value(/'unsafe-[a-z-]+'/.source),
8946
+ lookbehind: true,
8947
+ alias: 'unsafe'
8948
+ },
8949
+ {
8950
+ pattern: value(/'[a-z-]+'/.source),
8951
+ lookbehind: true,
8952
+ alias: 'safe'
8953
+ }
8954
+ ],
8955
+ punctuation: /;/
8956
+ };
8957
+ })(Prism);
8958
+ }
8959
+ return csp_1;
8801
8960
  }
8802
8961
 
8803
- var csp_1 = csp;
8804
- csp.displayName = 'csp';
8805
- csp.aliases = [];
8806
- function csp(Prism) {
8962
+ var cssExtras_1;
8963
+ var hasRequiredCssExtras;
8964
+
8965
+ function requireCssExtras () {
8966
+ if (hasRequiredCssExtras) return cssExtras_1;
8967
+ hasRequiredCssExtras = 1;
8968
+
8969
+ cssExtras_1 = cssExtras;
8970
+ cssExtras.displayName = 'cssExtras';
8971
+ cssExtras.aliases = [];
8972
+ function cssExtras(Prism) {
8807
8973
  (function (Prism) {
8808
- /**
8809
- * @param {string} source
8810
- * @returns {RegExp}
8811
- */
8812
- function value(source) {
8813
- return RegExp(
8814
- /([ \t])/.source + '(?:' + source + ')' + /(?=[\s;]|$)/.source,
8815
- 'i'
8816
- )
8817
- }
8818
- Prism.languages.csp = {
8819
- directive: {
8820
- pattern:
8821
- /(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
8822
- lookbehind: true,
8823
- alias: 'property'
8824
- },
8825
- scheme: {
8826
- pattern: value(/[a-z][a-z0-9.+-]*:/.source),
8827
- lookbehind: true
8828
- },
8829
- none: {
8830
- pattern: value(/'none'/.source),
8831
- lookbehind: true,
8832
- alias: 'keyword'
8833
- },
8834
- nonce: {
8835
- pattern: value(/'nonce-[-+/\w=]+'/.source),
8836
- lookbehind: true,
8837
- alias: 'number'
8838
- },
8839
- hash: {
8840
- pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
8841
- lookbehind: true,
8842
- alias: 'number'
8843
- },
8844
- host: {
8845
- pattern: value(
8846
- /[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source +
8847
- '|' +
8848
- /\*[^\s;,']*/.source +
8849
- '|' +
8850
- /[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
8851
- ),
8852
- lookbehind: true,
8853
- alias: 'url',
8854
- inside: {
8855
- important: /\*/
8856
- }
8857
- },
8858
- keyword: [
8859
- {
8860
- pattern: value(/'unsafe-[a-z-]+'/.source),
8861
- lookbehind: true,
8862
- alias: 'unsafe'
8863
- },
8864
- {
8865
- pattern: value(/'[a-z-]+'/.source),
8866
- lookbehind: true,
8867
- alias: 'safe'
8868
- }
8869
- ],
8870
- punctuation: /;/
8871
- };
8872
- })(Prism);
8974
+ var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
8975
+ var selectorInside;
8976
+ Prism.languages.css.selector = {
8977
+ pattern: Prism.languages.css.selector.pattern,
8978
+ lookbehind: true,
8979
+ inside: (selectorInside = {
8980
+ 'pseudo-element':
8981
+ /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
8982
+ 'pseudo-class': /:[-\w]+/,
8983
+ class: /\.[-\w]+/,
8984
+ id: /#[-\w]+/,
8985
+ attribute: {
8986
+ pattern: RegExp('\\[(?:[^[\\]"\']|' + string.source + ')*\\]'),
8987
+ greedy: true,
8988
+ inside: {
8989
+ punctuation: /^\[|\]$/,
8990
+ 'case-sensitivity': {
8991
+ pattern: /(\s)[si]$/i,
8992
+ lookbehind: true,
8993
+ alias: 'keyword'
8994
+ },
8995
+ namespace: {
8996
+ pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
8997
+ lookbehind: true,
8998
+ inside: {
8999
+ punctuation: /\|$/
9000
+ }
9001
+ },
9002
+ 'attr-name': {
9003
+ pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
9004
+ lookbehind: true
9005
+ },
9006
+ 'attr-value': [
9007
+ string,
9008
+ {
9009
+ pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
9010
+ lookbehind: true
9011
+ }
9012
+ ],
9013
+ operator: /[|~*^$]?=/
9014
+ }
9015
+ },
9016
+ 'n-th': [
9017
+ {
9018
+ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
9019
+ lookbehind: true,
9020
+ inside: {
9021
+ number: /[\dn]+/,
9022
+ operator: /[+-]/
9023
+ }
9024
+ },
9025
+ {
9026
+ pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
9027
+ lookbehind: true
9028
+ }
9029
+ ],
9030
+ combinator: />|\+|~|\|\|/,
9031
+ // the `tag` token has been existed and removed.
9032
+ // because we can't find a perfect tokenize to match it.
9033
+ // if you want to add it, please read https://github.com/PrismJS/prism/pull/2373 first.
9034
+ punctuation: /[(),]/
9035
+ })
9036
+ };
9037
+ Prism.languages.css['atrule'].inside['selector-function-argument'].inside =
9038
+ selectorInside;
9039
+ Prism.languages.insertBefore('css', 'property', {
9040
+ variable: {
9041
+ pattern:
9042
+ /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
9043
+ lookbehind: true
9044
+ }
9045
+ });
9046
+ var unit = {
9047
+ pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
9048
+ lookbehind: true
9049
+ }; // 123 -123 .123 -.123 12.3 -12.3
9050
+ var number = {
9051
+ pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
9052
+ lookbehind: true
9053
+ };
9054
+ Prism.languages.insertBefore('css', 'function', {
9055
+ operator: {
9056
+ pattern: /(\s)[+\-*\/](?=\s)/,
9057
+ lookbehind: true
9058
+ },
9059
+ // CAREFUL!
9060
+ // Previewers and Inline color use hexcode and color.
9061
+ hexcode: {
9062
+ pattern: /\B#[\da-f]{3,8}\b/i,
9063
+ alias: 'color'
9064
+ },
9065
+ color: [
9066
+ {
9067
+ pattern:
9068
+ /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
9069
+ lookbehind: true
9070
+ },
9071
+ {
9072
+ pattern:
9073
+ /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
9074
+ inside: {
9075
+ unit: unit,
9076
+ number: number,
9077
+ function: /[\w-]+(?=\()/,
9078
+ punctuation: /[(),]/
9079
+ }
9080
+ }
9081
+ ],
9082
+ // it's important that there is no boundary assertion after the hex digits
9083
+ entity: /\\[\da-f]{1,8}/i,
9084
+ unit: unit,
9085
+ number: number
9086
+ });
9087
+ })(Prism);
9088
+ }
9089
+ return cssExtras_1;
8873
9090
  }
8874
9091
 
8875
- var cssExtras_1 = cssExtras;
8876
- cssExtras.displayName = 'cssExtras';
8877
- cssExtras.aliases = [];
8878
- function cssExtras(Prism) {
8879
- (function (Prism) {
8880
- var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
8881
- var selectorInside;
8882
- Prism.languages.css.selector = {
8883
- pattern: Prism.languages.css.selector.pattern,
8884
- lookbehind: true,
8885
- inside: (selectorInside = {
8886
- 'pseudo-element':
8887
- /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
8888
- 'pseudo-class': /:[-\w]+/,
8889
- class: /\.[-\w]+/,
8890
- id: /#[-\w]+/,
8891
- attribute: {
8892
- pattern: RegExp('\\[(?:[^[\\]"\']|' + string.source + ')*\\]'),
8893
- greedy: true,
8894
- inside: {
8895
- punctuation: /^\[|\]$/,
8896
- 'case-sensitivity': {
8897
- pattern: /(\s)[si]$/i,
8898
- lookbehind: true,
8899
- alias: 'keyword'
8900
- },
8901
- namespace: {
8902
- pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
8903
- lookbehind: true,
8904
- inside: {
8905
- punctuation: /\|$/
8906
- }
8907
- },
8908
- 'attr-name': {
8909
- pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
8910
- lookbehind: true
8911
- },
8912
- 'attr-value': [
8913
- string,
8914
- {
8915
- pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
8916
- lookbehind: true
8917
- }
8918
- ],
8919
- operator: /[|~*^$]?=/
8920
- }
8921
- },
8922
- 'n-th': [
8923
- {
8924
- pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
8925
- lookbehind: true,
8926
- inside: {
8927
- number: /[\dn]+/,
8928
- operator: /[+-]/
8929
- }
8930
- },
8931
- {
8932
- pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
8933
- lookbehind: true
8934
- }
8935
- ],
8936
- combinator: />|\+|~|\|\|/,
8937
- // the `tag` token has been existed and removed.
8938
- // because we can't find a perfect tokenize to match it.
8939
- // if you want to add it, please read https://github.com/PrismJS/prism/pull/2373 first.
8940
- punctuation: /[(),]/
8941
- })
8942
- };
8943
- Prism.languages.css['atrule'].inside['selector-function-argument'].inside =
8944
- selectorInside;
8945
- Prism.languages.insertBefore('css', 'property', {
8946
- variable: {
8947
- pattern:
8948
- /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
8949
- lookbehind: true
8950
- }
8951
- });
8952
- var unit = {
8953
- pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
8954
- lookbehind: true
8955
- }; // 123 -123 .123 -.123 12.3 -12.3
8956
- var number = {
8957
- pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
8958
- lookbehind: true
8959
- };
8960
- Prism.languages.insertBefore('css', 'function', {
8961
- operator: {
8962
- pattern: /(\s)[+\-*\/](?=\s)/,
8963
- lookbehind: true
8964
- },
8965
- // CAREFUL!
8966
- // Previewers and Inline color use hexcode and color.
8967
- hexcode: {
8968
- pattern: /\B#[\da-f]{3,8}\b/i,
8969
- alias: 'color'
8970
- },
8971
- color: [
8972
- {
8973
- pattern:
8974
- /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
8975
- lookbehind: true
8976
- },
8977
- {
8978
- pattern:
8979
- /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
8980
- inside: {
8981
- unit: unit,
8982
- number: number,
8983
- function: /[\w-]+(?=\()/,
8984
- punctuation: /[(),]/
8985
- }
8986
- }
8987
- ],
8988
- // it's important that there is no boundary assertion after the hex digits
8989
- entity: /\\[\da-f]{1,8}/i,
8990
- unit: unit,
8991
- number: number
8992
- });
8993
- })(Prism);
8994
- }
9092
+ var csv_1;
9093
+ var hasRequiredCsv;
8995
9094
 
8996
- var csv_1 = csv;
8997
- csv.displayName = 'csv';
8998
- csv.aliases = [];
8999
- function csv(Prism) {
9000
- // https://tools.ietf.org/html/rfc4180
9001
- Prism.languages.csv = {
9002
- value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
9003
- punctuation: /,/
9004
- };
9095
+ function requireCsv () {
9096
+ if (hasRequiredCsv) return csv_1;
9097
+ hasRequiredCsv = 1;
9098
+
9099
+ csv_1 = csv;
9100
+ csv.displayName = 'csv';
9101
+ csv.aliases = [];
9102
+ function csv(Prism) {
9103
+ // https://tools.ietf.org/html/rfc4180
9104
+ Prism.languages.csv = {
9105
+ value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
9106
+ punctuation: /,/
9107
+ };
9108
+ }
9109
+ return csv_1;
9005
9110
  }
9006
9111
 
9007
9112
  var cypher_1;
@@ -9053,90 +9158,99 @@ function requireCypher () {
9053
9158
  return cypher_1;
9054
9159
  }
9055
9160
 
9056
- var d_1 = d;
9057
- d.displayName = 'd';
9058
- d.aliases = [];
9059
- function d(Prism) {
9060
- Prism.languages.d = Prism.languages.extend('clike', {
9061
- comment: [
9062
- {
9063
- // Shebang
9064
- pattern: /^\s*#!.+/,
9065
- greedy: true
9066
- },
9067
- {
9068
- pattern: RegExp(
9069
- /(^|[^\\])/.source +
9070
- '(?:' +
9071
- [
9072
- // /+ comment +/
9073
- // Allow one level of nesting
9074
- /\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source, // // comment
9075
- /\/\/.*/.source, // /* comment */
9076
- /\/\*[\s\S]*?\*\//.source
9077
- ].join('|') +
9078
- ')'
9079
- ),
9080
- lookbehind: true,
9081
- greedy: true
9082
- }
9083
- ],
9084
- string: [
9085
- {
9086
- pattern: RegExp(
9087
- [
9088
- // r"", x""
9089
- /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source, // q"[]", q"()", q"<>", q"{}"
9090
- /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source, // q"IDENT
9091
- // ...
9092
- // IDENT"
9093
- /\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source, // q"//", q"||", etc.
9094
- // eslint-disable-next-line regexp/strict
9095
- /\bq"(.)[\s\S]*?\2"/.source, // eslint-disable-next-line regexp/strict
9096
- /(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source
9097
- ].join('|'),
9098
- 'm'
9099
- ),
9100
- greedy: true
9101
- },
9102
- {
9103
- pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/,
9104
- greedy: true,
9105
- alias: 'token-string'
9106
- }
9107
- ],
9108
- // In order: $, keywords and special tokens, globally defined symbols
9109
- keyword:
9110
- /\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,
9111
- number: [
9112
- // The lookbehind and the negative look-ahead try to prevent bad highlighting of the .. operator
9113
- // Hexadecimal numbers must be handled separately to avoid problems with exponent "e"
9114
- /\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,
9115
- {
9116
- pattern:
9117
- /((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,
9118
- lookbehind: true
9119
- }
9120
- ],
9121
- operator:
9122
- /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/
9123
- });
9124
- Prism.languages.insertBefore('d', 'string', {
9125
- // Characters
9126
- // 'a', '\\', '\n', '\xFF', '\377', '\uFFFF', '\U0010FFFF', '\quot'
9127
- char: /'(?:\\(?:\W|\w+)|[^\\])'/
9128
- });
9129
- Prism.languages.insertBefore('d', 'keyword', {
9130
- property: /\B@\w*/
9131
- });
9132
- Prism.languages.insertBefore('d', 'function', {
9133
- register: {
9134
- // Iasm registers
9135
- pattern:
9136
- /\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,
9137
- alias: 'variable'
9138
- }
9139
- });
9161
+ var d_1;
9162
+ var hasRequiredD;
9163
+
9164
+ function requireD () {
9165
+ if (hasRequiredD) return d_1;
9166
+ hasRequiredD = 1;
9167
+
9168
+ d_1 = d;
9169
+ d.displayName = 'd';
9170
+ d.aliases = [];
9171
+ function d(Prism) {
9172
+ Prism.languages.d = Prism.languages.extend('clike', {
9173
+ comment: [
9174
+ {
9175
+ // Shebang
9176
+ pattern: /^\s*#!.+/,
9177
+ greedy: true
9178
+ },
9179
+ {
9180
+ pattern: RegExp(
9181
+ /(^|[^\\])/.source +
9182
+ '(?:' +
9183
+ [
9184
+ // /+ comment +/
9185
+ // Allow one level of nesting
9186
+ /\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source, // // comment
9187
+ /\/\/.*/.source, // /* comment */
9188
+ /\/\*[\s\S]*?\*\//.source
9189
+ ].join('|') +
9190
+ ')'
9191
+ ),
9192
+ lookbehind: true,
9193
+ greedy: true
9194
+ }
9195
+ ],
9196
+ string: [
9197
+ {
9198
+ pattern: RegExp(
9199
+ [
9200
+ // r"", x""
9201
+ /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source, // q"[]", q"()", q"<>", q"{}"
9202
+ /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source, // q"IDENT
9203
+ // ...
9204
+ // IDENT"
9205
+ /\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source, // q"//", q"||", etc.
9206
+ // eslint-disable-next-line regexp/strict
9207
+ /\bq"(.)[\s\S]*?\2"/.source, // eslint-disable-next-line regexp/strict
9208
+ /(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source
9209
+ ].join('|'),
9210
+ 'm'
9211
+ ),
9212
+ greedy: true
9213
+ },
9214
+ {
9215
+ pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/,
9216
+ greedy: true,
9217
+ alias: 'token-string'
9218
+ }
9219
+ ],
9220
+ // In order: $, keywords and special tokens, globally defined symbols
9221
+ keyword:
9222
+ /\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,
9223
+ number: [
9224
+ // The lookbehind and the negative look-ahead try to prevent bad highlighting of the .. operator
9225
+ // Hexadecimal numbers must be handled separately to avoid problems with exponent "e"
9226
+ /\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,
9227
+ {
9228
+ pattern:
9229
+ /((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,
9230
+ lookbehind: true
9231
+ }
9232
+ ],
9233
+ operator:
9234
+ /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/
9235
+ });
9236
+ Prism.languages.insertBefore('d', 'string', {
9237
+ // Characters
9238
+ // 'a', '\\', '\n', '\xFF', '\377', '\uFFFF', '\U0010FFFF', '\quot'
9239
+ char: /'(?:\\(?:\W|\w+)|[^\\])'/
9240
+ });
9241
+ Prism.languages.insertBefore('d', 'keyword', {
9242
+ property: /\B@\w*/
9243
+ });
9244
+ Prism.languages.insertBefore('d', 'function', {
9245
+ register: {
9246
+ // Iasm registers
9247
+ pattern:
9248
+ /\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,
9249
+ alias: 'variable'
9250
+ }
9251
+ });
9252
+ }
9253
+ return d_1;
9140
9254
  }
9141
9255
 
9142
9256
  var dart_1;
@@ -9232,224 +9346,260 @@ function requireDart () {
9232
9346
  return dart_1;
9233
9347
  }
9234
9348
 
9235
- var dataweave_1 = dataweave;
9236
- dataweave.displayName = 'dataweave';
9237
- dataweave.aliases = [];
9238
- function dataweave(Prism) {
9349
+ var dataweave_1;
9350
+ var hasRequiredDataweave;
9351
+
9352
+ function requireDataweave () {
9353
+ if (hasRequiredDataweave) return dataweave_1;
9354
+ hasRequiredDataweave = 1;
9355
+
9356
+ dataweave_1 = dataweave;
9357
+ dataweave.displayName = 'dataweave';
9358
+ dataweave.aliases = [];
9359
+ function dataweave(Prism) {
9239
9360
  (function (Prism) {
9240
- Prism.languages.dataweave = {
9241
- url: /\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,
9242
- property: {
9243
- pattern: /(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,
9244
- greedy: true
9245
- },
9246
- string: {
9247
- pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
9248
- greedy: true
9249
- },
9250
- 'mime-type':
9251
- /\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,
9252
- date: {
9253
- pattern: /\|[\w:+-]+\|/,
9254
- greedy: true
9255
- },
9256
- comment: [
9257
- {
9258
- pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
9259
- lookbehind: true,
9260
- greedy: true
9261
- },
9262
- {
9263
- pattern: /(^|[^\\:])\/\/.*/,
9264
- lookbehind: true,
9265
- greedy: true
9266
- }
9267
- ],
9268
- regex: {
9269
- pattern: /\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,
9270
- greedy: true
9271
- },
9272
- keyword:
9273
- /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,
9274
- function: /\b[A-Z_]\w*(?=\s*\()/i,
9275
- number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
9276
- punctuation: /[{}[\];(),.:@]/,
9277
- operator: /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,
9278
- boolean: /\b(?:false|true)\b/
9279
- };
9280
- })(Prism);
9361
+ Prism.languages.dataweave = {
9362
+ url: /\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,
9363
+ property: {
9364
+ pattern: /(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,
9365
+ greedy: true
9366
+ },
9367
+ string: {
9368
+ pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
9369
+ greedy: true
9370
+ },
9371
+ 'mime-type':
9372
+ /\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,
9373
+ date: {
9374
+ pattern: /\|[\w:+-]+\|/,
9375
+ greedy: true
9376
+ },
9377
+ comment: [
9378
+ {
9379
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
9380
+ lookbehind: true,
9381
+ greedy: true
9382
+ },
9383
+ {
9384
+ pattern: /(^|[^\\:])\/\/.*/,
9385
+ lookbehind: true,
9386
+ greedy: true
9387
+ }
9388
+ ],
9389
+ regex: {
9390
+ pattern: /\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,
9391
+ greedy: true
9392
+ },
9393
+ keyword:
9394
+ /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,
9395
+ function: /\b[A-Z_]\w*(?=\s*\()/i,
9396
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
9397
+ punctuation: /[{}[\];(),.:@]/,
9398
+ operator: /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,
9399
+ boolean: /\b(?:false|true)\b/
9400
+ };
9401
+ })(Prism);
9402
+ }
9403
+ return dataweave_1;
9404
+ }
9405
+
9406
+ var dax_1;
9407
+ var hasRequiredDax;
9408
+
9409
+ function requireDax () {
9410
+ if (hasRequiredDax) return dax_1;
9411
+ hasRequiredDax = 1;
9412
+
9413
+ dax_1 = dax;
9414
+ dax.displayName = 'dax';
9415
+ dax.aliases = [];
9416
+ function dax(Prism) {
9417
+ Prism.languages.dax = {
9418
+ comment: {
9419
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,
9420
+ lookbehind: true
9421
+ },
9422
+ 'data-field': {
9423
+ pattern:
9424
+ /'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,
9425
+ alias: 'symbol'
9426
+ },
9427
+ measure: {
9428
+ pattern: /\[[ \w\xA0-\uFFFF]+\]/,
9429
+ alias: 'constant'
9430
+ },
9431
+ string: {
9432
+ pattern: /"(?:[^"]|"")*"(?!")/,
9433
+ greedy: true
9434
+ },
9435
+ function:
9436
+ /\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,
9437
+ keyword:
9438
+ /\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,
9439
+ boolean: {
9440
+ pattern: /\b(?:FALSE|NULL|TRUE)\b/i,
9441
+ alias: 'constant'
9442
+ },
9443
+ number: /\b\d+(?:\.\d*)?|\B\.\d+\b/,
9444
+ operator: /:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,
9445
+ punctuation: /[;\[\](){}`,.]/
9446
+ };
9447
+ }
9448
+ return dax_1;
9449
+ }
9450
+
9451
+ var dhall_1;
9452
+ var hasRequiredDhall;
9453
+
9454
+ function requireDhall () {
9455
+ if (hasRequiredDhall) return dhall_1;
9456
+ hasRequiredDhall = 1;
9457
+
9458
+ dhall_1 = dhall;
9459
+ dhall.displayName = 'dhall';
9460
+ dhall.aliases = [];
9461
+ function dhall(Prism) {
9462
+ // ABNF grammar:
9463
+ // https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
9464
+ Prism.languages.dhall = {
9465
+ // Multi-line comments can be nested. E.g. {- foo {- bar -} -}
9466
+ // The multi-line pattern is essentially this:
9467
+ // \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
9468
+ comment:
9469
+ /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
9470
+ string: {
9471
+ pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
9472
+ greedy: true,
9473
+ inside: {
9474
+ interpolation: {
9475
+ pattern: /\$\{[^{}]*\}/,
9476
+ inside: {
9477
+ expression: {
9478
+ pattern: /(^\$\{)[\s\S]+(?=\}$)/,
9479
+ lookbehind: true,
9480
+ alias: 'language-dhall',
9481
+ inside: null // see blow
9482
+ },
9483
+ punctuation: /\$\{|\}/
9484
+ }
9485
+ }
9486
+ }
9487
+ },
9488
+ label: {
9489
+ pattern: /`[^`]*`/,
9490
+ greedy: true
9491
+ },
9492
+ url: {
9493
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
9494
+ pattern:
9495
+ /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
9496
+ greedy: true
9497
+ },
9498
+ env: {
9499
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
9500
+ pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
9501
+ greedy: true,
9502
+ inside: {
9503
+ function: /^env/,
9504
+ operator: /^:/,
9505
+ variable: /[\s\S]+/
9506
+ }
9507
+ },
9508
+ hash: {
9509
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
9510
+ pattern: /\bsha256:[\da-fA-F]{64}\b/,
9511
+ inside: {
9512
+ function: /sha256/,
9513
+ operator: /:/,
9514
+ number: /[\da-fA-F]{64}/
9515
+ }
9516
+ },
9517
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
9518
+ keyword:
9519
+ /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
9520
+ builtin: /\b(?:None|Some)\b/,
9521
+ boolean: /\b(?:False|True)\b/,
9522
+ number:
9523
+ /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
9524
+ operator:
9525
+ /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
9526
+ punctuation: /\.\.|[{}\[\](),./]/,
9527
+ // we'll just assume that every capital word left is a type name
9528
+ 'class-name': /\b[A-Z]\w*\b/
9529
+ };
9530
+ Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
9531
+ Prism.languages.dhall;
9532
+ }
9533
+ return dhall_1;
9281
9534
  }
9282
9535
 
9283
- var dax_1 = dax;
9284
- dax.displayName = 'dax';
9285
- dax.aliases = [];
9286
- function dax(Prism) {
9287
- Prism.languages.dax = {
9288
- comment: {
9289
- pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,
9290
- lookbehind: true
9291
- },
9292
- 'data-field': {
9293
- pattern:
9294
- /'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,
9295
- alias: 'symbol'
9296
- },
9297
- measure: {
9298
- pattern: /\[[ \w\xA0-\uFFFF]+\]/,
9299
- alias: 'constant'
9300
- },
9301
- string: {
9302
- pattern: /"(?:[^"]|"")*"(?!")/,
9303
- greedy: true
9304
- },
9305
- function:
9306
- /\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,
9307
- keyword:
9308
- /\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,
9309
- boolean: {
9310
- pattern: /\b(?:FALSE|NULL|TRUE)\b/i,
9311
- alias: 'constant'
9312
- },
9313
- number: /\b\d+(?:\.\d*)?|\B\.\d+\b/,
9314
- operator: /:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,
9315
- punctuation: /[;\[\](){}`,.]/
9316
- };
9317
- }
9536
+ var diff_1;
9537
+ var hasRequiredDiff;
9318
9538
 
9319
- var dhall_1 = dhall;
9320
- dhall.displayName = 'dhall';
9321
- dhall.aliases = [];
9322
- function dhall(Prism) {
9323
- // ABNF grammar:
9324
- // https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
9325
- Prism.languages.dhall = {
9326
- // Multi-line comments can be nested. E.g. {- foo {- bar -} -}
9327
- // The multi-line pattern is essentially this:
9328
- // \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
9329
- comment:
9330
- /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
9331
- string: {
9332
- pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
9333
- greedy: true,
9334
- inside: {
9335
- interpolation: {
9336
- pattern: /\$\{[^{}]*\}/,
9337
- inside: {
9338
- expression: {
9339
- pattern: /(^\$\{)[\s\S]+(?=\}$)/,
9340
- lookbehind: true,
9341
- alias: 'language-dhall',
9342
- inside: null // see blow
9343
- },
9344
- punctuation: /\$\{|\}/
9345
- }
9346
- }
9347
- }
9348
- },
9349
- label: {
9350
- pattern: /`[^`]*`/,
9351
- greedy: true
9352
- },
9353
- url: {
9354
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
9355
- pattern:
9356
- /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
9357
- greedy: true
9358
- },
9359
- env: {
9360
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
9361
- pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
9362
- greedy: true,
9363
- inside: {
9364
- function: /^env/,
9365
- operator: /^:/,
9366
- variable: /[\s\S]+/
9367
- }
9368
- },
9369
- hash: {
9370
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
9371
- pattern: /\bsha256:[\da-fA-F]{64}\b/,
9372
- inside: {
9373
- function: /sha256/,
9374
- operator: /:/,
9375
- number: /[\da-fA-F]{64}/
9376
- }
9377
- },
9378
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
9379
- keyword:
9380
- /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
9381
- builtin: /\b(?:None|Some)\b/,
9382
- boolean: /\b(?:False|True)\b/,
9383
- number:
9384
- /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
9385
- operator:
9386
- /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
9387
- punctuation: /\.\.|[{}\[\](),./]/,
9388
- // we'll just assume that every capital word left is a type name
9389
- 'class-name': /\b[A-Z]\w*\b/
9390
- };
9391
- Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
9392
- Prism.languages.dhall;
9393
- }
9539
+ function requireDiff () {
9540
+ if (hasRequiredDiff) return diff_1;
9541
+ hasRequiredDiff = 1;
9394
9542
 
9395
- var diff_1 = diff;
9396
- diff.displayName = 'diff';
9397
- diff.aliases = [];
9398
- function diff(Prism) {
9543
+ diff_1 = diff;
9544
+ diff.displayName = 'diff';
9545
+ diff.aliases = [];
9546
+ function diff(Prism) {
9399
9547
  (function (Prism) {
9400
- Prism.languages.diff = {
9401
- coord: [
9402
- // Match all kinds of coord lines (prefixed by "+++", "---" or "***").
9403
- /^(?:\*{3}|-{3}|\+{3}).*$/m, // Match "@@ ... @@" coord lines in unified diff.
9404
- /^@@.*@@$/m, // Match coord lines in normal diff (starts with a number).
9405
- /^\d.*$/m
9406
- ] // deleted, inserted, unchanged, diff
9407
- };
9408
- /**
9409
- * A map from the name of a block to its line prefix.
9410
- *
9411
- * @type {Object<string, string>}
9412
- */
9413
- var PREFIXES = {
9414
- 'deleted-sign': '-',
9415
- 'deleted-arrow': '<',
9416
- 'inserted-sign': '+',
9417
- 'inserted-arrow': '>',
9418
- unchanged: ' ',
9419
- diff: '!'
9420
- }; // add a token for each prefix
9421
- Object.keys(PREFIXES).forEach(function (name) {
9422
- var prefix = PREFIXES[name];
9423
- var alias = [];
9424
- if (!/^\w+$/.test(name)) {
9425
- // "deleted-sign" -> "deleted"
9426
- alias.push(/\w+/.exec(name)[0]);
9427
- }
9428
- if (name === 'diff') {
9429
- alias.push('bold');
9430
- }
9431
- Prism.languages.diff[name] = {
9432
- pattern: RegExp(
9433
- '^(?:[' + prefix + '].*(?:\r\n?|\n|(?![\\s\\S])))+',
9434
- 'm'
9435
- ),
9436
- alias: alias,
9437
- inside: {
9438
- line: {
9439
- pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/,
9440
- lookbehind: true
9441
- },
9442
- prefix: {
9443
- pattern: /[\s\S]/,
9444
- alias: /\w+/.exec(name)[0]
9445
- }
9446
- }
9447
- };
9448
- }); // make prefixes available to Diff plugin
9449
- Object.defineProperty(Prism.languages.diff, 'PREFIXES', {
9450
- value: PREFIXES
9451
- });
9452
- })(Prism);
9548
+ Prism.languages.diff = {
9549
+ coord: [
9550
+ // Match all kinds of coord lines (prefixed by "+++", "---" or "***").
9551
+ /^(?:\*{3}|-{3}|\+{3}).*$/m, // Match "@@ ... @@" coord lines in unified diff.
9552
+ /^@@.*@@$/m, // Match coord lines in normal diff (starts with a number).
9553
+ /^\d.*$/m
9554
+ ] // deleted, inserted, unchanged, diff
9555
+ };
9556
+ /**
9557
+ * A map from the name of a block to its line prefix.
9558
+ *
9559
+ * @type {Object<string, string>}
9560
+ */
9561
+ var PREFIXES = {
9562
+ 'deleted-sign': '-',
9563
+ 'deleted-arrow': '<',
9564
+ 'inserted-sign': '+',
9565
+ 'inserted-arrow': '>',
9566
+ unchanged: ' ',
9567
+ diff: '!'
9568
+ }; // add a token for each prefix
9569
+ Object.keys(PREFIXES).forEach(function (name) {
9570
+ var prefix = PREFIXES[name];
9571
+ var alias = [];
9572
+ if (!/^\w+$/.test(name)) {
9573
+ // "deleted-sign" -> "deleted"
9574
+ alias.push(/\w+/.exec(name)[0]);
9575
+ }
9576
+ if (name === 'diff') {
9577
+ alias.push('bold');
9578
+ }
9579
+ Prism.languages.diff[name] = {
9580
+ pattern: RegExp(
9581
+ '^(?:[' + prefix + '].*(?:\r\n?|\n|(?![\\s\\S])))+',
9582
+ 'm'
9583
+ ),
9584
+ alias: alias,
9585
+ inside: {
9586
+ line: {
9587
+ pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/,
9588
+ lookbehind: true
9589
+ },
9590
+ prefix: {
9591
+ pattern: /[\s\S]/,
9592
+ alias: /\w+/.exec(name)[0]
9593
+ }
9594
+ }
9595
+ };
9596
+ }); // make prefixes available to Diff plugin
9597
+ Object.defineProperty(Prism.languages.diff, 'PREFIXES', {
9598
+ value: PREFIXES
9599
+ });
9600
+ })(Prism);
9601
+ }
9602
+ return diff_1;
9453
9603
  }
9454
9604
 
9455
9605
  var markupTemplating_1;
@@ -9564,335 +9714,362 @@ function requireMarkupTemplating () {
9564
9714
  token.content = replacement;
9565
9715
  }
9566
9716
  }
9567
- } else if (
9568
- token.content
9569
- /* && typeof token.content !== 'string' */
9570
- ) {
9571
- walkTokens(token.content);
9572
- }
9717
+ } else if (
9718
+ token.content
9719
+ /* && typeof token.content !== 'string' */
9720
+ ) {
9721
+ walkTokens(token.content);
9722
+ }
9723
+ }
9724
+ return tokens
9725
+ }
9726
+ walkTokens(env.tokens);
9727
+ }
9728
+ }
9729
+ });
9730
+ })(Prism);
9731
+ }
9732
+ return markupTemplating_1;
9733
+ }
9734
+
9735
+ var django_1;
9736
+ var hasRequiredDjango;
9737
+
9738
+ function requireDjango () {
9739
+ if (hasRequiredDjango) return django_1;
9740
+ hasRequiredDjango = 1;
9741
+ var refractorMarkupTemplating = requireMarkupTemplating();
9742
+ django_1 = django;
9743
+ django.displayName = 'django';
9744
+ django.aliases = ['jinja2'];
9745
+ function django(Prism) {
9746
+ Prism.register(refractorMarkupTemplating)
9747
+ // Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
9748
+ // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
9749
+ ;(function (Prism) {
9750
+ Prism.languages.django = {
9751
+ comment: /^\{#[\s\S]*?#\}$/,
9752
+ tag: {
9753
+ pattern: /(^\{%[+-]?\s*)\w+/,
9754
+ lookbehind: true,
9755
+ alias: 'keyword'
9756
+ },
9757
+ delimiter: {
9758
+ pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
9759
+ alias: 'punctuation'
9760
+ },
9761
+ string: {
9762
+ pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
9763
+ greedy: true
9764
+ },
9765
+ filter: {
9766
+ pattern: /(\|)\w+/,
9767
+ lookbehind: true,
9768
+ alias: 'function'
9769
+ },
9770
+ test: {
9771
+ pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
9772
+ lookbehind: true,
9773
+ alias: 'function'
9774
+ },
9775
+ function: /\b[a-z_]\w+(?=\s*\()/i,
9776
+ keyword:
9777
+ /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
9778
+ operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
9779
+ number: /\b\d+(?:\.\d+)?\b/,
9780
+ boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
9781
+ variable: /\b\w+\b/,
9782
+ punctuation: /[{}[\](),.:;]/
9783
+ };
9784
+ var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
9785
+ var markupTemplating = Prism.languages['markup-templating'];
9786
+ Prism.hooks.add('before-tokenize', function (env) {
9787
+ markupTemplating.buildPlaceholders(env, 'django', pattern);
9788
+ });
9789
+ Prism.hooks.add('after-tokenize', function (env) {
9790
+ markupTemplating.tokenizePlaceholders(env, 'django');
9791
+ }); // Add an Jinja2 alias
9792
+ Prism.languages.jinja2 = Prism.languages.django;
9793
+ Prism.hooks.add('before-tokenize', function (env) {
9794
+ markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
9795
+ });
9796
+ Prism.hooks.add('after-tokenize', function (env) {
9797
+ markupTemplating.tokenizePlaceholders(env, 'jinja2');
9798
+ });
9799
+ })(Prism);
9800
+ }
9801
+ return django_1;
9802
+ }
9803
+
9804
+ var dnsZoneFile_1;
9805
+ var hasRequiredDnsZoneFile;
9806
+
9807
+ function requireDnsZoneFile () {
9808
+ if (hasRequiredDnsZoneFile) return dnsZoneFile_1;
9809
+ hasRequiredDnsZoneFile = 1;
9810
+
9811
+ dnsZoneFile_1 = dnsZoneFile;
9812
+ dnsZoneFile.displayName = 'dnsZoneFile';
9813
+ dnsZoneFile.aliases = [];
9814
+ function dnsZoneFile(Prism) {
9815
+ Prism.languages['dns-zone-file'] = {
9816
+ comment: /;.*/,
9817
+ string: {
9818
+ pattern: /"(?:\\.|[^"\\\r\n])*"/,
9819
+ greedy: true
9820
+ },
9821
+ variable: [
9822
+ {
9823
+ pattern: /(^\$ORIGIN[ \t]+)\S+/m,
9824
+ lookbehind: true
9825
+ },
9826
+ {
9827
+ pattern: /(^|\s)@(?=\s|$)/,
9828
+ lookbehind: true
9829
+ }
9830
+ ],
9831
+ keyword: /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,
9832
+ class: {
9833
+ // https://tools.ietf.org/html/rfc1035#page-13
9834
+ pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,
9835
+ lookbehind: true,
9836
+ alias: 'keyword'
9837
+ },
9838
+ type: {
9839
+ // https://en.wikipedia.org/wiki/List_of_DNS_record_types
9840
+ pattern:
9841
+ /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,
9842
+ lookbehind: true,
9843
+ alias: 'keyword'
9844
+ },
9845
+ punctuation: /[()]/
9846
+ };
9847
+ Prism.languages['dns-zone'] = Prism.languages['dns-zone-file'];
9848
+ }
9849
+ return dnsZoneFile_1;
9850
+ }
9851
+
9852
+ var docker_1;
9853
+ var hasRequiredDocker;
9854
+
9855
+ function requireDocker () {
9856
+ if (hasRequiredDocker) return docker_1;
9857
+ hasRequiredDocker = 1;
9858
+
9859
+ docker_1 = docker;
9860
+ docker.displayName = 'docker';
9861
+ docker.aliases = ['dockerfile'];
9862
+ function docker(Prism) {
9863
+ (function (Prism) {
9864
+ // Many of the following regexes will contain negated lookaheads like `[ \t]+(?![ \t])`. This is a trick to ensure
9865
+ // that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking.
9866
+ var spaceAfterBackSlash =
9867
+ /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source; // At least one space, comment, or line break
9868
+ var space = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(
9869
+ /<SP_BS>/g,
9870
+ function () {
9871
+ return spaceAfterBackSlash
9872
+ }
9873
+ );
9874
+ var string =
9875
+ /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/
9876
+ .source;
9877
+ var option = /--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(
9878
+ /<STR>/g,
9879
+ function () {
9880
+ return string
9881
+ }
9882
+ );
9883
+ var stringRule = {
9884
+ pattern: RegExp(string),
9885
+ greedy: true
9886
+ };
9887
+ var commentRule = {
9888
+ pattern: /(^[ \t]*)#.*/m,
9889
+ lookbehind: true,
9890
+ greedy: true
9891
+ };
9892
+ /**
9893
+ * @param {string} source
9894
+ * @param {string} flags
9895
+ * @returns {RegExp}
9896
+ */
9897
+ function re(source, flags) {
9898
+ source = source
9899
+ .replace(/<OPT>/g, function () {
9900
+ return option
9901
+ })
9902
+ .replace(/<SP>/g, function () {
9903
+ return space
9904
+ });
9905
+ return RegExp(source, flags)
9906
+ }
9907
+ Prism.languages.docker = {
9908
+ instruction: {
9909
+ pattern:
9910
+ /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
9911
+ lookbehind: true,
9912
+ greedy: true,
9913
+ inside: {
9914
+ options: {
9915
+ pattern: re(
9916
+ /(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,
9917
+ 'i'
9918
+ ),
9919
+ lookbehind: true,
9920
+ greedy: true,
9921
+ inside: {
9922
+ property: {
9923
+ pattern: /(^|\s)--[\w-]+/,
9924
+ lookbehind: true
9925
+ },
9926
+ string: [
9927
+ stringRule,
9928
+ {
9929
+ pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/,
9930
+ lookbehind: true
9931
+ }
9932
+ ],
9933
+ operator: /\\$/m,
9934
+ punctuation: /=/
9573
9935
  }
9574
- return tokens
9575
- }
9576
- walkTokens(env.tokens);
9936
+ },
9937
+ keyword: [
9938
+ {
9939
+ // https://docs.docker.com/engine/reference/builder/#healthcheck
9940
+ pattern: re(
9941
+ /(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/
9942
+ .source,
9943
+ 'i'
9944
+ ),
9945
+ lookbehind: true,
9946
+ greedy: true
9947
+ },
9948
+ {
9949
+ // https://docs.docker.com/engine/reference/builder/#from
9950
+ pattern: re(
9951
+ /(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/
9952
+ .source,
9953
+ 'i'
9954
+ ),
9955
+ lookbehind: true,
9956
+ greedy: true
9957
+ },
9958
+ {
9959
+ // https://docs.docker.com/engine/reference/builder/#onbuild
9960
+ pattern: re(/(^ONBUILD<SP>)\w+/.source, 'i'),
9961
+ lookbehind: true,
9962
+ greedy: true
9963
+ },
9964
+ {
9965
+ pattern: /^\w+/,
9966
+ greedy: true
9967
+ }
9968
+ ],
9969
+ comment: commentRule,
9970
+ string: stringRule,
9971
+ variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
9972
+ operator: /\\$/m
9577
9973
  }
9578
- }
9579
- });
9974
+ },
9975
+ comment: commentRule
9976
+ };
9977
+ Prism.languages.dockerfile = Prism.languages.docker;
9580
9978
  })(Prism);
9581
9979
  }
9582
- return markupTemplating_1;
9980
+ return docker_1;
9583
9981
  }
9584
9982
 
9585
- var django_1;
9586
- var hasRequiredDjango;
9983
+ var dot_1;
9984
+ var hasRequiredDot;
9587
9985
 
9588
- function requireDjango () {
9589
- if (hasRequiredDjango) return django_1;
9590
- hasRequiredDjango = 1;
9591
- var refractorMarkupTemplating = requireMarkupTemplating();
9592
- django_1 = django;
9593
- django.displayName = 'django';
9594
- django.aliases = ['jinja2'];
9595
- function django(Prism) {
9596
- Prism.register(refractorMarkupTemplating)
9597
- // Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
9598
- // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
9599
- ;(function (Prism) {
9600
- Prism.languages.django = {
9601
- comment: /^\{#[\s\S]*?#\}$/,
9602
- tag: {
9603
- pattern: /(^\{%[+-]?\s*)\w+/,
9986
+ function requireDot () {
9987
+ if (hasRequiredDot) return dot_1;
9988
+ hasRequiredDot = 1;
9989
+
9990
+ dot_1 = dot;
9991
+ dot.displayName = 'dot';
9992
+ dot.aliases = ['gv'];
9993
+ function dot(Prism) {
9994
+ (function (Prism) {
9995
+ var ID =
9996
+ '(?:' +
9997
+ [
9998
+ // an identifier
9999
+ /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, // a number
10000
+ /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, // a double-quoted string
10001
+ /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, // HTML-like string
10002
+ /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/
10003
+ .source
10004
+ ].join('|') +
10005
+ ')';
10006
+ var IDInside = {
10007
+ markup: {
10008
+ pattern: /(^<)[\s\S]+(?=>$)/,
9604
10009
  lookbehind: true,
9605
- alias: 'keyword'
10010
+ alias: ['language-markup', 'language-html', 'language-xml'],
10011
+ inside: Prism.languages.markup
10012
+ }
10013
+ };
10014
+ /**
10015
+ * @param {string} source
10016
+ * @param {string} flags
10017
+ * @returns {RegExp}
10018
+ */
10019
+ function withID(source, flags) {
10020
+ return RegExp(
10021
+ source.replace(/<ID>/g, function () {
10022
+ return ID
10023
+ }),
10024
+ flags
10025
+ )
10026
+ }
10027
+ Prism.languages.dot = {
10028
+ comment: {
10029
+ pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
10030
+ greedy: true
9606
10031
  },
9607
- delimiter: {
9608
- pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
9609
- alias: 'punctuation'
10032
+ 'graph-name': {
10033
+ pattern: withID(
10034
+ /(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,
10035
+ 'i'
10036
+ ),
10037
+ lookbehind: true,
10038
+ greedy: true,
10039
+ alias: 'class-name',
10040
+ inside: IDInside
9610
10041
  },
9611
- string: {
9612
- pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
9613
- greedy: true
10042
+ 'attr-value': {
10043
+ pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
10044
+ lookbehind: true,
10045
+ greedy: true,
10046
+ inside: IDInside
9614
10047
  },
9615
- filter: {
9616
- pattern: /(\|)\w+/,
10048
+ 'attr-name': {
10049
+ pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
9617
10050
  lookbehind: true,
9618
- alias: 'function'
10051
+ greedy: true,
10052
+ inside: IDInside
9619
10053
  },
9620
- test: {
9621
- pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
10054
+ keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
10055
+ 'compass-point': {
10056
+ pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
9622
10057
  lookbehind: true,
9623
- alias: 'function'
10058
+ alias: 'builtin'
9624
10059
  },
9625
- function: /\b[a-z_]\w+(?=\s*\()/i,
9626
- keyword:
9627
- /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
9628
- operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
9629
- number: /\b\d+(?:\.\d+)?\b/,
9630
- boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
9631
- variable: /\b\w+\b/,
9632
- punctuation: /[{}[\](),.:;]/
10060
+ node: {
10061
+ pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
10062
+ lookbehind: true,
10063
+ greedy: true,
10064
+ inside: IDInside
10065
+ },
10066
+ operator: /[=:]|-[->]/,
10067
+ punctuation: /[\[\]{};,]/
9633
10068
  };
9634
- var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
9635
- var markupTemplating = Prism.languages['markup-templating'];
9636
- Prism.hooks.add('before-tokenize', function (env) {
9637
- markupTemplating.buildPlaceholders(env, 'django', pattern);
9638
- });
9639
- Prism.hooks.add('after-tokenize', function (env) {
9640
- markupTemplating.tokenizePlaceholders(env, 'django');
9641
- }); // Add an Jinja2 alias
9642
- Prism.languages.jinja2 = Prism.languages.django;
9643
- Prism.hooks.add('before-tokenize', function (env) {
9644
- markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
9645
- });
9646
- Prism.hooks.add('after-tokenize', function (env) {
9647
- markupTemplating.tokenizePlaceholders(env, 'jinja2');
9648
- });
10069
+ Prism.languages.gv = Prism.languages.dot;
9649
10070
  })(Prism);
9650
10071
  }
9651
- return django_1;
9652
- }
9653
-
9654
- var dnsZoneFile_1 = dnsZoneFile;
9655
- dnsZoneFile.displayName = 'dnsZoneFile';
9656
- dnsZoneFile.aliases = [];
9657
- function dnsZoneFile(Prism) {
9658
- Prism.languages['dns-zone-file'] = {
9659
- comment: /;.*/,
9660
- string: {
9661
- pattern: /"(?:\\.|[^"\\\r\n])*"/,
9662
- greedy: true
9663
- },
9664
- variable: [
9665
- {
9666
- pattern: /(^\$ORIGIN[ \t]+)\S+/m,
9667
- lookbehind: true
9668
- },
9669
- {
9670
- pattern: /(^|\s)@(?=\s|$)/,
9671
- lookbehind: true
9672
- }
9673
- ],
9674
- keyword: /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,
9675
- class: {
9676
- // https://tools.ietf.org/html/rfc1035#page-13
9677
- pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,
9678
- lookbehind: true,
9679
- alias: 'keyword'
9680
- },
9681
- type: {
9682
- // https://en.wikipedia.org/wiki/List_of_DNS_record_types
9683
- pattern:
9684
- /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,
9685
- lookbehind: true,
9686
- alias: 'keyword'
9687
- },
9688
- punctuation: /[()]/
9689
- };
9690
- Prism.languages['dns-zone'] = Prism.languages['dns-zone-file'];
9691
- }
9692
-
9693
- var docker_1 = docker;
9694
- docker.displayName = 'docker';
9695
- docker.aliases = ['dockerfile'];
9696
- function docker(Prism) {
9697
- (function (Prism) {
9698
- // Many of the following regexes will contain negated lookaheads like `[ \t]+(?![ \t])`. This is a trick to ensure
9699
- // that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking.
9700
- var spaceAfterBackSlash =
9701
- /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source; // At least one space, comment, or line break
9702
- var space = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(
9703
- /<SP_BS>/g,
9704
- function () {
9705
- return spaceAfterBackSlash
9706
- }
9707
- );
9708
- var string =
9709
- /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/
9710
- .source;
9711
- var option = /--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(
9712
- /<STR>/g,
9713
- function () {
9714
- return string
9715
- }
9716
- );
9717
- var stringRule = {
9718
- pattern: RegExp(string),
9719
- greedy: true
9720
- };
9721
- var commentRule = {
9722
- pattern: /(^[ \t]*)#.*/m,
9723
- lookbehind: true,
9724
- greedy: true
9725
- };
9726
- /**
9727
- * @param {string} source
9728
- * @param {string} flags
9729
- * @returns {RegExp}
9730
- */
9731
- function re(source, flags) {
9732
- source = source
9733
- .replace(/<OPT>/g, function () {
9734
- return option
9735
- })
9736
- .replace(/<SP>/g, function () {
9737
- return space
9738
- });
9739
- return RegExp(source, flags)
9740
- }
9741
- Prism.languages.docker = {
9742
- instruction: {
9743
- pattern:
9744
- /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
9745
- lookbehind: true,
9746
- greedy: true,
9747
- inside: {
9748
- options: {
9749
- pattern: re(
9750
- /(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,
9751
- 'i'
9752
- ),
9753
- lookbehind: true,
9754
- greedy: true,
9755
- inside: {
9756
- property: {
9757
- pattern: /(^|\s)--[\w-]+/,
9758
- lookbehind: true
9759
- },
9760
- string: [
9761
- stringRule,
9762
- {
9763
- pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/,
9764
- lookbehind: true
9765
- }
9766
- ],
9767
- operator: /\\$/m,
9768
- punctuation: /=/
9769
- }
9770
- },
9771
- keyword: [
9772
- {
9773
- // https://docs.docker.com/engine/reference/builder/#healthcheck
9774
- pattern: re(
9775
- /(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/
9776
- .source,
9777
- 'i'
9778
- ),
9779
- lookbehind: true,
9780
- greedy: true
9781
- },
9782
- {
9783
- // https://docs.docker.com/engine/reference/builder/#from
9784
- pattern: re(
9785
- /(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/
9786
- .source,
9787
- 'i'
9788
- ),
9789
- lookbehind: true,
9790
- greedy: true
9791
- },
9792
- {
9793
- // https://docs.docker.com/engine/reference/builder/#onbuild
9794
- pattern: re(/(^ONBUILD<SP>)\w+/.source, 'i'),
9795
- lookbehind: true,
9796
- greedy: true
9797
- },
9798
- {
9799
- pattern: /^\w+/,
9800
- greedy: true
9801
- }
9802
- ],
9803
- comment: commentRule,
9804
- string: stringRule,
9805
- variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
9806
- operator: /\\$/m
9807
- }
9808
- },
9809
- comment: commentRule
9810
- };
9811
- Prism.languages.dockerfile = Prism.languages.docker;
9812
- })(Prism);
9813
- }
9814
-
9815
- var dot_1 = dot;
9816
- dot.displayName = 'dot';
9817
- dot.aliases = ['gv'];
9818
- function dot(Prism) {
9819
- (function (Prism) {
9820
- var ID =
9821
- '(?:' +
9822
- [
9823
- // an identifier
9824
- /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, // a number
9825
- /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, // a double-quoted string
9826
- /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, // HTML-like string
9827
- /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/
9828
- .source
9829
- ].join('|') +
9830
- ')';
9831
- var IDInside = {
9832
- markup: {
9833
- pattern: /(^<)[\s\S]+(?=>$)/,
9834
- lookbehind: true,
9835
- alias: ['language-markup', 'language-html', 'language-xml'],
9836
- inside: Prism.languages.markup
9837
- }
9838
- };
9839
- /**
9840
- * @param {string} source
9841
- * @param {string} flags
9842
- * @returns {RegExp}
9843
- */
9844
- function withID(source, flags) {
9845
- return RegExp(
9846
- source.replace(/<ID>/g, function () {
9847
- return ID
9848
- }),
9849
- flags
9850
- )
9851
- }
9852
- Prism.languages.dot = {
9853
- comment: {
9854
- pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
9855
- greedy: true
9856
- },
9857
- 'graph-name': {
9858
- pattern: withID(
9859
- /(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,
9860
- 'i'
9861
- ),
9862
- lookbehind: true,
9863
- greedy: true,
9864
- alias: 'class-name',
9865
- inside: IDInside
9866
- },
9867
- 'attr-value': {
9868
- pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
9869
- lookbehind: true,
9870
- greedy: true,
9871
- inside: IDInside
9872
- },
9873
- 'attr-name': {
9874
- pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
9875
- lookbehind: true,
9876
- greedy: true,
9877
- inside: IDInside
9878
- },
9879
- keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
9880
- 'compass-point': {
9881
- pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
9882
- lookbehind: true,
9883
- alias: 'builtin'
9884
- },
9885
- node: {
9886
- pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
9887
- lookbehind: true,
9888
- greedy: true,
9889
- inside: IDInside
9890
- },
9891
- operator: /[=:]|-[->]/,
9892
- punctuation: /[\[\]{};,]/
9893
- };
9894
- Prism.languages.gv = Prism.languages.dot;
9895
- })(Prism);
10072
+ return dot_1;
9896
10073
  }
9897
10074
 
9898
10075
  var ebnf_1;
@@ -9930,37 +10107,46 @@ function requireEbnf () {
9930
10107
  return ebnf_1;
9931
10108
  }
9932
10109
 
9933
- var editorconfig_1 = editorconfig;
9934
- editorconfig.displayName = 'editorconfig';
9935
- editorconfig.aliases = [];
9936
- function editorconfig(Prism) {
9937
- Prism.languages.editorconfig = {
9938
- // https://editorconfig-specification.readthedocs.io
9939
- comment: /[;#].*/,
9940
- section: {
9941
- pattern: /(^[ \t]*)\[.+\]/m,
9942
- lookbehind: true,
9943
- alias: 'selector',
9944
- inside: {
9945
- regex: /\\\\[\[\]{},!?.*]/,
9946
- // Escape special characters with '\\'
9947
- operator: /[!?]|\.\.|\*{1,2}/,
9948
- punctuation: /[\[\]{},]/
9949
- }
9950
- },
9951
- key: {
9952
- pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
9953
- lookbehind: true,
9954
- alias: 'attr-name'
9955
- },
9956
- value: {
9957
- pattern: /=.*/,
9958
- alias: 'attr-value',
9959
- inside: {
9960
- punctuation: /^=/
9961
- }
9962
- }
9963
- };
10110
+ var editorconfig_1;
10111
+ var hasRequiredEditorconfig;
10112
+
10113
+ function requireEditorconfig () {
10114
+ if (hasRequiredEditorconfig) return editorconfig_1;
10115
+ hasRequiredEditorconfig = 1;
10116
+
10117
+ editorconfig_1 = editorconfig;
10118
+ editorconfig.displayName = 'editorconfig';
10119
+ editorconfig.aliases = [];
10120
+ function editorconfig(Prism) {
10121
+ Prism.languages.editorconfig = {
10122
+ // https://editorconfig-specification.readthedocs.io
10123
+ comment: /[;#].*/,
10124
+ section: {
10125
+ pattern: /(^[ \t]*)\[.+\]/m,
10126
+ lookbehind: true,
10127
+ alias: 'selector',
10128
+ inside: {
10129
+ regex: /\\\\[\[\]{},!?.*]/,
10130
+ // Escape special characters with '\\'
10131
+ operator: /[!?]|\.\.|\*{1,2}/,
10132
+ punctuation: /[\[\]{},]/
10133
+ }
10134
+ },
10135
+ key: {
10136
+ pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
10137
+ lookbehind: true,
10138
+ alias: 'attr-name'
10139
+ },
10140
+ value: {
10141
+ pattern: /=.*/,
10142
+ alias: 'attr-value',
10143
+ inside: {
10144
+ punctuation: /^=/
10145
+ }
10146
+ }
10147
+ };
10148
+ }
10149
+ return editorconfig_1;
9964
10150
  }
9965
10151
 
9966
10152
  var eiffel_1;
@@ -10237,7 +10423,7 @@ var hasRequiredErb;
10237
10423
  function requireErb () {
10238
10424
  if (hasRequiredErb) return erb_1;
10239
10425
  hasRequiredErb = 1;
10240
- var refractorRuby = ruby_1;
10426
+ var refractorRuby = requireRuby();
10241
10427
  var refractorMarkupTemplating = requireMarkupTemplating();
10242
10428
  erb_1 = erb;
10243
10429
  erb.displayName = 'erb';
@@ -12719,7 +12905,7 @@ var hasRequiredHaml;
12719
12905
  function requireHaml () {
12720
12906
  if (hasRequiredHaml) return haml_1;
12721
12907
  hasRequiredHaml = 1;
12722
- var refractorRuby = ruby_1;
12908
+ var refractorRuby = requireRuby();
12723
12909
  haml_1 = haml;
12724
12910
  haml.displayName = 'haml';
12725
12911
  haml.aliases = [];
@@ -25155,7 +25341,7 @@ function requireT4Cs () {
25155
25341
  if (hasRequiredT4Cs) return t4Cs_1;
25156
25342
  hasRequiredT4Cs = 1;
25157
25343
  var refractorT4Templating = requireT4Templating();
25158
- var refractorCsharp = csharp_1;
25344
+ var refractorCsharp = requireCsharp();
25159
25345
  t4Cs_1 = t4Cs;
25160
25346
  t4Cs.displayName = 't4Cs';
25161
25347
  t4Cs.aliases = [];
@@ -27913,7 +28099,7 @@ refractor.register(aspnet_1);
27913
28099
  refractor.register(autohotkey_1);
27914
28100
  refractor.register(autoit_1);
27915
28101
  refractor.register(avisynth_1);
27916
- refractor.register(avroIdl_1);
28102
+ refractor.register(requireAvroIdl());
27917
28103
  refractor.register(bash_1);
27918
28104
  refractor.register(basic_1);
27919
28105
  refractor.register(batch_1);
@@ -27922,7 +28108,7 @@ refractor.register(bicep_1);
27922
28108
  refractor.register(birb_1);
27923
28109
  refractor.register(bison_1);
27924
28110
  refractor.register(bnf_1);
27925
- refractor.register(brainfuck_1);
28111
+ refractor.register(requireBrainfuck());
27926
28112
  refractor.register(brightscript_1);
27927
28113
  refractor.register(bro_1);
27928
28114
  refractor.register(bsl_1);
@@ -27934,28 +28120,28 @@ refractor.register(clojure_1);
27934
28120
  refractor.register(cmake_1);
27935
28121
  refractor.register(cobol_1);
27936
28122
  refractor.register(coffeescript_1);
27937
- refractor.register(concurnas_1);
27938
- refractor.register(coq_1);
27939
- refractor.register(cpp_1);
27940
- refractor.register(crystal_1);
27941
- refractor.register(csharp_1);
27942
- refractor.register(cshtml_1);
27943
- refractor.register(csp_1);
27944
- refractor.register(cssExtras_1);
27945
- refractor.register(csv_1);
28123
+ refractor.register(requireConcurnas());
28124
+ refractor.register(requireCoq());
28125
+ refractor.register(requireCpp());
28126
+ refractor.register(requireCrystal());
28127
+ refractor.register(requireCsharp());
28128
+ refractor.register(requireCshtml());
28129
+ refractor.register(requireCsp());
28130
+ refractor.register(requireCssExtras());
28131
+ refractor.register(requireCsv());
27946
28132
  refractor.register(requireCypher());
27947
- refractor.register(d_1);
28133
+ refractor.register(requireD());
27948
28134
  refractor.register(requireDart());
27949
- refractor.register(dataweave_1);
27950
- refractor.register(dax_1);
27951
- refractor.register(dhall_1);
27952
- refractor.register(diff_1);
28135
+ refractor.register(requireDataweave());
28136
+ refractor.register(requireDax());
28137
+ refractor.register(requireDhall());
28138
+ refractor.register(requireDiff());
27953
28139
  refractor.register(requireDjango());
27954
- refractor.register(dnsZoneFile_1);
27955
- refractor.register(docker_1);
27956
- refractor.register(dot_1);
28140
+ refractor.register(requireDnsZoneFile());
28141
+ refractor.register(requireDocker());
28142
+ refractor.register(requireDot());
27957
28143
  refractor.register(requireEbnf());
27958
- refractor.register(editorconfig_1);
28144
+ refractor.register(requireEditorconfig());
27959
28145
  refractor.register(requireEiffel());
27960
28146
  refractor.register(requireEjs());
27961
28147
  refractor.register(requireElixir());
@@ -28103,7 +28289,7 @@ refractor.register(requireRest());
28103
28289
  refractor.register(requireRip());
28104
28290
  refractor.register(requireRoboconf());
28105
28291
  refractor.register(requireRobotframework());
28106
- refractor.register(ruby_1);
28292
+ refractor.register(requireRuby());
28107
28293
  refractor.register(requireRust());
28108
28294
  refractor.register(requireSas());
28109
28295
  refractor.register(requireSass());
@@ -38930,10 +39116,34 @@ function remarkThinkUpdate(content) {
38930
39116
  */
38931
39117
  function escapeContentForStream(content) {
38932
39118
  if (typeof content !== 'string') return content;
38933
- return content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/{/g, '&#123;').replace(/}/g, '&#125;');
39119
+ // 匹配代码块的正则表达式
39120
+ var codeBlockRegex = /(```[\s\S]*?```|`[^`]*`)/g;
39121
+ // 分割内容为代码块和非代码块部分
39122
+ var parts = content.split(codeBlockRegex);
39123
+ // 对非代码块部分进行转义,保留代码块部分不变
39124
+ return parts.map(function (part, index) {
39125
+ // 奇数索引为代码块部分(根据split的特性)
39126
+ if (index % 2 === 1) {
39127
+ return part; // 代码块部分不转义
39128
+ }
39129
+ // 偶数索引为非代码块部分,进行转义
39130
+ return part.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/{/g, '&#123;').replace(/}/g, '&#125;');
39131
+ }).join('');
38934
39132
  }
38935
39133
 
38936
39134
  var renderTimer = null;
39135
+ /**
39136
+ * 预处理 MDX 内容,转义可能被误认为 HTML 标签的内容
39137
+ * @param content MDX 内容
39138
+ * @returns 处理后的内容
39139
+ */
39140
+ function preprocessMdxContent(content) {
39141
+ // 匹配可能被误认为 HTML 标签的模式,如 <数字、<字母但不是真正的组件标签
39142
+ // 真正的 React 组件标签应该以大写字母开头,如 <Component>
39143
+ // HTML 标签以小写字母开头,如 <div>
39144
+ // 需要排除正常的闭合标签 </Component>
39145
+ return content.replace(/<(?!\/|[A-Z][a-zA-Z]*\b|[a-z][a-zA-Z0-9]*\b)/g, '&lt;');
39146
+ }
38937
39147
  // 辅助函数:格式化props
38938
39148
  function formatProps(props) {
38939
39149
  return Object.entries(props).map(function (_a) {
@@ -38953,7 +39163,7 @@ function formatProps(props) {
38953
39163
  }
38954
39164
  function renderMdx(mdxContent, scope, registeredComponents) {
38955
39165
  return __awaiter(this, void 0, void 0, function () {
38956
- var componentTagRegex, usedComponents, match, vf, XComponent;
39166
+ var componentTagRegex, usedComponents, match, processedContent, vf, XComponent, e_1;
38957
39167
  return __generator(this, function (_a) {
38958
39168
  switch (_a.label) {
38959
39169
  case 0:
@@ -38965,7 +39175,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
38965
39175
  while ((match = componentTagRegex.exec(mdxContent)) !== null) {
38966
39176
  usedComponents.add(match[1]);
38967
39177
  }
38968
- return [4 /*yield*/, compile(mdxContent, {
39178
+ processedContent = preprocessMdxContent(mdxContent);
39179
+ return [4 /*yield*/, compile(processedContent, {
38969
39180
  outputFormat: "function-body",
38970
39181
  remarkPlugins: [[RemarkMath, {
38971
39182
  strict: true
@@ -38988,7 +39199,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
38988
39199
  scope: scope
38989
39200
  })];
38990
39201
  case 3:
38991
- _a.sent();
39202
+ e_1 = _a.sent();
39203
+ console.log(e_1, 'e');
38992
39204
  return [2 /*return*/, new Promise(function (resolve) {
38993
39205
  renderTimer = setTimeout(function () {
38994
39206
  resolve(/*#__PURE__*/React.createElement('div', {