"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7661],{47359:function(a){function b(a){!function(a){var b=a.languages.javascript["template-string"],c=b.pattern.source,d=b.inside.interpolation,e=d.inside["interpolation-punctuation"],f=d.pattern.source;function g(b,d){if(a.languages[b])return{pattern:RegExp("((?:"+d+")\\s*)"+c),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:b}}}}function h(a,b){return"___"+b.toUpperCase()+"_"+a+"___"}function i(b,c,d){var e={code:b,grammar:c,language:d};return a.hooks.run("before-tokenize",e),e.tokens=a.tokenize(e.code,e.grammar),a.hooks.run("after-tokenize",e),e.tokens}function j(b){var c={};c["interpolation-punctuation"]=e;var f=a.tokenize(b,c);if(3===f.length){var g=[1,1];g.push.apply(g,i(f[1],a.languages.javascript,"javascript")),f.splice.apply(f,g)}return new a.Token("interpolation",f,d.alias,b)}function k(b,c,d){var e=a.tokenize(b,{interpolation:{pattern:RegExp(f),lookbehind:!0}}),g=0,k={},l=e.map(function(a){if("string"==typeof a)return a;for(var c,e=a.content;-1!==b.indexOf(c=h(g++,d)););return k[c]=e,c}).join(""),m=i(l,c,d),n=Object.keys(k);function o(a){for(var b=0;b<a.length;b++){if(g>=n.length)return;var c=a[b];if("string"==typeof c||"string"==typeof c.content){var d=n[g],e="string"==typeof c?c:c.content,f=e.indexOf(d);if(-1!==f){++g;var h=e.substring(0,f),i=j(k[d]),l=e.substring(f+d.length),m=[];if(h&&m.push(h),m.push(i),l){var p=[l];o(p),m.push.apply(m,p)}"string"==typeof c?(a.splice.apply(a,[b,1].concat(m)),b+=m.length-1):c.content=m}}else{var q=c.content;Array.isArray(q)?o(q):o([q])}}}return g=0,o(m),new a.Token(d,m,"language-"+d,b)}a.languages.javascript["template-string"]=[g("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),g("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),g("svg",/\bsvg/.source),g("markdown",/\b(?:markdown|md)/.source),g("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),g("sql",/\bsql/.source),b].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function m(a){return"string"==typeof a?a:Array.isArray(a)?a.map(m).join(""):m(a.content)}a.hooks.add("after-tokenize",function(b){b.language in l&&c(b.tokens);function c(b){for(var d=0,e=b.length;d<e;d++){var f=b[d];if("string"!=typeof f){var g=f.content;if(!Array.isArray(g)){"string"!=typeof g&&c([g]);continue}if("template-string"===f.type){var h=g[1];if(3===g.length&&"string"!=typeof h&&"embedded-code"===h.type){var i=m(h),j=h.alias,l=Array.isArray(j)?j[0]:j,n=a.languages[l];if(!n)continue;g[1]=k(i,n,l)}}else c(g)}}}})}(a)}a.exports=b,b.displayName="jsTemplates",b.aliases=[]}}])
//# sourceMappingURL=react-syntax-highlighter_languages_refractor_jsTemplates.f4f11501787e38ff.js.map