Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed comments from wrapper.min

  • Loading branch information...
commit 7828968839580cff514b4b9c8c2fb83cb786c26a 1 parent 88aa672
@mnewt authored
Showing with 1 addition and 56 deletions.
  1. +1 −56 wrapper.min.js
View
57 wrapper.min.js
@@ -1,56 +1 @@
-// Copyright (C) 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-/**
- * @fileoverview
- * some functions for browser-side pretty printing of code contained in html.
- *
- * <p>
- * For a fairly comprehensive set of languages see the
- * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
- * file that came with this source. At a minimum, the lexer should work on a
- * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
- * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
- * and a subset of Perl, but, because of commenting conventions, doesn't work on
- * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
- * <p>
- * Usage: <ol>
- * <li> include this source file in an html page via
- * {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
- * <li> define style rules. See the example page for examples.
- * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
- * {@code class=prettyprint.}
- * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
- * printer needs to do more substantial DOM manipulations to support that, so
- * some css styles may not be preserved.
- * </ol>
- * That's it. I wanted to keep the API as simple as possible, so there's no
- * need to specify which language the code is in, but if you wish, you can add
- * another class to the {@code <pre>} or {@code <code>} element to specify the
- * language, as in {@code <pre class="prettyprint lang-java">}. Any class that
- * starts with "lang-" followed by a file extension, specifies the file type.
- * See the "lang-*.js" files in this directory for code that implements
- * per-language file handlers.
- * <p>
- * Change log:<br>
- * cbeust, 2006/08/22
- * <blockquote>
- * Java annotations (start with "@") are now captured as literals ("lit")
- * </blockquote>
- * @requires console
- */// JSLint declarations
-/*global console, document, navigator, setTimeout, window *//**
- * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
- * UI events.
- * If set to {@code false}, {@code prettyPrint()} is synchronous.
- */function hasClass(e,t){return(new RegExp("(\\s|^)"+t+"(\\s|$)")).test(e.className)}function addClass(e,t){hasClass(e,t)||(e.className+=(e.className?" ":"")+t)}function styleCode(){if(typeof disableStyleCode!="undefined")return;var e=document.body.getElementsByTagName("pre"),t=document.body.getElementsByTagName("code");if(e.length||t.length){for(var n=0;n<e.length;++n)addClass(e[n],"prettyprint");for(var n=0;n<t.length;++n)addClass(t[n],"prettyprint");prettyPrint()}}window.PR_SHOULD_USE_CONTINUATION=!0,function(){function L(e){function a(e){var t=e.charCodeAt(0);if(t!==92)return t;var n=e.charAt(1);return t=u[n],t?t:"0"<=n&&n<="7"?parseInt(e.substring(1),8):n==="u"||n==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);if(t==="\\"||t==="-"||t==="["||t==="]")t="\\"+t;return t}function l(e){var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r=[],i=t[0]==="^";for(var s=i?1:0,o=t.length;s<o;++s){var u=t[s];if(/\\[bdsw]/i.test(u))n.push(u);else{var l=a(u),c;s+2<o&&"-"===t[s+1]?(c=a(t[s+2]),s+=2):c=l,r.push([l,c]),c<65||l>122||(c<65||l>90||r.push([Math.max(65,l)|32,Math.min(c,90)|32]),c<97||l>122||r.push([Math.max(97,l)&-33,Math.min(c,122)&-33]))}}r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});var h=[],p=[NaN,NaN];for(var s=0;s<r.length;++s){var d=r[s];d[0]<=p[1]+1?p[1]=Math.max(p[1],d[1]):h.push(p=d)}var v=["["];i&&v.push("^"),v.push.apply(v,n);for(var s=0;s<h.length;++s){var d=h[s];v.push(f(d[0])),d[1]>d[0]&&(d[1]+1>d[0]&&v.push("-"),v.push(f(d[1])))}return v.push("]"),v.join("")}function c(e){var r=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,s=[];for(var o=0,u=0;o<i;++o){var a=r[o];if(a==="(")++u;else if("\\"===a.charAt(0)){var f=+a.substring(1);f&&f<=u&&(s[f]=-1)}}for(var o=1;o<s.length;++o)-1===s[o]&&(s[o]=++t);for(var o=0,u=0;o<i;++o){var a=r[o];if(a==="(")++u,s[u]===undefined&&(r[o]="(?:");else if("\\"===a.charAt(0)){var f=+a.substring(1);f&&f<=u&&(r[o]="\\"+s[u])}}for(var o=0,u=0;o<i;++o)"^"===r[o]&&"^"!==r[o+1]&&(r[o]="");if(e.ignoreCase&&n)for(var o=0;o<i;++o){var a=r[o],c=a.charAt(0);a.length>=2&&c==="["?r[o]=l(a):c!=="\\"&&(r[o]=a.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(t&-33,t|32)+"]"}))}return r.join("")}var t=0,n=!1,r=!1;for(var i=0,s=e.length;i<s;++i){var o=e[i];if(o.ignoreCase)r=!0;else if(/[a-z]/i.test(o.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var u={b:8,t:9,n:10,v:11,f:12,r:13},h=[];for(var i=0,s=e.length;i<s;++i){var o=e[i];if(o.global||o.multiline)throw new Error(""+o);h.push("(?:"+c(o)+")")}return new RegExp(h.join("|"),r?"gi":"g")}function A(e){function a(e){switch(e.nodeType){case 1:if(t.test(e.className))return;for(var o=e.firstChild;o;o=o.nextSibling)a(o);var f=e.nodeName;if("BR"===f||"LI"===f)n[s]="\n",i[s<<1]=r++,i[s++<<1|1]=e;break;case 3:case 4:var l=e.nodeValue;l.length&&(u?l=l.replace(/\r\n?/g,"\n"):l=l.replace(/[ \t\r\n]+/g," "),n[s]=l,i[s<<1]=r,r+=l.length,i[s++<<1|1]=e)}}var t=/(?:^|\s)nocode(?:\s|$)/,n=[],r=0,i=[],s=0,o;e.currentStyle?o=e.currentStyle.whiteSpace:window.getComputedStyle&&(o=document.defaultView.getComputedStyle(e,null).getPropertyValue("white-space"));var u=o&&"pre"===o.substring(0,3);return a(e),{sourceCode:n.join("").replace(/\n$/,""),spans:i}}function O(e,t,n,r){if(!t)return;var i={sourceCode:t,basePos:e};n(i),r.push.apply(r,i.decorations)}function _(e){var t=undefined;for(var n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=r===1?t?e:n:r===3?M.test(n.nodeValue)?e:t:t}return t===e?undefined:t}function D(e,t){var n={},r;(function(){var i=e.concat(t),s=[],o={};for(var u=0,a=i.length;u<a;++u){var f=i[u],l=f[3];if(l)for(var c=l.length;--c>=0;)n[l.charAt(c)]=f;var h=f[1],p=""+h;o.hasOwnProperty(p)||(s.push(h),o[p]=null)}s.push(/[\0-\uffff]/),r=L(s)})();var i=t.length,s=function(e){var o=e.sourceCode,u=e.basePos,a=[u,w],f=0,l=o.match(r)||[],c={};for(var h=0,p=l.length;h<p;++h){var d=l[h],v=c[d],m=void 0,g;if(typeof v=="string")g=!1;else{var y=n[d.charAt(0)];if(y)m=d.match(y[1]),v=y[0];else{for(var b=0;b<i;++b){y=t[b],m=d.match(y[1]);if(m){v=y[0];break}}m||(v=w)}g=v.length>=5&&"lang-"===v.substring(0,5),g&&(!m||typeof m[1]!="string")&&(g=!1,v=x),g||(c[d]=v)}var E=f;f+=d.length;if(!g)a.push(u+E,v);else{var S=m[1],T=d.indexOf(S),N=T+S.length;m[2]&&(N=d.length-m[2].length,T=N-S.length);var C=v.substring(5);O(u+E,d.substring(0,T),s,a),O(u+E+T,S,q(C,S),a),O(u+E+N,d.substring(N),s,a)}}e.decorations=a};return s}function P(e){var t=[],n=[];e.tripleQuotedStrings?t.push([d,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([d,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([d,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([d,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push([m,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([d,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])):t.push([m,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([m,/^\/\/[^\r\n]*/,null]),n.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));if(e.regexLiterals){var i="/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";n.push(["lang-regex",new RegExp("^"+k+"("+i+")")])}var s=e.types;s&&n.push([g,s]);var o=(""+e.keywords).replace(/^ | $/g,"");return o.length&&n.push([v,new RegExp("^(?:"+o.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([w,/^\s+/,null," \r\n  "]),n.push([y,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[b,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]),D(t,n)}function B(e,t){function f(e){switch(e.nodeType){case 1:if(n.test(e.className))break;if("BR"===e.nodeName)l(e),e.parentNode&&e.parentNode.removeChild(e);else for(var t=e.firstChild;t;t=t.nextSibling)f(t);break;case 3:case 4:if(o){var s=e.nodeValue,u=s.match(r);if(u){var a=s.substring(0,u.index);e.nodeValue=a;var c=s.substring(u.index+u[0].length);if(c){var h=e.parentNode;h.insertBefore(i.createTextNode(c),e.nextSibling)}l(e),a||e.parentNode.removeChild(e)}}}}function l(e){function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var s=t(i,1),o=e.nextSibling;s.appendChild(r);for(var u=o;u;u=o)o=u.nextSibling,s.appendChild(u)}return r}while(!e.nextSibling){e=e.parentNode;if(!e)return}var n=t(e.nextSibling,0);for(var r;(r=n.parentNode)&&r.nodeType===1;)n=r;a.push(n)}var n=/(?:^|\s)nocode(?:\s|$)/,r=/\r\n?|\n/,i=e.ownerDocument,s;e.currentStyle?s=e.currentStyle.whiteSpace:window.getComputedStyle&&(s=i.defaultView.getComputedStyle(e,null).getPropertyValue("white-space"));var o=s&&"pre"===s.substring(0,3),u=i.createElement("LI");while(e.firstChild)u.appendChild(e.firstChild);var a=[u];for(var c=0;c<a.length;++c)f(a[c]);t===(t|0)&&a[0].setAttribute("value",t);var h=i.createElement("OL");h.className="linenums";var p=Math.max(0,t-1|0)||0;for(var c=0,d=a.length;c<d;++c)u=a[c],u.className="L"+(c+p)%10,u.firstChild||u.appendChild(i.createTextNode(" ")),h.appendChild(u);e.appendChild(h)}function j(e){var t=/\bMSIE\b/.test(navigator.userAgent),n=/\n/g,r=e.sourceCode,i=r.length,s=0,o=e.spans,u=o.length,a=0,f=e.decorations,l=f.length,c=0;f[l]=i;var h,p;for(p=h=0;p<l;)f[p]!==f[p+2]?(f[h++]=f[p++],f[h++]=f[p++]):p+=2;l=h;for(p=h=0;p<l;){var d=f[p],v=f[p+1],m=p+2;while(m+2<=l&&f[m+1]===v)m+=2;f[h++]=d,f[h++]=v,p=m}l=f.length=h;var g=null;while(a<u){var y=o[a],b=o[a+2]||i,w=f[c],E=f[c+2]||i,m=Math.min(b,E),S=o[a+1],x;if(S.nodeType!==1&&(x=r.substring(s,m))){t&&(x=x.replace(n,"\r")),S.nodeValue=x;var T=S.ownerDocument,N=T.createElement("SPAN");N.className=f[c+1];var C=S.parentNode;C.replaceChild(N,S),N.appendChild(S),s<b&&(o[a+1]=S=T.createTextNode(r.substring(m,b)),C.insertBefore(S,N.nextSibling))}s=m,s>=b&&(a+=2),s>=E&&(c+=2)}}function I(e,t){for(var n=t.length;--n>=0;){var r=t[n];F.hasOwnProperty(r)?window.console&&console.warn("cannot override language handler %s",r):F[r]=e}}function q(e,t){if(!e||!F.hasOwnProperty(e))e=/^\s*</.test(t)?"default-markup":"default-code";return F[e]}function R(e){var t=e.langExtension;try{var n=A(e.sourceNode),r=n.sourceCode;e.sourceCode=r,e.spans=n.spans,e.basePos=0,q(t,r)(e),j(e)}catch(i){"console"in window&&console.log(i&&i.stack?i.stack:i)}}function U(e,t,n){var r=document.createElement("PRE");r.innerHTML=e,n&&B(r,n);var i={langExtension:t,numberLines:n,sourceNode:r};return R(i),r.innerHTML}function z(e){function t(e){return document.getElementsByTagName(e)}function h(){var t=window.PR_SHOULD_USE_CONTINUATION?u.now()+250:Infinity;for(;a<r.length&&u.now()<t;a++){var n=r[a],i=n.className;if(i.indexOf("prettyprint")>=0){var s=i.match(l),o;!s&&(o=_(n))&&"CODE"===o.tagName&&(s=o.className.match(l)),s&&(s=s[1]);var c=!1;for(var p=n.parentNode;p;p=p.parentNode)if((p.tagName==="pre"||p.tagName==="code"||p.tagName==="xmp")&&p.className&&p.className.indexOf("prettyprint")>=0){c=!0;break}if(!c){var d=n.className.match(/\blinenums\b(?::(\d+))?/);d=d?d[1]&&d[1].length?+d[1]:!0:!1,d&&B(n,d),f={langExtension:s,sourceNode:n,numberLines:d},R(f)}}}a<r.length?setTimeout(h,250):e&&e()}var n=[t("pre"),t("code"),t("xmp")],r=[];for(var i=0;i<n.length;++i)for(var s=0,o=n[i].length;s<o;++s)r.push(n[i][s]);n=null;var u=Date;u.now||(u={now:function(){return+(new Date)}});var a=0,f,l=/\blang(?:uage)?-([\w.]+)(?!\S)/,c=/\bprettyprint\b/;h()}var e=["break,continue,do,else,for,if,return,while"],t=[e,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[t,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],i=[n,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],s=[i,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",u=[n,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],a="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",f=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],l=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],c=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=[r,s,u,a+f,l,c],p=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,d="str",v="kwd",m="com",g="typ",y="lit",b="pun",w="pln",E="tag",S="dec",x="src",T="atn",N="atv",C="nocode",k="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*",M=/\S/,H=P({keywords:h,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};I(H,["default-code"]),I(D([],[[w,/^[^<?]+/],[S,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[b,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),I(D([[w,/^[\s]+/,null," \r\n"],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[T,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[b,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),I(D([],[[N,/^[\s\S]+/]]),["uq.val"]),I(P({keywords:r,hashComments:!0,cStyleComments:!0,types:p}),["c","cc","cpp","cxx","cyc","m"]),I(P({keywords:"null,true,false"}),["json"]),I(P({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:p}),["cs"]),I(P({keywords:i,cStyleComments:!0}),["java"]),I(P({keywords:c,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),I(P({keywords:f,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),I(P({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),I(P({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),I(P({keywords:u,cStyleComments:!0,regexLiterals:!0}),["js"]),I(P({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),I(D([],[[d,/^[\s\S]+/]]),["regex"]),window.prettyPrintOne=U,window.prettyPrint=z,window.PR={createSimpleLexer:D,registerLangHandler:I,sourceDecorator:P,PR_ATTRIB_NAME:T,PR_ATTRIB_VALUE:N,PR_COMMENT:m,PR_DECLARATION:S,PR_KEYWORD:v,PR_LITERAL:y,PR_NOCODE:C,PR_PLAIN:w,PR_PUNCTUATION:b,PR_SOURCE:x,PR_STRING:d,PR_TAG:E,PR_TYPE:g}}(),window.onload=function(){styleCode()};
+function hasClass(e,t){return(new RegExp("(\\s|^)"+t+"(\\s|$)")).test(e.className)}function addClass(e,t){hasClass(e,t)||(e.className+=(e.className?" ":"")+t)}function styleCode(){if(typeof disableStyleCode!="undefined")return;var e=document.body.getElementsByTagName("pre"),t=document.body.getElementsByTagName("code");if(e.length||t.length){for(var n=0;n<e.length;++n)addClass(e[n],"prettyprint");for(var n=0;n<t.length;++n)addClass(t[n],"prettyprint");prettyPrint()}}window.PR_SHOULD_USE_CONTINUATION=!0,function(){function L(e){function a(e){var t=e.charCodeAt(0);if(t!==92)return t;var n=e.charAt(1);return t=u[n],t?t:"0"<=n&&n<="7"?parseInt(e.substring(1),8):n==="u"||n==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);if(t==="\\"||t==="-"||t==="["||t==="]")t="\\"+t;return t}function l(e){var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r=[],i=t[0]==="^";for(var s=i?1:0,o=t.length;s<o;++s){var u=t[s];if(/\\[bdsw]/i.test(u))n.push(u);else{var l=a(u),c;s+2<o&&"-"===t[s+1]?(c=a(t[s+2]),s+=2):c=l,r.push([l,c]),c<65||l>122||(c<65||l>90||r.push([Math.max(65,l)|32,Math.min(c,90)|32]),c<97||l>122||r.push([Math.max(97,l)&-33,Math.min(c,122)&-33]))}}r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});var h=[],p=[NaN,NaN];for(var s=0;s<r.length;++s){var d=r[s];d[0]<=p[1]+1?p[1]=Math.max(p[1],d[1]):h.push(p=d)}var v=["["];i&&v.push("^"),v.push.apply(v,n);for(var s=0;s<h.length;++s){var d=h[s];v.push(f(d[0])),d[1]>d[0]&&(d[1]+1>d[0]&&v.push("-"),v.push(f(d[1])))}return v.push("]"),v.join("")}function c(e){var r=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,s=[];for(var o=0,u=0;o<i;++o){var a=r[o];if(a==="(")++u;else if("\\"===a.charAt(0)){var f=+a.substring(1);f&&f<=u&&(s[f]=-1)}}for(var o=1;o<s.length;++o)-1===s[o]&&(s[o]=++t);for(var o=0,u=0;o<i;++o){var a=r[o];if(a==="(")++u,s[u]===undefined&&(r[o]="(?:");else if("\\"===a.charAt(0)){var f=+a.substring(1);f&&f<=u&&(r[o]="\\"+s[u])}}for(var o=0,u=0;o<i;++o)"^"===r[o]&&"^"!==r[o+1]&&(r[o]="");if(e.ignoreCase&&n)for(var o=0;o<i;++o){var a=r[o],c=a.charAt(0);a.length>=2&&c==="["?r[o]=l(a):c!=="\\"&&(r[o]=a.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(t&-33,t|32)+"]"}))}return r.join("")}var t=0,n=!1,r=!1;for(var i=0,s=e.length;i<s;++i){var o=e[i];if(o.ignoreCase)r=!0;else if(/[a-z]/i.test(o.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var u={b:8,t:9,n:10,v:11,f:12,r:13},h=[];for(var i=0,s=e.length;i<s;++i){var o=e[i];if(o.global||o.multiline)throw new Error(""+o);h.push("(?:"+c(o)+")")}return new RegExp(h.join("|"),r?"gi":"g")}function A(e){function a(e){switch(e.nodeType){case 1:if(t.test(e.className))return;for(var o=e.firstChild;o;o=o.nextSibling)a(o);var f=e.nodeName;if("BR"===f||"LI"===f)n[s]="\n",i[s<<1]=r++,i[s++<<1|1]=e;break;case 3:case 4:var l=e.nodeValue;l.length&&(u?l=l.replace(/\r\n?/g,"\n"):l=l.replace(/[ \t\r\n]+/g," "),n[s]=l,i[s<<1]=r,r+=l.length,i[s++<<1|1]=e)}}var t=/(?:^|\s)nocode(?:\s|$)/,n=[],r=0,i=[],s=0,o;e.currentStyle?o=e.currentStyle.whiteSpace:window.getComputedStyle&&(o=document.defaultView.getComputedStyle(e,null).getPropertyValue("white-space"));var u=o&&"pre"===o.substring(0,3);return a(e),{sourceCode:n.join("").replace(/\n$/,""),spans:i}}function O(e,t,n,r){if(!t)return;var i={sourceCode:t,basePos:e};n(i),r.push.apply(r,i.decorations)}function _(e){var t=undefined;for(var n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=r===1?t?e:n:r===3?M.test(n.nodeValue)?e:t:t}return t===e?undefined:t}function D(e,t){var n={},r;(function(){var i=e.concat(t),s=[],o={};for(var u=0,a=i.length;u<a;++u){var f=i[u],l=f[3];if(l)for(var c=l.length;--c>=0;)n[l.charAt(c)]=f;var h=f[1],p=""+h;o.hasOwnProperty(p)||(s.push(h),o[p]=null)}s.push(/[\0-\uffff]/),r=L(s)})();var i=t.length,s=function(e){var o=e.sourceCode,u=e.basePos,a=[u,w],f=0,l=o.match(r)||[],c={};for(var h=0,p=l.length;h<p;++h){var d=l[h],v=c[d],m=void 0,g;if(typeof v=="string")g=!1;else{var y=n[d.charAt(0)];if(y)m=d.match(y[1]),v=y[0];else{for(var b=0;b<i;++b){y=t[b],m=d.match(y[1]);if(m){v=y[0];break}}m||(v=w)}g=v.length>=5&&"lang-"===v.substring(0,5),g&&(!m||typeof m[1]!="string")&&(g=!1,v=x),g||(c[d]=v)}var E=f;f+=d.length;if(!g)a.push(u+E,v);else{var S=m[1],T=d.indexOf(S),N=T+S.length;m[2]&&(N=d.length-m[2].length,T=N-S.length);var C=v.substring(5);O(u+E,d.substring(0,T),s,a),O(u+E+T,S,q(C,S),a),O(u+E+N,d.substring(N),s,a)}}e.decorations=a};return s}function P(e){var t=[],n=[];e.tripleQuotedStrings?t.push([d,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([d,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([d,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([d,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push([m,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([d,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])):t.push([m,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([m,/^\/\/[^\r\n]*/,null]),n.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));if(e.regexLiterals){var i="/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";n.push(["lang-regex",new RegExp("^"+k+"("+i+")")])}var s=e.types;s&&n.push([g,s]);var o=(""+e.keywords).replace(/^ | $/g,"");return o.length&&n.push([v,new RegExp("^(?:"+o.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([w,/^\s+/,null," \r\n  "]),n.push([y,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[b,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]),D(t,n)}function B(e,t){function f(e){switch(e.nodeType){case 1:if(n.test(e.className))break;if("BR"===e.nodeName)l(e),e.parentNode&&e.parentNode.removeChild(e);else for(var t=e.firstChild;t;t=t.nextSibling)f(t);break;case 3:case 4:if(o){var s=e.nodeValue,u=s.match(r);if(u){var a=s.substring(0,u.index);e.nodeValue=a;var c=s.substring(u.index+u[0].length);if(c){var h=e.parentNode;h.insertBefore(i.createTextNode(c),e.nextSibling)}l(e),a||e.parentNode.removeChild(e)}}}}function l(e){function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var s=t(i,1),o=e.nextSibling;s.appendChild(r);for(var u=o;u;u=o)o=u.nextSibling,s.appendChild(u)}return r}while(!e.nextSibling){e=e.parentNode;if(!e)return}var n=t(e.nextSibling,0);for(var r;(r=n.parentNode)&&r.nodeType===1;)n=r;a.push(n)}var n=/(?:^|\s)nocode(?:\s|$)/,r=/\r\n?|\n/,i=e.ownerDocument,s;e.currentStyle?s=e.currentStyle.whiteSpace:window.getComputedStyle&&(s=i.defaultView.getComputedStyle(e,null).getPropertyValue("white-space"));var o=s&&"pre"===s.substring(0,3),u=i.createElement("LI");while(e.firstChild)u.appendChild(e.firstChild);var a=[u];for(var c=0;c<a.length;++c)f(a[c]);t===(t|0)&&a[0].setAttribute("value",t);var h=i.createElement("OL");h.className="linenums";var p=Math.max(0,t-1|0)||0;for(var c=0,d=a.length;c<d;++c)u=a[c],u.className="L"+(c+p)%10,u.firstChild||u.appendChild(i.createTextNode(" ")),h.appendChild(u);e.appendChild(h)}function j(e){var t=/\bMSIE\b/.test(navigator.userAgent),n=/\n/g,r=e.sourceCode,i=r.length,s=0,o=e.spans,u=o.length,a=0,f=e.decorations,l=f.length,c=0;f[l]=i;var h,p;for(p=h=0;p<l;)f[p]!==f[p+2]?(f[h++]=f[p++],f[h++]=f[p++]):p+=2;l=h;for(p=h=0;p<l;){var d=f[p],v=f[p+1],m=p+2;while(m+2<=l&&f[m+1]===v)m+=2;f[h++]=d,f[h++]=v,p=m}l=f.length=h;var g=null;while(a<u){var y=o[a],b=o[a+2]||i,w=f[c],E=f[c+2]||i,m=Math.min(b,E),S=o[a+1],x;if(S.nodeType!==1&&(x=r.substring(s,m))){t&&(x=x.replace(n,"\r")),S.nodeValue=x;var T=S.ownerDocument,N=T.createElement("SPAN");N.className=f[c+1];var C=S.parentNode;C.replaceChild(N,S),N.appendChild(S),s<b&&(o[a+1]=S=T.createTextNode(r.substring(m,b)),C.insertBefore(S,N.nextSibling))}s=m,s>=b&&(a+=2),s>=E&&(c+=2)}}function I(e,t){for(var n=t.length;--n>=0;){var r=t[n];F.hasOwnProperty(r)?window.console&&console.warn("cannot override language handler %s",r):F[r]=e}}function q(e,t){if(!e||!F.hasOwnProperty(e))e=/^\s*</.test(t)?"default-markup":"default-code";return F[e]}function R(e){var t=e.langExtension;try{var n=A(e.sourceNode),r=n.sourceCode;e.sourceCode=r,e.spans=n.spans,e.basePos=0,q(t,r)(e),j(e)}catch(i){"console"in window&&console.log(i&&i.stack?i.stack:i)}}function U(e,t,n){var r=document.createElement("PRE");r.innerHTML=e,n&&B(r,n);var i={langExtension:t,numberLines:n,sourceNode:r};return R(i),r.innerHTML}function z(e){function t(e){return document.getElementsByTagName(e)}function h(){var t=window.PR_SHOULD_USE_CONTINUATION?u.now()+250:Infinity;for(;a<r.length&&u.now()<t;a++){var n=r[a],i=n.className;if(i.indexOf("prettyprint")>=0){var s=i.match(l),o;!s&&(o=_(n))&&"CODE"===o.tagName&&(s=o.className.match(l)),s&&(s=s[1]);var c=!1;for(var p=n.parentNode;p;p=p.parentNode)if((p.tagName==="pre"||p.tagName==="code"||p.tagName==="xmp")&&p.className&&p.className.indexOf("prettyprint")>=0){c=!0;break}if(!c){var d=n.className.match(/\blinenums\b(?::(\d+))?/);d=d?d[1]&&d[1].length?+d[1]:!0:!1,d&&B(n,d),f={langExtension:s,sourceNode:n,numberLines:d},R(f)}}}a<r.length?setTimeout(h,250):e&&e()}var n=[t("pre"),t("code"),t("xmp")],r=[];for(var i=0;i<n.length;++i)for(var s=0,o=n[i].length;s<o;++s)r.push(n[i][s]);n=null;var u=Date;u.now||(u={now:function(){return+(new Date)}});var a=0,f,l=/\blang(?:uage)?-([\w.]+)(?!\S)/,c=/\bprettyprint\b/;h()}var e=["break,continue,do,else,for,if,return,while"],t=[e,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[t,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],i=[n,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],s=[i,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",u=[n,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],a="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",f=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],l=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],c=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=[r,s,u,a+f,l,c],p=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,d="str",v="kwd",m="com",g="typ",y="lit",b="pun",w="pln",E="tag",S="dec",x="src",T="atn",N="atv",C="nocode",k="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*",M=/\S/,H=P({keywords:h,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};I(H,["default-code"]),I(D([],[[w,/^[^<?]+/],[S,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[b,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),I(D([[w,/^[\s]+/,null," \r\n"],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[T,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[b,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),I(D([],[[N,/^[\s\S]+/]]),["uq.val"]),I(P({keywords:r,hashComments:!0,cStyleComments:!0,types:p}),["c","cc","cpp","cxx","cyc","m"]),I(P({keywords:"null,true,false"}),["json"]),I(P({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:p}),["cs"]),I(P({keywords:i,cStyleComments:!0}),["java"]),I(P({keywords:c,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),I(P({keywords:f,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),I(P({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),I(P({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),I(P({keywords:u,cStyleComments:!0,regexLiterals:!0}),["js"]),I(P({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),I(D([],[[d,/^[\s\S]+/]]),["regex"]),window.prettyPrintOne=U,window.prettyPrint=z,window.PR={createSimpleLexer:D,registerLangHandler:I,sourceDecorator:P,PR_ATTRIB_NAME:T,PR_ATTRIB_VALUE:N,PR_COMMENT:m,PR_DECLARATION:S,PR_KEYWORD:v,PR_LITERAL:y,PR_NOCODE:C,PR_PLAIN:w,PR_PUNCTUATION:b,PR_SOURCE:x,PR_STRING:d,PR_TAG:E,PR_TYPE:g}}(),window.onload=function(){styleCode()};
Please sign in to comment.
Something went wrong with that request. Please try again.