From 7d0571361abe4424ca62541caf330c693d861947 Mon Sep 17 00:00:00 2001 From: journey-ad Date: Thu, 17 Oct 2024 11:17:43 +0000 Subject: [PATCH] deploy: bfabfaa557f5a7c908323900e76d812d65c8e756 --- index.html | 2 +- js/app-legacy.3b0430f4.js | 2 ++ js/app-legacy.3b0430f4.js.map | 1 + js/app-legacy.4303d6a2.js | 2 -- js/app-legacy.4303d6a2.js.map | 1 - js/app.27a316fa.js | 2 ++ js/app.27a316fa.js.map | 1 + js/app.622bf080.js | 2 -- js/app.622bf080.js.map | 1 - ... precache-manifest.b11ef95ef5e7f301ce23ad60fe1dc733.js | 8 ++++---- ... precache-manifest.b76fab39ef040ccb61a63c82c1211225.js | 8 ++++---- service-worker.js | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 js/app-legacy.3b0430f4.js create mode 100644 js/app-legacy.3b0430f4.js.map delete mode 100644 js/app-legacy.4303d6a2.js delete mode 100644 js/app-legacy.4303d6a2.js.map create mode 100644 js/app.27a316fa.js create mode 100644 js/app.27a316fa.js.map delete mode 100644 js/app.622bf080.js delete mode 100644 js/app.622bf080.js.map rename precache-manifest.94a3fe031f625b70c9bc99ed55673331.js => precache-manifest.b11ef95ef5e7f301ce23ad60fe1dc733.js (91%) rename precache-manifest.fa11e7952ccb3359f5486db226de12ff.js => precache-manifest.b76fab39ef040ccb61a63c82c1211225.js (87%) diff --git a/index.html b/index.html index 41b4afc0..99344af1 100644 --- a/index.html +++ b/index.html @@ -13,4 +13,4 @@ } }) }); - });
\ No newline at end of file + });
\ No newline at end of file diff --git a/js/app-legacy.3b0430f4.js b/js/app-legacy.3b0430f4.js new file mode 100644 index 00000000..5bd7f7ca --- /dev/null +++ b/js/app-legacy.3b0430f4.js @@ -0,0 +1,2 @@ +(function(t){function e(e){for(var r,i,o=e[0],c=e[1],l=e[2],u=0,h=[];u1200?this.isTopShow=!0:this.isTopShow=!1}}),beforeMount:function(){var t=this.$route.query.r18;1===+t&&this.saveSETTING(Object(l["a"])(Object(l["a"])({},this.SETTING),{},{r18:!0}))},mounted:function(){window.addEventListener("scroll",this.scrollHandler)},beforeUnmount:function(){window.removeEventListener("scroll",this.scrollHandler)},components:{Preload:p}},w=g,b=(a("cdc0"),Object(h["a"])(w,o,c,!1,null,"111a2d2b",null)),k=b.exports,_=(a("7a82"),a("d3b7"),a("3ca3"),a("ddb0"),a("8c4f")),x=(a("d401"),a("25f0"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),function(t){if(t){var e=document.querySelector('meta[name="theme-color"]');e||(e=document.createElement("meta"),e.setAttribute("name","theme-color"),document.head.appendChild(e)),e.setAttribute("content",t)}}),C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss";t||(t=new Date),"number"===typeof t&&10===t.toString().length&&(t*=1e3);var a=t instanceof Date?t:new Date(t);/(y+)/.test(e)&&(e=e.replace(RegExp.$1,"".concat(a.getFullYear())));var r={"M+":a.getMonth()+1,"d+":a.getDate(),"h+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(e)){var s=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?s:"00".concat(s).substr(s.length))}return e},y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-base"},[e("PageLoading",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]}),t._v(" "),e("transition",{attrs:{name:t.transitionName}},[e("keep-alive",[t.loading?t._e():e("router-view")],1)],1)],1)},O=[],j=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-loading"},[e("van-loading",{attrs:{color:t.color}})],1)},S=[],$=a("ade3"),L=(a("ac1e"),a("543e")),T={name:"PageLoading",computed:Object(l["a"])({},Object(v["d"])({color:"themeColor"})),components:Object($["a"])({},L["a"].name,L["a"])},I=T,M=(a("19ad"),Object(h["a"])(I,j,S,!1,null,null,null)),z=M.exports,N={data:function(){return{transitionName:"fade",loading:!1}},components:{PageLoading:z}},P=N,E=(a("01f0"),Object(h["a"])(P,y,O,!1,null,null,null)),A=E.exports,H=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-layout",class:{"safe-area":t.safeArea},style:{height:"100%"}},[e("div",{staticClass:"app-main"},[e("keep-alive",[e("router-view")],1)],1),t._v(" "),t.showNav?e("Nav"):t._e()],1)},B=[],R=function(){var t=this,e=t._self._c;return e("div",{staticClass:"nav-container"},[e("ul",{staticClass:"nav-bar"},t._l(t.navList,(function(a){return e("li",{key:a.name,staticClass:"nav-item",class:{active:t.$route.name===a.name},on:{click:function(e){return t.navigateTo(a.name)}}},[e("Icon",{staticClass:"icon",attrs:{name:a.icon,index:a.name,currentIndex:t.$route.name}}),t._v(" "),e("span",[t._v(t._s(a.title))])],1)})),0)])},W=[],D=(a("14d9"),{data:function(){return{navList:[{name:"Home",icon:"home",title:"首页"},{name:"Search",icon:"search",title:"搜索"},{name:"Rank",icon:"rank",title:"排行榜"},{name:"Setting",icon:"setting",title:"设置"}]}},methods:{navigateTo:function(t,e){this.$route.name===t?document.documentElement.scrollTo({top:0,behavior:"smooth"}):this.$router.push({name:t,params:e})}},mounted:function(){console.log(this.$route)}}),F=D,V=(a("7dd5"),Object(h["a"])(F,R,W,!1,null,"3f2187a0",null)),G=V.exports,U={data:function(){return{}},props:{safeArea:{type:Boolean,default:!1},showNav:{type:Boolean,default:!0}},watch:{showNav:{handler:function(t){var e=this;this.$nextTick((function(){e.$root.$el.classList[t?"add":"remove"]("show-nav")}))},immediate:!0}},components:{Nav:G}},q=U,Y=(a("f9f5"),Object(h["a"])(q,H,B,!1,null,"2e368f22",null)),J=Y.exports,Z=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-safe-area",attrs:{id:"appSafeArea"}},[e("transition",[e("keep-alive",[e("router-view")],1)],1)],1)},X=[],K={name:"Safearea",mounted:function(){window.plus}},Q=K,tt=(a("ca34"),Object(h["a"])(Q,Z,X,!1,null,null,null)),et=(tt.exports,function(){var t=this,e=t._self._c;return e("div",{staticClass:"home"},[e("RankCard"),t._v(" "),e("Daily")],1)}),at=[],rt=(a("fb6a"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"rank-card"},[e("van-cell",{staticClass:"cell",attrs:{border:!1,"is-link":"",to:"/rank/daily"},scopedSlots:t._u([{key:"title",fn:function(){return[e("Icon",{staticClass:"icon crown",attrs:{name:"crown"}}),t._v(" "),e("span",{staticClass:"title"},[t._v("排行榜")])]},proxy:!0}])}),t._v(" "),e("div",{staticClass:"card-box"},[e("van-swipe",{staticClass:"swipe-wrap",attrs:{loop:!1,"show-indicators":!1,width:300}},[t._l(t.artList.slice(0,6),(function(a){return e("van-swipe-item",{key:a.id,staticClass:"swipe-item"},[e("ImageCard",{attrs:{mode:"meta",artwork:a},on:{"click-card":function(e){return t.toArtwork(e)}}})],1)})),t._v(" "),e("van-swipe-item",{staticClass:"swipe-item more",on:{click:function(e){return e.stopPropagation(),t.$router.push("/rank/weekly")}}},[e("ImageSlide",{attrs:{images:t.slides}},[e("div",{staticClass:"link"},[e("Icon",{attrs:{name:"more",scale:"20"}}),t._v(" "),e("div",[t._v("查看更多")])],1)])],1)],2)],1)],1)}),nt=[],st=(a("c3a6"),a("ad06")),it=(a("4b0a"),a("2bb1")),ot=(a("7844"),a("5596")),ct=(a("c194"),a("7744")),lt=a("c7eb"),ut=a("1da1"),dt=(a("d81d"),a("b680"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"image-card",style:{height:"".concat((375/t.artwork.width*t.artwork.height).toFixed(2),"px")},on:{click:function(e){return e.stopPropagation(),t.click(t.artwork.id)}}},[e("div",{staticClass:"image-wrap"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.artwork.images[0].m,expression:"artwork.images[0].m"}],staticClass:"image",class:{censored:t.isCensored(t.artwork)},attrs:{alt:t.artwork.title}})]),t._v(" "),t.tagText?e("van-tag",{staticClass:"tag-r18",attrs:{round:"",color:"R-18"===t.tagText?"#fb7299":"#ff3f3f"}},[t._v(t._s(t.tagText))]):t._e(),t._v(" "),"cover"===t.mode&&t.artwork.count>1?e("div",{staticClass:"layer-num"},[e("Icon",{attrs:{name:"layer"}}),t._v("\n "+t._s(t.artwork.count)+"\n ")],1):t._e(),t._v(" "),"cover"===t.mode&&"ugoira"===t.artwork.type?e("Icon",{staticClass:"btn-play",attrs:{name:"play",scale:"8"}}):t._e(),t._v(" "),"meta"===t.mode?e("div",{staticClass:"meta"},[e("div",{staticClass:"content"},[e("h2",{staticClass:"title"},[t._v(t._s(t.artwork.title))]),t._v(" "),e("img",{staticClass:"avatar",attrs:{src:t.artwork.author.avatar,alt:t.artwork.author.name}}),t._v(" "),e("div",{staticClass:"author"},[t._v(t._s(t.artwork.author.name))])])]):t._e(),t._v(" "),"title"===t.mode?e("div",{staticClass:"meta"},[e("div",{staticClass:"content"},[e("h2",{staticClass:"title"},[t._v(t._s(t.artwork.title))])])]):t._e()],1)}),ht=[],ft=(a("5f1a"),a("a3e2")),mt=(a("a9e3"),{data:function(){return{}},props:{artwork:{type:Object,required:!0},mode:{type:String,required:!1,default:"cover"},column:{type:Number,required:!1,default:2}},computed:Object(l["a"])({tagText:function(){return 1===this.artwork.x_restrict?"R-18":2===this.artwork.x_restrict&&"R-18G"}},Object(v["c"])(["isCensored"])),methods:{click:function(t){if(!t||"Artwork"===this.$route.name&&+this.$route.params.id===t)return!1;this.$emit("click-card",t)}},components:Object($["a"])({},ft["a"].name,ft["a"])}),pt=mt,vt=(a("816a"),Object(h["a"])(pt,dt,ht,!1,null,"af5e8618",null)),gt=vt.exports,wt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"image-slide"},[e("div",{staticClass:"slide"},t._l(t.images,(function(t,a){return e("img",{key:a,staticClass:"image",class:{censored:t.isCensored},attrs:{src:t.src,alt:t.title}})})),0),t._v(" "),t._t("default")],2)},bt=[],kt={data:function(){return{}},props:{images:{type:Array,required:!1}}},_t=kt,xt=(a("6767"),Object(h["a"])(_t,wt,bt,!1,null,"40953416",null)),Ct=xt.exports,yt=a("3835"),Ot=(a("99af"),a("9861"),a("88a7"),a("271a"),a("5494"),a("53ca")),jt=a("bc3a"),St=a.n(jt),$t=(a("c740"),a("caad"),a("2532"),a("a434"),a("3c65"),a("262e")),Lt=a("2caf"),Tt=a("d4ec"),It=a("bee2"),Mt=(a("e9c4"),a("b64b"),a("a002")),zt=a.n(Mt),Nt={NEVER:-1,HOUR:3600,DAY:86400,WEEK:604800,MONTH:2592e3,YEAR:31536e3,hour:function(t){return this.HOUR*t},day:function(t){return this.DAY*t},week:function(t){return this.WEEK*t},month:function(t){return this.MONTH*t},year:function(t){return this.YEAR*t}},Pt=function(){function t(){Object(Tt["a"])(this,t)}return Object(It["a"])(t,[{key:"get",value:function(t,e){var a=this.drive.getItem(t);if(a){var r=Ft(a);return Math.floor(+new Date/1e3)>=r.expires_at&&-1!==r.expires_at&&(r.data=e,this.remove(t)),r.data}return e}},{key:"set",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;try{if(void 0===e)return this.remove(t);a="number"===typeof a&&a>=0?Math.floor(+new Date/1e3)+a:-1;var r={data:e,expires_at:a};this.drive.setItem(t,Dt(r))}catch(n){console.log("Local Storage is full, Please empty data")}return e}},{key:"has",value:function(t){return void 0!==this.get(t)}},{key:"remove",value:function(t){this.drive.removeItem(t)}},{key:"clear",value:function(){this.drive.clear()}},{key:"size",get:function(){var t=0;for(var e in this.drive){var a=2*this.drive[e].length;!isNaN(a)&&Object.prototype.hasOwnProperty.call(this.drive,e)&&(t+=a)}return t.toFixed(2)}}]),t}(),Et=function(t){Object($t["a"])(a,t);var e=Object(Lt["a"])(a);function a(){var t;return Object(Tt["a"])(this,a),t=e.call(this),t.drive=window.localStorage,t}return Object(It["a"])(a)}(Pt),At=function(t){Object($t["a"])(a,t);var e=Object(Lt["a"])(a);function a(){var t;return Object(Tt["a"])(this,a),t=e.call(this),t.drive=window.sessionStorage,t}return Object(It["a"])(a)}(Pt),Ht=function(){function t(){Object(Tt["a"])(this,t),this.db=zt.a.createInstance({name:"pixiv-viewer",storeName:"cache"}),setInterval(this.clean.bind(this),6e4)}return Object(It["a"])(t,[{key:"get",value:function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(e,a){var r;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.db.getItem(e);case 2:if(r=t.sent,!r){t.next=8;break}return Math.floor(+new Date/1e3)>=r.expires_at&&-1!==r.expires_at&&(r.data=a,this.remove(e)),t.abrupt("return",r.data);case 8:return t.abrupt("return",a);case 9:case"end":return t.stop()}}),t,this)})));function e(e,a){return t.apply(this,arguments)}return e}()},{key:"set",value:function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(e,a){var r,n,s=arguments;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=s.length>2&&void 0!==s[2]?s[2]:-1,t.prev=1,void 0!==a){t.next=4;break}return t.abrupt("return",this.remove(e));case 4:return"number"===typeof r&&r>=0&&(r=Math.floor(+new Date/1e3)+r),n={data:a,expires_at:r},t.next=8,this.db.setItem(e,n);case 8:t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](1),console.error(t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})));function e(e,a){return t.apply(this,arguments)}return e}()},{key:"remove",value:function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(e){return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.db.removeItem(e);case 2:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"clear",value:function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(){return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.db.clear();case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"size",get:function(){var t=this;return new Promise((function(e,a){var r=0;t.db.iterate((function(t){var e=2*JSON.stringify(t).length;isNaN(e)||(r+=e)})).then((function(){e(r.toFixed(2))})).catch((function(t){a(t)}))}))}},{key:"clean",value:function(){var t=this;return new Promise((function(e,a){t.db.iterate(function(){var e=Object(ut["a"])(Object(lt["a"])().mark((function e(a,r){var n;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=a.expires_at,!(-1!==n&&Math.floor(+new Date/1e3)>=n)){e.next=4;break}return e.next=4,t.db.removeItem(r);case 4:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()).then(e).catch(a)}))}}]),t}(),Bt=new Et,Rt=new At,Wt=new Ht;function Dt(t){return JSON.stringify(t)}function Ft(t){if("string"===typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}}i["default"].use(v["a"]);var Vt=new v["a"].Store({state:{themeColor:"#0196fa",galleryList:[],currentIndex:-1,$swiper:null,searchHistory:Bt.get("__PIXIV_searchHistory",[]),SETTING:Bt.get("__PIXIV_SETTING",{api:"https://hibiapi.getloli.com/api/",r18:!1,r18g:!1})},getters:{currentId:function(t){return t.galleryList[t.currentIndex]?t.galleryList[t.currentIndex].id:-1},isCensored:function(t){return function(e){return 1===e.x_restrict?!t.SETTING.r18:2===e.x_restrict&&!t.SETTING.r18g}}},mutations:{setGalleryList:function(t,e){var a=e.list,r=e.id;t.galleryList=a,r&&this.commit("setCurrentIndex",r)},setCurrentIndex:function(t,e){t.currentIndex=t.galleryList.findIndex((function(t){return t.id===e}))},setSwiper:function(t,e){t.$swiper=e},setSearchHistory:function(t,e){null===e?(t.searchHistory=[],Bt.remove("__PIXIV_searchHistory")):(t.searchHistory.includes(e)&&t.searchHistory.splice(t.searchHistory.indexOf(e),1),t.searchHistory.length>=20&&t.searchHistory.pop(),t.searchHistory.unshift(e),Bt.set("__PIXIV_searchHistory",t.searchHistory))},saveSETTING:function(t,e){i["default"].set(t,"SETTING",Object.assign({},t.SETTING,e)),Bt.set("__PIXIV_SETTING",t.SETTING)}},actions:{setGalleryList:function(t,e){var a=t.commit,r=e.list,n=e.id;a("setGalleryList",{list:r,id:n})},setCurrentIndex:function(t,e){var a=t.commit;a("setCurrentIndex",e)},setSwiper:function(t,e){var a=t.commit;a("setSwiper",e)},setSearchHistory:function(t,e){var a=t.commit;a("setSearchHistory",e)},saveSETTING:function(t,e){var a=t.commit;a("saveSETTING",e)}},modules:{}}),Gt="https://hibiapi.getloli.com/api/";St.a.defaults.timeout=1e4,St.a.defaults.headers.post["Content-Type"]="application/json";var Ut=function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(e,a){var r,n;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,r=Vt.state.SETTING,t.next=4,St.a.get(e,{baseURL:r.api||Gt,params:a});case 4:return n=t.sent,t.abrupt("return",new Promise((function(t,e){var a=n.data;"object"===Object(Ot["a"])(a)?t(a):e(a)})));case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,a){return t.apply(this,arguments)}}(),qt=a("5a0c"),Yt=a.n(qt),Jt=a("27ae"),Zt=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL("image/webp").indexOf("data:image/webp")}(),Xt=function(t){var e=t.replace(/i.pximg.net/g,"pximg.journey-ad.workers.dev");return Zt||(e=e.replace(/_10_webp/g,"_70"),e=e.replace(/_webp/g,"")),e},Kt=function(t){var e=t.user,a=t.profile,r=t.workspace,n=e.id,s=e.account,i=e.name,o=e.comment,c=a.background_image_url,l=a.birth,u=a.birth_day,d=a.gender,h=a.is_premium,f=a.is_using_custom_profile_image,m=a.job,p=a.total_follow_users,v=a.total_mypixiv_users,g=a.total_illust_bookmarks_public,w=a.total_illusts,b=a.twitter_account,k=a.twitter_url,_=a.webpage;return{id:n,account:s,name:i,comment:o,avatar:Xt(e.profile_image_urls.medium),bgcover:c,birth:"".concat(l,"-").concat(u),gender:d,is_premium:h,is_using_custom_profile_image:f,job:m,follow:p,friend:v,bookmarks:g,illusts:w,twitter_account:b,twitter_url:k,webpage:_,workspace:r}},Qt=function(t){var e=t.id,a=t.title,r=t.caption,n=t.create_date,s=t.tags,i=t.tools,o=t.width,c=t.height,l=t.x_restrict,u=t.total_view,d=t.total_bookmarks,h=t.type,f=[];t.meta_single_page.original_image_url?f.push({s:Xt(t.image_urls.square_medium),m:Xt(t.image_urls.medium),l:Xt(t.image_urls.large),o:Xt(t.meta_single_page.original_image_url)}):f=t.meta_pages.map((function(t){return{s:Xt(t.image_urls.square_medium),m:Xt(t.image_urls.medium),l:Xt(t.image_urls.large),o:Xt(t.image_urls.original)}}));var m={id:e,title:a,caption:r,author:{id:t.user.id,name:t.user.name,avatar:Xt(t.user.profile_image_urls.medium)},created:n,images:f,tags:s,tools:i,width:o,height:c,count:t.page_count,view:u,like:d,x_restrict:l,type:h};return m},te=function(t){var e=Object(l["a"])(Object(l["a"])({},t),{},{images:{s:Xt(t.image_urls.square_medium),m:Xt(t.image_urls.medium),l:Xt(t.image_urls.large)},author:{id:t.user.id,name:t.user.name,avatar:Xt(t.user.profile_image_urls.medium)},count:t.page_count,view:t.total_view,like:t.total_bookmarks});return e.user.profile_image_urls.medium=Xt(t.user.profile_image_urls.medium),e},ee={url:function(t,e){return e?"https://pixiv.cat/".concat(t,"-").concat(e,".png"):"https://pixiv.cat/".concat(t,".png")},getLatest:function(){var t=arguments;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n,s,i;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.length>0&&void 0!==t[0]?t[0]:0,r=t.length>1&&void 0!==t[1]?t[1]:40,e.next=4,Ut("/v1/",{type:"latest",offset:a,per_page:r});case 4:if(n=e.sent,"success"!==n.status){e.next=9;break}s=n.response,e.next=14;break;case 9:if(!n.error){e.next=13;break}return e.abrupt("return",{status:-1,msg:n.error.user_message||n.error.message});case 13:return e.abrupt("return",{status:-1,msg:"未知错误"});case 14:return i=s.map((function(t){var e=t.id,a=t.title,r=t.caption,n=t.tags,s=t.tools,i=t.width,o=t.height,c=t.age_limit;return{id:e,title:a,caption:r,author:{id:t.user.id,name:t.user.name,avatar:Xt(t.user.profile_image_urls.px_50x50)},images:[{s:Xt(t.image_urls.px_128x128),m:Xt(t.image_urls.px_480mw),l:Xt(t.image_urls.large),o:Xt(t.image_urls.large)}],tags:n,tools:s,width:i,height:o,count:t.page_count,age_limit:c}})),e.abrupt("return",{status:0,data:i});case 16:case"end":return e.stop()}}),e)})))()},getRelated:function(t){var e=arguments;return Object(ut["a"])(Object(lt["a"])().mark((function a(){var r,n,s,i,o;return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:1,n="relatedList_".concat(t,"_p").concat(r),a.next=4,Wt.get(n);case 4:if(s=a.sent,s){a.next=20;break}return a.next=8,Ut("/pixiv/",{type:"related",id:t,page:r});case 8:if(i=a.sent,!i.illusts){a.next=13;break}o=i.illusts,a.next=18;break;case 13:if(!i.error){a.next=17;break}return a.abrupt("return",{status:-1,msg:i.error.user_message||i.error.message});case 17:return a.abrupt("return",{status:-1,msg:"未知错误"});case 18:s=o.map((function(t){return Qt(t)})),Wt.set(n,s,Nt.hour(3));case 20:return a.abrupt("return",{status:0,data:s});case 21:case"end":return a.stop()}}),a)})))()},getRankList:function(){var t=arguments;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n,s,i,o,c;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.length>0&&void 0!==t[0]?t[0]:"weekly",r=t.length>1&&void 0!==t[1]?t[1]:1,n=t.length>2&&void 0!==t[2]?t[2]:Yt()().subtract(2,"days").format("YYYY-MM-DD"),n=Yt()(n).format("YYYY-MM-DD"),s="rankList_".concat(a,"_").concat(n,"_").concat(r),e.next=7,Wt.get(s);case 7:if(i=e.sent,i){e.next=23;break}return e.next=11,Ut("/pixiv/",{type:"rank",mode:a,page:r,date:n});case 11:if(o=e.sent,!o.illusts){e.next=16;break}c=o.illusts,e.next=21;break;case 16:if(!o.error){e.next=20;break}return e.abrupt("return",{status:-1,msg:o.error.user_message||o.error.message});case 20:return e.abrupt("return",{status:-1,msg:"未知错误"});case 21:i=c.map((function(t){return Qt(t)})),Wt.set(s,i,Nt.YEAR);case 23:return e.abrupt("return",{status:0,data:i});case 24:case"end":return e.stop()}}),e)})))()},search:function(t){var e=arguments;return Object(ut["a"])(Object(lt["a"])().mark((function a(){var r,n,s,i,o;return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:1,n=e.length>2&&void 0!==e[2]?e[2]:"illust",s="searchList_".concat(n,"_").concat(Jt["Base64"].encode(t),"_").concat(r),a.next=5,Wt.get(s);case 5:if(i=a.sent,i){a.next=20;break}return a.next=9,Ut("/pixiv/",{type:"novel"===n?"search_novel":"search",word:t,page:r});case 9:if(o=a.sent,!o.illusts&&!o.novels){a.next=14;break}"illust"===n?o.illusts&&(i=o.illusts.map(Qt)):"novel"===n&&o.novels&&(i=o.novels.map(te)),a.next=19;break;case 14:if(!o.error){a.next=18;break}return a.abrupt("return",{status:-1,msg:o.error.user_message||o.error.message});case 18:return a.abrupt("return",{status:-1,msg:"未知错误"});case 19:Wt.set(s,i,Nt.hour(3));case 20:return a.abrupt("return",{status:0,data:i});case 21:case"end":return a.stop()}}),a)})))()},getArtwork:function(t){return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n,s;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a="artwork_".concat(t),e.next=3,Wt.get(a);case 3:if(r=e.sent,r){e.next=19;break}return e.next=7,Ut("/pixiv/",{type:"illust",id:t});case 7:if(n=e.sent,!n.illust){e.next=12;break}s=n.illust,e.next=17;break;case 12:if(!n.error){e.next=16;break}return e.abrupt("return",{status:-1,msg:n.error.user_message||n.error.message});case 16:return e.abrupt("return",{status:-1,msg:"未知错误"});case 17:r=Qt(s),Wt.set(a,r,Nt.MONTH);case 19:return e.abrupt("return",{status:0,data:r});case 20:case"end":return e.stop()}}),e)})))()},ugoiraMetadata:function(t){return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a="ugoira_".concat(t),e.next=3,Wt.get(a);case 3:if(r=e.sent,r){e.next=14;break}return e.next=7,Ut("/pixiv/",{type:"ugoira_metadata",id:t});case 7:if(n=e.sent,!n.error){e.next=12;break}return e.abrupt("return",{status:-1,msg:n.error.user_message||n.error.message});case 12:r={zip:Xt(n.ugoira_metadata.zip_urls.medium),frames:n.ugoira_metadata.frames};case 13:Wt.set(a,r,Nt.MONTH);case 14:return e.abrupt("return",{status:0,data:r});case 15:case"end":return e.stop()}}),e)})))()},getMemberInfo:function(t){return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a="memberInfo_".concat(t),e.next=3,Wt.get(a);case 3:if(r=e.sent,r){e.next=14;break}return e.next=7,Ut("/pixiv/",{type:"member",id:t});case 7:if(n=e.sent,!n.error){e.next=12;break}return e.abrupt("return",{status:-1,msg:n.error.user_message||n.error.message});case 12:r=Kt(n);case 13:Wt.set(a,r,Nt.hour(3));case 14:return e.abrupt("return",{status:0,data:r});case 15:case"end":return e.stop()}}),e)})))()},getMemberArtwork:function(t){var e=arguments;return Object(ut["a"])(Object(lt["a"])().mark((function a(){var r,n,s,i,o;return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:1,n="memberArtwork_".concat(t,"_p").concat(r),a.next=4,Wt.get(n);case 4:if(s=a.sent,s){a.next=24;break}return a.next=8,Ut("/pixiv/",{type:"member_illust",id:t,page:r});case 8:if(i=a.sent,!i.illusts.length){a.next=13;break}o=i.illusts,a.next=22;break;case 13:if(!i.error){a.next=17;break}return a.abrupt("return",{status:-1,msg:i.error.user_message||i.error.message});case 17:if(i.next_url){a.next=21;break}return a.abrupt("return",{status:0,data:[],finished:!0});case 21:return a.abrupt("return",{status:-1,msg:"未知错误"});case 22:s=o.map((function(t){return Qt(t)})),Wt.set(n,s,Nt.hour(3));case 24:return a.abrupt("return",{status:0,data:s});case 25:case"end":return a.stop()}}),a)})))()},getMemberFavorite:function(t,e){return Object(ut["a"])(Object(lt["a"])().mark((function a(){var r,n,s,i,o;return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r="memberFavorite_".concat(t,"_m").concat(e),a.next=3,Wt.get(r);case 3:if(n=a.sent,n){a.next=20;break}return a.next=7,Ut("/pixiv/",{type:"favorite",id:t,max_bookmark_id:e});case 7:if(s=a.sent,!s.illusts){a.next=12;break}i=s,a.next=17;break;case 12:if(!s.error){a.next=16;break}return a.abrupt("return",{status:-1,msg:s.error.user_message||s.error.message});case 16:return a.abrupt("return",{status:-1,msg:"未知错误"});case 17:o=new URLSearchParams(i.next_url),n={next:o.get("max_bookmark_id"),illusts:i.illusts.map((function(t){return Qt(t)}))},Wt.set(r,n,Nt.hour(3));case 20:return a.abrupt("return",{status:0,data:n});case 21:case"end":return a.stop()}}),a)})))()},getTags:function(){return Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r,n;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e="tags",t.next=3,Wt.get(e);case 3:if(a=t.sent,a){t.next=19;break}return t.next=7,Ut("/pixiv/",{type:"tags"});case 7:if(r=t.sent,!r.trend_tags){t.next=13;break}n=r.trend_tags,a=n.map((function(t){var e=t.tag,a=t.translated_name;return{name:e,tname:a,pic:Xt(t.illust.image_urls.square_medium)}})),t.next=18;break;case 13:if(!r.error){t.next=17;break}return t.abrupt("return",{status:-1,msg:r.error.user_message||r.error.message});case 17:return t.abrupt("return",{status:-1,msg:"未知错误"});case 18:Wt.set(e,a,Nt.DAY);case 19:return t.abrupt("return",{status:0,data:a});case 20:case"end":return t.stop()}}),t)})))()},getMemberNovel:function(t){var e=arguments;return Object(ut["a"])(Object(lt["a"])().mark((function a(){var r,n,s,i,o;return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:1,n="memberNovel_".concat(t,"_p").concat(r),a.next=4,Wt.get(n);case 4:if(s=a.sent,s){a.next=24;break}return a.next=8,Ut("/pixiv/",{type:"member_novel",id:t,page:r});case 8:if(i=a.sent,!i.novels.length){a.next=13;break}o=i.novels,a.next=22;break;case 13:if(!i.error){a.next=17;break}return a.abrupt("return",{status:-1,msg:i.error.user_message||i.error.message});case 17:if(i.next_url){a.next=21;break}return a.abrupt("return",{status:0,data:[],finished:!0});case 21:return a.abrupt("return",{status:-1,msg:"未知错误"});case 22:s=o.map((function(t){return te(t)})),Wt.set(n,s,Nt.hour(3));case 24:return a.abrupt("return",{status:0,data:s});case 25:case"end":return a.stop()}}),a)})))()},getNovel:function(t){return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n,s,i,o,c,u;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a="novel_".concat(t),e.next=3,Wt.get(a);case 3:if(r=e.sent,r){e.next=23;break}return n=[Ut("/pixiv/",{type:"novel_detail",id:t}),Ut("/pixiv/",{type:"novel_text",id:t})],e.next=8,Promise.all(n);case 8:if(s=e.sent,i=Object(yt["a"])(s,2),o=i[0],c=i[1],!o.novel){e.next=16;break}u=Object(l["a"])(Object(l["a"])({},o.novel),{},{content:c.novel_text}),e.next=21;break;case 16:if(!o.error){e.next=20;break}return e.abrupt("return",{status:-1,msg:o.error.user_message||o.error.message});case 20:return e.abrupt("return",{status:-1,msg:"未知错误"});case 21:r=te(u),Wt.set(a,r,Nt.MONTH);case 23:return e.abrupt("return",{status:0,data:r});case 24:case"end":return e.stop()}}),e)})))()},getNovelText:function(t){return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a="novel_text_".concat(t),e.next=3,Wt.get(a);case 3:if(r=e.sent,r){e.next=18;break}return e.next=7,Ut("/pixiv/",{type:"novel_text",id:t});case 7:if(n=e.sent,!n.illust){e.next=12;break}r=n.illust,e.next=17;break;case 12:if(!n.error){e.next=16;break}return e.abrupt("return",{status:-1,msg:n.error.user_message||n.error.message});case 16:return e.abrupt("return",{status:-1,msg:"未知错误"});case 17:Wt.set(a,r,Nt.MONTH);case 18:return e.abrupt("return",{status:0,data:r});case 19:case"end":return e.stop()}}),e)})))()}},ae=ee,re={name:"RankCard",data:function(){return{artList:[]}},computed:{slides:function(){var t=this.artList.slice(6,11);return t.map((function(t){return{title:t.title,src:t.images[0].m}}))}},methods:{getRankList:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var r;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,ae.getRankList("week");case 2:r=e.sent,0===r.status?t.artList=r.data:t.$toast({message:r.msg,icon:a("bc67")});case 4:case"end":return e.stop()}}),e)})))()},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})}},mounted:function(){this.getRankList()},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ot["a"].name,ot["a"]),it["a"].name,it["a"]),st["a"].name,st["a"]),"ImageCard",gt),"ImageSlide",Ct)},ne=re,se=(a("00f9"),Object(h["a"])(ne,rt,nt,!1,null,"b471efde",null)),ie=se.exports,oe=function(){var t=this,e=t._self._c;return e("div",{staticClass:"daily"},[e("van-cell",{staticClass:"cell",attrs:{border:!1},scopedSlots:t._u([{key:"title",fn:function(){return[e("Icon",{staticClass:"icon random",attrs:{name:"random"}}),t._v(" "),e("span",{staticClass:"title"},[t._v("随便看看")])]},proxy:!0}])}),t._v(" "),e("van-list",{staticClass:"artwork-list",attrs:{finished:t.finished,"finished-text":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:t.getRankList},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList}},t._l(t.artList,(function(a){return e("router-link",{key:a.id,attrs:{to:{name:"Artwork",params:{id:a.id,list:t.artList}}}},[e("ImageCard",{attrs:{mode:"cover",artwork:a}})],1)})),1)],1)])],1)},ce=[],le=(a("ab71"),a("58e6")),ue=(a("2994"),a("2bdd")),de=a("2909"),he=a("517b"),fe=a("944d"),me={name:"Daily",data:function(){return{col:2,itemWidth:0,curPage:1,artList:[],error:!1,loading:!1,finished:!1}},methods:{url:function(t,e){return ae.url(t,e)},getRankList:Object(he["a"])(Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r,n;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,ae.getRankList("day",this.curPage);case 2:e=t.sent,0===e.status?(r=e.data,n=JSON.parse(JSON.stringify(this.artList)),(a=n).push.apply(a,Object(de["a"])(r)),n=Object(fe["a"])(n,"id"),this.artList=n,this.loading=!1,this.curPage++,this.curPage>5&&(this.finished=!0),this.$nextTick(this.resize)):(this.$toast({message:e.msg}),this.loading=!1,this.error=!0),this.isLoading=!1;case 5:case"end":return t.stop()}}),t,this)}))),5e3),toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},resize:function(){if(this.$refs.cardBox){var t=document.documentElement.clientWidth;this.col=t<375?1:t<=768?2:t<=1600?3:4,this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col)}}},mounted:function(){window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ot["a"].name,ot["a"]),it["a"].name,it["a"]),st["a"].name,st["a"]),ue["a"].name,ue["a"]),le["a"].name,le["a"]),"ImageCard",gt)},pe=me,ve=(a("baa3"),Object(h["a"])(pe,oe,ce,!1,null,"2e5b7175",null)),ge=ve.exports,we={name:"Home",data:function(){return{scrollTop:0}},beforeRouteEnter:function(t,e,a){a((function(t){document.documentElement.scrollTo(0,t.scrollTop)}))},beforeRouteLeave:function(t,e,a){this.scrollTop=document.documentElement.scrollTop,a()},components:{RankCard:ie,Daily:ge}},be=we,ke=(a("1734"),Object(h["a"])(be,et,at,!1,null,"cddbfc92",null)),_e=ke.exports,xe=(a("498a"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"search"},[e("form",{staticClass:"search-bar-wrap",class:{dropdown:t.focus},attrs:{action:"/"}},[e("van-search",{staticClass:"search-bar",attrs:{shape:"round",placeholder:"请输入搜索关键词",maxlength:"50"},on:{search:function(e){return t.onBlur(!0)},cancel:t.onCancel,focus:t.onFocus,blur:function(e){return t.onBlur(!1)}},model:{value:t.keywords,callback:function(e){t.keywords=e},expression:"keywords"}}),t._v(" "),e("div",{ref:"words",staticClass:"search-bar-word",on:{click:function(e){return t.handleWordsClick(e)}}},[0!==t.keywordsList.length||t.lastWord?t._e():e("span",{staticClass:"placeholder"},[t._v("请输入搜索关键词")]),t._v(" "),t._l(t.keywordsList,(function(a,r){return e("div",{key:r,staticClass:"word"},[e("span",{staticClass:"text"},[t._v(t._s(a))]),t._v(" "),e("span",{staticClass:"close",attrs:{"data-index":r}},[e("Icon",{attrs:{name:"close"}})],1)])})),t._v(" "),t.lastWord?e("div",{staticClass:"word"},[e("span",{staticClass:"text no-line"},[t._v(t._s(t.lastWord))])]):t._e()],2),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.focus,expression:"focus"}],staticClass:"search-type"},t._l(t.searchTypeMap,(function(a){return e("div",{key:a.type,staticClass:"seacch-type__item",class:{active:t.searchType===a.type},on:{click:function(e){return t.changeSearchType(a.type)}}},[t._v("\n "+t._s(a.name)+"\n ")])})),0),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.searchHistory.length>0&&t.focus,expression:"searchHistory.length > 0 && focus"}],staticClass:"search-history"},[e("div",{staticClass:"title-bar"},[t._v("\n 历史搜索\n "),e("div",{on:{click:t.clearHistory}},[e("Icon",{attrs:{name:"del",scale:"2"}})],1)]),t._v(" "),t._l(t.searchHistory,(function(a,r){return e("div",{key:r,staticClass:"keyword",on:{click:function(e){return t.searchTag(a)}}},[t._v("\n "+t._s(a)+"\n ")])}))],2),t._v(" "),e("transition-group",{attrs:{name:"fade"}},[e("ImageSearch",{directives:[{name:"show",rawName:"v-show",value:!t.focus&&t.imageSearchShow,expression:"!focus && imageSearchShow"}],key:"container",ref:"imageSearch",on:{show:function(e){return t.switchImageSearchShow(!0)}}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.focus&&t.maskShow,expression:"!focus && maskShow"}],key:"mask",staticClass:"image-search-mask",on:{click:function(e){return t.switchImageSearchShow(!1)}}})],1)],1),t._v(" "),e("div",{staticClass:"list-wrap",class:{focus:t.focus}},[t.artList.length>0?e("van-list",{staticClass:"result-list",attrs:{finished:t.finished,"finished-text":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:t.search},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList}},t._l(t.artList,(function(a){return e("router-link",{key:a.id,attrs:{to:{name:{illust:"Artwork",novel:"Novel"}[t.searchType],params:{id:a.id,list:t.artList}}}},["illust"===t.searchType?e("ImageCard",{attrs:{mode:"meta",artwork:a}}):t._e(),t._v(" "),"novel"===t.searchType?e("NovelCard",{attrs:{mode:"meta",artwork:a}}):t._e()],1)})),1)],1)]):t._e(),t._v(" "),""===t.keywords.trim()?e("Tags",{on:{search:t.searchTag}}):t._e(),t._v(" "),e("van-loading",{directives:[{name:"show",rawName:"v-show",value:""!==t.keywords.trim()&&0===t.artList.length,expression:"keywords.trim() !== '' && artList.length === 0"}],staticClass:"loading",attrs:{size:"50px"}}),t._v(" "),e("div",{staticClass:"mask",on:{click:function(e){return t.onBlur(!0)}}})],1)])}),Ce=[],ye=(a("91d5"),a("f0ca")),Oe=(a("5852"),a("d961")),je=(a("eee7"),a("a15b"),a("4de4"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"novel-card",on:{click:function(e){return e.stopPropagation(),t.click(t.artwork.id)}}},[e("div",{staticClass:"image-wrap"},[t.tagText?e("van-tag",{staticClass:"tag-r18",attrs:{round:"",color:"R-18"===t.tagText?"#fb7299":"#ff3f3f"}},[t._v(t._s(t.tagText))]):t._e(),t._v(" "),e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.artwork.images.m,expression:"artwork.images.m"}],staticClass:"image",class:{censored:t.isCensored(t.artwork)},attrs:{alt:t.artwork.title}})],1),t._v(" "),e("div",{staticClass:"meta"},[e("div",{staticClass:"title__wrapper"},[e("h4",{staticClass:"series-title"},[t._v(t._s(t.artwork.series.title))]),t._v(" "),e("h2",{staticClass:"title"},[t._v(t._s(t.artwork.title))])]),t._v(" "),e("div",{staticClass:"info-box"},[e("span",{staticClass:"info words"},[e("Icon",{staticClass:"icon",attrs:{name:"novel",scale:"1.1"}}),t._v(t._s(t.artwork.text_length.toLocaleString("en-US"))+"字\n ")],1),t._v(" "),e("span",{staticClass:"info like"},[e("Icon",{staticClass:"icon",attrs:{name:"like"}}),t._v("\n "+t._s(t.artwork.total_bookmarks)+"\n ")],1)]),t._v(" "),e("div",{staticClass:"tag-box"},t._l(t.artwork.tags,(function(a){return e("span",{key:a.name,staticClass:"tag"},[t._v("#"+t._s(a.name))])})),0),t._v(" "),e("div",{staticClass:"author__wrapper"},[e("img",{staticClass:"avatar",attrs:{src:t.artwork.author.avatar,alt:t.artwork.author.name}}),t._v(" "),e("div",{staticClass:"author"},[t._v(t._s(t.artwork.author.name))])])])])}),Se=[],$e={data:function(){return{}},props:{artwork:{type:Object,required:!0},mode:{type:String,required:!1,default:"cover"},column:{type:Number,required:!1,default:2}},computed:Object(l["a"])({tagText:function(){return 1===this.artwork.x_restrict?"R-18":2===this.artwork.x_restrict&&"R-18G"}},Object(v["c"])(["isCensored"])),methods:{click:function(t){if(!t||"Artwork"===this.$route.name&&+this.$route.params.id===t)return!1;this.$emit("click-card",t)}},components:Object($["a"])({},ft["a"].name,ft["a"])},Le=$e,Te=(a("4f40"),Object(h["a"])(Le,je,Se,!1,null,"7e977286",null)),Ie=Te.exports,Me=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tags"},[t.tags.length>0?e("div",{staticClass:"top"},[e("div",{staticClass:"tag",on:{click:function(e){return e.stopPropagation(),t.search(t.tags[0].name)}}},[e("img",{attrs:{src:t.tags[0].pic,alt:""}}),t._v(" "),e("div",{staticClass:"meta"},[e("div",{staticClass:"content"},[t.tags[0].name?e("div",{staticClass:"name",class:{s:t.tags[0].name.length>=10,m:t.tags[0].name.length>=6}},[t._v("\n #"+t._s(t.tags[0].name)+"\n ")]):t._e(),t._v(" "),t.tags[0].tname?e("div",{staticClass:"tname",class:{s:t.tags[0].tname.length>=10,m:t.tags[0].tname.length>=6}},[t._v("\n "+t._s(t.tags[0].tname)+"\n ")]):t._e()])])])]):t._e(),t._v(" "),t.tags.length>3?e("div",{staticClass:"bottom"},[e("div",{staticClass:"row"},t._l(t.tags.slice(1),(function(a,r){return e("div",{key:r,staticClass:"tag",on:{click:function(e){return e.stopPropagation(),t.search(a.name)}}},[e("img",{attrs:{src:a.pic,alt:""}}),t._v(" "),e("div",{staticClass:"meta"},[e("div",{staticClass:"content"},[a.name?e("div",{staticClass:"name",class:[t.getLength(a.name)]},[t._v("\n #"+t._s(a.name)+"\n ")]):t._e(),t._v(" "),a.tname?e("div",{staticClass:"tname",class:[t.getLength(a.tname)]},[t._v("\n "+t._s(a.tname)+"\n ")]):t._e()])])])})),0)]):t._e()])},ze=[],Ne={data:function(){return{tags:[]}},methods:{search:function(t){this.$emit("search",t)},getTags:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,ae.getTags();case 2:a=e.sent,0===a.status?t.tags=a.data:(t.$toast({message:a.msg}),t.loading=!1,t.error=!0);case 4:case"end":return e.stop()}}),e)})))()},getLength:function(t){return t.length>=10?"s":t.length>=4?"m":"l"}},mounted:function(){this.getTags()},components:{}},Pe=Ne,Ee=(a("3b7d"),Object(h["a"])(Pe,Me,ze,!1,null,"2a20f358",null)),Ae=Ee.exports,He=function(){var t=this,e=t._self._c;return e("div",{staticClass:"image-search"},[e("van-uploader",{staticClass:"open-dialog",attrs:{"before-read":t.beforeRead,"after-read":t.afterRead,disabled:t.loading}},[e("Icon",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],attrs:{name:"image",scale:"3"}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"loading"})],1),t._v(" "),t.file?e("div",{staticClass:"container"},[e("div",{staticClass:"thumb"},[e("img",{attrs:{src:t.file.content,alt:t.file.file.name}})]),t._v(" "),t.resultList?e("div",{staticClass:"result-list"},t._l(t.resultList,(function(a){return e("div",{key:a.id,staticClass:"result",on:{click:function(e){return t.toArtwork(a.id)}}},[e("img",{staticClass:"thumb",attrs:{src:a.thumb,alt:a.title}}),t._v(" "),e("div",{staticClass:"meta"},[e("h2",{staticClass:"title",domProps:{innerHTML:t._s(a.title)}}),t._v(" "),e("div",{staticClass:"info pid"},[t._v("ID: "+t._s(a.id))]),t._v(" "),e("div",{staticClass:"info author",domProps:{innerHTML:t._s(a.author)}})]),t._v(" "),e("div",{staticClass:"similarity"},[t._v(t._s(a.similarity)+"%")]),t._v(" "),+a.similarity<80?e("div",{staticClass:"low",style:{opacity:(100-a.similarity)/100}}):t._e()])})),0):t._e()]):t._e()],1)},Be=[],Re=(a("e930"),a("8f80")),We=(a("2ca0"),{computed:{resultList:function(){if(!this.res)return null;var t=this.res.results.map((function(t){return{id:t.data.pixiv_id,title:t.data.title,author:t.data.member_name,thumb:t.header.thumbnail,similarity:t.header.similarity}}));return t=Object(fe["a"])(t,"id"),t=orderBy(t,"similarity","desc"),t}},data:function(){return{file:null,loading:!1,res:null}},methods:{reset:function(){this.file=null},beforeRead:function(t){return!!t.type.startsWith("image/")||(this.$toast("请选择图片文件"),!1)},afterRead:function(t){var e=this;this.loading=!0;var a=250,r=250,n=document.createElement("canvas"),s=n.getContext("2d");n.width=a,n.height=r,s.clearRect(0,0,a,r);var i=new Image;i.onload=function(){s.drawImage(i,0,0,a,r),n.toBlob((function(a){var r=new FormData;r.append("file",new File([a],t.file.name));var n=new XMLHttpRequest;n.onreadystatechange=function(){if(200==n.status){if(!n.responseText)return;try{e.file=t,e.res=JSON.parse(n.responseText),e.loading=!1,e.$emit("show")}catch(a){e.loading=!1,e.$toast({type:"fail",message:"返回结果解析失败"})}}},n.open("POST","https://api.imjad.cn/pixivsearch/",!0),n.send(r)}),t.type||"image/png")},i.src=t.content},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t}})}},components:Object($["a"])({},Re["a"].name,Re["a"])}),De=We,Fe=(a("32af"),Object(h["a"])(De,He,Be,!1,null,"41e4f030",null)),Ve=Fe.exports,Ge={beforeRouteEnter:function(t,e,a){a((function(t){document.documentElement.scrollTo(0,t.scrollTop)}))},beforeRouteLeave:function(t,e,a){this.scrollTop=document.documentElement.scrollTop,a()},data:function(){return{col:2,itemWidth:0,scrollTop:0,searchType:"illust",keywords__:"",keywords:"",keywordsList:[],lastWord:"",focus:!1,curPage:1,artList:[],error:!1,loading:!1,finished:!1,maskShow:!1,imageSearchShow:!0,searchTypeMap:[{name:"插画",type:"illust"},{name:"小说",type:"novel"}]}},watch:{$route:function(){var t=this.$route.query,e=t.type,a=t.keyword;a&&this.keywords.trim()!==a.trim()&&(this.keywords=a+" ",this.reset(),this.searchType=e||"illust",this.search(this.keywords))},keywords:function(){var t=this,e=this.keywords.replace(/\s\s+/g," ").trimLeft().split(" ");if(1===e.length&&""===e[0])return this.keywordsList=[],void this.reset();this.lastWord=e.pop(),this.keywordsList=e,this.$nextTick((function(){t.$refs.words.scrollLeft=t.$refs.words.clientWidth;var e=document.querySelector(".list-wrap");e&&e.scrollTo({top:0})}))}},computed:Object(l["a"])({},Object(v["d"])(["searchHistory"])),methods:Object(l["a"])({reset:function(){this.curPage=1,this.artList=[],this.loading=!1,this.finished=!1},handleWordsClick:function(t){var e=t.target;if("close"===e.className){var a=this.keywords.trim().split(" ");a.splice(e.dataset.index,1),this.keywords=a.join(" ")+" ",this.reset(),this.search(this.keywords)}else document.querySelector('input[type="search"]').focus()},changeSearchType:function(t){this.searchType!==t&&(this.reset(),this.searchType=t,this.resize(),this.search(this.keywords))},search:Object(he["a"])(function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(e){var a,r,n,s;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=e||this.keywords,this.keywords__=e,e=e.trim(),""!==e){t.next=7;break}return this.keywords="",this.reset(),t.abrupt("return");case 7:return console.log(e),this.setSearchHistory(e),t.next=11,ae.search(e,this.curPage,this.searchType);case 11:a=t.sent,0===a.status?(n=a.data,s=JSON.parse(JSON.stringify(this.artList)),(r=s).push.apply(r,Object(de["a"])(n)),s=Object(fe["a"])(s,"id"),this.artList=s,this.loading=!1,this.curPage++,this.curPage>5&&(this.finished=!0),this.$route.query.keyword===e&&this.$route.query.type===this.searchType||this.$router.replace({name:"Search",query:{type:this.searchType,keyword:e}}),this.$nextTick(this.resize)):(this.$toast({message:a.msg}),this.loading=!1,this.error=!0),this.isLoading=!1;case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),5e3),odd:function(t){return t.filter((function(t,e){return(e+1)%2}))},even:function(t){return t.filter((function(t,e){return!((e+1)%2)}))},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},onCancel:function(){},onFocus:function(){this.focus=!0},onBlur:function(t){var e=this,a="".concat(this.keywords," ").replace(/\s\s+/g," ");if(this.keywords=a,this.$nextTick((function(){e.$refs.words.scrollLeft=e.$refs.words.clientWidth})),/^\d+$/.test(a.trim()))return this.$router.push({name:"Artwork",params:{id:a.trim()}}),this.keywords="",this.keywordsList=[],void(this.lastWord="");if(t){if(this.focus=!1,this.keywords__===a)return!1;this.reset(),this.search(this.keywords)}},searchTag:function(t){this.keywords=t+" ",this.onBlur(!0)},clearHistory:function(){this.setSearchHistory(null)},switchImageSearchShow:function(t){t||this.$refs.imageSearch.reset(),this.maskShow=t},resize:function(){if(this.$refs.cardBox){var t=document.documentElement.clientWidth;"novel"==this.searchType?this.col=1:this.col=t<375?1:t<=768?2:t<=1600?3:4,this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col)}}},Object(v["b"])(["setSearchHistory"])),mounted:function(){var t=this,e=document.querySelector('input[type="search"]');document.addEventListener("selectionchange",(function(){t.focus&&e.setSelectionRange(e.value.length,e.value.length)}));var a=this.$route.query,r=a.type,n=a.keyword;if("Search"===this.$route.name&&n){if(!n||this.keywords.trim()===n.trim())return;this.keywords=n+" ",this.reset(),this.searchType=r||"illust",this.search(this.keywords)}window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({Tags:Ae,ImageSearch:Ve},Oe["a"].name,Oe["a"]),ue["a"].name,ue["a"]),L["a"].name,L["a"]),ye["a"].name,ye["a"]),st["a"].name,st["a"]),"ImageCard",gt),"NovelCard",Ie)},Ue=Ge,qe=(a("ec6f"),Object(h["a"])(Ue,xe,Ce,!1,null,"d098d5ac",null)),Ye=qe.exports,Je=function(){var t=this,e=t._self._c;return e("div",{staticClass:"rank"},[e("div",{staticClass:"top"},[e("Nav",{attrs:{menu:t.menu}}),t._v(" "),e("v-date-picker",{attrs:{attributes:[{key:"today",highlight:"yellow",dates:t.date}],"min-date":t.minDate,"max-date":t.maxDate,mode:"single",popover:{placement:"bottom",visibility:"click"},masks:{title:"YYYY年 MMM"},locale:"zh"},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}},[e("div",{staticClass:"calendar"},[e("div",{staticClass:"date"},[t._v(t._s(t.dateNum))])])])],1),t._v(" "),t.artList.length>=3?e("Top3",{attrs:{artList:t.artList.slice(0,3)}}):t._e(),t._v(" "),t.artList.length>3?e("van-list",{staticClass:"rank-list",attrs:{finished:t.finished,"finished-text":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:t.getRankList},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList.slice(3)}},t._l(t.artList.slice(3),(function(a){return e("router-link",{key:a.id,attrs:{to:{name:"Artwork",params:{id:a.id,list:t.artList}}}},[e("ImageCard",{attrs:{mode:"cover",artwork:a}})],1)})),1)],1)]):t._e(),t._v(" "),e("van-loading",{directives:[{name:"show",rawName:"v-show",value:!t.artList||0===t.artList.length,expression:"!artList || artList.length === 0"}],staticClass:"loading",attrs:{size:"50px"}})],1)},Ze=[],Xe=function(){var t=this,e=t._self._c;return e("div",{staticClass:"nav"},t._l(t.menu,(function(a,r){return e("router-link",{directives:[{name:"show",rawName:"v-show",value:!a.x||t.isShowR18,expression:"!item.x || isShowR18"}],key:r,staticClass:"normal",class:{cur:t.$route.params.type===r},attrs:{to:{name:"Rank",params:{type:r}},tag:"a"}},[t._v(t._s(a.name))])})),1)},Ke=[],Qe={props:{menu:{type:Object,required:!0}},computed:Object(l["a"])({isShowR18:function(){return this.SETTING.r18}},Object(v["d"])(["SETTING"])),data:function(){return{}},watch:{$route:function(){}},methods:{init:function(){var t=document.querySelector(".cur");t&&t.scrollIntoView()}},mounted:function(){this.init()},updated:function(){this.init()}},ta=Qe,ea=(a("3de1"),Object(h["a"])(ta,Xe,Ke,!1,null,"0814109b",null)),aa=ea.exports,ra=function(){var t=this,e=t._self._c;return e("div",{staticClass:"top3"},[e("div",{staticClass:"box l"},[e("ImageCard",{attrs:{mode:"meta",artwork:t.artList[0]},on:{"click-card":function(e){return t.toArtwork(e)}}})],1),t._v(" "),e("div",{staticClass:"box r"},[e("div",{staticClass:"box t"},[e("ImageCard",{attrs:{mode:"meta",artwork:t.artList[1]},on:{"click-card":function(e){return t.toArtwork(e)}}})],1),t._v(" "),e("div",{staticClass:"box b"},[e("ImageCard",{attrs:{mode:"meta",artwork:t.artList[2]},on:{"click-card":function(e){return t.toArtwork(e)}}})],1)])])},na=[],sa={props:{artList:{type:Array,required:!0}},data:function(){return{}},methods:{toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})}},components:{ImageCard:gt}},ia=sa,oa=(a("ab54"),Object(h["a"])(ia,ra,na,!1,null,"17a42fa8",null)),ca=oa.exports,la={name:"Rank",beforeRouteEnter:function(t,e,a){a((function(t){document.documentElement.scrollTo(0,t.scrollTop)}))},beforeRouteLeave:function(t,e,a){this.scrollTop=document.documentElement.scrollTop,a()},data:function(){return{col:2,itemWidth:0,scrollTop:0,minDate:Yt()("2007-09-13").toDate(),maxDate:Yt()().subtract(2,"days").toDate(),date:Yt()().subtract(2,"days").toDate(),isDatePickerShow:!1,curType:"daily",curPage:1,artList:[],error:!1,loading:!1,finished:!1,menu:{daily:{name:"日榜",io:"day"},weekly:{name:"周榜",io:"week"},monthly:{name:"月榜",io:"month"},rookie:{name:"新人榜",io:"week_rookie"},original:{name:"原创榜",io:"week_original"},male:{name:"男性向",io:"day_male"},female:{name:"女性向",io:"day_female"},r18:{name:"R-18 - 日榜",io:"day_r18",x:!0},"r18-w":{name:"R-18 - 周榜",io:"week_r18",x:!0},"r18-m":{name:"R-18 - 男性向",io:"day_male_r18",x:!0},"r18-f":{name:"R-18 - 女性向",io:"day_female_r18",x:!0}}}},computed:{dateNum:function(){return Yt()(this.date).date()}},watch:{$route:function(){"Rank"===this.$route.name&&this.$route.params.type!==this.curType&&this.init()},date:function(t,e){t!==e&&this.init()}},methods:{reset:function(){this.curType="daily",this.curPage=1,this.artList=[]},init:function(){this.reset(),this.curType=this.$route.params.type,this.getRankList()},getIOType:function(t){return this.menu[t]?this.menu[t].io:null},getRankList:Object(he["a"])(Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r,n,s;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=this.getIOType(this.curType),t.next=3,ae.getRankList(e,this.curPage,this.date);case 3:a=t.sent,0===a.status?(n=a.data,s=JSON.parse(JSON.stringify(this.artList)),(r=s).push.apply(r,Object(de["a"])(n)),s=Object(fe["a"])(s,"id"),this.artList=s,this.loading=!1,this.curPage++,this.curPage>5&&(this.finished=!0),this.$nextTick(this.resize)):(this.$toast({message:a.msg}),this.loading=!1,this.error=!0),this.isLoading=!1;case 6:case"end":return t.stop()}}),t,this)}))),5e3),odd:function(t){return t.filter((function(t,e){return(e+1)%2}))},even:function(t){return t.filter((function(t,e){return!((e+1)%2)}))},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},showPopup:function(){this.isDatePickerShow=!0},resize:function(){if(this.$refs.cardBox){var t=document.documentElement.clientWidth;this.col=t<375?1:t<=768?2:t<=1600?3:4,this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col)}}},mounted:function(){this.init(),window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({Nav:aa,Top3:ca},ue["a"].name,ue["a"]),L["a"].name,L["a"]),ye["a"].name,ye["a"]),"ImageCard",gt)},ua=la,da=(a("98da"),Object(h["a"])(ua,Je,Ze,!1,null,"73bc9db8",null)),ha=da.exports,fa=function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting"},[e("van-cell",{attrs:{center:"",title:"缓存数据",label:t._f("bytes")(t.size)},scopedSlots:t._u([{key:"right-icon",fn:function(){return[e("van-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.clearCache("local")}}},[t._v("清理")])]},proxy:!0}])}),t._v(" "),e("van-cell",{attrs:{center:"",title:"R-18作品显示",label:"包含裸露内容或性描写"},scopedSlots:t._u([{key:"right-icon",fn:function(){return[e("van-switch",{attrs:{value:t.currentSETTING.r18,size:"24"},on:{input:function(e){return t.onR18Change(e,1)}}})]},proxy:!0}])}),t._v(" "),e("van-cell",{attrs:{center:"",title:"R-18G作品显示",label:"包含血腥或恶心内容"},scopedSlots:t._u([{key:"right-icon",fn:function(){return[e("van-switch",{attrs:{value:t.currentSETTING.r18g,size:"24"},on:{input:function(e){return t.onR18Change(e,2)}}})]},proxy:!0}])}),t._v(" "),e("van-field",{attrs:{label:"API地址",placeholder:"填写一个可用的API地址"},model:{value:t.currentSETTING.api,callback:function(e){t.$set(t.currentSETTING,"api","string"===typeof e?e.trim():e)},expression:"currentSETTING.api"}}),t._v(" "),e("van-cell",{attrs:{center:"",title:"Pixiv Viewer",label:"https://github.com/journey-ad/pixiv-viewer",url:"https://github.com/journey-ad/pixiv-viewer"}}),t._v(" "),e("van-cell",{attrs:{center:"",title:"构建日期",label:t.buildDate}})],1)},ma=[],pa=(a("be7f"),a("565f")),va=(a("b000"),a("1a23")),ga=(a("66b9"),a("b650")),wa=(a("e17f"),a("2241")),ba=(a("acd8"),{name:"Setting",data:function(){return{buildDate:C(1729163827,"yyyy-MM-dd"),currentSETTING:{api:"https://hibiapi.getloli.com/api/",r18:!1,r18g:!1},size:0}},computed:Object(l["a"])({},Object(v["d"])(["SETTING"])),watch:{$route:function(){this.calcCacheSize()}},methods:Object(l["a"])({onR18Change:function(t,e){var a,r=this;1===e&&(a="R-18"),2===e&&(a="R-18G"),t?wa["a"].confirm({message:"确定要开启".concat(a,"作品显示吗?请确保您的年龄已满18岁,且未违反当地法律法规所规定的内容"),confirmButtonColor:"black",cancelButtonColor:"#1989fa",closeOnPopstate:!0}).then((function(){1===e&&(r.currentSETTING.r18=t),2===e&&(r.currentSETTING.r18g=t,setTimeout((function(){wa["a"].alert({message:"请注意,开启".concat(a,"开关可能会对您的身心健康造成不可逆的影响,如若感到不适,请立即关闭应用并寻求医学帮助")})}),200))})).catch((function(){console.log("操作取消")})):(1===e&&(this.currentSETTING.r18=t),2===e&&(this.currentSETTING.r18g=t))},calcCacheSize:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Wt.size;case 2:t.size=e.sent;case 3:case"end":return e.stop()}}),e)})))()},clearCache:function(t){var e=this;wa["a"].confirm({message:"确定要清理缓存数据吗?清理后将重新从网络加载相关内容",confirmButtonColor:"black",cancelButtonColor:"#1989fa",closeOnPopstate:!0}).then(Object(ut["a"])(Object(lt["a"])().mark((function a(){return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if("local"!==t){a.next=3;break}return a.next=3,Wt.clear();case 3:"session"===t&&Rt.clear(),e.calcCacheSize(),e.$toast.success("清理完成");case 6:case"end":return a.stop()}}),a)}))))}},Object(v["b"])(["saveSETTING"])),filters:{bytes:function(t){if(t=Number(t),0===t)return"0 B";var e=1024,a=0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/Math.pow(e,n)).toFixed(a))+" "+r[n]}},mounted:function(){this.currentSETTING=Object.assign({},this.currentSETTING,this.SETTING),this.calcCacheSize()},updated:function(){this.saveSETTING(this.currentSETTING)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ga["a"].name,ga["a"]),va["a"].name,va["a"]),pa["a"].name,pa["a"])}),ka=ba,_a=(a("20ba"),Object(h["a"])(ka,fa,ma,!1,null,"70e4ecae",null)),xa=_a.exports,Ca=function(){var t=this,e=t._self._c;return e("div",{staticClass:"artwork"},[e("TopBar"),t._v(" "),t.artwork?e("div",[e("ImageView",{ref:"imgView",attrs:{artwork:t.artwork,lazy:!0},on:{"open-download":function(e){t.ugoiraDownloadPanelShow=!0}}}),t._v(" "),e("van-skeleton",{staticClass:"skeleton",attrs:{avatar:"",row:3,"avatar-size":"42px",loading:t.loading}},[e("Meta",{attrs:{artwork:t.artwork}})],1),t._v(" "),e("van-divider"),t._v(" "),e("keep-alive",[t.artwork.author?e("AuthorCard",{key:t.artwork.id,attrs:{id:t.artwork.author.id}}):t._e()],1),t._v(" "),e("van-divider"),t._v(" "),e("keep-alive",[e("Related",{key:t.artwork.id,attrs:{artwork:t.artwork}})],1)],1):t._e(),t._v(" "),e("van-action-sheet",{attrs:{actions:t.ugoiraDownloadPanelActions,"cancel-text":"取消",description:"请选择下载格式","close-on-popstate":"","close-on-click-action":""},on:{select:t.onUgoiraDownloadPanelSelect},model:{value:t.ugoiraDownloadPanelShow,callback:function(e){t.ugoiraDownloadPanelShow=e},expression:"ugoiraDownloadPanelShow"}})],1)},ya=[],Oa=(a("2cbd"),a("ab2c")),ja=(a("0209"),a("7d5e")),Sa=(a("2b28"),a("9ed2")),$a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"top-bar-wrap",class:Object($["a"])(Object($["a"])({transparent:t.transparent},t.color,!0),"padding",t.padding)},[e("van-nav-bar",{staticClass:"top-bar",attrs:{"left-arrow":"",border:!1},on:{"click-left":t.back},scopedSlots:t._u([{key:"left",fn:function(){return[e("Icon",{attrs:{name:"left-arrow",scale:"2.6"}})]},proxy:!0}])})],1)},La=[],Ta=(a("5246"),a("6b41")),Ia=0,Ma={props:{action:{type:Function},transparent:{type:Boolean,default:!1},color:{type:String,default:"light"},padding:{type:Boolean,default:!0}},methods:{back:function(){if(this.action)this.action();else if(history.length<=2)this.$router.push({name:"Home"});else{if(Ia>=5)return this.$router.replace({name:"Home"}),void(Ia=0);this.$router.back(),Ia++}}},components:Object($["a"])({},Ta["a"].name,Ta["a"])},za=Ma,Na=(a("24c4"),Object(h["a"])(za,$a,La,!1,null,"38202290",null)),Pa=Na.exports,Ea=function(){var t=this,e=t._self._c;return e("div",{ref:"view",staticClass:"image-view",class:{shrink:t.isShrink,loaded:t.artwork.images,censored:t.isCensored(t.artwork)},on:{click:t.showFull}},[t._l(t.artwork.images,(function(a,r){return e("div",{key:r,staticClass:"image-box",style:0===r?{width:"".concat(t.displayWidth,"px"),height:"".concat(t.displayWidth/(t.artwork.width/t.artwork.height),"px")}:null},[t.lazy?e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.l,expression:"url.l"}],staticClass:"image",attrs:{alt:"".concat(t.artwork.title," - Page ").concat(r+1)},on:{click:function(e){e.stopPropagation(),t.view(r,t.isCensored(t.artwork))}}}):e("img",{staticClass:"image",style:{width:t.displayWidth,height:t.artwork.width/t.displayWidth*t.artwork.height*(t.artwork.width/t.artwork.height)},attrs:{src:a.l,alt:"".concat(t.artwork.title," - Page ").concat(r+1)},on:{click:function(e){e.stopPropagation(),t.view(r,t.isCensored(t.artwork))}}}),t._v(" "),"ugoira"===t.artwork.type?e("canvas",{ref:"ugoira",refInFor:!0,staticClass:"ugoira",attrs:{width:t.artwork.width,height:t.artwork.height,id:"ugoira"},on:{click:function(e){return t.openDownloadPanel()}}}):t._e()])})),t._v(" "),t.isShrink?e("Icon",{staticClass:"dropdown",attrs:{name:"dropdown",scale:"4"}}):t._e(),t._v(" "),"ugoira"===t.artwork.type?e("div",{staticClass:"ugoira-controls"},[t.ugoiraPlaying?e("div",{staticClass:"btn-pause",on:{click:function(e){return t.drawCanvas("pause")}}},[e("Icon",{staticClass:"pause",attrs:{name:"pause",scale:"6"}})],1):e("div",{staticClass:"btn-play",on:{click:function(e){return t.playUgoira()}}},[e("Icon",{staticClass:"play",attrs:{name:"play",scale:"6"}})],1),t._v(" "),t.progressShow?e("div",{staticClass:"progress-bar",style:{width:"".concat(100*t.progress,"%")}},[e("div",{staticClass:"background"})]):t._e()]):t._e(),t._v(" "),e("van-image-preview",{attrs:{"data-scroll":t.isScroll,"start-position":t.curView,images:t.original},scopedSlots:t._u([{key:"cover",fn:function(){return[e("div",{staticClass:"preview-action__wrapper"},[e("div",{staticClass:"preview-action",attrs:{title:"保存图片"},on:{click:function(e){return t.saveImage(t.original[t.curView])}}},[e("Icon",{staticClass:"save",attrs:{name:"save"}})],1)])]},proxy:!0}]),model:{value:t.show,callback:function(e){t.show=e},expression:"show"}})],2)},Aa=[],Ha=(a("dca8"),a("4160"),a("159b"),a("07ac"),a("2b3d"),a("c4e3")),Ba=a.n(Ha),Ra=a("cd40"),Wa=a.n(Ra),Da=a("3360"),Fa=a.n(Da),Va=a("21a6"),Ga=a.n(Va),Ua={watch:{artwork:function(t){t.images&&t.images.length>0&&this.init()}},props:{artwork:{type:Object,required:!0},lazy:{type:Boolean,default:!0}},computed:Object(l["a"])(Object(l["a"])({original:function(){var t;return null!==(t=this.artwork)&&void 0!==t&&null!==(t=t.images)&&void 0!==t&&t.length?this.artwork.images.map((function(t){return t.o})):[]},isScroll:function(){return this.artwork.height/this.artwork.width>4}},Object(v["d"])(["$swiper"])),Object(v["c"])(["isCensored"])),data:function(){return{show:!1,curView:0,displayWidth:0,displayHeight:0,isShrink:!1,ugoira:null,ugoiraPlaying:!1,curIndex:0,progressShow:!1,progress:0}},methods:{view:function(t,e){if(e)this.$toast({message:"根据当前设置,此内容将不予显示",icon:a("1ccf")});else if(window.plus){var r=t;1==Object.keys(this.original).length&&(r=0);var n=[];for(var s in this.original)n.push(this.original[s]);plus.nativeUI.previewImage(n,{current:r,onLongPress:function(t){var e=[{title:"保存至相册"}];plus.nativeUI.actionSheet({title:"选择操作",cancel:"取消",buttons:e},(function(e){1==e.index&&plus.gallery.save(t.url,(function(){plus.nativeUI.toast("保存成功")}),(function(){plus.nativeUI.toast("保存失败")}))}))}})}else this.curView=t,this.show=!0},showFull:function(){this.isShrink&&(this.isShrink=!1)},ugoiraMetadata:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,ae.ugoiraMetadata(t.artwork.id);case 2:if(a=e.sent,0!==a.status){e.next=7;break}return e.abrupt("return",Object.freeze(a.data));case 7:t.$toast({message:a.msg});case 8:case"end":return e.stop()}}),e)})))()},playUgoira:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.progressShow){e.next=2;break}return e.abrupt("return");case 2:if(!t.ugoira){e.next=5;break}return t.drawCanvas("play"),e.abrupt("return");case 5:return e.next=7,t.ugoiraMetadata();case 7:a=e.sent,r={},a.frames.forEach((function(t){r[t.file]=t})),t.ugoira={frames:r,zip:a.zip},t.progressShow=!0,St.a.get(a.zip,{responseType:"blob",timeout:3e4,onDownloadProgress:function(e){t.progress=e.loaded/e.total}}).then((function(e){var a=new Ba.a;a.loadAsync(e.data).then((function(a){var r=0,n=Object.keys(a.files);n.forEach((function(s){a.file(s).async("blob").then(function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(e){return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.t0=e,t.next=3,createImageBitmap(e);case 3:return t.t1=t.sent,t.abrupt("return",{blob:t.t0,bmp:t.t1});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then((function(a){var i=a.blob,o=a.bmp;t.ugoira.frames[s].blob=i,t.ugoira.frames[s].bmp=o,++r===n.length&&(console.info("Frames loaded:","frames ".concat(n.length),"size ".concat(e.data.size)),t.progressShow=!1,t.drawCanvas("play"))}))}))}))})).catch((function(e){t.resetUgoira(),t.$toast({message:e.message})}));case 13:case"end":return e.stop()}}),e)})))()},drawCanvas:function(t){var e=this,a=this.$refs.ugoira[0].getContext("2d"),r=this.artwork,n=r.width,s=r.height,i=Object.values(this.ugoira.frames),o=function t(){e.curIndex++,setTimeout((function(){e.ugoira&&e.ugoiraPlaying&&(a.clearRect(0,0,n,s),a.drawImage(i[e.curIndex-1].bmp,0,0,n,s),e.curIndex>=i.length&&(e.curIndex=0),t())}),0===e.curIndex?0:i[e.curIndex-1].delay)};"play"===t?(this.ugoiraPlaying=!0,o()):"pause"===t&&(this.ugoiraPlaying=!1)},downloadZIP:function(){Ga.a.saveAs(this.ugoira.zip,"[".concat(this.artwork.author.name,"] ").concat(this.artwork.title," - ").concat(this.artwork.id,".zip"))},downloadWebM:function(){if(!/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream){var t=[this.displayWidth,this.displayHeight],e=t[0],r=t[1],n=document.createElement("canvas");n.width=e,n.height=r;var s=n.getContext("2d"),i=new Fa.a.Video;Object.values(this.ugoira.frames).forEach((function(t){s.clearRect(0,0,e,r),s.drawImage(t.bmp,0,0,e,r),i.add(s,t.delay)}));var o=i.compile();Ga.a.saveAs(o,"[".concat(this.artwork.author.name,"] ").concat(this.artwork.title," - ").concat(this.artwork.id,".webm"))}else this.$toast({message:"iOS 设备暂不支持 WebM 格式下载",icon:a("bc67")})},downloadGIF:function(){var t=this,e=Object.values(this.ugoira.frames),a=1;e.length>=100&&(a=2,e=e.filter((function(t,e){return e%a===0})));var r=[this.displayWidth,this.displayHeight],n=r[0],s=r[1],i=document.createElement("canvas");i.width=n,i.height=s;var o=i.getContext("2d"),c=new Wa.a({workers:4,quality:10,width:n,height:s,workerScript:"./static/js/gif.worker.js"});Object.values(e).forEach((function(t){o.clearRect(0,0,n,s),o.drawImage(t.bmp,0,0,n,s),c.addFrame(o,{copy:!0,delay:t.delay*a})})),c.on("finished",(function(e){Ga.a.saveAs(e,"[".concat(t.artwork.author.name,"] ").concat(t.artwork.title," - ").concat(t.artwork.id,".gif"))})),c.render()},saveImage:function(t){var e=this.artwork,a=e.id,r=e.title,n=e.author,s=new URL(t).pathname.split(".").pop(),i="".concat(a," - [").concat(n.name,"] ").concat(r,".").concat(s);Ga.a.saveAs(t,i)},download:function(t){switch(t){case"ZIP":this.downloadZIP();break;case"GIF":this.downloadGIF();break;case"WebM":this.downloadWebM();break;default:break}},openDownloadPanel:function(){this.progressShow||(this.ugoira?window.plus||this.$emit("open-download"):this.playUgoira())},resetUgoira:function(){this.ugoira=null,this.ugoiraPlaying=!1,this.curIndex=0,this.progress=0,this.progressShow=!1},resize:function(){var t=this;this.$nextTick((function(){t.displayWidth=document.getElementById("app").getBoundingClientRect().width,t.displayHeight=t.displayWidth/(t.artwork.width/t.artwork.height),setTimeout((function(){t.artwork.images&&t.artwork.images.length>=3?t.isShrink=!0:t.isShrink=!1}),0)}))},init:function(){this.resetUgoira(),this.resize()}},mounted:function(){this.init(),window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},deactivated:function(){this.resetUgoira()},components:Object($["a"])({},r["a"].Component.name,r["a"].Component)},qa=Ua,Ya=(a("2024"),Object(h["a"])(qa,Ea,Aa,!1,null,"14e33676",null)),Ja=Ya.exports,Za=function(){var t=this,e=t._self._c;return t.artwork.author?e("div",{staticClass:"artwork-meta"},[e("div",{staticClass:"mask"},[e("canvas",{ref:"mask",staticClass:"mask-text"})]),t._v(" "),e("div",{staticClass:"author-info"},[e("router-link",{attrs:{to:{name:"Users",params:{id:t.artwork.author.id}}}},[e("img",{staticClass:"avatar",attrs:{src:t.artwork.author.avatar,alt:t.artwork.author.name,title:t.artwork.author.name}})]),t._v(" "),e("div",{staticClass:"name-box"},[e("h2",{staticClass:"title",attrs:{title:t.artwork.title}},[t._v(t._s(t.artwork.title))]),t._v(" "),e("div",{staticClass:"author",attrs:{title:t.artwork.author.name}},[t._v("\n "+t._s(t.artwork.author.name)+"\n ")])])],1),t._v(" "),e("div",{staticClass:"date"},[e("span",{staticClass:"created"},[t._v(t._s(t._f("dayjs")(t.artwork.created,"YYYY-MM-DD hh:mm")))]),t._v(" "),e("span",{staticClass:"view"},[e("Icon",{staticClass:"icon",attrs:{name:"view"}}),t._v("\n "+t._s(t._f("convertToK")(t.artwork.view))+"\n ")],1),t._v(" "),e("span",{staticClass:"like"},[e("Icon",{staticClass:"icon",attrs:{name:"like"}}),t._v("\n "+t._s(t._f("convertToK")(t.artwork.like))+"\n ")],1),t._v(" "),e("span",{staticClass:"pixiv"},[e("a",{attrs:{href:"https://www.pixiv.net/artworks/".concat(t.artwork.id),target:"_blank",rel:"noreferrer",title:"前往Pixiv查看作品"}},[e("Icon",{staticClass:"icon",attrs:{name:"pixiv"}})],1)])]),t._v(" "),e("ul",{staticClass:"tag-list",class:{censored:t.isCensored(t.artwork)}},[t._l(t.artwork.tags,(function(a,r){return[e("router-link",{key:"tag_".concat(r),staticClass:"tag",attrs:{to:{name:"Search",query:{keyword:a.name}}}},[t._v("\n #"+t._s(a.name)+"\n "),a.translated_name?e("span",[t._v(t._s(a.translated_name))]):t._e()])]}))],2),t._v(" "),e("div",{staticClass:"caption",class:{censored:t.isCensored(t.artwork)},domProps:{innerHTML:t._s(t.artwork.caption)},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.handleClick(e)}}})]):t._e()},Xa=[],Ka=null,Qa={props:{artwork:{type:Object,required:!0}},data:function(){return{}},computed:Object(l["a"])({},Object(v["c"])(["isCensored"])),filters:{convertToK:function(t){return t?(t=+t,t>1e4?(t/1e3).toFixed(1)+"K":t):""}},methods:{drawMask:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r,n,s,i,o,c,l,u,d,h;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.loadMaskFont();case 2:if(a=t.$refs.mask,a){e.next=5;break}return e.abrupt("return");case 5:for(r=a.getBoundingClientRect(),n=r.width,s=r.height,a.width=2*n,a.height=2*s,a.style.width=n,a.style.height=s,i=a.getContext("2d"),o="".concat(t.artwork.id," "),i.rotate(-20*Math.PI/180),i.font="bold 72px Dosis",c=85,l=Math.ceil(i.measureText(o).width),u=2*Math.sqrt(Math.pow(n,2)+Math.pow(s,2)),console.log(l,Math.ceil(u/c)),d=0;d=10?e("div",{staticClass:"artwork-list-wrap",on:{mousewheel:function(t){t.stopPropagation()}}},[e("swiper",{staticClass:"artwork-list",attrs:{options:t.swiperOption}},[t._l(t.memberArtwork.slice(0,t.memberArtwork.length-5),(function(a){return e("swiper-slide",{key:a.id,staticClass:"image-card-slide"},[e("ImageCard",{staticClass:"slide",attrs:{mode:"cover",artwork:a},on:{"click-card":function(e){return t.toArtwork(e)}}})],1)})),t._v(" "),e("swiper-slide",{staticClass:"image-slide-slide"},[e("ImageSlide",{staticClass:"slide",attrs:{images:t.slides}},[e("div",{staticClass:"link",on:{click:function(e){return t.toAuthor(t.author.id)}}},[e("Icon",{attrs:{name:"more",scale:"20"}}),t._v(" "),e("div",[t._v("查看更多")])],1)])],1)],2)],1):t._e()],1):t._e()},nr=[],sr={computed:Object(l["a"])({author:function(){return this.memberArtwork&&this.memberArtwork.length>0?this.memberArtwork[0].author:null},slides:function(){var t=this,e=this.memberArtwork.slice(this.memberArtwork.length-5,this.memberArtwork.length);return e.map((function(e){return{title:e.title,src:e.images[0].m,isCensored:t.isCensored(e)}}))}},Object(v["c"])(["isCensored"])),props:{id:{type:Number,required:!0}},data:function(){return{memberArtwork:null,swiperOption:{freeMode:!0,slidesPerView:"auto",mousewheel:{releaseOnEdges:!0,sensitivity:4}}}},methods:Object(l["a"])({init:function(){this.getMemberArtwork(this.id)},getMemberArtwork:function(t){var e=this;return Object(ut["a"])(Object(lt["a"])().mark((function r(){var n;return Object(lt["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,ae.getMemberArtwork(t);case 2:n=r.sent,0===n.status?(e.memberArtwork=n.data,e.$emit("loaded")):e.$toast({message:n.msg,icon:a("bc67")});case 4:case"end":return r.stop()}}),r)})))()},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.memberArtwork}})},toAuthor:function(t){this.$router.push({name:"Users",params:{id:t}})}},Object(v["b"])(["setGalleryList"])),mounted:function(){this.init()},components:Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),"ImageCard",gt),"ImageSlide",Ct)},ir=sr,or=(a("38d7"),Object(h["a"])(ir,rr,nr,!1,null,"4734c15c",null)),cr=or.exports,lr=function(){var t=this,e=t._self._c;return e("div",{staticClass:"related"},[e("van-cell",{staticClass:"cell",attrs:{border:!1},scopedSlots:t._u([{key:"title",fn:function(){return[e("Icon",{staticClass:"icon heart",attrs:{name:"heart"}}),t._v(" "),e("span",{staticClass:"title"},[t._v("相关作品")])]},proxy:!0}])}),t._v(" "),e("van-list",{attrs:{finished:t.finished,"finished-text":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:function(e){return t.getRelated()}},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList}},t._l(t.artList,(function(a){return e("router-link",{key:a.id,attrs:{to:{name:"Artwork",params:{id:a.id,list:t.artList}}}},[e("ImageCard",{attrs:{mode:"meta",artwork:a,column:t.col}})],1)})),1)],1)])],1)},ur=[],dr={name:"Related",props:{artwork:{type:Object,required:!0}},data:function(){return{col:2,itemWidth:0,curPage:1,artList:[],error:!1,loading:!1,finished:!1}},methods:{url:function(t,e){return ae.url(t,e)},reset:function(){this.curPage=1,this.artList=[]},getRelated:Object(he["a"])(Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.artwork.id){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,ae.getRelated(this.artwork.id,this.curPage);case 4:a=t.sent,0===a.status?(e=a.data,r=JSON.parse(JSON.stringify(this.artList)),r=r.concat(e),r=Object(fe["a"])(r,"id"),this.artList=r,this.loading=!1,this.curPage++,this.curPage>5&&(this.finished=!0),this.$nextTick(this.resize)):(this.$toast({message:a.msg}),this.loading=!1,this.error=!0);case 6:case"end":return t.stop()}}),t,this)}))),5e3),toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},resize:function(){var t=document.documentElement.clientWidth;this.col=t<375?1:t<=768?2:t<=1600?3:4,this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col)}},mounted:function(){this.reset(),this.getRelated(),window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ot["a"].name,ot["a"]),it["a"].name,it["a"]),st["a"].name,st["a"]),ue["a"].name,ue["a"]),le["a"].name,le["a"]),"ImageCard",gt)},hr=dr,fr=(a("5574"),Object(h["a"])(hr,lr,ur,!1,null,"2d3e997c",null)),mr=fr.exports,pr={name:"Artwork",watch:{$route:function(){"Artwork"===this.$route.name&&this.$route.params.id!==this.artwork.id&&this.init()}},data:function(){return{loading:!1,artwork:{},options:{loop:!0,thresholdTime:5e3,thresholdDistance:150},ugoiraDownloadPanelShow:!1,ugoiraDownloadPanelActions:[{name:"ZIP",subname:"原始序列帧归档文件"},{name:"GIF",subname:"低画质,兼容性最佳"},{name:"WebM",subname:"高画质,兼容性差"}]}},computed:Object(l["a"])(Object(l["a"])({},Object(v["d"])(["galleryList","currentIndex","$swiper"])),Object(v["c"])(["currentId","isCensored"])),methods:{init:function(){document.documentElement.scrollTo({top:0,behavior:"smooth"}),this.loading=!0;var t=+this.$route.params.id;this.artwork={},this.getArtwork(t)},getArtwork:function(t){var e=this;return Object(ut["a"])(Object(lt["a"])().mark((function r(){var n;return Object(lt["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,ae.getArtwork(t);case 2:n=r.sent,0===n.status?(e.artwork=n.data,e.loading=!1,document.title="".concat(e.artwork.title," - ").concat(e.artwork.author.name," - pixiv-viewer"),e.isCensored(e.artwork)&&(e.$toast({message:"根据当前设置,此内容将不予显示",icon:a("1ccf"),duration:3e3}),setTimeout((function(){}),5e3))):(e.$toast({message:n.msg,icon:a("bc67")}),setTimeout((function(){e.$router.back()}),500));case 4:case"end":return r.stop()}}),r)})))()},onUgoiraDownloadPanelSelect:function(t){this.$refs.imgView.download(t.name)}},mounted:function(){this.init()},updated:function(){},components:Object($["a"])(Object($["a"])(Object($["a"])({TopBar:Pa,ImageView:Ja,Meta:ar,AuthorCard:cr,Related:mr},Sa["a"].name,Sa["a"]),ja["a"].name,ja["a"]),Oa["a"].name,Oa["a"])},vr=pr,gr=(a("8979"),Object(h["a"])(vr,Ca,ya,!1,null,"0d1a15df",null)),wr=gr.exports,br=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-container"},[t.showNovels?e("div",{staticClass:"illust-wrap"},[e("div",{staticClass:"illust"},[e("TopBar",{attrs:{action:function(){t.showNovels=!1}}}),t._v(" "),t.userInfo.id?e("AuthorNovels",{key:"multi-novel",attrs:{id:t.userInfo.id}}):t._e()],1)]):t._e(),t._v(" "),t.showIllusts?e("div",{staticClass:"illust-wrap"},[e("div",{staticClass:"illust"},[e("TopBar",{attrs:{action:function(){t.showIllusts=!1}}}),t._v(" "),t.userInfo.id?e("AuthorIllusts",{key:"multi-illust",attrs:{id:t.userInfo.id}}):t._e()],1)]):t._e(),t._v(" "),t.showFavorite?e("div",{staticClass:"illust-wrap"},[e("div",{staticClass:"illust"},[e("TopBar",{attrs:{action:function(){t.showFavorite=!1}}}),t._v(" "),t.userInfo.id?e("FavoriteIllusts",{key:"multi-favorite",attrs:{id:t.userInfo.id}}):t._e()],1)]):t._e(),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showIllusts&&!t.showFavorite&&!t.showNovels,expression:"!showIllusts && !showFavorite && !showNovels"}],staticClass:"user-wrap"},[e("div",{staticClass:"users"},[e("TopBar"),t._v(" "),t.userInfo.id?e("div",{staticClass:"info-container"},[e("div",{staticClass:"bg-cover"},[e("img",{attrs:{src:t.userInfo.avatar,alt:t.userInfo.name}})]),t._v(" "),e("div",{staticClass:"info"},[e("div",{staticClass:"avatar"},[e("img",{attrs:{src:t.userInfo.avatar,alt:t.userInfo.name}})]),t._v(" "),e("h2",{staticClass:"name"},[t._v(t._s(t.userInfo.name))]),t._v(" "),e("ul",{staticClass:"site-list",class:{multi:t.userInfo.webpage&&t.userInfo.twitter_url}},[t.userInfo.webpage?e("li",{staticClass:"site"},[e("Icon",{staticClass:"icon home",attrs:{name:"home-s"}}),t._v(" "),e("a",{attrs:{href:t.userInfo.webpage,target:"_blank"}},[t._v(t._s(t._f("hostname")(t.userInfo.webpage)))])],1):t._e(),t._v(" "),t.userInfo.twitter_url?e("li",{staticClass:"site"},[e("Icon",{staticClass:"icon twitter",attrs:{name:"twitter"}}),t._v(" "),e("a",{attrs:{href:t.userInfo.twitter_url,target:"_blank"}},[t._v("@"+t._s(t.userInfo.twitter_account))])],1):t._e()]),t._v(" "),e("span",{staticClass:"follow"},[e("span",{staticClass:"num"},[t._v(t._s(t.userInfo.follow))]),t._v("关注\n ")]),t._v(" "),t.userInfo.friend?e("span",{staticClass:"friend"},[e("span",{staticClass:"num"},[t._v(t._s(t.userInfo.friend))]),t._v("好P友\n ")]):t._e(),t._v(" "),e("div",{staticClass:"detail",class:{ex:t.isEx||t.commentHeight<160}},[e("div",{ref:"comment",staticClass:"content",domProps:{innerHTML:t._s(t.userInfo.comment)}}),t._v(" "),!t.isEx&&t.commentHeight>=160?e("div",{staticClass:"more",on:{click:function(e){t.isEx=!0}}},[t._v("\n 查看更多\n "),e("Icon",{staticClass:"icon dropdown",attrs:{name:"dropdown"}})],1):t._e()])])]):t._e(),t._v(" "),t.userInfo.id?e("AuthorNovels",{key:"once-novel",attrs:{id:t.userInfo.id,num:t.userInfo.novels,once:!0},on:{onCilck:function(e){return t.showSub("novels")}}}):t._e(),t._v(" "),t.userInfo.id?e("AuthorIllusts",{key:"once-illust",attrs:{id:t.userInfo.id,num:t.userInfo.illusts,once:!0},on:{onCilck:function(e){return t.showSub("illusts")}}}):t._e(),t._v(" "),t.userInfo.id?e("FavoriteIllusts",{key:"once-favorite",attrs:{id:t.userInfo.id,num:t.userInfo.bookmarks,once:!0},on:{onCilck:function(e){return t.showSub("favorite")}}}):t._e()],1)])])},kr=[],_r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"novels"},[t.once?e("van-cell",{staticClass:"cell",attrs:{border:!1,"is-link":""},on:{click:function(e){return t.onClick()}},scopedSlots:t._u([{key:"title",fn:function(){return[e("span",{staticClass:"title"},[t._v("\n 小说作品\n "),t.num?e("span",{staticClass:"num"},[t._v(t._s(t.num)+"件作品")]):t._e()])]},proxy:!0}],null,!1,2195291867)}):t._e(),t._v(" "),e("van-list",{attrs:{finished:t.finished,"finished-text":t.once&&t.artList.length?"":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:function(e){return t.getMemberNovel()}},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList}},t._l(t.artList,(function(a){return e("router-link",{key:a.id,attrs:{to:{name:"Novel",params:{id:a.id,list:t.artList}}}},[e("NovelCard",{attrs:{mode:"meta",artwork:a}})],1)})),1)],1)])],1)},xr=[],Cr={name:"AuthorNovels",props:{id:{type:Number,required:!0},num:{type:Number},once:{type:Boolean,default:!1}},data:function(){return{col:1,itemWidth:0,curPage:1,artList:[],error:!1,loading:!1,finished:!1}},methods:{reset:function(){this.curPage=1,this.artList=[]},getMemberNovel:Object(he["a"])(Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r,n;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.id){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,ae.getMemberNovel(this.id,this.curPage);case 4:if(a=t.sent,0!==a.status){t.next=22;break}if(!a.finished){t.next=10;break}return this.finished=!0,this.loading=!1,t.abrupt("return");case 10:e=a.data,this.once&&(e=e.slice(0,10)),n=JSON.parse(JSON.stringify(this.artList)),(r=n).push.apply(r,Object(de["a"])(e)),n=Object(fe["a"])(n,"id"),this.artList=n,this.loading=!1,this.curPage++,(this.once||this.curPage>20)&&(this.finished=!0),this.$nextTick(this.resize),t.next=25;break;case 22:this.$toast({message:a.msg}),this.loading=!1,this.error=!0;case 25:case"end":return t.stop()}}),t,this)}))),500),odd:function(t){return t.filter((function(t,e){return(e+1)%2}))},even:function(t){return t.filter((function(t,e){return!((e+1)%2)}))},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},onClick:function(){this.$emit("onCilck")},resize:function(){this.$refs.cardBox&&(this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col))}},mounted:function(){this.reset(),this.getMemberNovel(),window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ot["a"].name,ot["a"]),it["a"].name,it["a"]),st["a"].name,st["a"]),ue["a"].name,ue["a"]),le["a"].name,le["a"]),"NovelCard",Ie)},yr=Cr,Or=(a("a33b"),Object(h["a"])(yr,_r,xr,!1,null,"6a22170e",null)),jr=Or.exports,Sr=function(){var t=this,e=t._self._c;return e("div",{staticClass:"illusts"},[t.once?e("van-cell",{staticClass:"cell",attrs:{border:!1,"is-link":""},on:{click:function(e){return t.onClick()}},scopedSlots:t._u([{key:"title",fn:function(){return[e("span",{staticClass:"title"},[t._v("\n 插画作品\n "),t.num?e("span",{staticClass:"num"},[t._v(t._s(t.num)+"件作品")]):t._e()])]},proxy:!0}],null,!1,3720604521)}):t._e(),t._v(" "),e("van-list",{attrs:{finished:t.finished,"finished-text":t.once&&t.artList.length?"":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:function(e){return t.getMemberArtwork()}},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList}},t._l(t.artList,(function(a){return e("router-link",{key:a.id,attrs:{to:{name:"Artwork",params:{id:a.id,list:t.artList}}}},[e("ImageCard",{attrs:{mode:"meta",artwork:a}})],1)})),1)],1)])],1)},$r=[],Lr={name:"AuthorIllusts",props:{id:{type:Number,required:!0},num:{type:Number},once:{type:Boolean,default:!1}},data:function(){return{col:2,itemWidth:0,curPage:1,artList:[],error:!1,loading:!1,finished:!1}},methods:{reset:function(){this.curPage=1,this.artList=[]},getMemberArtwork:Object(he["a"])(Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r,n;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.id){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,ae.getMemberArtwork(this.id,this.curPage);case 4:if(a=t.sent,0!==a.status){t.next=22;break}if(!a.finished){t.next=10;break}return this.finished=!0,this.loading=!1,t.abrupt("return");case 10:e=a.data,this.once&&(e=e.slice(0,10)),n=JSON.parse(JSON.stringify(this.artList)),(r=n).push.apply(r,Object(de["a"])(e)),n=Object(fe["a"])(n,"id"),this.artList=n,this.loading=!1,this.curPage++,(this.once||this.curPage>20)&&(this.finished=!0),this.$nextTick(this.resize),t.next=25;break;case 22:this.$toast({message:a.msg}),this.loading=!1,this.error=!0;case 25:case"end":return t.stop()}}),t,this)}))),500),odd:function(t){return t.filter((function(t,e){return(e+1)%2}))},even:function(t){return t.filter((function(t,e){return!((e+1)%2)}))},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},onClick:function(){this.$emit("onCilck")},resize:function(){if(this.$refs.cardBox){var t=document.documentElement.clientWidth;this.col=t<375?1:t<=768?2:t<=1600?3:4,this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col)}}},mounted:function(){this.reset(),this.getMemberArtwork(),window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ot["a"].name,ot["a"]),it["a"].name,it["a"]),st["a"].name,st["a"]),ue["a"].name,ue["a"]),le["a"].name,le["a"]),"ImageCard",gt)},Tr=Lr,Ir=(a("05ae"),Object(h["a"])(Tr,Sr,$r,!1,null,"b462beaa",null)),Mr=Ir.exports,zr=function(){var t=this,e=t._self._c;return e("div",{staticClass:"favorite"},[t.once?e("van-cell",{staticClass:"cell",attrs:{border:!1,"is-link":""},on:{click:function(e){return t.onClick()}},scopedSlots:t._u([{key:"title",fn:function(){return[e("span",{staticClass:"title"},[t._v("\n 用户收藏\n "),t.num?e("span",{staticClass:"num"},[t._v(t._s(t.num)+"件作品")]):t._e()])]},proxy:!0}],null,!1,3058384251)}):t._e(),t._v(" "),e("van-list",{attrs:{finished:t.finished,"finished-text":t.once&&t.artList.length?"":"没有更多了",error:t.error,"error-text":"网络异常,点击重新加载"},on:{"update:error":function(e){t.error=e},load:function(e){return t.getMemberFavorite()}},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[e("div",{ref:"cardBox",staticClass:"card-box__wrapper"},[e("waterfall",{attrs:{col:t.col,width:t.itemWidth,gutterWidth:0,data:t.artList}},t._l(t.artList,(function(a){return e("router-link",{key:a.id,attrs:{to:{name:"Artwork",params:{id:a.id,list:t.artList}}}},[e("ImageCard",{attrs:{mode:"meta",artwork:a}})],1)})),1)],1)])],1)},Nr=[],Pr={name:"FavoriteIllusts",props:{id:{type:Number,required:!0},num:{type:Number},once:{type:Boolean,default:!1}},data:function(){return{col:2,itemWidth:0,next:0,artList:[],error:!1,loading:!1,finished:!1}},methods:{reset:function(){this.next=0,this.artList=[]},getMemberFavorite:Object(he["a"])(Object(ut["a"])(Object(lt["a"])().mark((function t(){var e,a,r,n;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.id){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,ae.getMemberFavorite(this.id,this.next);case 4:a=t.sent,0===a.status?(this.next=a.data.next,e=a.data.illusts,this.once&&(e=e.slice(0,10)),n=JSON.parse(JSON.stringify(this.artList)),(r=n).push.apply(r,Object(de["a"])(e)),n=Object(fe["a"])(n,"id"),this.artList=n,this.loading=!1,!this.once&&this.next||(this.finished=!0),this.$nextTick(this.resize)):(this.$toast({message:a.msg}),this.loading=!1,this.error=!0);case 6:case"end":return t.stop()}}),t,this)}))),5e3),odd:function(t){return t.filter((function(t,e){return(e+1)%2}))},even:function(t){return t.filter((function(t,e){return!((e+1)%2)}))},toArtwork:function(t){this.$router.push({name:"Artwork",params:{id:t,list:this.artList}})},onClick:function(){this.$emit("onCilck")},resize:function(){if(this.$refs.cardBox){var t=document.documentElement.clientWidth;this.col=t<375?1:t<=768?2:t<=1600?3:4,this.itemWidth=Math.floor(this.$refs.cardBox.firstChild.clientWidth/this.col)}}},mounted:function(){this.reset(),this.getMemberFavorite(),window.addEventListener("resize",this.resize)},beforeUnmount:function(){window.removeEventListener("resize",this.resize)},components:Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])(Object($["a"])({},ct["a"].name,ct["a"]),ot["a"].name,ot["a"]),it["a"].name,it["a"]),st["a"].name,st["a"]),ue["a"].name,ue["a"]),le["a"].name,le["a"]),"ImageCard",gt)},Er=Pr,Ar=(a("ef07"),Object(h["a"])(Er,zr,Nr,!1,null,"f54b9a98",null)),Hr=Ar.exports,Br={name:"Users",watch:{$route:function(){this.showIllusts=!1,this.showFavorite=!1,"Users"===this.$route.name&&this.$route.params.id!==this.userInfo.id&&this.init()}},data:function(){return{loading:!1,userInfo:{},isEx:!1,showNovels:!1,showIllusts:!1,showFavorite:!1,commentHeight:0}},computed:{},methods:{init:function(){document.documentElement.scrollTo({top:0,behavior:"smooth"}),this.loading=!0;var t=+this.$route.params.id;this.userInfo={},this.getMemberInfo(t)},getMemberInfo:function(t){var e=this;return Object(ut["a"])(Object(lt["a"])().mark((function a(){var r;return Object(lt["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,ae.getMemberInfo(t);case 2:r=a.sent,0===r.status&&(e.userInfo=r.data,e.loading=!1,document.title="".concat(e.userInfo.name," - pixiv-viewer"),e.$nextTick((function(){e.getCommentHeight()})));case 4:case"end":return a.stop()}}),a)})))()},getCommentHeight:function(){this.commentHeight=this.$refs.comment.clientHeight},showSub:function(t){switch(t){case"illusts":this.showIllusts=!0;break;case"favorite":this.showFavorite=!0;break;case"novels":this.showNovels=!0;break;default:break}}},filters:{hostname:function(t){var e=document.createElement("a");return e.href=t,e.hostname}},mounted:function(){this.init()},components:{TopBar:Pa,AuthorNovels:jr,AuthorIllusts:Mr,FavoriteIllusts:Hr}},Rr=Br,Wr=(a("b079"),Object(h["a"])(Rr,br,kr,!1,null,"8958af7c",null)),Dr=Wr.exports,Fr=function(){var t=this,e=this,a=e._self._c;return a("div",{ref:"chapterEl",staticClass:"chapter",attrs:{"data-censored":e.isCensored(e.novel)}},[a("div",{staticClass:"topbar__wrapper",class:{show:e.isMenuShow}},[a("div",{staticClass:"chapter-name"},[e._v(e._s(e.novel.title))]),e._v(" "),a("TopBar",{attrs:{transparent:!0,color:"dark",padding:!1}}),e._v(" "),a("div",{staticClass:"btn-setting",on:{click:function(t){return e.$refs.novelReader.showSetting()}}},[a("Icon",{staticClass:"icon-setting",attrs:{name:"setting"}})],1)],1),e._v(" "),a("transition",{attrs:{name:"fade"}},[e.loading?a("div",{staticClass:"loading"},[e._v("加载中...")]):e._e()]),e._v(" "),e.loading?e._e():a("NovelReader",{ref:"novelReader",attrs:{content:e.novel.content,filter:e.novelFilter},on:{"action:menu":function(e){return t.isMenuShow=e},"action:parsed":e.handleParsed}})],1)},Vr=[],Gr=a("9558"),Ur=function(){var t=this,e=t._self._c;return e("div",{ref:"readerEL",staticClass:"novel-reader"},[e("div",{directives:[{name:"prevent",rawName:"v-prevent",value:["touchmove","mousemove"],expression:"['touchmove', 'mousemove']"}],ref:"novelContentWrapper",staticClass:"novel-content__wrapper",style:t.viewerStyle,on:{pointerdown:function(e){return e.preventDefault(),e.stopPropagation(),t.handleTouchStart.apply(null,arguments)},pointermove:function(e){return e.stopPropagation(),e.preventDefault(),t.handleTouchMove.apply(null,arguments)},pointerup:function(e){return e.preventDefault(),e.stopPropagation(),t.handleTouchEnd.apply(null,arguments)}}},[e("div",{staticClass:"page-counter"},[t._v(t._s("".concat(t.pageNum," / ").concat(t.pageTotal)))]),t._v(" "),[e("div",{ref:"novelContentEl",staticClass:"novel-content",domProps:{innerHTML:t._s(t.parsedContent)}})]],2),t._v(" "),e("div",{staticClass:"setting__wrapper",class:{show:t.isSettingShow}},[e("transition",{attrs:{name:"fade"}},[e("div",{staticClass:"back-top",class:{show:t.isTopShow&&t.isMenuShow},on:{click:function(e){return t.$emit("action:to-top")}}},[e("Icon",{staticClass:"icon-top",attrs:{name:"top"}})],1)]),t._v(" "),e("div",{staticClass:"action-panel"},[e("div",{staticClass:"action-item slider"},[e("span",[t._v("A-")]),t._v(" "),e("van-slider",{attrs:{min:t.readerConfig.fontSize.range[0],max:t.readerConfig.fontSize.range[1],"active-color":"#ffcd59"},scopedSlots:t._u([{key:"button",fn:function(){return[e("div",{staticClass:"slide-button"},[t._v(t._s(t.readerConfig.fontSize.value))])]},proxy:!0}]),model:{value:t.readerConfig.fontSize.value,callback:function(e){t.$set(t.readerConfig.fontSize,"value",e)},expression:"readerConfig.fontSize.value"}}),t._v(" "),e("span",{staticClass:"big"},[t._v("A+")])],1),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"action-item slider"},[e("span",[t._v("小")]),t._v(" "),e("van-slider",{attrs:{min:t.readerConfig.padding.range[0],max:t.readerConfig.padding.range[1],"active-color":"#ffcd59"},scopedSlots:t._u([{key:"button",fn:function(){return[e("div",{staticClass:"slide-button"},[t._v("边距")])]},proxy:!0}]),model:{value:t.readerConfig.padding.value,callback:function(e){t.$set(t.readerConfig.padding,"value",e)},expression:"readerConfig.padding.value"}}),t._v(" "),e("span",[t._v("大")])],1),t._v(" "),e("div",{staticClass:"action-item slider"},[e("span",[t._v("紧")]),t._v(" "),e("van-slider",{attrs:{min:t.readerConfig.lineHeight.range[0],max:t.readerConfig.lineHeight.range[1],step:.1,"active-color":"#ffcd59"},scopedSlots:t._u([{key:"button",fn:function(){return[e("div",{staticClass:"slide-button"},[t._v("行距")])]},proxy:!0}]),model:{value:t.readerConfig.lineHeight.value,callback:function(e){t.$set(t.readerConfig.lineHeight,"value",e)},expression:"readerConfig.lineHeight.value"}}),t._v(" "),e("span",[t._v("松")])],1)]),t._v(" "),e("div",{staticClass:"action-item"},[e("span",{staticClass:"label"},[t._v("选择颜色")]),t._v(" "),t._l(t.themeList,(function(a,r){return e("span",{key:r,staticClass:"color",class:{active:t.readerConfig.theme.value===r},style:{color:a.color,backgroundColor:a.bg},on:{click:function(e){t.readerConfig.theme.value=r}}},[t._v("字")])}))],2),t._v(" "),e("div",{staticClass:"action-item"},[e("span",{staticClass:"label"},[t._v("选择字体")]),t._v(" "),t._l(t.fontList,(function(a,r){return e("span",{key:r,staticClass:"btn font",class:{active:t.readerConfig.fontFamily.value===r},style:{fontFamily:a.font},on:{click:function(e){t.readerConfig.fontFamily.value=r}}},[t._v(t._s(a.name))])}))],2),t._v(" "),e("div",{staticClass:"action-item"},[e("span",{staticClass:"label"},[t._v("文字样式")]),t._v(" "),e("span",{staticClass:"btn bold-switch",class:{active:t.readerConfig.bold.value},on:{click:function(e){t.readerConfig.bold.value=!t.readerConfig.bold.value}}},[t._v("B")]),t._v(" "),e("span",{staticClass:"btn zh-trans",on:{click:function(){t.readerConfig.zhTrans.value++,t.readerConfig.zhTrans.value>2&&(t.readerConfig.zhTrans.value=0),t.parseNovel()}}},t._l("原简繁",(function(a,r){return e("em",{key:r,class:{cur:t.readerConfig.zhTrans.value===r}},[t._v(t._s(a))])})),0)])])],1)])},qr=[],Yr=(a("5fe4"),a("8ad4")),Jr=(a("7db0"),a("85b1")),Zr=a("cffa"),Xr=function(){return a.e("chunk-2d20faa8").then(a.t.bind(null,"b532",7))},Kr="__PIXIV_readerSetting",Qr=Bt.get(Kr,{fontSize:15,padding:14,lineHeight:1.5,theme:0,fontFamily:0,bold:!1,zhTrans:0}),tn=function(){function t(){Object(Tt["a"])(this,t),this.inited=!1}return Object(It["a"])(t,[{key:"init",value:function(){var t=Object(ut["a"])(Object(lt["a"])().mark((function t(){var e;return Object(lt["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Xr();case 2:e=t.sent,this.s2t=new e.Converter({from:"cn",to:"tw"}),this.t2s=new e.Converter({from:"tw",to:"cn"}),this.inited=!0;case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}]),t}(),en=new tn,an={name:"novel-reader",components:Object($["a"])({},Yr["a"].name,Yr["a"]),props:{content:{type:String,default:""},filter:{type:Function,default:function(t){return t.split("\n").map((function(t){return"

".concat(t,"

")})).join("")}}},watch:{readerConfig:{handler:Object(Jr["a"])((function(){for(var t in this.readerConfig)Qr[t]=this.readerConfig[t].value;Bt.set(Kr,Qr)}),300),deep:!0},viewerStyle:{handler:Object(Jr["a"])((function(){x(this.viewerStyle.backgroundColor),this.calcPageNum()})),immediate:!0,deep:!0},content:{handler:Object(Jr["a"])((function(){this.reset(),this.parseNovel()}),300),immediate:!0},isMenuShow:{handler:function(){this.$emit("action:menu",this.isMenuShow)}}},computed:{viewerStyle:function(){return{"--padding":"".concat(this.readerConfig.padding.value,"px"),"--lineHeight":"".concat(this.readerConfig.lineHeight.value),"--fontSize":"".concat(this.readerConfig.fontSize.value,"px"),"--color":this.themeList[this.readerConfig.theme.value].color,"--bg":this.themeList[this.readerConfig.theme.value].bg,paddingLeft:"var(--padding)",paddingRight:"var(--padding)",fontSize:"".concat(this.readerConfig.fontSize.value,"px"),lineHeight:"".concat(this.readerConfig.lineHeight.value),fontFamily:this.fontList[this.readerConfig.fontFamily.value].font,fontWeight:this.readerConfig.bold.value?"bold":"normal",color:this.themeList[this.readerConfig.theme.value].color,backgroundColor:this.themeList[this.readerConfig.theme.value].bg}}},data:function(){return{pageNum:1,pageTotal:1,parsedContent:"",isMenuShow:!1,isSettingShow:!1,isTopShow:!1,readerConfig:{fontSize:{type:"number",value:15,range:[12,30]},padding:{type:"number",value:14,range:[5,50]},lineHeight:{type:"number",value:1.5,range:[.8,3]},theme:{type:"number",value:0,range:[0,4]},fontFamily:{type:"number",value:1,range:[0,3]},bold:{type:"boolean",value:!1},zhTrans:{type:"number",value:0,range:[0,2]}},themeList:[{color:"#1f1f1f",bg:"#ffffff"},{color:"#1e1e1e",bg:"#f1f1f1"},{color:"#b7b7b7",bg:"#1f1f1f"},{color:"#1c1d1e",bg:"#e6f1fa"},{color:"#1f1e1c",bg:"#fff8eb"}],fontList:[{name:"Sans",font:"Noto Sans SC"},{name:"Serif",font:"Noto Serif SC"}]}},created:function(){this.initSetting()},methods:{reset:function(){this.pageNum=1,this.pageTotal=1,this.parsedContent=""},initSetting:function(){for(var t in Qr)t in this.readerConfig&&(this.readerConfig[t].value=Qr[t]);x(this.viewerStyle.backgroundColor)},parseNovel:function(){var t=this;return Object(ut["a"])(Object(lt["a"])().mark((function e(){var a,r;return Object(lt["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.content){e.next=2;break}return e.abrupt("return");case 2:if(a=t.content,r=Date.now(),en.inited||!(t.readerConfig.zhTrans.value>0)){e.next=7;break}return e.next=7,en.init();case 7:e.t0=t.readerConfig.zhTrans.value,e.next=1===e.t0?10:2===e.t0?13:16;break;case 10:return a=en.t2s(a),console.log("繁 -> 简 耗时: ".concat(Date.now()-r,"ms")),e.abrupt("break",16);case 13:return a=en.s2t(a),console.log("简 -> 繁 耗时: ".concat(Date.now()-r,"ms")),e.abrupt("break",16);case 16:a=t.filter(a),a='
\n
'.concat(a,'
\n