@hep-code-runner/vue3 2.2.1 → 2.2.3
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 +231 -1
- package/dist/index.mjs +477 -3162
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1 +1,231 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");var t=Object.defineProperty,n=(e,n,a)=>((e,n,a)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a)(e,"symbol"!=typeof n?n+"":n,a);let a=null;class r{constructor(e={}){n(this,"baseUrl"),n(this,"timeout"),this.baseUrl=e.pistonUrl||"/api/piston",this.timeout=e.timeout||3e3}async getRuntimes(e=!1){if(a&&!e)return a;try{const e=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`Failed to fetch runtimes: ${e.statusText}`);const t=await e.json();return a=t,t}catch(t){throw t}}async execute(e,t,n={}){const a=(await this.getRuntimes()).find(t=>{var n;return t.language.toLowerCase()===e.toLowerCase()||(null==(n=t.aliases)?void 0:n.some(t=>t.toLowerCase()===e.toLowerCase()))});if(!a)throw new Error(`Language '${e}' is not supported`);const r=this.getFileName(e),o={language:a.language,version:n.version||a.version,files:[{name:r,content:t}],stdin:n.stdin||"",args:n.args||[],run_timeout:n.runTimeout||this.timeout,compile_timeout:this.timeout},s=Date.now();try{const e=await fetch(`${this.baseUrl}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!e.ok)throw new Error(`Execute failed: ${e.statusText}`);const t=await e.json(),n=Date.now()-s,a=t.run.stdout||"",r=t.run.stderr||"";return{success:0===t.run.code,output:a,stderr:r,code:t.run.code,executionTime:n,compile:t.compile?{stdout:t.compile.stdout||"",stderr:t.compile.stderr||"",code:t.compile.code}:void 0}}catch(i){return{success:!1,output:"",stderr:i instanceof Error?i.message:"Unknown error",code:-1,executionTime:Date.now()-s}}}getFileName(e){return{javascript:"main.js",typescript:"main.ts",python:"main.py",python3:"main.py",go:"main.go",rust:"main.rs",java:"Main.java",c:"main.c",cpp:"main.cpp",csharp:"Main.cs",ruby:"main.rb",php:"main.php",bash:"main.sh",shell:"main.sh",perl:"main.pl",lua:"main.lua",swift:"main.swift",kotlin:"Main.kt",scala:"Main.scala",haskell:"main.hs",dart:"main.dart",html:"index.html",css:"style.css",sql:"query.sql",markdown:"readme.md"}[e.toLowerCase()]||`main.${e}`}}const o={javascript:'console.log("Hello, World!");',typescript:'console.log("Hello, World!");',python:'print("Hello, World!")',python3:'print("Hello, World!")',go:'package main\n\nimport "fmt"\n\nfunc main() {\n\tfmt.Println("Hello, World!")\n}',rust:'fn main() {\n\tprintln!("Hello, World!");\n}',java:'public class Main {\n public static void main(String[] args) {\n System.out.println("Hello, World!");\n }\n}',c:'#include <stdio.h>\n\nint main() {\n printf("Hello, World!\\n");\n return 0;\n}',cpp:'#include <iostream>\n\nint main() {\n std::cout << "Hello, World!" << std::endl;\n return 0;\n}',csharp:'using System;\n\nclass Main {\n static void Main() {\n Console.WriteLine("Hello, World!");\n }\n}',ruby:'puts "Hello, World!"',php:'<?php\necho "Hello, World!";\n?>',bash:'echo "Hello, World!"',shell:'echo "Hello, World!"',perl:'print "Hello, World!\\n";',lua:'print("Hello, World!")',r:'print("Hello, World!")',swift:'print("Hello, World!")',kotlin:'fun main() {\n println("Hello, World!")\n}',scala:'object Main extends App {\n println("Hello, World!")\n}',haskell:'main = putStrLn "Hello, World!"',elixir:'IO.puts "Hello, World!"',erlang:'main() -> io:fwrite("Hello, World!~n").',clojure:'(println "Hello, World!")',fsharp:'printfn "Hello, World!"',dart:'void main() {\n print("Hello, World!");\n}',assembly:"section .data\n msg db 'Hello, World!', 0\nsection .text\n global _start\n_start:\n mov rax, 1\n mov rdi, 1\n mov rsi, msg\n mov rdx, 13\n syscall\n mov rax, 60\n xor rdi, rdi\n syscall",html:"<!DOCTYPE html>\n<html>\n<head>\n <title>Hello</title>\n</head>\n<body>\n <h1>Hello, World!</h1>\n</body>\n</html>",css:"body {\n background-color: #f0f0f0;\n font-family: Arial, sans-serif;\n}\n\nh1 {\n color: #333;\n}",sql:"SELECT 'Hello, World!' AS message;",markdown:"# Hello, World!\n\nThis is a sample markdown document."};function s(e){const t=e.toLowerCase();return o[t]||`// ${e}\n// Write your code here`}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c,u,d={exports:{}};c=d,u=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var s in a={},n[o]=a,t)t.hasOwnProperty(s)&&(a[s]=e(t[s],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach(function(t,r){a[r]=e(t,n)}),a);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(a){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var a="no-"+t;e;){var r=e.classList;if(r.contains(t))return!0;if(r.contains(a))return!1;e=e.parentElement}return!!n}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],s={};for(var i in o)if(o.hasOwnProperty(i)){if(i==t)for(var l in n)n.hasOwnProperty(l)&&(s[l]=n[l]);n.hasOwnProperty(i)||(s[i]=o[i])}var c=a[e];return a[e]=s,r.languages.DFS(r.languages,function(t,n){n===c&&t!=e&&(this[t]=s)}),s},DFS:function e(t,n,a,o){o=o||{};var s=r.util.objId;for(var i in t)if(t.hasOwnProperty(i)){n.call(t,i,t[i],a||i);var l=t[i],c=r.util.type(l);"Object"!==c||o[s(l)]?"Array"!==c||o[s(l)]||(o[s(l)]=!0,e(l,n,i,o)):(o[s(l)]=!0,e(l,n,null,o))}}},plugins:{},highlightAll:function(e,t){r.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),r.hooks.run("before-all-elements-highlight",a);for(var o,s=0;o=a.elements[s++];)r.highlightElement(o,!0===t,a.callback)},highlightElement:function(t,n,a){var o=r.util.getLanguage(t),s=r.languages[o];r.util.setLanguage(t,o);var i=t.parentElement;i&&"pre"===i.nodeName.toLowerCase()&&r.util.setLanguage(i,o);var l={element:t,language:o,grammar:s,code:t.textContent};function c(e){l.highlightedCode=e,r.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,r.hooks.run("after-highlight",l),r.hooks.run("complete",l),a&&a.call(l.element)}if(r.hooks.run("before-sanity-check",l),(i=l.element.parentElement)&&"pre"===i.nodeName.toLowerCase()&&!i.hasAttribute("tabindex")&&i.setAttribute("tabindex","0"),!l.code)return r.hooks.run("complete",l),void(a&&a.call(l.element));if(r.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(r.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(r.highlight(l.code,l.grammar,l.language));else c(r.util.encode(l.code))},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run("after-tokenize",a),o.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var a in n)t[a]=n[a];delete t.rest}var r=new l;return c(r,r.head,e),i(e,r,t,r.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(r)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:o};function o(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function s(e,t,n,a){e.lastIndex=t;var r=e.exec(n);if(r&&a&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function i(e,t,n,a,l,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var g=n[p];g=Array.isArray(g)?g:[g];for(var h=0;h<g.length;++h){if(d&&d.cause==p+","+h)return;var m=g[h],f=m.inside,b=!!m.lookbehind,E=!!m.greedy,v=m.alias;if(E&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var y=m.pattern||m,S=a.next,w=l;S!==t.tail&&!(d&&w>=d.reach);w+=S.value.length,S=S.next){var A=S.value;if(t.length>e.length)return;if(!(A instanceof o)){var T,N=1;if(E){if(!(T=s(y,w,e,b))||T.index>=e.length)break;var x=T.index,I=T.index+T[0].length,F=w;for(F+=S.value.length;x>=F;)F+=(S=S.next).value.length;if(w=F-=S.value.length,S.value instanceof o)continue;for(var _=S;_!==t.tail&&(F<I||"string"==typeof _.value);_=_.next)N++,F+=_.value.length;N--,A=e.slice(w,F),T.index-=w}else if(!(T=s(y,0,A,b)))continue;x=T.index;var R=T[0],O=A.slice(0,x),L=A.slice(x+R.length),C=w+A.length;d&&C>d.reach&&(d.reach=C);var P=S.prev;if(O&&(P=c(t,P,O),w+=O.length),u(t,P,N),S=c(t,P,new o(p,f?r.tokenize(R,f):R,v,R)),L&&c(t,S,L),N>1){var D={cause:p+","+h,reach:C};i(e,t,n,S.prev,w,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}function u(e,t,n){for(var a=t.next,r=0;r<n&&a!==e.tail;r++)a=a.next;t.next=a,a.prev=t,e.length-=r}if(e.Prism=r,o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach(function(t){a+=e(t,n)}),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},s=t.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),r.hooks.run("wrap",o);var i="";for(var l in o.attributes)i+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+i+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),a=n.language,o=n.code,s=n.immediateClose;e.postMessage(r.highlight(o,r.languages[a],a)),s&&e.close()},!1),r):r;var d=r.util.currentScript();function p(){r.manual||r.highlightAll()}if(d&&(r.filename=d.src,d.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var g=document.readyState;"loading"===g||"interactive"===g&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{}),c.exports&&(c.exports=u),void 0!==i&&(i.Prism=u),u.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]},u.languages.markup.tag.inside["attr-value"].inside.entity=u.languages.markup.entity,u.languages.markup.doctype.inside["internal-subset"].inside=u.languages.markup,u.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(u.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:u.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:u.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:a},u.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(u.languages.markup.tag,"addAttribute",{value:function(e,t){u.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\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:[t,"language-"+t],inside:u.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),u.languages.html=u.languages.markup,u.languages.mathml=u.languages.markup,u.languages.svg=u.languages.markup,u.languages.xml=u.languages.extend("markup",{}),u.languages.ssml=u.languages.xml,u.languages.atom=u.languages.xml,u.languages.rss=u.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.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\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,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:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(u),u.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:/[{}[\];(),.:]/},u.languages.javascript=u.languages.extend("clike",{"class-name":[u.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}|\?\?=?|\?\.?|[~:]/}),u.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,u.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:u.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:u.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:u.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:u.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:u.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),u.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:u.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"}}),u.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),u.languages.markup&&(u.languages.markup.tag.addInlined("script","javascript"),u.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")),u.languages.js=u.languages.javascript,function(){if(void 0!==u&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",a="loaded",r="pre[data-src]:not(["+t+'="'+a+'"]):not(['+t+'="'+n+'"])';u.hooks.add("before-highlightall",function(e){e.selector+=", "+r}),u.hooks.add("before-sanity-check",function(o){var s=o.element;if(s.matches(r)){o.code="",s.setAttribute(t,n);var i=s.appendChild(document.createElement("CODE"));i.textContent="Loading…";var l=s.getAttribute("data-src"),c=o.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}u.util.setLanguage(i,c),u.util.setLanguage(s,c);var p=u.plugins.autoloader;p&&p.loadLanguages(c),function(e,t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4==a.readyState&&(a.status<400&&a.responseText?t(a.responseText):a.status>=400?n("✖ Error "+a.status+" while fetching file: "+a.statusText):n("✖ Error: File does not exist or is empty"))},a.send(null)}(l,function(e){s.setAttribute(t,a);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),a=t[2],r=t[3];return a?r?[n,Number(r)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(n){var r=e.split(/\r\n?|\n/g),o=n[0],l=null==n[1]?r.length:n[1];o<0&&(o+=r.length),o=Math.max(0,Math.min(o-1,r.length)),l<0&&(l+=r.length),l=Math.max(0,Math.min(l,r.length)),e=r.slice(o,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(o+1))}i.textContent=e,u.highlightElement(i)},function(e){s.setAttribute(t,"failed"),i.textContent=e})}}),u.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(r),a=0;t=n[a++];)u.highlightElement(t)}};var o=!1;u.fileHighlight=function(){o||(o=!0),u.plugins.fileHighlight.highlight.apply(this,arguments)}}}();const p=l(d.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/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(/(^|[^\w.])/.source+n+/[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":[a,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:a.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:a.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":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:a.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:a.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,n=0;n<2;n++)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",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,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:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.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}},n.inside=e.languages.bash;for(var r=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=a.variable[1].inside,s=0;s<r.length;s++)o[r[s]]=e.languages.bash[r[s]];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;const g=["innerHTML"],h=["value","disabled"],m=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},f=m(e.defineComponent({__name:"CodeEditor",props:{modelValue:{},language:{},theme:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){function a(e){if("undefined"==typeof document)return;const t="hep-cr-prism-styles",n=document.getElementById(t),a="dark"===e?'\n/* 默认代码颜色 */\n.hep-cr-editor .hep-cr-highlight code,\n.hep-cr-editor .hep-cr-highlight pre {\n color: #f8f8f2 !important;\n}\n\n.hep-cr-editor .token.comment,\n.hep-cr-editor .token.prolog,\n.hep-cr-editor .token.doctype,\n.hep-cr-editor .token.cdata {\n color: #8292a2 !important;\n}\n\n.hep-cr-editor .token.punctuation {\n color: #f8f8f2 !important;\n}\n\n.hep-cr-editor .token.property,\n.hep-cr-editor .token.tag,\n.hep-cr-editor .token.constant,\n.hep-cr-editor .token.symbol,\n.hep-cr-editor .token.deleted {\n color: #f92672 !important;\n}\n\n/* console 单独处理 - 必须是白色 */\n.hep-cr-editor .token.property.console,\n.hep-cr-editor .token.console {\n color: #f8f8f2 !important;\n}\n\n.hep-cr-editor .token.boolean,\n.hep-cr-editor .token.number {\n color: #ae81ff !important;\n}\n\n.hep-cr-editor .token.selector,\n.hep-cr-editor .token.attr-name,\n.hep-cr-editor .token.string,\n.hep-cr-editor .token.char,\n.hep-cr-editor .token.builtin,\n.hep-cr-editor .token.inserted {\n color: #a6e22e !important;\n}\n\n.hep-cr-editor .token.operator,\n.hep-cr-editor .token.entity,\n.hep-cr-editor .token.url,\n.hep-cr-editor .language-css .hep-cr-editor .token.string,\n.hep-cr-editor .style .hep-cr-editor .token.string,\n.hep-cr-editor .token.variable {\n color: #f8f8f2 !important;\n}\n\n.hep-cr-editor .token.atrule,\n.hep-cr-editor .token.attr-value,\n.hep-cr-editor .token.function,\n.hep-cr-editor .token.class-name {\n color: #e6db74 !important;\n}\n\n.hep-cr-editor .token.keyword,\n.hep-cr-editor .token.keyword-control {\n color: #66d9ef !important;\n}\n\n.hep-cr-editor .token.regex,\n.hep-cr-editor .token.important {\n color: #fd971f !important;\n}\n\n/* 覆盖用户项目的 text-shadow 样式,避免白边 */\n.hep-cr-editor code[class*="language-"],\n.hep-cr-editor pre[class*="language-"],\n.hep-cr-editor .hep-cr-highlight code,\n.hep-cr-editor .hep-cr-highlight pre {\n text-shadow: none !important;\n}\n\n/* 覆盖 console 等内置对象 - 使用最高特异性 */\n.hep-cr-editor .hep-cr-highlight .token.console,\n.hep-cr-editor code.token.console,\n.hep-cr-editor .token.console {\n color: #f8f8f2 !important;\n}\n':'\n/* 默认代码颜色 */\n.hep-cr-editor .hep-cr-highlight code,\n.hep-cr-editor .hep-cr-highlight pre {\n color: #333 !important;\n}\n\n.hep-cr-editor .token.comment,\n.hep-cr-editor .token.prolog,\n.hep-cr-editor .token.doctype,\n.hep-cr-editor .token.cdata {\n color: #708090;\n}\n\n.hep-cr-editor .token.punctuation {\n color: #333;\n}\n\n.hep-cr-editor .token.property,\n.hep-cr-editor .token.tag,\n.hep-cr-editor .token.constant,\n.hep-cr-editor .token.symbol,\n.hep-cr-editor .token.deleted {\n color: #d73a49;\n}\n\n.hep-cr-editor .token.boolean,\n.hep-cr-editor .token.number {\n color: #005cc5;\n}\n\n.hep-cr-editor .token.selector,\n.hep-cr-editor .token.attr-name,\n.hep-cr-editor .token.string,\n.hep-cr-editor .token.char,\n.hep-cr-editor .token.builtin,\n.hep-cr-editor .token.inserted {\n color: #22863a;\n}\n\n.hep-cr-editor .token.operator,\n.hep-cr-editor .token.entity,\n.hep-cr-editor .token.url,\n.hep-cr-editor .language-css .hep-cr-editor .token.string,\n.hep-cr-editor .style .hep-cr-editor .token.string,\n.hep-cr-editor .token.variable {\n color: #333;\n}\n\n.hep-cr-editor .token.atrule,\n.hep-cr-editor .token.attr-value,\n.hep-cr-editor .token.function,\n.hep-cr-editor .token.class-name {\n color: #6f42c1;\n}\n\n.hep-cr-editor .token.keyword {\n color: #d73a49;\n}\n\n.hep-cr-editor .token.regex,\n.hep-cr-editor .token.important {\n color: #e36209;\n}\n\n/* 覆盖用户项目的 text-shadow 样式,避免白边 */\n.hep-cr-editor code[class*="language-"],\n.hep-cr-editor pre[class*="language-"],\n.hep-cr-editor .hep-cr-highlight code,\n.hep-cr-editor .hep-cr-highlight pre {\n text-shadow: none !important;\n}\n\n/* 覆盖 console 等内置对象 */\n.hep-cr-editor .token.console {\n color: #333 !important;\n}\n';n&&n.remove();const r=document.createElement("style");r.id=t,r.textContent=a,document.head.appendChild(r)}e.useCssVars(e=>({v2b19bab6:m.value})),"undefined"!=typeof window&&(window.Prism=p);const r=t,o=n,s=e.ref(null),i=e.ref(null);let l=null;function c(e){l&&clearTimeout(l),l=setTimeout(()=>{o("change",e)},500)}const u={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"},d=e.computed(()=>u[r.language.toLowerCase()]||"javascript"),m=e.computed(()=>"dark"===r.theme?"#1e1e1e":"#fafafa"),f=e.computed(()=>{try{const e=p.languages[d.value];if(e)return p.highlight(r.modelValue||"",e,d.value)}catch(e){}return function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}(r.modelValue||"")});function b(e){const t=e.target;o("update:modelValue",t.value),c(t.value)}function E(){s.value&&i.value&&(i.value.scrollTop=s.value.scrollTop,i.value.scrollLeft=s.value.scrollLeft)}function v(e){if("Tab"===e.key){e.preventDefault();const t=e.target,n=t.selectionStart,a=t.selectionEnd,r=t.value;t.value=r.substring(0,n)+" "+r.substring(a),t.selectionStart=t.selectionEnd=n+2,o("update:modelValue",t.value),c(t.value)}}return e.onMounted(()=>{a(r.theme)}),e.watch(()=>r.theme,e=>{a(e)}),e.onUnmounted(()=>{l&&clearTimeout(l)}),(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-editor",`hep-cr-theme-${t.theme}`])},[e.createElementVNode("pre",{ref_key:"highlightRef",ref:i,class:e.normalizeClass(["hep-cr-highlight",[`language-${d.value}`,`hep-cr-prism-${t.theme}`]]),"aria-hidden":"true"},[e.createElementVNode("code",{innerHTML:f.value},null,8,g)],2),e.createElementVNode("textarea",{ref_key:"codeRef",ref:s,class:"hep-cr-input",value:t.modelValue,disabled:t.disabled,onInput:b,onScroll:E,onKeydown:v,spellcheck:"false",placeholder:"Write your code here..."},null,40,h)],2))}}),[["__scopeId","data-v-a988ca2a"]]),b={class:"hep-cr-header"},E={class:"hep-cr-controls"},v=["disabled"],k={key:0,value:""},y=["value"],S={class:"hep-cr-actions"},w=["disabled"],A={key:0,class:"hep-cr-spinner"},T={key:1,class:"hep-cr-run-icon"},N=["title"],x={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},I={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},F={key:0,class:"hep-cr-error"},_={class:"hep-cr-main"},R={class:"hep-cr-panel-header"},O={class:"hep-cr-output-actions"},L={class:"hep-cr-language-badge"},C=["disabled","title"],P={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},D={key:1,class:"hep-cr-copied-text"},B={class:"hep-cr-panel-header"},$={class:"hep-cr-output-tabs"},M={class:"hep-cr-output-actions"},U={key:0,class:"hep-cr-execution-time"},H=["disabled","title"],V={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},z={key:1,class:"hep-cr-copied-text"},j={class:"hep-cr-output-content"},G={key:0},W={key:1,class:"hep-cr-stderr"},Y="hep-cr-default-language",X=m(e.defineComponent({__name:"CodeRunner",props:{pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["execute-start","execute-end","language-change","change"],setup(t,{emit:n}){const a=t,o=e.computed(()=>{if(!a.themeColor)return{};const e="dark"===a.theme,t=a.themeColor,n=function(e){const t=parseInt(e.replace("#",""),16);return(.299*(t>>16&255)+.587*(t>>8&255)+.114*(255&t))/255>.5}(t)?"#000":"#fff";return{"--hep-cr-theme-color":t,"--hep-cr-theme-color-hover":i(t,e?20:-20),"--hep-cr-tab-active-color":n}});function i(e,t){const n=parseInt(e.replace("#",""),16),a=Math.round(2.55*t);return"#"+(16777216+65536*Math.min(255,Math.max(0,(n>>16)+a))+256*Math.min(255,Math.max(0,(n>>8&255)+a))+Math.min(255,Math.max(0,(255&n)+a))).toString(16).slice(1)}const l=n,c=e.ref([]),u=e.ref("undefined"==typeof window?a.language:localStorage.getItem(Y)||a.language),d=e.ref(a.theme),p=e.ref(""),g=e.ref(""),h=e.ref(""),m=e.ref(!1),X=e.ref(null),Z=e.ref("stdout"),K=e.ref(null),q=e.ref(!1),J=e.ref(60);function Q(){d.value="light"===d.value?"dark":"light"}const ee=e.computed(()=>new r({pistonUrl:a.pistonUrl})),te=e.computed(()=>c.value.map(e=>({value:`${e.language}:${e.version}`,label:`${e.language.charAt(0).toUpperCase()+e.language.slice(1)} ${e.version}`}))),ne=e.computed(()=>{const e=u.value;return e.includes(":")?e.split(":")[0]:e});async function ae(){if(!m.value){m.value=!0,g.value="",h.value="",X.value=null,K.value=null,Z.value="stdout",l("execute-start");try{const e=await ee.value.execute(ne.value,p.value);g.value=e.output,h.value=e.stderr,X.value=e.executionTime||null,Z.value=e.stderr?"stderr":"stdout",l("execute-end",e)}catch(e){K.value=e instanceof Error?e.message:"Execution failed",l("execute-end",{success:!1,output:"",stderr:K.value,code:-1})}finally{m.value=!1}}}e.watch(u,e=>{const t=e.includes(":")?e.split(":")[0]:e,n=s(t);p.value=n,l("language-change",t,n),"undefined"!=typeof window&&localStorage.setItem(Y,e)});const re=e.ref(!1),oe=e.ref(!1);async function se(){await navigator.clipboard.writeText(p.value),re.value=!0,setTimeout(()=>{re.value=!1},2e3)}async function ie(){const e="stdout"===Z.value?g.value:h.value;await navigator.clipboard.writeText(e),oe.value=!0,setTimeout(()=>{oe.value=!1},2e3)}function le(){p.value=s(ne.value)}let ce=!1;function ue(e){ce=!0,document.addEventListener("mousemove",de),document.addEventListener("mouseup",pe),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}function de(e){if(!ce)return;const t=document.querySelector(".hep-cr-main");if(!t)return;const n=t.getBoundingClientRect(),a=(e.clientX-n.left)/n.width*100;J.value=Math.max(20,Math.min(80,a))}function pe(){ce=!1,document.removeEventListener("mousemove",de),document.removeEventListener("mouseup",pe),document.body.style.cursor="",document.body.style.userSelect=""}e.onMounted(async()=>{await async function(){q.value=!0,K.value=null;try{c.value=await ee.value.getRuntimes();const e=u.value.split(":")[0],t=c.value.find(t=>t.language===e);t&&!u.value.includes(":")&&(u.value=`${e}:${t.version}`),p.value||(p.value=a.defaultCode||s(e),l("change",p.value)),l("language-change",e,p.value)}catch(e){K.value=e instanceof Error?e.message:"Failed to load runtimes"}finally{q.value=!1}}(),p.value||(p.value=a.defaultCode||s(u.value),l("change",p.value))});const ge=e.computed(()=>`hep-cr-runner-${d.value}`);return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-runner",ge.value]),style:e.normalizeStyle(o.value)},[e.createElementVNode("div",b,[e.createElementVNode("div",E,[t.showLanguageSelector?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),class:"hep-cr-language-select",disabled:m.value},[q.value?(e.openBlock(),e.createElementBlock("option",k,"加载中...")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,t=>(e.openBlock(),e.createElementBlock("option",{key:t.value,value:t.value},e.toDisplayString(t.label),9,y))),128))],8,v)),[[e.vModelSelect,u.value]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",S,[e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-run",disabled:m.value||q.value,onClick:ae},[m.value?(e.openBlock(),e.createElementBlock("span",A)):(e.openBlock(),e.createElementBlock("span",T,"▶")),e.createTextVNode(" "+e.toDisplayString(m.value?"运行中...":t.executorLabel),1)],8,w),t.showEditor&&t.editable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"hep-cr-btn hep-cr-btn-reset",onClick:le}," 重置 ")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-theme",onClick:Q,title:"light"===d.value?"Switch to dark mode":"Switch to light mode"},["light"===d.value?(e.openBlock(),e.createElementBlock("svg",x,[...a[5]||(a[5]=[e.createElementVNode("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",I,[...a[6]||(a[6]=[e.createStaticVNode('<circle cx="12" cy="12" r="5" data-v-41977f3b></circle><line x1="12" y1="1" x2="12" y2="3" data-v-41977f3b></line><line x1="12" y1="21" x2="12" y2="23" data-v-41977f3b></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-41977f3b></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-41977f3b></line><line x1="1" y1="12" x2="3" y2="12" data-v-41977f3b></line><line x1="21" y1="12" x2="23" y2="12" data-v-41977f3b></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-41977f3b></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-41977f3b></line>',9)])]))],8,N)])]),K.value?(e.openBlock(),e.createElementBlock("div",F,e.toDisplayString(K.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.showEditor?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-editor-panel",style:e.normalizeStyle({width:J.value+"%"})},[e.createElementVNode("div",R,[a[8]||(a[8]=e.createElementVNode("span",{class:"hep-cr-panel-title"},"编辑器",-1)),e.createElementVNode("div",O,[e.createElementVNode("span",L,e.toDisplayString(ne.value),1),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":re.value}]),disabled:re.value,onClick:se,title:re.value?"已复制":"复制"},[re.value?(e.openBlock(),e.createElementBlock("span",D,"已复制")):(e.openBlock(),e.createElementBlock("svg",P,[...a[7]||(a[7]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,C)])]),e.createVNode(f,{modelValue:p.value,"onUpdate:modelValue":a[1]||(a[1]=e=>p.value=e),language:ne.value,theme:d.value,disabled:!t.editable||m.value,onChange:a[2]||(a[2]=e=>l("change",e))},null,8,["modelValue","language","theme","disabled"])],4)):e.createCommentVNode("",!0),t.showEditor?(e.openBlock(),e.createElementBlock("div",{key:1,class:"hep-cr-resize-handle",onMousedown:ue},[...a[9]||(a[9]=[e.createElementVNode("div",{class:"hep-cr-resize-line"},null,-1)])],32)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"hep-cr-output-panel",style:e.normalizeStyle({width:t.showEditor?100-J.value+"%":"100%"})},[e.createElementVNode("div",B,[e.createElementVNode("div",$,[e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-tab",{active:"stdout"===Z.value}]),onClick:a[3]||(a[3]=e=>Z.value="stdout")}," 输出 ",2),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["hep-cr-tab","hep-cr-tab-error",{active:"stderr"===Z.value}]),onClick:a[4]||(a[4]=e=>Z.value="stderr")}," 错误 ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",M,[null!==X.value?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(X.value)+"ms ",1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":oe.value}]),disabled:oe.value,onClick:ie,title:oe.value?"已复制":"复制"},[oe.value?(e.openBlock(),e.createElementBlock("span",z,"已复制")):(e.openBlock(),e.createElementBlock("svg",V,[...a[10]||(a[10]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,H)])]),e.createElementVNode("div",j,["stdout"===Z.value?(e.openBlock(),e.createElementBlock("pre",G,e.toDisplayString(m.value?"代码执行中...":g.value||'点击"运行"执行代码'),1)):(e.openBlock(),e.createElementBlock("pre",W,e.toDisplayString(h.value),1))])],4)])],6))}}),[["__scopeId","data-v-41977f3b"]]),Z={class:"hep-cr-dialog-header"},K={class:"hep-cr-dialog-title"},q={class:"hep-cr-dialog-body"},J={key:0,class:"hep-cr-dialog-footer"},Q=e.defineComponent({__name:"CodeRunnerDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:"代码执行器"},width:{default:800},pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["update:modelValue","close","change"],setup(t,{expose:n,emit:a}){const r=t,o=a,s=e.ref(r.modelValue),i=e.computed(()=>void 0!==r.modelValue?r.modelValue:s.value);function l(){s.value=!1,o("update:modelValue",!1),o("close")}function c(e){e.target===e.currentTarget&&l()}return e.watch(()=>r.modelValue,e=>{void 0!==e&&(s.value=e)}),n({close:l}),(n,a)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"hep-cr-dialog-fade"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-dialog-overlay",onClick:c},[e.createElementVNode("div",{class:"hep-cr-dialog-container",style:e.normalizeStyle({width:"number"==typeof t.width?t.width+"px":t.width})},[e.createElementVNode("div",Z,[e.createElementVNode("h3",K,e.toDisplayString(t.title),1),e.createElementVNode("button",{class:"hep-cr-dialog-close",onClick:l},[...a[0]||(a[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e.createElementVNode("div",q,[e.createVNode(X,e.mergeProps(n.$attrs,e.toHandlers(n.$attrs)),null,16)]),n.$slots.footer?(e.openBlock(),e.createElementBlock("div",J,[e.renderSlot(n.$slots,"footer",{close:l})])):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]),_:3})]))}});X.install=e=>{e.component("CodeRunner",X)};const ee={install(e){e.component("CodeRunner",X)}};exports.CodeRunner=X,exports.CodeRunnerDialog=Q,exports.default=ee;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");var ae=Object.defineProperty,q=(u,a,l)=>((c,b,E)=>b in c?ae(c,b,{enumerable:!0,configurable:!0,writable:!0,value:E}):c[b]=E)(u,typeof a!="symbol"?a+"":a,l);let X=null;class re{constructor(a={}){q(this,"baseUrl"),q(this,"timeout"),this.baseUrl=a.pistonUrl||"/api/piston",this.timeout=a.timeout||3e3}async getRuntimes(a=!1){if(X&&!a)return X;try{const l=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!l.ok)throw new Error(`Failed to fetch runtimes: ${l.statusText}`);const c=await l.json();return X=c,c}catch(l){throw l}}async execute(a,l,c={}){const b=(await this.getRuntimes()).find(y=>{var p;return y.language.toLowerCase()===a.toLowerCase()||((p=y.aliases)==null?void 0:p.some(A=>A.toLowerCase()===a.toLowerCase()))});if(!b)throw new Error(`Language '${a}' is not supported`);const E=this.getFileName(a),i={language:b.language,version:c.version||b.version,files:[{name:E,content:l}],stdin:c.stdin||"",args:c.args||[],run_timeout:c.runTimeout||this.timeout,compile_timeout:this.timeout},k=Date.now();try{const y=await fetch(`${this.baseUrl}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!y.ok)throw new Error(`Execute failed: ${y.statusText}`);const p=await y.json(),A=Date.now()-k,N=p.run.stdout||"",w=p.run.stderr||"";return{success:p.run.code===0,output:N,stderr:w,code:p.run.code,executionTime:A,compile:p.compile?{stdout:p.compile.stdout||"",stderr:p.compile.stderr||"",code:p.compile.code}:void 0}}catch(y){return{success:!1,output:"",stderr:y instanceof Error?y.message:"Unknown error",code:-1,executionTime:Date.now()-k}}}getFileName(a){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"}[a.toLowerCase()]||`main.${a}`}}const oe={javascript:'console.log("Hello, World!");',typescript:'console.log("Hello, World!");',python:'print("Hello, World!")',python3:'print("Hello, World!")',go:`package main
|
|
2
|
+
|
|
3
|
+
import "fmt"
|
|
4
|
+
|
|
5
|
+
func main() {
|
|
6
|
+
fmt.Println("Hello, World!")
|
|
7
|
+
}`,rust:`fn main() {
|
|
8
|
+
println!("Hello, World!");
|
|
9
|
+
}`,java:`public class Main {
|
|
10
|
+
public static void main(String[] args) {
|
|
11
|
+
System.out.println("Hello, World!");
|
|
12
|
+
}
|
|
13
|
+
}`,c:`#include <stdio.h>
|
|
14
|
+
|
|
15
|
+
int main() {
|
|
16
|
+
printf("Hello, World!\\n");
|
|
17
|
+
return 0;
|
|
18
|
+
}`,cpp:`#include <iostream>
|
|
19
|
+
|
|
20
|
+
int main() {
|
|
21
|
+
std::cout << "Hello, World!" << std::endl;
|
|
22
|
+
return 0;
|
|
23
|
+
}`,csharp:`using System;
|
|
24
|
+
|
|
25
|
+
class Main {
|
|
26
|
+
static void Main() {
|
|
27
|
+
Console.WriteLine("Hello, World!");
|
|
28
|
+
}
|
|
29
|
+
}`,ruby:'puts "Hello, World!"',php:`<?php
|
|
30
|
+
echo "Hello, World!";
|
|
31
|
+
?>`,bash:'echo "Hello, World!"',shell:'echo "Hello, World!"',perl:'print "Hello, World!\\n";',lua:'print("Hello, World!")',r:'print("Hello, World!")',swift:'print("Hello, World!")',kotlin:`fun main() {
|
|
32
|
+
println("Hello, World!")
|
|
33
|
+
}`,scala:`object Main extends App {
|
|
34
|
+
println("Hello, World!")
|
|
35
|
+
}`,haskell:'main = putStrLn "Hello, World!"',elixir:'IO.puts "Hello, World!"',erlang:'main() -> io:fwrite("Hello, World!~n").',clojure:'(println "Hello, World!")',fsharp:'printfn "Hello, World!"',dart:`void main() {
|
|
36
|
+
print("Hello, World!");
|
|
37
|
+
}`,assembly:`section .data
|
|
38
|
+
msg db 'Hello, World!', 0
|
|
39
|
+
section .text
|
|
40
|
+
global _start
|
|
41
|
+
_start:
|
|
42
|
+
mov rax, 1
|
|
43
|
+
mov rdi, 1
|
|
44
|
+
mov rsi, msg
|
|
45
|
+
mov rdx, 13
|
|
46
|
+
syscall
|
|
47
|
+
mov rax, 60
|
|
48
|
+
xor rdi, rdi
|
|
49
|
+
syscall`,html:`<!DOCTYPE html>
|
|
50
|
+
<html>
|
|
51
|
+
<head>
|
|
52
|
+
<title>Hello</title>
|
|
53
|
+
</head>
|
|
54
|
+
<body>
|
|
55
|
+
<h1>Hello, World!</h1>
|
|
56
|
+
</body>
|
|
57
|
+
</html>`,css:`body {
|
|
58
|
+
background-color: #f0f0f0;
|
|
59
|
+
font-family: Arial, sans-serif;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
h1 {
|
|
63
|
+
color: #333;
|
|
64
|
+
}`,sql:"SELECT 'Hello, World!' AS message;",markdown:`# Hello, World!
|
|
65
|
+
|
|
66
|
+
This is a sample markdown document.`};function z(u){const a=u.toLowerCase();return oe[a]||`// ${u}
|
|
67
|
+
// Write your code here`}var J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function se(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ee={exports:{}};(function(u){var a=function(l){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,b=0,E={},i={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function n(t){return t instanceof k?new k(t.type,n(t.content),t.alias):Array.isArray(t)?t.map(n):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(n){return Object.prototype.toString.call(n).slice(8,-1)},objId:function(n){return n.__id||Object.defineProperty(n,"__id",{value:++b}),n.__id},clone:function n(t,r){var o,s;switch(r=r||{},i.util.type(t)){case"Object":if(s=i.util.objId(t),r[s])return r[s];for(var d in o={},r[s]=o,t)t.hasOwnProperty(d)&&(o[d]=n(t[d],r));return o;case"Array":return s=i.util.objId(t),r[s]?r[s]:(o=[],r[s]=o,t.forEach(function(g,f){o[f]=n(g,r)}),o);default:return t}},getLanguage:function(n){for(;n;){var t=c.exec(n.className);if(t)return t[1].toLowerCase();n=n.parentElement}return"none"},setLanguage:function(n,t){n.className=n.className.replace(RegExp(c,"gi"),""),n.classList.add("language-"+t)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(o){var n=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack)||[])[1];if(n){var t=document.getElementsByTagName("script");for(var r in t)if(t[r].src==n)return t[r]}return null}},isActive:function(n,t,r){for(var o="no-"+t;n;){var s=n.classList;if(s.contains(t))return!0;if(s.contains(o))return!1;n=n.parentElement}return!!r}},languages:{plain:E,plaintext:E,text:E,txt:E,extend:function(n,t){var r=i.util.clone(i.languages[n]);for(var o in t)r[o]=t[o];return r},insertBefore:function(n,t,r,o){var s=(o=o||i.languages)[n],d={};for(var g in s)if(s.hasOwnProperty(g)){if(g==t)for(var f in r)r.hasOwnProperty(f)&&(d[f]=r[f]);r.hasOwnProperty(g)||(d[g]=s[g])}var S=o[n];return o[n]=d,i.languages.DFS(i.languages,function(x,C){C===S&&x!=n&&(this[x]=d)}),d},DFS:function n(t,r,o,s){s=s||{};var d=i.util.objId;for(var g in t)if(t.hasOwnProperty(g)){r.call(t,g,t[g],o||g);var f=t[g],S=i.util.type(f);S!=="Object"||s[d(f)]?S!=="Array"||s[d(f)]||(s[d(f)]=!0,n(f,r,g,s)):(s[d(f)]=!0,n(f,r,null,s))}}},plugins:{},highlightAll:function(n,t){i.highlightAllUnder(document,n,t)},highlightAllUnder:function(n,t,r){var o={callback:r,container:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",o),o.elements=Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)),i.hooks.run("before-all-elements-highlight",o);for(var s,d=0;s=o.elements[d++];)i.highlightElement(s,t===!0,o.callback)},highlightElement:function(n,t,r){var o=i.util.getLanguage(n),s=i.languages[o];i.util.setLanguage(n,o);var d=n.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(d,o);var g={element:n,language:o,grammar:s,code:n.textContent};function f(x){g.highlightedCode=x,i.hooks.run("before-insert",g),g.element.innerHTML=g.highlightedCode,i.hooks.run("after-highlight",g),i.hooks.run("complete",g),r&&r.call(g.element)}if(i.hooks.run("before-sanity-check",g),(d=g.element.parentElement)&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!g.code)return i.hooks.run("complete",g),void(r&&r.call(g.element));if(i.hooks.run("before-highlight",g),g.grammar)if(t&&l.Worker){var S=new Worker(i.filename);S.onmessage=function(x){f(x.data)},S.postMessage(JSON.stringify({language:g.language,code:g.code,immediateClose:!0}))}else f(i.highlight(g.code,g.grammar,g.language));else f(i.util.encode(g.code))},highlight:function(n,t,r){var o={code:n,grammar:t,language:r};if(i.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),k.stringify(i.util.encode(o.tokens),o.language)},tokenize:function(n,t){var r=t.rest;if(r){for(var o in r)t[o]=r[o];delete t.rest}var s=new A;return N(s,s.head,n),p(n,s,t,s.head,0),function(d){for(var g=[],f=d.head.next;f!==d.tail;)g.push(f.value),f=f.next;return g}(s)},hooks:{all:{},add:function(n,t){var r=i.hooks.all;r[n]=r[n]||[],r[n].push(t)},run:function(n,t){var r=i.hooks.all[n];if(r&&r.length)for(var o,s=0;o=r[s++];)o(t)}},Token:k};function k(n,t,r,o){this.type=n,this.content=t,this.alias=r,this.length=0|(o||"").length}function y(n,t,r,o){n.lastIndex=t;var s=n.exec(r);if(s&&o&&s[1]){var d=s[1].length;s.index+=d,s[0]=s[0].slice(d)}return s}function p(n,t,r,o,s,d){for(var g in r)if(r.hasOwnProperty(g)&&r[g]){var f=r[g];f=Array.isArray(f)?f:[f];for(var S=0;S<f.length;++S){if(d&&d.cause==g+","+S)return;var x=f[S],C=x.inside,M=!!x.lookbehind,P=!!x.greedy,j=x.alias;if(P&&!x.pattern.global){var U=x.pattern.toString().match(/[imsuy]*$/)[0];x.pattern=RegExp(x.pattern.source,U+"g")}for(var D=x.pattern||x,F=o.next,h=s;F!==t.tail&&!(d&&h>=d.reach);h+=F.value.length,F=F.next){var m=F.value;if(t.length>n.length)return;if(!(m instanceof k)){var v,R=1;if(P){if(!(v=y(D,h,n,M))||v.index>=n.length)break;var O=v.index,ne=v.index+v[0].length,L=h;for(L+=F.value.length;O>=L;)L+=(F=F.next).value.length;if(h=L-=F.value.length,F.value instanceof k)continue;for(var B=F;B!==t.tail&&(L<ne||typeof B.value=="string");B=B.next)R++,L+=B.value.length;R--,m=n.slice(h,L),v.index-=h}else if(!(v=y(D,0,m,M)))continue;O=v.index;var H=v[0],G=m.slice(0,O),K=m.slice(O+H.length),W=h+m.length;d&&W>d.reach&&(d.reach=W);var V=F.prev;if(G&&(V=N(t,V,G),h+=G.length),w(t,V,R),F=N(t,V,new k(g,C?i.tokenize(H,C):H,j,H)),K&&N(t,F,K),R>1){var Y={cause:g+","+S,reach:W};p(n,t,r,F.prev,h,Y),d&&Y.reach>d.reach&&(d.reach=Y.reach)}}}}}}function A(){var n={value:null,prev:null,next:null},t={value:null,prev:n,next:null};n.next=t,this.head=n,this.tail=t,this.length=0}function N(n,t,r){var o=t.next,s={value:r,prev:t,next:o};return t.next=s,o.prev=s,n.length++,s}function w(n,t,r){for(var o=t.next,s=0;s<r&&o!==n.tail;s++)o=o.next;t.next=o,o.prev=t,n.length-=s}if(l.Prism=i,k.stringify=function n(t,r){if(typeof t=="string")return t;if(Array.isArray(t)){var o="";return t.forEach(function(S){o+=n(S,r)}),o}var s={type:t.type,content:n(t.content,r),tag:"span",classes:["token",t.type],attributes:{},language:r},d=t.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(s.classes,d):s.classes.push(d)),i.hooks.run("wrap",s);var g="";for(var f in s.attributes)g+=" "+f+'="'+(s.attributes[f]||"").replace(/"/g,""")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'"'+g+">"+s.content+"</"+s.tag+">"},!l.document)return l.addEventListener&&(i.disableWorkerMessageHandler||l.addEventListener("message",function(n){var t=JSON.parse(n.data),r=t.language,o=t.code,s=t.immediateClose;l.postMessage(i.highlight(o,i.languages[r],r)),s&&l.close()},!1)),i;var _=i.util.currentScript();function I(){i.manual||i.highlightAll()}if(_&&(i.filename=_.src,_.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var T=document.readyState;T==="loading"||T==="interactive"&&_&&_.defer?document.addEventListener("DOMContentLoaded",I):window.requestAnimationFrame?window.requestAnimationFrame(I):window.setTimeout(I,16)}return i}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});u.exports&&(u.exports=a),J!==void 0&&(J.Prism=a),a.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]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",function(l){l.type==="entity"&&(l.attributes.title=l.content.replace(/&/,"&"))}),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(l,c){var b={};b["language-"+c]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[c]},b.cdata=/^<!\[CDATA\[|\]\]>$/i;var E={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:b}};E["language-"+c]={pattern:/[\s\S]+/,inside:a.languages[c]};var i={};i[l]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return l}),"i"),lookbehind:!0,greedy:!0,inside:E},a.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(l,c){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+l+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[c,"language-"+c],inside:a.languages[c]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(l){var c=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;l.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+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:/[(){};:,]/},l.languages.css.atrule.inside.rest=l.languages.css;var b=l.languages.markup;b&&(b.tag.addInlined("style","css"),b.tag.addAttribute("style","css"))}(a),a.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:/[{}[\];(),.:]/},a.languages.javascript=a.languages.extend("clike",{"class-name":[a.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}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.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:a.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:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.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:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.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:a.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"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.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")),a.languages.js=a.languages.javascript,function(){if(a!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",b="loading",E="loaded",i="pre[data-src]:not(["+c+'="'+E+'"]):not(['+c+'="'+b+'"])';a.hooks.add("before-highlightall",function(y){y.selector+=", "+i}),a.hooks.add("before-sanity-check",function(y){var p=y.element;if(p.matches(i)){y.code="",p.setAttribute(c,b);var A=p.appendChild(document.createElement("CODE"));A.textContent="Loading…";var N=p.getAttribute("data-src"),w=y.language;if(w==="none"){var _=(/\.(\w+)$/.exec(N)||[,"none"])[1];w=l[_]||_}a.util.setLanguage(A,w),a.util.setLanguage(p,w);var I=a.plugins.autoloader;I&&I.loadLanguages(w),function(T,n,t){var r=new XMLHttpRequest;r.open("GET",T,!0),r.onreadystatechange=function(){r.readyState==4&&(r.status<400&&r.responseText?n(r.responseText):r.status>=400?t("✖ Error "+r.status+" while fetching file: "+r.statusText):t("✖ Error: File does not exist or is empty"))},r.send(null)}(N,function(T){p.setAttribute(c,E);var n=function(s){var d=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(s||"");if(d){var g=Number(d[1]),f=d[2],S=d[3];return f?S?[g,Number(S)]:[g,void 0]:[g,g]}}(p.getAttribute("data-range"));if(n){var t=T.split(/\r\n?|\n/g),r=n[0],o=n[1]==null?t.length:n[1];r<0&&(r+=t.length),r=Math.max(0,Math.min(r-1,t.length)),o<0&&(o+=t.length),o=Math.max(0,Math.min(o,t.length)),T=t.slice(r,o).join(`
|
|
68
|
+
`),p.hasAttribute("data-start")||p.setAttribute("data-start",String(r+1))}A.textContent=T,a.highlightElement(A)},function(T){p.setAttribute(c,"failed"),A.textContent=T})}}),a.plugins.fileHighlight={highlight:function(y){for(var p,A=(y||document).querySelectorAll(i),N=0;p=A[N++];)a.highlightElement(p)}};var k=!1;a.fileHighlight=function(){k||(k=!0),a.plugins.fileHighlight.highlight.apply(this,arguments)}}}()})(ee);const Z=se(ee.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(u){var a=/\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/,l=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,c={pattern:RegExp(/(^|[^\w.])/.source+l+/[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:/\./}};u.languages.java=u.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[c,{pattern:RegExp(/(^|[^\w.])/.source+l+/[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+l+/[A-Z]\w*\b/.source),lookbehind:!0,inside:c.inside}],keyword:a,function:[u.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/}),u.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),u.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:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+l+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:c.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+l+/(?:\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 a.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(u){for(var a=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,l=0;l<2;l++)a=a.replace(/<self>/g,function(){return a});a=a.replace(/<self>/g,function(){return/[^\s\S]/.source}),u.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+a),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},u.languages.rust["closure-params"].inside.rest=u.languages.rust,u.languages.rust.attribute.inside.string=u.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(u){var a="\\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",l={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},c={bash:l,environment:{pattern:RegExp("\\$"+a),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("(\\{)"+a),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})/};u.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;|&]|[<>]\\()"+a),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:l}},{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("\\$?"+a),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}},l.inside=u.languages.bash;for(var b=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],E=c.variable[1].inside,i=0;i<b.length;i++)E[b[i]]=u.languages.bash[b[i]];u.languages.sh=u.languages.bash,u.languages.shell=u.languages.bash}(Prism),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;const ie=["innerHTML"],le=["value","disabled"],te=(u,a)=>{const l=u.__vccOpts||u;for(const[c,b]of a)l[c]=b;return l},ce=te(e.defineComponent({__name:"CodeEditor",props:{modelValue:{},language:{},theme:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(u,{emit:a}){function l(n){if(typeof document>"u")return;const t="hep-cr-prism-styles",r=document.getElementById(t),o=n==="dark"?`
|
|
69
|
+
/* 默认代码颜色 */
|
|
70
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
71
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
72
|
+
color: #f8f8f2 !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.hep-cr-editor .token.comment,
|
|
76
|
+
.hep-cr-editor .token.prolog,
|
|
77
|
+
.hep-cr-editor .token.doctype,
|
|
78
|
+
.hep-cr-editor .token.cdata {
|
|
79
|
+
color: #8292a2 !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.hep-cr-editor .token.punctuation {
|
|
83
|
+
color: #f8f8f2 !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hep-cr-editor .token.property,
|
|
87
|
+
.hep-cr-editor .token.tag,
|
|
88
|
+
.hep-cr-editor .token.constant,
|
|
89
|
+
.hep-cr-editor .token.symbol,
|
|
90
|
+
.hep-cr-editor .token.deleted {
|
|
91
|
+
color: #f92672 !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* console 单独处理 - 必须是白色 */
|
|
95
|
+
.hep-cr-editor .token.property.console,
|
|
96
|
+
.hep-cr-editor .token.console {
|
|
97
|
+
color: #f8f8f2 !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.hep-cr-editor .token.boolean,
|
|
101
|
+
.hep-cr-editor .token.number {
|
|
102
|
+
color: #ae81ff !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.hep-cr-editor .token.selector,
|
|
106
|
+
.hep-cr-editor .token.attr-name,
|
|
107
|
+
.hep-cr-editor .token.string,
|
|
108
|
+
.hep-cr-editor .token.char,
|
|
109
|
+
.hep-cr-editor .token.builtin,
|
|
110
|
+
.hep-cr-editor .token.inserted {
|
|
111
|
+
color: #a6e22e !important;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.hep-cr-editor .token.operator,
|
|
115
|
+
.hep-cr-editor .token.entity,
|
|
116
|
+
.hep-cr-editor .token.url,
|
|
117
|
+
.hep-cr-editor .language-css .hep-cr-editor .token.string,
|
|
118
|
+
.hep-cr-editor .style .hep-cr-editor .token.string,
|
|
119
|
+
.hep-cr-editor .token.variable {
|
|
120
|
+
color: #f8f8f2 !important;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.hep-cr-editor .token.atrule,
|
|
124
|
+
.hep-cr-editor .token.attr-value,
|
|
125
|
+
.hep-cr-editor .token.function,
|
|
126
|
+
.hep-cr-editor .token.class-name {
|
|
127
|
+
color: #e6db74 !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.hep-cr-editor .token.keyword,
|
|
131
|
+
.hep-cr-editor .token.keyword-control {
|
|
132
|
+
color: #66d9ef !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.hep-cr-editor .token.regex,
|
|
136
|
+
.hep-cr-editor .token.important {
|
|
137
|
+
color: #fd971f !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* 覆盖用户项目的 text-shadow 样式,避免白边 */
|
|
141
|
+
.hep-cr-editor code[class*="language-"],
|
|
142
|
+
.hep-cr-editor pre[class*="language-"],
|
|
143
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
144
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
145
|
+
text-shadow: none !important;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* 覆盖 console 等内置对象 - 使用最高特异性 */
|
|
149
|
+
.hep-cr-editor .hep-cr-highlight .token.console,
|
|
150
|
+
.hep-cr-editor code.token.console,
|
|
151
|
+
.hep-cr-editor .token.console {
|
|
152
|
+
color: #f8f8f2 !important;
|
|
153
|
+
}
|
|
154
|
+
`:`
|
|
155
|
+
/* 默认代码颜色 */
|
|
156
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
157
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
158
|
+
color: #333 !important;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hep-cr-editor .token.comment,
|
|
162
|
+
.hep-cr-editor .token.prolog,
|
|
163
|
+
.hep-cr-editor .token.doctype,
|
|
164
|
+
.hep-cr-editor .token.cdata {
|
|
165
|
+
color: #708090;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.hep-cr-editor .token.punctuation {
|
|
169
|
+
color: #333;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.hep-cr-editor .token.property,
|
|
173
|
+
.hep-cr-editor .token.tag,
|
|
174
|
+
.hep-cr-editor .token.constant,
|
|
175
|
+
.hep-cr-editor .token.symbol,
|
|
176
|
+
.hep-cr-editor .token.deleted {
|
|
177
|
+
color: #d73a49;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.hep-cr-editor .token.boolean,
|
|
181
|
+
.hep-cr-editor .token.number {
|
|
182
|
+
color: #005cc5;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.hep-cr-editor .token.selector,
|
|
186
|
+
.hep-cr-editor .token.attr-name,
|
|
187
|
+
.hep-cr-editor .token.string,
|
|
188
|
+
.hep-cr-editor .token.char,
|
|
189
|
+
.hep-cr-editor .token.builtin,
|
|
190
|
+
.hep-cr-editor .token.inserted {
|
|
191
|
+
color: #22863a;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.hep-cr-editor .token.operator,
|
|
195
|
+
.hep-cr-editor .token.entity,
|
|
196
|
+
.hep-cr-editor .token.url,
|
|
197
|
+
.hep-cr-editor .language-css .hep-cr-editor .token.string,
|
|
198
|
+
.hep-cr-editor .style .hep-cr-editor .token.string,
|
|
199
|
+
.hep-cr-editor .token.variable {
|
|
200
|
+
color: #333;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.hep-cr-editor .token.atrule,
|
|
204
|
+
.hep-cr-editor .token.attr-value,
|
|
205
|
+
.hep-cr-editor .token.function,
|
|
206
|
+
.hep-cr-editor .token.class-name {
|
|
207
|
+
color: #6f42c1;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.hep-cr-editor .token.keyword {
|
|
211
|
+
color: #d73a49;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.hep-cr-editor .token.regex,
|
|
215
|
+
.hep-cr-editor .token.important {
|
|
216
|
+
color: #e36209;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* 覆盖用户项目的 text-shadow 样式,避免白边 */
|
|
220
|
+
.hep-cr-editor code[class*="language-"],
|
|
221
|
+
.hep-cr-editor pre[class*="language-"],
|
|
222
|
+
.hep-cr-editor .hep-cr-highlight code,
|
|
223
|
+
.hep-cr-editor .hep-cr-highlight pre {
|
|
224
|
+
text-shadow: none !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* 覆盖 console 等内置对象 */
|
|
228
|
+
.hep-cr-editor .token.console {
|
|
229
|
+
color: #333 !important;
|
|
230
|
+
}
|
|
231
|
+
`;r&&r.remove();const s=document.createElement("style");s.id=t,s.textContent=o,document.head.appendChild(s)}e.useCssVars(n=>({v2b19bab6:N.value})),typeof window<"u"&&(window.Prism=Z);const c=u,b=a,E=e.ref(null),i=e.ref(null);let k=null;function y(n){k&&clearTimeout(k),k=setTimeout(()=>{b("change",n)},500)}const p={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"},A=e.computed(()=>p[c.language.toLowerCase()]||"javascript"),N=e.computed(()=>c.theme==="dark"?"#1e1e1e":"#fafafa"),w=e.computed(()=>{try{const n=Z.languages[A.value];if(n)return Z.highlight(c.modelValue||"",n,A.value)}catch{}return function(n){const t=document.createElement("div");return t.textContent=n,t.innerHTML}(c.modelValue||"")});function _(n){const t=n.target;b("update:modelValue",t.value),y(t.value)}function I(){E.value&&i.value&&(i.value.scrollTop=E.value.scrollTop,i.value.scrollLeft=E.value.scrollLeft)}function T(n){if(n.key==="Tab"){n.preventDefault();const t=n.target,r=t.selectionStart,o=t.selectionEnd,s=t.value;t.value=s.substring(0,r)+" "+s.substring(o),t.selectionStart=t.selectionEnd=r+2,b("update:modelValue",t.value),y(t.value)}}return e.onMounted(()=>{l(c.theme)}),e.watch(()=>c.theme,n=>{l(n)}),e.onUnmounted(()=>{k&&clearTimeout(k)}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-editor",`hep-cr-theme-${u.theme}`])},[e.createElementVNode("pre",{ref_key:"highlightRef",ref:i,class:e.normalizeClass(["hep-cr-highlight",[`language-${A.value}`,`hep-cr-prism-${u.theme}`]]),"aria-hidden":"true"},[e.createElementVNode("code",{innerHTML:w.value},null,8,ie)],2),e.createElementVNode("textarea",{ref_key:"codeRef",ref:E,class:"hep-cr-input",value:u.modelValue,disabled:u.disabled,onInput:_,onScroll:I,onKeydown:T,spellcheck:"false",placeholder:"Write your code here..."},null,40,le)],2))}}),[["__scopeId","data-v-a988ca2a"]]),ue={class:"hep-cr-header"},de={class:"hep-cr-controls"},pe=["disabled"],ge={key:0,value:""},he=["value"],me={class:"hep-cr-actions"},fe=["disabled"],be={key:0,class:"hep-cr-spinner"},Ee={key:1,class:"hep-cr-run-icon"},ve=["title"],ke={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},ye={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ae={key:0,class:"hep-cr-error"},Se={class:"hep-cr-main"},we={class:"hep-cr-panel-header"},Te={class:"hep-cr-output-actions"},Ne={class:"hep-cr-language-badge"},xe=["disabled","title"],Ie={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Fe={key:1,class:"hep-cr-copied-text"},_e={class:"hep-cr-panel-header"},Re={class:"hep-cr-output-tabs"},Oe={class:"hep-cr-output-actions"},Le={key:0,class:"hep-cr-execution-time"},Ce=["disabled","title"],Pe={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},De={key:1,class:"hep-cr-copied-text"},Be={class:"hep-cr-output-content"},$e={key:0},Me={key:1,class:"hep-cr-stderr"},Q="hep-cr-default-language",$=te(e.defineComponent({__name:"CodeRunner",props:{pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["execute-start","execute-end","language-change","change"],setup(u,{emit:a}){const l=u,c=e.computed(()=>{if(!l.themeColor)return{};const h=l.theme==="dark",m=l.themeColor,v=function(R){const O=parseInt(R.replace("#",""),16);return(.299*(O>>16&255)+.587*(O>>8&255)+.114*(255&O))/255>.5}(m)?"#000":"#fff";return{"--hep-cr-theme-color":m,"--hep-cr-theme-color-hover":b(m,h?20:-20),"--hep-cr-tab-active-color":v}});function b(h,m){const v=parseInt(h.replace("#",""),16),R=Math.round(2.55*m);return"#"+(16777216+65536*Math.min(255,Math.max(0,(v>>16)+R))+256*Math.min(255,Math.max(0,(v>>8&255)+R))+Math.min(255,Math.max(0,(255&v)+R))).toString(16).slice(1)}const E=a,i=e.ref([]),k=e.ref(typeof window>"u"?l.language:localStorage.getItem(Q)||l.language),y=e.ref(l.theme),p=e.ref(""),A=e.ref(""),N=e.ref(""),w=e.ref(!1),_=e.ref(null),I=e.ref("stdout"),T=e.ref(null),n=e.ref(!1),t=e.ref(60);function r(){y.value=y.value==="light"?"dark":"light"}const o=e.computed(()=>new re({pistonUrl:l.pistonUrl})),s=e.computed(()=>i.value.map(h=>({value:`${h.language}:${h.version}`,label:`${h.language.charAt(0).toUpperCase()+h.language.slice(1)} ${h.version}`}))),d=e.computed(()=>{const h=k.value;return h.includes(":")?h.split(":")[0]:h});async function g(){if(!w.value){w.value=!0,A.value="",N.value="",_.value=null,T.value=null,I.value="stdout",E("execute-start");try{const h=await o.value.execute(d.value,p.value);A.value=h.output,N.value=h.stderr,_.value=h.executionTime||null,I.value=h.stderr?"stderr":"stdout",E("execute-end",h)}catch(h){T.value=h instanceof Error?h.message:"Execution failed",E("execute-end",{success:!1,output:"",stderr:T.value,code:-1})}finally{w.value=!1}}}e.watch(k,h=>{const m=h.includes(":")?h.split(":")[0]:h,v=z(m);p.value=v,E("language-change",m,v),typeof window<"u"&&localStorage.setItem(Q,h)});const f=e.ref(!1),S=e.ref(!1);async function x(){await navigator.clipboard.writeText(p.value),f.value=!0,setTimeout(()=>{f.value=!1},2e3)}async function C(){const h=I.value==="stdout"?A.value:N.value;await navigator.clipboard.writeText(h),S.value=!0,setTimeout(()=>{S.value=!1},2e3)}function M(){p.value=z(d.value)}let P=!1;function j(h){P=!0,document.addEventListener("mousemove",U),document.addEventListener("mouseup",D),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}function U(h){if(!P)return;const m=document.querySelector(".hep-cr-main");if(!m)return;const v=m.getBoundingClientRect(),R=(h.clientX-v.left)/v.width*100;t.value=Math.max(20,Math.min(80,R))}function D(){P=!1,document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",D),document.body.style.cursor="",document.body.style.userSelect=""}e.onMounted(async()=>{await async function(){n.value=!0,T.value=null;try{i.value=await o.value.getRuntimes();const h=k.value.split(":")[0],m=i.value.find(v=>v.language===h);m&&!k.value.includes(":")&&(k.value=`${h}:${m.version}`),p.value||(p.value=l.defaultCode||z(h),E("change",p.value)),E("language-change",h,p.value)}catch(h){T.value=h instanceof Error?h.message:"Failed to load runtimes"}finally{n.value=!1}}(),p.value||(p.value=l.defaultCode||z(k.value),E("change",p.value))});const F=e.computed(()=>`hep-cr-runner-${y.value}`);return(h,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-runner",F.value]),style:e.normalizeStyle(c.value)},[e.createElementVNode("div",ue,[e.createElementVNode("div",de,[u.showLanguageSelector?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":m[0]||(m[0]=v=>k.value=v),class:"hep-cr-language-select",disabled:w.value},[n.value?(e.openBlock(),e.createElementBlock("option",ge,"加载中...")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,v=>(e.openBlock(),e.createElementBlock("option",{key:v.value,value:v.value},e.toDisplayString(v.label),9,he))),128))],8,pe)),[[e.vModelSelect,k.value]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",me,[e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-run",disabled:w.value||n.value,onClick:g},[w.value?(e.openBlock(),e.createElementBlock("span",be)):(e.openBlock(),e.createElementBlock("span",Ee,"▶")),e.createTextVNode(" "+e.toDisplayString(w.value?"运行中...":u.executorLabel),1)],8,fe),u.showEditor&&u.editable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"hep-cr-btn hep-cr-btn-reset",onClick:M}," 重置 ")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-theme",onClick:r,title:y.value==="light"?"Switch to dark mode":"Switch to light mode"},[y.value==="light"?(e.openBlock(),e.createElementBlock("svg",ke,[...m[5]||(m[5]=[e.createElementVNode("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",ye,[...m[6]||(m[6]=[e.createStaticVNode('<circle cx="12" cy="12" r="5" data-v-41977f3b></circle><line x1="12" y1="1" x2="12" y2="3" data-v-41977f3b></line><line x1="12" y1="21" x2="12" y2="23" data-v-41977f3b></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-41977f3b></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-41977f3b></line><line x1="1" y1="12" x2="3" y2="12" data-v-41977f3b></line><line x1="21" y1="12" x2="23" y2="12" data-v-41977f3b></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-41977f3b></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-41977f3b></line>',9)])]))],8,ve)])]),T.value?(e.openBlock(),e.createElementBlock("div",Ae,e.toDisplayString(T.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[u.showEditor?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-editor-panel",style:e.normalizeStyle({width:t.value+"%"})},[e.createElementVNode("div",we,[m[8]||(m[8]=e.createElementVNode("span",{class:"hep-cr-panel-title"},"编辑器",-1)),e.createElementVNode("div",Te,[e.createElementVNode("span",Ne,e.toDisplayString(d.value),1),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":f.value}]),disabled:f.value,onClick:x,title:f.value?"已复制":"复制"},[f.value?(e.openBlock(),e.createElementBlock("span",Fe,"已复制")):(e.openBlock(),e.createElementBlock("svg",Ie,[...m[7]||(m[7]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,xe)])]),e.createVNode(ce,{modelValue:p.value,"onUpdate:modelValue":m[1]||(m[1]=v=>p.value=v),language:d.value,theme:y.value,disabled:!u.editable||w.value,onChange:m[2]||(m[2]=v=>E("change",v))},null,8,["modelValue","language","theme","disabled"])],4)):e.createCommentVNode("",!0),u.showEditor?(e.openBlock(),e.createElementBlock("div",{key:1,class:"hep-cr-resize-handle",onMousedown:j},[...m[9]||(m[9]=[e.createElementVNode("div",{class:"hep-cr-resize-line"},null,-1)])],32)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"hep-cr-output-panel",style:e.normalizeStyle({width:u.showEditor?100-t.value+"%":"100%"})},[e.createElementVNode("div",_e,[e.createElementVNode("div",Re,[e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-tab",{active:I.value==="stdout"}]),onClick:m[3]||(m[3]=v=>I.value="stdout")}," 输出 ",2),N.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["hep-cr-tab","hep-cr-tab-error",{active:I.value==="stderr"}]),onClick:m[4]||(m[4]=v=>I.value="stderr")}," 错误 ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Oe,[_.value!==null?(e.openBlock(),e.createElementBlock("span",Le,e.toDisplayString(_.value)+"ms ",1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":S.value}]),disabled:S.value,onClick:C,title:S.value?"已复制":"复制"},[S.value?(e.openBlock(),e.createElementBlock("span",De,"已复制")):(e.openBlock(),e.createElementBlock("svg",Pe,[...m[10]||(m[10]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,Ce)])]),e.createElementVNode("div",Be,[I.value==="stdout"?(e.openBlock(),e.createElementBlock("pre",$e,e.toDisplayString(w.value?"代码执行中...":A.value||'点击"运行"执行代码'),1)):(e.openBlock(),e.createElementBlock("pre",Me,e.toDisplayString(N.value),1))])],4)])],6))}}),[["__scopeId","data-v-41977f3b"]]),Ue={class:"hep-cr-dialog-header"},He={class:"hep-cr-dialog-title"},Ve={class:"hep-cr-dialog-body"},ze={key:0,class:"hep-cr-dialog-footer"},je=e.defineComponent({__name:"CodeRunnerDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:"代码执行器"},width:{default:800},pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["update:modelValue","close","change"],setup(u,{expose:a,emit:l}){const c=u,b=l,E=e.ref(c.modelValue),i=e.computed(()=>c.modelValue!==void 0?c.modelValue:E.value);function k(){E.value=!1,b("update:modelValue",!1),b("close")}function y(p){p.target===p.currentTarget&&k()}return e.watch(()=>c.modelValue,p=>{p!==void 0&&(E.value=p)}),a({close:k}),(p,A)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"hep-cr-dialog-fade"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-dialog-overlay",onClick:y},[e.createElementVNode("div",{class:"hep-cr-dialog-container",style:e.normalizeStyle({width:typeof u.width=="number"?u.width+"px":u.width})},[e.createElementVNode("div",Ue,[e.createElementVNode("h3",He,e.toDisplayString(u.title),1),e.createElementVNode("button",{class:"hep-cr-dialog-close",onClick:k},[...A[0]||(A[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e.createElementVNode("div",Ve,[e.createVNode($,e.mergeProps(p.$attrs,e.toHandlers(p.$attrs)),null,16)]),p.$slots.footer?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(p.$slots,"footer",{close:k})])):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]),_:3})]))}});$.install=u=>{u.component("CodeRunner",$)};const Ge={install(u){u.component("CodeRunner",$)}};exports.CodeRunner=$,exports.CodeRunnerDialog=je,exports.default=Ge;
|