From 0e15a6a8a33da232d79d97317802aae490028dd6 Mon Sep 17 00:00:00 2001 From: moisseev Date: Sat, 28 May 2022 18:32:56 +0300 Subject: [PATCH] [WebUI] Update JavaScript libraries CodeJar 3.5.0 -> 3.6.0 PrismJS 1.23.0 -> 1.28.0 --- interface/css/prism.css | 163 +------------------------------- interface/js/lib/codejar.min.js | 6 +- interface/js/lib/prism.js | 8 +- 3 files changed, 10 insertions(+), 167 deletions(-) diff --git a/interface/css/prism.css b/interface/css/prism.css index 9cfe82b21..89e303042 100644 --- a/interface/css/prism.css +++ b/interface/css/prism.css @@ -1,161 +1,4 @@ -/* PrismJS 1.23.0 +/* PrismJS 1.28.0 https://prismjs.com/download.html#themes=prism-okaidia&languages=clike&plugins=show-invisibles */ -/** - * okaidia theme for JavaScript, CSS and HTML - * Loosely based on Monokai textmate theme by http://www.monokai.nl/ - * @author ocodia - */ - -code[class*="language-"], -pre[class*="language-"] { - color: #f8f8f2; - background: none; - text-shadow: 0 1px rgba(0, 0, 0, 0.3); - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; - border-radius: 0.3em; -} - -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #272822; -} - -/* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #8292a2; -} - -.token.punctuation { - color: #f8f8f2; -} - -.token.namespace { - opacity: .7; -} - -.token.property, -.token.tag, -.token.constant, -.token.symbol, -.token.deleted { - color: #f92672; -} - -.token.boolean, -.token.number { - color: #ae81ff; -} - -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: #a6e22e; -} - -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string, -.token.variable { - color: #f8f8f2; -} - -.token.atrule, -.token.attr-value, -.token.function, -.token.class-name { - color: #e6db74; -} - -.token.keyword { - color: #66d9ef; -} - -.token.regex, -.token.important { - color: #fd971f; -} - -.token.important, -.token.bold { - font-weight: bold; -} -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} - -.token.tab:not(:empty), -.token.cr, -.token.lf, -.token.space { - position: relative; -} - -.token.tab:not(:empty):before, -.token.cr:before, -.token.lf:before, -.token.space:before { - color: #808080; - opacity: 0.6; - position: absolute; -} - -.token.tab:not(:empty):before { - content: '\21E5'; -} - -.token.cr:before { - content: '\240D'; -} - -.token.crlf:before { - content: '\240D\240A'; -} -.token.lf:before { - content: '\240A'; -} - -.token.space:before { - content: '\00B7'; -} - +code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} +.token.cr,.token.lf,.token.space,.token.tab:not(:empty){position:relative}.token.cr:before,.token.lf:before,.token.space:before,.token.tab:not(:empty):before{color:grey;opacity:.6;position:absolute}.token.tab:not(:empty):before{content:'\21E5'}.token.cr:before{content:'\240D'}.token.crlf:before{content:'\240D\240A'}.token.lf:before{content:'\240A'}.token.space:before{content:'\00B7'} diff --git a/interface/js/lib/codejar.min.js b/interface/js/lib/codejar.min.js index 272e6ae72..a3bc42534 100644 --- a/interface/js/lib/codejar.min.js +++ b/interface/js/lib/codejar.min.js @@ -1,5 +1,5 @@ /*! - * CodeJar 3.5.0 (https://github.com/antonmedv/codejar) - * Copyright (c) 2020, Anton Medvedev, MIT + * CodeJar 3.6.0 (https://github.com/antonmedv/codejar) + * Copyright (c) 2020-2022, Anton Medvedev, MIT */ -const globalWindow=window;function CodeJar(t,e,n={}){const o=Object.assign({tab:"\t",indentOn:/{$/,spellcheck:!1,catchTab:!0,preserveIdent:!0,addClosing:!0,history:!0,window:globalWindow},n),r=o.window,s=r.document;let i,d,l=[],a=[],c=-1,f=!1;t.setAttribute("contenteditable","plaintext-only"),t.setAttribute("spellcheck",o.spellcheck?"true":"false"),t.style.outline="none",t.style.overflowWrap="break-word",t.style.overflowY="auto",t.style.whiteSpace="pre-wrap";let u=!1;e(t),"plaintext-only"!==t.contentEditable&&(u=!0),u&&t.setAttribute("contenteditable","true");const p=S(()=>{const n=b();e(t,n),T(n)},30);let g=!1;const h=t=>!O(t)&&!x(t)&&"Meta"!==t.key&&"Control"!==t.key&&"Alt"!==t.key&&!t.key.startsWith("Arrow"),y=S(t=>{h(t)&&(m(),g=!1)},300),N=(e,n)=>{l.push([e,n]),t.addEventListener(e,n)};function b(){const e=K(),n={start:0,end:0,dir:void 0};let{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:d}=e;if(!o||!i)throw"error1";if(o.nodeType===Node.ELEMENT_NODE){const t=s.createTextNode("");o.insertBefore(t,o.childNodes[r]),o=t,r=0}if(i.nodeType===Node.ELEMENT_NODE){const t=s.createTextNode("");i.insertBefore(t,i.childNodes[d]),i=t,d=0}return v(t,t=>{if(t===o&&t===i)return n.start+=r,n.end+=d,n.dir=r<=d?"->":"<-","stop";if(t===o){if(n.start+=r,n.dir)return"stop";n.dir="->"}else if(t===i){if(n.end+=d,n.dir)return"stop";n.dir="<-"}t.nodeType===Node.TEXT_NODE&&("->"!=n.dir&&(n.start+=t.nodeValue.length),"<-"!=n.dir&&(n.end+=t.nodeValue.length))}),t.normalize(),n}function T(e){const n=K();let o,r,s=0,i=0;if(e.dir||(e.dir="->"),e.start<0&&(e.start=0),e.end<0&&(e.end=0),"<-"==e.dir){const{start:t,end:n}=e;e.start=n,e.end=t}let d=0;v(t,t=>{if(t.nodeType!==Node.TEXT_NODE)return;const n=(t.nodeValue||"").length;if(d+n>e.start&&(o||(o=t,s=e.start-d),d+n>e.end))return r=t,i=e.end-d,"stop";d+=n}),o||(o=t,s=t.childNodes.length),r||(r=t,i=t.childNodes.length),"<-"==e.dir&&([o,s,r,i]=[r,i,o,s]),n.setBaseAndExtent(o,s,r,i)}function E(){const e=K().getRangeAt(0),n=s.createRange();return n.selectNodeContents(t),n.setEnd(e.startContainer,e.startOffset),n.toString()}function k(){const e=K().getRangeAt(0),n=s.createRange();return n.selectNodeContents(t),n.setStart(e.endContainer,e.endOffset),n.toString()}function C(t){if(u&&"Enter"===t.key)if(L(t),t.stopPropagation(),""==k()){M("\n ");const t=b();t.start=--t.end,T(t)}else M("\n")}function m(){if(!f)return;const e=t.innerHTML,n=b(),o=a[c];if(o&&o.html===e&&o.pos.start===n.start&&o.pos.end===n.end)return;a[++c]={html:e,pos:n},a.splice(c+1);c>300&&(c=300,a.splice(0,1))}function v(t,e){const n=[];t.firstChild&&n.push(t.firstChild);let o=n.pop();for(;o&&"stop"!==e(o);)o.nextSibling&&n.push(o.nextSibling),o.firstChild&&n.push(o.firstChild),o=n.pop()}function w(t){return t.metaKey||t.ctrlKey}function O(t){return w(t)&&!t.shiftKey&&"KeyZ"===t.code}function x(t){return w(t)&&t.shiftKey&&"KeyZ"===t.code}function M(t){t=t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),s.execCommand("insertHTML",!1,t)}function S(t,e){let n=0;return(...o)=>{clearTimeout(n),n=r.setTimeout(()=>t(...o),e)}}function A(t){let e=t.length-1;for(;e>=0&&"\n"!==t[e];)e--;let n=++e;for(;n{e.defaultPrevented||(d=D(),o.preserveIdent?function(t){if("Enter"===t.key){const e=E(),n=k();let[r]=A(e),s=r;if(o.indentOn.test(e)&&(s+=o.tab),s.length>0?(L(t),t.stopPropagation(),M("\n"+s)):C(t),s!==r&&"}"===n[0]){const t=b();M("\n"+r),T(t)}}}(e):C(e),o.catchTab&&function(t){if("Tab"===t.key)if(L(t),t.shiftKey){const t=E();let[e,n]=A(t);if(e.length>0){const t=b(),r=Math.min(o.tab.length,e.length);T({start:n,end:n+r}),s.execCommand("delete"),t.start-=r,t.end-=r,T(t)}}else M(o.tab)}(e),o.addClosing&&function(t){const e="([{'\"",n=")]}'\"",o=k(),r=E(),s="\\"===r.substr(r.length-1),i=o.substr(0,1);if(n.includes(t.key)&&!s&&i===t.key){const e=b();L(t),e.start=++e.end,T(e)}else if(e.includes(t.key)&&!s&&("\"'".includes(t.key)||[""," ","\n"].includes(i))){L(t);const o=b(),r=o.start==o.end?"":K().toString(),s=t.key+r+n[e.indexOf(t.key)];M(s),o.start++,o.end++,T(o)}}(e),o.history&&(!function(e){if(O(e)){L(e);const n=a[--c];n&&(t.innerHTML=n.html,T(n.pos)),c<0&&(c=0)}if(x(e)){L(e);const n=a[++c];n&&(t.innerHTML=n.html,T(n.pos)),c>=a.length&&c--}}(e),h(e)&&!g&&(m(),g=!0)),u&&T(b()))}),N("keyup",t=>{t.defaultPrevented||t.isComposing||(d!==D()&&p(),y(t),i&&i(D()))}),N("focus",t=>{f=!0}),N("blur",t=>{f=!1}),N("paste",n=>{m(),function(n){L(n);const o=(n.originalEvent||n).clipboardData.getData("text/plain").replace(/\r/g,""),r=b();M(o),e(t),T({start:r.start+o.length,end:r.start+o.length})}(n),m(),i&&i(D())}),{updateOptions(t){Object.assign(o,t)},updateCode(n){t.textContent=n,e(t)},onUpdate(t){i=t},toString:D,save:b,restore:T,recordHistory:m,destroy(){for(let[e,n]of l)t.removeEventListener(e,n)}}} \ No newline at end of file +const globalWindow=window;function CodeJar(y,n,e={}){const v=Object.assign({tab:"\t",indentOn:/[({\[]$/,moveToNewLine:/^[)}\]]/,spellcheck:!1,catchTab:!0,preserveIdent:!0,addClosing:!0,history:!0,window:globalWindow},e),o=v.window,N=o.document;let r=[],T=[],b=-1,s=!1,i,E,m=(y.setAttribute("contenteditable","plaintext-only"),y.setAttribute("spellcheck",v.spellcheck?"true":"false"),y.style.outline="none",y.style.overflowWrap="break-word",y.style.overflowY="auto",!(y.style.whiteSpace="pre-wrap"));n(y),(m="plaintext-only"!==y.contentEditable?!0:m)&&y.setAttribute("contenteditable","true");const t=c(()=>{var e=w();n(y,e),O(e)},30);let k=!1;const C=e=>!D(e)&&!S(e)&&"Meta"!==e.key&&"Control"!==e.key&&"Alt"!==e.key&&!e.key.startsWith("Arrow"),a=c(e=>{C(e)&&(A(),k=!1)},300);e=(e,t)=>{r.push([e,t]),y.addEventListener(e,t)};function w(){var e=P();const t={start:0,end:0,dir:void 0};let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:s}=e;if(n&&o)return n.nodeType===Node.ELEMENT_NODE&&(e=N.createTextNode(""),n.insertBefore(e,n.childNodes[r]),n=e,r=0),o.nodeType===Node.ELEMENT_NODE&&(e=N.createTextNode(""),o.insertBefore(e,o.childNodes[s]),o=e,s=0),l(y,e=>{if(e===n&&e===o)return t.start+=r,t.end+=s,t.dir=r<=s?"->":"<-","stop";if(e===n){if(t.start+=r,t.dir)return"stop";t.dir="->"}else if(e===o){if(t.end+=s,t.dir)return"stop";t.dir="<-"}e.nodeType===Node.TEXT_NODE&&("->"!=t.dir&&(t.start+=e.nodeValue.length),"<-"!=t.dir&&(t.end+=e.nodeValue.length))}),y.normalize(),t;throw"error1"}function O(n){const e=P();let r,o=0,s,i=0;var t,a;n.dir||(n.dir="->"),n.start<0&&(n.start=0),n.end<0&&(n.end=0),"<-"==n.dir&&({start:t,end:a}=n,n.start=a,n.end=t);let d=0;l(y,e=>{var t;if(e.nodeType===Node.TEXT_NODE)return t=(e.nodeValue||"").length,d+t>n.start&&(r||(r=e,o=n.start-d),d+t>n.end)?(s=e,i=n.end-d,"stop"):void(d+=t)}),r||(r=y,o=y.childNodes.length),s||(s=y,i=y.childNodes.length),"<-"==n.dir&&([r,o,s,i]=[s,i,r,o]),e.setBaseAndExtent(r,o,s,i)}function x(){const e=P();var t=e.getRangeAt(0);const n=N.createRange();return n.selectNodeContents(y),n.setEnd(t.startContainer,t.startOffset),n.toString()}function M(){const e=P();var t=e.getRangeAt(0);const n=N.createRange();return n.selectNodeContents(y),n.setStart(t.endContainer,t.endOffset),n.toString()}function L(e){if(m&&"Enter"===e.key)if(R(e),e.stopPropagation(),""==M()){K("\n ");const t=w();t.start=--t.end,O(t)}else K("\n")}function A(){var e,t,n;s&&(e=y.innerHTML,t=w(),(n=T[b])&&n.html===e&&n.pos.start===t.start&&n.pos.end===t.end||(b++,T[b]={html:e,pos:t},T.splice(b+1),300/g,">").replace(/"/g,""").replace(/'/g,"'"),N.execCommand("insertHTML",!1,e)}function c(t,n){let r=0;return(...e)=>{clearTimeout(r),r=o.setTimeout(()=>t(...e),n)}}function _(e){let t=e.length-1;for(;0<=t&&"\n"!==e[t];)t--;let n=++t;for(;n{if(!e.defaultPrevented){if(E=H(),v.preserveIdent){var t=e;if("Enter"===t.key){var n=x(),r=M(),[o]=_(n);let e=o;v.indentOn.test(n)&&(e+=v.tab),0=T.length&&b--),C(e)&&!k&&(A(),k=!0)),m&&O(w())}}),e("keyup",e=>{e.defaultPrevented||e.isComposing||(E!==H()&&t(),a(e),i&&i(H()))}),e("focus",e=>{s=!0}),e("blur",e=>{s=!1}),e("paste",e=>{var t;A(),R(e=e),e=(e.originalEvent||e).clipboardData.getData("text/plain").replace(/\r/g,""),t=w(),K(e),n(y),O({start:Math.min(t.start,t.end)+e.length,end:Math.min(t.start,t.end)+e.length,dir:"<-"}),A(),i&&i(H())}),{updateOptions(e){Object.assign(v,e)},updateCode(e){y.textContent=e,n(y)},onUpdate(e){i=e},toString:H,save:w,restore:O,recordHistory:A,destroy(){for(var[e,t]of r)y.removeEventListener(e,t)}}} \ No newline at end of file diff --git a/interface/js/lib/prism.js b/interface/js/lib/prism.js index fc485e38e..a96335004 100644 --- a/interface/js/lib/prism.js +++ b/interface/js/lib/prism.js @@ -1,5 +1,5 @@ -/* PrismJS 1.23.0 +/* PrismJS 1.28.0 https://prismjs.com/download.html#themes=prism-okaidia&languages=clike&plugins=show-invisibles */ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); -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|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; -!function(){if("undefined"!=typeof Prism){var i={tab:/\t/,crlf:/\r\n/,lf:/\n/,cr:/\r/,space:/ /};Prism.hooks.add("before-highlight",function(r){s(r.grammar)})}function f(r,e){var i=r[e];switch(Prism.util.type(i)){case"RegExp":var a={};r[e]={pattern:i,inside:a},s(a);break;case"Array":for(var n=0,t=i.length;n=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +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:/[{}[\];(),.:]/}; +!function(){if("undefined"!=typeof Prism){var r={tab:/\t/,crlf:/\r\n/,lf:/\n/,cr:/\r/,space:/ /};Prism.hooks.add("before-highlight",(function(r){i(r.grammar)}))}function e(r,a){var n=r[a];switch(Prism.util.type(n)){case"RegExp":var t={};r[a]={pattern:n,inside:t},i(t);break;case"Array":for(var f=0,s=n.length;f