import{i as e,a,_ as l}from"./mediaType.Bd6Rha0d.js";import{bl as t,bh as o,bG as i,aS as r,q as n,g as s,r as c,bt as u,aq as d,ak as v,T as p,s as m,aU as h,d as f}from"./index.BFRcEQe4.js";import{_ as b}from"./index.CpIShV8O.js";import{_ as x}from"./index.D8EB2NNY.js";import{_ as y}from"./index.AEkWwklI.js";import{u as g,az as w,a8 as k,a0 as _,R as I,a2 as C,a4 as U,l as E,F as j,i as D,k as A,ah as S,g as N,Z as R,r as T,aE as V,j as L,S as M,q as P,an as z,aa as $,ap as O,V as F,ad as q,aq as B}from"./vue-vendor.CbU-cCHr.js";import{a as H,g as G,_ as W,D as Q,b as Y,u as X}from"./useBotInteract.B2sv-fYl.js";import{B as Z}from"./bot.D-CV1V9s.js";import{_ as J}from"./index.BJkM6YFt.js";import"./utils-vendor.DUtsG4XZ.js";import{u as K}from"./i18n.D8sRpFFz.js";import{d as ee,l as ae,i as le}from"./useHlsVideo.-Or1qoUd.js";import{u as te}from"./useCharacterNavigation.Cq0XhwKb.js";import"./other-vendor.j8sIU4n3.js";import"./icons.BL-8H3wb.js";import"./app_arrow-left-line@2x.beiviEFj.js";import"./throttle.Bqq8fpRO.js";let oe=null;function ie(e){oe===e&&(oe=null)}const re=["src"],ne={key:0,class:"absolute inset-0 w-full h-full overflow-hidden rounded-xl"},se={key:2,class:"play-btn-overlay absolute inset-0 flex items-center justify-center bg-black/20 rounded-xl"},ce=["src"],ue={key:0,class:"absolute inset-0 w-full h-full overflow-hidden rounded-xl"},de={class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30 rounded-xl"},ve={class:"flex items-center bg-black/50 px-2 py-1 rounded-full"},pe=["src"],me={class:"text-white text-xs ml-1 font-medium"},he=c(g({name:"GalleryVideoItem",__name:"index",props:{videoId:{},videoUrl:{},title:{},money:{},unlocked:{type:Boolean},botId:{}},emits:["unlock-success"],setup(a,{expose:l,emit:c}){const u=t(),d=o(),v=i(),{t:p}=K(),m=a,h=c,f=N(()=>d.appConfig.coinIconSrc),b=k(null),x=k(null),y=k(null),g=k(null),R=k(null),T=new WeakSet;let V=null,L=null,M=null,P=null;const z=()=>{ee(M),M=null},$=()=>{ee(P),P=null},O=()=>{const e=x.value,a=m.videoUrl;e&&a&&(te.value||(z(),e.removeAttribute("src"),e.load(),M=ae(e,a,{onError:()=>Ie()}),!M&&le(a)&&Ie()))},F=()=>{const e=y.value,a=m.videoUrl;e&&a&&(te.value||($(),e.removeAttribute("src"),e.load(),P=ae(e,a,{onError:()=>Ie()}),!P&&le(a)&&Ie()))},q=N(()=>(()=>{const e=navigator.userAgent;return/XiaoMi|MiuiBrowser|UCBrowser|Huawei|Honor|vivo|OPPO|Heytap|Quark|Weibo|baiduboxapp|MicroMessenger|QQBrowser|mqqbrowser/i.test(e)})()),B=(e,a)=>{if(!a||!e)return;const l=a.getContext("2d");if(!l)return;if(e.readyState<2||!e.videoWidth||!e.videoHeight)return;const t=window.devicePixelRatio||1,o=a.getBoundingClientRect(),i=Math.max(1,Math.round(o.width*t)),r=Math.max(1,Math.round(o.height*t));a.width===i&&a.height===r||(a.width=i,a.height=r);const n=e.videoWidth/e.videoHeight;let s,c,u,d;i/r>n?(s=i,c=i/n,u=0,d=(r-c)/2):(c=r,s=r*n,u=(i-s)/2,d=0),l.clearRect(0,0,i,r),l.drawImage(e,u,d,s,c)},W=()=>{null!==V&&(cancelAnimationFrame(V),V=null)},Q=()=>{null!==L&&(cancelAnimationFrame(L),L=null)};w(x,e=>{e&&!T.has(e)&&(T.add(e),e.addEventListener("loadeddata",()=>{q.value&&B(e,g.value)}),e.addEventListener("play",()=>{q.value&&(()=>{if(null!==V)return;const e=()=>{V=null;const a=x.value;!a||a.paused||a.ended||(B(a,g.value),V=requestAnimationFrame(e))};V=requestAnimationFrame(e)})()}),e.addEventListener("pause",()=>{q.value&&W()})),e&&I(()=>O())}),w(y,e=>{e&&!T.has(e)&&(T.add(e),e.addEventListener("loadeddata",()=>{q.value&&B(e,R.value)}),e.addEventListener("play",()=>{q.value&&(()=>{if(null!==L)return;const e=()=>{L=null;const a=y.value;!a||a.paused||a.ended||(B(a,R.value),L=requestAnimationFrame(e))};L=requestAnimationFrame(e)})()}),e.addEventListener("pause",()=>{q.value&&Q()})),e&&I(()=>F())}),w(()=>m.videoUrl,()=>{I(()=>{O(),F()})});const Y=k(!1),X=k(!1),Z=k(m.unlocked),J=N(()=>0!==m.money&&!Z.value),te=N(()=>m.videoUrl&&e(m.videoUrl));w(()=>m.unlocked,e=>{Z.value=e});let he=null;_(()=>{I(()=>{J.value&&(he&&(he.disconnect(),he=null),b.value&&(he=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?be():xe()})},{threshold:.5}),he.observe(b.value)))})}),C(()=>{he&&(he.disconnect(),he=null),W(),Q(),z(),$()}),w(J,e=>{I(()=>{e||(xe(),he&&(he.disconnect(),he=null))})});const fe=()=>{var e;m.videoUrl&&!te.value&&(x.value&&(e=x.value,oe&&oe!==e&&oe.pause(),oe=e,x.value.muted=!1,x.value.play().then(()=>{Y.value=!0}).catch(e=>{Y.value=!1})))},be=()=>{m.videoUrl&&!te.value&&y.value&&(y.value.muted=!0,y.value.play().catch(e=>{}))},xe=()=>{te.value||y.value&&(y.value.pause(),y.value.currentTime=0)};function ye(){}function ge(){Y.value=!1,ie(x.value)}function we(){Y.value=!1,ie(x.value)}function ke(){}function _e(){if(J.value&&b.value){const e=b.value.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight;e.top<a&&e.bottom>0&&be()}}function Ie(){r("album_vid_fail",{videoId:m.videoId})}async function Ce(e){if("VIDEO"!==e.target.tagName||!Y.value)if(J.value){try{await v.getUserInfo()}catch(a){}(Number(v.userInfo.diamondCount)||0)>=(Number(m.money)||0)?await async function(){if(X.value||!m.videoId)return;r("album_vid_pay",{videoId:m.videoId,money:m.money}),X.value=!0;try{await n.unlockVideo(m.videoId,m.botId),await v.getUserInfo(),r("album_vid_pay_success",{videoId:m.videoId,money:m.money}),Z.value=!0,h("unlock-success",m.videoId),s.success(p("dialogVideoUnlock.unlockSuccess"))}catch(a){r("album_vid_pay_fail",{videoId:m.videoId,money:m.money}),s.error(G(a,p,"dialogVideoUnlock.unlockFailed"))}finally{X.value=!1}}():u.setVideoUnlockData({videoId:m.videoId,coverUrl:"",money:m.money,botId:m.botId,source:"album"})}else Y.value?te.value||x.value&&(x.value.pause(),Y.value=!1,ie(x.value)):fe()}return l({markAsUnlocked:()=>{Z.value=!0},videoId:m.videoId}),(e,l)=>(U(),E("div",{class:"gallery-video-item relative aspect-[9/16] rounded-xl overflow-hidden bg-[rgb(38,38,41)] cursor-pointer",ref_key:"containerRef",ref:b,onClick:Ce},[J.value?(U(),E(j,{key:1},[l[3]||(l[3]=D("div",{class:"video-badge absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium z-10"}," VIDEO ",-1)),te.value?(U(),E("img",{key:0,src:a.videoUrl,class:"w-full h-full object-cover rounded-xl blur-xl",onLoad:ke,onError:Ie},null,40,ce)):(U(),E(j,{key:1},[q.value?(U(),E("div",ue,[D("video",{ref_key:"lockedVideoRef",ref:y,class:"card-image-offscreen",loop:"",muted:"",playsinline:"",autoplay:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",crossorigin:"anonymous",onLoadeddata:ke,onCanplay:_e,onError:Ie},null,544),D("canvas",{ref_key:"lockedVideoCanvasRef",ref:R,class:"absolute inset-0 w-full h-full rounded-xl blur-xl",style:{"z-index":"1"}},null,512)])):(U(),E("video",{key:1,ref_key:"lockedVideoRef",ref:y,class:"w-full h-full object-cover rounded-xl blur-xl",loop:"",muted:"",playsinline:"",autoplay:"",preload:"auto",onLoadeddata:ke,onCanplay:_e,onError:Ie},null,544))],64)),D("div",de,[l[2]||(l[2]=D("div",{class:"w-[32px] h-[32px] mb-2"},[D("img",{src:H,class:"w-full h-full object-contain",alt:"locked"})],-1)),D("div",ve,[D("img",{src:f.value,alt:"diamond",class:"w-[14px] h-[14px] object-cover"},null,8,pe),D("span",me,S(a.money),1)])])],64)):(U(),E(j,{key:0},[l[1]||(l[1]=D("div",{class:"video-badge absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium z-10"}," VIDEO ",-1)),te.value?(U(),E("img",{key:0,src:a.videoUrl,class:"w-full h-full object-cover rounded-xl",onLoad:ye,onError:Ie},null,40,re)):(U(),E(j,{key:1},[q.value?(U(),E("div",ne,[D("video",{ref_key:"videoRef",ref:x,class:"card-image-offscreen",loop:"",playsinline:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",crossorigin:"anonymous",onLoadeddata:ye,onEnded:ge,onPause:we,onError:Ie},null,544),D("canvas",{ref_key:"videoCanvasRef",ref:g,class:"absolute inset-0 w-full h-full rounded-xl",style:{"z-index":"1"}},null,512)])):(U(),E("video",{key:1,ref_key:"videoRef",ref:x,class:"w-full h-full object-cover rounded-xl",loop:"",playsinline:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",onLoadeddata:ye,onEnded:ge,onPause:we,onError:Ie},null,544))],64)),Y.value||te.value?A("",!0):(U(),E("div",se,[...l[0]||(l[0]=[D("div",{class:"w-[40px] h-[40px] bg-black/50 rounded-full flex items-center justify-center"},[D("svg",{class:"w-5 h-5 text-white ml-0.5",fill:"currentColor",viewBox:"0 0 24 24"},[D("path",{d:"M8 5v14l11-7z"})])],-1)])]))],64))],512))}}),[["__scopeId","data-v-4d0c668c"]]),fe=e=>{window.__PRERENDER_ERROR__=e},be=()=>{const{t:e}=K();let a=!1,l=setTimeout(()=>{l=null,window.__PRERENDER_READY__||fe("character SEO failed: timed out waiting for bot detail")},15e3);const t=()=>{null!==l&&(clearTimeout(l),l=null)};R(t);return{updateCharacterSeo:async l=>{if(t(),a)return!1;if(!l.personName||!l.personName.trim())return fe("character SEO failed: bot name is empty"),!1;const o=(()=>{var e,a,l;const t=null==(a=null==(e=window.__APP_CONFIG__)?void 0:e.seo)?void 0:a.title;return(null==(l=null==t?void 0:t.split(" - ")[0])?void 0:l.trim())||"OnlyGF"})(),i=window.location.href,r=((e,a,l)=>{const t=[];e.personName&&t.push(e.personName),e.age&&t.push(`${a("seo.characterDetail.age")}:${e.age}`),e.vocation&&t.push(`${a("seo.characterDetail.career")}:${e.vocation}`),e.height&&t.push(`${a("seo.characterDetail.height")}:${e.height}`),e.constellation&&t.push(`${a("seo.characterDetail.constellation")}:${e.constellation}`);const o=a("seo.characterDetail.titlePrefix"),i=`${a("seo.characterDetail.aiGirlfriend")}|${l}`;return`${o}:${t.length>0?t.join(","):""}—${i}`})(l,e,o),n=((e,a,l)=>{const t=a("seo.characterDetail.descriptionTemplate",{name:e.personName||"",appName:l});return e.introduction&&e.introduction.trim()?`${e.introduction}\n${t}`:t})(l,e,o),s=((e,a)=>{const l=[];if(e.personName&&l.push(e.personName),l.push("AI girlfriend","AI chat"),e.vocation&&l.push(e.vocation),e.userTags&&e.userTags.length>0){const a=e.userTags.slice(0,5);l.push(...a)}return l.push(a),l.join(", ")})(l,o),c=((e,a)=>{const l={"@context":"https://schema.org","@type":"Person",gender:"Female",url:a};return e.personName&&(l.name=e.personName),e.introduction&&(l.description=e.introduction),e.headerUrl&&(l.image=e.headerUrl),e.vocation&&(l.jobTitle=e.vocation),e.height&&(l.height=String(e.height)),e.age&&(l.age=e.age),e.constellation&&(l.constellation=e.constellation),e.bloodType&&(l.bloodType=e.bloodType),l})(l,i);try{u({title:r,meta:[{name:"description",content:n},{name:"keywords",content:s}],script:[{type:"application/ld+json",children:JSON.stringify([c])}]}),await I(),await new Promise(e=>setTimeout(e,20))}catch(d){return fe(`character SEO failed: head update error - ${String(d)}`),!1}return a=!0,window.__PRERENDER_READY__=!0,!0},markCharacterSeoError:e=>{t(),fe(`character SEO failed: ${e}`)}}},xe={class:"character-container min-h-screen bg-[#121216] text-white overflow-x-hidden"},ye={class:"max-w-[1280px] mx-auto pt-[0px] pb-[84px] xl:py-[24px]"},ge={class:"character-container-headder fixed top-0 left-0 right-0 z-10 h-[75px] md:hidden"},we={class:"absolute top-[16px] left-[16px]"},ke={key:0,class:"detail-load-failed"},_e={key:1,class:"flex flex-col xl:flex-row mb-0 xl:mb-[43px]"},Ie={class:"mb-6 xl:mb-0 relative flex-shrink-0 character-image-container pl-[0px] xl:pl-[24px]"},Ce={class:"relative"},Ue={class:"xl:rounded-[24px] rounded-[0px] overflow-hidden bg-gray-800 character-image-wrapper aspect-[3/4] overflow-hidden"},Ee={class:"live-entry-inner"},je={key:2,class:"absolute bottom-4 left-4 px-3 py-1 rounded-full text-xs font-medium flex items-center online-status-bg"},De={class:"xl:w-2/3 flex-grow xl:ml-[20px] px-[16px] xl:px-[24px] flex flex-col justify-between"},Ae={class:"flex items-center mb-1 character-name-row"},Se={class:"text-[24px] md:text-[40px] font-bold text-white mr-2"},Ne={class:"flex items-center mb-4 character-stats-row"},Re={class:"text-[14px] text-[#9CA3AF] font-medium"},Te={class:"text-[rgba(255,255,255,0.6)] text-[14px] mb-[16px]"},Ve={class:"flex flex-wrap mb-[16px] attributes-container"},Le={class:"w-8 h-8 flex items-center justify-center mr-2 flex-shrink-0"},Me=["src","alt"],Pe={class:"min-w-0 flex-1"},ze={class:"text-xs text-gray-400"},$e={class:"text-white font-medium text-sm"},Oe={class:"flex flex-wrap mb-[12px]"},Fe={class:"flex h-[76px] xl:h-[56px] xl:relative xl:bottom-auto xl:left-auto xl:right-auto xl:w-auto xl:px-0 xl:py-0 xl:bg-transparent xl:backdrop-filter-none absolute bottom-0 left-0 right-0 p-[16px] bg-[rgba(26,26,29,0.8)] backdrop-blur-[9px] z-50"},qe={key:2,class:"w-full px-[16px] xl:px-[24px]"},Be={class:"text-[25px] font-bold text-white mb-[24px] py-[10px] gradient-divider"},He={key:0,class:"flex flex-wrap gallery-container"},Ge=["onClick"],We={key:0,class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30 rounded-xl cursor-pointer"},Qe={class:"flex items-center bg-black/50 px-2 py-1 rounded-full"},Ye=["src"],Xe={class:"text-white text-xs ml-1 font-medium"},Ze={key:1,class:"gallery-no-data mt-[48px]"},Je=c(g({name:"CharacterPage",__name:"index",setup(e){const c=B(),u=O(),{toCharacterChat:g}=te(),{toggleLike:I,toggleCollect:C}=X(),{updateCharacterSeo:R,markCharacterSeoError:G}=be(),K=t(),ee=o(),ae=i(),le=N(()=>ee.device===f.MOBILE?64:56),oe=N(()=>ee.device===f.MOBILE),ie=N(()=>ee.appConfig.profileIcons),re=N(()=>ee.appConfig.coinIconSrc),ne=d.global.t,se=k(""),ce=k(!1),ue=k(!1),de=k(!1),ve=k(!1),pe=()=>!!v(p)||(K.showLoginDialog=!0,!1),me=k([]),fe=k([]),Je=k(!1),Ke=k([]),ea=k(0),aa=e=>{da()},la=()=>{},ta=k({name:"",mainImage:"",headerUrl:"",chatStatus:0,isLive:!1,likes:"0",views:"0",stats:[{icon:"ri-heart-fill",color:"#A0A0A1",value:"0",key:"likes"},{icon:"ri-chat-3-fill",color:"#A0A0A1",value:"0",key:"views"}],description:"",attributes:[],tags:[]}),oa=N(()=>ta.value.headerUrl||""),ia=N(()=>1===ta.value.isLive),ra=async()=>{se.value&&ia.value&&(r("character_live_entry_click",{userId:se.value}),await h({router:c,userId:se.value,avatarUrl:oa.value||"",characterName:ta.value.personName||ta.value.name,showLiveAvatar:ia.value,avatarSize:le.value}))},na=()=>{g(se.value)},sa=async e=>{if(se.value&&pe())try{if("like"===e)return void(ce.value=await I(se.value,!!ce.value,se.value));ue.value=await C(se.value,!!ue.value)}catch(a){}},ca=()=>{K.showShareDialog=!0},ua=()=>{K.reportUserId=se.value,K.showReportDialog=!0},da=async()=>{if(se.value){if(!v(p))return me.value=[],void(fe.value=[]);try{const e=await Z.botAlbums({userId:se.value,page:1,size:100});e&&Array.isArray(e)&&e.length>0?(me.value=e.filter(e=>e.url||e.videoUrl).map(e=>({id:e.photoId,url:e.url,title:e.title,money:e.money||0,enableView:e.enableView??!0,mediaType:e.mediaType||"image",videoId:e.videoId,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,videoMoney:e.videoMoney||0,videoEnableView:e.videoEnableView??!1})),fe.value=me.value.filter(e=>"image"===e.mediaType&&e.enableView).map(e=>e.url)):(me.value=[],fe.value=[])}catch(e){me.value=[],fe.value=[]}}},va=()=>{},pa=()=>{da()};return w(()=>K.showPhotoUnlockDialog,(e,a)=>{!0===a&&!1===e&&da()}),w(()=>K.showVideoUnlockDialog,(e,a)=>{!0===a&&!1===e&&da()}),_(async()=>{se.value=u.params.id||u.query.id,se.value&&((async()=>{if(se.value)try{de.value=!0,ve.value=!1;const e=await Z.botDetail({userId:se.value});if(e){const a=e;ta.value={name:a.personName||"Unknown Character",bodyMedias:a.bodyMedias||[],headerUrl:a.headerUrl||"",chatStatus:a.chatStatus??0,isLive:a.isLive??!1,likes:a.likeCount?a.likeCount.toString():"0",views:a.chatsCount?a.chatsCount.toString():"0",stats:[{icon:"ri-heart-fill",color:"#A0A0A1",value:a.likeCount?a.likeCount.toString():"0",key:"likes"},{icon:"ri-chat-3-fill",color:"#A0A0A1",value:a.chatsCount?a.chatsCount.toString():"0",key:"views"}],description:a.introduction||"",attributes:[{label:ne("characterDetail.age"),value:a.age?a.age.toString():ne("characterDetail.unknown"),icon:ie.value.age},{label:ne("characterDetail.career"),value:a.vocation||ne("characterDetail.unknown"),icon:ie.value.career},{label:ne("characterDetail.height"),value:a.height?`${a.height}cm`:ne("characterDetail.unknown"),icon:ie.value.height},{label:ne("characterDetail.constellation"),value:a.constellation||ne("characterDetail.unknown"),icon:ie.value.constellation},{label:ne("characterDetail.bloodType"),value:a.bloodType||ne("characterDetail.unknown"),icon:ie.value.bloodType}],tags:a.userTags||[]},ce.value=a.isLiked,ue.value=a.isFavorite,R(a)}}catch(e){return ve.value=!0,void G("bot detail request failed")}finally{de.value=!1}})(),da())}),(e,t)=>{const o=y,i=a,c=x,u=b,d=m,v=l;return U(),E("div",xe,[D("div",ye,[D("div",ge,[D("div",we,[T(o,{color:"var(--white-color)"})])]),ve.value?(U(),E("div",ke,[T(J)])):A("",!0),ve.value?A("",!0):(U(),E("div",_e,[D("div",Ie,[D("div",Ce,[D("div",Ue,[T(i,{bodyMedias:ta.value.bodyMedias,alt:ta.value.name,class:"w-full h-full object-cover object-top"},null,8,["bodyMedias","alt"])]),ia.value?(U(),E("button",{key:0,class:"live-entry-btn absolute z-[3]",onClick:V(ra,["stop"])},[D("div",Ee,[T(c,{avatar:oa.value,size:le.value,type:"girl","show-live":ia.value,class:"live-entry-avatar"},null,8,["avatar","size","show-live"])])])):A("",!0),ia.value?(U(),L(u,{key:1,"dot-position":oe.value?"left":"right",class:M(["absolute z-[3]",oe.value?"bottom-4 left-4":"top-4 right-4"])},null,8,["dot-position","class"])):(U(),E("div",je,[t[3]||(t[3]=D("div",{class:"w-2 h-2 bg-green-500 rounded-full mr-2"},null,-1)),P(" "+S(z(ne)("characterDetail.online")),1)])),D("button",{class:"absolute bottom-4 right-4 w-10 h-10 rounded-full flex items-center justify-center bg-black/50 backdrop-blur hover:opacity-80",onClick:t[0]||(t[0]=e=>sa("like"))},[ce.value?(U(),L(d,{key:1,name:"heart-fill",size:"20",color:"var(--heart-fill-color)"})):(U(),E(j,{key:0},[T(d,{name:"heart-line",size:"20",class:"group-hover:hidden"}),T(d,{name:"heart-fill",size:"20",class:"hidden group-hover:block",color:"var(--heart-fill-color)"})],64))])])]),D("div",De,[D("div",null,[D("div",Ae,[D("div",Se,S(ta.value.name),1),D("div",{class:"w-[28px] h-[28px] rounded-full flex items-center justify-center hover:bg-[rgba(255,255,255,0.05)] transition-colors p-1",onClick:ua},[T(d,{name:"information-line",color:"var(--font-color-60)",size:"20"})])]),D("div",Ne,[(U(!0),E(j,null,$(ta.value.stats,(e,a)=>(U(),E("div",{key:e.key,class:M(["flex items-center",{"mr-6":a<ta.value.stats.length-1}])},[(U(),L(q(e.icon),{style:F({color:e.color}),class:"mr-[6px]",size:"18"},null,8,["style"])),D("span",Re,S(e.value),1)],2))),128))]),D("div",Te,S(ta.value.description),1),D("div",Ve,[(U(!0),E(j,null,$(ta.value.attributes,e=>(U(),E("div",{key:e.label,class:"flex items-center attribute-item"},[D("div",Le,[D("img",{src:e.icon,alt:e.label,class:"w-6 h-6 object-contain"},null,8,Me)]),D("div",Pe,[D("div",ze,S(e.label),1),D("div",$e,S(e.value),1)])]))),128))]),D("div",Oe,[(U(!0),E(j,null,$(ta.value.tags,e=>(U(),E("span",{key:e,class:"px-3 py-1 bg-[#26262C] rounded-full text-sm text-white mr-2 mb-2"},S(e),1))),128))])]),D("div",Fe,[D("button",{class:"flex-1 py-3 rounded-[10px] font-semibold hover:opacity-90 mr-4 text-[16px] text-white custom-gradient text-center",onClick:na},S(z(ne)("characterDetail.chatToMe")),1),D("button",{class:M(["px-6 py-3 rounded-xl font-semibold border transition-colors mr-4 text-[16px] text-center",ue.value?"bg-[#757577] text-white border-[#757577]":"bg-white text-gray-900 border-gray-300 hover:bg-gray-100"]),onClick:t[1]||(t[1]=e=>sa("collect"))},S(ue.value?z(ne)("characterDetail.collected"):z(ne)("characterDetail.collect")),3),D("button",{class:"px-6 py-3 bg-[transparent] text-white rounded-xl font-semibold border border-[rgba(255,255,255,0.3)] hover:opacity-80 transition-colors text-[16px] text-center",onClick:ca},S(z(ne)("characterDetail.share")),1)])])])),ve.value?A("",!0):(U(),E("div",qe,[D("div",Be,S(z(ne)("characterDetail.gallery")),1),me.value&&me.value.length>0?(U(),E("div",He,[(U(!0),E(j,null,$(me.value,(e,a)=>(U(),E("div",{key:e.id,class:"gallery-item"},["video"===e.mediaType?(U(),L(he,{key:0,"video-id":e.videoId,"video-url":e.videoUrl,title:e.title,money:e.videoMoney||0,unlocked:e.videoEnableView||!1,"bot-id":Number(se.value),onUnlockSuccess:aa},null,8,["video-id","video-url","title","money","unlocked","bot-id"])):(U(),E("div",{key:1,onClick:l=>(async(e,a)=>{if("video"!==e.mediaType)if(e.enableView){const e=me.value.slice(0,a+1).filter(e=>"image"===e.mediaType&&e.enableView).length-1;Ke.value=fe.value,ea.value=e,Je.value=!0}else{if(!pe())return;try{await ae.getUserInfo();if((Number(ae.userInfo.diamondCount)||0)>=(Number(e.money)||0))try{return await n.unlockPhoto(e.id,Number(se.value)),await ae.getUserInfo(),r("album_photo_pay_success",{photoId:e.id,money:e.money}),s.success(ne("dialogPhotoUnlock.unlockSuccess")),void(await da())}catch(l){return r("album_photo_pay_fail",{photoId:e.id,money:e.money}),void s.error(ne("dialogPhotoUnlock.unlockFailed"))}}catch(l){}K.setPhotoUnlockData({photoId:e.id,photoUrl:e.url,money:e.money,source:"album",botId:Number(se.value)})}})(e,a),class:"rounded-xl overflow-hidden bg-[rgb(38,38,41)] transition-opacity relative aspect-[9/16] cursor-pointer"},[T(v,{id:e.id,src:e.url,alt:e.title||"Gallery image",watermark:!1,class:M(["w-full h-full object-cover",{"blur-xl":!e.enableView}])},null,8,["id","src","alt","class"]),e.enableView?A("",!0):(U(),E("div",We,[t[4]||(t[4]=D("div",{class:"w-[32px] h-[32px] mb-2"},[D("img",{src:H,class:"w-full h-full object-contain",alt:"locked"})],-1)),D("div",Qe,[D("img",{src:re.value,alt:"diamond",class:"w-[14px] h-[14px] object-cover"},null,8,Ye),D("span",Xe,S(e.money),1)])]))],8,Ge))]))),128))])):(U(),E("div",Ze,[T(J)]))]))]),T(W,{visible:z(K).showPhotoUnlockDialog,onClosed:va,onUnlockSuccess:pa},null,8,["visible"]),T(Q,{visible:z(K).showVideoUnlockDialog,onClosed:la},null,8,["visible"]),T(Y,{show:Je.value,"url-list":Ke.value,"initial-index":ea.value,"hide-on-click-modal":!0,onClose:t[2]||(t[2]=e=>Je.value=!1)},null,8,["show","url-list","initial-index"])])}}}),[["__scopeId","data-v-3f765e20"]]);export{Je as default};