ptSend/view/dist/assets/addSubscribe-0de7d687.js
2023-08-07 19:00:35 +08:00

2 lines
12 KiB
JavaScript

import{s as re,a as ue,b as de,c as ce}from"./Video-8e45cd37.js";import{m as fe,n as me,_ as pe,g as y,q as he,s as ve,r as O,o as X,c as te,u as se,h as _e,v as ye,f as b,F as ie,i as $e,a as c,w as f,t as oe,b as h,x as ge,E as ne}from"./index-b619957d.js";import"./axios-4a70c6fc.js";var le={exports:{}};(function(ae,P){(function(H,L){ae.exports=L()})(fe,function(){var H=1e3,L=6e4,N=36e5,T="millisecond",V="second",D="minute",w="hour",x="day",Y="week",$="month",z="quarter",M="year",S="date",R="Invalid Date",G=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var t=["th","st","nd","rd"],e=o%100;return"["+o+(t[(e-20)%10]||t[e]||t[0])+"]"}},q=function(o,t,e){var i=String(o);return!i||i.length>=t?o:""+Array(t+1-i.length).join(e)+o},W={s:q,z:function(o){var t=-o.utcOffset(),e=Math.abs(t),i=Math.floor(e/60),a=e%60;return(t<=0?"+":"-")+q(i,2,"0")+":"+q(a,2,"0")},m:function o(t,e){if(t.date()<e.date())return-o(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,$),l=e-a<0,n=t.clone().add(i+(l?-1:1),$);return+(-(i+(e-a)/(l?a-n:n-a))||0)},a:function(o){return o<0?Math.ceil(o)||0:Math.floor(o)},p:function(o){return{M:$,y:M,w:Y,d:x,D:S,h:w,m:D,s:V,ms:T,Q:z}[o]||String(o||"").toLowerCase().replace(/s$/,"")},u:function(o){return o===void 0}},A="en",U={};U[A]=Q;var v=function(o){return o instanceof E},r=function o(t,e,i){var a;if(!t)return A;if(typeof t=="string"){var l=t.toLowerCase();U[l]&&(a=l),e&&(U[l]=e,a=l);var n=t.split("-");if(!a&&n.length>1)return o(n[0])}else{var u=t.name;U[u]=t,a=u}return!i&&a&&(A=a),a||!i&&A},d=function(o,t){if(v(o))return o.clone();var e=typeof t=="object"?t:{};return e.date=o,e.args=arguments,new E(e)},s=W;s.l=r,s.i=v,s.w=function(o,t){return d(o,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function o(e){this.$L=r(e.locale,null,!0),this.parse(e)}var t=o.prototype;return t.parse=function(e){this.$d=function(i){var a=i.date,l=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var n=a.match(G);if(n){var u=n[2]-1||0,p=(n[7]||"0").substring(0,3);return l?new Date(Date.UTC(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,p)):new Date(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,p)}}return new Date(a)}(e),this.$x=e.x||{},this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return s},t.isValid=function(){return this.$d.toString()!==R},t.isSame=function(e,i){var a=d(e);return this.startOf(i)<=a&&a<=this.endOf(i)},t.isAfter=function(e,i){return d(e)<this.startOf(i)},t.isBefore=function(e,i){return this.endOf(i)<d(e)},t.$g=function(e,i,a){return s.u(e)?this[i]:this.set(a,e)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,i){var a=this,l=!!s.u(i)||i,n=s.p(e),u=function(B,g){var I=s.w(a.$u?Date.UTC(a.$y,g,B):new Date(a.$y,g,B),a);return l?I:I.endOf(x)},p=function(B,g){return s.w(a.toDate()[B].apply(a.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(g)),a)},m=this.$W,_=this.$M,j=this.$D,C="set"+(this.$u?"UTC":"");switch(n){case M:return l?u(1,0):u(31,11);case $:return l?u(1,_):u(0,_+1);case Y:var J=this.$locale().weekStart||0,Z=(m<J?m+7:m)-J;return u(l?j-Z:j+(6-Z),_);case x:case S:return p(C+"Hours",0);case w:return p(C+"Minutes",1);case D:return p(C+"Seconds",2);case V:return p(C+"Milliseconds",3);default:return this.clone()}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,i){var a,l=s.p(e),n="set"+(this.$u?"UTC":""),u=(a={},a[x]=n+"Date",a[S]=n+"Date",a[$]=n+"Month",a[M]=n+"FullYear",a[w]=n+"Hours",a[D]=n+"Minutes",a[V]=n+"Seconds",a[T]=n+"Milliseconds",a)[l],p=l===x?this.$D+(i-this.$W):i;if(l===$||l===M){var m=this.clone().set(S,1);m.$d[u](p),m.init(),this.$d=m.set(S,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](p);return this.init(),this},t.set=function(e,i){return this.clone().$set(e,i)},t.get=function(e){return this[s.p(e)]()},t.add=function(e,i){var a,l=this;e=Number(e);var n=s.p(i),u=function(_){var j=d(l);return s.w(j.date(j.date()+Math.round(_*e)),l)};if(n===$)return this.set($,this.$M+e);if(n===M)return this.set(M,this.$y+e);if(n===x)return u(1);if(n===Y)return u(7);var p=(a={},a[D]=L,a[w]=N,a[V]=H,a)[n]||1,m=this.$d.getTime()+e*p;return s.w(m,this)},t.subtract=function(e,i){return this.add(-1*e,i)},t.format=function(e){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||R;var l=e||"YYYY-MM-DDTHH:mm:ssZ",n=s.z(this),u=this.$H,p=this.$m,m=this.$M,_=a.weekdays,j=a.months,C=function(g,I,ee,K){return g&&(g[I]||g(i,l))||ee[I].slice(0,K)},J=function(g){return s.s(u%12||12,g,"0")},Z=a.meridiem||function(g,I,ee){var K=g<12?"AM":"PM";return ee?K.toLowerCase():K},B={YY:String(this.$y).slice(-2),YYYY:s.s(this.$y,4,"0"),M:m+1,MM:s.s(m+1,2,"0"),MMM:C(a.monthsShort,m,j,3),MMMM:C(j,m),D:this.$D,DD:s.s(this.$D,2,"0"),d:String(this.$W),dd:C(a.weekdaysMin,this.$W,_,2),ddd:C(a.weekdaysShort,this.$W,_,3),dddd:_[this.$W],H:String(u),HH:s.s(u,2,"0"),h:J(1),hh:J(2),a:Z(u,p,!0),A:Z(u,p,!1),m:String(p),mm:s.s(p,2,"0"),s:String(this.$s),ss:s.s(this.$s,2,"0"),SSS:s.s(this.$ms,3,"0"),Z:n};return l.replace(F,function(g,I){return I||B[g]||n.replace(":","")})},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(e,i,a){var l,n=s.p(i),u=d(e),p=(u.utcOffset()-this.utcOffset())*L,m=this-u,_=s.m(this,u);return _=(l={},l[M]=_/12,l[$]=_,l[z]=_/3,l[Y]=(m-p)/6048e5,l[x]=(m-p)/864e5,l[w]=m/N,l[D]=m/L,l[V]=m/H,l)[n]||m,a?_:s.a(_)},t.daysInMonth=function(){return this.endOf($).$D},t.$locale=function(){return U[this.$L]},t.locale=function(e,i){if(!e)return this.$L;var a=this.clone(),l=r(e,i,!0);return l&&(a.$L=l),a},t.clone=function(){return s.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},o}(),k=E.prototype;return d.prototype=k,[["$ms",T],["$s",V],["$m",D],["$H",w],["$W",x],["$M",$],["$y",M],["$D",S]].forEach(function(o){k[o[1]]=function(t){return this.$g(t,o[0],o[1])}}),d.extend=function(o,t){return o.$i||(o(t,E,d),o.$i=!0),d},d.locale=r,d.isDayjs=v,d.unix=function(o){return d(1e3*o)},d.en=U[A],d.Ls=U,d.p={},d})})(le);var be=le.exports;const we=me(be);const Me={class:"list"},xe={class:"item"},Ve=["src"],De={style:{padding:"14px"}},Se={style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis"}},ke={class:"bottom"},Oe={class:"time"},Ue={style:{display:"flex","align-items":"center",padding:"5px"}},Ce={style:{display:"flex","align-items":"center",padding:"5px"}},He={style:{display:"flex","align-items":"center",padding:"5px"}},Te={style:{display:"flex","align-items":"center",padding:"5px"}},Ye={style:{display:"flex","align-items":"center",padding:"5px"}},je={style:{padding:"12px"}},Ie={class:"dialog-footer"},Le={__name:"addSubscribe",setup(ae){let P=y([]);const H=y(""),L=he(),N=y(""),T=y(1),V=y(1),D=y(""),w=y(""),x=y(""),Y=y(""),$=y(""),z=y(0),M=y(),S=y([]);async function R(v){let r=await re(v);P.value=r.data.data}R(L.query.name),ve(v=>{R(v.query.name)});let G="";const F=y(!1);let Q="";async function q(v,r){const d=ge.service({fullscreen:!0});G=v,x.value=r;let s=await ue(v);H.value=s.data.format,N.value=s.data.year,Q=s.data.imdb_link||"",console.info(s.data.trans_title.length),s.data.trans_title.length===0?w.value=s.data.this_title.join(" / "):w.value=s.data.this_title.join(" / ")+" / "+s.data.trans_title.join(" / "),z.value=s.data.episodes,$.value=s.data.chinese_title,W.value="",s.data.imdb_link&&await A(s.data.imdb_link),F.value=!0,d.close()}const W=y("");async function A(v){const r=await de(v);W.value=r.data}async function U(){let v={name:$.value,rename:W.value,desc:H.value,year:N.value,season:V.value,ep:T.value,url:D.value,img:x.value,subtitle:w.value,time:we(Y.value).format("HH:mm:ss"),skip:T.value,sid:G,count:z.value,imdb:Q,type:M.value,tags:S.value.join(",")},r=["imdb"];for(let s in v)if(!v[s]&&!r.includes(s)){console.log(s,v[s]),ne({message:"请完整填写内容!",type:"error"});return}let d=await ce(v);d.data=="添加成功"?ne({message:d.data,type:"success"}):ne({message:d.data,type:"error"})}return(v,r)=>{const d=O("el-empty"),s=O("el-button"),E=O("el-card"),k=O("el-input"),o=O("el-time-picker"),t=O("el-option"),e=O("el-select"),i=O("el-checkbox-button"),a=O("el-checkbox-group"),l=O("el-dialog");return X(),te(ie,null,[se(P).length===0?(X(),_e(d,{key:0,description:"没有搜索到内容"})):ye("",!0),b("div",null,[b("div",Me,[(X(!0),te(ie,null,$e(se(P),n=>(X(),te("div",xe,[c(E,{onClick:u=>q(n.id,n.img),shadow:"hover","body-style":{padding:"0px"}},{default:f(()=>[b("img",{src:n.img,class:"image"},null,8,Ve),b("div",De,[b("span",Se,oe(n.title),1),b("div",ke,[b("time",Oe,"上映时间:"+oe(n.year),1),c(s,{text:"",class:"button"},{default:f(()=>[h("详情")]),_:1})])])]),_:2},1032,["onClick"])]))),256))]),c(l,{modelValue:F.value,"onUpdate:modelValue":r[11]||(r[11]=n=>F.value=n),title:"添加订阅"},{footer:f(()=>[b("span",Ie,[c(s,{onClick:r[10]||(r[10]=n=>F.value=!1)},{default:f(()=>[h("关闭")]),_:1}),c(s,{type:"primary",onClick:U},{default:f(()=>[h(" 订阅 ")]),_:1})])]),default:f(()=>[b("div",Ue,[c(k,{style:{width:"100%"},modelValue:W.value,"onUpdate:modelValue":r[0]||(r[0]=n=>W.value=n)},{prepend:f(()=>[h("英文名")]),_:1},8,["modelValue"])]),b("div",Ce,[c(k,{style:{width:"100%"},modelValue:w.value,"onUpdate:modelValue":r[1]||(r[1]=n=>w.value=n)},{prepend:f(()=>[h("副标题")]),_:1},8,["modelValue"])]),b("div",He,[c(k,{style:{width:"100%"},modelValue:D.value,"onUpdate:modelValue":r[2]||(r[2]=n=>D.value=n)},{prepend:f(()=>[h("播放地址")]),_:1},8,["modelValue"])]),b("div",Te,[c(o,{modelValue:Y.value,"onUpdate:modelValue":r[3]||(r[3]=n=>Y.value=n),placeholder:"Arbitrary time"},null,8,["modelValue"]),c(k,{style:{width:"20%",left:"10px"},modelValue:N.value,"onUpdate:modelValue":r[4]||(r[4]=n=>N.value=n)},{prepend:f(()=>[h("年份")]),_:1},8,["modelValue"]),c(k,{style:{width:"15%",left:"20px"},modelValue:V.value,"onUpdate:modelValue":r[5]||(r[5]=n=>V.value=n)},{prepend:f(()=>[h("季")]),_:1},8,["modelValue"]),c(k,{style:{width:"30%",left:"30px"},modelValue:T.value,"onUpdate:modelValue":r[6]||(r[6]=n=>T.value=n)},{prepend:f(()=>[h("订阅位置(集)")]),_:1},8,["modelValue"])]),b("div",Ye,[c(e,{modelValue:M.value,"onUpdate:modelValue":r[7]||(r[7]=n=>M.value=n),"value-key":"browsecat"},{default:f(()=>[c(t,{value:418,label:"日漫"},{default:f(()=>[h("日漫")]),_:1}),c(t,{value:417,label:"国漫"},{default:f(()=>[h("国漫")]),_:1}),c(t,{value:403,label:"综艺"},{default:f(()=>[h("综艺")]),_:1}),c(t,{value:402,label:"电视剧"},{default:f(()=>[h("电视剧")]),_:1}),c(t,{value:422,label:"纪录片"},{default:f(()=>[h("纪录片")]),_:1})]),_:1},8,["modelValue"]),b("div",je,[c(a,{modelValue:S.value,"onUpdate:modelValue":r[8]||(r[8]=n=>S.value=n),size:"large"},{default:f(()=>[c(i,{label:"1"},{default:f(()=>[h("禁转")]),_:1}),c(i,{label:"3"},{default:f(()=>[h("官方")]),_:1}),c(i,{label:"5"},{default:f(()=>[h("国语")]),_:1}),c(i,{label:"6"},{default:f(()=>[h("中字")]),_:1}),c(i,{label:"7"},{default:f(()=>[h("HDR")]),_:1})]),_:1},8,["modelValue"])])]),c(k,{style:{display:"flex","align-items":"center",padding:"5px"},autosize:{minRows:10,maxRows:10},modelValue:H.value,"onUpdate:modelValue":r[9]||(r[9]=n=>H.value=n),rows:2,type:"textarea",placeholder:"Please input"},null,8,["modelValue"])]),_:1},8,["modelValue"])])],64)}}},Fe=pe(Le,[["__scopeId","data-v-c81a2b48"]]);export{Fe as default};