import"./dayjs-919e6097.js";import{bh as d,bi as s}from"./index-1f7267da.js";const g=(e=!1)=>e?`gb_${new Date().getTime()}/`:"",r=d({requestOptions:{apiUrl:()=>s("gb28181"),isDeconstructionData:!1}});function i(e){return r.get({url:"/list",params:e})}function p(e){return r.get({url:`/devices/${e}/sync`})}function f({id:e,customChannelName:t,customChannelId:a}){return r.post({url:`/channel/update/${e}`,data:{customChannelName:t,customChannelId:a}})}function m(e){return r.post({url:"/device/update",data:e})}function h(e){return r.post({url:`/device/remove/${e}`})}function M(e){return r.get({url:`/ptz/${e.deviceId}/${e.channelId}`,params:{ptzcmd:e.ptzcmd}},{errorMessageMode:"message"})}function $(e){return r.get({url:`/records/${e.deviceId}/${e.channelId}`,params:{start:e.start,end:e.end}},{errorMessageMode:"message"})}function v(e){return r.get({url:`/groups/${e}`},{errorMessageMode:"message"})}function b({name:e,pid:t}){return r.post({url:"/groups/add",data:{pid:t,name:e}},{errorMessageMode:"message"})}function C({name:e,pid:t,id:a}){return r.post({url:"/groups/update",data:{pid:t,name:e,id:a}},{errorMessageMode:"message"})}function P(e){return r.post({url:`/groups/delete/${e}`})}function I(e,t){return r.get({url:`/groups/${e}/channels`,params:t},{errorMessageMode:"message"})}function w({groupId:e,channelIds:t}){return r.post({url:`/groups/channel/add/${e}`,data:t},{errorMessageMode:"message"})}function D(e){const{deviceId:t,start:a,end:n,count:o,page:u}=e;return r.get({url:`/alarms/${t}`,params:{count:o,page:u,start:a,end:n}},{errorMessageMode:"message"})}function k(e){return r.get({url:"/platform/list",params:e},{errorMessageMode:"message"})}function y(e){return r.post({url:"/platform/add",data:e},{errorMessageMode:"message"})}function G(e){return r.post({url:"/platform/update",data:e},{errorMessageMode:"message"})}function U(){return r.get({url:"/server/config"})}function B(e){return r.post({url:`/platform/remove/${e}`},{errorMessageMode:"message"})}function S(e){return r.get({url:`/download/${e.deviceId}/${e.channelId}`,params:{start:e.start,end:e.end,downloadSpeed:e.downloadSpeed||4}},{errorMessageMode:"none"})}function z(e){return r.get({url:`/download/progress/${e}`},{errorMessageMode:"none"})}function x(e){return r.get({url:"/channel/list",params:e})}function A(e,t){return r.get({url:`/platform/${e}/channels`,params:t})}function L(e,t){return r.post({url:`/platform/${e}/channel/share`,data:{platformId:e,id:t}})}function R(e,t){return r.post({url:`/platform/${e}/channel/remove`,data:{platformId:e,id:t}})}function q(e){return r.post({url:"/channel/add",data:e},{errorMessageMode:"message"})}function N(e){const t={deviceId:e.deviceId,channelId:e.channelId,customChannelId:e.customChannelId,name:e.channelName,customChannelName:e.customChannelName,streamPath:e.streamPath};return r.post({url:`/channel/update/${e.id}`,data:t},{errorMessageMode:"message"})}function T(e){return r.post({url:`/channel/delete/${e}`},{errorMessageMode:"message"})}function j(e){return r.get({url:"/playback/pause?streamPath="+e})}function E(e){return r.get({url:"/playback/resume?streamPath="+e})}function F(e,t){return r.get({url:"/playback/speed?streamPath="+e+"&speed="+t})}function H(e){return r.post({url:"/broadcast/start",data:e,timeout:3e4},{errorMessageMode:"none",isTransformResponse:!1})}function O(e){return r.post({url:"/broadcast/stop",data:e},{errorMessageMode:"none",isTransformResponse:!1})}function W(){return`${s("gb28181").replace(/^http/,"ws")}/talk/start`}export{x as A,E as B,j as C,F as D,H as E,W as F,g as G,O as H,v as I,f as a,i as b,z as c,h as d,$ as e,b as f,D as g,C as h,I as i,w as j,P as k,M as l,y as m,G as n,L as o,R as p,A as q,p as r,S as s,U as t,m as u,B as v,k as w,q as x,N as y,T as z}; //# sourceMappingURL=gb28181-59fe2452.js.map