@hep-code-runner/vue2 2.3.15 → 2.3.17
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 +5 -5
- package/dist/index.mjs +88 -85
- 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 te=Object.defineProperty,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var te=Object.defineProperty,j=(e,t,i)=>((c,p,f)=>p in c?te(c,p,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[p]=f)(e,typeof t!="symbol"?t+"":t,i);let G=null;class ne{constructor(t={}){j(this,"baseUrl"),j(this,"timeout"),j(this,"token"),this.baseUrl=t.pistonUrl||"/api/piston",this.timeout=t.timeout||3e3,this.token=t.token}authHeaders(){const t={"Content-Type":"application/json"};return this.token&&(t.authorization=`Bearer ${this.token}`,t["id-token"]=this.token),t}async getRuntimes(t=!1){if(G&&!t)return G;try{const i=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:this.authHeaders()});if(!i.ok)throw new Error(`Failed to fetch runtimes: ${i.statusText}`);const c=await i.json();return G=c,c}catch(i){throw i}}async execute(t,i,c={}){const p=(await this.getRuntimes()).find(g=>{var m;return g.language.toLowerCase()===t.toLowerCase()||((m=g.aliases)==null?void 0:m.some(k=>k.toLowerCase()===t.toLowerCase()))});if(!p)throw new Error(`Language '${t}' is not supported`);const f=this.getFileName(t),l={language:p.language,version:c.version||p.version,files:[{name:f,content:i}],stdin:c.stdin||"",args:c.args||[],run_timeout:c.runTimeout||this.timeout,compile_timeout:this.timeout},b=Date.now();try{const g=await fetch(`${this.baseUrl}/execute`,{method:"POST",headers:this.authHeaders(),body:JSON.stringify(l)});if(!g.ok)throw new Error(`Execute failed: ${g.statusText}`);const m=await g.json(),k=Date.now()-b,S=m.run.stdout||"",T=m.run.stderr||"";return{success:m.run.code===0,output:S,stderr:T,code:m.run.code,executionTime:k,compile:m.compile?{stdout:m.compile.stdout||"",stderr:m.compile.stderr||"",code:m.compile.code}:void 0}}catch(g){return{success:!1,output:"",stderr:g instanceof Error?g.message:"Unknown error",code:-1,executionTime:Date.now()-b}}}getFileName(t){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"}[t.toLowerCase()]||`main.${t}`}}const ae={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,9 +63,9 @@ 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
|
|
67
|
-
// Write your code here`}var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}};(function(e){var t=function(i){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,p=0,f={},l={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function a(n){return n instanceof b?new b(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:++p}),a.__id},clone:function a(n,r){var s,o;switch(r=r||{},l.util.type(n)){case"Object":if(o=l.util.objId(n),r[o])return r[o];for(var d in s={},r[o]=s,n)n.hasOwnProperty(d)&&(s[d]=a(n[d],r));return s;case"Array":return o=l.util.objId(n),r[o]?r[o]:(s=[],r[o]=s,n.forEach(function(u,g){s[g]=a(u,r)}),s);default:return n}},getLanguage:function(a){for(;a;){var n=c.exec(a.className);if(n)return n[1].toLowerCase();a=a.parentElement}return"none"},setLanguage:function(a,n){a.className=a.className.replace(RegExp(c,"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 r in n)if(n[r].src==a)return n[r]}return null}},isActive:function(a,n,r){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!!r}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(a,n){var r=l.util.clone(l.languages[a]);for(var s in n)r[s]=n[s];return r},insertBefore:function(a,n,r,s){var o=(s=s||l.languages)[a],d={};for(var u in o)if(o.hasOwnProperty(u)){if(u==n)for(var g in r)r.hasOwnProperty(g)&&(d[g]=r[g]);r.hasOwnProperty(u)||(d[u]=o[u])}var E=s[a];return s[a]=d,l.languages.DFS(l.languages,function(y,O){O===E&&y!=a&&(this[y]=d)}),d},DFS:function a(n,r,s,o){o=o||{};var d=l.util.objId;for(var u in n)if(n.hasOwnProperty(u)){r.call(n,u,n[u],s||u);var g=n[u],E=l.util.type(g);E!=="Object"||o[d(g)]?E!=="Array"||o[d(g)]||(o[d(g)]=!0,a(g,r,u,o)):(o[d(g)]=!0,a(g,r,null,o))}}},plugins:{},highlightAll:function(a,n){l.highlightAllUnder(document,a,n)},highlightAllUnder:function(a,n,r){var s={callback:r,container:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),l.hooks.run("before-all-elements-highlight",s);for(var o,d=0;o=s.elements[d++];)l.highlightElement(o,n===!0,s.callback)},highlightElement:function(a,n,r){var s=l.util.getLanguage(a),o=l.languages[s];l.util.setLanguage(a,s);var d=a.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(d,s);var u={element:a,language:s,grammar:o,code:a.textContent};function g(y){u.highlightedCode=y,l.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,l.hooks.run("after-highlight",u),l.hooks.run("complete",u),r&&r.call(u.element)}if(l.hooks.run("before-sanity-check",u),(d=u.element.parentElement)&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!u.code)return l.hooks.run("complete",u),void(r&&r.call(u.element));if(l.hooks.run("before-highlight",u),u.grammar)if(n&&i.Worker){var E=new Worker(l.filename);E.onmessage=function(y){g(y.data)},E.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else g(l.highlight(u.code,u.grammar,u.language));else g(l.util.encode(u.code))},highlight:function(a,n,r){var s={code:a,grammar:n,language:r};if(l.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=l.tokenize(s.code,s.grammar),l.hooks.run("after-tokenize",s),b.stringify(l.util.encode(s.tokens),s.language)},tokenize:function(a,n){var r=n.rest;if(r){for(var s in r)n[s]=r[s];delete n.rest}var o=new k;return S(o,o.head,a),m(a,o,n,o.head,0),function(d){for(var u=[],g=d.head.next;g!==d.tail;)u.push(g.value),g=g.next;return u}(o)},hooks:{all:{},add:function(a,n){var r=l.hooks.all;r[a]=r[a]||[],r[a].push(n)},run:function(a,n){var r=l.hooks.all[a];if(r&&r.length)for(var s,o=0;s=r[o++];)s(n)}},Token:b};function b(a,n,r,s){this.type=a,this.content=n,this.alias=r,this.length=0|(s||"").length}function h(a,n,r,s){a.lastIndex=n;var o=a.exec(r);if(o&&s&&o[1]){var d=o[1].length;o.index+=d,o[0]=o[0].slice(d)}return o}function m(a,n,r,s,o,d){for(var u in r)if(r.hasOwnProperty(u)&&r[u]){var g=r[u];g=Array.isArray(g)?g:[g];for(var E=0;E<g.length;++E){if(d&&d.cause==u+","+E)return;var y=g[E],O=y.inside,W=!!y.lookbehind,Y=!!y.greedy,J=y.alias;if(Y&&!y.pattern.global){var Q=y.pattern.toString().match(/[imsuy]*$/)[0];y.pattern=RegExp(y.pattern.source,Q+"g")}for(var X=y.pattern||y,v=s.next,w=o;v!==n.tail&&!(d&&w>=d.reach);w+=v.value.length,v=v.next){var R=v.value;if(n.length>a.length)return;if(!(R instanceof b)){var x,N=1;if(Y){if(!(x=h(X,w,a,W))||x.index>=a.length)break;var P=x.index,ee=x.index+x[0].length,C=w;for(C+=v.value.length;P>=C;)C+=(v=v.next).value.length;if(w=C-=v.value.length,v.value instanceof b)continue;for(var F=v;F!==n.tail&&(C<ee||typeof F.value=="string");F=F.next)N++,C+=F.value.length;N--,R=a.slice(w,C),x.index-=w}else if(!(x=h(X,0,R,W)))continue;P=x.index;var D=x[0],M=R.slice(0,P),Z=R.slice(P+D.length),U=w+R.length;d&&U>d.reach&&(d.reach=U);var $=v.prev;if(M&&($=S(n,$,M),w+=M.length),T(n,$,N),v=S(n,$,new b(u,O?l.tokenize(D,O):D,J,D)),Z&&S(n,v,Z),N>1){var H={cause:u+","+E,reach:U};m(a,n,r,v.prev,w,H),d&&H.reach>d.reach&&(d.reach=H.reach)}}}}}}function k(){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 S(a,n,r){var s=n.next,o={value:r,prev:n,next:s};return n.next=o,s.prev=o,a.length++,o}function T(a,n,r){for(var s=n.next,o=0;o<r&&s!==a.tail;o++)s=s.next;n.next=s,s.prev=n,a.length-=o}if(i.Prism=l,b.stringify=function a(n,r){if(typeof n=="string")return n;if(Array.isArray(n)){var s="";return n.forEach(function(E){s+=a(E,r)}),s}var o={type:n.type,content:a(n.content,r),tag:"span",classes:["token",n.type],attributes:{},language:r},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(o.classes,d):o.classes.push(d)),l.hooks.run("wrap",o);var u="";for(var g in o.attributes)u+=" "+g+'="'+(o.attributes[g]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+u+">"+o.content+"</"+o.tag+">"},!i.document)return i.addEventListener&&(l.disableWorkerMessageHandler||i.addEventListener("message",function(a){var n=JSON.parse(a.data),r=n.language,s=n.code,o=n.immediateClose;i.postMessage(l.highlight(s,l.languages[r],r)),o&&i.close()},!1)),l;var _=l.util.currentScript();function I(){l.manual||l.highlightAll()}if(_&&(l.filename=_.src,_.hasAttribute("data-manual")&&(l.manual=!0)),!l.manual){var A=document.readyState;A==="loading"||A==="interactive"&&_&&_.defer?document.addEventListener("DOMContentLoaded",I):window.requestAnimationFrame?window.requestAnimationFrame(I):window.setTimeout(I,16)}return l}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),K!==void 0&&(K.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(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,c){var p={};p["language-"+c]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[c]},p.cdata=/^<!\[CDATA\[|\]\]>$/i;var f={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:p}};f["language-"+c]={pattern:/[\s\S]+/,inside:t.languages[c]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:f},t.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,c){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\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:[c,"language-"+c],inside:t.languages[c]},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(i){var c=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+c.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\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,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:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var p=i.languages.markup;p&&(p.tag.addInlined("style","css"),p.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(t!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",p="loading",f="loaded",l="pre[data-src]:not(["+c+'="'+f+'"]):not(['+c+'="'+p+'"])';t.hooks.add("before-highlightall",function(h){h.selector+=", "+l}),t.hooks.add("before-sanity-check",function(h){var m=h.element;if(m.matches(l)){h.code="",m.setAttribute(c,p);var k=m.appendChild(document.createElement("CODE"));k.textContent="Loading…";var S=m.getAttribute("data-src"),T=h.language;if(T==="none"){var _=(/\.(\w+)$/.exec(S)||[,"none"])[1];T=i[_]||_}t.util.setLanguage(k,T),t.util.setLanguage(m,T);var I=t.plugins.autoloader;I&&I.loadLanguages(T),function(A,a,n){var r=new XMLHttpRequest;r.open("GET",A,!0),r.onreadystatechange=function(){r.readyState==4&&(r.status<400&&r.responseText?a(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(S,function(A){m.setAttribute(c,f);var a=function(o){var d=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(o||"");if(d){var u=Number(d[1]),g=d[2],E=d[3];return g?E?[u,Number(E)]:[u,void 0]:[u,u]}}(m.getAttribute("data-range"));if(a){var n=A.split(/\r\n?|\n/g),r=a[0],s=a[1]==null?n.length:a[1];r<0&&(r+=n.length),r=Math.max(0,Math.min(r-1,n.length)),s<0&&(s+=n.length),s=Math.max(0,Math.min(s,n.length)),A=n.slice(r,s).join(`
|
|
68
|
-
`),m.hasAttribute("data-start")||m.setAttribute("data-start",String(r+1))}k.textContent=A,t.highlightElement(k)},function(A){m.setAttribute(c,"failed"),k.textContent=A})}}),t.plugins.fileHighlight={highlight:function(h){for(var m,k=(h||document).querySelectorAll(l),S=0;m=k[S++];)t.highlightElement(m)}};var b=!1;t.fileHighlight=function(){b||(b=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()})(q);const G=re(q.exports);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(e){var t=/\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/,i=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,c={pattern:RegExp(/(^|[^\w.])/.source+i+/[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:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[c,{pattern:RegExp(/(^|[^\w.])/.source+i+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:c.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+i+/[A-Z]\w*\b/.source),lookbehind:!0,inside:c.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":c,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+i+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:c.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+i+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:c.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 t.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(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,i=0;i<2;i++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),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(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",i={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},c={bash:i,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:c},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:i}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:c},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:c.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:c.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}},i.inside=e.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=c.variable[1].inside,l=0;l<p.length;l++)f[p[l]]=e.languages.bash[p[l]];e.languages.sh=e.languages.bash,e.languages.shell=e.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;function z(e,t,i,c,p,f,l,b){var h=typeof e=="function"?e.options:e;return t&&(h.render=t,h.staticRenderFns=i,h._compiled=!0),f&&(h._scopeId="data-v-"+f),{exports:e,options:h}}typeof window<"u"&&(window.Prism=G);const L=z({name:"CodeRunner",components:{CodeEditor:z({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,changeTimer:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(e){this.loadPrismTheme(e)}},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 e=G.languages[this.prismLanguage];if(e)return G.highlight(this.value||"",e,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(e){const t="hep-cr-prism-styles",i=document.getElementById(t),c=e==="dark"?`
|
|
66
|
+
This is a sample markdown document.`};function F(e){const t=e.toLowerCase().split(":")[0];return ae[t]||`// ${e}
|
|
67
|
+
// Write your code here`}var V=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}};(function(e){var t=function(i){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,p=0,f={},l={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function a(n){return n instanceof b?new b(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:++p}),a.__id},clone:function a(n,r){var s,o;switch(r=r||{},l.util.type(n)){case"Object":if(o=l.util.objId(n),r[o])return r[o];for(var d in s={},r[o]=s,n)n.hasOwnProperty(d)&&(s[d]=a(n[d],r));return s;case"Array":return o=l.util.objId(n),r[o]?r[o]:(s=[],r[o]=s,n.forEach(function(u,h){s[h]=a(u,r)}),s);default:return n}},getLanguage:function(a){for(;a;){var n=c.exec(a.className);if(n)return n[1].toLowerCase();a=a.parentElement}return"none"},setLanguage:function(a,n){a.className=a.className.replace(RegExp(c,"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 r in n)if(n[r].src==a)return n[r]}return null}},isActive:function(a,n,r){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!!r}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(a,n){var r=l.util.clone(l.languages[a]);for(var s in n)r[s]=n[s];return r},insertBefore:function(a,n,r,s){var o=(s=s||l.languages)[a],d={};for(var u in o)if(o.hasOwnProperty(u)){if(u==n)for(var h in r)r.hasOwnProperty(h)&&(d[h]=r[h]);r.hasOwnProperty(u)||(d[u]=o[u])}var E=s[a];return s[a]=d,l.languages.DFS(l.languages,function(y,N){N===E&&y!=a&&(this[y]=d)}),d},DFS:function a(n,r,s,o){o=o||{};var d=l.util.objId;for(var u in n)if(n.hasOwnProperty(u)){r.call(n,u,n[u],s||u);var h=n[u],E=l.util.type(h);E!=="Object"||o[d(h)]?E!=="Array"||o[d(h)]||(o[d(h)]=!0,a(h,r,u,o)):(o[d(h)]=!0,a(h,r,null,o))}}},plugins:{},highlightAll:function(a,n){l.highlightAllUnder(document,a,n)},highlightAllUnder:function(a,n,r){var s={callback:r,container:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),l.hooks.run("before-all-elements-highlight",s);for(var o,d=0;o=s.elements[d++];)l.highlightElement(o,n===!0,s.callback)},highlightElement:function(a,n,r){var s=l.util.getLanguage(a),o=l.languages[s];l.util.setLanguage(a,s);var d=a.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(d,s);var u={element:a,language:s,grammar:o,code:a.textContent};function h(y){u.highlightedCode=y,l.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,l.hooks.run("after-highlight",u),l.hooks.run("complete",u),r&&r.call(u.element)}if(l.hooks.run("before-sanity-check",u),(d=u.element.parentElement)&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!u.code)return l.hooks.run("complete",u),void(r&&r.call(u.element));if(l.hooks.run("before-highlight",u),u.grammar)if(n&&i.Worker){var E=new Worker(l.filename);E.onmessage=function(y){h(y.data)},E.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else h(l.highlight(u.code,u.grammar,u.language));else h(l.util.encode(u.code))},highlight:function(a,n,r){var s={code:a,grammar:n,language:r};if(l.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=l.tokenize(s.code,s.grammar),l.hooks.run("after-tokenize",s),b.stringify(l.util.encode(s.tokens),s.language)},tokenize:function(a,n){var r=n.rest;if(r){for(var s in r)n[s]=r[s];delete n.rest}var o=new k;return S(o,o.head,a),m(a,o,n,o.head,0),function(d){for(var u=[],h=d.head.next;h!==d.tail;)u.push(h.value),h=h.next;return u}(o)},hooks:{all:{},add:function(a,n){var r=l.hooks.all;r[a]=r[a]||[],r[a].push(n)},run:function(a,n){var r=l.hooks.all[a];if(r&&r.length)for(var s,o=0;s=r[o++];)s(n)}},Token:b};function b(a,n,r,s){this.type=a,this.content=n,this.alias=r,this.length=0|(s||"").length}function g(a,n,r,s){a.lastIndex=n;var o=a.exec(r);if(o&&s&&o[1]){var d=o[1].length;o.index+=d,o[0]=o[0].slice(d)}return o}function m(a,n,r,s,o,d){for(var u in r)if(r.hasOwnProperty(u)&&r[u]){var h=r[u];h=Array.isArray(h)?h:[h];for(var E=0;E<h.length;++E){if(d&&d.cause==u+","+E)return;var y=h[E],N=y.inside,Y=!!y.lookbehind,X=!!y.greedy,J=y.alias;if(X&&!y.pattern.global){var Q=y.pattern.toString().match(/[imsuy]*$/)[0];y.pattern=RegExp(y.pattern.source,Q+"g")}for(var Z=y.pattern||y,v=s.next,w=o;v!==n.tail&&!(d&&w>=d.reach);w+=v.value.length,v=v.next){var R=v.value;if(n.length>a.length)return;if(!(R instanceof b)){var _,P=1;if(X){if(!(_=g(Z,w,a,Y))||_.index>=a.length)break;var D=_.index,ee=_.index+_[0].length,C=w;for(C+=v.value.length;D>=C;)C+=(v=v.next).value.length;if(w=C-=v.value.length,v.value instanceof b)continue;for(var L=v;L!==n.tail&&(C<ee||typeof L.value=="string");L=L.next)P++,C+=L.value.length;P--,R=a.slice(w,C),_.index-=w}else if(!(_=g(Z,0,R,Y)))continue;D=_.index;var $=_[0],U=R.slice(0,D),K=R.slice(D+$.length),H=w+R.length;d&&H>d.reach&&(d.reach=H);var M=v.prev;if(U&&(M=S(n,M,U),w+=U.length),T(n,M,P),v=S(n,M,new b(u,N?l.tokenize($,N):$,J,$)),K&&S(n,v,K),P>1){var B={cause:u+","+E,reach:H};m(a,n,r,v.prev,w,B),d&&B.reach>d.reach&&(d.reach=B.reach)}}}}}}function k(){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 S(a,n,r){var s=n.next,o={value:r,prev:n,next:s};return n.next=o,s.prev=o,a.length++,o}function T(a,n,r){for(var s=n.next,o=0;o<r&&s!==a.tail;o++)s=s.next;n.next=s,s.prev=n,a.length-=o}if(i.Prism=l,b.stringify=function a(n,r){if(typeof n=="string")return n;if(Array.isArray(n)){var s="";return n.forEach(function(E){s+=a(E,r)}),s}var o={type:n.type,content:a(n.content,r),tag:"span",classes:["token",n.type],attributes:{},language:r},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(o.classes,d):o.classes.push(d)),l.hooks.run("wrap",o);var u="";for(var h in o.attributes)u+=" "+h+'="'+(o.attributes[h]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+u+">"+o.content+"</"+o.tag+">"},!i.document)return i.addEventListener&&(l.disableWorkerMessageHandler||i.addEventListener("message",function(a){var n=JSON.parse(a.data),r=n.language,s=n.code,o=n.immediateClose;i.postMessage(l.highlight(s,l.languages[r],r)),o&&i.close()},!1)),l;var x=l.util.currentScript();function I(){l.manual||l.highlightAll()}if(x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0)),!l.manual){var A=document.readyState;A==="loading"||A==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",I):window.requestAnimationFrame?window.requestAnimationFrame(I):window.setTimeout(I,16)}return l}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),V!==void 0&&(V.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(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,c){var p={};p["language-"+c]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[c]},p.cdata=/^<!\[CDATA\[|\]\]>$/i;var f={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:p}};f["language-"+c]={pattern:/[\s\S]+/,inside:t.languages[c]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:f},t.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,c){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\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:[c,"language-"+c],inside:t.languages[c]},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(i){var c=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+c.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\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,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:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var p=i.languages.markup;p&&(p.tag.addInlined("style","css"),p.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(t!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",p="loading",f="loaded",l="pre[data-src]:not(["+c+'="'+f+'"]):not(['+c+'="'+p+'"])';t.hooks.add("before-highlightall",function(g){g.selector+=", "+l}),t.hooks.add("before-sanity-check",function(g){var m=g.element;if(m.matches(l)){g.code="",m.setAttribute(c,p);var k=m.appendChild(document.createElement("CODE"));k.textContent="Loading…";var S=m.getAttribute("data-src"),T=g.language;if(T==="none"){var x=(/\.(\w+)$/.exec(S)||[,"none"])[1];T=i[x]||x}t.util.setLanguage(k,T),t.util.setLanguage(m,T);var I=t.plugins.autoloader;I&&I.loadLanguages(T),function(A,a,n){var r=new XMLHttpRequest;r.open("GET",A,!0),r.onreadystatechange=function(){r.readyState==4&&(r.status<400&&r.responseText?a(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(S,function(A){m.setAttribute(c,f);var a=function(o){var d=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(o||"");if(d){var u=Number(d[1]),h=d[2],E=d[3];return h?E?[u,Number(E)]:[u,void 0]:[u,u]}}(m.getAttribute("data-range"));if(a){var n=A.split(/\r\n?|\n/g),r=a[0],s=a[1]==null?n.length:a[1];r<0&&(r+=n.length),r=Math.max(0,Math.min(r-1,n.length)),s<0&&(s+=n.length),s=Math.max(0,Math.min(s,n.length)),A=n.slice(r,s).join(`
|
|
68
|
+
`),m.hasAttribute("data-start")||m.setAttribute("data-start",String(r+1))}k.textContent=A,t.highlightElement(k)},function(A){m.setAttribute(c,"failed"),k.textContent=A})}}),t.plugins.fileHighlight={highlight:function(g){for(var m,k=(g||document).querySelectorAll(l),S=0;m=k[S++];)t.highlightElement(m)}};var b=!1;t.fileHighlight=function(){b||(b=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()})(q);const z=re(q.exports);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(e){var t=/\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/,i=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,c={pattern:RegExp(/(^|[^\w.])/.source+i+/[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:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[c,{pattern:RegExp(/(^|[^\w.])/.source+i+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:c.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+i+/[A-Z]\w*\b/.source),lookbehind:!0,inside:c.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":c,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+i+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:c.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+i+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:c.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 t.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(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,i=0;i<2;i++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),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(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",i={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},c={bash:i,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:c},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:i}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:c},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:c.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:c.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}},i.inside=e.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=c.variable[1].inside,l=0;l<p.length;l++)f[p[l]]=e.languages.bash[p[l]];e.languages.sh=e.languages.bash,e.languages.shell=e.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;function W(e,t,i,c,p,f,l,b){var g=typeof e=="function"?e.options:e;return t&&(g.render=t,g.staticRenderFns=i,g._compiled=!0),f&&(g._scopeId="data-v-"+f),{exports:e,options:g}}typeof window<"u"&&(window.Prism=z);const O=W({name:"CodeRunner",components:{CodeEditor:W({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,changeTimer:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(e){this.loadPrismTheme(e)}},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 e=z.languages[this.prismLanguage];if(e)return z.highlight(this.value||"",e,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(e){const t="hep-cr-prism-styles",i=document.getElementById(t),c=e==="dark"?`
|
|
69
69
|
/* 默认代码颜色 */
|
|
70
70
|
.hep-cr-editor .hep-cr-highlight code,
|
|
71
71
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -226,4 +226,4 @@ This is a sample markdown document.`};function V(e){const t=e.toLowerCase().spli
|
|
|
226
226
|
.hep-cr-editor .token.console {
|
|
227
227
|
color: #333 !important;
|
|
228
228
|
}
|
|
229
|
-
`;i&&i.remove();const p=document.createElement("style");p.id=t,p.textContent=c,document.head.appendChild(p)},escapeHtml:function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML},handleInput:function(e){this.$emit("input",e.target.value),this.$emit("update:value",e.target.value),this.emitChange(e.target.value)},handleScroll:function(e){var t=this.$refs.highlightRef;t&&(t.scrollTop=e.target.scrollTop,t.scrollLeft=e.target.scrollLeft)},handleKeydown:function(e){if(e.key==="Tab"){e.preventDefault();var t=e.target,i=t.selectionStart,c=t.selectionEnd,p=t.value;t.value=p.substring(0,i)+" "+p.substring(c),t.selectionStart=t.selectionEnd=i+2,this.$emit("input",t.value),this.$emit("update:value",t.value),this.emitChange(t.value)}},emitChange:function(e){var t=this;t.changeTimer&&clearTimeout(t.changeTimer),t.changeTimer=setTimeout(function(){t.$emit("change",e)},500)}},beforeDestroy:function(){this.changeTimer&&clearTimeout(this.changeTimer)}},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:"请输入代码..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},[],0,0,"c5a23c34").exports},props:{pistonUrl:{type:String,default:"/api/piston"},token:{type:String,default:""},language:{type:String,default:"javascript"},code:{type:String,default:""},theme:{type:String,default:"light",validator:function(e){return["light","dark"].indexOf(e)!==-1}},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],isCodeModified:!1,internalLanguage:this.language||"javascript",internalCode:this.code!==void 0?this.code:"",currentTheme:this.theme,output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60,copiedEditor:!1,copiedOutput:!1}},created:function(){this.code!==void 0&&this.code!==""||(this.internalCode=V(this.internalLanguage))},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},themeStyle:function(){if(!this.themeColor)return{};var e,t=this.currentTheme==="dark",i=this.themeColor,c=function(f,l){var b=parseInt(f.replace("#",""),16),h=Math.round(2.55*l);return"#"+(16777216+65536*Math.min(255,Math.max(0,(b>>16)+h))+256*Math.min(255,Math.max(0,(b>>8&255)+h))+Math.min(255,Math.max(0,(255&b)+h))).toString(16).slice(1)},p=(.299*((e=parseInt(i.replace("#",""),16))>>16&255)+.587*(e>>8&255)+.114*(255&e))/255>.5?"#000":"#fff";return{"--hep-cr-theme-color":i,"--hep-cr-theme-color-hover":c(i,t?20:-20),"--hep-cr-tab-active-color":p}},languageOptions:function(){return this.runtimes.map(function(e){return{value:e.language+":"+e.version,label:e.language.charAt(0).toUpperCase()+e.language.slice(1)+" "+e.version}})},languageName:function(){var e=this.internalLanguage;return e.includes(":")?e.split(":")[0]:e}},watch:{language:function(e){e&&e!==this.internalLanguage&&(this.internalLanguage=e)},code:function(e){e!==void 0&&e!==this.internalCode&&(this.internalCode=e)},internalLanguage:function(e){this.isCodeModified=!1,this.$emit("update:language",e),this.$emit("language-change",e.includes(":")?e.split(":")[0]:e,this.internalCode)},internalCode:function(e){this.$emit("update:code",e),this.$emit("change",e)}},mounted:function(){this.client=new ne({pistonUrl:this.pistonUrl,token:this.token}),this.loadRuntimes()},methods:{loadRuntimes:function(){var e=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(t){e.runtimes=t;var i=e.languageName,c=t.find(function(p){return p.language===i});c&&!e.internalLanguage.includes(":")&&(e.internalLanguage=i+":"+c.version)}).catch(function(t){e.error=t.message||"Failed to load runtimes"}).finally(function(){e.runtimesLoading=!1})},handleCodeInput:function(e){this.isCodeModified=!0,this.internalCode=e},handleCodeChange:function(e){this.internalCode=e},execute:function(){var e=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.internalCode).then(function(t){e.output=t.output,e.stderr=t.stderr,e.executionTime=t.executionTime||null,e.activeTab=t.stderr?"stderr":"stdout",e.$emit("execute-end",t)}).catch(function(t){e.error=t.message||"Execution failed",e.$emit("execute-end",{success:!1,output:"",stderr:e.error,code:-1})}).finally(function(){e.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var e=this;navigator.clipboard.writeText(this.internalCode),this.copiedEditor=!0,setTimeout(function(){e.copiedEditor=!1},2e3)},copyOutput:function(){var e=this,t=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(t),this.copiedOutput=!0,setTimeout(function(){e.copiedOutput=!1},2e3)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(e){var t=this,i=document.querySelector(".hep-cr-runner-main");if(i){var c=function(f){var l=i.getBoundingClientRect(),b=(f.clientX-l.left)/l.width*100;t.editorWidth=Math.max(20,Math.min(80,b))},p=function(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",c),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}},function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass],style:e.themeStyle},[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.internalLanguage,expression:"internalLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(i){var c=Array.prototype.filter.call(i.target.options,function(p){return p.selected}).map(function(p){return"_value"in p?p._value:p.value});e.internalLanguage=i.target.multiple?c:c[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(i){return t("option",{key:i.value,domProps:{value:i.value}},[e._v(" "+e._s(i.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)+" ")]),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.internalCode,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:e.handleCodeInput,change:e.handleCodeChange}})],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(i){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(i){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))])])])])])},[],0,0,"b8fb6985").exports,ie=z({name:"CodeRunnerDialog",components:{CodeRunner:L},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800},language:{type:String,default:"javascript"},code:{type:String,default:""},pistonUrl:{type:String,default:"/api/piston"},token:{type:String,default:""},theme:{type:String,default:"light"},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},executorLabel:{type:String,default:"运行"}},model:{prop:"value",event:"input"},data:function(){var e=this.language||"javascript",t=e.includes(":")?e.split(":")[0]:e;return{localVisible:this.value,localLanguage:this.language||"javascript",localCode:this.code!==void 0?this.code:V(t)}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(e){this.localVisible=e},language(e){e&&(this.localLanguage=e)},code(e){e!==void 0&&(this.localCode=e)}},methods:{open(){this.localVisible=!0},close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(e){e.target===e.currentTarget&&this.close()},handleLanguageUpdate(e){this.localLanguage=e,this.$emit("update:language",e)},handleCodeUpdate(e){this.localCode=e,this.$emit("update:code",e)}},expose:["open","close"]},function(){var e=this,t=e._self._c;return 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",{attrs:{language:e.localLanguage,code:e.localCode,pistonUrl:e.pistonUrl,token:e.token,theme:e.theme,themeColor:e.themeColor,showLanguageSelector:e.showLanguageSelector,showEditor:e.showEditor,editable:e.editable,executorLabel:e.executorLabel},on:{"update:language":e.handleLanguageUpdate,"update:code":e.handleCodeUpdate}})],1),t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2)])]):e._e()},[],0,0,"d2558e3d").exports;L.install=e=>{e.component("CodeRunner",L)};const se={install(e){e.component("CodeRunner",L)}};exports.CodeRunner=L,exports.CodeRunnerDialog=ie,exports.default=se;
|
|
229
|
+
`;i&&i.remove();const p=document.createElement("style");p.id=t,p.textContent=c,document.head.appendChild(p)},escapeHtml:function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML},handleInput:function(e){this.$emit("input",e.target.value),this.$emit("update:value",e.target.value),this.emitChange(e.target.value)},handleScroll:function(e){var t=this.$refs.highlightRef;t&&(t.scrollTop=e.target.scrollTop,t.scrollLeft=e.target.scrollLeft)},handleKeydown:function(e){if(e.key==="Tab"){e.preventDefault();var t=e.target,i=t.selectionStart,c=t.selectionEnd,p=t.value;t.value=p.substring(0,i)+" "+p.substring(c),t.selectionStart=t.selectionEnd=i+2,this.$emit("input",t.value),this.$emit("update:value",t.value),this.emitChange(t.value)}},emitChange:function(e){var t=this;t.changeTimer&&clearTimeout(t.changeTimer),t.changeTimer=setTimeout(function(){t.$emit("change",e)},500)}},beforeDestroy:function(){this.changeTimer&&clearTimeout(this.changeTimer)}},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:"请输入代码..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},[],0,0,"c5a23c34").exports},props:{pistonUrl:{type:String,default:"/api/piston"},token:{type:String,default:""},language:{type:String,default:"javascript"},code:{type:String,default:""},theme:{type:String,default:"light",validator:function(e){return["light","dark"].indexOf(e)!==-1}},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},executorLabel:{type:String,default:"运行"}},data:function(){var e=this.code!==void 0&&this.code!=="";return{runtimes:[],isCodeModified:!1,_prevSnippet:e?this.code:F(this.language||"javascript"),_hasUserEdited:e,internalLanguage:this.language||"javascript",internalCode:this.code!==void 0?this.code:F(this.language||"javascript"),currentTheme:this.theme,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},themeStyle:function(){if(!this.themeColor)return{};var e,t=this.currentTheme==="dark",i=this.themeColor,c=function(f,l){var b=parseInt(f.replace("#",""),16),g=Math.round(2.55*l);return"#"+(16777216+65536*Math.min(255,Math.max(0,(b>>16)+g))+256*Math.min(255,Math.max(0,(b>>8&255)+g))+Math.min(255,Math.max(0,(255&b)+g))).toString(16).slice(1)},p=(.299*((e=parseInt(i.replace("#",""),16))>>16&255)+.587*(e>>8&255)+.114*(255&e))/255>.5?"#000":"#fff";return{"--hep-cr-theme-color":i,"--hep-cr-theme-color-hover":c(i,t?20:-20),"--hep-cr-tab-active-color":p}},languageOptions:function(){return this.runtimes.map(function(e){return{value:e.language+":"+e.version,label:e.language.charAt(0).toUpperCase()+e.language.slice(1)+" "+e.version}})},languageName:function(){var e=this.internalLanguage;return e.includes(":")?e.split(":")[0]:e}},watch:{language:function(e){e&&e!==this.internalLanguage&&(this.internalLanguage=e,this._prevSnippet=F(e))},code:function(e){e!==void 0&&e!==this.internalCode&&(this.internalCode=e,this._hasUserEdited=!1,this._prevSnippet=e)},internalLanguage:function(e){this._hasUserEdited&&this.internalCode!==this._prevSnippet||(this.internalCode=F(e),this._prevSnippet=F(e)),this._hasUserEdited=!1,this.isCodeModified=!1,this.$emit("update:language",e),this.$emit("language-change",e.includes(":")?e.split(":")[0]:e,this.internalCode)},internalCode:function(e){this.$emit("update:code",e),this.$emit("change",e)}},mounted:function(){this.client=new ne({pistonUrl:this.pistonUrl,token:this.token}),this.loadRuntimes()},methods:{loadRuntimes:function(){var e=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(t){e.runtimes=t;var i=e.languageName,c=t.find(function(p){return p.language===i});c&&!e.internalLanguage.includes(":")&&(e.internalLanguage=i+":"+c.version)}).catch(function(t){e.error=t.message||"Failed to load runtimes"}).finally(function(){e.runtimesLoading=!1})},handleCodeInput:function(e){this.isCodeModified=!0,this._hasUserEdited=!0,this.internalCode=e},handleCodeChange:function(e){this.internalCode=e},execute:function(){var e=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.internalCode).then(function(t){e.output=t.output,e.stderr=t.stderr,e.executionTime=t.executionTime||null,e.activeTab=t.stderr?"stderr":"stdout",e.$emit("execute-end",t)}).catch(function(t){e.error=t.message||"Execution failed",e.$emit("execute-end",{success:!1,output:"",stderr:e.error,code:-1})}).finally(function(){e.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var e=this;navigator.clipboard.writeText(this.internalCode),this.copiedEditor=!0,setTimeout(function(){e.copiedEditor=!1},2e3)},copyOutput:function(){var e=this,t=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(t),this.copiedOutput=!0,setTimeout(function(){e.copiedOutput=!1},2e3)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(e){var t=this,i=document.querySelector(".hep-cr-runner-main");if(i){var c=function(f){var l=i.getBoundingClientRect(),b=(f.clientX-l.left)/l.width*100;t.editorWidth=Math.max(20,Math.min(80,b))},p=function(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",c),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}},function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass],style:e.themeStyle},[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.internalLanguage,expression:"internalLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(i){var c=Array.prototype.filter.call(i.target.options,function(p){return p.selected}).map(function(p){return"_value"in p?p._value:p.value});e.internalLanguage=i.target.multiple?c:c[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(i){return t("option",{key:i.value,domProps:{value:i.value}},[e._v(" "+e._s(i.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)+" ")]),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.internalCode,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:e.handleCodeInput,change:e.handleCodeChange}})],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(i){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(i){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))])])])])])},[],0,0,"09c7b525").exports,ie=W({name:"CodeRunnerDialog",components:{CodeRunner:O},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800},language:{type:String,default:"javascript"},code:{type:String,default:""},pistonUrl:{type:String,default:"/api/piston"},token:{type:String,default:""},theme:{type:String,default:"light"},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},executorLabel:{type:String,default:"运行"}},model:{prop:"value",event:"input"},data:function(){var e=this.language||"javascript",t=e.includes(":")?e.split(":")[0]:e;return{localVisible:this.value,localLanguage:this.language||"javascript",localCode:this.code!==void 0?this.code:F(t)}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(e){this.localVisible=e},language(e){e&&(this.localLanguage=e)},code(e){e!==void 0&&(this.localCode=e)}},methods:{open(){this.localVisible=!0},close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(e){e.target===e.currentTarget&&this.close()},handleLanguageUpdate(e){this.localLanguage=e,this.$emit("update:language",e)},handleCodeUpdate(e){this.localCode=e,this.$emit("update:code",e)},handleLanguageChange(e,t){this.$emit("language-change",e,t)},handleCodeChange(e){this.$emit("change",e)}},expose:["open","close"]},function(){var e=this,t=e._self._c;return 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",{attrs:{language:e.localLanguage,code:e.localCode,pistonUrl:e.pistonUrl,token:e.token,theme:e.theme,themeColor:e.themeColor,showLanguageSelector:e.showLanguageSelector,showEditor:e.showEditor,editable:e.editable,executorLabel:e.executorLabel},on:{"update:language":e.handleLanguageUpdate,"update:code":e.handleCodeUpdate,"language-change":e.handleLanguageChange,change:e.handleCodeChange}})],1),t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2)])]):e._e()},[],0,0,"f5136eae").exports;O.install=e=>{e.component("CodeRunner",O)};const se={install(e){e.component("CodeRunner",O)}};exports.CodeRunner=O,exports.CodeRunnerDialog=ie,exports.default=se;
|
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var te = Object.defineProperty,
|
|
2
|
-
let
|
|
1
|
+
var te = Object.defineProperty, j = (e, t, i) => ((c, p, f) => p in c ? te(c, p, { enumerable: !0, configurable: !0, writable: !0, value: f }) : c[p] = f)(e, typeof t != "symbol" ? t + "" : t, i);
|
|
2
|
+
let G = null;
|
|
3
3
|
class ne {
|
|
4
4
|
constructor(t = {}) {
|
|
5
|
-
|
|
5
|
+
j(this, "baseUrl"), j(this, "timeout"), j(this, "token"), this.baseUrl = t.pistonUrl || "/api/piston", this.timeout = t.timeout || 3e3, this.token = t.token;
|
|
6
6
|
}
|
|
7
7
|
authHeaders() {
|
|
8
8
|
const t = { "Content-Type": "application/json" };
|
|
9
9
|
return this.token && (t.authorization = `Bearer ${this.token}`, t["id-token"] = this.token), t;
|
|
10
10
|
}
|
|
11
11
|
async getRuntimes(t = !1) {
|
|
12
|
-
if (
|
|
12
|
+
if (G && !t) return G;
|
|
13
13
|
try {
|
|
14
14
|
const i = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: this.authHeaders() });
|
|
15
15
|
if (!i.ok) throw new Error(`Failed to fetch runtimes: ${i.statusText}`);
|
|
16
16
|
const c = await i.json();
|
|
17
|
-
return
|
|
17
|
+
return G = c, c;
|
|
18
18
|
} catch (i) {
|
|
19
19
|
throw i;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
async execute(t, i, c = {}) {
|
|
23
|
-
const p = (await this.getRuntimes()).find((
|
|
23
|
+
const p = (await this.getRuntimes()).find((g) => {
|
|
24
24
|
var m;
|
|
25
|
-
return
|
|
25
|
+
return g.language.toLowerCase() === t.toLowerCase() || ((m = g.aliases) == null ? void 0 : m.some((k) => k.toLowerCase() === t.toLowerCase()));
|
|
26
26
|
});
|
|
27
27
|
if (!p) throw new Error(`Language '${t}' is not supported`);
|
|
28
28
|
const f = this.getFileName(t), l = { language: p.language, version: c.version || p.version, files: [{ name: f, content: i }], stdin: c.stdin || "", args: c.args || [], run_timeout: c.runTimeout || this.timeout, compile_timeout: this.timeout }, b = Date.now();
|
|
29
29
|
try {
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
32
|
-
const m = await
|
|
30
|
+
const g = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: this.authHeaders(), body: JSON.stringify(l) });
|
|
31
|
+
if (!g.ok) throw new Error(`Execute failed: ${g.statusText}`);
|
|
32
|
+
const m = await g.json(), k = Date.now() - b, S = m.run.stdout || "", T = m.run.stderr || "";
|
|
33
33
|
return { success: m.run.code === 0, output: S, stderr: T, code: m.run.code, executionTime: k, compile: m.compile ? { stdout: m.compile.stdout || "", stderr: m.compile.stderr || "", code: m.compile.code } : void 0 };
|
|
34
|
-
} catch (
|
|
35
|
-
return { success: !1, output: "", stderr:
|
|
34
|
+
} catch (g) {
|
|
35
|
+
return { success: !1, output: "", stderr: g instanceof Error ? g.message : "Unknown error", code: -1, executionTime: Date.now() - b };
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
getFileName(t) {
|
|
@@ -105,12 +105,12 @@ h1 {
|
|
|
105
105
|
}`, sql: "SELECT 'Hello, World!' AS message;", markdown: `# Hello, World!
|
|
106
106
|
|
|
107
107
|
This is a sample markdown document.` };
|
|
108
|
-
function
|
|
108
|
+
function F(e) {
|
|
109
109
|
const t = e.toLowerCase().split(":")[0];
|
|
110
110
|
return ae[t] || `// ${e}
|
|
111
111
|
// Write your code here`;
|
|
112
112
|
}
|
|
113
|
-
var
|
|
113
|
+
var V = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
114
114
|
function re(e) {
|
|
115
115
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
116
116
|
}
|
|
@@ -131,8 +131,8 @@ var q = { exports: {} };
|
|
|
131
131
|
for (var d in s = {}, r[o] = s, n) n.hasOwnProperty(d) && (s[d] = a(n[d], r));
|
|
132
132
|
return s;
|
|
133
133
|
case "Array":
|
|
134
|
-
return o = l.util.objId(n), r[o] ? r[o] : (s = [], r[o] = s, n.forEach(function(u,
|
|
135
|
-
s[
|
|
134
|
+
return o = l.util.objId(n), r[o] ? r[o] : (s = [], r[o] = s, n.forEach(function(u, h) {
|
|
135
|
+
s[h] = a(u, r);
|
|
136
136
|
}), s);
|
|
137
137
|
default:
|
|
138
138
|
return n;
|
|
@@ -174,20 +174,20 @@ var q = { exports: {} };
|
|
|
174
174
|
}, insertBefore: function(a, n, r, s) {
|
|
175
175
|
var o = (s = s || l.languages)[a], d = {};
|
|
176
176
|
for (var u in o) if (o.hasOwnProperty(u)) {
|
|
177
|
-
if (u == n) for (var
|
|
177
|
+
if (u == n) for (var h in r) r.hasOwnProperty(h) && (d[h] = r[h]);
|
|
178
178
|
r.hasOwnProperty(u) || (d[u] = o[u]);
|
|
179
179
|
}
|
|
180
180
|
var E = s[a];
|
|
181
|
-
return s[a] = d, l.languages.DFS(l.languages, function(y,
|
|
182
|
-
|
|
181
|
+
return s[a] = d, l.languages.DFS(l.languages, function(y, O) {
|
|
182
|
+
O === E && y != a && (this[y] = d);
|
|
183
183
|
}), d;
|
|
184
184
|
}, DFS: function a(n, r, s, o) {
|
|
185
185
|
o = o || {};
|
|
186
186
|
var d = l.util.objId;
|
|
187
187
|
for (var u in n) if (n.hasOwnProperty(u)) {
|
|
188
188
|
r.call(n, u, n[u], s || u);
|
|
189
|
-
var
|
|
190
|
-
E !== "Object" || o[d(
|
|
189
|
+
var h = n[u], E = l.util.type(h);
|
|
190
|
+
E !== "Object" || o[d(h)] ? E !== "Array" || o[d(h)] || (o[d(h)] = !0, a(h, r, u, o)) : (o[d(h)] = !0, a(h, r, null, o));
|
|
191
191
|
}
|
|
192
192
|
} }, plugins: {}, highlightAll: function(a, n) {
|
|
193
193
|
l.highlightAllUnder(document, a, n);
|
|
@@ -201,17 +201,17 @@ var q = { exports: {} };
|
|
|
201
201
|
var d = a.parentElement;
|
|
202
202
|
d && d.nodeName.toLowerCase() === "pre" && l.util.setLanguage(d, s);
|
|
203
203
|
var u = { element: a, language: s, grammar: o, code: a.textContent };
|
|
204
|
-
function
|
|
204
|
+
function h(y) {
|
|
205
205
|
u.highlightedCode = y, l.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, l.hooks.run("after-highlight", u), l.hooks.run("complete", u), r && r.call(u.element);
|
|
206
206
|
}
|
|
207
207
|
if (l.hooks.run("before-sanity-check", u), (d = u.element.parentElement) && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !u.code) return l.hooks.run("complete", u), void (r && r.call(u.element));
|
|
208
208
|
if (l.hooks.run("before-highlight", u), u.grammar) if (n && i.Worker) {
|
|
209
209
|
var E = new Worker(l.filename);
|
|
210
210
|
E.onmessage = function(y) {
|
|
211
|
-
|
|
211
|
+
h(y.data);
|
|
212
212
|
}, E.postMessage(JSON.stringify({ language: u.language, code: u.code, immediateClose: !0 }));
|
|
213
|
-
} else
|
|
214
|
-
else
|
|
213
|
+
} else h(l.highlight(u.code, u.grammar, u.language));
|
|
214
|
+
else h(l.util.encode(u.code));
|
|
215
215
|
}, highlight: function(a, n, r) {
|
|
216
216
|
var s = { code: a, grammar: n, language: r };
|
|
217
217
|
if (l.hooks.run("before-tokenize", s), !s.grammar) throw new Error('The language "' + s.language + '" has no grammar.');
|
|
@@ -224,7 +224,7 @@ var q = { exports: {} };
|
|
|
224
224
|
}
|
|
225
225
|
var o = new k();
|
|
226
226
|
return S(o, o.head, a), m(a, o, n, o.head, 0), function(d) {
|
|
227
|
-
for (var u = [],
|
|
227
|
+
for (var u = [], h = d.head.next; h !== d.tail; ) u.push(h.value), h = h.next;
|
|
228
228
|
return u;
|
|
229
229
|
}(o);
|
|
230
230
|
}, hooks: { all: {}, add: function(a, n) {
|
|
@@ -237,7 +237,7 @@ var q = { exports: {} };
|
|
|
237
237
|
function b(a, n, r, s) {
|
|
238
238
|
this.type = a, this.content = n, this.alias = r, this.length = 0 | (s || "").length;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function g(a, n, r, s) {
|
|
241
241
|
a.lastIndex = n;
|
|
242
242
|
var o = a.exec(r);
|
|
243
243
|
if (o && s && o[1]) {
|
|
@@ -248,35 +248,35 @@ var q = { exports: {} };
|
|
|
248
248
|
}
|
|
249
249
|
function m(a, n, r, s, o, d) {
|
|
250
250
|
for (var u in r) if (r.hasOwnProperty(u) && r[u]) {
|
|
251
|
-
var
|
|
252
|
-
|
|
253
|
-
for (var E = 0; E <
|
|
251
|
+
var h = r[u];
|
|
252
|
+
h = Array.isArray(h) ? h : [h];
|
|
253
|
+
for (var E = 0; E < h.length; ++E) {
|
|
254
254
|
if (d && d.cause == u + "," + E) return;
|
|
255
|
-
var y =
|
|
256
|
-
if (
|
|
255
|
+
var y = h[E], O = y.inside, Y = !!y.lookbehind, X = !!y.greedy, J = y.alias;
|
|
256
|
+
if (X && !y.pattern.global) {
|
|
257
257
|
var Q = y.pattern.toString().match(/[imsuy]*$/)[0];
|
|
258
258
|
y.pattern = RegExp(y.pattern.source, Q + "g");
|
|
259
259
|
}
|
|
260
|
-
for (var
|
|
260
|
+
for (var Z = y.pattern || y, v = s.next, w = o; v !== n.tail && !(d && w >= d.reach); w += v.value.length, v = v.next) {
|
|
261
261
|
var R = v.value;
|
|
262
262
|
if (n.length > a.length) return;
|
|
263
263
|
if (!(R instanceof b)) {
|
|
264
|
-
var x,
|
|
265
|
-
if (
|
|
266
|
-
if (!(x =
|
|
267
|
-
var
|
|
268
|
-
for (C += v.value.length;
|
|
264
|
+
var x, N = 1;
|
|
265
|
+
if (X) {
|
|
266
|
+
if (!(x = g(Z, w, a, Y)) || x.index >= a.length) break;
|
|
267
|
+
var P = x.index, ee = x.index + x[0].length, C = w;
|
|
268
|
+
for (C += v.value.length; P >= C; ) C += (v = v.next).value.length;
|
|
269
269
|
if (w = C -= v.value.length, v.value instanceof b) continue;
|
|
270
|
-
for (var
|
|
271
|
-
|
|
272
|
-
} else if (!(x =
|
|
273
|
-
|
|
274
|
-
var
|
|
275
|
-
d &&
|
|
276
|
-
var
|
|
277
|
-
if (
|
|
278
|
-
var
|
|
279
|
-
m(a, n, r, v.prev, w,
|
|
270
|
+
for (var L = v; L !== n.tail && (C < ee || typeof L.value == "string"); L = L.next) N++, C += L.value.length;
|
|
271
|
+
N--, R = a.slice(w, C), x.index -= w;
|
|
272
|
+
} else if (!(x = g(Z, 0, R, Y))) continue;
|
|
273
|
+
P = x.index;
|
|
274
|
+
var D = x[0], U = R.slice(0, P), K = R.slice(P + D.length), H = w + R.length;
|
|
275
|
+
d && H > d.reach && (d.reach = H);
|
|
276
|
+
var $ = v.prev;
|
|
277
|
+
if (U && ($ = S(n, $, U), w += U.length), T(n, $, N), v = S(n, $, new b(u, O ? l.tokenize(D, O) : D, J, D)), K && S(n, v, K), N > 1) {
|
|
278
|
+
var B = { cause: u + "," + E, reach: H };
|
|
279
|
+
m(a, n, r, v.prev, w, B), d && B.reach > d.reach && (d.reach = B.reach);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
}
|
|
@@ -306,7 +306,7 @@ var q = { exports: {} };
|
|
|
306
306
|
var o = { type: n.type, content: a(n.content, r), tag: "span", classes: ["token", n.type], attributes: {}, language: r }, d = n.alias;
|
|
307
307
|
d && (Array.isArray(d) ? Array.prototype.push.apply(o.classes, d) : o.classes.push(d)), l.hooks.run("wrap", o);
|
|
308
308
|
var u = "";
|
|
309
|
-
for (var
|
|
309
|
+
for (var h in o.attributes) u += " " + h + '="' + (o.attributes[h] || "").replace(/"/g, """) + '"';
|
|
310
310
|
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + u + ">" + o.content + "</" + o.tag + ">";
|
|
311
311
|
}, !i.document) return i.addEventListener && (l.disableWorkerMessageHandler || i.addEventListener("message", function(a) {
|
|
312
312
|
var n = JSON.parse(a.data), r = n.language, s = n.code, o = n.immediateClose;
|
|
@@ -322,7 +322,7 @@ var q = { exports: {} };
|
|
|
322
322
|
}
|
|
323
323
|
return l;
|
|
324
324
|
}(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
|
|
325
|
-
e.exports && (e.exports = t),
|
|
325
|
+
e.exports && (e.exports = t), V !== void 0 && (V.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(i) {
|
|
326
326
|
i.type === "entity" && (i.attributes.title = i.content.replace(/&/, "&"));
|
|
327
327
|
}), Object.defineProperty(t.languages.markup.tag, "addInlined", { value: function(i, c) {
|
|
328
328
|
var p = {};
|
|
@@ -344,15 +344,15 @@ var q = { exports: {} };
|
|
|
344
344
|
if (t !== void 0 && typeof document < "u") {
|
|
345
345
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
346
346
|
var i = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, c = "data-src-status", p = "loading", f = "loaded", l = "pre[data-src]:not([" + c + '="' + f + '"]):not([' + c + '="' + p + '"])';
|
|
347
|
-
t.hooks.add("before-highlightall", function(
|
|
348
|
-
|
|
349
|
-
}), t.hooks.add("before-sanity-check", function(
|
|
350
|
-
var m =
|
|
347
|
+
t.hooks.add("before-highlightall", function(g) {
|
|
348
|
+
g.selector += ", " + l;
|
|
349
|
+
}), t.hooks.add("before-sanity-check", function(g) {
|
|
350
|
+
var m = g.element;
|
|
351
351
|
if (m.matches(l)) {
|
|
352
|
-
|
|
352
|
+
g.code = "", m.setAttribute(c, p);
|
|
353
353
|
var k = m.appendChild(document.createElement("CODE"));
|
|
354
354
|
k.textContent = "Loading…";
|
|
355
|
-
var S = m.getAttribute("data-src"), T =
|
|
355
|
+
var S = m.getAttribute("data-src"), T = g.language;
|
|
356
356
|
if (T === "none") {
|
|
357
357
|
var _ = (/\.(\w+)$/.exec(S) || [, "none"])[1];
|
|
358
358
|
T = i[_] || _;
|
|
@@ -369,8 +369,8 @@ var q = { exports: {} };
|
|
|
369
369
|
var a = function(o) {
|
|
370
370
|
var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(o || "");
|
|
371
371
|
if (d) {
|
|
372
|
-
var u = Number(d[1]),
|
|
373
|
-
return
|
|
372
|
+
var u = Number(d[1]), h = d[2], E = d[3];
|
|
373
|
+
return h ? E ? [u, Number(E)] : [u, void 0] : [u, u];
|
|
374
374
|
}
|
|
375
375
|
}(m.getAttribute("data-range"));
|
|
376
376
|
if (a) {
|
|
@@ -383,8 +383,8 @@ var q = { exports: {} };
|
|
|
383
383
|
m.setAttribute(c, "failed"), k.textContent = A;
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
-
}), t.plugins.fileHighlight = { highlight: function(
|
|
387
|
-
for (var m, k = (
|
|
386
|
+
}), t.plugins.fileHighlight = { highlight: function(g) {
|
|
387
|
+
for (var m, k = (g || document).querySelectorAll(l), S = 0; m = k[S++]; ) t.highlightElement(m);
|
|
388
388
|
} };
|
|
389
389
|
var b = !1;
|
|
390
390
|
t.fileHighlight = function() {
|
|
@@ -393,7 +393,7 @@ var q = { exports: {} };
|
|
|
393
393
|
}
|
|
394
394
|
}();
|
|
395
395
|
})(q);
|
|
396
|
-
const
|
|
396
|
+
const z = re(q.exports);
|
|
397
397
|
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(e) {
|
|
398
398
|
var t = /\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/, i = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, c = { pattern: RegExp(/(^|[^\w.])/.source + i + /[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: /\./ } };
|
|
399
399
|
e.languages.java = e.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [c, { pattern: RegExp(/(^|[^\w.])/.source + i + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: c.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + i + /[A-Z]\w*\b/.source), lookbehind: !0, inside: c.inside }], keyword: t, function: [e.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\b[A-Z][A-Z_\d]+\b/ }), e.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), e.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": c, keyword: t, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + i + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: c.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + i + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: c.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() {
|
|
@@ -412,12 +412,12 @@ Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/
|
|
|
412
412
|
for (var p = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], f = c.variable[1].inside, l = 0; l < p.length; l++) f[p[l]] = e.languages.bash[p[l]];
|
|
413
413
|
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
414
414
|
}(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;
|
|
415
|
-
function
|
|
416
|
-
var
|
|
417
|
-
return t && (
|
|
415
|
+
function W(e, t, i, c, p, f, l, b) {
|
|
416
|
+
var g = typeof e == "function" ? e.options : e;
|
|
417
|
+
return t && (g.render = t, g.staticRenderFns = i, g._compiled = !0), f && (g._scopeId = "data-v-" + f), { exports: e, options: g };
|
|
418
418
|
}
|
|
419
|
-
typeof window < "u" && (window.Prism =
|
|
420
|
-
const
|
|
419
|
+
typeof window < "u" && (window.Prism = z);
|
|
420
|
+
const M = W({ name: "CodeRunner", components: { CodeEditor: W({ name: "CodeEditor", props: { value: { type: String, default: "" }, language: { type: String, default: "javascript" }, theme: { type: String, default: "dark" }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
421
421
|
return { highlightRef: null, changeTimer: null };
|
|
422
422
|
}, mounted() {
|
|
423
423
|
this.loadPrismTheme(this.theme);
|
|
@@ -431,8 +431,8 @@ const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEdito
|
|
|
431
431
|
return this.theme === "dark" ? "#1e1e1e" : "#fafafa";
|
|
432
432
|
}, highlightedCode: function() {
|
|
433
433
|
try {
|
|
434
|
-
var e =
|
|
435
|
-
if (e) return
|
|
434
|
+
var e = z.languages[this.prismLanguage];
|
|
435
|
+
if (e) return z.highlight(this.value || "", e, this.prismLanguage);
|
|
436
436
|
} catch {
|
|
437
437
|
}
|
|
438
438
|
return this.escapeHtml(this.value || "");
|
|
@@ -629,16 +629,15 @@ const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEdito
|
|
|
629
629
|
}, [], 0, 0, "c5a23c34").exports }, props: { pistonUrl: { type: String, default: "/api/piston" }, token: { type: String, default: "" }, language: { type: String, default: "javascript" }, code: { type: String, default: "" }, theme: { type: String, default: "light", validator: function(e) {
|
|
630
630
|
return ["light", "dark"].indexOf(e) !== -1;
|
|
631
631
|
} }, themeColor: { type: String, default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { type: String, default: "运行" } }, data: function() {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
this.code !== void 0 && this.code !== "" || (this.internalCode = V(this.internalLanguage));
|
|
632
|
+
var e = this.code !== void 0 && this.code !== "";
|
|
633
|
+
return { runtimes: [], isCodeModified: !1, _prevSnippet: e ? this.code : F(this.language || "javascript"), _hasUserEdited: e, internalLanguage: this.language || "javascript", internalCode: this.code !== void 0 ? this.code : F(this.language || "javascript"), currentTheme: this.theme, output: "", stderr: "", isRunning: !1, executionTime: null, activeTab: "stdout", error: null, runtimesLoading: !1, client: null, editorWidth: 60, copiedEditor: !1, copiedOutput: !1 };
|
|
635
634
|
}, computed: { themeClass: function() {
|
|
636
635
|
return "hep-cr-runner-" + this.currentTheme;
|
|
637
636
|
}, themeStyle: function() {
|
|
638
637
|
if (!this.themeColor) return {};
|
|
639
638
|
var e, t = this.currentTheme === "dark", i = this.themeColor, c = function(f, l) {
|
|
640
|
-
var b = parseInt(f.replace("#", ""), 16),
|
|
641
|
-
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (b >> 16) +
|
|
639
|
+
var b = parseInt(f.replace("#", ""), 16), g = Math.round(2.55 * l);
|
|
640
|
+
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (b >> 16) + g)) + 256 * Math.min(255, Math.max(0, (b >> 8 & 255) + g)) + Math.min(255, Math.max(0, (255 & b) + g))).toString(16).slice(1);
|
|
642
641
|
}, p = (0.299 * ((e = parseInt(i.replace("#", ""), 16)) >> 16 & 255) + 0.587 * (e >> 8 & 255) + 0.114 * (255 & e)) / 255 > 0.5 ? "#000" : "#fff";
|
|
643
642
|
return { "--hep-cr-theme-color": i, "--hep-cr-theme-color-hover": c(i, t ? 20 : -20), "--hep-cr-tab-active-color": p };
|
|
644
643
|
}, languageOptions: function() {
|
|
@@ -649,11 +648,11 @@ const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEdito
|
|
|
649
648
|
var e = this.internalLanguage;
|
|
650
649
|
return e.includes(":") ? e.split(":")[0] : e;
|
|
651
650
|
} }, watch: { language: function(e) {
|
|
652
|
-
e && e !== this.internalLanguage && (this.internalLanguage = e);
|
|
651
|
+
e && e !== this.internalLanguage && (this.internalLanguage = e, this._prevSnippet = F(e));
|
|
653
652
|
}, code: function(e) {
|
|
654
|
-
e !== void 0 && e !== this.internalCode && (this.internalCode = e);
|
|
653
|
+
e !== void 0 && e !== this.internalCode && (this.internalCode = e, this._hasUserEdited = !1, this._prevSnippet = e);
|
|
655
654
|
}, internalLanguage: function(e) {
|
|
656
|
-
this.isCodeModified = !1, this.$emit("update:language", e), this.$emit("language-change", e.includes(":") ? e.split(":")[0] : e, this.internalCode);
|
|
655
|
+
this._hasUserEdited && this.internalCode !== this._prevSnippet || (this.internalCode = F(e), this._prevSnippet = F(e)), this._hasUserEdited = !1, this.isCodeModified = !1, this.$emit("update:language", e), this.$emit("language-change", e.includes(":") ? e.split(":")[0] : e, this.internalCode);
|
|
657
656
|
}, internalCode: function(e) {
|
|
658
657
|
this.$emit("update:code", e), this.$emit("change", e);
|
|
659
658
|
} }, mounted: function() {
|
|
@@ -672,7 +671,7 @@ const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEdito
|
|
|
672
671
|
e.runtimesLoading = !1;
|
|
673
672
|
});
|
|
674
673
|
}, handleCodeInput: function(e) {
|
|
675
|
-
this.isCodeModified = !0, this.internalCode = e;
|
|
674
|
+
this.isCodeModified = !0, this._hasUserEdited = !0, this.internalCode = e;
|
|
676
675
|
}, handleCodeChange: function(e) {
|
|
677
676
|
this.internalCode = e;
|
|
678
677
|
}, execute: function() {
|
|
@@ -725,9 +724,9 @@ const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEdito
|
|
|
725
724
|
} } }, [e._v(" 输出 ")]), e.stderr ? t("button", { class: ["hep-cr-tab", "hep-cr-tab-error", { active: e.activeTab === "stderr" }], on: { click: function(i) {
|
|
726
725
|
e.activeTab = "stderr";
|
|
727
726
|
} } }, [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))])])])])]);
|
|
728
|
-
}, [], 0, 0, "
|
|
727
|
+
}, [], 0, 0, "09c7b525").exports, ie = W({ name: "CodeRunnerDialog", components: { CodeRunner: M }, props: { value: { type: Boolean, default: !1 }, title: { type: String, default: "代码执行器" }, width: { type: [String, Number], default: 800 }, language: { type: String, default: "javascript" }, code: { type: String, default: "" }, pistonUrl: { type: String, default: "/api/piston" }, token: { type: String, default: "" }, theme: { type: String, default: "light" }, themeColor: { type: String, default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { type: String, default: "运行" } }, model: { prop: "value", event: "input" }, data: function() {
|
|
729
728
|
var e = this.language || "javascript", t = e.includes(":") ? e.split(":")[0] : e;
|
|
730
|
-
return { localVisible: this.value, localLanguage: this.language || "javascript", localCode: this.code !== void 0 ? this.code :
|
|
729
|
+
return { localVisible: this.value, localLanguage: this.language || "javascript", localCode: this.code !== void 0 ? this.code : F(t) };
|
|
731
730
|
}, computed: { dialogWidth() {
|
|
732
731
|
return typeof this.width == "number" ? this.width + "px" : this.width;
|
|
733
732
|
} }, watch: { value(e) {
|
|
@@ -746,18 +745,22 @@ const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEdito
|
|
|
746
745
|
this.localLanguage = e, this.$emit("update:language", e);
|
|
747
746
|
}, handleCodeUpdate(e) {
|
|
748
747
|
this.localCode = e, this.$emit("update:code", e);
|
|
748
|
+
}, handleLanguageChange(e, t) {
|
|
749
|
+
this.$emit("language-change", e, t);
|
|
750
|
+
}, handleCodeChange(e) {
|
|
751
|
+
this.$emit("change", e);
|
|
749
752
|
} }, expose: ["open", "close"] }, function() {
|
|
750
753
|
var e = this, t = e._self._c;
|
|
751
|
-
return 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", { attrs: { language: e.localLanguage, code: e.localCode, pistonUrl: e.pistonUrl, token: e.token, theme: e.theme, themeColor: e.themeColor, showLanguageSelector: e.showLanguageSelector, showEditor: e.showEditor, editable: e.editable, executorLabel: e.executorLabel }, on: { "update:language": e.handleLanguageUpdate, "update:code": e.handleCodeUpdate } })], 1), t("div", { staticClass: "hep-cr-dialog-footer" }, [e._t("footer", null, { close: e.close })], 2)])]) : e._e();
|
|
752
|
-
}, [], 0, 0, "
|
|
753
|
-
|
|
754
|
-
e.component("CodeRunner",
|
|
754
|
+
return 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", { attrs: { language: e.localLanguage, code: e.localCode, pistonUrl: e.pistonUrl, token: e.token, theme: e.theme, themeColor: e.themeColor, showLanguageSelector: e.showLanguageSelector, showEditor: e.showEditor, editable: e.editable, executorLabel: e.executorLabel }, on: { "update:language": e.handleLanguageUpdate, "update:code": e.handleCodeUpdate, "language-change": e.handleLanguageChange, change: e.handleCodeChange } })], 1), t("div", { staticClass: "hep-cr-dialog-footer" }, [e._t("footer", null, { close: e.close })], 2)])]) : e._e();
|
|
755
|
+
}, [], 0, 0, "f5136eae").exports;
|
|
756
|
+
M.install = (e) => {
|
|
757
|
+
e.component("CodeRunner", M);
|
|
755
758
|
};
|
|
756
759
|
const se = { install(e) {
|
|
757
|
-
e.component("CodeRunner",
|
|
760
|
+
e.component("CodeRunner", M);
|
|
758
761
|
} };
|
|
759
762
|
export {
|
|
760
|
-
|
|
763
|
+
M as CodeRunner,
|
|
761
764
|
ie as CodeRunnerDialog,
|
|
762
765
|
se as default
|
|
763
766
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.hep-cr-editor[data-v-c5a23c34]{position:relative;flex:1;overflow:hidden}.hep-cr-highlight[data-v-c5a23c34],.hep-cr-input[data-v-c5a23c34]{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-c5a23c34]{pointer-events:none;z-index:1}.hep-cr-highlight.hep-cr-highlight[data-v-c5a23c34]{background:transparent!important}.hep-cr-highlight code[data-v-c5a23c34]{display:block;font-family:inherit;background:transparent!important}.hep-cr-input[data-v-c5a23c34]{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#d4d4d4;resize:none;outline:none}.hep-cr-input[data-v-c5a23c34]:disabled{opacity:.7}.hep-cr-theme-light .hep-cr-input[data-v-c5a23c34]{caret-color:#333}.hep-cr-highlight pre[class*=language-][data-v-c5a23c34]{text-shadow:none}.hep-cr-runner[data-v-
|
|
1
|
+
.hep-cr-editor[data-v-c5a23c34]{position:relative;flex:1;overflow:hidden}.hep-cr-highlight[data-v-c5a23c34],.hep-cr-input[data-v-c5a23c34]{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-c5a23c34]{pointer-events:none;z-index:1}.hep-cr-highlight.hep-cr-highlight[data-v-c5a23c34]{background:transparent!important}.hep-cr-highlight code[data-v-c5a23c34]{display:block;font-family:inherit;background:transparent!important}.hep-cr-input[data-v-c5a23c34]{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#d4d4d4;resize:none;outline:none}.hep-cr-input[data-v-c5a23c34]:disabled{opacity:.7}.hep-cr-theme-light .hep-cr-input[data-v-c5a23c34]{caret-color:#333}.hep-cr-highlight pre[class*=language-][data-v-c5a23c34]{text-shadow:none}.hep-cr-runner[data-v-09c7b525]{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-09c7b525]{background:#fff}.hep-cr-runner-dark[data-v-09c7b525]{background:#1e1e1e;border-color:#333}.hep-cr-runner-header[data-v-09c7b525]{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-09c7b525]{background:#f3f3f3;border-color:#e0e0e0}.hep-cr-runner-controls[data-v-09c7b525]{display:flex;gap:8px}.hep-cr-language-select[data-v-09c7b525]{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-09c7b525]{background:#fff;color:#333;border-color:#ccc}.hep-cr-language-select[data-v-09c7b525]:focus{border-color:#4fc3f7}.hep-cr-runner-actions[data-v-09c7b525]{display:flex;gap:8px}.hep-cr-btn[data-v-09c7b525]{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-09c7b525]:disabled{opacity:.5;cursor:not-allowed}.hep-cr-btn-run[data-v-09c7b525]{background:var(--hep-cr-theme-color, #4caf50);color:var(--hep-cr-tab-active-color, #fff);font-weight:600}.hep-cr-btn-run[data-v-09c7b525]:hover:not(:disabled){background:var(--hep-cr-theme-color-hover, #43a047)}.hep-cr-btn-theme[data-v-09c7b525]{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-09c7b525]{display:block;width:18px;height:18px}.hep-cr-runner-light .hep-cr-btn-theme[data-v-09c7b525]{color:#f57c00}.hep-cr-btn-theme[data-v-09c7b525]:hover{background:#ffffff1a;color:#fff}.hep-cr-runner-light .hep-cr-btn-theme[data-v-09c7b525]:hover{background:#0000000d}.hep-cr-error-message[data-v-09c7b525]{padding:10px 16px;background:#c62828;color:#fff;font-size:13px}.hep-cr-runner-main[data-v-09c7b525]{display:flex;height:400px;overflow:hidden}.hep-cr-editor-panel[data-v-09c7b525]{display:flex;flex-direction:column;min-width:20%;max-width:80%}.hep-cr-panel-header[data-v-09c7b525]{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-09c7b525]{background:#f0f0f0;border-color:#e0e0e0}.hep-cr-panel-title[data-v-09c7b525]{font-size:12px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.5px}.hep-cr-language-badge[data-v-09c7b525]{font-size:11px;padding:2px 8px;background:var(--hep-cr-theme-color, #4fc3f7);color:var(--hep-cr-tab-active-color, #000);border-radius:10px;font-weight:600}.hep-cr-editor[data-v-09c7b525]{flex:1;width:100%;background:#1e1e1e}.hep-cr-editor .hep-cr-highlight[data-v-09c7b525]{background:transparent!important}.hep-cr-editor .hep-cr-input[data-v-09c7b525]{color:transparent!important;caret-color:#d4d4d4}.hep-cr-runner-light .hep-cr-editor[data-v-09c7b525]{background:#fafafa}.hep-cr-runner-light .hep-cr-editor .hep-cr-highlight code[data-v-09c7b525]{color:#333}.hep-cr-resize-handle[data-v-09c7b525]{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-09c7b525]:hover{background:var(--hep-cr-theme-color, #4fc3f7)}.hep-cr-resize-line[data-v-09c7b525]{width:3px;height:40px;background:#555;border-radius:2px;transition:background .2s}.hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-09c7b525]{background:#fff}.hep-cr-runner-light .hep-cr-resize-handle[data-v-09c7b525]{background:#e0e0e0;border-color:#ccc}.hep-cr-runner-light .hep-cr-resize-line[data-v-09c7b525]{background:#bbb}.hep-cr-runner-light .hep-cr-resize-handle[data-v-09c7b525]:hover{background:var(--hep-cr-theme-color, #4fc3f7)}.hep-cr-runner-light .hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-09c7b525]{background:#fff}.hep-cr-output-panel[data-v-09c7b525]{display:flex;flex-direction:column;min-width:20%;border-left:1px solid #333}.hep-cr-runner-light .hep-cr-output-panel[data-v-09c7b525]{border-color:#e0e0e0}.hep-cr-output-tabs[data-v-09c7b525]{display:flex;gap:4px}.hep-cr-tab[data-v-09c7b525]{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-09c7b525]:hover{color:#d4d4d4;background:#3d3d3d}.hep-cr-runner-light .hep-cr-tab[data-v-09c7b525]:hover{color:#333;background:#e0e0e0}.hep-cr-tab.active[data-v-09c7b525]{background:var(--hep-cr-theme-color, #4fc3f7);color:var(--hep-cr-tab-active-color, #000);font-weight:600}.hep-cr-tab-error.active[data-v-09c7b525]{background:#f44336;color:#fff}.hep-cr-output-actions[data-v-09c7b525]{display:flex;align-items:center;gap:12px}.hep-cr-execution-time[data-v-09c7b525]{font-size:12px;color:var(--hep-cr-theme-color, #4caf50);font-weight:500}.hep-cr-btn-icon[data-v-09c7b525]{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-09c7b525]:hover{color:#fff;background:#3d3d3d}.hep-cr-runner-light .hep-cr-btn-icon[data-v-09c7b525]:hover{color:#333;background:#e0e0e0}.hep-cr-btn-icon[data-v-09c7b525]:disabled{cursor:not-allowed;opacity:.7}.hep-cr-btn-copied[data-v-09c7b525]{color:#4caf50!important}.hep-cr-copied-text[data-v-09c7b525]{font-size:12px;color:#4caf50}.hep-cr-output-content[data-v-09c7b525]{flex:1;padding:12px 16px;overflow:auto;background:#1e1e1e}.hep-cr-runner-light .hep-cr-output-content[data-v-09c7b525]{background:#fff}.hep-cr-output-content pre[data-v-09c7b525]{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-09c7b525]{color:#333}.hep-cr-output-content .hep-cr-stderr[data-v-09c7b525]{color:#f44336}.hep-cr-spinner[data-v-09c7b525]{width:12px;height:12px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin-09c7b525 .8s linear infinite}@keyframes spin-09c7b525{to{transform:rotate(360deg)}}.hep-cr-dialog-overlay[data-v-f5136eae]{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-f5136eae]{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-f5136eae]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e0e0e0}.hep-cr-dialog-title[data-v-f5136eae]{margin:0;font-size:16px;font-weight:600;color:#333}.hep-cr-dialog-close[data-v-f5136eae]{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-f5136eae]:hover{background:#f0f0f0;color:#333}.hep-cr-dialog-body[data-v-f5136eae]{flex:1;overflow:auto;padding:0}.hep-cr-dialog-body[data-v-f5136eae] .hep-cr-runner{border:none;border-radius:0}.hep-cr-dialog-footer[data-v-f5136eae]{padding:12px 20px;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-end;gap:12px}.hep-cr-dialog-fade-enter-active[data-v-f5136eae],.hep-cr-dialog-fade-leave-active[data-v-f5136eae]{transition:opacity .2s ease}.hep-cr-dialog-fade-enter-from[data-v-f5136eae],.hep-cr-dialog-fade-leave-to[data-v-f5136eae]{opacity:0}.hep-cr-dialog-fade-enter-active .hep-cr-dialog-container[data-v-f5136eae],.hep-cr-dialog-fade-leave-active .hep-cr-dialog-container[data-v-f5136eae]{transition:transform .2s ease}.hep-cr-dialog-fade-enter-from .hep-cr-dialog-container[data-v-f5136eae],.hep-cr-dialog-fade-leave-to .hep-cr-dialog-container[data-v-f5136eae]{transform:scale(.95)}
|