Bump web v3.24.071120

This commit is contained in:
821938089 authored and github-actions[bot] committed 2024-07-11 12:22:27 +00:00
1 parent 4a54c9fc3f
commit d61b04f038
6 files changed
+8 -8

No files matched your search

@@ -1 +1 @@
import{a2 as Je,q as r,j as S,T as Se,a7 as Le,o as p,d as f,g as e,t as z,F as oe,P as ce,u as o,a8 as Z,a9 as _e,a4 as Te,x as P,e as T,w as J,aa as qe,A as he,ab as Ge,f as Y,M as ge,ac as Ze,y as Ye,ad as Ke,p as we,i as Ee,s as Oe,ae as je,V as Xe,K as $e,a6 as et,O as Re,m as O,c as tt}from"./vendor-B4RITwN5.js";import{i as ot,g as Fe,u as nt,a as st}from"./loading-aq3mpe0Z.js";import{_ as le,u as De,A as pe}from"./index-MvfHQcLY.js";const at=(a,s,d,u)=>(a/=u/2,a<1?d/2*a*a+s:(a--,-d/2*(a*(a-2)-1)+s)),it=()=>{let a,s,d,u,n,U,v,w,h,I,i,y,F;function A(){let k=a.scrollTop||a.scrollY||a.pageYOffset;return k=typeof k>"u"?0:k,k}function m(k){const B=k.getBoundingClientRect().top,j=a.getBoundingClientRect?a.getBoundingClientRect().top:0;return B-j+d}function l(k){a.scrollTo?a.scrollTo(0,k):a.scrollTop=k}function x(k){I||(I=k),i=k-I,y=U(i,d,w,h),l(y),i<h?requestAnimationFrame(x):q()}function q(){l(d+w),s&&v&&(s.setAttribute("tabindex","-1"),s.focus()),typeof F=="function"&&F(),I=!1}function R(k,B={}){switch(h=B.duration||1e3,n=B.offset||0,F=B.callback,U=B.easing||at,v=B.a11y||!1,typeof B.container){case"object":a=B.container;break;case"string":a=document.querySelector(B.container);break;default:a=window}switch(d=A(),typeof k){case"number":s=void 0,v=!1,u=d+k;break;case"object":s=k,u=m(s);break;case"string":s=document.querySelector(k),u=m(s);break}switch(w=u-d+n,typeof B.duration){case"number":h=B.duration;break;case"function":h=B.duration(w);break}requestAnimationFrame(x)}return R},ee=it(),ct=["data-chapterpos"],lt=["src"],rt=["innerHTML"],At={__name:"ChapterContent",props:{chapterIndex:{type:Number,required:!0},contents:{type:Array,required:!0},title:{type:String,required:!0},spacing:{type:Object,required:!0},fontFamily:{type:String,required:!0},fontSize:{type:String,required:!0}},emits:["readedLengthChange"],setup(a,{expose:s,emit:d}){Je(A=>({"5c00dbc4":u.spacing.letter,"0f47b712":u.spacing.line,a14ef5e0:u.spacing.paragraph}));const u=a,n=A=>{const m=/<img[^>]*src="([^"]*(?:"[^>]+\})?)"[^>]*>/,l=A.match(m)[1];return ot(l)?Fe(l):l},U=A=>{A.target.src=Fe(A.target.src)},v=A=>{const m=/<img[^>]*src="[^"]*(?:"[^>]+\})?"[^>]*>/g;return A.replaceAll(m," ").length},w=r(()=>{let A=-1;return Array.from(u.contents,m=>(A+=v(m)+1,A))}),h=S(),I=S();s({scrollToReadedLength:A=>{if(A===0)return;let m=w.value.findIndex(l=>l>=A);m!==-1&&_e(()=>{ee(I.value[m],{duration:0})})}});let y=null;const F=d;return Se(()=>{y=new IntersectionObserver(A=>{for(let{target:m,isIntersecting:l}of A)l&&F("readedLengthChange",u.chapterIndex,parseInt(m.dataset.chapterpos))},{rootMargin:`0px 0px -${window.innerHeight-24}px 0px`}),y.observe(h.value),I.value.forEach(A=>{y.observe(A)})}),Le(()=>{y==null||y.disconnect(),y=null}),(A,m)=>(p(),f(oe,null,[e("div",{class:"title","data-chapterpos":"0",ref_key:"titleRef",ref:h},z(a.title),513),(p(!0),f(oe,null,ce(a.contents,(l,x)=>(p(),f("div",{key:x,ref_for:!0,ref_key:"paragraphRef",ref:I,"data-chapterpos":o(w)[x]},[/^\s*<img[^>]*src[^>]+>$/.test(l)?(p(),f("img",{key:0,class:"full",src:n(l),onErrorOnce:U,loading:"lazy"},null,40,lt)):(p(),f("p",{key:1,style:Z({fontFamily:a.fontFamily,fontSize:a.fontSize}),innerHTML:l},null,12,rt))],8,ct))),128))],64))}},dt=le(At,[["__scopeId","data-v-2297fe46"]]),ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAgMAAABjUWAiAAAADFBMVEXr5djn4dTp49bt59rT6LKxAAACnElEQVQozw3NUUwScRzA8d8R6MF8YMIx8uk47hDSJbj14IPzOGc7jPLvwTGg5uAYDbe2tt56cLtznvEnS6yDqCcEaWi91DvrbLJZz7b1aFtz1aO+2OZWvn+/+4CHeB6BMYaqBLfjPNRY6RFT2JJYby+uAk4WUTrtlmJ4hgPYb2q1XGDQjaK8pgJHvqNaAX+KyuIkDXpgQinb46nOulnn4b5laUHTxLfseeArAoNOeJlOIjdoal0n1FA7tKFv5roK+YaHOqP3P0XyKHPHY+MhTRe5uCZnKhtJKw2eSrSoBDPLtpZuNcFNJcFyiCMxOaaHIfXz1e8HQbWLySrBQ4x0x1qlhnHlnz2HQEC6TNb0gTHXa7IKhcaHqkE015hk9whA0YeWiLIXf7Fa2CZo3DjqjB4tTuF8jIcbfcEx5z/w4sXpQhXW+ju0cqh7icTFmRMaG+v6CIvTjcSpHcH8JEsF3EPh3fRthYdVLLgI2fWXm85/pGFE4l046s70L+yKCcirGFR+jbpy3kMmiCGHrSezVONsn1RBixncyk2PcVWk7DlgxHo8iZwDyq5uAUD854dZhdIFYzKoQig2haUKi1lVufz2RZUZPZ41n/hrOQB6h0Hhg8I367FNoEHgeM/KY7szSeQwD8q2WE3HM35ZLl0K1MJiOtHIkBclRQUwZnyOWcNsRQQgVLj1PSqkjF9DsoOSaSg3iinKzvfmgsNFFfpP/2T3GLGvL4fHEfwIX1sVvXcPqLztehWGcfn9nI2U9nTfCgJPe/jFPLZwgVEzimBgAm0VIyK2tt1cE/AzQdLK+SxLSQ4aDCZnnId94OG2S1XwvnTbNk/ZnhyRCQT+sZM6z9g6LXL1BOBe+zJySiFkHAINCtnQokbCJ/apCv0foqPiZVfhpywAAAAASUVORK5CYII=",gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAgMAAABjUWAiAAAACVBMVEX28ef48+n69esoK7jYAAAB4UlEQVQozw2OsW4bQQxEhwLXkDrysGdEqRRgVShfQQq8wOr2jD0jSpXCLvwXbtKfADlFqgSwC/9ljqweZgYzQFnb/QGepYhA9jzmTc1WaSEtQpbFgjWATI00ZZtIckXx8q2Oe5yEByBy+RHOTcM+VVTadULsvxvRC/q8WTwgcWGD+Mnaqa0oy2gw2pKFzK+PzEsus5hP9AHojKslVynLlioVTBEN8cjDNnZoR1uMGTiZAAN47HxMtEkGUE9b8HWzkqNX5Lpk0yVziAJOs46rK1pG/xNuXLjz95fSDoJE5IqG23MAYPtWoeWPvfVtIV/Ng9oH3W0gGMPIOqd4MK4QZ55dV61gOb8Zxp7I9qayaGxp6Q91cmC0ZRdBwEQVHWzSAanlZwVWc9yljeTCeaHjBVvlPSLeyeBUT2rPdJegQI103jVS3uYkyIx1il6mslMDedZuOkwzolsagvPuQAfp7cYg7k9V1NOxfq64PNSvMdwONV4VYEmqlbpZy5OAakRKkjPnL4CBv5/OZRgoWHBmNbxB0LgB1I4vXFj93UoF2/0TPEsWwV9EhbIiTPqYoTHYoMn3enTDjmrFeDTIzaL1bUC/PBIMuF+vSSYSaxoLine truncated
import{a2 as Je,q as r,j as S,T as Se,a7 as Le,o as p,d as f,g as e,t as z,F as oe,P as ce,u as o,a8 as Z,a9 as _e,a4 as Te,x as P,e as T,w as J,aa as qe,A as he,ab as Ge,f as Y,M as ge,ac as Ze,y as Ye,ad as Ke,p as we,i as Ee,s as Oe,ae as je,V as Xe,K as $e,a6 as et,O as Re,m as O,c as tt}from"./vendor-B4RITwN5.js";import{i as ot,g as Fe,u as nt,a as st}from"./loading-BSPlXMjv.js";import{_ as le,u as De,A as pe}from"./index-DiJORxAd.js";const at=(a,s,d,u)=>(a/=u/2,a<1?d/2*a*a+s:(a--,-d/2*(a*(a-2)-1)+s)),it=()=>{let a,s,d,u,n,U,v,w,h,I,i,y,F;function A(){let k=a.scrollTop||a.scrollY||a.pageYOffset;return k=typeof k>"u"?0:k,k}function m(k){const B=k.getBoundingClientRect().top,j=a.getBoundingClientRect?a.getBoundingClientRect().top:0;return B-j+d}function l(k){a.scrollTo?a.scrollTo(0,k):a.scrollTop=k}function x(k){I||(I=k),i=k-I,y=U(i,d,w,h),l(y),i<h?requestAnimationFrame(x):q()}function q(){l(d+w),s&&v&&(s.setAttribute("tabindex","-1"),s.focus()),typeof F=="function"&&F(),I=!1}function R(k,B={}){switch(h=B.duration||1e3,n=B.offset||0,F=B.callback,U=B.easing||at,v=B.a11y||!1,typeof B.container){case"object":a=B.container;break;case"string":a=document.querySelector(B.container);break;default:a=window}switch(d=A(),typeof k){case"number":s=void 0,v=!1,u=d+k;break;case"object":s=k,u=m(s);break;case"string":s=document.querySelector(k),u=m(s);break}switch(w=u-d+n,typeof B.duration){case"number":h=B.duration;break;case"function":h=B.duration(w);break}requestAnimationFrame(x)}return R},ee=it(),ct=["data-chapterpos"],lt=["src"],rt=["innerHTML"],At={__name:"ChapterContent",props:{chapterIndex:{type:Number,required:!0},contents:{type:Array,required:!0},title:{type:String,required:!0},spacing:{type:Object,required:!0},fontFamily:{type:String,required:!0},fontSize:{type:String,required:!0}},emits:["readedLengthChange"],setup(a,{expose:s,emit:d}){Je(A=>({"5c00dbc4":u.spacing.letter,"0f47b712":u.spacing.line,a14ef5e0:u.spacing.paragraph}));const u=a,n=A=>{const m=/<img[^>]*src="([^"]*(?:"[^>]+\})?)"[^>]*>/,l=A.match(m)[1];return ot(l)?Fe(l):l},U=A=>{A.target.src=Fe(A.target.src)},v=A=>{const m=/<img[^>]*src="[^"]*(?:"[^>]+\})?"[^>]*>/g;return A.replaceAll(m," ").length},w=r(()=>{let A=-1;return Array.from(u.contents,m=>(A+=v(m)+1,A))}),h=S(),I=S();s({scrollToReadedLength:A=>{if(A===0)return;let m=w.value.findIndex(l=>l>=A);m!==-1&&_e(()=>{ee(I.value[m],{duration:0})})}});let y=null;const F=d;return Se(()=>{y=new IntersectionObserver(A=>{for(let{target:m,isIntersecting:l}of A)l&&F("readedLengthChange",u.chapterIndex,parseInt(m.dataset.chapterpos))},{rootMargin:`0px 0px -${window.innerHeight-24}px 0px`}),y.observe(h.value),I.value.forEach(A=>{y.observe(A)})}),Le(()=>{y==null||y.disconnect(),y=null}),(A,m)=>(p(),f(oe,null,[e("div",{class:"title","data-chapterpos":"0",ref_key:"titleRef",ref:h},z(a.title),513),(p(!0),f(oe,null,ce(a.contents,(l,x)=>(p(),f("div",{key:x,ref_for:!0,ref_key:"paragraphRef",ref:I,"data-chapterpos":o(w)[x]},[/^\s*<img[^>]*src[^>]+>$/.test(l)?(p(),f("img",{key:0,class:"full",src:n(l),onErrorOnce:U,loading:"lazy"},null,40,lt)):(p(),f("p",{key:1,style:Z({fontFamily:a.fontFamily,fontSize:a.fontSize}),innerHTML:l},null,12,rt))],8,ct))),128))],64))}},dt=le(At,[["__scopeId","data-v-2297fe46"]]),ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAgMAAABjUWAiAAAADFBMVEXr5djn4dTp49bt59rT6LKxAAACnElEQVQozw3NUUwScRzA8d8R6MF8YMIx8uk47hDSJbj14IPzOGc7jPLvwTGg5uAYDbe2tt56cLtznvEnS6yDqCcEaWi91DvrbLJZz7b1aFtz1aO+2OZWvn+/+4CHeB6BMYaqBLfjPNRY6RFT2JJYby+uAk4WUTrtlmJ4hgPYb2q1XGDQjaK8pgJHvqNaAX+KyuIkDXpgQinb46nOulnn4b5laUHTxLfseeArAoNOeJlOIjdoal0n1FA7tKFv5roK+YaHOqP3P0XyKHPHY+MhTRe5uCZnKhtJKw2eSrSoBDPLtpZuNcFNJcFyiCMxOaaHIfXz1e8HQbWLySrBQ4x0x1qlhnHlnz2HQEC6TNb0gTHXa7IKhcaHqkE015hk9whA0YeWiLIXf7Fa2CZo3DjqjB4tTuF8jIcbfcEx5z/w4sXpQhXW+ju0cqh7icTFmRMaG+v6CIvTjcSpHcH8JEsF3EPh3fRthYdVLLgI2fWXm85/pGFE4l046s70L+yKCcirGFR+jbpy3kMmiCGHrSezVONsn1RBixncyk2PcVWk7DlgxHo8iZwDyq5uAUD854dZhdIFYzKoQig2haUKi1lVufz2RZUZPZ41n/hrOQB6h0Hhg8I367FNoEHgeM/KY7szSeQwD8q2WE3HM35ZLl0K1MJiOtHIkBclRQUwZnyOWcNsRQQgVLj1PSqkjF9DsoOSaSg3iinKzvfmgsNFFfpP/2T3GLGvL4fHEfwIX1sVvXcPqLztehWGcfn9nI2U9nTfCgJPe/jFPLZwgVEzimBgAm0VIyK2tt1cE/AzQdLK+SxLSQ4aDCZnnId94OG2S1XwvnTbNk/ZnhyRCQT+sZM6z9g6LXL1BOBe+zJySiFkHAINCtnQokbCJ/apCv0foqPiZVfhpywAAAAASUVORK5CYII=",gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAgMAAABjUWAiAAAACVBMVEX28ef48+n69esoK7jYAAAB4UlEQVQozw2OsW4bQQxEhwLXkDrysGdEqRRgVShfQQq8wOr2jD0jSpXCLvwXbtKfADlFqgSwC/9ljqweZgYzQFnb/QGepYhA9jzmTc1WaSEtQpbFgjWATI00ZZtIckXx8q2Oe5yEByBy+RHOTcM+VVTadULsvxvRC/q8WTwgcWGD+Mnaqa0oy2gw2pKFzK+PzEsus5hP9AHojKslVynLlioVTBEN8cjDNnZoR1uMGTiZAAN47HxMtEkGUE9b8HWzkqNX5Lpk0yVziAJOs46rK1pG/xNuXLjz95fSDoJE5IqG23MAYPtWoeWPvfVtIV/Ng9oH3W0gGMPIOqd4MK4QZ55dV61gOb8Zxp7I9qayaGxp6Q91cmC0ZRdBwEQVHWzSAanlZwVWc9yljeTCeaHjBVvlPSLeyeBUT2rPdJegQI103jVS3uYkyIx1il6mslMDedZuOkwzolsagvPuQAfp7cYg7k9V1NOxfq64PNSvMdwONV4VYEmqlbpZy5OAakRKkjPnL4CBv5/OZRgoWHBmNbxB0LgB1I4vXFj93UoF2/0TPEsWwV9EhbIiTPqYoTHYoMn3enTDjmrFeDTIzaL1bUC/PBIMuF+vSSYSaxoLine truncated
@@ -1 +1 @@
import{a2 as se,q as T,o as r,d as h,g as e,F as W,P as O,t as l,c as ae,w as R,f as b,M as S,u as t,a3 as F,p as K,i as U,s as oe,j as C,a4 as ne,O as ce,a5 as ie,a6 as re,T as le,m as x,e as w,A as de,L as Z,x as H,I as ue,B as he}from"./vendor-B4RITwN5.js";import{d as pe,u as ve}from"./loading-aq3mpe0Z.js";import{_ as Y,b as P,u as ge,A as M,s as _e}from"./index-MvfHQcLY.js";const Q=n=>(K("data-v-52a7a450"),n=n(),U(),n),me={class:"books-wrapper"},fe={class:"wrapper"},we=["onClick"],Ie={class:"cover-img"},Ae=["src"],ke={class:"info"},Be={class:"name"},ye={class:"sub"},Se={class:"author"},Ce={key:0,class:"tags"},xe={key:1,class:"update-info"},Re=Q(()=>e("div",{class:"dot"},"•",-1)),be={class:"size"},Ee=Q(()=>e("div",{class:"dot"},"•",-1)),Ve={class:"date"},ze={key:0,class:"intro"},Me={key:1,class:"dur-chapter"},Te={class:"last-chapter"},Pe={__name:"BookItems",props:["books","isSearch"],emits:["bookClick"],setup(n,{emit:a}){se(d=>({b777fdf2:t(z)}));const E=n,V=a,N=d=>V("bookClick",d),k=d=>/^data:/.test(d)?d:P()+"/cover?path="+encodeURIComponent(d),z=T(()=>E.isSearch?"space-between":"flex-start");return(d,c)=>{const B=F;return r(),h("div",me,[e("div",fe,[(r(!0),h(W,null,O(n.books,i=>{var I;return r(),h("div",{class:"book",key:i.bookUrl,onClick:A=>N(i)},[e("div",Ie,[(r(),h("img",{class:"cover",src:k(i.coverUrl),key:i.coverUrl,alt:"",loading:"lazy"},null,8,Ae))]),e("div",ke,[e("div",Be,l(i.name),1),e("div",ye,[e("div",Se,l(i.author),1),n.isSearch?(r(),h("div",Ce,[(r(!0),h(W,null,O((I=i.kind)==null?void 0:I.split(",").slice(0,2),A=>(r(),ae(B,{key:A},{default:R(()=>[b(l(A),1)]),_:2},1024))),128))])):S("",!0),n.isSearch?S("",!0):(r(),h("div",xe,[Re,e("div",be,"共"+l(i.totalChapterNum)+"章",1),Ee,e("div",Ve,l(t(pe)(i.lastCheckTime)),1)]))]),n.isSearch?(r(),h("div",ze,l(i.intro),1)):S("",!0),n.isSearch?S("",!0):(r(),h("div",Me," 已读:"+l(i.durChapterTitle),1)),e("div",Te,"最新:"+l(i.latestChapterTitle),1)])],8,we)}),128))])])}}},Le=Y(Pe,[["__scopeId","data-v-52a7a450"]]),Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAECUlEQVRYR7WXTYhcRRDHq3pY9yKrYBQ8KBsjgvHgwRhiQBTjYZm4Xe8NusawhwS/o9GLoKhgBGPAgJd1NdGIXwtZTbRf9Rqzl6gHTVyDeIkIgnEOghAM6oKHzTJd0sO8Zaa338zb7NjwmJn++Ndv+lVVVyOsoM3Ozl69sLBAiHiDc26NUuoKv9w5d14p9aeI/DI4OMgjIyN/lJXFMhOttQ8BgBaR0TLzEXEGAKzW+lCv+V0BmLmGiLtF5M5eQrFxRPxaRCaI6LOi9YUAzPwGADxxMYYjayaJ6MkoZKyTmU8AwF19Mp7LfElEW0LNZTvAzIcBYFufjedy00T0QLt2B4AxZo9S6qX/yXhT1jn3cpqme3IbSwDM/DgAvNlu3Dm3Uyl1HAA2IOJ2EdleEu5Io9H4EBHPVCqVLSISRsMuInrLazUBpqamhoaGhr4TkRsDgLVpmtbzPmPMLQBwOwD4vvzxw8P5IyJztVrtVL4my7L1iPhTx7Yj/jw/P79pfHx8vgmQZdkLiPhK+O8GBgauqVarv5f819FpxpjLlVJ/hYMi8mKSJHubAMz8KwBcF1EYI6IjqwRIlFImonGWiNZhlmVVRDxWYGTVAMx8HwB8EtMXka1orT0gIo9GJrxNRLH+FW8IMx8EgEeW5QDEgx5gTkQ2Bk7yr9b60hVb6rKAmc8BwJWBne+x4P3XiWhtPwGstV9FzpSzHuBvALgsMHaaiDp2ZbUwWZZNIuKuQOcfD7AAAJeEcaq1Xr9ao+3rmdknnscCzQse4LdWEukYazQaa2q12vl+QTDztwCwOdCr+zA8iYi3RQwREdl+ADDz9QDwIwB0OLaInPJRcEhEHoyEyAmt9d39ALDW2lg1hYjv+lfgC4WJgkTxcJIkPcuqbpC+qgKATwvm7PYAGwDgdBeRZ4notYvZCWPMDqXUe13W3to8C6y10yJyv//u6zj/2R6ziPiRiBwt6xPMrBExFZEdRcYR8WOt9bb8MNoKAJ+3Jvtwed05d4dSKtz+c4h4VGsdrRWttZMici8AXFVix+4homNLBUmWZQcQMc/9x4mommXZ84i4t11MKbV5dHR06bxvH5uZmbnZOfdN6O0RmMNE1CxulgCstdeKyBcAcFPrVTyltZ4wxiSVSuXplkhda72zh9P1rClFZFOSJHMdAP5Hq3rxR6eH+IGIvIOuqFlr94nIc10WdRzxy6riAMJnr2nn3JlcME3TppMWNWvtfhF5pmB8WX0RvZgEEEtaYUUbM2KtfUdE/FUubNHipvBmZIxZp5TaDwBprlQGIHLqzSHiPq01x4B7Xk6Z2d8TfDwPlwFozfd1f90598Hi4uKrY2NjFwrzQVkP81nNi/byAWOMv8gOp2n6fhnt/wDqJrRWLmhIrwAAAABJRU5ErkJggg==",L=n=>(K("data-v-c22a3c0d"),n=n(),U(),n),Je={class:"navigation-wrapper"},De=L(()=>e("div",{class:"navigation-title-wrapper"},[e("div",{class:"navigation-title"},"阅读"),e("div",{class:"navigation-sub-title"},"清风不识字,何故乱翻书")],-1)),We={class:"search-wrapper"},Oe={class:"bottom-wrapper"},Ze={class:"recent-wrapper"},He=L(()=>e("div",{class:"recent-title"},"最近阅读",-1)),Fe={class:"reading-recent"},Ke={class:"setting-wrapper"},Ue=L(()=>e("div",{class:"setting-title"},"基本设定",-1)),Ye={class:"setting-ip"},Qe={class:"setting-item"},qe={class:"bottom-icons"},$e={href:"https://github.com/gedoor/legado_web_bookshelf",target:"_blank"},Ge={class:"bottom-icon"},Xe=["src"],je={__name:"BookShelf",setup(n){const a=ge(),{connectStatus:E,connectType:V,newConnect:N,shelf:k}=oe(a),z=T(()=>a.config.theme),d=T(()=>z.value==6),c=C({name:"尚无阅读记录",author:"",url:"",chapterIndex:0,chapterPos:0}),B=C(null),{showLoading:i,closeLoading:I,loadingWrapper:A,isLoading:q}=ve(B,"正在获取书籍信息"),m=ne([]),p=C(""),y=C(!1);ce(()=>{if(!(y.value&&p.value!="")){if(y.value=!1,m.value=[],p.value==""){m.value=k.value;return}m.value=k.value.filter(s=>s.name.includes(p.value)||s.author.includes(p.value))}});const $=()=>{p.value!=""&&(m.value=[],a.clearSearchBooks(),i(),y.value=!0,M.search(p.value,s=>{q&&I();try{a.setSearchBooks(JSON.parse(s)),m.value=a.searchBooks}catch(o){throw x.error("后端数据错误"),o}},()=>{I(),m.value.length==0&&x.info("搜索结果为空")}))Line truncated
import{a2 as se,q as T,o as r,d as h,g as e,F as W,P as O,t as l,c as ae,w as R,f as b,M as S,u as t,a3 as F,p as K,i as U,s as oe,j as C,a4 as ne,O as ce,a5 as ie,a6 as re,T as le,m as x,e as w,A as de,L as Z,x as H,I as ue,B as he}from"./vendor-B4RITwN5.js";import{d as pe,u as ve}from"./loading-BSPlXMjv.js";import{_ as Y,b as P,u as ge,A as M,s as _e}from"./index-DiJORxAd.js";const Q=n=>(K("data-v-52a7a450"),n=n(),U(),n),me={class:"books-wrapper"},fe={class:"wrapper"},we=["onClick"],Ie={class:"cover-img"},Ae=["src"],ke={class:"info"},Be={class:"name"},ye={class:"sub"},Se={class:"author"},Ce={key:0,class:"tags"},xe={key:1,class:"update-info"},Re=Q(()=>e("div",{class:"dot"},"•",-1)),be={class:"size"},Ee=Q(()=>e("div",{class:"dot"},"•",-1)),Ve={class:"date"},ze={key:0,class:"intro"},Me={key:1,class:"dur-chapter"},Te={class:"last-chapter"},Pe={__name:"BookItems",props:["books","isSearch"],emits:["bookClick"],setup(n,{emit:a}){se(d=>({b777fdf2:t(z)}));const E=n,V=a,N=d=>V("bookClick",d),k=d=>/^data:/.test(d)?d:P()+"/cover?path="+encodeURIComponent(d),z=T(()=>E.isSearch?"space-between":"flex-start");return(d,c)=>{const B=F;return r(),h("div",me,[e("div",fe,[(r(!0),h(W,null,O(n.books,i=>{var I;return r(),h("div",{class:"book",key:i.bookUrl,onClick:A=>N(i)},[e("div",Ie,[(r(),h("img",{class:"cover",src:k(i.coverUrl),key:i.coverUrl,alt:"",loading:"lazy"},null,8,Ae))]),e("div",ke,[e("div",Be,l(i.name),1),e("div",ye,[e("div",Se,l(i.author),1),n.isSearch?(r(),h("div",Ce,[(r(!0),h(W,null,O((I=i.kind)==null?void 0:I.split(",").slice(0,2),A=>(r(),ae(B,{key:A},{default:R(()=>[b(l(A),1)]),_:2},1024))),128))])):S("",!0),n.isSearch?S("",!0):(r(),h("div",xe,[Re,e("div",be,"共"+l(i.totalChapterNum)+"章",1),Ee,e("div",Ve,l(t(pe)(i.lastCheckTime)),1)]))]),n.isSearch?(r(),h("div",ze,l(i.intro),1)):S("",!0),n.isSearch?S("",!0):(r(),h("div",Me," 已读:"+l(i.durChapterTitle),1)),e("div",Te,"最新:"+l(i.latestChapterTitle),1)])],8,we)}),128))])])}}},Le=Y(Pe,[["__scopeId","data-v-52a7a450"]]),Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAECUlEQVRYR7WXTYhcRRDHq3pY9yKrYBQ8KBsjgvHgwRhiQBTjYZm4Xe8NusawhwS/o9GLoKhgBGPAgJd1NdGIXwtZTbRf9Rqzl6gHTVyDeIkIgnEOghAM6oKHzTJd0sO8Zaa338zb7NjwmJn++Ndv+lVVVyOsoM3Ozl69sLBAiHiDc26NUuoKv9w5d14p9aeI/DI4OMgjIyN/lJXFMhOttQ8BgBaR0TLzEXEGAKzW+lCv+V0BmLmGiLtF5M5eQrFxRPxaRCaI6LOi9YUAzPwGADxxMYYjayaJ6MkoZKyTmU8AwF19Mp7LfElEW0LNZTvAzIcBYFufjedy00T0QLt2B4AxZo9S6qX/yXhT1jn3cpqme3IbSwDM/DgAvNlu3Dm3Uyl1HAA2IOJ2EdleEu5Io9H4EBHPVCqVLSISRsMuInrLazUBpqamhoaGhr4TkRsDgLVpmtbzPmPMLQBwOwD4vvzxw8P5IyJztVrtVL4my7L1iPhTx7Yj/jw/P79pfHx8vgmQZdkLiPhK+O8GBgauqVarv5f819FpxpjLlVJ/hYMi8mKSJHubAMz8KwBcF1EYI6IjqwRIlFImonGWiNZhlmVVRDxWYGTVAMx8HwB8EtMXka1orT0gIo9GJrxNRLH+FW8IMx8EgEeW5QDEgx5gTkQ2Bk7yr9b60hVb6rKAmc8BwJWBne+x4P3XiWhtPwGstV9FzpSzHuBvALgsMHaaiDp2ZbUwWZZNIuKuQOcfD7AAAJeEcaq1Xr9ao+3rmdknnscCzQse4LdWEukYazQaa2q12vl+QTDztwCwOdCr+zA8iYi3RQwREdl+ADDz9QDwIwB0OLaInPJRcEhEHoyEyAmt9d39ALDW2lg1hYjv+lfgC4WJgkTxcJIkPcuqbpC+qgKATwvm7PYAGwDgdBeRZ4notYvZCWPMDqXUe13W3to8C6y10yJyv//u6zj/2R6ziPiRiBwt6xPMrBExFZEdRcYR8WOt9bb8MNoKAJ+3Jvtwed05d4dSKtz+c4h4VGsdrRWttZMici8AXFVix+4homNLBUmWZQcQMc/9x4mommXZ84i4t11MKbV5dHR06bxvH5uZmbnZOfdN6O0RmMNE1CxulgCstdeKyBcAcFPrVTyltZ4wxiSVSuXplkhda72zh9P1rClFZFOSJHMdAP5Hq3rxR6eH+IGIvIOuqFlr94nIc10WdRzxy6riAMJnr2nn3JlcME3TppMWNWvtfhF5pmB8WX0RvZgEEEtaYUUbM2KtfUdE/FUubNHipvBmZIxZp5TaDwBprlQGIHLqzSHiPq01x4B7Xk6Z2d8TfDwPlwFozfd1f90598Hi4uKrY2NjFwrzQVkP81nNi/byAWOMv8gOp2n6fhnt/wDqJrRWLmhIrwAAAABJRU5ErkJggg==",L=n=>(K("data-v-c22a3c0d"),n=n(),U(),n),Je={class:"navigation-wrapper"},De=L(()=>e("div",{class:"navigation-title-wrapper"},[e("div",{class:"navigation-title"},"阅读"),e("div",{class:"navigation-sub-title"},"清风不识字,何故乱翻书")],-1)),We={class:"search-wrapper"},Oe={class:"bottom-wrapper"},Ze={class:"recent-wrapper"},He=L(()=>e("div",{class:"recent-title"},"最近阅读",-1)),Fe={class:"reading-recent"},Ke={class:"setting-wrapper"},Ue=L(()=>e("div",{class:"setting-title"},"基本设定",-1)),Ye={class:"setting-ip"},Qe={class:"setting-item"},qe={class:"bottom-icons"},$e={href:"https://github.com/gedoor/legado_web_bookshelf",target:"_blank"},Ge={class:"bottom-icon"},Xe=["src"],je={__name:"BookShelf",setup(n){const a=ge(),{connectStatus:E,connectType:V,newConnect:N,shelf:k}=oe(a),z=T(()=>a.config.theme),d=T(()=>z.value==6),c=C({name:"尚无阅读记录",author:"",url:"",chapterIndex:0,chapterPos:0}),B=C(null),{showLoading:i,closeLoading:I,loadingWrapper:A,isLoading:q}=ve(B,"正在获取书籍信息"),m=ne([]),p=C(""),y=C(!1);ce(()=>{if(!(y.value&&p.value!="")){if(y.value=!1,m.value=[],p.value==""){m.value=k.value;return}m.value=k.value.filter(s=>s.name.includes(p.value)||s.author.includes(p.value))}});const $=()=>{p.value!=""&&(m.value=[],a.clearSearchBooks(),i(),y.value=!0,M.search(p.value,s=>{q&&I();try{a.setSearchBooks(JSON.parse(s)),m.value=a.searchBooks}catch(o){throw x.error("后端数据错误"),o}},()=>{I(),m.value.length==0&&x.info("搜索结果为空")}))Line truncated
@@ -1 +1 @@
import{A as f,u as n}from"./index-MvfHQcLY.js";import"./vendor-B4RITwN5.js";f.getReadConfig().then(e=>{var t=e.data.data;if(t){const a=n();let o=JSON.parse(t),i=a.config;o=Object.assign(i,o),a.setConfig(o)}});
import{A as f,u as n}from"./index-DiJORxAd.js";import"./vendor-B4RITwN5.js";f.getReadConfig().then(e=>{var t=e.data.data;if(t){const a=n();let o=JSON.parse(t),i=a.config;o=Object.assign(i,o),a.setConfig(o)}});
@@ -1,5 +1,5 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BookShelf-CFdrVDiG.js","./vendor-B4RITwN5.js","./vendor-C9cXVWQA.css","./loading-aq3mpe0Z.js","./loading-CBQeIji2.css","./BookShelf-Bs01BdYY.css","./BookChapter-BlMHijuM.js","./BookChapter-B8PYup72.css","./config-IAUZf1qC.js","./config-B2IgxNHB.css"])))=>i.map(i=>d[i]);
import{o as u,c as C,r as Ie,a as se,b as le,d as x,e as d,w as c,f,u as s,l as O,g,F as P,E as Ve,h as ge,p as Te,i as Ne,j as D,k as $e,m as w,n as me,s as Y,q as G,t as X,v as Se,x as _e,y as ie,z as Re,A as H,B as fe,C as Le,D as Oe,G as ue,V as Pe,H as De,I as Z,J as Je,K as ye,L as Ae,M as R,N as je,O as Ke,P as j,Q as be,R as ke,S as q,T as He,U as Me,W as qe,X as Fe,Y as We,Z as ze,_ as Ge,$ as Qe,a0 as Xe,a1 as Ye}from"./vendor-B4RITwN5.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const l of n)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function o(n){const l={};return n.integrity&&(l.integrity=n.integrity),n.referrerPolicy&&(l.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?l.credentials="include":n.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(n){if(n.ep)return;n.ep=!0;const l=o(n);fetch(n.href,l)}})();const Ze="modulepreload",et=function(e,t){return new URL(e,t).href},de={},ne=function(t,o,r){let n=Promise.resolve();if(o&&o.length>0){const l=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),b=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=Promise.all(o.map(p=>{if(p=et(p,r),p in de)return;de[p]=!0;const k=p.endsWith(".css"),V=k?'[rel="stylesheet"]':"";if(!!r)for(let a=l.length-1;a>=0;a--){const y=l[a];if(y.href===p&&(!k||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${V}`))return;const _=document.createElement("link");if(_.rel=k?"stylesheet":Ze,k||(_.as="script",_.crossOrigin=""),_.href=p,b&&_.setAttribute("nonce",b),document.head.appendChild(_),k)return new Promise((a,y)=>{_.addEventListener("load",a),_.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${p}`)))})}))}return n.then(()=>t()).catch(l=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=l,window.dispatchEvent(i),!i.defaultPrevented)throw l})},J=(e,t)=>{const o=e.__vccOpts||e;for(const[r,n]of t)o[r]=n;return o},tt={};function ot(e,t){const o=Ie("router-view");return u(),C(o)}const nt=J(tt,[["render",ot]]),ve=[{path:"/",name:"shelf",component:()=>ne(()=>import("./BookShelf-CFdrVDiG.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/chapter",name:"chapter",component:()=>ne(()=>import("./BookChapter-BlMHijuM.js"),__vite__mapDeps([6,1,2,3,4,7]),import.meta.url)}];se({history:le(),routes:ve});const B=e=>(Te("data-v-35b7188a"),e=e(),Ne(),e),rt=B(()=>g("br",null,null,-1)),st=B(()=>g("br",null,null,-1)),lt=B(()=>g("br",null,null,-1)),it=B(()=>g("br",null,null,-1)),at=B(()=>g("br",null,null,-1)),ct=B(()=>g("br",null,null,-1)),ut=B(()=>g("br",null,null,-1)),dt=B(()=>g("br",null,null,-1)),pt=B(()=>g("br",null,null,-1)),ht=B(()=>g("br",null,null,-1)),gt=B(()=>g("br",null,null,-1)),mt={style:{"margin-top":"20px"}},St=B(()=>g("code",null,"^$()[]{}.?+*|",-1)),_t=B(()=>g("br",null,null,-1)),ft=B(()=>g("code",null,"(?s)",-1)),yt=B(()=>g("br",null,null,-1)),bt=B(()=>g("code",null,"(?m)",-1)),kt=B(()=>g("br",null,null,-1)),vt=B(()=>g("code",null,"(?i)",-1)),Ct=B(()=>g("br",null,null,-1)),wt={__name:"SourceHelp",setup(e){return(t,o)=>{const r=Ve,n=ge;return u(),x(P,null,[d(r,{icon:s(O),href:"/help/#appHelp",target:"_blank"},{default:c(()=>[f("APP帮助文档")]),_:1},8,["icon"]),rt,d(r,{icon:s(O),href:"/help/#ruleHelp",target:"_blank"},{default:c(()=>[f("书源制作教程")]),_:1},8,["icon"]),st,d(r,{icon:s(O),href:"/help/#jsHelp",target:"_blank"},{default:c(()=>[f("js变量和函数")]),_:1},8,["icon"]),lt,d(r,{icon:s(O),href:"/help/#xpathHelp",target:"_blank"},{default:c(()=>[f("xpath语法教程")]),_:1},8,["icon"]),it,d(r,{icon:s(O),href:"/help/#regexHelp",target:"_blank"},{default:c(()=>[f("正则表达式教程")]),_:1},8,["icon"]),at,d(r,{icon:s(O),href:"/help/#txtTocRuleHelp",target:"_blank"},{default:c(()=>[f("txt目录正则说明")]),_:1},8,["icon"]),ct,d(r,{icon:s(O),href:"/help/#debugHelp",target:"_blank"},{default:c(()=>[f("书源调试说明")]),_:1},8,["icon"]),ut,d(r,{icon:s(O),href:"/help/#httpTTSHelp",target:"_blank"},{default:c(()=>[f("在线朗读规则")]),_:1},8,["icon"]),dt,d(r,{icon:s(O),href:"/help/#webDavBookHelp",target:"_blank"},{default:c(()=>[f(" WebDav书籍简明使用教程")]),_:1},8,["icon"]),pt,d(r,{icon:s(O),href:"/help/#webDavHelp",target:"_blank"},{default:c(()=>[f(" WebDav备份教程")]),_:1},8,["icon"]),ht,d(r,{icon:s(O),href:"https://regexr-cn.com/",target:"_blank"},{default:c(()=>[f("正则表达式在线验证工具")]),_:1},8,["icon"]),gt,g("div",mt,[g("span",null,[d(n,null,{default:c(()=>[St,f(" 这些是Java正则特殊符号,匹配需转义")]),_:1})]),_t,g("span",null,[d(n,null,{default:c(()=>[ft,f(" 前缀表示跨行解析")]),_:Line truncated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BookShelf-DmN0EcU9.js","./vendor-B4RITwN5.js","./vendor-C9cXVWQA.css","./loading-BSPlXMjv.js","./loading-CBQeIji2.css","./BookShelf-Bs01BdYY.css","./BookChapter-BDwWiA-_.js","./BookChapter-B8PYup72.css","./config-MMLbq8EV.js","./config-B2IgxNHB.css"])))=>i.map(i=>d[i]);
import{o as u,c as C,r as Ie,a as se,b as le,d as x,e as d,w as c,f,u as s,l as O,g,F as P,E as Ve,h as ge,p as Te,i as Ne,j as D,k as $e,m as w,n as me,s as Y,q as G,t as X,v as Se,x as _e,y as ie,z as Re,A as H,B as fe,C as Le,D as Oe,G as ue,V as Pe,H as De,I as Z,J as Je,K as ye,L as Ae,M as R,N as je,O as Ke,P as j,Q as be,R as ke,S as q,T as He,U as Me,W as qe,X as Fe,Y as We,Z as ze,_ as Ge,$ as Qe,a0 as Xe,a1 as Ye}from"./vendor-B4RITwN5.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const l of n)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function o(n){const l={};return n.integrity&&(l.integrity=n.integrity),n.referrerPolicy&&(l.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?l.credentials="include":n.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(n){if(n.ep)return;n.ep=!0;const l=o(n);fetch(n.href,l)}})();const Ze="modulepreload",et=function(e,t){return new URL(e,t).href},de={},ne=function(t,o,r){let n=Promise.resolve();if(o&&o.length>0){const l=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),b=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=Promise.all(o.map(p=>{if(p=et(p,r),p in de)return;de[p]=!0;const k=p.endsWith(".css"),V=k?'[rel="stylesheet"]':"";if(!!r)for(let a=l.length-1;a>=0;a--){const y=l[a];if(y.href===p&&(!k||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${V}`))return;const _=document.createElement("link");if(_.rel=k?"stylesheet":Ze,k||(_.as="script",_.crossOrigin=""),_.href=p,b&&_.setAttribute("nonce",b),document.head.appendChild(_),k)return new Promise((a,y)=>{_.addEventListener("load",a),_.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${p}`)))})}))}return n.then(()=>t()).catch(l=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=l,window.dispatchEvent(i),!i.defaultPrevented)throw l})},J=(e,t)=>{const o=e.__vccOpts||e;for(const[r,n]of t)o[r]=n;return o},tt={};function ot(e,t){const o=Ie("router-view");return u(),C(o)}const nt=J(tt,[["render",ot]]),ve=[{path:"/",name:"shelf",component:()=>ne(()=>import("./BookShelf-DmN0EcU9.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/chapter",name:"chapter",component:()=>ne(()=>import("./BookChapter-BDwWiA-_.js"),__vite__mapDeps([6,1,2,3,4,7]),import.meta.url)}];se({history:le(),routes:ve});const B=e=>(Te("data-v-35b7188a"),e=e(),Ne(),e),rt=B(()=>g("br",null,null,-1)),st=B(()=>g("br",null,null,-1)),lt=B(()=>g("br",null,null,-1)),it=B(()=>g("br",null,null,-1)),at=B(()=>g("br",null,null,-1)),ct=B(()=>g("br",null,null,-1)),ut=B(()=>g("br",null,null,-1)),dt=B(()=>g("br",null,null,-1)),pt=B(()=>g("br",null,null,-1)),ht=B(()=>g("br",null,null,-1)),gt=B(()=>g("br",null,null,-1)),mt={style:{"margin-top":"20px"}},St=B(()=>g("code",null,"^$()[]{}.?+*|",-1)),_t=B(()=>g("br",null,null,-1)),ft=B(()=>g("code",null,"(?s)",-1)),yt=B(()=>g("br",null,null,-1)),bt=B(()=>g("code",null,"(?m)",-1)),kt=B(()=>g("br",null,null,-1)),vt=B(()=>g("code",null,"(?i)",-1)),Ct=B(()=>g("br",null,null,-1)),wt={__name:"SourceHelp",setup(e){return(t,o)=>{const r=Ve,n=ge;return u(),x(P,null,[d(r,{icon:s(O),href:"/help/#appHelp",target:"_blank"},{default:c(()=>[f("APP帮助文档")]),_:1},8,["icon"]),rt,d(r,{icon:s(O),href:"/help/#ruleHelp",target:"_blank"},{default:c(()=>[f("书源制作教程")]),_:1},8,["icon"]),st,d(r,{icon:s(O),href:"/help/#jsHelp",target:"_blank"},{default:c(()=>[f("js变量和函数")]),_:1},8,["icon"]),lt,d(r,{icon:s(O),href:"/help/#xpathHelp",target:"_blank"},{default:c(()=>[f("xpath语法教程")]),_:1},8,["icon"]),it,d(r,{icon:s(O),href:"/help/#regexHelp",target:"_blank"},{default:c(()=>[f("正则表达式教程")]),_:1},8,["icon"]),at,d(r,{icon:s(O),href:"/help/#txtTocRuleHelp",target:"_blank"},{default:c(()=>[f("txt目录正则说明")]),_:1},8,["icon"]),ct,d(r,{icon:s(O),href:"/help/#debugHelp",target:"_blank"},{default:c(()=>[f("书源调试说明")]),_:1},8,["icon"]),ut,d(r,{icon:s(O),href:"/help/#httpTTSHelp",target:"_blank"},{default:c(()=>[f("在线朗读规则")]),_:1},8,["icon"]),dt,d(r,{icon:s(O),href:"/help/#webDavBookHelp",target:"_blank"},{default:c(()=>[f(" WebDav书籍简明使用教程")]),_:1},8,["icon"]),pt,d(r,{icon:s(O),href:"/help/#webDavHelp",target:"_blank"},{default:c(()=>[f(" WebDav备份教程")]),_:1},8,["icon"]),ht,d(r,{icon:s(O),href:"https://regexr-cn.com/",target:"_blank"},{default:c(()=>[f("正则表达式在线验证工具")]),_:1},8,["icon"]),gt,g("div",mt,[g("span",null,[d(n,null,{default:c(()=>[St,f(" 这些是Java正则特殊符号,匹配需转义")]),_:1})]),_t,g("span",null,[d(n,null,{default:c(()=>[ft,f(" 前缀表示跨行解析")]),_:Line truncated
`},l=async()=>{o.value="";try{await K.saveSource(t.currentSource)}catch(b){throw t.debugFinish(),b}K.debug(t.currentSourceUrl,r.value||t.searchKey,n,t.debugFinish)},i=G(()=>/bookSource/.test(window.location.href));return(b,p)=>{const k=Z;return u(),x(P,null,[s(i)?(u(),C(k,{key:0,id:"debug-key",modelValue:s(r),"onUpdate:modelValue":p[0]||(p[0]=V=>H(r)?r.value=V:null),placeholder:"搜索书名、作者","prefix-icon":s(fe),style:{"padding-bottom":"4px"},onKeydown:Ae(l,["enter"])},null,8,["modelValue","prefix-icon"])):R("",!0),d(k,{id:"debug-text",modelValue:s(o),"onUpdate:modelValue":p[1]||(p[1]=V=>H(o)?o.value=V:null),type:"textarea",readonly:"",rows:"29",placeholder:"这里用于输出调试信息"},null,8,["modelValue"])],64)}}},eo=J(Zt,[["__scopeId","data-v-97ed449e"]]),Uo=me("book",{state:()=>({connectStatus:"正在连接后端服务器……",connectType:"",newConnect:!0,searchBooks:[],shelf:[],catalog:[],readingBook:{index:0,chapterPos:0},popCataVisible:!1,contentLoading:!0,showContent:!1,config:{theme:0,font:0,fontSize:18,readWidth:800,infiniteLoading:!1,customFontName:"",jumpDuration:1e3,spacing:{paragraph:1,line:.8,letter:0}},miniInterface:!1,readSettingsVisible:!1}),getters:{bookProgress:e=>{var i;if(e.catalog.length==0)return;const{index:t,chapterPos:o,bookName:r,bookAuthor:n}=e.readingBook;let l=(i=e.catalog[t])==null?void 0:i.title;if(l)return{name:r,author:n,durChapterIndex:t,durChapterPos:o,durChapterTime:new Date().getTime(),durChapterTitle:l}}},actions:{setConnectStatus(e){this.connectStatus=e},setConnectType(e){this.connectType=e},resetConnect(){this.connectStatus="正在连接后端服务器……",this.connectType="",this.clearBooks()},setNewConnect(e){this.newConnect=e},addBooks(e){this.shelf=e},clearBooks(){this.shelf=[]},setCatalog(e){this.catalog=e},setPopCataVisible(e){this.popCataVisible=e},setContentLoading(e){this.contentLoading=e},setReadingBook(e){this.readingBook=e},setConfig(e){Object.assign(this.config,e)},setReadSettingsVisible(e){this.readSettingsVisible=e},setShowContent(e){this.showContent=e},setMiniInterface(e){this.miniInterface=e},async setSearchBooks(e){e.forEach(t=>{this.shelf.find(r=>r.bookUrl==t.bookUrl)===void 0&&this.searchBooks.push(t)})},clearSearchBooks(){this.searchBooks=[]},async saveBookProgress(){return this.bookProgress?K.saveBookProgress(this.bookProgress):Promise.resolve()}}}),to=je(),oo={__name:"SourceJson",setup(e){const t=M(),o=D(""),r=async n=>{try{t.changeEditTabSource(JSON.parse(n))}catch{w({message:"粘贴的源格式错误",type:"error"})}};return Ke(async()=>{let n=t.editTabSource;Object.keys(n).length>0?o.value=JSON.stringify(n,null,4):o.value=""}),(n,l)=>{const i=Z;return u(),C(i,{id:"source-json",modelValue:s(o),"onUpdate:modelValue":l[0]||(l[0]=b=>H(o)?o.value=b:null),type:"textarea",placeholder:"这里输出序列化的JSON数据,可直接导入'阅读'APP",rows:"30",onChange:r,style:{"margin-bottom":"4px"}},null,8,["modelValue"])}}},no=J(oo,[["__scopeId","data-v-7e91a802"]]),ro={__name:"SourceTabTools",setup(e){const t=M(),{currentTab:o}=Y(t),r=D([["editTab","编辑源"],["editDebug","调试源"],["editList","源列表"],["editHelp","帮助信息"]]);return(n,l)=>{const i=no,b=eo,p=Yt,k=Bt,V=be,E=ke;return u(),C(E,{modelValue:s(o),"onUpdate:modelValue":l[0]||(l[0]=_=>H(o)?o.value=_:null)},{default:c(()=>[(u(!0),x(P,null,j(s(r),(_,a)=>(u(),C(V,{key:_[0],name:_[0],label:_[1]},{default:c(()=>[a==0?(u(),C(i,{key:0})):R("",!0),a==1?(u(),C(b,{key:1})):R("",!0),a==2?(u(),C(p,{key:2})):R("",!0),a==3?(u(),C(k,{key:3})):R("",!0)]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])}}},so=J(ro,[["__scopeId","data-v-dcce2457"]]),lo={class:"menu flex-column-center"},io={class:"hotkeys-header flex-space-between"},ao=["id"],co={key:0},uo={class:"hotkeys-settings flex-column-center"},po={class:"title"},ho={class:"hotkeys-item__content"},go={key:0},mo={key:0},So={__name:"ToolBar",setup(e){const t=M(),o=()=>{const m=w({message:"加载中……",showClose:!0,duration:0});K.getSources().then(({data:S})=>{S.isSuccess?(t.changeTabName("editList"),t.saveSources(S.data),w({message:`成功拉取${S.data.length}条源`,type:"success"})):w({message:S.errorMsg??"后端错误",type:"error"})}).finally(()=>m.close())},r=()=>{let m=t.sources;if(t.changeTabName("editList"),m.length===0)return w({message:"空空如也",type:"info"});w({message:"正在推送中",type:"info"}),K.saveSources(m).then(({data:S})=>{if(S.isSuccess){let h=S.data;if(Array.isArray(h)){let A="";m.length>h.length&&(A=`
推送失败的源将用红色字体标注!`,t.setPushReturnSources(h)),w({message:`批量推送源到「阅读3.0APP」
共计: ${m.length} 条
@@ -7,4 +7,4 @@ import{o as u,c as C,r as Ie,a as se,b as le,d as x,e as d,w as c,f,u as s,l as
失败: ${m.length-h.length} 条${A}`,type:"success"})}}else w({message:`批量推送源失败!
ErrorMsg: ${S.errorMsg}`,type:"error"})})},n=()=>{t.changeTabName("editTab"),t.changeEditTabSource(t.currentSource)},l=()=>{t.changeCurrentSource(t.editTabSource)},i=()=>{t.editHistoryUndo()},b=()=>{t.clearEdit(),w({message:"已清除",type:"success"})},p=()=>{t.clearEdit(),t.clearAllHistory(),w({message:"已清除所有历史记录",type:"success"})},k=()=>{let m=/bookSource/.test(location.href),S=t.currentSource;Mt(S)?K.saveSource(S).then(({data:h})=>{h.isSuccess?(w({message:`源《${m?S.bookSourceName:S.sourceName}》已成功保存到「阅读3.0APP」`,type:"success"}),t.saveCurrentSource()):w({message:`源《${m?S.bookSourceName:S.sourceName}》保存失败!
ErrorMsg: ${h.errorMsg}`,type:"error"})}):w({message:"请检查<必填>项是否全部填写",type:"error"})},V=()=>{t.startDebug()},E=D(Array.of({name:"⇈推送源",hotKeys:[],action:r},{name:"⇊拉取源",hotKeys:[],action:o},{name:"⋙生成源",hotKeys:[],action:n},{name:"⋘编辑源",hotKeys:[],action:l},{name:"✗清空表单",hotKeys:[],action:b},{name:"↶撤销操作",hotKeys:[],action:i},{name:"↷重做操作",hotKeys:[],action:p},{name:"⇏调试源",hotKeys:[],action:V},{name:"✓保存源",hotKeys:[],action:k})),_=D(!0),a=D(!1),y=D(-1),I=()=>{a.value||(_.value=!1),a.value=!1};ye(_,m=>{if(!m){q.unbind("*"),W(),N();return}W(),q.unbind(),q("*",S=>{S.preventDefault();let h=q.getPressedKeyString();h.length==1&&h[0]=="esc"||a.value&&y.value>-1&&(E.value[y.value].hotKeys=h)})},{immediate:!0});const v=m=>{a.value=!0,w({message:"按ESC键或者点击空白处结束录入",type:"info"}),E.value[m].hotKeys=[],y.value=m},T=()=>{const m=[];E.value.forEach(({hotKeys:S})=>{m.push(S)}),L(m),_.value=!1},N=()=>{q.filter=()=>!0,E.value.forEach(({hotKeys:m,action:S})=>{m.length!=0&&q(m.join("+"),h=>{h.preventDefault(),S.call(null)})})},L=m=>{localStorage.setItem("legado_web_hotkeys",JSON.stringify(m))};function W(){try{const m=JSON.parse(localStorage.getItem("legado_web_hotkeys"));return!Array.isArray(m)||m.length==0?!1:(E.value.forEach((S,h)=>S.hotKeys=m[h]),!0)}catch{w({message:"快捷键配置错误",type:"error"}),localStorage.removeItem("legado_web_hotkeys")}return!1}return He(()=>{W()&&(_.value=!1)}),(m,S)=>{const h=ie,A=ge,xe=qe;return u(),x(P,null,[g("div",lo,[(u(!0),x(P,null,j(s(E),$=>(u(),C(h,{size:"large",key:$.name,onClick:$.action},{default:c(()=>[f(X($.name),1)]),_:2},1032,["onClick"]))),128)),d(h,{size:"large",onClick:S[0]||(S[0]=()=>_.value=!0)},{default:c(()=>[f("快捷键")]),_:1})]),d(xe,{modelValue:s(_),"onUpdate:modelValue":S[1]||(S[1]=$=>H(_)?_.value=$:null),"show-close":!1,"before-close":I},{header:c(({titleClass:$,titleId:te})=>[g("div",io,[g("div",{id:te,class:_e($)},[f(" 快捷键设置 "),s(a)?(u(),x("span",co,[d(A,null,{default:c(()=>[f(" / 录入中 ")]),_:1})])):R("",!0)],10,ao),d(h,{disabled:s(a),onClick:T,icon:s(Me)},{default:c(()=>[f("保存")]),_:1},8,["disabled","icon"])])]),default:c(()=>[g("div",uo,[(u(!0),x(P,null,j(s(E),($,te)=>(u(),x("div",{key:$.name,class:"hotkeys-item flex-space-between"},[g("span",po,[d(A,null,{default:c(()=>[f(X($.name),1)]),_:2},1024)]),g("div",ho,[(u(!0),x(P,null,j($.hotKeys,(oe,Ee)=>(u(),x("div",{key:oe},[g("kbd",null,X(oe),1),Ee+1<$.hotKeys.length?(u(),x("span",go,[d(A,null,{default:c(()=>[f("+")]),_:1})])):R("",!0)]))),128)),$.hotKeys.length==0?(u(),x("span",mo,"未设置")):R("",!0)]),d(h,{disabled:s(a),text:"",icon:s(Se),onClick:oe=>v(te)},{default:c(()=>[f("编辑")]),_:2},1032,["disabled","icon","onClick"])]))),128))])]),_:1},8,["modelValue"])],64)}}},_o=J(So,[["__scopeId","data-v-9fd45dad"]]),fo={__name:"SourceTabForm",props:["config"],setup(e){const t=M(),{currentSource:o}=Y(t);return(r,n)=>{const l=Z,i=Fe,b=We,p=ze,k=Ge,V=Qe,E=Xe,_=be,a=ke;return u(),C(a,{id:"source-edit"},{default:c(()=>[(u(!0),x(P,null,j(Object.values(e.config),({name:y,children:I})=>(u(),C(_,{label:y,key:y},{default:c(()=>[d(E,{"label-position":"right","label-width":"auto"},{default:c(()=>[(u(!0),x(P,null,j(I,({type:v,title:T,namespace:N,id:L,array:W,hint:m,required:S})=>(u(),C(V,{label:T,key:T,required:S},{default:c(()=>[v=="String"&&typeof N>"u"?(u(),C(l,{key:0,type:"textarea",modelValue:s(o)[L],"onUpdate:modelValue":h=>s(o)[L]=h,placeholder:m,autosize:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])):R("",!0),v=="String"&&typeof N<"u"?(u(),C(l,{key:1,type:"textarea",modelValue:s(o)[N][L],"onUpdate:modelValue":h=>s(o)[N][L]=h,placeholder:m,autosize:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])):R("",!0),v=="Boolean"?(u(),C(i,{key:2,modelValue:s(o)[L],"onUpdate:modelValue":h=>s(o)[L]=h},null,8,["modelValue","onUpdate:modelValue"])):R("",!0),v=="Number"?(u(),C(b,{key:3,modelValue:s(o)[L],"onUpdate:modelValue":h=>s(o)[L]=h,min:0},null,8,["modelValue","onUpdate:modelValue"])):R("",!0),v=="Array"?(u(),C(k,{key:4,modelValue:s(o)[L],"onUpdate:modelValue":h=>s(o)[L]=h},{default:c(()=>[(u(!0),x(P,null,j(W,(h,A)=>(u(),C(p,{value:A,key:h,label:h},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):R("",!0)]),_:2},1032,["label","required"]))),128))]),_:2},1024)]),_:2},1032,["label"]))),128))]),_:1})}}},yo=J(fo,[["__scopeId","data-v-bced2b97"]]),bo={base:{name:"基础",children:[{title:"源类型",id:"bookSourceType",type:"Array",array:["文本","音频","图片","文件"],required:!0},{title:"源域名",id:"bookSourceUrl",type:"String",hint:"通常填写网站主页,例: https://www.qidian.com",required:!0},{title:"源名称",id:"bookSourceName",type:"String",hint:"会显示在源列表",required:!0},{title:"源分组",id:"bookSourceGroup",type:"String",hint:"描述源的特征信息"},{title:"源注释",id:"bookS Line truncated
名称2::链接2`},{title:"登录地址",id:"loginUrl",type:"String",hint:"填写网站登录网址,仅在需要登录的源有用"},{title:"登录界面",id:"loginUi",type:"String",hint:"自定义登录界面"},{title:"登录检测",id:"loginCheckJs",type:"String",hint:"登录检测js"},{title:"封面解密",id:"coverDecodeJs",type:"String",hint:"封面解密js"},{title:"请求头",id:"header",type:"String",hint:"客户端标识"},{title:"变量说明",id:"variableComment",type:"String",hint:"源变量说明"},{title:"并发率",id:"concurrentRate",type:"String",hint:"并发率"}]},list:{name:"列表",children:[{title:"列表规则",id:"ruleArticles",type:"String",hint:"规则结果为List<Element>"},{title:"翻页规则",id:"ruleNextPage",type:"String",hint:"下一页链接 规则结果为List<String>或String"},{title:"标题规则",id:"ruleTitle",type:"String",hint:"文章标题 规则结果为String"},{title:"时间规则",id:"rulePubDate",type:"String",hint:"文章发布时间 规则结果为String"},{title:"描述规则",id:"ruleDescription",type:"String",hint:"文章简要描述 规则结果为String"},{title:"图片规则",id:"ruleImage",type:"String",hint:"文章图片链接 规则结果为String"},{title:"链接规则",id:"ruleLink",type:"String",hint:"文章链接 规则结果为String"}]},webView:{name:"WebView",children:[{title:"内容规则",id:"ruleContent",type:"String",hint:"文章正文"},{title:"样式规则",id:"style",type:"String",hint:"文章正文样式 填写css"},{title:"注入规则",id:"injectJs",type:"String",hint:"注入网页的JavaScript"},{title:"黑名单",id:"contentBlacklist",type:"String",hint:"webView链接加载黑名单,英文逗号隔开"},{title:"白名单",id:"contentWhitelist",type:"String",hint:"webView链接加载白名单,英文逗号隔开"},{title:"链接拦截",id:"shouldOverrideUrlLoading",type:"String",hint:"填写js,变量url为当前资源链接,返回true拦截"}]},other:{name:"其他",children:[{title:"列表样式",id:"articleStyle",type:"Array",array:["默认","大图","双列"]},{title:"加载地址",id:"loadWithBaseUrl",type:"Boolean"},{title:"启用JS",id:"enableJs",type:"Boolean"},{title:"启用",id:"enabled",type:"Boolean"},{title:"Cookie",id:"enabledCookieJar",type:"Boolean"},{title:"单URL",id:"singleUrl",type:"Boolean"},{title:"排序编号",id:"customOrder",type:"Number"}]}},vo={class:"editor"},Co={__name:"SourceEditor",setup(e){let t;return/bookSource/i.test(location.href)?(t=bo,document.title="书源管理"):(t=ko,document.title="订阅源管理"),(o,r)=>{const n=yo,l=_o,i=so;return u(),x("div",vo,[d(n,{class:"left",config:s(t)},null,8,["config"]),d(l),d(i,{class:"right"})])}}},he=J(Co,[["__scopeId","data-v-5fe2b79d"]]),Be=[{path:"/bookSource",name:"book-home",component:he},{path:"/rssSource",name:"rss-home",component:he}];se({history:le(),routes:Be});const Ue=se({history:le(),routes:ve.concat(Be)});Ue.afterEach(e=>{e.name=="shelf"&&(document.title="书架")});Ye(nt).use(to).use(Ue).mount("#app");ne(()=>import("./config-IAUZf1qC.js"),__vite__mapDeps([8,1,2,9]),import.meta.url);export{K as A,J as _,Ce as b,Bo as s,Uo as u};
名称2::链接2`},{title:"登录地址",id:"loginUrl",type:"String",hint:"填写网站登录网址,仅在需要登录的源有用"},{title:"登录界面",id:"loginUi",type:"String",hint:"自定义登录界面"},{title:"登录检测",id:"loginCheckJs",type:"String",hint:"登录检测js"},{title:"封面解密",id:"coverDecodeJs",type:"String",hint:"封面解密js"},{title:"请求头",id:"header",type:"String",hint:"客户端标识"},{title:"变量说明",id:"variableComment",type:"String",hint:"源变量说明"},{title:"并发率",id:"concurrentRate",type:"String",hint:"并发率"}]},list:{name:"列表",children:[{title:"列表规则",id:"ruleArticles",type:"String",hint:"规则结果为List<Element>"},{title:"翻页规则",id:"ruleNextPage",type:"String",hint:"下一页链接 规则结果为List<String>或String"},{title:"标题规则",id:"ruleTitle",type:"String",hint:"文章标题 规则结果为String"},{title:"时间规则",id:"rulePubDate",type:"String",hint:"文章发布时间 规则结果为String"},{title:"描述规则",id:"ruleDescription",type:"String",hint:"文章简要描述 规则结果为String"},{title:"图片规则",id:"ruleImage",type:"String",hint:"文章图片链接 规则结果为String"},{title:"链接规则",id:"ruleLink",type:"String",hint:"文章链接 规则结果为String"}]},webView:{name:"WebView",children:[{title:"内容规则",id:"ruleContent",type:"String",hint:"文章正文"},{title:"样式规则",id:"style",type:"String",hint:"文章正文样式 填写css"},{title:"注入规则",id:"injectJs",type:"String",hint:"注入网页的JavaScript"},{title:"黑名单",id:"contentBlacklist",type:"String",hint:"webView链接加载黑名单,英文逗号隔开"},{title:"白名单",id:"contentWhitelist",type:"String",hint:"webView链接加载白名单,英文逗号隔开"},{title:"链接拦截",id:"shouldOverrideUrlLoading",type:"String",hint:"填写js,变量url为当前资源链接,返回true拦截"}]},other:{name:"其他",children:[{title:"列表样式",id:"articleStyle",type:"Array",array:["默认","大图","双列"]},{title:"加载地址",id:"loadWithBaseUrl",type:"Boolean"},{title:"启用JS",id:"enableJs",type:"Boolean"},{title:"启用",id:"enabled",type:"Boolean"},{title:"Cookie",id:"enabledCookieJar",type:"Boolean"},{title:"单URL",id:"singleUrl",type:"Boolean"},{title:"排序编号",id:"customOrder",type:"Number"}]}},vo={class:"editor"},Co={__name:"SourceEditor",setup(e){let t;return/bookSource/i.test(location.href)?(t=bo,document.title="书源管理"):(t=ko,document.title="订阅源管理"),(o,r)=>{const n=yo,l=_o,i=so;return u(),x("div",vo,[d(n,{class:"left",config:s(t)},null,8,["config"]),d(l),d(i,{class:"right"})])}}},he=J(Co,[["__scopeId","data-v-5fe2b79d"]]),Be=[{path:"/bookSource",name:"book-home",component:he},{path:"/rssSource",name:"rss-home",component:he}];se({history:le(),routes:Be});const Ue=se({history:le(),routes:ve.concat(Be)});Ue.afterEach(e=>{e.name=="shelf"&&(document.title="书架")});Ye(nt).use(to).use(Ue).mount("#app");ne(()=>import("./config-MMLbq8EV.js"),__vite__mapDeps([8,1,2,9]),import.meta.url);export{K as A,J as _,ae as b,Bo as s,Uo as u};
@@ -1 +1 @@
import{A as L,u as D,j as v,K as y,a7 as Y,af as b}from"./vendor-B4RITwN5.js";import{b as k,u as H}from"./index-MvfHQcLY.js";function W(t){return typeof t=="function"?t():D(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const w=()=>{};function A(t,r){function e(...a){return new Promise((o,l)=>{Promise.resolve(t(()=>r.apply(this,a),{fn:r,thisArg:this,args:a})).then(o).catch(l)})}return e}function T(...t){let r=0,e,a=!0,o=w,l,i,s,n,c;!L(t[0])&&typeof t[0]=="object"?{delay:i,trailing:s=!0,leading:n=!0,rejectOnCancel:c=!1}=t[0]:[i,s=!0,n=!0,c=!1]=t;const p=()=>{e&&(clearTimeout(e),e=void 0,o(),o=w)};return d=>{const u=W(i),g=Date.now()-r,m=()=>l=d();return p(),u<=0?(r=Date.now(),m()):(g>u&&(n||!a)?(r=Date.now(),m()):s&&(l=new Promise((h,M)=>{o=c?M:h,e=setTimeout(()=>{r=Date.now(),a=!0,h(m()),p()},Math.max(0,u-g))})),!n&&!e&&(e=setTimeout(()=>a=!0,u)),a=!1,l)}}function C(t,r=200,e=!1,a=!0,o=!1){return A(T(r,e,a,o),t)}const $=/[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function x(t,r,e,a){let o=t<12?"AM":"PM";return a&&(o=o.split("").reduce((l,i)=>l+=`${i}.`,"")),e?o.toLowerCase():o}function f(t){const r=["th","st","nd","rd"],e=t%100;return t+(r[(e-20)%10]||r[e]||r[0])}function F(t,r,e={}){var a;const o=t.getFullYear(),l=t.getMonth(),i=t.getDate(),s=t.getHours(),n=t.getMinutes(),c=t.getSeconds(),p=t.getMilliseconds(),S=t.getDay(),d=(a=e.customMeridiem)!=null?a:x,u={Yo:()=>f(o),YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>l+1,Mo:()=>f(l+1),MM:()=>`${l+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(e.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(e.locales,{month:"long"}),D:()=>String(i),Do:()=>f(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(s),Ho:()=>f(s),HH:()=>`${s}`.padStart(2,"0"),h:()=>`${s%12||12}`.padStart(1,"0"),ho:()=>f(s%12||12),hh:()=>`${s%12||12}`.padStart(2,"0"),m:()=>String(n),mo:()=>f(n),mm:()=>`${n}`.padStart(2,"0"),s:()=>String(c),so:()=>f(c),ss:()=>`${c}`.padStart(2,"0"),SSS:()=>`${p}`.padStart(3,"0"),d:()=>S,dd:()=>t.toLocaleDateString(e.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(e.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(e.locales,{weekday:"long"}),A:()=>d(s,n),AA:()=>d(s,n,!1,!0),a:()=>d(s,n,!0),aa:()=>d(s,n,!0,!0)};return r.replace($,(g,m)=>{var h,M;return(M=m??((h=u[g])==null?void 0:h.call(u)))!=null?M:g})}const E=t=>/,\s*\{/.test(t)||!(t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:"));function j(t){return k()+"/image?path="+encodeURIComponent(t)+"&url="+encodeURIComponent(sessionStorage.getItem("bookUrl"))+"&width="+H().config.readWidth}const V=t=>{let r=new Date().getTime(),e=Math.floor((r-t)/1e3),a="";return e<=30?a="刚刚":e<60?a=e+"秒前":e<3600?a=Math.floor(e/60)+"分钟前":e<86400?a=Math.floor(e/3600)+"小时前":e<2592e3?a=Math.floor(e/86400)+"天前":a=F(new Date(t),"YYYY-MM-DD"),a},P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"/></svg>',_=(t,r,e=P)=>{const a=v(!1);let o=null;const l=()=>a.value=!1,i=()=>a.value=!0;y(a,n=>{if(!n)return o==null?void 0:o.close();o=b.service({target:D(t),spinner:e,text:r,lock:!0,background:"rgba(0, 0, 0, 0)"})});const s=n=>{if(!(n instanceof Promise))throw TypeError("loadingWrapper argument must be Promise");return i(),n.finally(l)};return Y(()=>{l()}),{isLoading:a,showLoading:i,closeLoading:l,loadingWrapper:s}};export{C as a,V as d,j as g,E as i,_ as u};
import{A as L,u as D,j as v,K as y,a7 as Y,af as b}from"./vendor-B4RITwN5.js";import{b as k,u as H}from"./index-DiJORxAd.js";function W(t){return typeof t=="function"?t():D(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const w=()=>{};function A(t,r){function e(...a){return new Promise((o,l)=>{Promise.resolve(t(()=>r.apply(this,a),{fn:r,thisArg:this,args:a})).then(o).catch(l)})}return e}function T(...t){let r=0,e,a=!0,o=w,l,i,s,n,c;!L(t[0])&&typeof t[0]=="object"?{delay:i,trailing:s=!0,leading:n=!0,rejectOnCancel:c=!1}=t[0]:[i,s=!0,n=!0,c=!1]=t;const p=()=>{e&&(clearTimeout(e),e=void 0,o(),o=w)};return d=>{const u=W(i),g=Date.now()-r,m=()=>l=d();return p(),u<=0?(r=Date.now(),m()):(g>u&&(n||!a)?(r=Date.now(),m()):s&&(l=new Promise((h,M)=>{o=c?M:h,e=setTimeout(()=>{r=Date.now(),a=!0,h(m()),p()},Math.max(0,u-g))})),!n&&!e&&(e=setTimeout(()=>a=!0,u)),a=!1,l)}}function C(t,r=200,e=!1,a=!0,o=!1){return A(T(r,e,a,o),t)}const $=/[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function x(t,r,e,a){let o=t<12?"AM":"PM";return a&&(o=o.split("").reduce((l,i)=>l+=`${i}.`,"")),e?o.toLowerCase():o}function f(t){const r=["th","st","nd","rd"],e=t%100;return t+(r[(e-20)%10]||r[e]||r[0])}function F(t,r,e={}){var a;const o=t.getFullYear(),l=t.getMonth(),i=t.getDate(),s=t.getHours(),n=t.getMinutes(),c=t.getSeconds(),p=t.getMilliseconds(),S=t.getDay(),d=(a=e.customMeridiem)!=null?a:x,u={Yo:()=>f(o),YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>l+1,Mo:()=>f(l+1),MM:()=>`${l+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(e.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(e.locales,{month:"long"}),D:()=>String(i),Do:()=>f(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(s),Ho:()=>f(s),HH:()=>`${s}`.padStart(2,"0"),h:()=>`${s%12||12}`.padStart(1,"0"),ho:()=>f(s%12||12),hh:()=>`${s%12||12}`.padStart(2,"0"),m:()=>String(n),mo:()=>f(n),mm:()=>`${n}`.padStart(2,"0"),s:()=>String(c),so:()=>f(c),ss:()=>`${c}`.padStart(2,"0"),SSS:()=>`${p}`.padStart(3,"0"),d:()=>S,dd:()=>t.toLocaleDateString(e.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(e.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(e.locales,{weekday:"long"}),A:()=>d(s,n),AA:()=>d(s,n,!1,!0),a:()=>d(s,n,!0),aa:()=>d(s,n,!0,!0)};return r.replace($,(g,m)=>{var h,M;return(M=m??((h=u[g])==null?void 0:h.call(u)))!=null?M:g})}const E=t=>/,\s*\{/.test(t)||!(t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:"));function j(t){return k()+"/image?path="+encodeURIComponent(t)+"&url="+encodeURIComponent(sessionStorage.getItem("bookUrl"))+"&width="+H().config.readWidth}const V=t=>{let r=new Date().getTime(),e=Math.floor((r-t)/1e3),a="";return e<=30?a="刚刚":e<60?a=e+"秒前":e<3600?a=Math.floor(e/60)+"分钟前":e<86400?a=Math.floor(e/3600)+"小时前":e<2592e3?a=Math.floor(e/86400)+"天前":a=F(new Date(t),"YYYY-MM-DD"),a},P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"/></svg>',_=(t,r,e=P)=>{const a=v(!1);let o=null;const l=()=>a.value=!1,i=()=>a.value=!0;y(a,n=>{if(!n)return o==null?void 0:o.close();o=b.service({target:D(t),spinner:e,text:r,lock:!0,background:"rgba(0, 0, 0, 0)"})});const s=n=>{if(!(n instanceof Promise))throw TypeError("loadingWrapper argument must be Promise");return i(),n.finally(l)};return Y(()=>{l()}),{isLoading:a,showLoading:i,closeLoading:l,loadingWrapper:s}};export{C as a,V as d,j as g,E as i,_ as u};
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<script type="module" crossorigin src="./assets/index-MvfHQcLY.js"></script>
<script type="module" crossorigin src="./assets/index-DiJORxAd.js"></script>
<link rel="modulepreload" crossorigin href="./assets/vendor-B4RITwN5.js">
<link rel="stylesheet" crossorigin href="./assets/vendor-C9cXVWQA.css">
<link rel="stylesheet" crossorigin href="./assets/index-DT4CNe0X.css">