=x.SCRIPT.id?r.text():x.DISPLAY:"text"===e&&r.size===x.DISPLAY.size?r=x.TEXT:"script"===e?r=x.SCRIPT:"scriptscript"===e&&(r=x.SCRIPTSCRIPT),r},nn=function(e,t){var r,n=rn(e.size,t.style),a=n.fracNum(),i=n.fracDen();r=t.havingStyle(a);var o=wt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-o.depth-(w+.5*m) 0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?sn(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?sn(l.text):null,m=Ut(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Ut(p.body[0],"textord");u=on[Number(d.text)]}}else p=Ut(p,"textord"),u=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:nn,mathmlBuilder:an}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nn,mathmlBuilder:an});var ln=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Ut(e.base,"horizBrace")):n=Ut(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Gt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:ln,mathmlBuilder:function(e,t){var r=Vt(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i0&&(n=F(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=F(e.width,t));var i={height:V(r+n)};a>0&&(i.width=V(a)),n>0&&(i.verticalAlign=V(-n));var o=new j(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=F(e.height,t),a=0;if(e.totalheight.number>0&&(a=F(e.totalheight,t)-n,r.setAttribute("valign",V(-a))),r.setAttribute("height",V(n+a)),e.width.number>0){var i=F(e.width,t);r.setAttribute("width",V(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=Ut(t[0],"size");if(r.settings.strict){var i="m"===n[1],o="mu"===a.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:function(e,t){return Ke.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var r=F(e.dimension,t);return new Tt.SpaceNode(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:function(e,t){var r;"clap"===e.alignment?(r=Ke.makeSpan([],[wt(e.body,t)]),r=Ke.makeSpan(["inner"],[r],t)):r=Ke.makeSpan(["inner"],[wt(e.body,t)]);var n=Ke.makeSpan(["fix"],[]),a=Ke.makeSpan([e.alignment],[r,n],t),i=Ke.makeSpan(["strut"]);return i.style.height=V(a.height+a.depth),a.depth&&(i.style.verticalAlign=V(-a.depth)),a.children.unshift(i),a=Ke.makeSpan(["thinbox"],[a],t),Ke.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var r=e.funcName,n=e.parser,a=n.mode;n.switchMode("math");var i="\\("===r?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var mn=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var r=mn(e,t),n=ft(r,t,!1);return Ke.makeFragment(n)},mathmlBuilder:function(e,t){var r=mn(e,t);return It(r,t)}});var cn=function(e,t,r,n,a,i,o){e=Ke.makeSpan([],[e]);var s,h,m,c=r&&l.isCharacterBox(r);if(t){var u=wt(t,n.havingStyle(a.sup()),n);h={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=wt(r,n.havingStyle(a.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(h&&s){var d=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(s){var f=e.height-o;m=Ke.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;var g=e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var v=[m];if(s&&0!==i&&!c){var b=Ke.makeSpan(["mspace"],[],n);b.style.marginRight=V(i),v.unshift(b)}return Ke.makeSpan(["mop","op-limits"],v,n)},un=["\\smallint"],pn=function(e,t){var r,n,a,i=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=Ut(e.base,"op"),i=!0):a=Ut(e,"op");var o,s=t.style,h=!1;if(s.size===x.DISPLAY.size&&a.symbol&&!l.contains(un,a.name)&&(h=!0),a.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(c=a.name.substr(1),a.name="oiint"===c?"\\iint":"\\iiint"),o=Ke.makeSymbol(a.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),c.length>0){var u=o.italic,p=Ke.staticSvg(c+"Size"+(h?"2":"1"),t);o=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:p,shift:h?.08:0}]},t),a.name="\\"+c,o.classes.unshift("mop"),o.italic=u}}else if(a.body){var d=ft(a.body,t,!0);1===d.length&&d[0]instanceof Z?(o=d[0]).classes[0]="mop":o=Ke.makeSpan(["mop"],d,t)}else{for(var f=[],g=1;g0){for(var s=a.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ft(s,t.withFont("mathrm"),!0),h=0;h=0?s.setAttribute("height",V(a)):(s.setAttribute("height",V(a)),s.setAttribute("depth",V(-a))),s.setAttribute("voffset",V(a)),s}});var yn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:yn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:yn.indexOf(n)+1,body:i}},htmlBuilder:function(e,t){var r=t.havingSize(e.size);return bn(e.body,r,t)},mathmlBuilder:function(e,t){var r=t.havingSize(e.size),n=Nt(e.body,r),a=new Tt.MathNode("mstyle",n);return a.setAttribute("mathsize",V(r.sizeMultiplier)),a}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=!1,i=!1,o=r[0]&&Ut(r[0],"ordgroup");if(o)for(var s="",l=0;lr.height+r.depth+i&&(i=(i+c-r.height-r.depth)/2);var u=l.height-r.height-i-h;r.style.paddingLeft=V(m);var p=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:h}]},t);if(e.index){var d=t.havingStyle(x.SCRIPTSCRIPT),f=wt(e.index,d,t),g=.6*(p.height-p.depth),v=Ke.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),b=Ke.makeSpan(["root"],[v]);return Ke.makeSpan(["mord","sqrt"],[b,p],t)}return Ke.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var r=e.body,n=e.index;return n?new Tt.MathNode("mroot",[Rt(r,t),Rt(n,t)]):new Tt.MathNode("msqrt",[Rt(r,t)])}});var xn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(e,t){var r=xn[e.style],n=t.havingStyle(r).withFont("");return bn(e.body,n,t)},mathmlBuilder:function(e,t){var r=xn[e.style],n=t.havingStyle(r),a=Nt(e.body,n),i=new Tt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var wn=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===x.DISPLAY.size||r.alwaysHandleSupSub)?pn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||r.limits)?vn:null:"accent"===r.type?l.isCharacterBox(r.base)?Wt:null:"horizBrace"===r.type&&!e.sub===r.isOver?ln:null:null};st({type:"supsub",htmlBuilder:function(e,t){var r=wn(e,t);if(r)return r(e,t);var n,a,i,o=e.base,s=e.sup,h=e.sub,m=wt(o,t),c=t.fontMetrics(),u=0,p=0,d=o&&l.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());n=wt(s,f,t),d||(u=m.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(h){var g=t.havingStyle(t.style.sub());a=wt(h,g,t),d||(p=m.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}i=t.style===x.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,b=t.sizeMultiplier,y=V(.5/c.ptPerEm/b),w=null;if(a){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(m instanceof Z||k)&&(w=V(-m.italic))}if(n&&a){u=Math.max(u,i,n.depth+.25*c.xHeight),p=Math.max(p,c.sub2);var S=4*c.defaultRuleThickness;if(u-n.depth-(a.height-p)0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var kn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==kn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==kn[r.type]&&r.setAttribute("mathvariant",a),r}});var Sn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Mn.hasOwnProperty(e.text)){var r=Mn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(Sn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",Sn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Mn.hasOwnProperty(e.text)){if(Sn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var zn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[zn(),new Tt.MathNode("mtd",[It(e.body,t)]),zn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var An={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Cn=function(e,t){var r=e.font;return r?An[r]?t.withTextFontFamily(An[r]):Tn[r]?t.withTextFontWeight(Tn[r]):t.withTextFontShape(Bn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Cn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Cn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=qn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,r){if(void 0===r&&(r=!1),r){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),Hn=Hr;Er("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Er("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Er("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Er("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Er("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Er("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Er("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var En={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Er("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=En[r.text])||a>=t)throw new n("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=En[e.future().text])&&i":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Er("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Dn?t=Dn[r]:("\\not"===r.substr(0,4)||r in ae.math&&l.contains(["bin","rel"],ae.math[r].group))&&(t="\\dotsb"),t}));var Pn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Er("\\dotso",(function(e){return e.future().text in Pn?"\\ldots\\,":"\\ldots"})),Er("\\dotsc",(function(e){var t=e.future().text;return t in Pn&&","!==t?"\\ldots\\,":"\\ldots"})),Er("\\cdots",(function(e){return e.future().text in Pn?"\\@cdots\\,":"\\@cdots"})),Er("\\dotsb","\\cdots"),Er("\\dotsm","\\cdots"),Er("\\dotsi","\\!\\cdots"),Er("\\dotsx","\\ldots\\,"),Er("\\DOTSI","\\relax"),Er("\\DOTSB","\\relax"),Er("\\DOTSX","\\relax"),Er("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Er("\\,","\\tmspace+{3mu}{.1667em}"),Er("\\thinspace","\\,"),Er("\\>","\\mskip{4mu}"),Er("\\:","\\tmspace+{4mu}{.2222em}"),Er("\\medspace","\\:"),Er("\\;","\\tmspace+{5mu}{.2777em}"),Er("\\thickspace","\\;"),Er("\\!","\\tmspace-{3mu}{.1667em}"),Er("\\negthinspace","\\!"),Er("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Er("\\negthickspace","\\tmspace-{5mu}{.277em}"),Er("\\enspace","\\kern.5em "),Er("\\enskip","\\hskip.5em\\relax"),Er("\\quad","\\hskip1em\\relax"),Er("\\qquad","\\hskip2em\\relax"),Er("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Er("\\tag@paren","\\tag@literal{({#1})}"),Er("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Er("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Er("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Er("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Er("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Er("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Er("\\newline","\\\\\\relax"),Er("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Fn=V(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Er("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Fn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Er("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Fn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Er("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Er("\\@hspace","\\hskip #1\\relax"),Er("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Er("\\ordinarycolon",":"),Er("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Er("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Er("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Er("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Er("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Er("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Er("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Er("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Er("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Er("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Er("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Er("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Er("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Er("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Er("\u2237","\\dblcolon"),Er("\u2239","\\eqcolon"),Er("\u2254","\\coloneqq"),Er("\u2255","\\eqqcolon"),Er("\u2a74","\\Coloneqq"),Er("\\ratio","\\vcentcolon"),Er("\\coloncolon","\\dblcolon"),Er("\\colonequals","\\coloneqq"),Er("\\coloncolonequals","\\Coloneqq"),Er("\\equalscolon","\\eqqcolon"),Er("\\equalscoloncolon","\\Eqqcolon"),Er("\\colonminus","\\coloneq"),Er("\\coloncolonminus","\\Coloneq"),Er("\\minuscolon","\\eqcolon"),Er("\\minuscoloncolon","\\Eqcolon"),Er("\\coloncolonapprox","\\Colonapprox"),Er("\\coloncolonsim","\\Colonsim"),Er("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Er("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Er("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Er("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Er("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Er("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Er("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Er("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Er("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Er("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Er("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Er("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Er("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Er("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Er("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Er("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Er("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Er("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Er("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Er("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Er("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Er("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Er("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Er("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Er("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Er("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Er("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Er("\\imath","\\html@mathml{\\@imath}{\u0131}"),Er("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Er("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Er("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Er("\u27e6","\\llbracket"),Er("\u27e7","\\rrbracket"),Er("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Er("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Er("\u2983","\\lBrace"),Er("\u2984","\\rBrace"),Er("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Er("\u29b5","\\minuso"),Er("\\darr","\\downarrow"),Er("\\dArr","\\Downarrow"),Er("\\Darr","\\Downarrow"),Er("\\lang","\\langle"),Er("\\rang","\\rangle"),Er("\\uarr","\\uparrow"),Er("\\uArr","\\Uparrow"),Er("\\Uarr","\\Uparrow"),Er("\\N","\\mathbb{N}"),Er("\\R","\\mathbb{R}"),Er("\\Z","\\mathbb{Z}"),Er("\\alef","\\aleph"),Er("\\alefsym","\\aleph"),Er("\\Alpha","\\mathrm{A}"),Er("\\Beta","\\mathrm{B}"),Er("\\bull","\\bullet"),Er("\\Chi","\\mathrm{X}"),Er("\\clubs","\\clubsuit"),Er("\\cnums","\\mathbb{C}"),Er("\\Complex","\\mathbb{C}"),Er("\\Dagger","\\ddagger"),Er("\\diamonds","\\diamondsuit"),Er("\\empty","\\emptyset"),Er("\\Epsilon","\\mathrm{E}"),Er("\\Eta","\\mathrm{H}"),Er("\\exist","\\exists"),Er("\\harr","\\leftrightarrow"),Er("\\hArr","\\Leftrightarrow"),Er("\\Harr","\\Leftrightarrow"),Er("\\hearts","\\heartsuit"),Er("\\image","\\Im"),Er("\\infin","\\infty"),Er("\\Iota","\\mathrm{I}"),Er("\\isin","\\in"),Er("\\Kappa","\\mathrm{K}"),Er("\\larr","\\leftarrow"),Er("\\lArr","\\Leftarrow"),Er("\\Larr","\\Leftarrow"),Er("\\lrarr","\\leftrightarrow"),Er("\\lrArr","\\Leftrightarrow"),Er("\\Lrarr","\\Leftrightarrow"),Er("\\Mu","\\mathrm{M}"),Er("\\natnums","\\mathbb{N}"),Er("\\Nu","\\mathrm{N}"),Er("\\Omicron","\\mathrm{O}"),Er("\\plusmn","\\pm"),Er("\\rarr","\\rightarrow"),Er("\\rArr","\\Rightarrow"),Er("\\Rarr","\\Rightarrow"),Er("\\real","\\Re"),Er("\\reals","\\mathbb{R}"),Er("\\Reals","\\mathbb{R}"),Er("\\Rho","\\mathrm{P}"),Er("\\sdot","\\cdot"),Er("\\sect","\\S"),Er("\\spades","\\spadesuit"),Er("\\sub","\\subset"),Er("\\sube","\\subseteq"),Er("\\supe","\\supseteq"),Er("\\Tau","\\mathrm{T}"),Er("\\thetasym","\\vartheta"),Er("\\weierp","\\wp"),Er("\\Zeta","\\mathrm{Z}"),Er("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Er("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Er("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Er("\\bra","\\mathinner{\\langle{#1}|}"),Er("\\ket","\\mathinner{|{#1}\\rangle}"),Er("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Er("\\Bra","\\left\\langle#1\\right|"),Er("\\Ket","\\left|#1\\right\\rangle"),Er("\\angln","{\\angl n}"),Er("\\blue","\\textcolor{##6495ed}{#1}"),Er("\\orange","\\textcolor{##ffa500}{#1}"),Er("\\pink","\\textcolor{##ff00af}{#1}"),Er("\\red","\\textcolor{##df0030}{#1}"),Er("\\green","\\textcolor{##28ae7b}{#1}"),Er("\\gray","\\textcolor{gray}{#1}"),Er("\\purple","\\textcolor{##9d38bd}{#1}"),Er("\\blueA","\\textcolor{##ccfaff}{#1}"),Er("\\blueB","\\textcolor{##80f6ff}{#1}"),Er("\\blueC","\\textcolor{##63d9ea}{#1}"),Er("\\blueD","\\textcolor{##11accd}{#1}"),Er("\\blueE","\\textcolor{##0c7f99}{#1}"),Er("\\tealA","\\textcolor{##94fff5}{#1}"),Er("\\tealB","\\textcolor{##26edd5}{#1}"),Er("\\tealC","\\textcolor{##01d1c1}{#1}"),Er("\\tealD","\\textcolor{##01a995}{#1}"),Er("\\tealE","\\textcolor{##208170}{#1}"),Er("\\greenA","\\textcolor{##b6ffb0}{#1}"),Er("\\greenB","\\textcolor{##8af281}{#1}"),Er("\\greenC","\\textcolor{##74cf70}{#1}"),Er("\\greenD","\\textcolor{##1fab54}{#1}"),Er("\\greenE","\\textcolor{##0d923f}{#1}"),Er("\\goldA","\\textcolor{##ffd0a9}{#1}"),Er("\\goldB","\\textcolor{##ffbb71}{#1}"),Er("\\goldC","\\textcolor{##ff9c39}{#1}"),Er("\\goldD","\\textcolor{##e07d10}{#1}"),Er("\\goldE","\\textcolor{##a75a05}{#1}"),Er("\\redA","\\textcolor{##fca9a9}{#1}"),Er("\\redB","\\textcolor{##ff8482}{#1}"),Er("\\redC","\\textcolor{##f9685d}{#1}"),Er("\\redD","\\textcolor{##e84d39}{#1}"),Er("\\redE","\\textcolor{##bc2612}{#1}"),Er("\\maroonA","\\textcolor{##ffbde0}{#1}"),Er("\\maroonB","\\textcolor{##ff92c6}{#1}"),Er("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Er("\\maroonD","\\textcolor{##ca337c}{#1}"),Er("\\maroonE","\\textcolor{##9e034e}{#1}"),Er("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Er("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Er("\\purpleC","\\textcolor{##aa87ff}{#1}"),Er("\\purpleD","\\textcolor{##7854ab}{#1}"),Er("\\purpleE","\\textcolor{##543b78}{#1}"),Er("\\mintA","\\textcolor{##f5f9e8}{#1}"),Er("\\mintB","\\textcolor{##edf2df}{#1}"),Er("\\mintC","\\textcolor{##e0e5cc}{#1}"),Er("\\grayA","\\textcolor{##f6f7f7}{#1}"),Er("\\grayB","\\textcolor{##f0f1f2}{#1}"),Er("\\grayC","\\textcolor{##e3e5e6}{#1}"),Er("\\grayD","\\textcolor{##d6d8da}{#1}"),Er("\\grayE","\\textcolor{##babec2}{#1}"),Er("\\grayF","\\textcolor{##888d93}{#1}"),Er("\\grayG","\\textcolor{##626569}{#1}"),Er("\\grayH","\\textcolor{##3b3e40}{#1}"),Er("\\grayI","\\textcolor{##21242c}{#1}"),Er("\\kaBlue","\\textcolor{##314453}{#1}"),Er("\\kaGreen","\\textcolor{##71B307}{#1}");var Vn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Gn=function(){function e(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new On(Hn,t.macros),this.mode=r,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Rn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var a=this.consumeArg(["]"]);n=a.tokens,r=a.end}else{var i=this.consumeArg();n=i.tokens,t=i.start,r=i.end}return this.pushToken(new Dr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")},t.consumeSpaces=function(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}},t.consumeArg=function(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,i=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new n("Extra }",a)}else if("EOF"===a.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;athis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var h;(h=i).splice.apply(h,[s,2].concat(o[+l.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Dr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Dr(e)]):void 0},t.expandTokens=function(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;){var n=this.expandOnce(!0);n instanceof Dr&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var a=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(a+1));)++a;for(var o=new Rn(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:a}}return n},t.isDefined=function(e){return this.macros.has(e)||Nn.hasOwnProperty(e)||ae.math.hasOwnProperty(e)||ae.text.hasOwnProperty(e)||Vn.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Nn.hasOwnProperty(e)&&!Nn[e].primitive},e}(),Un={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Yn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},Xn=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Gn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Dr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r},t.parseExpression=function(t,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==e.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(t&&Nn[a.text]&&Nn[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,r=-1,a=0;a=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ae[this.mode][t].group,h=Lr.range(e);if(te.hasOwnProperty(l)){var m=l;s={type:"atom",mode:this.mode,family:m,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Lr.range(e),text:t}}if(this.consume(),o)for(var c=0;c> hugo.toml
+```
+
+## Features
+
+Like [Bear Blog](https://bearblog.dev), this theme:
+- Is free and open source
+- Looks great on any device
+- Makes tiny (~5kb), optimized, and awesome pages
+- Has no trackers, ads, or scripts
+- Automatically generates an RSS feed
+
+But that's not all! **Bear Cub** is also...
+
+### Accessible
+
+**Bear Cub** has a few accessibility upgrades when compared to its predecessors.
+The color palette has been overhauled to make sure everything is
+[readable](https://web.dev/color-and-contrast-accessibility/) for users with low
+vision impairments or color deficiencies, and some interactive elements were
+made bigger to facilitate [clicking](https://web.dev/accessible-tap-targets/)
+for users with a motor impairment.
+
+These small changes mean that **Bear Cub** passes Google's [PageSpeed
+test](https://pagespeed.web.dev/report?url=https%3A%2F%2Fclente.github.io%2Fhugo-bearcub%2F)
+with flying colors.
+
+
+
+### Secure
+
+[**Bear Cub**'s demo](https://clente.github.io/hugo-bearcub/) is hosted on GitHub
+and therefore I'm not in control of its [Content Security
+Policy](https://infosec.mozilla.org/guidelines/web_security#content-security-policy).
+However, the theme itself was made with security in mind: there are no inline
+styles and it uses no JavaScript at all.
+
+If you want to improve your [Mozilla
+Observatory](https://observatory.mozilla.org/) score even further, you should be
+able to simply add a few headers to your hosting service's configuration (e.g.
+[Netlify](https://docs.netlify.com/routing/headers/) or [Cloudflare
+Pages](https://developers.cloudflare.com/pages/platform/headers/)) and never
+have to think about it again. My `_headers` file, for example, looks like this:
+
+```
+/*
+ X-Content-Type-Options: nosniff
+ Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload" env=HTTPS
+ Cache-Control: max-age=31536000, public
+ X-Frame-Options: deny
+ Referrer-Policy: no-referrer
+ Feature-Policy: microphone 'none'; payment 'none'; geolocation 'none'; midi 'none'; sync-xhr 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'
+ Content-Security-Policy: default-src 'none'; manifest-src 'self'; font-src 'self'; img-src 'self'; style-src 'self'; form-action 'none'; frame-ancestors 'none'; base-uri 'none'
+ X-XSS-Protection: 1; mode=block
+```
+
+### Multilingual
+
+If you need to write a blog that supports more than one language, **Bear Cub**
+has you covered! Check out the demo's [`hugo.toml`
+file](https://github.com/clente/hugo-bearcub/blob/main/exampleSite/hugo.toml)
+for a sample of how you can setup multilingual support.
+
+By default, the theme creates a translation button that gets disabled when the
+current page is only available in any other language. You can also choose to
+hide this button (instead of disabling it) by setting `hideUntranslated =
+true`.
+
+### More
+
+Every once in a while, as I keep using **Bear Cub**, I notice that there is some
+functionality missing. Currently, these are the "advanced features" that I have
+already implemented:
+
+- Full-text RSS feed: an enhanced RSS feed template that includes the (properly
+ encoded) full content of your posts in the feed itself.
+- Static content: you can create empty blog entries that act as links to static
+ files by including `link: "{url}"` in a post's [front
+ matter](https://gohugo.io/content-management/front-matter/). You can also add
+ `render: false` to your [build
+ options](https://gohugo.io/content-management/build-options/#readout) to avoid
+ rendering blank posts.
+- Skip link: a "skip to main content" link that is temporarily invisible, but
+ can be focused by people who need a keyboard to navigate the web (see [PR
+ #5](https://github.com/clente/hugo-bearcub/pull/5) by
+ [@2kool4idkwhat](https://github.com/2kool4idkwhat) for more information).
+- Reply by email: if you supply an email address, the theme creates a "Reply to
+ this post by email" button at the end of every post (see Kev Quirk's [original
+ implementation](https://kevquirk.com/adding-the-post-title-to-my-reply-by-email-button)).
+ This button can be suppressed on a case-by-case by setting `hideReply: true`
+ in a post's [front matter](https://gohugo.io/content-management/front-matter/)
+ (see [PR #18](https://github.com/clente/hugo-bearcub/pull/18) by
+ [@chrsmutti](https://github.com/chrsmutti)).
+- `absfigure` shortcode: a shortcut to use the `figure` shortcode that also
+ converts relative URLs into absolute URLs by using the `absURL` function.
+- Single-use CSS (EXPERIMENTAL): you can add some styles to a single page by
+ writing the CSS you need in `assets/{custom_css}.css` and then including
+ `style: "{custom_css}.css"` in the [front
+ matter](https://gohugo.io/content-management/front-matter/) of said page.
+- Conditional CSS (EXPERIMENTAL): since **Bear Cub** does syntax highlighting
+ without inline styles (see `hugo.toml` for more information), it only load its
+ `syntax.css` if, and only if, a code block is actually present in the current
+ page.
+- Alternative "Herman" style (EXPERIMENTAL): if you want to check out a more
+ modern CSS style, you can change the `themeStyle` parameter to `"herman"` in
+ order to activate [Herman Martinus's](https://herman.bearblog.dev/) version of
+ the [Blogster Minimal](https://blogster-minimal.netlify.app/) theme for
+ [Astro](https://astro.build/).
+- Dynamic social card generation (EXPERIMENTAL): if you don't add preview images
+ to a post, this template will generate one based on the title. You can see an
+ example below.
+
+
+
+## Configuration
+
+**Bear Cub** can be customized with a `hugo.toml` file. Check out the
+[configuration](https://github.com/clente/hugo-bearcub/blob/main/exampleSite/hugo.toml)
+of the [demo](https://clente.github.io/hugo-bearcub/) for more information.
+
+```toml
+# Basic config
+baseURL = "https://example.com"
+theme = "hugo-bearcub"
+copyright = "John Doe (CC BY 4.0)"
+defaultContentLanguage = "en"
+
+# Generate a nice robots.txt for SEO
+enableRobotsTXT = true
+
+# Setup syntax highlighting without inline styles. For more information about
+# why you'd want to avoid inline styles, see
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles
+[markup]
+ [markup.highlight]
+ lineNos = true
+ lineNumbersInTable = false
+ # This allows Bear Cub to use a variation of Dracula that is more accessible
+ # to people with poor eyesight. For more information about color contrast
+ # and accessibility, see https://web.dev/color-and-contrast-accessibility/
+ noClasses = false
+
+# Multilingual mode config. More for information about how to setup translation,
+# see https://gohugo.io/content-management/multilingual/
+[languages]
+ [languages.en]
+ title = "Bear Cub"
+ languageName = "en-US 🇺🇸"
+ LanguageCode = "en-US"
+ contentDir = "content"
+ [languages.en.params]
+ madeWith = "Made with [Bear Cub](https://github.com/clente/hugo-bearcub)"
+ [languages.pt]
+ title = "Bear Cub"
+ languageName = "pt-BR 🇧🇷"
+ LanguageCode = "pt-BR"
+ contentDir = "content.pt"
+ [languages.pt.params]
+ madeWith = "Feito com [Bear Cub](https://github.com/clente/hugo-bearcub)"
+
+[params]
+ # The description of your website
+ description = "Bear Cub Demo"
+
+ # The path to your favicon
+ favicon = "images/favicon.png"
+
+ # These images will show up when services want to generate a preview of a link
+ # to your site. Ignored if `generateSocialCard = true`. For more information
+ # about previews, see https://gohugo.io/templates/internal#twitter-cards and
+ # https://gohugo.io/templates/internal#open-graph
+ images = ["images/share.webp"]
+
+ # This title is used as the site_name on the Hugo's internal opengraph
+ # structured data template
+ title = "Bear Cub"
+
+ # Dates are displayed following the format below. For more information about
+ # formatting, see https://gohugo.io/functions/format/
+ dateFormat = "2006-01-02"
+
+ # If your blog is multilingual but you haven't translated a page, this theme
+ # will create a disabled link. By setting `hideUntranslated` to true, you can
+ # have the theme simply not show any link
+ hideUntranslated = false
+
+ # (EXPERIMENTAL) This theme has two options for its CSS styles: "original" and
+ # "herman". The former is what you see on Bear Cub's demo (an optimized
+ # version of Hugo Bear Blog), while the latter has a more modern look based on
+ # Herman Martinus's version of the Blogster Minimal theme for Astro.
+ themeStyle = "original"
+
+ # (EXPERIMENTAL) This theme is capable of dynamically generating social cards
+ # for posts that don't have `images` defined in their front matter; By setting
+ # `generateSocialCard` to false, you can prevent this behavior. For more
+ # information see layouts/partials/social_card.html
+ generateSocialCard = true
+
+ # Social media. Delete any item you aren't using to make sure it won't show up
+ # in your website's metadata.
+ [params.social]
+ twitter = "example" # Twitter handle (without '@')
+ facebook_admin = "0000000000" # Facebook Page Admin ID
+
+ # Author metadata. This is mostly used for the RSS feed of your site, but the
+ # email is also added to the footer of each post. You can hide the "reply to"
+ # link by using a `hideReply` param in front matter.
+ [params.author]
+ name = "John Doe" # Your name as shown in the RSS feed metadata
+ email = "me@example.com" # Added to the footer so readers can reply to posts
+```
+
+## Contributing
+
+If you come across any problems while using **Bear Cub**, you can file an
+[issue](https://github.com/clente/hugo-bearcub/issues) or create a [pull
+request](https://github.com/clente/hugo-bearcub/pulls).
diff --git a/themes/hugo-bearcub/assets/herman.css b/themes/hugo-bearcub/assets/herman.css
new file mode 100644
index 0000000..f2573c3
--- /dev/null
+++ b/themes/hugo-bearcub/assets/herman.css
@@ -0,0 +1,202 @@
+:root {
+ font-size: 62.5%; /* 10px */
+ --color-dark: #181a20;
+ --color-light: #fafafa;
+ --color-primary: #1a8fe3;
+ --size: 1rem;
+ --spacing: calc(var(--size) * 2.4);
+}
+
+body {
+ background: var(--color-dark);
+ color: var(--color-light);
+ padding: 4rem;
+ font-family: Avenir, 'Avenir Next LT Pro', Montserrat, Corbel, 'URW Gothic',
+ source-sans-pro, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
+ "Segoe UI Symbol", "Noto Color Emoji";
+ font-size: calc(var(--size) * 1.8);
+ line-height: 1.5;
+ min-height: 80vh;
+ max-width: 1600px;
+ margin: 0 auto;
+ word-wrap: break-word;
+}
+
+header,
+main,
+footer {
+ max-width: 70ch;
+ margin-inline: auto;
+}
+
+header {
+ padding-bottom: var(--spacing);
+}
+
+nav a, a.blog-tags {
+ margin-right: calc(var(--spacing) / 2);
+}
+a.blog-tags {
+ line-height: 2;
+}
+
+main {
+ padding-bottom: var(--spacing);
+}
+
+footer {
+ text-align: center;
+ padding-top: var(--spacing);
+}
+
+a {
+ color: currentColor;
+ text-decoration-color: var(--color-primary);
+ text-decoration-thickness: 0.3ex;
+ text-underline-offset: 0.3ex;
+}
+
+a:hover {
+ text-decoration-thickness: 0.4ex;
+}
+
+img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+
+h1,
+h2,
+h3,
+h4 {
+ font-weight: 700;
+ line-height: 1.3;
+}
+
+h1 {
+ font-size: calc(var(--size) * 4.2);
+}
+h2 {
+ font-size: calc(var(--size) * 3.4);
+}
+h3 {
+ font-size: calc(var(--size) * 2.6);
+}
+h4 {
+ font-size: calc(var(--size) * 1.8);
+}
+
+ul,
+ol {
+ padding-inline-start: var(--spacing);
+}
+li {
+ margin-block-start: var(--spacing);
+}
+
+blockquote {
+ padding-inline-start: var(--spacing);
+ border-inline-start: 0.2em solid;
+ font-style: italic;
+ max-width: 50ch;
+}
+
+:is(h1, h2, h3, h4, blockquote) {
+ margin-block-end: calc(var(--spacing) / 2);
+}
+:is(h1, h2, h3, h4) + * {
+ margin-block-start: calc(var(--spacing) / 3);
+}
+:is(h1, h2, h3, h4) + :where(h2, h3, h4) {
+ margin-block-start: calc(var(--spacing) * 2);
+}
+
+.title {
+ text-decoration: none;
+}
+.title h1 {
+ font-size: calc(var(--size) * 3.4);
+ margin-top: calc(var(--spacing) / 2);
+}
+
+ul.blog-posts {
+ list-style-type: none;
+ padding: unset;
+}
+ul.blog-posts li {
+ display: flex;
+ flex-direction: column;
+}
+ul.blog-posts li span {
+ min-width: 11ch;
+}
+
+p.byline {
+ opacity: 0.5;
+}
+
+code {
+ font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro',
+ Menlo, Consolas, 'DejaVu Sans Mono', monospace;
+ padding: 2px calc(var(--spacing) / 4);
+ background-color: #282a36;
+ font-size: calc(var(--size) * 1.4);
+}
+pre code {
+ display: block;
+ padding: var(--spacing);
+ overflow-x: auto;
+ -webkit-text-size-adjust: 100%;
+ -moz-text-size-adjust: 100%;
+}
+
+table {
+ width: 100%;
+}
+table,
+th,
+td {
+ border: 1px solid;
+ border-collapse: collapse;
+ border-color: var(--color-light);
+ padding: calc(var(--spacing) / 2);
+}
+
+.disabled {
+ color: currentColor;
+ cursor: not-allowed;
+ opacity: 0.5;
+}
+
+@media screen and (min-width: 600px) {
+ ul.blog-posts li {
+ flex-direction: row;
+ gap: calc(var(--spacing) / 2);
+ }
+}
+
+/* "Skip to main content" link */
+.skip-link {
+ position: absolute;
+ top: 5;
+ transform: translateY(-600%);
+ transition: transform 0.5s;
+ background-color: #181a20;
+ padding: 6px;
+}
+
+.skip-link:focus {
+ transform: translateY(0%);
+}
+
+figure {
+ margin-inline-start: 0em;
+ margin-inline-end: 0em;
+}
+
+figcaption > p {
+ margin-block-start: 9px;
+ text-align: center;
+ font-style: italic;
+}
diff --git a/themes/hugo-bearcub/assets/images/social_card_bg.png b/themes/hugo-bearcub/assets/images/social_card_bg.png
new file mode 100644
index 0000000..857ea63
Binary files /dev/null and b/themes/hugo-bearcub/assets/images/social_card_bg.png differ
diff --git a/themes/hugo-bearcub/assets/images/social_card_fg.png b/themes/hugo-bearcub/assets/images/social_card_fg.png
new file mode 100644
index 0000000..e005b0a
Binary files /dev/null and b/themes/hugo-bearcub/assets/images/social_card_fg.png differ
diff --git a/themes/hugo-bearcub/assets/original.css b/themes/hugo-bearcub/assets/original.css
new file mode 100644
index 0000000..480cc6a
--- /dev/null
+++ b/themes/hugo-bearcub/assets/original.css
@@ -0,0 +1,180 @@
+body {
+ font-family: Verdana, sans-serif;
+ margin: auto;
+ padding: 20px;
+ max-width: 720px;
+ text-align: left;
+ background-color: #1d1f27;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
+ line-height: 1.5;
+ color: #c9d1d9;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+strong,
+b {
+ color: #eee;
+}
+
+a {
+ color: #8cc2dd;
+}
+
+.title {
+ text-decoration: none;
+ border: 0;
+}
+.title h1 {
+ font-size: 24px;
+ margin: 19.92px 0 19.92px 0;
+}
+
+.title span {
+ font-weight: 400;
+}
+
+nav a {
+ margin-right: 10px;
+}
+
+textarea {
+ background-color: #252525;
+ color: #ddd;
+ width: 100%;
+ font-size: 16px;
+}
+
+input {
+ background-color: #252525;
+ color: #ddd;
+ font-size: 16px;
+}
+
+content {
+ line-height: 1.6;
+}
+
+table {
+ width: 100%;
+}
+
+table,
+th,
+td {
+ border: 1px solid;
+ border-collapse: collapse;
+ border-color: #c9d1d9;
+ padding: 5px;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+}
+
+code {
+ padding: 2px 5px;
+ color: #f8f8f2;
+ background-color: #282a36;
+}
+
+pre code {
+ display: block;
+ padding: 20px;
+ white-space: pre-wrap;
+ font-size: 14px;
+ overflow-x: auto;
+ text-wrap: nowrap;
+}
+
+blockquote {
+ border-left: 1px solid #999;
+ color: #ccc;
+ padding-left: 20px;
+ font-style: italic;
+}
+
+footer {
+ padding: 25px;
+ text-align: center;
+}
+
+.helptext {
+ color: #aaa;
+ font-size: small;
+}
+
+.errorlist {
+ color: #eba613;
+ font-size: small;
+}
+
+/* blog posts */
+ul.blog-posts {
+ list-style-type: none;
+ padding: unset;
+}
+
+ul.blog-posts li {
+ display: flex;
+ margin-bottom: 10px;
+}
+
+ul.blog-posts li span {
+ flex: 0 0 130px;
+}
+
+ul.blog-posts li a:visited {
+ color: #8b6fcb;
+}
+
+a.blog-tags {
+ line-height: 2;
+ margin-right: 12px;
+}
+
+h3.blog-filter {
+ margin-bottom: 0;
+}
+
+.disabled {
+ color: currentColor;
+ cursor: not-allowed;
+ opacity: 0.7;
+}
+
+p.byline {
+ font-style: italic;
+}
+
+/* "Skip to main content" link */
+.skip-link {
+ position: absolute;
+ top: 5;
+ transform: translateY(-600%);
+ transition: transform 0.5s;
+ background-color: #1d1f27;
+ padding: 6px;
+}
+
+.skip-link:focus {
+ transform: translateY(0%);
+}
+
+figure {
+ margin-inline-start: 0em;
+ margin-inline-end: 0em;
+}
+
+figcaption > p {
+ margin-block-start: 0px;
+ text-align: center;
+ font-style: italic;
+ color: #ccc;
+}
diff --git a/themes/hugo-bearcub/assets/syntax.css b/themes/hugo-bearcub/assets/syntax.css
new file mode 100644
index 0000000..a28d967
--- /dev/null
+++ b/themes/hugo-bearcub/assets/syntax.css
@@ -0,0 +1,91 @@
+/* This style is a variant of Dracula that is more accessible to people with poor eyesight */
+/* See https://web.dev/color-and-contrast-accessibility/ */
+/* And https://xyproto.github.io/splash/docs/dracula.html */
+/* And https://github.com/alecthomas/chroma/blob/a40c95e447a577322e20eac58f2f7c0d026665b0/styles/dracula.xml */
+
+/* Background */ .bg { color: #f8f8f2; background-color: #282a36; }
+/* PreWrapper */ .chroma { color: #f8f8f2; background-color: #282a36; }
+/* Other .chroma .x { } */
+/* Error .chroma .err { } */
+/* CodeLine .chroma .cl { } */
+/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
+/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
+/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
+/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
+/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #929292 }
+/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #929292 }
+/* Line */ .chroma .line { display: flex; }
+/* Keyword */ .chroma .k { color: #ff79c6 }
+/* KeywordConstant */ .chroma .kc { color: #ff79c6 }
+/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic }
+/* KeywordNamespace */ .chroma .kn { color: #ff79c6 }
+/* KeywordPseudo */ .chroma .kp { color: #ff79c6 }
+/* KeywordReserved */ .chroma .kr { color: #ff79c6 }
+/* KeywordType */ .chroma .kt { color: #8be9fd }
+/* Name .chroma .n { } */
+/* NameAttribute */ .chroma .na { color: #50fa7b }
+/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic }
+/* NameBuiltinPseudo .chroma .bp { } */
+/* NameClass */ .chroma .nc { color: #50fa7b }
+/* NameConstant .chroma .no { } */
+/* NameDecorator .chroma .nd { } */
+/* NameEntity .chroma .ni { } */
+/* NameException .chroma .ne { } */
+/* NameFunction */ .chroma .nf { color: #50fa7b }
+/* NameFunctionMagic .chroma .fm { } */
+/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic }
+/* NameNamespace .chroma .nn { } */
+/* NameOther .chroma .nx { } */
+/* NameProperty .chroma .py { } */
+/* NameTag */ .chroma .nt { color: #ff79c6 }
+/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic }
+/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic }
+/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic }
+/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic }
+/* NameVariableMagic .chroma .vm { } */
+/* Literal .chroma .l { } */
+/* LiteralDate .chroma .ld { } */
+/* LiteralString */ .chroma .s { color: #f1fa8c }
+/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c }
+/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c }
+/* LiteralStringChar */ .chroma .sc { color: #f1fa8c }
+/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c }
+/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c }
+/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c }
+/* LiteralStringEscape */ .chroma .se { color: #f1fa8c }
+/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c }
+/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c }
+/* LiteralStringOther */ .chroma .sx { color: #f1fa8c }
+/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c }
+/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c }
+/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c }
+/* LiteralNumber */ .chroma .m { color: #bd93f9 }
+/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 }
+/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 }
+/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 }
+/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 }
+/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 }
+/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 }
+/* Operator */ .chroma .o { color: #ff79c6 }
+/* OperatorWord */ .chroma .ow { color: #ff79c6 }
+/* Punctuation .chroma .p { } */
+/* Comment */ .chroma .c { color: #8491b8 }
+/* CommentHashbang */ .chroma .ch { color: #8491b8 }
+/* CommentMultiline */ .chroma .cm { color: #8491b8 }
+/* CommentSingle */ .chroma .c1 { color: #8491b8 }
+/* CommentSpecial */ .chroma .cs { color: #8491b8 }
+/* CommentPreproc */ .chroma .cp { color: #ff79c6 }
+/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 }
+/* Generic .chroma .g { } */
+/* GenericDeleted */ .chroma .gd { color: #ff5555 }
+/* GenericEmph */ .chroma .ge { text-decoration: underline }
+/* GenericError .chroma .gr { } */
+/* GenericHeading */ .chroma .gh { font-weight: bold }
+/* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold }
+/* GenericOutput */ .chroma .go { color: #44475a }
+/* GenericPrompt .chroma .gp { } */
+/* GenericStrong .chroma .gs { } */
+/* GenericSubheading */ .chroma .gu { font-weight: bold }
+/* GenericTraceback .chroma .gt { } */
+/* GenericUnderline */ .chroma .gl { text-decoration: underline }
+/* TextWhitespace .chroma .w { } */
diff --git a/themes/hugo-bearcub/exampleSite/content.pt/_index.md b/themes/hugo-bearcub/exampleSite/content.pt/_index.md
new file mode 100644
index 0000000..4cf0d7e
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content.pt/_index.md
@@ -0,0 +1,35 @@
+---
+title: "Início"
+menu: "main"
+weight: 1
+---
+
+# ᕦʕ •ᴥ•ʔᕤ Bear Cub
+
+Os sites de hoje em dia são pesados, lentos e cheios de scripts, propagandas e
+rastreadores. Isso ficou tão comum que nós perdemos toda a perspectiva, tanto
+que achamos normal uma página web ter vários megabytes.
+
+> The internet has become a bloated mess. Huge JavaScript libraries, countless
+> client-side queries and overly complex frontend frameworks are par for the
+> course these days.
+>
+> --- [Kev Quirk](https://512kb.club/)
+
+Vamos mudar isso, um site de cada vez! **Bear Cub** é um tema
+[Hugo](https://gohugo.io/) baseado no [Hugo
+Bear](https://github.com/janraasch/hugo-bearblog/) que toma conta da velocidade
+e otimização para que você possa focar em escrever bons textos.
+
+Ele é gratuito, multilíngue, otimizado para buscadores, simples, responsivo,
+leve e rápido. Muito rápido.
+
+Quando comparado ao seu predecessor, o **Bear Cub** tem alguns upgrades de
+[privacidade](https://themarkup.org/blacklight?url=clente.github.io/hugo-bearcub/)
+e
+[acessibilidade](https://pagespeed.web.dev/report?url=https%3A%2F%2Fclente.github.io%2Fhugo-bearcub%2F).
+Ele também é compatível com as práticas mais modernas de
+[segurança](https://github.com/clente/hugo-bearcub#secure) para que seus
+usuários possam aproveitar seu site sem medo.
+
+Feito com 💟 por [Caio lente](https://lente.dev).
diff --git a/themes/hugo-bearcub/exampleSite/content.pt/blog/_index.md b/themes/hugo-bearcub/exampleSite/content.pt/blog/_index.md
new file mode 100644
index 0000000..7588ac1
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content.pt/blog/_index.md
@@ -0,0 +1,5 @@
+---
+title: "Blog"
+menu: "main"
+weight: 2
+---
\ No newline at end of file
diff --git a/themes/hugo-bearcub/exampleSite/content/_index.md b/themes/hugo-bearcub/exampleSite/content/_index.md
new file mode 100644
index 0000000..10c388f
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/_index.md
@@ -0,0 +1,35 @@
+---
+title: "Home"
+menu: "main"
+weight: 1
+---
+
+# ᕦʕ •ᴥ•ʔᕤ Bear Cub
+
+Today's websites are bloated, slow, and full of scripts, ads, and trackers. This
+became so commonplace that we lost all sense of perspective, to the point that
+we now think multi-megabyte webpages are normal.
+
+> The internet has become a bloated mess. Huge JavaScript libraries, countless
+> client-side queries and overly complex frontend frameworks are par for the
+> course these days.
+>
+> --- [Kev Quirk](https://512kb.club/)
+
+Let's change this, one website at a time! **Bear Cub** is a
+[Hugo](https://gohugo.io/) theme based on [Hugo
+Bear](https://github.com/janraasch/hugo-bearblog/) that takes care of speed and
+optimization, so you can focus on writing good content.
+
+It is free, multilingual, optimized for search engines, no-nonsense, responsive,
+light, and fast. Really fast.
+
+When compared to its predecessor, **Bear Cub** has a few
+[privacy](https://themarkup.org/blacklight?url=clente.github.io/hugo-bearcub/)
+and
+[accessibility](https://pagespeed.web.dev/report?url=https%3A%2F%2Fclente.github.io%2Fhugo-bearcub%2F)
+upgrades. It's also compatible with modern
+[security](https://github.com/clente/hugo-bearcub#secure) standards, so your
+users don't have to worry about browsing your website.
+
+Made with 💟 by [Caio lente](https://lente.dev/en).
diff --git a/themes/hugo-bearcub/exampleSite/content/blog/_index.md b/themes/hugo-bearcub/exampleSite/content/blog/_index.md
new file mode 100644
index 0000000..7588ac1
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/blog/_index.md
@@ -0,0 +1,5 @@
+---
+title: "Blog"
+menu: "main"
+weight: 2
+---
\ No newline at end of file
diff --git a/themes/hugo-bearcub/exampleSite/content/blog/emoji-support.md b/themes/hugo-bearcub/exampleSite/content/blog/emoji-support.md
new file mode 100644
index 0000000..f17f49a
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/blog/emoji-support.md
@@ -0,0 +1,46 @@
++++
+author = "Hugo Authors"
+title = "Emoji Support"
+date = "2019-03-05"
+description = "Guide to emoji usage in Hugo"
+tags = [
+ "emoji",
+]
++++
+
+Emoji can be enabled in a Hugo project in a number of ways.
+
+The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
+
+To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
+
+🙈 :see_no_evil:
🙉 :hear_no_evil:
🙊 :speak_no_evil:
+
+
+The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
+
+***
+
+**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
+
+{{< highlight html >}}
+.emoji {
+ font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
+}
+{{< /highlight >}}
+
+{{< css.inline >}}
+
+{{< /css.inline >}}
diff --git a/themes/hugo-bearcub/exampleSite/content/blog/markdown-syntax.md b/themes/hugo-bearcub/exampleSite/content/blog/markdown-syntax.md
new file mode 100644
index 0000000..06990d7
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/blog/markdown-syntax.md
@@ -0,0 +1,148 @@
++++
+author = "Hugo Authors"
+title = "Markdown Syntax Guide"
+date = "2019-03-11"
+description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
+tags = [
+ "markdown",
+ "css",
+ "html",
+]
+categories = [
+ "themes",
+ "syntax",
+]
+series = ["Themes Guide"]
+aliases = ["migrate-from-jekyl"]
++++
+
+This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
+
+
+## Headings
+
+The following HTML ``—`` elements represent six levels of section headings. `` is the highest section level while `` is the lowest.
+
+# H1
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+
+## Paragraph
+
+Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
+
+Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
+
+## Blockquotes
+
+The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
+
+#### Blockquote without attribution
+
+> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
+> **Note** that you can use *Markdown syntax* within a blockquote.
+
+#### Blockquote with attribution
+
+> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1]
+
+[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
+
+## Tables
+
+Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
+
+ Name | Age
+--------|------
+ Bob | 27
+ Alice | 23
+
+#### Inline Markdown within tables
+
+| Italics | Bold | Code |
+| -------- | -------- | ------ |
+| *italics* | **bold** | `code` |
+
+## Code Blocks
+
+#### Code block with backticks
+
+```html
+
+
+
+
+ Example HTML5 Document
+
+
+ Test
+
+
+```
+
+#### Code block indented with four spaces
+
+
+
+
+
+ Example HTML5 Document
+
+
+ Test
+
+
+
+#### Code block with Hugo's internal highlight shortcode
+{{< highlight html >}}
+
+
+
+
+ Example HTML5 Document
+
+
+ Test
+
+
+{{< /highlight >}}
+
+## List Types
+
+#### Ordered List
+
+1. First item
+2. Second item
+3. Third item
+
+#### Unordered List
+
+* List item
+* Another item
+* And another item
+
+#### Nested list
+
+* Fruit
+ * Apple
+ * Orange
+ * Banana
+* Dairy
+ * Milk
+ * Cheese
+
+## Other Elements — abbr, sub, sup, kbd, mark
+
+GIF is a bitmap image format.
+
+H2 O
+
+Xn + Yn = Zn
+
+Press CTRL +ALT +Delete to end the session.
+
+Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures.
diff --git a/themes/hugo-bearcub/exampleSite/content/blog/math-typesetting.md b/themes/hugo-bearcub/exampleSite/content/blog/math-typesetting.md
new file mode 100644
index 0000000..62831a9
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/blog/math-typesetting.md
@@ -0,0 +1,49 @@
+---
+author: Hugo Authors
+title: Math Typesetting
+date: 2019-03-08
+description: A brief guide to setup KaTeX
+math: true
+---
+
+Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
+
+
+In this example we will be using [KaTeX](https://katex.org/)
+
+- Create a partial under `/layouts/partials/math.html`
+- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
+- Include the partial in your templates like so:
+
+```bash
+{{ if or .Params.math .Site.Params.math }}
+{{ partial "math.html" . }}
+{{ end }}
+```
+
+- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
+- To enable KaTex on a per page basis include the parameter `math: true` in content files
+
+**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
+
+{{< math.inline >}}
+{{ if or .Page.Params.math .Site.Params.math }}
+
+
+
+
+{{ end }}
+{{ math.inline >}}
+
+### Examples
+
+{{< math.inline >}}
+
+Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
+
+{{ math.inline >}}
+
+Block math:
+$$
+ \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
+$$
diff --git a/themes/hugo-bearcub/exampleSite/content/blog/placeholder-text.md b/themes/hugo-bearcub/exampleSite/content/blog/placeholder-text.md
new file mode 100644
index 0000000..9ed5f69
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/blog/placeholder-text.md
@@ -0,0 +1,45 @@
++++
+author = "Hugo Authors"
+title = "Placeholder Text"
+date = "2019-03-09"
+description = "Lorem Ipsum Dolor Si Amet"
+tags = [
+ "markdown",
+ "text",
+]
++++
+
+Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
+
+1. Exierant elisi ambit vivere dedere
+2. Duce pollice
+3. Eris modo
+4. Spargitque ferrea quos palude
+
+Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
+
+1. Comas hunc haec pietate fetum procerum dixit
+2. Post torum vates letum Tiresia
+3. Flumen querellas
+4. Arcanaque montibus omnes
+5. Quidem et
+
+# Vagus elidunt
+
+
+
+[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
+
+## Mane refeci capiebant unda mulcebat
+
+Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
+
+Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
+
+Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
+
+{{< css.inline >}}
+
+{{< /css.inline >}}
diff --git a/themes/hugo-bearcub/exampleSite/content/blog/rich-content.md b/themes/hugo-bearcub/exampleSite/content/blog/rich-content.md
new file mode 100644
index 0000000..3c406af
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/content/blog/rich-content.md
@@ -0,0 +1,34 @@
++++
+author = "Hugo Authors"
+title = "Rich Content"
+date = "2019-03-10"
+description = "A brief description of Hugo Shortcodes"
+tags = [
+ "shortcodes",
+ "privacy",
+]
++++
+
+Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
+
+---
+
+## YouTube Privacy Enhanced Shortcode
+
+{{< youtube ZJthWmvUzzc >}}
+
+
+
+---
+
+## Twitter Simple Shortcode
+
+{{< x user="DesignReviewed" id="1085870671291310081" >}}
+
+
+
+---
+
+## Vimeo Simple Shortcode
+
+{{< vimeo_simple 48912912 >}}
diff --git a/themes/hugo-bearcub/exampleSite/hugo.toml b/themes/hugo-bearcub/exampleSite/hugo.toml
new file mode 100644
index 0000000..04690c0
--- /dev/null
+++ b/themes/hugo-bearcub/exampleSite/hugo.toml
@@ -0,0 +1,89 @@
+# Basic config
+baseURL = "https://example.com"
+theme = "hugo-bearcub"
+copyright = "John Doe (CC BY 4.0)"
+defaultContentLanguage = "en"
+
+# Generate a nice robots.txt for SEO
+enableRobotsTXT = true
+
+# Setup syntax highlighting without inline styles. For more information about
+# why you'd want to avoid inline styles, see
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles
+[markup]
+ [markup.highlight]
+ lineNos = true
+ lineNumbersInTable = false
+ # This allows Bear Cub to use a variation of Dracula that is more accessible
+ # to people with poor eyesight. For more information about color contrast
+ # and accessibility, see https://web.dev/color-and-contrast-accessibility/
+ noClasses = false
+
+# Multilingual mode config. More for information about how to setup translation,
+# see https://gohugo.io/content-management/multilingual/
+[languages]
+ [languages.en]
+ title = "Bear Cub"
+ languageName = "en-US 🇺🇸"
+ LanguageCode = "en-US"
+ contentDir = "content"
+ [languages.en.params]
+ madeWith = "Made with [Bear Cub](https://github.com/clente/hugo-bearcub)"
+ [languages.pt]
+ title = "Bear Cub"
+ languageName = "pt-BR 🇧🇷"
+ LanguageCode = "pt-BR"
+ contentDir = "content.pt"
+ [languages.pt.params]
+ madeWith = "Feito com [Bear Cub](https://github.com/clente/hugo-bearcub)"
+
+[params]
+ # The description of your website
+ description = "Bear Cub Demo"
+
+ # The path to your favicon
+ favicon = "images/favicon.png"
+
+ # These images will show up when services want to generate a preview of a link
+ # to your site. Ignored if `generateSocialCard = true`. For more information
+ # about previews, see https://gohugo.io/templates/internal#twitter-cards and
+ # https://gohugo.io/templates/internal#open-graph
+ images = ["images/share.webp"]
+
+ # This title is used as the site_name on the Hugo's internal opengraph
+ # structured data template
+ title = "Bear Cub"
+
+ # Dates are displayed following the format below. For more information about
+ # formatting, see https://gohugo.io/functions/format/
+ dateFormat = "2006-01-02"
+
+ # If your blog is multilingual but you haven't translated a page, this theme
+ # will create a disabled link. By setting `hideUntranslated` to true, you can
+ # have the theme simply not show any link
+ hideUntranslated = false
+
+ # (EXPERIMENTAL) This theme has two options for its CSS styles: "original" and
+ # "herman". The former is what you see on Bear Cub's demo (an optimized
+ # version of Hugo Bear Blog), while the latter has a more modern look based on
+ # Herman Martinus's version of the Blogster Minimal theme for Astro.
+ themeStyle = "original"
+
+ # (EXPERIMENTAL) This theme is capable of dynamically generating social cards
+ # for posts that don't have `images` defined in their front matter; By setting
+ # `generateSocialCard` to false, you can prevent this behavior. For more
+ # information see layouts/partials/social_card.html
+ generateSocialCard = true
+
+ # Social media. Delete any item you aren't using to make sure it won't show up
+ # in your website's metadata.
+ [params.social]
+ twitter = "example" # Twitter handle (without '@')
+ facebook_admin = "0000000000" # Facebook Page Admin ID
+
+ # Author metadata. This is mostly used for the RSS feed of your site, but the
+ # email is also added to the footer of each post. You can hide the "reply to"
+ # link by using a `hideReply` param in front matter.
+ [params.author]
+ name = "John Doe" # Your name as shown in the RSS feed metadata
+ email = "me@example.com" # Added to the footer so readers can reply to posts
diff --git a/themes/hugo-bearcub/exampleSite/static/images/favicon.png b/themes/hugo-bearcub/exampleSite/static/images/favicon.png
new file mode 100644
index 0000000..c3ab3b9
Binary files /dev/null and b/themes/hugo-bearcub/exampleSite/static/images/favicon.png differ
diff --git a/themes/hugo-bearcub/exampleSite/static/images/share.webp b/themes/hugo-bearcub/exampleSite/static/images/share.webp
new file mode 100644
index 0000000..e190239
Binary files /dev/null and b/themes/hugo-bearcub/exampleSite/static/images/share.webp differ
diff --git a/themes/hugo-bearcub/i18n/de.toml b/themes/hugo-bearcub/i18n/de.toml
new file mode 100644
index 0000000..c8216d1
--- /dev/null
+++ b/themes/hugo-bearcub/i18n/de.toml
@@ -0,0 +1,14 @@
+[filtering-for]
+ other = "Filtern nach"
+
+[no-posts]
+ other = "Noch keine Beträge"
+
+[email-subject]
+ other = "Antwort auf "
+
+[email-reply]
+ other = "Auf diesen Beitrag per Email antworten "
+
+[skip-link]
+ other = "Zum Hauptinhalt"
diff --git a/themes/hugo-bearcub/i18n/en.toml b/themes/hugo-bearcub/i18n/en.toml
new file mode 100644
index 0000000..15a8569
--- /dev/null
+++ b/themes/hugo-bearcub/i18n/en.toml
@@ -0,0 +1,14 @@
+[filtering-for]
+ other = "Filtering for"
+
+[no-posts]
+ other = "No posts yet"
+
+[email-subject]
+ other = "Reply to "
+
+[email-reply]
+ other = "Reply to this post by email"
+
+[skip-link]
+ other = "Skip to main content"
\ No newline at end of file
diff --git a/themes/hugo-bearcub/i18n/ko.toml b/themes/hugo-bearcub/i18n/ko.toml
new file mode 100644
index 0000000..35ac56e
--- /dev/null
+++ b/themes/hugo-bearcub/i18n/ko.toml
@@ -0,0 +1,14 @@
+[filtering-for]
+ other = "태그 검색:"
+
+[no-posts]
+ other = "아직 작성된 게시물이 없습니다!"
+
+[email-subject]
+ other = "댓글: "
+
+[email-reply]
+ other = "이메일로 댓글 달기"
+
+[skip-link]
+ other = "본문으로 바로 가기"
diff --git a/themes/hugo-bearcub/i18n/pt.toml b/themes/hugo-bearcub/i18n/pt.toml
new file mode 100644
index 0000000..ad228ab
--- /dev/null
+++ b/themes/hugo-bearcub/i18n/pt.toml
@@ -0,0 +1,14 @@
+[filtering-for]
+ other = "Filtrando para"
+
+[no-posts]
+ other = "Nenhum post ainda"
+
+[email-subject]
+ other = "Resposta a "
+
+[email-reply]
+ other = "Responda a este post por email"
+
+[skip-link]
+ other = "Pular para conteúdo principal"
\ No newline at end of file
diff --git a/themes/hugo-bearcub/images/pagespeed.webp b/themes/hugo-bearcub/images/pagespeed.webp
new file mode 100644
index 0000000..fb87f05
Binary files /dev/null and b/themes/hugo-bearcub/images/pagespeed.webp differ
diff --git a/themes/hugo-bearcub/images/screenshot.png b/themes/hugo-bearcub/images/screenshot.png
new file mode 100644
index 0000000..8d4c404
Binary files /dev/null and b/themes/hugo-bearcub/images/screenshot.png differ
diff --git a/themes/hugo-bearcub/images/social_card.webp b/themes/hugo-bearcub/images/social_card.webp
new file mode 100644
index 0000000..24bf927
Binary files /dev/null and b/themes/hugo-bearcub/images/social_card.webp differ
diff --git a/themes/hugo-bearcub/images/tn.png b/themes/hugo-bearcub/images/tn.png
new file mode 100644
index 0000000..206e5bb
Binary files /dev/null and b/themes/hugo-bearcub/images/tn.png differ
diff --git a/themes/hugo-bearcub/layouts/404.html b/themes/hugo-bearcub/layouts/404.html
new file mode 100644
index 0000000..c6b3dfd
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/404.html
@@ -0,0 +1,6 @@
+{{ define "title" }}404{{ end }}
+
+{{ define "main" }}
+404
+ʕノ•ᴥ•ʔノ ︵ ┻━┻
+{{ end }}
diff --git a/themes/hugo-bearcub/layouts/_default/_markup/render-codeblock.html b/themes/hugo-bearcub/layouts/_default/_markup/render-codeblock.html
new file mode 100644
index 0000000..6e1a075
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/_default/_markup/render-codeblock.html
@@ -0,0 +1,6 @@
+
+{{ .Page.Store.Set "hasCodeBlock" true }}
+
+
+{{ $result := transform.HighlightCodeBlock . }}
+{{ $result.Wrapped }}
\ No newline at end of file
diff --git a/themes/hugo-bearcub/layouts/_default/baseof.html b/themes/hugo-bearcub/layouts/_default/baseof.html
new file mode 100644
index 0000000..294749a
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/_default/baseof.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+ {{- partial "favicon.html" . -}}
+ {{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}
+
+ {{- partial "seo_tags.html" . -}}
+
+
+ {{ $style := print (default "original" .Site.Params.themeStyle) ".css" | resources.Get | minify }}
+
+
+ {{ if (.Page.Store.Get "hasCodeBlock") }}
+ {{ $syntax := resources.Get "syntax.css" | minify }}
+
+ {{ end }}
+
+ {{ with .Params.style }}
+ {{ $extra := resources.Get . | minify }}
+
+ {{ end }}
+
+ {{ with .OutputFormats.Get "rss" -}}
+ {{ printf ` ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+ {{ end -}}
+
+
+ {{- partial "custom_head.html" . -}}
+
+
+
+
+ {{- partial "header.html" . -}}
+
+
+ {{- block "main" . }}{{- end }}
+
+
+ {{- partial "footer.html" . -}}
+
+
+
+ {{- partial "custom_body.html" . -}}
+
+
+
diff --git a/themes/hugo-bearcub/layouts/_default/list.html b/themes/hugo-bearcub/layouts/_default/list.html
new file mode 100644
index 0000000..e6cc177
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/_default/list.html
@@ -0,0 +1,36 @@
+{{ define "main" }}
+
+ {{ if .Data.Singular }}
+ {{ i18n "filtering-for" }} "{{ .Title }}"
+ {{ end }}
+
+ {{ range .Pages }}
+
+
+
+
+ {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
+
+
+
+ {{ if .Params.link }}
+ {{ .Title }} ↪
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+
+ {{ else }}
+
+ {{ i18n "no-posts" }}
+
+ {{ end }}
+
+ {{ if not .Data.Singular }}
+
+ {{ end }}
+
+{{ end }}
diff --git a/themes/hugo-bearcub/layouts/_default/rss.xml b/themes/hugo-bearcub/layouts/_default/rss.xml
new file mode 100644
index 0000000..70d1193
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/_default/rss.xml
@@ -0,0 +1,72 @@
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- $pctx := . }}
+{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- $pages := slice }}
+{{- if or $.IsHome $.IsSection }}
+{{- $pages = $pctx.RegularPages }}
+{{- else }}
+{{- $pages = $pctx.Pages }}
+{{- end }}
+{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- if ge $limit 1 }}
+{{- $pages = $pages | first $limit }}
+{{- end }}
+{{- printf "" | safeHTML }}
+
+
+ {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}
+ {{ .Permalink }}
+ Recent content {{ if not .IsHome }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}
+ Hugo -- gohugo.io
+ {{ site.Language.LanguageCode }} {{ with $authorEmail }}
+ {{.}}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with $authorEmail }}
+ {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with .Site.Copyright }}
+ {{ . }} {{ end }}{{ if not .Date.IsZero }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
+ {{- with .OutputFormats.Get "RSS" }}
+ {{ printf " " .Permalink .MediaType | safeHTML }}
+ {{- end }}
+ {{- range $pages }}
+ -
+
{{ .Title }}
+ {{ .Permalink }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
+ {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}
+ {{ .Permalink }}
+ {{ .Summary | transform.XMLEscape | safeHTML }}
+ {{ `` | safeHTML }}
+
+ {{- end }}
+
+
diff --git a/themes/hugo-bearcub/layouts/_default/single.html b/themes/hugo-bearcub/layouts/_default/single.html
new file mode 100644
index 0000000..2baecc4
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/_default/single.html
@@ -0,0 +1,28 @@
+{{ define "main" }}
+{{ if not .Params.menu }}
+{{ .Title }}
+
+
+ {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
+
+ {{ with .Params.author }}· {{.}}{{ end }}
+
+{{ end }}
+
+ {{ .Content }}
+
+
+ {{ range (.GetTerms "tags") }}
+ #{{ lower .LinkTitle }}
+ {{ end }}
+
+{{ if not .Params.hideReply }}
+{{ with .Site.Params.author.email }}
+
+
+ {{ i18n "email-reply" }} ↪
+
+
+{{ end }}
+{{ end }}
+{{ end }}
diff --git a/themes/hugo-bearcub/layouts/index.html b/themes/hugo-bearcub/layouts/index.html
new file mode 100644
index 0000000..9983b08
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/index.html
@@ -0,0 +1,3 @@
+{{ define "main" }}
+{{ .Content }}
+{{ end }}
diff --git a/themes/hugo-bearcub/layouts/partials/custom_body.html b/themes/hugo-bearcub/layouts/partials/custom_body.html
new file mode 100644
index 0000000..951fb15
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/custom_body.html
@@ -0,0 +1,3 @@
+
diff --git a/themes/hugo-bearcub/layouts/partials/custom_head.html b/themes/hugo-bearcub/layouts/partials/custom_head.html
new file mode 100644
index 0000000..4c53c40
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/custom_head.html
@@ -0,0 +1,3 @@
+
diff --git a/themes/hugo-bearcub/layouts/partials/favicon.html b/themes/hugo-bearcub/layouts/partials/favicon.html
new file mode 100644
index 0000000..d391a86
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/favicon.html
@@ -0,0 +1,2 @@
+{{ with .Site.Params.favicon }}
+ {{ end }}
diff --git a/themes/hugo-bearcub/layouts/partials/footer.html b/themes/hugo-bearcub/layouts/partials/footer.html
new file mode 100644
index 0000000..9290715
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/footer.html
@@ -0,0 +1,3 @@
+
+ {{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }}
+
\ No newline at end of file
diff --git a/themes/hugo-bearcub/layouts/partials/header.html b/themes/hugo-bearcub/layouts/partials/header.html
new file mode 100644
index 0000000..42b5c10
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/header.html
@@ -0,0 +1,4 @@
+{{ i18n "skip-link" }}
+
+{{ .Site.Title }}
+{{- partial "nav.html" . -}}
diff --git a/themes/hugo-bearcub/layouts/partials/nav.html b/themes/hugo-bearcub/layouts/partials/nav.html
new file mode 100644
index 0000000..53be338
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/nav.html
@@ -0,0 +1,22 @@
+{{ range .Site.Menus.main.ByWeight }}
+ {{ .Name }}
+{{ end }}
+RSS
+
+
+{{ $translations := dict }}
+{{ range .Translations }}
+ {{ $translations = merge $translations (dict .Language.Lang .) }}
+{{ end }}
+
+
+{{ range where .Site.Languages "Lang" "!=" .Page.Lang }}
+ {{ with (index $translations .Lang) }}
+ {{ .Language.LanguageName }}
+ {{ else }}
+
+ {{ if not .Params.hideUntranslated }}
+ {{ .LanguageName }}
+ {{ end }}
+ {{ end }}
+{{ end }}
diff --git a/themes/hugo-bearcub/layouts/partials/seo_tags.html b/themes/hugo-bearcub/layouts/partials/seo_tags.html
new file mode 100644
index 0000000..6ab1422
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/seo_tags.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+{{ if and (and (default false .Site.Params.generateSocialCard) (not (isset .Params "images"))) (eq .Kind "page") }}
+ {{ partial "social_card.html" . }}
+{{ else }}
+
+ {{ template "_internal/opengraph.html" . }}
+
+
+ {{ template "_internal/twitter_cards.html" . }}
+
+
+ {{ template "_internal/schema.html" . }}
+{{ end }}
diff --git a/themes/hugo-bearcub/layouts/partials/social_card.html b/themes/hugo-bearcub/layouts/partials/social_card.html
new file mode 100644
index 0000000..4f89b4f
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/partials/social_card.html
@@ -0,0 +1,124 @@
+
+{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/ofl/firamono/FiraMono-Bold.ttf" }}
+{{ $fg := resources.Get "images/social_card_fg.png"}}
+{{ $bg := resources.Get "images/social_card_bg.png"}}
+
+{{ if gt (len .Title) 45 }}
+ {{ $fg = $fg.Filter (images.Text .Title (dict
+ "font" $font
+ "color" "#fafafa"
+ "size" 95
+ "linespacing" 16
+ "x" 0
+ "y" 0
+ )) }}
+{{ else }}
+ {{ $fg = $fg.Filter (images.Text .Title (dict
+ "font" $font
+ "color" "#fafafa"
+ "size" 130
+ "linespacing" 20
+ "x" 0
+ "y" 0
+ )) }}
+{{ end }}
+
+{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
+{{ $author := (default $.Site.Params.author.name ($.Param "author") ) }}
+{{ $byline := (printf "%s | %s" $author $date) }}
+
+{{ $fg = $fg.Filter (images.Text $byline (dict
+ "font" $font
+ "color" "#898a8d"
+ "size" 60
+ "linespacing" 30
+ "x" 0
+ "y" 425
+)) }}
+
+{{ $card := $bg.Filter (images.Overlay $fg 112 140 ) }}
+{{ $card := $card.Resize "900x webp q100" }}
+
+
+
+
+
+
+
+
+
+
+{{- if .IsPage }}
+{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+
+{{ with .PublishDate }} {{ end }}
+{{ with .Lastmod }} {{ end }}
+{{- end -}}
+
+{{- with .Params.audio }} {{ end }}
+{{- with .Params.locale }} {{ end }}
+{{- with .Site.Params.title }} {{ end }}
+{{- with .Params.videos }}{{- range . }}
+
+{{ end }}{{ end }}
+
+{{- /* If it is part of a series, link to related articles */}}
+{{- $permalink := .Permalink }}
+{{- $siteSeries := .Site.Taxonomies.series }}
+{{- if $siteSeries }}
+{{ with .Params.series }}{{- range $name := . }}
+ {{- $series := index $siteSeries ($name | urlize) }}
+ {{- range $page := first 6 $series.Pages }}
+ {{- if ne $page.Permalink $permalink }} {{ end }}
+ {{- end }}
+{{ end }}{{ end }}
+{{- end }}
+
+{{- $facebookAdmin := "" }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $facebookAdmin = .facebook_admin }}
+ {{- end }}
+{{- end }}
+
+{{- /* Facebook Page Admin ID for Domain Insights */}}
+{{ with $facebookAdmin }} {{ end }}
+
+
+
+
+
+
+
+
+{{- $twitterSite := "" }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $twitterSite = .twitter }}
+ {{- end }}
+{{- end }}
+
+{{- with $twitterSite }}
+ {{- $content := . }}
+ {{- if not (strings.HasPrefix . "@") }}
+ {{- $content = printf "@%v" $twitterSite }}
+ {{- end }}
+
+{{- end }}
+
+
+
+
+
+
+{{- if .IsPage -}}
+{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+{{ with .PublishDate }} {{ end}}
+{{ with .Lastmod }} {{ end}}
+
+
+
+
+
+
+{{- end -}}
diff --git a/themes/hugo-bearcub/layouts/robots.txt b/themes/hugo-bearcub/layouts/robots.txt
new file mode 100644
index 0000000..4f4ca44
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/robots.txt
@@ -0,0 +1,3 @@
+User-agent: *
+Allow: /
+Sitemap: {{ "sitemap.xml" | absURL }}
diff --git a/themes/hugo-bearcub/layouts/shortcodes/absfigure.html b/themes/hugo-bearcub/layouts/shortcodes/absfigure.html
new file mode 100644
index 0000000..ad60c6c
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/shortcodes/absfigure.html
@@ -0,0 +1,29 @@
+
+ {{- if .Get "link" -}}
+
+ {{- end -}}
+
+ {{- if .Get "link" }} {{ end -}}
+ {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
+
+ {{ with (.Get "title") -}}
+ {{ . }}
+ {{- end -}}
+ {{- if or (.Get "caption") (.Get "attr") -}}
+ {{- .Get "caption" | markdownify -}}
+ {{- with .Get "attrlink" }}
+
+ {{- end -}}
+ {{- .Get "attr" | markdownify -}}
+ {{- if .Get "attrlink" }} {{ end }}
+ {{- end }}
+
+ {{- end }}
+
\ No newline at end of file
diff --git a/themes/hugo-bearcub/layouts/shortcodes/highlight.html b/themes/hugo-bearcub/layouts/shortcodes/highlight.html
new file mode 100644
index 0000000..6c86ca8
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/shortcodes/highlight.html
@@ -0,0 +1,5 @@
+
+{{ .Page.Store.Set "hasCodeBlock" true }}
+
+
+{{ if len .Params | eq 2 }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) "" }}{{ end }}
\ No newline at end of file
diff --git a/themes/hugo-bearcub/layouts/shortcodes/rawhtml.html b/themes/hugo-bearcub/layouts/shortcodes/rawhtml.html
new file mode 100644
index 0000000..520ec17
--- /dev/null
+++ b/themes/hugo-bearcub/layouts/shortcodes/rawhtml.html
@@ -0,0 +1,2 @@
+
+{{.Inner}}
\ No newline at end of file
diff --git a/themes/hugo-bearcub/theme.toml b/themes/hugo-bearcub/theme.toml
new file mode 100644
index 0000000..602a351
--- /dev/null
+++ b/themes/hugo-bearcub/theme.toml
@@ -0,0 +1,29 @@
+name = "Bear Cub"
+license = "MIT"
+licenselink = "https://github.com/clente/hugo-bearcub/blob/master/LICENSE"
+description = "A lightweight Hugo theme based on Bear Blog and Hugo Bear Blog. It is free, multilingual, optimized for search engines, no-nonsense, responsive, light, and fast. Really fast."
+
+# The home page of the theme, where the source can be found.
+homepage = "https://github.com/clente/hugo-bearcub"
+
+# If you have a running demo of the theme.
+demosite = "https://clente.github.io/hugo-bearcub"
+
+tags = ["blog", "responsive", "minimal", "personal", "dark", "multilingual"]
+features = ["favicon", "seo", "no javascript", "rss", "social cards"]
+
+# If the theme has a single author
+[author]
+ name = "Caio Lente"
+ homepage = "https://lente.dev"
+
+# If porting an existing theme
+[original]
+ author = "Jan Raasch"
+ homepage = "https://www.janraasch.com"
+ repo = "https://github.com/janraasch/hugo-bearblog"
+
+# Hugo versions the theme supports
+[module]
+ [module.hugoVersion]
+ min = "0.90"
diff --git a/update-theme.sh b/update-theme.sh
index 186abf8..49aeaa8 100755
--- a/update-theme.sh
+++ b/update-theme.sh
@@ -1,6 +1,6 @@
rm -rf themes
mkdir themes
cd themes
-git clone --depth=1 https://github.com/athul/archie.git
+git clone --depth=1 https://github.com/clente/hugo-bearcub.git
rm -rf */.git*
git add .