@schalkneethling/miyagi-core 4.0.2

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 (138) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +43 -0
  3. package/api/app.js +39 -0
  4. package/api/index.js +236 -0
  5. package/bin/miyagi.js +2 -0
  6. package/dist/css/iframe.css +31 -0
  7. package/dist/css/main.css +1 -0
  8. package/dist/js/_iframe-links-DdifIr4P.js +1 -0
  9. package/dist/js/_mock-data-Dypo4Bl_.js +1 -0
  10. package/dist/js/_prism-By3NMwUd.js +1 -0
  11. package/dist/js/iframe.build.js +1 -0
  12. package/dist/js/iframe.js +1 -0
  13. package/dist/js/index-BKDKaBC6.js +1 -0
  14. package/dist/js/jsontree.js +1 -0
  15. package/dist/js/main.build.js +1 -0
  16. package/dist/js/main.js +1 -0
  17. package/frontend/assets/css/iframe/accordion-tabs.css +77 -0
  18. package/frontend/assets/css/iframe/jsontree.js.css +325 -0
  19. package/frontend/assets/css/iframe/prism.css +132 -0
  20. package/frontend/assets/css/iframe/styleguide/colors.css +61 -0
  21. package/frontend/assets/css/iframe/styleguide/fonts.css +37 -0
  22. package/frontend/assets/css/iframe/styleguide/index.css +109 -0
  23. package/frontend/assets/css/iframe/styleguide/spacings.css +21 -0
  24. package/frontend/assets/css/iframe.css +410 -0
  25. package/frontend/assets/css/main/menu/config-switcher.css +49 -0
  26. package/frontend/assets/css/main/menu/config-switchers.css +67 -0
  27. package/frontend/assets/css/main/menu/goto.css +24 -0
  28. package/frontend/assets/css/main/menu/nav.css +113 -0
  29. package/frontend/assets/css/main/menu/search.css +64 -0
  30. package/frontend/assets/css/main/menu/title.css +40 -0
  31. package/frontend/assets/css/main/menu.css +114 -0
  32. package/frontend/assets/css/main/reset.css +217 -0
  33. package/frontend/assets/css/main.css +71 -0
  34. package/frontend/assets/css/shared.css +34 -0
  35. package/frontend/assets/css/tokens.css +112 -0
  36. package/frontend/assets/favicon.ico +0 -0
  37. package/frontend/assets/js/_accordion-tabs.js +403 -0
  38. package/frontend/assets/js/_goto.js +63 -0
  39. package/frontend/assets/js/_iframe-links.js +19 -0
  40. package/frontend/assets/js/_is-triggered.js +15 -0
  41. package/frontend/assets/js/_main.js +379 -0
  42. package/frontend/assets/js/_mock-data.js +13 -0
  43. package/frontend/assets/js/_prism.js +1098 -0
  44. package/frontend/assets/js/_search.js +190 -0
  45. package/frontend/assets/js/_socket.js +9 -0
  46. package/frontend/assets/js/config-switcher/development-mode.js +49 -0
  47. package/frontend/assets/js/config-switcher/index.js +63 -0
  48. package/frontend/assets/js/config-switcher/text-direction.js +30 -0
  49. package/frontend/assets/js/config-switcher/theme.js +87 -0
  50. package/frontend/assets/js/iframe.build.js +43 -0
  51. package/frontend/assets/js/iframe.js +52 -0
  52. package/frontend/assets/js/jsontree.js +979 -0
  53. package/frontend/assets/js/main.build.js +40 -0
  54. package/frontend/assets/js/main.js +42 -0
  55. package/frontend/assets/js/styleguide/color-converter.js +741 -0
  56. package/frontend/assets/js/styleguide/index.js +119 -0
  57. package/frontend/views/component_variation.twig.miyagi +57 -0
  58. package/frontend/views/design-tokens/colors.twig.miyagi +43 -0
  59. package/frontend/views/design-tokens/sizes.twig.miyagi +35 -0
  60. package/frontend/views/design-tokens/typography.twig.miyagi +38 -0
  61. package/frontend/views/iframe_component.twig.miyagi +141 -0
  62. package/frontend/views/iframe_component_variation.twig.miyagi +55 -0
  63. package/frontend/views/iframe_index.twig.miyagi +14 -0
  64. package/frontend/views/layouts/iframe_default.twig.miyagi +22 -0
  65. package/frontend/views/main.twig.miyagi +24 -0
  66. package/frontend/views/menu/config-switchers.twig.miyagi +83 -0
  67. package/frontend/views/menu/goto.twig.miyagi +9 -0
  68. package/frontend/views/menu/menu.twig.miyagi +21 -0
  69. package/frontend/views/menu/nav.twig.miyagi +95 -0
  70. package/frontend/views/menu/search.twig.miyagi +13 -0
  71. package/frontend/views/menu/title.twig.miyagi +24 -0
  72. package/index.js +3 -0
  73. package/lib/build/index.js +1020 -0
  74. package/lib/cli/app.js +38 -0
  75. package/lib/cli/component.js +56 -0
  76. package/lib/cli/index.js +5 -0
  77. package/lib/cli/lint.js +180 -0
  78. package/lib/config.js +74 -0
  79. package/lib/default-config.js +105 -0
  80. package/lib/generator/component.js +199 -0
  81. package/lib/generator/mocks.js +201 -0
  82. package/lib/helpers.js +184 -0
  83. package/lib/i18n/en.js +91 -0
  84. package/lib/i18n/index.js +17 -0
  85. package/lib/index.js +166 -0
  86. package/lib/init/args.js +55 -0
  87. package/lib/init/config.js +330 -0
  88. package/lib/init/engines.js +65 -0
  89. package/lib/init/index.js +102 -0
  90. package/lib/init/rendering.js +12 -0
  91. package/lib/init/router.js +249 -0
  92. package/lib/init/static.js +133 -0
  93. package/lib/init/twing/cache.js +34 -0
  94. package/lib/init/twing/functions.js +51 -0
  95. package/lib/init/views.js +19 -0
  96. package/lib/init/watcher.js +402 -0
  97. package/lib/logger.js +94 -0
  98. package/lib/mocks/get.js +111 -0
  99. package/lib/mocks/index.js +9 -0
  100. package/lib/mocks/resolve/ref.js +484 -0
  101. package/lib/mocks/resolve/tpl.js +246 -0
  102. package/lib/mocks/resolve.js +205 -0
  103. package/lib/render/helpers.js +51 -0
  104. package/lib/render/index.js +38 -0
  105. package/lib/render/views/iframe/component.docs.js +77 -0
  106. package/lib/render/views/iframe/component.js +338 -0
  107. package/lib/render/views/iframe/design-tokens/colors.js +52 -0
  108. package/lib/render/views/iframe/design-tokens/index.js +9 -0
  109. package/lib/render/views/iframe/design-tokens/sizes.js +49 -0
  110. package/lib/render/views/iframe/design-tokens/typography.js +52 -0
  111. package/lib/render/views/iframe/docs.js +68 -0
  112. package/lib/render/views/iframe/index.js +44 -0
  113. package/lib/render/views/iframe/variation.js +116 -0
  114. package/lib/render/views/iframe/variation.standalone.js +89 -0
  115. package/lib/render/views/main/component.docs.js +53 -0
  116. package/lib/render/views/main/component.js +74 -0
  117. package/lib/render/views/main/design-tokens.js +53 -0
  118. package/lib/render/views/main/docs.js +47 -0
  119. package/lib/render/views/main/index.js +46 -0
  120. package/lib/state/components.js +132 -0
  121. package/lib/state/css.js +50 -0
  122. package/lib/state/docs.js +111 -0
  123. package/lib/state/file-contents.js +207 -0
  124. package/lib/state/helpers.js +86 -0
  125. package/lib/state/index.js +56 -0
  126. package/lib/state/menu/index.js +275 -0
  127. package/lib/state/menu/structure.js +146 -0
  128. package/lib/state/partials.js +23 -0
  129. package/lib/state/source-tree.js +75 -0
  130. package/lib/styleguide/color-names.js +150 -0
  131. package/lib/styleguide/colors.js +135 -0
  132. package/lib/styleguide/helpers.js +37 -0
  133. package/lib/styleguide/index.js +17 -0
  134. package/lib/styleguide/media-queries.js +26 -0
  135. package/lib/styleguide/spacings.js +35 -0
  136. package/lib/styleguide/typography.js +61 -0
  137. package/lib/validator/mocks.js +105 -0
  138. package/package.json +117 -0
@@ -0,0 +1,1098 @@
1
+ /* PrismJS 1.30.0
2
+ https://prismjs.com/download.html#themes=prism&languages=markup+clike+javascript+handlebars+json+markup-templating+pug+twig+yaml */
3
+ var _self =
4
+ "undefined" != typeof window
5
+ ? window
6
+ : "undefined" != typeof WorkerGlobalScope &&
7
+ self instanceof WorkerGlobalScope
8
+ ? self
9
+ : {},
10
+ Prism = (function (e) {
11
+ var n = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
12
+ t = 0,
13
+ r = {},
14
+ a = {
15
+ manual: e.Prism && e.Prism.manual,
16
+ disableWorkerMessageHandler:
17
+ e.Prism && e.Prism.disableWorkerMessageHandler,
18
+ util: {
19
+ encode: function e(n) {
20
+ return n instanceof i
21
+ ? new i(n.type, e(n.content), n.alias)
22
+ : Array.isArray(n)
23
+ ? n.map(e)
24
+ : n
25
+ .replace(/&/g, "&")
26
+ .replace(/</g, "&lt;")
27
+ .replace(/\u00a0/g, " ");
28
+ },
29
+ type: function (e) {
30
+ return Object.prototype.toString.call(e).slice(8, -1);
31
+ },
32
+ objId: function (e) {
33
+ return (
34
+ e.__id || Object.defineProperty(e, "__id", { value: ++t }), e.__id
35
+ );
36
+ },
37
+ clone: function e(n, t) {
38
+ var r, i;
39
+ switch (((t = t || {}), a.util.type(n))) {
40
+ case "Object":
41
+ if (((i = a.util.objId(n)), t[i])) return t[i];
42
+ for (var l in ((r = {}), (t[i] = r), n))
43
+ n.hasOwnProperty(l) && (r[l] = e(n[l], t));
44
+ return r;
45
+ case "Array":
46
+ return (
47
+ (i = a.util.objId(n)),
48
+ t[i]
49
+ ? t[i]
50
+ : ((r = []),
51
+ (t[i] = r),
52
+ n.forEach(function (n, a) {
53
+ r[a] = e(n, t);
54
+ }),
55
+ r)
56
+ );
57
+ default:
58
+ return n;
59
+ }
60
+ },
61
+ getLanguage: function (e) {
62
+ for (; e; ) {
63
+ var t = n.exec(e.className);
64
+ if (t) return t[1].toLowerCase();
65
+ e = e.parentElement;
66
+ }
67
+ return "none";
68
+ },
69
+ setLanguage: function (e, t) {
70
+ (e.className = e.className.replace(RegExp(n, "gi"), "")),
71
+ e.classList.add("language-" + t);
72
+ },
73
+ currentScript: function () {
74
+ if ("undefined" == typeof document) return null;
75
+ if (
76
+ document.currentScript &&
77
+ "SCRIPT" === document.currentScript.tagName
78
+ )
79
+ return document.currentScript;
80
+ try {
81
+ throw new Error();
82
+ } catch (r) {
83
+ var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) ||
84
+ [])[1];
85
+ if (e) {
86
+ var n = document.getElementsByTagName("script");
87
+ for (var t in n) if (n[t].src == e) return n[t];
88
+ }
89
+ return null;
90
+ }
91
+ },
92
+ isActive: function (e, n, t) {
93
+ for (var r = "no-" + n; e; ) {
94
+ var a = e.classList;
95
+ if (a.contains(n)) return !0;
96
+ if (a.contains(r)) return !1;
97
+ e = e.parentElement;
98
+ }
99
+ return !!t;
100
+ },
101
+ },
102
+ languages: {
103
+ plain: r,
104
+ plaintext: r,
105
+ text: r,
106
+ txt: r,
107
+ extend: function (e, n) {
108
+ var t = a.util.clone(a.languages[e]);
109
+ for (var r in n) t[r] = n[r];
110
+ return t;
111
+ },
112
+ insertBefore: function (e, n, t, r) {
113
+ var i = (r = r || a.languages)[e],
114
+ l = {};
115
+ for (var o in i)
116
+ if (i.hasOwnProperty(o)) {
117
+ if (o == n)
118
+ for (var s in t) t.hasOwnProperty(s) && (l[s] = t[s]);
119
+ t.hasOwnProperty(o) || (l[o] = i[o]);
120
+ }
121
+ var u = r[e];
122
+ return (
123
+ (r[e] = l),
124
+ a.languages.DFS(a.languages, function (n, t) {
125
+ t === u && n != e && (this[n] = l);
126
+ }),
127
+ l
128
+ );
129
+ },
130
+ DFS: function e(n, t, r, i) {
131
+ i = i || {};
132
+ var l = a.util.objId;
133
+ for (var o in n)
134
+ if (n.hasOwnProperty(o)) {
135
+ t.call(n, o, n[o], r || o);
136
+ var s = n[o],
137
+ u = a.util.type(s);
138
+ "Object" !== u || i[l(s)]
139
+ ? "Array" !== u || i[l(s)] || ((i[l(s)] = !0), e(s, t, o, i))
140
+ : ((i[l(s)] = !0), e(s, t, null, i));
141
+ }
142
+ },
143
+ },
144
+ plugins: {},
145
+ highlightAll: function (e, n) {
146
+ a.highlightAllUnder(document, e, n);
147
+ },
148
+ highlightAllUnder: function (e, n, t) {
149
+ var r = {
150
+ callback: t,
151
+ container: e,
152
+ selector:
153
+ 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code',
154
+ };
155
+ a.hooks.run("before-highlightall", r),
156
+ (r.elements = Array.prototype.slice.apply(
157
+ r.container.querySelectorAll(r.selector),
158
+ )),
159
+ a.hooks.run("before-all-elements-highlight", r);
160
+ for (var i, l = 0; (i = r.elements[l++]); )
161
+ a.highlightElement(i, !0 === n, r.callback);
162
+ },
163
+ highlightElement: function (n, t, r) {
164
+ var i = a.util.getLanguage(n),
165
+ l = a.languages[i];
166
+ a.util.setLanguage(n, i);
167
+ var o = n.parentElement;
168
+ o && "pre" === o.nodeName.toLowerCase() && a.util.setLanguage(o, i);
169
+ var s = { element: n, language: i, grammar: l, code: n.textContent };
170
+ function u(e) {
171
+ (s.highlightedCode = e),
172
+ a.hooks.run("before-insert", s),
173
+ (s.element.innerHTML = s.highlightedCode),
174
+ a.hooks.run("after-highlight", s),
175
+ a.hooks.run("complete", s),
176
+ r && r.call(s.element);
177
+ }
178
+ if (
179
+ (a.hooks.run("before-sanity-check", s),
180
+ (o = s.element.parentElement) &&
181
+ "pre" === o.nodeName.toLowerCase() &&
182
+ !o.hasAttribute("tabindex") &&
183
+ o.setAttribute("tabindex", "0"),
184
+ !s.code)
185
+ )
186
+ return a.hooks.run("complete", s), void (r && r.call(s.element));
187
+ if ((a.hooks.run("before-highlight", s), s.grammar))
188
+ if (t && e.Worker) {
189
+ var c = new Worker(a.filename);
190
+ (c.onmessage = function (e) {
191
+ u(e.data);
192
+ }),
193
+ c.postMessage(
194
+ JSON.stringify({
195
+ language: s.language,
196
+ code: s.code,
197
+ immediateClose: !0,
198
+ }),
199
+ );
200
+ } else u(a.highlight(s.code, s.grammar, s.language));
201
+ else u(a.util.encode(s.code));
202
+ },
203
+ highlight: function (e, n, t) {
204
+ var r = { code: e, grammar: n, language: t };
205
+ if ((a.hooks.run("before-tokenize", r), !r.grammar))
206
+ throw new Error(
207
+ 'The language "' + r.language + '" has no grammar.',
208
+ );
209
+ return (
210
+ (r.tokens = a.tokenize(r.code, r.grammar)),
211
+ a.hooks.run("after-tokenize", r),
212
+ i.stringify(a.util.encode(r.tokens), r.language)
213
+ );
214
+ },
215
+ tokenize: function (e, n) {
216
+ var t = n.rest;
217
+ if (t) {
218
+ for (var r in t) n[r] = t[r];
219
+ delete n.rest;
220
+ }
221
+ var a = new s();
222
+ return (
223
+ u(a, a.head, e),
224
+ o(e, a, n, a.head, 0),
225
+ (function (e) {
226
+ for (var n = [], t = e.head.next; t !== e.tail; )
227
+ n.push(t.value), (t = t.next);
228
+ return n;
229
+ })(a)
230
+ );
231
+ },
232
+ hooks: {
233
+ all: {},
234
+ add: function (e, n) {
235
+ var t = a.hooks.all;
236
+ (t[e] = t[e] || []), t[e].push(n);
237
+ },
238
+ run: function (e, n) {
239
+ var t = a.hooks.all[e];
240
+ if (t && t.length) for (var r, i = 0; (r = t[i++]); ) r(n);
241
+ },
242
+ },
243
+ Token: i,
244
+ };
245
+ function i(e, n, t, r) {
246
+ (this.type = e),
247
+ (this.content = n),
248
+ (this.alias = t),
249
+ (this.length = 0 | (r || "").length);
250
+ }
251
+ function l(e, n, t, r) {
252
+ e.lastIndex = n;
253
+ var a = e.exec(t);
254
+ if (a && r && a[1]) {
255
+ var i = a[1].length;
256
+ (a.index += i), (a[0] = a[0].slice(i));
257
+ }
258
+ return a;
259
+ }
260
+ function o(e, n, t, r, s, g) {
261
+ for (var f in t)
262
+ if (t.hasOwnProperty(f) && t[f]) {
263
+ var h = t[f];
264
+ h = Array.isArray(h) ? h : [h];
265
+ for (var d = 0; d < h.length; ++d) {
266
+ if (g && g.cause == f + "," + d) return;
267
+ var v = h[d],
268
+ p = v.inside,
269
+ m = !!v.lookbehind,
270
+ y = !!v.greedy,
271
+ k = v.alias;
272
+ if (y && !v.pattern.global) {
273
+ var x = v.pattern.toString().match(/[imsuy]*$/)[0];
274
+ v.pattern = RegExp(v.pattern.source, x + "g");
275
+ }
276
+ for (
277
+ var b = v.pattern || v, w = r.next, A = s;
278
+ w !== n.tail && !(g && A >= g.reach);
279
+ A += w.value.length, w = w.next
280
+ ) {
281
+ var P = w.value;
282
+ if (n.length > e.length) return;
283
+ if (!(P instanceof i)) {
284
+ var E,
285
+ S = 1;
286
+ if (y) {
287
+ if (!(E = l(b, A, e, m)) || E.index >= e.length) break;
288
+ var L = E.index,
289
+ O = E.index + E[0].length,
290
+ C = A;
291
+ for (C += w.value.length; L >= C; )
292
+ C += (w = w.next).value.length;
293
+ if (((A = C -= w.value.length), w.value instanceof i))
294
+ continue;
295
+ for (
296
+ var j = w;
297
+ j !== n.tail && (C < O || "string" == typeof j.value);
298
+ j = j.next
299
+ )
300
+ S++, (C += j.value.length);
301
+ S--, (P = e.slice(A, C)), (E.index -= A);
302
+ } else if (!(E = l(b, 0, P, m))) continue;
303
+ L = E.index;
304
+ var N = E[0],
305
+ _ = P.slice(0, L),
306
+ M = P.slice(L + N.length),
307
+ W = A + P.length;
308
+ g && W > g.reach && (g.reach = W);
309
+ var I = w.prev;
310
+ if (
311
+ (_ && ((I = u(n, I, _)), (A += _.length)),
312
+ c(n, I, S),
313
+ (w = u(n, I, new i(f, p ? a.tokenize(N, p) : N, k, N))),
314
+ M && u(n, w, M),
315
+ S > 1)
316
+ ) {
317
+ var T = { cause: f + "," + d, reach: W };
318
+ o(e, n, t, w.prev, A, T),
319
+ g && T.reach > g.reach && (g.reach = T.reach);
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }
326
+ function s() {
327
+ var e = { value: null, prev: null, next: null },
328
+ n = { value: null, prev: e, next: null };
329
+ (e.next = n), (this.head = e), (this.tail = n), (this.length = 0);
330
+ }
331
+ function u(e, n, t) {
332
+ var r = n.next,
333
+ a = { value: t, prev: n, next: r };
334
+ return (n.next = a), (r.prev = a), e.length++, a;
335
+ }
336
+ function c(e, n, t) {
337
+ for (var r = n.next, a = 0; a < t && r !== e.tail; a++) r = r.next;
338
+ (n.next = r), (r.prev = n), (e.length -= a);
339
+ }
340
+ if (
341
+ ((e.Prism = a),
342
+ (i.stringify = function e(n, t) {
343
+ if ("string" == typeof n) return n;
344
+ if (Array.isArray(n)) {
345
+ var r = "";
346
+ return (
347
+ n.forEach(function (n) {
348
+ r += e(n, t);
349
+ }),
350
+ r
351
+ );
352
+ }
353
+ var i = {
354
+ type: n.type,
355
+ content: e(n.content, t),
356
+ tag: "span",
357
+ classes: ["token", n.type],
358
+ attributes: {},
359
+ language: t,
360
+ },
361
+ l = n.alias;
362
+ l &&
363
+ (Array.isArray(l)
364
+ ? Array.prototype.push.apply(i.classes, l)
365
+ : i.classes.push(l)),
366
+ a.hooks.run("wrap", i);
367
+ var o = "";
368
+ for (var s in i.attributes)
369
+ o +=
370
+ " " +
371
+ s +
372
+ '="' +
373
+ (i.attributes[s] || "").replace(/"/g, "&quot;") +
374
+ '"';
375
+ return (
376
+ "<" +
377
+ i.tag +
378
+ ' class="' +
379
+ i.classes.join(" ") +
380
+ '"' +
381
+ o +
382
+ ">" +
383
+ i.content +
384
+ "</" +
385
+ i.tag +
386
+ ">"
387
+ );
388
+ }),
389
+ !e.document)
390
+ )
391
+ return e.addEventListener
392
+ ? (a.disableWorkerMessageHandler ||
393
+ e.addEventListener(
394
+ "message",
395
+ function (n) {
396
+ var t = JSON.parse(n.data),
397
+ r = t.language,
398
+ i = t.code,
399
+ l = t.immediateClose;
400
+ e.postMessage(a.highlight(i, a.languages[r], r)),
401
+ l && e.close();
402
+ },
403
+ !1,
404
+ ),
405
+ a)
406
+ : a;
407
+ var g = a.util.currentScript();
408
+ function f() {
409
+ a.manual || a.highlightAll();
410
+ }
411
+ if (
412
+ (g &&
413
+ ((a.filename = g.src),
414
+ g.hasAttribute("data-manual") && (a.manual = !0)),
415
+ !a.manual)
416
+ ) {
417
+ var h = document.readyState;
418
+ "loading" === h || ("interactive" === h && g && g.defer)
419
+ ? document.addEventListener("DOMContentLoaded", f)
420
+ : window.requestAnimationFrame
421
+ ? window.requestAnimationFrame(f)
422
+ : window.setTimeout(f, 16);
423
+ }
424
+ return a;
425
+ })(_self);
426
+ "undefined" != typeof module && module.exports && (module.exports = Prism),
427
+ "undefined" != typeof global && (global.Prism = Prism);
428
+ (Prism.languages.markup = {
429
+ comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 },
430
+ prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 },
431
+ doctype: {
432
+ pattern:
433
+ /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
434
+ greedy: !0,
435
+ inside: {
436
+ "internal-subset": {
437
+ pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
438
+ lookbehind: !0,
439
+ greedy: !0,
440
+ inside: null,
441
+ },
442
+ string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 },
443
+ punctuation: /^<!|>$|[[\]]/,
444
+ "doctype-tag": /^DOCTYPE/i,
445
+ name: /[^\s<>'"]+/,
446
+ },
447
+ },
448
+ cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 },
449
+ tag: {
450
+ pattern:
451
+ /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
452
+ greedy: !0,
453
+ inside: {
454
+ tag: {
455
+ pattern: /^<\/?[^\s>\/]+/,
456
+ inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ },
457
+ },
458
+ "special-attr": [],
459
+ "attr-value": {
460
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
461
+ inside: {
462
+ punctuation: [
463
+ { pattern: /^=/, alias: "attr-equals" },
464
+ { pattern: /^(\s*)["']|["']$/, lookbehind: !0 },
465
+ ],
466
+ },
467
+ },
468
+ punctuation: /\/?>/,
469
+ "attr-name": {
470
+ pattern: /[^\s>\/]+/,
471
+ inside: { namespace: /^[^\s>\/:]+:/ },
472
+ },
473
+ },
474
+ },
475
+ entity: [
476
+ { pattern: /&[\da-z]{1,8};/i, alias: "named-entity" },
477
+ /&#x?[\da-f]{1,8};/i,
478
+ ],
479
+ }),
480
+ (Prism.languages.markup.tag.inside["attr-value"].inside.entity =
481
+ Prism.languages.markup.entity),
482
+ (Prism.languages.markup.doctype.inside["internal-subset"].inside =
483
+ Prism.languages.markup),
484
+ Prism.hooks.add("wrap", function (a) {
485
+ "entity" === a.type &&
486
+ (a.attributes.title = a.content.replace(/&amp;/, "&"));
487
+ }),
488
+ Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
489
+ value: function (a, e) {
490
+ var s = {};
491
+ (s["language-" + e] = {
492
+ pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
493
+ lookbehind: !0,
494
+ inside: Prism.languages[e],
495
+ }),
496
+ (s.cdata = /^<!\[CDATA\[|\]\]>$/i);
497
+ var t = {
498
+ "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: s },
499
+ };
500
+ t["language-" + e] = { pattern: /[\s\S]+/, inside: Prism.languages[e] };
501
+ var n = {};
502
+ (n[a] = {
503
+ pattern: RegExp(
504
+ "(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(
505
+ /__/g,
506
+ function () {
507
+ return a;
508
+ },
509
+ ),
510
+ "i",
511
+ ),
512
+ lookbehind: !0,
513
+ greedy: !0,
514
+ inside: t,
515
+ }),
516
+ Prism.languages.insertBefore("markup", "cdata", n);
517
+ },
518
+ }),
519
+ Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
520
+ value: function (a, e) {
521
+ Prism.languages.markup.tag.inside["special-attr"].push({
522
+ pattern: RegExp(
523
+ "(^|[\"'\\s])(?:" +
524
+ a +
525
+ ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))",
526
+ "i",
527
+ ),
528
+ lookbehind: !0,
529
+ inside: {
530
+ "attr-name": /^[^\s=]+/,
531
+ "attr-value": {
532
+ pattern: /=[\s\S]+/,
533
+ inside: {
534
+ value: {
535
+ pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
536
+ lookbehind: !0,
537
+ alias: [e, "language-" + e],
538
+ inside: Prism.languages[e],
539
+ },
540
+ punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/],
541
+ },
542
+ },
543
+ },
544
+ });
545
+ },
546
+ }),
547
+ (Prism.languages.html = Prism.languages.markup),
548
+ (Prism.languages.mathml = Prism.languages.markup),
549
+ (Prism.languages.svg = Prism.languages.markup),
550
+ (Prism.languages.xml = Prism.languages.extend("markup", {})),
551
+ (Prism.languages.ssml = Prism.languages.xml),
552
+ (Prism.languages.atom = Prism.languages.xml),
553
+ (Prism.languages.rss = Prism.languages.xml);
554
+ Prism.languages.clike = {
555
+ comment: [
556
+ { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 },
557
+ { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 },
558
+ ],
559
+ string: {
560
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
561
+ greedy: !0,
562
+ },
563
+ "class-name": {
564
+ pattern:
565
+ /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
566
+ lookbehind: !0,
567
+ inside: { punctuation: /[.\\]/ },
568
+ },
569
+ keyword:
570
+ /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
571
+ boolean: /\b(?:false|true)\b/,
572
+ function: /\b\w+(?=\()/,
573
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
574
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
575
+ punctuation: /[{}[\];(),.:]/,
576
+ };
577
+ (Prism.languages.javascript = Prism.languages.extend("clike", {
578
+ "class-name": [
579
+ Prism.languages.clike["class-name"],
580
+ {
581
+ pattern:
582
+ /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
583
+ lookbehind: !0,
584
+ },
585
+ ],
586
+ keyword: [
587
+ { pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 },
588
+ {
589
+ pattern:
590
+ /(^|[^.]|\.\.\.\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/,
591
+ lookbehind: !0,
592
+ },
593
+ ],
594
+ function:
595
+ /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
596
+ number: {
597
+ pattern: RegExp(
598
+ "(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])",
599
+ ),
600
+ lookbehind: !0,
601
+ },
602
+ operator:
603
+ /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
604
+ })),
605
+ (Prism.languages.javascript["class-name"][0].pattern =
606
+ /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/),
607
+ Prism.languages.insertBefore("javascript", "keyword", {
608
+ regex: {
609
+ pattern: RegExp(
610
+ "((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))",
611
+ ),
612
+ lookbehind: !0,
613
+ greedy: !0,
614
+ inside: {
615
+ "regex-source": {
616
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
617
+ lookbehind: !0,
618
+ alias: "language-regex",
619
+ inside: Prism.languages.regex,
620
+ },
621
+ "regex-delimiter": /^\/|\/$/,
622
+ "regex-flags": /^[a-z]+$/,
623
+ },
624
+ },
625
+ "function-variable": {
626
+ pattern:
627
+ /#?(?!\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*=>))/,
628
+ alias: "function",
629
+ },
630
+ parameter: [
631
+ {
632
+ pattern:
633
+ /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
634
+ lookbehind: !0,
635
+ inside: Prism.languages.javascript,
636
+ },
637
+ {
638
+ pattern:
639
+ /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
640
+ lookbehind: !0,
641
+ inside: Prism.languages.javascript,
642
+ },
643
+ {
644
+ pattern:
645
+ /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
646
+ lookbehind: !0,
647
+ inside: Prism.languages.javascript,
648
+ },
649
+ {
650
+ pattern:
651
+ /((?:\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*\{)/,
652
+ lookbehind: !0,
653
+ inside: Prism.languages.javascript,
654
+ },
655
+ ],
656
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
657
+ }),
658
+ Prism.languages.insertBefore("javascript", "string", {
659
+ hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" },
660
+ "template-string": {
661
+ pattern:
662
+ /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
663
+ greedy: !0,
664
+ inside: {
665
+ "template-punctuation": { pattern: /^`|`$/, alias: "string" },
666
+ interpolation: {
667
+ pattern:
668
+ /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
669
+ lookbehind: !0,
670
+ inside: {
671
+ "interpolation-punctuation": {
672
+ pattern: /^\$\{|\}$/,
673
+ alias: "punctuation",
674
+ },
675
+ rest: Prism.languages.javascript,
676
+ },
677
+ },
678
+ string: /[\s\S]+/,
679
+ },
680
+ },
681
+ "string-property": {
682
+ pattern:
683
+ /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
684
+ lookbehind: !0,
685
+ greedy: !0,
686
+ alias: "property",
687
+ },
688
+ }),
689
+ Prism.languages.insertBefore("javascript", "operator", {
690
+ "literal-property": {
691
+ pattern:
692
+ /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
693
+ lookbehind: !0,
694
+ alias: "property",
695
+ },
696
+ }),
697
+ Prism.languages.markup &&
698
+ (Prism.languages.markup.tag.addInlined("script", "javascript"),
699
+ Prism.languages.markup.tag.addAttribute(
700
+ "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)",
701
+ "javascript",
702
+ )),
703
+ (Prism.languages.js = Prism.languages.javascript);
704
+ !(function (e) {
705
+ function n(e, n) {
706
+ return "___" + e.toUpperCase() + n + "___";
707
+ }
708
+ Object.defineProperties((e.languages["markup-templating"] = {}), {
709
+ buildPlaceholders: {
710
+ value: function (t, a, r, o) {
711
+ if (t.language === a) {
712
+ var c = (t.tokenStack = []);
713
+ (t.code = t.code.replace(r, function (e) {
714
+ if ("function" == typeof o && !o(e)) return e;
715
+ for (var r, i = c.length; -1 !== t.code.indexOf((r = n(a, i))); )
716
+ ++i;
717
+ return (c[i] = e), r;
718
+ })),
719
+ (t.grammar = e.languages.markup);
720
+ }
721
+ },
722
+ },
723
+ tokenizePlaceholders: {
724
+ value: function (t, a) {
725
+ if (t.language === a && t.tokenStack) {
726
+ t.grammar = e.languages[a];
727
+ var r = 0,
728
+ o = Object.keys(t.tokenStack);
729
+ !(function c(i) {
730
+ for (var u = 0; u < i.length && !(r >= o.length); u++) {
731
+ var g = i[u];
732
+ if (
733
+ "string" == typeof g ||
734
+ (g.content && "string" == typeof g.content)
735
+ ) {
736
+ var l = o[r],
737
+ s = t.tokenStack[l],
738
+ f = "string" == typeof g ? g : g.content,
739
+ p = n(a, l),
740
+ k = f.indexOf(p);
741
+ if (k > -1) {
742
+ ++r;
743
+ var m = f.substring(0, k),
744
+ d = new e.Token(
745
+ a,
746
+ e.tokenize(s, t.grammar),
747
+ "language-" + a,
748
+ s,
749
+ ),
750
+ h = f.substring(k + p.length),
751
+ v = [];
752
+ m && v.push.apply(v, c([m])),
753
+ v.push(d),
754
+ h && v.push.apply(v, c([h])),
755
+ "string" == typeof g
756
+ ? i.splice.apply(i, [u, 1].concat(v))
757
+ : (g.content = v);
758
+ }
759
+ } else g.content && c(g.content);
760
+ }
761
+ return i;
762
+ })(t.tokens);
763
+ }
764
+ },
765
+ },
766
+ });
767
+ })(Prism);
768
+ !(function (a) {
769
+ (a.languages.handlebars = {
770
+ comment: /\{\{![\s\S]*?\}\}/,
771
+ delimiter: { pattern: /^\{\{\{?|\}\}\}?$/, alias: "punctuation" },
772
+ string: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
773
+ number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,
774
+ boolean: /\b(?:false|true)\b/,
775
+ block: {
776
+ pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,
777
+ lookbehind: !0,
778
+ alias: "keyword",
779
+ },
780
+ brackets: {
781
+ pattern: /\[[^\]]+\]/,
782
+ inside: { punctuation: /\[|\]/, variable: /[\s\S]+/ },
783
+ },
784
+ punctuation: /[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,
785
+ variable: /[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/,
786
+ }),
787
+ a.hooks.add("before-tokenize", function (e) {
788
+ a.languages["markup-templating"].buildPlaceholders(
789
+ e,
790
+ "handlebars",
791
+ /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g,
792
+ );
793
+ }),
794
+ a.hooks.add("after-tokenize", function (e) {
795
+ a.languages["markup-templating"].tokenizePlaceholders(e, "handlebars");
796
+ }),
797
+ (a.languages.hbs = a.languages.handlebars),
798
+ (a.languages.mustache = a.languages.handlebars);
799
+ })(Prism);
800
+ (Prism.languages.json = {
801
+ property: {
802
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
803
+ lookbehind: !0,
804
+ greedy: !0,
805
+ },
806
+ string: {
807
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
808
+ lookbehind: !0,
809
+ greedy: !0,
810
+ },
811
+ comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 },
812
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
813
+ punctuation: /[{}[\],]/,
814
+ operator: /:/,
815
+ boolean: /\b(?:false|true)\b/,
816
+ null: { pattern: /\bnull\b/, alias: "keyword" },
817
+ }),
818
+ (Prism.languages.webmanifest = Prism.languages.json);
819
+ !(function (e) {
820
+ e.languages.pug = {
821
+ comment: {
822
+ pattern: /(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,
823
+ lookbehind: !0,
824
+ },
825
+ "multiline-script": {
826
+ pattern:
827
+ /(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
828
+ lookbehind: !0,
829
+ inside: e.languages.javascript,
830
+ },
831
+ filter: {
832
+ pattern:
833
+ /(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
834
+ lookbehind: !0,
835
+ inside: {
836
+ "filter-name": { pattern: /^:[\w-]+/, alias: "variable" },
837
+ text: /\S[\s\S]*/,
838
+ },
839
+ },
840
+ "multiline-plain-text": {
841
+ pattern:
842
+ /(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
843
+ lookbehind: !0,
844
+ },
845
+ markup: {
846
+ pattern: /(^[\t ]*)<.+/m,
847
+ lookbehind: !0,
848
+ inside: e.languages.markup,
849
+ },
850
+ doctype: { pattern: /((?:^|\n)[\t ]*)doctype(?: .+)?/, lookbehind: !0 },
851
+ "flow-control": {
852
+ pattern:
853
+ /(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,
854
+ lookbehind: !0,
855
+ inside: {
856
+ each: {
857
+ pattern: /^each .+? in\b/,
858
+ inside: { keyword: /\b(?:each|in)\b/, punctuation: /,/ },
859
+ },
860
+ branch: {
861
+ pattern: /^(?:case|default|else|if|unless|when|while)\b/,
862
+ alias: "keyword",
863
+ },
864
+ rest: e.languages.javascript,
865
+ },
866
+ },
867
+ keyword: {
868
+ pattern: /(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,
869
+ lookbehind: !0,
870
+ },
871
+ mixin: [
872
+ {
873
+ pattern: /(^[\t ]*)mixin .+/m,
874
+ lookbehind: !0,
875
+ inside: {
876
+ keyword: /^mixin/,
877
+ function: /\w+(?=\s*\(|\s*$)/,
878
+ punctuation: /[(),.]/,
879
+ },
880
+ },
881
+ {
882
+ pattern: /(^[\t ]*)\+.+/m,
883
+ lookbehind: !0,
884
+ inside: {
885
+ name: { pattern: /^\+\w+/, alias: "function" },
886
+ rest: e.languages.javascript,
887
+ },
888
+ },
889
+ ],
890
+ script: {
891
+ pattern: /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,
892
+ lookbehind: !0,
893
+ inside: e.languages.javascript,
894
+ },
895
+ "plain-text": {
896
+ pattern:
897
+ /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,
898
+ lookbehind: !0,
899
+ },
900
+ tag: {
901
+ pattern: /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,
902
+ lookbehind: !0,
903
+ inside: {
904
+ attributes: [
905
+ { pattern: /&[^(]+\([^)]+\)/, inside: e.languages.javascript },
906
+ {
907
+ pattern: /\([^)]+\)/,
908
+ inside: {
909
+ "attr-value": {
910
+ pattern: /(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,
911
+ lookbehind: !0,
912
+ inside: e.languages.javascript,
913
+ },
914
+ "attr-name": /[\w-]+(?=\s*!?=|\s*[,)])/,
915
+ punctuation: /[!=(),]+/,
916
+ },
917
+ },
918
+ ],
919
+ punctuation: /:/,
920
+ "attr-id": /#[\w\-]+/,
921
+ "attr-class": /\.[\w\-]+/,
922
+ },
923
+ },
924
+ code: [
925
+ {
926
+ pattern: /(^[\t ]*(?:-|!?=)).+/m,
927
+ lookbehind: !0,
928
+ inside: e.languages.javascript,
929
+ },
930
+ ],
931
+ punctuation: /[.\-!=|]+/,
932
+ };
933
+ for (
934
+ var t = [
935
+ { filter: "atpl", language: "twig" },
936
+ { filter: "coffee", language: "coffeescript" },
937
+ "ejs",
938
+ "handlebars",
939
+ "less",
940
+ "livescript",
941
+ "markdown",
942
+ { filter: "sass", language: "scss" },
943
+ "stylus",
944
+ ],
945
+ n = {},
946
+ a = 0,
947
+ i = t.length;
948
+ a < i;
949
+ a++
950
+ ) {
951
+ var r = t[a];
952
+ (r = "string" == typeof r ? { filter: r, language: r } : r),
953
+ e.languages[r.language] &&
954
+ (n["filter-" + r.filter] = {
955
+ pattern: RegExp(
956
+ "(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\\2[\t ].+|\\s*?(?=\r?\n|\r)))+".replace(
957
+ "<filter_name>",
958
+ function () {
959
+ return r.filter;
960
+ },
961
+ ),
962
+ "m",
963
+ ),
964
+ lookbehind: !0,
965
+ inside: {
966
+ "filter-name": { pattern: /^:[\w-]+/, alias: "variable" },
967
+ text: {
968
+ pattern: /\S[\s\S]*/,
969
+ alias: [r.language, "language-" + r.language],
970
+ inside: e.languages[r.language],
971
+ },
972
+ },
973
+ });
974
+ }
975
+ e.languages.insertBefore("pug", "filter", n);
976
+ })(Prism);
977
+ (Prism.languages.twig = {
978
+ comment: /^\{#[\s\S]*?#\}$/,
979
+ "tag-name": { pattern: /(^\{%-?\s*)\w+/, lookbehind: !0, alias: "keyword" },
980
+ delimiter: { pattern: /^\{[{%]-?|-?[%}]\}$/, alias: "punctuation" },
981
+ string: {
982
+ pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
983
+ inside: { punctuation: /^['"]|['"]$/ },
984
+ },
985
+ keyword: /\b(?:even|if|odd)\b/,
986
+ boolean: /\b(?:false|null|true)\b/,
987
+ number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
988
+ operator: [
989
+ {
990
+ pattern:
991
+ /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
992
+ lookbehind: !0,
993
+ },
994
+ /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/,
995
+ ],
996
+ punctuation: /[()\[\]{}:.,]/,
997
+ }),
998
+ Prism.hooks.add("before-tokenize", function (e) {
999
+ "twig" === e.language &&
1000
+ Prism.languages["markup-templating"].buildPlaceholders(
1001
+ e,
1002
+ "twig",
1003
+ /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g,
1004
+ );
1005
+ }),
1006
+ Prism.hooks.add("after-tokenize", function (e) {
1007
+ Prism.languages["markup-templating"].tokenizePlaceholders(e, "twig");
1008
+ });
1009
+ !(function (e) {
1010
+ var n = /[*&][^\s[\]{},]+/,
1011
+ r =
1012
+ /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,
1013
+ t =
1014
+ "(?:" +
1015
+ r.source +
1016
+ "(?:[ \t]+" +
1017
+ n.source +
1018
+ ")?|" +
1019
+ n.source +
1020
+ "(?:[ \t]+" +
1021
+ r.source +
1022
+ ")?)",
1023
+ a =
1024
+ "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(
1025
+ /<PLAIN>/g,
1026
+ function () {
1027
+ return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
1028
+ },
1029
+ ),
1030
+ d = "\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";
1031
+ function o(e, n) {
1032
+ n = (n || "").replace(/m/g, "") + "m";
1033
+ var r =
1034
+ "([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))"
1035
+ .replace(/<<prop>>/g, function () {
1036
+ return t;
1037
+ })
1038
+ .replace(/<<value>>/g, function () {
1039
+ return e;
1040
+ });
1041
+ return RegExp(r, n);
1042
+ }
1043
+ (e.languages.yaml = {
1044
+ scalar: {
1045
+ pattern: RegExp(
1046
+ "([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(
1047
+ /<<prop>>/g,
1048
+ function () {
1049
+ return t;
1050
+ },
1051
+ ),
1052
+ ),
1053
+ lookbehind: !0,
1054
+ alias: "string",
1055
+ },
1056
+ comment: /#.*/,
1057
+ key: {
1058
+ pattern: RegExp(
1059
+ "((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)"
1060
+ .replace(/<<prop>>/g, function () {
1061
+ return t;
1062
+ })
1063
+ .replace(/<<key>>/g, function () {
1064
+ return "(?:" + a + "|" + d + ")";
1065
+ }),
1066
+ ),
1067
+ lookbehind: !0,
1068
+ greedy: !0,
1069
+ alias: "atrule",
1070
+ },
1071
+ directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" },
1072
+ datetime: {
1073
+ pattern: o(
1074
+ "\\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*)?)?",
1075
+ ),
1076
+ lookbehind: !0,
1077
+ alias: "number",
1078
+ },
1079
+ boolean: {
1080
+ pattern: o("false|true", "i"),
1081
+ lookbehind: !0,
1082
+ alias: "important",
1083
+ },
1084
+ null: { pattern: o("null|~", "i"), lookbehind: !0, alias: "important" },
1085
+ string: { pattern: o(d), lookbehind: !0, greedy: !0 },
1086
+ number: {
1087
+ pattern: o(
1088
+ "[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)",
1089
+ "i",
1090
+ ),
1091
+ lookbehind: !0,
1092
+ },
1093
+ tag: r,
1094
+ important: n,
1095
+ punctuation: /---|[:[\]{}\-,|>?]|\.\.\./,
1096
+ }),
1097
+ (e.languages.yml = e.languages.yaml);
1098
+ })(Prism);