2.395c0d18.js 64 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{255:function(t,e,s){},256:function(t,e,s){},257:function(t,e,s){},258:function(t,e,s){},259:function(t,e,s){},260:function(t,e,s){},261:function(t,e,s){},262:function(t,e,s){},264:function(t,e,s){},265:function(t,e,s){},266:function(t,e,s){},267:function(t,e,s){},268:function(t,e,s){},270:function(t,e,s){},271:function(t,e,s){},272:function(t,e,s){},273:function(t,e,s){},274:function(t,e,s){},275:function(t,e,s){},276:function(t,e,s){},277:function(t,e,s){},278:function(t,e,s){},279:function(t,e,s){},280:function(t,e,s){},281:function(t,e,s){},283:function(t,e,s){},284:function(t,e,s){},285:function(t,e,s){},286:function(t,e,s){},290:function(t,e,s){"use strict";s.r(e);var a=s(11),i={name:"SidebarGroup",props:["item","open","collapsable","depth"],components:{DropdownTransition:s(291).a},beforeCreate(){this.$options.components.SidebarLinks=s(290).default},methods:{isActive:a.f}},o=(s(319),s(3)),n=Object(o.a)(i,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("router-link",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null).exports;function r(t,e,s,a){return t("router-link",{props:{to:e,activeClass:"",exactActiveClass:""},class:{active:a,"sidebar-link":!0}},s)}function l(t,e,s,i,o,n=1){return!e||n>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const c=Object(a.f)(i,s+"#"+e.slug);return t("li",{class:"sidebar-sub-header level"+e.level},[r(t,s+"#"+e.slug,e.title,c),l(t,e.children,s,i,o,n+1)])}))}var c={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:s,$route:i,$themeConfig:o,$themeLocaleConfig:n},props:{item:c,sidebarDepth:h}}){const u=Object(a.f)(i,c.path),g="auto"===c.type?u||c.children.some(t=>Object(a.f)(i,c.basePath+"#"+t.slug)):u,d="external"===c.type?function(t,e,s){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[s,t("OutboundLink")])}(t,c.path,c.title||c.path):r(t,c.path,c.title||c.path,g),p=[e.frontmatter.sidebarDepth,h,n.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),m=n.displayAllHeaders||o.displayAllHeaders;if("auto"===c.type)return[d,l(t,c.children,c.basePath,i,p)];if((g||m)&&c.headers&&!a.e.test(c.path)){return[d,l(t,Object(a.d)(c.headers),c.path,i,p)]}return d}};s(320);function h(t,e){return"group"===e.type&&e.children.some(e=>"group"===e.type?h(t,e):"page"===e.type&&Object(a.f)(t,e.path))}var u={name:"SidebarLinks",components:{SidebarGroup:n,SidebarLink:Object(o.a)(c,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},created(){this.refreshIndex()},watch:{$route(){this.refreshIndex()}},methods:{refreshIndex(){const t=function(t,e){for(let s=0;s<e.length;s++){const a=e[s];if(h(t,a))return s}return-1}(this.$route,this.items);t>-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(a.f)(this.$route,t.regularPath)}}},g=Object(o.a)(u,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(s,a){return e("li",{key:a},["group"===s.type?e("SidebarGroup",{attrs:{item:s,open:a===t.openGroupIndex,collapsable:s.collapsable||s.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(a)}}}):e("SidebarLink",{attrs:{sidebarDepth:t.sidebarDepth,item:s}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=g.exports},291:function(t,e,s){"use strict";var a={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(s(305),s(3)),o=Object(i.a)(a,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.a=o.exports},295:function(t,e,s){"use strict";s(255)},296:function(t,e,s){"use strict";s(256)},297:function(t,e,s){"use strict";s(257)},298:function(t,e,s){"use strict";s(258)},299:function(t,e,s){"use strict";s(259)},300:function(t,e,s){"use strict";s(260)},301:function(t,e,s){"use strict";s(261)},302:function(t,e,s){"use strict";s(262)},304:function(t,e,s){"use strict";s(264)},305:function(t,e,s){"use strict";s(265)},306:function(t,e,s){"use strict";s(266)},307:function(t,e,s){"use strict";s(267)},308:function(t,e,s){"use strict";s(268)},309:function(t,e,s){"use strict";s(270)},311:function(t,e,s){"use strict";s(271)},312:function(t,e,s){"use strict";s(272)},313:function(t,e,s){"use strict";s(273)},314:function(t,e,s){"use strict";s(274)},315:function(t,e,s){"use strict";s(275)},316:function(t,e,s){"use strict";s(276)},317:function(t,e,s){"use strict";s(277)},318:function(t,e,s){"use strict";s(278)},319:function(t,e,s){"use strict";s(279)},320:function(t,e,s){"use strict";s(280)},321:function(t,e,s){"use strict";s(281)},322:function(t,e,s){"use strict";s(283)},323:function(t,e,s){"use strict";s(284)},324:function(t,e,s){"use strict";s(285)},326:function(t,e,s){"use strict";s(286)},334:function(t,e,s){"use strict";s.r(e);var a=s(11),i={props:{item:{required:!0}},computed:{link(){return Object(a.c)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link}},methods:{isExternal:a.g,isMailto:a.h,isTel:a.i,focusoutAction(){this.$emit("focusout")}}},o=s(3),n=Object(o.a)(i,(function(){var t=this,e=t._self._c;return t.isExternal(t.link)?e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.isMailto(t.link)||t.isTel(t.link)?null:"_blank",rel:t.isMailto(t.link)||t.isTel(t.link)?null:"noopener noreferrer"},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),e("OutboundLink")],1):e("router-link",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v(t._s(t.item.text))])}),[],!1,null,null,null).exports,r=s(293),l=s(294),c=(s(295),Object(o.a)({},(function(){var t=this._self._c;return t("div",{staticClass:"main-wrapper"},[t("div",{staticClass:"main-left"},[this._t("mainLeft")],2),this._v(" "),t("div",{staticClass:"main-right"},[this._t("mainRight")],2)])}),[],!1,null,null,null).exports),h=(s(16),{props:{category:{type:String,default:""},tag:{type:String,default:""},currentPage:{type:Number,default:1},perPage:{type:Number,default:10}},data:()=>({sortPosts:[],postListOffsetTop:0}),created(){this.setPosts()},mounted(){},watch:{currentPage(){this.$route.query.p!=this.currentPage&&this.$router.push({query:{...this.$route.query,p:this.currentPage}}),this.setPosts()},category(){this.setPosts()},tag(){this.setPosts()}},methods:{setPosts(){const t=this.currentPage,e=this.perPage;let s=[];s=this.category?this.$groupPosts.categories[this.category]:this.tag?this.$groupPosts.tags[this.tag]:this.$sortPosts,this.sortPosts=s.slice((t-1)*e,t*e)}}}),u=(s(296),Object(o.a)(h,(function(){var t=this,e=t._self._c;return e("div",{ref:"postList",staticClass:"post-list"},[e("transition-group",{attrs:{tag:"div",name:"post"}},t._l(t.sortPosts,(function(s){return e("div",{key:s.key,staticClass:"post card-box",class:s.frontmatter.sticky&&"iconfont icon-zhiding"},[e("div",{staticClass:"title-wrapper"},[e("h2",[e("router-link",{attrs:{to:s.path}},[t._v("\n "+t._s(s.title)+"\n "),s.frontmatter.titleTag?e("span",{staticClass:"title-tag"},[t._v(t._s(s.frontmatter.titleTag))]):t._e()])],1),t._v(" "),e("div",{staticClass:"article-info"},[s.author&&s.author.href?e("a",{staticClass:"iconfont icon-touxiang",attrs:{title:"作者",target:"_blank",href:s.author.href}},[t._v(t._s(s.author.name?s.author.name:s.author))]):s.author?e("span",{staticClass:"iconfont icon-touxiang",attrs:{title:"作者"}},[t._v(t._s(s.author.name?s.author.name:s.author))]):t._e(),t._v(" "),s.frontmatter.date?e("span",{staticClass:"iconfont icon-riqi",attrs:{title:"创建时间"}},[t._v(t._s(s.frontmatter.date.split(" ")[0]))]):t._e(),t._v(" "),!1!==t.$themeConfig.category&&s.frontmatter.categories?e("span",{staticClass:"iconfont icon-wenjian",attrs:{title:"分类"}},t._l(s.frontmatter.categories,(function(s,a){return e("router-link",{key:a,attrs:{to:"/categories/?category="+encodeURIComponent(s)}},[t._v(t._s(s))])})),1):t._e(),t._v(" "),!1!==t.$themeConfig.tag&&s.frontmatter.tags&&s.frontmatter.tags[0]?e("span",{staticClass:"iconfont icon-biaoqian tags",attrs:{title:"标签"}},t._l(s.frontmatter.tags,(function(s,a){return e("router-link",{key:a,attrs:{to:"/tags/?tag="+encodeURIComponent(s)}},[t._v(t._s(s))])})),1):t._e()])]),t._v(" "),s.excerpt?e("div",{staticClass:"excerpt-wrapper"},[e("div",{staticClass:"excerpt",domProps:{innerHTML:t._s(s.excerpt)}}),t._v(" "),e("router-link",{staticClass:"readmore iconfont icon-jiantou-you",attrs:{to:s.path}},[t._v("阅读全文")])],1):t._e()])})),0)],1)}),[],!1,null,null,null).exports),g={name:"UpdateArticle",props:{length:{type:[String,Number],default:3},moreArticle:String},data:()=>({posts:[],currentPath:""}),created(){this.posts=this.$site.pages,this.currentPath=this.$page.path},computed:{topPublishPosts(){return this.$sortPostsByDate?this.$sortPostsByDate.filter(t=>{const{path:e}=t;return e!==this.currentPath}).slice(0,this.length):[]},isShowArticle(){const{frontmatter:t}=this.$page;return!(!1!==t.article)}},methods:{getNum:t=>t<9?"0"+(t+1):t+1,getDate:t=>t.frontmatter.date?t.frontmatter.date.split(" ")[0].slice(5,10):""},watch:{$route(){this.currentPath=this.$page.path}}},d=(s(297),Object(o.a)(g,(function(){var t=this,e=t._self._c;return e("div",{class:["article-list",{"no-article-list":t.isShowArticle}]},[e("div",{staticClass:"article-title"},[e("router-link",{staticClass:"iconfont icon-bi",attrs:{to:t.moreArticle||"/archives/"}},[t._v("最近更新")])],1),t._v(" "),e("div",{staticClass:"article-wrapper"},[t._l(t.topPublishPosts,(function(s,a){return e("dl",{key:a},[e("dd",[t._v(t._s(t.getNum(a)))]),t._v(" "),e("dt",[e("router-link",{attrs:{to:s.path}},[e("div",[t._v("\n "+t._s(s.title)+"\n "),s.frontmatter.titleTag?e("span",{staticClass:"title-tag"},[t._v("\n "+t._s(s.frontmatter.titleTag)+"\n ")]):t._e()])]),t._v(" "),e("span",{staticClass:"date"},[t._v(t._s(t.getDate(s)))])],1)])})),t._v(" "),e("dl",[e("dd"),t._v(" "),e("dt",[e("router-link",{staticClass:"more",attrs:{to:t.moreArticle||"/archives/"}},[t._v("更多文章>")])],1)])],2)])}),[],!1,null,null,null).exports),p={props:{total:{type:Number,default:10},perPage:{type:Number,default:10},currentPage:{type:Number,default:1}},computed:{pages(){return Math.ceil(this.total/this.perPage)}},methods:{threeNum(){let t=3;const e=this.currentPage,s=this.pages;return t=e<3?3:e>s-3?s-2:e,t},goPrex(){let t=this.currentPage;t>1&&this.handleEmit(--t)},goNext(){let t=this.currentPage;t<this.pages&&this.handleEmit(++t)},goIndex(t){t!==this.currentPage&&this.handleEmit(t)},handleEmit(t){this.$emit("getCurrentPage",t)}}},m=(s(298),Object(o.a)(p,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"pagination"},[e("span",{staticClass:"card-box prev iconfont icon-jiantou-zuo",class:{disabled:1===t.currentPage},on:{click:function(e){return t.goPrex()}}},[e("p",[t._v("上一页")])]),t._v(" "),t.pages<=5?e("div",{staticClass:"pagination-list"},t._l(t.pages,(function(s){return e("span",{key:s,staticClass:"card-box",class:{active:t.currentPage===s},on:{click:function(e){return t.goIndex(s)}}},[t._v(t._s(s))])})),0):e("div",{staticClass:"pagination-list"},[e("span",{staticClass:"card-box",class:{active:1===t.currentPage},on:{click:function(e){return t.goIndex(1)}}},[t._v("1")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.currentPage>3,expression:"currentPage > 3"}],staticClass:"ellipsis ell-two",attrs:{title:"上两页"},on:{click:function(e){return t.goIndex(t.currentPage-2)}}}),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.currentPage<=3,expression:"currentPage <= 3"}],staticClass:"card-box",class:{active:2===t.currentPage},on:{click:function(e){return t.goIndex(2)}}},[t._v("2")]),t._v(" "),e("span",{staticClass:"card-box",class:{active:t.currentPage>=3&&t.currentPage<=t.pages-2},on:{click:function(e){t.goIndex(t.threeNum())}}},[t._v(t._s(t.threeNum()))]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.currentPage<t.pages-2,expression:"currentPage < pages - 2"}],staticClass:"ellipsis ell-four",attrs:{title:"下两页"},on:{click:function(e){return t.goIndex(t.currentPage+2)}}}),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:t.currentPage>=t.pages-2,expression:"currentPage >= pages - 2"}],staticClass:"card-box",class:{active:t.currentPage===t.pages-1},on:{click:function(e){return t.goIndex(t.pages-1)}}},[t._v(t._s(t.pages-1))]),t._v(" "),e("span",{staticClass:"card-box",class:{active:t.currentPage===t.pages},on:{click:function(e){return t.goIndex(t.pages)}}},[t._v(t._s(t.pages))])]),t._v(" "),e("span",{staticClass:"card-box next iconfont icon-jiantou-you",class:{disabled:t.currentPage===t.pages},on:{click:function(e){return t.goNext()}}},[e("p",[t._v("下一页")])])])}),[],!1,null,null,null).exports),v={computed:{blogger(){return this.$themeConfig.blogger},social(){return this.$themeConfig.social}}},f=(s(299),Object(o.a)(v,(function(){var t=this,e=t._self._c;return e("aside",{staticClass:"blogger-wrapper card-box"},[e("div",{staticClass:"avatar"},[e("img",{attrs:{src:t.blogger.avatar,alt:"头像",title:"我好看吗"}})]),t._v(" "),t.social&&t.social.icons&&t.social.icons.length?e("div",{staticClass:"icons"},t._l(t.social.icons,(function(s,a){return e("a",{key:a,class:["iconfont",s.iconClass],style:{width:100/t.social.icons.length+"%"},attrs:{href:s.link,title:s.title,target:"_blank"}})})),0):t._e(),t._v(" "),e("div",{staticClass:"blogger"},[e("span",{staticClass:"name"},[t._v(t._s(t.blogger.name))]),t._v(" "),e("span",{staticClass:"slogan"},[t._v(t._s(t.blogger.slogan))])])])}),[],!1,null,null,null).exports),_={props:{category:{type:String,default:""},categoriesData:{type:Array,default:[]},length:{type:[String,Number],default:"all"}},computed:{categories(){return"all"===this.length?this.categoriesData:this.categoriesData.slice(0,this.length)}}},b=(s(300),Object(o.a)(_,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"categories-wrapper card-box"},[e("router-link",{staticClass:"title iconfont icon-wenjianjia",attrs:{to:"/categories/",title:"全部分类"}},[t._v(t._s("all"===t.length?"全部分类":"文章分类"))]),t._v(" "),e("div",{staticClass:"categories"},[t._l(t.categories,(function(s,a){return e("router-link",{key:a,class:{active:s.key===t.category},attrs:{to:"/categories/?category="+encodeURIComponent(s.key)}},[t._v("\n "+t._s(s.key)+"\n "),e("span",[t._v(t._s(s.length))])])})),t._v(" "),"all"!==t.length&&t.length<t.categoriesData.length?e("router-link",{staticClass:"more",attrs:{to:"/categories/"}},[t._v("更多 ...")]):t._e()],2)],1)}),[],!1,null,null,null).exports),C={props:{tag:{type:String,default:""},tagsData:{type:Array,default:[]},length:{type:[String,Number],default:"all"}},data:()=>({tagBgColor:["#11a8cd","#F8B26A","#67CC86","#E15B64","#F47E60","#849B87"],tagStyleList:[]}),created(){for(let t=0,e=this.tags.length;t<e;t++)this.tagStyleList.push(this.getTagStyle())},computed:{tags(){return"all"===this.length?this.tagsData:this.tagsData.slice(0,this.length)}},methods:{getTagStyle(){const t=this.tagBgColor,e=t[Math.floor(Math.random()*t.length)];return`background: ${e};--randomColor:${e};`}}},w=(s(301),Object(o.a)(C,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"tags-wrapper card-box"},[e("router-link",{staticClass:"title iconfont icon-biaoqian1",attrs:{to:"/tags/",title:"全部标签"}},[t._v(t._s("all"===t.length?"全部标签":"热门标签"))]),t._v(" "),e("div",{staticClass:"tags"},[t._l(t.tags,(function(s,a){return[e("router-link",{key:a,class:{active:s.key===t.tag},style:t.tagStyleList[a],attrs:{to:"/tags/?tag="+encodeURIComponent(s.key)}},[t._v(t._s(s.key))]),t._v(" "),e("span",{key:a+t.tags.length})]})),t._v(" "),"all"!==t.length&&t.tagsData.length>t.length?e("router-link",{attrs:{to:"/tags/"}},[t._v("更多...")]):t._e()],2)],1)}),[],!1,null,null,null).exports);r.a.use(l.a);var y={data:()=>({isMQMobile:!1,slide:null,currentPageIndex:0,playTimer:0,mark:0,total:0,perPage:10,currentPage:1}),computed:{homeData(){return{...this.$page.frontmatter}},hasFeatures(){return!(!this.homeData.features||!this.homeData.features.length)},homeSidebarB(){const{htmlModules:t}=this.$themeConfig;return t?t.homeSidebarB:""},showBanner(){return!(this.$route.query.p&&1!=this.$route.query.p&&(!this.homeData.postList||"detailed"===this.homeData.postList))},bannerBgStyle(){let t=this.homeData.bannerBg;return t&&"auto"!==t?"none"===t?this.$themeConfig.bodyBgImg?"":"background: var(--mainBg);color: var(--textColor)":t.indexOf("background:")>-1?t:t.indexOf(".")>-1?`background: url(${this.$withBase(t)}) center center / cover no-repeat`:void 0:this.$themeConfig.bodyBgImg?"":"background: rgb(40,40,45) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABOSURBVFhH7c6xCQAgDAVRR9A6E4hLu4uLiWJ7tSnuQcIvr2TRYsw3/zOGGEOMIcYQY4gxxBhiDDGGGEOMIcYQY4gxxBhiDLkx52W4Gn1tuslCtHJvL54AAAAASUVORK5CYII=)"},actionLink(){return{link:this.homeData.actionLink,text:this.homeData.actionText}}},components:{NavLink:n,MainLayout:c,PostList:u,UpdateArticle:d,BloggerBar:f,CategoriesBar:b,TagsBar:w,Pagination:m},created(){console.log("我是home.vue"),this.total=this.$sortPosts.length},beforeMount(){this.isMQMobile=window.innerWidth<720},mounted(){this.$route.query.p&&(this.currentPage=Number(this.$route.query.p)),!this.hasFeatures||!this.isMQMobile||this.$route.query.p&&1!=this.$route.query.p||this.init(),this.hasFeatures&&window.addEventListener("resize",()=>{this.isMQMobile=window.innerWidth<720,!this.isMQMobile||this.slide||this.mark||(this.mark++,setTimeout(()=>{this.init()},60))})},beforeDestroy(){clearTimeout(this.playTimer),this.slide&&this.slide.destroy()},watch:{"$route.query.p"(){this.$route.query.p?this.currentPage=Number(this.$route.query.p):this.currentPage=1,this.hasFeatures&&1===this.currentPage&&this.isMQMobile&&setTimeout(()=>{this.slide&&this.slide.destroy(),this.init()},0)}},methods:{init(){clearTimeout(this.playTimer),this.slide=new r.a(this.$refs.slide,{scrollX:!0,scrollY:!1,slide:{loop:!0,threshold:100},useTransition:!0,momentum:!1,bounce:!1,stopPropagation:!1,probeType:2,preventDefault:!1}),this.slide.on("beforeScrollStart",()=>{clearTimeout(this.playTimer)}),this.slide.on("scrollEnd",()=>{this.autoGoNext()}),this.slide.on("slideWillChange",t=>{this.currentPageIndex=t.pageX}),this.autoGoNext()},autoGoNext(){clearTimeout(this.playTimer),this.playTimer=setTimeout(()=>{this.slide.next()},4e3)},handlePagination(t){this.currentPage=t},getScrollTop:()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop}},k=(s(302),Object(o.a)(y,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-wrapper"},[e("div",{staticClass:"banner",class:{"hide-banner":!t.showBanner},style:t.bannerBgStyle},[e("div",{staticClass:"banner-conent",style:!t.homeData.features&&!t.homeData.heroImage&&"padding-top: 7rem"},[e("header",{staticClass:"hero"},[t.homeData.heroImage?e("img",{attrs:{src:t.$withBase(t.homeData.heroImage),alt:t.homeData.heroAlt}}):t._e(),t._v(" "),t.homeData.heroText?e("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.homeData.heroText)+"\n ")]):t._e(),t._v(" "),t.homeData.tagline?e("p",{staticClass:"description"},[t._v("\n "+t._s(t.homeData.tagline)+"\n ")]):t._e(),t._v(" "),t.homeData.actionText&&t.homeData.actionLink?e("p",{staticClass:"action"},[e("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.hasFeatures&&!t.isMQMobile?e("div",{staticClass:"features"},t._l(t.homeData.features,(function(s,a){return e("div",{key:a,staticClass:"feature"},[s.link?e("router-link",{attrs:{to:s.link}},[s.imgUrl?e("img",{staticClass:"feature-img",attrs:{src:t.$withBase(s.imgUrl),alt:s.title}}):t._e(),t._v(" "),e("h2",[t._v(t._s(s.title))]),t._v(" "),e("p",[t._v(t._s(s.details))])]):e("a",{attrs:{href:"javascript:;"}},[s.imgUrl?e("img",{staticClass:"feature-img",attrs:{src:t.$withBase(s.imgUrl),alt:s.title}}):t._e(),t._v(" "),e("h2",[t._v(t._s(s.title))]),t._v(" "),e("p",[t._v(t._s(s.details))])])],1)})),0):t._e()]),t._v(" "),t.hasFeatures?e("div",{directives:[{name:"show",rawName:"v-show",value:t.isMQMobile,expression:"isMQMobile"}],staticClass:"slide-banner"},[e("div",{staticClass:"banner-wrapper"},[e("div",{ref:"slide",staticClass:"slide-banner-scroll"},[e("div",{staticClass:"slide-banner-wrapper"},t._l(t.homeData.features,(function(s,a){return e("div",{key:a,staticClass:"slide-item"},[s.link?e("router-link",{attrs:{to:s.link}},[s.imgUrl?e("img",{staticClass:"feature-img",attrs:{src:t.$withBase(s.imgUrl),alt:s.title}}):t._e(),t._v(" "),e("h2",[t._v(t._s(s.title))]),t._v(" "),e("p",[t._v(t._s(s.details))])]):e("a",{attrs:{href:"javascript:;"}},[s.imgUrl?e("img",{staticClass:"feature-img",attrs:{src:t.$withBase(s.imgUrl),alt:s.title}}):t._e(),t._v(" "),e("h2",[t._v(t._s(s.title))]),t._v(" "),e("p",[t._v(t._s(s.details))])])],1)})),0)]),t._v(" "),e("div",{staticClass:"docs-wrapper"},t._l(t.homeData.features.length,(function(s,a){return e("span",{key:a,staticClass:"doc",class:{active:t.currentPageIndex===a}})})),0)])]):t._e()]),t._v(" "),e("MainLayout",{scopedSlots:t._u([{key:"mainLeft",fn:function(){return["simple"===t.homeData.postList?e("UpdateArticle",{staticClass:"card-box",attrs:{length:t.homeData.simplePostListLength||10,moreArticle:t.$themeConfig.updateBar&&t.$themeConfig.updateBar.moreArticle}}):t.homeData.postList&&"detailed"!==t.homeData.postList?t._e():[e("PostList",{attrs:{currentPage:t.currentPage,perPage:t.perPage}}),t._v(" "),e("Pagination",{directives:[{name:"show",rawName:"v-show",value:Math.ceil(t.total/t.perPage)>1,expression:"Math.ceil(total / perPage) > 1"}],attrs:{total:t.total,perPage:t.perPage,currentPage:t.currentPage},on:{getCurrentPage:t.handlePagination}})],t._v(" "),e("Content",{staticClass:"theme-vdoing-content custom card-box"})]},proxy:!0},t.homeData.hideRightBar?null:{key:"mainRight",fn:function(){return[t.$themeConfig.blogger?e("BloggerBar"):t._e(),t._v(" "),!1!==t.$themeConfig.category&&t.$categoriesAndTags.categories.length?e("CategoriesBar",{attrs:{categoriesData:t.$categoriesAndTags.categories,length:10}}):t._e(),t._v(" "),!1!==t.$themeConfig.tag&&t.$categoriesAndTags.tags.length?e("TagsBar",{attrs:{tagsData:t.$categoriesAndTags.tags,length:30}}):t._e(),t._v(" "),t.homeSidebarB?e("div",{staticClass:"custom-html-box card-box",domProps:{innerHTML:t._s(t.homeSidebarB)}}):t._e()]},proxy:!0}],null,!0)})],1)}),[],!1,null,"cfebbf42",null).exports),x=s(330),P=(s(304),Object(o.a)({},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sidebar-button",attrs:{title:"目录"},on:{click:function(e){return t.$emit("toggle-sidebar")}}},[e("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[e("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null).exports),T=s(291),A=s(98),L=s.n(A),$={components:{NavLink:n,DropdownTransition:T.a},data:()=>({open:!1,isMQMobile:!1}),props:{item:{required:!0}},computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},beforeMount(){this.isMQMobile=window.innerWidth<720,window.addEventListener("resize",()=>{this.isMQMobile=window.innerWidth<720})},methods:{toggle(){this.isMQMobile&&(this.open=!this.open)},isLastItemOfArray:(t,e)=>L()(e)===t},watch:{$route(){this.open=!1}}},S=(s(306),{components:{NavLink:n,DropdownLink:Object(o.a)($,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.toggle}},[t.item.link?e("router-link",{staticClass:"link-title",attrs:{to:t.item.link}},[t._v(t._s(t.item.text))]):t._e(),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:!t.item.link,expression:"!item.link"}],staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})],1),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(s,a){return e("li",{key:s.link||a,staticClass:"dropdown-item"},["links"===s.type?e("h4",[t._v(t._s(s.text))]):t._e(),t._v(" "),"links"===s.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(s.items,(function(a){return e("li",{key:a.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:a},on:{focusout:function(e){t.isLastItemOfArray(a,s.items)&&t.isLastItemOfArray(s,t.item.items)&&t.toggle()}}})],1)})),0):e("NavLink",{attrs:{item:s},on:{focusout:function(e){t.isLastItemOfArray(s,t.item.items)&&t.toggle()}}})],1)})),0)])],1)}),[],!1,null,null,null).exports},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,s=this.$router.options.routes,a=this.$site.themeConfig.locales||{},i={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(i=>{const o=t[i],n=a[i]&&a[i].label||o.lang;let r;return o.lang===this.$lang?r=e:(r=e.replace(this.$localeConfig.path,i),s.some(t=>t.path===r)||(r=i)),{text:n,link:r}})};return[...this.userNav,i]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(a.k)(t),{items:(t.items||[]).map(a.k)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let s=0;s<e.length;s++){const a=e[s];if(new RegExp(a,"i").test(t))return a}return"Source"}}}),B=(s(307),Object(o.a)(S,(function(){var t=this,e=t._self._c;return t.userLinks.length||t.repoLink?e("nav",{staticClass:"nav-links"},[t._l(t.userLinks,(function(t){return e("div",{key:t.link,staticClass:"nav-item"},["links"===t.type?e("DropdownLink",{attrs:{item:t}}):e("NavLink",{attrs:{item:t}})],1)})),t._v(" "),t.repoLink?e("a",{staticClass:"repo-link",attrs:{href:t.repoLink,target:"_blank",rel:"noopener noreferrer"}},[t._v("\n "+t._s(t.repoLabel)+"\n "),e("OutboundLink")],1):t._e()],2):t._e()}),[],!1,null,null,null).exports);function M(t,e){return t.ownerDocument.defaultView.getComputedStyle(t,null)[e]}var O={components:{SidebarButton:P,NavLinks:B,SearchBox:x.a,AlgoliaSearchBox:{}},data:()=>({linksWrapMaxWidth:null}),mounted(){const t=parseInt(M(this.$el,"paddingLeft"))+parseInt(M(this.$el,"paddingRight")),e=()=>{document.documentElement.clientWidth<719?this.linksWrapMaxWidth=null:this.linksWrapMaxWidth=this.$el.offsetWidth-t-(this.$refs.siteName&&this.$refs.siteName.offsetWidth||0)};e(),window.addEventListener("resize",e,!1)},computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName}}},E=(s(308),Object(o.a)(O,(function(){var t=this,e=t._self._c;return e("header",{staticClass:"navbar blur"},[e("SidebarButton",{on:{"toggle-sidebar":function(e){return t.$emit("toggle-sidebar")}}}),t._v(" "),e("router-link",{staticClass:"home-link",attrs:{to:t.$localePath}},[t.$site.themeConfig.logo?e("img",{staticClass:"logo",attrs:{src:t.$withBase(t.$site.themeConfig.logo),alt:t.$siteTitle}}):t._e(),t._v(" "),t.$siteTitle?e("span",{ref:"siteName",staticClass:"site-name",class:{"can-hide":t.$site.themeConfig.logo}},[t._v(t._s(t.$siteTitle))]):t._e()]),t._v(" "),e("div",{staticClass:"links",style:t.linksWrapMaxWidth?{"max-width":t.linksWrapMaxWidth+"px"}:{}},[t.isAlgoliaSearch?e("AlgoliaSearchBox",{attrs:{options:t.algolia}}):!1!==t.$site.themeConfig.search&&!1!==t.$page.frontmatter.search?e("SearchBox"):t._e(),t._v(" "),e("NavLinks",{staticClass:"can-hide"})],1)],1)}),[],!1,null,null,null).exports),N=s(269),I=s.n(N),D={name:"PageEdit",computed:{tags(){return this.$frontmatter.tags},lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=I()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:s="",docsBranch:a="master",docsRepo:i=e}=this.$site.themeConfig;return t&&i&&this.$page.relativePath?this.createEditLink(e,i,s,a,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,s,i,o){if(/bitbucket.org/.test(e)){return e.replace(a.b,"")+"/src"+`/${i}/`+(s?s.replace(a.b,"")+"/":"")+o+`?mode=edit&spa=0&at=${i}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.b,"")+"/-/edit"+`/${i}/`+(s?s.replace(a.b,"")+"/":"")+o}const n=/gitee.com/;if(n.test(e)){return e.replace(n,"gitee.com/-/ide/project")+"/edit"+`/${i}/-/`+(s?s.replace(a.b,"")+"/":"")+o}return(a.j.test(e)?e:"https://github.com/"+e).replace(a.b,"")+"/edit"+`/${i}/`+(s?s.replace(a.b,"")+"/":"")+o}}},U=(s(309),Object(o.a)(D,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),!1!==t.$themeConfig.tag&&t.tags&&t.tags[0]?e("div",{staticClass:"tags"},t._l(t.tags,(function(s,a){return e("router-link",{key:a,attrs:{to:"/tags/?tag="+encodeURIComponent(s),title:"标签"}},[t._v("#"+t._s(s))])})),1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null).exports),j=s(310),H=s.n(j),R={name:"PageNav",props:["sidebarItems"],computed:{prev(){return G(q.PREV,this)},next(){return G(q.NEXT,this)}},methods:{showTooltip(t){const e=document.body.clientWidth,s=t.clientX,a=t.target.querySelector(".tooltip");if(!a)return;const i=a.style;s<e/2?(i.right=null,i.left=s+10+"px"):(i.left=null,i.right=e-s+10+"px"),i.top=t.clientY+10+"px"}}};const q={NEXT:{resolveLink:function(t,e){return Y(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return Y(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function G(t,{$themeConfig:e,$page:s,$route:i,$site:o,sidebarItems:n}){const{resolveLink:r,getThemeLinkConfig:l,getPageLinkConfig:c}=t,h=l(e),u=c(s),g=I()(u)?h:u;return!1===g?void 0:H()(g)?Object(a.l)(o.pages,g,i.path):r(s,n)}function Y(t,e,s){const a=[];!function t(e,s){for(let a=0,i=e.length;a<i;a++)"group"===e[a].type?t(e[a].children||[],s):s.push(e[a])}(e,a);for(let e=0;e<a.length;e++){const i=a[e];if("page"===i.type&&i.path===decodeURIComponent(t.path))return a[e+s]}}var F=R,Q=(s(311),Object(o.a)(F,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-nav-wapper"},[!1!==t.$themeConfig.pageButton&&(t.prev||t.next)?e("div",{staticClass:"page-nav-centre-wrap"},[t.prev?e("router-link",{staticClass:"page-nav-centre page-nav-centre-prev",attrs:{to:t.prev.path},nativeOn:{mouseenter:function(e){return t.showTooltip(e)},mousemove:function(e){return t.showTooltip(e)}}},[e("div",{staticClass:"tooltip"},[t._v(t._s(t.prev.title||t.prev.path))])]):t._e(),t._v(" "),t.next?e("router-link",{staticClass:"page-nav-centre page-nav-centre-next",attrs:{to:t.next.path},nativeOn:{mouseenter:function(e){return t.showTooltip(e)},mousemove:function(e){return t.showTooltip(e)}}},[e("div",{staticClass:"tooltip"},[t._v(t._s(t.next.title||t.next.path))])]):t._e()],1):t._e(),t._v(" "),t.prev||t.next?e("div",{staticClass:"page-nav"},[e("p",{staticClass:"inner"},[t.prev?e("span",{staticClass:"prev"},[t._v("\n ←\n "),t.prev?e("router-link",{staticClass:"prev",attrs:{to:t.prev.path}},[t._v(t._s(t.prev.title||t.prev.path))]):t._e()],1):t._e(),t._v(" "),t.next?e("span",{staticClass:"next"},[t.next?e("router-link",{attrs:{to:t.next.path}},[t._v(t._s(t.next.title||t.next.path))]):t._e(),t._v("→\n ")],1):t._e()])]):t._e()])}),[],!1,null,null,null).exports),W={data:()=>({date:"",classify1:"",classifyList:[],cataloguePermalink:"",author:null,categories:[]}),created(){this.getPageInfo()},watch:{"$route.path"(){this.classifyList=[],this.getPageInfo()}},methods:{getPageInfo(){const t=this.$page,{relativePath:e}=t,{sidebar:s}=this.$themeConfig,a=e.split("/");a.forEach((t,e)=>{const s=t.split(".");if(e!==a.length-1)if(1===s)this.classifyList.push(s[0]);else{const e=t.indexOf(".");this.classifyList.push(t.substring(e+1)||"")}}),this.classify1=this.classifyList[0];const i=s&&s.catalogue?s.catalogue[this.classify1]:"",o=this.$frontmatter.author||this.$themeConfig.author;let n=(t.frontmatter.date||"").split(" ")[0];const{categories:r}=this.$frontmatter;this.date=n,this.cataloguePermalink=i,this.author=o,this.categories=r},getLink(t){const{cataloguePermalink:e}=this;return t===e?e:`${e}${"/"===e.charAt(e.length-1)?"":"/"}#${t}`}}},J=(s(312),Object(o.a)(W,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"articleInfo-wrap"},[e("div",{staticClass:"articleInfo"},[t.classify1&&"_posts"!==t.classify1?e("ul",{staticClass:"breadcrumbs"},[e("li",[e("router-link",{staticClass:"iconfont icon-home",attrs:{to:"/",title:"首页"}})],1),t._v(" "),t._l(t.classifyList,(function(s){return e("li",{key:s},[t.cataloguePermalink?e("router-link",{attrs:{to:t.getLink(s)}},[t._v(t._s(s))]):!1!==t.$themeConfig.category?e("router-link",{attrs:{to:"/categories/?category="+encodeURIComponent(s),title:"分类"}},[t._v(t._s(s))]):e("span",[t._v(t._s(s))])],1)}))],2):t._e(),t._v(" "),e("div",{staticClass:"info"},[t.author?e("div",{staticClass:"author iconfont icon-touxiang",attrs:{title:"作者"}},[t.author.href||t.author.link&&"string"==typeof t.author.link?e("a",{staticClass:"beLink",attrs:{href:t.author.href||t.author.link,target:"_blank",title:"作者"}},[t._v(t._s(t.author.name))]):e("a",{attrs:{href:"javascript:;"}},[t._v(t._s(t.author.name||t.author))])]):t._e(),t._v(" "),t.date?e("div",{staticClass:"date iconfont icon-riqi",attrs:{title:"创建时间"}},[e("a",{attrs:{href:"javascript:;"}},[t._v(t._s(t.date))])]):t._e(),t._v(" "),!1===t.$themeConfig.category||t.classify1&&"_posts"!==t.classify1||!t.categories?t._e():e("div",{staticClass:"date iconfont icon-wenjian",attrs:{title:"分类"}},t._l(t.categories,(function(s,a){return e("router-link",{key:a,attrs:{to:"/categories/?category="+encodeURIComponent(s)}},[t._v(t._s(s+" "))])})),1)])])])}),[],!1,null,"06970110",null).exports),z={data:()=>({pageData:null,isStructuring:!0,appointDir:{}}),created(){this.getPageData();const t=this.$themeConfig.sidebar;t&&"auto"!==t||(this.isStructuring=!1,console.error("目录页数据依赖于结构化的侧边栏数据,请在主题设置中将侧边栏字段设置为'structuring',否则无法获取目录数据。"))},methods:{getPageData(){const t=this.$frontmatter.pageComponent;t&&t.data?this.pageData={...t.data,title:this.$frontmatter.title}:console.error("请在front matter中设置pageComponent和pageComponent.data数据")},getCatalogueList(){const{sidebar:t}=this.$site.themeConfig,{data:e}=this.$frontmatter.pageComponent;let s=(e.path||e.key).split("/"),a=t[`/${s[0]}/`];return s.length>1&&(s.shift(),a=this.appointDirDeal(0,s,a)),a||console.error("未获取到目录数据,请查看front matter中设置的path是否正确。"),a},type:t=>Object.prototype.toString.call(t).match(/\[object (.*?)\]/)[1].toLowerCase(),appointDirDeal(t,e,s){let a=e[t];void 0!==a&&-1!==a.indexOf(".")&&(a=a.substring(a.indexOf(".")+1));for(let i=0;i<s.length;i++)s[i].title===a&&(this.appointDir=s[i],t<e.length-1&&this.appointDirDeal(t+1,e,s[i].children));return this.appointDir.children}},watch:{"$route.path"(){this.getPageData()}}},V=(s(313),Object(o.a)(z,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-vdoing-content"},[e("div",{staticClass:"column-wrapper"},[t.pageData.imgUrl?e("img",{attrs:{src:t.$withBase(t.pageData.imgUrl)}}):t._e(),t._v(" "),e("dl",{staticClass:"column-info"},[e("dt",{staticClass:"title"},[t._v(t._s(t.pageData.title))]),t._v(" "),e("dd",{staticClass:"description",domProps:{innerHTML:t._s(t.pageData.description)}})])]),t._v(" "),t.isStructuring?e("div",{staticClass:"catalogue-wrapper"},[e("div",{staticClass:"catalogue-title"},[t._v("目录")]),t._v(" "),e("div",{staticClass:"catalogue-content"},[t._l(t.getCatalogueList(),(function(s,a){return["array"===t.type(s)?e("dl",{key:a,staticClass:"inline"},[e("dt",[e("router-link",{attrs:{to:s[2]}},[t._v(t._s(`${a+1}. ${s[1]}`)+"\n "),s[3]?e("span",{staticClass:"title-tag"},[t._v("\n "+t._s(s[3])+"\n ")]):t._e()])],1)]):"object"===t.type(s)?e("dl",{key:a},[e("dt",{attrs:{id:t.anchorText=s.title}},[e("a",{staticClass:"header-anchor",attrs:{href:"#"+t.anchorText}},[t._v("#")]),t._v("\n "+t._s(`${a+1}. ${s.title}`)+"\n ")]),t._v(" "),e("dd",[t._l(s.children,(function(s,i){return["array"===t.type(s)?[e("router-link",{key:i,attrs:{to:s[2]}},[t._v(t._s(`${a+1}-${i+1}. ${s[1]}`)+"\n "),s[3]?e("span",{staticClass:"title-tag"},[t._v("\n "+t._s(s[3])+"\n ")]):t._e()])]:"object"===t.type(s)?e("div",{key:i,staticClass:"sub-cat-wrap"},[e("div",{staticClass:"sub-title",attrs:{id:t.anchorText=s.title}},[e("a",{staticClass:"header-anchor",attrs:{href:"#"+t.anchorText}},[t._v("#")]),t._v("\n "+t._s(`${a+1}-${i+1}. ${s.title}`)+"\n ")]),t._v(" "),t._l(s.children,(function(s,o){return e("router-link",{key:`${a+1}-${i+1}-${o+1}`,attrs:{to:s[2]}},[t._v("\n "+t._s(`${a+1}-${i+1}-${o+1}. ${s[1]}`)+"\n "),s[3]?e("span",{staticClass:"title-tag"},[t._v("\n "+t._s(s[3])+"\n ")]):t._e()])}))],2):t._e()]}))],2)]):t._e()]}))],2)]):t._e()])}),[],!1,null,"25eb0b2a",null).exports),Z={data:()=>({headers:[],hashText:""}),mounted(){this.getHeadersData(),this.getHashText()},watch:{$route(){this.headers=this.$page.headers,this.getHashText()}},methods:{getHeadersData(){this.headers=this.$page.headers},getHashText(){this.hashText=decodeURIComponent(window.location.hash.slice(1))}}},K=(s(314),{data:()=>({badges:["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAABGpJREFUSA3tVVtoXFUU3fvOI53UlmCaKIFmwEhsE7QK0ipFEdHEKpXaZGrp15SINsXUWvBDpBgQRKi0+KKoFeJHfZA+ED9KKoIU2gYD9UejTW4rVIzm0VSTziPzuNu1z507dibTTjL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xND3znrhsELnZk7k+OjIGxeNEkomyLVta0xxn+HZhjBc4YZ/AFjHjz9u3xRZl2BN4aq9nFwWh16IrQ1aHHEd3j1+4/dB9OtH4e29A2H1DyHQRmOSfQZ1Fy7MHBTGB6J/Djq6p3OxyO2cB+4Car7v/o3GXgfAkj23+x9ID1Teoamo/SXcbvSf2PX7Vc8DdCmE1vN9di+32P9/5YR3vLnhCVGUWBjEkr3yh4H8v9CzmsbdhzOKzsJKM90iFdaTMjRPhGVsakRvOaRidljo6H6G7j+ctrJpsP+4COhDIl0La2+FS4+5mlocBaXY5QnGZysIBYoeSsl5qQzrSj/cgNrfuEzlWBfwA+EjrZyWUvpAAAAABJRU5ErkJggg=="],currentBadge:""}),created(){this.$themeConfig.titleBadgeIcons&&(this.badges=this.$themeConfig.titleBadgeIcons),this.currentBadge=this.getBadge()},watch:{"$route.path"(){this.currentBadge=this.getBadge()}},methods:{getBadge(){return this.badges[Math.floor(Math.random()*this.badges.length)]}}}),X={mixins:[K],data:()=>({updateBarConfig:null}),props:["sidebarItems"],components:{PageEdit:U,PageNav:Q,ArticleInfo:J,Catalogue:V,UpdateArticle:d,RightMenu:Object(o.a)(Z,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"right-menu-wrapper"},[e("div",{staticClass:"right-menu-margin"},[e("div",{staticClass:"right-menu-title"},[t._v("目录")]),t._v(" "),e("div",{staticClass:"right-menu-content"},t._l(t.headers,(function(s,a){return e("div",{key:a,class:["right-menu-item","level"+s.level,{active:s.slug===t.hashText}]},[e("a",{attrs:{href:"#"+s.slug}},[t._v(t._s(s.title))])])})),0)])])}),[],!1,null,null,null).exports},created(){console.log("我是page.vue"),this.updateBarConfig=this.$themeConfig.updateBar},computed:{bgStyle(){const{contentBgStyle:t}=this.$themeConfig;return t?"bg-style-"+t:""},isShowUpdateBar(){return!this.updateBarConfig||!1!==this.updateBarConfig.showToArticle},showTitle(){return!this.$frontmatter.pageComponent},showRightMenu(){const{$frontmatter:t,$themeConfig:e,$page:s}=this,{sidebar:a}=t;return!1!==e.rightMenuBar&&s.headers&&!1!==(t&&a&&!1!==a)},pageComponent(){return!!this.$frontmatter.pageComponent&&this.$frontmatter.pageComponent.name},isShowSlotT(){return this.getShowStatus("pageTshowMode")},isShowSlotB(){return this.getShowStatus("pageBshowMode")}},methods:{getShowStatus(t){const{htmlModules:e}=this.$themeConfig;return!!e&&("article"===e[t]?this.isArticle():"custom"!==e[t]||!this.isArticle())},isArticle(){return!1!==this.$frontmatter.article}}},tt=(s(315),Object(o.a)(X,(function(){var t=this,e=t._self._c;return e("div",[e("main",{staticClass:"page"},[e("div",{class:"theme-vdoing-wrapper "+t.bgStyle},[t.isArticle()?e("ArticleInfo"):e("div",{staticClass:"placeholder"}),t._v(" "),t.pageComponent?e(t.pageComponent,{tag:"component",staticClass:"theme-vdoing-content"}):t._e(),t._v(" "),e("div",{staticClass:"content-wrapper"},[t.showRightMenu?e("RightMenu"):t._e(),t._v(" "),t.showTitle?e("h1",[!1!==t.$themeConfig.titleBadge?e("img",{attrs:{src:t.currentBadge}}):t._e(),t._v(t._s(this.$page.title)),t.$frontmatter.titleTag?e("span",{staticClass:"title-tag"},[t._v(t._s(t.$frontmatter.titleTag))]):t._e()]):t._e(),t._v(" "),t.isShowSlotT?t._t("top"):t._e(),t._v(" "),e("Content",{staticClass:"theme-vdoing-content"})],2),t._v(" "),t.isShowSlotB?t._t("bottom"):t._e(),t._v(" "),e("PageEdit"),t._v(" "),e("PageNav",t._b({},"PageNav",{sidebarItems:t.sidebarItems},!1))],2),t._v(" "),t.isShowUpdateBar?e("UpdateArticle",{attrs:{length:3,moreArticle:t.updateBarConfig&&t.updateBarConfig.moreArticle}}):t._e()],1)])}),[],!1,null,null,null).exports),et={data:()=>({category:"",total:0,perPage:10,currentPage:1}),components:{MainLayout:c,PostList:u,Pagination:m,CategoriesBar:b},mounted(){const t=this.$route.query.category;t?(this.category=t,this.total=this.$groupPosts.categories[t].length):this.total=this.$sortPosts.length,this.$route.query.p&&(this.currentPage=Number(this.$route.query.p));const e=document.querySelector(".categories");e&&setTimeout(()=>{const t=e.querySelector(".active"),s=t?t.offsetTop:0;e.scrollTo({top:s,behavior:"smooth"})},300)},methods:{handlePagination(t){this.currentPage=t}},watch:{"$route.query.category"(t){this.category=t?decodeURIComponent(t):"",this.category?this.total=this.$groupPosts.categories[this.category].length:this.total=this.$sortPosts.length,this.currentPage=1}}},st=(s(316),Object(o.a)(et,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-page categories-page"},[e("MainLayout",{scopedSlots:t._u([{key:"mainLeft",fn:function(){return[t.$categoriesAndTags.categories.length?e("CategoriesBar",{attrs:{categoriesData:t.$categoriesAndTags.categories,category:t.category}}):t._e(),t._v(" "),e("PostList",{attrs:{currentPage:t.currentPage,perPage:t.perPage,category:t.category}}),t._v(" "),e("Pagination",{directives:[{name:"show",rawName:"v-show",value:Math.ceil(t.total/t.perPage)>1,expression:"Math.ceil(total / perPage) > 1"}],attrs:{total:t.total,perPage:t.perPage,currentPage:t.currentPage},on:{getCurrentPage:t.handlePagination}})]},proxy:!0},{key:"mainRight",fn:function(){return[t.$categoriesAndTags.categories.length?e("CategoriesBar",{attrs:{categoriesData:t.$categoriesAndTags.categories,category:t.category}}):t._e()]},proxy:!0}])})],1)}),[],!1,null,null,null).exports),at={data:()=>({tag:"",total:0,perPage:10,currentPage:1}),components:{MainLayout:c,PostList:u,Pagination:m,TagsBar:w},mounted(){const t=this.$route.query.tag;t?(this.tag=t,this.total=this.$groupPosts.tags[t].length):this.total=this.$sortPosts.length,this.$route.query.p&&(this.currentPage=Number(this.$route.query.p))},methods:{handlePagination(t){this.currentPage=t}},watch:{"$route.query.tag"(t){this.tag=t?decodeURIComponent(t):"",this.tag?this.total=this.$groupPosts.tags[this.tag].length:this.total=this.$sortPosts.length,this.currentPage=1}}},it=(s(317),Object(o.a)(at,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-page tags-page"},[e("MainLayout",{scopedSlots:t._u([{key:"mainLeft",fn:function(){return[t.$categoriesAndTags.tags.length?e("TagsBar",{attrs:{tagsData:t.$categoriesAndTags.tags,tag:t.tag}}):t._e(),t._v(" "),e("PostList",{attrs:{currentPage:t.currentPage,perPage:t.perPage,tag:t.tag}}),t._v(" "),e("Pagination",{directives:[{name:"show",rawName:"v-show",value:Math.ceil(t.total/t.perPage)>1,expression:"Math.ceil(total / perPage) > 1"}],attrs:{total:t.total,perPage:t.perPage,currentPage:t.currentPage},on:{getCurrentPage:t.handlePagination}})]},proxy:!0},{key:"mainRight",fn:function(){return[t.$categoriesAndTags.tags.length?e("TagsBar",{attrs:{tagsData:t.$categoriesAndTags.tags,tag:t.tag}}):t._e()]},proxy:!0}])})],1)}),[],!1,null,null,null).exports),ot=s(48),nt=s.n(ot),rt={mixins:[K],data:()=>({postsList:[],countByYear:{},perPage:80,currentPage:1}),created(){this.getPageData();const{$sortPostsByDate:t,countByYear:e}=this;for(let s=0;s<t.length;s++){const{frontmatter:{date:i}}=t[s];if(i&&"string"===Object(a.n)(i)){const t=i.slice(0,4);e[t]||(e[t]=0),e[t]=e[t]+1}}this.countByYear=e},mounted(){window.addEventListener("scroll",nt()(()=>{if(this.postsList.length<this.$sortPostsByDate.length){const t=document.documentElement,e=document.body,s=t.scrollTop||e.scrollTop,a=t.clientHeight||e.clientHeight,i=t.scrollHeight||e.scrollHeight;i>a&&s+a>=i-250&&this.loadmore()}},200))},methods:{getPageData(){const t=this.currentPage,e=this.perPage;this.postsList=this.postsList.concat(this.$sortPostsByDate.slice((t-1)*e,t*e))},loadmore(){this.currentPage=this.currentPage+1,this.getPageData()},getYear(t){const e=this.postsList[t];if(!e)return;const{frontmatter:{date:s}}=e;return s&&"string"===Object(a.n)(s)?s.slice(0,4):void 0},getDate(t){const{frontmatter:{date:e}}=t;if(e&&"string"===Object(a.n)(e))return e.slice(5,10)}}},lt=(s(318),Object(o.a)(rt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-page archives-page"},[e("div",{staticClass:"theme-vdoing-wrapper"},[e("h1",[!1!==t.$themeConfig.titleBadge?e("img",{attrs:{src:t.currentBadge}}):t._e(),t._v("\n "+t._s(t.$page.title)+"\n ")]),t._v(" "),e("div",{staticClass:"count"},[t._v("\n 总共 "),e("i",[t._v(t._s(t.$sortPostsByDate.length))]),t._v(" 篇文章\n ")]),t._v(" "),e("ul",[t._l(t.postsList,(function(s,a){return[(t.year=t.getYear(a))!==t.getYear(a-1)?e("li",{key:a+t.$sortPostsByDate.length,staticClass:"year"},[e("h2",[t._v("\n "+t._s(t.year)+"\n "),e("span",[e("i",[t._v(t._s(t.countByYear[t.year]))]),t._v(" 篇\n ")])])]):t._e(),t._v(" "),e("li",{key:a},[e("router-link",{attrs:{to:s.path}},[e("span",{staticClass:"date"},[t._v(t._s(t.getDate(s)))]),t._v("\n "+t._s(s.title)+"\n "),s.frontmatter.titleTag?e("span",{staticClass:"title-tag"},[t._v("\n "+t._s(s.frontmatter.titleTag)+"\n ")]):t._e()])],1)]}))],2)])])}),[],!1,null,null,null).exports),ct={name:"Sidebar",components:{SidebarLinks:s(290).default,NavLinks:B},props:["items"],computed:{blogger(){return this.$themeConfig.blogger}}},ht=(s(321),Object(o.a)(ct,(function(){var t=this,e=t._self._c;return e("aside",{staticClass:"sidebar"},[t.blogger?e("div",{staticClass:"blogger"},[e("img",{attrs:{src:t.blogger.avatar}}),t._v(" "),e("div",{staticClass:"blogger-info"},[e("h3",[t._v(t._s(t.blogger.name))]),t._v(" "),t.blogger.social?e("div",{staticClass:"icons"},t._l(t.blogger.social.icons,(function(t,s){return e("a",{key:s,class:["iconfont",t.iconClass],attrs:{href:t.link,title:t.title,target:"_blank"}})})),0):e("span",[t._v(t._s(t.blogger.slogan))])])]):t._e(),t._v(" "),e("NavLinks"),t._v(" "),t._t("top"),t._v(" "),e("SidebarLinks",{attrs:{depth:0,items:t.items}}),t._v(" "),t._t("bottom")],2)}),[],!1,null,null,null).exports),ut=s(282);var gt={data:()=>({threshold:100,scrollTop:null,showCommentBut:!1,commentTop:null,currentMode:"",showModeBox:!1,modeList:[{name:"跟随系统",icon:"icon-zidong",KEY:"auto"},{name:"浅色模式",icon:"icon-rijianmoshi",KEY:"light"},{name:"深色模式",icon:"icon-yejianmoshi",KEY:"dark"},{name:"阅读模式",icon:"icon-yuedu",KEY:"read"}],_scrollTimer:null,_textareaEl:null,_recordScrollTop:null,COMMENT_SELECTOR_1:"#vuepress-plugin-comment",COMMENT_SELECTOR_2:"#valine-vuepress-comment",COMMENT_SELECTOR_3:".vssue"}),mounted(){if(this.currentMode=ut.a.get("mode")||this.$themeConfig.defaultMode||"auto",this.scrollTop=this.getScrollTop(),window.addEventListener("scroll",nt()(()=>{this.scrollTop=this.getScrollTop()},100)),window.addEventListener("load",()=>{this.getCommentTop()}),document.documentElement.clientWidth<719){this.$refs.modeBox.onclick=()=>{this.showModeBox=!1},window.addEventListener("scroll",nt()(()=>{this.showModeBox&&(this.showModeBox=!1)},100))}const t=document.querySelectorAll(".buttons .button");for(let e=0;e<t.length;e++){const s=t[e];s.addEventListener("touchstart",(function(){s.classList.add("hover")})),s.addEventListener("touchend",(function(){setTimeout(()=>{s.classList.remove("hover")},150)}))}},computed:{showToTop(){return this.scrollTop>this.threshold}},methods:{toggleMode(t){this.currentMode=t,this.$emit("toggle-theme-mode",t)},getScrollTop:()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,scrollToTop(){window.scrollTo({top:0,behavior:"smooth"}),this.scrollTop=0},getCommentTop(){setTimeout(()=>{let t=document.querySelector(this.COMMENT_SELECTOR_1)||document.querySelector(this.COMMENT_SELECTOR_2)||document.querySelector(this.COMMENT_SELECTOR_3);t&&(this.showCommentBut=!1!==this.$frontmatter.comment&&!0!==this.$frontmatter.home,this.commentTop=t.offsetTop-58)},500)},scrollToComment(){window.scrollTo({top:this.commentTop,behavior:"smooth"}),this._textareaEl=document.querySelector(this.COMMENT_SELECTOR_1+" textarea")||document.querySelector(this.COMMENT_SELECTOR_2+" input")||document.querySelector(this.COMMENT_SELECTOR_3+" textarea"),this._textareaEl&&this.getScrollTop()!==this._recordScrollTop?document.addEventListener("scroll",this._handleListener):this._textareaEl&&this.getScrollTop()===this._recordScrollTop&&this._handleFocus()},_handleListener(){clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(()=>{document.removeEventListener("scroll",this._handleListener),this._recordScrollTop=this.getScrollTop(),this._handleFocus()},30)},_handleFocus(){this._textareaEl.focus(),this._textareaEl.classList.add("yellowBorder"),setTimeout(()=>{this._textareaEl.classList.remove("yellowBorder")},500)}},watch:{"$route.path"(){this.showCommentBut=!1,this.getCommentTop()}}},dt=(s(322),Object(o.a)(gt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"buttons"},[e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.showToTop,expression:"showToTop"}],staticClass:"button blur go-to-top iconfont icon-fanhuidingbu",attrs:{title:"返回顶部"},on:{click:t.scrollToTop}})]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showCommentBut,expression:"showCommentBut"}],staticClass:"button blur go-to-comment iconfont icon-pinglun",attrs:{title:"去评论"},on:{click:t.scrollToComment}}),t._v(" "),e("div",{staticClass:"button blur theme-mode-but iconfont icon-zhuti",attrs:{title:"主题模式"},on:{mouseenter:function(e){t.showModeBox=!0},mouseleave:function(e){t.showModeBox=!1},click:function(e){t.showModeBox=!0}}},[e("transition",{attrs:{name:"mode"}},[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.showModeBox,expression:"showModeBox"}],ref:"modeBox",staticClass:"select-box",on:{click:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()}}},t._l(t.modeList,(function(s){return e("li",{key:s.KEY,staticClass:"iconfont",class:[s.icon,{active:s.KEY===t.currentMode}],on:{click:function(e){return t.toggleMode(s.KEY)}}},[t._v("\n "+t._s(s.name)+"\n ")])})),0)])],1)],1)}),[],!1,null,null,null).exports),pt={computed:{social(){return this.$themeConfig.social},footer(){return this.$themeConfig.footer}}},mt=(s(323),Object(o.a)(pt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"footer"},[t.social&&t.social.icons?e("div",{staticClass:"icons"},t._l(t.social.icons,(function(t,s){return e("a",{key:s,class:["iconfont",t.iconClass],attrs:{href:t.link,title:t.title,target:"_blank"}})})),0):t._e(),t._v(" "),t.footer?[t._v("\n Copyright © "+t._s(t.footer.createYear)+"-"+t._s((new Date).getFullYear())+"\n "),e("span",{domProps:{innerHTML:t._s(t.footer.copyrightInfo)}})]:t._e()],2)}),[],!1,null,null,null).exports),vt={data:()=>({bgImg:"",opacity:.5}),mounted(){let{bodyBgImg:t,bodyBgImgOpacity:e,bodyBgImgInterval:s=15}=this.$themeConfig;if("string"===Object(a.n)(t))this.bgImg=t;else if("array"===Object(a.n)(t)){let e=0,a=null;this.bgImg=t[e],clearInterval(a),a=setInterval(()=>{if(++e>=t.length&&(e=0),this.bgImg=t[e],t[e+1]){(new Image).src=t[e+1]}},1e3*s)}void 0!==e&&(this.opacity=e)}},ft=(s(324),Object(o.a)(vt,(function(){return(0,this._self._c)("div",{staticClass:"body-bg",style:`background: url(${this.bgImg}) center center / cover no-repeat;opacity:${this.opacity}`})}),[],!1,null,null,null).exports),_t=s(325),bt=s.n(_t);var Ct={components:{Home:k,Navbar:E,Page:tt,CategoriesPage:st,TagsPage:it,ArchivesPage:lt,Sidebar:ht,Footer:mt,Buttons:dt,BodyBgImg:ft},data:()=>({hideNavbar:!1,isSidebarOpen:!0,showSidebar:!1,themeMode:"auto",showWindowLB:!0,showWindowRB:!0}),computed:{sidebarSlotTop(){return this.getHtmlStr("sidebarT")},sidebarSlotBottom(){return this.getHtmlStr("sidebarB")},pageSlotTop(){return this.getHtmlStr("pageT")},pageSlotBottom(){return this.getHtmlStr("pageB")},windowLB(){return this.getHtmlStr("windowLB")},windowRB(){return this.getHtmlStr("windowRB")},showRightMenu(){const{headers:t}=this.$page;return!this.$frontmatter.home&&!1!==this.$themeConfig.rightMenuBar&&t&&t.length&&!1!==this.$frontmatter.sidebar},shouldShowNavbar(){const{themeConfig:t}=this.$site,{frontmatter:e}=this.$page;return!1!==e.navbar&&!1!==t.navbar&&(this.$title||t.logo||t.repo||t.nav||this.$themeLocaleConfig.nav)},shouldShowSidebar(){const{frontmatter:t}=this.$page;return!t.home&&!1!==t.sidebar&&this.sidebarItems.length&&!1!==t.showSidebar},sidebarItems(){return Object(a.m)(this.$page,this.$page.regularPath,this.$site,this.$localePath)},pageClasses(){const t=this.$page.frontmatter.pageClass;return[{"no-navbar":!this.shouldShowNavbar,"hide-navbar":this.hideNavbar,"sidebar-open":this.isSidebarOpen,"no-sidebar":!this.shouldShowSidebar,"have-rightmenu":this.showRightMenu,"have-body-img":this.$themeConfig.bodyBgImg,"only-sidebarItem":1===this.sidebarItems.length&&"page"===this.sidebarItems[0].type},t]}},created(){const t=this.$themeConfig.sidebarOpen;!1===t&&(this.isSidebarOpen=t)},beforeMount(){this.isSidebarOpenOfclientWidth();const t=ut.a.get("mode"),{defaultMode:e}=this.$themeConfig;e&&"auto"!==e&&!t?this.themeMode=e:t&&"auto"!==t&&"auto"!==e?this.themeMode=t:this._autoMode(),this.setBodyClass();const s=this.$themeConfig.social;if(s&&s.iconfontCssFile){let t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",s.iconfontCssFile),document.head.appendChild(t)}},mounted(){const t=document.location.hash;if(t.length>1){const e=decodeURIComponent(t.substring(1)),s=document.getElementById(e);s&&s.scrollIntoView()}this.showSidebar=!0,this.$router.afterEach(()=>{this.isSidebarOpenOfclientWidth()});let e=0,s=0;window.addEventListener("scroll",bt.a.throttle(()=>{this.isSidebarOpen||(e=this.getScrollTop(),this.hideNavbar=s<e&&e>58,setTimeout(()=>{s=e},0))},300))},watch:{isSidebarOpen(){this.isSidebarOpen&&(this.hideNavbar=!1)},themeMode(){this.setBodyClass()}},methods:{getHtmlStr(t){const{htmlModules:e}=this.$themeConfig;return e?e[t]:""},setBodyClass(){let{pageStyle:t="card",bodyBgImg:e}=this.$themeConfig;("card"!==t&&"line"!==t||e)&&(t="card"),document.body.className=`theme-mode-${this.themeMode} theme-style-${t}`},getScrollTop:()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,isSidebarOpenOfclientWidth(){document.documentElement.clientWidth<719&&(this.isSidebarOpen=!1)},toggleSidebar(t){this.isSidebarOpen="boolean"==typeof t?t:!this.isSidebarOpen,this.$emit("toggle-sidebar",this.isSidebarOpen)},_autoMode(){window.matchMedia("(prefers-color-scheme: dark)").matches?this.themeMode="dark":this.themeMode="light"},toggleThemeMode(t){"auto"===t?this._autoMode():this.themeMode=t,ut.a.set("mode",t)},onTouchStart(t){this.touchStart={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}},onTouchEnd(t){const e=t.changedTouches[0].clientX-this.touchStart.x,s=t.changedTouches[0].clientY-this.touchStart.y;Math.abs(e)>Math.abs(s)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}},wt=(s(326),Object(o.a)(Ct,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?e("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),e("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),!1!==t.$themeConfig.sidebarHoverTriggerOpen?e("div",{staticClass:"sidebar-hover-trigger"}):t._e(),t._v(" "),e("Sidebar",{directives:[{name:"show",rawName:"v-show",value:t.showSidebar,expression:"showSidebar"}],attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([t.sidebarSlotTop?{key:"top",fn:function(){return[e("div",{staticClass:"sidebar-slot sidebar-slot-top",domProps:{innerHTML:t._s(t.sidebarSlotTop)}})]},proxy:!0}:null,t.sidebarSlotBottom?{key:"bottom",fn:function(){return[e("div",{staticClass:"sidebar-slot sidebar-slot-bottom",domProps:{innerHTML:t._s(t.sidebarSlotBottom)}})]},proxy:!0}:null],null,!0)}),t._v(" "),t.$page.frontmatter.home?e("Home"):t.$page.frontmatter.categoriesPage?e("CategoriesPage"):t.$page.frontmatter.tagsPage?e("TagsPage"):t.$page.frontmatter.archivesPage?e("ArchivesPage"):e("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([t.pageSlotTop?{key:"top",fn:function(){return[e("div",{staticClass:"page-slot page-slot-top",domProps:{innerHTML:t._s(t.pageSlotTop)}})]},proxy:!0}:null,t.pageSlotBottom?{key:"bottom",fn:function(){return[e("div",{staticClass:"page-slot page-slot-bottom",domProps:{innerHTML:t._s(t.pageSlotBottom)}})]},proxy:!0}:null],null,!0)}),t._v(" "),e("Footer"),t._v(" "),e("Buttons",{ref:"buttons",on:{"toggle-theme-mode":t.toggleThemeMode}}),t._v(" "),t.$themeConfig.bodyBgImg?e("BodyBgImg"):t._e(),t._v(" "),t.windowLB?e("div",{directives:[{name:"show",rawName:"v-show",value:t.showWindowLB,expression:"showWindowLB"}],staticClass:"custom-html-window custom-html-window-lb"},[e("div",{staticClass:"custom-wrapper"},[e("span",{staticClass:"close-but",on:{click:function(e){t.showWindowLB=!1}}},[t._v("×")]),t._v(" "),e("div",{domProps:{innerHTML:t._s(t.windowLB)}})])]):t._e(),t._v(" "),t.windowRB?e("div",{directives:[{name:"show",rawName:"v-show",value:t.showWindowRB,expression:"showWindowRB"}],staticClass:"custom-html-window custom-html-window-rb"},[e("div",{staticClass:"custom-wrapper"},[e("span",{staticClass:"close-but",on:{click:function(e){t.showWindowRB=!1}}},[t._v("×")]),t._v(" "),e("div",{domProps:{innerHTML:t._s(t.windowRB)}})])]):t._e()],1)}),[],!1,null,null,null));e.default=wt.exports}}]);