import{u as v,b as g}from"./vue-router-7f882520.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{d as a}from"./dayjs-4460abc8.js";import{M as s}from"./open-im-sdk-wasm-f19f04ec.js";import{_ as y}from"./NomalMessageItem.vue_vue_type_script_setup_true_lang-5a7638a5.js";import{v as h,_ as D}from"./index-ae60edf9.js";import{d as x,b as Y,o as n,c,$ as T,a as l,aX as S,u as k,F as B,aI as w,O as C}from"./@vue-cb50a1c4.js";import{s as I}from"./function-call-5bab1da7.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";import"./@amap-aca98dec.js";import"./vue-i18n-90d534a9.js";import"./@intlify-1c0af683.js";import"./pinia-de4079f2.js";import"./axios-7d5a0a64.js";import"./form-data-497f8b5e.js";import"./uuid-a960c1f4.js";import"./date-fns-f56f60e6.js";import"./@babel-7fd5df1e.js";import"./mitt-f7ef348c.js";import"./@vueuse-19adab01.js";import"./livekit-client-ca552de3.js";import"./@livekit-3058dbe8.js";import"./loglevel-e40a507a.js";import"./rxjs-2154ddb2.js";import"./tslib-8dbab242.js";import"./@vuemap-5ebdc63e.js";import"./lodash-es-91418b19.js";const N={class:"page_container"},$={class:"pt-4 pb-1 text-center text-xs text-[#999]"},E={class:"flex-1 overflow-y-auto"},O=x({__name:"index",setup(J){const m=v(),u=h(),t=Y(JSON.parse(history.state.mergeData)),i=t.value.multiMessage[0].sendTime,p=t.value.multiMessage[t.value.multiMessage.length-1].sendTime,d=a(i).isSame(p,"day")?a(i).format("YYYY/M/D"):`${a(i).format("YYYY/M.D")}-${a(p).format("YYYY/M/D")}`;g((e,r,o)=>{setTimeout(()=>{t.value=JSON.parse(history.state.mergeData)}),o()});const _=e=>{if(e.contentType===s.VideoMessage&&m.push({path:"/previewVideo",query:{url:e.videoElem.videoUrl,poster:e.videoElem.snapshotUrl}}),e.contentType===s.PictureMessage&&I({images:[e.pictureElem.sourcePicture.url],loop:!1}),e.contentType===s.CardMessage){let r={};try{r=JSON.parse(e.content)}catch{return}u.getUserCardData(r.userID)}e.contentType===s.MergeMessage&&m.push({path:"/previewMergeMessage/"+Date.now(),state:{mergeData:JSON.stringify(e.mergeElem)}})};return(e,r)=>(n(),c("div",N,[T(M,{title:t.value.title},null,8,["title"]),l("div",$,S(k(d)),1),l("div",E,[(n(!0),c(B,null,w(t.value.multiMessage,(o,f)=>(n(),C(y,{key:o.clientMsgID,source:o,onClick:U=>_(o),noBorder:f===t.value.multiMessage.length-1},null,8,["source","onClick","noBorder"]))),128))])]))}});const le=D(O,[["__scopeId","data-v-a4d36d73"]]);export{le as default};
