diff --git a/.gitignore b/.gitignore index 99b45a6..1f94965 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -.vscode -rtsp2rtmp* __debug_bin -output/rtsp2rtmp* -output/live/*.flv -output/log/*.log +lastupdate.tmp +resources/output/live/*.flv +resources/output/log/*.log +resources/output/releases +.idea +.vscode diff --git a/LICENSE b/LICENSE index c9b19a0..4e170cf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 yumrano +Copyright (c) 2021 hkmadao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0471be2..14bee78 100644 --- a/README.md +++ b/README.md @@ -3,22 +3,25 @@ ![](./docs/images/rtsp2rtmpad.png) ##### 项目功能: - 1. rtsp转httpflv播放 2. rtsp转rtmp推送 3. rtsp视频录像,录像文件为flv格式 + ##### 运行说明: 1. 下载[程序文件](https://github.com/hkmadao/rtsp2rtmp/releases),解压 -2. 执行程序文件:window下执行rtsp2rtmp.exe,linux下执行rtsp2rtmp -3. 浏览器访问程序服务地址:http://[server_ip]:8080/ -4. 在网页配置摄像头的rtsp地址、要推送到的rtmp服务器地址等信息 -5. 配置好后重启服务器 -6. 再次进入网页观看视频 +2. 安装postgresql,根据配置文件"resources/conf/conf-prod.yml"创建数据库 +3. 根据"docs/init/rtsp2rtmp-postgresql.sql"文件创建表 +4. 执行程序文件:window下执行rtsp2rtmp.exe,linux下执行rtsp2rtmp +5. 浏览器访问程序服务地址:http://[server_ip]:8080/rtsp2rtmp/#/ ,根据配置文件"resources/conf/conf-prod.yml"密码登录系统 +6. 在网页配置摄像头的rtsp地址、要推送到的rtmp服务器地址等信息 +7. 等待连接上摄像头,约30秒左右,观看视频 > 注意: > +> 若只想查看项目功能,可下载带_demo结尾的版本,该版本为window64的演示版本,使用的是sqlite3数据库,无需安装数据库即可运行 +> > ​ 程序目前支持h264视频编码、aac音频编码,若不能正常播放,关掉摄像头推送的音频再尝试 ##### 目录结构: @@ -26,40 +29,51 @@ ``` --rtsp2rtmp #linux执行文件 --rtsp2rtmp.exe #window执行文件 - --statics #程序的网页文件夹 - --conf #配置文件文件夹 - --conf.yml #配置文件 - --db #sqlite3 #数据库文件夹 - --rtsp2rtmp.db #sqlite3数据库文件(存放摄像头的url、推送的rtmp服务器地址等信息) - --output #程序输出文件夹 - --live #保存摄像头录像的文件夹,录像格式为flv - --log #程序输出的日志文件夹 + --resources + --static #程序的网页文件夹 + --conf #配置文件文件夹 + --conf-dev.yml #配置文件 + --conf-prod.yml #配置文件 + --output #程序输出文件夹 + --live #保存摄像头录像的文件夹,录像格式为flv + --log #程序输出的日志文件夹 ``` ##### 配置说明: ``` server: + user: + name: admin #网页登录用户名 + password: admin #网页登录密码 httpflv: - port: 8080 #程序的http端口 + port: 8080 + static: + path: ./resources/static #页面所在文件夹 fileflv: - save: true #是否保存录像文件 - path: ./output/live #录像文件夹 + path: ./resources/output/live #录像所在文件夹 log: - path: ./output/log #日志文件夹 - + path: ./resources/output/log #日志所在文件夹 + level: 6 #1-7 7输出的信息最多 + database: + driver-type: 4 #数据库类型 + driver: postgres #数据库驱动 + url: user=postgres password=123456 dbname=rtsp2rtmp host=localhost port=5432 sslmode=disable TimeZone=UTC #数据库url + show-sql: false #是否打印sql ``` ##### 开发说明: -程序分为服务器和页面,服务端采用golang开发,前端采用react+materia-ui,完成后编译页面文件放入服务器的statics文件夹 +程序分为服务器和页面,服务端采用golang开发,前端采用react+materia-ui,完成后编译页面文件放入服务器的resources/static文件夹,或者修改配置文件页面所在文件夹的路径 ###### 服务器开发说明: -1. 安装golang,MinGW(sqlite3模块的使用到的cgo,window下开发需要使用,window下可选择安装MinGW) +1. 安装golang 2. 获取[服务器源码](https://github.com/hkmadao/rtsp2rtmp.git) -3. 进入项目目录 -4. go build开发 +3. 安装postgresql数据库,根据配置文件"resources/conf/conf-prod.yml"创建数据库 +4. 根据"docs/init/rtsp2rtmp-postgresql.sql"文件创建表 +5. 进入项目目录 +6. go build开发 ###### 页面开发说明: diff --git a/app/task.go b/app/task.go deleted file mode 100644 index b4b0abf..0000000 --- a/app/task.go +++ /dev/null @@ -1,44 +0,0 @@ -package app - -import ( - "runtime/debug" - "time" - - "github.com/beego/beego/v2/core/logs" - "github.com/yumrano/rtsp2rtmp/models" - "github.com/yumrano/rtsp2rtmp/server" -) - -type task struct { -} - -func NewTask() *task { - t := &task{} - go t.offlineCamera() - return t -} - -func (t *task) offlineCamera() { - defer func() { - if r := recover(); r != nil { - logs.Error("system painc : %v \nstack : %v", r, string(debug.Stack())) - } - }() - for { - css, err := models.CameraSelectAll() - if err != nil { - logs.Error("query camera error : %v", err) - } - for _, cs := range css { - if cs.OnlineStatus != 1 { - continue - } - exist := server.ExistCamera(cs.Code) - if !exist { - cs.OnlineStatus = 0 - models.CameraUpdate(cs) - } - } - <-time.After(10 * time.Minute) - } -} diff --git a/app/web.go b/app/web.go deleted file mode 100644 index 470f7f5..0000000 --- a/app/web.go +++ /dev/null @@ -1,259 +0,0 @@ -package app - -import ( - "net" - "net/http" - "strconv" - - "github.com/beego/beego/v2/core/config" - "github.com/beego/beego/v2/core/logs" - "github.com/yumrano/rtsp2rtmp/controllers" -) - -func ServeHTTP() error { - defer func() { - if r := recover(); r != nil { - logs.Error("httpflv ServeHTTP panic %v", r) - } - }() - port, err := config.Int("server.httpflv.port") - if err != nil { - logs.Error("get httpflv port error: %v. \n use default port : 8080", err) - port = 8080 - } - httpflvAddr := ":" + strconv.Itoa(port) - flvListen, err := net.Listen("tcp", httpflvAddr) - if err != nil { - logs.Error("%v", err) - } - - mux := http.NewServeMux() - mux.HandleFunc("/live/", controllers.Live) - mux.HandleFunc("/camera/list", controllers.CameraList) - mux.HandleFunc("/camera/edit", controllers.CameraEdit) - mux.HandleFunc("/camera/delete", controllers.CameraDelete) - mux.HandleFunc("/camera/enabled", controllers.CameraEnabled) - mux.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("static")))) - if err := http.Serve(flvListen, mux); err != nil { - return err - } - return nil -} - -// func cameraAll(w http.ResponseWriter, r *http.Request) { -// w.Header().Set("Access-Control-Allow-Origin", "*") -// result := make(map[string]interface{}) -// result["code"] = 1 -// result["msg"] = "" -// es, err := models.CameraSelectAll() -// if err != nil { -// logs.Error("get camera list error : %v", err) -// result["code"] = 0 -// result["msg"] = "" -// result["data"] = "{}" -// rbytes, err := json.Marshal(result) -// if err != nil { -// logs.Error("parse json camera list error : %v", err) -// w.Write([]byte("{}")) -// return -// } -// w.Write(rbytes) -// return -// } - -// data := make(map[string]interface{}) -// data["total"] = len(es) -// data["page"] = es -// result["data"] = data -// rbytes, err := json.Marshal(result) -// if err != nil { -// logs.Error("parse json camera list error : %v", err) -// w.Write([]byte("{}")) -// return -// } -// w.Write(rbytes) -// } - -// func cameraEdit(w http.ResponseWriter, r *http.Request) { -// w.Header().Set("Access-Control-Allow-Origin", "*") -// if r.Method == "OPTIONS" { -// w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS") -// w.Header().Set("Access-Control-Allow-Headers", "X-PINGOTHER, Content-Type") -// w.Write([]byte("{}")) -// return -// } -// result := make(map[string]interface{}) -// result["code"] = 1 -// result["msg"] = "" - -// var param map[string]interface{} -// body, err := ioutil.ReadAll(r.Body) -// if err != nil { -// logs.Error("read param error : %v", err) -// } -// logs.Error("%s", r.Method) -// err = json.Unmarshal(body, ¶m) -// if err != nil { -// logs.Error("parse param to json error : %v", err) -// } -// if param["id"] == nil { -// param["id"] = "" -// } -// e := models.Camera{ -// Id: param["id"].(string), -// Code: param["code"].(string), -// RtspURL: param["rtspURL"].(string), -// RtmpURL: param["rtmpURL"].(string), -// AuthCode: param["authCode"].(string), -// } -// var data int64 -// if e.Id == "" { -// count, err := models.CameraCountByCode(e.Code) -// if err != nil || count > 0 { -// logs.Error("check code is exist camera error : %v", err) -// result["code"] = 0 -// result["msg"] = "code exist !" -// result["data"] = "{}" -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// return -// } -// e.Id = time.Now().Format("20060102150405") -// _, err = models.CameraInsert(e) -// if err != nil { -// logs.Error("insert camera error : %v", err) -// result["code"] = 0 -// result["msg"] = "insert camera error !" -// result["data"] = "{}" -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// return -// } -// } else { -// count, err := models.CameraCountByCode(e.Code) -// if err != nil || count > 1 { -// logs.Error("get camera list error : %v", err) -// result["code"] = 0 -// result["msg"] = "code exist !" -// result["data"] = "{}" -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// return -// } -// _, err = models.CameraUpdate(e) -// if err != nil { -// logs.Error("update camera error : %v", err) -// result["code"] = 0 -// result["msg"] = "update camera error !" -// result["data"] = "{}" -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// return -// } -// } - -// result["data"] = data -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// } - -// func cameraDelete(w http.ResponseWriter, r *http.Request) { -// w.Header().Set("Access-Control-Allow-Origin", "*") -// if r.Method == "OPTIONS" { -// w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS") -// w.Header().Set("Access-Control-Allow-Headers", "X-PINGOTHER, Content-Type") -// w.Write([]byte("{}")) -// return -// } -// result := make(map[string]interface{}) -// result["code"] = 1 -// result["msg"] = "" - -// var param map[string]interface{} -// body, err := ioutil.ReadAll(r.Body) -// if err != nil { -// logs.Error("read param error : %v", err) -// } -// logs.Error("%s", r.Method) -// err = json.Unmarshal(body, ¶m) -// if err != nil { -// logs.Error("parse param to json error : %v", err) -// } -// e := models.Camera{Id: param["id"].(string)} -// data, err := models.CameraDelete(e) -// if err != nil { -// logs.Error("delete camera error : %v", err) -// result["code"] = 0 -// result["msg"] = "delete camera error !" -// result["data"] = "{}" -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// return -// } - -// result["data"] = data -// rbytes, _ := json.Marshal(result) -// w.Write(rbytes) -// } - -// func reciver(w http.ResponseWriter, req *http.Request) { -// w.Header().Set("Access-Control-Allow-Origin", "*") -// r := result.Result{ -// Code: 1, -// Msg: "", -// } -// uri := strings.TrimSuffix(strings.TrimLeft(req.RequestURI, "/"), ".flv") -// uris := strings.Split(uri, "/") -// if len(uris) < 2 || uris[0] != "live" { -// http.Error(w, "invalid path", http.StatusBadRequest) -// return -// } -// code := uris[1] -// logs.Info("player [%s] addr [%s] connecting", code, req.RemoteAddr) -// //管理员可以主动中断播放 -// endStream, heartbeatStream, _, err := httpflv.AddHttpFlvPlayer(code, w) -// if err != nil { -// logs.Error("camera [%s] add player error : %s", code) -// r.Code = 0 -// r.Msg = "add player error" -// rbytes, _ := json.Marshal(r) -// w.Write(rbytes) -// return -// } -// Loop: -// for { -// select { -// case <-endStream: -// break Loop -// case <-heartbeatStream: -// continue -// case <-time.After(10 * time.Second): -// logs.Info("player [%s] addr [%s] timeout exit", code, req.RemoteAddr) -// break Loop -// } -// } -// logs.Info("player [%s] addr [%s] exit", code, req.RemoteAddr) -// } - -// func ServeHTTP() { -// router := gin.Default() -// router.GET("/recive", reciver) -// port, err := conf.GetInt("server.httpflv.port") -// if err != nil { -// logs.Error("get httpflv port error: %v. \n use default port : 8080", err) -// port = 8080 -// } -// err = router.Run(":" + strconv.Itoa(port)) -// if err != nil { -// rlog.Log.Fatalln("Start HTTP Server error", err) -// } -// } -// func reciver(c *gin.Context) { -// c.Header("Access-Control-Allow-Origin", "*") -// fw := &FlvResponseWriter{ -// Key: "1", -// IsStart: false, -// writer: c.Writer, -// } -// httpFlvWriter.FlvResponseWriters["1"] = fw -// } diff --git a/build.bat b/build.bat index 8739941..fd6a377 100644 --- a/build.bat +++ b/build.bat @@ -2,47 +2,56 @@ chcp 65001 set /p ver=请输入版本: echo 版本:%ver% 打包开始 -@REM window_amd64 -@REM SET GOOS=windows -@REM SET GOARCH=amd64 -SET CGO_ENABLED=1 -go build -o rtsp2rtmp_%ver%_window_amd64.exe main.go +rmdir /S /Q .\resources\output\releases +@REM windows_amd64 +echo 打包windows_amd64平台 +SET GOOS=windows +SET GOARCH=amd64 +SET CGO_ENABLED=0 +go build -o .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\rtsp2rtmp.exe main.go +echo =============%GOOS%_%GOARCH% +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\output\live +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\output\log +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\conf -@REM window_amd64 -@REM rmdir /S /Q .\output\rtsp2rtmp_%ver%_window_amd64 +xcopy /S /Y /E .\resources\static .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\static\ +xcopy /S /Y /E .\resources\conf .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\conf +cd .\resources\output\releases\ +7z a -ttar -so rtsp2rtmp_%ver%_%GOOS%_%GOARCH%.tar rtsp2rtmp_%ver%_%GOOS%_%GOARCH%/ | 7z a -si rtsp2rtmp_%ver%_%GOOS%_%GOARCH%.tar.gz +cd ..\..\..\ -@REM md .\output\rtsp2rtmp_%ver%_window_amd64\output\live -@REM md .\output\rtsp2rtmp_%ver%_window_amd64\output\log -@REM md .\output\rtsp2rtmp_%ver%_window_amd64\conf +@REM linux_amd64 +echo 打包linux_amd64平台 +SET GOOS=linux +SET GOARCH=amd64 +SET CGO_ENABLED=0 +go build -o .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\rtsp2rtmp main.go +echo =============%GOOS%_%GOARCH% +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\output\live +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\output\log +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\conf -@REM xcopy /S /Y /E .\static .\output\rtsp2rtmp_%ver%_window_amd64\static\ -@REM xcopy /S /Y /E .\db .\output\rtsp2rtmp_%ver%_window_amd64\db\ -@REM xcopy .\conf\conf.yml .\output\rtsp2rtmp_%ver%_window_amd64\conf -@REM xcopy .\rtsp2rtmp_%ver%_window_amd64.exe .\output\rtsp2rtmp_%ver%_window_amd64\rtsp2rtmp.exe -@REM xcopy .\start.vbs .\output\rtsp2rtmp_%ver%_window_amd64\start.vbs +xcopy /S /Y /E .\resources\static .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\static\ +xcopy /S /Y /E .\resources\conf .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\conf +cd .\resources\output\releases\ +7z a -ttar -so rtsp2rtmp_%ver%_%GOOS%_%GOARCH%.tar rtsp2rtmp_%ver%_%GOOS%_%GOARCH%/ | 7z a -si rtsp2rtmp_%ver%_%GOOS%_%GOARCH%.tar.gz +cd ..\..\..\ -@REM linux_adm64 -@REM rmdir /S /Q .\output\rtsp2rtmp_%ver%_linux_amd64 +@REM linux_arm +echo 打包linux_arm平台 +SET GOOS=linux +SET GOARCH=arm +SET CGO_ENABLED=0 +go build -o .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\rtsp2rtmp main.go +echo =============%GOOS%_%GOARCH% +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\output\live +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\output\log +md .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\conf -@REM md .\output\rtsp2rtmp_%ver%_linux_amd64\output\live -@REM md .\output\rtsp2rtmp_%ver%_linux_amd64\output\log -@REM md .\output\rtsp2rtmp_%ver%_linux_amd64\conf - -@REM xcopy /S /Y /E .\static .\output\rtsp2rtmp_%ver%_linux_amd64\static\ -@REM xcopy /S /Y /E .\db .\output\rtsp2rtmp_%ver%_linux_amd64\db\ -@REM xcopy .\conf\conf.yml .\output\rtsp2rtmp_%ver%_linux_amd64\conf -@REM xcopy .\rtsp2rtmp_%ver%_linux_amd64 .\output\rtsp2rtmp_%ver%_linux_amd64\rtsp2rtmp - -@REM linux_armv6 -@REM rmdir /S /Q .\output\rtsp2rtmp_%ver%_linux_armv6 - -@REM md .\output\rtsp2rtmp_%ver%_linux_armv6\output\live -@REM md .\output\rtsp2rtmp_%ver%_linux_armv6\output\log -@REM md .\output\rtsp2rtmp_%ver%_linux_armv6\conf - -@REM xcopy /S /Y /E .\static .\output\rtsp2rtmp_%ver%_linux_armv6\static\ -@REM xcopy /S /Y /E .\db .\output\rtsp2rtmp_%ver%_linux_armv6\db\ -@REM xcopy .\conf\conf.yml .\output\rtsp2rtmp_%ver%_linux_armv6\conf -@REM xcopy .\rtsp2rtmp_%ver%_linux_armv6 .\output\rtsp2rtmp_%ver%_linux_armv6\rtsp2rtmp +xcopy /S /Y /E .\resources\static .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\static\ +xcopy /S /Y /E .\resources\conf .\resources\output\releases\rtsp2rtmp_%ver%_%GOOS%_%GOARCH%\resources\conf +cd .\resources\output\releases\ +7z a -ttar -so rtsp2rtmp_%ver%_%GOOS%_%GOARCH%.tar rtsp2rtmp_%ver%_%GOOS%_%GOARCH%/ | 7z a -si rtsp2rtmp_%ver%_%GOOS%_%GOARCH%.tar.gz +cd ..\..\..\ pause \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..e9602a7 --- /dev/null +++ b/build.sh @@ -0,0 +1,39 @@ +#!/bin/bash +#./build.sh 0.0.1 +ver=$1 +if [ -n "${ver}" ]; then + echo package version "${ver}" +else + echo no version param + exit 1 +fi +#打多个平台的包 +platforms="windows_amd64 linux_amd64 linux_arm" +rm -rf ./resources/output/releases/ +for platform in $platforms; do + + export GOOS=$(echo "$platform" | gawk 'BEGIN{FS="_"} {print $1}') + export GOARCH=$(echo "$platform" | gawk 'BEGIN{FS="_"} {print $2}') + export CGO_ENABLED=0 + echo "${GOOS}"_"${GOARCH}" + if [[ "${GOOS}" == "windows" ]]; then + go build -o ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/rtsp2rtmp.exe main.go + else + go build -o ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/rtsp2rtmp main.go + fi + go build -o ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/rtsp2rtmp main.go + + mkdir -p ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/resources/output/live + mkdir -p ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/resources/output/log + mkdir -p ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/resources/conf + + cp -r ./resources/static ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/resources/static/ + cp -r ./resources/conf ./resources/output/releases/rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/resources/conf + + cd ./resources/output/releases/ || exit + rm -rf rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}".tar.gz + tar -zcvf ./rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}".tar.gz rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/ + + # rm -rf ./rtsp2rtmp_"${ver}"_"${GOOS}"_"${GOARCH}"/ + cd ../../../ +done diff --git a/build_linux_amd64.sh b/build_linux_amd64.sh deleted file mode 100644 index bf6ade9..0000000 --- a/build_linux_amd64.sh +++ /dev/null @@ -1,66 +0,0 @@ -#/bin/bash -ver=$1 -if [ -n "${ver}" ] -then - echo package version ${ver} -else - echo no version param - exit 1 -fi -# Linux -# export GOOS=linux -# export GOARCH=amd64 -export CGO_ENABLED=1 -go build -o rtsp2rtmp_${ver}_linux_amd64 main.go - -# Windows -# export GOOS=windows -# export GOARCH=amd64 -# export CGO_ENABLED=1 -# go build -o rtsp2rtmp.exe main.go - -#package linux_amd64 -rm -rf ./output/rtsp2rtmp_${ver}_linux_amd64 - -mkdir -p ./output/rtsp2rtmp_${ver}_linux_amd64/output/live -mkdir -p ./output/rtsp2rtmp_${ver}_linux_amd64/output/log -mkdir -p ./output/rtsp2rtmp_${ver}_linux_amd64/conf - -cp -r ./static ./output/rtsp2rtmp_${ver}_linux_amd64/static/ -cp -r ./db ./output/rtsp2rtmp_${ver}_linux_amd64/db/ -cp -r ./conf/conf.yml ./output/rtsp2rtmp_${ver}_linux_amd64/conf -cp -r ./rtsp2rtmp_${ver}_linux_amd64 ./output/rtsp2rtmp_${ver}_linux_amd64/rtsp2rtmp - -#package linux_armv6 -rm -rf ./output/rtsp2rtmp_${ver}_linux_armv6 - -mkdir -p ./output/rtsp2rtmp_${ver}_linux_armv6/output/live -mkdir -p ./output/rtsp2rtmp_${ver}_linux_armv6/output/log -mkdir -p ./output/rtsp2rtmp_${ver}_linux_armv6/conf - -cp -r ./static ./output/rtsp2rtmp_${ver}_linux_armv6/static/ -cp -r ./db ./output/rtsp2rtmp_${ver}_linux_armv6/db/ -cp -r ./conf/conf.yml ./output/rtsp2rtmp_${ver}_linux_armv6/conf -cp -r ./rtsp2rtmp_${ver}_linux_armv6 ./output/rtsp2rtmp_${ver}_linux_armv6/rtsp2rtmp - -#package window_amd64 -rm -rf ./output/rtsp2rtmp_${ver}_window_amd64 - -mkdir -p ./output/rtsp2rtmp_${ver}_window_amd64/output/live -mkdir -p ./output/rtsp2rtmp_${ver}_window_amd64/output/log -mkdir -p ./output/rtsp2rtmp_${ver}_window_amd64/conf - -cp -r ./static ./output/rtsp2rtmp_${ver}_window_amd64/static/ -cp -r ./db ./output/rtsp2rtmp_${ver}_window_amd64/db/ -cp -r ./conf/conf.yml ./output/rtsp2rtmp_${ver}_window_amd64/conf -cp -r ./rtsp2rtmp_${ver}_window_amd64.exe ./output/rtsp2rtmp_${ver}_window_amd64/rtsp2rtmp.exe -cp -r ./start.vbs ./output/rtsp2rtmp_${ver}_window_amd64/start.vbs - -cd ./output/ -tar -zcvf ./rtsp2rtmp_${ver}_linux_amd64.tar.gz ./rtsp2rtmp_${ver}_linux_amd64/ -tar -zcvf ./rtsp2rtmp_${ver}_linux_armv6.tar.gz ./rtsp2rtmp_${ver}_linux_armv6/ -tar -zcvf ./rtsp2rtmp_${ver}_window_amd64.tar.gz ./rtsp2rtmp_${ver}_window_amd64/ - -rm -rf ./rtsp2rtmp_${ver}_linux_amd64/ -rm -rf ./rtsp2rtmp_${ver}_linux_armv6/ -rm -rf ./rtsp2rtmp_${ver}_window_amd64/ diff --git a/build_linux_armv6.sh b/build_linux_armv6.sh deleted file mode 100644 index 14fad53..0000000 --- a/build_linux_armv6.sh +++ /dev/null @@ -1,66 +0,0 @@ -#/bin/bash -ver=$1 -if [ -n "${ver}" ] -then - echo package version ${ver} -else - echo no version param - exit 1 -fi -# Linux -# export GOOS=linux -# export GOARCH=amd64 -export CGO_ENABLED=1 -go build -o rtsp2rtmp_${ver}_linux_armv6 main.go - -# Windows -# export GOOS=windows -# export GOARCH=amd64 -# export CGO_ENABLED=1 -# go build -o rtsp2rtmp.exe main.go - -#package linux_amd64 -rm -rf ./output/rtsp2rtmp_${ver}_linux_amd64 - -mkdir -p ./output/rtsp2rtmp_${ver}_linux_amd64/output/live -mkdir -p ./output/rtsp2rtmp_${ver}_linux_amd64/output/log -mkdir -p ./output/rtsp2rtmp_${ver}_linux_amd64/conf - -cp -r ./static ./output/rtsp2rtmp_${ver}_linux_amd64/static/ -cp -r ./db ./output/rtsp2rtmp_${ver}_linux_amd64/db/ -cp -r ./conf/conf.yml ./output/rtsp2rtmp_${ver}_linux_amd64/conf -cp -r ./rtsp2rtmp_${ver}_linux_amd64 ./output/rtsp2rtmp_${ver}_linux_amd64/rtsp2rtmp - -#package linux_armv6 -rm -rf ./output/rtsp2rtmp_${ver}_linux_armv6 - -mkdir -p ./output/rtsp2rtmp_${ver}_linux_armv6/output/live -mkdir -p ./output/rtsp2rtmp_${ver}_linux_armv6/output/log -mkdir -p ./output/rtsp2rtmp_${ver}_linux_armv6/conf - -cp -r ./static ./output/rtsp2rtmp_${ver}_linux_armv6/static/ -cp -r ./db ./output/rtsp2rtmp_${ver}_linux_armv6/db/ -cp -r ./conf/conf.yml ./output/rtsp2rtmp_${ver}_linux_armv6/conf -cp -r ./rtsp2rtmp_${ver}_linux_armv6 ./output/rtsp2rtmp_${ver}_linux_armv6/rtsp2rtmp - -#package window_amd64 -rm -rf ./output/rtsp2rtmp_${ver}_window_amd64 - -mkdir -p ./output/rtsp2rtmp_${ver}_window_amd64/output/live -mkdir -p ./output/rtsp2rtmp_${ver}_window_amd64/output/log -mkdir -p ./output/rtsp2rtmp_${ver}_window_amd64/conf - -cp -r ./static ./output/rtsp2rtmp_${ver}_window_amd64/static/ -cp -r ./db ./output/rtsp2rtmp_${ver}_window_amd64/db/ -cp -r ./conf/conf.yml ./output/rtsp2rtmp_${ver}_window_amd64/conf -cp -r ./rtsp2rtmp_${ver}_window_amd64.exe ./output/rtsp2rtmp_${ver}_window_amd64/rtsp2rtmp.exe -cp -r ./start.vbs ./output/rtsp2rtmp_${ver}_window_amd64/start.vbs - -cd ./output/ -tar -zcvf ./rtsp2rtmp_${ver}_linux_amd64.tar.gz ./rtsp2rtmp_${ver}_linux_amd64/ -tar -zcvf ./rtsp2rtmp_${ver}_linux_armv6.tar.gz ./rtsp2rtmp_${ver}_linux_armv6/ -tar -zcvf ./rtsp2rtmp_${ver}_window_amd64.tar.gz ./rtsp2rtmp_${ver}_window_amd64/ - -rm -rf ./rtsp2rtmp_${ver}_linux_amd64/ -rm -rf ./rtsp2rtmp_${ver}_linux_armv6/ -rm -rf ./rtsp2rtmp_${ver}_window_amd64/ diff --git a/conf/conf.go b/conf/conf.go deleted file mode 100644 index 2184ee2..0000000 --- a/conf/conf.go +++ /dev/null @@ -1,16 +0,0 @@ -package conf - -import ( - "github.com/beego/beego/v2/core/config" - _ "github.com/beego/beego/v2/core/config/yaml" - "github.com/beego/beego/v2/core/logs" -) - -func init() { - filePath := "./conf/conf.yml" - err := config.InitGlobalInstance("yaml", filePath) - if err != nil { - logs.Error("read conf file [%s] error : %v", filePath, err) - return - } -} diff --git a/conf/conf.yml b/conf/conf.yml deleted file mode 100644 index 030dfe1..0000000 --- a/conf/conf.yml +++ /dev/null @@ -1,9 +0,0 @@ -server: - httpflv: - port: 8080 - fileflv: - save: true - path: ./output/live - log: - path: ./output/log - \ No newline at end of file diff --git a/conf/logconf.go b/conf/logconf.go deleted file mode 100644 index 40aab82..0000000 --- a/conf/logconf.go +++ /dev/null @@ -1,17 +0,0 @@ -package conf - -import "github.com/beego/beego/v2/core/logs" - -func init() { - // f := &logs.PatternLogFormatter{ - // Pattern: "%w %F:%n %t %m", - // WhenFormat: "2006-01-02 15:04:05.000", - // } - // logs.RegisterFormatter("pattern", f) - - // _ = logs.SetGlobalFormatter("pattern") - // logs.SetLogger(logs.AdapterConsole) - logs.SetLogger(logs.AdapterFile, `{"filename":"./output/log/rtsp2rtmp.log","level":7,"maxlines":0,"maxsize":0,"daily":true,"maxdays":10,"color":true}`) - logs.EnableFuncCallDepth(true) - logs.SetLogFuncCallDepth(3) -} diff --git a/controllers/camera.go b/controllers/camera.go deleted file mode 100644 index 5ee3717..0000000 --- a/controllers/camera.go +++ /dev/null @@ -1,281 +0,0 @@ -package controllers - -import ( - "encoding/json" - "io/ioutil" - "net/http" - "runtime/debug" - "time" - - "github.com/beego/beego/v2/core/logs" - "github.com/yumrano/rtsp2rtmp/models" - "github.com/yumrano/rtsp2rtmp/result" - "github.com/yumrano/rtsp2rtmp/utils" -) - -func cros(w http.ResponseWriter, req *http.Request) { - method := req.Method //请求方法 - origin := req.Header.Get("Origin") //请求头部 - if origin != "" { - w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Access-Control-Allow-Origin", "*") // 这是允许访问所有域 - w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE,UPDATE") //服务器支持的所有跨域请求的方法,为了避免浏览次请求的多次'预检'请求 - // header的类型 - w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token,session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma") - // 允许跨域设置 可以返回其他子段 - w.Header().Set("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma,FooBar") // 跨域关键设置 让浏览器可以解析 - w.Header().Set("Access-Control-Max-Age", "172800") // 缓存请求信息 单位为秒 - w.Header().Set("Access-Control-Allow-Credentials", "false") // 跨域请求是否需要带cookie信息 默认设置为true - w.Header().Set("content-type", "application/json") // 设置返回格式是json - } - - //放行所有OPTIONS方法 - if method == "OPTIONS" { - r := result.Result{Code: 1, Msg: "Options Request!"} - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - } -} - -func CameraList(w http.ResponseWriter, req *http.Request) { - defer func() { - if r := recover(); r != nil { - logs.Error("system painc : %v \nstack : %v", r, string(debug.Stack())) - } - }() - cros(w, req) - w.Header().Set("Access-Control-Allow-Origin", "*") - r := result.Result{Code: 1, Msg: ""} - cameras, err := models.CameraSelectAll() - if err != nil { - logs.Error("no camera found : %v", err) - r.Code = 0 - r.Msg = "no camera found" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - page := result.Page{Total: len(cameras), Page: cameras} - r.Data = page - rbytes, _ := json.Marshal(r) - w.Write(rbytes) -} - -func CameraEdit(w http.ResponseWriter, req *http.Request) { - defer func() { - if r := recover(); r != nil { - logs.Error("system painc : %v \nstack : %v", r, string(debug.Stack())) - } - }() - cros(w, req) - w.Header().Set("Access-Control-Allow-Origin", "*") - r := result.Result{ - Code: 1, - Msg: "", - } - - body, err := ioutil.ReadAll(req.Body) - if err != nil { - logs.Error("read body err, %v", err) - return - } - logs.Info("json:", string(body)) - - q := models.Camera{} - if err = json.Unmarshal(body, &q); err != nil { - logs.Error("param error : %v", err) - r.Code = 0 - r.Msg = "param error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - - if q.Id == "" || len(q.Id) == 0 { - id, _ := utils.NextToke() - count, err := models.CameraCountByCode(q.Code) - if err != nil { - logs.Error("check camera is exist error : %v", err) - r.Code = 0 - r.Msg = "check camera is exist" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - if count > 0 { - logs.Error("camera code is exist error : %v", err) - r.Code = 0 - r.Msg = "camera code is exist" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - q.Id = id - q.Created = time.Now() - playAuthCode, _ := utils.NextToke() - q.AuthCode = playAuthCode - _, err = models.CameraInsert(q) - if err != nil { - logs.Error("camera insert error : %v", err) - r.Code = 0 - r.Msg = "camera insert error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - count, err := models.CameraCountByCode(q.Code) - if err != nil { - logs.Error("check camera is exist error : %v", err) - r.Code = 0 - r.Msg = "check camera is exist" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - if count > 1 { - logs.Error("camera code is exist error : %v", err) - r.Code = 0 - r.Msg = "camera code is exist" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - camera, _ := models.CameraSelectById(q.Id) - camera.Code = q.Code - camera.AuthCode = q.AuthCode - camera.RtmpURL = q.RtmpURL - camera.RtspURL = q.RtspURL - // camera.Enabled = q.Enabled - _, err = models.CameraUpdate(camera) - if err != nil { - logs.Error("camera insert error : %v", err) - r.Code = 0 - r.Msg = "camera insert error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - rbytes, _ := json.Marshal(r) - w.Write(rbytes) -} - -func CameraDelete(w http.ResponseWriter, req *http.Request) { - defer func() { - if r := recover(); r != nil { - logs.Error("system painc : %v \nstack : %v", r, string(debug.Stack())) - } - }() - cros(w, req) - w.Header().Set("Access-Control-Allow-Origin", "*") - r := result.Result{Code: 1, Msg: ""} - body, err := ioutil.ReadAll(req.Body) - if err != nil { - logs.Error("read body err, %v", err) - return - } - logs.Info("json:", string(body)) - - q := models.Camera{} - if err = json.Unmarshal(body, &q); err != nil { - logs.Error("param error : %v", err) - r.Code = 0 - r.Msg = "param error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - camera := models.Camera{Id: q.Id} - models.CameraDelete(camera) - - if err != nil { - logs.Error("delete camera error : %v", err) - r.Code = 0 - r.Msg = "delete camera error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - //close camera conn - select { - case codeStream <- camera.Code: - case <-time.After(1 * time.Second): - } - - rbytes, _ := json.Marshal(r) - w.Write(rbytes) -} - -func CameraEnabled(w http.ResponseWriter, req *http.Request) { - defer func() { - if r := recover(); r != nil { - logs.Error("system painc : %v \nstack : %v", r, string(debug.Stack())) - } - }() - cros(w, req) - w.Header().Set("Access-Control-Allow-Origin", "*") - r := result.Result{Code: 1, Msg: ""} - body, err := ioutil.ReadAll(req.Body) - if err != nil { - logs.Error("read body err, %v", err) - return - } - logs.Info("json:", string(body)) - - q := models.Camera{} - if err = json.Unmarshal(body, &q); err != nil { - logs.Error("param error : %v", err) - r.Code = 0 - r.Msg = "param error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - if err != nil { - logs.Error("param error : %v", err) - r.Code = 0 - r.Msg = "param error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - - camera, err := models.CameraSelectById(q.Id) - if err != nil { - logs.Error("query camera error : %v", err) - r.Code = 0 - r.Msg = "query camera error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - camera.Enabled = q.Enabled - _, err = models.CameraUpdate(camera) - if err != nil { - logs.Error("enabled camera status %d error : %v", camera.Enabled, err) - r.Code = 0 - r.Msg = "enabled camera status %d error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - if q.Enabled != 1 { - //close camera conn - select { - case codeStream <- camera.Code: - case <-time.After(1 * time.Second): - } - } - - rbytes, _ := json.Marshal(r) - w.Write(rbytes) -} - -var codeStream = make(chan string) - -func CodeStream() <-chan string { - return codeStream -} diff --git a/controllers/httpflv.go b/controllers/httpflv.go deleted file mode 100644 index 931916e..0000000 --- a/controllers/httpflv.go +++ /dev/null @@ -1,119 +0,0 @@ -package controllers - -import ( - "encoding/json" - "net/http" - "runtime/debug" - "strings" - "time" - - "github.com/beego/beego/v2/core/logs" - "github.com/yumrano/rtsp2rtmp/models" - "github.com/yumrano/rtsp2rtmp/result" - "github.com/yumrano/rtsp2rtmp/writer/httpflv" -) - -func Live(w http.ResponseWriter, req *http.Request) { - defer func() { - if r := recover(); r != nil { - logs.Error("system painc : %v \nstack : %v", r, string(debug.Stack())) - } - }() - cros(w, req) - w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Connection", "keep-alive") - uri := strings.TrimSuffix(strings.TrimLeft(req.RequestURI, "/"), ".flv") - uris := strings.Split(uri, "/") - if len(uris) < 3 || uris[0] != "live" { - http.Error(w, "invalid path", http.StatusBadRequest) - return - } - method := uris[1] - code := uris[2] - authCode := uris[3] - r := result.Result{ - Code: 1, - Msg: "", - } - q := models.Camera{Code: code} - camera, err := models.CameraSelectOne(q) - if err != nil { - logs.Error("camera query error : %v", err) - r.Code = 0 - r.Msg = "camera query error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - if !(method == "temp" || method == "permanent") { - logs.Error("method error : %s", method) - r.Code = 0 - r.Msg = "method error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - // if method == "temp" { - // csq := models.CameraShare{CameraId: camera.Id, AuthCode: authCode} - // cs, err := models.CameraShareSelectOne(csq) - // if err != nil { - // logs.Error("CameraShareSelectOne error : %v", err) - // r.Code = 0 - // r.Msg = "system error" - // rbytes, _ := json.Marshal(r) - // w.Write(rbytes) - // return - // } - // if time.Now().After(cs.Created.Add(7 * 24 * time.Hour)) { - // logs.Error("camera [%s] AuthCodeTemp expired : %s", camera.Code, authCode) - // r.Code = 0 - // r.Msg = "authCode expired" - // rbytes, _ := json.Marshal(r) - // w.Write(rbytes) - // return - // } - - // } - if method == "permanent" && authCode != camera.AuthCode { - logs.Error("AuthCodePermanent error : %s", authCode) - r.Code = 0 - r.Msg = "authCode error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } - // if !server.ExistCamera(code) { - // logs.Error("camera [%s] no connection", code) - // r.Code = 0 - // r.Msg = "camera no connection" - // rbytes, _ := json.Marshal(r) - // w.Write(rbytes) - // return - // } - logs.Info("player [%s] addr [%s] connecting", code, req.RemoteAddr) - //管理员可以主动中断播放 - endStream, heartbeatStream, _, err := httpflv.AddHttpFlvPlayer(code, w) - if err != nil { - logs.Error("camera [%s] add player error : %s", code) - r.Code = 0 - r.Msg = "add player error" - rbytes, _ := json.Marshal(r) - w.Write(rbytes) - return - } -Loop: - for { - select { - case <-endStream: - logs.Info("player [%s] addr [%s] end", code, req.RemoteAddr) - break Loop - case <-heartbeatStream: - // logs.Info("player [%s] addr [%s] continue", code, req.RemoteAddr) - continue - case <-time.After(10 * time.Second): - logs.Info("player [%s] addr [%s] timeout", code, req.RemoteAddr) - break Loop - } - } - logs.Info("player [%s] addr [%s] exit", code, req.RemoteAddr) -} diff --git a/db/rtsp2rtmp.db b/db/rtsp2rtmp.db deleted file mode 100644 index 0d227d1..0000000 Binary files a/db/rtsp2rtmp.db and /dev/null differ diff --git a/docs/init/rtsp2rtmp-postgresql.sql b/docs/init/rtsp2rtmp-postgresql.sql new file mode 100644 index 0000000..835d22d --- /dev/null +++ b/docs/init/rtsp2rtmp-postgresql.sql @@ -0,0 +1,61 @@ +-- public.camera definition + +-- Drop table + +-- DROP TABLE public.camera; + +CREATE TABLE public.camera ( + id varchar NOT NULL, -- id + code varchar NULL, -- 摄像头编号 + rtsp_url varchar NULL, -- rtsp地址 + rtmp_url varchar NULL, -- rtmp地址 + play_auth_code varchar NULL, -- 播放识别码 + online_status int2 NULL, -- 是否在线:1.在线;0.不在线; + enabled int2 NULL, -- 是否启用:1.启用;0.禁用; + created timestamp(0) NULL, -- 创建时间 + save_video int2 NULL, -- 是否保留录像:1.保留;0.不保留; + live int2 NULL, -- 开启直播状态:1.开启;0.关闭; + CONSTRAINT camera_pk PRIMARY KEY (id) +); + +-- Column comments + +COMMENT ON COLUMN public.camera.id IS 'id'; +COMMENT ON COLUMN public.camera.code IS '摄像头编号'; +COMMENT ON COLUMN public.camera.rtsp_url IS 'rtsp地址'; +COMMENT ON COLUMN public.camera.rtmp_url IS 'rtmp地址'; +COMMENT ON COLUMN public.camera.play_auth_code IS '播放识别码'; +COMMENT ON COLUMN public.camera.online_status IS '是否在线:1.在线;0.不在线;'; +COMMENT ON COLUMN public.camera.enabled IS '是否启用:1.启用;0.禁用;'; +COMMENT ON COLUMN public.camera.created IS '创建时间'; +COMMENT ON COLUMN public.camera.save_video IS '是否保留录像:1.保留;0.不保留;'; +COMMENT ON COLUMN public.camera.live IS '开启直播状态:1.开启;0.关闭;'; + +-- public.camera_share definition + +-- Drop table + +-- DROP TABLE public.camera_share; + +CREATE TABLE public.camera_share ( + id varchar NOT NULL, + camera_id varchar NULL, -- 摄像头标识 + auth_code varchar NULL, -- 播放权限码 + enabled varchar NULL, -- 启用状态:1.启用;0.禁用; + created timestamp(0) NULL, -- 创建时间 + deadline timestamp(0) NULL, -- 截止日期 + "name" varchar NULL, -- 分享说明 + start_time timestamp(0) NULL, -- 开始生效时间 + CONSTRAINT camera_share_pk PRIMARY KEY (id) +); +COMMENT ON TABLE public.camera_share IS '摄像头分享表'; + +-- Column comments + +COMMENT ON COLUMN public.camera_share.camera_id IS '摄像头标识'; +COMMENT ON COLUMN public.camera_share.auth_code IS '播放权限码'; +COMMENT ON COLUMN public.camera_share.enabled IS '启用状态:1.启用;0.禁用;'; +COMMENT ON COLUMN public.camera_share.created IS '创建时间'; +COMMENT ON COLUMN public.camera_share.deadline IS '截止日期'; +COMMENT ON COLUMN public.camera_share."name" IS '分享说明'; +COMMENT ON COLUMN public.camera_share.start_time IS '开始生效时间'; \ No newline at end of file diff --git a/docs/man.md b/docs/man.md index 3faf8de..bd76b90 100644 --- a/docs/man.md +++ b/docs/man.md @@ -22,26 +22,38 @@ ``` server: + user: + name: admin #网页登录用户名 + password: admin #网页登录密码 + rtmp: httpflv: - port: 8080 #程序的http端口 + port: 8080 + static: + path: ./resources/static #页面所在文件夹 fileflv: - save: true #是否保存录像文件 - path: ./output/live #录像文件夹 + path: ./resources/output/live #录像所在文件夹 log: - path: ./output/log #日志文件夹 - + path: ./resources/output/log #日志所在文件夹 + level: 6 #1-7 7输出的信息最多 + database: + driver-type: 4 #数据库类型 + driver: postgres #数据库驱动 + url: user=postgres password=123456 dbname=rtsp2rtmp host=localhost port=5432 sslmode=disable TimeZone=UTC #数据库url + show-sql: false #是否打印sql ``` ##### 开发说明: -程序分为服务器和页面,服务端采用golang开发,前端采用react+materia-ui,完成后编译页面文件放入服务器的static文件夹 +程序分为服务器和页面,服务端采用golang开发,前端采用react+materia-ui,完成后编译页面文件放入服务器的resources/static文件夹,或者修改配置文件页面所在文件夹的路径 ###### 服务器开发说明: -1. 安装golang,gc++编译器(sqlite3模块的需要用到,window下可选择安装MinGW) +1. 安装golang 2. 获取[服务器源码](https://github.com/hkmadao/rtsp2rtmp.git) -3. 进入项目目录 -4. go build开发 +3. 安装postgresql数据库,根据配置文件"resources/conf/conf-prod.yml"创建数据库 +4. 根据"docs/init/rtsp2rtmp-postgresql.sql"文件创建表 +5. 进入项目目录 +6. go build开发 ###### 页面开发说明: diff --git a/go.mod b/go.mod index 436a34e..73dd5e2 100644 --- a/go.mod +++ b/go.mod @@ -1,37 +1,11 @@ -module github.com/yumrano/rtsp2rtmp +module github.com/hkmadao/rtsp2rtmp -go 1.13 +go 1.16 require ( - github.com/beego/bee/v2 v2.0.2 // indirect - github.com/beego/beego/v2 v2.0.1 // indirect - github.com/deepch/vdk v0.0.0-20210203031003-ae4ae47c04e1 - github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect - github.com/gin-gonic/gin v1.6.3 - github.com/go-delve/delve v1.6.1 // indirect - github.com/go-sql-driver/mysql v1.6.0 // indirect - github.com/golang/protobuf v1.4.2 // indirect - github.com/google/uuid v1.2.0 // indirect - github.com/lib/pq v1.10.2 // indirect - github.com/magiconair/properties v1.8.5 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.13 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect - github.com/pelletier/go-toml v1.9.1 // indirect - github.com/peterh/liner v1.2.1 // indirect - github.com/pion/webrtc/v2 v2.2.23 - github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/afero v1.6.0 // indirect - github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.7.1 // indirect - go.starlark.net v0.0.0-20210511153848-cca21e7857d4 // indirect - golang.org/x/arch v0.0.0-20210502124803-cbf565b21d1e // indirect - golang.org/x/sys v0.0.0-20210601080250-7ecdf8ef093b // indirect - golang.org/x/text v0.3.6 // indirect - gopkg.in/ini.v1 v1.62.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/beego/beego/v2 v2.0.1 + github.com/deepch/vdk v0.0.0-20210523103705-5b25bda1a000 + github.com/gin-gonic/gin v1.7.2 + github.com/google/uuid v1.2.0 + github.com/lib/pq v1.0.0 ) diff --git a/go.sum b/go.sum index a6274a4..a0d5ef0 100644 --- a/go.sum +++ b/go.sum @@ -1,33 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/astaxie/beego v1.12.3 h1:SAQkdD2ePye+v8Gn1r4X6IKZM1wd28EyUOVQ3PDSOOQ= -github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA= -github.com/beego/bee/v2 v2.0.2 h1:xWARyIqdnnbNMDBDUdb6Gvr9S/yGXC6Ni43kKdS1/eg= -github.com/beego/bee/v2 v2.0.2/go.mod h1:rfZa899qLAF8SYBRvE7mWNPZTU7/qysOBhaCLmZrMX4= github.com/beego/beego/v2 v2.0.1 h1:07a7Z0Ok5vbqyqh+q53sDPl9LdhKh0ZDy3gbyGrhFnE= github.com/beego/beego/v2 v2.0.1/go.mod h1:8zyHi1FnWO1mZLwTn62aKRIZF/aIKvkCBB2JYs+eqQI= github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd h1:jZtX5jh5IOMu0fpOTC3ayh6QGSPJ/KWOv1lgPvbRw1M= @@ -36,90 +15,60 @@ github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosiner/argv v0.1.0 h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg= -github.com/cosiner/argv v0.1.0/go.mod h1:EusR6TucWKX+zFgtdUsKT2Cvg45K5rtpCcWz4hK06d8= github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepch/vdk v0.0.0-20210203031003-ae4ae47c04e1 h1:O7TrdSlVsYlQhfX7dcKU92VOVeaKmxQ24jyTUoqhgsc= -github.com/deepch/vdk v0.0.0-20210203031003-ae4ae47c04e1/go.mod h1:mFKn6/jT2OgoMrw/2kgoVDN67kokS5T3kRn04x3eJXg= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/deepch/vdk v0.0.0-20210523103705-5b25bda1a000 h1:yheim2C0sxxzQ61GYlbuKCnCq2hSFraFx4XlgcBC6FE= +github.com/deepch/vdk v0.0.0-20210523103705-5b25bda1a000/go.mod h1:EZi580zgIZQOVwMcApOE/rTxuWCHvP/9yAFkUro14LI= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= -github.com/flosch/pongo2 v0.0.0-20200529170236-5abacdfa4915/go.mod h1:fB4mx6dzqFinCxIf3a7Mf5yLk+18Bia9mPAnuejcvDA= -github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= -github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.7.2 h1:Tg03T9yM2xa8j6I3Z3oqLaQRSmKvxPd6g/2HJ6zICFA= +github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-delve/delve v1.5.0/go.mod h1:c6b3a1Gry6x8a4LGCe/CWzrocrfaHvkUxCj3k4bvSUQ= -github.com/go-delve/delve v1.6.1 h1:5jDODIhsD/1xQyq/EHZKWbu4n9WhaEX0bcWTROOUxiA= -github.com/go-delve/delve v1.6.1/go.mod h1:2DpgGoHOW7r7MXyykmT7axp9IEEIc8EV/swa5m8rkbo= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-redis/redis/v7 v7.4.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -129,134 +78,64 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-dap v0.2.0/go.mod h1:5q8aYQFnHOAZEMP+6vmq25HKYAEwE+LF5yh7JKrrhSQ= -github.com/google/go-dap v0.5.0/go.mod h1:5q8aYQFnHOAZEMP+6vmq25HKYAEwE+LF5yh7JKrrhSQ= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/errors v0.0.0-20190930114154-d42613fe1ab9/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lucas-clemente/quic-go v0.7.1-0.20190401152353-907071221cf9/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= -github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -269,99 +148,63 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pelletier/go-toml v1.9.1 h1:a6qW1EVNZWH9WGI6CsYdD8WAylkoXBS5yv0XHlh17Tc= -github.com/pelletier/go-toml v1.9.1/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.2.1 h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg= -github.com/peterh/liner v1.2.1/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/pion/datachannel v1.4.19/go.mod h1:JzKF/zzeWgkOYwQ+KFb8JzbrUt8s63um+Qunu8VqTyw= -github.com/pion/datachannel v1.4.21 h1:3ZvhNyfmxsAqltQrApLPQMhSFNA+aT87RqyCq4OXmf0= github.com/pion/datachannel v1.4.21/go.mod h1:oiNyP4gHx2DIwRzX/MFyH0Rz/Gz05OgBlayAI2hAWjg= github.com/pion/dtls/v2 v2.0.1/go.mod h1:uMQkz2W0cSqY00xav7WByQ4Hb+18xeQh2oH2fRezr5U= github.com/pion/dtls/v2 v2.0.2/go.mod h1:27PEO3MDdaCfo21heT59/vsdmZc0zMt9wQPcSlLu/1I= -github.com/pion/dtls/v2 v2.0.4 h1:WuUcqi6oYMu/noNTz92QrF1DaFj4eXbhQ6dzaaAwOiI= github.com/pion/dtls/v2 v2.0.4/go.mod h1:qAkFscX0ZHoI1E07RfYPoRw3manThveu+mlTDdOxoGI= -github.com/pion/ice v0.7.18 h1:KbAWlzWRUdX9SmehBh3gYpIFsirjhSQsCw6K2MjYMK0= github.com/pion/ice v0.7.18/go.mod h1:+Bvnm3nYC6Nnp7VV6glUkuOfToB/AtMRZpOU8ihuf4c= -github.com/pion/ice/v2 v2.0.14/go.mod h1:wqaUbOq5ObDNU5ox1hRsEst0rWfsKuH1zXjQFEWiZwM= -github.com/pion/interceptor v0.0.8/go.mod h1:dHgEP5dtxOTf21MObuBAjJeAayPxLUAZjerGH8Xr07c= -github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/ice/v2 v2.0.15/go.mod h1:ZIiVGevpgAxF/cXiIVmuIUtCb3Xs4gCzCbXB6+nFkSI= +github.com/pion/interceptor v0.0.9/go.mod h1:dHgEP5dtxOTf21MObuBAjJeAayPxLUAZjerGH8Xr07c= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= -github.com/pion/mdns v0.0.4 h1:O4vvVqr4DGX63vzmO6Fw9vpy3lfztVWHGCQfyw0ZLSY= github.com/pion/mdns v0.0.4/go.mod h1:R1sL0p50l42S5lJs91oNdUL58nm0QHrhxnSegr++qC0= github.com/pion/quic v0.1.1/go.mod h1:zEU51v7ru8Mp4AUBJvj6psrSth5eEFNnVQK5K48oV3k= github.com/pion/randutil v0.0.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= -github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= github.com/pion/rtcp v1.2.3/go.mod h1:zGhIv0RPRF0Z1Wiij22pUt5W/c9fevqSzT4jje/oK7I= -github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo= github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0= github.com/pion/rtp v1.6.0/go.mod h1:QgfogHsMBVE/RFNno467U/KBqfUywEH+HK+0rtnwsdI= -github.com/pion/rtp v1.6.2 h1:iGBerLX6JiDjB9NXuaPzHyxHFG9JsIEdgwTC0lp5n/U= github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko= -github.com/pion/sctp v1.7.8/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0= github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0= -github.com/pion/sctp v1.7.11 h1:UCnj7MsobLKLuP/Hh+JMiI/6W5Bs/VF45lWKgHFjSIE= github.com/pion/sctp v1.7.11/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0= -github.com/pion/sdp/v2 v2.4.0 h1:luUtaETR5x2KNNpvEMv/r4Y+/kzImzbz4Lm1z8eQNQI= github.com/pion/sdp/v2 v2.4.0/go.mod h1:L2LxrOpSTJbAns244vfPChbciR/ReU1KWfG04OpkR7E= -github.com/pion/sdp/v3 v3.0.3/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk= -github.com/pion/srtp v1.5.1 h1:9Q3jAfslYZBt+C69SI/ZcONJh9049JUHZWYRRf5KEKw= +github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk= github.com/pion/srtp v1.5.1/go.mod h1:B+QgX5xPeQTNc1CJStJPHzOlHK66ViMDWTT0HZTCkcA= -github.com/pion/srtp/v2 v2.0.0/go.mod h1:QYOU1YKWaE/NJjR2WxtDMc+AfS9So0uz0RnadqOGJO8= -github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg= +github.com/pion/srtp/v2 v2.0.1/go.mod h1:c8NWHhhkFf/drmHTAblkdu8++lsISEBBdAuiyxgqIsE= github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA= github.com/pion/transport v0.6.0/go.mod h1:iWZ07doqOosSLMhZ+FXUTq+TamDoXSllxpbGcfkCmbE= github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8= github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE= github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A= -github.com/pion/transport v0.12.0 h1:UFmOBBZkTZ3LgvLRf/NGrfWdZEubcU6zkLU3PsA9YvU= -github.com/pion/transport v0.12.0/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q= +github.com/pion/transport v0.12.1/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q= +github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q= github.com/pion/turn/v2 v2.0.4/go.mod h1:1812p4DcGVbYVBTiraUmP50XoKye++AMkbfp+N27mog= -github.com/pion/turn/v2 v2.0.5 h1:iwMHqDfPEDEOFzwWKT56eFmh6DYC6o/+xnLAEzgISbA= github.com/pion/turn/v2 v2.0.5/go.mod h1:APg43CFyt/14Uy7heYUOGWdkem/Wu4PhCO/bjyrTqMw= -github.com/pion/udp v0.1.0 h1:uGxQsNyrqG3GLINv36Ff60covYmfrLoxzwnCsIYspXI= github.com/pion/udp v0.1.0/go.mod h1:BPELIjbwE9PRbd/zxI/KYBnbo7B6+oA6YuEaNE8lths= -github.com/pion/webrtc/v2 v2.2.23 h1:rZdOC95fwUCoQFVjHooPAayx/vhs3SLHFz8J/iRkAuk= -github.com/pion/webrtc/v2 v2.2.23/go.mod h1:1lN/3EcATkQxc7GJSQbISCGC2l64Xu2VSLpwEG3c/tM= -github.com/pion/webrtc/v3 v3.0.1/go.mod h1:ePzv8r2tzj95nJuPsns/7OiS5M8RiGSULdxzIRbXOtQ= +github.com/pion/webrtc/v2 v2.2.26/go.mod h1:XMZbZRNHyPDe1gzTIHFcQu02283YO45CbiwFgKvXnmc= +github.com/pion/webrtc/v3 v3.0.5/go.mod h1:/EDCREM8y+JrJSkoCRHpoz//qtuBCOYV4E96vEK3bz0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= @@ -369,32 +212,6 @@ github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKz github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartwalle/pongo2render v1.0.1 h1:rsPnDTu/+zIT5HEB5RbMjxKY5hisov26j0isZL/7YS0= -github.com/smartwalle/pongo2render v1.0.1/go.mod h1:MGnTzND7nEMz7g194kjlnw8lx/V5JJlb1hr5kDXEO0I= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -403,11 +220,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -415,34 +231,17 @@ github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b h1:0Ve0/CCjiAiyKddUMUn3RwIGlq2iTW4GuVzyoKBYO/8= github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= -go.starlark.net v0.0.0-20200821142938-949cc6f4b097/go.mod h1:f0znQkUKRrkk36XxWbGjMqQM8wGv/xHBVE2qc3B5oFU= -go.starlark.net v0.0.0-20210511153848-cca21e7857d4 h1:Jv3qnj+QmBjvAeyPwsTAm26oKmU/Z9F6EZIMDNznH6Q= -go.starlark.net v0.0.0-20210511153848-cca21e7857d4/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= -golang.org/x/arch v0.0.0-20210502124803-cbf565b21d1e h1:pv3V0NlNSh5Q6AX/StwGLBjcLS7UN4m4Gq+V+uSecqM= -golang.org/x/arch v0.0.0-20210502124803-cbf565b21d1e/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -450,40 +249,21 @@ golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -496,84 +276,50 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 h1:3uJsdck53FDIpWwLeAXlia9p4C8j0BO2xZrqzKpL0D8= golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210601080250-7ecdf8ef093b h1:qh4f65QIVFjq9eBURLEYWqaEXmOyqdUyiBSgaXWccWk= -golang.org/x/sys v0.0.0-20210601080250-7ecdf8ef093b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -582,58 +328,30 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -641,14 +359,9 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/main.go b/main.go index ff19b60..063e63b 100644 --- a/main.go +++ b/main.go @@ -5,28 +5,26 @@ import ( "os/signal" "syscall" - // _ "net/http/pprof" + _ "github.com/hkmadao/rtsp2rtmp/src/rtsp2rtmp/conf" // 必须先导入配置文件 + "github.com/hkmadao/rtsp2rtmp/src/rtsp2rtmp/rtspclientmanager" + "github.com/hkmadao/rtsp2rtmp/src/rtsp2rtmp/task" + "github.com/hkmadao/rtsp2rtmp/src/rtsp2rtmp/web" "github.com/beego/beego/v2/core/logs" - "github.com/yumrano/rtsp2rtmp/app" - _ "github.com/yumrano/rtsp2rtmp/conf" - "github.com/yumrano/rtsp2rtmp/server" ) func main() { - go app.ServeHTTP() - server.NewServer() + rtspclientmanager.GetSingleRtspClientManager().StartClient() + task.GetSingleTask().StartTask() + web.GetSingleWeb().StartWeb() sigs := make(chan os.Signal, 1) done := make(chan bool, 1) signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) - // go func() { - // http.ListenAndServe("0.0.0.0:6060", nil) - // }() logs.Info("Server Start Awaiting Signal") select { case sig := <-sigs: - logs.Error(sig) + logs.Info(sig) case <-done: } - logs.Error("Exiting") + logs.Info("Exiting") } diff --git a/models/models.go b/models/models.go deleted file mode 100644 index 2b53f9d..0000000 --- a/models/models.go +++ /dev/null @@ -1,11 +0,0 @@ -package models - -import ( - "github.com/beego/beego/v2/client/orm" - _ "github.com/mattn/go-sqlite3" -) - -func init() { - orm.RegisterDriver("sqlite3", orm.DRSqlite) - orm.RegisterDataBase("default", "sqlite3", "./db/rtsp2rtmp.db") -} diff --git a/output/live/.gitignore b/output/live/.gitignore deleted file mode 100644 index cc8b26a..0000000 --- a/output/live/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -*.flv \ No newline at end of file diff --git a/output/log/.gitignore b/output/log/.gitignore deleted file mode 100644 index a8ca954..0000000 --- a/output/log/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -*.log \ No newline at end of file diff --git a/resources/conf/conf-dev.yml b/resources/conf/conf-dev.yml new file mode 100644 index 0000000..bc165e3 --- /dev/null +++ b/resources/conf/conf-dev.yml @@ -0,0 +1,19 @@ +server: + user: + name: admin + password: admin + http: + port: 8080 + static: + path: D:\development\project\rtsp2rtmp-web\build + fileflv: + path: ./resources/output/live + log: + path: ./resources/output/log + level: 6 + database: + driver-type: 4 + driver: postgres + url: user=postgres password=123456 dbname=rtsp2rtmp host=localhost port=5432 sslmode=disable TimeZone=UTC + show-sql: false + \ No newline at end of file diff --git a/resources/conf/conf-prod.yml b/resources/conf/conf-prod.yml new file mode 100644 index 0000000..2dbe6e9 --- /dev/null +++ b/resources/conf/conf-prod.yml @@ -0,0 +1,19 @@ +server: + user: + name: admin + password: admin + http: + port: 8080 + static: + path: ./resources/static + fileflv: + path: ./resources/output/live + log: + path: ./resources/output/log + level: 6 + database: + driver-type: 4 + driver: postgres + url: user=postgres password=123456 dbname=rtsp2rtmp host=localhost port=5432 sslmode=disable TimeZone=UTC + show-sql: false + \ No newline at end of file diff --git a/resources/output/live/.gitignore b/resources/output/live/.gitignore new file mode 100644 index 0000000..4a30a25 --- /dev/null +++ b/resources/output/live/.gitignore @@ -0,0 +1 @@ +*.flv diff --git a/resources/output/log/.gitignore b/resources/output/log/.gitignore new file mode 100644 index 0000000..397b4a7 --- /dev/null +++ b/resources/output/log/.gitignore @@ -0,0 +1 @@ +*.log diff --git a/resources/static/asset-manifest.json b/resources/static/asset-manifest.json new file mode 100644 index 0000000..96a21f7 --- /dev/null +++ b/resources/static/asset-manifest.json @@ -0,0 +1,17 @@ +{ + "files": { + "main.js": "/rtsp2rtmp/static/js/main.82132c58.chunk.js", + "main.js.map": "/rtsp2rtmp/static/js/main.82132c58.chunk.js.map", + "runtime-main.js": "/rtsp2rtmp/static/js/runtime-main.14fbbcda.js", + "runtime-main.js.map": "/rtsp2rtmp/static/js/runtime-main.14fbbcda.js.map", + "static/js/2.f4ce3ada.chunk.js": "/rtsp2rtmp/static/js/2.f4ce3ada.chunk.js", + "static/js/2.f4ce3ada.chunk.js.map": "/rtsp2rtmp/static/js/2.f4ce3ada.chunk.js.map", + "index.html": "/rtsp2rtmp/index.html", + "static/js/2.f4ce3ada.chunk.js.LICENSE.txt": "/rtsp2rtmp/static/js/2.f4ce3ada.chunk.js.LICENSE.txt" + }, + "entrypoints": [ + "static/js/runtime-main.14fbbcda.js", + "static/js/2.f4ce3ada.chunk.js", + "static/js/main.82132c58.chunk.js" + ] +} \ No newline at end of file diff --git a/static/favicon.ico b/resources/static/favicon.ico similarity index 100% rename from static/favicon.ico rename to resources/static/favicon.ico diff --git a/resources/static/index.html b/resources/static/index.html new file mode 100644 index 0000000..5c78e27 --- /dev/null +++ b/resources/static/index.html @@ -0,0 +1 @@ +React App
\ No newline at end of file diff --git a/static/logo192.png b/resources/static/logo192.png similarity index 100% rename from static/logo192.png rename to resources/static/logo192.png diff --git a/static/logo512.png b/resources/static/logo512.png similarity index 100% rename from static/logo512.png rename to resources/static/logo512.png diff --git a/static/manifest.json b/resources/static/manifest.json similarity index 100% rename from static/manifest.json rename to resources/static/manifest.json diff --git a/static/robots.txt b/resources/static/robots.txt similarity index 100% rename from static/robots.txt rename to resources/static/robots.txt diff --git a/resources/static/static/js/2.f4ce3ada.chunk.js b/resources/static/static/js/2.f4ce3ada.chunk.js new file mode 100644 index 0000000..c53de94 --- /dev/null +++ b/resources/static/static/js/2.f4ce3ada.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.f4ce3ada.chunk.js.LICENSE.txt */ +(this.webpackJsonprtsp2rtmpweb=this.webpackJsonprtsp2rtmpweb||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(142)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,s=t.withTheme,f=void 0!==s&&s,h=t.name,p=Object(i.a)(t,["defaultTheme","withTheme","name"]);var m=h,v=Object(u.a)(e,Object(r.a)({defaultTheme:a,Component:n,name:h||n.displayName,classNamePrefix:m},p)),g=o.a.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,u=Object(i.a)(e,["classes","innerRef"]),p=v(Object(r.a)({},n.defaultProps,e)),m=u;return("string"===typeof h||f)&&(s=Object(d.a)()||a,h&&(m=Object(c.a)({theme:s,name:h,props:u})),f&&!m.theme&&(m.theme=s)),o.a.createElement(n,Object(r.a)({ref:l||t,classes:p},m))}));return l()(g,n),g}},h=n(47);t.a=function(e,t){return f(e,Object(r.a)({defaultTheme:h.a},t))}},function(e,t,n){e.exports=n(166)()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function o(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function s(e,t){var n=l(e),r=l(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(e){var t="hsl"===(e=a(e)).type?a(function(e){var t=(e=a(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),o({type:u,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,o(e)}function c(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function d(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return o(e)}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return y}));var r=n(17),i=n(0),a=n.n(i),o=(n(6),n(34)),s=n(92),l=n(28),u=n(1),c=n(93),d=n.n(c),f=(n(70),n(23)),h=(n(63),function(e){var t=Object(s.a)();return t.displayName=e,t}("Router-History")),p=function(e){var t=Object(s.a)();return t.displayName=e,t}("Router"),m=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return a.a.createElement(p.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.a.createElement(h.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.a.Component);a.a.Component;a.a.Component;var v={},g=0;function y(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,a=void 0!==i&&i,o=n.strict,s=void 0!==o&&o,l=n.sensitive,u=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=v[n]||(v[n]={});if(r[e])return r[e];var i=[],a={regexp:d()(e,i,t),keys:i};return g<1e4&&(r[e]=a,g++),a}(n,{end:a,strict:s,sensitive:u}),i=r.regexp,o=r.keys,l=i.exec(e);if(!l)return null;var c=l[0],f=l.slice(1),h=e===c;return a&&!h?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:h,params:o.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var b=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(p.Consumer,null,(function(t){t||Object(l.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?y(n.pathname,e.props):t.match,i=Object(u.a)({},t,{location:n,match:r}),o=e.props,s=o.children,c=o.component,d=o.render;return Array.isArray(s)&&0===s.length&&(s=null),a.a.createElement(p.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:c?a.a.createElement(c,i):d?d(i):null:"function"===typeof s?s(i):null)}))},t}(a.a.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function k(e,t){if(!e)return t;var n=_(e);return 0!==t.pathname.indexOf(n)?t:Object(u.a)({},t,{pathname:t.pathname.substr(n.length)})}function w(e){return"string"===typeof e?e:Object(o.e)(e)}function S(e){return function(){Object(l.a)(!1)}}function E(){}a.a.Component;var O=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(p.Consumer,null,(function(t){t||Object(l.a)(!1);var n,r,i=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?y(i.pathname,Object(u.a)({},e.props,{path:o})):t.match}})),r?a.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(a.a.Component);a.a.useContext},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(114);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),i=n(0),a=n.n(i),o=n(3),s=(n(6),n(4)),l=n(5),u=n(9),c=i.forwardRef((function(e,t){var n=e.children,a=e.classes,l=e.className,c=e.color,d=void 0===c?"inherit":c,f=e.component,h=void 0===f?"svg":f,p=e.fontSize,m=void 0===p?"default":p,v=e.htmlColor,g=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,_=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(h,Object(r.a)({className:Object(s.a)(a.root,l,"inherit"!==d&&a["color".concat(Object(u.a)(d))],"default"!==m&&a["fontSize".concat(Object(u.a)(m))]),focusable:"false",viewBox:b,color:v,"aria-hidden":!g||void 0,role:g?"img":void 0,ref:t},_),n,g?i.createElement("title",null,g):null)}));c.muiName="SvgIcon";var d=Object(l.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(c);function f(e,t){var n=function(t,n){return a.a.createElement(d,Object(r.a)({ref:n},t),e)};return n.muiName=d.muiName,a.a.memo(a.a.forwardRef(n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Object(r.a)(e);if(t){var o=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,a=i&&"function"===typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"===typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&g(e,"error",t,n)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,o,s;if(u(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"===typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[e];if(void 0===l)return!1;if("function"===typeof l)a(l,this,t);else{var u=l.length,c=v(l,u);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function a(e){var t=r.useRef(e);return i((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){"use strict";var r=n(106),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function o(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},U={};function F(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return D(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function V(e){var t,n,r=e.match(N);for(t=0,n=r.length;t=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var Y={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var $="Invalid date";function q(){return this._invalidDate}var K="%d",X=/\d{1,2}/;function Q(e){return this._ordinal.replace("%d",e)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ae={};function oe(e,t){ae[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4===0&&e%100!==0||e%400===0}function ue(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ce(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ue(t)),n}function de(e,t){return function(n){return null!=n?(he(this,e,n),r.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ce(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Je(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function pe(e){return T(this[e=re(e)])?this[e]():this}function me(e,t){if("object"===typeof e){var n,r=se(e=ie(e));for(n=0;n68?1900:2e3)};var vt=de("FullYear",!0);function gt(){return le(this.year())}function yt(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function _t(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function kt(e,t,n,r,i){var a,o,s=1+7*(t-1)+(7+n-r)%7+_t(e,r,i);return s<=0?o=mt(a=e-1)+s:s>mt(e)?(a=e+1,o=s-mt(e)):(a=e,o=s),{year:a,dayOfYear:o}}function wt(e,t,n){var r,i,a=_t(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?r=o+St(i=e.year()-1,t,n):o>St(e.year(),t,n)?(r=o-St(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function St(e,t,n){var r=_t(e,t,n),i=_t(e+1,t,n);return(mt(e)-r+i)/7}function Et(e){return wt(e,this._week.dow,this._week.doy).week}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),oe("week",5),oe("isoWeek",5),Pe("w",we),Pe("ww",we,ye),Pe("W",we),Pe("WW",we,ye),Fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ce(e)}));var Ot={dow:0,doy:6};function xt(){return this._week.dow}function Ct(){return this._week.doy}function Rt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Tt(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function At(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function jt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lt(e,t){return e.slice(t,7).concat(e.slice(0,t))}F("d",0,"do","day"),F("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),F("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),F("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),oe("day",11),oe("weekday",11),oe("isoWeekday",11),Pe("d",we),Pe("e",we),Pe("E",we),Pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),Fe(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:v(n).invalidWeekday=e})),Fe(["d","e","E"],(function(e,t,n,r){t[r]=ce(e)}));var Mt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Dt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Nt=Me,It=Me,Bt=Me;function Ut(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Lt(n,this._week.dow):e?n[e.day()]:n}function Ft(e){return!0===e?Lt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function zt(e){return!0===e?Lt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Vt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ve.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ve.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Ve.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=Ve.call(this._weekdaysParse,o))||-1!==(i=Ve.call(this._shortWeekdaysParse,o))||-1!==(i=Ve.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ve.call(this._shortWeekdaysParse,o))||-1!==(i=Ve.call(this._weekdaysParse,o))||-1!==(i=Ve.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Ve.call(this._minWeekdaysParse,o))||-1!==(i=Ve.call(this._weekdaysParse,o))||-1!==(i=Ve.call(this._shortWeekdaysParse,o))?i:null}function Wt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Vt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=At(e,this.localeData()),this.add(e-t,"d")):t}function Yt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=jt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Nt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=It),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Bt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xt(){function e(e,t){return t.length-e.length}var t,n,r,i,a,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=Ie(this.weekdaysMin(n,"")),i=Ie(this.weekdaysShort(n,"")),a=Ie(this.weekdays(n,"")),o.push(r),s.push(i),l.push(a),u.push(r),u.push(i),u.push(a);o.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Qt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Jt(e,t){F(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Qt),F("k",["kk",2],0,Zt),F("hmm",0,0,(function(){return""+Qt.apply(this)+D(this.minutes(),2)})),F("hmmss",0,0,(function(){return""+Qt.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)})),F("Hmm",0,0,(function(){return""+this.hours()+D(this.minutes(),2)})),F("Hmmss",0,0,(function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)})),Jt("a",!0),Jt("A",!1),ne("hour","h"),oe("hour",13),Pe("a",en),Pe("A",en),Pe("H",we),Pe("h",we),Pe("k",we),Pe("HH",we,ye),Pe("hh",we,ye),Pe("kk",we,ye),Pe("hmm",Se),Pe("hmmss",Ee),Pe("Hmm",Se),Pe("Hmmss",Ee),Ue(["H","HH"],Ge),Ue(["k","kk"],(function(e,t,n){var r=ce(e);t[Ge]=24===r?0:r})),Ue(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ue(["h","hh"],(function(e,t,n){t[Ge]=ce(e),v(n).bigHour=!0})),Ue("hmm",(function(e,t,n){var r=e.length-2;t[Ge]=ce(e.substr(0,r)),t[$e]=ce(e.substr(r)),v(n).bigHour=!0})),Ue("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ge]=ce(e.substr(0,r)),t[$e]=ce(e.substr(r,2)),t[qe]=ce(e.substr(i)),v(n).bigHour=!0})),Ue("Hmm",(function(e,t,n){var r=e.length-2;t[Ge]=ce(e.substr(0,r)),t[$e]=ce(e.substr(r))})),Ue("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ge]=ce(e.substr(0,r)),t[$e]=ce(e.substr(r,2)),t[qe]=ce(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var on,sn={calendar:M,longDateFormat:Y,invalidDate:$,ordinal:K,dayOfMonthOrdinalParse:X,relativeTime:Z,months:et,monthsShort:tt,week:Ot,weekdays:Mt,weekdaysMin:Dt,weekdaysShort:Pt,meridiemParse:nn},ln={},un={};function cn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=hn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&cn(i,n)>=t-1)break;t--}a++}return on}function hn(t){var n=null;if(void 0===ln[t]&&"undefined"!==typeof e&&e&&e.exports)try{n=on._abbr,function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),pn(n)}catch(r){ln[t]=null}return ln[t]}function pn(e,t){var n;return e&&((n=u(t)?gn(e):mn(e,t))?on=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),on._abbr}function mn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])R("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=hn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new L(j(r,t)),un[e]&&un[e].forEach((function(e){mn(e.name,e.config)})),pn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(j(ln[e]._config,t)):(null!=(r=hn(e))&&(i=r._config),t=j(i,t),null==r&&(t.abbr=e),(n=new L(t)).parentLocale=ln[e],ln[e]=n),pn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===pn()&&pn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function gn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return on;if(!a(e)){if(t=hn(e))return t;e=[e]}return fn(e)}function yn(){return x(ln)}function bn(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[He]<0||n[He]>11?He:n[Ye]<1||n[Ye]>Je(n[We],n[He])?Ye:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[$e]||0!==n[qe]||0!==n[Ke])?Ge:n[$e]<0||n[$e]>59?$e:n[qe]<0||n[qe]>59?qe:n[Ke]<0||n[Ke]>999?Ke:-1,v(e)._overflowDayOfYear&&(tYe)&&(t=Ye),v(e)._overflowWeeks&&-1===t&&(t=Xe),v(e)._overflowWeekday&&-1===t&&(t=Qe),v(e).overflow=t),e}var _n=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/Z|[+-]\d\d(?::?\d\d)?/,Sn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],En=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],On=/^\/?Date\((-?\d+)/i,xn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Cn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rn(e){var t,n,r,i,a,o,s=e._i,l=_n.exec(s)||kn.exec(s);if(l){for(v(e).iso=!0,t=0,n=Sn.length;tmt(a)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=bt(a,0,e._dayOfYear),e._a[He]=n.getUTCMonth(),e._a[Ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[$e]&&0===e._a[qe]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?bt:yt).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(v(e).weekdayMismatch=!0)}}function Un(e){var t,n,r,i,a,o,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,o=4,n=Nn(t.GG,e._a[We],wt(qn(),1,4).year),r=Nn(t.W,1),((i=Nn(t.E,1))<1||i>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,u=wt(qn(),a,o),n=Nn(t.gg,e._a[We],u.year),r=Nn(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>St(n,a,o)?v(e)._overflowWeeks=!0:null!=l?v(e)._overflowWeekday=!0:(s=kt(n,r,i,a,o),e._a[We]=s.year,e._dayOfYear=s.dayOfYear)}function Fn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],v(e).empty=!0;var t,n,i,a,o,s,l=""+e._i,u=l.length,c=0;for(i=H(e._f,e._locale).match(N)||[],t=0;t0&&v(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),c+=n.length),U[a]?(n?v(e).empty=!1:v(e).unusedTokens.push(a),ze(a,n,e)):e._strict&&!n&&v(e).unusedTokens.push(a);v(e).charsLeftOver=u-c,l.length>0&&v(e).unusedInput.push(l),e._a[Ge]<=12&&!0===v(e).bigHour&&e._a[Ge]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[Ge]=zn(e._locale,e._a[Ge],e._meridiem),null!==(s=v(e).era)&&(e._a[We]=e._locale.erasConvertYear(s,e._a[We])),Bn(e),bn(e)}else Pn(e);else Rn(e)}function zn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Vn(e){var t,n,r,i,a,o,s=!1;if(0===e._f.length)return v(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:y()}));function Qn(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return qn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kr(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return k(t,this),(t=Yn(t))._a?(e=t._isUTC?p(t._a):qn(t._a),this._isDSTShifted=this.isValid()&&lr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function wr(){return!!this.isValid()&&!this._isUTC}function Sr(){return!!this.isValid()&&this._isUTC}function Er(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Or=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,xr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cr(e,t){var n,r,i,a=e,o=null;return or(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=Or.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:ce(o[Ye])*n,h:ce(o[Ge])*n,m:ce(o[$e])*n,s:ce(o[qe])*n,ms:ce(sr(1e3*o[Ke]))*n}):(o=xr.exec(e))?(n="-"===o[1]?-1:1,a={y:Rr(o[2],n),M:Rr(o[3],n),w:Rr(o[4],n),d:Rr(o[5],n),h:Rr(o[6],n),m:Rr(o[7],n),s:Rr(o[8],n)}):null==a?a={}:"object"===typeof a&&("from"in a||"to"in a)&&(i=Ar(qn(a.from),qn(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new ar(a),or(e)&&s(e,"_locale")&&(r._locale=e._locale),or(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Rr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Tr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ar(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Tr(e,t):((n=Tr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function jr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(R(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Lr(this,Cr(n,r),e),this}}function Lr(e,t,n,i){var a=t._milliseconds,o=sr(t._days),s=sr(t._months);e.isValid()&&(i=null==i||i,s&&ut(e,fe(e,"Month")+s*n),o&&he(e,"Date",fe(e,"Date")+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&r.updateOffset(e,o||s))}Cr.fn=ar.prototype,Cr.invalid=ir;var Mr=jr(1,"add"),Pr=jr(-1,"subtract");function Dr(e){return"string"===typeof e||e instanceof String}function Nr(e){return S(e)||d(e)||Dr(e)||c(e)||Br(e)||Ir(e)||null===e||void 0===e}function Ir(e){var t,n,r=o(e)&&!l(e),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;tn.valueOf():n.valueOf()9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Jr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function ei(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function ti(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Cr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(qn(),e)}function ri(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Cr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ii(e){return this.to(qn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var oi=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function si(){return this._locale}var li=1e3,ui=60*li,ci=60*ui,di=3506328*ci;function fi(e,t){return(e%t+t)%t}function hi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-di:new Date(e,t,n).valueOf()}function pi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-di:Date.UTC(e,t,n)}function mi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pi:hi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*ui),ci);break;case"minute":t=this._d.valueOf(),t-=fi(t,ui);break;case"second":t=this._d.valueOf(),t-=fi(t,li)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pi:hi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ci-fi(t+(this._isUTC?0:this.utcOffset()*ui),ci)-1;break;case"minute":t=this._d.valueOf(),t+=ui-fi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=li-fi(t,li)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function gi(){return this._d.valueOf()-6e4*(this._offset||0)}function yi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function _i(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ki(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function wi(){return this.isValid()?this.toISOString():null}function Si(){return g(this)}function Ei(){return h({},v(this))}function Oi(){return v(this).overflow}function xi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ci(e,t){var n,i,a,o=this._eras||gn("en")._eras;for(n=0,i=o.length;n=0)return l[r]}function Ti(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ai(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e(a=St(e,r,i))&&(t=a),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var a=kt(e,t,n,r,i),o=bt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Qi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),Pe("N",Ii),Pe("NN",Ii),Pe("NNN",Ii),Pe("NNNN",Bi),Pe("NNNNN",Ui),Ue(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?v(n).era=i:v(n).invalidEra=e})),Pe("y",Re),Pe("yy",Re),Pe("yyy",Re),Pe("yyyy",Re),Pe("yo",Fi),Ue(["y","yy","yyy","yyyy"],We),Ue(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,i):t[We]=parseInt(e,10)})),F(0,["gg",2],0,(function(){return this.weekYear()%100})),F(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Vi("gggg","weekYear"),Vi("ggggg","weekYear"),Vi("GGGG","isoWeekYear"),Vi("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),oe("weekYear",1),oe("isoWeekYear",1),Pe("G",Te),Pe("g",Te),Pe("GG",we,ye),Pe("gg",we,ye),Pe("GGGG",xe,_e),Pe("gggg",xe,_e),Pe("GGGGG",Ce,ke),Pe("ggggg",Ce,ke),Fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ce(e)})),Fe(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),F("Q",0,"Qo","quarter"),ne("quarter","Q"),oe("quarter",7),Pe("Q",ge),Ue("Q",(function(e,t){t[He]=3*(ce(e)-1)})),F("D",["DD",2],"Do","date"),ne("date","D"),oe("date",9),Pe("D",we),Pe("DD",we,ye),Pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ue(["D","DD"],Ye),Ue("Do",(function(e,t){t[Ye]=ce(e.match(we)[0])}));var Zi=de("Date",!0);function Ji(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}F("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),oe("dayOfYear",4),Pe("DDD",Oe),Pe("DDDD",be),Ue(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ce(e)})),F("m",["mm",2],0,"minute"),ne("minute","m"),oe("minute",14),Pe("m",we),Pe("mm",we,ye),Ue(["m","mm"],$e);var ea=de("Minutes",!1);F("s",["ss",2],0,"second"),ne("second","s"),oe("second",15),Pe("s",we),Pe("ss",we,ye),Ue(["s","ss"],qe);var ta,na,ra=de("Seconds",!1);for(F("S",0,0,(function(){return~~(this.millisecond()/100)})),F(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),F(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),F(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),F(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),F(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),F(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),oe("millisecond",16),Pe("S",Oe,ge),Pe("SS",Oe,ye),Pe("SSS",Oe,be),ta="SSSS";ta.length<=9;ta+="S")Pe(ta,Re);function ia(e,t){t[Ke]=ce(1e3*("0."+e))}for(ta="S";ta.length<=9;ta+="S")Ue(ta,ia);function aa(){return this._isUTC?"UTC":""}function oa(){return this._isUTC?"Coordinated Universal Time":""}na=de("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var sa=w.prototype;function la(e){return qn(1e3*e)}function ua(){return qn.apply(null,arguments).parseZone()}function ca(e){return e}sa.add=Mr,sa.calendar=zr,sa.clone=Vr,sa.diff=Kr,sa.endOf=vi,sa.format=ei,sa.from=ti,sa.fromNow=ni,sa.to=ri,sa.toNow=ii,sa.get=pe,sa.invalidAt=Oi,sa.isAfter=Wr,sa.isBefore=Hr,sa.isBetween=Yr,sa.isSame=Gr,sa.isSameOrAfter=$r,sa.isSameOrBefore=qr,sa.isValid=Si,sa.lang=oi,sa.locale=ai,sa.localeData=si,sa.max=Xn,sa.min=Kn,sa.parsingFlags=Ei,sa.set=me,sa.startOf=mi,sa.subtract=Pr,sa.toArray=_i,sa.toObject=ki,sa.toDate=bi,sa.toISOString=Zr,sa.inspect=Jr,"undefined"!==typeof Symbol&&null!=Symbol.for&&(sa[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),sa.toJSON=wi,sa.toString=Qr,sa.unix=yi,sa.valueOf=gi,sa.creationData=xi,sa.eraName=Ai,sa.eraNarrow=ji,sa.eraAbbr=Li,sa.eraYear=Mi,sa.year=vt,sa.isLeapYear=gt,sa.weekYear=Wi,sa.isoWeekYear=Hi,sa.quarter=sa.quarters=Qi,sa.month=ct,sa.daysInMonth=dt,sa.week=sa.weeks=Rt,sa.isoWeek=sa.isoWeeks=Tt,sa.weeksInYear=$i,sa.weeksInWeekYear=qi,sa.isoWeeksInYear=Yi,sa.isoWeeksInISOWeekYear=Gi,sa.date=Zi,sa.day=sa.days=Ht,sa.weekday=Yt,sa.isoWeekday=Gt,sa.dayOfYear=Ji,sa.hour=sa.hours=rn,sa.minute=sa.minutes=ea,sa.second=sa.seconds=ra,sa.millisecond=sa.milliseconds=na,sa.utcOffset=pr,sa.utc=vr,sa.local=gr,sa.parseZone=yr,sa.hasAlignedHourOffset=br,sa.isDST=_r,sa.isLocal=wr,sa.isUtcOffset=Sr,sa.isUtc=Er,sa.isUTC=Er,sa.zoneAbbr=aa,sa.zoneName=oa,sa.dates=O("dates accessor is deprecated. Use date instead.",Zi),sa.months=O("months accessor is deprecated. Use month instead",ct),sa.years=O("years accessor is deprecated. Use year instead",vt),sa.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mr),sa.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kr);var da=L.prototype;function fa(e,t,n,r){var i=gn(),a=p().set(r,t);return i[n](a,e)}function ha(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return fa(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=fa(e,r,n,"month");return i}function pa(e,t,n,r){"boolean"===typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,a=gn(),o=e?a._week.dow:0,s=[];if(null!=n)return fa(t,(n+o)%7,r,"day");for(i=0;i<7;i++)s[i]=fa(t,(i+o)%7,r,"day");return s}function ma(e,t){return ha(e,t,"months")}function va(e,t){return ha(e,t,"monthsShort")}function ga(e,t,n){return pa(e,t,n,"weekdays")}function ya(e,t,n){return pa(e,t,n,"weekdaysShort")}function ba(e,t,n){return pa(e,t,n,"weekdaysMin")}da.calendar=P,da.longDateFormat=G,da.invalidDate=q,da.ordinal=Q,da.preparse=ca,da.postformat=ca,da.relativeTime=J,da.pastFuture=ee,da.set=A,da.eras=Ci,da.erasParse=Ri,da.erasConvertYear=Ti,da.erasAbbrRegex=Di,da.erasNameRegex=Pi,da.erasNarrowRegex=Ni,da.months=at,da.monthsShort=ot,da.monthsParse=lt,da.monthsRegex=ht,da.monthsShortRegex=ft,da.week=Et,da.firstDayOfYear=Ct,da.firstDayOfWeek=xt,da.weekdays=Ut,da.weekdaysMin=zt,da.weekdaysShort=Ft,da.weekdaysParse=Wt,da.weekdaysRegex=$t,da.weekdaysShortRegex=qt,da.weekdaysMinRegex=Kt,da.isPM=tn,da.meridiem=an,pn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",pn),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",gn);var _a=Math.abs;function ka(){var e=this._data;return this._milliseconds=_a(this._milliseconds),this._days=_a(this._days),this._months=_a(this._months),e.milliseconds=_a(e.milliseconds),e.seconds=_a(e.seconds),e.minutes=_a(e.minutes),e.hours=_a(e.hours),e.months=_a(e.months),e.years=_a(e.years),this}function wa(e,t,n,r){var i=Cr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Sa(e,t){return wa(this,e,t,1)}function Ea(e,t){return wa(this,e,t,-1)}function Oa(e){return e<0?Math.floor(e):Math.ceil(e)}function xa(){var e,t,n,r,i,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*Oa(Ra(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=ue(a/1e3),l.seconds=e%60,t=ue(e/60),l.minutes=t%60,n=ue(t/60),l.hours=n%24,o+=ue(n/24),s+=i=ue(Ca(o)),o-=Oa(Ra(i)),r=ue(s/12),s%=12,l.days=o,l.months=s,l.years=r,this}function Ca(e){return 4800*e/146097}function Ra(e){return 146097*e/4800}function Ta(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ca(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ra(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Aa(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ce(this._months/12):NaN}function ja(e){return function(){return this.as(e)}}var La=ja("ms"),Ma=ja("s"),Pa=ja("m"),Da=ja("h"),Na=ja("d"),Ia=ja("w"),Ba=ja("M"),Ua=ja("Q"),Fa=ja("y");function za(){return Cr(this)}function Va(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Wa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ha=Wa("milliseconds"),Ya=Wa("seconds"),Ga=Wa("minutes"),$a=Wa("hours"),qa=Wa("days"),Ka=Wa("months"),Xa=Wa("years");function Qa(){return ue(this.days()/7)}var Za=Math.round,Ja={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function eo(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function to(e,t,n,r){var i=Cr(e).abs(),a=Za(i.as("s")),o=Za(i.as("m")),s=Za(i.as("h")),l=Za(i.as("d")),u=Za(i.as("M")),c=Za(i.as("w")),d=Za(i.as("y")),f=a<=n.ss&&["s",a]||a0,f[4]=r,eo.apply(null,f)}function no(e){return void 0===e?Za:"function"===typeof e&&(Za=e,!0)}function ro(e,t){return void 0!==Ja[e]&&(void 0===t?Ja[e]:(Ja[e]=t,"s"===e&&(Ja.ss=t-1),!0))}function io(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=Ja;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(a=Object.assign({},Ja,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=to(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var ao=Math.abs;function oo(e){return(e>0)-(e<0)||+e}function so(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,a,o,s,l=ao(this._milliseconds)/1e3,u=ao(this._days),c=ao(this._months),d=this.asSeconds();return d?(e=ue(l/60),t=ue(e/60),l%=60,e%=60,n=ue(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",a=oo(this._months)!==oo(d)?"-":"",o=oo(this._days)!==oo(d)?"-":"",s=oo(this._milliseconds)!==oo(d)?"-":"",i+"P"+(n?a+n+"Y":"")+(c?a+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var lo=ar.prototype;return lo.isValid=rr,lo.abs=ka,lo.add=Sa,lo.subtract=Ea,lo.as=Ta,lo.asMilliseconds=La,lo.asSeconds=Ma,lo.asMinutes=Pa,lo.asHours=Da,lo.asDays=Na,lo.asWeeks=Ia,lo.asMonths=Ba,lo.asQuarters=Ua,lo.asYears=Fa,lo.valueOf=Aa,lo._bubble=xa,lo.clone=za,lo.get=Va,lo.milliseconds=Ha,lo.seconds=Ya,lo.minutes=Ga,lo.hours=$a,lo.days=qa,lo.weeks=Qa,lo.months=Ka,lo.years=Xa,lo.humanize=io,lo.toISOString=so,lo.toString=so,lo.toJSON=so,lo.locale=ai,lo.localeData=si,lo.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",so),lo.lang=oi,F("X",0,0,"unix"),F("x",0,0,"valueOf"),Pe("x",Te),Pe("X",Le),Ue("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ue("x",(function(e,t,n){n._d=new Date(ce(e))})),r.version="2.29.1",i(qn),r.fn=sa,r.min=Zn,r.max=Jn,r.now=er,r.utc=p,r.unix=la,r.months=ma,r.isDate=d,r.locale=pn,r.invalid=y,r.duration=Cr,r.isMoment=S,r.weekdays=ga,r.parseZone=ua,r.localeData=gn,r.isDuration=or,r.monthsShort=va,r.weekdaysMin=ba,r.defineLocale=mn,r.updateLocale=vn,r.locales=yn,r.weekdaysShort=ya,r.normalizeUnits=re,r.relativeTimeRounding=no,r.relativeTimeThreshold=ro,r.calendarFormat=Fr,r.prototype=sa,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(171)(e))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(178),i=(n(0),n(47));function a(){return Object(r.a)()||i.a}},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(e){return e.scrollTop};function i(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return T})),n.d(t,"d",(function(){return j})),n.d(t,"c",(function(){return m})),n.d(t,"f",(function(){return v})),n.d(t,"e",(function(){return p}));var r=n(1);function i(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,i=e.length;r=0;f--){var h=o[f];"."===h?a(o,f):".."===h?(a(o,f),d++):d&&(a(o,f),d--)}if(!u)for(;d--;d)o.unshift("..");!u||""===o[0]||o[0]&&i(o[0])||o.unshift("");var p=o.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(28);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function h(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(e,t,n,i){var a;"string"===typeof e?(a=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=Object(r.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=o(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function g(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,i):n.push(i),d({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=m(e,t,f(),_.location);c.confirmTransitionTo(i,r,n,(function(e){e&&(_.entries[_.index]=i,d({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return _}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(3),i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(e){return"".concat(Math.round(e),"ms")}t.a={easing:i,duration:a,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?a.standard:n,l=t.easing,u=void 0===l?i.easeInOut:l,c=t.delay,d=void 0===c?0:c;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:o(s)," ").concat(u," ").concat("string"===typeof d?d:o(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){e.exports=n(148)},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(77);var i=n(115),a=n(79);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(a.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(116);var i=n(79),a=n(117);function o(e,t){return Object(r.a)(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||Object(i.a)(e,t)||Object(a.a)()}},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(0),o=(n(6),n(4)),s=n(5),l=n(9),u={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},c=a.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,c=e.classes,d=e.className,f=e.color,h=void 0===f?"initial":f,p=e.component,m=e.display,v=void 0===m?"initial":m,g=e.gutterBottom,y=void 0!==g&&g,b=e.noWrap,_=void 0!==b&&b,k=e.paragraph,w=void 0!==k&&k,S=e.variant,E=void 0===S?"body1":S,O=e.variantMapping,x=void 0===O?u:O,C=Object(i.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),R=p||(w?"p":x[E]||u[E])||"span";return a.createElement(R,Object(r.a)({className:Object(o.a)(c.root,d,"inherit"!==E&&c[E],"initial"!==h&&c["color".concat(Object(l.a)(h))],_&&c.noWrap,y&&c.gutterBottom,w&&c.paragraph,"inherit"!==s&&c["align".concat(Object(l.a)(s))],"initial"!==v&&c["display".concat(Object(l.a)(v))]),ref:t},C))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(c)},function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),a=0;a0?r:e)-u/100).concat(a,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},c)}function u(e,t,n){var i;return Object(o.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(o.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(o.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var c=n(122),d={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},h={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},p={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},m={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},b=n(14),_={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},k={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){var i=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(b.d)(e.main,i):"dark"===t&&(e.dark=Object(b.a)(e.main,a)))}function S(e){var t=e.primary,n=void 0===t?{light:h[300],main:h[500],dark:h[700]}:t,r=e.secondary,s=void 0===r?{light:p.A200,main:p.A400,dark:p.A700}:r,l=e.error,u=void 0===l?{light:m[300],main:m[500],dark:m[700]}:l,S=e.warning,E=void 0===S?{light:v[300],main:v[500],dark:v[700]}:S,O=e.info,x=void 0===O?{light:g[300],main:g[500],dark:g[700]}:O,C=e.success,R=void 0===C?{light:y[300],main:y[500],dark:y[700]}:C,T=e.type,A=void 0===T?"light":T,j=e.contrastThreshold,L=void 0===j?3:j,M=e.tonalOffset,P=void 0===M?.2:M,D=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function N(e){return Object(b.c)(e,k.text.primary)>=L?k.text.primary:_.text.primary}var I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(o.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(c.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(c.a)(5,JSON.stringify(e.main)));return w(e,"light",n,P),w(e,"dark",r,P),e.contrastText||(e.contrastText=N(e.main)),e},B={dark:k,light:_};return Object(a.a)(Object(o.a)({common:d,type:A,primary:I(n),secondary:I(s,"A400","A200","A700"),error:I(u),warning:I(E),info:I(x),success:I(R),grey:f,contrastThreshold:L,getContrastText:N,augmentColor:I,tonalOffset:P},B[A]),D)}function E(e){return Math.round(1e5*e)/1e5}var O={textTransform:"uppercase"},x='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,s=void 0===r?x:r,l=n.fontSize,u=void 0===l?14:l,c=n.fontWeightLight,d=void 0===c?300:c,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,m=void 0===p?500:p,v=n.fontWeightBold,g=void 0===v?700:v,y=n.htmlFontSize,b=void 0===y?16:y,_=n.allVariants,k=n.pxToRem,w=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var S=u/14,C=k||function(e){return"".concat(e/b*S,"rem")},R=function(e,t,n,r,i){return Object(o.a)({fontFamily:s,fontWeight:e,fontSize:C(t),lineHeight:n},s===x?{letterSpacing:"".concat(E(r/t),"em")}:{},i,_)},T={h1:R(d,96,1.167,-1.5),h2:R(d,60,1.2,-.5),h3:R(h,48,1.167,0),h4:R(h,34,1.235,.25),h5:R(h,24,1.334,0),h6:R(m,20,1.6,.15),subtitle1:R(h,16,1.75,.15),subtitle2:R(m,14,1.57,.1),body1:R(h,16,1.5,.15),body2:R(h,14,1.43,.15),button:R(m,14,1.75,.4,O),caption:R(h,12,1.66,.4),overline:R(h,12,2.66,1,O)};return Object(a.a)(Object(o.a)({htmlFontSize:b,pxToRem:C,round:E,fontFamily:s,fontSize:u,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:g},T),w,{clone:!1})}function R(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var T=["none",R(0,2,1,-1,0,1,1,0,0,1,3,0),R(0,3,1,-2,0,2,2,0,0,1,5,0),R(0,3,3,-2,0,3,4,0,0,1,8,0),R(0,2,4,-1,0,4,5,0,0,1,10,0),R(0,3,5,-1,0,5,8,0,0,1,14,0),R(0,3,5,-1,0,6,10,0,0,1,18,0),R(0,4,5,-2,0,7,10,1,0,2,16,1),R(0,5,5,-3,0,8,10,1,0,3,14,2),R(0,5,6,-3,0,9,12,1,0,3,16,2),R(0,6,6,-3,0,10,14,1,0,4,18,3),R(0,6,7,-4,0,11,15,1,0,4,20,3),R(0,7,8,-4,0,12,17,2,0,5,22,4),R(0,7,8,-4,0,13,19,2,0,5,24,4),R(0,7,9,-4,0,14,21,2,0,5,26,4),R(0,8,9,-5,0,15,22,2,0,6,28,5),R(0,8,10,-5,0,16,24,2,0,6,30,5),R(0,8,11,-5,0,17,26,2,0,6,32,5),R(0,9,11,-5,0,18,28,2,0,7,34,6),R(0,9,12,-6,0,19,29,2,0,7,36,6),R(0,10,13,-6,0,20,31,3,0,8,38,7),R(0,10,13,-6,0,21,33,3,0,8,40,7),R(0,10,14,-6,0,22,35,3,0,8,42,7),R(0,11,14,-7,0,23,36,3,0,9,44,8),R(0,11,15,-7,0,24,38,3,0,9,46,8)],A={borderRadius:4},j=n(249);function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(j.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,s=e.palette,c=void 0===s?{}:s,d=e.spacing,f=e.typography,h=void 0===f?{}:f,p=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=S(c),v=l(n),g=L(d),y=Object(a.a)({breakpoints:v,direction:"ltr",mixins:u(v,g,o),overrides:{},palette:m,props:{},shadows:T,typography:C(m,h),spacing:g,shape:A,transitions:M.a,zIndex:P.a},p),b=arguments.length,_=new Array(b>1?b-1:0),k=1;k ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)}}]),e}();u.GLOBAL_TAG="flv.js",u.FORCE_GLOBAL_TAG=!1,u.ENABLE_ERROR=!0,u.ENABLE_INFO=!0,u.ENABLE_WARN=!0,u.ENABLE_DEBUG=!0,u.ENABLE_VERBOSE=!0,u.ENABLE_CALLBACK=!1,u.emitter=new l.a;var c=u,d=function(){function e(){Object(r.a)(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(i.a)(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}(),f=n(21),h=n(20),p=function(){function e(t){Object(r.a)(this,e),this._message=t}return Object(i.a)(e,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),e}(),m=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"IllegalStateException"}}]),n}(p),v=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"InvalidArgumentException"}}]),n}(p),g=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"NotImplementedException"}}]),n}(p),y={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},b={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},_=function(){function e(t){Object(r.a)(this,e),this._type=t||"undefined",this._status=y.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._status=y.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===y.kConnecting||this._status===y.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"open",value:function(e,t){throw new g("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new g("Unimplemented abstract function!")}}]),e}(),k=n(22);function w(e,t,n){return(w="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(k.a)(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var S={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},i={};if(r.browser){i[r.browser]=!0;var a=r.majorVersion.split(".");i.version={major:parseInt(r.majorVersion,10),string:r.version},a.length>1&&(i.version.minor=parseInt(a[1],10)),a.length>2&&(i.version.build=parseInt(a[2],10))}if(r.platform&&(i[r.platform]=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv||i.iemobile){i.rv&&delete i.rv;var o="msie";r.browser=o,i.msie=!0}if(i.edge){delete i.edge;var s="msedge";r.browser=s,i.msedge=!0}if(i.opr){var l="opera";r.browser=l,i.opera=!0}if(i.safari&&i.android){var u="android";r.browser=u,i.android=!0}for(var c in i.name=r.browser,i.platform=r.platform,S)S.hasOwnProperty(c)&&delete S[c];Object.assign(S,i)}();var E=S,O=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"fetch-stream-loader")).TAG="FetchStreamLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),w(Object(k.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(r=e.redirectedURL);var i=this._seekHandler.getConfig(r,t),a=new self.Headers;if("object"===typeof i.headers){var o=i.headers;for(var s in o)o.hasOwnProperty(s)&&a.append(s,o[s])}var l={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===typeof this._config.headers)for(var u in this._config.headers)a.append(u,this._config.headers[u]);!1===e.cors&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=y.kConnecting,self.fetch(i.url,l).then((function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=y.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==i.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var r=e.headers.get("Content-Length");return null!=r&&(n._contentLength=parseInt(r),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=y.kError,!n._onError)throw new p("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(b.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=y.kError,!n._onError)throw e;n._onError(b.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength=15048,t=!E.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(n){return!1}}}]),n}(_),x=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"xhr-moz-chunked-loader")).TAG="MozChunkedLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._xhr=null,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),w(Object(k.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t);this._requestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="moz-chunked-arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onloadend=this._onLoadEnd.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"===typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"===typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}this._status=y.kConnecting,i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=y.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=y.kError,!this._onError)throw new p("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(b.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=y.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==y.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==y.kError&&(this._status=y.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=y.kError;var t=0,n=null;if(this._contentLength&&e.loaded=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?n=this._currentRedirectedURL:void 0!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"===typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"===typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=y.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=y.kBuffering}else{if(this._status=y.kError,!this._onError)throw new p("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(b.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==y.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,r=0,i=0,a=n;if(e=t[r]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0)for(var a=n.split("&"),o=0;o0;s[0]!==this._startName&&s[0]!==this._endName&&(l&&(i+="&"),i+=a[o])}return 0===i.length?t:t+"?"+i}}]),e}(),j=function(){function e(t,n,i){Object(r.a)(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,void 0!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new d,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(i.a)(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===C?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new T(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new A(t,n)}else{if("custom"!==e.seekType)throw new v("Invalid seekType in config: ".concat(e.seekType));if("function"!==typeof e.customSeekHandler)throw new v("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=R;else if(O.isSupported())this._loaderClass=O;else if(x.isSupported())this._loaderClass=x;else{if(!C.isSupported())throw new p("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=C}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!==typeof e||0===e.length)throw new v("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+10485760){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(r,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,r=0,i=0,a=n;if(e=t[r]&&e=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize0){var o=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(o,this._stashByteStart);if(s0){var l=new Uint8Array(o,s);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var u=this._dispatchChunks(e,t);if(uthis._bufferSize&&(this._expandBuffer(c),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,u),0),this._stashUsed+=c,this._stashByteStart=t+u}}}else if(0===this._stashUsed){var d=this._dispatchChunks(e,t);if(dthis._bufferSize&&this._expandBuffer(f),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,d),0),this._stashUsed+=f,this._stashByteStart=t+d}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var h=new Uint8Array(this._stashBuffer,0,this._bufferSize);h.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p0){var v=new Uint8Array(this._stashBuffer,p);h.set(v,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-n;if(n0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,n);i.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=n}return 0}c.w(this.TAG,"".concat(r," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(c.e(this.TAG,"Loader error, code = ".concat(t.code,", msg = ").concat(t.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=b.UNRECOVERABLE_EARLY_EOF),e){case b.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){c.emitter.addListener("log",t),c.emitter.listenerCount("log")>0&&(c.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){c.emitter.removeListener("log",t),0===c.emitter.listenerCount("log")&&(c.ENABLE_CALLBACK=!1,e._notifyChange())}}]),e}();N.emitter=new l.a;var I=N,B=function(){function e(){Object(r.a)(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(i.a)(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,r=e.length-1,i=0,a=0,o=r;for(t=e[i]&&t=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(U(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!==(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&U(n,r,3)){var s=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},z=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),V=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"parseScriptData",value:function(t,n,r){var i={};try{var a=e.parseValue(t,n,r),o=e.parseValue(t,n+a.size,r-a.size);i[a.data]=o.data}catch(s){c.e("AMF",s.toString())}return i}},{key:"parseObject",value:function(t,n,r){if(r<3)throw new m("Data not enough when parse ScriptDataObject");var i=e.parseString(t,n,r),a=e.parseValue(t,n+i.size,r-i.size),o=a.objectEnd;return{data:{name:i.data,value:a.data},size:i.size+a.size,objectEnd:o}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new m("Data not enough when parse String");var r=new DataView(e,t,n).getUint16(0,!z);return{data:r>0?F(new Uint8Array(e,t+2,r)):"",size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new m("Data not enough when parse LongString");var r=new DataView(e,t,n).getUint32(0,!z);return{data:r>0?F(new Uint8Array(e,t+4,r)):"",size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new m("Data size invalid when parse Date");var r=new DataView(e,t,n),i=r.getFloat64(0,!z),a=r.getInt16(8,!z);return{data:new Date(i+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,r){if(r<1)throw new m("Data not enough when parse Value");var i,a=new DataView(t,n,r),o=1,s=a.getUint8(0),l=!1;try{switch(s){case 0:i=a.getFloat64(1,!z),o+=8;break;case 1:i=!!a.getUint8(1),o+=1;break;case 2:var u=e.parseString(t,n+1,r-1);i=u.data,o+=u.size;break;case 3:i={};var d=0;for(9===(16777215&a.getUint32(r-4,!z))&&(d=3);o32)throw new v("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),a=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}(),H=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,a=0;a=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(r[i]=t[a],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new W(n);r.readByte();var i=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var o=e.getProfileString(i),s=e.getLevelString(a),l=1,u=420,c=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(u=[0,420,422,444][l]),c=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var d=3!==l?8:12,f=0;f0&&A<16?(E=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][A-1],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][A-1]):255===A&&(E=r.readByte()<<8|r.readByte(),O=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var j=r.readBits(32),L=r.readBits(32);C=r.readBool(),x=(R=L)/(T=2*j)}}var M=1;1===E&&1===O||(M=E/O);var P=0,D=0;0===l?(P=1,D=2-b):(P=3===l?1:2,D=(1===l?2:1)*(2-b));var N=16*(g+1),I=16*(y+1)*(2-b);N-=(_+k)*P,I-=(w+S)*D;var B=Math.ceil(N*M);return r.destroy(),r=null,{profile_string:o,level_string:s,bit_depth:c,ref_frames:v,chroma_format:u,chroma_format_string:e.getChromaFormatString(u),frame_rate:{fixed:C,fps:x,fps_den:T,fps_num:R},sar_ratio:{width:E,height:O},codec_size:{width:N,height:I},present_size:{width:B,height:I}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i13))return 0;r=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&c.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,r).getUint32(0,!i)&&c.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);for(;rt.byteLength)break;var o=a.getUint8(0),s=16777215&a.getUint32(0,!i);if(r+11+s+4>t.byteLength)break;if(8===o||9===o||18===o){var l=a.getUint8(4),u=a.getUint8(5),d=a.getUint8(6)|u<<8|l<<16|a.getUint8(7)<<24;0!==(16777215&a.getUint32(7,!i))&&c.w(this.TAG,"Meet tag which has StreamID != 0!");var f=r+11;switch(o){case 8:this._parseAudioData(t,f,s,d);break;case 9:this._parseVideoData(t,f,s,d,n+r);break;case 18:this._parseScriptData(t,f,s)}var h=a.getUint32(11+s,!i);h!==11+s&&c.w(this.TAG,"Invalid PrevTagSize ".concat(h)),r+=11+s+4}else c.w(this.TAG,"Unsupported tag type ".concat(o,", skipped")),r+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(e,t,n){var r=V.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==typeof r.onMetaData)return void c.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&c.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var i=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},i)),"boolean"===typeof i.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=i.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"===typeof i.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=i.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"===typeof i.audiodatarate&&(this._mediaInfo.audioDataRate=i.audiodatarate),"number"===typeof i.videodatarate&&(this._mediaInfo.videoDataRate=i.videodatarate),"number"===typeof i.width&&(this._mediaInfo.width=i.width),"number"===typeof i.height&&(this._mediaInfo.height=i.height),"number"===typeof i.duration){if(!this._durationOverrided){var a=Math.floor(i.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"===typeof i.framerate){var o=Math.floor(1e3*i.framerate);if(o>0){var s=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=s,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=s}}if("object"===typeof i.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var l=i.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),i.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=i,c.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r>>4;if(2===a||10===a){var o=0,s=(12&i)>>>2;if(s>=0&&s<=4){o=this._flvSoundRateTable[s];var l=1&i,u=this._audioMetadata,d=this._audioTrack;if(u||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(u=this._audioMetadata={}).type="audio",u.id=d.id,u.timescale=this._timescale,u.duration=this._duration,u.audioSampleRate=o,u.channelCount=0===l?1:2),10===a){var f=this._parseAACAudioData(e,t+1,n-1);if(void 0==f)return;if(0===f.packetType){u.config&&c.w(this.TAG,"Found another AudioSpecificConfig!");var h=f.data;u.audioSampleRate=h.samplingRate,u.channelCount=h.channelCount,u.codec=h.codec,u.originalCodec=h.originalCodec,u.config=h.config,u.refSampleDuration=1024/u.audioSampleRate*u.timescale,c.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",u);var p=this._mediaInfo;p.audioCodec=u.originalCodec,p.audioSampleRate=u.audioSampleRate,p.audioChannelCount=u.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===f.packetType){var m=this._timestampBase+r,v={unit:f.data,length:f.data.byteLength,dts:m,pts:m};d.samples.push(v),d.length+=f.data.length}else c.e(this.TAG,"Flv: Unsupported AAC data type ".concat(f.packetType))}else if(2===a){if(!u.codec){var g=this._parseMP3AudioData(e,t+1,n-1,!0);if(void 0==g)return;u.audioSampleRate=g.samplingRate,u.channelCount=g.channelCount,u.codec=g.codec,u.originalCodec=g.originalCodec,u.refSampleDuration=1152/u.audioSampleRate*u.timescale,c.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",u);var y=this._mediaInfo;y.audioCodec=u.codec,y.audioSampleRate=u.audioSampleRate,y.audioChannelCount=u.channelCount,y.audioDataRate=g.bitRate,y.hasVideo?null!=y.videoCodec&&(y.mimeType='video/x-flv; codecs="'+y.videoCodec+","+y.audioCodec+'"'):y.mimeType='video/x-flv; codecs="'+y.audioCodec+'"',y.isComplete()&&this._onMediaInfo(y)}var b=this._parseMP3AudioData(e,t+1,n-1,!1);if(void 0==b)return;var _=this._timestampBase+r,k={unit:b,length:b.byteLength,dts:_,pts:_};d.samples.push(k),d.length+=b.length}}else this._onError(Y.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+s)}else this._onError(Y.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}c.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r,i,a=new Uint8Array(e,t,n),o=null,s=0,l=null;if(s=r=a[0]>>>3,(i=(7&a[0])<<1|a[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(Y.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var u=this._mpegSamplingRates[i],c=(120&a[1])>>>3;if(!(c<0||c>=8)){5===s&&(l=(7&a[1])<<1|a[2]>>>7,(124&a[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?i>=6?(s=5,o=new Array(4),l=i-3):(s=2,o=new Array(2),l=i):-1!==d.indexOf("android")?(s=2,o=new Array(2),l=i):(s=5,l=i,o=new Array(4),i>=6?l=i-3:1===c&&(s=2,o=new Array(2),l=i)),o[0]=s<<3,o[0]|=(15&i)>>>1,o[1]=(15&i)<<7,o[1]|=(15&c)<<3,5===s&&(o[1]|=(15&l)>>>1,o[2]=(1&l)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:u,channelCount:c,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}this._onError(Y.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,r){if(!(n<4)){this._littleEndian;var i=new Uint8Array(e,t,n),a=null;if(r){if(255!==i[0])return;var o=i[1]>>>3&3,s=(6&i[1])>>1,l=(240&i[2])>>>4,u=(12&i[2])>>>2,d=3!==(i[3]>>>6&3)?2:1,f=0,h=0;switch(o){case 0:f=this._mpegAudioV25SampleRateTable[u];break;case 2:f=this._mpegAudioV20SampleRateTable[u];break;case 3:f=this._mpegAudioV10SampleRateTable[u]}switch(s){case 1:34,l>>4,s=15&a;7===s?this._parseAVCVideoPacket(e,t+1,n-1,r,i,o):this._onError(Y.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(s))}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,a){if(n<4)c.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,s=new DataView(e,t,n),l=s.getUint8(0),u=(16777215&s.getUint32(0,!o))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===l)this._parseAVCVideoData(e,t+4,n-4,r,i,a,u);else if(2!==l)return void this._onError(Y.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)c.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,a=this._littleEndian,o=new DataView(e,t,n);r?"undefined"!==typeof r.avcc&&c.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var s=o.getUint8(0),l=o.getUint8(1);o.getUint8(2),o.getUint8(3);if(1===s&&0!==l)if(this._naluLengthSize=1+(3&o.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var u=31&o.getUint8(5);if(0!==u){u>1&&c.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(u));for(var d=6,f=0;f1&&c.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(S)),d++;for(var E=0;E=n){c.w(this.TAG,"Malformed Nalu near timestamp ".concat(p,", offset = ").concat(f,", dataSize = ").concat(n));break}var v=l.getUint32(f,!s);if(3===h&&(v>>>=8),v>n-h)return void c.w(this.TAG,"Malformed Nalus near timestamp ".concat(p,", NaluSize > DataSize!"));var g=31&l.getUint8(f+h);5===g&&(m=!0);var y=new Uint8Array(e,t+f,h+v),b={type:g,data:y};u.push(b),d+=y.byteLength,f+=h+v}if(u.length){var _=this._videoTrack,k={units:u,length:d,isKeyframe:m,dts:p,cts:o,pts:p+o};m&&(k.fileposition=i),_.samples.push(k),_.length+=d}}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r,i,a=(4&t[4])>>>2!==0,o=0!==(1&t[4]),s=(r=t)[i=5]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3];return s<9?n:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:a,hasVideoTrack:o}}}]),e}(),$=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"init",value:function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,a=0;a>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var o=8,s=0;s>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],i)}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>>8&255,255&r,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.sdtp(t),s=e.trun(t,o.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,a,s,o)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),a=0;a>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s>>24&255,l>>>16&255,l>>>8&255,255&l,u>>>24&255,u>>>16&255,u>>>8&255,255&u,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return e.box(e.types.trun,o)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();$.init();var q=$,K=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}(),X=function e(t,n,i,a,o){Object(r.a)(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=a,this.isSyncPoint=o,this.fileposition=null},Q=function(){function e(){Object(r.a)(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(i.a)(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),Z=function(){function e(){Object(r.a)(this,e),this._list=[]}return Object(i.a)(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts=t[i].dts&&et[r].lastSample.originalDts&&e=t[r].lastSample.originalDts&&(r===t.length-1||r0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}}]),e}(),ee=function(){function e(t){Object(r.a)(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new J("audio"),this._videoSegmentInfoList=new J("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!E.chrome||!(E.version.major<50||50===E.version.major&&E.version.build<2661)),this._fillSilentAfterSeek=E.msedge||E.msie,this._mp3UseMpegAudio=!E.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(i.a)(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=q.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=q.generateInitSegment(t)}if(!this._onInitSegment)throw new m("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:"".concat(e,"/").concat(r),mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n,r=e,i=r.samples,a=void 0,o=-1,s=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,u=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(i&&0!==i.length&&(1!==i.length||t)){var f=0,h=null,p=0;l?(f=0,p=r.length):(f=8,p=8+r.length);var m=null;if(i.length>1&&(p-=(m=i.pop()).length),null!=this._audioStashedLastSample){var v=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(v),p+=v.length}null!=m&&(this._audioStashedLastSample=m);var g=i[0].dts-this._dtsBase;if(this._audioNextDts)a=g-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())a=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{var y=this._audioSegmentInfoList.getLastSampleBefore(g);if(null!=y){var b=g-(y.originalDts+y.duration);b<=3&&(b=0),a=g-(y.dts+y.duration+b)}else a=0}if(d){var _=g-a,k=this._videoSegmentInfoList.getLastSegmentBefore(g);if(null!=k&&k.beginDts<_){var w=K.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(w){var S=k.beginDts,O=_-k.beginDts;c.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(S,", duration: ").concat(O)),i.unshift({unit:w,dts:S,pts:S}),p+=w.byteLength}}else d=!1}for(var x=[],C=0;C=1?x[x.length-1].duration:Math.floor(s);var M=!1,P=null;if(L>1.5*s&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!E.safari){M=!0;var D=Math.abs(L-s),N=Math.ceil(D/s),I=j+s;c.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"dts: ".concat(j+L," ms, expected: ").concat(j+Math.round(s)," ms, ")+"delta: ".concat(Math.round(D)," ms, generate: ").concat(N," frames"));var B=K.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==B&&(c.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),B=T),P=[];for(var U=0;U0){var z=P[P.length-1];z.duration=F-z.dts}var V={dts:F,pts:F,cts:0,unit:B,size:B.byteLength,duration:0,originalDts:A,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};P.push(V),p+=V.size,I+=s}var W=P[P.length-1];W.duration=j+L-W.dts,L=Math.round(s)}x.push({dts:j,pts:j,cts:0,unit:R.unit,size:R.unit.byteLength,duration:L,originalDts:A,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),M&&x.push.apply(x,P)}l?h=new Uint8Array(p):((h=new Uint8Array(p))[0]=p>>>24&255,h[1]=p>>>16&255,h[2]=p>>>8&255,h[3]=255&p,h.set(q.types.mdat,4));for(var H=0;H1&&(d-=(f=a.pop()).length),null!=this._videoStashedLastSample){var h=this._videoStashedLastSample;this._videoStashedLastSample=null,a.unshift(h),d+=h.length}null!=f&&(this._videoStashedLastSample=f);var p=a[0].dts-this._dtsBase;if(this._videoNextDts)o=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=m){var v=p-(m.originalDts+m.duration);v<=3&&(v=0),o=p-(m.dts+m.duration+v)}else o=0}for(var g=new Q,y=[],b=0;b=1?y[y.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(w){var C=new X(S,O,x,_.dts,!0);C.fileposition=_.fileposition,g.appendSyncPoint(C)}y.push({dts:S,pts:O,cts:E,units:_.units,size:_.length,isKeyframe:w,duration:x,originalDts:k,flags:{isLeading:0,dependsOn:w?2:1,isDependedOn:w?1:0,hasRedundancy:0,isNonSync:w?0:1}})}(c=new Uint8Array(d))[0]=d>>>24&255,c[1]=d>>>16&255,c[2]=d>>>8&255,c[3]=255&d,c.set(q.types.mdat,4);for(var R=0;R0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(e,t);else if((r=G.probe(e)).match){this._demuxer=new G(r,this._config),this._remuxer||(this._remuxer=new ee(this._config));var a=this._mediaDataSource;void 0==a.duration||isNaN(a.duration)||(this._demuxer.overridedDuration=a.duration),"boolean"===typeof a.hasAudio&&(this._demuxer.overridedHasAudio=a.hasAudio),"boolean"===typeof a.hasVideo&&(this._demuxer.overridedHasVideo=a.hasVideo),this._demuxer.timestampBase=a.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),i=this._demuxer.parseChunks(e,t)}else r=null,c.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(te.DEMUX_ERROR,Y.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,B.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,B.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(te.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(te.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(te.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(te.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(te.STATISTICS_INFO,e)}}]),e}(),re=function(e){var t=null,n=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);function r(t,n){var r={msg:te.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function i(t,n){var r={msg:te.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function a(){var t={msg:te.LOADING_COMPLETE};e.postMessage(t)}function s(){var t={msg:te.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){var n={msg:te.MEDIA_INFO,data:t};e.postMessage(n)}function u(t){var n={msg:te.METADATA_ARRIVED,data:t};e.postMessage(n)}function c(t){var n={msg:te.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function d(t){var n={msg:te.STATISTICS_INFO,data:t};e.postMessage(n)}function f(t,n){e.postMessage({msg:te.IO_ERROR,data:{type:t,info:n}})}function h(t,n){e.postMessage({msg:te.DEMUX_ERROR,data:{type:t,info:n}})}function p(t){e.postMessage({msg:te.RECOMMEND_SEEKPOINT,data:t})}o.install(),e.addEventListener("message",(function(o){switch(o.data.cmd){case"init":(t=new ne(o.data.param[0],o.data.param[1])).on(te.IO_ERROR,f.bind(this)),t.on(te.DEMUX_ERROR,h.bind(this)),t.on(te.INIT_SEGMENT,r.bind(this)),t.on(te.MEDIA_SEGMENT,i.bind(this)),t.on(te.LOADING_COMPLETE,a.bind(this)),t.on(te.RECOVERED_EARLY_EOF,s.bind(this)),t.on(te.MEDIA_INFO,l.bind(this)),t.on(te.METADATA_ARRIVED,u.bind(this)),t.on(te.SCRIPTDATA_ARRIVED,c.bind(this)),t.on(te.STATISTICS_INFO,d.bind(this)),t.on(te.RECOMMEND_SEEKPOINT,p.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(o.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var m=o.data.param;I.applyConfig(m),!0===m.enableCallback?I.addLogListener(n):I.removeLogListener(n)}}))},ie=function(){function e(t,i){if(Object(r.a)(this,e),this.TAG="Transmuxer",this._emitter=new l.a,i.enableWorker&&"undefined"!==typeof Worker)try{var a=n(147);this._worker=a(re),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},I.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:I.getConfig()})}catch(s){c.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ne(t,i)}else this._controller=new ne(t,i);if(this._controller){var o=this._controller;o.on(te.IO_ERROR,this._onIOError.bind(this)),o.on(te.DEMUX_ERROR,this._onDemuxError.bind(this)),o.on(te.INIT_SEGMENT,this._onInitSegment.bind(this)),o.on(te.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),o.on(te.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),o.on(te.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),o.on(te.MEDIA_INFO,this._onMediaInfo.bind(this)),o.on(te.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),o.on(te.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),o.on(te.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),o.on(te.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(i.a)(e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),I.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(te.INIT_SEGMENT,e,t)}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(te.MEDIA_SEGMENT,e,t)}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(te.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(te.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(te.MEDIA_INFO,e)}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(te.METADATA_ARRIVED,e)}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(te.SCRIPTDATA_ARRIVED,e)}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(te.STATISTICS_INFO,e)}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(te.IO_ERROR,e,t)}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(te.DEMUX_ERROR,e,t)}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(te.RECOMMEND_SEEKPOINT,e)}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case te.INIT_SEGMENT:case te.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case te.LOADING_COMPLETE:case te.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case te.MEDIA_INFO:Object.setPrototypeOf(n,B.prototype),this._emitter.emit(t.msg,n);break;case te.METADATA_ARRIVED:case te.SCRIPTDATA_ARRIVED:case te.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case te.IO_ERROR:case te.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case te.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":c.emitter.emit("log",n.type,n.logcat)}}}]),e}(),ae={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},oe=function(){function e(t){Object(r.a)(this,e),this.TAG="MSEController",this._config=t,this._emitter=new l.a,this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Z}return Object(i.a)(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(i){c.e(this.TAG,i.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(i){c.e(this.TAG,i.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,r="".concat(n.container);n.codec&&n.codec.length>0&&(r+=";codecs=".concat(n.codec));var i=!1;if(c.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])c.v(this.TAG,"Notice: ".concat(n.type," mimeType changed, origin: ").concat(this._mimeTypes[n.type],", target: ").concat(r));else{i=!0;try{var a=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(o){return c.e(this.TAG,o.message),void this._emitter.emit(ae.ERROR,{code:o.code,msg:o.message})}}this._mimeTypes[n.type]=r}t||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),E.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(l){c.e(this.TAG,l.message)}this._idrList.clear();var r=this._pendingSegments[t];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i=1&&e-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var r=n.buffered,i=!1,a=0;a=this._config.autoCleanupMaxBackwardDuration){i=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:o,end:l})}}else s0&&(isNaN(t)||n>t)&&(c.v(this.TAG,"Update MediaSource duration from ".concat(t," to ").concat(n)),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var r=n.shift();t.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var r=this._sourceBuffers[t].timestampOffset,i=n.timestampOffset/1e3;Math.abs(r-i)>.1&&(c.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(r," to ").concat(i)),this._sourceBuffers[t].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(a){this._pendingSegments[t].unshift(n),22===a.code?(this._isBufferFull||this._emitter.emit(ae.BUFFER_FULL),this._isBufferFull=!0):(c.e(this.TAG,a.message),this._emitter.emit(ae.ERROR,{code:a.code,msg:a.message}))}}}},{key:"_onSourceOpen",value:function(){if(c.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(ae.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){c.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){c.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(ae.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){c.e(this.TAG,"SourceBuffer Error: ".concat(e))}}]),e}(),se={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},le={NETWORK_EXCEPTION:b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Y.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Y.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Y.CODEC_UNSUPPORTED},ue=function(){function e(t,n){if(Object(r.a)(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new l.a,this._config=M(),"object"===typeof n&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new v("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=E.chrome&&(E.version.major<50||50===E.version.major&&E.version.build<2661);this._alwaysSeekKeyframe=!!(i||E.msedge||E.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(i.a)(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===D.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(D.MEDIA_INFO,n.mediaInfo)})):e===D.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(D.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new oe(this._config),this._msectl.on(ae.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(ae.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(ae.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(ae.ERROR,(function(e){t._emitter.emit(D.ERROR,se.MEDIA_ERROR,le.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(n){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new m("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new ie(this._mediaDataSource,this._config),this._transmuxer.on(te.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(te.MEDIA_SEGMENT,(function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var r=e._mediaElement.currentTime;n.info.endDts>=1e3*(r+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(c.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(te.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(D.LOADING_COMPLETE)})),this._transmuxer.on(te.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(D.RECOVERED_EARLY_EOF)})),this._transmuxer.on(te.IO_ERROR,(function(t,n){e._emitter.emit(D.ERROR,se.NETWORK_ERROR,t,n)})),this._transmuxer.on(te.DEMUX_ERROR,(function(t,n){e._emitter.emit(D.ERROR,se.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(te.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(D.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(te.METADATA_ARRIVED,(function(t){e._emitter.emit(D.METADATA_ARRIVED,t)})),this._transmuxer.on(te.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(D.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(te.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(D.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(te.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,r=0;r=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(c.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){c.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,r=0;r=i&&e=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(c.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n=r&&e0){var i=this._mediaElement.buffered.start(0);(i<1&&e0&&t.currentTime0){var r=n.start(0);if(r<1&&t0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(D.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(D.STATISTICS_INFO,this.statisticsInfo)}}]),e}();o.install();var de={createPlayer:function(e,t){var n=e;if(null==n||"object"!==typeof n)throw new v("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new v("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new ue(n,t);default:return new ce(n,t)}},isSupported:function(){return P.supportMSEH264Playback()},getFeatureList:function(){return P.getFeatureList()}};de.BaseLoader=_,de.LoaderStatus=y,de.LoaderErrors=b,de.Events=D,de.ErrorTypes=se,de.ErrorDetails=le,de.FlvPlayer=ue,de.NativePlayer=ce,de.LoggingControl=I,Object.defineProperty(de,"version",{enumerable:!0,get:function(){return"__VERSION__"}});t.a=de},,function(e,t,n){"use strict";n.r(t),n.d(t,"capitalize",(function(){return r.a})),n.d(t,"createChainedFunction",(function(){return i.a})),n.d(t,"createSvgIcon",(function(){return a.a})),n.d(t,"debounce",(function(){return o.a})),n.d(t,"deprecatedPropType",(function(){return s})),n.d(t,"isMuiElement",(function(){return l.a})),n.d(t,"ownerDocument",(function(){return u.a})),n.d(t,"ownerWindow",(function(){return c.a})),n.d(t,"requirePropFactory",(function(){return d.a})),n.d(t,"setRef",(function(){return f.a})),n.d(t,"unsupportedProp",(function(){return h})),n.d(t,"useControlled",(function(){return p.a})),n.d(t,"useEventCallback",(function(){return m.a})),n.d(t,"useForkRef",(function(){return v.a})),n.d(t,"unstable_useId",(function(){return g.a})),n.d(t,"useIsFocusVisible",(function(){return y.a}));var r=n(9),i=n(53),a=n(19),o=n(43);function s(e,t){return function(){return null}}var l=n(45),u=n(15),c=n(60),d=n(91),f=n(38);function h(e,t,n,r,i){return null}var p=n(62),m=n(25),v=n(12),g=n(74),y=n(61)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function a(e){return e.startAdornment}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(15);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),i=n(13),a=!0,o=!1,s=null,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function u(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function c(){a=!1}function d(){"hidden"===this.visibilityState&&o&&(a=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return a||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){o=!0,window.clearTimeout(s),s=window.setTimeout((function(){o=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),a=r.useState(n),o=a[0],s=a[1];return[i?t:o,r.useCallback((function(e){i||s(e)}),[])]}},function(e,t,n){"use strict";var r=n(70),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var o=c(n);d&&(o=o.concat(d(n)));for(var s=l(t),m=l(n),v=0;ve.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,a=t.center,s=void 0===a?o||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&g.current)g.current=!1;else{"touchstart"===e.type&&(g.current=!0);var c,d,f,h=u?null:_.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,w=m.clientY;c=Math.round(v-p.left),d=Math.round(w-p.top)}if(s)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var S=2*Math.max(Math.abs((h?h.clientWidth:0)-c),c)+2,E=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(S,2)+Math.pow(E,2))}e.touches?null===b.current&&(b.current=function(){k({pulsate:i,rippleX:c,rippleY:d,rippleSize:f,cb:n})},y.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):k({pulsate:i,rippleX:c,rippleY:d,rippleSize:f,cb:n})}}),[o,k]),E=a.useCallback((function(){w({},{pulsate:!0})}),[w]),x=a.useCallback((function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(y.current=setTimeout((function(){x(e,t)})));b.current=null,p((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return a.useImperativeHandle(t,(function(){return{pulsate:E,start:w,stop:x}}),[E,w,x]),a.createElement("span",Object(r.a)({className:Object(l.a)(s.root,u),ref:_},c),a.createElement(S,{component:null,exit:!0},f))})),C=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(a.memo(x)),R=a.forwardRef((function(e,t){var n=e.action,o=e.buttonRef,d=e.centerRipple,h=void 0!==d&&d,p=e.children,m=e.classes,v=e.className,g=e.component,y=void 0===g?"button":g,b=e.disabled,_=void 0!==b&&b,k=e.disableRipple,w=void 0!==k&&k,S=e.disableTouchRipple,E=void 0!==S&&S,O=e.focusRipple,x=void 0!==O&&O,R=e.focusVisibleClassName,T=e.onBlur,A=e.onClick,j=e.onFocus,L=e.onFocusVisible,M=e.onKeyDown,P=e.onKeyUp,D=e.onMouseDown,N=e.onMouseLeave,I=e.onMouseUp,B=e.onTouchEnd,U=e.onTouchMove,F=e.onTouchStart,z=e.onDragLeave,V=e.tabIndex,W=void 0===V?0:V,H=e.TouchRippleProps,Y=e.type,G=void 0===Y?"button":Y,$=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),q=a.useRef(null);var K=a.useRef(null),X=a.useState(!1),Q=X[0],Z=X[1];_&&Q&&Z(!1);var J=Object(f.a)(),ee=J.isFocusVisible,te=J.onBlurVisible,ne=J.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;return Object(c.a)((function(r){return t&&t(r),!n&&K.current&&K.current[e](r),!0}))}a.useImperativeHandle(n,(function(){return{focusVisible:function(){Z(!0),q.current.focus()}}}),[]),a.useEffect((function(){Q&&x&&!w&&K.current.pulsate()}),[w,x,Q]);var ie=re("start",D),ae=re("stop",z),oe=re("stop",I),se=re("stop",(function(e){Q&&e.preventDefault(),N&&N(e)})),le=re("start",F),ue=re("stop",B),ce=re("stop",U),de=re("stop",(function(e){Q&&(te(e),Z(!1)),T&&T(e)}),!1),fe=Object(c.a)((function(e){q.current||(q.current=e.currentTarget),ee(e)&&(Z(!0),L&&L(e)),j&&j(e)})),he=function(){var e=s.findDOMNode(q.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},pe=a.useRef(!1),me=Object(c.a)((function(e){x&&!pe.current&&Q&&K.current&&" "===e.key&&(pe.current=!0,e.persist(),K.current.stop(e,(function(){K.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),M&&M(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!_&&(e.preventDefault(),A&&A(e))})),ve=Object(c.a)((function(e){x&&" "===e.key&&K.current&&Q&&!e.defaultPrevented&&(pe.current=!1,e.persist(),K.current.stop(e,(function(){K.current.pulsate(e)}))),P&&P(e),A&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&A(e)})),ge=y;"button"===ge&&$.href&&(ge="a");var ye={};"button"===ge?(ye.type=G,ye.disabled=_):("a"===ge&&$.href||(ye.role="button"),ye["aria-disabled"]=_);var be=Object(u.a)(o,t),_e=Object(u.a)(ne,q),ke=Object(u.a)(be,_e),we=a.useState(!1),Se=we[0],Ee=we[1];a.useEffect((function(){Ee(!0)}),[]);var Oe=Se&&!w&&!_;return a.createElement(ge,Object(r.a)({className:Object(l.a)(m.root,v,Q&&[m.focusVisible,R],_&&m.disabled),onBlur:de,onClick:A,onFocus:fe,onKeyDown:me,onKeyUp:ve,onMouseDown:ie,onMouseLeave:se,onMouseUp:oe,onDragLeave:ae,onTouchEnd:ue,onTouchMove:ce,onTouchStart:le,ref:ke,tabIndex:_?-1:W},ye,$),p,Oe?a.createElement(C,Object(r.a)({ref:K,center:h},H)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(R)},,,,,,,,,,function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d1)for(var n=1;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){s.headers[e]=r.merge(a)})),e.exports=s}).call(this,n(104))},function(e,t,n){"use strict";var r=n(26),i=n(154),a=n(156),o=n(107),s=n(157),l=n(160),u=n(161),c=n(111);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(p+":"+m)}var v=s(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),o(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,a={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,n,a),h=null}},h.onabort=function(){h&&(n(c("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(c("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(c(t,e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||u(v))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;g&&(f[e.xsrfHeaderName]=g)}if("setRequestHeader"in h&&r.forEach(f,(function(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(y){if("json"!==e.responseType)throw y}"function"===typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},function(e,t,n){"use strict";var r=n(155);e.exports=function(e,t,n,i,a){var o=new Error(e);return r(o,t,n,i,a)}},function(e,t,n){"use strict";var r=n(26);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(a,u),r.forEach(o,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var c=i.concat(a).concat(o).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return r.forEach(d,u),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(71),i=n(72);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(73)).default)(a.createElement("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link");t.default=o},function(e,t,n){"use strict";var r=n(71),i=n(72);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(73)).default)(a.createElement("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5zm-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3 2 4.27z"}),"LinkOff");t.default=o},function(e,t,n){"use strict";var r=n(172),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,o,s,l,u,c=!1;t||(t={}),n=t.debug||!1;try{if(o=r(),s=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=e,u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[t.format]||i.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),s.selectNodeContents(u),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),u&&document.body.removeChild(u),o()}return c}},function(e,t,n){"use strict";var r=n(71),i=n(72);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(73)).default)(a.createElement("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}),"LockOutlined");t.default=o},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n0&&Math.abs((e.outerHeightStyle||0)-d)>1||e.overflow!==f)?(S.current+=1,{overflow:f,outerHeightStyle:d}):e}))}),[s,y,e.placeholder]);o.useEffect((function(){var e=Object(h.a)((function(){S.current=0,C()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[C]),m((function(){C()})),o.useEffect((function(){S.current=0}),[d]);return o.createElement(o.Fragment,null,o.createElement("textarea",Object(i.a)({value:d,onChange:function(e){S.current=0,b||C(),n&&n(e)},ref:k,rows:y,style:Object(i.a)({height:O.outerHeightStyle,overflow:O.overflow?"hidden":null},c)},g)),o.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:w,tabIndex:-1,style:Object(i.a)({},v,c)}))})),y=n(57),b="undefined"===typeof window?o.useEffect:o.useLayoutEffect,_=o.forwardRef((function(e,t){var n=e["aria-describedby"],c=e.autoComplete,h=e.autoFocus,p=e.classes,m=e.className,v=(e.color,e.defaultValue),_=e.disabled,k=e.endAdornment,w=(e.error,e.fullWidth),S=void 0!==w&&w,E=e.id,O=e.inputComponent,x=void 0===O?"input":O,C=e.inputProps,R=void 0===C?{}:C,T=e.inputRef,A=(e.margin,e.multiline),j=void 0!==A&&A,L=e.name,M=e.onBlur,P=e.onChange,D=e.onClick,N=e.onFocus,I=e.onKeyDown,B=e.onKeyUp,U=e.placeholder,F=e.readOnly,z=e.renderSuffix,V=e.rows,W=e.rowsMax,H=e.rowsMin,Y=e.startAdornment,G=e.type,$=void 0===G?"text":G,q=e.value,K=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),X=null!=R.value?R.value:q,Q=o.useRef(null!=X).current,Z=o.useRef(),J=o.useCallback((function(e){0}),[]),ee=Object(f.a)(R.ref,J),te=Object(f.a)(T,ee),ne=Object(f.a)(Z,te),re=o.useState(!1),ie=re[0],ae=re[1],oe=Object(u.b)();var se=Object(l.a)({props:e,muiFormControl:oe,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});se.focused=oe?oe.focused:ie,o.useEffect((function(){!oe&&_&&ie&&(ae(!1),M&&M())}),[oe,_,ie,M]);var le=oe&&oe.onFilled,ue=oe&&oe.onEmpty,ce=o.useCallback((function(e){Object(y.b)(e)?le&&le():ue&&ue()}),[le,ue]);b((function(){Q&&ce({value:X})}),[X,ce,Q]);o.useEffect((function(){ce(Z.current)}),[]);var de=x,fe=Object(i.a)({},R,{ref:ne});"string"!==typeof de?fe=Object(i.a)({inputRef:ne,type:$},fe,{ref:null}):j?!V||W||H?(fe=Object(i.a)({rows:V,rowsMax:W},fe),de=g):de="textarea":fe=Object(i.a)({type:$},fe);return o.useEffect((function(){oe&&oe.setAdornedStart(Boolean(Y))}),[oe,Y]),o.createElement("div",Object(i.a)({className:Object(s.a)(p.root,p["color".concat(Object(d.a)(se.color||"primary"))],m,se.disabled&&p.disabled,se.error&&p.error,S&&p.fullWidth,se.focused&&p.focused,oe&&p.formControl,j&&p.multiline,Y&&p.adornedStart,k&&p.adornedEnd,"dense"===se.margin&&p.marginDense),onClick:function(e){Z.current&&e.currentTarget===e.target&&Z.current.focus(),D&&D(e)},ref:t},K),Y,o.createElement(u.a.Provider,{value:null},o.createElement(de,Object(i.a)({"aria-invalid":se.error,"aria-describedby":n,autoComplete:c,autoFocus:h,defaultValue:v,disabled:se.disabled,id:E,onAnimationStart:function(e){ce("mui-auto-fill-cancel"===e.animationName?Z.current:{value:"x"})},name:L,placeholder:U,readOnly:F,required:se.required,rows:V,value:X,onKeyDown:I,onKeyUp:B},fe,{className:Object(s.a)(p.input,R.className,se.disabled&&p.disabled,j&&p.inputMultiline,se.hiddenLabel&&p.inputHiddenLabel,Y&&p.inputAdornedStart,k&&p.inputAdornedEnd,"search"===$&&p.inputTypeSearch,"dense"===se.margin&&p.inputMarginDense),onBlur:function(e){M&&M(e),R.onBlur&&R.onBlur(e),oe&&oe.onBlur?oe.onBlur(e):ae(!1)},onChange:function(e){if(!Q){var t=e.target||Z.current;if(null==t)throw new Error(Object(a.a)(1));ce({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i