latex-stickies 1.0.0

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.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/bin/latex-stickies.js +36 -0
  4. package/build/icon.icns +0 -0
  5. package/build/icon.png +0 -0
  6. package/package.json +76 -0
  7. package/src/main.js +308 -0
  8. package/src/preload.js +27 -0
  9. package/src/renderer/editor.js +201 -0
  10. package/src/renderer/markdown.js +154 -0
  11. package/src/renderer/note.css +288 -0
  12. package/src/renderer/note.html +34 -0
  13. package/src/renderer/note.js +210 -0
  14. package/src/renderer/vendor/fonts/KaTeX_AMS-Regular.ttf +0 -0
  15. package/src/renderer/vendor/fonts/KaTeX_AMS-Regular.woff +0 -0
  16. package/src/renderer/vendor/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  17. package/src/renderer/vendor/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  18. package/src/renderer/vendor/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  19. package/src/renderer/vendor/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  20. package/src/renderer/vendor/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  21. package/src/renderer/vendor/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  22. package/src/renderer/vendor/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  23. package/src/renderer/vendor/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  24. package/src/renderer/vendor/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  25. package/src/renderer/vendor/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  26. package/src/renderer/vendor/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  27. package/src/renderer/vendor/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  28. package/src/renderer/vendor/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  29. package/src/renderer/vendor/fonts/KaTeX_Main-Bold.ttf +0 -0
  30. package/src/renderer/vendor/fonts/KaTeX_Main-Bold.woff +0 -0
  31. package/src/renderer/vendor/fonts/KaTeX_Main-Bold.woff2 +0 -0
  32. package/src/renderer/vendor/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  33. package/src/renderer/vendor/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  34. package/src/renderer/vendor/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  35. package/src/renderer/vendor/fonts/KaTeX_Main-Italic.ttf +0 -0
  36. package/src/renderer/vendor/fonts/KaTeX_Main-Italic.woff +0 -0
  37. package/src/renderer/vendor/fonts/KaTeX_Main-Italic.woff2 +0 -0
  38. package/src/renderer/vendor/fonts/KaTeX_Main-Regular.ttf +0 -0
  39. package/src/renderer/vendor/fonts/KaTeX_Main-Regular.woff +0 -0
  40. package/src/renderer/vendor/fonts/KaTeX_Main-Regular.woff2 +0 -0
  41. package/src/renderer/vendor/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  42. package/src/renderer/vendor/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  43. package/src/renderer/vendor/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  44. package/src/renderer/vendor/fonts/KaTeX_Math-Italic.ttf +0 -0
  45. package/src/renderer/vendor/fonts/KaTeX_Math-Italic.woff +0 -0
  46. package/src/renderer/vendor/fonts/KaTeX_Math-Italic.woff2 +0 -0
  47. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  48. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  49. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  50. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  51. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  52. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  53. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  54. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  55. package/src/renderer/vendor/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  56. package/src/renderer/vendor/fonts/KaTeX_Script-Regular.ttf +0 -0
  57. package/src/renderer/vendor/fonts/KaTeX_Script-Regular.woff +0 -0
  58. package/src/renderer/vendor/fonts/KaTeX_Script-Regular.woff2 +0 -0
  59. package/src/renderer/vendor/fonts/KaTeX_Size1-Regular.ttf +0 -0
  60. package/src/renderer/vendor/fonts/KaTeX_Size1-Regular.woff +0 -0
  61. package/src/renderer/vendor/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  62. package/src/renderer/vendor/fonts/KaTeX_Size2-Regular.ttf +0 -0
  63. package/src/renderer/vendor/fonts/KaTeX_Size2-Regular.woff +0 -0
  64. package/src/renderer/vendor/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  65. package/src/renderer/vendor/fonts/KaTeX_Size3-Regular.ttf +0 -0
  66. package/src/renderer/vendor/fonts/KaTeX_Size3-Regular.woff +0 -0
  67. package/src/renderer/vendor/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  68. package/src/renderer/vendor/fonts/KaTeX_Size4-Regular.ttf +0 -0
  69. package/src/renderer/vendor/fonts/KaTeX_Size4-Regular.woff +0 -0
  70. package/src/renderer/vendor/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  71. package/src/renderer/vendor/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  72. package/src/renderer/vendor/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  73. package/src/renderer/vendor/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  74. package/src/renderer/vendor/katex.min.css +1 -0
  75. package/src/renderer/vendor/katex.min.js +1 -0
  76. package/src/renderer/vendor/marked.js +80 -0
  77. package/src/renderer/vendor/prism.js +2009 -0
  78. package/src/renderer/vendor/purify.js +3 -0
  79. package/src/store.js +116 -0
@@ -0,0 +1,2009 @@
1
+ /* Prism, vendored by scripts/vendor.js -- do not edit by hand. */
2
+ window.Prism = window.Prism || {}; window.Prism.manual = true;
3
+
4
+ /* **********************************************
5
+ Begin prism-core.js
6
+ ********************************************** */
7
+
8
+ /// <reference lib="WebWorker"/>
9
+
10
+ var _self = (typeof window !== 'undefined')
11
+ ? window // if in browser
12
+ : (
13
+ (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
14
+ ? self // if in worker
15
+ : {} // if in node js
16
+ );
17
+
18
+ /**
19
+ * Prism: Lightweight, robust, elegant syntax highlighting
20
+ *
21
+ * @license MIT <https://opensource.org/licenses/MIT>
22
+ * @author Lea Verou <https://lea.verou.me>
23
+ * @namespace
24
+ * @public
25
+ */
26
+ var Prism = (function (_self) {
27
+
28
+ // Private helper vars
29
+ var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
30
+ var uniqueId = 0;
31
+
32
+ // The grammar object for plaintext
33
+ var plainTextGrammar = {};
34
+
35
+
36
+ var _ = {
37
+ /**
38
+ * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
39
+ * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
40
+ * additional languages or plugins yourself.
41
+ *
42
+ * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
43
+ *
44
+ * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
45
+ * empty Prism object into the global scope before loading the Prism script like this:
46
+ *
47
+ * ```js
48
+ * window.Prism = window.Prism || {};
49
+ * Prism.manual = true;
50
+ * // add a new <script> to load Prism's script
51
+ * ```
52
+ *
53
+ * @default false
54
+ * @type {boolean}
55
+ * @memberof Prism
56
+ * @public
57
+ */
58
+ manual: _self.Prism && _self.Prism.manual,
59
+ /**
60
+ * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
61
+ * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
62
+ * own worker, you don't want it to do this.
63
+ *
64
+ * By setting this value to `true`, Prism will not add its own listeners to the worker.
65
+ *
66
+ * You obviously have to change this value before Prism executes. To do this, you can add an
67
+ * empty Prism object into the global scope before loading the Prism script like this:
68
+ *
69
+ * ```js
70
+ * window.Prism = window.Prism || {};
71
+ * Prism.disableWorkerMessageHandler = true;
72
+ * // Load Prism's script
73
+ * ```
74
+ *
75
+ * @default false
76
+ * @type {boolean}
77
+ * @memberof Prism
78
+ * @public
79
+ */
80
+ disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,
81
+
82
+ /**
83
+ * A namespace for utility methods.
84
+ *
85
+ * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
86
+ * change or disappear at any time.
87
+ *
88
+ * @namespace
89
+ * @memberof Prism
90
+ */
91
+ util: {
92
+ encode: function encode(tokens) {
93
+ if (tokens instanceof Token) {
94
+ return new Token(tokens.type, encode(tokens.content), tokens.alias);
95
+ } else if (Array.isArray(tokens)) {
96
+ return tokens.map(encode);
97
+ } else {
98
+ return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
99
+ }
100
+ },
101
+
102
+ /**
103
+ * Returns the name of the type of the given value.
104
+ *
105
+ * @param {any} o
106
+ * @returns {string}
107
+ * @example
108
+ * type(null) === 'Null'
109
+ * type(undefined) === 'Undefined'
110
+ * type(123) === 'Number'
111
+ * type('foo') === 'String'
112
+ * type(true) === 'Boolean'
113
+ * type([1, 2]) === 'Array'
114
+ * type({}) === 'Object'
115
+ * type(String) === 'Function'
116
+ * type(/abc+/) === 'RegExp'
117
+ */
118
+ type: function (o) {
119
+ return Object.prototype.toString.call(o).slice(8, -1);
120
+ },
121
+
122
+ /**
123
+ * Returns a unique number for the given object. Later calls will still return the same number.
124
+ *
125
+ * @param {Object} obj
126
+ * @returns {number}
127
+ */
128
+ objId: function (obj) {
129
+ if (!obj['__id']) {
130
+ Object.defineProperty(obj, '__id', { value: ++uniqueId });
131
+ }
132
+ return obj['__id'];
133
+ },
134
+
135
+ /**
136
+ * Creates a deep clone of the given object.
137
+ *
138
+ * The main intended use of this function is to clone language definitions.
139
+ *
140
+ * @param {T} o
141
+ * @param {Record<number, any>} [visited]
142
+ * @returns {T}
143
+ * @template T
144
+ */
145
+ clone: function deepClone(o, visited) {
146
+ visited = visited || {};
147
+
148
+ var clone; var id;
149
+ switch (_.util.type(o)) {
150
+ case 'Object':
151
+ id = _.util.objId(o);
152
+ if (visited[id]) {
153
+ return visited[id];
154
+ }
155
+ clone = /** @type {Record<string, any>} */ ({});
156
+ visited[id] = clone;
157
+
158
+ for (var key in o) {
159
+ if (o.hasOwnProperty(key)) {
160
+ clone[key] = deepClone(o[key], visited);
161
+ }
162
+ }
163
+
164
+ return /** @type {any} */ (clone);
165
+
166
+ case 'Array':
167
+ id = _.util.objId(o);
168
+ if (visited[id]) {
169
+ return visited[id];
170
+ }
171
+ clone = [];
172
+ visited[id] = clone;
173
+
174
+ (/** @type {Array} */(/** @type {any} */(o))).forEach(function (v, i) {
175
+ clone[i] = deepClone(v, visited);
176
+ });
177
+
178
+ return /** @type {any} */ (clone);
179
+
180
+ default:
181
+ return o;
182
+ }
183
+ },
184
+
185
+ /**
186
+ * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
187
+ *
188
+ * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
189
+ *
190
+ * @param {Element} element
191
+ * @returns {string}
192
+ */
193
+ getLanguage: function (element) {
194
+ while (element) {
195
+ var m = lang.exec(element.className);
196
+ if (m) {
197
+ return m[1].toLowerCase();
198
+ }
199
+ element = element.parentElement;
200
+ }
201
+ return 'none';
202
+ },
203
+
204
+ /**
205
+ * Sets the Prism `language-xxxx` class of the given element.
206
+ *
207
+ * @param {Element} element
208
+ * @param {string} language
209
+ * @returns {void}
210
+ */
211
+ setLanguage: function (element, language) {
212
+ // remove all `language-xxxx` classes
213
+ // (this might leave behind a leading space)
214
+ element.className = element.className.replace(RegExp(lang, 'gi'), '');
215
+
216
+ // add the new `language-xxxx` class
217
+ // (using `classList` will automatically clean up spaces for us)
218
+ element.classList.add('language-' + language);
219
+ },
220
+
221
+ /**
222
+ * Returns the script element that is currently executing.
223
+ *
224
+ * This does __not__ work for line script element.
225
+ *
226
+ * @returns {HTMLScriptElement | null}
227
+ */
228
+ currentScript: function () {
229
+ if (typeof document === 'undefined') {
230
+ return null;
231
+ }
232
+ if (document.currentScript && document.currentScript.tagName === 'SCRIPT' && 1 < 2 /* hack to trip TS' flow analysis */) {
233
+ return /** @type {any} */ (document.currentScript);
234
+ }
235
+
236
+ // IE11 workaround
237
+ // we'll get the src of the current script by parsing IE11's error stack trace
238
+ // this will not work for inline scripts
239
+
240
+ try {
241
+ throw new Error();
242
+ } catch (err) {
243
+ // Get file src url from stack. Specifically works with the format of stack traces in IE.
244
+ // A stack will look like this:
245
+ //
246
+ // Error
247
+ // at _.util.currentScript (http://localhost/components/prism-core.js:119:5)
248
+ // at Global code (http://localhost/components/prism-core.js:606:1)
249
+
250
+ var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
251
+ if (src) {
252
+ var scripts = document.getElementsByTagName('script');
253
+ for (var i in scripts) {
254
+ if (scripts[i].src == src) {
255
+ return scripts[i];
256
+ }
257
+ }
258
+ }
259
+ return null;
260
+ }
261
+ },
262
+
263
+ /**
264
+ * Returns whether a given class is active for `element`.
265
+ *
266
+ * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
267
+ * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
268
+ * given class is just the given class with a `no-` prefix.
269
+ *
270
+ * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
271
+ * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
272
+ * ancestors have the given class or the negated version of it, then the default activation will be returned.
273
+ *
274
+ * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
275
+ * version of it, the class is considered active.
276
+ *
277
+ * @param {Element} element
278
+ * @param {string} className
279
+ * @param {boolean} [defaultActivation=false]
280
+ * @returns {boolean}
281
+ */
282
+ isActive: function (element, className, defaultActivation) {
283
+ var no = 'no-' + className;
284
+
285
+ while (element) {
286
+ var classList = element.classList;
287
+ if (classList.contains(className)) {
288
+ return true;
289
+ }
290
+ if (classList.contains(no)) {
291
+ return false;
292
+ }
293
+ element = element.parentElement;
294
+ }
295
+ return !!defaultActivation;
296
+ }
297
+ },
298
+
299
+ /**
300
+ * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
301
+ *
302
+ * @namespace
303
+ * @memberof Prism
304
+ * @public
305
+ */
306
+ languages: {
307
+ /**
308
+ * The grammar for plain, unformatted text.
309
+ */
310
+ plain: plainTextGrammar,
311
+ plaintext: plainTextGrammar,
312
+ text: plainTextGrammar,
313
+ txt: plainTextGrammar,
314
+
315
+ /**
316
+ * Creates a deep copy of the language with the given id and appends the given tokens.
317
+ *
318
+ * If a token in `redef` also appears in the copied language, then the existing token in the copied language
319
+ * will be overwritten at its original position.
320
+ *
321
+ * ## Best practices
322
+ *
323
+ * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
324
+ * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
325
+ * understand the language definition because, normally, the order of tokens matters in Prism grammars.
326
+ *
327
+ * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
328
+ * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
329
+ *
330
+ * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
331
+ * @param {Grammar} redef The new tokens to append.
332
+ * @returns {Grammar} The new language created.
333
+ * @public
334
+ * @example
335
+ * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
336
+ * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
337
+ * // at its original position
338
+ * 'comment': { ... },
339
+ * // CSS doesn't have a 'color' token, so this token will be appended
340
+ * 'color': /\b(?:red|green|blue)\b/
341
+ * });
342
+ */
343
+ extend: function (id, redef) {
344
+ var lang = _.util.clone(_.languages[id]);
345
+
346
+ for (var key in redef) {
347
+ lang[key] = redef[key];
348
+ }
349
+
350
+ return lang;
351
+ },
352
+
353
+ /**
354
+ * Inserts tokens _before_ another token in a language definition or any other grammar.
355
+ *
356
+ * ## Usage
357
+ *
358
+ * This helper method makes it easy to modify existing languages. For example, the CSS language definition
359
+ * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
360
+ * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
361
+ * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
362
+ * this:
363
+ *
364
+ * ```js
365
+ * Prism.languages.markup.style = {
366
+ * // token
367
+ * };
368
+ * ```
369
+ *
370
+ * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
371
+ * before existing tokens. For the CSS example above, you would use it like this:
372
+ *
373
+ * ```js
374
+ * Prism.languages.insertBefore('markup', 'cdata', {
375
+ * 'style': {
376
+ * // token
377
+ * }
378
+ * });
379
+ * ```
380
+ *
381
+ * ## Special cases
382
+ *
383
+ * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
384
+ * will be ignored.
385
+ *
386
+ * This behavior can be used to insert tokens after `before`:
387
+ *
388
+ * ```js
389
+ * Prism.languages.insertBefore('markup', 'comment', {
390
+ * 'comment': Prism.languages.markup.comment,
391
+ * // tokens after 'comment'
392
+ * });
393
+ * ```
394
+ *
395
+ * ## Limitations
396
+ *
397
+ * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
398
+ * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
399
+ * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
400
+ * deleting properties which is necessary to insert at arbitrary positions.
401
+ *
402
+ * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
403
+ * Instead, it will create a new object and replace all references to the target object with the new one. This
404
+ * can be done without temporarily deleting properties, so the iteration order is well-defined.
405
+ *
406
+ * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
407
+ * you hold the target object in a variable, then the value of the variable will not change.
408
+ *
409
+ * ```js
410
+ * var oldMarkup = Prism.languages.markup;
411
+ * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
412
+ *
413
+ * assert(oldMarkup !== Prism.languages.markup);
414
+ * assert(newMarkup === Prism.languages.markup);
415
+ * ```
416
+ *
417
+ * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
418
+ * object to be modified.
419
+ * @param {string} before The key to insert before.
420
+ * @param {Grammar} insert An object containing the key-value pairs to be inserted.
421
+ * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
422
+ * object to be modified.
423
+ *
424
+ * Defaults to `Prism.languages`.
425
+ * @returns {Grammar} The new grammar object.
426
+ * @public
427
+ */
428
+ insertBefore: function (inside, before, insert, root) {
429
+ root = root || /** @type {any} */ (_.languages);
430
+ var grammar = root[inside];
431
+ /** @type {Grammar} */
432
+ var ret = {};
433
+
434
+ for (var token in grammar) {
435
+ if (grammar.hasOwnProperty(token)) {
436
+
437
+ if (token == before) {
438
+ for (var newToken in insert) {
439
+ if (insert.hasOwnProperty(newToken)) {
440
+ ret[newToken] = insert[newToken];
441
+ }
442
+ }
443
+ }
444
+
445
+ // Do not insert token which also occur in insert. See #1525
446
+ if (!insert.hasOwnProperty(token)) {
447
+ ret[token] = grammar[token];
448
+ }
449
+ }
450
+ }
451
+
452
+ var old = root[inside];
453
+ root[inside] = ret;
454
+
455
+ // Update references in other language definitions
456
+ _.languages.DFS(_.languages, function (key, value) {
457
+ if (value === old && key != inside) {
458
+ this[key] = ret;
459
+ }
460
+ });
461
+
462
+ return ret;
463
+ },
464
+
465
+ // Traverse a language definition with Depth First Search
466
+ DFS: function DFS(o, callback, type, visited) {
467
+ visited = visited || {};
468
+
469
+ var objId = _.util.objId;
470
+
471
+ for (var i in o) {
472
+ if (o.hasOwnProperty(i)) {
473
+ callback.call(o, i, o[i], type || i);
474
+
475
+ var property = o[i];
476
+ var propertyType = _.util.type(property);
477
+
478
+ if (propertyType === 'Object' && !visited[objId(property)]) {
479
+ visited[objId(property)] = true;
480
+ DFS(property, callback, null, visited);
481
+ } else if (propertyType === 'Array' && !visited[objId(property)]) {
482
+ visited[objId(property)] = true;
483
+ DFS(property, callback, i, visited);
484
+ }
485
+ }
486
+ }
487
+ }
488
+ },
489
+
490
+ plugins: {},
491
+
492
+ /**
493
+ * This is the most high-level function in Prism’s API.
494
+ * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
495
+ * each one of them.
496
+ *
497
+ * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
498
+ *
499
+ * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
500
+ * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
501
+ * @memberof Prism
502
+ * @public
503
+ */
504
+ highlightAll: function (async, callback) {
505
+ _.highlightAllUnder(document, async, callback);
506
+ },
507
+
508
+ /**
509
+ * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
510
+ * {@link Prism.highlightElement} on each one of them.
511
+ *
512
+ * The following hooks will be run:
513
+ * 1. `before-highlightall`
514
+ * 2. `before-all-elements-highlight`
515
+ * 3. All hooks of {@link Prism.highlightElement} for each element.
516
+ *
517
+ * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
518
+ * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
519
+ * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
520
+ * @memberof Prism
521
+ * @public
522
+ */
523
+ highlightAllUnder: function (container, async, callback) {
524
+ var env = {
525
+ callback: callback,
526
+ container: container,
527
+ selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
528
+ };
529
+
530
+ _.hooks.run('before-highlightall', env);
531
+
532
+ env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));
533
+
534
+ _.hooks.run('before-all-elements-highlight', env);
535
+
536
+ for (var i = 0, element; (element = env.elements[i++]);) {
537
+ _.highlightElement(element, async === true, env.callback);
538
+ }
539
+ },
540
+
541
+ /**
542
+ * Highlights the code inside a single element.
543
+ *
544
+ * The following hooks will be run:
545
+ * 1. `before-sanity-check`
546
+ * 2. `before-highlight`
547
+ * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
548
+ * 4. `before-insert`
549
+ * 5. `after-highlight`
550
+ * 6. `complete`
551
+ *
552
+ * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
553
+ * the element's language.
554
+ *
555
+ * @param {Element} element The element containing the code.
556
+ * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
557
+ * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
558
+ * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
559
+ * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
560
+ *
561
+ * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
562
+ * asynchronous highlighting to work. You can build your own bundle on the
563
+ * [Download page](https://prismjs.com/download.html).
564
+ * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
565
+ * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
566
+ * @memberof Prism
567
+ * @public
568
+ */
569
+ highlightElement: function (element, async, callback) {
570
+ // Find language
571
+ var language = _.util.getLanguage(element);
572
+ var grammar = _.languages[language];
573
+
574
+ // Set language on the element, if not present
575
+ _.util.setLanguage(element, language);
576
+
577
+ // Set language on the parent, for styling
578
+ var parent = element.parentElement;
579
+ if (parent && parent.nodeName.toLowerCase() === 'pre') {
580
+ _.util.setLanguage(parent, language);
581
+ }
582
+
583
+ var code = element.textContent;
584
+
585
+ var env = {
586
+ element: element,
587
+ language: language,
588
+ grammar: grammar,
589
+ code: code
590
+ };
591
+
592
+ function insertHighlightedCode(highlightedCode) {
593
+ env.highlightedCode = highlightedCode;
594
+
595
+ _.hooks.run('before-insert', env);
596
+
597
+ env.element.innerHTML = env.highlightedCode;
598
+
599
+ _.hooks.run('after-highlight', env);
600
+ _.hooks.run('complete', env);
601
+ callback && callback.call(env.element);
602
+ }
603
+
604
+ _.hooks.run('before-sanity-check', env);
605
+
606
+ // plugins may change/add the parent/element
607
+ parent = env.element.parentElement;
608
+ if (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) {
609
+ parent.setAttribute('tabindex', '0');
610
+ }
611
+
612
+ if (!env.code) {
613
+ _.hooks.run('complete', env);
614
+ callback && callback.call(env.element);
615
+ return;
616
+ }
617
+
618
+ _.hooks.run('before-highlight', env);
619
+
620
+ if (!env.grammar) {
621
+ insertHighlightedCode(_.util.encode(env.code));
622
+ return;
623
+ }
624
+
625
+ if (async && _self.Worker) {
626
+ var worker = new Worker(_.filename);
627
+
628
+ worker.onmessage = function (evt) {
629
+ insertHighlightedCode(evt.data);
630
+ };
631
+
632
+ worker.postMessage(JSON.stringify({
633
+ language: env.language,
634
+ code: env.code,
635
+ immediateClose: true
636
+ }));
637
+ } else {
638
+ insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));
639
+ }
640
+ },
641
+
642
+ /**
643
+ * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
644
+ * and the language definitions to use, and returns a string with the HTML produced.
645
+ *
646
+ * The following hooks will be run:
647
+ * 1. `before-tokenize`
648
+ * 2. `after-tokenize`
649
+ * 3. `wrap`: On each {@link Token}.
650
+ *
651
+ * @param {string} text A string with the code to be highlighted.
652
+ * @param {Grammar} grammar An object containing the tokens to use.
653
+ *
654
+ * Usually a language definition like `Prism.languages.markup`.
655
+ * @param {string} language The name of the language definition passed to `grammar`.
656
+ * @returns {string} The highlighted HTML.
657
+ * @memberof Prism
658
+ * @public
659
+ * @example
660
+ * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
661
+ */
662
+ highlight: function (text, grammar, language) {
663
+ var env = {
664
+ code: text,
665
+ grammar: grammar,
666
+ language: language
667
+ };
668
+ _.hooks.run('before-tokenize', env);
669
+ if (!env.grammar) {
670
+ throw new Error('The language "' + env.language + '" has no grammar.');
671
+ }
672
+ env.tokens = _.tokenize(env.code, env.grammar);
673
+ _.hooks.run('after-tokenize', env);
674
+ return Token.stringify(_.util.encode(env.tokens), env.language);
675
+ },
676
+
677
+ /**
678
+ * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
679
+ * and the language definitions to use, and returns an array with the tokenized code.
680
+ *
681
+ * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
682
+ *
683
+ * This method could be useful in other contexts as well, as a very crude parser.
684
+ *
685
+ * @param {string} text A string with the code to be highlighted.
686
+ * @param {Grammar} grammar An object containing the tokens to use.
687
+ *
688
+ * Usually a language definition like `Prism.languages.markup`.
689
+ * @returns {TokenStream} An array of strings and tokens, a token stream.
690
+ * @memberof Prism
691
+ * @public
692
+ * @example
693
+ * let code = `var foo = 0;`;
694
+ * let tokens = Prism.tokenize(code, Prism.languages.javascript);
695
+ * tokens.forEach(token => {
696
+ * if (token instanceof Prism.Token && token.type === 'number') {
697
+ * console.log(`Found numeric literal: ${token.content}`);
698
+ * }
699
+ * });
700
+ */
701
+ tokenize: function (text, grammar) {
702
+ var rest = grammar.rest;
703
+ if (rest) {
704
+ for (var token in rest) {
705
+ grammar[token] = rest[token];
706
+ }
707
+
708
+ delete grammar.rest;
709
+ }
710
+
711
+ var tokenList = new LinkedList();
712
+ addAfter(tokenList, tokenList.head, text);
713
+
714
+ matchGrammar(text, tokenList, grammar, tokenList.head, 0);
715
+
716
+ return toArray(tokenList);
717
+ },
718
+
719
+ /**
720
+ * @namespace
721
+ * @memberof Prism
722
+ * @public
723
+ */
724
+ hooks: {
725
+ all: {},
726
+
727
+ /**
728
+ * Adds the given callback to the list of callbacks for the given hook.
729
+ *
730
+ * The callback will be invoked when the hook it is registered for is run.
731
+ * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
732
+ *
733
+ * One callback function can be registered to multiple hooks and the same hook multiple times.
734
+ *
735
+ * @param {string} name The name of the hook.
736
+ * @param {HookCallback} callback The callback function which is given environment variables.
737
+ * @public
738
+ */
739
+ add: function (name, callback) {
740
+ var hooks = _.hooks.all;
741
+
742
+ hooks[name] = hooks[name] || [];
743
+
744
+ hooks[name].push(callback);
745
+ },
746
+
747
+ /**
748
+ * Runs a hook invoking all registered callbacks with the given environment variables.
749
+ *
750
+ * Callbacks will be invoked synchronously and in the order in which they were registered.
751
+ *
752
+ * @param {string} name The name of the hook.
753
+ * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
754
+ * @public
755
+ */
756
+ run: function (name, env) {
757
+ var callbacks = _.hooks.all[name];
758
+
759
+ if (!callbacks || !callbacks.length) {
760
+ return;
761
+ }
762
+
763
+ for (var i = 0, callback; (callback = callbacks[i++]);) {
764
+ callback(env);
765
+ }
766
+ }
767
+ },
768
+
769
+ Token: Token
770
+ };
771
+ _self.Prism = _;
772
+
773
+
774
+ // Typescript note:
775
+ // The following can be used to import the Token type in JSDoc:
776
+ //
777
+ // @typedef {InstanceType<import("./prism-core")["Token"]>} Token
778
+
779
+ /**
780
+ * Creates a new token.
781
+ *
782
+ * @param {string} type See {@link Token#type type}
783
+ * @param {string | TokenStream} content See {@link Token#content content}
784
+ * @param {string|string[]} [alias] The alias(es) of the token.
785
+ * @param {string} [matchedStr=""] A copy of the full string this token was created from.
786
+ * @class
787
+ * @global
788
+ * @public
789
+ */
790
+ function Token(type, content, alias, matchedStr) {
791
+ /**
792
+ * The type of the token.
793
+ *
794
+ * This is usually the key of a pattern in a {@link Grammar}.
795
+ *
796
+ * @type {string}
797
+ * @see GrammarToken
798
+ * @public
799
+ */
800
+ this.type = type;
801
+ /**
802
+ * The strings or tokens contained by this token.
803
+ *
804
+ * This will be a token stream if the pattern matched also defined an `inside` grammar.
805
+ *
806
+ * @type {string | TokenStream}
807
+ * @public
808
+ */
809
+ this.content = content;
810
+ /**
811
+ * The alias(es) of the token.
812
+ *
813
+ * @type {string|string[]}
814
+ * @see GrammarToken
815
+ * @public
816
+ */
817
+ this.alias = alias;
818
+ // Copy of the full string this token was created from
819
+ this.length = (matchedStr || '').length | 0;
820
+ }
821
+
822
+ /**
823
+ * A token stream is an array of strings and {@link Token Token} objects.
824
+ *
825
+ * Token streams have to fulfill a few properties that are assumed by most functions (mostly internal ones) that process
826
+ * them.
827
+ *
828
+ * 1. No adjacent strings.
829
+ * 2. No empty strings.
830
+ *
831
+ * The only exception here is the token stream that only contains the empty string and nothing else.
832
+ *
833
+ * @typedef {Array<string | Token>} TokenStream
834
+ * @global
835
+ * @public
836
+ */
837
+
838
+ /**
839
+ * Converts the given token or token stream to an HTML representation.
840
+ *
841
+ * The following hooks will be run:
842
+ * 1. `wrap`: On each {@link Token}.
843
+ *
844
+ * @param {string | Token | TokenStream} o The token or token stream to be converted.
845
+ * @param {string} language The name of current language.
846
+ * @returns {string} The HTML representation of the token or token stream.
847
+ * @memberof Token
848
+ * @static
849
+ */
850
+ Token.stringify = function stringify(o, language) {
851
+ if (typeof o == 'string') {
852
+ return o;
853
+ }
854
+ if (Array.isArray(o)) {
855
+ var s = '';
856
+ o.forEach(function (e) {
857
+ s += stringify(e, language);
858
+ });
859
+ return s;
860
+ }
861
+
862
+ var env = {
863
+ type: o.type,
864
+ content: stringify(o.content, language),
865
+ tag: 'span',
866
+ classes: ['token', o.type],
867
+ attributes: {},
868
+ language: language
869
+ };
870
+
871
+ var aliases = o.alias;
872
+ if (aliases) {
873
+ if (Array.isArray(aliases)) {
874
+ Array.prototype.push.apply(env.classes, aliases);
875
+ } else {
876
+ env.classes.push(aliases);
877
+ }
878
+ }
879
+
880
+ _.hooks.run('wrap', env);
881
+
882
+ var attributes = '';
883
+ for (var name in env.attributes) {
884
+ attributes += ' ' + name + '="' + (env.attributes[name] || '').replace(/"/g, '&quot;') + '"';
885
+ }
886
+
887
+ return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + '</' + env.tag + '>';
888
+ };
889
+
890
+ /**
891
+ * @param {RegExp} pattern
892
+ * @param {number} pos
893
+ * @param {string} text
894
+ * @param {boolean} lookbehind
895
+ * @returns {RegExpExecArray | null}
896
+ */
897
+ function matchPattern(pattern, pos, text, lookbehind) {
898
+ pattern.lastIndex = pos;
899
+ var match = pattern.exec(text);
900
+ if (match && lookbehind && match[1]) {
901
+ // change the match to remove the text matched by the Prism lookbehind group
902
+ var lookbehindLength = match[1].length;
903
+ match.index += lookbehindLength;
904
+ match[0] = match[0].slice(lookbehindLength);
905
+ }
906
+ return match;
907
+ }
908
+
909
+ /**
910
+ * @param {string} text
911
+ * @param {LinkedList<string | Token>} tokenList
912
+ * @param {any} grammar
913
+ * @param {LinkedListNode<string | Token>} startNode
914
+ * @param {number} startPos
915
+ * @param {RematchOptions} [rematch]
916
+ * @returns {void}
917
+ * @private
918
+ *
919
+ * @typedef RematchOptions
920
+ * @property {string} cause
921
+ * @property {number} reach
922
+ */
923
+ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
924
+ for (var token in grammar) {
925
+ if (!grammar.hasOwnProperty(token) || !grammar[token]) {
926
+ continue;
927
+ }
928
+
929
+ var patterns = grammar[token];
930
+ patterns = Array.isArray(patterns) ? patterns : [patterns];
931
+
932
+ for (var j = 0; j < patterns.length; ++j) {
933
+ if (rematch && rematch.cause == token + ',' + j) {
934
+ return;
935
+ }
936
+
937
+ var patternObj = patterns[j];
938
+ var inside = patternObj.inside;
939
+ var lookbehind = !!patternObj.lookbehind;
940
+ var greedy = !!patternObj.greedy;
941
+ var alias = patternObj.alias;
942
+
943
+ if (greedy && !patternObj.pattern.global) {
944
+ // Without the global flag, lastIndex won't work
945
+ var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
946
+ patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g');
947
+ }
948
+
949
+ /** @type {RegExp} */
950
+ var pattern = patternObj.pattern || patternObj;
951
+
952
+ for ( // iterate the token list and keep track of the current token/string position
953
+ var currentNode = startNode.next, pos = startPos;
954
+ currentNode !== tokenList.tail;
955
+ pos += currentNode.value.length, currentNode = currentNode.next
956
+ ) {
957
+
958
+ if (rematch && pos >= rematch.reach) {
959
+ break;
960
+ }
961
+
962
+ var str = currentNode.value;
963
+
964
+ if (tokenList.length > text.length) {
965
+ // Something went terribly wrong, ABORT, ABORT!
966
+ return;
967
+ }
968
+
969
+ if (str instanceof Token) {
970
+ continue;
971
+ }
972
+
973
+ var removeCount = 1; // this is the to parameter of removeBetween
974
+ var match;
975
+
976
+ if (greedy) {
977
+ match = matchPattern(pattern, pos, text, lookbehind);
978
+ if (!match || match.index >= text.length) {
979
+ break;
980
+ }
981
+
982
+ var from = match.index;
983
+ var to = match.index + match[0].length;
984
+ var p = pos;
985
+
986
+ // find the node that contains the match
987
+ p += currentNode.value.length;
988
+ while (from >= p) {
989
+ currentNode = currentNode.next;
990
+ p += currentNode.value.length;
991
+ }
992
+ // adjust pos (and p)
993
+ p -= currentNode.value.length;
994
+ pos = p;
995
+
996
+ // the current node is a Token, then the match starts inside another Token, which is invalid
997
+ if (currentNode.value instanceof Token) {
998
+ continue;
999
+ }
1000
+
1001
+ // find the last node which is affected by this match
1002
+ for (
1003
+ var k = currentNode;
1004
+ k !== tokenList.tail && (p < to || typeof k.value === 'string');
1005
+ k = k.next
1006
+ ) {
1007
+ removeCount++;
1008
+ p += k.value.length;
1009
+ }
1010
+ removeCount--;
1011
+
1012
+ // replace with the new match
1013
+ str = text.slice(pos, p);
1014
+ match.index -= pos;
1015
+ } else {
1016
+ match = matchPattern(pattern, 0, str, lookbehind);
1017
+ if (!match) {
1018
+ continue;
1019
+ }
1020
+ }
1021
+
1022
+ // eslint-disable-next-line no-redeclare
1023
+ var from = match.index;
1024
+ var matchStr = match[0];
1025
+ var before = str.slice(0, from);
1026
+ var after = str.slice(from + matchStr.length);
1027
+
1028
+ var reach = pos + str.length;
1029
+ if (rematch && reach > rematch.reach) {
1030
+ rematch.reach = reach;
1031
+ }
1032
+
1033
+ var removeFrom = currentNode.prev;
1034
+
1035
+ if (before) {
1036
+ removeFrom = addAfter(tokenList, removeFrom, before);
1037
+ pos += before.length;
1038
+ }
1039
+
1040
+ removeRange(tokenList, removeFrom, removeCount);
1041
+
1042
+ var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
1043
+ currentNode = addAfter(tokenList, removeFrom, wrapped);
1044
+
1045
+ if (after) {
1046
+ addAfter(tokenList, currentNode, after);
1047
+ }
1048
+
1049
+ if (removeCount > 1) {
1050
+ // at least one Token object was removed, so we have to do some rematching
1051
+ // this can only happen if the current pattern is greedy
1052
+
1053
+ /** @type {RematchOptions} */
1054
+ var nestedRematch = {
1055
+ cause: token + ',' + j,
1056
+ reach: reach
1057
+ };
1058
+ matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
1059
+
1060
+ // the reach might have been extended because of the rematching
1061
+ if (rematch && nestedRematch.reach > rematch.reach) {
1062
+ rematch.reach = nestedRematch.reach;
1063
+ }
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ }
1069
+
1070
+ /**
1071
+ * @typedef LinkedListNode
1072
+ * @property {T} value
1073
+ * @property {LinkedListNode<T> | null} prev The previous node.
1074
+ * @property {LinkedListNode<T> | null} next The next node.
1075
+ * @template T
1076
+ * @private
1077
+ */
1078
+
1079
+ /**
1080
+ * @template T
1081
+ * @private
1082
+ */
1083
+ function LinkedList() {
1084
+ /** @type {LinkedListNode<T>} */
1085
+ var head = { value: null, prev: null, next: null };
1086
+ /** @type {LinkedListNode<T>} */
1087
+ var tail = { value: null, prev: head, next: null };
1088
+ head.next = tail;
1089
+
1090
+ /** @type {LinkedListNode<T>} */
1091
+ this.head = head;
1092
+ /** @type {LinkedListNode<T>} */
1093
+ this.tail = tail;
1094
+ this.length = 0;
1095
+ }
1096
+
1097
+ /**
1098
+ * Adds a new node with the given value to the list.
1099
+ *
1100
+ * @param {LinkedList<T>} list
1101
+ * @param {LinkedListNode<T>} node
1102
+ * @param {T} value
1103
+ * @returns {LinkedListNode<T>} The added node.
1104
+ * @template T
1105
+ */
1106
+ function addAfter(list, node, value) {
1107
+ // assumes that node != list.tail && values.length >= 0
1108
+ var next = node.next;
1109
+
1110
+ var newNode = { value: value, prev: node, next: next };
1111
+ node.next = newNode;
1112
+ next.prev = newNode;
1113
+ list.length++;
1114
+
1115
+ return newNode;
1116
+ }
1117
+ /**
1118
+ * Removes `count` nodes after the given node. The given node will not be removed.
1119
+ *
1120
+ * @param {LinkedList<T>} list
1121
+ * @param {LinkedListNode<T>} node
1122
+ * @param {number} count
1123
+ * @template T
1124
+ */
1125
+ function removeRange(list, node, count) {
1126
+ var next = node.next;
1127
+ for (var i = 0; i < count && next !== list.tail; i++) {
1128
+ next = next.next;
1129
+ }
1130
+ node.next = next;
1131
+ next.prev = node;
1132
+ list.length -= i;
1133
+ }
1134
+ /**
1135
+ * @param {LinkedList<T>} list
1136
+ * @returns {T[]}
1137
+ * @template T
1138
+ */
1139
+ function toArray(list) {
1140
+ var array = [];
1141
+ var node = list.head.next;
1142
+ while (node !== list.tail) {
1143
+ array.push(node.value);
1144
+ node = node.next;
1145
+ }
1146
+ return array;
1147
+ }
1148
+
1149
+
1150
+ if (!_self.document) {
1151
+ if (!_self.addEventListener) {
1152
+ // in Node.js
1153
+ return _;
1154
+ }
1155
+
1156
+ if (!_.disableWorkerMessageHandler) {
1157
+ // In worker
1158
+ _self.addEventListener('message', function (evt) {
1159
+ var message = JSON.parse(evt.data);
1160
+ var lang = message.language;
1161
+ var code = message.code;
1162
+ var immediateClose = message.immediateClose;
1163
+
1164
+ _self.postMessage(_.highlight(code, _.languages[lang], lang));
1165
+ if (immediateClose) {
1166
+ _self.close();
1167
+ }
1168
+ }, false);
1169
+ }
1170
+
1171
+ return _;
1172
+ }
1173
+
1174
+ // Get current script and highlight
1175
+ var script = _.util.currentScript();
1176
+
1177
+ if (script) {
1178
+ _.filename = script.src;
1179
+
1180
+ if (script.hasAttribute('data-manual')) {
1181
+ _.manual = true;
1182
+ }
1183
+ }
1184
+
1185
+ function highlightAutomaticallyCallback() {
1186
+ if (!_.manual) {
1187
+ _.highlightAll();
1188
+ }
1189
+ }
1190
+
1191
+ if (!_.manual) {
1192
+ // If the document state is "loading", then we'll use DOMContentLoaded.
1193
+ // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the
1194
+ // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they
1195
+ // might take longer one animation frame to execute which can create a race condition where only some plugins have
1196
+ // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded.
1197
+ // See https://github.com/PrismJS/prism/issues/2102
1198
+ var readyState = document.readyState;
1199
+ if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {
1200
+ document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);
1201
+ } else {
1202
+ if (window.requestAnimationFrame) {
1203
+ window.requestAnimationFrame(highlightAutomaticallyCallback);
1204
+ } else {
1205
+ window.setTimeout(highlightAutomaticallyCallback, 16);
1206
+ }
1207
+ }
1208
+ }
1209
+
1210
+ return _;
1211
+
1212
+ }(_self));
1213
+
1214
+ if (typeof module !== 'undefined' && module.exports) {
1215
+ module.exports = Prism;
1216
+ }
1217
+
1218
+ // hack for components to work correctly in node.js
1219
+ if (typeof global !== 'undefined') {
1220
+ global.Prism = Prism;
1221
+ }
1222
+
1223
+ // some additional documentation/types
1224
+
1225
+ /**
1226
+ * The expansion of a simple `RegExp` literal to support additional properties.
1227
+ *
1228
+ * @typedef GrammarToken
1229
+ * @property {RegExp} pattern The regular expression of the token.
1230
+ * @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)
1231
+ * behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.
1232
+ * @property {boolean} [greedy=false] Whether the token is greedy.
1233
+ * @property {string|string[]} [alias] An optional alias or list of aliases.
1234
+ * @property {Grammar} [inside] The nested grammar of this token.
1235
+ *
1236
+ * The `inside` grammar will be used to tokenize the text value of each token of this kind.
1237
+ *
1238
+ * This can be used to make nested and even recursive language definitions.
1239
+ *
1240
+ * Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into
1241
+ * each another.
1242
+ * @global
1243
+ * @public
1244
+ */
1245
+
1246
+ /**
1247
+ * @typedef Grammar
1248
+ * @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}
1249
+ * @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.
1250
+ * @global
1251
+ * @public
1252
+ */
1253
+
1254
+ /**
1255
+ * A function which will invoked after an element was successfully highlighted.
1256
+ *
1257
+ * @callback HighlightCallback
1258
+ * @param {Element} element The element successfully highlighted.
1259
+ * @returns {void}
1260
+ * @global
1261
+ * @public
1262
+ */
1263
+
1264
+ /**
1265
+ * @callback HookCallback
1266
+ * @param {Object<string, any>} env The environment variables of the hook.
1267
+ * @returns {void}
1268
+ * @global
1269
+ * @public
1270
+ */
1271
+
1272
+
1273
+ /* **********************************************
1274
+ Begin prism-markup.js
1275
+ ********************************************** */
1276
+
1277
+ Prism.languages.markup = {
1278
+ 'comment': {
1279
+ pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
1280
+ greedy: true
1281
+ },
1282
+ 'prolog': {
1283
+ pattern: /<\?[\s\S]+?\?>/,
1284
+ greedy: true
1285
+ },
1286
+ 'doctype': {
1287
+ // https://www.w3.org/TR/xml/#NT-doctypedecl
1288
+ pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
1289
+ greedy: true,
1290
+ inside: {
1291
+ 'internal-subset': {
1292
+ pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
1293
+ lookbehind: true,
1294
+ greedy: true,
1295
+ inside: null // see below
1296
+ },
1297
+ 'string': {
1298
+ pattern: /"[^"]*"|'[^']*'/,
1299
+ greedy: true
1300
+ },
1301
+ 'punctuation': /^<!|>$|[[\]]/,
1302
+ 'doctype-tag': /^DOCTYPE/i,
1303
+ 'name': /[^\s<>'"]+/
1304
+ }
1305
+ },
1306
+ 'cdata': {
1307
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1308
+ greedy: true
1309
+ },
1310
+ 'tag': {
1311
+ pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
1312
+ greedy: true,
1313
+ inside: {
1314
+ 'tag': {
1315
+ pattern: /^<\/?[^\s>\/]+/,
1316
+ inside: {
1317
+ 'punctuation': /^<\/?/,
1318
+ 'namespace': /^[^\s>\/:]+:/
1319
+ }
1320
+ },
1321
+ 'special-attr': [],
1322
+ 'attr-value': {
1323
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
1324
+ inside: {
1325
+ 'punctuation': [
1326
+ {
1327
+ pattern: /^=/,
1328
+ alias: 'attr-equals'
1329
+ },
1330
+ {
1331
+ pattern: /^(\s*)["']|["']$/,
1332
+ lookbehind: true
1333
+ }
1334
+ ]
1335
+ }
1336
+ },
1337
+ 'punctuation': /\/?>/,
1338
+ 'attr-name': {
1339
+ pattern: /[^\s>\/]+/,
1340
+ inside: {
1341
+ 'namespace': /^[^\s>\/:]+:/
1342
+ }
1343
+ }
1344
+
1345
+ }
1346
+ },
1347
+ 'entity': [
1348
+ {
1349
+ pattern: /&[\da-z]{1,8};/i,
1350
+ alias: 'named-entity'
1351
+ },
1352
+ /&#x?[\da-f]{1,8};/i
1353
+ ]
1354
+ };
1355
+
1356
+ Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =
1357
+ Prism.languages.markup['entity'];
1358
+ Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup;
1359
+
1360
+ // Plugin to make entity title show the real entity, idea by Roman Komarov
1361
+ Prism.hooks.add('wrap', function (env) {
1362
+
1363
+ if (env.type === 'entity') {
1364
+ env.attributes['title'] = env.content.replace(/&amp;/, '&');
1365
+ }
1366
+ });
1367
+
1368
+ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {
1369
+ /**
1370
+ * Adds an inlined language to markup.
1371
+ *
1372
+ * An example of an inlined language is CSS with `<style>` tags.
1373
+ *
1374
+ * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
1375
+ * case insensitive.
1376
+ * @param {string} lang The language key.
1377
+ * @example
1378
+ * addInlined('style', 'css');
1379
+ */
1380
+ value: function addInlined(tagName, lang) {
1381
+ var includedCdataInside = {};
1382
+ includedCdataInside['language-' + lang] = {
1383
+ pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1384
+ lookbehind: true,
1385
+ inside: Prism.languages[lang]
1386
+ };
1387
+ includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i;
1388
+
1389
+ var inside = {
1390
+ 'included-cdata': {
1391
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1392
+ inside: includedCdataInside
1393
+ }
1394
+ };
1395
+ inside['language-' + lang] = {
1396
+ pattern: /[\s\S]+/,
1397
+ inside: Prism.languages[lang]
1398
+ };
1399
+
1400
+ var def = {};
1401
+ def[tagName] = {
1402
+ pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'),
1403
+ lookbehind: true,
1404
+ greedy: true,
1405
+ inside: inside
1406
+ };
1407
+
1408
+ Prism.languages.insertBefore('markup', 'cdata', def);
1409
+ }
1410
+ });
1411
+ Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', {
1412
+ /**
1413
+ * Adds an pattern to highlight languages embedded in HTML attributes.
1414
+ *
1415
+ * An example of an inlined language is CSS with `style` attributes.
1416
+ *
1417
+ * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
1418
+ * case insensitive.
1419
+ * @param {string} lang The language key.
1420
+ * @example
1421
+ * addAttribute('style', 'css');
1422
+ */
1423
+ value: function (attrName, lang) {
1424
+ Prism.languages.markup.tag.inside['special-attr'].push({
1425
+ pattern: RegExp(
1426
+ /(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
1427
+ 'i'
1428
+ ),
1429
+ lookbehind: true,
1430
+ inside: {
1431
+ 'attr-name': /^[^\s=]+/,
1432
+ 'attr-value': {
1433
+ pattern: /=[\s\S]+/,
1434
+ inside: {
1435
+ 'value': {
1436
+ pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
1437
+ lookbehind: true,
1438
+ alias: [lang, 'language-' + lang],
1439
+ inside: Prism.languages[lang]
1440
+ },
1441
+ 'punctuation': [
1442
+ {
1443
+ pattern: /^=/,
1444
+ alias: 'attr-equals'
1445
+ },
1446
+ /"|'/
1447
+ ]
1448
+ }
1449
+ }
1450
+ }
1451
+ });
1452
+ }
1453
+ });
1454
+
1455
+ Prism.languages.html = Prism.languages.markup;
1456
+ Prism.languages.mathml = Prism.languages.markup;
1457
+ Prism.languages.svg = Prism.languages.markup;
1458
+
1459
+ Prism.languages.xml = Prism.languages.extend('markup', {});
1460
+ Prism.languages.ssml = Prism.languages.xml;
1461
+ Prism.languages.atom = Prism.languages.xml;
1462
+ Prism.languages.rss = Prism.languages.xml;
1463
+
1464
+
1465
+ /* **********************************************
1466
+ Begin prism-css.js
1467
+ ********************************************** */
1468
+
1469
+ (function (Prism) {
1470
+
1471
+ var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1472
+
1473
+ Prism.languages.css = {
1474
+ 'comment': /\/\*[\s\S]*?\*\//,
1475
+ 'atrule': {
1476
+ pattern: RegExp('@[\\w-](?:' + /[^;{\s"']|\s+(?!\s)/.source + '|' + string.source + ')*?' + /(?:;|(?=\s*\{))/.source),
1477
+ inside: {
1478
+ 'rule': /^@[\w-]+/,
1479
+ 'selector-function-argument': {
1480
+ pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
1481
+ lookbehind: true,
1482
+ alias: 'selector'
1483
+ },
1484
+ 'keyword': {
1485
+ pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
1486
+ lookbehind: true
1487
+ }
1488
+ // See rest below
1489
+ }
1490
+ },
1491
+ 'url': {
1492
+ // https://drafts.csswg.org/css-values-3/#urls
1493
+ pattern: RegExp('\\burl\\((?:' + string.source + '|' + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ')\\)', 'i'),
1494
+ greedy: true,
1495
+ inside: {
1496
+ 'function': /^url/i,
1497
+ 'punctuation': /^\(|\)$/,
1498
+ 'string': {
1499
+ pattern: RegExp('^' + string.source + '$'),
1500
+ alias: 'url'
1501
+ }
1502
+ }
1503
+ },
1504
+ 'selector': {
1505
+ pattern: RegExp('(^|[{}\\s])[^{}\\s](?:[^{};"\'\\s]|\\s+(?![\\s{])|' + string.source + ')*(?=\\s*\\{)'),
1506
+ lookbehind: true
1507
+ },
1508
+ 'string': {
1509
+ pattern: string,
1510
+ greedy: true
1511
+ },
1512
+ 'property': {
1513
+ pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
1514
+ lookbehind: true
1515
+ },
1516
+ 'important': /!important\b/i,
1517
+ 'function': {
1518
+ pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
1519
+ lookbehind: true
1520
+ },
1521
+ 'punctuation': /[(){};:,]/
1522
+ };
1523
+
1524
+ Prism.languages.css['atrule'].inside.rest = Prism.languages.css;
1525
+
1526
+ var markup = Prism.languages.markup;
1527
+ if (markup) {
1528
+ markup.tag.addInlined('style', 'css');
1529
+ markup.tag.addAttribute('style', 'css');
1530
+ }
1531
+
1532
+ }(Prism));
1533
+
1534
+
1535
+ /* **********************************************
1536
+ Begin prism-clike.js
1537
+ ********************************************** */
1538
+
1539
+ Prism.languages.clike = {
1540
+ 'comment': [
1541
+ {
1542
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
1543
+ lookbehind: true,
1544
+ greedy: true
1545
+ },
1546
+ {
1547
+ pattern: /(^|[^\\:])\/\/.*/,
1548
+ lookbehind: true,
1549
+ greedy: true
1550
+ }
1551
+ ],
1552
+ 'string': {
1553
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
1554
+ greedy: true
1555
+ },
1556
+ 'class-name': {
1557
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
1558
+ lookbehind: true,
1559
+ inside: {
1560
+ 'punctuation': /[.\\]/
1561
+ }
1562
+ },
1563
+ 'keyword': /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
1564
+ 'boolean': /\b(?:false|true)\b/,
1565
+ 'function': /\b\w+(?=\()/,
1566
+ 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
1567
+ 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
1568
+ 'punctuation': /[{}[\];(),.:]/
1569
+ };
1570
+
1571
+
1572
+ /* **********************************************
1573
+ Begin prism-javascript.js
1574
+ ********************************************** */
1575
+
1576
+ Prism.languages.javascript = Prism.languages.extend('clike', {
1577
+ 'class-name': [
1578
+ Prism.languages.clike['class-name'],
1579
+ {
1580
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1581
+ lookbehind: true
1582
+ }
1583
+ ],
1584
+ 'keyword': [
1585
+ {
1586
+ pattern: /((?:^|\})\s*)catch\b/,
1587
+ lookbehind: true
1588
+ },
1589
+ {
1590
+ pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
1591
+ lookbehind: true
1592
+ },
1593
+ ],
1594
+ // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
1595
+ 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1596
+ 'number': {
1597
+ pattern: RegExp(
1598
+ /(^|[^\w$])/.source +
1599
+ '(?:' +
1600
+ (
1601
+ // constant
1602
+ /NaN|Infinity/.source +
1603
+ '|' +
1604
+ // binary integer
1605
+ /0[bB][01]+(?:_[01]+)*n?/.source +
1606
+ '|' +
1607
+ // octal integer
1608
+ /0[oO][0-7]+(?:_[0-7]+)*n?/.source +
1609
+ '|' +
1610
+ // hexadecimal integer
1611
+ /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source +
1612
+ '|' +
1613
+ // decimal bigint
1614
+ /\d+(?:_\d+)*n/.source +
1615
+ '|' +
1616
+ // decimal number (integer or float) but no bigint
1617
+ /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source
1618
+ ) +
1619
+ ')' +
1620
+ /(?![\w$])/.source
1621
+ ),
1622
+ lookbehind: true
1623
+ },
1624
+ 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1625
+ });
1626
+
1627
+ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
1628
+
1629
+ Prism.languages.insertBefore('javascript', 'keyword', {
1630
+ 'regex': {
1631
+ pattern: RegExp(
1632
+ // lookbehind
1633
+ // eslint-disable-next-line regexp/no-dupe-characters-character-class
1634
+ /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source +
1635
+ // Regex pattern:
1636
+ // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
1637
+ // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
1638
+ // with the only syntax, so we have to define 2 different regex patterns.
1639
+ /\//.source +
1640
+ '(?:' +
1641
+ /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source +
1642
+ '|' +
1643
+ // `v` flag syntax. This supports 3 levels of nested character classes.
1644
+ /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source +
1645
+ ')' +
1646
+ // lookahead
1647
+ /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
1648
+ ),
1649
+ lookbehind: true,
1650
+ greedy: true,
1651
+ inside: {
1652
+ 'regex-source': {
1653
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1654
+ lookbehind: true,
1655
+ alias: 'language-regex',
1656
+ inside: Prism.languages.regex
1657
+ },
1658
+ 'regex-delimiter': /^\/|\/$/,
1659
+ 'regex-flags': /^[a-z]+$/,
1660
+ }
1661
+ },
1662
+ // This must be declared before keyword because we use "function" inside the look-forward
1663
+ 'function-variable': {
1664
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
1665
+ alias: 'function'
1666
+ },
1667
+ 'parameter': [
1668
+ {
1669
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1670
+ lookbehind: true,
1671
+ inside: Prism.languages.javascript
1672
+ },
1673
+ {
1674
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1675
+ lookbehind: true,
1676
+ inside: Prism.languages.javascript
1677
+ },
1678
+ {
1679
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1680
+ lookbehind: true,
1681
+ inside: Prism.languages.javascript
1682
+ },
1683
+ {
1684
+ pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
1685
+ lookbehind: true,
1686
+ inside: Prism.languages.javascript
1687
+ }
1688
+ ],
1689
+ 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1690
+ });
1691
+
1692
+ Prism.languages.insertBefore('javascript', 'string', {
1693
+ 'hashbang': {
1694
+ pattern: /^#!.*/,
1695
+ greedy: true,
1696
+ alias: 'comment'
1697
+ },
1698
+ 'template-string': {
1699
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1700
+ greedy: true,
1701
+ inside: {
1702
+ 'template-punctuation': {
1703
+ pattern: /^`|`$/,
1704
+ alias: 'string'
1705
+ },
1706
+ 'interpolation': {
1707
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1708
+ lookbehind: true,
1709
+ inside: {
1710
+ 'interpolation-punctuation': {
1711
+ pattern: /^\$\{|\}$/,
1712
+ alias: 'punctuation'
1713
+ },
1714
+ rest: Prism.languages.javascript
1715
+ }
1716
+ },
1717
+ 'string': /[\s\S]+/
1718
+ }
1719
+ },
1720
+ 'string-property': {
1721
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1722
+ lookbehind: true,
1723
+ greedy: true,
1724
+ alias: 'property'
1725
+ }
1726
+ });
1727
+
1728
+ Prism.languages.insertBefore('javascript', 'operator', {
1729
+ 'literal-property': {
1730
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1731
+ lookbehind: true,
1732
+ alias: 'property'
1733
+ },
1734
+ });
1735
+
1736
+ if (Prism.languages.markup) {
1737
+ Prism.languages.markup.tag.addInlined('script', 'javascript');
1738
+
1739
+ // add attribute support for all DOM events.
1740
+ // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events
1741
+ Prism.languages.markup.tag.addAttribute(
1742
+ /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
1743
+ 'javascript'
1744
+ );
1745
+ }
1746
+
1747
+ Prism.languages.js = Prism.languages.javascript;
1748
+
1749
+
1750
+ /* **********************************************
1751
+ Begin prism-file-highlight.js
1752
+ ********************************************** */
1753
+
1754
+ (function () {
1755
+
1756
+ if (typeof Prism === 'undefined' || typeof document === 'undefined') {
1757
+ return;
1758
+ }
1759
+
1760
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill
1761
+ if (!Element.prototype.matches) {
1762
+ Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
1763
+ }
1764
+
1765
+ var LOADING_MESSAGE = 'Loading…';
1766
+ var FAILURE_MESSAGE = function (status, message) {
1767
+ return '✖ Error ' + status + ' while fetching file: ' + message;
1768
+ };
1769
+ var FAILURE_EMPTY_MESSAGE = '✖ Error: File does not exist or is empty';
1770
+
1771
+ var EXTENSIONS = {
1772
+ 'js': 'javascript',
1773
+ 'py': 'python',
1774
+ 'rb': 'ruby',
1775
+ 'ps1': 'powershell',
1776
+ 'psm1': 'powershell',
1777
+ 'sh': 'bash',
1778
+ 'bat': 'batch',
1779
+ 'h': 'c',
1780
+ 'tex': 'latex'
1781
+ };
1782
+
1783
+ var STATUS_ATTR = 'data-src-status';
1784
+ var STATUS_LOADING = 'loading';
1785
+ var STATUS_LOADED = 'loaded';
1786
+ var STATUS_FAILED = 'failed';
1787
+
1788
+ var SELECTOR = 'pre[data-src]:not([' + STATUS_ATTR + '="' + STATUS_LOADED + '"])'
1789
+ + ':not([' + STATUS_ATTR + '="' + STATUS_LOADING + '"])';
1790
+
1791
+ /**
1792
+ * Loads the given file.
1793
+ *
1794
+ * @param {string} src The URL or path of the source file to load.
1795
+ * @param {(result: string) => void} success
1796
+ * @param {(reason: string) => void} error
1797
+ */
1798
+ function loadFile(src, success, error) {
1799
+ var xhr = new XMLHttpRequest();
1800
+ xhr.open('GET', src, true);
1801
+ xhr.onreadystatechange = function () {
1802
+ if (xhr.readyState == 4) {
1803
+ if (xhr.status < 400 && xhr.responseText) {
1804
+ success(xhr.responseText);
1805
+ } else {
1806
+ if (xhr.status >= 400) {
1807
+ error(FAILURE_MESSAGE(xhr.status, xhr.statusText));
1808
+ } else {
1809
+ error(FAILURE_EMPTY_MESSAGE);
1810
+ }
1811
+ }
1812
+ }
1813
+ };
1814
+ xhr.send(null);
1815
+ }
1816
+
1817
+ /**
1818
+ * Parses the given range.
1819
+ *
1820
+ * This returns a range with inclusive ends.
1821
+ *
1822
+ * @param {string | null | undefined} range
1823
+ * @returns {[number, number | undefined] | undefined}
1824
+ */
1825
+ function parseRange(range) {
1826
+ var m = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(range || '');
1827
+ if (m) {
1828
+ var start = Number(m[1]);
1829
+ var comma = m[2];
1830
+ var end = m[3];
1831
+
1832
+ if (!comma) {
1833
+ return [start, start];
1834
+ }
1835
+ if (!end) {
1836
+ return [start, undefined];
1837
+ }
1838
+ return [start, Number(end)];
1839
+ }
1840
+ return undefined;
1841
+ }
1842
+
1843
+ Prism.hooks.add('before-highlightall', function (env) {
1844
+ env.selector += ', ' + SELECTOR;
1845
+ });
1846
+
1847
+ Prism.hooks.add('before-sanity-check', function (env) {
1848
+ var pre = /** @type {HTMLPreElement} */ (env.element);
1849
+ if (pre.matches(SELECTOR)) {
1850
+ env.code = ''; // fast-path the whole thing and go to complete
1851
+
1852
+ pre.setAttribute(STATUS_ATTR, STATUS_LOADING); // mark as loading
1853
+
1854
+ // add code element with loading message
1855
+ var code = pre.appendChild(document.createElement('CODE'));
1856
+ code.textContent = LOADING_MESSAGE;
1857
+
1858
+ var src = pre.getAttribute('data-src');
1859
+
1860
+ var language = env.language;
1861
+ if (language === 'none') {
1862
+ // the language might be 'none' because there is no language set;
1863
+ // in this case, we want to use the extension as the language
1864
+ var extension = (/\.(\w+)$/.exec(src) || [, 'none'])[1];
1865
+ language = EXTENSIONS[extension] || extension;
1866
+ }
1867
+
1868
+ // set language classes
1869
+ Prism.util.setLanguage(code, language);
1870
+ Prism.util.setLanguage(pre, language);
1871
+
1872
+ // preload the language
1873
+ var autoloader = Prism.plugins.autoloader;
1874
+ if (autoloader) {
1875
+ autoloader.loadLanguages(language);
1876
+ }
1877
+
1878
+ // load file
1879
+ loadFile(
1880
+ src,
1881
+ function (text) {
1882
+ // mark as loaded
1883
+ pre.setAttribute(STATUS_ATTR, STATUS_LOADED);
1884
+
1885
+ // handle data-range
1886
+ var range = parseRange(pre.getAttribute('data-range'));
1887
+ if (range) {
1888
+ var lines = text.split(/\r\n?|\n/g);
1889
+
1890
+ // the range is one-based and inclusive on both ends
1891
+ var start = range[0];
1892
+ var end = range[1] == null ? lines.length : range[1];
1893
+
1894
+ if (start < 0) { start += lines.length; }
1895
+ start = Math.max(0, Math.min(start - 1, lines.length));
1896
+ if (end < 0) { end += lines.length; }
1897
+ end = Math.max(0, Math.min(end, lines.length));
1898
+
1899
+ text = lines.slice(start, end).join('\n');
1900
+
1901
+ // add data-start for line numbers
1902
+ if (!pre.hasAttribute('data-start')) {
1903
+ pre.setAttribute('data-start', String(start + 1));
1904
+ }
1905
+ }
1906
+
1907
+ // highlight code
1908
+ code.textContent = text;
1909
+ Prism.highlightElement(code);
1910
+ },
1911
+ function (error) {
1912
+ // mark as failed
1913
+ pre.setAttribute(STATUS_ATTR, STATUS_FAILED);
1914
+
1915
+ code.textContent = error;
1916
+ }
1917
+ );
1918
+ }
1919
+ });
1920
+
1921
+ Prism.plugins.fileHighlight = {
1922
+ /**
1923
+ * Executes the File Highlight plugin for all matching `pre` elements under the given container.
1924
+ *
1925
+ * Note: Elements which are already loaded or currently loading will not be touched by this method.
1926
+ *
1927
+ * @param {ParentNode} [container=document]
1928
+ */
1929
+ highlight: function highlight(container) {
1930
+ var elements = (container || document).querySelectorAll(SELECTOR);
1931
+
1932
+ for (var i = 0, element; (element = elements[i++]);) {
1933
+ Prism.highlightElement(element);
1934
+ }
1935
+ }
1936
+ };
1937
+
1938
+ var logged = false;
1939
+ /** @deprecated Use `Prism.plugins.fileHighlight.highlight` instead. */
1940
+ Prism.fileHighlight = function () {
1941
+ if (!logged) {
1942
+ console.warn('Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.');
1943
+ logged = true;
1944
+ }
1945
+ Prism.plugins.fileHighlight.highlight.apply(this, arguments);
1946
+ };
1947
+
1948
+ }());
1949
+
1950
+
1951
+ /* --- c --- */
1952
+ Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;
1953
+
1954
+ /* --- cpp --- */
1955
+ !function(e){var t=/\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/,n="\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+".replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>".replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism);
1956
+
1957
+ /* --- python --- */
1958
+ Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;
1959
+
1960
+ /* --- bash --- */
1961
+ !function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i<s.length;i++)o[s[i]]=e.languages.bash[s[i]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism);
1962
+
1963
+ /* --- json --- */
1964
+ Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;
1965
+
1966
+ /* --- yaml --- */
1967
+ !function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(/<PLAIN>/g,(function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"})),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<<prop>>/g,(function(){return t})).replace(/<<value>>/g,(function(){return e}));return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<<prop>>/g,(function(){return t}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)".replace(/<<prop>>/g,(function(){return t})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+d+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism);
1968
+
1969
+ /* --- typescript --- */
1970
+ !function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);
1971
+
1972
+ /* --- jsx --- */
1973
+ !function(t){var n=t.util.clone(t.languages.javascript),e="(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";function a(t,n){return t=t.replace(/<S>/g,(function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"})).replace(/<BRACES>/g,(function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"})).replace(/<SPREAD>/g,(function(){return e})),RegExp(t,n)}e=a(e).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=a("</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>"),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:a("<SPREAD>"),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a("=<BRACES>"),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var s=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(s).join(""):""},g=function(n){for(var e=[],a=0;a<n.length;a++){var o=n[a],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?e.length>0&&e[e.length-1].tagName===s(o.content[0].content[1])&&e.pop():"/>"===o.content[o.content.length-1].content||e.push({tagName:s(o.content[0].content[1]),openedBraces:0}):e.length>0&&"punctuation"===o.type&&"{"===o.content?e[e.length-1].openedBraces++:e.length>0&&e[e.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?e[e.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&e.length>0&&0===e[e.length-1].openedBraces){var r=s(o);a<n.length-1&&("string"==typeof n[a+1]||"plain-text"===n[a+1].type)&&(r+=s(n[a+1]),n.splice(a+1,1)),a>0&&("string"==typeof n[a-1]||"plain-text"===n[a-1].type)&&(r=s(n[a-1])+r,n.splice(a-1,1),a--),n[a]=new t.Token("plain-text",r,null,r)}o.content&&"string"!=typeof o.content&&g(o.content)}};t.hooks.add("after-tokenize",(function(t){"jsx"!==t.language&&"tsx"!==t.language||g(t.tokens)}))}(Prism);
1974
+
1975
+ /* --- java --- */
1976
+ !function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp("(^|[^\\w.])"+t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp("(^|[^\\w.])"+t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)"),lookbehind:!0,inside:s.inside},{pattern:RegExp("(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)"+t+"[A-Z]\\w*\\b"),lookbehind:!0,inside:s.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp("(\\bimport\\s+)"+t+"(?:[A-Z]\\w*|\\*)(?=\\s*;)"),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp("(\\bimport\\s+static\\s+)"+t+"(?:\\w+|\\*)(?=\\s*;)"),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(/<keyword>/g,(function(){return n.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);
1977
+
1978
+ /* --- rust --- */
1979
+ !function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/",t=0;t<2;t++)a=a.replace(/<self>/g,(function(){return a}));a=a.replace(/<self>/g,(function(){return"[^\\s\\S]"})),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism);
1980
+
1981
+ /* --- go --- */
1982
+ Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];
1983
+
1984
+ /* --- sql --- */
1985
+ Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};
1986
+
1987
+ /* --- latex --- */
1988
+ !function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},a.languages.tex=a.languages.latex,a.languages.context=a.languages.latex}(Prism);
1989
+
1990
+ /* --- diff --- */
1991
+ !function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach((function(a){var i=n[a],r=[];/^\w+$/.test(a)||r.push(/\w+/.exec(a)[0]),"diff"===a&&r.push("bold"),e.languages.diff[a]={pattern:RegExp("^(?:["+i+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:r,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(a)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:n})}(Prism);
1992
+
1993
+ /* --- markdown --- */
1994
+ !function(n){function e(n){return n=n.replace(/<inner>/g,(function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"})),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var t="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",a="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,(function(){return t})),i="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(t),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(t),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e("\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e("\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:e("(~~?)(?:(?!~)<inner>)+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:e('!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\])<inner>)+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(t){e!==t&&(n.languages.markdown[e].inside.content.inside[t]=n.languages.markdown[t])}))})),n.hooks.add("after-tokenize",(function(n){"markdown"!==n.language&&"md"!==n.language||function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t<a;t++){var i=e[t];if("code"===i.type){var r=i.content[1],o=i.content[3];if(r&&o&&"code-language"===r.type&&"code-block"===o.type&&"string"==typeof r.content){var l=r.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(l=(/[a-z][\w-]*/i.exec(l)||[""])[0].toLowerCase());o.alias?"string"==typeof o.alias?o.alias=[o.alias,s]:o.alias.push(s):o.alias=[s]}}else n(i.content)}}(n.tokens)})),n.hooks.add("wrap",(function(e){if("code-block"===e.type){for(var t="",a=0,i=e.classes.length;a<i;a++){var s=e.classes[a],d=/language-(.+)/.exec(s);if(d){t=d[1];break}}var p=n.languages[t];if(p)e.content=n.highlight(e.content.replace(r,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(n,e){var t;return"#"===(e=e.toLowerCase())[0]?(t="x"===e[1]?parseInt(e.slice(2),16):Number(e.slice(1)),l(t)):o[e]||n})),p,t);else if(t&&"none"!==t&&n.plugins.autoloader){var u="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());e.attributes.id=u,n.plugins.autoloader.loadLanguages(t,(function(){var e=document.getElementById(u);e&&(e.innerHTML=n.highlight(e.textContent,n.languages[t],t))}))}}}));var r=RegExp(n.languages.markup.tag.pattern.source,"gi"),o={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;n.languages.md=n.languages.markdown}(Prism);
1995
+
1996
+ /* --- ruby --- */
1997
+ !function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\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/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\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/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism);
1998
+
1999
+ /* --- markup-templating --- */
2000
+ !function(e){function n(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,a,r,o){if(t.language===a){var c=t.tokenStack=[];t.code=t.code.replace(r,(function(e){if("function"==typeof o&&!o(e))return e;for(var r,i=c.length;-1!==t.code.indexOf(r=n(a,i));)++i;return c[i]=e,r})),t.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(t,a){if(t.language===a&&t.tokenStack){t.grammar=e.languages[a];var r=0,o=Object.keys(t.tokenStack);!function c(i){for(var u=0;u<i.length&&!(r>=o.length);u++){var g=i[u];if("string"==typeof g||g.content&&"string"==typeof g.content){var l=o[r],s=t.tokenStack[l],f="string"==typeof g?g:g.content,p=n(a,l),k=f.indexOf(p);if(k>-1){++r;var m=f.substring(0,k),d=new e.Token(a,e.tokenize(s,t.grammar),"language-"+a,s),h=f.substring(k+p.length),v=[];m&&v.push.apply(v,c([m])),v.push(d),h&&v.push.apply(v,c([h])),"string"==typeof g?i.splice.apply(i,[u,1].concat(v)):g.content=v}}else g.content&&c(g.content)}return i}(t.tokens)}}}})}(Prism);
2001
+
2002
+ /* --- php --- */
2003
+ !function(e){var a=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:a,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:a,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(a){/<\?/.test(a.code)&&e.languages["markup-templating"].buildPlaceholders(a,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")}))}(Prism);
2004
+
2005
+ /* --- swift --- */
2006
+ Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));
2007
+
2008
+ /* --- toml --- */
2009
+ !function(e){function n(e){return e.replace(/__/g,(function(){return"(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\\\.|[^\\\\\"\r\n])*\")"}))}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n("(^[\t ]*\\[\\s*(?:\\[\\s*)?)__(?:\\s*\\.\\s*__)*(?=\\s*\\])"),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n("(^[\t ]*|[{,]\\s*)__(?:\\s*\\.\\s*__)*(?=\\s*=)"),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}(Prism);