diff --git a/CHANGELOG.md b/CHANGELOG.md index 059da9c..f03f14f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Docs0 Changelog +## 1.0.5 (2024-04-20) +- Add Prism for syntax highlighting + ## 1.0.4 (2024-03-26) - Remove unlisted pages from search index - Make file modified date action manually only diff --git a/_layouts/default.html b/_layouts/default.html index 3e6f422..e2e5bd2 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -27,8 +27,9 @@ - + + \ No newline at end of file diff --git a/_myassets/scripts/my.js b/_myassets/scripts/my.js new file mode 100644 index 0000000..32dc269 --- /dev/null +++ b/_myassets/scripts/my.js @@ -0,0 +1,32 @@ +// Prism DAX language definition +const daxFunctions = 'INFO.GENERALSEGMENTMAPSEGMENTMETADATASTORAGES INFO.ATTRIBUTEHIERARCHYSTORAGES INFO.DELTATABLEMETADATASTORAGES INFO.STORAGETABLECOLUMNSEGMENTS INFO.RELATIONSHIPINDEXSTORAGES INFO.COLUMNPARTITIONSTORAGES INFO.DATACOVERAGEDEFINITIONS INFO.FORMATSTRINGDEFINITIONS SAMPLECARTESIANPOINTSBYCOVER INFO.ALTERNATEOFDEFINITIONS INFO.PERSPECTIVEHIERARCHIES SELECTEDMEASUREFORMATSTRING INFO.DETAILROWSDEFINITIONS INFO.ATTRIBUTEHIERARCHIES INFO.RELATEDCOLUMNDETAILS INFO.RELATIONSHIPSTORAGES SAMPLEAXISWITHLOCALMINMAX APPROXIMATEDISTINCTCOUNT INFO.PARQUETFILESTORAGES INFO.PERSPECTIVEMEASURES INFO.STORAGETABLECOLUMNS INFO.DICTIONARYSTORAGES INFO.EXTENDEDPROPERTIES INFO.LINGUISTICMETADATA INFO.OBJECTTRANSLATIONS INFO.PERSPECTIVECOLUMNS INFO.SEGMENTMAPSTORAGES INFO.CALCULATIONGROUPS INFO.CHANGEDPROPERTIES INFO.COLUMNPERMISSIONS INFO.EXCLUDEDARTIFACTS INFO.HIERARCHYSTORAGES INFO.PARTITIONSTORAGES INFO.PERSPECTIVETABLES CLOSINGBALANCEQUARTER INFO.CALCULATIONITEMS INFO.TABLEPERMISSIONS OPENINGBALANCEQUARTER DISTINCTCOUNTNOBLANK INFO.REFRESHPOLICIES INFO.ROLEMEMBERSHIPS INFO.SEGMENTSTORAGES NATURALLEFTOUTERJOIN CLOSINGBALANCEMONTH CONTAINSSTRINGEXACT INFO.COLUMNSTORAGES INFO.GROUPBYCOLUMNS INFO.STORAGEFOLDERS OPENINGBALANCEMONTH ROLLUPADDISSUBTOTAL SELECTEDMEASURENAME SUBSTITUTEWITHINDEX CLOSINGBALANCEYEAR FIRSTNONBLANKVALUE INFO.RELATIONSHIPS INFO.STORAGETABLES INFO.TABLESTORAGES OPENINGBALANCEYEAR SAMEPERIODLASTYEAR INFO.PERSPECTIVES INFO.STORAGEFILES ISSELECTEDMEASURE LASTNONBLANKVALUE USERPRINCIPALNAME ALLCROSSFILTERED COLUMNSTATISTICS INFO.ANNOTATIONS INFO.DATASOURCES INFO.EXPRESSIONS INFO.HIERARCHIES INFO.QUERYGROUPS NATURALINNERJOIN ROLLUPISSUBTOTAL SUMMARIZECOLUMNS ADDMISSINGITEMS CONFIDENCE.NORM EXTERNALMEASURE INFO.PARTITIONS INFO.VARIATIONS ISCROSSFILTERED PATHITEMREVERSE PERCENTILEX.EXC PERCENTILEX.INC PREVIOUSQUARTER SELECTEDMEASURE USERELATIONSHIP CALCULATETABLE CONTAINSSTRING EVALUATEANDLOG GENERATESERIES INFO.FUNCTIONS PARALLELPERIOD PERCENTILE.EXC PERCENTILE.INC STARTOFQUARTER ALLNOBLANKROW CHISQ.DIST.RT COMBINEVALUES DATESINPERIOD DISTINCTCOUNT FIRSTNONBLANK INFO.CULTURES INFO.MEASURES MOVINGAVERAGE PREVIOUSMONTH REMOVEFILTERS SELECTCOLUMNS SELECTEDVALUE CALENDARAUTO CHISQ.INV.RT CONCATENATEX CONFIDENCE.T CURRENTGROUP DATESBETWEEN ENDOFQUARTER HASONEFILTER INFO.COLUMNS KEYWORDMATCH LASTNONBLANK PATHCONTAINS POISSON.DIST PREVIOUSYEAR RELATEDTABLE STARTOFMONTH TOPNPERLEVEL USEROBJECTID ALLSELECTED COLLAPSEALL CONCATENATE CONTAINSROW CROSSFILTER GENERATEALL HASONEVALUE INFO.LEVELS INFO.TABLES ISO.CEILING ISONORAFTER KEEPFILTERS LOOKUPVALUE NETWORKDAYS NEXTQUARTER NORM.S.DIST PARTITIONBY PREVIOUSDAY RANDBETWEEN ROLLUPGROUP STARTOFYEAR USERCULTURE ADDCOLUMNS CHISQ.DIST COUNTBLANK COUPDAYSNC CUSTOMDATA DETAILROWS ENDOFMONTH EXPON.DIST INFO.MODEL INFO.ROLES ISFILTERED ISSUBTOTAL NORM.S.INV PATHLENGTH RUNNINGSUM SUBSTITUTE TBILLPRICE TBILLYIELD ALLEXCEPT AMORDEGRC BETA.DIST BITLSHIFT BITRSHIFT CALCULATE CHISQ.INV COUNTROWS COUPDAYBS CROSSJOIN DATATABLE DATEVALUE ENDOFYEAR EXPANDALL FIRSTDATE INFO.KPIS INTERSECT ISATLEVEL ISINSCOPE ISLOGICAL ISNONTEXT MDURATION NEXTMONTH NONVISUAL NORM.DIST ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD PDURATION PRICEDISC ROUNDDOWN ROWNUMBER SUMMARIZE T.DIST.2T T.DIST.RT TIMEVALUE YIELDDISC ACCRINTM AMORLINC AVERAGEA AVERAGEX BETA.INV CALENDAR COALESCE COLLAPSE CONTAINS COUPDAYS CUMPRINC CURRENCY DATEDIFF DATESMTD DATESQTD DATESYTD DISTINCT DOLLARDE DOLLARFR DURATION EARLIEST GENERATE GEOMEANX IF.EAGER ISNUMBER LASTDATE NEXTYEAR NORM.INV PATHITEM PREVIOUS PRICEMAT PRODUCTX QUOTIENT RECEIVED STDEVX.P STDEVX.S T.INV.2T TOPNSKIP TOTALMTD TOTALQTD TOTALYTD USERNAME UTCTODAY YEARFRAC YIELDMAT ACCRINT AVERAGE CEILING COMBINA CONVERT COUNTAX COUPNCD COUPNUM COUPPCD CUMIPMT DATEADD DEGREES EARLIER EOMONTH FILTERS GEOMEAN GROUPBY IFERROR INTRATE ISAFTER ISBLANK ISEMPTY ISERROR LINESTX MATCHBY MEDIANX NEXTDAY NOMINAL ORDERBY PRODUCT QUARTER RADIANS RANK.EQ RELATED REPLACE ROUNDUP STDEV.P STDEV.S TBILLEQ TREATAS UNICHAR UNICODE WEEKDAY WEEKNUM BITAND BITXOR COMBIN COUNTA COUNTX DIVIDE EFFECT EXCEPT EXPAND FILTER FORMAT IGNORE ISEVEN ISTEXT LINEST LOOKUP MEDIAN MINUTE MROUND NAMEOF OFFSET PERMUT ROLLUP SAMPLE SEARCH SECOND SQRTPI SWITCH T.DIST TOJSON UTCNOW VALUES VARX.P VARX.S WINDOW ACOSH ACOTH ASINH ATANH BITOR BLANK COUNT EDATE ERROR EXACT FALSE FIRST FIXED FLOOR INDEX ISODD ISPMT LOG10 LOWER MONTH POWER PRICE RANGE RANKX RIGHT ROUND T.INV TOCSV TODAY TRUNC UNION UPPER VALUE VAR.P VAR.S YIELD ACOS ACOT ASIN ATAN COSH COTH DATE DISC EVEN FACT FIND HASH HOUR IPMT LAST LEFT MAXA MAXX MINA MINX NEXT NPER PATH PPMT RAND RANK RATE REPT SIGN SINH SQRT SUMX TANH TIME TOPN TRIM TRUE XIRR XNPV YEAR ABS ALL AND COS COT DAY DDB EXP GCD INT LCM LEN LOG MAX MID MIN MOD NOT NOW ODD PMT ROW RRI SIN SLN SUM SYD TAN VDB DB FV IF LN OR PI PV'; + +Prism.languages.dax = { + 'function': { + pattern: new RegExp(daxFunctions.replace(/ /g, '|').replace(/\./g, '\.'), 'gm'), + lookbehind: true, + greedy: true + }, + 'measure': { //measures + pattern: /\[[ \w\xA0-\uFFFF]+\]/gm, + lookbehind: true, + greedy: true + }, + 'keyword': { + pattern: /\b(?:AXIS|ROWS|COLUMN|DEFINE|DENSIFY|EVALUATE|GROUP|MEASURE|MPARAMETER|ORDER BY|RETURN|START AT|TABLE|TOTAL|VAR|WITH VISUAL SHAPE)\b/gm, + //lookbehind: true, + greedy: true + }, + 'string': { + pattern: /"(?:[^"]|"")*"(?!")/gm, + lookbehind: true, + greedy: true + }, + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/gm, + greedy: true + }, + 'operator': /:=|[-+*\/=^]|\b(?:IN|NOT)\b/i, + 'number': /\b\d+\.?\d*|\B\.\d+\b/i, + 'punctuation': /[\[\](){}`,.]/gm, +}; \ No newline at end of file diff --git a/assets/_sass/_markdown.scss b/assets/_sass/_markdown.scss index ca9b2fb..cbc1f65 100644 --- a/assets/_sass/_markdown.scss +++ b/assets/_sass/_markdown.scss @@ -350,7 +350,8 @@ word-break: normal; white-space: pre; background: transparent; - border: 0 + border: 0; + } pre { @@ -359,7 +360,7 @@ font-size: 85%; line-height: 1.45; background-color: var(--window-alt-back-color); - border-radius: 3px + border-radius: 3px; } pre code, diff --git a/assets/_sass/_page.scss b/assets/_sass/_page.scss index f1afd22..471494c 100644 --- a/assets/_sass/_page.scss +++ b/assets/_sass/_page.scss @@ -100,6 +100,12 @@ width: 100%; } + &:has(.toc) { + .markdown-body pre { + max-width: 690px; + } + } + footer { margin: 60px 0 0 0; color: var(--notice-color); @@ -127,8 +133,8 @@ @include icon-info; &:before { - font-size: 1.7em; - margin: 0px 8px 0 0; + font-size: 1.5em; + margin: 0px 5px 0 0; display: block; float: left; } diff --git a/assets/_sass/_prism.scss b/assets/_sass/_prism.scss new file mode 100644 index 0000000..5ac5a39 --- /dev/null +++ b/assets/_sass/_prism.scss @@ -0,0 +1,180 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+clike+javascript+bash+json+sql+typescript+xml-doc&plugins=line-numbers */ + code[class*="language-"], + pre[class*="language-"] { + color: var(--code-color); + background: none; + //text-shadow: 0 1px var(--back-color); + 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-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, + code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: var(--code-selection-color); + } + + pre[class*="language-"]::selection, pre[class*="language-"] ::selection, + code[class*="language-"]::selection, code[class*="language-"] ::selection { + text-shadow: none; + background: var(--code-selection-color); + } + + @media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } + } + + /* Code blocks */ + pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; + } + + :not(pre) > code[class*="language-"], + pre[class*="language-"] { + background: var(--code-back-color); + } + + /* Inline code */ + :not(pre) > code[class*="language-"] { + padding: .1em .3em; + border-radius: .3em; + white-space: normal; + } + + .token.comment, + .token.prolog, + .token.doctype, + .token.cdata { + color: var(--code-comment-color); //slategray; + } + + .token.punctuation { + color: var(--code-parenthesis-color); // #999; + } + + .token.namespace { + opacity: .7; + } + + .token.property { + color: var(--code-property-color); // #905; + } + + .token.tag, + .token.boolean, + .token.number, + .token.constant, + .token.symbol, + .token.deleted { + color: var(--code-number-color); //#905; + } + + .token.selector, + .token.attr-name, + .token.string, + .token.char, + .token.builtin, + .token.inserted { + color: var(--code-string-color); // #690; + } + + .token.operator, + .token.entity, + .token.url, + .language-css .token.string, + .style .token.string { + color: var(--code-operator-color); //#9a6e3a; + /* This background color was intended by the author of this theme. */ + //background: hsla(0, 0%, 100%, .5); + } + + .token.atrule, + .token.attr-value, + .token.keyword { + color: var(--code-keyword-color); // #07a; + } + + .token.function, + .token.class-name { + color: var(--code-function-color); // #DD4A68; + } + + .token.regex, + .token.important, + .token.variable { + color: #e90; + } + + .token.important, + .token.bold { + font-weight: bold; + } + .token.italic { + font-style: italic; + } + + .token.entity { + cursor: help; + } + + pre[class*="language-"].line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; + } + + pre[class*="language-"].line-numbers > code { + position: relative; + white-space: inherit; + } + + .line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + border-right: 1px solid var(--code-line-number-color); // #999; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + } + + .line-numbers-rows > span { + display: block; + counter-increment: linenumber; + } + + .line-numbers-rows > span:before { + content: counter(linenumber); + color: var(--code-line-number-color); // #999; + display: block; + padding-right: 0.8em; + text-align: right; + } \ No newline at end of file diff --git a/assets/_sass/_theme.scss b/assets/_sass/_theme.scss index 10932a1..e85d3fb 100644 --- a/assets/_sass/_theme.scss +++ b/assets/_sass/_theme.scss @@ -106,15 +106,27 @@ --img-back-color: var(--back-color); // Code Editor - --code-back-color: #f6f8fa; + --code-back-color: #f5f2f0; //#f6f8fa; --code-color: #333; --code-line-number-color: #999; - --code-selection-color: #A2D7FF; + --code-selection-color: #b3d4fc; //#A2D7FF; --code-inactive-selection-color: #E4EBF2; --code-fold-marker-color: #999; --code-matching-brackets-back-color: #E7EFE6; --code-matching-brackets-border-color: #999; + // Code Syntax + --code-property-color: #0551A5; + --code-comment-color: #39A03B; + --code-string-color: #D93124; + --code-column-color: #333; + --code-function-color: #035ACA; + --code-keyword-color: #035ACA; + --code-measure-color: #333; + --code-operator-color: #333; + --code-number-color: #EE7F18; + --code-parenthesis-color: #808080; + // Nav --nav-back-color: #f6f8fa; --nav-sel-color: var(--link-color); @@ -241,6 +253,18 @@ --code-matching-brackets-back-color: #444; --code-matching-brackets-border-color: #e1e1e1; + // Code Syntax + --code-property-color: #9DDCFE; + --code-comment-color: #86C573; + --code-string-color: #E44; + --code-column-color: #fff; + --code-function-color: #0095ff; + --code-keyword-color: #0095ff; + --code-measure-color: #fff; + --code-operator-color: #fff; + --code-number-color: #EE7F18; + --code-parenthesis-color: #636363; + // Nav --nav-back-color: #262626; --nav-sel-color: var(--link-color); diff --git a/assets/css/style.scss b/assets/css/style.scss index c89325a..03dc705 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -18,4 +18,5 @@ @import "error"; @import "search"; @import "markdown"; +@import "prism"; @import "../../_myassets/_sass/style"; // User style \ No newline at end of file diff --git a/assets/scripts/prism.js b/assets/scripts/prism.js new file mode 100644 index 0000000..3430546 --- /dev/null +++ b/assets/scripts/prism.js @@ -0,0 +1,12 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+clike+javascript+bash+json+sql+typescript+xml-doc&plugins=line-numbers */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=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.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\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://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]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +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$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),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*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),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)","javascript")),Prism.languages.js=Prism.languages.javascript; +!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",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,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:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.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}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); +!function(a){function e(e,n){a.languages[e]&&a.languages.insertBefore(e,"comment",{"doc-comment":n})}var n=a.languages.markup.tag,t={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:n}},g={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:n}};e("csharp",t),e("fsharp",t),e("vbnet",g)}(Prism); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);ts&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r