@hep-code-runner/vue2 1.5.1 → 2.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.
- package/dist/index.js +49 -5
- package/dist/index.mjs +146 -88
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var ae=Object.defineProperty,ie=(r,e,t)=>e in r?ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,q=(r,e,t)=>ie(r,typeof e!="symbol"?e+"":e,t);let
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var ae=Object.defineProperty,ie=(r,e,t)=>e in r?ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,q=(r,e,t)=>ie(r,typeof e!="symbol"?e+"":e,t);let z=null;class se{constructor(e={}){q(this,"baseUrl"),q(this,"timeout"),this.baseUrl=e.pistonUrl||"/api/piston",this.timeout=e.timeout||3e3}async getRuntimes(e=!1){if(z&&!e)return z;try{const t=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch runtimes: ${t.statusText}`);const l=await t.json();return z=l,l}catch(t){throw console.error("Failed to fetch runtimes:",t),t}}async execute(e,t,l={}){const p=(await this.getRuntimes()).find(h=>{var A;return h.language.toLowerCase()===e.toLowerCase()||((A=h.aliases)==null?void 0:A.some(_=>_.toLowerCase()===e.toLowerCase()))});if(!p)throw new Error(`Language '${e}' is not supported`);const f=this.getFileName(e),b={language:p.language,version:l.version||p.version,files:[{name:f,content:t}],stdin:l.stdin||"",args:l.args||[],run_timeout:l.runTimeout||this.timeout,compile_timeout:this.timeout},u=Date.now();try{const h=await fetch(`${this.baseUrl}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!h.ok)throw new Error(`Execute failed: ${h.statusText}`);const A=await h.json(),_=Date.now()-u,F=A.run.stdout||"",x=A.run.stderr||"";return{success:A.run.code===0,output:F,stderr:x,code:A.run.code,executionTime:_,compile:A.compile?{stdout:A.compile.stdout||"",stderr:A.compile.stderr||"",code:A.compile.code}:void 0}}catch(h){return{success:!1,output:"",stderr:h instanceof Error?h.message:"Unknown error",code:-1,executionTime:Date.now()-u}}}getFileName(e){return{javascript:"main.js",typescript:"main.ts",python:"main.py",python3:"main.py",go:"main.go",rust:"main.rs",java:"Main.java",c:"main.c",cpp:"main.cpp",csharp:"Main.cs",ruby:"main.rb",php:"main.php",bash:"main.sh",shell:"main.sh",perl:"main.pl",lua:"main.lua",swift:"main.swift",kotlin:"Main.kt",scala:"Main.scala",haskell:"main.hs",dart:"main.dart",html:"index.html",css:"style.css",sql:"query.sql",markdown:"readme.md"}[e.toLowerCase()]||`main.${e}`}}const oe={javascript:'console.log("Hello, World!");',typescript:'console.log("Hello, World!");',python:'print("Hello, World!")',python3:'print("Hello, World!")',go:`package main
|
|
2
2
|
|
|
3
3
|
import "fmt"
|
|
4
4
|
|
|
@@ -63,7 +63,7 @@ h1 {
|
|
|
63
63
|
color: #333;
|
|
64
64
|
}`,sql:"SELECT 'Hello, World!' AS message;",markdown:`# Hello, World!
|
|
65
65
|
|
|
66
|
-
This is a sample markdown document.`};function
|
|
66
|
+
This is a sample markdown document.`};function W(r){const e=r.toLowerCase();return oe[e]||`// ${r}
|
|
67
67
|
// Write your code here`}var J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function le(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Q={exports:{}};(function(r){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
68
68
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
69
69
|
*
|
|
@@ -71,8 +71,14 @@ This is a sample markdown document.`};function z(r){const e=r.toLowerCase();retu
|
|
|
71
71
|
* @author Lea Verou <https://lea.verou.me>
|
|
72
72
|
* @namespace
|
|
73
73
|
* @public
|
|
74
|
-
*/var t=function(l){var p=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,m=0,b={},u={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function a(n){return n instanceof h?new h(n.type,a(n.content),n.alias):Array.isArray(n)?n.map(a):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(a){return Object.prototype.toString.call(a).slice(8,-1)},objId:function(a){return a.__id||Object.defineProperty(a,"__id",{value:++m}),a.__id},clone:function a(n,i){i=i||{};var s,o;switch(u.util.type(n)){case"Object":if(o=u.util.objId(n),i[o])return i[o];s={},i[o]=s;for(var d in n)n.hasOwnProperty(d)&&(s[d]=a(n[d],i));return s;case"Array":return o=u.util.objId(n),i[o]?i[o]:(s=[],i[o]=s,n.forEach(function(g,c){s[c]=a(g,i)}),s);default:return n}},getLanguage:function(a){for(;a;){var n=p.exec(a.className);if(n)return n[1].toLowerCase();a=a.parentElement}return"none"},setLanguage:function(a,n){a.className=a.className.replace(RegExp(p,"gi"),""),a.classList.add("language-"+n)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(s){var a=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack)||[])[1];if(a){var n=document.getElementsByTagName("script");for(var i in n)if(n[i].src==a)return n[i]}return null}},isActive:function(a,n,i){for(var s="no-"+n;a;){var o=a.classList;if(o.contains(n))return!0;if(o.contains(s))return!1;a=a.parentElement}return!!i}},languages:{plain:b,plaintext:b,text:b,txt:b,extend:function(a,n){var i=u.util.clone(u.languages[a]);for(var s in n)i[s]=n[s];return i},insertBefore:function(a,n,i,s){s=s||u.languages;var o=s[a],d={};for(var g in o)if(o.hasOwnProperty(g)){if(g==n)for(var c in i)i.hasOwnProperty(c)&&(d[c]=i[c]);i.hasOwnProperty(g)||(d[g]=o[g])}var E=s[a];return s[a]=d,u.languages.DFS(u.languages,function(S,R){R===E&&S!=a&&(this[S]=d)}),d},DFS:function a(n,i,s,o){o=o||{};var d=u.util.objId;for(var g in n)if(n.hasOwnProperty(g)){i.call(n,g,n[g],s||g);var c=n[g],E=u.util.type(c);E==="Object"&&!o[d(c)]?(o[d(c)]=!0,a(c,i,null,o)):E==="Array"&&!o[d(c)]&&(o[d(c)]=!0,a(c,i,g,o))}}},plugins:{},highlightAll:function(a,n){u.highlightAllUnder(document,a,n)},highlightAllUnder:function(a,n,i){var s={callback:i,container:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),u.hooks.run("before-all-elements-highlight",s);for(var o=0,d;d=s.elements[o++];)u.highlightElement(d,n===!0,s.callback)},highlightElement:function(a,n,i){var s=u.util.getLanguage(a),o=u.languages[s];u.util.setLanguage(a,s);var d=a.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(d,s);var g=a.textContent,c={element:a,language:s,grammar:o,code:g};function E(R){c.highlightedCode=R,u.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,u.hooks.run("after-highlight",c),u.hooks.run("complete",c),i&&i.call(c.element)}if(u.hooks.run("before-sanity-check",c),d=c.element.parentElement,d&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!c.code){u.hooks.run("complete",c),i&&i.call(c.element);return}if(u.hooks.run("before-highlight",c),!c.grammar){E(u.util.encode(c.code));return}if(n&&l.Worker){var S=new Worker(u.filename);S.onmessage=function(R){E(R.data)},S.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else E(u.highlight(c.code,c.grammar,c.language))},highlight:function(a,n,i){var s={code:a,grammar:n,language:i};if(u.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=u.tokenize(s.code,s.grammar),u.hooks.run("after-tokenize",s),h.stringify(u.util.encode(s.tokens),s.language)},tokenize:function(a,n){var i=n.rest;if(i){for(var s in i)n[s]=i[s];delete n.rest}var o=new x;return I(o,o.head,a),_(a,o,n,o.head,0),N(o)},hooks:{all:{},add:function(a,n){var i=u.hooks.all;i[a]=i[a]||[],i[a].push(n)},run:function(a,n){var i=u.hooks.all[a];if(!(!i||!i.length))for(var s=0,o;o=i[s++];)o(n)}},Token:h};l.Prism=u;function h(a,n,i,s){this.type=a,this.content=n,this.alias=i,this.length=(s||"").length|0}h.stringify=function a(n,i){if(typeof n=="string")return n;if(Array.isArray(n)){var s="";return n.forEach(function(E){s+=a(E,i)}),s}var o={type:n.type,content:a(n.content,i),tag:"span",classes:["token",n.type],attributes:{},language:i},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(o.classes,d):o.classes.push(d)),u.hooks.run("wrap",o);var g="";for(var c in o.attributes)g+=" "+c+'="'+(o.attributes[c]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+g+">"+o.content+"</"+o.tag+">"};function A(a,n,i,s){a.lastIndex=n;var o=a.exec(i);if(o&&s&&o[1]){var d=o[1].length;o.index+=d,o[0]=o[0].slice(d)}return o}function _(a,n,i,s,o,d){for(var g in i)if(!(!i.hasOwnProperty(g)||!i[g])){var c=i[g];c=Array.isArray(c)?c:[c];for(var E=0;E<c.length;++E){if(d&&d.cause==g+","+E)return;var S=c[E],R=S.inside,X=!!S.lookbehind,Z=!!S.greedy,ee=S.alias;if(Z&&!S.pattern.global){var te=S.pattern.toString().match(/[imsuy]*$/)[0];S.pattern=RegExp(S.pattern.source,te+"g")}for(var K=S.pattern||S,T=s.next,k=o;T!==n.tail&&!(d&&k>=d.reach);k+=T.value.length,T=T.next){var C=T.value;if(n.length>a.length)return;if(!(C instanceof h)){var D=1,w;if(Z){if(w=A(K,k,a,X),!w||w.index>=a.length)break;var P=w.index,ne=w.index+w[0].length,F=k;for(F+=T.value.length;P>=F;)T=T.next,F+=T.value.length;if(F-=T.value.length,k=F,T.value instanceof h)continue;for(var L=T;L!==n.tail&&(F<ne||typeof L.value=="string");L=L.next)D++,F+=L.value.length;D--,C=a.slice(k,F),w.index-=k}else if(w=A(K,0,C,X),!w)continue;var P=w.index,$=w[0],H=C.slice(0,P),V=C.slice(P+$.length),B=k+C.length;d&&B>d.reach&&(d.reach=B);var M=T.prev;H&&(M=I(n,M,H),k+=H.length),U(n,M,D);var re=new h(g,R?u.tokenize($,R):$,ee,$);if(T=I(n,M,re),V&&I(n,T,V),D>1){var G={cause:g+","+E,reach:B};_(a,n,i,T.prev,k,G),d&&G.reach>d.reach&&(d.reach=G.reach)}}}}}}function x(){var a={value:null,prev:null,next:null},n={value:null,prev:a,next:null};a.next=n,this.head=a,this.tail=n,this.length=0}function I(a,n,i){var s=n.next,o={value:i,prev:n,next:s};return n.next=o,s.prev=o,a.length++,o}function U(a,n,i){for(var s=n.next,o=0;o<i&&s!==a.tail;o++)s=s.next;n.next=s,s.prev=n,a.length-=o}function N(a){for(var n=[],i=a.head.next;i!==a.tail;)n.push(i.value),i=i.next;return n}if(!l.document)return l.addEventListener&&(u.disableWorkerMessageHandler||l.addEventListener("message",function(a){var n=JSON.parse(a.data),i=n.language,s=n.code,o=n.immediateClose;l.postMessage(u.highlight(s,u.languages[i],i)),o&&l.close()},!1)),u;var v=u.util.currentScript();v&&(u.filename=v.src,v.hasAttribute("data-manual")&&(u.manual=!0));function f(){u.manual||u.highlightAll()}if(!u.manual){var y=document.readyState;y==="loading"||y==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return u}(e);r.exports&&(r.exports=t),typeof J<"u"&&(J.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(l){l.type==="entity"&&(l.attributes.title=l.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(p,m){var b={};b["language-"+m]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[m]},b.cdata=/^<!\[CDATA\[|\]\]>$/i;var u={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:b}};u["language-"+m]={pattern:/[\s\S]+/,inside:t.languages[m]};var h={};h[p]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return p}),"i"),lookbehind:!0,greedy:!0,inside:u},t.languages.insertBefore("markup","cdata",h)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(l,p){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+l+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[p,"language-"+p],inside:t.languages[p]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(l){var p=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;l.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+p.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+p.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+p.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+p.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:p,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},l.languages.css.atrule.inside.rest=l.languages.css;var m=l.languages.markup;m&&(m.tag.addInlined("style","css"),m.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{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/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{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*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{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*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/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,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var l="Loading…",p=function(v,f){return"✖ Error "+v+" while fetching file: "+f},m="✖ Error: File does not exist or is empty",b={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",h="loading",A="loaded",_="failed",x="pre[data-src]:not(["+u+'="'+A+'"]):not(['+u+'="'+h+'"])';function I(v,f,y){var a=new XMLHttpRequest;a.open("GET",v,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?f(a.responseText):a.status>=400?y(p(a.status,a.statusText)):y(m))},a.send(null)}function U(v){var f=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(f){var y=Number(f[1]),a=f[2],n=f[3];return a?n?[y,Number(n)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(v){v.selector+=", "+x}),t.hooks.add("before-sanity-check",function(v){var f=v.element;if(f.matches(x)){v.code="",f.setAttribute(u,h);var y=f.appendChild(document.createElement("CODE"));y.textContent=l;var a=f.getAttribute("data-src"),n=v.language;if(n==="none"){var i=(/\.(\w+)$/.exec(a)||[,"none"])[1];n=b[i]||i}t.util.setLanguage(y,n),t.util.setLanguage(f,n);var s=t.plugins.autoloader;s&&s.loadLanguages(n),I(a,function(o){f.setAttribute(u,A);var d=U(f.getAttribute("data-range"));if(d){var g=o.split(/\r\n?|\n/g),c=d[0],E=d[1]==null?g.length:d[1];c<0&&(c+=g.length),c=Math.max(0,Math.min(c-1,g.length)),E<0&&(E+=g.length),E=Math.max(0,Math.min(E,g.length)),o=g.slice(c,E).join(`
|
|
75
|
-
`),f.hasAttribute("data-start")||f.setAttribute("data-start",String(c+1))}y.textContent=o,t.highlightElement(y)},function(o){f.setAttribute(u,_),y.textContent=o})}}),t.plugins.fileHighlight={highlight:function(f){for(var y=(f||document).querySelectorAll(x),a=0,n;n=y[a++];)t.highlightElement(n)}};var N=!1;t.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Q);var ue=Q.exports;const j=le(ue);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{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/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{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*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{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*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/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,"javascript"));Prism.languages.js=Prism.languages.javascript;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://,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;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"];(function(r){var e=/\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*)*/.source,l={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[l,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:l.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:l.inside}],keyword:e,function:[r.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/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.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":l,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:l.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:l.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*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);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;(function(r){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(Prism);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:/[;[\]()`,.]/};(function(r){var e="\\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",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},l={bash:t,environment:{pattern:RegExp("\\$"+e),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("(\\{)"+e),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})/};r.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;|&]|[<>]\\()"+e),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:l},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:l},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:l.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:l.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}},t.inside=r.languages.bash;for(var p=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],m=l.variable[1].inside,b=0;b<p.length;b++)m[p[b]]=r.languages.bash[p[b]];r.languages.sh=r.languages.bash,r.languages.shell=r.languages.bash})(Prism);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;const ce=`
|
|
74
|
+
*/var t=function(l){var p=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,f=0,b={},u={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function a(n){return n instanceof h?new h(n.type,a(n.content),n.alias):Array.isArray(n)?n.map(a):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(a){return Object.prototype.toString.call(a).slice(8,-1)},objId:function(a){return a.__id||Object.defineProperty(a,"__id",{value:++f}),a.__id},clone:function a(n,i){i=i||{};var s,o;switch(u.util.type(n)){case"Object":if(o=u.util.objId(n),i[o])return i[o];s={},i[o]=s;for(var d in n)n.hasOwnProperty(d)&&(s[d]=a(n[d],i));return s;case"Array":return o=u.util.objId(n),i[o]?i[o]:(s=[],i[o]=s,n.forEach(function(g,c){s[c]=a(g,i)}),s);default:return n}},getLanguage:function(a){for(;a;){var n=p.exec(a.className);if(n)return n[1].toLowerCase();a=a.parentElement}return"none"},setLanguage:function(a,n){a.className=a.className.replace(RegExp(p,"gi"),""),a.classList.add("language-"+n)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(s){var a=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack)||[])[1];if(a){var n=document.getElementsByTagName("script");for(var i in n)if(n[i].src==a)return n[i]}return null}},isActive:function(a,n,i){for(var s="no-"+n;a;){var o=a.classList;if(o.contains(n))return!0;if(o.contains(s))return!1;a=a.parentElement}return!!i}},languages:{plain:b,plaintext:b,text:b,txt:b,extend:function(a,n){var i=u.util.clone(u.languages[a]);for(var s in n)i[s]=n[s];return i},insertBefore:function(a,n,i,s){s=s||u.languages;var o=s[a],d={};for(var g in o)if(o.hasOwnProperty(g)){if(g==n)for(var c in i)i.hasOwnProperty(c)&&(d[c]=i[c]);i.hasOwnProperty(g)||(d[g]=o[g])}var E=s[a];return s[a]=d,u.languages.DFS(u.languages,function(S,I){I===E&&S!=a&&(this[S]=d)}),d},DFS:function a(n,i,s,o){o=o||{};var d=u.util.objId;for(var g in n)if(n.hasOwnProperty(g)){i.call(n,g,n[g],s||g);var c=n[g],E=u.util.type(c);E==="Object"&&!o[d(c)]?(o[d(c)]=!0,a(c,i,null,o)):E==="Array"&&!o[d(c)]&&(o[d(c)]=!0,a(c,i,g,o))}}},plugins:{},highlightAll:function(a,n){u.highlightAllUnder(document,a,n)},highlightAllUnder:function(a,n,i){var s={callback:i,container:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),u.hooks.run("before-all-elements-highlight",s);for(var o=0,d;d=s.elements[o++];)u.highlightElement(d,n===!0,s.callback)},highlightElement:function(a,n,i){var s=u.util.getLanguage(a),o=u.languages[s];u.util.setLanguage(a,s);var d=a.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(d,s);var g=a.textContent,c={element:a,language:s,grammar:o,code:g};function E(I){c.highlightedCode=I,u.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,u.hooks.run("after-highlight",c),u.hooks.run("complete",c),i&&i.call(c.element)}if(u.hooks.run("before-sanity-check",c),d=c.element.parentElement,d&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!c.code){u.hooks.run("complete",c),i&&i.call(c.element);return}if(u.hooks.run("before-highlight",c),!c.grammar){E(u.util.encode(c.code));return}if(n&&l.Worker){var S=new Worker(u.filename);S.onmessage=function(I){E(I.data)},S.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else E(u.highlight(c.code,c.grammar,c.language))},highlight:function(a,n,i){var s={code:a,grammar:n,language:i};if(u.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=u.tokenize(s.code,s.grammar),u.hooks.run("after-tokenize",s),h.stringify(u.util.encode(s.tokens),s.language)},tokenize:function(a,n){var i=n.rest;if(i){for(var s in i)n[s]=i[s];delete n.rest}var o=new F;return x(o,o.head,a),_(a,o,n,o.head,0),N(o)},hooks:{all:{},add:function(a,n){var i=u.hooks.all;i[a]=i[a]||[],i[a].push(n)},run:function(a,n){var i=u.hooks.all[a];if(!(!i||!i.length))for(var s=0,o;o=i[s++];)o(n)}},Token:h};l.Prism=u;function h(a,n,i,s){this.type=a,this.content=n,this.alias=i,this.length=(s||"").length|0}h.stringify=function a(n,i){if(typeof n=="string")return n;if(Array.isArray(n)){var s="";return n.forEach(function(E){s+=a(E,i)}),s}var o={type:n.type,content:a(n.content,i),tag:"span",classes:["token",n.type],attributes:{},language:i},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(o.classes,d):o.classes.push(d)),u.hooks.run("wrap",o);var g="";for(var c in o.attributes)g+=" "+c+'="'+(o.attributes[c]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+g+">"+o.content+"</"+o.tag+">"};function A(a,n,i,s){a.lastIndex=n;var o=a.exec(i);if(o&&s&&o[1]){var d=o[1].length;o.index+=d,o[0]=o[0].slice(d)}return o}function _(a,n,i,s,o,d){for(var g in i)if(!(!i.hasOwnProperty(g)||!i[g])){var c=i[g];c=Array.isArray(c)?c:[c];for(var E=0;E<c.length;++E){if(d&&d.cause==g+","+E)return;var S=c[E],I=S.inside,X=!!S.lookbehind,Z=!!S.greedy,ee=S.alias;if(Z&&!S.pattern.global){var te=S.pattern.toString().match(/[imsuy]*$/)[0];S.pattern=RegExp(S.pattern.source,te+"g")}for(var K=S.pattern||S,T=s.next,k=o;T!==n.tail&&!(d&&k>=d.reach);k+=T.value.length,T=T.next){var C=T.value;if(n.length>a.length)return;if(!(C instanceof h)){var D=1,w;if(Z){if(w=A(K,k,a,X),!w||w.index>=a.length)break;var P=w.index,re=w.index+w[0].length,R=k;for(R+=T.value.length;P>=R;)T=T.next,R+=T.value.length;if(R-=T.value.length,k=R,T.value instanceof h)continue;for(var O=T;O!==n.tail&&(R<re||typeof O.value=="string");O=O.next)D++,R+=O.value.length;D--,C=a.slice(k,R),w.index-=k}else if(w=A(K,0,C,X),!w)continue;var P=w.index,$=w[0],H=C.slice(0,P),V=C.slice(P+$.length),B=k+C.length;d&&B>d.reach&&(d.reach=B);var M=T.prev;H&&(M=x(n,M,H),k+=H.length),U(n,M,D);var ne=new h(g,I?u.tokenize($,I):$,ee,$);if(T=x(n,M,ne),V&&x(n,T,V),D>1){var G={cause:g+","+E,reach:B};_(a,n,i,T.prev,k,G),d&&G.reach>d.reach&&(d.reach=G.reach)}}}}}}function F(){var a={value:null,prev:null,next:null},n={value:null,prev:a,next:null};a.next=n,this.head=a,this.tail=n,this.length=0}function x(a,n,i){var s=n.next,o={value:i,prev:n,next:s};return n.next=o,s.prev=o,a.length++,o}function U(a,n,i){for(var s=n.next,o=0;o<i&&s!==a.tail;o++)s=s.next;n.next=s,s.prev=n,a.length-=o}function N(a){for(var n=[],i=a.head.next;i!==a.tail;)n.push(i.value),i=i.next;return n}if(!l.document)return l.addEventListener&&(u.disableWorkerMessageHandler||l.addEventListener("message",function(a){var n=JSON.parse(a.data),i=n.language,s=n.code,o=n.immediateClose;l.postMessage(u.highlight(s,u.languages[i],i)),o&&l.close()},!1)),u;var v=u.util.currentScript();v&&(u.filename=v.src,v.hasAttribute("data-manual")&&(u.manual=!0));function m(){u.manual||u.highlightAll()}if(!u.manual){var y=document.readyState;y==="loading"||y==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return u}(e);r.exports&&(r.exports=t),typeof J<"u"&&(J.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(l){l.type==="entity"&&(l.attributes.title=l.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(p,f){var b={};b["language-"+f]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[f]},b.cdata=/^<!\[CDATA\[|\]\]>$/i;var u={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:b}};u["language-"+f]={pattern:/[\s\S]+/,inside:t.languages[f]};var h={};h[p]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return p}),"i"),lookbehind:!0,greedy:!0,inside:u},t.languages.insertBefore("markup","cdata",h)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(l,p){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+l+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[p,"language-"+p],inside:t.languages[p]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(l){var p=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;l.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+p.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+p.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+p.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+p.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:p,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},l.languages.css.atrule.inside.rest=l.languages.css;var f=l.languages.markup;f&&(f.tag.addInlined("style","css"),f.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{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/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{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*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{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*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/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,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var l="Loading…",p=function(v,m){return"✖ Error "+v+" while fetching file: "+m},f="✖ Error: File does not exist or is empty",b={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",h="loading",A="loaded",_="failed",F="pre[data-src]:not(["+u+'="'+A+'"]):not(['+u+'="'+h+'"])';function x(v,m,y){var a=new XMLHttpRequest;a.open("GET",v,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?m(a.responseText):a.status>=400?y(p(a.status,a.statusText)):y(f))},a.send(null)}function U(v){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(m){var y=Number(m[1]),a=m[2],n=m[3];return a?n?[y,Number(n)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(v){v.selector+=", "+F}),t.hooks.add("before-sanity-check",function(v){var m=v.element;if(m.matches(F)){v.code="",m.setAttribute(u,h);var y=m.appendChild(document.createElement("CODE"));y.textContent=l;var a=m.getAttribute("data-src"),n=v.language;if(n==="none"){var i=(/\.(\w+)$/.exec(a)||[,"none"])[1];n=b[i]||i}t.util.setLanguage(y,n),t.util.setLanguage(m,n);var s=t.plugins.autoloader;s&&s.loadLanguages(n),x(a,function(o){m.setAttribute(u,A);var d=U(m.getAttribute("data-range"));if(d){var g=o.split(/\r\n?|\n/g),c=d[0],E=d[1]==null?g.length:d[1];c<0&&(c+=g.length),c=Math.max(0,Math.min(c-1,g.length)),E<0&&(E+=g.length),E=Math.max(0,Math.min(E,g.length)),o=g.slice(c,E).join(`
|
|
75
|
+
`),m.hasAttribute("data-start")||m.setAttribute("data-start",String(c+1))}y.textContent=o,t.highlightElement(y)},function(o){m.setAttribute(u,_),y.textContent=o})}}),t.plugins.fileHighlight={highlight:function(m){for(var y=(m||document).querySelectorAll(F),a=0,n;n=y[a++];)t.highlightElement(n)}};var N=!1;t.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Q);var ue=Q.exports;const j=le(ue);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{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/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{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*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{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*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/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,"javascript"));Prism.languages.js=Prism.languages.javascript;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://,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;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"];(function(r){var e=/\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*)*/.source,l={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[l,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:l.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:l.inside}],keyword:e,function:[r.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/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.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":l,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:l.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:l.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*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);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;(function(r){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.languages.rust.string})(Prism);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:/[;[\]()`,.]/};(function(r){var e="\\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",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},l={bash:t,environment:{pattern:RegExp("\\$"+e),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("(\\{)"+e),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})/};r.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;|&]|[<>]\\()"+e),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:l},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:l},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:l.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:l.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}},t.inside=r.languages.bash;for(var p=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],f=l.variable[1].inside,b=0;b<p.length;b++)f[p[b]]=r.languages.bash[p[b]];r.languages.sh=r.languages.bash,r.languages.shell=r.languages.bash})(Prism);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;const ce=`
|
|
76
|
+
/* 默认代码颜色 */
|
|
77
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
78
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
79
|
+
color: #f8f8f2 !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
.hep-cr-editor .token.comment,
|
|
77
83
|
.hep-cr-editor .token.prolog,
|
|
78
84
|
.hep-cr-editor .token.doctype,
|
|
@@ -92,6 +98,12 @@ This is a sample markdown document.`};function z(r){const e=r.toLowerCase();retu
|
|
|
92
98
|
color: #f92672 !important;
|
|
93
99
|
}
|
|
94
100
|
|
|
101
|
+
/* console 单独处理 - 必须是白色 */
|
|
102
|
+
.hep-cr-editor .token.property.console,
|
|
103
|
+
.hep-cr-editor .token.console {
|
|
104
|
+
color: #f8f8f2 !important;
|
|
105
|
+
}
|
|
106
|
+
|
|
95
107
|
.hep-cr-editor .token.boolean,
|
|
96
108
|
.hep-cr-editor .token.number {
|
|
97
109
|
color: #ae81ff !important;
|
|
@@ -131,7 +143,26 @@ This is a sample markdown document.`};function z(r){const e=r.toLowerCase();retu
|
|
|
131
143
|
.hep-cr-editor .token.important {
|
|
132
144
|
color: #fd971f !important;
|
|
133
145
|
}
|
|
146
|
+
|
|
147
|
+
/* 覆盖用户项目的 text-shadow 样式,避免白边 */
|
|
148
|
+
.hep-cr-editor code[class*="language-"],
|
|
149
|
+
.hep-cr-editor pre[class*="language-"],
|
|
150
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
151
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
152
|
+
text-shadow: none !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* 覆盖 console 等内置对象 */
|
|
156
|
+
.hep-cr-editor .token.console {
|
|
157
|
+
color: #f8f8f2 !important;
|
|
158
|
+
}
|
|
134
159
|
`,de=`
|
|
160
|
+
/* 默认代码颜色 */
|
|
161
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
162
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
163
|
+
color: #333 !important;
|
|
164
|
+
}
|
|
165
|
+
|
|
135
166
|
.hep-cr-editor .token.comment,
|
|
136
167
|
.hep-cr-editor .token.prolog,
|
|
137
168
|
.hep-cr-editor .token.doctype,
|
|
@@ -189,4 +220,17 @@ This is a sample markdown document.`};function z(r){const e=r.toLowerCase();retu
|
|
|
189
220
|
.hep-cr-editor .token.important {
|
|
190
221
|
color: #e36209;
|
|
191
222
|
}
|
|
192
|
-
`;function Y(r,e,t,l,p,m,b,u){var h=typeof r=="function"?r.options:r;return e&&(h.render=e,h.staticRenderFns=t,h._compiled=!0),m&&(h._scopeId="data-v-"+m),{exports:r,options:h}}typeof window<"u"&&(window.Prism=j);const pe={name:"CodeEditor",props:{value:{type:String,default:""},language:{type:String,default:"javascript"},theme:{type:String,default:"dark"},disabled:{type:Boolean,default:!1}},data:function(){return{highlightRef:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(r){this.loadPrismTheme(r)}},computed:{languageMap:function(){return{javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",python:"python",py:"python",java:"java",c:"c",cpp:"cpp","c++":"cpp",csharp:"csharp","c#":"csharp",go:"go",golang:"go",rust:"rust",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",sql:"sql",bash:"bash",sh:"bash",shell:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown"}},prismLanguage:function(){return this.languageMap[this.language.toLowerCase()]||"javascript"},editorBackground:function(){return this.theme==="dark"?"#1e1e1e":"#fafafa"},highlightedCode:function(){try{var r=j.languages[this.prismLanguage];if(r)return j.highlight(this.value||"",r,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(r){const e="hep-cr-prism-styles",t=document.getElementById(e),l=r==="dark"?ce:de;t&&t.remove();const p=document.createElement("style");p.id=e,p.textContent=l,document.head.appendChild(p)},escapeHtml:function(r){var e=document.createElement("div");return e.textContent=r,e.innerHTML},handleInput:function(r){this.$emit("input",r.target.value),this.$emit("update:value",r.target.value)},handleScroll:function(r){var e=this.$refs.highlightRef;e&&(e.scrollTop=r.target.scrollTop,e.scrollLeft=r.target.scrollLeft)},handleKeydown:function(r){if(r.key==="Tab"){r.preventDefault();var e=r.target,t=e.selectionStart,l=e.selectionEnd,p=e.value;e.value=p.substring(0,t)+" "+p.substring(l),e.selectionStart=e.selectionEnd=t+2,this.$emit("input",e.value),this.$emit("update:value",e.value)}}}};var ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hep-cr-editor",class:"hep-cr-theme-"+e.theme,style:{background:e.editorBackground}},[t("pre",{ref:"highlightRef",staticClass:"hep-cr-highlight",class:"language-"+e.prismLanguage,attrs:{"aria-hidden":"true"}},[t("code",{domProps:{innerHTML:e._s(e.highlightedCode)}})]),t("textarea",{staticClass:"hep-cr-input",attrs:{disabled:e.disabled,spellcheck:"false",placeholder:"Write your code here..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},he=[],me=Y(pe,ge,he,!1,null,"9d5753e0");const fe=me.exports,be={name:"CodeRunner",components:{CodeEditor:fe},props:{pistonUrl:{type:String,default:"/api/piston"},language:{type:String,default:"javascript"},theme:{type:String,default:"light",validator:function(r){return["light","dark"].indexOf(r)!==-1}},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{type:String,default:""},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],currentLanguage:this.language,currentTheme:this.theme,code:this.defaultCode||z(this.language),output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60}},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},languageOptions:function(){return this.runtimes.map(function(r){return{value:r.language+":"+r.version,label:r.language.charAt(0).toUpperCase()+r.language.slice(1)+" "+r.version}})},languageName:function(){var r=this.currentLanguage;return r.includes(":")?r.split(":")[0]:r}},watch:{currentLanguage:function(r){var e=r.includes(":")?r.split(":")[0]:r;this.code=z(e),this.$emit("language-change",e,this.code)}},mounted:function(){this.client=new se({pistonUrl:this.pistonUrl}),this.loadRuntimes()},methods:{loadRuntimes:function(){var r=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(e){r.runtimes=e}).catch(function(e){r.error=e.message||"Failed to load runtimes"}).finally(function(){r.runtimesLoading=!1})},execute:function(){var r=this;this.isRunning||(this.isRunning=!0,this.output="",this.stderr="",this.executionTime=null,this.error=null,this.activeTab="stdout",this.$emit("execute-start"),this.client.execute(this.languageName,this.code).then(function(e){r.output=e.output,r.stderr=e.stderr,r.executionTime=e.executionTime||null,r.activeTab=e.stderr?"stderr":"stdout",r.$emit("execute-end",e)}).catch(function(e){r.error=e.message||"Execution failed",r.$emit("execute-end",{success:!1,output:"",stderr:r.error,code:-1})}).finally(function(){r.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyOutput:function(){var r=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(r)},resetCode:function(){this.code=z(this.languageName)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(r){var e=this,t=document.querySelector(".hep-cr-runner-main");if(t){var l=function(m){var b=t.getBoundingClientRect(),u=(m.clientX-b.left)/b.width*100;e.editorWidth=Math.max(20,Math.min(80,u))},p=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",l),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}};var Ee=function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass]},[t("div",{staticClass:"hep-cr-runner-header"},[t("div",{staticClass:"hep-cr-runner-controls"},[e.showLanguageSelector?t("select",{directives:[{name:"model",rawName:"v-model",value:e.currentLanguage,expression:"currentLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(l){var p=Array.prototype.filter.call(l.target.options,function(m){return m.selected}).map(function(m){var b="_value"in m?m._value:m.value;return b});e.currentLanguage=l.target.multiple?p:p[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(l){return t("option",{key:l.value,domProps:{value:l.value}},[e._v(" "+e._s(l.label)+" ")])})],2):e._e()]),t("div",{staticClass:"hep-cr-runner-actions"},[t("button",{staticClass:"hep-cr-btn hep-cr-btn-run",attrs:{disabled:e.isRunning||e.runtimesLoading},on:{click:e.execute}},[e.isRunning?t("span",{staticClass:"hep-cr-spinner"}):t("span",{staticClass:"hep-cr-run-icon"},[e._v("▶")]),e._v(" "+e._s(e.isRunning?"运行中...":e.executorLabel)+" ")]),e.showEditor&&e.editable?t("button",{staticClass:"hep-cr-btn hep-cr-btn-reset",on:{click:e.resetCode}},[e._v(" 重置 ")]):e._e(),t("button",{staticClass:"hep-cr-btn hep-cr-btn-theme",attrs:{title:e.currentTheme==="light"?"Switch to dark mode":"Switch to light mode"},on:{click:e.toggleTheme}},[e._v(" "+e._s(e.currentTheme==="light"?"🌙":"☀️")+" ")])])]),e.error?t("div",{staticClass:"hep-cr-error-message"},[e._v(" "+e._s(e.error)+" ")]):e._e(),t("div",{staticClass:"hep-cr-runner-main"},[e.showEditor?t("div",{staticClass:"hep-cr-editor-panel",style:{width:e.editorWidth+"%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("span",{staticClass:"hep-cr-panel-title"},[e._v("编辑器")]),t("span",{staticClass:"hep-cr-language-badge"},[e._v(e._s(e.languageName))])]),t("CodeEditor",{attrs:{value:e.code,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:function(l){e.code=l}}})],1):e._e(),e.showEditor?t("div",{staticClass:"hep-cr-resize-handle",on:{mousedown:e.startDrag}},[t("div",{staticClass:"hep-cr-resize-line"})]):e._e(),t("div",{staticClass:"hep-cr-output-panel",style:{width:e.showEditor?100-e.editorWidth+"%":"100%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("div",{staticClass:"hep-cr-output-tabs"},[t("button",{class:["hep-cr-tab",{active:e.activeTab==="stdout"}],on:{click:function(l){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab",{active:e.activeTab==="stderr"}],on:{click:function(l){e.activeTab="stderr"}}},[e._v(" 错误 ")]):e._e()]),t("div",{staticClass:"hep-cr-output-actions"},[e.executionTime!==null?t("span",{staticClass:"hep-cr-execution-time"},[e._v(" "+e._s(e.executionTime)+"ms ")]):e._e(),t("button",{staticClass:"hep-cr-btn-icon",attrs:{title:"复制"},on:{click:e.copyOutput}},[t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])]),t("button",{staticClass:"hep-cr-btn-icon",attrs:{title:"清除"},on:{click:e.clearOutput}},[t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("polyline",{attrs:{points:"3 6 5 6 21 6"}}),t("path",{attrs:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}})])])])]),t("div",{staticClass:"hep-cr-output-content"},[e.activeTab==="stdout"?t("pre",[e._v(e._s(e.output||'点击"运行"执行代码'))]):t("pre",{staticClass:"hep-cr-stderr"},[e._v(e._s(e.stderr))])])])])])},ve=[],ye=Y(be,Ee,ve,!1,null,"490ecb17");const O=ye.exports,Ae={name:"CodeRunnerDialog",components:{CodeRunner:O},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800}},model:{prop:"value",event:"input"},data(){return{localVisible:this.value}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(r){this.localVisible=r}},methods:{close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(r){r.target===r.currentTarget&&this.close()}},expose:["close"]};var Se=function(){var e=this,t=e._self._c;return t("Teleport",{attrs:{to:"body"}},[t("Transition",{attrs:{name:"hep-cr-dialog-fade"}},[e.localVisible?t("div",{staticClass:"hep-cr-dialog-overlay",on:{click:e.handleOverlayClick}},[t("div",{staticClass:"hep-cr-dialog-container",style:{width:e.dialogWidth}},[t("div",{staticClass:"hep-cr-dialog-header"},[t("h3",{staticClass:"hep-cr-dialog-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"hep-cr-dialog-close",on:{click:e.close}},[t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),t("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])]),t("div",{staticClass:"hep-cr-dialog-body"},[t("CodeRunner",e._b({},"CodeRunner",e.$attrs,!1))],1),e.$slots.footer?t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2):e._e()])]):e._e()])],1)},Te=[],we=Y(Ae,Se,Te,!1,null,"ec700b03");const ke=we.exports;O.install=r=>{r.component("CodeRunner",O)};const _e={install(r){r.component("CodeRunner",O)}};exports.CodeRunner=O;exports.CodeRunnerDialog=ke;exports.default=_e;
|
|
223
|
+
|
|
224
|
+
/* 覆盖用户项目的 text-shadow 样式,避免白边 */
|
|
225
|
+
.hep-cr-editor code[class*="language-"],
|
|
226
|
+
.hep-cr-editor pre[class*="language-"],
|
|
227
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
228
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
229
|
+
text-shadow: none !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* 覆盖 console 等内置对象 */
|
|
233
|
+
.hep-cr-editor .token.console {
|
|
234
|
+
color: #333 !important;
|
|
235
|
+
}
|
|
236
|
+
`;function Y(r,e,t,l,p,f,b,u){var h=typeof r=="function"?r.options:r;return e&&(h.render=e,h.staticRenderFns=t,h._compiled=!0),f&&(h._scopeId="data-v-"+f),{exports:r,options:h}}typeof window<"u"&&(window.Prism=j);const pe={name:"CodeEditor",props:{value:{type:String,default:""},language:{type:String,default:"javascript"},theme:{type:String,default:"dark"},disabled:{type:Boolean,default:!1}},data:function(){return{highlightRef:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(r){this.loadPrismTheme(r)}},computed:{languageMap:function(){return{javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",python:"python",py:"python",java:"java",c:"c",cpp:"cpp","c++":"cpp",csharp:"csharp","c#":"csharp",go:"go",golang:"go",rust:"rust",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",sql:"sql",bash:"bash",sh:"bash",shell:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown"}},prismLanguage:function(){return this.languageMap[this.language.toLowerCase()]||"javascript"},editorBackground:function(){return this.theme==="dark"?"#1e1e1e":"#fafafa"},highlightedCode:function(){try{var r=j.languages[this.prismLanguage];if(r)return j.highlight(this.value||"",r,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(r){const e="hep-cr-prism-styles",t=document.getElementById(e),l=r==="dark"?ce:de;t&&t.remove();const p=document.createElement("style");p.id=e,p.textContent=l,document.head.appendChild(p)},escapeHtml:function(r){var e=document.createElement("div");return e.textContent=r,e.innerHTML},handleInput:function(r){this.$emit("input",r.target.value),this.$emit("update:value",r.target.value)},handleScroll:function(r){var e=this.$refs.highlightRef;e&&(e.scrollTop=r.target.scrollTop,e.scrollLeft=r.target.scrollLeft)},handleKeydown:function(r){if(r.key==="Tab"){r.preventDefault();var e=r.target,t=e.selectionStart,l=e.selectionEnd,p=e.value;e.value=p.substring(0,t)+" "+p.substring(l),e.selectionStart=e.selectionEnd=t+2,this.$emit("input",e.value),this.$emit("update:value",e.value)}}}};var ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hep-cr-editor",class:"hep-cr-theme-"+e.theme,style:{background:e.editorBackground}},[t("pre",{ref:"highlightRef",staticClass:"hep-cr-highlight",class:"language-"+e.prismLanguage,attrs:{"aria-hidden":"true"}},[t("code",{domProps:{innerHTML:e._s(e.highlightedCode)}})]),t("textarea",{staticClass:"hep-cr-input",attrs:{disabled:e.disabled,spellcheck:"false",placeholder:"Write your code here..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},he=[],fe=Y(pe,ge,he,!1,null,"54283826");const me=fe.exports,be={name:"CodeRunner",components:{CodeEditor:me},props:{pistonUrl:{type:String,default:"/api/piston"},language:{type:String,default:"javascript"},theme:{type:String,default:"light",validator:function(r){return["light","dark"].indexOf(r)!==-1}},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{type:String,default:""},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],currentLanguage:this.language,currentTheme:this.theme,code:this.defaultCode||W(this.language),output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60,copiedEditor:!1,copiedOutput:!1}},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},languageOptions:function(){return this.runtimes.map(function(r){return{value:r.language+":"+r.version,label:r.language.charAt(0).toUpperCase()+r.language.slice(1)+" "+r.version}})},languageName:function(){var r=this.currentLanguage;return r.includes(":")?r.split(":")[0]:r}},watch:{currentLanguage:function(r){var e=r.includes(":")?r.split(":")[0]:r;this.code=W(e),this.$emit("language-change",e,this.code)}},mounted:function(){this.client=new se({pistonUrl:this.pistonUrl}),this.loadRuntimes()},methods:{loadRuntimes:function(){var r=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(e){r.runtimes=e;var t=r.currentLanguage.split(":")[0],l=e.find(function(p){return p.language===t});l&&!r.currentLanguage.includes(":")&&(r.currentLanguage=t+":"+l.version)}).catch(function(e){r.error=e.message||"Failed to load runtimes"}).finally(function(){r.runtimesLoading=!1})},execute:function(){var r=this;this.isRunning||(this.isRunning=!0,this.output="",this.stderr="",this.executionTime=null,this.error=null,this.activeTab="stdout",this.$emit("execute-start"),this.client.execute(this.languageName,this.code).then(function(e){r.output=e.output,r.stderr=e.stderr,r.executionTime=e.executionTime||null,r.activeTab=e.stderr?"stderr":"stdout",r.$emit("execute-end",e)}).catch(function(e){r.error=e.message||"Execution failed",r.$emit("execute-end",{success:!1,output:"",stderr:r.error,code:-1})}).finally(function(){r.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var r=this;navigator.clipboard.writeText(this.code),this.copiedEditor=!0,setTimeout(function(){r.copiedEditor=!1},2e3)},copyOutput:function(){var r=this,e=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(e),this.copiedOutput=!0,setTimeout(function(){r.copiedOutput=!1},2e3)},resetCode:function(){this.code=W(this.languageName)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(r){var e=this,t=document.querySelector(".hep-cr-runner-main");if(t){var l=function(f){var b=t.getBoundingClientRect(),u=(f.clientX-b.left)/b.width*100;e.editorWidth=Math.max(20,Math.min(80,u))},p=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",l),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}};var Ee=function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass]},[t("div",{staticClass:"hep-cr-runner-header"},[t("div",{staticClass:"hep-cr-runner-controls"},[e.showLanguageSelector?t("select",{directives:[{name:"model",rawName:"v-model",value:e.currentLanguage,expression:"currentLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(l){var p=Array.prototype.filter.call(l.target.options,function(f){return f.selected}).map(function(f){var b="_value"in f?f._value:f.value;return b});e.currentLanguage=l.target.multiple?p:p[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(l){return t("option",{key:l.value,domProps:{value:l.value}},[e._v(" "+e._s(l.label)+" ")])})],2):e._e()]),t("div",{staticClass:"hep-cr-runner-actions"},[t("button",{staticClass:"hep-cr-btn hep-cr-btn-run",attrs:{disabled:e.isRunning||e.runtimesLoading},on:{click:e.execute}},[e.isRunning?t("span",{staticClass:"hep-cr-spinner"}):t("span",{staticClass:"hep-cr-run-icon"},[e._v("▶")]),e._v(" "+e._s(e.isRunning?"运行中...":e.executorLabel)+" ")]),e.showEditor&&e.editable?t("button",{staticClass:"hep-cr-btn hep-cr-btn-reset",on:{click:e.resetCode}},[e._v(" 重置 ")]):e._e(),t("button",{staticClass:"hep-cr-btn hep-cr-btn-theme",attrs:{title:e.currentTheme==="light"?"Switch to dark mode":"Switch to light mode"},on:{click:e.toggleTheme}},[e.currentTheme==="light"?t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("path",{attrs:{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}})]):t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("circle",{attrs:{cx:"12",cy:"12",r:"5"}}),t("line",{attrs:{x1:"12",y1:"1",x2:"12",y2:"3"}}),t("line",{attrs:{x1:"12",y1:"21",x2:"12",y2:"23"}}),t("line",{attrs:{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}}),t("line",{attrs:{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}}),t("line",{attrs:{x1:"1",y1:"12",x2:"3",y2:"12"}}),t("line",{attrs:{x1:"21",y1:"12",x2:"23",y2:"12"}}),t("line",{attrs:{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}}),t("line",{attrs:{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"}})])])])]),e.error?t("div",{staticClass:"hep-cr-error-message"},[e._v(" "+e._s(e.error)+" ")]):e._e(),t("div",{staticClass:"hep-cr-runner-main"},[e.showEditor?t("div",{staticClass:"hep-cr-editor-panel",style:{width:e.editorWidth+"%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("span",{staticClass:"hep-cr-panel-title"},[e._v("编辑器")]),t("div",{staticClass:"hep-cr-output-actions"},[t("span",{staticClass:"hep-cr-language-badge"},[e._v(e._s(e.languageName))]),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedEditor},attrs:{disabled:e.copiedEditor,title:e.copiedEditor?"已复制":"复制"},on:{click:e.copyCode}},[e.copiedEditor?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("CodeEditor",{attrs:{value:e.code,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:function(l){e.code=l}}})],1):e._e(),e.showEditor?t("div",{staticClass:"hep-cr-resize-handle",on:{mousedown:e.startDrag}},[t("div",{staticClass:"hep-cr-resize-line"})]):e._e(),t("div",{staticClass:"hep-cr-output-panel",style:{width:e.showEditor?100-e.editorWidth+"%":"100%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("div",{staticClass:"hep-cr-output-tabs"},[t("button",{class:["hep-cr-tab",{active:e.activeTab==="stdout"}],on:{click:function(l){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(l){e.activeTab="stderr"}}},[e._v(" 错误 ")]):e._e()]),t("div",{staticClass:"hep-cr-output-actions"},[e.executionTime!==null?t("span",{staticClass:"hep-cr-execution-time"},[e._v(" "+e._s(e.executionTime)+"ms ")]):e._e(),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedOutput},attrs:{disabled:e.copiedOutput,title:e.copiedOutput?"已复制":"复制"},on:{click:e.copyOutput}},[e.copiedOutput?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("div",{staticClass:"hep-cr-output-content"},[e.activeTab==="stdout"?t("pre",[e._v(e._s(e.isRunning?"代码执行中...":e.output||'点击"运行"执行代码'))]):t("pre",{staticClass:"hep-cr-stderr"},[e._v(e._s(e.stderr))])])])])])},ve=[],ye=Y(be,Ee,ve,!1,null,"6940e91c");const L=ye.exports,Ae={name:"CodeRunnerDialog",components:{CodeRunner:L},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800}},model:{prop:"value",event:"input"},data(){return{localVisible:this.value}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(r){this.localVisible=r}},methods:{close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(r){r.target===r.currentTarget&&this.close()}},expose:["close"]};var Se=function(){var e=this,t=e._self._c;return t("Teleport",{attrs:{to:"body"}},[t("Transition",{attrs:{name:"hep-cr-dialog-fade"}},[e.localVisible?t("div",{staticClass:"hep-cr-dialog-overlay",on:{click:e.handleOverlayClick}},[t("div",{staticClass:"hep-cr-dialog-container",style:{width:e.dialogWidth}},[t("div",{staticClass:"hep-cr-dialog-header"},[t("h3",{staticClass:"hep-cr-dialog-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"hep-cr-dialog-close",on:{click:e.close}},[t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),t("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])]),t("div",{staticClass:"hep-cr-dialog-body"},[t("CodeRunner",e._b({},"CodeRunner",e.$attrs,!1))],1),e.$slots.footer?t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2):e._e()])]):e._e()])],1)},Te=[],we=Y(Ae,Se,Te,!1,null,"ec700b03");const ke=we.exports;L.install=r=>{r.component("CodeRunner",L)};const _e={install(r){r.component("CodeRunner",L)}};exports.CodeRunner=L;exports.CodeRunnerDialog=ke;exports.default=_e;
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var ae = Object.defineProperty, ie = (r, e, t) => e in r ? ae(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, q = (r, e, t) => ie(r, typeof e != "symbol" ? e + "" : e, t);
|
|
2
|
-
let
|
|
2
|
+
let z = null;
|
|
3
3
|
class se {
|
|
4
4
|
constructor(e = {}) {
|
|
5
5
|
q(this, "baseUrl"), q(this, "timeout"), this.baseUrl = e.pistonUrl || "/api/piston", this.timeout = e.timeout || 3e3;
|
|
6
6
|
}
|
|
7
7
|
async getRuntimes(e = !1) {
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
8
|
+
if (z && !e)
|
|
9
|
+
return z;
|
|
10
10
|
try {
|
|
11
11
|
const t = await fetch(`${this.baseUrl}/runtimes`, {
|
|
12
12
|
method: "GET",
|
|
@@ -17,7 +17,7 @@ class se {
|
|
|
17
17
|
if (!t.ok)
|
|
18
18
|
throw new Error(`Failed to fetch runtimes: ${t.statusText}`);
|
|
19
19
|
const l = await t.json();
|
|
20
|
-
return
|
|
20
|
+
return z = l, l;
|
|
21
21
|
} catch (t) {
|
|
22
22
|
throw console.error("Failed to fetch runtimes:", t), t;
|
|
23
23
|
}
|
|
@@ -31,12 +31,12 @@ class se {
|
|
|
31
31
|
);
|
|
32
32
|
if (!p)
|
|
33
33
|
throw new Error(`Language '${e}' is not supported`);
|
|
34
|
-
const
|
|
34
|
+
const f = this.getFileName(e), b = {
|
|
35
35
|
language: p.language,
|
|
36
36
|
version: l.version || p.version,
|
|
37
37
|
files: [
|
|
38
38
|
{
|
|
39
|
-
name:
|
|
39
|
+
name: f,
|
|
40
40
|
content: t
|
|
41
41
|
}
|
|
42
42
|
],
|
|
@@ -55,11 +55,11 @@ class se {
|
|
|
55
55
|
});
|
|
56
56
|
if (!h.ok)
|
|
57
57
|
throw new Error(`Execute failed: ${h.statusText}`);
|
|
58
|
-
const A = await h.json(), _ = Date.now() - u,
|
|
58
|
+
const A = await h.json(), _ = Date.now() - u, F = A.run.stdout || "", x = A.run.stderr || "";
|
|
59
59
|
return {
|
|
60
60
|
success: A.run.code === 0,
|
|
61
|
-
output:
|
|
62
|
-
stderr:
|
|
61
|
+
output: F,
|
|
62
|
+
stderr: x,
|
|
63
63
|
code: A.run.code,
|
|
64
64
|
executionTime: _,
|
|
65
65
|
compile: A.compile ? {
|
|
@@ -206,7 +206,7 @@ h1 {
|
|
|
206
206
|
|
|
207
207
|
This is a sample markdown document.`
|
|
208
208
|
};
|
|
209
|
-
function
|
|
209
|
+
function W(r) {
|
|
210
210
|
const e = r.toLowerCase();
|
|
211
211
|
return oe[e] || `// ${r}
|
|
212
212
|
// Write your code here`;
|
|
@@ -227,7 +227,7 @@ var Q = { exports: {} };
|
|
|
227
227
|
* @public
|
|
228
228
|
*/
|
|
229
229
|
var t = function(l) {
|
|
230
|
-
var p = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
|
|
230
|
+
var p = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, f = 0, b = {}, u = {
|
|
231
231
|
/**
|
|
232
232
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
233
233
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -311,7 +311,7 @@ var Q = { exports: {} };
|
|
|
311
311
|
* @returns {number}
|
|
312
312
|
*/
|
|
313
313
|
objId: function(a) {
|
|
314
|
-
return a.__id || Object.defineProperty(a, "__id", { value: ++
|
|
314
|
+
return a.__id || Object.defineProperty(a, "__id", { value: ++f }), a.__id;
|
|
315
315
|
},
|
|
316
316
|
/**
|
|
317
317
|
* Creates a deep clone of the given object.
|
|
@@ -571,8 +571,8 @@ var Q = { exports: {} };
|
|
|
571
571
|
i.hasOwnProperty(g) || (d[g] = o[g]);
|
|
572
572
|
}
|
|
573
573
|
var E = s[a];
|
|
574
|
-
return s[a] = d, u.languages.DFS(u.languages, function(S,
|
|
575
|
-
|
|
574
|
+
return s[a] = d, u.languages.DFS(u.languages, function(S, I) {
|
|
575
|
+
I === E && S != a && (this[S] = d);
|
|
576
576
|
}), d;
|
|
577
577
|
},
|
|
578
578
|
// Traverse a language definition with Depth First Search
|
|
@@ -667,8 +667,8 @@ var Q = { exports: {} };
|
|
|
667
667
|
grammar: o,
|
|
668
668
|
code: g
|
|
669
669
|
};
|
|
670
|
-
function E(
|
|
671
|
-
c.highlightedCode =
|
|
670
|
+
function E(I) {
|
|
671
|
+
c.highlightedCode = I, u.hooks.run("before-insert", c), c.element.innerHTML = c.highlightedCode, u.hooks.run("after-highlight", c), u.hooks.run("complete", c), i && i.call(c.element);
|
|
672
672
|
}
|
|
673
673
|
if (u.hooks.run("before-sanity-check", c), d = c.element.parentElement, d && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !c.code) {
|
|
674
674
|
u.hooks.run("complete", c), i && i.call(c.element);
|
|
@@ -680,8 +680,8 @@ var Q = { exports: {} };
|
|
|
680
680
|
}
|
|
681
681
|
if (n && l.Worker) {
|
|
682
682
|
var S = new Worker(u.filename);
|
|
683
|
-
S.onmessage = function(
|
|
684
|
-
E(
|
|
683
|
+
S.onmessage = function(I) {
|
|
684
|
+
E(I.data);
|
|
685
685
|
}, S.postMessage(JSON.stringify({
|
|
686
686
|
language: c.language,
|
|
687
687
|
code: c.code,
|
|
@@ -751,8 +751,8 @@ var Q = { exports: {} };
|
|
|
751
751
|
n[s] = i[s];
|
|
752
752
|
delete n.rest;
|
|
753
753
|
}
|
|
754
|
-
var o = new
|
|
755
|
-
return
|
|
754
|
+
var o = new F();
|
|
755
|
+
return x(o, o.head, a), _(a, o, n, o.head, 0), L(o);
|
|
756
756
|
},
|
|
757
757
|
/**
|
|
758
758
|
* @namespace
|
|
@@ -839,7 +839,7 @@ var Q = { exports: {} };
|
|
|
839
839
|
for (var E = 0; E < c.length; ++E) {
|
|
840
840
|
if (d && d.cause == g + "," + E)
|
|
841
841
|
return;
|
|
842
|
-
var S = c[E],
|
|
842
|
+
var S = c[E], I = S.inside, X = !!S.lookbehind, Z = !!S.greedy, ee = S.alias;
|
|
843
843
|
if (Z && !S.pattern.global) {
|
|
844
844
|
var te = S.pattern.toString().match(/[imsuy]*$/)[0];
|
|
845
845
|
S.pattern = RegExp(S.pattern.source, te + "g");
|
|
@@ -853,22 +853,22 @@ var Q = { exports: {} };
|
|
|
853
853
|
if (Z) {
|
|
854
854
|
if (w = A(K, k, a, X), !w || w.index >= a.length)
|
|
855
855
|
break;
|
|
856
|
-
var D = w.index,
|
|
856
|
+
var D = w.index, re = w.index + w[0].length, R = k;
|
|
857
857
|
for (R += T.value.length; D >= R; )
|
|
858
858
|
T = T.next, R += T.value.length;
|
|
859
859
|
if (R -= T.value.length, k = R, T.value instanceof h)
|
|
860
860
|
continue;
|
|
861
|
-
for (var
|
|
862
|
-
N++, R +=
|
|
861
|
+
for (var O = T; O !== n.tail && (R < re || typeof O.value == "string"); O = O.next)
|
|
862
|
+
N++, R += O.value.length;
|
|
863
863
|
N--, C = a.slice(k, R), w.index -= k;
|
|
864
864
|
} else if (w = A(K, 0, C, X), !w)
|
|
865
865
|
continue;
|
|
866
866
|
var D = w.index, P = w[0], H = C.slice(0, D), V = C.slice(D + P.length), B = k + C.length;
|
|
867
867
|
d && B > d.reach && (d.reach = B);
|
|
868
868
|
var $ = T.prev;
|
|
869
|
-
H && ($ =
|
|
870
|
-
var
|
|
871
|
-
if (T =
|
|
869
|
+
H && ($ = x(n, $, H), k += H.length), U(n, $, N);
|
|
870
|
+
var ne = new h(g, I ? u.tokenize(P, I) : P, ee, P);
|
|
871
|
+
if (T = x(n, $, ne), V && x(n, T, V), N > 1) {
|
|
872
872
|
var G = {
|
|
873
873
|
cause: g + "," + E,
|
|
874
874
|
reach: B
|
|
@@ -880,11 +880,11 @@ var Q = { exports: {} };
|
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function F() {
|
|
884
884
|
var a = { value: null, prev: null, next: null }, n = { value: null, prev: a, next: null };
|
|
885
885
|
a.next = n, this.head = a, this.tail = n, this.length = 0;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function x(a, n, i) {
|
|
888
888
|
var s = n.next, o = { value: i, prev: n, next: s };
|
|
889
889
|
return n.next = o, s.prev = o, a.length++, o;
|
|
890
890
|
}
|
|
@@ -893,7 +893,7 @@ var Q = { exports: {} };
|
|
|
893
893
|
s = s.next;
|
|
894
894
|
n.next = s, s.prev = n, a.length -= o;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function L(a) {
|
|
897
897
|
for (var n = [], i = a.head.next; i !== a.tail; )
|
|
898
898
|
n.push(i.value), i = i.next;
|
|
899
899
|
return n;
|
|
@@ -905,12 +905,12 @@ var Q = { exports: {} };
|
|
|
905
905
|
}, !1)), u;
|
|
906
906
|
var v = u.util.currentScript();
|
|
907
907
|
v && (u.filename = v.src, v.hasAttribute("data-manual") && (u.manual = !0));
|
|
908
|
-
function
|
|
908
|
+
function m() {
|
|
909
909
|
u.manual || u.highlightAll();
|
|
910
910
|
}
|
|
911
911
|
if (!u.manual) {
|
|
912
912
|
var y = document.readyState;
|
|
913
|
-
y === "loading" || y === "interactive" && v && v.defer ? document.addEventListener("DOMContentLoaded",
|
|
913
|
+
y === "loading" || y === "interactive" && v && v.defer ? document.addEventListener("DOMContentLoaded", m) : window.requestAnimationFrame ? window.requestAnimationFrame(m) : window.setTimeout(m, 16);
|
|
914
914
|
}
|
|
915
915
|
return u;
|
|
916
916
|
}(e);
|
|
@@ -1005,12 +1005,12 @@ var Q = { exports: {} };
|
|
|
1005
1005
|
* @example
|
|
1006
1006
|
* addInlined('style', 'css');
|
|
1007
1007
|
*/
|
|
1008
|
-
value: function(p,
|
|
1008
|
+
value: function(p, f) {
|
|
1009
1009
|
var b = {};
|
|
1010
|
-
b["language-" +
|
|
1010
|
+
b["language-" + f] = {
|
|
1011
1011
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
1012
1012
|
lookbehind: !0,
|
|
1013
|
-
inside: t.languages[
|
|
1013
|
+
inside: t.languages[f]
|
|
1014
1014
|
}, b.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
1015
1015
|
var u = {
|
|
1016
1016
|
"included-cdata": {
|
|
@@ -1018,9 +1018,9 @@ var Q = { exports: {} };
|
|
|
1018
1018
|
inside: b
|
|
1019
1019
|
}
|
|
1020
1020
|
};
|
|
1021
|
-
u["language-" +
|
|
1021
|
+
u["language-" + f] = {
|
|
1022
1022
|
pattern: /[\s\S]+/,
|
|
1023
|
-
inside: t.languages[
|
|
1023
|
+
inside: t.languages[f]
|
|
1024
1024
|
};
|
|
1025
1025
|
var h = {};
|
|
1026
1026
|
h[p] = {
|
|
@@ -1126,8 +1126,8 @@ var Q = { exports: {} };
|
|
|
1126
1126
|
},
|
|
1127
1127
|
punctuation: /[(){};:,]/
|
|
1128
1128
|
}, l.languages.css.atrule.inside.rest = l.languages.css;
|
|
1129
|
-
var
|
|
1130
|
-
|
|
1129
|
+
var f = l.languages.markup;
|
|
1130
|
+
f && (f.tag.addInlined("style", "css"), f.tag.addAttribute("style", "css"));
|
|
1131
1131
|
}(t), t.languages.clike = {
|
|
1132
1132
|
comment: [
|
|
1133
1133
|
{
|
|
@@ -1292,9 +1292,9 @@ var Q = { exports: {} };
|
|
|
1292
1292
|
if (typeof t > "u" || typeof document > "u")
|
|
1293
1293
|
return;
|
|
1294
1294
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1295
|
-
var l = "Loading…", p = function(v,
|
|
1296
|
-
return "✖ Error " + v + " while fetching file: " +
|
|
1297
|
-
},
|
|
1295
|
+
var l = "Loading…", p = function(v, m) {
|
|
1296
|
+
return "✖ Error " + v + " while fetching file: " + m;
|
|
1297
|
+
}, f = "✖ Error: File does not exist or is empty", b = {
|
|
1298
1298
|
js: "javascript",
|
|
1299
1299
|
py: "python",
|
|
1300
1300
|
rb: "ruby",
|
|
@@ -1304,52 +1304,52 @@ var Q = { exports: {} };
|
|
|
1304
1304
|
bat: "batch",
|
|
1305
1305
|
h: "c",
|
|
1306
1306
|
tex: "latex"
|
|
1307
|
-
}, u = "data-src-status", h = "loading", A = "loaded", _ = "failed",
|
|
1308
|
-
function
|
|
1307
|
+
}, u = "data-src-status", h = "loading", A = "loaded", _ = "failed", F = "pre[data-src]:not([" + u + '="' + A + '"]):not([' + u + '="' + h + '"])';
|
|
1308
|
+
function x(v, m, y) {
|
|
1309
1309
|
var a = new XMLHttpRequest();
|
|
1310
1310
|
a.open("GET", v, !0), a.onreadystatechange = function() {
|
|
1311
|
-
a.readyState == 4 && (a.status < 400 && a.responseText ?
|
|
1311
|
+
a.readyState == 4 && (a.status < 400 && a.responseText ? m(a.responseText) : a.status >= 400 ? y(p(a.status, a.statusText)) : y(f));
|
|
1312
1312
|
}, a.send(null);
|
|
1313
1313
|
}
|
|
1314
1314
|
function U(v) {
|
|
1315
|
-
var
|
|
1316
|
-
if (
|
|
1317
|
-
var y = Number(
|
|
1315
|
+
var m = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v || "");
|
|
1316
|
+
if (m) {
|
|
1317
|
+
var y = Number(m[1]), a = m[2], n = m[3];
|
|
1318
1318
|
return a ? n ? [y, Number(n)] : [y, void 0] : [y, y];
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
t.hooks.add("before-highlightall", function(v) {
|
|
1322
|
-
v.selector += ", " +
|
|
1322
|
+
v.selector += ", " + F;
|
|
1323
1323
|
}), t.hooks.add("before-sanity-check", function(v) {
|
|
1324
|
-
var
|
|
1324
|
+
var m = (
|
|
1325
1325
|
/** @type {HTMLPreElement} */
|
|
1326
1326
|
v.element
|
|
1327
1327
|
);
|
|
1328
|
-
if (
|
|
1329
|
-
v.code = "",
|
|
1330
|
-
var y =
|
|
1328
|
+
if (m.matches(F)) {
|
|
1329
|
+
v.code = "", m.setAttribute(u, h);
|
|
1330
|
+
var y = m.appendChild(document.createElement("CODE"));
|
|
1331
1331
|
y.textContent = l;
|
|
1332
|
-
var a =
|
|
1332
|
+
var a = m.getAttribute("data-src"), n = v.language;
|
|
1333
1333
|
if (n === "none") {
|
|
1334
1334
|
var i = (/\.(\w+)$/.exec(a) || [, "none"])[1];
|
|
1335
1335
|
n = b[i] || i;
|
|
1336
1336
|
}
|
|
1337
|
-
t.util.setLanguage(y, n), t.util.setLanguage(
|
|
1337
|
+
t.util.setLanguage(y, n), t.util.setLanguage(m, n);
|
|
1338
1338
|
var s = t.plugins.autoloader;
|
|
1339
|
-
s && s.loadLanguages(n),
|
|
1339
|
+
s && s.loadLanguages(n), x(
|
|
1340
1340
|
a,
|
|
1341
1341
|
function(o) {
|
|
1342
|
-
|
|
1343
|
-
var d = U(
|
|
1342
|
+
m.setAttribute(u, A);
|
|
1343
|
+
var d = U(m.getAttribute("data-range"));
|
|
1344
1344
|
if (d) {
|
|
1345
1345
|
var g = o.split(/\r\n?|\n/g), c = d[0], E = d[1] == null ? g.length : d[1];
|
|
1346
1346
|
c < 0 && (c += g.length), c = Math.max(0, Math.min(c - 1, g.length)), E < 0 && (E += g.length), E = Math.max(0, Math.min(E, g.length)), o = g.slice(c, E).join(`
|
|
1347
|
-
`),
|
|
1347
|
+
`), m.hasAttribute("data-start") || m.setAttribute("data-start", String(c + 1));
|
|
1348
1348
|
}
|
|
1349
1349
|
y.textContent = o, t.highlightElement(y);
|
|
1350
1350
|
},
|
|
1351
1351
|
function(o) {
|
|
1352
|
-
|
|
1352
|
+
m.setAttribute(u, _), y.textContent = o;
|
|
1353
1353
|
}
|
|
1354
1354
|
);
|
|
1355
1355
|
}
|
|
@@ -1361,14 +1361,14 @@ var Q = { exports: {} };
|
|
|
1361
1361
|
*
|
|
1362
1362
|
* @param {ParentNode} [container=document]
|
|
1363
1363
|
*/
|
|
1364
|
-
highlight: function(
|
|
1365
|
-
for (var y = (
|
|
1364
|
+
highlight: function(m) {
|
|
1365
|
+
for (var y = (m || document).querySelectorAll(F), a = 0, n; n = y[a++]; )
|
|
1366
1366
|
t.highlightElement(n);
|
|
1367
1367
|
}
|
|
1368
1368
|
};
|
|
1369
|
-
var
|
|
1369
|
+
var L = !1;
|
|
1370
1370
|
t.fileHighlight = function() {
|
|
1371
|
-
|
|
1371
|
+
L || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), L = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
1372
1372
|
};
|
|
1373
1373
|
}();
|
|
1374
1374
|
})(Q);
|
|
@@ -2185,8 +2185,8 @@ Prism.languages.sql = {
|
|
|
2185
2185
|
"operator",
|
|
2186
2186
|
"punctuation",
|
|
2187
2187
|
"number"
|
|
2188
|
-
],
|
|
2189
|
-
|
|
2188
|
+
], f = l.variable[1].inside, b = 0; b < p.length; b++)
|
|
2189
|
+
f[p[b]] = r.languages.bash[p[b]];
|
|
2190
2190
|
r.languages.sh = r.languages.bash, r.languages.shell = r.languages.bash;
|
|
2191
2191
|
})(Prism);
|
|
2192
2192
|
Prism.languages.json = {
|
|
@@ -2215,6 +2215,12 @@ Prism.languages.json = {
|
|
|
2215
2215
|
};
|
|
2216
2216
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
2217
2217
|
const ce = `
|
|
2218
|
+
/* 默认代码颜色 */
|
|
2219
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
2220
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
2221
|
+
color: #f8f8f2 !important;
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2218
2224
|
.hep-cr-editor .token.comment,
|
|
2219
2225
|
.hep-cr-editor .token.prolog,
|
|
2220
2226
|
.hep-cr-editor .token.doctype,
|
|
@@ -2234,6 +2240,12 @@ const ce = `
|
|
|
2234
2240
|
color: #f92672 !important;
|
|
2235
2241
|
}
|
|
2236
2242
|
|
|
2243
|
+
/* console 单独处理 - 必须是白色 */
|
|
2244
|
+
.hep-cr-editor .token.property.console,
|
|
2245
|
+
.hep-cr-editor .token.console {
|
|
2246
|
+
color: #f8f8f2 !important;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2237
2249
|
.hep-cr-editor .token.boolean,
|
|
2238
2250
|
.hep-cr-editor .token.number {
|
|
2239
2251
|
color: #ae81ff !important;
|
|
@@ -2273,7 +2285,26 @@ const ce = `
|
|
|
2273
2285
|
.hep-cr-editor .token.important {
|
|
2274
2286
|
color: #fd971f !important;
|
|
2275
2287
|
}
|
|
2288
|
+
|
|
2289
|
+
/* 覆盖用户项目的 text-shadow 样式,避免白边 */
|
|
2290
|
+
.hep-cr-editor code[class*="language-"],
|
|
2291
|
+
.hep-cr-editor pre[class*="language-"],
|
|
2292
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
2293
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
2294
|
+
text-shadow: none !important;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
/* 覆盖 console 等内置对象 */
|
|
2298
|
+
.hep-cr-editor .token.console {
|
|
2299
|
+
color: #f8f8f2 !important;
|
|
2300
|
+
}
|
|
2276
2301
|
`, de = `
|
|
2302
|
+
/* 默认代码颜色 */
|
|
2303
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
2304
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
2305
|
+
color: #333 !important;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2277
2308
|
.hep-cr-editor .token.comment,
|
|
2278
2309
|
.hep-cr-editor .token.prolog,
|
|
2279
2310
|
.hep-cr-editor .token.doctype,
|
|
@@ -2331,10 +2362,23 @@ const ce = `
|
|
|
2331
2362
|
.hep-cr-editor .token.important {
|
|
2332
2363
|
color: #e36209;
|
|
2333
2364
|
}
|
|
2365
|
+
|
|
2366
|
+
/* 覆盖用户项目的 text-shadow 样式,避免白边 */
|
|
2367
|
+
.hep-cr-editor code[class*="language-"],
|
|
2368
|
+
.hep-cr-editor pre[class*="language-"],
|
|
2369
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
2370
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
2371
|
+
text-shadow: none !important;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
/* 覆盖 console 等内置对象 */
|
|
2375
|
+
.hep-cr-editor .token.console {
|
|
2376
|
+
color: #333 !important;
|
|
2377
|
+
}
|
|
2334
2378
|
`;
|
|
2335
|
-
function Y(r, e, t, l, p,
|
|
2379
|
+
function Y(r, e, t, l, p, f, b, u) {
|
|
2336
2380
|
var h = typeof r == "function" ? r.options : r;
|
|
2337
|
-
return e && (h.render = e, h.staticRenderFns = t, h._compiled = !0),
|
|
2381
|
+
return e && (h.render = e, h.staticRenderFns = t, h._compiled = !0), f && (h._scopeId = "data-v-" + f), {
|
|
2338
2382
|
exports: r,
|
|
2339
2383
|
options: h
|
|
2340
2384
|
};
|
|
@@ -2458,18 +2502,18 @@ const pe = {
|
|
|
2458
2502
|
var ge = function() {
|
|
2459
2503
|
var e = this, t = e._self._c;
|
|
2460
2504
|
return t("div", { staticClass: "hep-cr-editor", class: "hep-cr-theme-" + e.theme, style: { background: e.editorBackground } }, [t("pre", { ref: "highlightRef", staticClass: "hep-cr-highlight", class: "language-" + e.prismLanguage, attrs: { "aria-hidden": "true" } }, [t("code", { domProps: { innerHTML: e._s(e.highlightedCode) } })]), t("textarea", { staticClass: "hep-cr-input", attrs: { disabled: e.disabled, spellcheck: "false", placeholder: "Write your code here..." }, domProps: { value: e.value }, on: { input: e.handleInput, scroll: e.handleScroll, keydown: e.handleKeydown } })]);
|
|
2461
|
-
}, he = [],
|
|
2505
|
+
}, he = [], fe = /* @__PURE__ */ Y(
|
|
2462
2506
|
pe,
|
|
2463
2507
|
ge,
|
|
2464
2508
|
he,
|
|
2465
2509
|
!1,
|
|
2466
2510
|
null,
|
|
2467
|
-
"
|
|
2511
|
+
"54283826"
|
|
2468
2512
|
);
|
|
2469
|
-
const
|
|
2513
|
+
const me = fe.exports, be = {
|
|
2470
2514
|
name: "CodeRunner",
|
|
2471
2515
|
components: {
|
|
2472
|
-
CodeEditor:
|
|
2516
|
+
CodeEditor: me
|
|
2473
2517
|
},
|
|
2474
2518
|
props: {
|
|
2475
2519
|
pistonUrl: {
|
|
@@ -2513,7 +2557,7 @@ const fe = me.exports, be = {
|
|
|
2513
2557
|
runtimes: [],
|
|
2514
2558
|
currentLanguage: this.language,
|
|
2515
2559
|
currentTheme: this.theme,
|
|
2516
|
-
code: this.defaultCode ||
|
|
2560
|
+
code: this.defaultCode || W(this.language),
|
|
2517
2561
|
output: "",
|
|
2518
2562
|
stderr: "",
|
|
2519
2563
|
isRunning: !1,
|
|
@@ -2522,7 +2566,9 @@ const fe = me.exports, be = {
|
|
|
2522
2566
|
error: null,
|
|
2523
2567
|
runtimesLoading: !1,
|
|
2524
2568
|
client: null,
|
|
2525
|
-
editorWidth: 60
|
|
2569
|
+
editorWidth: 60,
|
|
2570
|
+
copiedEditor: !1,
|
|
2571
|
+
copiedOutput: !1
|
|
2526
2572
|
};
|
|
2527
2573
|
},
|
|
2528
2574
|
computed: {
|
|
@@ -2545,7 +2591,7 @@ const fe = me.exports, be = {
|
|
|
2545
2591
|
watch: {
|
|
2546
2592
|
currentLanguage: function(r) {
|
|
2547
2593
|
var e = r.includes(":") ? r.split(":")[0] : r;
|
|
2548
|
-
this.code =
|
|
2594
|
+
this.code = W(e), this.$emit("language-change", e, this.code);
|
|
2549
2595
|
}
|
|
2550
2596
|
},
|
|
2551
2597
|
mounted: function() {
|
|
@@ -2556,6 +2602,10 @@ const fe = me.exports, be = {
|
|
|
2556
2602
|
var r = this;
|
|
2557
2603
|
this.runtimesLoading = !0, this.error = null, this.client.getRuntimes().then(function(e) {
|
|
2558
2604
|
r.runtimes = e;
|
|
2605
|
+
var t = r.currentLanguage.split(":")[0], l = e.find(function(p) {
|
|
2606
|
+
return p.language === t;
|
|
2607
|
+
});
|
|
2608
|
+
l && !r.currentLanguage.includes(":") && (r.currentLanguage = t + ":" + l.version);
|
|
2559
2609
|
}).catch(function(e) {
|
|
2560
2610
|
r.error = e.message || "Failed to load runtimes";
|
|
2561
2611
|
}).finally(function() {
|
|
@@ -2580,12 +2630,20 @@ const fe = me.exports, be = {
|
|
|
2580
2630
|
clearOutput: function() {
|
|
2581
2631
|
this.output = "", this.stderr = "", this.executionTime = null, this.error = null;
|
|
2582
2632
|
},
|
|
2633
|
+
copyCode: function() {
|
|
2634
|
+
var r = this;
|
|
2635
|
+
navigator.clipboard.writeText(this.code), this.copiedEditor = !0, setTimeout(function() {
|
|
2636
|
+
r.copiedEditor = !1;
|
|
2637
|
+
}, 2e3);
|
|
2638
|
+
},
|
|
2583
2639
|
copyOutput: function() {
|
|
2584
|
-
var r = this.activeTab === "stdout" ? this.output : this.stderr;
|
|
2585
|
-
navigator.clipboard.writeText(
|
|
2640
|
+
var r = this, e = this.activeTab === "stdout" ? this.output : this.stderr;
|
|
2641
|
+
navigator.clipboard.writeText(e), this.copiedOutput = !0, setTimeout(function() {
|
|
2642
|
+
r.copiedOutput = !1;
|
|
2643
|
+
}, 2e3);
|
|
2586
2644
|
},
|
|
2587
2645
|
resetCode: function() {
|
|
2588
|
-
this.code =
|
|
2646
|
+
this.code = W(this.languageName);
|
|
2589
2647
|
},
|
|
2590
2648
|
toggleTheme: function() {
|
|
2591
2649
|
this.currentTheme = this.currentTheme === "light" ? "dark" : "light";
|
|
@@ -2593,8 +2651,8 @@ const fe = me.exports, be = {
|
|
|
2593
2651
|
startDrag: function(r) {
|
|
2594
2652
|
var e = this, t = document.querySelector(".hep-cr-runner-main");
|
|
2595
2653
|
if (t) {
|
|
2596
|
-
var l = function(
|
|
2597
|
-
var b = t.getBoundingClientRect(), u = (
|
|
2654
|
+
var l = function(f) {
|
|
2655
|
+
var b = t.getBoundingClientRect(), u = (f.clientX - b.left) / b.width * 100;
|
|
2598
2656
|
e.editorWidth = Math.max(20, Math.min(80, u));
|
|
2599
2657
|
}, p = function() {
|
|
2600
2658
|
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", p), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
@@ -2607,29 +2665,29 @@ const fe = me.exports, be = {
|
|
|
2607
2665
|
var Ee = function() {
|
|
2608
2666
|
var e = this, t = e._self._c;
|
|
2609
2667
|
return t("div", { class: ["hep-cr-runner", e.themeClass] }, [t("div", { staticClass: "hep-cr-runner-header" }, [t("div", { staticClass: "hep-cr-runner-controls" }, [e.showLanguageSelector ? t("select", { directives: [{ name: "model", rawName: "v-model", value: e.currentLanguage, expression: "currentLanguage" }], staticClass: "hep-cr-language-select", attrs: { disabled: e.isRunning }, on: { change: function(l) {
|
|
2610
|
-
var p = Array.prototype.filter.call(l.target.options, function(
|
|
2611
|
-
return
|
|
2612
|
-
}).map(function(
|
|
2613
|
-
var b = "_value" in
|
|
2668
|
+
var p = Array.prototype.filter.call(l.target.options, function(f) {
|
|
2669
|
+
return f.selected;
|
|
2670
|
+
}).map(function(f) {
|
|
2671
|
+
var b = "_value" in f ? f._value : f.value;
|
|
2614
2672
|
return b;
|
|
2615
2673
|
});
|
|
2616
2674
|
e.currentLanguage = l.target.multiple ? p : p[0];
|
|
2617
2675
|
} } }, [e.runtimesLoading ? t("option", { attrs: { value: "" } }, [e._v("加载中...")]) : e._e(), e._l(e.languageOptions, function(l) {
|
|
2618
2676
|
return t("option", { key: l.value, domProps: { value: l.value } }, [e._v(" " + e._s(l.label) + " ")]);
|
|
2619
|
-
})], 2) : e._e()]), t("div", { staticClass: "hep-cr-runner-actions" }, [t("button", { staticClass: "hep-cr-btn hep-cr-btn-run", attrs: { disabled: e.isRunning || e.runtimesLoading }, on: { click: e.execute } }, [e.isRunning ? t("span", { staticClass: "hep-cr-spinner" }) : t("span", { staticClass: "hep-cr-run-icon" }, [e._v("▶")]), e._v(" " + e._s(e.isRunning ? "运行中..." : e.executorLabel) + " ")]), e.showEditor && e.editable ? t("button", { staticClass: "hep-cr-btn hep-cr-btn-reset", on: { click: e.resetCode } }, [e._v(" 重置 ")]) : e._e(), t("button", { staticClass: "hep-cr-btn hep-cr-btn-theme", attrs: { title: e.currentTheme === "light" ? "Switch to dark mode" : "Switch to light mode" }, on: { click: e.toggleTheme } }, [e.
|
|
2677
|
+
})], 2) : e._e()]), t("div", { staticClass: "hep-cr-runner-actions" }, [t("button", { staticClass: "hep-cr-btn hep-cr-btn-run", attrs: { disabled: e.isRunning || e.runtimesLoading }, on: { click: e.execute } }, [e.isRunning ? t("span", { staticClass: "hep-cr-spinner" }) : t("span", { staticClass: "hep-cr-run-icon" }, [e._v("▶")]), e._v(" " + e._s(e.isRunning ? "运行中..." : e.executorLabel) + " ")]), e.showEditor && e.editable ? t("button", { staticClass: "hep-cr-btn hep-cr-btn-reset", on: { click: e.resetCode } }, [e._v(" 重置 ")]) : e._e(), t("button", { staticClass: "hep-cr-btn hep-cr-btn-theme", attrs: { title: e.currentTheme === "light" ? "Switch to dark mode" : "Switch to light mode" }, on: { click: e.toggleTheme } }, [e.currentTheme === "light" ? t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("path", { attrs: { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" } })]) : t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("circle", { attrs: { cx: "12", cy: "12", r: "5" } }), t("line", { attrs: { x1: "12", y1: "1", x2: "12", y2: "3" } }), t("line", { attrs: { x1: "12", y1: "21", x2: "12", y2: "23" } }), t("line", { attrs: { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" } }), t("line", { attrs: { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" } }), t("line", { attrs: { x1: "1", y1: "12", x2: "3", y2: "12" } }), t("line", { attrs: { x1: "21", y1: "12", x2: "23", y2: "12" } }), t("line", { attrs: { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" } }), t("line", { attrs: { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" } })])])])]), e.error ? t("div", { staticClass: "hep-cr-error-message" }, [e._v(" " + e._s(e.error) + " ")]) : e._e(), t("div", { staticClass: "hep-cr-runner-main" }, [e.showEditor ? t("div", { staticClass: "hep-cr-editor-panel", style: { width: e.editorWidth + "%" } }, [t("div", { staticClass: "hep-cr-panel-header" }, [t("span", { staticClass: "hep-cr-panel-title" }, [e._v("编辑器")]), t("div", { staticClass: "hep-cr-output-actions" }, [t("span", { staticClass: "hep-cr-language-badge" }, [e._v(e._s(e.languageName))]), t("button", { staticClass: "hep-cr-btn-icon", class: { "hep-cr-btn-copied": e.copiedEditor }, attrs: { disabled: e.copiedEditor, title: e.copiedEditor ? "已复制" : "复制" }, on: { click: e.copyCode } }, [e.copiedEditor ? t("span", { staticClass: "hep-cr-copied-text" }, [e._v("已复制")]) : t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("rect", { attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" } }), t("path", { attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" } })])])])]), t("CodeEditor", { attrs: { value: e.code, language: e.languageName, theme: e.currentTheme, disabled: !e.editable || e.isRunning }, on: { input: function(l) {
|
|
2620
2678
|
e.code = l;
|
|
2621
2679
|
} } })], 1) : e._e(), e.showEditor ? t("div", { staticClass: "hep-cr-resize-handle", on: { mousedown: e.startDrag } }, [t("div", { staticClass: "hep-cr-resize-line" })]) : e._e(), t("div", { staticClass: "hep-cr-output-panel", style: { width: e.showEditor ? 100 - e.editorWidth + "%" : "100%" } }, [t("div", { staticClass: "hep-cr-panel-header" }, [t("div", { staticClass: "hep-cr-output-tabs" }, [t("button", { class: ["hep-cr-tab", { active: e.activeTab === "stdout" }], on: { click: function(l) {
|
|
2622
2680
|
e.activeTab = "stdout";
|
|
2623
|
-
} } }, [e._v(" 输出 ")]), e.stderr ? t("button", { class: ["hep-cr-tab", { active: e.activeTab === "stderr" }], on: { click: function(l) {
|
|
2681
|
+
} } }, [e._v(" 输出 ")]), e.stderr ? t("button", { class: ["hep-cr-tab", "hep-cr-tab-error", { active: e.activeTab === "stderr" }], on: { click: function(l) {
|
|
2624
2682
|
e.activeTab = "stderr";
|
|
2625
|
-
} } }, [e._v(" 错误 ")]) : e._e()]), t("div", { staticClass: "hep-cr-output-actions" }, [e.executionTime !== null ? t("span", { staticClass: "hep-cr-execution-time" }, [e._v(" " + e._s(e.executionTime) + "ms ")]) : e._e(), t("button", { staticClass: "hep-cr-btn-icon",
|
|
2683
|
+
} } }, [e._v(" 错误 ")]) : e._e()]), t("div", { staticClass: "hep-cr-output-actions" }, [e.executionTime !== null ? t("span", { staticClass: "hep-cr-execution-time" }, [e._v(" " + e._s(e.executionTime) + "ms ")]) : e._e(), t("button", { staticClass: "hep-cr-btn-icon", class: { "hep-cr-btn-copied": e.copiedOutput }, attrs: { disabled: e.copiedOutput, title: e.copiedOutput ? "已复制" : "复制" }, on: { click: e.copyOutput } }, [e.copiedOutput ? t("span", { staticClass: "hep-cr-copied-text" }, [e._v("已复制")]) : t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("rect", { attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" } }), t("path", { attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" } })])])])]), t("div", { staticClass: "hep-cr-output-content" }, [e.activeTab === "stdout" ? t("pre", [e._v(e._s(e.isRunning ? "代码执行中..." : e.output || '点击"运行"执行代码'))]) : t("pre", { staticClass: "hep-cr-stderr" }, [e._v(e._s(e.stderr))])])])])]);
|
|
2626
2684
|
}, ve = [], ye = /* @__PURE__ */ Y(
|
|
2627
2685
|
be,
|
|
2628
2686
|
Ee,
|
|
2629
2687
|
ve,
|
|
2630
2688
|
!1,
|
|
2631
2689
|
null,
|
|
2632
|
-
"
|
|
2690
|
+
"6940e91c"
|
|
2633
2691
|
);
|
|
2634
2692
|
const M = ye.exports, Ae = {
|
|
2635
2693
|
name: "CodeRunnerDialog",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.hep-cr-editor[data-v-
|
|
1
|
+
.hep-cr-editor[data-v-54283826]{position:relative;flex:1;overflow:hidden}.hep-cr-highlight[data-v-54283826],.hep-cr-input[data-v-54283826]{position:absolute;top:0;left:0;width:100%;height:100%;padding:12px 16px;margin:0;border:none;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;white-space:pre;overflow:auto}.hep-cr-highlight[data-v-54283826]{pointer-events:none;z-index:1}.hep-cr-highlight.hep-cr-highlight[data-v-54283826]{background:transparent!important}.hep-cr-highlight code[data-v-54283826]{display:block;font-family:inherit;background:transparent!important}.hep-cr-input[data-v-54283826]{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#d4d4d4;resize:none;outline:none}.hep-cr-input[data-v-54283826]:disabled{opacity:.7}.hep-cr-theme-light .hep-cr-input[data-v-54283826]{caret-color:#333}.hep-cr-highlight pre[class*=language-][data-v-54283826]{text-shadow:none}.hep-cr-runner[data-v-6940e91c]{display:flex;flex-direction:column;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace}.hep-cr-runner-light[data-v-6940e91c]{background:#fff}.hep-cr-runner-dark[data-v-6940e91c]{background:#1e1e1e;border-color:#333}.hep-cr-runner-header[data-v-6940e91c]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#252526;border-bottom:1px solid #333}.hep-cr-runner-light .hep-cr-runner-header[data-v-6940e91c]{background:#f3f3f3;border-color:#e0e0e0}.hep-cr-runner-controls[data-v-6940e91c]{display:flex;gap:8px}.hep-cr-language-select[data-v-6940e91c]{padding:6px 12px;border:1px solid #444;border-radius:6px;background:#2d2d2d;color:#d4d4d4;font-size:13px;cursor:pointer;outline:none}.hep-cr-runner-light .hep-cr-language-select[data-v-6940e91c]{background:#fff;color:#333;border-color:#ccc}.hep-cr-language-select[data-v-6940e91c]:focus{border-color:#4fc3f7}.hep-cr-runner-actions[data-v-6940e91c]{display:flex;gap:8px}.hep-cr-btn[data-v-6940e91c]{padding:6px 16px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px;transition:all .2s}.hep-cr-btn[data-v-6940e91c]:disabled{opacity:.5;cursor:not-allowed}.hep-cr-btn-run[data-v-6940e91c]{background:linear-gradient(135deg,#4caf50,#43a047);color:#fff}.hep-cr-btn-run[data-v-6940e91c]:hover:not(:disabled){background:linear-gradient(135deg,#66bb6a,#4caf50)}.hep-cr-btn-reset[data-v-6940e91c]{background:#3d3d3d;color:#aaa}.hep-cr-runner-light .hep-cr-btn-reset[data-v-6940e91c]{background:#e0e0e0;color:#666}.hep-cr-btn-reset[data-v-6940e91c]:hover:not(:disabled){background:#4d4d4d;color:#fff}.hep-cr-btn-theme[data-v-6940e91c]{background:transparent;color:#fdd835;padding:6px 10px;font-size:14px;line-height:1;height:auto;min-height:28px;display:flex;align-items:center;justify-content:center}.hep-cr-btn-theme svg[data-v-6940e91c]{display:block;width:18px;height:18px}.hep-cr-runner-light .hep-cr-btn-theme[data-v-6940e91c]{color:#f57c00}.hep-cr-btn-theme[data-v-6940e91c]:hover{background:#ffffff1a;color:#fff}.hep-cr-runner-light .hep-cr-btn-theme[data-v-6940e91c]:hover{background:#0000000d}.hep-cr-error-message[data-v-6940e91c]{padding:10px 16px;background:#c62828;color:#fff;font-size:13px}.hep-cr-runner-main[data-v-6940e91c]{display:flex;height:400px;overflow:hidden}.hep-cr-editor-panel[data-v-6940e91c]{display:flex;flex-direction:column;min-width:20%;max-width:80%}.hep-cr-panel-header[data-v-6940e91c]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#2d2d2d;border-bottom:1px solid #333}.hep-cr-runner-light .hep-cr-panel-header[data-v-6940e91c]{background:#f0f0f0;border-color:#e0e0e0}.hep-cr-panel-title[data-v-6940e91c]{font-size:12px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.5px}.hep-cr-language-badge[data-v-6940e91c]{font-size:11px;padding:2px 8px;background:#4fc3f7;color:#000;border-radius:10px;font-weight:500}.hep-cr-editor[data-v-6940e91c]{flex:1;width:100%;background:#1e1e1e}.hep-cr-editor .hep-cr-highlight[data-v-6940e91c]{background:transparent!important}.hep-cr-editor .hep-cr-input[data-v-6940e91c]{color:transparent!important;caret-color:#d4d4d4}.hep-cr-runner-light .hep-cr-editor[data-v-6940e91c]{background:#fafafa}.hep-cr-runner-light .hep-cr-editor .hep-cr-highlight code[data-v-6940e91c]{color:#333}.hep-cr-resize-handle[data-v-6940e91c]{width:8px;background:#2d2d2d;cursor:col-resize;display:flex;align-items:center;justify-content:center;transition:background .2s;border-left:1px solid #3d3d3d;border-right:1px solid #3d3d3d}.hep-cr-resize-handle[data-v-6940e91c]:hover{background:#4fc3f7}.hep-cr-resize-line[data-v-6940e91c]{width:3px;height:40px;background:#555;border-radius:2px;transition:background .2s}.hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-6940e91c]{background:#fff}.hep-cr-runner-light .hep-cr-resize-handle[data-v-6940e91c]{background:#e0e0e0;border-color:#ccc}.hep-cr-runner-light .hep-cr-resize-line[data-v-6940e91c]{background:#bbb}.hep-cr-runner-light .hep-cr-resize-handle[data-v-6940e91c]:hover{background:#4fc3f7}.hep-cr-runner-light .hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-6940e91c]{background:#fff}.hep-cr-output-panel[data-v-6940e91c]{display:flex;flex-direction:column;min-width:20%;border-left:1px solid #333}.hep-cr-runner-light .hep-cr-output-panel[data-v-6940e91c]{border-color:#e0e0e0}.hep-cr-output-tabs[data-v-6940e91c]{display:flex;gap:4px}.hep-cr-tab[data-v-6940e91c]{padding:4px 12px;border:none;background:transparent;cursor:pointer;font-size:12px;border-radius:4px;color:#888;transition:all .2s}.hep-cr-tab[data-v-6940e91c]:hover{color:#d4d4d4;background:#3d3d3d}.hep-cr-runner-light .hep-cr-tab[data-v-6940e91c]:hover{color:#333;background:#e0e0e0}.hep-cr-tab.active[data-v-6940e91c]{background:#4fc3f7;color:#000;font-weight:500}.hep-cr-tab-error.active[data-v-6940e91c]{background:#f44336;color:#fff}.hep-cr-output-actions[data-v-6940e91c]{display:flex;align-items:center;gap:12px}.hep-cr-execution-time[data-v-6940e91c]{font-size:12px;color:#4caf50;font-weight:500}.hep-cr-btn-icon[data-v-6940e91c]{background:transparent;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#888;display:flex;align-items:center;justify-content:center;transition:all .2s}.hep-cr-btn-icon[data-v-6940e91c]:hover{color:#fff;background:#3d3d3d}.hep-cr-runner-light .hep-cr-btn-icon[data-v-6940e91c]:hover{color:#333;background:#e0e0e0}.hep-cr-btn-icon[data-v-6940e91c]:disabled{cursor:not-allowed;opacity:.7}.hep-cr-btn-copied[data-v-6940e91c]{color:#4caf50!important}.hep-cr-copied-text[data-v-6940e91c]{font-size:12px;color:#4caf50}.hep-cr-output-content[data-v-6940e91c]{flex:1;padding:12px 16px;overflow:auto;background:#1e1e1e}.hep-cr-runner-light .hep-cr-output-content[data-v-6940e91c]{background:#fff}.hep-cr-output-content pre[data-v-6940e91c]{margin:0;font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-all;color:#d4d4d4}.hep-cr-runner-light .hep-cr-output-content pre[data-v-6940e91c]{color:#333}.hep-cr-output-content .hep-cr-stderr[data-v-6940e91c]{color:#f44336}.hep-cr-spinner[data-v-6940e91c]{width:12px;height:12px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin-6940e91c .8s linear infinite}@keyframes spin-6940e91c{to{transform:rotate(360deg)}}.hep-cr-dialog-overlay[data-v-ec700b03]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:9999}.hep-cr-dialog-container[data-v-ec700b03]{background:#fff;border-radius:12px;box-shadow:0 20px 60px #0000004d;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.hep-cr-dialog-header[data-v-ec700b03]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e0e0e0}.hep-cr-dialog-title[data-v-ec700b03]{margin:0;font-size:16px;font-weight:600;color:#333}.hep-cr-dialog-close[data-v-ec700b03]{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#666;display:flex;align-items:center;justify-content:center;transition:all .2s}.hep-cr-dialog-close[data-v-ec700b03]:hover{background:#f0f0f0;color:#333}.hep-cr-dialog-body[data-v-ec700b03]{flex:1;overflow:auto;padding:0}.hep-cr-dialog-body[data-v-ec700b03] .hep-cr-runner{border:none;border-radius:0}.hep-cr-dialog-footer[data-v-ec700b03]{padding:12px 20px;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-end;gap:12px}.hep-cr-dialog-fade-enter-active[data-v-ec700b03],.hep-cr-dialog-fade-leave-active[data-v-ec700b03]{transition:opacity .2s ease}.hep-cr-dialog-fade-enter-from[data-v-ec700b03],.hep-cr-dialog-fade-leave-to[data-v-ec700b03]{opacity:0}.hep-cr-dialog-fade-enter-active .hep-cr-dialog-container[data-v-ec700b03],.hep-cr-dialog-fade-leave-active .hep-cr-dialog-container[data-v-ec700b03]{transition:transform .2s ease}.hep-cr-dialog-fade-enter-from .hep-cr-dialog-container[data-v-ec700b03],.hep-cr-dialog-fade-leave-to .hep-cr-dialog-container[data-v-ec700b03]{transform:scale(.95)}
|