jodit-pro 1.2.1

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 (69) hide show
  1. package/LICENSE.md +3 -0
  2. package/README.md +80 -0
  3. package/build/config.js +25 -0
  4. package/build/jodit.css +1 -0
  5. package/build/jodit.es5.css +8 -0
  6. package/build/jodit.es5.js +10 -0
  7. package/build/jodit.fat.css +1 -0
  8. package/build/jodit.fat.es5.css +1 -0
  9. package/build/jodit.fat.es5.js +10 -0
  10. package/build/jodit.fat.js +10 -0
  11. package/build/jodit.js +10 -0
  12. package/build/plugins/autocomplete/autocomplete.css +1 -0
  13. package/build/plugins/autocomplete/autocomplete.es5.css +1 -0
  14. package/build/plugins/autocomplete/autocomplete.es5.js +10 -0
  15. package/build/plugins/autocomplete/autocomplete.js +10 -0
  16. package/build/plugins/backup/backup.css +1 -0
  17. package/build/plugins/backup/backup.es5.css +1 -0
  18. package/build/plugins/backup/backup.es5.js +10 -0
  19. package/build/plugins/backup/backup.js +10 -0
  20. package/build/plugins/button-generator/button-generator.css +1 -0
  21. package/build/plugins/button-generator/button-generator.es5.css +1 -0
  22. package/build/plugins/button-generator/button-generator.es5.js +10 -0
  23. package/build/plugins/button-generator/button-generator.js +10 -0
  24. package/build/plugins/change-case/change-case.es5.js +10 -0
  25. package/build/plugins/change-case/change-case.js +10 -0
  26. package/build/plugins/color-picker/color-picker.css +1 -0
  27. package/build/plugins/color-picker/color-picker.es5.css +1 -0
  28. package/build/plugins/color-picker/color-picker.es5.js +10 -0
  29. package/build/plugins/color-picker/color-picker.js +10 -0
  30. package/build/plugins/emoji/emoji.css +1 -0
  31. package/build/plugins/emoji/emoji.es5.css +1 -0
  32. package/build/plugins/emoji/emoji.es5.js +10 -0
  33. package/build/plugins/emoji/emoji.js +10 -0
  34. package/build/plugins/finder/finder.css +1 -0
  35. package/build/plugins/finder/finder.es5.css +1 -0
  36. package/build/plugins/finder/finder.es5.js +10 -0
  37. package/build/plugins/finder/finder.js +10 -0
  38. package/build/plugins/google-search/google-search.es5.js +10 -0
  39. package/build/plugins/google-search/google-search.js +10 -0
  40. package/build/plugins/keyboard/keyboard.css +1 -0
  41. package/build/plugins/keyboard/keyboard.es5.css +1 -0
  42. package/build/plugins/keyboard/keyboard.es5.js +10 -0
  43. package/build/plugins/keyboard/keyboard.js +10 -0
  44. package/build/plugins/paste-code/paste-code.es5.js +10 -0
  45. package/build/plugins/paste-code/paste-code.js +10 -0
  46. package/build/plugins/show-blocks/show-blocks.es5.js +10 -0
  47. package/build/plugins/show-blocks/show-blocks.js +10 -0
  48. package/build/plugins/tune-block/tune-block.css +1 -0
  49. package/build/plugins/tune-block/tune-block.es5.css +1 -0
  50. package/build/plugins/tune-block/tune-block.es5.js +10 -0
  51. package/build/plugins/tune-block/tune-block.js +10 -0
  52. package/examples/arabic.lang.html +76 -0
  53. package/examples/assets/app.css +175 -0
  54. package/examples/assets/app.js +57 -0
  55. package/examples/assets/download.jpg +0 -0
  56. package/examples/assets/icon.png +0 -0
  57. package/examples/assets/logo.png +0 -0
  58. package/examples/assets/prism.css +200 -0
  59. package/examples/assets/prism.js +1254 -0
  60. package/examples/color-picker.html +139 -0
  61. package/examples/custom-icons.html +173 -0
  62. package/examples/custom-toolbar.html +80 -0
  63. package/examples/example.default.html +75 -0
  64. package/examples/fullsize.html +75 -0
  65. package/examples/index.html +176 -0
  66. package/examples/inline-mode.html +116 -0
  67. package/examples/oneinstance.html +125 -0
  68. package/index.html +123 -0
  69. package/package.json +26 -0
@@ -0,0 +1,1254 @@
1
+ /*!
2
+ * Jodit Editor (https://xdsoft.net/jodit/)
3
+ * Released under MIT see LICENSE.txt in the project root for license information.
4
+ * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ var _self =
7
+ 'undefined' !== typeof window
8
+ ? window
9
+ : 'undefined' !== typeof WorkerGlobalScope &&
10
+ self instanceof WorkerGlobalScope
11
+ ? self
12
+ : {},
13
+ Prism = (function () {
14
+ var e = /\blang(?:uage)?-([\w-]+)\b/i,
15
+ t = 0,
16
+ n = (_self.Prism = {
17
+ manual: _self.Prism && _self.Prism.manual,
18
+ disableWorkerMessageHandler:
19
+ _self.Prism && _self.Prism.disableWorkerMessageHandler,
20
+ util: {
21
+ encode: function (e) {
22
+ return e instanceof r
23
+ ? new r(e.type, n.util.encode(e.content), e.alias)
24
+ : 'Array' === n.util.type(e)
25
+ ? e.map(n.util.encode)
26
+ : e
27
+ .replace(/&/g, '&')
28
+ .replace(/</g, '&lt;')
29
+ .replace(/\u00a0/g, ' ');
30
+ },
31
+ type: function (e) {
32
+ return Object.prototype.toString
33
+ .call(e)
34
+ .match(/\[object (\w+)\]/)[1];
35
+ },
36
+ objId: function (e) {
37
+ return (
38
+ e.__id ||
39
+ Object.defineProperty(e, '__id', {
40
+ value: ++t
41
+ }),
42
+ e.__id
43
+ );
44
+ },
45
+ clone: function (e, t) {
46
+ var r = n.util.type(e);
47
+ switch (((t = t || {}), r)) {
48
+ case 'Object':
49
+ if (t[n.util.objId(e)]) {
50
+ return t[n.util.objId(e)];
51
+ }
52
+ var a = {};
53
+ t[n.util.objId(e)] = a;
54
+ for (var l in e) {
55
+ e.hasOwnProperty(l) &&
56
+ (a[l] = n.util.clone(e[l], t));
57
+ }
58
+ return a;
59
+ case 'Array':
60
+ if (t[n.util.objId(e)]) {
61
+ return t[n.util.objId(e)];
62
+ }
63
+ var a = [];
64
+ return (
65
+ (t[n.util.objId(e)] = a),
66
+ e.forEach(function (e, r) {
67
+ a[r] = n.util.clone(e, t);
68
+ }),
69
+ a
70
+ );
71
+ }
72
+ return e;
73
+ }
74
+ },
75
+ languages: {
76
+ extend: function (e, t) {
77
+ var r = n.util.clone(n.languages[e]);
78
+ for (var a in t) {
79
+ r[a] = t[a];
80
+ }
81
+ return r;
82
+ },
83
+ insertBefore: function (e, t, r, a) {
84
+ a = a || n.languages;
85
+ var l = a[e];
86
+ if (2 == arguments.length) {
87
+ r = arguments[1];
88
+ for (var i in r) {
89
+ r.hasOwnProperty(i) && (l[i] = r[i]);
90
+ }
91
+ return l;
92
+ }
93
+ var o = {};
94
+ for (var s in l) {
95
+ if (l.hasOwnProperty(s)) {
96
+ if (s == t) {
97
+ for (var i in r) {
98
+ r.hasOwnProperty(i) && (o[i] = r[i]);
99
+ }
100
+ }
101
+ o[s] = l[s];
102
+ }
103
+ }
104
+ return (
105
+ n.languages.DFS(n.languages, function (t, n) {
106
+ n === a[e] && t != e && (this[t] = o);
107
+ }),
108
+ (a[e] = o)
109
+ );
110
+ },
111
+ DFS: function (e, t, r, a) {
112
+ a = a || {};
113
+ for (var l in e) {
114
+ e.hasOwnProperty(l) &&
115
+ (t.call(e, l, e[l], r || l),
116
+ 'Object' !== n.util.type(e[l]) ||
117
+ a[n.util.objId(e[l])]
118
+ ? 'Array' !== n.util.type(e[l]) ||
119
+ a[n.util.objId(e[l])] ||
120
+ ((a[n.util.objId(e[l])] = !0),
121
+ n.languages.DFS(e[l], t, l, a))
122
+ : ((a[n.util.objId(e[l])] = !0),
123
+ n.languages.DFS(e[l], t, null, a)));
124
+ }
125
+ }
126
+ },
127
+ plugins: {},
128
+ highlightAll: function (e, t) {
129
+ n.highlightAllUnder(document, e, t);
130
+ },
131
+ highlightAllUnder: function (e, t, r) {
132
+ var a = {
133
+ callback: r,
134
+ selector:
135
+ 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
136
+ };
137
+ n.hooks.run('before-highlightall', a);
138
+ for (
139
+ var l,
140
+ i = a.elements || e.querySelectorAll(a.selector),
141
+ o = 0;
142
+ (l = i[o++]);
143
+
144
+ ) {
145
+ n.highlightElement(l, t === !0, a.callback);
146
+ }
147
+ },
148
+ highlightElement: function (t, r, a) {
149
+ for (var l, i, o = t; o && !e.test(o.className); ) {
150
+ o = o.parentNode;
151
+ }
152
+ o &&
153
+ ((l = (o.className.match(e) || [
154
+ ,
155
+ ''
156
+ ])[1].toLowerCase()),
157
+ (i = n.languages[l])),
158
+ (t.className =
159
+ t.className.replace(e, '').replace(/\s+/g, ' ') +
160
+ ' language-' +
161
+ l),
162
+ t.parentNode &&
163
+ ((o = t.parentNode),
164
+ /pre/i.test(o.nodeName) &&
165
+ (o.className =
166
+ o.className
167
+ .replace(e, '')
168
+ .replace(/\s+/g, ' ') +
169
+ ' language-' +
170
+ l));
171
+ var s = t.textContent,
172
+ u = { element: t, language: l, grammar: i, code: s };
173
+ if (
174
+ (n.hooks.run('before-sanity-check', u),
175
+ !u.code || !u.grammar)
176
+ ) {
177
+ return (
178
+ u.code &&
179
+ (n.hooks.run('before-highlight', u),
180
+ (u.element.textContent = u.code),
181
+ n.hooks.run('after-highlight', u)),
182
+ n.hooks.run('complete', u),
183
+ void 0
184
+ );
185
+ }
186
+ if (
187
+ (n.hooks.run('before-highlight', u), r && _self.Worker)
188
+ ) {
189
+ var g = new Worker(n.filename);
190
+ (g.onmessage = function (e) {
191
+ (u.highlightedCode = e.data),
192
+ n.hooks.run('before-insert', u),
193
+ (u.element.innerHTML = u.highlightedCode),
194
+ a && a.call(u.element),
195
+ n.hooks.run('after-highlight', u),
196
+ n.hooks.run('complete', u);
197
+ }),
198
+ g.postMessage(
199
+ JSON.stringify({
200
+ language: u.language,
201
+ code: u.code,
202
+ immediateClose: !0
203
+ })
204
+ );
205
+ } else {
206
+ (u.highlightedCode = n.highlight(
207
+ u.code,
208
+ u.grammar,
209
+ u.language
210
+ )),
211
+ n.hooks.run('before-insert', u),
212
+ (u.element.innerHTML = u.highlightedCode),
213
+ a && a.call(t),
214
+ n.hooks.run('after-highlight', u),
215
+ n.hooks.run('complete', u);
216
+ }
217
+ },
218
+ highlight: function (e, t, a) {
219
+ var l = { code: e, grammar: t, language: a };
220
+ return (
221
+ n.hooks.run('before-tokenize', l),
222
+ (l.tokens = n.tokenize(l.code, l.grammar)),
223
+ n.hooks.run('after-tokenize', l),
224
+ r.stringify(n.util.encode(l.tokens), l.language)
225
+ );
226
+ },
227
+ matchGrammar: function (e, t, r, a, l, i, o) {
228
+ var s = n.Token;
229
+ for (var u in r) {
230
+ if (r.hasOwnProperty(u) && r[u]) {
231
+ if (u == o) {
232
+ return;
233
+ }
234
+ var g = r[u];
235
+ g = 'Array' === n.util.type(g) ? g : [g];
236
+ for (var c = 0; c < g.length; ++c) {
237
+ var h = g[c],
238
+ f = h.inside,
239
+ d = Boolean(h.lookbehind),
240
+ m = Boolean(h.greedy),
241
+ p = 0,
242
+ y = h.alias;
243
+ if (m && !h.pattern.global) {
244
+ var v = h.pattern
245
+ .toString()
246
+ .match(/[imuy]*$/)[0];
247
+ h.pattern = RegExp(
248
+ h.pattern.source,
249
+ v + 'g'
250
+ );
251
+ }
252
+ h = h.pattern || h;
253
+ for (
254
+ var b = a, k = l;
255
+ b < t.length;
256
+ k += t[b].length, ++b
257
+ ) {
258
+ var w = t[b];
259
+ if (t.length > e.length) {
260
+ return;
261
+ }
262
+ if (!(w instanceof s)) {
263
+ if (m && b != t.length - 1) {
264
+ h.lastIndex = k;
265
+ var _ = h.exec(e);
266
+ if (!_) {
267
+ break;
268
+ }
269
+ for (
270
+ var j =
271
+ _.index +
272
+ (d ? _[1].length : 0),
273
+ P = _.index + _[0].length,
274
+ A = b,
275
+ x = k,
276
+ O = t.length;
277
+ O > A &&
278
+ (P > x ||
279
+ (!t[A].type &&
280
+ !t[A - 1].greedy));
281
+ ++A
282
+ ) {
283
+ (x += t[A].length),
284
+ j >= x && (++b, (k = x));
285
+ }
286
+ if (t[b] instanceof s) {
287
+ continue;
288
+ }
289
+ (I = A - b),
290
+ (w = e.slice(k, x)),
291
+ (_.index -= k);
292
+ } else {
293
+ h.lastIndex = 0;
294
+ var _ = h.exec(w),
295
+ I = 1;
296
+ }
297
+ if (_) {
298
+ d && (p = _[1] ? _[1].length : 0);
299
+ var j = _.index + p,
300
+ _ = _[0].slice(p),
301
+ P = j + _.length,
302
+ N = w.slice(0, j),
303
+ S = w.slice(P),
304
+ C = [b, I];
305
+ N &&
306
+ (++b,
307
+ (k += N.length),
308
+ C.push(N));
309
+ var E = new s(
310
+ u,
311
+ f ? n.tokenize(_, f) : _,
312
+ y,
313
+ _,
314
+ m
315
+ );
316
+ if (
317
+ (C.push(E),
318
+ S && C.push(S),
319
+ Array.prototype.splice.apply(
320
+ t,
321
+ C
322
+ ),
323
+ 1 != I &&
324
+ n.matchGrammar(
325
+ e,
326
+ t,
327
+ r,
328
+ b,
329
+ k,
330
+ !0,
331
+ u
332
+ ),
333
+ i)
334
+ ) {
335
+ break;
336
+ }
337
+ } else if (i) {
338
+ break;
339
+ }
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
345
+ },
346
+ tokenize: function (e, t) {
347
+ var r = [e],
348
+ a = t.rest;
349
+ if (a) {
350
+ for (var l in a) {
351
+ t[l] = a[l];
352
+ }
353
+ delete t.rest;
354
+ }
355
+ return n.matchGrammar(e, r, t, 0, 0, !1), r;
356
+ },
357
+ hooks: {
358
+ all: {},
359
+ add: function (e, t) {
360
+ var r = n.hooks.all;
361
+ (r[e] = r[e] || []), r[e].push(t);
362
+ },
363
+ run: function (e, t) {
364
+ var r = n.hooks.all[e];
365
+ if (r && r.length) {
366
+ for (var a, l = 0; (a = r[l++]); ) {
367
+ a(t);
368
+ }
369
+ }
370
+ }
371
+ }
372
+ }),
373
+ r = (n.Token = function (e, t, n, r, a) {
374
+ (this.type = e),
375
+ (this.content = t),
376
+ (this.alias = n),
377
+ (this.length = 0 | (r || '').length),
378
+ (this.greedy = Boolean(a));
379
+ });
380
+ if (
381
+ ((r.stringify = function (e, t, a) {
382
+ if ('string' === typeof e) {
383
+ return e;
384
+ }
385
+ if ('Array' === n.util.type(e)) {
386
+ return e
387
+ .map(function (n) {
388
+ return r.stringify(n, t, e);
389
+ })
390
+ .join('');
391
+ }
392
+ var l = {
393
+ type: e.type,
394
+ content: r.stringify(e.content, t, a),
395
+ tag: 'span',
396
+ classes: ['token', e.type],
397
+ attributes: {},
398
+ language: t,
399
+ parent: a
400
+ };
401
+ if (e.alias) {
402
+ var i =
403
+ 'Array' === n.util.type(e.alias) ? e.alias : [e.alias];
404
+ Array.prototype.push.apply(l.classes, i);
405
+ }
406
+ n.hooks.run('wrap', l);
407
+ var o = Object.keys(l.attributes)
408
+ .map(function (e) {
409
+ return (
410
+ e +
411
+ '="' +
412
+ (l.attributes[e] || '').replace(/"/g, '&quot;') +
413
+ '"'
414
+ );
415
+ })
416
+ .join(' ');
417
+ return (
418
+ '<' +
419
+ l.tag +
420
+ ' class="' +
421
+ l.classes.join(' ') +
422
+ '"' +
423
+ (o ? ' ' + o : '') +
424
+ '>' +
425
+ l.content +
426
+ '</' +
427
+ l.tag +
428
+ '>'
429
+ );
430
+ }),
431
+ !_self.document)
432
+ ) {
433
+ return _self.addEventListener
434
+ ? (n.disableWorkerMessageHandler ||
435
+ _self.addEventListener(
436
+ 'message',
437
+ function (e) {
438
+ var t = JSON.parse(e.data),
439
+ r = t.language,
440
+ a = t.code,
441
+ l = t.immediateClose;
442
+ _self.postMessage(
443
+ n.highlight(a, n.languages[r], r)
444
+ ),
445
+ l && _self.close();
446
+ },
447
+ !1
448
+ ),
449
+ _self.Prism)
450
+ : _self.Prism;
451
+ }
452
+ var a =
453
+ document.currentScript ||
454
+ [].slice.call(document.getElementsByTagName('script')).pop();
455
+ return (
456
+ a &&
457
+ ((n.filename = a.src),
458
+ n.manual ||
459
+ a.hasAttribute('data-manual') ||
460
+ ('loading' !== document.readyState
461
+ ? window.requestAnimationFrame
462
+ ? window.requestAnimationFrame(n.highlightAll)
463
+ : window.setTimeout(n.highlightAll, 16)
464
+ : document.addEventListener(
465
+ 'DOMContentLoaded',
466
+ n.highlightAll
467
+ ))),
468
+ _self.Prism
469
+ );
470
+ })();
471
+ 'undefined' !== typeof module && module.exports && (module.exports = Prism),
472
+ 'undefined' !== typeof global && (global.Prism = Prism);
473
+ (Prism.languages.markup = {
474
+ comment: /<!--[\s\S]*?-->/,
475
+ prolog: /<\?[\s\S]+?\?>/,
476
+ doctype: /<!DOCTYPE[\s\S]+?>/i,
477
+ cdata: /<!\[CDATA\[[\s\S]*?]]>/i,
478
+ tag: {
479
+ pattern:
480
+ /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,
481
+ greedy: !0,
482
+ inside: {
483
+ tag: {
484
+ pattern: /^<\/?[^\s>\/]+/i,
485
+ inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ }
486
+ },
487
+ 'attr-value': {
488
+ pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,
489
+ inside: {
490
+ punctuation: [
491
+ /^=/,
492
+ { pattern: /(^|[^\\])["']/, lookbehind: !0 }
493
+ ]
494
+ }
495
+ },
496
+ punctuation: /\/?>/,
497
+ 'attr-name': {
498
+ pattern: /[^\s>\/]+/,
499
+ inside: { namespace: /^[^\s>\/:]+:/ }
500
+ }
501
+ }
502
+ },
503
+ entity: /&#?[\da-z]{1,8};/i
504
+ }),
505
+ (Prism.languages.markup.tag.inside['attr-value'].inside.entity =
506
+ Prism.languages.markup.entity),
507
+ Prism.hooks.add('wrap', function (a) {
508
+ 'entity' === a.type &&
509
+ (a.attributes.title = a.content.replace(/&amp;/, '&'));
510
+ }),
511
+ (Prism.languages.xml = Prism.languages.markup),
512
+ (Prism.languages.html = Prism.languages.markup),
513
+ (Prism.languages.mathml = Prism.languages.markup),
514
+ (Prism.languages.svg = Prism.languages.markup);
515
+ (Prism.languages.css = {
516
+ comment: /\/\*[\s\S]*?\*\//,
517
+ atrule: {
518
+ pattern: /@[\w-]+?.*?(?:;|(?=\s*\{))/i,
519
+ inside: { rule: /@[\w-]+/ }
520
+ },
521
+ url: /url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
522
+ selector: /[^{}\s][^{};]*?(?=\s*\{)/,
523
+ string: {
524
+ pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
525
+ greedy: !0
526
+ },
527
+ property: /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,
528
+ important: /\B!important\b/i,
529
+ function: /[-a-z0-9]+(?=\()/i,
530
+ punctuation: /[(){};:]/
531
+ }),
532
+ (Prism.languages.css.atrule.inside.rest = Prism.languages.css),
533
+ Prism.languages.markup &&
534
+ (Prism.languages.insertBefore('markup', 'tag', {
535
+ style: {
536
+ pattern: /(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,
537
+ lookbehind: !0,
538
+ inside: Prism.languages.css,
539
+ alias: 'language-css',
540
+ greedy: !0
541
+ }
542
+ }),
543
+ Prism.languages.insertBefore(
544
+ 'inside',
545
+ 'attr-value',
546
+ {
547
+ 'style-attr': {
548
+ pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,
549
+ inside: {
550
+ 'attr-name': {
551
+ pattern: /^\s*style/i,
552
+ inside: Prism.languages.markup.tag.inside
553
+ },
554
+ punctuation: /^\s*=\s*['"]|['"]\s*$/,
555
+ 'attr-value': {
556
+ pattern: /.+/i,
557
+ inside: Prism.languages.css
558
+ }
559
+ },
560
+ alias: 'language-css'
561
+ }
562
+ },
563
+ Prism.languages.markup.tag
564
+ ));
565
+ Prism.languages.clike = {
566
+ comment: [
567
+ { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 },
568
+ { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }
569
+ ],
570
+ string: {
571
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
572
+ greedy: !0
573
+ },
574
+ 'class-name': {
575
+ pattern:
576
+ /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,
577
+ lookbehind: !0,
578
+ inside: { punctuation: /[.\\]/ }
579
+ },
580
+ keyword:
581
+ /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
582
+ boolean: /\b(?:true|false)\b/,
583
+ function: /[a-z0-9_]+(?=\()/i,
584
+ number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,
585
+ operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
586
+ punctuation: /[{}[\];(),.:]/
587
+ };
588
+ (Prism.languages.javascript = Prism.languages.extend('clike', {
589
+ keyword:
590
+ /\b(?: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|var|void|while|with|yield)\b/,
591
+ number: /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,
592
+ function: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,
593
+ operator:
594
+ /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/
595
+ })),
596
+ Prism.languages.insertBefore('javascript', 'keyword', {
597
+ regex: {
598
+ pattern:
599
+ /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,
600
+ lookbehind: !0,
601
+ greedy: !0
602
+ },
603
+ 'function-variable': {
604
+ pattern:
605
+ /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,
606
+ alias: 'function'
607
+ },
608
+ constant: /\b[A-Z][A-Z\d_]*\b/
609
+ }),
610
+ Prism.languages.insertBefore('javascript', 'string', {
611
+ 'template-string': {
612
+ pattern: /`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,
613
+ greedy: !0,
614
+ inside: {
615
+ interpolation: {
616
+ pattern: /\${[^}]+}/,
617
+ inside: {
618
+ 'interpolation-punctuation': {
619
+ pattern: /^\${|}$/,
620
+ alias: 'punctuation'
621
+ },
622
+ rest: null
623
+ }
624
+ },
625
+ string: /[\s\S]+/
626
+ }
627
+ }
628
+ }),
629
+ (Prism.languages.javascript[
630
+ 'template-string'
631
+ ].inside.interpolation.inside.rest = Prism.languages.javascript),
632
+ Prism.languages.markup &&
633
+ Prism.languages.insertBefore('markup', 'tag', {
634
+ script: {
635
+ pattern: /(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,
636
+ lookbehind: !0,
637
+ inside: Prism.languages.javascript,
638
+ alias: 'language-javascript',
639
+ greedy: !0
640
+ }
641
+ }),
642
+ (Prism.languages.js = Prism.languages.javascript);
643
+ (Prism.languages['markup-templating'] = {}),
644
+ Object.defineProperties(Prism.languages['markup-templating'], {
645
+ buildPlaceholders: {
646
+ value: function (e, t, n, a) {
647
+ e.language === t &&
648
+ ((e.tokenStack = []),
649
+ (e.code = e.code.replace(n, function (n) {
650
+ if ('function' === typeof a && !a(n)) {
651
+ return n;
652
+ }
653
+ for (
654
+ var r = e.tokenStack.length;
655
+ -1 !==
656
+ e.code.indexOf('___' + t.toUpperCase() + r + '___');
657
+
658
+ ) {
659
+ ++r;
660
+ }
661
+ return (
662
+ (e.tokenStack[r] = n),
663
+ '___' + t.toUpperCase() + r + '___'
664
+ );
665
+ })),
666
+ (e.grammar = Prism.languages.markup));
667
+ }
668
+ },
669
+ tokenizePlaceholders: {
670
+ value: function (e, t) {
671
+ if (e.language === t && e.tokenStack) {
672
+ e.grammar = Prism.languages[t];
673
+ var n = 0,
674
+ a = Object.keys(e.tokenStack),
675
+ r = function (o) {
676
+ if (!(n >= a.length)) {
677
+ for (var i = 0; i < o.length; i++) {
678
+ var g = o[i];
679
+ if (
680
+ 'string' === typeof g ||
681
+ (g.content &&
682
+ 'string' === typeof g.content)
683
+ ) {
684
+ var c = a[n],
685
+ s = e.tokenStack[c],
686
+ l =
687
+ 'string' === typeof g
688
+ ? g
689
+ : g.content,
690
+ p = l.indexOf(
691
+ '___' +
692
+ t.toUpperCase() +
693
+ c +
694
+ '___'
695
+ );
696
+ if (p > -1) {
697
+ ++n;
698
+ var f,
699
+ u = l.substring(0, p),
700
+ _ = new Prism.Token(
701
+ t,
702
+ Prism.tokenize(
703
+ s,
704
+ e.grammar,
705
+ t
706
+ ),
707
+ 'language-' + t,
708
+ s
709
+ ),
710
+ k = l.substring(
711
+ p +
712
+ (
713
+ '___' +
714
+ t.toUpperCase() +
715
+ c +
716
+ '___'
717
+ ).length
718
+ );
719
+ if (
720
+ (u || k
721
+ ? ((f = [u, _, k].filter(
722
+ function (e) {
723
+ return Boolean(
724
+ e
725
+ );
726
+ }
727
+ )),
728
+ r(f))
729
+ : (f = _),
730
+ 'string' === typeof g
731
+ ? Array.prototype.splice.apply(
732
+ o,
733
+ [i, 1].concat(f)
734
+ )
735
+ : (g.content = f),
736
+ n >= a.length)
737
+ ) {
738
+ break;
739
+ }
740
+ }
741
+ } else {
742
+ g.content &&
743
+ 'string' !== typeof g.content &&
744
+ r(g.content);
745
+ }
746
+ }
747
+ }
748
+ };
749
+ r(e.tokens);
750
+ }
751
+ }
752
+ }
753
+ });
754
+ (Prism.languages.json = {
755
+ property: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,
756
+ string: { pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, greedy: !0 },
757
+ number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,
758
+ punctuation: /[{}[\]);,]/,
759
+ operator: /:/g,
760
+ boolean: /\b(?:true|false)\b/i,
761
+ null: /\bnull\b/i
762
+ }),
763
+ (Prism.languages.jsonp = Prism.languages.json);
764
+ !(function (e) {
765
+ (e.languages.php = e.languages.extend('clike', {
766
+ keyword:
767
+ /\b(?:and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
768
+ constant: /\b[A-Z0-9_]{2,}\b/,
769
+ comment: {
770
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
771
+ lookbehind: !0
772
+ }
773
+ })),
774
+ e.languages.insertBefore('php', 'string', {
775
+ 'shell-comment': {
776
+ pattern: /(^|[^\\])#.*/,
777
+ lookbehind: !0,
778
+ alias: 'comment'
779
+ }
780
+ }),
781
+ e.languages.insertBefore('php', 'keyword', {
782
+ delimiter: { pattern: /\?>|<\?(?:php|=)?/i, alias: 'important' },
783
+ variable: /\$+(?:\w+\b|(?={))/i,
784
+ package: {
785
+ pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
786
+ lookbehind: !0,
787
+ inside: { punctuation: /\\/ }
788
+ }
789
+ }),
790
+ e.languages.insertBefore('php', 'operator', {
791
+ property: { pattern: /(->)[\w]+/, lookbehind: !0 }
792
+ }),
793
+ e.languages.insertBefore('php', 'string', {
794
+ 'nowdoc-string': {
795
+ pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,
796
+ greedy: !0,
797
+ alias: 'string',
798
+ inside: {
799
+ delimiter: {
800
+ pattern: /^<<<'[^']+'|[a-z_]\w*;$/i,
801
+ alias: 'symbol',
802
+ inside: { punctuation: /^<<<'?|[';]$/ }
803
+ }
804
+ }
805
+ },
806
+ 'heredoc-string': {
807
+ pattern:
808
+ /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,
809
+ greedy: !0,
810
+ alias: 'string',
811
+ inside: {
812
+ delimiter: {
813
+ pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,
814
+ alias: 'symbol',
815
+ inside: { punctuation: /^<<<"?|[";]$/ }
816
+ },
817
+ interpolation: null
818
+ }
819
+ },
820
+ 'single-quoted-string': {
821
+ pattern: /'(?:\\[\s\S]|[^\\'])*'/,
822
+ greedy: !0,
823
+ alias: 'string'
824
+ },
825
+ 'double-quoted-string': {
826
+ pattern: /"(?:\\[\s\S]|[^\\"])*"/,
827
+ greedy: !0,
828
+ alias: 'string',
829
+ inside: { interpolation: null }
830
+ }
831
+ }),
832
+ delete e.languages.php.string;
833
+ var n = {
834
+ pattern:
835
+ /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,
836
+ lookbehind: !0,
837
+ inside: { rest: e.languages.php }
838
+ };
839
+ (e.languages.php['heredoc-string'].inside.interpolation = n),
840
+ (e.languages.php['double-quoted-string'].inside.interpolation = n),
841
+ e.hooks.add('before-tokenize', function (n) {
842
+ if (/(?:<\?php|<\?)/gi.test(n.code)) {
843
+ var i = /(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;
844
+ e.languages['markup-templating'].buildPlaceholders(n, 'php', i);
845
+ }
846
+ }),
847
+ e.hooks.add('after-tokenize', function (n) {
848
+ e.languages['markup-templating'].tokenizePlaceholders(n, 'php');
849
+ });
850
+ })(Prism);
851
+ Prism.languages.insertBefore('php', 'variable', {
852
+ this: /\$this\b/,
853
+ global: /\$(?:_(?:SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE)|GLOBALS|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)\b/,
854
+ scope: {
855
+ pattern: /\b[\w\\]+::/,
856
+ inside: { keyword: /static|self|parent/, punctuation: /::|\\/ }
857
+ }
858
+ });
859
+ !(function () {
860
+ if ('undefined' !== typeof self && self.Prism && self.document) {
861
+ var t = [],
862
+ e = {},
863
+ n = function () {};
864
+ Prism.plugins.toolbar = {};
865
+ var a = (Prism.plugins.toolbar.registerButton = function (n, a) {
866
+ var o;
867
+ (o =
868
+ 'function' === typeof a
869
+ ? a
870
+ : function (t) {
871
+ var e;
872
+ return (
873
+ 'function' === typeof a.onClick
874
+ ? ((e =
875
+ document.createElement(
876
+ 'button'
877
+ )),
878
+ (e.type = 'button'),
879
+ e.addEventListener(
880
+ 'click',
881
+ function () {
882
+ a.onClick.call(this, t);
883
+ }
884
+ ))
885
+ : 'string' === typeof a.url
886
+ ? ((e = document.createElement('a')),
887
+ (e.href = a.url))
888
+ : (e = document.createElement('span')),
889
+ (e.textContent = a.text),
890
+ e
891
+ );
892
+ }),
893
+ t.push((e[n] = o));
894
+ }),
895
+ o = (Prism.plugins.toolbar.hook = function (a) {
896
+ var o = a.element.parentNode;
897
+ if (
898
+ o &&
899
+ /pre/i.test(o.nodeName) &&
900
+ !o.parentNode.classList.contains('code-toolbar')
901
+ ) {
902
+ var r = document.createElement('div');
903
+ r.classList.add('code-toolbar'),
904
+ o.parentNode.insertBefore(r, o),
905
+ r.appendChild(o);
906
+ var i = document.createElement('div');
907
+ i.classList.add('toolbar'),
908
+ document.body.hasAttribute('data-toolbar-order') &&
909
+ (t = document.body
910
+ .getAttribute('data-toolbar-order')
911
+ .split(',')
912
+ .map(function (t) {
913
+ return e[t] || n;
914
+ })),
915
+ t.forEach(function (t) {
916
+ var e = t(a);
917
+ if (e) {
918
+ var n = document.createElement('div');
919
+ n.classList.add('toolbar-item'),
920
+ n.appendChild(e),
921
+ i.appendChild(n);
922
+ }
923
+ }),
924
+ r.appendChild(i);
925
+ }
926
+ });
927
+ a('label', function (t) {
928
+ var e = t.element.parentNode;
929
+ if (e && /pre/i.test(e.nodeName) && e.hasAttribute('data-label')) {
930
+ var n,
931
+ a,
932
+ o = e.getAttribute('data-label');
933
+ try {
934
+ a = document.querySelector('template#' + o);
935
+ } catch (r) {}
936
+ return (
937
+ a
938
+ ? (n = a.content)
939
+ : (e.hasAttribute('data-url')
940
+ ? ((n = document.createElement('a')),
941
+ (n.href = e.getAttribute('data-url')))
942
+ : (n = document.createElement('span')),
943
+ (n.textContent = o)),
944
+ n
945
+ );
946
+ }
947
+ }),
948
+ Prism.hooks.add('complete', o);
949
+ }
950
+ })();
951
+ !(function () {
952
+ function e(e) {
953
+ this.defaults = r({}, e);
954
+ }
955
+ function n(e) {
956
+ return e.replace(/-(\w)/g, function (e, n) {
957
+ return n.toUpperCase();
958
+ });
959
+ }
960
+ function t(e) {
961
+ for (var n = 0, t = 0; t < e.length; ++t) {
962
+ e.charCodeAt(t) == ' '.charCodeAt(0) && (n += 3);
963
+ }
964
+ return e.length + n;
965
+ }
966
+ var r =
967
+ Object.assign ||
968
+ function (e, n) {
969
+ for (var t in n) {
970
+ n.hasOwnProperty(t) && (e[t] = n[t]);
971
+ }
972
+ return e;
973
+ };
974
+ (e.prototype = {
975
+ setDefaults: function (e) {
976
+ this.defaults = r(this.defaults, e);
977
+ },
978
+ normalize: function (e, t) {
979
+ t = r(this.defaults, t);
980
+ for (var i in t) {
981
+ var o = n(i);
982
+ 'normalize' !== i &&
983
+ 'setDefaults' !== o &&
984
+ t[i] &&
985
+ this[o] &&
986
+ (e = this[o].call(this, e, t[i]));
987
+ }
988
+ return e;
989
+ },
990
+ leftTrim: function (e) {
991
+ return e.replace(/^\s+/, '');
992
+ },
993
+ rightTrim: function (e) {
994
+ return e.replace(/\s+$/, '');
995
+ },
996
+ tabsToSpaces: function (e, n) {
997
+ return (n = 0 | n || 4), e.replace(/\t/g, new Array(++n).join(' '));
998
+ },
999
+ spacesToTabs: function (e, n) {
1000
+ return (
1001
+ (n = 0 | n || 4), e.replace(new RegExp(' {' + n + '}', 'g'), ' ')
1002
+ );
1003
+ },
1004
+ removeTrailing: function (e) {
1005
+ return e.replace(/\s*?$/gm, '');
1006
+ },
1007
+ removeInitialLineFeed: function (e) {
1008
+ return e.replace(/^(?:\r?\n|\r)/, '');
1009
+ },
1010
+ removeIndent: function (e) {
1011
+ var n = e.match(/^[^\S\n\r]*(?=\S)/gm);
1012
+ return n && n[0].length
1013
+ ? (n.sort(function (e, n) {
1014
+ return e.length - n.length;
1015
+ }),
1016
+ n[0].length ? e.replace(new RegExp('^' + n[0], 'gm'), '') : e)
1017
+ : e;
1018
+ },
1019
+ indent: function (e, n) {
1020
+ return e.replace(
1021
+ /^[^\S\n\r]*(?=\S)/gm,
1022
+ new Array(++n).join(' ') + '$&'
1023
+ );
1024
+ },
1025
+ breakLines: function (e, n) {
1026
+ n = n === !0 ? 80 : 0 | n || 80;
1027
+ for (var r = e.split('\n'), i = 0; i < r.length; ++i) {
1028
+ if (!(t(r[i]) <= n)) {
1029
+ for (
1030
+ var o = r[i].split(/(\s+)/g), a = 0, s = 0;
1031
+ s < o.length;
1032
+ ++s
1033
+ ) {
1034
+ var l = t(o[s]);
1035
+ (a += l), a > n && ((o[s] = '\n' + o[s]), (a = l));
1036
+ }
1037
+ r[i] = o.join('');
1038
+ }
1039
+ }
1040
+ return r.join('\n');
1041
+ }
1042
+ }),
1043
+ 'undefined' !== typeof module && module.exports && (module.exports = e),
1044
+ 'undefined' !== typeof Prism &&
1045
+ ((Prism.plugins.NormalizeWhitespace = new e({
1046
+ 'remove-trailing': !0,
1047
+ 'remove-indent': !0,
1048
+ 'left-trim': !0,
1049
+ 'right-trim': !0
1050
+ })),
1051
+ Prism.hooks.add('before-sanity-check', function (e) {
1052
+ var n = Prism.plugins.NormalizeWhitespace;
1053
+ if (
1054
+ !e.settings ||
1055
+ e.settings['whitespace-normalization'] !== !1
1056
+ ) {
1057
+ if ((!e.element || !e.element.parentNode) && e.code) {
1058
+ return (
1059
+ (e.code = n.normalize(e.code, e.settings)), void 0
1060
+ );
1061
+ }
1062
+ var t = e.element.parentNode,
1063
+ r = /\bno-whitespace-normalization\b/;
1064
+ if (
1065
+ e.code &&
1066
+ t &&
1067
+ 'pre' === t.nodeName.toLowerCase() &&
1068
+ !r.test(t.className) &&
1069
+ !r.test(e.element.className)
1070
+ ) {
1071
+ for (
1072
+ var i = t.childNodes, o = '', a = '', s = !1, l = 0;
1073
+ l < i.length;
1074
+ ++l
1075
+ ) {
1076
+ var c = i[l];
1077
+ c == e.element
1078
+ ? (s = !0)
1079
+ : '#text' === c.nodeName &&
1080
+ (s ? (a += c.nodeValue) : (o += c.nodeValue),
1081
+ t.removeChild(c),
1082
+ --l);
1083
+ }
1084
+ if (
1085
+ e.element.children.length &&
1086
+ Prism.plugins.KeepMarkup
1087
+ ) {
1088
+ var u = o + e.element.innerHTML + a;
1089
+ (e.element.innerHTML = n.normalize(u, e.settings)),
1090
+ (e.code = e.element.textContent);
1091
+ } else {
1092
+ (e.code = o + e.code + a),
1093
+ (e.code = n.normalize(e.code, e.settings));
1094
+ }
1095
+ }
1096
+ }
1097
+ }));
1098
+ })();
1099
+ !(function () {
1100
+ if ('undefined' !== typeof self && self.Prism && self.document) {
1101
+ if (!Prism.plugins.toolbar) {
1102
+ return (
1103
+ console.warn(
1104
+ 'Show Languages plugin loaded before Toolbar plugin.'
1105
+ ),
1106
+ void 0
1107
+ );
1108
+ }
1109
+ var e = {
1110
+ html: 'HTML',
1111
+ xml: 'XML',
1112
+ svg: 'SVG',
1113
+ mathml: 'MathML',
1114
+ css: 'CSS',
1115
+ clike: 'C-like',
1116
+ javascript: 'JavaScript',
1117
+ abap: 'ABAP',
1118
+ actionscript: 'ActionScript',
1119
+ apacheconf: 'Apache Configuration',
1120
+ apl: 'APL',
1121
+ applescript: 'AppleScript',
1122
+ arff: 'ARFF',
1123
+ asciidoc: 'AsciiDoc',
1124
+ asm6502: '6502 Assembly',
1125
+ aspnet: 'ASP.NET (C#)',
1126
+ autohotkey: 'AutoHotkey',
1127
+ autoit: 'AutoIt',
1128
+ basic: 'BASIC',
1129
+ csharp: 'C#',
1130
+ cpp: 'C++',
1131
+ coffeescript: 'CoffeeScript',
1132
+ csp: 'Content-Security-Policy',
1133
+ 'css-extras': 'CSS Extras',
1134
+ django: 'Django/Jinja2',
1135
+ erb: 'ERB',
1136
+ fsharp: 'F#',
1137
+ gedcom: 'GEDCOM',
1138
+ glsl: 'GLSL',
1139
+ graphql: 'GraphQL',
1140
+ http: 'HTTP',
1141
+ hpkp: 'HTTP Public-Key-Pins',
1142
+ hsts: 'HTTP Strict-Transport-Security',
1143
+ ichigojam: 'IchigoJam',
1144
+ inform7: 'Inform 7',
1145
+ json: 'JSON',
1146
+ latex: 'LaTeX',
1147
+ livescript: 'LiveScript',
1148
+ lolcode: 'LOLCODE',
1149
+ 'markup-templating': 'Markup templating',
1150
+ matlab: 'MATLAB',
1151
+ mel: 'MEL',
1152
+ n4js: 'N4JS',
1153
+ nasm: 'NASM',
1154
+ nginx: 'nginx',
1155
+ nsis: 'NSIS',
1156
+ objectivec: 'Objective-C',
1157
+ ocaml: 'OCaml',
1158
+ opencl: 'OpenCL',
1159
+ parigp: 'PARI/GP',
1160
+ php: 'PHP',
1161
+ 'php-extras': 'PHP Extras',
1162
+ plsql: 'PL/SQL',
1163
+ powershell: 'PowerShell',
1164
+ properties: '.properties',
1165
+ protobuf: 'Protocol Buffers',
1166
+ q: 'Q (kdb+ database)',
1167
+ jsx: 'React JSX',
1168
+ tsx: 'React TSX',
1169
+ renpy: "Ren'py",
1170
+ rest: 'reST (reStructuredText)',
1171
+ sas: 'SAS',
1172
+ sass: 'Sass (Sass)',
1173
+ scss: 'Sass (Scss)',
1174
+ sql: 'SQL',
1175
+ soy: 'Soy (Closure Template)',
1176
+ tt2: 'Template Toolkit 2',
1177
+ typescript: 'TypeScript',
1178
+ vbnet: 'VB.Net',
1179
+ vhdl: 'VHDL',
1180
+ vim: 'vim',
1181
+ 'visual-basic': 'Visual Basic',
1182
+ wasm: 'WebAssembly',
1183
+ wiki: 'Wiki markup',
1184
+ xojo: 'Xojo (REALbasic)',
1185
+ yaml: 'YAML'
1186
+ };
1187
+ Prism.plugins.toolbar.registerButton('show-language', function (t) {
1188
+ var a = t.element.parentNode;
1189
+ if (a && /pre/i.test(a.nodeName)) {
1190
+ var s =
1191
+ a.getAttribute('data-language') ||
1192
+ e[t.language] ||
1193
+ (t.language &&
1194
+ t.language.substring(0, 1).toUpperCase() +
1195
+ t.language.substring(1));
1196
+ if (s) {
1197
+ var i = document.createElement('span');
1198
+ return (i.textContent = s), i;
1199
+ }
1200
+ }
1201
+ });
1202
+ }
1203
+ })();
1204
+ !(function () {
1205
+ if ('undefined' !== typeof self && self.Prism && self.document) {
1206
+ if (!Prism.plugins.toolbar) {
1207
+ return (
1208
+ console.warn(
1209
+ 'Copy to Clipboard plugin loaded before Toolbar plugin.'
1210
+ ),
1211
+ void 0
1212
+ );
1213
+ }
1214
+ var o = window.ClipboardJS || void 0;
1215
+ o || 'function' !== typeof require || (o = require('clipboard'));
1216
+ var e = [];
1217
+ if (!o) {
1218
+ var t = document.createElement('script'),
1219
+ n = document.querySelector('head');
1220
+ (t.onload = function () {
1221
+ if ((o = window.ClipboardJS)) {
1222
+ for (; e.length; ) {
1223
+ e.pop()();
1224
+ }
1225
+ }
1226
+ }),
1227
+ (t.src =
1228
+ 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'),
1229
+ n.appendChild(t);
1230
+ }
1231
+ Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (t) {
1232
+ function n() {
1233
+ var e = new o(i, {
1234
+ text: function () {
1235
+ return t.code;
1236
+ }
1237
+ });
1238
+ e.on('success', function () {
1239
+ (i.textContent = 'Copied!'), r();
1240
+ }),
1241
+ e.on('error', function () {
1242
+ (i.textContent = 'Press Ctrl+C to copy'), r();
1243
+ });
1244
+ }
1245
+ function r() {
1246
+ setTimeout(function () {
1247
+ i.textContent = 'Copy';
1248
+ }, 5e3);
1249
+ }
1250
+ var i = document.createElement('a');
1251
+ return (i.textContent = 'Copy'), o ? n() : e.push(n), i;
1252
+ });
1253
+ }
1254
+ })();