assets/js/app.min.js in jekyll-theme-h2o-ac-1.3.6 vs assets/js/app.min.js in jekyll-theme-h2o-ac-1.4.0

- old
+ new

@@ -1 +1 @@ -(()=>{var t={774:()=>{$(document).ready((function(){document.body.addEventListener("touchstart",(function(){}),{passive:!0});var t=$(".g-nav"),e=$("meta[property='og:baseurl']").attr("content"),a=$("meta[property='og:lang']").attr("content"),o=$(".g-logo"),n=$(".g-banner").attr("data-theme");if(o.css({background:"url("+e+"/assets/icons/"+n+".svg) no-repeat center","background-size":"100% 100%"}),u("cookieconsent_status")?$(".cookie-tip").removeClass("active"):$(".cookie-tip").addClass("active"),$("#accept-tos").on("click",(function(){p("cookieconsent_status","allow",365),$(".cookie-tip").removeClass("active")})),$("table").wrap("<div class='table-area'></div>"),$("#menu-toggle").on("click",(function(e){t.slideToggle(200),$(document).on("click",(function(){t.slideUp(200)})),e.stopPropagation()})),t.on("click",(function(t){t.stopPropagation()})),$(".g-nav li.dropdown").on("click",(function(){$(".g-nav li.dropdown").not($(this)).children("ul.dropdown-menu").removeClass("show"),$(".g-nav li.dropdown").not($(this)).children("a.dropdown-toggle").removeClass("show"),$(this).children("a.dropdown-toggle").toggleClass("show"),$(this).children("ul.dropdown-menu").toggleClass("show")})),$(document).on("click",(function(){$(".g-nav li.dropdown").children("a.dropdown-toggle").removeClass("show"),$(".g-nav li.dropdown").children("ul.dropdown-menu").removeClass("show")})),$(window).width()>695){var s=(r=$(".g-header")).outerHeight(),i=t.find("a"),l=$(document).scrollTop();o=$(".g-logo"),n=$(".g-banner").attr("data-theme"),$(document).scroll((function(){var a=$(this).scrollTop(),c="nav-"+n;a>s?(a>3*s&&r.addClass("headerUp"),r.css({"background-color":"rgba(255, 255, 255, .98)","box-shadow":"0 1px 12px rgba(0, 0, 0, .08)"}),o.css({background:"url("+e+"/assets/icons/"+n+".svg) no-repeat center","background-size":"100% 100%"}),i.addClass("color-f-gray"),t.addClass(c)):(r.removeClass("headerUp"),$("#bttb").removeClass("active"),r.css({"background-color":"transparent","box-shadow":"none"}),o.css({background:"url("+e+"/assets/icons/"+n+".svg) no-repeat center","background-size":"100% 100%"}),i.removeClass("color-f-gray"),t.removeClass(c)),l>a?(r.addClass("headerDown"),r.hasClass("headerUp")&&$("#bttb").addClass("active")):(r.removeClass("headerDown"),$("#bttb").removeClass("active")),l=a}))}else{var r;s=(r=$(".g-header")).outerHeight(),l=$(document).scrollTop(),$(document).scroll((function(){var t=$(this).scrollTop();t<100&&$("#bttb").removeClass("active"),l>t&&l>5?$("#bttb").addClass("active"):$("#bttb").removeClass("active"),l=t}))}function c(){$(".table-of-contents").toggleClass("active"),$("#tools .tool.toc .b1").toggleClass("active"),$("#tools .tool.toc .b2").toggleClass("active"),$(".submenu").removeClass("active"),$("#tools .tool.collection .b1").addClass("active"),$("#tools .tool.collection .b2").removeClass("active")}function d(){$(".submenu").toggleClass("active"),$("#tools .tool.collection .b1").toggleClass("active"),$("#tools .tool.collection .b2").toggleClass("active"),$(".table-of-contents").removeClass("active"),$("#tools .tool.toc .b1").addClass("active"),$("#tools .tool.toc .b2").removeClass("active")}function g(){var t,e,a,o=$("#search_input"),n=$(".search_result");o.focus((function(){$(".icon-search").css("color","#3199DB"),n.show()})),o.keyup((t=this.autoComplete,e=e||120,function(){var o=this,n=arguments;clearTimeout(a),a=setTimeout((function(){t.apply(o,n)}),e)})),$(document).click((function(t){"search_input"!==t.target.id&&"search_result"!==t.target.className&&"search_item"!==t.target.className&&($(".icon-search").css("color","#CAD3DC"),n.hide())}))}function h(){var t=$("article :header"),e=$(".table-of-contents a").parent(),a=$(window).scrollTop();a>0&&$(".g-header").addClass("headerUp");for(var o=0;o<t.length;o++){var n=$(t[o]).offset().top-100;if(n<a){$(e).removeClass("active"),$(e[o]).addClass("active"),n=$(".toc-body li.active").offset().top-$(".toc-header h2").offset().top;var s=$(".toc-body li.active").offset().top-$(".toc-body li:first-child").offset().top;n<22&&$(".toc-body").scrollTop(s-350),n>350&&$(".toc-body").scrollTop(s-72)}}}function u(t){for(var e=t+"=",a=document.cookie.split(";"),o=0;o<a.length;o++){var n=a[o].trim();if(0===n.indexOf(e))return n.substring(e.length,n.length)}return""}function p(t,a,o){var n=new Date;n.setTime(n.getTime()+24*o*60*60*1e3);var s="expires="+n.toGMTString();document.cookie=e?t+"="+a+"; path="+e+"; "+s:t+"="+a+"; path=/; "+s}function m(){var t=u("mode");""==t||"day"==t?(p("mode","night",1),$("body").addClass("night-mode")):(p("mode","day",1),$("body").removeClass("night-mode")),$("#disqus_thread").length>0&&DISQUS.reset({reload:!0}),$(".g-nav li.mode .icon").toggleClass("active"),$("#mode-toggle .icon").toggleClass("active"),$(".icon.up.day").toggleClass("active"),$(".icon.up.night").toggleClass("active"),"visible"==$(".table-of-contents").css("visibility")?($(".icon.exit.day").toggleClass("active"),$(".icon.exit.night").toggleClass("active")):($(".icon.list.day").toggleClass("active"),$(".icon.list.night").toggleClass("active"))}$("#tools .tool.toc").bind("click",(function(){c()})),$("#tools .tool.collection").bind("click",(function(){d()})),$(".table-of-contents").on("click",(function(){c()})),$(".submenu").on("click",(function(){d()})),$(".bttb").bind("click",(function(){$("html,body").animate({scrollTop:0},(function(){$("#bttb").removeClass("active")}))})),$(".read-next-item section").each((function(){var t=$(this).height(),e=$(".read-next-item").height();$(this).css("margin-top",(e-t)/2+"px"),$(this).fadeIn()})),$(".read-next-item img").each((function(){!function(t,e){t.width(),e.width();var a=t.height(),o=e.height();if(a<o){t.css({width:"auto",height:"100%"});var n=(t.width()-e.width())/2;t.css("margin-left","-"+n+"px")}else{var s=(o-a)/2;t.css("margin-top",s+"px")}t.fadeIn()}($(this),$(".read-next-item")),$(this).attr("data-src",$(this).attr("src")).removeAttr("src").addClass("lazyload")})),function(){for(var t=parseInt($("#total_pages").val()),e=parseInt($("#current_pages").val()),a=$("#base_url").val(),o="",n=e-3;n<e;n++)n>0&&1!==n?o+='<a href="'+a+"page"+n+'/index.html" class="page-link page-num">'+n+"</a>":1===n&&(o+='<a href="'+a+'" class="page-link page-num">'+n+"</a>");o+='<span class="page-link page-num active">'+e+"</span>";for(var s=e+1;s<=e+3;s++)s<=t&&(o+='<a href="'+a+"page"+s+'/index.html" class="page-link page-num">'+s+"</a>");$("#page-link-container").html(o)}(),g.prototype.autoComplete=function(){var t=this.value.toLowerCase();t.length?$(".icon-search").css("color","#3199DB"):$(".icon-search").css("color","#CAD3DC");var a=e+"/assets/search.json";$.getJSON(a).done((function(e){var a="";for(var o in e){var n=e[o],s=n.title,i=n.tags;n.url,""!==t&&(s+i).toLowerCase().indexOf(t)>=0&&(a+='<a class="search_item" href="'+n.url+'">'+n.title+"</a>")}$(".search_result").html(a)}))},new g,"true"===$("#nm-switch").val()&&function(){$("body");var t=(new Date).getHours();""==u("mode")&&(t<=6||t>=18)&&p("mode","night",1)}(),$(".post-content").on("mouseup",(function(t){var e,a=window.getSelection();a.toString().length>=30&&(e=a,e+="\n\n著作权归作者所有。\n商业转载请联系作者获得授权,非商业转载请注明出处。\n原文: "+location.href,$(".post-content").on("copy",(function(t){(window.clipboardData||t.originalEvent.clipboardData).setData("text/plain",e),t.preventDefault()})))})),$(".toc-body").length>0&&($($(".table-of-contents a").parent()[0]).addClass("active"),h(),$(window).bind("scroll",h)),"night"==u("mode")?($(".g-nav li.mode .night").addClass("active"),$("#mode-toggle .icon-night").addClass("active"),$("body").addClass("night-mode"),$(".icon.up.night").toggleClass("active"),$(".icon.list.night").toggleClass("active")):($(".g-nav li.mode .day").addClass("active"),$("#mode-toggle .icon-day").addClass("active"),$("body").removeClass("night-mode"),$(".icon.up.day").toggleClass("active"),$(".icon.list.day").toggleClass("active")),$(".g-nav li.mode").click((function(){m()})),$("#mode-toggle").click((function(){m()})),$("pre").each((function(t){var e="codeblock"+(t+1);$(this).attr("id",e);var a=$(this).attr("class").split(" ")[1].substring(9).toUpperCase();if("ERS"==a)if("MERMAID2"==(a=$(this).attr("class").split(" ")[0].substring(9).toUpperCase()))text=$(this).text(),$(this).before('<summary class="render-expand" aria-haspopup="dialog" role="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="octicon" style="display:inline-block;vertical-align:text-bottom"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 1.06L2.56 7h10.88l-2.22-2.22a.75.75 0 011.06-1.06l3.5 3.5a.75.75 0 010 1.06l-3.5 3.5a.75.75 0 11-1.06-1.06l2.22-2.22H2.56l2.22 2.22a.75.75 0 11-1.06 1.06l-3.5-3.5a.75.75 0 010-1.06l3.5-3.5z"></path></svg></summary>'),$(this).after('<div class="mermaid2">'+text+"</div>");else{$(this).wrap('<div class="highlight"></div>'),$(this).parent().wrap('<div class="'+$(this).attr("class").split(" ")[0]+' highlighter-rouge"></div>'),$(this).addClass("highlight");var o='<div class="copy-container"><span class="lang">'+a+'</span><button class="btn" data-bs-original-title="Copy" aria-label="Copy" data-clipboard-target="#'+e+'"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-copy"></use></svg><span class="tooltip unfinish">Copy</span><span class="tooltip finish">Copied</span></button></div>';$(this).before(o)}else o='<div class="copy-container"><span class="lang">'+a+'</span><button class="btn" data-bs-original-title="Copy" aria-label="Copy" data-clipboard-target="#'+e+'"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-copy"></use></svg><span class="tooltip unfinish">Copy</span><span class="tooltip finish">Copied</span></button></div>',$(this).before(o)})),new ClipboardJS(".btn").on("success",(function(t){t.clearSelection()})),$(".markdown-body .btn").hover((function(){$(this).find(".tooltip.unfinish").addClass("active")}),(function(){$(this).find(".tooltip.unfinish").removeClass("active")})),$(".markdown-body .btn").click((function(){$(this).find(".tooltip.unfinish").removeClass("active");var t=$(this).find(".tooltip.finish");t.addClass("active"),setTimeout((function(){t.removeClass("active")}),500)})),$("summary").click((function(t){var e=$(this).next().children().text();$(".modal .modal-content .container").html('<div class="mermaid2">'+e+"</div>"),mermaid.init(void 0,$(".modal .modal-content .mermaid2")),$(".modal").css("visibility","visible"),$(".modal .modal-content").click((function(t){t.target.classList.contains("close")&&$(".modal").css("visibility","hidden"),t.stopPropagation()})),t.stopPropagation()})),$(document).click((function(){$(".modal").css("visibility","hidden")})),document.addEventListener("error",(function(t){"IMG"==t.target.nodeName&&(t.target.src=e+"/assets/img/placeholder.webp")}),!0);var v=$(".alivetime_days"),b=$(".alivetime_hours"),f=$(".alivetime_minutes"),y=$(".alivetime_seconds");!function t(){var e=$("meta[name='alivestart']").attr("content");window.setTimeout(t,1e3),BirthDay=new Date(e),today=new Date,timeold=today.getTime()-BirthDay.getTime(),secondsold=Math.floor(timeold/1e3),e_daysold=timeold/864e5,daysold=Math.floor(e_daysold),e_hrsold=24*(e_daysold-daysold),hrsold=Math.floor(e_hrsold),e_minsold=60*(e_hrsold-hrsold),minsold=Math.floor(e_minsold),seconds=Math.floor(60*(e_minsold-minsold)),v.html(daysold),b.html(hrsold),f.html(minsold),y.html(seconds)}();var C=$("meta[property='calendar-scale']").attr("content"),w=$("meta[property='calendar-scheme']").attr("content"),x=$("meta[property='calendar-color']").attr("content"),D={type:"threshold",domain:[4,6,8]};function k(t,e,o,n="False"){var s={},i=[[Tooltip,{text:function(t,e,a){return 1==e?e+" contribution on "+a.format(s.format):(e?e+" contributions":"No contribution")+" on "+a.format(s.format)}}],[LegendLite,{includeBlank:!0,itemSelector:e.legend,radius:3,width:10,height:10,gutter:2}]];if("month"==o){const e=function(t){return{name:"xMonth",allowedDomainType:["year"],rowsCount:()=>3,columnsCount:()=>4,mapping:(e,a)=>t.intervals("month",e,t.date(a)).map((e=>({t:e,x:t.date(e).month()%4,y:parseInt(t.date(e).month()/4)}))),extractUnit:e=>t.date(e).startOf("month").valueOf()}};t.addTemplates(e),s={format:"YYYY-MM",domain:{type:"year",gutter:5,label:{text:t=>dayjs(t).format("YYYY"),align:"middle"}},subDomain:{type:"xMonth",width:60,height:36,gutter:5,radius:3},range:1};var l=new Date(dayjs(endDay).startOf("year").add(1,"month"))}else if("year"==o){const e=function(t){return{name:"xYear",allowedDomainType:["year"],rowsCount:()=>1,columnsCount:()=>1,mapping:(e,a)=>t.intervals("year",e,t.date(a)).map(((t,e)=>({t,x:e,y:0}))),extractUnit:e=>t.date(e).startOf("year").valueOf()}};t.addTemplates(e),s={format:"YYYY",domain:{type:"year",gutter:5,label:{text:"YYYY",align:"middle"}},subDomain:{type:"xYear",width:36,height:36,gutter:5,radius:3},range:6},"False"==n&&(s.range=parseInt($("#cal-heatmap").width()/40)),l=new Date(dayjs(endDay).subtract(s.range-1,"year"))}else s={format:"YYYY-MM-DD",domain:{type:"month",gutter:5,label:{text:"MMM",align:"start"}},subDomain:{type:"ghDay",width:13,height:13,gutter:5,radius:3},range:3},l=new Date(dayjs(endDay).subtract(s.range-1,"month")),i[2]=[CalendarLabel,{width:30,textAlign:"start",text:()=>dayjs.weekdaysShort().map(((t,e)=>e%2==0?"":t)),padding:[25,0,0,0]}];if("True"==n&&(postWidth=$(".post-content").width(),postWidth>=633?s.range=12:postWidth>=400?s.range=8:postWidth>=300?s.range=6:s.range=3,s.domain.gutter=2,s.subDomain.width=9,s.subDomain.height=9,s.subDomain.gutter=2,s.subDomain.radius=2,l=new Date(dayjs(endDay).subtract(s.range-1,"month"))),"month"==o)var r=stats_data.calendar.by_month;else r="year"==o?stats_data.calendar.by_year:stats_data.calendar.by_day;return t.paint({itemSelector:e.cal,domain:{type:s.domain.type,gutter:s.domain.gutter,label:{text:s.domain.label.text,textAlign:s.domain.label.align,position:"top"}},subDomain:{type:s.subDomain.type,gutter:s.subDomain.gutter,width:s.subDomain.width,height:s.subDomain.height,radius:s.subDomain.radius,label:null},date:{start:l,max:new Date(endDay),highlight:[new Date(endDay)],locale:locales[a]},range:s.range,data:{source:r,x:"date",y:"count"},scale:{color:D}},i),$(e.prev).on("click",(function(e){e.preventDefault(),t.previous()})),$(e.next).on("click",(function(e){e.preventDefault(),t.next()})),$(e.today).on("click",(function(e){e.preventDefault(),t.jumpTo(new Date(endDay))})),t}"null"!==w?["blues","greens","greys","oranges","purples","reds","bugn","bupu","gnbu","orrd","pubu","pubugn","purd","rdpu","ylgn","ylgnbu","ylorbr","ylorrd","cividis","inferno","magma","plasma","viridis","cubehelix","turbo","warm","cool","brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd","rainbow","sinebow"].includes(w)?D.scheme=w:(D.range=["#9be9a8","#40c463","#30a14e","#216e39"],console.log("'"+w+"' is not supported. Please check it in https://cal-heatmap.com/!")):D.range="null"!==x?x:["#9be9a8","#40c463","#30a14e","#216e39"],today=new Date,year=today.getFullYear(),month=today.getMonth()+1,day=today.getDate(),endDay=year+"-"+("0"+month).slice(-2)+"-"+("0"+day).slice(-2),locales={"zh-Hans":"zh","zh-Hant":"zh-tw",en:"en",ja:"ja"},axios.get(e+"/stats.json").then((t=>{if(stats_data=t.data,$("#cal-heatmap").length>0){var e=new CalHeatmap;selectors={cal:"#cal-heatmap",legend:"#ex-ghDay-legend",prev:"#ex-ghDay-prev",next:"#ex-ghDay-next",today:"#ex-ghDay-today"},e=k(e,selectors,C)}if($("#archive-heatmap").length>0){var a=new CalHeatmap;selectors2={cal:"#archive-heatmap",legend:"#ex-ghDay-legend2",prev:"#ex-ghDay-prev2",next:"#ex-ghDay-next2",today:"#ex-ghDay-today2"},a=k(a,selectors2,"day","True")}})).catch((function(t){console.log("'stats.json' is not found. Calendar will be abnormal. Please make sure it exits.")}))}))}},e={};function a(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,a),s.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";a(774)})()})(); +(()=>{var t={774:()=>{$(document).ready((function(){document.body.addEventListener("touchstart",(function(){}),{passive:!0});var t=$(".g-nav"),e=$("meta[property='og:baseurl']").attr("content"),a=$("meta[property='og:lang']").attr("content"),o=$(".g-logo"),n=$(".g-banner").attr("data-theme");if(o.css({background:"url("+e+"/assets/icons/"+n+".svg) no-repeat center","background-size":"100% 100%"}),u("cookieconsent_status")?$(".cookie-tip").removeClass("active"):$(".cookie-tip").addClass("active"),$("#accept-tos").on("click",(function(){p("cookieconsent_status","allow",365),$(".cookie-tip").removeClass("active")})),$("table").wrap("<div class='table-area'></div>"),$("#menu-toggle").on("click",(function(e){t.slideToggle(200),$(document).on("click",(function(){t.slideUp(200)})),e.stopPropagation()})),t.on("click",(function(t){t.stopPropagation()})),$(".g-nav li.dropdown").on("click",(function(){$(".g-nav li.dropdown").not($(this)).children("ul.dropdown-menu").removeClass("show"),$(".g-nav li.dropdown").not($(this)).children("a.dropdown-toggle").removeClass("show"),$(this).children("a.dropdown-toggle").toggleClass("show"),$(this).children("ul.dropdown-menu").toggleClass("show")})),$(document).on("click",(function(){$(".g-nav li.dropdown").children("a.dropdown-toggle").removeClass("show"),$(".g-nav li.dropdown").children("ul.dropdown-menu").removeClass("show")})),$(window).width()>695){var s=(r=$(".g-header")).outerHeight(),i=t.find("a"),l=$(document).scrollTop();o=$(".g-logo"),n=$(".g-banner").attr("data-theme"),$(document).scroll((function(){var a=$(this).scrollTop(),c="nav-"+n;a>s?(a>3*s&&r.addClass("headerUp"),r.css({"background-color":"rgba(255, 255, 255, .98)","box-shadow":"0 1px 12px rgba(0, 0, 0, .08)"}),o.css({background:"url("+e+"/assets/icons/"+n+".svg) no-repeat center","background-size":"100% 100%"}),i.addClass("color-f-gray"),t.addClass(c)):(r.removeClass("headerUp"),$("#bttb").removeClass("active"),r.css({"background-color":"transparent","box-shadow":"none"}),o.css({background:"url("+e+"/assets/icons/"+n+".svg) no-repeat center","background-size":"100% 100%"}),i.removeClass("color-f-gray"),t.removeClass(c)),l>a?(r.addClass("headerDown"),r.hasClass("headerUp")&&$("#bttb").addClass("active")):(r.removeClass("headerDown"),$("#bttb").removeClass("active")),l=a}))}else{var r;s=(r=$(".g-header")).outerHeight(),l=$(document).scrollTop(),$(document).scroll((function(){var t=$(this).scrollTop();t<100&&$("#bttb").removeClass("active"),l>t&&l>5?$("#bttb").addClass("active"):$("#bttb").removeClass("active"),l=t}))}function c(){$(".table-of-contents").toggleClass("active"),$("#tools .tool.toc .b1").toggleClass("active"),$("#tools .tool.toc .b2").toggleClass("active"),$(".submenu").removeClass("active"),$("#tools .tool.collection .b1").addClass("active"),$("#tools .tool.collection .b2").removeClass("active")}function d(){$(".submenu").toggleClass("active"),$("#tools .tool.collection .b1").toggleClass("active"),$("#tools .tool.collection .b2").toggleClass("active"),$(".table-of-contents").removeClass("active"),$("#tools .tool.toc .b1").addClass("active"),$("#tools .tool.toc .b2").removeClass("active")}function g(){var t,e,a,o=$("#search_input"),n=$(".search_result");o.focus((function(){$(".icon-search").css("color","#3199DB"),n.show()})),o.keyup((t=this.autoComplete,e=e||120,function(){var o=this,n=arguments;clearTimeout(a),a=setTimeout((function(){t.apply(o,n)}),e)})),$(document).click((function(t){"search_input"!==t.target.id&&"search_result"!==t.target.className&&"search_item"!==t.target.className&&($(".icon-search").css("color","#CAD3DC"),n.hide())}))}function h(){var t=$("article :header"),e=$(".table-of-contents a").parent(),a=$(window).scrollTop();a>0&&$(".g-header").addClass("headerUp");for(var o=0;o<t.length;o++){var n=$(t[o]).offset().top-100;if(n<a){$(e).removeClass("active"),$(e[o]).addClass("active"),n=$(".toc-body li.active").offset().top-$(".toc-header h2").offset().top;var s=$(".toc-body li.active").offset().top-$(".toc-body li:first-child").offset().top;n<22&&$(".toc-body").scrollTop(s-350),n>350&&$(".toc-body").scrollTop(s-72)}}}function u(t){for(var e=t+"=",a=document.cookie.split(";"),o=0;o<a.length;o++){var n=a[o].trim();if(0===n.indexOf(e))return n.substring(e.length,n.length)}return""}function p(t,a,o){var n=new Date;n.setTime(n.getTime()+24*o*60*60*1e3);var s="expires="+n.toGMTString();document.cookie=e?t+"="+a+"; path="+e+"; "+s:t+"="+a+"; path=/; "+s}function m(){var t=u("mode");""==t||"day"==t?(p("mode","night",1),$("body").addClass("night-mode")):(p("mode","day",1),$("body").removeClass("night-mode")),$("#disqus_thread").length>0&&DISQUS.reset({reload:!0}),$(".giscus").length>0&&changeGiscusTheme(),$(".g-nav li.mode .icon").toggleClass("active"),$("#mode-toggle .icon").toggleClass("active"),$(".icon.up.day").toggleClass("active"),$(".icon.up.night").toggleClass("active"),"visible"==$(".table-of-contents").css("visibility")?($(".icon.exit.day").toggleClass("active"),$(".icon.exit.night").toggleClass("active")):($(".icon.list.day").toggleClass("active"),$(".icon.list.night").toggleClass("active"))}$("#tools .tool.toc").bind("click",(function(){c()})),$("#tools .tool.collection").bind("click",(function(){d()})),$(".table-of-contents").on("click",(function(){c()})),$(".submenu").on("click",(function(){d()})),$(".bttb").bind("click",(function(){$("html,body").animate({scrollTop:0},(function(){$("#bttb").removeClass("active")}))})),$(".read-next-item section").each((function(){var t=$(this).height(),e=$(".read-next-item").height();$(this).css("margin-top",(e-t)/2+"px"),$(this).fadeIn()})),$(".read-next-item img").each((function(){!function(t,e){t.width(),e.width();var a=t.height(),o=e.height();if(a<o){t.css({width:"auto",height:"100%"});var n=(t.width()-e.width())/2;t.css("margin-left","-"+n+"px")}else{var s=(o-a)/2;t.css("margin-top",s+"px")}t.fadeIn()}($(this),$(".read-next-item")),$(this).attr("data-src",$(this).attr("src")).removeAttr("src").addClass("lazyload")})),function(){for(var t=parseInt($("#total_pages").val()),e=parseInt($("#current_pages").val()),a=$("#base_url").val(),o="",n=e-3;n<e;n++)n>0&&1!==n?o+='<a href="'+a+"page"+n+'/index.html" class="page-link page-num">'+n+"</a>":1===n&&(o+='<a href="'+a+'" class="page-link page-num">'+n+"</a>");o+='<span class="page-link page-num active">'+e+"</span>";for(var s=e+1;s<=e+3;s++)s<=t&&(o+='<a href="'+a+"page"+s+'/index.html" class="page-link page-num">'+s+"</a>");$("#page-link-container").html(o)}(),g.prototype.autoComplete=function(){var t=this.value.toLowerCase();t.length?$(".icon-search").css("color","#3199DB"):$(".icon-search").css("color","#CAD3DC");var a=e+"/assets/search.json";$.getJSON(a).done((function(e){var a="";for(var o in e){var n=e[o],s=n.title,i=n.tags;n.url,""!==t&&(s+i).toLowerCase().indexOf(t)>=0&&(a+='<a class="search_item" href="'+n.url+'">'+n.title+"</a>")}$(".search_result").html(a)}))},new g,"true"===$("#nm-switch").val()&&function(){$("body");var t=(new Date).getHours();""==u("mode")&&(t<=6||t>=18)&&p("mode","night",1)}(),$(".post-content").on("mouseup",(function(t){var e,a=window.getSelection();a.toString().length>=30&&(e=a,e+="\n\n著作权归作者所有。\n商业转载请联系作者获得授权,非商业转载请注明出处。\n原文: "+location.href,$(".post-content").on("copy",(function(t){(window.clipboardData||t.originalEvent.clipboardData).setData("text/plain",e),t.preventDefault()})))})),$(".toc-body").length>0&&($($(".table-of-contents a").parent()[0]).addClass("active"),h(),$(window).bind("scroll",h)),"night"==u("mode")?($(".g-nav li.mode .night").addClass("active"),$("#mode-toggle .icon-night").addClass("active"),$("body").addClass("night-mode"),$(".icon.up.night").toggleClass("active"),$(".icon.list.night").toggleClass("active")):($(".g-nav li.mode .day").addClass("active"),$("#mode-toggle .icon-day").addClass("active"),$("body").removeClass("night-mode"),$(".icon.up.day").toggleClass("active"),$(".icon.list.day").toggleClass("active")),$(".g-nav li.mode").click((function(){m()})),$("#mode-toggle").click((function(){m()})),$("pre").each((function(t){var e="codeblock"+(t+1);$(this).attr("id",e);var a=$(this).attr("class").split(" ")[1].substring(9).toUpperCase();if("ERS"==a)if("MERMAID2"==(a=$(this).attr("class").split(" ")[0].substring(9).toUpperCase()))text=$(this).text(),$(this).before('<summary class="render-expand" aria-haspopup="dialog" role="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="octicon" style="display:inline-block;vertical-align:text-bottom"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 1.06L2.56 7h10.88l-2.22-2.22a.75.75 0 011.06-1.06l3.5 3.5a.75.75 0 010 1.06l-3.5 3.5a.75.75 0 11-1.06-1.06l2.22-2.22H2.56l2.22 2.22a.75.75 0 11-1.06 1.06l-3.5-3.5a.75.75 0 010-1.06l3.5-3.5z"></path></svg></summary>'),$(this).after('<div class="mermaid2">'+text+"</div>");else{$(this).wrap('<div class="highlight"></div>'),$(this).parent().wrap('<div class="'+$(this).attr("class").split(" ")[0]+' highlighter-rouge"></div>'),$(this).addClass("highlight");var o='<div class="copy-container"><span class="lang">'+a+'</span><button class="btn" data-bs-original-title="Copy" aria-label="Copy" data-clipboard-target="#'+e+'"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-copy"></use></svg><span class="tooltip unfinish">Copy</span><span class="tooltip finish">Copied</span></button></div>';$(this).before(o)}else o='<div class="copy-container"><span class="lang">'+a+'</span><button class="btn" data-bs-original-title="Copy" aria-label="Copy" data-clipboard-target="#'+e+'"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-copy"></use></svg><span class="tooltip unfinish">Copy</span><span class="tooltip finish">Copied</span></button></div>',$(this).before(o)})),new ClipboardJS(".btn").on("success",(function(t){t.clearSelection()})),$(".markdown-body .btn").hover((function(){$(this).find(".tooltip.unfinish").addClass("active")}),(function(){$(this).find(".tooltip.unfinish").removeClass("active")})),$(".markdown-body .btn").click((function(){$(this).find(".tooltip.unfinish").removeClass("active");var t=$(this).find(".tooltip.finish");t.addClass("active"),setTimeout((function(){t.removeClass("active")}),500)})),$("summary").click((function(t){var e=$(this).next().children().text();$(".modal .modal-content .container").html('<div class="mermaid2">'+e+"</div>"),mermaid.init(void 0,$(".modal .modal-content .mermaid2")),$(".modal").css("visibility","visible"),$(".modal .modal-content").click((function(t){t.target.classList.contains("close")&&$(".modal").css("visibility","hidden"),t.stopPropagation()})),t.stopPropagation()})),$(document).click((function(){$(".modal").css("visibility","hidden")})),document.addEventListener("error",(function(t){"IMG"==t.target.nodeName&&(t.target.src=e+"/assets/img/placeholder.webp")}),!0);var v=$(".alivetime_days"),b=$(".alivetime_hours"),f=$(".alivetime_minutes"),y=$(".alivetime_seconds");!function t(){var e=$("meta[name='alivestart']").attr("content");window.setTimeout(t,1e3),BirthDay=new Date(e),today=new Date,timeold=today.getTime()-BirthDay.getTime(),secondsold=Math.floor(timeold/1e3),e_daysold=timeold/864e5,daysold=Math.floor(e_daysold),e_hrsold=24*(e_daysold-daysold),hrsold=Math.floor(e_hrsold),e_minsold=60*(e_hrsold-hrsold),minsold=Math.floor(e_minsold),seconds=Math.floor(60*(e_minsold-minsold)),v.html(daysold),b.html(hrsold),f.html(minsold),y.html(seconds)}();var C=$("meta[property='calendar-scale']").attr("content"),w=$("meta[property='calendar-scheme']").attr("content"),x=$("meta[property='calendar-color']").attr("content"),D={type:"threshold",domain:[4,6,8]};function k(t,e,o,n="False"){var s={},i=[[Tooltip,{text:function(t,e,a){return 1==e?e+" contribution on "+a.format(s.format):(e?e+" contributions":"No contribution")+" on "+a.format(s.format)}}],[LegendLite,{includeBlank:!0,itemSelector:e.legend,radius:3,width:10,height:10,gutter:2}]];if("month"==o){const e=function(t){return{name:"xMonth",allowedDomainType:["year"],rowsCount:()=>3,columnsCount:()=>4,mapping:(e,a)=>t.intervals("month",e,t.date(a)).map((e=>({t:e,x:t.date(e).month()%4,y:parseInt(t.date(e).month()/4)}))),extractUnit:e=>t.date(e).startOf("month").valueOf()}};t.addTemplates(e),s={format:"YYYY-MM",domain:{type:"year",gutter:5,label:{text:t=>dayjs(t).format("YYYY"),align:"middle"}},subDomain:{type:"xMonth",width:60,height:36,gutter:5,radius:3},range:1};var l=new Date(dayjs(endDay).startOf("year").add(1,"month"))}else if("year"==o){const e=function(t){return{name:"xYear",allowedDomainType:["year"],rowsCount:()=>1,columnsCount:()=>1,mapping:(e,a)=>t.intervals("year",e,t.date(a)).map(((t,e)=>({t,x:e,y:0}))),extractUnit:e=>t.date(e).startOf("year").valueOf()}};t.addTemplates(e),s={format:"YYYY",domain:{type:"year",gutter:5,label:{text:"YYYY",align:"middle"}},subDomain:{type:"xYear",width:36,height:36,gutter:5,radius:3},range:6},"False"==n&&(s.range=parseInt($("#cal-heatmap").width()/40)),l=new Date(dayjs(endDay).subtract(s.range-1,"year"))}else s={format:"YYYY-MM-DD",domain:{type:"month",gutter:5,label:{text:"MMM",align:"start"}},subDomain:{type:"ghDay",width:13,height:13,gutter:5,radius:3},range:3},l=new Date(dayjs(endDay).subtract(s.range-1,"month")),i[2]=[CalendarLabel,{width:30,textAlign:"start",text:()=>dayjs.weekdaysShort().map(((t,e)=>e%2==0?"":t)),padding:[25,0,0,0]}];if("True"==n&&(postWidth=$(".post-content").width(),postWidth>=633?s.range=12:postWidth>=400?s.range=8:postWidth>=300?s.range=6:s.range=3,s.domain.gutter=2,s.subDomain.width=9,s.subDomain.height=9,s.subDomain.gutter=2,s.subDomain.radius=2,l=new Date(dayjs(endDay).subtract(s.range-1,"month"))),"month"==o)var r=stats_data.calendar.by_month;else r="year"==o?stats_data.calendar.by_year:stats_data.calendar.by_day;return t.paint({itemSelector:e.cal,domain:{type:s.domain.type,gutter:s.domain.gutter,label:{text:s.domain.label.text,textAlign:s.domain.label.align,position:"top"}},subDomain:{type:s.subDomain.type,gutter:s.subDomain.gutter,width:s.subDomain.width,height:s.subDomain.height,radius:s.subDomain.radius,label:null},date:{start:l,max:new Date(endDay),highlight:[new Date(endDay)],locale:locales[a]},range:s.range,data:{source:r,x:"date",y:"count"},scale:{color:D}},i),$(e.prev).on("click",(function(e){e.preventDefault(),t.previous()})),$(e.next).on("click",(function(e){e.preventDefault(),t.next()})),$(e.today).on("click",(function(e){e.preventDefault(),t.jumpTo(new Date(endDay))})),t}"null"!==w?["blues","greens","greys","oranges","purples","reds","bugn","bupu","gnbu","orrd","pubu","pubugn","purd","rdpu","ylgn","ylgnbu","ylorbr","ylorrd","cividis","inferno","magma","plasma","viridis","cubehelix","turbo","warm","cool","brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd","rainbow","sinebow"].includes(w)?D.scheme=w:(D.range=["#9be9a8","#40c463","#30a14e","#216e39"],console.log("'"+w+"' is not supported. Please check it in https://cal-heatmap.com/!")):D.range="null"!==x?x:["#9be9a8","#40c463","#30a14e","#216e39"],today=new Date,year=today.getFullYear(),month=today.getMonth()+1,day=today.getDate(),endDay=year+"-"+("0"+month).slice(-2)+"-"+("0"+day).slice(-2),locales={"zh-Hans":"zh","zh-Hant":"zh-tw",en:"en",ja:"ja"},axios.get(e+"/stats.json").then((t=>{if(stats_data=t.data,$("#cal-heatmap").length>0){var e=new CalHeatmap;selectors={cal:"#cal-heatmap",legend:"#ex-ghDay-legend",prev:"#ex-ghDay-prev",next:"#ex-ghDay-next",today:"#ex-ghDay-today"},e=k(e,selectors,C)}if($("#archive-heatmap").length>0){var a=new CalHeatmap;selectors2={cal:"#archive-heatmap",legend:"#ex-ghDay-legend2",prev:"#ex-ghDay-prev2",next:"#ex-ghDay-next2",today:"#ex-ghDay-today2"},a=k(a,selectors2,"day","True")}})).catch((function(t){console.log("'stats.json' is not found. Calendar will be abnormal. Please make sure it exits.")}))}))}},e={};function a(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,a),s.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";a(774)})()})(); \ No newline at end of file