var O=Object.defineProperty,R=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var V=(t,s,o)=>s in t?O(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o,b=(t,s)=>{for(var o in s||(s={}))I.call(s,o)&&V(t,o,s[o]);if(C)for(var o of C(s))j.call(s,o)&&V(t,o,s[o]);return t},x=(t,s)=>R(t,S(s));var w=(t,s,o)=>new Promise((_,d)=>{var v=e=>{try{i(o.next(e))}catch(n){d(n)}},u=e=>{try{i(o.throw(e))}catch(n){d(n)}},i=e=>e.done?_(e.value):Promise.resolve(e.value).then(v,u);i((o=o.apply(t,s)).next())});import{d as q,q as z,r as m,e as J,aA as K,an as P,_ as G,P as p,o as c,i as y,s as f,h as a,t as $,f as g,m as k,F,S as B,k as T,aw as H}from"./index.600742c0.js";import{Dropdown as Q,Menu as M}from"ant-design-vue";import{n as U,o as W}from"./other.a0e0a1bb.js";import X from"./Box.a0684c06.js";import Y from"./VideoFlv.994a68d0.js";import{D as Z}from"./DownOutlined.518604fa.js";import"./LinkModal.f5be8bd4.js";import"./model-close-icon.706a0490.js";var L="/assets/v01.fb45fe6a.png",tt="/assets/v02.5305abb9.png",et="/assets/v03.03878ed0.png";const ot=q({components:{Box:X,Dropdown:Q,DownOutlined:Z,Menu:M,MenuItem:M.Item,VideoFlv:Y},setup(){const t=z({tabList:m([]),currentTab:m(""),list:m([])}),s=m(null),o=m(null),_=J(()=>{var e,n;return(n=(e=t.tabList.find(l=>l.id==t.currentTab))==null?void 0:e.name)!=null?n:""});function d({key:e}){t.currentTab!=e&&(t.currentTab=e,u())}function v(){return w(this,null,function*(){const e=yield U({device_type:1});t.tabList=e,e.length&&(t.currentTab=e[0].id),u()})}function u(){return w(this,null,function*(){const e=yield W({base:t.currentTab,type:1,status:1});t.list=e.map((n,l)=>{const{username:h,passage:r,ip:D,port:A,rtsp_url:E}=n.extends,N=`rtsp://${h}:${r}@${D}:${A}${E}`;return x(b({},n),{img:l==0?L:l==1?tt:l==2?et:L,url:`ws://127.0.0.1:8100/rtsp?url=${window.btoa(N)}`})}),t.list.length>0&&(o.value=t.list[0])})}function i(e){o.value=e}return K(()=>{v()}),x(b({onChangeVideo:i,currentVido:o},P(t)),{chartRef:s,currentTabValue:_,onMenuClick:d})}}),st={class:"h-full flex flex-col"},nt={class:"py-10px relative"},at={class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-14px font-bold"},rt={key:0,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},it={class:"cursor-pointer"},lt=a("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),ct={class:"flex-1 px-11px flex flex-col"},ut={class:"flex-1"},pt={class:"grid grid-cols-3 gap-x-6px my-10px"},dt=["src","onClick"];function mt(t,s,o,_,d,v){const u=p("DownOutlined"),i=p("menu-item"),e=p("Menu"),n=p("Dropdown"),l=p("VideoFlv"),h=p("Box");return c(),y(h,{title:"\u76D1\u63A7"},{default:f(()=>[a("div",st,[a("div",nt,[a("div",at,$(t.currentTabValue),1),t.tabList.length>1?(c(),g("div",rt,[k(n,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:f(()=>[k(e,{onClick:t.onMenuClick},{default:f(()=>[(c(!0),g(F,null,B(t.tabList,r=>(c(),y(i,{key:r.key},{default:f(()=>[a("div",null,$(r.value),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:f(()=>[a("div",it,[lt,k(u,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):T("",!0)]),a("div",ct,[a("div",ut,[t.currentVido?(c(),y(l,{key:0,url:t.currentVido.url,name:t.currentVido.base_name},null,8,["url","name"])):T("",!0)]),a("div",pt,[(c(!0),g(F,null,B(t.list,r=>(c(),g("div",{class:"h-66px",key:r.id},[a("img",{src:r.img,class:"object-cover w-full h-full",alt:"",srcset:"",onClick:H(D=>t.onChangeVideo(r),["prevent","stop"])},null,8,dt)]))),128))])])])]),_:1})}var kt=G(ot,[["render",mt]]);export{kt as default};