diff --git a/App.vue b/App.vue
index 26cbfa2..0ec01bd 100644
--- a/App.vue
+++ b/App.vue
@@ -1,7 +1,7 @@
@@ -233,12 +314,8 @@ export default {
.scroll {
width: 470rpx;
height: 500rpx;
- border: 1px solid #afafaf;
+ border: 2px solid #afafaf;
border-radius: 10px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
}
.card {
margin-top: 10rpx;
@@ -246,15 +323,35 @@ export default {
}
.card-content {
width: 445rpx;
- height: 70rpx;
- border: 1px solid #afafaf;
+ height: 75rpx;
+ /* border: 2px solid #afafaf; */
border-radius: 10px;
+ display: flex;
+ font-size: 28rpx;
+ color: rgb(127, 127, 127);
+}
+.createModule {
+ position: fixed;
+ bottom: 0;
+ right: 0;
+ z-index: 998;
+ width: 100vw;
+}
+.avatar {
+ width: 60rpx;
+ height: 60rpx;
+ border-radius: 50%;
+}
+.TimeMoney {
+ width: 300rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.NameMoney {
+ display: flex;
+ flex-direction: column;
+}
+.NameMoney_Name {
+ text-align: left;
}
-.createModule{
- position: fixed;
- bottom: 0;
- right: 0;
- z-index: 998;
- width: 100vw;
- }
diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/NewAddedPk.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/NewAddedPk.js.map
index 9f60719..07aa7dd 100644
--- a/unpackage/dist/dev/.sourcemap/mp-weixin/NewAddedPk.js.map
+++ b/unpackage/dist/dev/.sourcemap/mp-weixin/NewAddedPk.js.map
@@ -1 +1 @@
-{"version":3,"file":"NewAddedPk.js","sources":["pages/NewAddedPk/NewAddedPk.vue"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n 发布新PK\r\n \r\n \r\n \r\n 请填写主播名称\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n 请选择国家\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 请选择性别\r\n \r\n \r\n \r\n \r\n \r\n \r\n 金币数量:\r\n \r\n 单位:\r\n K\r\n \r\n 请填写金币数量\r\n \r\n \r\n \r\n \r\n 请选择日期\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n"],"names":["optionsArray","uni","request"],"mappings":";;;;;AAiIA,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,SAAS;AAAA;AAAA,MACT,QAAQ;AAAA,QACN,EAAE,OAAO,KAAK,OAAO,EAAG;AAAA,QACxB,EAAE,OAAO,KAAK,OAAO,EAAG;AAAA,MACzB;AAAA,MACD,SAASA,8BAAY;AAAA,MACrB,UAAU;AAAA;AAAA,MACV,YAAY;AAAA;AAAA,MACZ,aAAa;AAAA;AAAA,MACb,SAAS;AAAA;AAAA,MACT,SAAS;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA;AAAA,MAChB,IAAI;AAAA;AAAA,MACJ,aAAa;AAAA;AAAA,MACb,kBAAkB;AAAA,MAClB,QAAQ;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,QACP,aAAa;AAAA,MACf;AAAA;EAEH;AAAA,EACD,UAAU;AACRC,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,KAAK,IAAI,KAAK;AAAA,MACpB;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,OAAO,MAAM;AACX,WAAK,UAAU,KAAK;AACpBA,oBAAAA,MAAA,MAAA,OAAA,0CAAY,IAAI;AAAA,IACjB;AAAA,IAED,QAAQ,MAAM;AACZ,WAAK,WAAW,KAAK;AACrBA,oBAAAA,MAAA,MAAA,OAAA,0CAAY,IAAI;AAAA,IACjB;AAAA,IAED,mBAAmB,OAAO;AACxB,UAAI,MAAM,WAAW,KAAK,KAAK;AAC7B,aAAK,UAAU;AACf,aAAK,OAAO;AAAA,MACd;AAAA,IACD;AAAA,IACD,OAAO;AACL,UAAI,KAAK,SAAS;AAChB,aAAK,UAAU;AACf,aAAK,OAAO;AACZ,aAAK,aAAa;AAClB,aAAK,UAAU;AACf,aAAK,cAAc;AACnB,aAAK,UAAU;AACf,aAAK,iBAAiB;AACtB,aAAK,WAAW;AAAA,aACX;AACL,aAAK,UAAU;AAAA,MACjB;AAAA,IACD;AAAA;AAAA,IAED,YAAY,SAAU,OAAO;AAC3B,WAAK,aAAa,MAAM,OAAO;AAAA,IAChC;AAAA,IAED,MAAM,UAAU;AAEd,UACE,KAAK,eAAe,MACpB,KAAK,YAAY,MACjB,KAAK,gBAAgB,MACrB,KAAK,aAAa,MAClB,KAAK,mBAAmB,IACxB;AACA,aAAK,OAAO;AACZ;AAAA,MACF;AAEA,YAAM,YAAY,KAAK,eAAe,QAAQ,KAAK,GAAG;AACtD,YAAM,YAAY,KAAK,MAAM,SAAS;AACtC,UAAI,MAAM,SAAS,GAAG;AACpB,cAAM,IAAI,MAAM,wBAAwB,KAAK,cAAc,EAAE;AAAA,MAC/D;AACA,WAAK,cAAc,KAAK,MAAM,YAAY,GAAI;AAC9C,YAAM,mBAAmB,KAAK,MAAM,KAAK,IAAG,IAAK,GAAI;AAErD,UAAI,KAAK,cAAc,kBAAkB;AACvCA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD;AAAA,MACF;AAEAA,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MACR,CAAC;AACD,YAAM,MAAM,MAAMC,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,UAAU,KAAK;AAAA,UACf,QAAQ,KAAK;AAAA,UACb,KAAK,KAAK;AAAA,UACV,SAAS,KAAK;AAAA,UACd,MAAM,KAAK;AAAA,UACX,QAAQ,KAAK;AAAA,UACb,QAAQ;AAAA,UACR,UAAU,KAAK;AAAA,UACf,YAAY;AAAA,QACb;AAAA,QACD,UAAU;AAAA,MACZ,CAAC;AACD,UAAI,IAAI,SAAS,KAAK;AACpB,aAAK,UAAU;AACf,aAAK,OAAO;AACZ,aAAK,aAAa;AAClB,aAAK,UAAU;AACf,aAAK,cAAc;AACnB,aAAK,UAAU;AACf,aAAK,iBAAiB;AACtBD,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,aACI;AACLA,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA,EACF;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"NewAddedPk.js","sources":["pages/NewAddedPk/NewAddedPk.vue"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n 发布新PK\r\n \r\n \r\n \r\n 请填写主播名称\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n 请选择国家\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 请选择性别\r\n \r\n \r\n \r\n \r\n \r\n \r\n 金币数量:\r\n \r\n 单位:\r\n K\r\n \r\n 请填写金币数量\r\n \r\n \r\n \r\n \r\n 请选择日期\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n"],"names":["optionsArray","uni","request"],"mappings":";;;;;AAkIA,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,SAAS;AAAA;AAAA,MACT,QAAQ;AAAA,QACN,EAAE,OAAO,KAAK,OAAO,EAAG;AAAA,QACxB,EAAE,OAAO,KAAK,OAAO,EAAG;AAAA,MACzB;AAAA,MACD,SAASA,8BAAY;AAAA,MACrB,UAAU;AAAA;AAAA,MACV,YAAY;AAAA;AAAA,MACZ,aAAa;AAAA;AAAA,MACb,SAAS;AAAA;AAAA,MACT,SAAS;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA;AAAA,MAChB,IAAI;AAAA;AAAA,MACJ,aAAa;AAAA;AAAA,MACb,kBAAkB;AAAA,MAClB,QAAQ;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,QACP,aAAa;AAAA,MACf;AAAA;EAEH;AAAA,EACD,UAAU;AACRC,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,KAAK,IAAI,KAAK;AAAA,MACpB;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,OAAO,MAAM;AACX,WAAK,UAAU,KAAK;AACpBA,oBAAAA,MAAA,MAAA,OAAA,0CAAY,IAAI;AAAA,IACjB;AAAA,IAED,QAAQ,MAAM;AACZ,WAAK,WAAW,KAAK;AACrBA,oBAAAA,MAAA,MAAA,OAAA,0CAAY,IAAI;AAAA,IACjB;AAAA,IAED,mBAAmB,OAAO;AACxB,UAAI,MAAM,WAAW,KAAK,KAAK;AAC7B,aAAK,UAAU;AACf,aAAK,OAAO;AAAA,MACd;AAAA,IACD;AAAA,IACD,OAAO;AACL,UAAI,KAAK,SAAS;AAChB,aAAK,UAAU;AACf,aAAK,OAAO;AACZ,aAAK,aAAa;AAClB,aAAK,UAAU;AACf,aAAK,cAAc;AACnB,aAAK,UAAU;AACf,aAAK,iBAAiB;AACtB,aAAK,WAAW;AAAA,aACX;AACL,aAAK,UAAU;AAAA,MACjB;AAAA,IACD;AAAA;AAAA,IAED,YAAY,SAAU,OAAO;AAC3B,WAAK,aAAa,MAAM,OAAO;AAAA,IAChC;AAAA,IAED,MAAM,UAAU;AAEd,UACE,KAAK,eAAe,MACpB,KAAK,YAAY,MACjB,KAAK,gBAAgB,MACrB,KAAK,aAAa,MAClB,KAAK,mBAAmB,IACxB;AACA,aAAK,OAAO;AACZ;AAAA,MACF;AAEA,YAAM,YAAY,KAAK,eAAe,QAAQ,KAAK,GAAG;AACtD,YAAM,YAAY,KAAK,MAAM,SAAS;AACtC,UAAI,MAAM,SAAS,GAAG;AACpB,cAAM,IAAI,MAAM,wBAAwB,KAAK,cAAc,EAAE;AAAA,MAC/D;AACA,WAAK,cAAc,KAAK,MAAM,YAAY,GAAI;AAC9C,YAAM,mBAAmB,KAAK,MAAM,KAAK,IAAG,IAAK,GAAI;AAErD,UAAI,KAAK,cAAc,kBAAkB;AACvCA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD;AAAA,MACF;AAEAA,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MACR,CAAC;AACD,YAAM,MAAM,MAAMC,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,UAAU,KAAK;AAAA,UACf,QAAQ,KAAK;AAAA,UACb,KAAK,KAAK;AAAA,UACV,SAAS,KAAK;AAAA,UACd,MAAM,KAAK;AAAA,UACX,QAAQ,KAAK;AAAA,UACb,QAAQ;AAAA,UACR,UAAU,KAAK;AAAA,UACf,YAAY;AAAA,QACb;AAAA,QACD,UAAU;AAAA,MACZ,CAAC;AACD,UAAI,IAAI,SAAS,KAAK;AACpB,aAAK,UAAU;AACf,aAAK,OAAO;AACZ,aAAK,aAAa;AAClB,aAAK,UAAU;AACf,aAAK,cAAc;AACnB,aAAK,UAAU;AACf,aAAK,iBAAiB;AACtBD,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,aACI;AACLA,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA,EACF;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map
index 405b992..9abcd38 100644
--- a/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map
+++ b/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map
@@ -1 +1 @@
-{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["\r\n\r\n","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,MAAe,YAAA;AAAA,EACb,OAAO;AACE,WAAA;AAAA,MACL,MAAM,CAAC;AAAA,MACP,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,OAAO,QAAQ;AACbA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,OAAO,IAAI;AAAA,MAClB;AAAA,IAAA,CACD;AACDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,UAAU,IAAI;AAAA,MACrB;AAAA,IAAA,CACD;AACDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,WAAW,IAAI;AAAA,MACtB;AAAA,IAAA,CACD;AACD,QAAI,KAAK,SAAS;AAChB,eAAS,KAAK,SAAS,OAAO,KAAK,KAAK,YAAY,KAAK,OAAO;AAAA,IAClE;AAAA,EACF;AAAA,EACA,UAAU;AACD,WAAA;AAAA,MACL,SAAS;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,IAAA;AAAA,EAEJ;AACF;ACnCO,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
\ No newline at end of file
+{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["\r\n\r\n","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,MAAe,YAAA;AAAA,EACb,OAAO;AACE,WAAA;AAAA,MACL,MAAM,CAAC;AAAA,MACP,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,OAAO,QAAQ;AAAA,EACf;AAAA,EACA,UAAU;AACD,WAAA;AAAA,MACL,SAAS;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,IAAA;AAAA,EAEJ;AACF;ACdO,SAAS,YAAY;AAC1B,QAAM,MAAMA,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
\ No newline at end of file
diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
index fbf4868..cf2c883 100644
--- a/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
+++ b/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
@@ -1 +1 @@
-{"version":3,"file":"vendor.js","sources":["../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@vue/shared/dist/shared.esm-bundler.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-shared/dist/uni-shared.es.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.api.esm.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-console/dist/mp.esm.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.mp.esm.js","node_modules/@tencentcloud/chat/index.js","node_modules/tim-upload-plugin/index.js","node_modules/tim-profanity-filter-plugin/index.js","node_modules/@tencentcloud/tui-core/index.js","node_modules/cos-wx-sdk-v5/dist/cos-wx-sdk-v5.min.js","node_modules/@tencentcloud/chat-uikit-engine/index.js","node_modules/@tencentcloud/universal-api/index.js","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-app/dist/uni-app.es.js","node_modules/dayjs/dayjs.min.js","node_modules/dayjs/plugin/localeData.js","node_modules/dayjs/plugin/isSameOrAfter.js","node_modules/dayjs/plugin/isSameOrBefore.js","node_modules/dayjs/locale/zh-cn.js","node_modules/@vue/composition-api/dist/vue-composition-api.mjs","node_modules/marked/lib/marked.esm.js"],"sourcesContent":["/**\n* @vue/shared v3.4.21\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nfunction makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","const isObject = (val) => val !== null && typeof val === 'object';\nconst defaultDelimiters = ['{', '}'];\nclass BaseFormatter {\n constructor() {\n this._caches = Object.create(null);\n }\n interpolate(message, values, delimiters = defaultDelimiters) {\n if (!values) {\n return [message];\n }\n let tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message, delimiters);\n this._caches[message] = tokens;\n }\n return compile(tokens, values);\n }\n}\nconst RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nconst RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\nfunction parse(format, [startDelimiter, endDelimiter]) {\n const tokens = [];\n let position = 0;\n let text = '';\n while (position < format.length) {\n let char = format[position++];\n if (char === startDelimiter) {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n text = '';\n let sub = '';\n char = format[position++];\n while (char !== undefined && char !== endDelimiter) {\n sub += char;\n char = format[position++];\n }\n const isClosed = char === endDelimiter;\n const type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type });\n }\n // else if (char === '%') {\n // // when found rails i18n syntax, skip text capture\n // if (format[position] !== '{') {\n // text += char\n // }\n // }\n else {\n text += char;\n }\n }\n text && tokens.push({ type: 'text', value: text });\n return tokens;\n}\nfunction compile(tokens, values) {\n const compiled = [];\n let index = 0;\n const mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') {\n return compiled;\n }\n while (index < tokens.length) {\n const token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break;\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break;\n case 'named':\n if (mode === 'named') {\n compiled.push(values[token.value]);\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);\n }\n }\n break;\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Detect 'unknown' type of token!`);\n }\n break;\n }\n index++;\n }\n return compiled;\n}\n\nconst LOCALE_ZH_HANS = 'zh-Hans';\nconst LOCALE_ZH_HANT = 'zh-Hant';\nconst LOCALE_EN = 'en';\nconst LOCALE_FR = 'fr';\nconst LOCALE_ES = 'es';\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst defaultFormatter = new BaseFormatter();\nfunction include(str, parts) {\n return !!parts.find((part) => str.indexOf(part) !== -1);\n}\nfunction startsWith(str, parts) {\n return parts.find((part) => str.indexOf(part) === 0);\n}\nfunction normalizeLocale(locale, messages) {\n if (!locale) {\n return;\n }\n locale = locale.trim().replace(/_/g, '-');\n if (messages && messages[locale]) {\n return locale;\n }\n locale = locale.toLowerCase();\n if (locale === 'chinese') {\n // 支付宝\n return LOCALE_ZH_HANS;\n }\n if (locale.indexOf('zh') === 0) {\n if (locale.indexOf('-hans') > -1) {\n return LOCALE_ZH_HANS;\n }\n if (locale.indexOf('-hant') > -1) {\n return LOCALE_ZH_HANT;\n }\n if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {\n return LOCALE_ZH_HANT;\n }\n return LOCALE_ZH_HANS;\n }\n let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];\n if (messages && Object.keys(messages).length > 0) {\n locales = Object.keys(messages);\n }\n const lang = startsWith(locale, locales);\n if (lang) {\n return lang;\n }\n}\nclass I18n {\n constructor({ locale, fallbackLocale, messages, watcher, formater, }) {\n this.locale = LOCALE_EN;\n this.fallbackLocale = LOCALE_EN;\n this.message = {};\n this.messages = {};\n this.watchers = [];\n if (fallbackLocale) {\n this.fallbackLocale = fallbackLocale;\n }\n this.formater = formater || defaultFormatter;\n this.messages = messages || {};\n this.setLocale(locale || LOCALE_EN);\n if (watcher) {\n this.watchLocale(watcher);\n }\n }\n setLocale(locale) {\n const oldLocale = this.locale;\n this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;\n if (!this.messages[this.locale]) {\n // 可能初始化时不存在\n this.messages[this.locale] = {};\n }\n this.message = this.messages[this.locale];\n // 仅发生变化时,通知\n if (oldLocale !== this.locale) {\n this.watchers.forEach((watcher) => {\n watcher(this.locale, oldLocale);\n });\n }\n }\n getLocale() {\n return this.locale;\n }\n watchLocale(fn) {\n const index = this.watchers.push(fn) - 1;\n return () => {\n this.watchers.splice(index, 1);\n };\n }\n add(locale, message, override = true) {\n const curMessages = this.messages[locale];\n if (curMessages) {\n if (override) {\n Object.assign(curMessages, message);\n }\n else {\n Object.keys(message).forEach((key) => {\n if (!hasOwn(curMessages, key)) {\n curMessages[key] = message[key];\n }\n });\n }\n }\n else {\n this.messages[locale] = message;\n }\n }\n f(message, values, delimiters) {\n return this.formater.interpolate(message, values, delimiters).join('');\n }\n t(key, locale, values) {\n let message = this.message;\n if (typeof locale === 'string') {\n locale = normalizeLocale(locale, this.messages);\n locale && (message = this.messages[locale]);\n }\n else {\n values = locale;\n }\n if (!hasOwn(message, key)) {\n console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);\n return key;\n }\n return this.formater.interpolate(message[key], values).join('');\n }\n}\n\nfunction watchAppLocale(appVm, i18n) {\n // 需要保证 watch 的触发在组件渲染之前\n if (appVm.$watchLocale) {\n // vue2\n appVm.$watchLocale((newLocale) => {\n i18n.setLocale(newLocale);\n });\n }\n else {\n appVm.$watch(() => appVm.$locale, (newLocale) => {\n i18n.setLocale(newLocale);\n });\n }\n}\nfunction getDefaultLocale() {\n if (typeof uni !== 'undefined' && uni.getLocale) {\n return uni.getLocale();\n }\n // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale\n if (typeof global !== 'undefined' && global.getLocale) {\n return global.getLocale();\n }\n return LOCALE_EN;\n}\nfunction initVueI18n(locale, messages = {}, fallbackLocale, watcher) {\n // 兼容旧版本入参\n if (typeof locale !== 'string') {\n // ;[locale, messages] = [\n // messages as unknown as string,\n // locale as unknown as LocaleMessages,\n // ]\n // 暂不使用数组解构,uts编译器暂未支持。\n const options = [\n messages,\n locale,\n ];\n locale = options[0];\n messages = options[1];\n }\n if (typeof locale !== 'string') {\n // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined\n locale = getDefaultLocale();\n }\n if (typeof fallbackLocale !== 'string') {\n fallbackLocale =\n (typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale) ||\n LOCALE_EN;\n }\n const i18n = new I18n({\n locale,\n fallbackLocale,\n messages,\n watcher,\n });\n let t = (key, values) => {\n if (typeof getApp !== 'function') {\n // app view\n /* eslint-disable no-func-assign */\n t = function (key, values) {\n return i18n.t(key, values);\n };\n }\n else {\n let isWatchedAppLocale = false;\n t = function (key, values) {\n const appVm = getApp().$vm;\n // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化\n // options: {\n // \ttype: Array,\n // \tdefault () {\n // \t\treturn [{\n // \t\t\ticon: 'shop',\n // \t\t\ttext: t(\"uni-goods-nav.options.shop\"),\n // \t\t}, {\n // \t\t\ticon: 'cart',\n // \t\t\ttext: t(\"uni-goods-nav.options.cart\")\n // \t\t}]\n // \t}\n // },\n if (appVm) {\n // 触发响应式\n appVm.$locale;\n if (!isWatchedAppLocale) {\n isWatchedAppLocale = true;\n watchAppLocale(appVm, i18n);\n }\n }\n return i18n.t(key, values);\n };\n }\n return t(key, values);\n };\n return {\n i18n,\n f(message, values, delimiters) {\n return i18n.f(message, values, delimiters);\n },\n t(key, values) {\n return t(key, values);\n },\n add(locale, message, override = true) {\n return i18n.add(locale, message, override);\n },\n watch(fn) {\n return i18n.watchLocale(fn);\n },\n getLocale() {\n return i18n.getLocale();\n },\n setLocale(newLocale) {\n return i18n.setLocale(newLocale);\n },\n };\n}\n\nconst isString = (val) => typeof val === 'string';\nlet formater;\nfunction hasI18nJson(jsonObj, delimiters) {\n if (!formater) {\n formater = new BaseFormatter();\n }\n return walkJsonObj(jsonObj, (jsonObj, key) => {\n const value = jsonObj[key];\n if (isString(value)) {\n if (isI18nStr(value, delimiters)) {\n return true;\n }\n }\n else {\n return hasI18nJson(value, delimiters);\n }\n });\n}\nfunction parseI18nJson(jsonObj, values, delimiters) {\n if (!formater) {\n formater = new BaseFormatter();\n }\n walkJsonObj(jsonObj, (jsonObj, key) => {\n const value = jsonObj[key];\n if (isString(value)) {\n if (isI18nStr(value, delimiters)) {\n jsonObj[key] = compileStr(value, values, delimiters);\n }\n }\n else {\n parseI18nJson(value, values, delimiters);\n }\n });\n return jsonObj;\n}\nfunction compileI18nJsonStr(jsonStr, { locale, locales, delimiters, }) {\n if (!isI18nStr(jsonStr, delimiters)) {\n return jsonStr;\n }\n if (!formater) {\n formater = new BaseFormatter();\n }\n const localeValues = [];\n Object.keys(locales).forEach((name) => {\n if (name !== locale) {\n localeValues.push({\n locale: name,\n values: locales[name],\n });\n }\n });\n localeValues.unshift({ locale, values: locales[locale] });\n try {\n return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);\n }\n catch (e) { }\n return jsonStr;\n}\nfunction isI18nStr(value, delimiters) {\n return value.indexOf(delimiters[0]) > -1;\n}\nfunction compileStr(value, values, delimiters) {\n return formater.interpolate(value, values, delimiters).join('');\n}\nfunction compileValue(jsonObj, key, localeValues, delimiters) {\n const value = jsonObj[key];\n if (isString(value)) {\n // 存在国际化\n if (isI18nStr(value, delimiters)) {\n jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);\n if (localeValues.length > 1) {\n // 格式化国际化语言\n const valueLocales = (jsonObj[key + 'Locales'] = {});\n localeValues.forEach((localValue) => {\n valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);\n });\n }\n }\n }\n else {\n compileJsonObj(value, localeValues, delimiters);\n }\n}\nfunction compileJsonObj(jsonObj, localeValues, delimiters) {\n walkJsonObj(jsonObj, (jsonObj, key) => {\n compileValue(jsonObj, key, localeValues, delimiters);\n });\n return jsonObj;\n}\nfunction walkJsonObj(jsonObj, walk) {\n if (Array.isArray(jsonObj)) {\n for (let i = 0; i < jsonObj.length; i++) {\n if (walk(jsonObj, i)) {\n return true;\n }\n }\n }\n else if (isObject(jsonObj)) {\n for (const key in jsonObj) {\n if (walk(jsonObj, key)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction resolveLocale(locales) {\n return (locale) => {\n if (!locale) {\n return locale;\n }\n locale = normalizeLocale(locale) || locale;\n return resolveLocaleChain(locale).find((locale) => locales.indexOf(locale) > -1);\n };\n}\nfunction resolveLocaleChain(locale) {\n const chain = [];\n const tokens = locale.split('-');\n while (tokens.length) {\n chain.push(tokens.join('-'));\n tokens.pop();\n }\n return chain;\n}\n\nexport { BaseFormatter as Formatter, I18n, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT, compileI18nJsonStr, hasI18nJson, initVueI18n, isI18nStr, isString, normalizeLocale, parseI18nJson, resolveLocale };\n","import { isHTMLTag, isSVGTag, isVoidTag, isString, isFunction, isPlainObject, hyphenate, camelize, normalizeStyle as normalizeStyle$1, parseStringStyle, isArray, normalizeClass as normalizeClass$1, extend, capitalize } from '@vue/shared';\n\nconst BUILT_IN_TAG_NAMES = [\n 'ad',\n 'ad-content-page',\n 'ad-draw',\n 'audio',\n 'button',\n 'camera',\n 'canvas',\n 'checkbox',\n 'checkbox-group',\n 'cover-image',\n 'cover-view',\n 'editor',\n 'form',\n 'functional-page-navigator',\n 'icon',\n 'image',\n 'input',\n 'label',\n 'live-player',\n 'live-pusher',\n 'map',\n 'movable-area',\n 'movable-view',\n 'navigator',\n 'official-account',\n 'open-data',\n 'picker',\n 'picker-view',\n 'picker-view-column',\n 'progress',\n 'radio',\n 'radio-group',\n 'rich-text',\n 'scroll-view',\n 'slider',\n 'swiper',\n 'swiper-item',\n 'switch',\n 'text',\n 'textarea',\n 'video',\n 'view',\n 'web-view',\n 'location-picker',\n 'location-view',\n];\nconst BUILT_IN_TAGS = BUILT_IN_TAG_NAMES.map((tag) => 'uni-' + tag);\nconst TAGS = [\n 'app',\n 'layout',\n 'content',\n 'main',\n 'top-window',\n 'left-window',\n 'right-window',\n 'tabbar',\n 'page',\n 'page-head',\n 'page-wrapper',\n 'page-body',\n 'page-refresh',\n 'actionsheet',\n 'modal',\n 'toast',\n 'resize-sensor',\n 'shadow-root',\n].map((tag) => 'uni-' + tag);\nconst NVUE_BUILT_IN_TAGS = [\n 'svg',\n 'view',\n 'a',\n 'div',\n 'img',\n 'image',\n 'text',\n 'span',\n 'input',\n 'textarea',\n 'spinner',\n 'select',\n // slider 被自定义 u-slider 替代\n // 'slider',\n 'slider-neighbor',\n 'indicator',\n 'canvas',\n 'list',\n 'cell',\n 'header',\n 'loading',\n 'loading-indicator',\n 'refresh',\n 'scrollable',\n 'scroller',\n 'video',\n 'web',\n 'embed',\n 'tabbar',\n 'tabheader',\n 'datepicker',\n 'timepicker',\n 'marquee',\n 'countdown',\n 'dc-switch',\n 'waterfall',\n 'richtext',\n 'recycle-list',\n 'u-scalable',\n 'barcode',\n 'gcanvas',\n];\nconst UVUE_BUILT_IN_TAGS = [\n 'ad',\n 'ad-content-page',\n 'ad-draw',\n 'native-view',\n 'loading-indicator',\n 'list-view',\n 'list-item',\n 'swiper',\n 'swiper-item',\n 'rich-text',\n 'sticky-view',\n 'sticky-header',\n 'sticky-section',\n // 自定义\n 'uni-slider',\n // 原生实现\n 'button',\n 'nested-scroll-header',\n 'nested-scroll-body',\n 'waterflow',\n 'flow-item',\n 'share-element',\n 'cover-view',\n 'cover-image',\n];\nconst UVUE_WEB_BUILT_IN_TAGS = [\n 'list-view',\n 'list-item',\n 'sticky-section',\n 'sticky-header',\n 'cloud-db-element',\n].map((tag) => 'uni-' + tag);\nconst UVUE_IOS_BUILT_IN_TAGS = [\n 'scroll-view',\n 'web-view',\n 'slider',\n 'form',\n 'switch',\n];\nconst UVUE_HARMONY_BUILT_IN_TAGS = [\n // TODO 列出完整列表\n ...BUILT_IN_TAG_NAMES,\n 'volume-panel',\n];\nconst NVUE_U_BUILT_IN_TAGS = [\n 'u-text',\n 'u-image',\n 'u-input',\n 'u-textarea',\n 'u-video',\n 'u-web-view',\n 'u-slider',\n 'u-ad',\n 'u-ad-draw',\n 'u-rich-text',\n];\nconst UNI_UI_CONFLICT_TAGS = ['list-item'].map((tag) => 'uni-' + tag);\nfunction isBuiltInComponent(tag) {\n if (UNI_UI_CONFLICT_TAGS.indexOf(tag) !== -1) {\n return false;\n }\n // h5 平台会被转换为 v-uni-\n const realTag = 'uni-' + tag.replace('v-uni-', '');\n // TODO 区分x和非x\n return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||\n UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);\n}\nfunction isH5CustomElement(tag, isX = false) {\n if (isX && UVUE_WEB_BUILT_IN_TAGS.indexOf(tag) !== -1) {\n return true;\n }\n return TAGS.indexOf(tag) !== -1 || BUILT_IN_TAGS.indexOf(tag) !== -1;\n}\nfunction isUniXElement(name) {\n return /^I?Uni.*Element(?:Impl)?$/.test(name);\n}\nfunction isH5NativeTag(tag) {\n return (tag !== 'head' &&\n (isHTMLTag(tag) || isSVGTag(tag)) &&\n !isBuiltInComponent(tag));\n}\nfunction isAppNativeTag(tag) {\n return isHTMLTag(tag) || isSVGTag(tag) || isBuiltInComponent(tag);\n}\nconst NVUE_CUSTOM_COMPONENTS = [\n 'ad',\n 'ad-draw',\n 'button',\n 'checkbox-group',\n 'checkbox',\n 'form',\n 'icon',\n 'label',\n 'movable-area',\n 'movable-view',\n 'navigator',\n 'picker',\n 'progress',\n 'radio-group',\n 'radio',\n 'rich-text',\n 'swiper-item',\n 'swiper',\n 'switch',\n 'slider',\n 'picker-view',\n 'picker-view-column',\n];\n// 内置的easycom组件\nconst UVUE_BUILT_IN_EASY_COMPONENTS = ['map', 'camera'];\nfunction isAppUVueBuiltInEasyComponent(tag) {\n return UVUE_BUILT_IN_EASY_COMPONENTS.includes(tag);\n}\n// 主要是指前端实现的组件列表\nconst UVUE_CUSTOM_COMPONENTS = [\n ...NVUE_CUSTOM_COMPONENTS,\n ...UVUE_BUILT_IN_EASY_COMPONENTS,\n];\nfunction isAppUVueNativeTag(tag) {\n // 前端实现的内置组件都会注册一个根组件\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_CUSTOM_COMPONENTS.includes(tag)) {\n return false;\n }\n if (isBuiltInComponent(tag)) {\n return true;\n }\n // u-text,u-video...\n if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isAppIOSUVueNativeTag(tag) {\n // 前端实现的内置组件都会注册一个根组件\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_IOS_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isAppHarmonyUVueNativeTag(tag) {\n // video 目前是easycom实现的\n if (tag === 'video' || tag === 'map') {\n return false;\n }\n // 前端实现的内置组件都会注册一个根组件\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_HARMONY_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isAppNVueNativeTag(tag) {\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (NVUE_CUSTOM_COMPONENTS.includes(tag)) {\n return false;\n }\n if (isBuiltInComponent(tag)) {\n return true;\n }\n // u-text,u-video...\n if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isMiniProgramNativeTag(tag) {\n return isBuiltInComponent(tag);\n}\nfunction isMiniProgramUVueNativeTag(tag) {\n // 小程序平台内置的自定义元素,会被转换为 view\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n return isBuiltInComponent(tag);\n}\nfunction createIsCustomElement(tags = []) {\n return function isCustomElement(tag) {\n return tags.includes(tag);\n };\n}\nfunction isComponentTag(tag) {\n return tag[0].toLowerCase() + tag.slice(1) === 'component';\n}\nconst COMPONENT_SELECTOR_PREFIX = 'uni-';\nconst COMPONENT_PREFIX = 'v-' + COMPONENT_SELECTOR_PREFIX;\n// TODO 是否还存在其他需要特殊处理的 void 标签?\nconst APP_VOID_TAGS = ['textarea'];\nfunction isAppVoidTag(tag) {\n return APP_VOID_TAGS.includes(tag) || isVoidTag(tag);\n}\n\nconst LINEFEED = '\\n';\nconst NAVBAR_HEIGHT = 44;\nconst TABBAR_HEIGHT = 50;\nconst ON_REACH_BOTTOM_DISTANCE = 50;\nconst RESPONSIVE_MIN_WIDTH = 768;\nconst UNI_STORAGE_LOCALE = 'UNI_LOCALE';\n// quickapp-webview 不能使用 default 作为插槽名称\nconst SLOT_DEFAULT_NAME = 'd';\nconst COMPONENT_NAME_PREFIX = 'VUni';\nconst I18N_JSON_DELIMITERS = ['%', '%'];\nconst PRIMARY_COLOR = '#007aff';\nconst SELECTED_COLOR = '#0062cc'; // 选中的颜色,如选项卡默认的选中颜色\nconst BACKGROUND_COLOR = '#f7f7f7'; // 背景色,如标题栏默认背景色\nconst UNI_SSR = '__uniSSR';\nconst UNI_SSR_TITLE = 'title';\nconst UNI_SSR_STORE = 'store';\nconst UNI_SSR_DATA = 'data';\nconst UNI_SSR_GLOBAL_DATA = 'globalData';\nconst SCHEME_RE = /^([a-z-]+:)?\\/\\//i;\nconst DATA_RE = /^data:.*,.*/;\nconst WEB_INVOKE_APPSERVICE = 'WEB_INVOKE_APPSERVICE';\nconst WXS_PROTOCOL = 'wxs://';\nconst JSON_PROTOCOL = 'json://';\nconst WXS_MODULES = 'wxsModules';\nconst RENDERJS_MODULES = 'renderjsModules';\n// lifecycle\n// App and Page\nconst ON_SHOW = 'onShow';\nconst ON_HIDE = 'onHide';\n//App\nconst ON_LAUNCH = 'onLaunch';\nconst ON_ERROR = 'onError';\nconst ON_THEME_CHANGE = 'onThemeChange';\nconst OFF_THEME_CHANGE = 'offThemeChange';\nconst ON_HOST_THEME_CHANGE = 'onHostThemeChange';\nconst OFF_HOST_THEME_CHANGE = 'offHostThemeChange';\nconst ON_KEYBOARD_HEIGHT_CHANGE = 'onKeyboardHeightChange';\nconst ON_PAGE_NOT_FOUND = 'onPageNotFound';\nconst ON_UNHANDLE_REJECTION = 'onUnhandledRejection';\nconst ON_EXIT = 'onExit';\n//Page\nconst ON_LOAD = 'onLoad';\nconst ON_READY = 'onReady';\nconst ON_UNLOAD = 'onUnload';\n// 百度特有\nconst ON_INIT = 'onInit';\n// 微信特有\nconst ON_SAVE_EXIT_STATE = 'onSaveExitState';\nconst ON_RESIZE = 'onResize';\nconst ON_BACK_PRESS = 'onBackPress';\nconst ON_PAGE_SCROLL = 'onPageScroll';\nconst ON_TAB_ITEM_TAP = 'onTabItemTap';\nconst ON_REACH_BOTTOM = 'onReachBottom';\nconst ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';\nconst ON_SHARE_TIMELINE = 'onShareTimeline';\nconst ON_SHARE_CHAT = 'onShareChat'; // xhs-share\nconst ON_ADD_TO_FAVORITES = 'onAddToFavorites';\nconst ON_SHARE_APP_MESSAGE = 'onShareAppMessage';\n// navigationBar\nconst ON_NAVIGATION_BAR_BUTTON_TAP = 'onNavigationBarButtonTap';\nconst ON_NAVIGATION_BAR_CHANGE = 'onNavigationBarChange';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = 'onNavigationBarSearchInputClicked';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = 'onNavigationBarSearchInputChanged';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = 'onNavigationBarSearchInputConfirmed';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = 'onNavigationBarSearchInputFocusChanged';\n// framework\nconst ON_APP_ENTER_FOREGROUND = 'onAppEnterForeground';\nconst ON_APP_ENTER_BACKGROUND = 'onAppEnterBackground';\nconst ON_WEB_INVOKE_APP_SERVICE = 'onWebInvokeAppService';\nconst ON_WXS_INVOKE_CALL_METHOD = 'onWxsInvokeCallMethod';\n// mergeVirtualHostAttributes\nconst VIRTUAL_HOST_STYLE = 'virtualHostStyle';\nconst VIRTUAL_HOST_CLASS = 'virtualHostClass';\nconst VIRTUAL_HOST_HIDDEN = 'virtualHostHidden';\nconst VIRTUAL_HOST_ID = 'virtualHostId';\n\nfunction cache(fn) {\n const cache = Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nfunction cacheStringFunction(fn) {\n return cache(fn);\n}\nfunction getLen(str = '') {\n return ('' + str).replace(/[^\\x00-\\xff]/g, '**').length;\n}\nfunction hasLeadingSlash(str) {\n return str.indexOf('/') === 0;\n}\nfunction addLeadingSlash(str) {\n return hasLeadingSlash(str) ? str : '/' + str;\n}\nfunction removeLeadingSlash(str) {\n return hasLeadingSlash(str) ? str.slice(1) : str;\n}\nconst invokeArrayFns = (fns, arg) => {\n let ret;\n for (let i = 0; i < fns.length; i++) {\n ret = fns[i](arg);\n }\n return ret;\n};\nfunction updateElementStyle(element, styles) {\n for (const attrName in styles) {\n element.style[attrName] = styles[attrName];\n }\n}\nfunction once(fn, ctx = null) {\n let res;\n return ((...args) => {\n if (fn) {\n res = fn.apply(ctx, args);\n fn = null;\n }\n return res;\n });\n}\nconst sanitise = (val) => (val && JSON.parse(JSON.stringify(val))) || val;\nconst _completeValue = (value) => (value > 9 ? value : '0' + value);\nfunction formatDateTime({ date = new Date(), mode = 'date' }) {\n if (mode === 'time') {\n return (_completeValue(date.getHours()) + ':' + _completeValue(date.getMinutes()));\n }\n else {\n return (date.getFullYear() +\n '-' +\n _completeValue(date.getMonth() + 1) +\n '-' +\n _completeValue(date.getDate()));\n }\n}\nfunction callOptions(options, data) {\n options = options || {};\n if (isString(data)) {\n data = {\n errMsg: data,\n };\n }\n if (/:ok$/.test(data.errMsg)) {\n if (isFunction(options.success)) {\n options.success(data);\n }\n }\n else {\n if (isFunction(options.fail)) {\n options.fail(data);\n }\n }\n if (isFunction(options.complete)) {\n options.complete(data);\n }\n}\nfunction getValueByDataPath(obj, path) {\n if (!isString(path)) {\n return;\n }\n path = path.replace(/\\[(\\d+)\\]/g, '.$1');\n const parts = path.split('.');\n let key = parts[0];\n if (!obj) {\n obj = {};\n }\n if (parts.length === 1) {\n return obj[key];\n }\n return getValueByDataPath(obj[key], parts.slice(1).join('.'));\n}\nfunction sortObject(obj) {\n let sortObj = {};\n if (isPlainObject(obj)) {\n Object.keys(obj)\n .sort()\n .forEach((key) => {\n const _key = key;\n sortObj[_key] = obj[_key];\n });\n }\n return !Object.keys(sortObj) ? obj : sortObj;\n}\nfunction getGlobalOnce() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n // worker\n if (typeof self !== 'undefined') {\n return self;\n }\n // browser\n if (typeof window !== 'undefined') {\n return window;\n }\n // nodejs\n // if (typeof global !== 'undefined') {\n // return global\n // }\n function g() {\n return this;\n }\n if (typeof g() !== 'undefined') {\n return g();\n }\n return (function () {\n return new Function('return this')();\n })();\n}\nlet g = undefined;\nfunction getGlobal() {\n if (g) {\n return g;\n }\n g = getGlobalOnce();\n return g;\n}\n\nfunction isComponentInternalInstance(vm) {\n return !!vm.appContext;\n}\nfunction resolveComponentInstance(instance) {\n return (instance &&\n (isComponentInternalInstance(instance) ? instance.proxy : instance));\n}\nfunction resolveOwnerVm(vm) {\n if (!vm) {\n return;\n }\n let componentName = vm.type.name;\n while (componentName && isBuiltInComponent(hyphenate(componentName))) {\n // ownerInstance 内置组件需要使用父 vm\n vm = vm.parent;\n componentName = vm.type.name;\n }\n return vm.proxy;\n}\nfunction isElement(el) {\n // Element\n return el.nodeType === 1;\n}\nfunction resolveOwnerEl(instance, multi = false) {\n const { vnode } = instance;\n if (isElement(vnode.el)) {\n return multi ? (vnode.el ? [vnode.el] : []) : vnode.el;\n }\n const { subTree } = instance;\n // ShapeFlags.ARRAY_CHILDREN = 1<<4\n if (subTree.shapeFlag & 16) {\n const elemVNodes = subTree.children.filter((vnode) => vnode.el && isElement(vnode.el));\n if (elemVNodes.length > 0) {\n if (multi) {\n return elemVNodes.map((node) => node.el);\n }\n return elemVNodes[0].el;\n }\n }\n return multi ? (vnode.el ? [vnode.el] : []) : vnode.el;\n}\nfunction dynamicSlotName(name) {\n return name === 'default' ? SLOT_DEFAULT_NAME : name;\n}\nconst customizeRE = /:/g;\nfunction customizeEvent(str) {\n return camelize(str.replace(customizeRE, '-'));\n}\nfunction normalizeStyle(value) {\n const g = getGlobal();\n if (g && g.UTSJSONObject && value instanceof g.UTSJSONObject) {\n const styleObject = {};\n g.UTSJSONObject.keys(value).forEach((key) => {\n styleObject[key] = value[key];\n });\n return normalizeStyle$1(styleObject);\n }\n else if (value instanceof Map) {\n const styleObject = {};\n value.forEach((value, key) => {\n styleObject[key] = value;\n });\n return normalizeStyle$1(styleObject);\n }\n else if (isString(value)) {\n return parseStringStyle(value);\n }\n else if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item)\n ? parseStringStyle(item)\n : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n }\n else {\n return normalizeStyle$1(value);\n }\n}\nfunction normalizeClass(value) {\n let res = '';\n const g = getGlobal();\n if (g && g.UTSJSONObject && value instanceof g.UTSJSONObject) {\n g.UTSJSONObject.keys(value).forEach((key) => {\n if (value[key]) {\n res += key + ' ';\n }\n });\n }\n else if (value instanceof Map) {\n value.forEach((value, key) => {\n if (value) {\n res += key + ' ';\n }\n });\n }\n else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + ' ';\n }\n }\n }\n else {\n res = normalizeClass$1(value);\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nlet lastLogTime = 0;\nfunction formatLog(module, ...args) {\n const now = Date.now();\n const diff = lastLogTime ? now - lastLogTime : 0;\n lastLogTime = now;\n return `[${now}][${diff}ms][${module}]:${args\n .map((arg) => JSON.stringify(arg))\n .join(' ')}`;\n}\n\nfunction formatKey(key) {\n return camelize(key.substring(5));\n}\n// question/139181,增加副作用,避免 initCustomDataset 在 build 下被 tree-shaking\nconst initCustomDatasetOnce = /*#__PURE__*/ once((isBuiltInElement) => {\n isBuiltInElement =\n isBuiltInElement || ((el) => el.tagName.startsWith('UNI-'));\n const prototype = HTMLElement.prototype;\n const setAttribute = prototype.setAttribute;\n prototype.setAttribute = function (key, value) {\n if (key.startsWith('data-') && isBuiltInElement(this)) {\n const dataset = this.__uniDataset ||\n (this.__uniDataset = {});\n dataset[formatKey(key)] = value;\n }\n setAttribute.call(this, key, value);\n };\n const removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function (key) {\n if (this.__uniDataset &&\n key.startsWith('data-') &&\n isBuiltInElement(this)) {\n delete this.__uniDataset[formatKey(key)];\n }\n removeAttribute.call(this, key);\n };\n});\nfunction getCustomDataset(el) {\n return extend({}, el.dataset, el.__uniDataset);\n}\n\nconst unitRE = new RegExp(`\"[^\"]+\"|'[^']+'|url\\\\([^)]+\\\\)|(\\\\d*\\\\.?\\\\d+)[r|u]px`, 'g');\nfunction toFixed(number, precision) {\n const multiplier = Math.pow(10, precision + 1);\n const wholeNumber = Math.floor(number * multiplier);\n return (Math.round(wholeNumber / 10) * 10) / multiplier;\n}\nconst defaultRpx2Unit = {\n unit: 'rem',\n unitRatio: 10 / 320,\n unitPrecision: 5,\n};\nconst defaultMiniProgramRpx2Unit = {\n unit: 'rpx',\n unitRatio: 1,\n unitPrecision: 1,\n};\nconst defaultNVueRpx2Unit = defaultMiniProgramRpx2Unit;\nfunction createRpx2Unit(unit, unitRatio, unitPrecision) {\n // ignore: rpxCalcIncludeWidth\n return (val) => val.replace(unitRE, (m, $1) => {\n if (!$1) {\n return m;\n }\n if (unitRatio === 1) {\n return `${$1}${unit}`;\n }\n const value = toFixed(parseFloat($1) * unitRatio, unitPrecision);\n return value === 0 ? '0' : `${value}${unit}`;\n });\n}\n\nfunction passive(passive) {\n return { passive };\n}\nfunction normalizeDataset(el) {\n // TODO\n return JSON.parse(JSON.stringify(el.dataset || {}));\n}\nfunction normalizeTarget(el) {\n const { id, offsetTop, offsetLeft } = el;\n return {\n id,\n dataset: getCustomDataset(el),\n offsetTop,\n offsetLeft,\n };\n}\nfunction addFont(family, source, desc) {\n const fonts = document.fonts;\n if (fonts) {\n const fontFace = new FontFace(family, source, desc);\n return fontFace.load().then(() => {\n fonts.add && fonts.add(fontFace);\n });\n }\n return new Promise((resolve) => {\n const style = document.createElement('style');\n const values = [];\n if (desc) {\n const { style, weight, stretch, unicodeRange, variant, featureSettings } = desc;\n style && values.push(`font-style:${style}`);\n weight && values.push(`font-weight:${weight}`);\n stretch && values.push(`font-stretch:${stretch}`);\n unicodeRange && values.push(`unicode-range:${unicodeRange}`);\n variant && values.push(`font-variant:${variant}`);\n featureSettings && values.push(`font-feature-settings:${featureSettings}`);\n }\n style.innerText = `@font-face{font-family:\"${family}\";src:${source};${values.join(';')}}`;\n document.head.appendChild(style);\n resolve();\n });\n}\nfunction scrollTo(scrollTop, duration, isH5) {\n if (isString(scrollTop)) {\n const el = document.querySelector(scrollTop);\n if (el) {\n const { top } = el.getBoundingClientRect();\n scrollTop = top + window.pageYOffset;\n // 如果存在,减去 高度\n const pageHeader = document.querySelector('uni-page-head');\n if (pageHeader) {\n scrollTop -= pageHeader.offsetHeight;\n }\n }\n }\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n const documentElement = document.documentElement;\n const { clientHeight, scrollHeight } = documentElement;\n scrollTop = Math.min(scrollTop, scrollHeight - clientHeight);\n if (duration === 0) {\n // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制\n documentElement.scrollTop = document.body.scrollTop = scrollTop;\n return;\n }\n if (window.scrollY === scrollTop) {\n return;\n }\n const scrollTo = (duration) => {\n if (duration <= 0) {\n window.scrollTo(0, scrollTop);\n return;\n }\n const distaince = scrollTop - window.scrollY;\n requestAnimationFrame(function () {\n window.scrollTo(0, window.scrollY + (distaince / duration) * 10);\n scrollTo(duration - 10);\n });\n };\n scrollTo(duration);\n}\n\nconst encode = encodeURIComponent;\nfunction stringifyQuery(obj, encodeStr = encode) {\n const res = obj\n ? Object.keys(obj)\n .map((key) => {\n let val = obj[key];\n if (typeof val === undefined || val === null) {\n val = '';\n }\n else if (isPlainObject(val)) {\n val = JSON.stringify(val);\n }\n return encodeStr(key) + '=' + encodeStr(val);\n })\n .filter((x) => x.length > 0)\n .join('&')\n : null;\n return res ? `?${res}` : '';\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n try {\n return decodeURIComponent('' + text);\n }\n catch (err) { }\n return '' + text;\n}\nfunction decodedQuery(query = {}) {\n const decodedQuery = {};\n Object.keys(query).forEach((name) => {\n try {\n decodedQuery[name] = decode(query[name]);\n }\n catch (e) {\n decodedQuery[name] = query[name];\n }\n });\n return decodedQuery;\n}\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * https://github.com/vuejs/vue-router-next/blob/master/src/query.ts\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n const query = {};\n // avoid creating an object with an empty key and empty value\n // because of split('&')\n if (search === '' || search === '?')\n return query;\n const hasLeadingIM = search[0] === '?';\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n for (let i = 0; i < searchParams.length; ++i) {\n // pre decode the + into space\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n // allow the = character\n let eqPos = searchParam.indexOf('=');\n let key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n let value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n // an extra variable for ts types\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n }\n else {\n query[key] = value;\n }\n }\n return query;\n}\n\nfunction parseUrl(url) {\n const [path, querystring] = url.split('?', 2);\n return {\n path,\n query: parseQuery(querystring || ''),\n };\n}\n\nfunction parseNVueDataset(attr) {\n const dataset = {};\n if (attr) {\n Object.keys(attr).forEach((key) => {\n if (key.indexOf('data-') === 0) {\n dataset[key.replace('data-', '')] = attr[key];\n }\n });\n }\n return dataset;\n}\n\nfunction plusReady(callback) {\n if (!isFunction(callback)) {\n return;\n }\n if (window.plus) {\n return callback();\n }\n document.addEventListener('plusready', callback);\n}\n\nclass DOMException extends Error {\n constructor(message) {\n super(message);\n this.name = 'DOMException';\n }\n}\n\nfunction normalizeEventType(type, options) {\n if (options) {\n if (options.capture) {\n type += 'Capture';\n }\n if (options.once) {\n type += 'Once';\n }\n if (options.passive) {\n type += 'Passive';\n }\n }\n return `on${capitalize(camelize(type))}`;\n}\nclass UniEvent {\n constructor(type, opts) {\n this.defaultPrevented = false;\n this.timeStamp = Date.now();\n this._stop = false;\n this._end = false;\n this.type = type;\n this.bubbles = !!opts.bubbles;\n this.cancelable = !!opts.cancelable;\n }\n preventDefault() {\n this.defaultPrevented = true;\n }\n stopImmediatePropagation() {\n this._end = this._stop = true;\n }\n stopPropagation() {\n this._stop = true;\n }\n}\nfunction createUniEvent(evt) {\n if (evt instanceof UniEvent) {\n return evt;\n }\n const [type] = parseEventName(evt.type);\n const uniEvent = new UniEvent(type, {\n bubbles: false,\n cancelable: false,\n });\n extend(uniEvent, evt);\n return uniEvent;\n}\nclass UniEventTarget {\n constructor() {\n this.listeners = Object.create(null);\n }\n dispatchEvent(evt) {\n const listeners = this.listeners[evt.type];\n if (!listeners) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error(formatLog('dispatchEvent', this.nodeId), evt.type, 'not found');\n }\n return false;\n }\n // 格式化事件类型\n const event = createUniEvent(evt);\n const len = listeners.length;\n for (let i = 0; i < len; i++) {\n listeners[i].call(this, event);\n if (event._end) {\n break;\n }\n }\n return event.cancelable && event.defaultPrevented;\n }\n addEventListener(type, listener, options) {\n type = normalizeEventType(type, options);\n (this.listeners[type] || (this.listeners[type] = [])).push(listener);\n }\n removeEventListener(type, callback, options) {\n type = normalizeEventType(type, options);\n const listeners = this.listeners[type];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(callback);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n}\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\nfunction parseEventName(name) {\n let options;\n if (optionsModifierRE.test(name)) {\n options = {};\n let m;\n while ((m = name.match(optionsModifierRE))) {\n name = name.slice(0, name.length - m[0].length);\n options[m[0].toLowerCase()] = true;\n }\n }\n return [hyphenate(name.slice(2)), options];\n}\n\nconst EventModifierFlags = /*#__PURE__*/ (() => {\n return {\n stop: 1,\n prevent: 1 << 1,\n self: 1 << 2,\n };\n})();\nfunction encodeModifier(modifiers) {\n let flag = 0;\n if (modifiers.includes('stop')) {\n flag |= EventModifierFlags.stop;\n }\n if (modifiers.includes('prevent')) {\n flag |= EventModifierFlags.prevent;\n }\n if (modifiers.includes('self')) {\n flag |= EventModifierFlags.self;\n }\n return flag;\n}\n\nconst NODE_TYPE_PAGE = 0;\nconst NODE_TYPE_ELEMENT = 1;\nconst NODE_TYPE_TEXT = 3;\nconst NODE_TYPE_COMMENT = 8;\nfunction sibling(node, type) {\n const { parentNode } = node;\n if (!parentNode) {\n return null;\n }\n const { childNodes } = parentNode;\n return childNodes[childNodes.indexOf(node) + (type === 'n' ? 1 : -1)] || null;\n}\nfunction removeNode(node) {\n const { parentNode } = node;\n if (parentNode) {\n const { childNodes } = parentNode;\n const index = childNodes.indexOf(node);\n if (index > -1) {\n node.parentNode = null;\n childNodes.splice(index, 1);\n }\n }\n}\nfunction checkNodeId(node) {\n if (!node.nodeId && node.pageNode) {\n node.nodeId = node.pageNode.genId();\n }\n}\n// 为优化性能,各平台不使用proxy来实现node的操作拦截,而是直接通过pageNode定制\nclass UniNode extends UniEventTarget {\n constructor(nodeType, nodeName, container) {\n super();\n this.pageNode = null;\n this.parentNode = null;\n this._text = null;\n if (container) {\n const { pageNode } = container;\n if (pageNode) {\n this.pageNode = pageNode;\n this.nodeId = pageNode.genId();\n !pageNode.isUnmounted && pageNode.onCreate(this, nodeName);\n }\n }\n this.nodeType = nodeType;\n this.nodeName = nodeName;\n this.childNodes = [];\n }\n get firstChild() {\n return this.childNodes[0] || null;\n }\n get lastChild() {\n const { childNodes } = this;\n const length = childNodes.length;\n return length ? childNodes[length - 1] : null;\n }\n get nextSibling() {\n return sibling(this, 'n');\n }\n get nodeValue() {\n return null;\n }\n set nodeValue(_val) { }\n get textContent() {\n return this._text || '';\n }\n set textContent(text) {\n this._text = text;\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onTextContent(this, text);\n }\n }\n get parentElement() {\n const { parentNode } = this;\n if (parentNode && parentNode.nodeType === NODE_TYPE_ELEMENT) {\n return parentNode;\n }\n return null;\n }\n get previousSibling() {\n return sibling(this, 'p');\n }\n appendChild(newChild) {\n return this.insertBefore(newChild, null);\n }\n cloneNode(deep) {\n const cloned = extend(Object.create(Object.getPrototypeOf(this)), this);\n const { attributes } = cloned;\n if (attributes) {\n cloned.attributes = extend({}, attributes);\n }\n if (deep) {\n cloned.childNodes = cloned.childNodes.map((childNode) => childNode.cloneNode(true));\n }\n return cloned;\n }\n insertBefore(newChild, refChild) {\n // 先从现在的父节点移除(注意:不能触发onRemoveChild,否则会生成先remove该 id,再 insert)\n removeNode(newChild);\n newChild.pageNode = this.pageNode;\n newChild.parentNode = this;\n checkNodeId(newChild);\n const { childNodes } = this;\n if (refChild) {\n const index = childNodes.indexOf(refChild);\n if (index === -1) {\n throw new DOMException(`Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`);\n }\n childNodes.splice(index, 0, newChild);\n }\n else {\n childNodes.push(newChild);\n }\n return this.pageNode && !this.pageNode.isUnmounted\n ? this.pageNode.onInsertBefore(this, newChild, refChild)\n : newChild;\n }\n removeChild(oldChild) {\n const { childNodes } = this;\n const index = childNodes.indexOf(oldChild);\n if (index === -1) {\n throw new DOMException(`Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.`);\n }\n oldChild.parentNode = null;\n childNodes.splice(index, 1);\n return this.pageNode && !this.pageNode.isUnmounted\n ? this.pageNode.onRemoveChild(oldChild)\n : oldChild;\n }\n}\nconst ATTR_CLASS = 'class';\nconst ATTR_STYLE = 'style';\nconst ATTR_INNER_HTML = 'innerHTML';\nconst ATTR_TEXT_CONTENT = 'textContent';\nconst ATTR_V_SHOW = '.vShow';\nconst ATTR_V_OWNER_ID = '.vOwnerId';\nconst ATTR_V_RENDERJS = '.vRenderjs';\nconst ATTR_CHANGE_PREFIX = 'change:';\nclass UniBaseNode extends UniNode {\n constructor(nodeType, nodeName, container) {\n super(nodeType, nodeName, container);\n this.attributes = Object.create(null);\n this.style = null;\n this.vShow = null;\n this._html = null;\n }\n get className() {\n return (this.attributes[ATTR_CLASS] || '');\n }\n set className(val) {\n this.setAttribute(ATTR_CLASS, val);\n }\n get innerHTML() {\n return '';\n }\n set innerHTML(html) {\n this._html = html;\n }\n addEventListener(type, listener, options) {\n super.addEventListener(type, listener, options);\n if (this.pageNode && !this.pageNode.isUnmounted) {\n if (listener.wxsEvent) {\n this.pageNode.onAddWxsEvent(this, normalizeEventType(type, options), listener.wxsEvent, encodeModifier(listener.modifiers || []));\n }\n else {\n this.pageNode.onAddEvent(this, normalizeEventType(type, options), encodeModifier(listener.modifiers || []));\n }\n }\n }\n removeEventListener(type, callback, options) {\n super.removeEventListener(type, callback, options);\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onRemoveEvent(this, normalizeEventType(type, options));\n }\n }\n getAttribute(qualifiedName) {\n if (qualifiedName === ATTR_STYLE) {\n return this.style;\n }\n return this.attributes[qualifiedName];\n }\n removeAttribute(qualifiedName) {\n if (qualifiedName == ATTR_STYLE) {\n this.style = null;\n }\n else {\n delete this.attributes[qualifiedName];\n }\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onRemoveAttribute(this, qualifiedName);\n }\n }\n setAttribute(qualifiedName, value) {\n if (qualifiedName === ATTR_STYLE) {\n this.style = value;\n }\n else {\n this.attributes[qualifiedName] = value;\n }\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onSetAttribute(this, qualifiedName, value);\n }\n }\n toJSON({ attr, normalize, } = {}) {\n const { attributes, style, listeners, _text } = this;\n const res = {};\n if (Object.keys(attributes).length) {\n res.a = normalize ? normalize(attributes) : attributes;\n }\n const events = Object.keys(listeners);\n if (events.length) {\n let w = undefined;\n const e = {};\n events.forEach((name) => {\n const handlers = listeners[name];\n if (handlers.length) {\n // 可能存在多个 handler 且不同 modifiers 吗?\n const { wxsEvent, modifiers } = handlers[0];\n const modifier = encodeModifier(modifiers || []);\n if (!wxsEvent) {\n e[name] = modifier;\n }\n else {\n if (!w) {\n w = {};\n }\n w[name] = [normalize ? normalize(wxsEvent) : wxsEvent, modifier];\n }\n }\n });\n res.e = normalize ? normalize(e, false) : e;\n if (w) {\n res.w = normalize ? normalize(w, false) : w;\n }\n }\n if (style !== null) {\n res.s = normalize ? normalize(style) : style;\n }\n if (!attr) {\n res.i = this.nodeId;\n res.n = this.nodeName;\n }\n if (_text !== null) {\n res.t = normalize ? normalize(_text) : _text;\n }\n return res;\n }\n}\n\nclass UniCommentNode extends UniNode {\n constructor(text, container) {\n super(NODE_TYPE_COMMENT, '#comment', container);\n this._text = (process.env.NODE_ENV !== 'production') ? text : '';\n }\n toJSON(opts = {}) {\n // 暂时不传递 text 到 view 层,没啥意义,节省点数据量\n return opts.attr\n ? {}\n : {\n i: this.nodeId,\n };\n // return opts.attr\n // ? { t: this._text as string }\n // : {\n // i: this.nodeId!,\n // t: this._text as string,\n // }\n }\n}\n\nclass UniElement extends UniBaseNode {\n constructor(nodeName, container) {\n super(NODE_TYPE_ELEMENT, nodeName.toUpperCase(), container);\n this.tagName = this.nodeName;\n }\n}\nclass UniInputElement extends UniElement {\n get value() {\n return this.getAttribute('value');\n }\n set value(val) {\n this.setAttribute('value', val);\n }\n}\nclass UniTextAreaElement extends UniInputElement {\n}\n\nclass UniTextNode extends UniBaseNode {\n constructor(text, container) {\n super(NODE_TYPE_TEXT, '#text', container);\n this._text = text;\n }\n get nodeValue() {\n return this._text || '';\n }\n set nodeValue(text) {\n this._text = text;\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onNodeValue(this, text);\n }\n }\n}\n\nconst forcePatchProps = {\n AD: ['data'],\n 'AD-DRAW': ['data'],\n 'LIVE-PLAYER': ['picture-in-picture-mode'],\n MAP: [\n 'markers',\n 'polyline',\n 'circles',\n 'controls',\n 'include-points',\n 'polygons',\n ],\n PICKER: ['range', 'value'],\n 'PICKER-VIEW': ['value'],\n 'RICH-TEXT': ['nodes'],\n VIDEO: ['danmu-list', 'header'],\n 'WEB-VIEW': ['webview-styles'],\n};\nconst forcePatchPropKeys = ['animation'];\n\nconst forcePatchProp = (el, key) => {\n if (forcePatchPropKeys.indexOf(key) > -1) {\n return true;\n }\n const keys = forcePatchProps[el.nodeName];\n if (keys && keys.indexOf(key) > -1) {\n return true;\n }\n return false;\n};\n\nconst ACTION_TYPE_PAGE_CREATE = 1;\nconst ACTION_TYPE_PAGE_CREATED = 2;\nconst ACTION_TYPE_CREATE = 3;\nconst ACTION_TYPE_INSERT = 4;\nconst ACTION_TYPE_REMOVE = 5;\nconst ACTION_TYPE_SET_ATTRIBUTE = 6;\nconst ACTION_TYPE_REMOVE_ATTRIBUTE = 7;\nconst ACTION_TYPE_ADD_EVENT = 8;\nconst ACTION_TYPE_REMOVE_EVENT = 9;\nconst ACTION_TYPE_SET_TEXT = 10;\nconst ACTION_TYPE_ADD_WXS_EVENT = 12;\nconst ACTION_TYPE_PAGE_SCROLL = 15;\nconst ACTION_TYPE_EVENT = 20;\n\n/**\n * 需要手动传入 timer,主要是解决 App 平台的定制 timer\n */\nfunction debounce(fn, delay, { clearTimeout, setTimeout }) {\n let timeout;\n const newFn = function () {\n clearTimeout(timeout);\n const timerFn = () => fn.apply(this, arguments);\n timeout = setTimeout(timerFn, delay);\n };\n newFn.cancel = function () {\n clearTimeout(timeout);\n };\n return newFn;\n}\n\nclass EventChannel {\n constructor(id, events) {\n this.id = id;\n this.listener = {};\n this.emitCache = [];\n if (events) {\n Object.keys(events).forEach((name) => {\n this.on(name, events[name]);\n });\n }\n }\n emit(eventName, ...args) {\n const fns = this.listener[eventName];\n if (!fns) {\n return this.emitCache.push({\n eventName,\n args,\n });\n }\n fns.forEach((opt) => {\n opt.fn.apply(opt.fn, args);\n });\n this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');\n }\n on(eventName, fn) {\n this._addListener(eventName, 'on', fn);\n this._clearCache(eventName);\n }\n once(eventName, fn) {\n this._addListener(eventName, 'once', fn);\n this._clearCache(eventName);\n }\n off(eventName, fn) {\n const fns = this.listener[eventName];\n if (!fns) {\n return;\n }\n if (fn) {\n for (let i = 0; i < fns.length;) {\n if (fns[i].fn === fn) {\n fns.splice(i, 1);\n i--;\n }\n i++;\n }\n }\n else {\n delete this.listener[eventName];\n }\n }\n _clearCache(eventName) {\n for (let index = 0; index < this.emitCache.length; index++) {\n const cache = this.emitCache[index];\n const _name = eventName\n ? cache.eventName === eventName\n ? eventName\n : null\n : cache.eventName;\n if (!_name)\n continue;\n const location = this.emit.apply(this, [_name, ...cache.args]);\n if (typeof location === 'number') {\n this.emitCache.pop();\n continue;\n }\n this.emitCache.splice(index, 1);\n index--;\n }\n }\n _addListener(eventName, type, fn) {\n (this.listener[eventName] || (this.listener[eventName] = [])).push({\n fn,\n type,\n });\n }\n}\n\nconst PAGE_HOOKS = [\n ON_INIT,\n ON_LOAD,\n ON_SHOW,\n ON_HIDE,\n ON_UNLOAD,\n ON_BACK_PRESS,\n ON_PAGE_SCROLL,\n ON_TAB_ITEM_TAP,\n ON_REACH_BOTTOM,\n ON_PULL_DOWN_REFRESH,\n ON_SHARE_TIMELINE,\n ON_SHARE_APP_MESSAGE,\n ON_SHARE_CHAT,\n ON_ADD_TO_FAVORITES,\n ON_SAVE_EXIT_STATE,\n ON_NAVIGATION_BAR_BUTTON_TAP,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED,\n];\nfunction isRootImmediateHook(name) {\n const PAGE_SYNC_HOOKS = [ON_LOAD, ON_SHOW];\n return PAGE_SYNC_HOOKS.indexOf(name) > -1;\n}\n// isRootImmediateHookX deprecated\nfunction isRootHook(name) {\n return PAGE_HOOKS.indexOf(name) > -1;\n}\nconst UniLifecycleHooks = [\n ON_SHOW,\n ON_HIDE,\n ON_LAUNCH,\n ON_ERROR,\n ON_THEME_CHANGE,\n ON_PAGE_NOT_FOUND,\n ON_UNHANDLE_REJECTION,\n ON_EXIT,\n ON_INIT,\n ON_LOAD,\n ON_READY,\n ON_UNLOAD,\n ON_RESIZE,\n ON_BACK_PRESS,\n ON_PAGE_SCROLL,\n ON_TAB_ITEM_TAP,\n ON_REACH_BOTTOM,\n ON_PULL_DOWN_REFRESH,\n ON_SHARE_TIMELINE,\n ON_ADD_TO_FAVORITES,\n ON_SHARE_APP_MESSAGE,\n ON_SHARE_CHAT,\n ON_SAVE_EXIT_STATE,\n ON_NAVIGATION_BAR_BUTTON_TAP,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED,\n];\nconst MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {\n return {\n onPageScroll: 1,\n onShareAppMessage: 1 << 1,\n onShareTimeline: 1 << 2,\n };\n})();\nfunction isUniLifecycleHook(name, value, checkType = true) {\n // 检查类型\n if (checkType && !isFunction(value)) {\n return false;\n }\n if (UniLifecycleHooks.indexOf(name) > -1) {\n // 已预定义\n return true;\n }\n else if (name.indexOf('on') === 0) {\n // 以 on 开头\n return true;\n }\n return false;\n}\n\nlet vueApp;\nconst createVueAppHooks = [];\n/**\n * 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑\n */\nfunction onCreateVueApp(hook) {\n // TODO 每个 nvue 页面都会触发\n if (vueApp) {\n return hook(vueApp);\n }\n createVueAppHooks.push(hook);\n}\nfunction invokeCreateVueAppHook(app) {\n vueApp = app;\n createVueAppHooks.forEach((hook) => hook(app));\n}\nconst invokeCreateErrorHandler = once((app, createErrorHandler) => {\n // 不再判断开发者是否监听了onError,直接返回 createErrorHandler,内部 errorHandler 会调用开发者自定义的 errorHandler,以及判断开发者是否监听了onError\n return createErrorHandler(app);\n});\n\nconst E = function () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n};\nE.prototype = {\n _id: 1,\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx,\n _id: this._id,\n });\n return this._id++;\n },\n once: function (name, callback, ctx) {\n var self = this;\n function listener() {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n }\n listener._ = callback;\n return this.on(name, listener, ctx);\n },\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n return this;\n },\n off: function (name, event) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n if (evts && event) {\n for (var i = evts.length - 1; i >= 0; i--) {\n if (evts[i].fn === event ||\n evts[i].fn._ === event ||\n evts[i]._id === event) {\n evts.splice(i, 1);\n break;\n }\n }\n liveEvents = evts;\n }\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n liveEvents.length ? (e[name] = liveEvents) : delete e[name];\n return this;\n },\n};\nvar E$1 = E;\n\nconst borderStyles = {\n black: 'rgba(0,0,0,0.4)',\n white: 'rgba(255,255,255,0.4)',\n};\nfunction normalizeTabBarStyles(borderStyle) {\n if (borderStyle && borderStyle in borderStyles) {\n return borderStyles[borderStyle];\n }\n return borderStyle;\n}\nfunction normalizeTitleColor(titleColor) {\n return titleColor === 'black' ? '#000000' : '#ffffff';\n}\nfunction resolveStringStyleItem(modeStyle, styleItem, key) {\n if (isString(styleItem) && styleItem.startsWith('@')) {\n const _key = styleItem.replace('@', '');\n let _styleItem = modeStyle[_key] || styleItem;\n switch (key) {\n case 'titleColor':\n _styleItem = normalizeTitleColor(_styleItem);\n break;\n case 'borderStyle':\n _styleItem = normalizeTabBarStyles(_styleItem);\n break;\n }\n return _styleItem;\n }\n return styleItem;\n}\nfunction normalizeStyles(pageStyle, themeConfig = {}, mode = 'light') {\n const modeStyle = themeConfig[mode];\n const styles = {};\n if (typeof modeStyle === 'undefined' || !pageStyle)\n return pageStyle;\n Object.keys(pageStyle).forEach((key) => {\n const styleItem = pageStyle[key]; // Object Array String\n const parseStyleItem = () => {\n if (isPlainObject(styleItem))\n return normalizeStyles(styleItem, themeConfig, mode);\n if (isArray(styleItem))\n return styleItem.map((item) => {\n if (isPlainObject(item))\n return normalizeStyles(item, themeConfig, mode);\n return resolveStringStyleItem(modeStyle, item);\n });\n return resolveStringStyleItem(modeStyle, styleItem, key);\n };\n styles[key] = parseStyleItem();\n });\n return styles;\n}\n\nfunction getEnvLocale() {\n const { env } = process;\n const lang = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE;\n return (lang && lang.replace(/[.:].*/, '')) || 'en';\n}\n\nconst isStringIntegerKey = (key) => typeof key === 'string' &&\n key !== 'NaN' &&\n key[0] !== '-' &&\n '' + parseInt(key, 10) === key;\nconst isNumberIntegerKey = (key) => typeof key === 'number' &&\n !isNaN(key) &&\n key >= 0 &&\n parseInt(key + '', 10) === key;\n/**\n * 用于替代@vue/shared的isIntegerKey,原始方法在鸿蒙arkts中会引发bug。根本原因是arkts的数组的key是数字而不是字符串。\n * 目前这个方法使用的地方都和数组有关,切记不能挪作他用。\n * @param key\n * @returns\n */\nconst isIntegerKey = (key) => isNumberIntegerKey(key) || isStringIntegerKey(key);\n\nexport { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, E$1 as Emitter, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, OFF_HOST_THEME_CHANGE, OFF_THEME_CHANGE, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_EXIT, ON_HIDE, ON_HOST_THEME_CHANGE, ON_INIT, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_CHANGE, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SAVE_EXIT_STATE, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UNI_UI_CONFLICT_TAGS, UVUE_BUILT_IN_TAGS, UVUE_HARMONY_BUILT_IN_TAGS, UVUE_IOS_BUILT_IN_TAGS, UVUE_WEB_BUILT_IN_TAGS, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, VIRTUAL_HOST_CLASS, VIRTUAL_HOST_HIDDEN, VIRTUAL_HOST_ID, VIRTUAL_HOST_STYLE, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, borderStyles, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultNVueRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getGlobal, getLen, getValueByDataPath, initCustomDatasetOnce, invokeArrayFns, invokeCreateErrorHandler, invokeCreateVueAppHook, isAppHarmonyUVueNativeTag, isAppIOSUVueNativeTag, isAppNVueNativeTag, isAppNativeTag, isAppUVueBuiltInEasyComponent, isAppUVueNativeTag, isAppVoidTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isIntegerKey, isMiniProgramNativeTag, isMiniProgramUVueNativeTag, isRootHook, isRootImmediateHook, isUniLifecycleHook, isUniXElement, normalizeClass, normalizeDataset, normalizeEventType, normalizeProps, normalizeStyle, normalizeStyles, normalizeTabBarStyles, normalizeTarget, normalizeTitleColor, onCreateVueApp, once, parseEventName, parseNVueDataset, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, sortObject, stringifyQuery, updateElementStyle };\n","import { isRootHook, getValueByDataPath, isUniLifecycleHook, ON_ERROR, UniLifecycleHooks, invokeCreateErrorHandler, dynamicSlotName } from '@dcloudio/uni-shared';\nimport { NOOP, extend, isSymbol, isObject, def, hasChanged, isFunction, isArray, isPromise, camelize, capitalize, EMPTY_OBJ, remove, toHandlerKey, hasOwn, hyphenate, isReservedProp, toRawType, isString, normalizeClass, normalizeStyle, isOn, toTypeString, isMap, isIntegerKey, isSet, isPlainObject, makeMap, invokeArrayFns, isBuiltInDirective, looseToNumber, NO, EMPTY_ARR, isModelListener, toNumber, toDisplayString } from '@vue/shared';\nexport { EMPTY_OBJ, camelize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\n/**\n* @dcloudio/uni-mp-vue v3.4.21\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n\nfunction warn$2(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeEffect;\nclass ReactiveEffect {\n constructor(fn, trigger, scheduler, scope) {\n this.fn = fn;\n this.trigger = trigger;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n /**\n * @internal\n */\n this._dirtyLevel = 4;\n /**\n * @internal\n */\n this._trackId = 0;\n /**\n * @internal\n */\n this._runnings = 0;\n /**\n * @internal\n */\n this._shouldSchedule = false;\n /**\n * @internal\n */\n this._depsLength = 0;\n recordEffectScope(this, scope);\n }\n get dirty() {\n if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {\n this._dirtyLevel = 1;\n pauseTracking();\n for (let i = 0; i < this._depsLength; i++) {\n const dep = this.deps[i];\n if (dep.computed) {\n triggerComputed(dep.computed);\n if (this._dirtyLevel >= 4) {\n break;\n }\n }\n }\n if (this._dirtyLevel === 1) {\n this._dirtyLevel = 0;\n }\n resetTracking();\n }\n return this._dirtyLevel >= 4;\n }\n set dirty(v) {\n this._dirtyLevel = v ? 4 : 0;\n }\n run() {\n this._dirtyLevel = 0;\n if (!this.active) {\n return this.fn();\n }\n let lastShouldTrack = shouldTrack;\n let lastEffect = activeEffect;\n try {\n shouldTrack = true;\n activeEffect = this;\n this._runnings++;\n preCleanupEffect(this);\n return this.fn();\n } finally {\n postCleanupEffect(this);\n this._runnings--;\n activeEffect = lastEffect;\n shouldTrack = lastShouldTrack;\n }\n }\n stop() {\n var _a;\n if (this.active) {\n preCleanupEffect(this);\n postCleanupEffect(this);\n (_a = this.onStop) == null ? void 0 : _a.call(this);\n this.active = false;\n }\n }\n}\nfunction triggerComputed(computed) {\n return computed.value;\n}\nfunction preCleanupEffect(effect2) {\n effect2._trackId++;\n effect2._depsLength = 0;\n}\nfunction postCleanupEffect(effect2) {\n if (effect2.deps.length > effect2._depsLength) {\n for (let i = effect2._depsLength; i < effect2.deps.length; i++) {\n cleanupDepEffect(effect2.deps[i], effect2);\n }\n effect2.deps.length = effect2._depsLength;\n }\n}\nfunction cleanupDepEffect(dep, effect2) {\n const trackId = dep.get(effect2);\n if (trackId !== void 0 && effect2._trackId !== trackId) {\n dep.delete(effect2);\n if (dep.size === 0) {\n dep.cleanup();\n }\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn, NOOP, () => {\n if (_effect.dirty) {\n _effect.run();\n }\n });\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nlet pauseScheduleStack = 0;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction pauseScheduling() {\n pauseScheduleStack++;\n}\nfunction resetScheduling() {\n pauseScheduleStack--;\n while (!pauseScheduleStack && queueEffectSchedulers.length) {\n queueEffectSchedulers.shift()();\n }\n}\nfunction trackEffect(effect2, dep, debuggerEventExtraInfo) {\n var _a;\n if (dep.get(effect2) !== effect2._trackId) {\n dep.set(effect2, effect2._trackId);\n const oldDep = effect2.deps[effect2._depsLength];\n if (oldDep !== dep) {\n if (oldDep) {\n cleanupDepEffect(oldDep, effect2);\n }\n effect2.deps[effect2._depsLength++] = dep;\n } else {\n effect2._depsLength++;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n }\n}\nconst queueEffectSchedulers = [];\nfunction triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {\n var _a;\n pauseScheduling();\n for (const effect2 of dep.keys()) {\n let tracking;\n if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);\n effect2._dirtyLevel = dirtyLevel;\n }\n if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n effect2.trigger();\n if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {\n effect2._shouldSchedule = false;\n if (effect2.scheduler) {\n queueEffectSchedulers.push(effect2.scheduler);\n }\n }\n }\n }\n resetScheduling();\n}\n\nconst createDep = (cleanup, computed) => {\n const dep = /* @__PURE__ */ new Map();\n dep.cleanup = cleanup;\n dep.computed = computed;\n return dep;\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep(() => depsMap.delete(key)));\n }\n trackEffect(\n activeEffect,\n dep,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key\n } : void 0\n );\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n pauseScheduling();\n for (const dep of deps) {\n if (dep) {\n triggerEffects(\n dep,\n 4,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n } : void 0\n );\n }\n }\n resetScheduling();\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n pauseScheduling();\n const res = toRaw(this)[key].apply(this, args);\n resetScheduling();\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _isShallow = false) {\n this._isReadonly = _isReadonly;\n this._isShallow = _isShallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return isShallow2;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n // this means the reciever is a user proxy of the reactive proxy\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (isShallow2) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(false, isShallow2);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (!this._isShallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n return false;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(true, isShallow2);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set$1(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n warn$2(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(method, false, false);\n readonlyInstrumentations2[method] = createIterableMethod(method, true, false);\n shallowInstrumentations2[method] = createIterableMethod(method, false, true);\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n warn$2(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n if (Object.isExtensible(value)) {\n def(value, \"__v_skip\", true);\n }\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nconst COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this.getter = getter;\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this.effect = new ReactiveEffect(\n () => getter(this._value),\n () => triggerRefValue(\n this,\n this.effect._dirtyLevel === 2 ? 2 : 3\n )\n );\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {\n triggerRefValue(self, 4);\n }\n trackRefValue(self);\n if (self.effect._dirtyLevel >= 2) {\n if (!!(process.env.NODE_ENV !== \"production\") && this._warnRecursive) {\n warn$2(COMPUTED_SIDE_EFFECT_WARN, `\n\ngetter: `, this.getter);\n }\n triggerRefValue(self, 2);\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x\n get _dirty() {\n return this.effect.dirty;\n }\n set _dirty(v) {\n this.effect.dirty = v;\n }\n // #endregion\n}\nfunction computed$1(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n warn$2(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nfunction trackRefValue(ref2) {\n var _a;\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n trackEffect(\n activeEffect,\n (_a = ref2.dep) != null ? _a : ref2.dep = createDep(\n () => ref2.dep = void 0,\n ref2 instanceof ComputedRefImpl ? ref2 : void 0\n ),\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"get\",\n key: \"value\"\n } : void 0\n );\n }\n}\nfunction triggerRefValue(ref2, dirtyLevel = 4, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n triggerEffects(\n dep,\n dirtyLevel,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n } : void 0\n );\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, 4, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n warn$2(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn$1(msg, ...args) {\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.map((a) => {\n var _a, _b;\n return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n }).join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\n\nconst ErrorTypeStrings = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n try {\n return args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] || type : `https://vuejs.org/error-reference/#runtime-${type}`;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings[type] || type;\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n console.error(err);\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick$1(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction hasQueueJob(job) {\n return queue.indexOf(job) > -1;\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\n (a, b) => getId(a) - getId(b)\n );\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n handleError(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet devtools;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools) {\n devtools.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook(hook, target) {\n var _a, _b;\n devtools = hook;\n if (devtools) {\n devtools.enabled = true;\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook(newHook, target);\n });\n setTimeout(() => {\n if (!devtools) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n // fixed by xxxxxx\n // 为 0 是 App,无 parent 是 Page 指向 App\n component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn$1(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn$1(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn$1(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n event\n )}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nfunction markAttrsAccessed() {\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n {\n const ctx = inject(ssrContextKey);\n if (!ctx) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n );\n }\n return ctx;\n }\n};\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn$1(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, {\n immediate,\n deep,\n flush,\n once,\n onTrack,\n onTrigger\n} = EMPTY_OBJ) {\n if (cb && once) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n unwatch();\n };\n }\n if (!!(process.env.NODE_ENV !== \"production\") && deep !== void 0 && typeof deep === \"number\") {\n warn$1(\n `watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn$1(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn$1(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (once !== void 0) {\n warn$1(\n `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn$1(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = currentInstance;\n const reactiveGetter = (source2) => deep === true ? source2 : (\n // for deep: false, only traverse root-level properties\n traverse(source2, deep === false ? 1 : void 0)\n );\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n cleanup = effect.onStop = void 0;\n };\n };\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active || !effect.dirty) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, NOOP, scheduler);\n const scope = getCurrentScope();\n const unwatch = () => {\n effect.stop();\n if (scope) {\n remove(scope.effects, effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect$1(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const reset = setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n reset();\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, depth, currentDepth = 0, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n if (depth && depth > 0) {\n if (currentDepth >= depth) {\n return value;\n }\n currentDepth++;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, depth, currentDepth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, currentDepth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, currentDepth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, currentDepth, seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n if (currentRenderingInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\n\nfunction createAppContext() {\n return {\n app: null,\n config: {\n isNativeTag: NO,\n performance: false,\n globalProperties: {},\n optionMergeStrategies: {},\n errorHandler: void 0,\n warnHandler: void 0,\n compilerOptions: {}\n },\n mixins: [],\n components: {},\n directives: {},\n provides: /* @__PURE__ */ Object.create(null),\n optionsCache: /* @__PURE__ */ new WeakMap(),\n propsCache: /* @__PURE__ */ new WeakMap(),\n emitsCache: /* @__PURE__ */ new WeakMap()\n };\n}\nlet uid$1 = 0;\nfunction createAppAPI(render, hydrate) {\n return function createApp(rootComponent, rootProps = null) {\n if (!isFunction(rootComponent)) {\n rootComponent = extend({}, rootComponent);\n }\n if (rootProps != null && !isObject(rootProps)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`root props passed to app.mount() must be an object.`);\n rootProps = null;\n }\n const context = createAppContext();\n const installedPlugins = /* @__PURE__ */ new WeakSet();\n const app = context.app = {\n _uid: uid$1++,\n _component: rootComponent,\n _props: rootProps,\n _container: null,\n _context: context,\n _instance: null,\n version,\n get config() {\n return context.config;\n },\n set config(v) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `app.config cannot be replaced. Modify individual options instead.`\n );\n }\n },\n use(plugin, ...options) {\n if (installedPlugins.has(plugin)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`Plugin has already been applied to target app.`);\n } else if (plugin && isFunction(plugin.install)) {\n installedPlugins.add(plugin);\n plugin.install(app, ...options);\n } else if (isFunction(plugin)) {\n installedPlugins.add(plugin);\n plugin(app, ...options);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `A plugin must either be a function or an object with an \"install\" function.`\n );\n }\n return app;\n },\n mixin(mixin) {\n if (__VUE_OPTIONS_API__) {\n if (!context.mixins.includes(mixin)) {\n context.mixins.push(mixin);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n \"Mixin has already been applied to target app\" + (mixin.name ? `: ${mixin.name}` : \"\")\n );\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Mixins are only available in builds supporting Options API\");\n }\n return app;\n },\n component(name, component) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateComponentName(name, context.config);\n }\n if (!component) {\n return context.components[name];\n }\n if (!!(process.env.NODE_ENV !== \"production\") && context.components[name]) {\n warn$1(`Component \"${name}\" has already been registered in target app.`);\n }\n context.components[name] = component;\n return app;\n },\n directive(name, directive) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateDirectiveName(name);\n }\n if (!directive) {\n return context.directives[name];\n }\n if (!!(process.env.NODE_ENV !== \"production\") && context.directives[name]) {\n warn$1(`Directive \"${name}\" has already been registered in target app.`);\n }\n context.directives[name] = directive;\n return app;\n },\n // fixed by xxxxxx\n mount() {\n },\n // fixed by xxxxxx\n unmount() {\n },\n provide(key, value) {\n if (!!(process.env.NODE_ENV !== \"production\") && key in context.provides) {\n warn$1(\n `App already provides property with key \"${String(key)}\". It will be overwritten with the new value.`\n );\n }\n context.provides[key] = value;\n return app;\n },\n runWithContext(fn) {\n const lastApp = currentApp;\n currentApp = app;\n try {\n return fn();\n } finally {\n currentApp = lastApp;\n }\n }\n };\n return app;\n };\n}\nlet currentApp = null;\n\nfunction provide(key, value) {\n if (!currentInstance) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`provide() can only be used inside setup().`);\n }\n } else {\n let provides = currentInstance.provides;\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\n if (parentProvides === provides) {\n provides = currentInstance.provides = Object.create(parentProvides);\n }\n provides[key] = value;\n if (currentInstance.type.mpType === \"app\") {\n currentInstance.appContext.app.provide(key, value);\n }\n }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n const instance = currentInstance || currentRenderingInstance;\n if (instance || currentApp) {\n const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;\n if (provides && key in provides) {\n return provides[key];\n } else if (arguments.length > 1) {\n return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`injection \"${String(key)}\" not found.`);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`inject() can only be used inside setup() or functional components.`);\n }\n}\nfunction hasInjectionContext() {\n return !!(currentInstance || currentRenderingInstance || currentApp);\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n if (isRootHook(type)) {\n target = target.root;\n }\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n const reset = setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n reset();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(\n (ErrorTypeStrings[type] || type.replace(/^on/, \"\")).replace(/ hook$/, \"\")\n );\n warn$1(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (``)\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn$1(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的\n // $el: i => i.vnode.el,\n $el: (i) => i.__$el || (i.__$el = {}),\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\n i.effect.dirty = true;\n queueJob(i.update);\n }),\n // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn$1(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn$1(`Cannot mutate \r\n\r\n\r\n","import Component from 'D:/项目/tk-mini-program/components/contentList/contentList.vue'\nwx.createComponent(Component)"],"names":["uni","formatDate","request"],"mappings":";;;;;AA6BA,MAAK,YAAU;AAAA,EACb,QAAQ,CAAC,SAAS;AAAA,EAClB,OAAO;AACL,WAAO;AAAA,MACL,MAAM;AAAA;AAAA,MACN,MAAM;AAAA;AAAA,MACN,MAAM,CAAE;AAAA;AAAA;EAEX;AAAA,EACD,UAAU;AAER,SAAK,OAAO;AAAA,EACb;AAAA,EACD,SAAS;AAAA,IACP,qBAAqB;AACnB,WAAK,OAAO;AACZ,WAAK,OAAO;AACZ,WAAK,OAAM;AAAA,IACZ;AAAA,IACD,SAAS,MAAM;AACbA,oBAAAA,MAAI,WAAW;AAAA,QACb,KAAK;AAAA,QACL,SAAS,SAAS,KAAK;AACrB,cAAI,aAAa,KAAK,cAAc;AAAA,YAClC;AAAA,UACA,CAAC;AAAA,QACJ;AAAA,OACF;AAAA,IACF;AAAA,IACD,YAAYC,sBAAU;AAAA,IACvB,MAAM,SAAQ;AACX,YAAM,MAAM,MAAMC,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ;AAAA,UACR,MAAM,KAAK;AAAA,UACX,MAAM,KAAK;AAAA,QACV;AAAA,QACD,UAAU;AAAA,MACd,CAAC;AACDF,oBAAAA,MAAY,MAAA,OAAA,gDAAA,GAAG;AACf,UAAI,IAAI,SAAS,KAAK;AACpB,aAAK,KAAK,KAAK,GAAG,IAAI,IAAI;AAC1BA,sBAAAA,MAAY,MAAA,OAAA,gDAAA,KAAK,IAAI;AAAA,MACvB;AAAA,IACD;AAAA,IACD,kBAAkB;AAChB,WAAK;AACL,WAAK,OAAM;AAAA,IACZ;AAAA,EACF;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChFA,GAAG,gBAAgB,SAAS;"}
\ No newline at end of file
+{"version":3,"file":"contentList.js","sources":["components/contentList/contentList.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9jb21wb25lbnRzL2NvbnRlbnRMaXN0L2NvbnRlbnRMaXN0LnZ1ZQ"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ item.anchorId }}\r\n \r\n \r\n \r\n \r\n {{ item.sex === \"1\" ? \"男\" : \"女\" }}\r\n \r\n PK时间: {{ formatDate(item.pkTime) }}\r\n 金币:\r\n {{ item.coin + \"K\" }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import Component from 'D:/项目/tk-mini-program/components/contentList/contentList.vue'\nwx.createComponent(Component)"],"names":["uni","request","res","formatDate"],"mappings":";;;;;AAiDA,MAAK,YAAU;AAAA,EACb,QAAQ,CAAC,SAAS;AAAA,EAClB,OAAO;AACL,WAAO;AAAA,MACL,MAAM;AAAA;AAAA,MACN,MAAM;AAAA;AAAA,MACN,MAAM,CAAE;AAAA;AAAA,MACR,aAAa,CAAE;AAAA;AAAA;EAElB;AAAA,EACD,UAAU;AAER,SAAK,OAAM;AAAA,EACZ;AAAA,EACD,SAAS;AAAA,IACP,qBAAqB;AACnB,WAAK,OAAO;AACZ,WAAK,OAAO;AACZ,WAAK,OAAM;AAAA,IACZ;AAAA,IACD,MAAM,SAAS,MAAM;AACnBA,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MACR,CAAC;AACDA,oBAAY,MAAA,MAAA,OAAA,gDAAA,MAAM,KAAK,EAAE;AACzB,YAAM,MAAM,MAAMC,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,QACV;AAAA,QACD,UAAU;AAAA,MACZ,CAAC;AACDD,oBAAA,MAAA,MAAA,OAAA,gDAAY,OAAO,GAAG;AACtB,WAAK,cAAc,IAAI;AACvB,UAAI,IAAI,SAAS,KAAK;AACpB,YAAI,IAAI,KAAK,WAAW,GAAG;AACzBA,wBAAG,MAAC,YAAW;AACfA,wBAAY,MAAA,MAAA,OAAA,gDAAA,YAAY,IAAI,IAAI;AAChCA,wBAAAA,MAAI,WAAW;AAAA,YACb,KAAK;AAAA,YACL,SAAS,CAACE,SAAQ;AAChB,cAAAA,KAAI,aAAa,KAAK,cAAc;AAAA,gBAClC,MAAM,KAAK;AAAA,cACb,CAAC;AAAA,YACF;AAAA,UACH,CAAC;AAAA,eACI;AACLF,wBAAG,MAAC,YAAW;AACf,eAAK,kBAAiB;AAAA,QACxB;AAAA,aACK;AACLA,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA,IACD,YAAYG,sBAAU;AAAA,IACtB,MAAM,SAAS;AACb,YAAM,MAAM,MAAMF,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ;AAAA,UACR,MAAM,KAAK;AAAA,UACX,MAAM,KAAK;AAAA,QACZ;AAAA,QACD,UAAU;AAAA,MACZ,CAAC;AACDD,oBAAAA,MAAY,MAAA,OAAA,iDAAA,GAAG;AACf,UAAI,IAAI,SAAS,KAAK;AACpB,aAAK,KAAK,KAAK,GAAG,IAAI,IAAI;AAC1BA,sBAAY,MAAA,MAAA,OAAA,iDAAA,KAAK,IAAI;AAAA,MACvB;AAAA,IACD;AAAA,IACD,kBAAkB;AAChB,WAAK;AACL,WAAK,OAAM;AAAA,IACZ;AAAA,EACF;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpIA,GAAG,gBAAgB,SAAS;"}
\ No newline at end of file
diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/Home/Home.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/Home/Home.js.map
index 86ea5ee..1cae541 100644
--- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/Home/Home.js.map
+++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/Home/Home.js.map
@@ -1 +1 @@
-{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,QAAQ,CAAC,SAAS;AAAA,EAClB,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA,IACP,kBAAiB;AAEfA,oBAAAA,MAAI,WAAW,EAAE,KAAK,2BAAyB,CAAG;AAAA,IACpD;AAAA,EACD;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;;AC1CA,GAAG,WAAW,eAAe;"}
\ No newline at end of file
+{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","res","TUIlogin"],"mappings":";;;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAG1B,MAAK,YAAU;AAAA,EACb,QAAQ,CAAC,SAAS;AAAA,EAClB,OAAO;AACL,WAAO;AAAA,MACL,MAAM,CAAE;AAAA,MACR,WAAW;AAAA,MACX,UAAU,CAAE;AAAA;EAEf;AAAA,EACD,SAAS;AACPA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,OAAO,IAAI;AAChBA,sBAAAA,MAAI,WAAW;AAAA,UACb,KAAK;AAAA,UACL,SAAS,CAACC,SAAQ;AAChB,iBAAK,YAAYA,KAAI;AACrBD,0BAAAA,MAAI,WAAW;AAAA,cACb,KAAK;AAAA,cACL,SAAS,CAACC,SAAQ;AAChB,qBAAK,WAAWA,KAAI;AACpBC,oCAAAA,SAAS,KAAK,SAAS,OAAO,KAAK,KAAK,IAAI,KAAK,UAAU,OAAO;AAAA,cAQnE;AAAA,YACH,CAAC;AAAA,UACF;AAAA,QACH,CAAC;AAAA,MACF;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,kBAAkB;AAEhBF,oBAAAA,MAAI,WAAW,EAAE,KAAK,2BAA4B,CAAA;AAAA,IACnD;AAAA,EACF;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;;ACzEA,GAAG,WAAW,eAAe;"}
\ No newline at end of file
diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/pkDetail/pkDetail.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/pkDetail/pkDetail.js.map
index a3f465b..d777e0b 100644
--- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/pkDetail/pkDetail.js.map
+++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/pkDetail/pkDetail.js.map
@@ -1 +1 @@
-{"version":3,"file":"pkDetail.js","sources":["pages/pkDetail/pkDetail.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvcGtEZXRhaWwvcGtEZXRhaWwudnVl"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 主播名称{{ item.anchorId }}\r\n 主播性别{{ item.sex === 1 ? \"男\" : \"女\" }}\r\n 国家{{ item.country }}\r\n \r\n \r\n\r\n 金币{{ item.coin }}\r\n PK时间{{ formatDate(item.pkTime) }}\r\n\r\n 主播备注{{ item.remark }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/pkDetail/pkDetail.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","formatDate","VerifyLogin","request"],"mappings":";;;;;;AA8DA,MAAK,aAAc,MAAW;AAE9B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,MAAM,CAAE;AAAA,MACR,IAAI;AAAA,MACJ,MAAM,CAAE;AAAA;EAEX;AAAA,EACD,OAAO,SAAS;AAEd,UAAM,eAAe,KAAK;AAE1B,iBAAa,GAAG,cAAc,CAAC,SAAS;AACtC,WAAK,OAAO,KAAK;AACjBA,oBAAA,MAAA,MAAA,OAAA,qCAAY,WAAW,KAAK,IAAI;AAAA,IAClC,CAAC;AAEDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,KAAK,IAAI,KAAK;AAAA,MACpB;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,YAAYC,sBAAU;AAAA,IACtB,aAAa;AACXD,oBAAAA,MAAI,aAAa;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,IACF;AAAA,IACD,OAAO;AACL,WAAK,MAAM,MAAM,KAAK,QAAQ;AAC9B,WAAK,SAAS;AAAA,IACf;AAAA,IACD,SAAS;AAAA,IAER;AAAA,IACD,QAAQ;AACN,WAAK,MAAM,MAAM;IAClB;AAAA,IACD,WAAW;AAETE,6BAAW,YAAA,EAAG,KAAK,MAAM;AAEvB,cAAM,iBAAiB,MAAM,KAAK,KAAK,QAAQ;AAC/CF,sBAAAA,MAAI,WAAW;AAAA,UACb,KAAK,mDAAmD,cAAc;AAAA,QACxE,CAAC;AAAA,MACH,CAAC;AAAA,IACF;AAAA,IAED,MAAM,WAAW;AACfA,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MACR,CAAC;AACD,YAAM,MAAM,MAAMG,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ,KAAK;AAAA,QACd;AAAA,QACD,UAAU;AAAA,MACZ,CAAC;AACD,UAAI,IAAI,SAAS,KAAK;AACpB,YAAG,IAAI,KAAK,WAAW,GAAE;AACvBH,wBAAG,MAAC,YAAW;AACfA,wBAAA,MAAA,MAAA,OAAA,sCAAY,YAAW,IAAI,IAAI;AACjC,eAAK,OAAO,IAAI;AAAA,eACX;AACHA,wBAAG,MAAC,YAAW;AACf,eAAK,kBAAkB;AAAA,QACzB;AAAA,aACK;AACLA,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA,IAED,oBAAoB;AAClB,WAAK,MAAM,aAAa;IACzB;AAAA,EACF;AAAA,EACD,YAAY;AAAA,IACV;AAAA,EACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1JA,GAAG,WAAW,eAAe;"}
\ No newline at end of file
+{"version":3,"file":"pkDetail.js","sources":["pages/pkDetail/pkDetail.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvcGtEZXRhaWwvcGtEZXRhaWwudnVl"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 主播名称{{ item.anchorId }}\r\n 主播性别{{ item.sex === 1 ? \"男\" : \"女\" }}\r\n 国家{{ item.country }}\r\n \r\n \r\n\r\n 金币{{ item.coin }}\r\n PK时间{{ formatDate(item.pkTime) }}\r\n\r\n 主播备注{{ item.remark }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/pkDetail/pkDetail.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","formatDate","TimeFormatting","TUIStore","StoreName","isEnabledMessageReadReceiptGlobal","TUIChatEngine","OfflinePushInfoManager","TUIChatService","request"],"mappings":";;;;;;;;AA4EA,MAAA,aAAuB,MAAA;AASvB,MAAe,YAAA;AAAA,EACb,OAAO;AACE,WAAA;AAAA,MACL,MAAM,CAAC;AAAA,MACP,IAAI;AAAA,MACJ,sBAAsB;AAAA,MACtB,MAAM,CAAC;AAAA,MACP,YAAY;AAAA,MACZ,yBAAyB;AAAA,MACzB,UAAU,CAAC;AAAA,MACX,qBAAqB;AAAA,IAAA;AAAA,EAEzB;AAAA,EACA,OAAO,SAAS;AAER,UAAA,eAAe,KAAK;AAEb,iBAAA,GAAG,cAAc,CAAC,SAAS;AACtC,WAAK,OAAO,KAAK;AACjBA,oBAAA,MAAI,MAAM,OAAM,sCAAqC,WAAW,KAAK,IAAI;AAAA,IAAA,CAC1E;AAEDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AACX,aAAA,KAAK,IAAI,KAAK;AAAA,MACrB;AAAA,IAAA,CACD;AACDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,WAAW,IAAI;AAAA,MACtB;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,SAAS;AAAA,IAAA,YACPC,sBAAA;AAAA,IAAA,gBACAC,0BAAA;AAAA,IACA,OAAO,IAAI,OAAO;AACZ,UAAA,KAAK,eAAe,IAAI;AAC1B,aAAK,aAAa;AAClB,aAAK,uBAAuB;AAC5B,aAAK,0BAA0B;AAAA,MAAA,OAC1B;AACL,aAAK,aAAa,KAAK,eAAe,KAAK,OAAO;AAClD,aAAK,uBAAuB;AAC5B,aAAK,0BAA0B;AAAA,MACjC;AAAA,IACF;AAAA,IACA,aAAa;AACXF,oBAAAA,MAAI,aAAa;AAAA,QACf,OAAO;AAAA,MAAA,CACR;AAAA,IACH;AAAA,IACA,OAAO;AACA,WAAA,MAAM,MAAM,KAAK,QAAQ;AAC9B,WAAK,SAAS;AAAA,IAChB;AAAA,IACA,SAAS;;AACH,UAAA,KAAK,KAAK,WAAW,KAAK,KAAK,KAAK,uBAAuB,EAAE,QAAQ;AACvEA,sBAAAA,MAAI,UAAU;AAAA,UACZ,MAAM;AAAA,UACN,OAAO;AAAA,QAAA,CACR;AACD;AAAA,MACF;AAEA,YAAM,UAAU;AAAA,QACd,MAAM,KAAK,UAAU;AAAA,UACnB,YAAY;AAAA,UACZ,OAAO;AAAA,UACP,aAAa;AAAA,UACb,aAAa;AAAA,QAAA,CACd;AAAA,QACD,aAAa;AAAA,QACb,WAAW;AAAA,MAAA;AAGJG,uBAAA,MAAMC,gBAAU,MAAM;AAAA,QAC7B,qBAAqB,CAAC,iBAAiB;AACrC,eAAK,sBAAsB;AAAA,QAC7B;AAAA,MAAA,CACD;AACD,YAAM,UAAU;AAAA,QACd,IAAI,MAAM,KAAK,KAAK,KAAK,uBAAuB,EAAE,QAAQ;AAAA,QAC1D,mBAAkB,gBAAK,wBAAL,mBAA0B,UAA1B,mBAAiC;AAAA,QACnD;AAAA,QACA,iBAAgBC,sCAAAA,kCAAkC;AAAA,MAAA;AAGpD,YAAM,8BAA8B;AAAA,QAClC,cAAc,KAAK;AAAA,QACnB,SAAS,QAAQ;AAAA,QACjB,aAAaC,cAAAA,GAAc,MAAM;AAAA,MAAA;AAEnC,YAAM,qBAAqB;AAAA,QACzB,iBAAiBC,uDAAAA,uBAAuB,OAAO,2BAA2B;AAAA,MAAA;AAE7DC,oBAAAA,GAAA,kBAAkB,SAAS,kBAAkB;AAAA,IAE9D;AAAA,IACA,QAAQ;AACD,WAAA,MAAM,MAAM;IACnB;AAAA,IACA,WAAW;AAET,YAAM,iBAAiB,MAAM,KAAK,KAAK,QAAQ;AAC/CR,oBAAAA,MAAI,WAAW;AAAA,QACb,KAAK,mDAAmD,cAAc;AAAA,MAAA,CACvE;AAAA,IACH;AAAA,IAEA,MAAM,WAAW;AACfA,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MAAA,CACP;AACK,YAAA,MAAM,MAAMS,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ,KAAK;AAAA,QACf;AAAA,QACA,UAAU;AAAA,MAAA,CACX;AACG,UAAA,IAAI,SAAS,KAAK;AAChB,YAAA,IAAI,KAAK,WAAW,GAAG;AACzBT,wBAAA,MAAI,YAAY;AAChBA,wBAAA,MAAI,MAAM,OAAM,sCAAqC,YAAY,IAAI,IAAI;AACzE,eAAK,OAAO,IAAI;AAAA,QAAA,OACX;AACLA,wBAAA,MAAI,YAAY;AAChB,eAAK,kBAAkB;AAAA,QACzB;AAAA,MAAA,OACK;AACLA,sBAAA,MAAI,YAAY;AAChBA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QAAA,CACX;AAAA,MACH;AAAA,IACF;AAAA,IAEA,oBAAoB;AACb,WAAA,MAAM,aAAa;IAC1B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV;AAAA,EACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3OA,GAAG,WAAW,eAAe;"}
\ No newline at end of file
diff --git a/unpackage/dist/dev/mp-weixin/NewAddedPk.js b/unpackage/dist/dev/mp-weixin/NewAddedPk.js
index 95862e6..bf4a714 100644
--- a/unpackage/dist/dev/mp-weixin/NewAddedPk.js
+++ b/unpackage/dist/dev/mp-weixin/NewAddedPk.js
@@ -48,11 +48,11 @@ const _sfc_main = {
methods: {
gender(item) {
this.genders = item.value;
- common_vendor.index.__f__("log", "at pages/NewAddedPk/NewAddedPk.vue:167", item);
+ common_vendor.index.__f__("log", "at pages/NewAddedPk/NewAddedPk.vue:168", item);
},
country(item) {
this.countrys = item.value;
- common_vendor.index.__f__("log", "at pages/NewAddedPk/NewAddedPk.vue:172", item);
+ common_vendor.index.__f__("log", "at pages/NewAddedPk/NewAddedPk.vue:173", item);
},
handleOverlayClick(event) {
if (event.target === this.$el) {
@@ -214,6 +214,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
w: common_vendor.o$1(($event) => $data.datetimesingle = $event),
x: common_vendor.p({
type: "datetime",
+ ["hide-second"]: "true",
modelValue: $data.datetimesingle
}),
y: $data.datetimesingle === "" && $data.Hint === true
diff --git a/unpackage/dist/dev/mp-weixin/app.js b/unpackage/dist/dev/mp-weixin/app.js
index 8ec5a90..5b0a675 100644
--- a/unpackage/dist/dev/mp-weixin/app.js
+++ b/unpackage/dist/dev/mp-weixin/app.js
@@ -28,27 +28,6 @@ const _sfc_main = {
};
},
onLoad(option) {
- common_vendor.index.getStorage({
- key: "userinfo",
- success: (res) => {
- this.info = res.data;
- }
- });
- common_vendor.index.getStorage({
- key: "userSig",
- success: (res) => {
- this.userSig = res.data;
- }
- });
- common_vendor.index.getStorage({
- key: "chatInfo",
- success: (res) => {
- this.chatInfo = res.data;
- }
- });
- if (this.userSig) {
- TUIlogin(this.chatInfo.appId, this.info.userChatId, this.userSig);
- }
},
provide() {
return {
diff --git a/unpackage/dist/dev/mp-weixin/common/vendor.js b/unpackage/dist/dev/mp-weixin/common/vendor.js
index 05c1ddc..c34bcf0 100644
--- a/unpackage/dist/dev/mp-weixin/common/vendor.js
+++ b/unpackage/dist/dev/mp-weixin/common/vendor.js
@@ -8012,7 +8012,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() {
const hosts = "192.168.0.111,127.0.0.1";
const port = "8090";
- const id = "mp-weixin_87tmWq";
+ const id = "mp-weixin_rq7Z_G";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
@@ -9002,27 +9002,27 @@ var chat = { exports: {} };
return t3 && w2(e3.prototype, t3), n3 && w2(e3, n3), Object.defineProperty(e3, "prototype", { writable: false }), e3;
}
function F2(e3, t3) {
- var n3, o3, i4, s4, a3 = "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
- if (a3)
+ var n3, o3, i4, a3, s4 = "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
+ if (s4)
return i4 = !(o3 = true), { s: function() {
- a3 = a3.call(e3);
+ s4 = s4.call(e3);
}, n: function() {
- var e4 = a3.next();
+ var e4 = s4.next();
return o3 = e4.done, e4;
}, e: function(e4) {
i4 = true, n3 = e4;
}, f: function() {
try {
- o3 || null == a3.return || a3.return();
+ o3 || null == s4.return || s4.return();
} finally {
if (i4)
throw n3;
}
} };
- if (Array.isArray(e3) || (a3 = X2(e3)) || t3 && e3 && "number" == typeof e3.length)
- return a3 && (e3 = a3), s4 = 0, { s: t3 = function() {
+ if (Array.isArray(e3) || (s4 = X2(e3)) || t3 && e3 && "number" == typeof e3.length)
+ return s4 && (e3 = s4), a3 = 0, { s: t3 = function() {
}, n: function() {
- return s4 >= e3.length ? { done: true } : { done: false, value: e3[s4++] };
+ return a3 >= e3.length ? { done: true } : { done: false, value: e3[a3++] };
}, e: function(e4) {
throw e4;
}, f: t3 };
@@ -9091,8 +9091,8 @@ var chat = { exports: {} };
return o4;
}(e3, t3);
if (Object.getOwnPropertySymbols)
- for (var i4 = Object.getOwnPropertySymbols(e3), s4 = 0; s4 < i4.length; s4++)
- n3 = i4[s4], 0 <= t3.indexOf(n3) || {}.propertyIsEnumerable.call(e3, n3) && (o3[n3] = e3[n3]);
+ for (var i4 = Object.getOwnPropertySymbols(e3), a3 = 0; a3 < i4.length; a3++)
+ n3 = i4[a3], 0 <= t3.indexOf(n3) || {}.propertyIsEnumerable.call(e3, n3) && (o3[n3] = e3[n3]);
return o3;
}
function Y2(e3, t3) {
@@ -9104,20 +9104,20 @@ var chat = { exports: {} };
return b2(e3) || function(e4, t4) {
var n3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
if (null != n3) {
- var o3, i4, s4, a3, r4 = [], c3 = true, u3 = false;
+ var o3, i4, a3, s4, r4 = [], c3 = true, u3 = false;
try {
- if (s4 = (n3 = n3.call(e4)).next, 0 === t4) {
+ if (a3 = (n3 = n3.call(e4)).next, 0 === t4) {
if (Object(n3) !== n3)
return;
c3 = false;
} else
- for (; !(c3 = (o3 = s4.call(n3)).done) && (r4.push(o3.value), r4.length !== t4); c3 = true)
+ for (; !(c3 = (o3 = a3.call(n3)).done) && (r4.push(o3.value), r4.length !== t4); c3 = true)
;
} catch (e5) {
u3 = true, i4 = e5;
} finally {
try {
- if (!c3 && null != n3.return && (a3 = n3.return(), Object(a3) !== a3))
+ if (!c3 && null != n3.return && (s4 = n3.return(), Object(s4) !== s4))
return;
} finally {
if (u3)
@@ -9189,7 +9189,7 @@ var chat = { exports: {} };
return t3.prototype = Object.create(e4.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }), Y2(t3, e4);
}(e3);
}
- var h2 = { SDK_READY: "sdkStateReady", SDK_NOT_READY: "sdkStateNotReady", SDK_DESTROY: "sdkDestroy", MESSAGE_RECEIVED: "onMessageReceived", ROOM_CUSTOM_DATA_RECEIVED: "onRoomCustomDataReceived", MESSAGE_MODIFIED: "onMessageModified", MESSAGE_REVOKED: "onMessageRevoked", MESSAGE_READ_BY_PEER: "onMessageReadByPeer", MESSAGE_READ_RECEIPT_RECEIVED: "onMessageReadReceiptReceived", MESSAGE_EXTENSIONS_UPDATED: "onMessageExtensionsUpdated", MESSAGE_EXTENSIONS_DELETED: "onMessageExtensionsDeleted", MESSAGE_REACTIONS_UPDATED: "onMessageReactionsUpdated", CONVERSATION_LIST_UPDATED: "onConversationListUpdated", TOTAL_UNREAD_MESSAGE_COUNT_UPDATED: "onTotalUnreadMessageCountUpdated", CONVERSATION_GROUP_LIST_UPDATED: "onConversationGroupListUpdated", CONVERSATION_IN_GROUP_UPDATED: "onConversationInGroupUpdated", GROUP_LIST_UPDATED: "onGroupListUpdated", GROUP_ATTRIBUTES_UPDATED: "groupAttributesUpdated", GROUP_COUNTER_UPDATED: "onGroupCounterUpdated", TOPIC_CREATED: "onTopicCreated", TOPIC_DELETED: "onTopicDeleted", TOPIC_UPDATED: "onTopicUpdated", PROFILE_UPDATED: "onProfileUpdated", USER_STATUS_UPDATED: "onUserStatusUpdated", BLACKLIST_UPDATED: "blacklistUpdated", FRIEND_LIST_UPDATED: "onFriendListUpdated", FRIEND_GROUP_LIST_UPDATED: "onFriendGroupListUpdated", FRIEND_APPLICATION_LIST_UPDATED: "onFriendApplicationListUpdated", MY_FOLLOWERS_LIST_UPDATED: "onMyFollowersListUpdated", MY_FOLLOWING_LIST_UPDATED: "onMyFollowingListUpdated", MUTUAL_FOLLOWERS_LIST_UPDATED: "onMutualFollowersListUpdated", KICKED_OUT: "kickedOut", ERROR: "error", NET_STATE_CHANGE: "netStateChange", ALL_RECEIVE_MESSAGE_OPT_UPDATED: "onAllReceiveMessageOptUpdated" }, R2 = { MSG_TEXT: "TIMTextElem", MSG_IMAGE: "TIMImageElem", MSG_SOUND: "TIMSoundElem", MSG_AUDIO: "TIMSoundElem", MSG_FILE: "TIMFileElem", MSG_FACE: "TIMFaceElem", MSG_VIDEO: "TIMVideoFileElem", MSG_GEO: "TIMLocationElem", MSG_LOCATION: "TIMLocationElem", MSG_GRP_TIP: "TIMGroupTipElem", MSG_GRP_SYS_NOTICE: "TIMGroupSystemNoticeElem", MSG_CUSTOM: "TIMCustomElem", MSG_MERGER: "TIMRelayElem", MSG_PRIORITY_HIGH: "High", MSG_PRIORITY_NORMAL: "Normal", MSG_PRIORITY_LOW: "Low", MSG_PRIORITY_LOWEST: "Lowest", CONV_C2C: "C2C", CONV_GROUP: "GROUP", CONV_TOPIC: "TOPIC", CONV_SYSTEM: "@TIM#SYSTEM", CONV_AT_ME: 1, CONV_AT_ALL: 2, CONV_AT_ALL_AT_ME: 3, CONV_MARK_TYPE_STAR: 1, CONV_MARK_TYPE_UNREAD: 2, CONV_MARK_TYPE_FOLD: 4, CONV_MARK_TYPE_HIDE: 8, GRP_PRIVATE: "Private", GRP_WORK: "Private", GRP_PUBLIC: "Public", GRP_CHATROOM: "ChatRoom", GRP_MEETING: "ChatRoom", GRP_AVCHATROOM: "AVChatRoom", GRP_COMMUNITY: "Community", GRP_ROOM: "Room", GRP_LIVE: "Live", GRP_MBR_ROLE_OWNER: "Owner", GRP_MBR_ROLE_ADMIN: "Admin", GRP_MBR_ROLE_MEMBER: "Member", GRP_MBR_ROLE_CUSTOM: "Custom", GRP_TIP_MBR_JOIN: 1, GRP_TIP_MBR_QUIT: 2, GRP_TIP_MBR_KICKED_OUT: 3, GRP_TIP_MBR_SET_ADMIN: 4, GRP_TIP_MBR_CANCELED_ADMIN: 5, GRP_TIP_GRP_PROFILE_UPDATED: 6, GRP_TIP_MBR_PROFILE_UPDATED: 7, GRP_TIP_BAN_AVCHATROOM_MEMBER: 10, GRP_TIP_UNBAN_AVCHATROOM_MEMBER: 11, MSG_REMIND_ACPT_AND_NOTE: "AcceptAndNotify", MSG_REMIND_ACPT_NOT_NOTE: "AcceptNotNotify", MSG_REMIND_DISCARD: "Discard", RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT: "AcceptNotNotifyExceptAt", NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT: "AcceptNotNotifyExceptAt", NOT_RECEIVE_MSG_EXCEPT_AT: "NotReceiveMsgExceptAt", GENDER_UNKNOWN: "Gender_Type_Unknown", GENDER_FEMALE: "Gender_Type_Female", GENDER_MALE: "Gender_Type_Male", KICKED_OUT_MULT_ACCOUNT: "multipleAccount", KICKED_OUT_MULT_DEVICE: "multipleDevice", KICKED_OUT_USERSIG_EXPIRED: "userSigExpired", KICKED_OUT_REST_API: "REST_API_Kick", ALLOW_TYPE_ALLOW_ANY: "AllowType_Type_AllowAny", ALLOW_TYPE_NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_TYPE_DENY_ANY: "AllowType_Type_DenyAny", FORBID_TYPE_NONE: "AdminForbid_Type_None", FORBID_TYPE_SEND_OUT: "AdminForbid_Type_SendOut", JOIN_OPTIONS_FREE_ACCESS: "FreeAccess", JOIN_OPTIONS_NEED_PERMISSION: "NeedPermission", JOIN_OPTIONS_DISABLE_APPLY: "DisableApply", JOIN_STATUS_SUCCESS: "JoinedSuccess", JOIN_STATUS_ALREADY_IN_GROUP: "AlreadyInGroup", JOIN_STATUS_WAIT_APPROVAL: "WaitAdminApproval", INVITE_OPTIONS_DISABLE_INVITE: "DisableInvite", INVITE_OPTIONS_NEED_PERMISSION: "NeedPermission", INVITE_OPTIONS_FREE_ACCESS: "FreeAccess", GRP_PROFILE_OWNER_ID: "ownerID", GRP_PROFILE_CREATE_TIME: "createTime", GRP_PROFILE_LAST_INFO_TIME: "lastInfoTime", GRP_PROFILE_MEMBER_NUM: "memberNum", GRP_PROFILE_MAX_MEMBER_NUM: "maxMemberNum", GRP_PROFILE_JOIN_OPTION: "joinOption", GRP_PROFILE_INVITE_OPTION: "inviteOption", GRP_PROFILE_INTRODUCTION: "introduction", GRP_PROFILE_NOTIFICATION: "notification", GRP_PROFILE_MUTE_ALL_MBRS: "muteAllMembers", SNS_ADD_TYPE_SINGLE: "Add_Type_Single", SNS_ADD_TYPE_BOTH: "Add_Type_Both", SNS_DELETE_TYPE_SINGLE: "Delete_Type_Single", SNS_DELETE_TYPE_BOTH: "Delete_Type_Both", SNS_APPLICATION_TYPE_BOTH: "Pendency_Type_Both", SNS_APPLICATION_SENT_TO_ME: "Pendency_Type_ComeIn", SNS_APPLICATION_SENT_BY_ME: "Pendency_Type_SendOut", SNS_APPLICATION_AGREE: "Response_Action_Agree", SNS_APPLICATION_AGREE_AND_ADD: "Response_Action_AgreeAndAdd", SNS_CHECK_TYPE_BOTH: "CheckResult_Type_Both", SNS_CHECK_TYPE_SINGLE: "CheckResult_Type_Single", SNS_TYPE_NO_RELATION: "CheckResult_Type_NoRelation", SNS_TYPE_A_WITH_B: "CheckResult_Type_AWithB", SNS_TYPE_B_WITH_A: "CheckResult_Type_BWithA", SNS_TYPE_BOTH_WAY: "CheckResult_Type_BothWay", NET_STATE_CONNECTED: "connected", NET_STATE_CONNECTING: "connecting", NET_STATE_DISCONNECTED: "disconnected", MSG_AT_ALL: "__kImSDK_MesssageAtALL__", READ_ALL_C2C_MSG: "readAllC2CMessage", READ_ALL_GROUP_MSG: "readAllGroupMessage", READ_ALL_MSG: "readAllMessage", USER_STATUS_UNKNOWN: 0, USER_STATUS_ONLINE: 1, USER_STATUS_OFFLINE: 2, USER_STATUS_UNLOGINED: 3, IOS_OFFLINE_PUSH_NO_SOUND: "push.no_sound", IOS_OFFLINE_PUSH_DEFAULT_SOUND: "default" }, _2 = { NEW_INVITATION_RECEIVED: "newInvitationReceived", INVITEE_ACCEPTED: "ts_invitee_accepted", INVITEE_REJECTED: "ts_invitee_rejected", INVITATION_CANCELLED: "ts_invitation_cancelled", INVITATION_TIMEOUT: "ts_invitation_timeout", INVITATION_MODIFIED: "ts_invitation_modified", ACTION_TYPE_UNKNOWN: 0, ACTION_TYPE_INVITE: 1, ACTION_TYPE_CANCEL_INVITE: 2, ACTION_TYPE_ACCEPT_INVITE: 3, ACTION_TYPE_REJECT_INVITE: 4, ACTION_TYPE_INVITE_TIMEOUT: 5 }, Q2 = e2(function e3() {
+ var h2 = { SDK_READY: "sdkStateReady", SDK_NOT_READY: "sdkStateNotReady", SDK_DESTROY: "sdkDestroy", MESSAGE_RECEIVED: "onMessageReceived", ROOM_CUSTOM_DATA_RECEIVED: "onRoomCustomDataReceived", MESSAGE_MODIFIED: "onMessageModified", MESSAGE_REVOKED: "onMessageRevoked", MESSAGE_READ_BY_PEER: "onMessageReadByPeer", MESSAGE_READ_RECEIPT_RECEIVED: "onMessageReadReceiptReceived", MESSAGE_EXTENSIONS_UPDATED: "onMessageExtensionsUpdated", MESSAGE_EXTENSIONS_DELETED: "onMessageExtensionsDeleted", MESSAGE_REACTIONS_UPDATED: "onMessageReactionsUpdated", CONVERSATION_LIST_UPDATED: "onConversationListUpdated", TOTAL_UNREAD_MESSAGE_COUNT_UPDATED: "onTotalUnreadMessageCountUpdated", CONVERSATION_GROUP_LIST_UPDATED: "onConversationGroupListUpdated", CONVERSATION_IN_GROUP_UPDATED: "onConversationInGroupUpdated", GROUP_LIST_UPDATED: "onGroupListUpdated", GROUP_ATTRIBUTES_UPDATED: "groupAttributesUpdated", GROUP_COUNTER_UPDATED: "onGroupCounterUpdated", TOPIC_CREATED: "onTopicCreated", TOPIC_DELETED: "onTopicDeleted", TOPIC_UPDATED: "onTopicUpdated", PROFILE_UPDATED: "onProfileUpdated", USER_STATUS_UPDATED: "onUserStatusUpdated", BLACKLIST_UPDATED: "blacklistUpdated", FRIEND_LIST_UPDATED: "onFriendListUpdated", FRIEND_GROUP_LIST_UPDATED: "onFriendGroupListUpdated", FRIEND_APPLICATION_LIST_UPDATED: "onFriendApplicationListUpdated", MY_FOLLOWERS_LIST_UPDATED: "onMyFollowersListUpdated", MY_FOLLOWING_LIST_UPDATED: "onMyFollowingListUpdated", MUTUAL_FOLLOWERS_LIST_UPDATED: "onMutualFollowersListUpdated", KICKED_OUT: "kickedOut", ERROR: "error", NET_STATE_CHANGE: "netStateChange", ALL_RECEIVE_MESSAGE_OPT_UPDATED: "onAllReceiveMessageOptUpdated", SERVER_CONFIG_UPDATED: "onServerConfigUpdated" }, R2 = { MSG_TEXT: "TIMTextElem", MSG_IMAGE: "TIMImageElem", MSG_SOUND: "TIMSoundElem", MSG_AUDIO: "TIMSoundElem", MSG_FILE: "TIMFileElem", MSG_FACE: "TIMFaceElem", MSG_VIDEO: "TIMVideoFileElem", MSG_GEO: "TIMLocationElem", MSG_LOCATION: "TIMLocationElem", MSG_GRP_TIP: "TIMGroupTipElem", MSG_GRP_SYS_NOTICE: "TIMGroupSystemNoticeElem", MSG_CUSTOM: "TIMCustomElem", MSG_MERGER: "TIMRelayElem", MSG_PRIORITY_HIGH: "High", MSG_PRIORITY_NORMAL: "Normal", MSG_PRIORITY_LOW: "Low", MSG_PRIORITY_LOWEST: "Lowest", CONV_C2C: "C2C", CONV_GROUP: "GROUP", CONV_TOPIC: "TOPIC", CONV_SYSTEM: "@TIM#SYSTEM", CONV_AT_ME: 1, CONV_AT_ALL: 2, CONV_AT_ALL_AT_ME: 3, CONV_MARK_TYPE_STAR: 1, CONV_MARK_TYPE_UNREAD: 2, CONV_MARK_TYPE_FOLD: 4, CONV_MARK_TYPE_HIDE: 8, GRP_PRIVATE: "Private", GRP_WORK: "Private", GRP_PUBLIC: "Public", GRP_CHATROOM: "ChatRoom", GRP_MEETING: "ChatRoom", GRP_AVCHATROOM: "AVChatRoom", GRP_COMMUNITY: "Community", GRP_ROOM: "Room", GRP_LIVE: "Live", GRP_MBR_ROLE_OWNER: "Owner", GRP_MBR_ROLE_ADMIN: "Admin", GRP_MBR_ROLE_MEMBER: "Member", GRP_MBR_ROLE_CUSTOM: "Custom", GRP_TIP_MBR_JOIN: 1, GRP_TIP_MBR_QUIT: 2, GRP_TIP_MBR_KICKED_OUT: 3, GRP_TIP_MBR_SET_ADMIN: 4, GRP_TIP_MBR_CANCELED_ADMIN: 5, GRP_TIP_GRP_PROFILE_UPDATED: 6, GRP_TIP_MBR_PROFILE_UPDATED: 7, GRP_TIP_BAN_AVCHATROOM_MEMBER: 10, GRP_TIP_UNBAN_AVCHATROOM_MEMBER: 11, MSG_REMIND_ACPT_AND_NOTE: "AcceptAndNotify", MSG_REMIND_ACPT_NOT_NOTE: "AcceptNotNotify", MSG_REMIND_DISCARD: "Discard", RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT: "AcceptNotNotifyExceptAt", NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT: "AcceptNotNotifyExceptAt", NOT_RECEIVE_MSG_EXCEPT_AT: "NotReceiveMsgExceptAt", GENDER_UNKNOWN: "Gender_Type_Unknown", GENDER_FEMALE: "Gender_Type_Female", GENDER_MALE: "Gender_Type_Male", KICKED_OUT_MULT_ACCOUNT: "multipleAccount", KICKED_OUT_MULT_DEVICE: "multipleDevice", KICKED_OUT_USERSIG_EXPIRED: "userSigExpired", KICKED_OUT_REST_API: "REST_API_Kick", ALLOW_TYPE_ALLOW_ANY: "AllowType_Type_AllowAny", ALLOW_TYPE_NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_TYPE_DENY_ANY: "AllowType_Type_DenyAny", FORBID_TYPE_NONE: "AdminForbid_Type_None", FORBID_TYPE_SEND_OUT: "AdminForbid_Type_SendOut", JOIN_OPTIONS_FREE_ACCESS: "FreeAccess", JOIN_OPTIONS_NEED_PERMISSION: "NeedPermission", JOIN_OPTIONS_DISABLE_APPLY: "DisableApply", JOIN_STATUS_SUCCESS: "JoinedSuccess", JOIN_STATUS_ALREADY_IN_GROUP: "AlreadyInGroup", JOIN_STATUS_WAIT_APPROVAL: "WaitAdminApproval", INVITE_OPTIONS_DISABLE_INVITE: "DisableInvite", INVITE_OPTIONS_NEED_PERMISSION: "NeedPermission", INVITE_OPTIONS_FREE_ACCESS: "FreeAccess", GRP_PROFILE_OWNER_ID: "ownerID", GRP_PROFILE_CREATE_TIME: "createTime", GRP_PROFILE_LAST_INFO_TIME: "lastInfoTime", GRP_PROFILE_MEMBER_NUM: "memberNum", GRP_PROFILE_MAX_MEMBER_NUM: "maxMemberNum", GRP_PROFILE_JOIN_OPTION: "joinOption", GRP_PROFILE_INVITE_OPTION: "inviteOption", GRP_PROFILE_INTRODUCTION: "introduction", GRP_PROFILE_NOTIFICATION: "notification", GRP_PROFILE_MUTE_ALL_MBRS: "muteAllMembers", SNS_ADD_TYPE_SINGLE: "Add_Type_Single", SNS_ADD_TYPE_BOTH: "Add_Type_Both", SNS_DELETE_TYPE_SINGLE: "Delete_Type_Single", SNS_DELETE_TYPE_BOTH: "Delete_Type_Both", SNS_APPLICATION_TYPE_BOTH: "Pendency_Type_Both", SNS_APPLICATION_SENT_TO_ME: "Pendency_Type_ComeIn", SNS_APPLICATION_SENT_BY_ME: "Pendency_Type_SendOut", SNS_APPLICATION_AGREE: "Response_Action_Agree", SNS_APPLICATION_AGREE_AND_ADD: "Response_Action_AgreeAndAdd", SNS_CHECK_TYPE_BOTH: "CheckResult_Type_Both", SNS_CHECK_TYPE_SINGLE: "CheckResult_Type_Single", SNS_TYPE_NO_RELATION: "CheckResult_Type_NoRelation", SNS_TYPE_A_WITH_B: "CheckResult_Type_AWithB", SNS_TYPE_B_WITH_A: "CheckResult_Type_BWithA", SNS_TYPE_BOTH_WAY: "CheckResult_Type_BothWay", NET_STATE_CONNECTED: "connected", NET_STATE_CONNECTING: "connecting", NET_STATE_DISCONNECTED: "disconnected", MSG_AT_ALL: "__kImSDK_MesssageAtALL__", READ_ALL_C2C_MSG: "readAllC2CMessage", READ_ALL_GROUP_MSG: "readAllGroupMessage", READ_ALL_MSG: "readAllMessage", USER_STATUS_UNKNOWN: 0, USER_STATUS_ONLINE: 1, USER_STATUS_OFFLINE: 2, USER_STATUS_UNLOGINED: 3, IOS_OFFLINE_PUSH_NO_SOUND: "push.no_sound", IOS_OFFLINE_PUSH_DEFAULT_SOUND: "default" }, _2 = { NEW_INVITATION_RECEIVED: "newInvitationReceived", INVITEE_ACCEPTED: "ts_invitee_accepted", INVITEE_REJECTED: "ts_invitee_rejected", INVITATION_CANCELLED: "ts_invitation_cancelled", INVITATION_TIMEOUT: "ts_invitation_timeout", INVITATION_MODIFIED: "ts_invitation_modified", ACTION_TYPE_UNKNOWN: 0, ACTION_TYPE_INVITE: 1, ACTION_TYPE_CANCEL_INVITE: 2, ACTION_TYPE_ACCEPT_INVITE: 3, ACTION_TYPE_REJECT_INVITE: 4, ACTION_TYPE_INVITE_TIMEOUT: 5 }, Q2 = e2(function e3() {
p3(this, e3), this.cache = [], this.options = null;
}, [{ key: "use", value: function(e3) {
if ("function" != typeof e3)
@@ -9213,31 +9213,31 @@ var chat = { exports: {} };
for (var n3 = 8 - t3.length; n3; )
t3 = "0" + t3, n3--;
return e3 + t3;
- } }]), ee2 = { TEST: { CHINA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, OVERSEA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp-dev.im.qcloud.com" }, KOREA: { DEFAULT: "wss://wsskr-dev.im.qcloud.com" }, GERMANY: { DEFAULT: "wss://wssger-dev.im.qcloud.com" }, IND: { DEFAULT: "wss://wssind-dev.im.qcloud.com" }, JPN: { DEFAULT: "wss://wssjpn-dev.im.qcloud.com" }, USA: { DEFAULT: "wss://wssusa-dev.im.qcloud.com" }, INDONESIA: { DEFAULT: "wss://wssidn-dev.im.qcloud.com" } }, PRODUCTION: { CHINA: { DEFAULT0: "wss://*w4c.my-imcloud.com", DEFAULT: "wss://wss.im.qcloud.com", IPV6: "wss://wssv6.im.qcloud.com", BACKUP: "wss://wss.tim.qq.com", BACKUP_WEB: "wss://*w4c.my-cpaas.com", STAT: "https://events.im.qcloud.com", ANYCAST: "wss://162.14.13.203" }, OVERSEA: { DEFAULT0: "wss://*w4c.my-imcloud.com", DEFAULT: "wss://wss.im.qcloud.com", IPV6: "wss://wssv6.im.qcloud.com", BACKUP: "wss://wss.my-imcloud.com", BACKUP_WEB: "wss://*w4c.my-cpaas.com", STAT: "https://api.my-imcloud.com" }, SINGAPORE: { DEFAULT0: "wss://*w4s.my-imcloud.com", DEFAULT: "wss://wsssgp.im.qcloud.com", IPV6: "wss://wsssgpv6.im.qcloud.com", BACKUP: "wss://wsssgp.my-imcloud.com", BACKUP_WEB: "wss://*w4s.my-cpaas.com", STAT: "https://apisgp.my-imcloud.com", ANYCAST: "wss://162.14.19.159" }, KOREA: { DEFAULT0: "wss://*w4k.my-imcloud.com", DEFAULT: "wss://wsskr.im.qcloud.com", IPV6: "wss://wsskrv6.im.qcloud.com", BACKUP: "wss://wsskr.my-imcloud.com", BACKUP_WEB: "wss://*w4k.my-cpaas.com", STAT: "https://apikr.my-imcloud.com", ANYCAST: "wss://162.14.13.104" }, GERMANY: { DEFAULT0: "wss://*w4g.my-imcloud.com", DEFAULT: "wss://wssger.im.qcloud.com", IPV6: "wss://wssgerv6.im.qcloud.com", BACKUP: "wss://wssger.my-imcloud.com", BACKUP_WEB: "wss://*w4g.my-cpaas.com", STAT: "https://apiger.my-imcloud.com", ANYCAST: "wss://162.14.3.17" }, IND: { DEFAULT0: "wss://*w4i.my-imcloud.com", DEFAULT: "wss://wssind.my-imcloud.com", IPV6: "wss://wssindv6.im.qcloud.com", BACKUP: "wss://wssind.im.qcloud.com", BACKUP_WEB: "wss://*w4i.my-cpaas.com", STAT: "https://apiind.my-imcloud.com", ANYCAST: "wss://162.14.19.46" }, JPN: { DEFAULT0: "wss://*w4j.my-imcloud.com", DEFAULT: "wss://wssjpn.im.qcloud.com", IPV6: "wss://wssjpnv6.im.qcloud.com", BACKUP: "wss://wssjpn.my-imcloud.com", BACKUP_WEB: "wss://*w4j.my-cpaas.com", STAT: "https://apijpn.my-imcloud.com" }, USA: { DEFAULT0: "wss://*w4u.my-imcloud.com", DEFAULT: "wss://wssusa.im.qcloud.com", IPV6: "wss://wssusav6.im.qcloud.com", BACKUP: "wss://wssusa.my-imcloud.com", BACKUP_WEB: "wss://*w4u.my-cpaas.com", STAT: "https://apiusa.my-imcloud.com", ANYCAST: "wss://162.14.10.42" }, INDONESIA: { DEFAULT0: "wss://*w4y.my-imcloud.com", DEFAULT: "wss://wssidn.im.qcloud.com", IPV6: "wss://wssidnv6.im.qcloud.com", BACKUP: "wss://wssidn.my-imcloud.com", BACKUP_WEB: "wss://*w4y.my-cpaas.com", STAT: "https://apiidn.my-imcloud.com", ANYCAST: "wss://43.129.34.169" } } }, te2 = { ANDROID: 2, IOS: 3, MAC: 4, WEB: 7, WX_MP: 8, QQ_MP: 9, TT_MP: 10, BAIDU_MP: 11, ALI_MP: 12, IPAD: 13, UNI_NATIVE_APP: 15, DONUT_NATIVE_APP: 19, NS_NATIVE_APP: 20, RN_NATIVE_APP: 21 }, ne2 = "1.7.3", oe2 = 537048168, se2 = "CHINA", s3 = { HOST: { CURRENT: { DEFAULT: "wss://wss.im.qcloud.com", STAT: "https://events.im.qcloud.com" }, setCurrent: function() {
- this.CURRENT = ee2.PRODUCTION[0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : se2];
- } }, NAME: { OPEN_IM: "openim", OPEN_IM_MSG_EXT: "openim_msg_ext_http_svc", GRP: "group_open_http_svc", GRP_AV: "group_open_avchatroom_http_svc", GRP_COMMUNITY: "million_group_open_http_svc", GRP_ATTR: "group_open_attr_http_svc", FD: "sns", PROFILE: "profile", RECENT_CONTACT: "recentcontact", PIC: "openpic", BIG_GRP_NO_AUTH: "group_open_http_noauth_svc", BIG_GRP_POLLING: "group_open_long_polling_http_svc", BIG_GRP_POLLING_NO_AUTH: "group_open_long_polling_http_noauth_svc", IM_OPEN_STAT: "imopenstat", WEB_IM: "webim", IM_COS_SIGN: "im_cos_sign_svr", CUSTOM_UPLOAD: "im_cos_msg", HEARTBEAT: "heartbeat", IM_OPEN_PUSH: "im_open_push", IM_OPEN_STATUS: "im_open_status", IM_LONG_MSG: "im_long_msg", IM_CONFIG_MANAGER: "im_sdk_config_mgr", STAT_SERVICE: "StatSvc", OVERLOAD_PUSH: "OverLoadPush", IM_MSG_AUDIT_MGR: "im_msg_audit_mgr", TUIROOM_SVR: "tui_room_svr", IM_OPEN_TRANSLATE: "im_open_translate", IM_OPEN_SPEECH: "im_open_speech", MSG_SEARCH: "message_search", GRP_SEARCH: "group_search", GRP_MEMBER_SEARCH: "group_member_search", USER_SEARCH: "user_search", FOLLOW: "follow", OFFLINE_PUSH_REPORT: "offline_push_report", IM_MSG_LOGIC: "im_msg_db_logic" } }, g2 = { SEARCH_GRP_SNS: new $2(0, Math.pow(2, 1)).toString(), AV_HISTORY_MSG: new $2(0, Math.pow(2, 2)).toString(), GRP_COMMUNITY: new $2(0, Math.pow(2, 3)).toString(), MSG_TO_SPECIFIED_GRP_MBR: new $2(0, Math.pow(2, 4)).toString(), AV_MBR_LIST: new $2(0, Math.pow(2, 6)).toString(), USER_STATUS: new $2(0, Math.pow(2, 7)).toString(), CONV_MARK: new $2(0, Math.pow(2, 9)).toString(), CONV_GROUP: new $2(0, Math.pow(2, 10)).toString(), AV_BAN_MBR: new $2(0, Math.pow(2, 11)).toString(), MSG_EXT: new $2(0, Math.pow(2, 13)).toString(), GRP_COUNTER: new $2(0, Math.pow(2, 15)).toString(), PLUGIN_TRANSLATE: new $2(Math.pow(2, 6)).toString(), PLUGIN_VOICE_TO_TEXT: new $2(Math.pow(2, 7)).toString(), PLUGIN_CS: new $2(Math.pow(2, 8)).toString(), PLUGIN_PUSH: new $2(Math.pow(2, 9)).toString(), PLUGIN_BOT: new $2(Math.pow(2, 10)).toString(), MSG_REACTION: new $2(Math.pow(2, 16)).toString(), FOLLOW: new $2(Math.pow(2, 20)).toString() }, ae2 = "group_profile", re2 = ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember", "InviteJoinOption"], ce2 = ["Role", "JoinTime", "MsgSeq", "MsgFlag"];
- s3.HOST.setCurrent(se2);
- for (var ue2, le2 = "undefined" != typeof wx$1 && "function" == typeof wx$1.getSystemInfoSync && Boolean(wx$1.getSystemInfoSync().fontSizeSetting), de2 = le2 && "function" == typeof wx$1.createGamePortal, pe2 = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), _e2 = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), he2 = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), ge2 = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), n2 = "undefined" != typeof jd && "function" == typeof jd.getSystemInfoSync, fe2 = "undefined" != typeof index && "undefined" == typeof window && "function" == typeof index.requireNativePlugin, o2 = le2 && "object" === z2(wx$1.miniapp), me2 = "undefined" != typeof index, v3 = le2 || pe2 || _e2 || he2 || ge2 || fe2 || n2, a2 = "undefined" == typeof window && !v3 && "undefined" != typeof commonjsGlobal && void 0 !== commonjsGlobal.NativeScriptGlobals, ve2 = "undefined" != typeof commonjsGlobal && (void 0 !== commonjsGlobal.nativeModuleProxy || void 0 !== commonjsGlobal.ReactNative), Ie2 = "undefined" != typeof index ? !v3 : "undefined" != typeof window && !v3 && !ve2, I2 = pe2 ? qq : _e2 ? tt : he2 ? swan : ge2 ? my : le2 ? wx$1 : fe2 ? index : n2 ? jd : {}, Me2 = Ie2 && window && window.navigator && window.navigator.userAgent || "", ye2 = (n2 = "WEB", /(micromessenger|webbrowser)/i.test(Me2) ? n2 = "WEB" : pe2 ? n2 = "QQ_MP" : _e2 ? n2 = "TT_MP" : he2 ? n2 = "BAIDU_MP" : ge2 ? n2 = "ALI_MP" : le2 ? n2 = o2 ? "DONUT_NATIVE_APP" : "WX_MP" : fe2 ? n2 = "UNI_NATIVE_APP" : a2 ? n2 = "NS_NATIVE_APP" : ve2 && (n2 = "RN_NATIVE_APP"), te2[n2]), o2 = /iPad/i.test(Me2), a2 = /iPhone/i.test(Me2) && !o2, n2 = /iPod/i.test(Me2), Ce2 = a2 || o2 || n2, Te2 = (a2 = Me2.match(/OS (\d+)_/i)) && a2[1] ? a2[1] : null, De2 = /Android/i.test(Me2), Ee2 = (o2 = Me2.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i)) ? (n2 = o2[1] && parseFloat(o2[1]), a2 = o2[2] && parseFloat(o2[2]), n2 && a2 ? parseFloat(o2[1] + "." + o2[2]) : n2 || null) : null, a2 = /Edge/i.test(Me2), o2 = !a2 && /Chrome/i.test(Me2), Le2 = /MSIE/.test(Me2) || -1 < Me2.indexOf("Trident") && -1 < Me2.indexOf("rv:11.0"), Se2 = n2 = !(n2 = (n2 = /MSIE\s(\d+)\.\d/.exec(Me2)) && parseFloat(n2[1])) && /Trident\/7.0/i.test(Me2) && /rv:11.0/.test(Me2) ? 11 : n2, n2 = /Safari/i.test(Me2) && !o2 && !De2 && !a2, ke2 = /Windows/i.test(Me2), Re2 = /MAC OS X/i.test(Me2), Ae2 = Ie2 && "undefined" != typeof Worker && !Le2, Oe2 = De2 || Ce2, Ne2 = Ie2 && void 0 !== window.tencent_cloud_im_csig_flutter_for_web_25F_cy, Ge2 = "undefined" != typeof window && void 0 !== window.navigator && (o2 = window.navigator.standalone, !(!Ce2 || o2 || n2)), Pe2 = "undefined" != typeof console ? console : "undefined" != typeof commonjsGlobal && commonjsGlobal.console ? commonjsGlobal.console : "undefined" != typeof window && window.console ? window.console : {}, Ue2 = function() {
- }, be2 = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], we2 = be2.length; we2--; )
- ue2 = be2[we2], console[ue2] || (Pe2[ue2] = Ue2);
- function Fe2() {
+ } }]), ee2 = { TEST: { CHINA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, OVERSEA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp-dev.im.qcloud.com" }, KOREA: { DEFAULT: "wss://wsskr-dev.im.qcloud.com" }, GERMANY: { DEFAULT: "wss://wssger-dev.im.qcloud.com" }, IND: { DEFAULT: "wss://wssind-dev.im.qcloud.com" }, JPN: { DEFAULT: "wss://wssjpn-dev.im.qcloud.com" }, USA: { DEFAULT: "wss://wssusa-dev.im.qcloud.com" }, INDONESIA: { DEFAULT: "wss://wssidn-dev.im.qcloud.com" } }, PRODUCTION: { CHINA: { DEFAULT0: "wss://*w4c.my-imcloud.com", DEFAULT: "wss://wss.im.qcloud.com", IPV6: "wss://wssv6.im.qcloud.com", BACKUP: "wss://wss.tim.qq.com", BACKUP_WEB: "wss://*w4c.my-cpaas.com", STAT: "https://events.im.qcloud.com", ANYCAST: "wss://162.14.13.203" }, OVERSEA: { DEFAULT0: "wss://*w4c.my-imcloud.com", DEFAULT: "wss://wss.im.qcloud.com", IPV6: "wss://wssv6.im.qcloud.com", BACKUP: "wss://wss.my-imcloud.com", BACKUP_WEB: "wss://*w4c.my-cpaas.com", STAT: "https://api.my-imcloud.com" }, SINGAPORE: { DEFAULT0: "wss://*w4s.my-imcloud.com", DEFAULT: "wss://wsssgp.im.qcloud.com", IPV6: "wss://wsssgpv6.im.qcloud.com", BACKUP: "wss://wsssgp.my-imcloud.com", BACKUP_WEB: "wss://*w4s.my-cpaas.com", STAT: "https://apisgp.my-imcloud.com", ANYCAST: "wss://162.14.19.159" }, KOREA: { DEFAULT0: "wss://*w4k.my-imcloud.com", DEFAULT: "wss://wsskr.im.qcloud.com", IPV6: "wss://wsskrv6.im.qcloud.com", BACKUP: "wss://wsskr.my-imcloud.com", BACKUP_WEB: "wss://*w4k.my-cpaas.com", STAT: "https://apikr.my-imcloud.com", ANYCAST: "wss://162.14.13.104" }, GERMANY: { DEFAULT0: "wss://*w4g.my-imcloud.com", DEFAULT: "wss://wssger.im.qcloud.com", IPV6: "wss://wssgerv6.im.qcloud.com", BACKUP: "wss://wssger.my-imcloud.com", BACKUP_WEB: "wss://*w4g.my-cpaas.com", STAT: "https://apiger.my-imcloud.com", ANYCAST: "wss://162.14.3.17" }, IND: { DEFAULT0: "wss://*w4i.my-imcloud.com", DEFAULT: "wss://wssind.my-imcloud.com", IPV6: "wss://wssindv6.im.qcloud.com", BACKUP: "wss://wssind.im.qcloud.com", BACKUP_WEB: "wss://*w4i.my-cpaas.com", STAT: "https://apiind.my-imcloud.com", ANYCAST: "wss://162.14.19.46" }, JPN: { DEFAULT0: "wss://*w4j.my-imcloud.com", DEFAULT: "wss://wssjpn.im.qcloud.com", IPV6: "wss://wssjpnv6.im.qcloud.com", BACKUP: "wss://wssjpn.my-imcloud.com", BACKUP_WEB: "wss://*w4j.my-cpaas.com", STAT: "https://apijpn.my-imcloud.com" }, USA: { DEFAULT0: "wss://*w4u.my-imcloud.com", DEFAULT: "wss://wssusa.im.qcloud.com", IPV6: "wss://wssusav6.im.qcloud.com", BACKUP: "wss://wssusa.my-imcloud.com", BACKUP_WEB: "wss://*w4u.my-cpaas.com", STAT: "https://apiusa.my-imcloud.com", ANYCAST: "wss://162.14.10.42" }, INDONESIA: { DEFAULT0: "wss://*w4y.my-imcloud.com", DEFAULT: "wss://wssidn.im.qcloud.com", IPV6: "wss://wssidnv6.im.qcloud.com", BACKUP: "wss://wssidn.my-imcloud.com", BACKUP_WEB: "wss://*w4y.my-cpaas.com", STAT: "https://apiidn.my-imcloud.com", ANYCAST: "wss://43.129.34.169" } } }, te2 = { ANDROID: 2, IOS: 3, MAC: 4, WEB: 7, WX_MP: 8, QQ_MP: 9, TT_MP: 10, BAIDU_MP: 11, ALI_MP: 12, IPAD: 13, UNI_NATIVE_APP: 15, DONUT_NATIVE_APP: 19, NS_NATIVE_APP: 20, RN_NATIVE_APP: 21 }, ne2 = "1.7.3", oe2 = 537048168, ae2 = "CHINA", a2 = { HOST: { CURRENT: { DEFAULT: "wss://wss.im.qcloud.com", STAT: "https://events.im.qcloud.com" }, setCurrent: function() {
+ this.CURRENT = ee2.PRODUCTION[0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : ae2];
+ } }, NAME: { OPEN_IM: "openim", OPEN_IM_MSG_EXT: "openim_msg_ext_http_svc", GRP: "group_open_http_svc", GRP_AV: "group_open_avchatroom_http_svc", GRP_COMMUNITY: "million_group_open_http_svc", GRP_ATTR: "group_open_attr_http_svc", FD: "sns", PROFILE: "profile", RECENT_CONTACT: "recentcontact", PIC: "openpic", BIG_GRP_NO_AUTH: "group_open_http_noauth_svc", BIG_GRP_POLLING: "group_open_long_polling_http_svc", BIG_GRP_POLLING_NO_AUTH: "group_open_long_polling_http_noauth_svc", IM_OPEN_STAT: "imopenstat", WEB_IM: "webim", IM_COS_SIGN: "im_cos_sign_svr", CUSTOM_UPLOAD: "im_cos_msg", HEARTBEAT: "heartbeat", IM_OPEN_PUSH: "im_open_push", IM_OPEN_STATUS: "im_open_status", IM_LONG_MSG: "im_long_msg", IM_CONFIG_MANAGER: "im_sdk_config_mgr", STAT_SERVICE: "StatSvc", OVERLOAD_PUSH: "OverLoadPush", IM_MSG_AUDIT_MGR: "im_msg_audit_mgr", TUIROOM_SVR: "tui_room_svr", IM_OPEN_TRANSLATE: "im_open_translate", IM_OPEN_SPEECH: "im_open_speech", MSG_SEARCH: "message_search", GRP_SEARCH: "group_search", GRP_MEMBER_SEARCH: "group_member_search", USER_SEARCH: "user_search", FOLLOW: "follow", OFFLINE_PUSH_REPORT: "offline_push_report", IM_MSG_LOGIC: "im_msg_db_logic" } }, g2 = { SEARCH_GRP_SNS: new $2(0, Math.pow(2, 1)).toString(), AV_HISTORY_MSG: new $2(0, Math.pow(2, 2)).toString(), GRP_COMMUNITY: new $2(0, Math.pow(2, 3)).toString(), MSG_TO_SPECIFIED_GRP_MBR: new $2(0, Math.pow(2, 4)).toString(), AV_MBR_LIST: new $2(0, Math.pow(2, 6)).toString(), USER_STATUS: new $2(0, Math.pow(2, 7)).toString(), CONV_MARK: new $2(0, Math.pow(2, 9)).toString(), CONV_GROUP: new $2(0, Math.pow(2, 10)).toString(), AV_BAN_MBR: new $2(0, Math.pow(2, 11)).toString(), MSG_EXT: new $2(0, Math.pow(2, 13)).toString(), GRP_COUNTER: new $2(0, Math.pow(2, 15)).toString(), PLUGIN_TRANSLATE: new $2(Math.pow(2, 6)).toString(), PLUGIN_VOICE_TO_TEXT: new $2(Math.pow(2, 7)).toString(), PLUGIN_CS: new $2(Math.pow(2, 8)).toString(), PLUGIN_PUSH: new $2(Math.pow(2, 9)).toString(), PLUGIN_BOT: new $2(Math.pow(2, 10)).toString(), MSG_REACTION: new $2(Math.pow(2, 16)).toString(), FOLLOW: new $2(Math.pow(2, 20)).toString() }, se2 = "group_profile", re2 = ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember", "InviteJoinOption"], ce2 = ["Role", "JoinTime", "MsgSeq", "MsgFlag"], ue2 = "web.sdk.qcloud.com", le2 = "web.sdk.cloud.tencent.cn", de2 = "web.sdk.tencent.cn";
+ a2.HOST.setCurrent(ae2);
+ for (var pe2, _e2 = "undefined" != typeof wx$1 && "function" == typeof wx$1.getSystemInfoSync && Boolean(wx$1.getSystemInfoSync().fontSizeSetting), he2 = _e2 && "function" == typeof wx$1.createGamePortal, ge2 = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), fe2 = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), me2 = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), ve2 = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), n2 = "undefined" != typeof jd && "function" == typeof jd.getSystemInfoSync, Ie2 = "undefined" != typeof index && "undefined" == typeof window && "function" == typeof index.requireNativePlugin, o2 = _e2 && "object" === z2(wx$1.miniapp), Me2 = "undefined" != typeof index, v3 = _e2 || ge2 || fe2 || me2 || ve2 || Ie2 || n2, s3 = "undefined" == typeof window && !v3 && "undefined" != typeof commonjsGlobal && void 0 !== commonjsGlobal.NativeScriptGlobals, ye2 = "undefined" != typeof commonjsGlobal && (void 0 !== commonjsGlobal.nativeModuleProxy || void 0 !== commonjsGlobal.ReactNative), Ce2 = "undefined" != typeof index ? !v3 : "undefined" != typeof window && !v3 && !ye2, I2 = ge2 ? qq : fe2 ? tt : me2 ? swan : ve2 ? my : _e2 ? wx$1 : Ie2 ? index : n2 ? jd : {}, Te2 = Ce2 && window && window.navigator && window.navigator.userAgent || "", De2 = (n2 = "WEB", /(micromessenger|webbrowser)/i.test(Te2) ? n2 = "WEB" : ge2 ? n2 = "QQ_MP" : fe2 ? n2 = "TT_MP" : me2 ? n2 = "BAIDU_MP" : ve2 ? n2 = "ALI_MP" : _e2 ? n2 = o2 ? "DONUT_NATIVE_APP" : "WX_MP" : Ie2 ? n2 = "UNI_NATIVE_APP" : s3 ? n2 = "NS_NATIVE_APP" : ye2 && (n2 = "RN_NATIVE_APP"), te2[n2]), o2 = /iPad/i.test(Te2), s3 = /iPhone/i.test(Te2) && !o2, n2 = /iPod/i.test(Te2), Ee2 = s3 || o2 || n2, Le2 = (s3 = Te2.match(/OS (\d+)_/i)) && s3[1] ? s3[1] : null, Se2 = /Android/i.test(Te2), ke2 = (o2 = Te2.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i)) ? (n2 = o2[1] && parseFloat(o2[1]), s3 = o2[2] && parseFloat(o2[2]), n2 && s3 ? parseFloat(o2[1] + "." + o2[2]) : n2 || null) : null, s3 = /Edge/i.test(Te2), o2 = !s3 && /Chrome/i.test(Te2), Re2 = /MSIE/.test(Te2) || -1 < Te2.indexOf("Trident") && -1 < Te2.indexOf("rv:11.0"), Ae2 = n2 = !(n2 = (n2 = /MSIE\s(\d+)\.\d/.exec(Te2)) && parseFloat(n2[1])) && /Trident\/7.0/i.test(Te2) && /rv:11.0/.test(Te2) ? 11 : n2, n2 = /Safari/i.test(Te2) && !o2 && !Se2 && !s3, Oe2 = /Windows/i.test(Te2), Ne2 = /MAC OS X/i.test(Te2), Ge2 = Ce2 && "undefined" != typeof Worker && !Re2, Pe2 = Se2 || Ee2, Ue2 = Ce2 && void 0 !== window.tencent_cloud_im_csig_flutter_for_web_25F_cy, be2 = "undefined" != typeof window && void 0 !== window.navigator && (o2 = window.navigator.standalone, !(!Ee2 || o2 || n2)), we2 = "undefined" != typeof console ? console : "undefined" != typeof commonjsGlobal && commonjsGlobal.console ? commonjsGlobal.console : "undefined" != typeof window && window.console ? window.console : {}, Fe2 = function() {
+ }, qe2 = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], xe2 = qe2.length; xe2--; )
+ pe2 = qe2[xe2], console[pe2] || (we2[pe2] = Fe2);
+ function Ve2() {
var e3 = /* @__PURE__ */ new Date();
- return e3.setTime(He2()), e3;
+ return e3.setTime(Ye2()), e3;
}
- function qe2() {
- Be2 = 0;
+ function Be2() {
+ We2 = 0;
}
- function xe2() {
- return Math.floor(He2() / 1e3);
+ function He2() {
+ return Math.floor(Ye2() / 1e3);
}
- var Ve2 = Pe2, Be2 = 0, He2 = function() {
- return (/* @__PURE__ */ new Date()).getTime() + Be2;
- }, Ke2 = 0;
- function We2() {
- return Zt2() ? "%c Chat %c" : "Chat";
+ var Ke2 = we2, We2 = 0, Ye2 = function() {
+ return (/* @__PURE__ */ new Date()).getTime() + We2;
+ }, je2 = 0;
+ function Je2() {
+ return en() ? "%c Chat %c" : "Chat";
}
- function Ye2() {
- var e3 = Fe2();
+ function ze2() {
+ var e3 = Ve2();
return e3.toLocaleTimeString("en-US", { hour12: false }) + "." + function(e4) {
var t3;
switch (e4.toString().length) {
@@ -9259,9 +9259,9 @@ var chat = { exports: {} };
t3 = e3[0];
else
for (var n3 = 0, o3 = e3.length; n3 < o3; n3++) {
- if (Mt2(e3[n3]))
+ if (Tt2(e3[n3]))
try {
- t3 += yt2(e3[n3]) ? JSON.stringify(e3[n3], ["message", "code"]) : JSON.stringify(e3[n3]);
+ t3 += Dt2(e3[n3]) ? JSON.stringify(e3[n3], ["message", "code"]) : JSON.stringify(e3[n3]);
} catch (e4) {
t3 += e4 ? e4.message : "";
break;
@@ -9272,30 +9272,30 @@ var chat = { exports: {} };
}
return t3;
}, _exec: function(e3, t3) {
- Zt2() ? Ve2[e3](We2(), "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", Ye2(), t3) : Ve2[e3]("".concat(We2(), " ").concat(Ye2(), " ").concat(t3));
+ en() ? Ke2[e3](Je2(), "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", ze2(), t3) : Ke2[e3]("".concat(Je2(), " ").concat(ze2(), " ").concat(t3));
}, d: function() {
var e3;
- Ke2 <= -1 && (e3 = this.arguments2String(arguments), this._exec("debug", e3));
+ je2 <= -1 && (e3 = this.arguments2String(arguments), this._exec("debug", e3));
}, l: function() {
var e3;
- Ke2 <= 0 && (e3 = this.arguments2String(arguments), this._exec("log", e3));
+ je2 <= 0 && (e3 = this.arguments2String(arguments), this._exec("log", e3));
}, log: function() {
var e3;
- Ke2 <= 0 && (e3 = this.arguments2String(arguments), this._exec("log", e3));
+ je2 <= 0 && (e3 = this.arguments2String(arguments), this._exec("log", e3));
}, i: function() {
var e3;
- Ke2 <= 1 && (e3 = this.arguments2String(arguments), this._exec("info", e3));
+ je2 <= 1 && (e3 = this.arguments2String(arguments), this._exec("info", e3));
}, w: function() {
var e3;
- Ke2 <= 2 && (e3 = this.arguments2String(arguments), this._exec("warn", e3));
+ je2 <= 2 && (e3 = this.arguments2String(arguments), this._exec("warn", e3));
}, e: function() {
var e3;
- Ke2 <= 3 && (e3 = this.arguments2String(arguments), this._exec("error", e3));
+ je2 <= 3 && (e3 = this.arguments2String(arguments), this._exec("error", e3));
}, setLevel: function(e3) {
- e3 < 4 && this._exec("log", "set level from " + Ke2 + " to " + e3), Ke2 = e3;
+ e3 < 4 && this._exec("log", "set level from " + je2 + " to " + e3), je2 = e3;
}, getLevel: function() {
- return Ke2;
- } }, je2 = { JPG: 1, JPEG: 1, GIF: 2, PNG: 3, BMP: 4, UNKNOWN: 255 }, a2 = "Tag_Profile_IM_", f2 = { NICK: "".concat(a2, "Nick"), GENDER: "".concat(a2, "Gender"), BIRTHDAY: "".concat(a2, "BirthDay"), LOCATION: "".concat(a2, "Location"), SELFSIGNATURE: "".concat(a2, "SelfSignature"), ALLOWTYPE: "".concat(a2, "AllowType"), LANGUAGE: "".concat(a2, "Language"), AVATAR: "".concat(a2, "Image"), MESSAGESETTINGS: "".concat(a2, "MsgSettings"), ADMINFORBIDTYPE: "".concat(a2, "AdminForbidType"), LEVEL: "".concat(a2, "Level"), ROLE: "".concat(a2, "Role") }, Je2 = { GROUP: "".concat("Tag_SNS_IM_", "Group"), REMARK: "".concat("Tag_SNS_IM_", "Remark"), ADDSOURCE: "".concat("Tag_SNS_IM_", "AddSource"), ADDWORDING: "".concat("Tag_SNS_IM_", "Wording"), ADDTIME: "".concat("Tag_SNS_IM_", "AddTime") }, o2 = "Gender_Type_", ze2 = { UNKNOWN: "".concat(o2, "Unknown"), FEMALE: "".concat(o2, "Female"), MALE: "".concat(o2, "Male") }, Xe2 = { NONE: "".concat("AdminForbid_Type_", "None"), SEND_OUT: "".concat("AdminForbid_Type_", "SendOut") }, Ze2 = { NEED_CONFIRM: "".concat("AllowType_Type_", "NeedConfirm"), ALLOW_ANY: "".concat("AllowType_Type_", "AllowAny"), DENY_ANY: "".concat("AllowType_Type_", "DenyAny") }, Qe2 = "JoinedSuccess", $e2 = "WaitAdminApproval", et2 = "@TOPIC#_", nt2 = Object.prototype.hasOwnProperty;
+ return je2;
+ } }, Xe2 = { JPG: 1, JPEG: 1, GIF: 2, PNG: 3, BMP: 4, UNKNOWN: 255 }, s3 = "Tag_Profile_IM_", f2 = { NICK: "".concat(s3, "Nick"), GENDER: "".concat(s3, "Gender"), BIRTHDAY: "".concat(s3, "BirthDay"), LOCATION: "".concat(s3, "Location"), SELFSIGNATURE: "".concat(s3, "SelfSignature"), ALLOWTYPE: "".concat(s3, "AllowType"), LANGUAGE: "".concat(s3, "Language"), AVATAR: "".concat(s3, "Image"), MESSAGESETTINGS: "".concat(s3, "MsgSettings"), ADMINFORBIDTYPE: "".concat(s3, "AdminForbidType"), LEVEL: "".concat(s3, "Level"), ROLE: "".concat(s3, "Role") }, Ze2 = { GROUP: "".concat("Tag_SNS_IM_", "Group"), REMARK: "".concat("Tag_SNS_IM_", "Remark"), ADDSOURCE: "".concat("Tag_SNS_IM_", "AddSource"), ADDWORDING: "".concat("Tag_SNS_IM_", "Wording"), ADDTIME: "".concat("Tag_SNS_IM_", "AddTime") }, o2 = "Gender_Type_", Qe2 = { UNKNOWN: "".concat(o2, "Unknown"), FEMALE: "".concat(o2, "Female"), MALE: "".concat(o2, "Male") }, $e2 = { NONE: "".concat("AdminForbid_Type_", "None"), SEND_OUT: "".concat("AdminForbid_Type_", "SendOut") }, et2 = { NEED_CONFIRM: "".concat("AllowType_Type_", "NeedConfirm"), ALLOW_ANY: "".concat("AllowType_Type_", "AllowAny"), DENY_ANY: "".concat("AllowType_Type_", "DenyAny") }, nt2 = "JoinedSuccess", ot2 = "WaitAdminApproval", it2 = "@TOPIC#_", at2 = Object.prototype.hasOwnProperty;
function S2(e3) {
if (null == e3)
return true;
@@ -9313,25 +9313,25 @@ var chat = { exports: {} };
return "" === e3.message;
if (m2(e3)) {
for (var t3 in e3)
- if (nt2.call(e3, t3))
+ if (at2.call(e3, t3))
return false;
return true;
}
- return !!(ot2(e3) || it2(e3) || st2(e3)) && 0 === e3.size;
- }
- function ot2(e3) {
- return "map" === Ct2(e3);
- }
- function it2(e3) {
- return "set" === Ct2(e3);
+ return !!(st2(e3) || rt2(e3) || ct2(e3)) && 0 === e3.size;
}
function st2(e3) {
- return "file" === Ct2(e3);
+ return "map" === Et2(e3);
+ }
+ function rt2(e3) {
+ return "set" === Et2(e3);
+ }
+ function ct2(e3) {
+ return "file" === Et2(e3);
}
function A2(e3) {
return null !== e3 && ("number" == typeof e3 && !isNaN(+e3) || "object" === z2(e3) && e3.constructor === Number);
}
- function at2(e3) {
+ function ut2(e3) {
return null !== e3 && "object" === z2(e3);
}
function m2(e3) {
@@ -9344,40 +9344,40 @@ var chat = { exports: {} };
}
}
function O2(e3) {
- return "function" == typeof Array.isArray ? Array.isArray(e3) : "array" === Ct2(e3);
- }
- function rt2(e3) {
- return O2(e3) && 0 < e3.length;
- }
- function ct2(e3) {
- return "function" == typeof e3;
- }
- function ut2(e3) {
- return "filelist" === Ct2(e3);
+ return "function" == typeof Array.isArray ? Array.isArray(e3) : "array" === Et2(e3);
}
function lt2(e3) {
+ return O2(e3) && 0 < e3.length;
+ }
+ function dt2(e3) {
+ return "function" == typeof e3;
+ }
+ function pt2(e3) {
+ return "filelist" === Et2(e3);
+ }
+ function _t2(e3) {
return "string" == typeof e3 && (e3 = e3[0], !/[^a-zA-Z0-9]/.test(e3));
}
- function dt2(e3, t3, n3, o3) {
- if (!Mt2(e3) || !Mt2(t3))
+ function ht2(e3, t3, n3, o3) {
+ if (!Tt2(e3) || !Tt2(t3))
return 0;
- for (var i4, s4 = 0, a3 = Object.keys(t3), r4 = 0, c3 = a3.length; r4 < c3; r4++)
- if (i4 = a3[r4], !(N3(t3[i4]) || n3 && n3.includes(i4)))
- if (Mt2(e3[i4]) && Mt2(t3[i4]))
- s4 += dt2(e3[i4], t3[i4], n3, o3);
+ for (var i4, a3 = 0, s4 = Object.keys(t3), r4 = 0, c3 = s4.length; r4 < c3; r4++)
+ if (i4 = s4[r4], !(N3(t3[i4]) || n3 && n3.includes(i4)))
+ if (Tt2(e3[i4]) && Tt2(t3[i4]))
+ a3 += ht2(e3[i4], t3[i4], n3, o3);
else {
if (o3 && o3.includes(t3[i4]))
continue;
- e3[i4] !== t3[i4] && (e3[i4] = t3[i4], s4 += 1);
+ e3[i4] !== t3[i4] && (e3[i4] = t3[i4], a3 += 1);
}
- return s4;
+ return a3;
}
- function pt2(e3, t3) {
+ function gt2(e3, t3) {
var n3, o3 = /* @__PURE__ */ new Map(), i4 = F2(e3.entries());
try {
for (i4.s(); !(n3 = i4.n()).done; ) {
- var s4 = j2(n3.value, 2), a3 = s4[0], r4 = s4[1];
- r4 && o3.set(a3, t3 ? JSON.stringify(r4) : JSON.parse(JSON.stringify(r4)));
+ var a3 = j2(n3.value, 2), s4 = a3[0], r4 = a3[1];
+ r4 && o3.set(s4, t3 ? JSON.stringify(r4) : JSON.parse(JSON.stringify(r4)));
}
} catch (e4) {
i4.e(e4);
@@ -9386,51 +9386,51 @@ var chat = { exports: {} };
}
return o3;
}
- function _t2(e3) {
+ function ft2(e3) {
if (0 === e3.length)
return 0;
for (var t3 = 0, n3 = 0, o3 = "undefined" != typeof document && void 0 !== document.characterSet ? document.characterSet : "UTF-8"; void 0 !== e3[t3]; )
n3 += e3[t3++].charCodeAt[t3] <= 255 ? 1 : false === o3 ? 3 : 2;
return n3;
}
- function ht2(e3) {
+ function mt2(e3) {
return e3 = e3 || 99999999, Math.round(Math.random() * e3);
}
- function gt2() {
+ function vt2() {
for (var e3 = "", t3 = 32; 0 < t3; --t3)
- e3 += Tt2[Math.floor(Math.random() * Dt2)];
+ e3 += Lt2[Math.floor(Math.random() * St2)];
return e3;
}
- function ft2(e3, t3) {
+ function It2(e3, t3) {
for (var n3 in e3)
if (e3[n3] === t3)
return 1;
}
- function mt2(e3) {
+ function Mt2(e3) {
return -1 === e3.indexOf("http://") || -1 === e3.indexOf("https://") ? "https://" + e3 : e3.replace(/https|http/, "https");
}
- function vt2(e3) {
+ function yt2(e3) {
if (0 === Object.getOwnPropertyNames(e3).length)
return /* @__PURE__ */ Object.create(null);
var t3, n3, o3 = Array.isArray(e3) ? [] : /* @__PURE__ */ Object.create(null);
for (n3 in e3)
- null !== e3[n3] ? void 0 !== e3[n3] ? (t3 = z2(e3[n3]), 0 <= ["string", "number", "function", "boolean"].indexOf(t3) ? o3[n3] = e3[n3] : o3[n3] = vt2(e3[n3])) : o3[n3] = void 0 : o3[n3] = null;
+ null !== e3[n3] ? void 0 !== e3[n3] ? (t3 = z2(e3[n3]), 0 <= ["string", "number", "function", "boolean"].indexOf(t3) ? o3[n3] = e3[n3] : o3[n3] = yt2(e3[n3])) : o3[n3] = void 0 : o3[n3] = null;
return o3;
}
- var It2 = ["url"], C2 = function(e3) {
+ var Ct2 = ["url"], C2 = function(e3) {
return "string" == typeof e3;
}, N3 = function(e3) {
return void 0 === e3;
- }, Mt2 = function(e3) {
- return O2(e3) || at2(e3);
- }, yt2 = function(e3) {
+ }, Tt2 = function(e3) {
+ return O2(e3) || ut2(e3);
+ }, Dt2 = function(e3) {
return e3 instanceof Error;
- }, Ct2 = function(e3) {
+ }, Et2 = function(e3) {
return Object.prototype.toString.call(e3).match(/^\[object (.*)\]$/)[1].toLowerCase();
- }, Tt2 = (Date.now || (Date.now = function() {
+ }, Lt2 = (Date.now || (Date.now = function() {
return (/* @__PURE__ */ new Date()).getTime();
- }), "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), Dt2 = Tt2.length, Et2 = {};
- function Lt2(o3, e3) {
+ }), "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), St2 = Lt2.length, kt2 = {};
+ function Rt2(o3, e3) {
var i4;
return !(!O2(o3) || !O2(e3)) && (i4 = false, e3.forEach(function(e4) {
var t3 = e4.key, e4 = e4.value, n3 = o3.find(function(e5) {
@@ -9439,56 +9439,56 @@ var chat = { exports: {} };
n3 ? n3.value !== e4 && (n3.value = e4, i4 = true) : (o3.push({ key: t3, value: e4 }), i4 = true);
}), i4);
}
- function St2(e3) {
+ function At2(e3) {
return S2(e3) ? [] : e3.filter(function(e4) {
return true === e4.isModified;
});
}
- function kt2(e3) {
+ function Ot2(e3) {
if (m2(e3) && m2(e3.webhookInfo)) {
var t3 = [];
if (e3.webhookInfo.disableCloudMessagePreHook && t3.push("ForbidBeforeSendMsgCallback"), e3.webhookInfo.disableCloudMessagePostHook && t3.push("ForbidAfterSendMsgCallback"), 0 !== t3.length)
return t3;
}
}
- function Rt2(e3) {
+ function Nt2(e3) {
return S2(e3) ? [] : e3.filter(function(e4) {
return false === e4.isModified;
});
}
- function At2(e3) {
+ function Gt2(e3) {
return e3 === R2.GRP_AVCHATROOM;
}
- function Ot2(e3) {
- var t3 = e3.type, e3 = e3.groupID;
- return t3 === R2.GRP_COMMUNITY || "".concat(e3).startsWith("@TGS#_") && !"".concat(e3).includes(et2);
- }
- function Nt2(e3) {
- return "".concat(e3).startsWith("@TGS#_") && "".concat(e3).includes(et2);
- }
- function Gt2(e3) {
- return C2(e3) && e3.slice(0, 3) === R2.CONV_C2C;
- }
function Pt2(e3) {
- return C2(e3) && e3.slice(0, 5) === R2.CONV_GROUP;
+ var t3 = e3.type, e3 = e3.groupID;
+ return t3 === R2.GRP_COMMUNITY || "".concat(e3).startsWith("@TGS#_") && !"".concat(e3).includes(it2);
}
function Ut2(e3) {
+ return "".concat(e3).startsWith("@TGS#_") && "".concat(e3).includes(it2);
+ }
+ function bt2(e3) {
+ return C2(e3) && e3.slice(0, 3) === R2.CONV_C2C;
+ }
+ function wt2(e3) {
+ return C2(e3) && e3.slice(0, 5) === R2.CONV_GROUP;
+ }
+ function Ft2(e3) {
return C2(e3) && e3 === R2.CONV_SYSTEM;
}
- function bt2(t3, n3) {
+ function qt2(t3, n3) {
var o3 = {};
return Object.keys(t3).forEach(function(e3) {
o3[e3] = n3(t3[e3], e3);
}), o3;
}
- function wt2(o3) {
- return ve2 ? Promise.resolve({ width: 0, height: 0 }) : v3 ? new Promise(function(t3, e3) {
+ function xt2(o3) {
+ return ye2 ? Promise.resolve({ width: 0, height: 0 }) : v3 ? new Promise(function(t3, e3) {
I2.getImageInfo({ src: o3, success: function(e4) {
t3({ width: e4.width, height: e4.height });
}, fail: function() {
t3({ width: 0, height: 0 });
} });
- }) : Le2 && 9 === Se2 ? Promise.resolve({ width: 0, height: 0 }) : new Promise(function(e3, t3) {
+ }) : Re2 && 9 === Ae2 ? Promise.resolve({ width: 0, height: 0 }) : new Promise(function(e3, t3) {
var n3 = new Image();
n3.onload = function() {
e3({ width: this.width, height: this.height }), n3 = null;
@@ -9497,14 +9497,14 @@ var chat = { exports: {} };
}, n3.src = o3;
});
}
- function Ft2() {
+ function Vt2() {
function e3() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
}
return "".concat(e3() + e3()).concat(e3()).concat(e3()).concat(e3()).concat(e3()).concat(e3()).concat(e3());
}
- function qt2() {
- var e3 = De2 ? "android" : Ce2 ? "ios" : ke2 ? "windows" : Re2 ? "mac" : "unknown";
+ function Bt2() {
+ var e3 = Se2 ? "android" : Ee2 ? "ios" : Oe2 ? "windows" : Ne2 ? "mac" : "unknown";
if (v3)
try {
var t3 = I2.getSystemInfoSync().platform;
@@ -9513,48 +9513,48 @@ var chat = { exports: {} };
}
return e3;
}
- function xt2(e3, t3) {
+ function Ht2(e3, t3) {
e3 = e3.split("."), t3 = t3.split(".");
for (var n3 = Math.max(e3.length, t3.length); e3.length < n3; )
e3.push("0");
for (; t3.length < n3; )
t3.push("0");
for (var o3 = 0; o3 < n3; o3++) {
- var i4 = parseInt(e3[o3]), s4 = parseInt(t3[o3]);
- if (s4 < i4)
+ var i4 = parseInt(e3[o3]), a3 = parseInt(t3[o3]);
+ if (a3 < i4)
return 1;
- if (i4 < s4)
+ if (i4 < a3)
return -1;
}
return 0;
}
- function Vt2(e3) {
+ function Kt2(e3) {
var t3 = e3.originUrl, t3 = void 0 === t3 ? void 0 : t3, n3 = e3.originWidth, o3 = e3.originHeight, e3 = e3.min, e3 = void 0 === e3 ? 198 : e3, n3 = parseInt(n3), o3 = parseInt(o3), i4 = { url: void 0, width: 0, height: 0 };
- return (n3 <= o3 ? n3 : o3) <= e3 ? (i4.url = t3, i4.width = n3, i4.height = o3) : (o3 <= n3 ? (i4.width = Math.ceil(n3 * e3 / o3), i4.height = e3) : (i4.width = e3, i4.height = Math.ceil(o3 * e3 / n3)), o3 = t3 && -1 < t3.indexOf("?") ? "".concat(t3, "&") : "".concat(t3, "?"), i4.url = "".concat(o3, 198 === e3 ? "imageView2/3/w/198/h/198" : "imageView2/3/w/720/h/720")), N3(t3) ? W2(i4, It2) : i4;
+ return (n3 <= o3 ? n3 : o3) <= e3 ? (i4.url = t3, i4.width = n3, i4.height = o3) : (o3 <= n3 ? (i4.width = Math.ceil(n3 * e3 / o3), i4.height = e3) : (i4.width = e3, i4.height = Math.ceil(o3 * e3 / n3)), o3 = t3 && -1 < t3.indexOf("?") ? "".concat(t3, "&") : "".concat(t3, "?"), i4.url = "".concat(o3, 198 === e3 ? "imageView2/3/w/198/h/198" : "imageView2/3/w/720/h/720")), N3(t3) ? W2(i4, Ct2) : i4;
}
- function Bt2(e3) {
+ function Wt2(e3) {
var t3 = e3[2];
e3[2] = e3[1], e3[1] = t3;
for (var n3 = 0; n3 < e3.length; n3++)
e3[n3].setType(n3);
}
- function Ht2(e3) {
+ function Yt2(e3) {
e3 = e3.servcmd;
return e3.slice(e3.indexOf(".") + 1);
}
- function Kt2(e3, t3) {
+ function jt2(e3, t3) {
return Math.round(Number(e3) * Math.pow(10, t3)) / Math.pow(10, t3);
}
- function Wt2(e3, t3) {
+ function Jt2(e3, t3) {
return e3.includes(t3);
}
- function Yt2(e3, t3) {
+ function zt(e3, t3) {
return e3.includes(t3);
}
- function jt2(e3) {
- return e3.split(et2)[0];
+ function Xt2(e3) {
+ return e3.split(it2)[0];
}
- function Jt2(e3, t3, n3) {
+ function Zt2(e3, t3, n3) {
if (N3(t3))
return "";
switch (e3) {
@@ -9584,10 +9584,10 @@ var chat = { exports: {} };
return "";
}
}
- function zt(e3) {
+ function Qt2(e3) {
return e3 === R2.MSG_TEXT || e3 === R2.MSG_CUSTOM || e3 === R2.MSG_LOCATION || e3 === R2.MSG_FACE;
}
- function Xt2(e3) {
+ function $t2(e3) {
var t3 = [];
if (C2(e3)) {
var n3 = e3.length;
@@ -9597,116 +9597,116 @@ var chat = { exports: {} };
}
return t3;
}
- function Zt2() {
- return !Le2 && !v3;
+ function en() {
+ return !Re2 && !v3;
}
- function Qt2(e3) {
+ function tn(e3) {
return "the length of userIDList cannot exceed ".concat(e3);
}
- function $t2(e3) {
+ function nn(e3) {
var t3;
if (O2(e3) && 0 !== e3.length)
return t3 = 0, e3.forEach(function(e4) {
t3 += e4;
}), t3.toFixed(0);
}
- function en(e3) {
+ function on(e3) {
var t3;
if (O2(e3) && 0 !== e3.length)
return t3 = 0, e3.forEach(function(e4) {
t3 += e4;
}), (t3 / e3.length).toFixed(0);
}
- function tn(e3, t3, n3) {
+ function an(e3, t3, n3) {
var t3 = !(1 < arguments.length && void 0 !== t3) || t3, n3 = !(2 < arguments.length && void 0 !== n3) || n3, o3 = Date.now();
return t3 ? n3 ? "".concat(o3 - e3, " ms") : "".concat(Math.round((o3 - e3) / 1e3), " s") : n3 ? o3 - e3 : Math.round((o3 - e3) / 1e3);
}
- function nn(e3) {
+ function sn(e3) {
return e3 && 1 < e3 ? true : false;
}
- function on(e3, t3, n3, o3) {
- var i4, s4, a3;
- return void 0 === t3 || (i4 = true, t3.required && S2(e3) && (M2.e("[".concat(n3, '] Missing required params: "').concat(o3, '".')), i4 = false), S2(e3) || (s4 = Ct2(e3)) === (a3 = t3.type.toLowerCase()) || "asyncfunction" === s4 && "function" === a3 || (M2.e("[".concat(n3, '] Invalid params: type check failed for "').concat(o3, '". Expected ').concat(t3.type, ".")), i4 = false), t3.validator && !t3.validator(e3, n3, o3) && (M2.e("[".concat(n3, '] Invalid params: custom validator check failed for "').concat(o3, '".')), i4 = false), i4);
+ function rn(e3, t3, n3, o3) {
+ var i4, a3, s4;
+ return void 0 === t3 || (i4 = true, t3.required && S2(e3) && (M2.e("[".concat(n3, '] Missing required params: "').concat(o3, '".')), i4 = false), S2(e3) || (a3 = Et2(e3)) === (s4 = t3.type.toLowerCase()) || "asyncfunction" === a3 && "function" === s4 || (M2.e("[".concat(n3, '] Invalid params: type check failed for "').concat(o3, '". Expected ').concat(t3.type, ".")), i4 = false), t3.validator && !t3.validator(e3, n3, o3) && (M2.e("[".concat(n3, '] Invalid params: custom validator check failed for "').concat(o3, '".')), i4 = false), i4);
}
- function sn(e3) {
- return !(!e3 || !(Gt2(e3) || Pt2(e3) || Ut2(e3)) && ((e3 = u2("InvalidConversationID", e3)) && M2.w(e3), 1));
+ function cn(e3) {
+ return !(!e3 || !(bt2(e3) || wt2(e3) || Ft2(e3)) && ((e3 = u2("InvalidConversationID", e3)) && M2.w(e3), 1));
}
function r3(e3) {
"" !== e3.desc && "" !== u2("API_REFER") && M2.w("[".concat(e3.api, "] | ").concat(e3.paramName, " | ").concat(e3.desc, ", ").concat(u2("API_REFER")).concat(e3.api));
}
- function an() {
+ function un() {
return u2("StringRequiredLog");
}
- function rn(e3) {
+ function ln(e3) {
return u2("NonEmptyStringRequiredLog", e3);
}
- function cn() {
+ function dn() {
return u2("NumberRequiredLog");
}
- function un() {
+ function pn() {
return u2("UndefinedNotAllowedLog");
}
- function ln() {
+ function _n() {
return u2("FileRequiredLog");
}
- function dn() {
+ function hn() {
return u2("FunctionRequiredLog");
}
- function pn() {
+ function gn() {
return u2("ArrayRequiredLog");
}
- function _n() {
+ function fn() {
return u2("NonEmptyArrayLog");
}
- function hn() {
+ function mn() {
return u2("CallbackMissingLog");
}
- function gn() {
+ function vn() {
return u2("PositiveIntegerRequiredLog");
}
- function fn(e3, t3) {
+ function In(e3, t3) {
return u2("StringNotLongerThanLog", e3, t3);
}
- function mn(e3, t3) {
+ function Mn(e3, t3) {
return u2("NumberGreaterThanLog", e3, t3);
}
- function vn(e3, t3) {
+ function yn(e3, t3) {
return u2("NumberGreaterOrEqualLog", e3, t3);
}
- function In(e3) {
+ function Cn(e3) {
return u2("KeyValueStringRequiredLog", e3);
}
- function Mn() {
+ function Tn() {
return u2("PlainObjectRequiredLog");
}
- function yn() {
+ function Dn() {
return u2("NonEmptyContentRequiredLog");
}
- function Cn() {
+ function En() {
return u2("FileNotSelectedLog");
}
- function Tn() {
+ function Ln() {
return u2("MessageInstanceRequiredLog");
}
- function Dn() {
+ function Sn() {
return u2("NonAnonymousFunctionLog");
}
- function En() {
+ function kn() {
return u2("MessageExtensionNotAvailableLog");
}
- function Ln() {
+ function Rn() {
return u2("MessageReactionRequiredLog");
}
- function Sn(e3, t3) {
+ function An(e3, t3) {
return u2("ContainsUnsupportedTypeLog", e3, t3);
}
- function kn(e3, t3, n3, o3) {
- var i4 = o3.allowUndefined, s4 = o3.allowEmpty, o3 = o3.maxLength;
- return N3(e3) ? !!i4 || (r3({ api: t3, paramName: n3, desc: un() }), false) : O2(e3) ? !(0 === e3.length && (r3({ api: t3, paramName: n3, desc: _n() }), !s4) || o3 && e3.length > o3 && (r3({ api: t3, paramName: n3, desc: u2("MaximumArrayLengthLog", n3, o3) }), 1)) : (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ function On(e3, t3, n3, o3) {
+ var i4 = o3.allowUndefined, a3 = o3.allowEmpty, o3 = o3.maxLength;
+ return N3(e3) ? !!i4 || (r3({ api: t3, paramName: n3, desc: pn() }), false) : O2(e3) ? !(0 === e3.length && (r3({ api: t3, paramName: n3, desc: fn() }), !a3) || o3 && e3.length > o3 && (r3({ api: t3, paramName: n3, desc: u2("MaximumArrayLengthLog", n3, o3) }), 1)) : (r3({ api: t3, paramName: n3, desc: gn() }), false);
}
- function Rn(e3, t3, n3, o3) {
- var i4 = o3.allowUndefined, s4 = o3.min, o3 = o3.max;
- return N3(e3) ? !!i4 || (r3({ api: t3, paramName: n3, desc: un() }), false) : A2(e3) ? A2(s4) && e3 < s4 ? (r3({ api: t3, paramName: n3, desc: 0 === s4 ? vn(n3, s4) : mn(n3, s4 - 1) }), false) : !(A2(o3) && o3 < e3 && (r3({ api: t3, paramName: n3, desc: u2("MaximumNumberLog", n3, o3) }), 1)) : (r3({ api: t3, paramName: n3, desc: cn() }), false);
+ function Nn(e3, t3, n3, o3) {
+ var i4 = o3.allowUndefined, a3 = o3.min, o3 = o3.max;
+ return N3(e3) ? !!i4 || (r3({ api: t3, paramName: n3, desc: pn() }), false) : A2(e3) ? A2(a3) && e3 < a3 ? (r3({ api: t3, paramName: n3, desc: 0 === a3 ? yn(n3, a3) : Mn(n3, a3 - 1) }), false) : !(A2(o3) && o3 < e3 && (r3({ api: t3, paramName: n3, desc: u2("MaximumNumberLog", n3, o3) }), 1)) : (r3({ api: t3, paramName: n3, desc: dn() }), false);
}
function T2(e3) {
return { code: 0, data: e3 || {} };
@@ -9716,239 +9716,239 @@ var chat = { exports: {} };
}
function E2(e3) {
var t3, n3 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1];
- return e3 instanceof L2 ? (n3 && null !== Vn && Vn.emit(h2.ERROR, e3), Promise.reject(e3)) : e3 instanceof Error ? (t3 = new L2({ code: k2.UNCAUGHT_ERROR }), n3 && null !== Vn && Vn.emit(h2.ERROR, t3), Promise.reject(t3)) : N3(e3) || N3(e3.code) ? Promise.reject(new L2({ code: k2.UNCAUGHT_ERROR })) : (t3 = new L2(e3), n3 && null !== Vn && Vn.emit(h2.ERROR, t3), Promise.reject(t3));
+ return e3 instanceof L2 ? (n3 && null !== Kn && Kn.emit(h2.ERROR, e3), Promise.reject(e3)) : e3 instanceof Error ? (t3 = new L2({ code: k2.UNCAUGHT_ERROR }), n3 && null !== Kn && Kn.emit(h2.ERROR, t3), Promise.reject(t3)) : N3(e3) || N3(e3.code) ? Promise.reject(new L2({ code: k2.UNCAUGHT_ERROR })) : (t3 = new L2(e3), n3 && null !== Kn && Kn.emit(h2.ERROR, t3), Promise.reject(t3));
}
- var An = "unSend", On = "success", Nn = "fail", Gn = "notStart", Pn = "pending", Un = "resolved", bn = "rejected", n2 = { type: "String", required: true }, a2 = { type: "Array", required: true }, o2 = { type: "Object", required: true }, wn = { type: "Boolean", required: true }, c2 = { type: "number", required: true }, Fn = { keywordListForMsg: { type: "Array", required: false, validator: function(e3, t3, n3) {
- return kn(e3, t3, n3, { allowUndefined: true, allowEmpty: true, maxLength: 5 });
+ var Gn = "unSend", Pn = "success", Un = "fail", bn = "notStart", wn = "pending", Fn = "resolved", qn = "rejected", n2 = { type: "String", required: true }, s3 = { type: "Array", required: true }, o2 = { type: "Object", required: true }, xn = { type: "Boolean", required: true }, c2 = { type: "number", required: true }, Vn = { keywordListForMsg: { type: "Array", required: false, validator: function(e3, t3, n3) {
+ return On(e3, t3, n3, { allowUndefined: true, allowEmpty: true, maxLength: 5 });
} }, keywordListExceptMsg: { type: "Array", required: true, validator: function(e3, t3, n3) {
- return kn(e3, t3, n3, { allowUndefined: false, allowEmpty: false, maxLength: 5 });
+ return On(e3, t3, n3, { allowUndefined: false, allowEmpty: false, maxLength: 5 });
} }, keywordListMatchType: { type: "String", required: false, validator: function(e3, t3, n3) {
return !e3 || "or" === e3 || "and" === e3 || r3({ api: t3, paramName: n3, desc: "".concat(e3, " is invalid match type") });
} }, cursor: { type: "String", required: false }, count: { type: "Number", required: false, validator: function(e3, t3, n3) {
- return Rn(e3, t3, n3, { allowUndefined: true, min: 1, max: 100 });
+ return Nn(e3, t3, n3, { allowUndefined: true, min: 1, max: 100 });
} }, groupTypeList: { type: "Array", required: false, validator: function(e3, t3, n3) {
var o3;
- return !e3 || !(!kn(e3, t3, n3, { allowUndefined: true, allowEmpty: true }) || (o3 = [R2.GRP_PUBLIC, R2.GRP_COMMUNITY, R2.GRP_WORK, R2.GRP_MEETING], 0 < e3.filter(function(e4) {
+ return !e3 || !(!On(e3, t3, n3, { allowUndefined: true, allowEmpty: true }) || (o3 = [R2.GRP_PUBLIC, R2.GRP_COMMUNITY, R2.GRP_WORK, R2.GRP_MEETING], 0 < e3.filter(function(e4) {
return -1 === o3.indexOf(e4);
- }).length && (r3({ api: t3, paramName: n3, desc: Sn(n3, "group") }), 1)));
- } } }, u2 = null, qn = { hookGetAPITips: function(e3) {
+ }).length && (r3({ api: t3, paramName: n3, desc: An(n3, "group") }), 1)));
+ } } }, u2 = null, Bn = { hookGetAPITips: function(e3) {
u2 = e3;
- }, login: { userID: n2, userSig: n2 }, addToBlacklist: { userIDList: a2 }, removeFromBlacklist: { userIDList: a2 }, on: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
- return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: rn(n3) }), false);
+ }, login: { userID: n2, userSig: n2 }, addToBlacklist: { userIDList: s3 }, removeFromBlacklist: { userIDList: s3 }, on: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
+ return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: ln(n3) }), false);
} }, { name: "handler", type: "Function", validator: function(e3, t3, n3) {
- return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: dn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Dn() }), true);
+ return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: hn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Sn() }), true);
} }], once: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
- return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: rn(n3) }), false);
+ return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: ln(n3) }), false);
} }, { name: "handler", type: "Function", validator: function(e3, t3, n3) {
- return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: dn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Dn() }), true);
+ return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: hn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Sn() }), true);
} }], off: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
- return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: rn(n3) }), false);
+ return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: ln(n3) }), false);
} }, { name: "handler", type: "Function", validator: function(e3, t3, n3) {
- return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: dn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Dn() }), true);
+ return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: hn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Sn() }), true);
} }], sendMessage: [y2({ name: "message" }, o2)], setMessageExtensions: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return e3.status === On && true === e3.isSupportExtension || (r3({ api: t3, paramName: n3, desc: En() }), false);
- } }), y2({ name: "extensions" }, a2)], getMessageExtensions: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return e3.status === On && true === e3.isSupportExtension || (r3({ api: t3, paramName: n3, desc: En() }), false);
+ return e3.status === Pn && true === e3.isSupportExtension || (r3({ api: t3, paramName: n3, desc: kn() }), false);
+ } }), y2({ name: "extensions" }, s3)], getMessageExtensions: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
+ return e3.status === Pn && true === e3.isSupportExtension || (r3({ api: t3, paramName: n3, desc: kn() }), false);
} })], deleteMessageExtensions: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return e3.status === On && true === e3.isSupportExtension || (r3({ api: t3, paramName: n3, desc: En() }), false);
+ return e3.status === Pn && true === e3.isSupportExtension || (r3({ api: t3, paramName: n3, desc: kn() }), false);
} })], addMessageReaction: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return e3.status === On || (r3({ api: t3, paramName: n3, desc: Ln() }), false);
+ return e3.status === Pn || (r3({ api: t3, paramName: n3, desc: Rn() }), false);
} }), y2({ name: "reactionID" }, n2)], removeMessageReaction: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return e3.status === On || (r3({ api: t3, paramName: n3, desc: Ln() }), false);
- } }), y2({ name: "reactionID" }, n2)], getMessageReactions: { messageList: y2({}, a2) }, getAllUserListOfMessageReaction: { message: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return e3.status === On || (r3({ api: t3, paramName: n3, desc: Ln() }), false);
- } }), reactionID: y2({}, n2), nextSeq: { type: "Number" }, count: { type: "Number" } }, getMessageList: { conversationID: y2(y2({}, n2), {}, { validator: sn }), nextReqMessageID: { type: "String" }, count: { type: "Number", validator: function(e3, t3, n3) {
- return !(!N3(e3) && !/^[1-9][0-9]*$/.test(e3) && (r3({ api: t3, paramName: n3, desc: gn() }), 1));
- } } }, getMessageListHopping: { conversationID: y2(y2({}, n2), {}, { validator: sn }), sequence: { type: "Number" }, time: { type: "Number" }, direction: { type: "Number", validator: function(e3, t3, n3) {
+ return e3.status === Pn || (r3({ api: t3, paramName: n3, desc: Rn() }), false);
+ } }), y2({ name: "reactionID" }, n2)], getMessageReactions: { messageList: y2({}, s3) }, getAllUserListOfMessageReaction: { message: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
+ return e3.status === Pn || (r3({ api: t3, paramName: n3, desc: Rn() }), false);
+ } }), reactionID: y2({}, n2), nextSeq: { type: "Number" }, count: { type: "Number" } }, getMessageList: { conversationID: y2(y2({}, n2), {}, { validator: cn }), nextReqMessageID: { type: "String" }, count: { type: "Number", validator: function(e3, t3, n3) {
+ return !(!N3(e3) && !/^[1-9][0-9]*$/.test(e3) && (r3({ api: t3, paramName: n3, desc: vn() }), 1));
+ } } }, getMessageListHopping: { conversationID: y2(y2({}, n2), {}, { validator: cn }), sequence: { type: "Number" }, time: { type: "Number" }, direction: { type: "Number", validator: function(e3, t3, n3) {
return !(!N3(e3) && 0 !== e3 && 1 !== e3 && (r3({ api: t3, paramName: n3, desc: u2("0Or1RequiredLog") }), 1));
} }, count: { type: "Number", validator: function(e3, t3, n3) {
- return !(!N3(e3) && !/^[1-9][0-9]*$/.test(e3) && (r3({ api: t3, paramName: n3, desc: gn }), 1));
- } } }, setMessageRead: { conversationID: y2(y2({}, n2), {}, { validator: sn }) }, setAllMessageRead: { scope: { type: "String", required: false, validator: function(e3, t3, n3) {
+ return !(!N3(e3) && !/^[1-9][0-9]*$/.test(e3) && (r3({ api: t3, paramName: n3, desc: vn }), 1));
+ } } }, setMessageRead: { conversationID: y2(y2({}, n2), {}, { validator: cn }) }, setAllMessageRead: { scope: { type: "String", required: false, validator: function(e3, t3, n3) {
return !e3 || -1 !== [R2.READ_ALL_C2C_MSG, R2.READ_ALL_GROUP_MSG, R2.READ_ALL_MSG].indexOf(e3) || (r3({ api: t3, paramName: n3, desc: u2("ValidScopeRequired") }), false);
- } } }, getConversationProfile: [y2(y2({ name: "conversationID" }, n2), {}, { validator: sn })], clearHistoryMessage: [y2(y2({ name: "conversationID" }, n2), {}, { validator: sn })], pinConversation: { conversationID: y2(y2({}, n2), {}, { validator: sn }), isPinned: y2({}, wn) }, setConversationDraft: { conversationID: y2(y2({}, n2), {}, { validator: sn }), draftText: { type: "String", validator: function(e3, t3, n3) {
- return !!C2(e3) || (r3({ api: t3, paramName: n3, desc: an() }), false);
- } } }, setConversationCustomData: { conversationIDList: y2({}, a2), customData: { type: "String", validator: function(e3, t3, n3) {
- return C2(e3) ? !(256 < e3.length && (r3({ api: t3, paramName: n3, desc: fn(n3, 256) }), 1)) : (r3({ api: t3, paramName: n3, desc: an() }), false);
- } } }, markConversation: { conversationIDList: y2({}, a2), markType: { type: "number", validator: function(e3, t3, n3) {
- return A2(e3) ? e3 <= 0 ? (r3({ api: t3, paramName: n3, desc: mn(n3, 0) }), false) : !(e3 >= Math.pow(2, 64) && (r3({ api: t3, paramName: n3, desc: u2("NumberLessThanLog", n3, "Math.pow(2,64)") }), 1)) : (r3({ api: t3, paramName: n3, desc: cn() }), false);
- } }, enableMark: y2({}, wn) }, createConversationGroup: { conversationIDList: y2({}, a2), groupName: y2(y2({}, n2), {}, { validator: function(e3, t3, n3) {
- return !(!e3 || 32 < e3.length && (r3({ api: t3, paramName: n3, desc: fn(n3, 32) }), 1));
+ } } }, getConversationProfile: [y2(y2({ name: "conversationID" }, n2), {}, { validator: cn })], clearHistoryMessage: [y2(y2({ name: "conversationID" }, n2), {}, { validator: cn })], pinConversation: { conversationID: y2(y2({}, n2), {}, { validator: cn }), isPinned: y2({}, xn) }, setConversationDraft: { conversationID: y2(y2({}, n2), {}, { validator: cn }), draftText: { type: "String", validator: function(e3, t3, n3) {
+ return !!C2(e3) || (r3({ api: t3, paramName: n3, desc: un() }), false);
+ } } }, setConversationCustomData: { conversationIDList: y2({}, s3), customData: { type: "String", validator: function(e3, t3, n3) {
+ return C2(e3) ? !(256 < e3.length && (r3({ api: t3, paramName: n3, desc: In(n3, 256) }), 1)) : (r3({ api: t3, paramName: n3, desc: un() }), false);
+ } } }, markConversation: { conversationIDList: y2({}, s3), markType: { type: "number", validator: function(e3, t3, n3) {
+ return A2(e3) ? e3 <= 0 ? (r3({ api: t3, paramName: n3, desc: Mn(n3, 0) }), false) : !(e3 >= Math.pow(2, 64) && (r3({ api: t3, paramName: n3, desc: u2("NumberLessThanLog", n3, "Math.pow(2,64)") }), 1)) : (r3({ api: t3, paramName: n3, desc: dn() }), false);
+ } }, enableMark: y2({}, xn) }, createConversationGroup: { conversationIDList: y2({}, s3), groupName: y2(y2({}, n2), {}, { validator: function(e3, t3, n3) {
+ return !(!e3 || 32 < e3.length && (r3({ api: t3, paramName: n3, desc: In(n3, 32) }), 1));
} }) }, deleteConversationGroup: [y2({ name: "groupName" }, n2)], renameConversationGroup: { oldName: y2({}, n2), newName: y2(y2({}, n2), {}, { validator: function(e3, t3, n3) {
- return !(!e3 || 32 < e3.length && (r3({ api: t3, paramName: n3, desc: fn(n3, 32) }), 1));
- } }) }, addConversationsToGroup: { conversationIDList: y2({}, a2), groupName: y2({}, n2) }, deleteConversationsFromGroup: { conversationIDList: y2({}, a2), groupName: y2({}, n2) }, getGroupList: { groupProfileFilter: { type: "Array" } }, getGroupProfile: { groupID: n2, groupCustomFieldFilter: { type: "Array" }, memberCustomFieldFilter: { type: "Array" } }, getGroupProfileAdvance: { groupIDList: a2 }, createGroup: { name: n2 }, joinGroup: { groupID: n2, type: { type: "String" }, applyMessage: { type: "String" } }, quitGroup: [y2({ name: "groupID" }, n2)], handleApplication: { message: o2, handleAction: n2, handleMessage: { type: "String" } }, changeGroupOwner: { groupID: n2, newOwnerID: n2 }, updateGroupProfile: { groupID: n2, muteAllMembers: { type: "Boolean" } }, dismissGroup: [y2({ name: "groupID" }, n2)], searchGroupByID: [y2({ name: "groupID" }, n2)], getGroupOnlineMemberCount: [y2({ name: "groupID" }, n2)], initGroupAttributes: { groupID: n2, groupAttributes: y2(y2({}, o2), {}, { validator: function(t3, n3, o3) {
+ return !(!e3 || 32 < e3.length && (r3({ api: t3, paramName: n3, desc: In(n3, 32) }), 1));
+ } }) }, addConversationsToGroup: { conversationIDList: y2({}, s3), groupName: y2({}, n2) }, deleteConversationsFromGroup: { conversationIDList: y2({}, s3), groupName: y2({}, n2) }, getGroupList: { groupProfileFilter: { type: "Array" } }, getGroupProfile: { groupID: n2, groupCustomFieldFilter: { type: "Array" }, memberCustomFieldFilter: { type: "Array" } }, getGroupProfileAdvance: { groupIDList: s3 }, createGroup: { name: n2 }, joinGroup: { groupID: n2, type: { type: "String" }, applyMessage: { type: "String" } }, quitGroup: [y2({ name: "groupID" }, n2)], handleApplication: { message: o2, handleAction: n2, handleMessage: { type: "String" } }, changeGroupOwner: { groupID: n2, newOwnerID: n2 }, updateGroupProfile: { groupID: n2, muteAllMembers: { type: "Boolean" } }, dismissGroup: [y2({ name: "groupID" }, n2)], searchGroupByID: [y2({ name: "groupID" }, n2)], getGroupOnlineMemberCount: [y2({ name: "groupID" }, n2)], initGroupAttributes: { groupID: n2, groupAttributes: y2(y2({}, o2), {}, { validator: function(t3, n3, o3) {
var i4 = true;
return Object.keys(t3).forEach(function(e3) {
if (!C2(t3[e3]))
- return r3({ api: n3, paramName: o3, desc: In("value") }), i4 = false;
+ return r3({ api: n3, paramName: o3, desc: Cn("value") }), i4 = false;
}), i4;
} }) }, setGroupAttributes: { groupID: n2, groupAttributes: y2(y2({}, o2), {}, { validator: function(t3, n3, o3) {
var i4 = true;
return Object.keys(t3).forEach(function(e3) {
if (!C2(t3[e3]))
- return r3({ api: n3, paramName: o3, desc: In("value") }), i4 = false;
+ return r3({ api: n3, paramName: o3, desc: Cn("value") }), i4 = false;
}), i4;
} }) }, deleteGroupAttributes: { groupID: n2, keyList: { type: "Array", validator: function(e3, t3, n3) {
var o3;
- return N3(e3) || !O2(e3) ? (r3({ api: t3, paramName: n3, desc: pn() }), false) : !!S2(e3) || (o3 = true, e3.forEach(function(e4) {
+ return N3(e3) || !O2(e3) ? (r3({ api: t3, paramName: n3, desc: gn() }), false) : !!S2(e3) || (o3 = true, e3.forEach(function(e4) {
if (!C2(e4))
return r3({ api: t3, paramName: n3, desc: u2("StringArrayRequiredLog") }), o3 = false;
}), o3);
} } }, getGroupAttributes: { groupID: n2, keyList: { type: "Array", validator: function(e3, t3, n3) {
var o3;
- return N3(e3) || !O2(e3) ? (r3({ api: t3, paramName: n3, desc: pn() }), false) : !!S2(e3) || (o3 = true, e3.forEach(function(e4) {
+ return N3(e3) || !O2(e3) ? (r3({ api: t3, paramName: n3, desc: gn() }), false) : !!S2(e3) || (o3 = true, e3.forEach(function(e4) {
if (!C2(e4))
- return r3({ api: t3, paramName: n3, desc: In("key") }), o3 = false;
+ return r3({ api: t3, paramName: n3, desc: Cn("key") }), o3 = false;
}), o3);
- } } }, setGroupCounters: { groupID: n2, counters: o2 }, increaseGroupCounter: { groupID: n2, key: n2, value: c2 }, decreaseGroupCounter: { groupID: n2, key: n2, value: c2 }, getGroupCounters: { groupID: n2 }, getGroupMemberList: { groupID: n2, count: { type: "Number" } }, getGroupMemberProfile: { groupID: n2, userIDList: a2, memberCustomFieldFilter: { type: "Array" } }, addGroupMember: { groupID: n2, userIDList: a2 }, setGroupMemberRole: { groupID: n2, userID: n2, role: n2 }, setGroupMemberMuteTime: { groupID: n2, userID: n2, muteTime: { type: "Number", validator: function(e3) {
+ } } }, setGroupCounters: { groupID: n2, counters: o2 }, increaseGroupCounter: { groupID: n2, key: n2, value: c2 }, decreaseGroupCounter: { groupID: n2, key: n2, value: c2 }, getGroupCounters: { groupID: n2 }, getGroupMemberList: { groupID: n2, count: { type: "Number" } }, getGroupMemberProfile: { groupID: n2, userIDList: s3, memberCustomFieldFilter: { type: "Array" } }, addGroupMember: { groupID: n2, userIDList: s3 }, setGroupMemberRole: { groupID: n2, userID: n2, role: n2 }, setGroupMemberMuteTime: { groupID: n2, userID: n2, muteTime: { type: "Number", validator: function(e3) {
return 0 <= e3;
} } }, setGroupMemberNameCard: { groupID: n2, userID: { type: "String" }, nameCard: { type: "String", validator: function(e3, t3, n3) {
- return C2(e3) ? (e3.length, true) : (r3({ api: t3, paramName: n3, desc: an() }), false);
- } } }, setGroupMemberCustomField: { groupID: n2, userID: { type: "String" }, memberCustomField: a2 }, deleteGroupMember: { groupID: n2 }, markGroupMemberList: { groupID: n2, markType: { type: "number", validator: function(e3, t3, n3) {
- return A2(e3) ? !(e3 < 1e3 && (r3({ api: t3, paramName: n3, desc: vn(n3, 1e3) }), 1)) : (r3({ api: t3, paramName: n3, desc: cn() }), false);
- } }, userIDList: y2({}, a2), enableMark: y2({}, wn) }, createTextMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? C2(e3.text) ? 0 !== e3.text.length || (r3({ api: t3, paramName: "payload.text", desc: yn() }), false) : (r3({ api: t3, paramName: "payload.text", desc: an() }), false) : (r3({ api: t3, paramName: n3, desc: Mn() }), false);
+ return C2(e3) ? (e3.length, true) : (r3({ api: t3, paramName: n3, desc: un() }), false);
+ } } }, setGroupMemberCustomField: { groupID: n2, userID: { type: "String" }, memberCustomField: s3 }, deleteGroupMember: { groupID: n2 }, markGroupMemberList: { groupID: n2, markType: { type: "number", validator: function(e3, t3, n3) {
+ return A2(e3) ? !(e3 < 1e3 && (r3({ api: t3, paramName: n3, desc: yn(n3, 1e3) }), 1)) : (r3({ api: t3, paramName: n3, desc: dn() }), false);
+ } }, userIDList: y2({}, s3), enableMark: y2({}, xn) }, createTextMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
+ return m2(e3) ? C2(e3.text) ? 0 !== e3.text.length || (r3({ api: t3, paramName: "payload.text", desc: Dn() }), false) : (r3({ api: t3, paramName: "payload.text", desc: un() }), false) : (r3({ api: t3, paramName: n3, desc: Tn() }), false);
} }) }, createTextAtMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? C2(e3.text) ? 0 === e3.text.length ? (r3({ api: t3, paramName: "payload.text", desc: yn() }), false) : !(e3.atUserList && !O2(e3.atUserList) && (r3({ api: t3, paramName: "payload.atUserList", desc: pn() }), 1)) : (r3({ api: t3, paramName: "payload.text", desc: an() }), false) : (r3({ api: t3, paramName: n3, desc: Mn() }), false);
+ return m2(e3) ? C2(e3.text) ? 0 === e3.text.length ? (r3({ api: t3, paramName: "payload.text", desc: Dn() }), false) : !(e3.atUserList && !O2(e3.atUserList) && (r3({ api: t3, paramName: "payload.atUserList", desc: gn() }), 1)) : (r3({ api: t3, paramName: "payload.text", desc: un() }), false) : (r3({ api: t3, paramName: n3, desc: Tn() }), false);
} }) }, createCustomMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? e3.data && !C2(e3.data) ? (r3({ api: t3, paramName: "payload.data", desc: an() }), false) : e3.description && !C2(e3.description) ? (r3({ api: t3, paramName: "payload.description", desc: an() }), false) : !(e3.extension && !C2(e3.extension) && (r3({ api: t3, paramName: "payload.extension", desc: an() }), 1)) : (r3({ api: t3, paramName: "payload", desc: Mn() }), false);
+ return m2(e3) ? e3.data && !C2(e3.data) ? (r3({ api: t3, paramName: "payload.data", desc: un() }), false) : e3.description && !C2(e3.description) ? (r3({ api: t3, paramName: "payload.description", desc: un() }), false) : !(e3.extension && !C2(e3.extension) && (r3({ api: t3, paramName: "payload.extension", desc: un() }), 1)) : (r3({ api: t3, paramName: "payload", desc: Tn() }), false);
} }) }, createImageMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
if (!m2(e3))
- return r3({ api: t3, paramName: n3, desc: Mn() }), false;
+ return r3({ api: t3, paramName: n3, desc: Tn() }), false;
if (N3(e3.file))
- return r3({ api: t3, paramName: "payload.file", desc: un() }), false;
- if (Ie2) {
- if (!(e3.file instanceof HTMLInputElement || st2(e3.file)))
- return m2(e3.file) && "undefined" != typeof index ? 0 !== e3.file.tempFilePaths.length && 0 !== e3.file.tempFiles.length || (r3({ api: t3, paramName: "payload.file", desc: Cn() }), false) : (r3({ api: t3, paramName: "payload.file", desc: ln() }), false);
+ return r3({ api: t3, paramName: "payload.file", desc: pn() }), false;
+ if (Ce2) {
+ if (!(e3.file instanceof HTMLInputElement || ct2(e3.file)))
+ return m2(e3.file) && "undefined" != typeof index ? 0 !== e3.file.tempFilePaths.length && 0 !== e3.file.tempFiles.length || (r3({ api: t3, paramName: "payload.file", desc: En() }), false) : (r3({ api: t3, paramName: "payload.file", desc: _n() }), false);
if (e3.file instanceof HTMLInputElement && 0 === e3.file.files.length)
- return r3({ api: t3, paramName: "payload.file", desc: Cn() }), false;
+ return r3({ api: t3, paramName: "payload.file", desc: En() }), false;
}
return true;
}, onProgress: { type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: mn() }), true;
} } }) }, createAudioMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return !!m2(e3) || (r3({ api: t3, paramName: n3, desc: Mn() }), false);
+ return !!m2(e3) || (r3({ api: t3, paramName: n3, desc: Tn() }), false);
} }), onProgress: { type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: mn() }), true;
} } }, createVideoMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
if (!m2(e3))
- return r3({ api: t3, paramName: n3, desc: Mn() }), false;
+ return r3({ api: t3, paramName: n3, desc: Tn() }), false;
if (N3(e3.file))
- return r3({ api: t3, paramName: "payload.file", desc: un() }), false;
- if (Ie2) {
- if (!(e3.file instanceof HTMLInputElement || st2(e3.file)))
- return m2(e3.file) && "undefined" != typeof index ? !!st2(e3.file.tempFile) || (r3({ api: t3, paramName: "payload.file", desc: Cn() }), false) : (r3({ api: t3, paramName: "payload.file", desc: ln() }), false);
+ return r3({ api: t3, paramName: "payload.file", desc: pn() }), false;
+ if (Ce2) {
+ if (!(e3.file instanceof HTMLInputElement || ct2(e3.file)))
+ return m2(e3.file) && "undefined" != typeof index ? !!ct2(e3.file.tempFile) || (r3({ api: t3, paramName: "payload.file", desc: En() }), false) : (r3({ api: t3, paramName: "payload.file", desc: _n() }), false);
if (e3.file instanceof HTMLInputElement && 0 === e3.file.files.length)
- return r3({ api: t3, paramName: "payload.file", desc: Cn() }), false;
+ return r3({ api: t3, paramName: "payload.file", desc: En() }), false;
}
return true;
} }), onProgress: { type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: mn() }), true;
} } }, createFaceMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? A2(e3.index) ? !!C2(e3.data) || (r3({ api: t3, paramName: "payload.data", desc: an() }), false) : (r3({ api: t3, paramName: "payload.index", desc: cn() }), false) : (r3({ api: t3, paramName: n3, desc: Mn() }), false);
+ return m2(e3) ? A2(e3.index) ? !!C2(e3.data) || (r3({ api: t3, paramName: "payload.data", desc: un() }), false) : (r3({ api: t3, paramName: "payload.index", desc: dn() }), false) : (r3({ api: t3, paramName: n3, desc: Tn() }), false);
} }) }, createFileMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
if (!m2(e3))
- return r3({ api: t3, paramName: n3, desc: Mn() }), false;
+ return r3({ api: t3, paramName: n3, desc: Tn() }), false;
if (N3(e3.file))
- return r3({ api: t3, paramName: "payload.file", desc: un() }), false;
- if (Ie2) {
- if (!(e3.file instanceof HTMLInputElement || st2(e3.file)))
- return m2(e3.file) && "undefined" != typeof index ? 0 !== e3.file.tempFilePaths.length && 0 !== e3.file.tempFiles.length || (r3({ api: t3, paramName: "payload.file", desc: Cn() }), false) : (r3({ api: t3, paramName: "payload.file", desc: ln() }), false);
+ return r3({ api: t3, paramName: "payload.file", desc: pn() }), false;
+ if (Ce2) {
+ if (!(e3.file instanceof HTMLInputElement || ct2(e3.file)))
+ return m2(e3.file) && "undefined" != typeof index ? 0 !== e3.file.tempFilePaths.length && 0 !== e3.file.tempFiles.length || (r3({ api: t3, paramName: "payload.file", desc: En() }), false) : (r3({ api: t3, paramName: "payload.file", desc: _n() }), false);
if (e3.file instanceof HTMLInputElement && 0 === e3.file.files.length)
- return r3({ api: t3, paramName: "payload.file", desc: Cn() }), false;
+ return r3({ api: t3, paramName: "payload.file", desc: En() }), false;
}
return true;
} }), onProgress: { type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: mn() }), true;
} } }, createLocationMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? C2(e3.description) ? A2(e3.longitude) ? !!A2(e3.latitude) || (r3({ api: t3, paramName: "payload.latitude", desc: cn() }), false) : (r3({ api: t3, paramName: "payload.longitude", desc: cn() }), false) : (r3({ api: t3, paramName: "payload.description", desc: an() }), false) : (r3({ api: t3, paramName: n3, desc: Mn() }), false);
+ return m2(e3) ? C2(e3.description) ? A2(e3.longitude) ? !!A2(e3.latitude) || (r3({ api: t3, paramName: "payload.latitude", desc: dn() }), false) : (r3({ api: t3, paramName: "payload.longitude", desc: dn() }), false) : (r3({ api: t3, paramName: "payload.description", desc: un() }), false) : (r3({ api: t3, paramName: n3, desc: Tn() }), false);
} }) }, createMergerMessage: { to: n2, conversationType: n2, payload: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
var o3;
- return S2(e3.messageList) ? (r3({ api: t3, paramName: "payload.messageList", desc: _n() }), false) : S2(e3.compatibleText) ? (r3({ api: t3, paramName: "payload.compatibleText", desc: rn("compatibleText") }), false) : (o3 = false, e3.messageList.forEach(function(e4) {
- e4.status === Nn && (o3 = true);
+ return S2(e3.messageList) ? (r3({ api: t3, paramName: "payload.messageList", desc: fn() }), false) : S2(e3.compatibleText) ? (r3({ api: t3, paramName: "payload.compatibleText", desc: ln("compatibleText") }), false) : (o3 = false, e3.messageList.forEach(function(e4) {
+ e4.status === Un && (o3 = true);
}), !o3 || (r3({ api: t3, paramName: "payload.messageList", desc: u2("MergeFailedMessageLog") }), false));
} }) }, revokeMessage: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return S2(e3) ? (r3({ api: t3, paramName: n3, desc: Tn() }), false) : e3.conversationType === R2.CONV_SYSTEM ? (r3({ api: t3, paramName: n3, desc: u2("MessageCanBeRevokedDesc") }), false) : true !== e3.isRevoked || (r3({ api: t3, paramName: n3, desc: u2("MessageRevokedLog") }), false);
- } })], deleteMessage: [y2(y2({ name: "messageList" }, a2), {}, { validator: function(e3, t3, n3) {
- return !S2(e3) || (r3({ api: t3, paramName: n3, desc: _n() }), false);
- } })], translateText: { sourceTextList: a2, sourceLanguage: n2, targetLanguage: n2 }, convertVoiceToText: { message: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return S2(e3) ? (r3({ api: t3, paramName: n3, desc: Tn() }), false) : e3.type === R2.MSG_AUDIO && e3.status === On || (r3({ api: t3, paramName: n3, desc: u2("AudioMessageRequiredLog") }), false);
+ return S2(e3) ? (r3({ api: t3, paramName: n3, desc: Ln() }), false) : e3.conversationType === R2.CONV_SYSTEM ? (r3({ api: t3, paramName: n3, desc: u2("MessageCanBeRevokedDesc") }), false) : true !== e3.isRevoked || (r3({ api: t3, paramName: n3, desc: u2("MessageRevokedLog") }), false);
+ } })], deleteMessage: [y2(y2({ name: "messageList" }, s3), {}, { validator: function(e3, t3, n3) {
+ return !S2(e3) || (r3({ api: t3, paramName: n3, desc: fn() }), false);
+ } })], translateText: { sourceTextList: s3, sourceLanguage: n2, targetLanguage: n2 }, convertVoiceToText: { message: y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
+ return S2(e3) ? (r3({ api: t3, paramName: n3, desc: Ln() }), false) : e3.type === R2.MSG_AUDIO && e3.status === Pn || (r3({ api: t3, paramName: n3, desc: u2("AudioMessageRequiredLog") }), false);
} }) }, modifyMessage: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return S2(e3) ? (r3({ api: t3, paramName: n3, desc: Tn() }), false) : e3.conversationType === R2.CONV_SYSTEM ? (r3({ api: t3, paramName: n3, desc: u2("MessageCanBeModifiedLog") }), false) : true !== e3._onlineOnlyFlag || (r3({ api: t3, paramName: n3, desc: u2("OnlineMessageNotSupportLog") }), false);
- } })], searchCloudMessages: { keywordList: Fn.keywordListForMsg, keywordListMatchType: Fn.keywordListMatchType, cursor: Fn.cursor, senderUserIDList: { type: "Array", required: false, validator: function(e3, t3, n3) {
- return kn(e3, t3, n3, { allowUndefined: true, allowEmpty: true, maxLength: 5 });
+ return S2(e3) ? (r3({ api: t3, paramName: n3, desc: Ln() }), false) : e3.conversationType === R2.CONV_SYSTEM ? (r3({ api: t3, paramName: n3, desc: u2("MessageCanBeModifiedLog") }), false) : true !== e3._onlineOnlyFlag || (r3({ api: t3, paramName: n3, desc: u2("OnlineMessageNotSupportLog") }), false);
+ } })], searchCloudMessages: { keywordList: Vn.keywordListForMsg, keywordListMatchType: Vn.keywordListMatchType, cursor: Vn.cursor, senderUserIDList: { type: "Array", required: false, validator: function(e3, t3, n3) {
+ return On(e3, t3, n3, { allowUndefined: true, allowEmpty: true, maxLength: 5 });
} }, messageTypeList: { type: "Array", required: false, validator: function(e3, t3, n3) {
var o3;
- return !e3 || !(!kn(e3, t3, n3, { allowUndefined: true, allowEmpty: true }) || (o3 = [R2.MSG_TEXT, R2.MSG_IMAGE, R2.MSG_AUDIO, R2.MSG_FILE, R2.MSG_VIDEO, R2.MSG_LOCATION, R2.MSG_CUSTOM, R2.MSG_MERGER], 0 < e3.filter(function(e4) {
+ return !e3 || !(!On(e3, t3, n3, { allowUndefined: true, allowEmpty: true }) || (o3 = [R2.MSG_TEXT, R2.MSG_IMAGE, R2.MSG_AUDIO, R2.MSG_FILE, R2.MSG_VIDEO, R2.MSG_LOCATION, R2.MSG_CUSTOM, R2.MSG_MERGER], 0 < e3.filter(function(e4) {
return -1 === o3.indexOf(e4);
- }).length && (r3({ api: t3, paramName: n3, desc: Sn(n3, "message") }), 1)));
+ }).length && (r3({ api: t3, paramName: n3, desc: An(n3, "message") }), 1)));
} }, conversationID: { type: "String", required: false, validator: function(e3) {
- return !e3 || sn(e3);
+ return !e3 || cn(e3);
} }, timePosition: { type: "number", required: false, validator: function(e3, t3, n3) {
- return Rn(e3, t3, n3, { allowUndefined: true, min: 0 });
+ return Nn(e3, t3, n3, { allowUndefined: true, min: 0 });
} }, timePeriod: { type: "number", required: false, validator: function(e3, t3, n3) {
- return Rn(e3, t3, n3, { allowUndefined: true, min: 0 });
- } } }, searchCloudUsers: { keywordList: Fn.keywordListExceptMsg, keywordListMatchType: Fn.keywordListMatchType, cursor: Fn.cursor, count: Fn.count, miniBirthday: { type: "Number", required: false, validator: function(e3, t3, n3) {
- return Rn(e3, t3, n3, { allowUndefined: true, min: 0 });
+ return Nn(e3, t3, n3, { allowUndefined: true, min: 0 });
+ } } }, searchCloudUsers: { keywordList: Vn.keywordListExceptMsg, keywordListMatchType: Vn.keywordListMatchType, cursor: Vn.cursor, count: Vn.count, miniBirthday: { type: "Number", required: false, validator: function(e3, t3, n3) {
+ return Nn(e3, t3, n3, { allowUndefined: true, min: 0 });
} }, maxBirthday: { type: "Number", required: false, validator: function(e3, t3, n3) {
- return Rn(e3, t3, n3, { allowUndefined: true, min: 0 });
+ return Nn(e3, t3, n3, { allowUndefined: true, min: 0 });
} }, gender: { type: "String", required: false, validator: function(e3, t3, n3) {
return !e3 || e3 === R2.GENDER_FEMALE || e3 === R2.GENDER_MALE || r3({ api: t3, paramName: n3, desc: "".concat(e3, " is invalid match type") });
- } } }, searchCloudGroups: { keywordList: Fn.keywordListExceptMsg, keywordListMatchType: Fn.keywordListMatchType, cursor: Fn.cursor, count: Fn.count, groupTypeList: Fn.groupTypeList }, searchCloudGroupMembers: { keywordList: Fn.keywordListExceptMsg, keywordListMatchType: Fn.keywordListMatchType, cursor: Fn.cursor, count: Fn.count, groupTypeList: Fn.groupTypeList, groupIDList: { type: "Array", required: false, validator: function(e3, t3, n3) {
- return kn(e3, t3, n3, { allowUndefined: true, allowEmpty: true });
+ } } }, searchCloudGroups: { keywordList: Vn.keywordListExceptMsg, keywordListMatchType: Vn.keywordListMatchType, cursor: Vn.cursor, count: Vn.count, groupTypeList: Vn.groupTypeList }, searchCloudGroupMembers: { keywordList: Vn.keywordListExceptMsg, keywordListMatchType: Vn.keywordListMatchType, cursor: Vn.cursor, count: Vn.count, groupTypeList: Vn.groupTypeList, groupIDList: { type: "Array", required: false, validator: function(e3, t3, n3) {
+ return On(e3, t3, n3, { allowUndefined: true, allowEmpty: true });
} } }, getUserProfile: { userIDList: { type: "Array", validator: function(e3, t3, n3) {
- return O2(e3) ? (0 === e3.length && r3({ api: t3, paramName: n3, desc: _n() }), true) : (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return O2(e3) ? (0 === e3.length && r3({ api: t3, paramName: n3, desc: fn() }), true) : (r3({ api: t3, paramName: n3, desc: gn() }), false);
} } }, updateMyProfile: { profileCustomField: { type: "Array", validator: function(e3, t3, n3) {
- return !!N3(e3) || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return !!N3(e3) || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: gn() }), false);
} } }, setSelfStatus: { customStatus: { type: "String", validator: function(e3, t3, n3) {
- return !!C2(e3) || (r3({ api: t3, paramName: n3, desc: an() }), false);
+ return !!C2(e3) || (r3({ api: t3, paramName: n3, desc: un() }), false);
} } }, getUserStatus: { userIDList: { type: "Array", validator: function(e3, t3, n3) {
- return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: _n() }), false) : (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: fn() }), false) : (r3({ api: t3, paramName: n3, desc: gn() }), false);
} } }, subscribeUserStatus: { userIDList: { type: "Array", validator: function(e3, t3, n3) {
- return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: _n() }), false) : (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: fn() }), false) : (r3({ api: t3, paramName: n3, desc: gn() }), false);
} } }, unsubscribeUserStatus: { userIDList: { type: "Array", validator: function(e3, t3, n3) {
- return !e3 || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return !e3 || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: gn() }), false);
} } }, addFriend: { to: n2, source: { type: "String", required: true, validator: function(e3, t3, n3) {
- return !(!e3 || (e3.startsWith("AddSource_Type_") ? 8 < e3.replace("AddSource_Type_", "").length && (r3({ api: t3, paramName: n3, desc: fn("keyword", 8) }), 1) : (r3({ api: t3, paramName: n3, desc: u2("SourcePrefixLog") }), 1)));
+ return !(!e3 || (e3.startsWith("AddSource_Type_") ? 8 < e3.replace("AddSource_Type_", "").length && (r3({ api: t3, paramName: n3, desc: In("keyword", 8) }), 1) : (r3({ api: t3, paramName: n3, desc: u2("SourcePrefixLog") }), 1)));
} }, remark: { type: "String", required: false, validator: function(e3, t3, n3) {
- return !(C2(e3) && 96 < e3.length && (r3({ api: t3, paramName: n3, desc: fn(n3, 96) }), 1));
- } } }, deleteFriend: { userIDList: a2 }, checkFriend: { userIDList: a2 }, getFriendProfile: { userIDList: a2 }, updateFriend: { userID: n2, remark: { type: "String", required: false, validator: function(e3, t3, n3) {
- return !(C2(e3) && 96 < e3.length && (r3({ api: t3, paramName: n3, desc: fn(n3, 96) }), 1));
+ return !(C2(e3) && 96 < e3.length && (r3({ api: t3, paramName: n3, desc: In(n3, 96) }), 1));
+ } } }, deleteFriend: { userIDList: s3 }, checkFriend: { userIDList: s3 }, getFriendProfile: { userIDList: s3 }, updateFriend: { userID: n2, remark: { type: "String", required: false, validator: function(e3, t3, n3) {
+ return !(C2(e3) && 96 < e3.length && (r3({ api: t3, paramName: n3, desc: In(n3, 96) }), 1));
} }, friendCustomField: { type: "Array", required: false, validator: function(e3, t3, n3) {
var o3;
return !e3 || (O2(e3) ? (o3 = true, e3.forEach(function(e4) {
- return C2(e4.key) && -1 !== e4.key.indexOf("Tag_SNS_Custom") ? C2(e4.value) ? 8 < e4.key.replace("Tag_SNS_Custom_", "").length ? (r3({ api: t3, paramName: n3, desc: fn("keyword", 8) }), o3 = false) : void 0 : (r3({ api: t3, paramName: n3, desc: In("value") }), o3 = false) : (r3({ api: t3, paramName: n3, desc: u2("FriendCustomFieldPrefixLog") }), o3 = false);
- }), o3) : (r3({ api: t3, paramName: n3, desc: pn() }), false));
- } } }, acceptFriendApplication: { userID: n2 }, refuseFriendApplication: { userID: n2 }, deleteFriendApplication: { userID: n2 }, createFriendGroup: { name: n2 }, deleteFriendGroup: { name: n2 }, addToFriendGroup: { name: n2, userIDList: a2 }, removeFromFriendGroup: { name: n2, userIDList: a2 }, renameFriendGroup: { oldName: n2, newName: n2 }, sendMessageReadReceipt: [{ name: "messageList", type: "Array", validator: function(e3, t3, n3) {
- return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: _n() }), false) : (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return C2(e4.key) && -1 !== e4.key.indexOf("Tag_SNS_Custom") ? C2(e4.value) ? 8 < e4.key.replace("Tag_SNS_Custom_", "").length ? (r3({ api: t3, paramName: n3, desc: In("keyword", 8) }), o3 = false) : void 0 : (r3({ api: t3, paramName: n3, desc: Cn("value") }), o3 = false) : (r3({ api: t3, paramName: n3, desc: u2("FriendCustomFieldPrefixLog") }), o3 = false);
+ }), o3) : (r3({ api: t3, paramName: n3, desc: gn() }), false));
+ } } }, acceptFriendApplication: { userID: n2 }, refuseFriendApplication: { userID: n2 }, deleteFriendApplication: { userID: n2 }, createFriendGroup: { name: n2 }, deleteFriendGroup: { name: n2 }, addToFriendGroup: { name: n2, userIDList: s3 }, removeFromFriendGroup: { name: n2, userIDList: s3 }, renameFriendGroup: { oldName: n2, newName: n2 }, sendMessageReadReceipt: [{ name: "messageList", type: "Array", validator: function(e3, t3, n3) {
+ return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: fn() }), false) : (r3({ api: t3, paramName: n3, desc: gn() }), false);
} }], getMessageReadReceiptList: [{ name: "messageList", type: "Array", validator: function(e3, t3, n3) {
- return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: _n() }), false) : (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return O2(e3) ? 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: fn() }), false) : (r3({ api: t3, paramName: n3, desc: gn() }), false);
} }], createTopicInCommunity: { groupID: n2, topicName: n2 }, deleteTopicFromCommunity: { groupID: n2, topicIDList: { type: "Array", validator: function(e3, t3, n3) {
- return !e3 || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: pn() }), false);
+ return !e3 || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: gn() }), false);
} } }, updateTopicProfile: { groupID: n2, topicID: n2 }, getTopicList: { groupID: n2, topicIDList: { type: "Array", validator: function(e3, t3, n3) {
- return !e3 || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: pn() }), false);
- } } }, followUser: [y2({ name: "userIDList" }, a2)], unfollowUser: [y2({ name: "userIDList" }, a2)], getMyFollowingList: [y2(y2({ name: "startIndex" }, n2), {}, { required: false })], getMyFollowersList: [y2(y2({ name: "startIndex" }, n2), {}, { required: false })], getMutualFollowersList: [y2(y2({ name: "startIndex" }, n2), {}, { required: false })], getUserFollowInfo: [y2(y2({ name: "userIDList" }, a2), {}, { required: false })], checkFollowType: [y2({ name: "userIDList" }, a2)], addSignalingListener: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
- return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: rn(n3) }), false);
+ return !e3 || !!O2(e3) || (r3({ api: t3, paramName: n3, desc: gn() }), false);
+ } } }, followUser: [y2({ name: "userIDList" }, s3)], unfollowUser: [y2({ name: "userIDList" }, s3)], getMyFollowingList: [y2(y2({ name: "startIndex" }, n2), {}, { required: false })], getMyFollowersList: [y2(y2({ name: "startIndex" }, n2), {}, { required: false })], getMutualFollowersList: [y2(y2({ name: "startIndex" }, n2), {}, { required: false })], getUserFollowInfo: [y2(y2({ name: "userIDList" }, s3), {}, { required: false })], checkFollowType: [y2({ name: "userIDList" }, s3)], addSignalingListener: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
+ return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: ln(n3) }), false);
} }, { name: "handler", type: "Function", validator: function(e3, t3, n3) {
- return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: dn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Dn() }), true);
+ return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: hn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Sn() }), true);
} }], removeSignalingListener: [{ name: "eventName", type: "String", validator: function(e3, t3, n3) {
- return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: rn(n3) }), false);
+ return "string" == typeof e3 && 0 !== e3.length || (r3({ api: t3, paramName: n3, desc: ln(n3) }), false);
} }, { name: "handler", type: "Function", validator: function(e3, t3, n3) {
- return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: dn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Dn() }), true);
+ return "function" != typeof e3 ? (r3({ api: t3, paramName: n3, desc: hn() }), false) : ("" === e3.name && r3({ api: t3, paramName: n3, desc: Sn() }), true);
} }], invite: { userID: n2 }, inviteSync: [y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? !!C2(e3.userID) || (r3({ api: t3, paramName: "options.userID", desc: an() }), false) : (r3({ api: t3, paramName: "options", desc: Mn() }), false);
+ return m2(e3) ? !!C2(e3.userID) || (r3({ api: t3, paramName: "options.userID", desc: un() }), false) : (r3({ api: t3, paramName: "options", desc: Tn() }), false);
} }), { name: "successCb", type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: dn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
} }, { name: "errorCb", type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: dn() }), true;
- } }], inviteInGroup: { groupID: n2, inviteeList: a2 }, inviteInGroupSync: [y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
- return m2(e3) ? C2(e3.groupID) ? !!O2(e3.inviteeList) || (r3({ api: t3, paramName: "options.inviteeList", desc: pn() }), false) : (r3({ api: t3, paramName: "options.groupID", desc: an() }), false) : (r3({ api: t3, paramName: "options", desc: Mn() }), false);
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
+ } }], inviteInGroup: { groupID: n2, inviteeList: s3 }, inviteInGroupSync: [y2(y2({}, o2), {}, { validator: function(e3, t3, n3) {
+ return m2(e3) ? C2(e3.groupID) ? !!O2(e3.inviteeList) || (r3({ api: t3, paramName: "options.inviteeList", desc: gn() }), false) : (r3({ api: t3, paramName: "options.groupID", desc: un() }), false) : (r3({ api: t3, paramName: "options", desc: Tn() }), false);
} }), { name: "successCb", type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: dn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
} }, { name: "errorCb", type: "Function", required: false, validator: function(e3, t3, n3) {
- return N3(e3) && r3({ api: t3, paramName: n3, desc: dn() }), true;
+ return N3(e3) && r3({ api: t3, paramName: n3, desc: hn() }), true;
} }], accept: { inviteID: n2 }, reject: { inviteID: n2 }, getSignalingInfo: [y2(y2({ name: "message" }, o2), {}, { validator: function(e3, t3, n3) {
- return !S2(e3) || (r3({ api: t3, paramName: n3, desc: Tn() }), false);
- } })], modifyInvitation: { inviteID: n2, data: n2 } }, xn = { login: 1, logout: 1, getLoginUser: 1, getServerTime: 1, on: 1, once: 1, off: 1, setLogLevel: 1, registerPlugin: 1, destroy: 1, isReady: 1, createTextMessage: 1, createTextAtMessage: 1, createImageMessage: 1, createAudioMessage: 1, createVideoMessage: 1, createCustomMessage: 1, createFaceMessage: 1, createFileMessage: 1, createLocationMessage: 1, createMergerMessage: 1, downloadMergerMessage: 1, createForwardMessage: 1, sendMessage: 1, resendMessage: 1, revokeMessage: 1, deleteMessage: 1, translateText: 1, convertVoiceToText: 1, modifyMessage: 1, sendMessageReadReceipt: 1, getGroupMessageReadMemberList: 1, getMessageReadReceiptList: 1, setMessageExtensions: 1, getMessageExtensions: 1, deleteMessageExtensions: 1, addMessageReaction: 1, removeMessageReaction: 1, getMessageReactions: 1, getAllUserListOfMessageReaction: 1, getMessageList: 1, findMessage: 1, getMessageListHopping: 1, setMessageRead: 1, setAllMessageRead: 1, getConversationList: 1, getConversationProfile: 1, deleteConversation: 1, setConversationDraft: 1, pinConversation: 1, getTotalUnreadMessageCount: 1, setConversationCustomData: 1, markConversation: 1, createConversationGroup: 1, getConversationGroupList: 1, deleteConversationGroup: 1, renameConversationGroup: 1, addConversationsToGroup: 1, deleteConversationsFromGroup: 1, clearHistoryMessage: 1, setMessageRemindType: 1, setAllReceiveMessageOpt: 1, getAllReceiveMessageOpt: 1, getGroupList: 1, getGroupProfile: 1, createGroup: 1, joinGroup: 1, updateGroupProfile: 1, quitGroup: 1, dismissGroup: 1, changeGroupOwner: 1, searchGroupByID: 1, getGroupApplicationList: 1, handleGroupApplication: 1, initGroupAttributes: 1, setGroupAttributes: 1, deleteGroupAttributes: 1, getGroupAttributes: 1, setGroupCounters: 1, increaseGroupCounter: 1, decreaseGroupCounter: 1, getGroupCounters: 1, getJoinedCommunityList: 1, createTopicInCommunity: 1, deleteTopicFromCommunity: 1, updateTopicProfile: 1, getTopicList: 1, getGroupMemberProfile: 1, getGroupMemberList: 1, addGroupMember: 1, deleteGroupMember: 1, setGroupMemberNameCard: 1, setGroupMemberMuteTime: 1, setGroupMemberRole: 1, setGroupMemberCustomField: 1, getGroupOnlineMemberCount: 1, markGroupMemberList: 1, getMyProfile: 1, getUserProfile: 1, updateMyProfile: 1, setSelfStatus: 1, getUserStatus: 1, subscribeUserStatus: 1, unsubscribeUserStatus: 1, getBlacklist: 1, addToBlacklist: 1, removeFromBlacklist: 1, searchCloudMessages: 1, searchCloudUsers: 1, searchCloudGroups: 1, searchCloudGroupMembers: 1, getFriendList: 1, addFriend: 1, deleteFriend: 1, checkFriend: 1, updateFriend: 1, getFriendProfile: 1, getFriendApplicationList: 1, refuseFriendApplication: 1, deleteFriendApplication: 1, acceptFriendApplication: 1, setFriendApplicationRead: 1, getFriendGroupList: 1, createFriendGroup: 1, renameFriendGroup: 1, deleteFriendGroup: 1, addToFriendGroup: 1, removeFromFriendGroup: 1, followUser: 1, unfollowUser: 1, getMyFollowingList: 1, getMyFollowersList: 1, getMutualFollowersList: 1, getUserFollowInfo: 1, checkFollowType: 1, callExperimentalAPI: 1, addSignalingListener: 1, removeSignalingListener: 1, invite: 1, inviteSync: 1, inviteInGroup: 1, inviteInGroupSync: 1, cancel: 1, accept: 1, reject: 1, getSignalingInfo: 1, modifyInvitation: 1 }, L2 = (t2(io, Z2(Error)), e2(io)), k2 = { NO_SDKAPPID: 2e3, NO_ACCOUNT_TYPE: 2001, NO_IDENTIFIER: 2002, NO_USERSIG: 2003, NO_TINYID: 2022, NO_A2KEY: 2023, USER_NOT_LOGGED_IN: 2024, REPEAT_LOGIN: 2025, COS_UNDETECTED: 2040, COS_GET_SIG_FAIL: 2041, MSG_SEND_FAIL: 2100, MSG_SEND_FAIL_NOT_IN_AV: 2101, MSG_INSTANCE_REQUIRED: 2105, MSG_INVALID_CONV_TYPE: 2106, MSG_F_IS_EMPTY: 2108, MSG_ONPROGRESS_ERR: 2109, MSG_REVOKE_FAIL: 2110, MSG_DELETE_FAIL: 2111, MSG_UNREAD_ALL_FAIL: 2112, READ_RECEIPT_MSG_LIST_EMPTY: 2114, MSG_SEND_GRP_WITH_TOPIC_FAIL: 2115, CANNOT_DELETE_GRP_SYSTEM_NOTICE: 2116, TRANSLATE_TEXT_FAIL: 2117, VOICE_TO_TEXT_FAIL: 2118, UNSUPPORTED_VOICE_FORMAT: 2119, MSG_I_SELECT_F_FIRST: 2251, MSG_I_TYPES_LIMIT: 2252, MSG_I_SIZE_LIMIT: 2253, MSG_A_UPLOAD_FAIL: 2300, MSG_A_SIZE_LIMIT: 2301, MSG_V_UPLOAD_FAIL: 2350, MSG_V_SIZE_LIMIT: 2351, MSG_V_TYPES_LIMIT: 2352, MSG_F_UPLOAD_FAIL: 2400, MSG_F_SELECT_F_FIRST: 2401, MSG_F_SIZE_LIMIT: 2402, MSG_F_URL_IS_EMPTY: 2403, MSG_MERGER_TYPE_INVALID: 2450, MSG_MERGER_KEY_INVALID: 2451, MSG_MERGER_DOWNLOAD_FAIL: 2452, MSG_FORWARD_TYPE_INVALID: 2453, MSG_FORWARD_INVALID_ELEMENTS: 2454, MSG_MODIFY_CONFLICT: 2480, MSG_MODIFY_DISABLED_IN_AV: 2481, CONV_NOT_FOUND: 2500, USER_OR_GRP_NOT_FOUND: 2501, CONV_UN_RECORDED_TYPE: 2502, INVALID_CONV_ID: 2503, ILLEGAL_GRP_TYPE: 2600, ILLEGAL_GRP_ID: 2602, CANNOT_FIND_GRP: 2603, CANNOT_CHANGE_OWNER_IN_AV: 2620, CANNOT_CHANGE_OWNER_TO_SELF: 2621, MEMBER_NOT_IN_GRP: 2623, JOIN_GRP_FAIL: 2660, CANNOT_ADD_MEMBER_IN_AV: 2661, CANNOT_JOIN_NON_AV_WITHOUT_LOGIN: 2662, NOT_OWNER: 2681, INVALID_MEMBER_ROLE: 2683, CANNOT_SET_SELF_MEMBER_ROLE: 2684, CANNOT_MUTE_SELF: 2685, BAN_DURATION_INVALID: 2686, OPERATION_NOT_SUPPORTED_IN_AV: 2687, NOT_MY_FRIEND: 2700, ALREADY_MY_FRIEND: 2701, FRIEND_GRP_EXISTED: 2710, FRIEND_GRP_NOT_EXIST: 2711, FRIEND_APPLICATION_NOT_EXIST: 2716, UPDATE_PROFILE_INVALID_PARAM: 2721, UPDATE_PROFILE_NO_KEY: 2722, CANNOT_ADD_SELF_TO_BLACKLIST: 2742, NETWORK_ERROR: 2800, NETWORK_TIMEOUT: 2801, NO_NETWORK: 2805, UNCAUGHT_ERROR: 2903, INVALID_OPERATION: 2905, INVALID_TRTC_CMD: 2995, OVER_FREQUENCY_LIMIT: 2996, NO_PROTOCOL: 2997, NO_MODULE: 2998, SDK_IS_NOT_READY: 2999, LOGGING_IN: 3e3, LOGIN_FAILED: 3001, KICKED_OUT_MULT_DEVICE: 3002, KICKED_OUT_MULT_ACCOUNT: 3003, KICKED_OUT_USERSIG_EXPIRED: 3004, LOGGED_OUT: 3005, KICKED_OUT_REST_API: 3006, ILLEGAL_TOPIC_ID: 3021, NO_USE: 3122, PROFANITY_FOUND: 3123, OPTIONS_IS_EMPTY: 3153, MSG_A2KEY_EXPIRED: 20002, ACCOUNT_A2KEY_EXPIRED: 70001, HELLO_ANSWER_KICKED_OUT: 1002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, SIGNALING_INVALID_INVITE_ID: 8010, SIGNALING_NO_PERMISSION: 8011, SIGNALING_ALREADY_EXISTS: 8012, INVALID_CANCEL_MESSAGE: 8020 }, Vn = null, c2 = e2(function e3(t3) {
+ return !S2(e3) || (r3({ api: t3, paramName: n3, desc: Ln() }), false);
+ } })], modifyInvitation: { inviteID: n2, data: n2 } }, Hn = { login: 1, logout: 1, getLoginUser: 1, getServerTime: 1, on: 1, once: 1, off: 1, setLogLevel: 1, registerPlugin: 1, destroy: 1, isReady: 1, createTextMessage: 1, createTextAtMessage: 1, createImageMessage: 1, createAudioMessage: 1, createVideoMessage: 1, createCustomMessage: 1, createFaceMessage: 1, createFileMessage: 1, createLocationMessage: 1, createMergerMessage: 1, downloadMergerMessage: 1, createForwardMessage: 1, sendMessage: 1, resendMessage: 1, revokeMessage: 1, deleteMessage: 1, translateText: 1, convertVoiceToText: 1, modifyMessage: 1, sendMessageReadReceipt: 1, getGroupMessageReadMemberList: 1, getMessageReadReceiptList: 1, setMessageExtensions: 1, getMessageExtensions: 1, deleteMessageExtensions: 1, addMessageReaction: 1, removeMessageReaction: 1, getMessageReactions: 1, getAllUserListOfMessageReaction: 1, getMessageList: 1, findMessage: 1, getMessageListHopping: 1, setMessageRead: 1, setAllMessageRead: 1, getConversationList: 1, getConversationProfile: 1, deleteConversation: 1, setConversationDraft: 1, pinConversation: 1, getTotalUnreadMessageCount: 1, setConversationCustomData: 1, markConversation: 1, createConversationGroup: 1, getConversationGroupList: 1, deleteConversationGroup: 1, renameConversationGroup: 1, addConversationsToGroup: 1, deleteConversationsFromGroup: 1, clearHistoryMessage: 1, setMessageRemindType: 1, setAllReceiveMessageOpt: 1, getAllReceiveMessageOpt: 1, getGroupList: 1, getGroupProfile: 1, createGroup: 1, joinGroup: 1, updateGroupProfile: 1, quitGroup: 1, dismissGroup: 1, changeGroupOwner: 1, searchGroupByID: 1, getGroupApplicationList: 1, handleGroupApplication: 1, initGroupAttributes: 1, setGroupAttributes: 1, deleteGroupAttributes: 1, getGroupAttributes: 1, setGroupCounters: 1, increaseGroupCounter: 1, decreaseGroupCounter: 1, getGroupCounters: 1, getJoinedCommunityList: 1, createTopicInCommunity: 1, deleteTopicFromCommunity: 1, updateTopicProfile: 1, getTopicList: 1, getGroupMemberProfile: 1, getGroupMemberList: 1, addGroupMember: 1, deleteGroupMember: 1, setGroupMemberNameCard: 1, setGroupMemberMuteTime: 1, setGroupMemberRole: 1, setGroupMemberCustomField: 1, getGroupOnlineMemberCount: 1, markGroupMemberList: 1, getMyProfile: 1, getUserProfile: 1, updateMyProfile: 1, setSelfStatus: 1, getUserStatus: 1, subscribeUserStatus: 1, unsubscribeUserStatus: 1, getBlacklist: 1, addToBlacklist: 1, removeFromBlacklist: 1, searchCloudMessages: 1, searchCloudUsers: 1, searchCloudGroups: 1, searchCloudGroupMembers: 1, getFriendList: 1, addFriend: 1, deleteFriend: 1, checkFriend: 1, updateFriend: 1, getFriendProfile: 1, getFriendApplicationList: 1, refuseFriendApplication: 1, deleteFriendApplication: 1, acceptFriendApplication: 1, setFriendApplicationRead: 1, getFriendGroupList: 1, createFriendGroup: 1, renameFriendGroup: 1, deleteFriendGroup: 1, addToFriendGroup: 1, removeFromFriendGroup: 1, followUser: 1, unfollowUser: 1, getMyFollowingList: 1, getMyFollowersList: 1, getMutualFollowersList: 1, getUserFollowInfo: 1, checkFollowType: 1, callExperimentalAPI: 1, addSignalingListener: 1, removeSignalingListener: 1, invite: 1, inviteSync: 1, inviteInGroup: 1, inviteInGroupSync: 1, cancel: 1, accept: 1, reject: 1, getSignalingInfo: 1, modifyInvitation: 1 }, L2 = (t2(ro, Z2(Error)), e2(ro)), k2 = { NO_SDKAPPID: 2e3, NO_ACCOUNT_TYPE: 2001, NO_IDENTIFIER: 2002, NO_USERSIG: 2003, NO_TINYID: 2022, NO_A2KEY: 2023, USER_NOT_LOGGED_IN: 2024, REPEAT_LOGIN: 2025, COS_UNDETECTED: 2040, COS_GET_SIG_FAIL: 2041, MSG_SEND_FAIL: 2100, MSG_SEND_FAIL_NOT_IN_AV: 2101, MSG_INSTANCE_REQUIRED: 2105, MSG_INVALID_CONV_TYPE: 2106, MSG_F_IS_EMPTY: 2108, MSG_ONPROGRESS_ERR: 2109, MSG_REVOKE_FAIL: 2110, MSG_DELETE_FAIL: 2111, MSG_UNREAD_ALL_FAIL: 2112, READ_RECEIPT_MSG_LIST_EMPTY: 2114, MSG_SEND_GRP_WITH_TOPIC_FAIL: 2115, CANNOT_DELETE_GRP_SYSTEM_NOTICE: 2116, TRANSLATE_TEXT_FAIL: 2117, VOICE_TO_TEXT_FAIL: 2118, UNSUPPORTED_VOICE_FORMAT: 2119, MSG_I_SELECT_F_FIRST: 2251, MSG_I_TYPES_LIMIT: 2252, MSG_I_SIZE_LIMIT: 2253, MSG_A_UPLOAD_FAIL: 2300, MSG_A_SIZE_LIMIT: 2301, MSG_V_UPLOAD_FAIL: 2350, MSG_V_SIZE_LIMIT: 2351, MSG_V_TYPES_LIMIT: 2352, MSG_F_UPLOAD_FAIL: 2400, MSG_F_SELECT_F_FIRST: 2401, MSG_F_SIZE_LIMIT: 2402, MSG_F_URL_IS_EMPTY: 2403, MSG_MERGER_TYPE_INVALID: 2450, MSG_MERGER_KEY_INVALID: 2451, MSG_MERGER_DOWNLOAD_FAIL: 2452, MSG_FORWARD_TYPE_INVALID: 2453, MSG_FORWARD_INVALID_ELEMENTS: 2454, MSG_MODIFY_CONFLICT: 2480, MSG_MODIFY_DISABLED_IN_AV: 2481, CONV_NOT_FOUND: 2500, USER_OR_GRP_NOT_FOUND: 2501, CONV_UN_RECORDED_TYPE: 2502, INVALID_CONV_ID: 2503, ILLEGAL_GRP_TYPE: 2600, ILLEGAL_GRP_ID: 2602, CANNOT_FIND_GRP: 2603, CANNOT_CHANGE_OWNER_IN_AV: 2620, CANNOT_CHANGE_OWNER_TO_SELF: 2621, MEMBER_NOT_IN_GRP: 2623, JOIN_GRP_FAIL: 2660, CANNOT_ADD_MEMBER_IN_AV: 2661, CANNOT_JOIN_NON_AV_WITHOUT_LOGIN: 2662, NOT_OWNER: 2681, INVALID_MEMBER_ROLE: 2683, CANNOT_SET_SELF_MEMBER_ROLE: 2684, CANNOT_MUTE_SELF: 2685, BAN_DURATION_INVALID: 2686, OPERATION_NOT_SUPPORTED_IN_AV: 2687, NOT_MY_FRIEND: 2700, ALREADY_MY_FRIEND: 2701, FRIEND_GRP_EXISTED: 2710, FRIEND_GRP_NOT_EXIST: 2711, FRIEND_APPLICATION_NOT_EXIST: 2716, UPDATE_PROFILE_INVALID_PARAM: 2721, UPDATE_PROFILE_NO_KEY: 2722, CANNOT_ADD_SELF_TO_BLACKLIST: 2742, NETWORK_ERROR: 2800, NETWORK_TIMEOUT: 2801, NO_NETWORK: 2805, UNCAUGHT_ERROR: 2903, INVALID_OPERATION: 2905, INVALID_TRTC_CMD: 2995, OVER_FREQUENCY_LIMIT: 2996, NO_PROTOCOL: 2997, NO_MODULE: 2998, SDK_IS_NOT_READY: 2999, LOGGING_IN: 3e3, LOGIN_FAILED: 3001, KICKED_OUT_MULT_DEVICE: 3002, KICKED_OUT_MULT_ACCOUNT: 3003, KICKED_OUT_USERSIG_EXPIRED: 3004, LOGGED_OUT: 3005, KICKED_OUT_REST_API: 3006, ILLEGAL_TOPIC_ID: 3021, NO_USE: 3122, PROFANITY_FOUND: 3123, OPTIONS_IS_EMPTY: 3153, MSG_A2KEY_EXPIRED: 20002, ACCOUNT_A2KEY_EXPIRED: 70001, HELLO_ANSWER_KICKED_OUT: 1002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, SIGNALING_INVALID_INVITE_ID: 8010, SIGNALING_NO_PERMISSION: 8011, SIGNALING_ALREADY_EXISTS: 8012, INVALID_CANCEL_MESSAGE: 8020 }, Kn = null, c2 = e2(function e3(t3) {
p3(this, e3), this._m = t3, this._n = "";
}, [{ key: "isLoggedIn", value: function() {
return this._m.get(12).isLoggedIn();
@@ -9976,7 +9976,7 @@ var chat = { exports: {} };
} }, { key: "get", value: function(e3) {
return this._m.get(e3);
} }, { key: "getPlatform", value: function() {
- return ye2;
+ return De2;
} }, { key: "getCloudConfig", value: function(e3) {
return this._m.get(23).getCloudConfig(e3);
} }, { key: "emitOEvt", value: function(e3, t3) {
@@ -9997,13 +9997,13 @@ var chat = { exports: {} };
} }, { key: "noUse", value: function(e3) {
var t3 = k2.NO_USE;
return E2({ code: t3, message: this.getErrMsg(t3, e3) });
- } }]), G2 = { LOGIN: "wslogin", LOGOUT: "wslogout", HELLO: "wshello", KICK_OTHER: "KickOther", SYNC_UNREAD_MSG: "getmsg", SEND_C2C_MSG: "sendmsg", SEND_GRP_MSG: "send_group_msg", GET_USER_PROFILE: "portrait_get_all", UPDATE_MY_PROFILE: "portrait_set", GET_BL: "black_list_get", ADD_TO_BL: "black_list_add", RM_FROM_BL: "black_list_delete", GET_FD_LIST: "friend_get", GET_FD_PROFILE: "friend_get_specified", CHECK_FD: "friend_check", DEL_FD: "friend_delete", ADD_FD: "friend_add", UPDATE_FD: "friend_update", RESPOND_FD_APPLICATION: "friend_response", GET_FD_APPLICATION_LIST: "pendency_get", DEL_FD_APPLICATION: "pendency_delete", REFUSE_FD_APPLICATION: "pendency_refuse", REPORT_FD_APPLICATION: "pendency_report", GET_FD_GRP_LIST: "group_get", CREATE_FD_GRP: "group_add", DEL_FD_GRP: "group_delete", UPDATE_FD_GRP: "group_update", REVOKE_C2C_MSG: "msgwithdraw", SET_C2C_MSG_READ: "msgreaded", SET_C2C_PEER_MUTE_NOTIFICATIONS: "set_c2c_peer_mute_notifications", GET_C2C_PEER_MUTE_NOTIFICATIONS: "get_c2c_peer_mute_notifications", GET_C2C_ROAMING_MSG: "getroammsg", GET_C2C_PEER_READ_TIME: "get_peer_read_time", DEL_C2C_MSG: "delete_c2c_msg_ramble", MODIFY_C2C_MSG: "modify_c2c_msg", MODIFY_C2C_MSG_EXT: "set_key_values", GET_C2C_MSG_EXT: "get_key_values", ADD_C2C_MSG_REACTION: "reaction_add", RM_C2C_MSG_REACTION: "reaction_del", GET_C2C_MSG_REACTIONS: "reaction_multi_stat", GET_C2C_MSG_REACTION_USER_LIST: "reaction_iterate", PAGING_GET_CONV_LIST: "page_get", DEL_CONV: "batch_delete", CLEAR_HISTORY_MSG: "clear_msg", PIN_CONV: "top", DEL_GROUP_AT_TIPS: "deletemsg", SET_CONV_CUSTOM_DATA: "set_conv_custom_data", MARK_CONV: "mark_contact", CREATE_CONV_GRP: "create_contact_group", DEL_CONV_GRP: "del_contact_group", RENAME_CONV_GRP: "update_contact_group", ADD_CONV_TO_GRP: "add_conv_to_group", DEL_CONV_FROM_GRP: "del_conv_from_group", GET_CONV_GRP_LIST: "get_contact_group", SEARCH_CONV_GRP_MARK: "search_contact_group", GET_GRP_LIST: "get_joined_group_list", GET_GRP_PROFILE: "get_group_self_member_info", CREATE_GRP: "create_group", DISMISS_GRP: "destroy_group", UPDATE_GRP_PROFILE: "modify_group_base_info", APPLY_JOIN_GRP: "apply_join_group", APPLY_JOIN_GRP_NOAUTH: "apply_join_group_noauth", QUIT_GRP: "quit_group", SEARCH_GRP: "get_group_public_info", CHANGE_GRP_OWNER: "change_group_owner", HANDLE_GRP_APPLICATION: "handle_apply_join_group", HANDLE_INVITE_JOIN_GRP: "handle_invite_join_permission_group", HANDLE_GRP_INVITATION: "handle_invite_join_group", REVOKE_GRP_MSG: "group_msg_recall", SET_GRP_MSG_READ: "msg_read_report", SET_ALL_MSG_READ: "read_all_unread_msg", GET_GRP_ROAMING_MSG: "group_msg_get", GET_READ_RECEIPT: "get_group_msg_receipt", SEND_READ_RECEIPT: "group_msg_receipt", SEND_C2C_READ_RECEIPT: "c2c_msg_read_receipt", GET_READ_RECEIPT_DETAIL: "get_group_msg_receipt_detail", GET_GRP_RECEIPTS_BY_USERS: "get_group_msg_receipts_by_users", GET_GRP_PENDENCY: "get_pendency", DEL_GRP_SYSTEM_NOTICE: "deletemsg", AV_POLLING: "get_msg", AV_NOAUTH_POLLING: "get_msg_noauth", GET_ONLINE_MBR_NUM: "get_online_member_num", DEL_GRP_MSG: "delete_group_ramble_msg_by_seq", MODIFY_GRP_MSG: "modify_group_msg", SET_GRP_ATTR: "set_group_attr", MODIFY_GRP_ATTR: "modify_group_attr", DEL_GRP_ATTR: "delete_group_attr", CLEAR_GRP_ATTR: "clear_group_attr", GET_GRP_ATTR: "get_group_attr", MODIFY_GRP_MSG_EXT: "group_set_key_values", GET_GRP_MSG_EXT: "group_get_key_values", GET_GRP_NOTIFY: "batch_get_group_notify", UPDATE_GRP_COUNTER: "update_group_counter", GET_GRP_COUNTER: "get_group_counter", ADD_GRP_MSG_REACTION: "group_reaction_add", RM_GRP_MSG_REACTION: "group_reaction_del", GET_GRP_MSG_REACTIONS: "group_reaction_multi_stat", GET_GRP_MSG_REACTION_USER_LIST: "group_reaction_iterate", GET_GRP_MBR_LIST: "get_group_member_info", GET_AV_MBR_LIST: "get_members", GET_GRP_MBR_PROFILE: "get_specified_group_member_info", ADD_GRP_MBR: "add_group_member", DEL_GRP_MBR: "delete_group_member", BAN_AV_MBR: "ban_group_member", MODIFY_GRP_MBR_INFO: "modify_group_member_info", MARK_AV_MBR_INFO: "modify_user_info", COS_SIGN: "cos", COS_PRE_SIG: "pre_sig", SIMPLE_COS_PRE_SIG: "simple_sig", GET_IMAGE_INFO: "get_imageinfo", GET_IP: "get_final_ip", VIDEO_COVER: "video_cover", SSO_STAT: "tim_web_report_v2", PING: "alive", MSG_PUSH: "msg_push", CS: "query", GRP_CS: "query_grp", MBR_CS: "query_grp_member", USER_CS: "query_user", MULTI_MSG_PUSH: "multi_msg_push_ws", MSG_PUSH_ACK: "ws_msg_push_ack", STATUS_FORCE_OFFLINE: "stat_forceoffline", UPLOAD_MERGER_MSG: "save_relay_json_msg", DOWNLOAD_MERGER_MSG: "get_relay_json_msg", FETCH_CLOUD_CTRL_CONFIG: "fetch_config", PUSHED_CLOUD_CTRL_CONFIG: "push_configv2", FETCH_COMMERCIAL_CONFIG: "fetch_imsdk_purchase_bitsv2", PUSHED_COMMERCIAL_CONFIG: "push_imsdk_purchase_bitsv2", OVERLOAD_NOTIFY: "notify2", CREATE_TOPIC: "create_topic", DEL_TOPIC: "destroy_topic", UPDATE_TOPIC_PROFILE: "modify_topic", GET_TOPIC_LIST: "get_topic", SET_SELF_STATUS: "ws_set_custom_status", GET_USER_STATUS: "ws_get_user_status", SUB_USER_STATUS: "ws_status_subscribe", UNSUB_USER_STATUS: "ws_status_unsubscribe", STAT_BACKGROUND: "ws_stat_background", STAT_FOREGROUND: "ws_stat_foreground", SET_TOKEN: "ws_stat_settoken", PUSH_REPORT: "uniapp_sdk_report", GET_PROFANITY_LIST: "get_local_words", TRANSLATE_TEXT: "ws_batch_trans_text", VOICE_TO_TEXT: "ws_sentence_recognition", FOLLOW: "follow_add", UNFOLLOW: "follow_delete", GET_FOLLOW: "follow_get", GET_FOLLOW_INFO: "follow_get_info", CHECK_FOLLOW_TYPE: "follow_check", SET_ALL_RECEIVE_MSG_OPT: "ws_set_do_not_disturb", GET_ALL_RECEIVE_MSG_OPT: "ws_get_do_not_disturb" }, Bn = "networkRTT", Hn = "messageE2EDelay", Kn = "sendMessageC2C", Wn = "sendMessageGroup", Yn = "sendMessageGroupAV", jn = "sendMessageRichMedia", Jn = "cosUpload", zn = "messageReceivedGroup", Xn = "messageReceivedGroupAVPush", Zn = "messageReceivedGroupAVPull", Qn = q2(q2(q2(q2(q2(q2(q2(q2(q2(q2({}, Bn, 2), Hn, 3), Kn, 4), Wn, 5), Yn, 6), jn, 7), zn, 8), Xn, 9), Zn, 10), Jn, 11), $n = { info: 4, warning: 5, error: 6 }, eo = { wifi: 1, "2g": 2, "3g": 3, "4g": 4, "5g": 5, unknown: 6, none: 7, online: 8 }, to = { login: 4, plugin_search: 16, plugin_translate: 16, plugin_voice_to_text: 16, plugin_cs: 16, plugin_push: 16, plugin_bot: 16, plugin_emoji_reaction: 16, tui_key_features: 16 }, P2 = e2(oo, [{ key: "updateTimeStamp", value: function() {
- this.timestamp = He2();
+ } }]), G2 = { LOGIN: "wslogin", LOGOUT: "wslogout", HELLO: "wshello", KICK_OTHER: "KickOther", SYNC_UNREAD_MSG: "getmsg", SEND_C2C_MSG: "sendmsg", SEND_GRP_MSG: "send_group_msg", GET_USER_PROFILE: "portrait_get_all", UPDATE_MY_PROFILE: "portrait_set", GET_BL: "black_list_get", ADD_TO_BL: "black_list_add", RM_FROM_BL: "black_list_delete", GET_FD_LIST: "friend_get", GET_FD_PROFILE: "friend_get_specified", CHECK_FD: "friend_check", DEL_FD: "friend_delete", ADD_FD: "friend_add", UPDATE_FD: "friend_update", RESPOND_FD_APPLICATION: "friend_response", GET_FD_APPLICATION_LIST: "pendency_get", DEL_FD_APPLICATION: "pendency_delete", REFUSE_FD_APPLICATION: "pendency_refuse", REPORT_FD_APPLICATION: "pendency_report", GET_FD_GRP_LIST: "group_get", CREATE_FD_GRP: "group_add", DEL_FD_GRP: "group_delete", UPDATE_FD_GRP: "group_update", REVOKE_C2C_MSG: "msgwithdraw", SET_C2C_MSG_READ: "msgreaded", SET_C2C_PEER_MUTE_NOTIFICATIONS: "set_c2c_peer_mute_notifications", GET_C2C_PEER_MUTE_NOTIFICATIONS: "get_c2c_peer_mute_notifications", GET_C2C_ROAMING_MSG: "getroammsg", GET_C2C_PEER_READ_TIME: "get_peer_read_time", DEL_C2C_MSG: "delete_c2c_msg_ramble", MODIFY_C2C_MSG: "modify_c2c_msg", MODIFY_C2C_MSG_EXT: "set_key_values", GET_C2C_MSG_EXT: "get_key_values", ADD_C2C_MSG_REACTION: "reaction_add", RM_C2C_MSG_REACTION: "reaction_del", GET_C2C_MSG_REACTIONS: "reaction_multi_stat", GET_C2C_MSG_REACTION_USER_LIST: "reaction_iterate", PAGING_GET_CONV_LIST: "page_get", DEL_CONV: "batch_delete", CLEAR_HISTORY_MSG: "clear_msg", PIN_CONV: "top", DEL_GROUP_AT_TIPS: "deletemsg", SET_CONV_CUSTOM_DATA: "set_conv_custom_data", MARK_CONV: "mark_contact", CREATE_CONV_GRP: "create_contact_group", DEL_CONV_GRP: "del_contact_group", RENAME_CONV_GRP: "update_contact_group", ADD_CONV_TO_GRP: "add_conv_to_group", DEL_CONV_FROM_GRP: "del_conv_from_group", GET_CONV_GRP_LIST: "get_contact_group", SEARCH_CONV_GRP_MARK: "search_contact_group", GET_GRP_LIST: "get_joined_group_list", GET_GRP_PROFILE: "get_group_self_member_info", CREATE_GRP: "create_group", DISMISS_GRP: "destroy_group", UPDATE_GRP_PROFILE: "modify_group_base_info", APPLY_JOIN_GRP: "apply_join_group", APPLY_JOIN_GRP_NOAUTH: "apply_join_group_noauth", QUIT_GRP: "quit_group", SEARCH_GRP: "get_group_public_info", CHANGE_GRP_OWNER: "change_group_owner", HANDLE_GRP_APPLICATION: "handle_apply_join_group", HANDLE_INVITE_JOIN_GRP: "handle_invite_join_permission_group", HANDLE_GRP_INVITATION: "handle_invite_join_group", REVOKE_GRP_MSG: "group_msg_recall", SET_GRP_MSG_READ: "msg_read_report", SET_ALL_MSG_READ: "read_all_unread_msg", GET_GRP_ROAMING_MSG: "group_msg_get", GET_READ_RECEIPT: "get_group_msg_receipt", SEND_READ_RECEIPT: "group_msg_receipt", SEND_C2C_READ_RECEIPT: "c2c_msg_read_receipt", GET_READ_RECEIPT_DETAIL: "get_group_msg_receipt_detail", GET_GRP_RECEIPTS_BY_USERS: "get_group_msg_receipts_by_users", GET_GRP_PENDENCY: "get_pendency", DEL_GRP_SYSTEM_NOTICE: "deletemsg", AV_POLLING: "get_msg", AV_NOAUTH_POLLING: "get_msg_noauth", GET_ONLINE_MBR_NUM: "get_online_member_num", DEL_GRP_MSG: "delete_group_ramble_msg_by_seq", MODIFY_GRP_MSG: "modify_group_msg", SET_GRP_ATTR: "set_group_attr", MODIFY_GRP_ATTR: "modify_group_attr", DEL_GRP_ATTR: "delete_group_attr", CLEAR_GRP_ATTR: "clear_group_attr", GET_GRP_ATTR: "get_group_attr", MODIFY_GRP_MSG_EXT: "group_set_key_values", GET_GRP_MSG_EXT: "group_get_key_values", GET_GRP_NOTIFY: "batch_get_group_notify", UPDATE_GRP_COUNTER: "update_group_counter", GET_GRP_COUNTER: "get_group_counter", ADD_GRP_MSG_REACTION: "group_reaction_add", RM_GRP_MSG_REACTION: "group_reaction_del", GET_GRP_MSG_REACTIONS: "group_reaction_multi_stat", GET_GRP_MSG_REACTION_USER_LIST: "group_reaction_iterate", GET_GRP_MBR_LIST: "get_group_member_info", GET_AV_MBR_LIST: "get_members", GET_GRP_MBR_PROFILE: "get_specified_group_member_info", ADD_GRP_MBR: "add_group_member", DEL_GRP_MBR: "delete_group_member", BAN_AV_MBR: "ban_group_member", MODIFY_GRP_MBR_INFO: "modify_group_member_info", MARK_AV_MBR_INFO: "modify_user_info", COS_SIGN: "cos", COS_PRE_SIG: "pre_sig", SIMPLE_COS_PRE_SIG: "simple_sig", GET_IMAGE_INFO: "get_imageinfo", GET_IP: "get_final_ip", VIDEO_COVER: "video_cover", SSO_STAT: "tim_web_report_v2", PING: "alive", MSG_PUSH: "msg_push", CS: "query", GRP_CS: "query_grp", MBR_CS: "query_grp_member", USER_CS: "query_user", MULTI_MSG_PUSH: "multi_msg_push_ws", MSG_PUSH_ACK: "ws_msg_push_ack", STATUS_FORCE_OFFLINE: "stat_forceoffline", UPLOAD_MERGER_MSG: "save_relay_json_msg", DOWNLOAD_MERGER_MSG: "get_relay_json_msg", FETCH_CLOUD_CTRL_CONFIG: "fetch_config", PUSHED_CLOUD_CTRL_CONFIG: "push_configv2", FETCH_COMMERCIAL_CONFIG: "fetch_imsdk_purchase_bitsv2", PUSHED_COMMERCIAL_CONFIG: "push_imsdk_purchase_bitsv2", OVERLOAD_NOTIFY: "notify2", CREATE_TOPIC: "create_topic", DEL_TOPIC: "destroy_topic", UPDATE_TOPIC_PROFILE: "modify_topic", GET_TOPIC_LIST: "get_topic", SET_SELF_STATUS: "ws_set_custom_status", GET_USER_STATUS: "ws_get_user_status", SUB_USER_STATUS: "ws_status_subscribe", UNSUB_USER_STATUS: "ws_status_unsubscribe", STAT_BACKGROUND: "ws_stat_background", STAT_FOREGROUND: "ws_stat_foreground", SET_TOKEN: "ws_stat_settoken", PUSH_REPORT: "uniapp_sdk_report", GET_PROFANITY_LIST: "get_local_words", TRANSLATE_TEXT: "ws_batch_trans_text", VOICE_TO_TEXT: "ws_sentence_recognition", FOLLOW: "follow_add", UNFOLLOW: "follow_delete", GET_FOLLOW: "follow_get", GET_FOLLOW_INFO: "follow_get_info", CHECK_FOLLOW_TYPE: "follow_check", SET_ALL_RECEIVE_MSG_OPT: "ws_set_do_not_disturb", GET_ALL_RECEIVE_MSG_OPT: "ws_get_do_not_disturb" }, Wn = "networkRTT", Yn = "messageE2EDelay", jn = "sendMessageC2C", Jn = "sendMessageGroup", zn = "sendMessageGroupAV", Xn = "sendMessageRichMedia", Zn = "cosUpload", Qn = "messageReceivedGroup", $n = "messageReceivedGroupAVPush", eo = "messageReceivedGroupAVPull", to = q2(q2(q2(q2(q2(q2(q2(q2(q2(q2({}, Wn, 2), Yn, 3), jn, 4), Jn, 5), zn, 6), Xn, 7), Qn, 8), $n, 9), eo, 10), Zn, 11), no = { info: 4, warning: 5, error: 6 }, oo = { wifi: 1, "2g": 2, "3g": 3, "4g": 4, "5g": 5, unknown: 6, none: 7, online: 8 }, io = { login: 4, plugin_search: 16, plugin_translate: 16, plugin_voice_to_text: 16, plugin_cs: 16, plugin_push: 16, plugin_bot: 16, plugin_emoji_reaction: 16, tui_key_features: 16 }, P2 = e2(so, [{ key: "updateTimeStamp", value: function() {
+ this.timestamp = Ye2();
} }, { key: "start", value: function(e3) {
return this._startts = e3, this;
} }, { key: "end", value: function() {
var e3, t3 = this, n3 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0];
- this._sentFlag || (this._netMonitorModule && (e3 = this._netMonitorModule.getNetworkType(), this.setNetworkType(e3)), e3 = He2(), 0 === this.costTime && (this.costTime = e3 - this._startts), this.setMoreMessage("startts:".concat(this._startts, " endts:").concat(e3)), n3 ? (this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this)) : setTimeout(function() {
+ this._sentFlag || (this._netMonitorModule && (e3 = this._netMonitorModule.getNetworkType(), this.setNetworkType(e3)), e3 = Ye2(), 0 === this.costTime && (this.costTime = e3 - this._startts), this.setMoreMessage("startts:".concat(this._startts, " endts:").concat(e3)), n3 ? (this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this)) : setTimeout(function() {
t3._sentFlag = true, t3._eventStatModule && t3._eventStatModule.pushIn(t3);
}, 0));
} }, { key: "setError", value: function(e3) {
@@ -10016,11 +10016,11 @@ var chat = { exports: {} };
} }, { key: "setCostTime", value: function(e3) {
return this.costTime = e3, this;
} }, { key: "setLevel", value: function(e3) {
- return N3(e3) || this._sentFlag || (this.level = $n[e3]), this;
+ return N3(e3) || this._sentFlag || (this.level = no[e3]), this;
} }, { key: "setMoreMessage", value: function(e3) {
return S2(this.moreMessage) ? this.moreMessage = "".concat(e3) : this.moreMessage += " ".concat(e3), this;
} }, { key: "setNetworkType", value: function(e3) {
- return N3(e3) ? M2.w("".concat(this._n, ".setNetworkType value is undefined, please check!")) : (e3 = eo[e3.toLowerCase()], N3(e3) || (this.networkType = e3)), this;
+ return N3(e3) ? M2.w("".concat(this._n, ".setNetworkType value is undefined, please check!")) : (e3 = oo[e3.toLowerCase()], N3(e3) || (this.networkType = e3)), this;
} }, { key: "getStartTs", value: function() {
return this._startts;
} }, { key: "setUIPlatform", value: function(e3) {
@@ -10030,37 +10030,37 @@ var chat = { exports: {} };
} }, { key: "setEventType", value: function(e3) {
return this.eventType = e3, this;
} }], [{ key: "bindEventStatModule", value: function(e3) {
- oo.prototype._eventStatModule = e3;
+ so.prototype._eventStatModule = e3;
} }, { key: "bindNetMonitorModule", value: function(e3) {
- oo.prototype._netMonitorModule = e3;
- } }]), no = e2(function e3(t3) {
+ so.prototype._netMonitorModule = e3;
+ } }]), ao = e2(function e3(t3) {
p3(this, e3), this.type = R2.MSG_TEXT, this.content = { text: t3.text || "" };
}, [{ key: "setText", value: function(e3) {
this.content.text = e3;
} }, { key: "sendable", value: function() {
return 0 !== this.content.text.length;
} }]);
- function oo(e3) {
- p3(this, oo), this._n = "SSOLogData", this.eventType = to[e3] || 0, this.timestamp = 0, this.networkType = 8, this.code = 0, this.message = "", this.moreMessage = "", this.extension = e3, this.costTime = 0, this.duplicate = false, this.level = 4, this.uiPlatform = void 0, this._sentFlag = false, this._startts = He2();
+ function so(e3) {
+ p3(this, so), this._n = "SSOLogData", this.eventType = io[e3] || 0, this.timestamp = 0, this.networkType = 8, this.code = 0, this.message = "", this.moreMessage = "", this.extension = e3, this.costTime = 0, this.duplicate = false, this.level = 4, this.uiPlatform = void 0, this._sentFlag = false, this._startts = Ye2();
}
- function io(e3) {
- p3(this, io), t3 = i3(this, io);
+ function ro(e3) {
+ p3(this, ro), t3 = i3(this, ro);
var t3, n3 = e3.code, o3 = e3.message, e3 = e3.data;
return t3.code = n3, o3 ? t3.message = o3 : t3._getErrMsg && (t3.message = t3._getErrMsg(t3.code)), t3.data = e3 || {}, t3;
}
- function so(e3, t3, n3, o3) {
+ function co(e3, t3, n3, o3) {
var i4, o3 = 3 < arguments.length && void 0 !== o3 ? o3 : [];
- return e3 && (i4 = e3, t3 && (e3.startsWith("http://") ? i4 = e3.replace(/^http:\/\/[^/]+/, t3) : e3.startsWith("https://") && (i4 = e3.replace(/^https:\/\/[^/]+/, t3))), n3 && -1 === i4.indexOf("authKey=") && co(i4, o3) ? (-1 < i4.indexOf("?") ? "".concat(i4, "&authKey=") : "".concat(i4, "?authKey=")).concat(n3) : i4);
+ return e3 && (i4 = e3, t3 && (e3.startsWith("http://") ? i4 = e3.replace(/^http:\/\/[^/]+/, t3) : e3.startsWith("https://") && (i4 = e3.replace(/^https:\/\/[^/]+/, t3))), n3 && -1 === i4.indexOf("authKey=") && po(i4, o3) ? (-1 < i4.indexOf("?") ? "".concat(i4, "&authKey=") : "".concat(i4, "?authKey=")).concat(n3) : i4);
}
- function ao(e3, t3, n3) {
+ function uo(e3, t3, n3) {
var o3 = 2 < arguments.length && void 0 !== n3 ? n3 : [], n3 = t3[0].content || t3[0].payload;
return e3 === R2.MSG_IMAGE ? n3.imageInfoArray.forEach(function(e4) {
- co(e4.imageUrl, o3) && (e4.imageUrl = ro(e4.imageUrl));
- }) : e3 === R2.MSG_VIDEO ? (co(n3.snapshotUrl, o3) && (n3.snapshotUrl = ro(n3.snapshotUrl), n3.thumbUrl = ro(n3.thumbUrl)), co(n3.remoteVideoUrl, o3) && (n3.remoteVideoUrl = ro(n3.remoteVideoUrl))) : e3 === R2.MSG_AUDIO ? co(n3.remoteAudioUrl, o3) && (n3.remoteAudioUrl = ro(n3.remoteAudioUrl)) : e3 === R2.MSG_FILE ? co(n3.fileUrl, o3) && (n3.fileUrl = ro(n3.fileUrl)) : e3 === R2.MSG_MERGER && (e3 = (n3 = t3[0].content || t3[0].payload).downloadKey, n3 = void 0 === (n3 = n3.messageList) ? [] : n3, S2(void 0 === e3 ? "" : e3)) && n3.forEach(function(e4) {
- ao(e4.messageBody[0].type, e4.messageBody, o3);
+ po(e4.imageUrl, o3) && (e4.imageUrl = lo(e4.imageUrl));
+ }) : e3 === R2.MSG_VIDEO ? (po(n3.snapshotUrl, o3) && (n3.snapshotUrl = lo(n3.snapshotUrl), n3.thumbUrl = lo(n3.thumbUrl)), po(n3.remoteVideoUrl, o3) && (n3.remoteVideoUrl = lo(n3.remoteVideoUrl))) : e3 === R2.MSG_AUDIO ? po(n3.remoteAudioUrl, o3) && (n3.remoteAudioUrl = lo(n3.remoteAudioUrl)) : e3 === R2.MSG_FILE ? po(n3.fileUrl, o3) && (n3.fileUrl = lo(n3.fileUrl)) : e3 === R2.MSG_MERGER && (e3 = (n3 = t3[0].content || t3[0].payload).downloadKey, n3 = void 0 === (n3 = n3.messageList) ? [] : n3, S2(void 0 === e3 ? "" : e3)) && n3.forEach(function(e4) {
+ uo(e4.messageBody[0].type, e4.messageBody, o3);
}), t3;
}
- function ro(e3) {
+ function lo(e3) {
if (!e3)
return e3;
if (-1 === e3.indexOf("authKey="))
@@ -10072,7 +10072,7 @@ var chat = { exports: {} };
}
return t3.splice(n3, 1), 0 < t3.length ? "".concat(e3[0], "?").concat(t3.join("&")) : e3[0];
}
- function co(e3, t3) {
+ function po(e3, t3) {
var n3 = false;
if (e3) {
var e3 = e3.match(/:\/\/([0-9]?\.)?(.[^/:]+)/), o3 = e3 && e3[2] || "";
@@ -10086,18 +10086,18 @@ var chat = { exports: {} };
}
return n3;
}
- var uo = e2(function e3(t3, n3, o3, i4) {
- p3(this, e3), this._imageMemoryURL = "", this._fileDownloadProxy = n3, this._authKey = o3, this._fileDNList = i4, v3 || ve2 ? this.createImageDataASURL(t3.file) : this.createImageDataASURLInWeb(t3.file), this._initImageInfoModel(), this.type = R2.MSG_IMAGE, this._percent = 0, this.content = { imageFormat: t3.imageFormat || je2.UNKNOWN, uuid: t3.uuid, imageInfoArray: [] }, this.initImageInfoArray(t3.imageInfoArray), this._autoFixUrl();
+ var _o = e2(function e3(t3, n3, o3, i4) {
+ p3(this, e3), this._imageMemoryURL = "", this._fileDownloadProxy = n3, this._authKey = o3, this._fileDNList = i4, v3 || ye2 ? this.createImageDataASURL(t3.file) : this.createImageDataASURLInWeb(t3.file), this._initImageInfoModel(), this.type = R2.MSG_IMAGE, this._percent = 0, this.content = { imageFormat: t3.imageFormat || Xe2.UNKNOWN, uuid: t3.uuid, imageInfoArray: [] }, this.initImageInfoArray(t3.imageInfoArray), this._autoFixUrl();
}, [{ key: "_initImageInfoModel", value: function() {
var t3 = this;
this._ImageInfoModel = function(e3) {
- this.instanceID = ht2(9999999), this.sizeType = e3.type || 0, this.type = 0, this.size = e3.size || 0, this.width = e3.width || 0, this.height = e3.height || 0, this.imageUrl = e3.imageUrl || e3.url || "", this.url = so(e3.url || t3._imageMemoryURL, t3._fileDownloadProxy, t3._authKey, t3._fileDNList);
+ this.instanceID = mt2(9999999), this.sizeType = e3.type || 0, this.type = 0, this.size = e3.size || 0, this.width = e3.width || 0, this.height = e3.height || 0, this.imageUrl = e3.imageUrl || e3.url || "", this.url = co(e3.url || t3._imageMemoryURL, t3._fileDownloadProxy, t3._authKey, t3._fileDNList);
}, this._ImageInfoModel.prototype = { setSizeType: function(e3) {
this.sizeType = e3;
}, setType: function(e3) {
this.type = e3;
}, setImageUrl: function(e3) {
- e3 && (this.imageUrl = so(e3, t3._fileDownloadProxy, t3._authKey, t3._fileDNList));
+ e3 && (this.imageUrl = co(e3, t3._fileDownloadProxy, t3._authKey, t3._fileDNList));
}, getImageUrl: function() {
return this.imageUrl;
} };
@@ -10109,12 +10109,12 @@ var chat = { exports: {} };
for (var t3, n3 = this.content.imageInfoArray.length, o3 = 0; o3 < n3; o3++)
t3 = this.content.imageInfoArray[o3], e3[o3].size && (t3.size = e3[o3].size), e3[o3].url && t3.setImageUrl(e3[o3].url), e3[o3].width && (t3.width = e3[o3].width), e3[o3].height && (t3.height = e3[o3].height);
} }, { key: "_autoFixUrl", value: function() {
- for (var e3 = this.content.imageInfoArray.length, t3 = "", n3 = "", o3 = ["http", "https"], i4 = null, s4 = 0; s4 < e3; s4++)
- this.content.imageInfoArray[s4].url && "" !== (i4 = this.content.imageInfoArray[s4]).imageUrl && (n3 = i4.imageUrl.slice(0, i4.imageUrl.indexOf("://") + 1), t3 = i4.imageUrl.slice(i4.imageUrl.indexOf("://") + 1), o3.indexOf(n3) < 0 && (n3 = "https:"), this.content.imageInfoArray[s4].setImageUrl([n3, t3].join("")));
+ for (var e3 = this.content.imageInfoArray.length, t3 = "", n3 = "", o3 = ["http", "https"], i4 = null, a3 = 0; a3 < e3; a3++)
+ this.content.imageInfoArray[a3].url && "" !== (i4 = this.content.imageInfoArray[a3]).imageUrl && (n3 = i4.imageUrl.slice(0, i4.imageUrl.indexOf("://") + 1), t3 = i4.imageUrl.slice(i4.imageUrl.indexOf("://") + 1), o3.indexOf(n3) < 0 && (n3 = "https:"), this.content.imageInfoArray[a3].setImageUrl([n3, t3].join("")));
} }, { key: "updatePercent", value: function(e3) {
this._percent = e3, 1 < this._percent && (this._percent = 1);
} }, { key: "updateImageFormat", value: function(e3) {
- this.content.imageFormat = je2[e3.toUpperCase()] || je2.UNKNOWN;
+ this.content.imageFormat = Xe2[e3.toUpperCase()] || Xe2.UNKNOWN;
} }, { key: "createImageDataASURLInWeb", value: function(e3) {
void 0 !== e3 && 0 < e3.files.length && (this._imageMemoryURL = window.URL.createObjectURL(e3.files[0]));
} }, { key: "createImageDataASURL", value: function(e3) {
@@ -10125,22 +10125,22 @@ var chat = { exports: {} };
3 <= this.content.imageInfoArray.length || this.content.imageInfoArray.push(e3);
} }, { key: "updateAccessSideImageInfoArray", value: function() {
var e3 = this.content.imageInfoArray, t3 = e3[0], n3 = t3.width, n3 = void 0 === n3 ? 0 : n3, t3 = t3.height, t3 = void 0 === t3 ? 0 : t3;
- 0 !== n3 && 0 !== t3 && (Bt2(e3), Object.assign(e3[2], Vt2({ originWidth: n3, originHeight: t3, min: 720 })));
+ 0 !== n3 && 0 !== t3 && (Wt2(e3), Object.assign(e3[2], Kt2({ originWidth: n3, originHeight: t3, min: 720 })));
} }, { key: "sendable", value: function() {
return 0 !== this.content.imageInfoArray.length && "" !== this.content.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0].size;
- } }]), lo = e2(function e3(t3) {
+ } }]), ho = e2(function e3(t3) {
p3(this, e3), this.type = R2.MSG_FACE, this.content = t3 || null;
}, [{ key: "sendable", value: function() {
return null !== this.content;
- } }]), po = e2(function e3(t3, n3, o3, i4) {
- p3(this, e3), this.type = R2.MSG_AUDIO, this._percent = 0, this._fileDownloadProxy = n3, this._authKey = o3, this._fileDNList = i4, this.content = { downloadFlag: 2, second: t3.second, size: t3.size, url: so(t3.url, this._fileDownloadProxy, this._authKey, this._fileDNList), remoteAudioUrl: so(t3.url || "", this._fileDownloadProxy, this._authKey, this._fileDNList), uuid: t3.uuid };
+ } }]), go = e2(function e3(t3, n3, o3, i4) {
+ p3(this, e3), this.type = R2.MSG_AUDIO, this._percent = 0, this._fileDownloadProxy = n3, this._authKey = o3, this._fileDNList = i4, this.content = { downloadFlag: 2, second: t3.second, size: t3.size, url: co(t3.url, this._fileDownloadProxy, this._authKey, this._fileDNList), remoteAudioUrl: co(t3.url || "", this._fileDownloadProxy, this._authKey, this._fileDNList), uuid: t3.uuid };
}, [{ key: "updatePercent", value: function(e3) {
this._percent = e3, 1 < this._percent && (this._percent = 1);
} }, { key: "updateAudioUrl", value: function(e3) {
- this.content.remoteAudioUrl = so(e3, this._fileDownloadProxy, this._authKey, this._fileDNList);
+ this.content.remoteAudioUrl = co(e3, this._fileDownloadProxy, this._authKey, this._fileDNList);
} }, { key: "sendable", value: function() {
return "" !== this.content.remoteAudioUrl;
- } }]), _o = { from: true, groupID: true, groupName: true, to: true }, ho = e2(function e3(t3) {
+ } }]), fo = { from: true, groupID: true, groupName: true, to: true }, mo = e2(function e3(t3) {
p3(this, e3), this.type = R2.MSG_GRP_TIP, this.content = {}, this._initContent(t3);
}, [{ key: "_initContent", value: function(t3) {
var n3 = this;
@@ -10174,7 +10174,7 @@ var chat = { exports: {} };
} }, { key: "_initGroupProfile", value: function(e3) {
for (var t3 = Object.keys(e3), n3 = 0; n3 < t3.length; n3++) {
var o3 = t3[n3];
- _o[o3] && (this.content.groupProfile[o3] = e3[o3]);
+ fo[o3] && (this.content.groupProfile[o3] = e3[o3]);
}
} }, { key: "_initOperatorInfo", value: function(e3) {
for (var t3 = Object.keys(e3), n3 = 0; n3 < t3.length; n3++) {
@@ -10192,7 +10192,7 @@ var chat = { exports: {} };
var o3 = t3[n3];
this.content.newGroupProfile[o3] = "muteAllMembers" !== o3 ? e3[o3] : 1 === e3[o3];
}
- } }]), go = { from: true, groupID: true, groupName: true, to: true, groupType: true }, fo = e2(function e3(t3) {
+ } }]), vo = { from: true, groupID: true, groupName: true, to: true, groupType: true }, Io = e2(function e3(t3) {
p3(this, e3), this.type = R2.MSG_GRP_SYS_NOTICE, this.content = {}, this._initContent(t3);
}, [{ key: "_initContent", value: function(t3) {
var n3 = this;
@@ -10213,22 +10213,22 @@ var chat = { exports: {} };
} }, { key: "_initGroupProfile", value: function(e3) {
for (var t3 = Object.keys(e3), n3 = 0; n3 < t3.length; n3++) {
var o3 = t3[n3];
- go[o3] && ("groupName" === o3 ? this.content.groupProfile.name = e3[o3] : this.content.groupProfile[o3] = e3[o3]);
+ vo[o3] && ("groupName" === o3 ? this.content.groupProfile.name = e3[o3] : this.content.groupProfile[o3] = e3[o3]);
}
- } }]), mo = e2(function e3(t3, n3, o3, i4) {
+ } }]), Mo = e2(function e3(t3, n3, o3, i4) {
p3(this, e3), this.type = R2.MSG_FILE, this._percent = 0;
- var s4 = this._getFileInfo(t3);
- this.content = { downloadFlag: 2, fileUrl: so(t3.url || t3.fileUrl, n3, o3, i4) || "", uuid: t3.uuid, fileName: s4.name || "", fileSize: s4.size || 0 };
+ var a3 = this._getFileInfo(t3);
+ this.content = { downloadFlag: 2, fileUrl: co(t3.url || t3.fileUrl, n3, o3, i4) || "", uuid: t3.uuid, fileName: a3.name || "", fileSize: a3.size || 0 };
}, [{ key: "_getFileInfo", value: function(e3) {
var t3, n3;
- return N3(e3.fileName) || N3(e3.fileSize) ? (t3 = e3.file.files[0], fe2 && (t3.path && -1 !== t3.path.indexOf(".") && (n3 = t3.path.slice(t3.path.lastIndexOf(".") + 1).toLowerCase(), t3.type = n3, t3.name || (t3.name = "".concat(ht2(999999), ".").concat(n3))), t3.name || (t3.type = "", t3.name = t3.path.slice(t3.path.lastIndexOf("/") + 1).toLowerCase()), t3.suffix && (t3.type = t3.suffix), t3.url || (t3.url = t3.path)), { size: t3.size, name: t3.name }) : { size: e3.fileSize, name: e3.fileName };
+ return N3(e3.fileName) || N3(e3.fileSize) ? (t3 = e3.file.files[0], Ie2 && (t3.path && -1 !== t3.path.indexOf(".") && (n3 = t3.path.slice(t3.path.lastIndexOf(".") + 1).toLowerCase(), t3.type = n3, t3.name || (t3.name = "".concat(mt2(999999), ".").concat(n3))), t3.name || (t3.type = "", t3.name = t3.path.slice(t3.path.lastIndexOf("/") + 1).toLowerCase()), t3.suffix && (t3.type = t3.suffix), t3.url || (t3.url = t3.path)), { size: t3.size, name: t3.name }) : { size: e3.fileSize, name: e3.fileName };
} }, { key: "updatePercent", value: function(e3) {
this._percent = e3, 1 < this._percent && (this._percent = 1);
} }, { key: "updateFileUrl", value: function(e3) {
this.content.fileUrl = e3;
} }, { key: "sendable", value: function() {
return "" !== this.content.fileUrl && "" !== this.content.fileName && 0 !== this.content.fileSize;
- } }]), vo = e2(function e3(t3) {
+ } }]), yo = e2(function e3(t3) {
p3(this, e3), this.type = R2.MSG_CUSTOM, this.content = { data: t3.data || "", description: t3.description || "", extension: t3.extension || "" };
}, [{ key: "setData", value: function(e3) {
return this.content.data = e3, this;
@@ -10238,43 +10238,43 @@ var chat = { exports: {} };
return this.content.extension = e3, this;
} }, { key: "sendable", value: function() {
return 0 !== this.content.data.length || 0 !== this.content.description.length || 0 !== this.content.extension.length;
- } }]), Io = e2(function e3(t3, n3, o3, i4) {
- p3(this, e3), this.type = R2.MSG_VIDEO, this._percent = 0, this._fileDownloadProxy = n3, this._authKey = o3, this._fileDNList = i4, this.content = { remoteVideoUrl: so(t3.remoteVideoUrl || t3.videoUrl || "", this._fileDownloadProxy, this._authKey, this._fileDNList), videoFormat: t3.videoFormat, videoSecond: parseInt(t3.videoSecond, 10), videoSize: t3.videoSize, videoUrl: so(t3.videoUrl, this._fileDownloadProxy, this._authKey, this._fileDNList), videoDownloadFlag: 2, videoUUID: t3.videoUUID, thumbUUID: t3.thumbUUID, thumbFormat: t3.thumbFormat, thumbWidth: t3.thumbWidth, snapshotWidth: t3.thumbWidth, thumbHeight: t3.thumbHeight, snapshotHeight: t3.thumbHeight, thumbSize: t3.thumbSize, snapshotSize: t3.thumbSize, thumbDownloadFlag: 2, thumbUrl: so(t3.thumbUrl, this._fileDownloadProxy, this._authKey, this._fileDNList), snapshotUrl: so(t3.thumbUrl, this._fileDownloadProxy, this._authKey, this._fileDNList) };
+ } }]), Co = e2(function e3(t3, n3, o3, i4) {
+ p3(this, e3), this.type = R2.MSG_VIDEO, this._percent = 0, this._fileDownloadProxy = n3, this._authKey = o3, this._fileDNList = i4, this.content = { remoteVideoUrl: co(t3.remoteVideoUrl || t3.videoUrl || "", this._fileDownloadProxy, this._authKey, this._fileDNList), videoFormat: t3.videoFormat, videoSecond: parseInt(t3.videoSecond, 10), videoSize: t3.videoSize, videoUrl: co(t3.videoUrl, this._fileDownloadProxy, this._authKey, this._fileDNList), videoDownloadFlag: 2, videoUUID: t3.videoUUID, thumbUUID: t3.thumbUUID, thumbFormat: t3.thumbFormat, thumbWidth: t3.thumbWidth, snapshotWidth: t3.thumbWidth, thumbHeight: t3.thumbHeight, snapshotHeight: t3.thumbHeight, thumbSize: t3.thumbSize, snapshotSize: t3.thumbSize, thumbDownloadFlag: 2, thumbUrl: co(t3.thumbUrl, this._fileDownloadProxy, this._authKey, this._fileDNList), snapshotUrl: co(t3.thumbUrl, this._fileDownloadProxy, this._authKey, this._fileDNList) };
}, [{ key: "updatePercent", value: function(e3) {
this._percent = e3, 1 < this._percent && (this._percent = 1);
} }, { key: "updateVideoUrl", value: function(e3) {
- e3 && (this.content.remoteVideoUrl = so(e3, this._fileDownloadProxy, this._authKey, this._fileDNList));
+ e3 && (this.content.remoteVideoUrl = co(e3, this._fileDownloadProxy, this._authKey, this._fileDNList));
} }, { key: "updateSnapshotInfo", value: function(e3) {
var t3 = e3.snapshotUrl, n3 = e3.snapshotWidth, e3 = e3.snapshotHeight;
S2(t3) || (this.content.thumbUrl = this.content.snapshotUrl = t3), S2(n3) || (this.content.thumbWidth = this.content.snapshotWidth = Number(n3)), S2(e3) || (this.content.thumbHeight = this.content.snapshotHeight = Number(e3));
} }, { key: "sendable", value: function() {
return "" !== this.content.remoteVideoUrl;
- } }]), Mo = e2(function e3(t3) {
+ } }]), To = e2(function e3(t3) {
p3(this, e3), this.type = R2.MSG_LOCATION;
var n3 = t3.description, o3 = t3.longitude, t3 = t3.latitude;
this.content = { description: n3, longitude: o3, latitude: t3 };
}, [{ key: "sendable", value: function() {
return true;
- } }]), yo = e2(function e3(t3, n3, o3, i4) {
- var s4, a3;
- p3(this, e3), this.from = t3.from, this.messageSender = t3.from, this.time = t3.time, this.messageSequence = t3.sequence, this.clientSequence = t3.clientSequence || t3.sequence, this.messageRandom = t3.random, this.cloudCustomData = t3.cloudCustomData || "", this.clientTime = t3.clientTime || void 0, t3.ID ? (this.ID = t3.ID || "", this.nick = t3.nick || "", this.avatar = t3.avatar || "", t3.messageBody ? this.messageBody = JSON.parse(JSON.stringify(t3.messageBody)) : this.messageBody = [{ type: t3.type, payload: t3.payload }], t3.conversationType ? t3.conversationType.startsWith(R2.CONV_C2C) ? this.receiverUserID = t3.to : t3.conversationType.startsWith(R2.CONV_GROUP) && (this.receiverGroupID = t3.to) : t3.receiverGroupID ? this.receiverGroupID = t3.receiverGroupID : t3.receiverUserID && (this.receiverUserID = t3.receiverUserID), this.messageReceiver = t3.to || t3.messageReceiver) : (this.nick = t3.nick || "", this.avatar = t3.avatar || "", this.messageBody = [], s4 = t3.elements[0].type, a3 = t3.elements[0].content, this._patchRichMediaPayload(s4, a3), this._updateRichMediaDownloadUrl(s4, a3, n3, o3, i4), s4 === R2.MSG_MERGER ? this.messageBody.push({ type: s4, payload: new Co(a3, n3, o3, i4).content }) : this.messageBody.push({ type: s4, payload: a3 }), t3.groupID && (this.receiverGroupID = t3.groupID, this.messageReceiver = t3.groupID), t3.to && (this.receiverUserID = t3.to, this.messageReceiver = t3.to), this.ID = "".concat(t3.tinyID, "-").concat(t3.clientTime, "-").concat(t3.random));
+ } }]), Do = e2(function e3(t3, n3, o3, i4) {
+ var a3, s4;
+ p3(this, e3), this.from = t3.from, this.messageSender = t3.from, this.time = t3.time, this.messageSequence = t3.sequence, this.clientSequence = t3.clientSequence || t3.sequence, this.messageRandom = t3.random, this.cloudCustomData = t3.cloudCustomData || "", this.clientTime = t3.clientTime || void 0, t3.ID ? (this.ID = t3.ID || "", this.nick = t3.nick || "", this.avatar = t3.avatar || "", t3.messageBody ? this.messageBody = JSON.parse(JSON.stringify(t3.messageBody)) : this.messageBody = [{ type: t3.type, payload: t3.payload }], t3.conversationType ? t3.conversationType.startsWith(R2.CONV_C2C) ? this.receiverUserID = t3.to : t3.conversationType.startsWith(R2.CONV_GROUP) && (this.receiverGroupID = t3.to) : t3.receiverGroupID ? this.receiverGroupID = t3.receiverGroupID : t3.receiverUserID && (this.receiverUserID = t3.receiverUserID), this.messageReceiver = t3.to || t3.messageReceiver) : (this.nick = t3.nick || "", this.avatar = t3.avatar || "", this.messageBody = [], a3 = t3.elements[0].type, s4 = t3.elements[0].content, this._patchRichMediaPayload(a3, s4), this._updateRichMediaDownloadUrl(a3, s4, n3, o3, i4), a3 === R2.MSG_MERGER ? this.messageBody.push({ type: a3, payload: new Eo(s4, n3, o3, i4).content }) : this.messageBody.push({ type: a3, payload: s4 }), t3.groupID && (this.receiverGroupID = t3.groupID, this.messageReceiver = t3.groupID), t3.to && (this.receiverUserID = t3.to, this.messageReceiver = t3.to), this.ID = "".concat(t3.tinyID, "-").concat(t3.clientTime, "-").concat(t3.random));
}, [{ key: "_patchRichMediaPayload", value: function(e3, t3) {
e3 === R2.MSG_IMAGE ? t3.imageInfoArray.forEach(function(e4) {
!e4.imageUrl && e4.url && (e4.imageUrl = e4.url, e4.sizeType = e4.type, 1 === e4.type ? e4.type = 0 : 3 === e4.type && (e4.type = 1));
}) : e3 === R2.MSG_VIDEO ? !t3.remoteVideoUrl && t3.videoUrl && (t3.remoteVideoUrl = t3.videoUrl) : e3 === R2.MSG_AUDIO ? !t3.remoteAudioUrl && t3.url && (t3.remoteAudioUrl = t3.url) : e3 === R2.MSG_FILE && !t3.fileUrl && t3.url && (t3.fileUrl = t3.url, t3.url = void 0);
} }, { key: "_updateRichMediaDownloadUrl", value: function(e3, t3, n3, o3, i4) {
(n3 || o3) && (e3 === R2.MSG_IMAGE ? t3.imageInfoArray.forEach(function(e4) {
- e4.imageUrl = so(e4.imageUrl, n3, o3, i4), e4.url = so(e4.url, n3, o3, i4);
- }) : e3 === R2.MSG_VIDEO ? (t3.remoteVideoUrl = so(t3.remoteVideoUrl, n3, o3, i4), t3.videoUrl = so(t3.videoUrl, n3, o3, i4), t3.thumbUrl = so(t3.thumbUrl, n3, o3, i4), t3.snapshotUrl = so(t3.thumbUrl, n3, o3, i4), t3.snapshotHeight = t3.thumbHeight, t3.snapshotWidth = t3.thumbWidth) : e3 === R2.MSG_AUDIO ? (t3.remoteAudioUrl = so(t3.remoteAudioUrl, n3, o3, i4), t3.url = so(t3.url, n3, o3, i4)) : e3 === R2.MSG_FILE && (t3.fileUrl = so(t3.fileUrl, n3, o3, i4)));
- } }]), Co = e2(function e3(t3, n3, o3, i4) {
- var s4, a3, r4, c3, u3, l3, d3;
- p3(this, e3), this.type = R2.MSG_MERGER, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, t3.downloadKey ? (a3 = t3.downloadKey, r4 = t3.pbDownloadKey, c3 = t3.title, u3 = t3.abstractList, l3 = t3.compatibleText, s4 = t3.version, this.content.downloadKey = a3, this.content.pbDownloadKey = r4, this.content.title = c3, this.content.abstractList = u3, this.content.compatibleText = l3, this.content.version = s4 || 0) : S2(t3.messageList) ? 1 === t3.layersOverLimit && (this.content.layersOverLimit = true) : (a3 = t3.messageList, r4 = t3.title, c3 = t3.abstractList, u3 = t3.compatibleText, l3 = t3.version, d3 = [], a3.forEach(function(e4) {
- S2(e4) || (e4 = new yo(e4, n3, o3, i4), d3.push(e4));
+ e4.imageUrl = co(e4.imageUrl, n3, o3, i4), e4.url = co(e4.url, n3, o3, i4);
+ }) : e3 === R2.MSG_VIDEO ? (t3.remoteVideoUrl = co(t3.remoteVideoUrl, n3, o3, i4), t3.videoUrl = co(t3.videoUrl, n3, o3, i4), t3.thumbUrl = co(t3.thumbUrl, n3, o3, i4), t3.snapshotUrl = co(t3.thumbUrl, n3, o3, i4), t3.snapshotHeight = t3.thumbHeight, t3.snapshotWidth = t3.thumbWidth) : e3 === R2.MSG_AUDIO ? (t3.remoteAudioUrl = co(t3.remoteAudioUrl, n3, o3, i4), t3.url = co(t3.url, n3, o3, i4)) : e3 === R2.MSG_FILE && (t3.fileUrl = co(t3.fileUrl, n3, o3, i4)));
+ } }]), Eo = e2(function e3(t3, n3, o3, i4) {
+ var a3, s4, r4, c3, u3, l3, d3;
+ p3(this, e3), this.type = R2.MSG_MERGER, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, t3.downloadKey ? (s4 = t3.downloadKey, r4 = t3.pbDownloadKey, c3 = t3.title, u3 = t3.abstractList, l3 = t3.compatibleText, a3 = t3.version, this.content.downloadKey = s4, this.content.pbDownloadKey = r4, this.content.title = c3, this.content.abstractList = u3, this.content.compatibleText = l3, this.content.version = a3 || 0) : S2(t3.messageList) ? 1 === t3.layersOverLimit && (this.content.layersOverLimit = true) : (s4 = t3.messageList, r4 = t3.title, c3 = t3.abstractList, u3 = t3.compatibleText, l3 = t3.version, d3 = [], s4.forEach(function(e4) {
+ S2(e4) || (e4 = new Do(e4, n3, o3, i4), d3.push(e4));
}), this.content.messageList = d3, this.content.title = r4, this.content.abstractList = c3, this.content.compatibleText = u3, this.content.version = l3 || 0);
}, [{ key: "sendable", value: function() {
return !S2(this.content.messageList) || !S2(this.content.downloadKey);
- } }]), To = { 1: R2.MSG_PRIORITY_HIGH, 2: R2.MSG_PRIORITY_NORMAL, 3: R2.MSG_PRIORITY_LOW, 4: R2.MSG_PRIORITY_LOWEST }, Do = e2(function e3(t3) {
- p3(this, e3), this.ID = "", this.conversationID = t3.conversationID || null, this.conversationType = t3.conversationType || R2.CONV_C2C, this.conversationSubType = t3.conversationSubType, this.time = t3.time || Math.ceil(Date.now() / 1e3), this.sequence = t3.sequence || 0, this.clientSequence = t3.clientSequence || t3.sequence || 0, this.random = t3.random || 0 === t3.random ? t3.random : ht2(), this.priority = this._computePriority(t3.priority), this.nick = t3.nick || "", this.avatar = t3.avatar || "", this.isPeerRead = false, this.nameCard = "", this.hasRiskContent = nn(t3.checkResult), this._elements = [], this.isPlaceMessage = t3.isPlaceMessage || 0, this.isRevoked = 2 === t3.isPlaceMessage || 8 === t3.msgFlagBits, this.from = t3.from || null, this.to = t3.to || null, this.flow = "", this.isSystemMessage = t3.isSystemMessage || false, this.protocol = t3.protocol || "JSON", this.isResend = false, this.isRead = false, this.status = t3.status || On, this._onlineOnlyFlag = false, this._groupAtInfoList = [], this._relayFlag = false, this.atUserList = [], this.cloudCustomData = t3.cloudCustomData || "", this.isDeleted = false, this.isModified = !!t3.messageVersion, this._isExcludedFromUnreadCount = !(!t3.messageControlInfo || 1 !== t3.messageControlInfo.excludedFromUnreadCount), this._isExcludedFromLastMessage = !(!t3.messageControlInfo || 1 !== t3.messageControlInfo.excludedFromLastMessage), this.clientTime = t3.clientTime || xe2() || 0, this.senderTinyID = t3.senderTinyID || t3.tinyID || "", this.readReceiptInfo = t3.readReceiptInfo || { readCount: void 0, unreadCount: void 0, isPeerRead: void 0, timestamp: 0 }, this.needReadReceipt = true === t3.needReadReceipt || 1 === t3.needReadReceipt, this.version = t3.messageVersion || 0, this.isBroadcastMessage = t3.isBroadcastMessage || false, this._receiverList = t3.receiverList || void 0, this.isSupportExtension = true === t3.isSupportExtension || 1 === t3.isSupportExtension, this._cmConfigID = t3.customModerationConfigurationID, this.revoker = t3.revokerInfo && t3.revokerInfo.revoker || "", this.revokerInfo = t3.revokerInfo || { userID: "", nick: "", avatar: "" }, this.revokeReason = t3.revokeReason || "", this.reInitialize(t3.currentUser), this.extractGroupInfo(t3.groupProfile || null), this.handleGroupAtInfo(t3), this.initC2CReadReceiptInfo(t3);
+ } }]), Lo = { 1: R2.MSG_PRIORITY_HIGH, 2: R2.MSG_PRIORITY_NORMAL, 3: R2.MSG_PRIORITY_LOW, 4: R2.MSG_PRIORITY_LOWEST }, So = e2(function e3(t3) {
+ p3(this, e3), this.ID = "", this.conversationID = t3.conversationID || null, this.conversationType = t3.conversationType || R2.CONV_C2C, this.conversationSubType = t3.conversationSubType, this.time = t3.time || Math.ceil(Date.now() / 1e3), this.sequence = t3.sequence || 0, this.clientSequence = t3.clientSequence || t3.sequence || 0, this.random = t3.random || 0 === t3.random ? t3.random : mt2(), this.priority = this._computePriority(t3.priority), this.nick = t3.nick || "", this.avatar = t3.avatar || "", this.isPeerRead = false, this.nameCard = "", this.hasRiskContent = sn(t3.checkResult), this._elements = [], this.isPlaceMessage = t3.isPlaceMessage || 0, this.isRevoked = 2 === t3.isPlaceMessage || 8 === t3.msgFlagBits, this.from = t3.from || null, this.to = t3.to || null, this.flow = "", this.isSystemMessage = t3.isSystemMessage || false, this.protocol = t3.protocol || "JSON", this.isResend = false, this.isRead = false, this.status = t3.status || Pn, this._onlineOnlyFlag = false, this._groupAtInfoList = [], this._relayFlag = false, this.atUserList = [], this.cloudCustomData = t3.cloudCustomData || "", this.isDeleted = false, this.isModified = !!t3.messageVersion, this._isExcludedFromUnreadCount = !(!t3.messageControlInfo || 1 !== t3.messageControlInfo.excludedFromUnreadCount), this._isExcludedFromLastMessage = !(!t3.messageControlInfo || 1 !== t3.messageControlInfo.excludedFromLastMessage), this.clientTime = t3.clientTime || He2() || 0, this.senderTinyID = t3.senderTinyID || t3.tinyID || "", this.readReceiptInfo = t3.readReceiptInfo || { readCount: void 0, unreadCount: void 0, isPeerRead: void 0, timestamp: 0 }, this.needReadReceipt = true === t3.needReadReceipt || 1 === t3.needReadReceipt, this.version = t3.messageVersion || 0, this.isBroadcastMessage = t3.isBroadcastMessage || false, this._receiverList = t3.receiverList || void 0, this.isSupportExtension = true === t3.isSupportExtension || 1 === t3.isSupportExtension, this._cmConfigID = t3.customModerationConfigurationID, this.revoker = t3.revokerInfo && t3.revokerInfo.revoker || "", this.revokerInfo = t3.revokerInfo || { userID: "", nick: "", avatar: "" }, this.revokeReason = t3.revokeReason || "", this.reInitialize(t3.currentUser), this.extractGroupInfo(t3.groupProfile || null), this.handleGroupAtInfo(t3), this.initC2CReadReceiptInfo(t3);
}, [{ key: "elements", get: function() {
return this._elements;
} }, { key: "getElements", value: function() {
@@ -10293,14 +10293,14 @@ var chat = { exports: {} };
} }, { key: "_initProxy", value: function() {
this._elements[0] && (this.payload = this._elements[0].content, this.type = this._elements[0].type);
} }, { key: "reInitialize", value: function(e3) {
- e3 && (this.status = this.from ? On : An, !this.from) && (this.from = e3), this._initFlow(e3), this._initSequence(e3), this._concatConversationID(e3), this.generateMessageID();
+ e3 && (this.status = this.from ? Pn : Gn, !this.from) && (this.from = e3), this._initFlow(e3), this._initSequence(e3), this._concatConversationID(e3), this.generateMessageID();
} }, { key: "isSendable", value: function() {
return 0 !== this._elements.length && (true === this._relayFlag || "function" == typeof this._elements[0].sendable && this._elements[0].sendable());
} }, { key: "_initTo", value: function(e3) {
this.conversationType === R2.CONV_GROUP && (this.to = e3.groupID);
} }, { key: "_initSequence", value: function(e3) {
var t3, n3, o3;
- 0 === this.clientSequence && e3 && (this.clientSequence = !!(e3 = e3) && (void 0 === Et2[e3] && (o3 = /* @__PURE__ */ new Date(), t3 = "3".concat(o3.getHours()).slice(-2), n3 = "0".concat(o3.getMinutes()).slice(-2), o3 = "0".concat(o3.getSeconds()).slice(-2), Et2[e3] = parseInt([t3, n3, o3, "0001"].join("")), o3 = n3 = t3 = null, M2.l("autoIncrementIndex start index:".concat(Et2[e3]))), Et2[e3]++)), 0 === this.sequence && this.conversationType === R2.CONV_C2C && (this.sequence = this.clientSequence);
+ 0 === this.clientSequence && e3 && (this.clientSequence = !!(e3 = e3) && (void 0 === kt2[e3] && (o3 = /* @__PURE__ */ new Date(), t3 = "3".concat(o3.getHours()).slice(-2), n3 = "0".concat(o3.getMinutes()).slice(-2), o3 = "0".concat(o3.getSeconds()).slice(-2), kt2[e3] = parseInt([t3, n3, o3, "0001"].join("")), o3 = n3 = t3 = null, M2.l("autoIncrementIndex start index:".concat(kt2[e3]))), kt2[e3]++)), 0 === this.sequence && this.conversationType === R2.CONV_C2C && (this.sequence = this.clientSequence);
} }, { key: "generateMessageID", value: function() {
this.from === R2.CONV_SYSTEM && (this.senderTinyID = "144115198244471703"), this.ID = "".concat(this.senderTinyID, "-").concat(this.clientTime, "-").concat(this.random);
} }, { key: "_initFlow", value: function(e3) {
@@ -10309,13 +10309,13 @@ var chat = { exports: {} };
var t3 = this.to, n3 = this.conversationType;
n3 !== R2.CONV_SYSTEM ? (e3 = n3 === R2.CONV_C2C ? e3 === this.from ? t3 : this.from : this.to, this.conversationID = e3 ? "".concat(n3).concat(e3) : null) : this.conversationID = R2.CONV_SYSTEM;
} }, { key: "isElement", value: function(e3) {
- return e3 instanceof no || e3 instanceof uo || e3 instanceof lo || e3 instanceof po || e3 instanceof mo || e3 instanceof Io || e3 instanceof ho || e3 instanceof fo || e3 instanceof vo || e3 instanceof Mo || e3 instanceof Co;
+ return e3 instanceof ao || e3 instanceof _o || e3 instanceof ho || e3 instanceof go || e3 instanceof Mo || e3 instanceof Co || e3 instanceof mo || e3 instanceof Io || e3 instanceof yo || e3 instanceof To || e3 instanceof Eo;
} }, { key: "setElement", value: function(e3, t3, n3, o3) {
var i4 = this;
if (this.isElement(e3))
this._elements = [e3];
else {
- var s4 = function(e4) {
+ var a3 = function(e4) {
if (e4.type && e4.content)
switch (e4.type) {
case R2.MSG_TEXT:
@@ -10353,50 +10353,50 @@ var chat = { exports: {} };
}
};
if (O2(e3))
- for (var a3 = 0; a3 < e3.length; a3++)
- s4(e3[a3]);
+ for (var s4 = 0; s4 < e3.length; s4++)
+ a3(e3[s4]);
else
- s4(e3);
+ a3(e3);
}
this._initProxy();
} }, { key: "clearElement", value: function() {
this._elements.length = 0;
} }, { key: "setTextElement", value: function(e3) {
- e3 = "string" == typeof e3 ? e3 : e3.text, e3 = new no({ text: e3 });
+ e3 = "string" == typeof e3 ? e3 : e3.text, e3 = new ao({ text: e3 });
this._elements.push(e3);
} }, { key: "setImageElement", value: function(e3, t3, n3, o3) {
- e3 = new uo(e3, t3, n3, o3);
+ e3 = new _o(e3, t3, n3, o3);
this._elements.push(e3);
} }, { key: "setAudioElement", value: function(e3, t3, n3, o3) {
- e3 = new po(e3, t3, n3, o3);
+ e3 = new go(e3, t3, n3, o3);
this._elements.push(e3);
} }, { key: "setFileElement", value: function(e3, t3, n3, o3) {
- e3 = new mo(e3, t3, n3, o3);
+ e3 = new Mo(e3, t3, n3, o3);
this._elements.push(e3);
} }, { key: "setVideoElement", value: function(e3, t3, n3, o3) {
- e3 = new Io(e3, t3, n3, o3);
+ e3 = new Co(e3, t3, n3, o3);
this._elements.push(e3);
} }, { key: "setLocationElement", value: function(e3) {
- e3 = new Mo(e3);
+ e3 = new To(e3);
this._elements.push(e3);
} }, { key: "setCustomElement", value: function(e3) {
- e3 = new vo(e3);
+ e3 = new yo(e3);
this._elements.push(e3);
} }, { key: "setGroupTipElement", value: function(e3) {
var t3, n3 = {}, o3 = e3.operationType;
S2(e3.memberInfoList) ? e3.operatorInfo && (n3 = e3.operatorInfo) : o3 !== R2.GRP_TIP_MBR_JOIN && o3 !== R2.GRP_TIP_MBR_KICKED_OUT && o3 !== R2.GRP_TIP_MBR_SET_ADMIN && o3 !== R2.GRP_TIP_MBR_CANCELED_ADMIN || (n3 = e3.memberInfoList[0]), S2(e3.memberExtraInfo) || (t3 = e3.memberExtraInfo.reason, e3.msgMemberInfo.forEach(function(e4) {
e4.reason = t3;
}));
- o3 = n3.nick, n3 = n3.avatar, C2(o3) && (this.nick = o3), C2(n3) && (this.avatar = n3), o3 = new ho(e3);
+ o3 = n3.nick, n3 = n3.avatar, C2(o3) && (this.nick = o3), C2(n3) && (this.avatar = n3), o3 = new mo(e3);
this._elements.push(o3);
} }, { key: "setGroupSystemNoticeElement", value: function(e3) {
- e3 = new fo(e3);
+ e3 = new Io(e3);
this._elements.push(e3);
} }, { key: "setFaceElement", value: function(e3) {
- e3 = new lo(e3);
+ e3 = new ho(e3);
this._elements.push(e3);
} }, { key: "setMergerElement", value: function(e3, t3, n3, o3) {
- e3 = new Co(e3, t3, n3, o3);
+ e3 = new Eo(e3, t3, n3, o3);
this._elements.push(e3);
} }, { key: "setIsRead", value: function(e3) {
this.isRead = e3;
@@ -10404,12 +10404,12 @@ var chat = { exports: {} };
this._relayFlag = e3;
} }, { key: "_computePriority", value: function(e3) {
if (!N3(e3)) {
- if (C2(e3) && -1 !== Object.values(To).indexOf(e3))
+ if (C2(e3) && -1 !== Object.values(Lo).indexOf(e3))
return e3;
if (A2(e3)) {
e3 = "" + e3;
- if (-1 !== Object.keys(To).indexOf(e3))
- return To[e3];
+ if (-1 !== Object.keys(Lo).indexOf(e3))
+ return Lo[e3];
}
}
return R2.MSG_PRIORITY_NORMAL;
@@ -10421,45 +10421,52 @@ var chat = { exports: {} };
} }, { key: "initC2CReadReceiptInfo", value: function(e3) {
var t3 = e3.readReceiptSentByPeer, e3 = e3.timestamp, e3 = void 0 === e3 ? 0 : e3;
this.conversationType === R2.CONV_C2C && true === this.needReadReceipt && (this.readReceiptInfo.isPeerRead = 1 === (void 0 === t3 ? void 0 : t3), this.readReceiptInfo.timestamp = e3);
- } }]), Eo = ["sound", "FCMChannelID"];
- function Lo(e3) {
- if (m2(e3))
- return { pushFlag: true === e3.disablePush ? 1 : 0, title: e3.title || "", desc: e3.description || "", ext: e3.extension || "", apnsInfo: (n3 = void 0 === (n3 = (t3 = e3).apnsInfo) ? {} : n3, o3 = t3.ignoreIOSBadge, t3 = t3.disableVoipPush, o3 = true === n3.ignoreIOSBadge || true === (void 0 !== o3 && o3) ? 1 : 0, i4 = void 0, N3(t3) || (i4 = false === t3 ? 1 : 0), N3(n3.disableVoipPush) || (i4 = false === n3.disableVoipPush ? 1 : 0), y2(y2({}, n3), {}, { badgeMode: o3, isVoipPush: i4 })), androidInfo: (n3 = void 0 === (n3 = (t3 = e3).androidInfo) ? {} : n3, t3 = t3.androidOPPOChannelID, t3 = n3.OPPOChannelID || (void 0 === t3 ? "" : t3), o3 = void 0 === (o3 = n3.sound) ? "" : o3, i4 = void 0 === (i4 = n3.FCMChannelID) ? "" : i4, y2(y2({}, W2(n3, Eo)), {}, { Sound: -1 === (o3 = (n3 = o3).lastIndexOf(".")) ? n3 : n3.slice(0, o3), OPPOChannelID: t3, GoogleChannelID: i4 })) };
- var t3, n3, o3, i4;
+ } }]), ko = ["sound", "FCMChannelID"], Ro = ["ignoreIOSBadge", "disableVoipPush", "enableIOSBackgroundNotification"], Ao = { HonorImportance: { range: ["LOW", "NORMAL"], defaultValue: void 0 }, MeizuNotifyType: { range: [0, 1], defaultValue: void 0 } }, Oo = { enableIOSBackgroundNotification: { range: [true, false], defaultValue: false }, interruptionLevel: { range: ["passive", "active", "time-sensitive", "critical"], defaultValue: "active" } };
+ function No(e3, t3) {
+ for (var n3 in t3) {
+ var o3, i4;
+ Object.prototype.hasOwnProperty.call(t3, n3) && (o3 = (i4 = t3[n3]).range, i4 = i4.defaultValue, e3[n3] = o3.includes(e3[n3]) ? e3[n3] : i4);
+ }
+ return e3;
}
- t2(Ro, c2);
- var So = e2(Ro, [{ key: "onNewMessage", value: function(e3) {
- var t3 = e3.dataList, n3 = e3.isInstantMessage, o3 = e3.C2CRemainingUnreadList, i4 = e3.C2CPairUnreadList, e3 = e3.isSyncingEnded, t3 = (n3 || M2.l("".concat(this._n, ".onNewMessage C2CPairUnreadList:"), i4, "C2CRemainingUnreadList:", o3), this._assembly({ dataList: t3, C2CRemainingUnreadList: o3, C2CPairUnreadList: i4, isInstantMessage: n3 })), o3 = t3.conversationOptionsList, i4 = t3.messageList, t3 = t3.isUnreadC2CMessage, s4 = St2(i4), s4 = (0 < s4.length && this.emitOEvt(h2.MESSAGE_MODIFIED, s4), this.get(11).onNewMessage({ conversationOptionsList: o3, isInstantMessage: n3, isUnreadC2CMessage: t3, isSyncingEnded: e3 }), Rt2(i4));
- n3 && 0 < s4.length && this.emitOEvt(h2.MESSAGE_RECEIVED, s4), i4.length = 0;
+ function Go(e3) {
+ if (m2(e3))
+ return { pushFlag: true === e3.disablePush ? 1 : 0, title: e3.title || "", desc: e3.description || "", ext: e3.extension || "", apnsInfo: (n3 = (t3 = e3).apnsInfo, o3 = void 0 !== (o3 = t3.ignoreIOSBadge) && o3, t3 = t3.disableVoipPush, i4 = (n3 = No(void 0 === n3 ? {} : n3, Oo)).ignoreIOSBadge, a3 = n3.disableVoipPush, s4 = n3.enableIOSBackgroundNotification, n3 = W2(n3, Ro), i4 = true === i4 || true === o3 ? 1 : 0, o3 = void 0, N3(t3) || (o3 = false === t3 ? 1 : 0), N3(a3) || (o3 = false === a3 ? 1 : 0), y2(y2({}, n3), {}, { badgeMode: i4, isVoipPush: o3, contentAvailable: s4 ? 1 : 0 })), androidInfo: (a3 = void 0 === (a3 = (t3 = e3).androidInfo) ? {} : a3, t3 = t3.androidOPPOChannelID, t3 = a3.OPPOChannelID || (void 0 === t3 ? "" : t3), a3 = No(a3, Ao), n3 = void 0 === (n3 = a3.sound) ? "" : n3, i4 = void 0 === (i4 = a3.FCMChannelID) ? "" : i4, y2(y2({}, W2(a3, ko)), {}, { Sound: -1 === (n3 = (a3 = n3).lastIndexOf(".")) ? a3 : a3.slice(0, n3), OPPOChannelID: t3, GoogleChannelID: i4 })) };
+ var t3, n3, o3, i4, a3, s4;
+ }
+ t2(bo, c2);
+ var Po = e2(bo, [{ key: "onNewMessage", value: function(e3) {
+ var t3 = e3.dataList, n3 = e3.isInstantMessage, o3 = e3.C2CRemainingUnreadList, i4 = e3.C2CPairUnreadList, e3 = e3.isSyncingEnded, t3 = (n3 || M2.l("".concat(this._n, ".onNewMessage C2CPairUnreadList:"), i4, "C2CRemainingUnreadList:", o3), this._assembly({ dataList: t3, C2CRemainingUnreadList: o3, C2CPairUnreadList: i4, isInstantMessage: n3 })), o3 = t3.conversationOptionsList, i4 = t3.messageList, t3 = t3.isUnreadC2CMessage, a3 = At2(i4), a3 = (0 < a3.length && this.emitOEvt(h2.MESSAGE_MODIFIED, a3), this.get(11).onNewMessage({ conversationOptionsList: o3, isInstantMessage: n3, isUnreadC2CMessage: t3, isSyncingEnded: e3 }), Nt2(i4));
+ n3 && 0 < a3.length && this.emitOEvt(h2.MESSAGE_RECEIVED, a3), i4.length = 0;
} }, { key: "_assembly", value: function(e3) {
- for (var t3 = e3.dataList, n3 = e3.C2CRemainingUnreadList, o3 = e3.C2CPairUnreadList, i4 = e3.isInstantMessage, s4 = null, a3 = [], r4 = [], c3 = {}, u3 = this.get(26), l3 = false, d3 = this.get(11), p4 = this.get(4), e3 = this.get(17), _3 = this.getFileDownloadProxy(), h3 = this.getDownloadFileAuthKey(), g3 = e3.getFileDNList(), f3 = 0, m3 = t3.length; f3 < m3; f3++)
+ for (var t3 = e3.dataList, n3 = e3.C2CRemainingUnreadList, o3 = e3.C2CPairUnreadList, i4 = e3.isInstantMessage, a3 = null, s4 = [], r4 = [], c3 = {}, u3 = this.get(26), l3 = false, d3 = this.get(11), p4 = this.get(4), e3 = this.get(17), _3 = this.getFileDownloadProxy(), h3 = this.getDownloadFileAuthKey(), g3 = e3.getFileDNList(), f3 = 0, m3 = t3.length; f3 < m3; f3++)
if (this._isC2CNotice(t3[f3]))
this._noticeFromUnreadDBList.push(t3[f3].eventArray[0].c2CNotifyMsgArray[0]);
else {
- var v4 = t3[f3], I3 = (v4.currentUser = this.getMyUserID(), v4.conversationType = R2.CONV_C2C, v4.isSystemMessage = !!v4.isSystemMessage, (N3(v4.nick) || N3(v4.avatar)) && (l3 = true), (s4 = new Do(v4)).setElement(v4.elements, _3, h3, g3), s4.setNickAndAvatar({ nick: v4.nick, avatar: v4.avatar }), s4.conversationID);
+ var v4 = t3[f3], I3 = (v4.currentUser = this.getMyUserID(), v4.conversationType = R2.CONV_C2C, v4.isSystemMessage = !!v4.isSystemMessage, (N3(v4.nick) || N3(v4.avatar)) && (l3 = true), (a3 = new So(v4)).setElement(v4.elements, _3, h3, g3), a3.setNickAndAvatar({ nick: v4.nick, avatar: v4.avatar }), a3.conversationID);
if (i4) {
- if (this._msgFromUnreadDBMap.get(s4.ID))
+ if (this._msgFromUnreadDBMap.get(a3.ID))
continue;
- var M3, y3, C3 = false, T3 = (s4.from !== this.getMyUserID() ? (y3 = d3.getLatestMessageSentByPeer(I3)) && (M3 = y3.nick, y3 = y3.avatar, l3 ? s4.setNickAndAvatar({ nick: M3, avatar: y3 }) : M3 === s4.nick && y3 === s4.avatar || (C3 = true)) : (M3 = d3.getLatestMessageSentByMe(I3)) && (y3 = M3.nick, T3 = M3.avatar, y3 === s4.nick && T3 === s4.avatar || (d3.modifyMessageSentByMe({ conversationID: I3, latestNick: s4.nick, latestAvatar: s4.avatar }), p4.mockOnNickAvatarModified(s4.nick, s4.avatar))), 1 === t3[f3].isModified);
- if (d3.isMessageSentByCurrentInstance(s4) ? s4.isModified = T3 : T3 = false, 0 === v4.msgLifeTime)
- s4._onlineOnlyFlag = true, d3.isMessageSentByCurrentInstance(s4) || r4.push(s4);
+ var M3, y3, C3 = false, T3 = (a3.from !== this.getMyUserID() ? (y3 = d3.getLatestMessageSentByPeer(I3)) && (M3 = y3.nick, y3 = y3.avatar, l3 ? a3.setNickAndAvatar({ nick: M3, avatar: y3 }) : M3 === a3.nick && y3 === a3.avatar || (C3 = true)) : (M3 = d3.getLatestMessageSentByMe(I3)) && (y3 = M3.nick, T3 = M3.avatar, y3 === a3.nick && T3 === a3.avatar || (d3.modifyMessageSentByMe({ conversationID: I3, latestNick: a3.nick, latestAvatar: a3.avatar }), p4.mockOnNickAvatarModified(a3.nick, a3.avatar))), 1 === t3[f3].isModified);
+ if (d3.isMessageSentByCurrentInstance(a3) ? a3.isModified = T3 : T3 = false, 0 === v4.msgLifeTime)
+ a3._onlineOnlyFlag = true, d3.isMessageSentByCurrentInstance(a3) || r4.push(a3);
else {
- if (!d3.pushIntoMessageList(r4, s4, T3))
+ if (!d3.pushIntoMessageList(r4, a3, T3))
continue;
- C3 && (d3.modifyMessageSentByPeer({ conversationID: I3, latestNick: s4.nick, latestAvatar: s4.avatar }), d3.updateUserProfileSpecifiedKey({ conversationID: I3, nick: s4.nick, avatar: s4.avatar }));
+ C3 && (d3.modifyMessageSentByPeer({ conversationID: I3, latestNick: a3.nick, latestAvatar: a3.avatar }), d3.updateUserProfileSpecifiedKey({ conversationID: I3, nick: a3.nick, avatar: a3.avatar }));
}
- i4 && 0 < s4.clientTime && u3.addMessageDelay(s4.clientTime);
+ i4 && 0 < a3.clientTime && u3.addMessageDelay(a3.clientTime);
} else
- this._msgFromUnreadDBMap.set(s4.ID, s4);
+ this._msgFromUnreadDBMap.set(a3.ID, a3);
if (0 !== v4.msgLifeTime) {
- if (false === s4._onlineOnlyFlag) {
+ if (false === a3._onlineOnlyFlag) {
C3 = d3.getLastMessageTime(I3);
- if (A2(C3) && s4.time < C3)
+ if (A2(C3) && a3.time < C3)
continue;
- i4 && (N3(c3[I3]) ? (v4 = 0, "in" !== s4.flow || s4._isExcludedFromUnreadCount || (v4 = 1), c3[I3] = a3.push({ conversationID: I3, unreadCount: v4, type: s4.conversationType, subType: s4.conversationSubType, lastMessage: s4._isExcludedFromLastMessage ? "" : s4 }) - 1) : (v4 = c3[I3], a3[v4].type = s4.conversationType, a3[v4].subType = s4.conversationSubType, a3[v4].lastMessage = s4._isExcludedFromLastMessage ? "" : s4, "in" !== s4.flow || s4._isExcludedFromUnreadCount || a3[v4].unreadCount++));
+ i4 && (N3(c3[I3]) ? (v4 = 0, "in" !== a3.flow || a3._isExcludedFromUnreadCount || (v4 = 1), c3[I3] = s4.push({ conversationID: I3, unreadCount: v4, type: a3.conversationType, subType: a3.conversationSubType, lastMessage: a3._isExcludedFromLastMessage ? "" : a3 }) - 1) : (v4 = c3[I3], s4[v4].type = a3.conversationType, s4[v4].subType = a3.conversationSubType, s4[v4].lastMessage = a3._isExcludedFromLastMessage ? "" : a3, "in" !== a3.flow || a3._isExcludedFromUnreadCount || s4[v4].unreadCount++));
}
} else
- s4._onlineOnlyFlag = true;
+ a3._onlineOnlyFlag = true;
}
this._handleNoticeFromUnreadDB();
var D3 = false;
@@ -10469,19 +10476,19 @@ var chat = { exports: {} };
if (o3[t4].from === R2.CONV_SYSTEM)
return;
D3 = true;
- var e4 = a3.find(function(e5) {
+ var e4 = s4.find(function(e5) {
return e5.conversationID === "".concat(R2.CONV_C2C).concat(o3[t4].from);
});
- e4 ? e4.unreadCount = o3[t4].unreadCount : a3.push({ conversationID: "".concat(R2.CONV_C2C).concat(o3[t4].from), unreadCount: o3[t4].unreadCount, type: R2.CONV_C2C });
+ e4 ? e4.unreadCount = o3[t4].unreadCount : s4.push({ conversationID: "".concat(R2.CONV_C2C).concat(o3[t4].from), unreadCount: o3[t4].unreadCount, type: R2.CONV_C2C });
}(E3);
if (O2(n3))
for (var S3 = 0, k3 = n3.length; S3 < k3; S3++)
!function(t4) {
- a3.find(function(e4) {
+ s4.find(function(e4) {
return e4.conversationID === "".concat(R2.CONV_C2C).concat(n3[t4].from);
- }) || a3.push({ conversationID: "".concat(R2.CONV_C2C).concat(n3[t4].from), type: R2.CONV_C2C, lastMsgTime: n3[t4].lastMsgTime });
+ }) || s4.push({ conversationID: "".concat(R2.CONV_C2C).concat(n3[t4].from), type: R2.CONV_C2C, lastMsgTime: n3[t4].lastMsgTime });
}(S3);
- return { conversationOptionsList: a3, messageList: r4, isUnreadC2CMessage: D3 };
+ return { conversationOptionsList: s4, messageList: r4, isUnreadC2CMessage: D3 };
} }, { key: "getMessageListFromUnreadDB", value: function() {
return d2(this._msgFromUnreadDBMap.values());
} }, { key: "_isC2CNotice", value: function(e3) {
@@ -10493,16 +10500,16 @@ var chat = { exports: {} };
e4.hasOwnProperty("c2cMessageRevokedNotify") && t3.push(e4);
}), this.onMsgRevoked({ dataList: t3 }), this._noticeFromUnreadDBList.length = 0, t3.length = 0);
} }, { key: "onMsgRevoked", value: function(e3, t3) {
- var s4, a3 = this, r4 = this.get(11), c3 = [];
+ var a3, s4 = this, r4 = this.get(11), c3 = [];
e3.dataList.forEach(function(e4) {
e4.c2cMessageRevokedNotify && (e4 = e4.c2cMessageRevokedNotify.revokedInfos, N3(e4) || e4.forEach(function(e5) {
- var t4 = a3.getMyUserID() === e5.from ? "".concat(R2.CONV_C2C).concat(e5.to) : "".concat(R2.CONV_C2C).concat(e5.from);
- s4 = r4.revoke(t4, e5.sequence, e5.random);
+ var t4 = s4.getMyUserID() === e5.from ? "".concat(R2.CONV_C2C).concat(e5.to) : "".concat(R2.CONV_C2C).concat(e5.from);
+ a3 = r4.revoke(t4, e5.sequence, e5.random);
var n3, o3 = e5.revokerInfo && e5.revokerInfo.revoker, i4 = e5.revokerInfo && e5.revokerInfo.reason || "";
- s4 ? n3 = s4 : (n3 = { conversationID: t4, sequence: e5.sequence }, e5.tinyID && e5.clientTime && e5.random && (n3.ID = "".concat(e5.tinyID, "-").concat(e5.clientTime, "-").concat(e5.random)), e5.time && (n3.time = e5.time)), n3 && (n3.revoker = o3, n3.revokeReason = i4, n3.revokerInfo = { userID: o3, nick: "", avatar: "" }, c3.push(n3));
+ a3 ? n3 = a3 : (n3 = { conversationID: t4, sequence: e5.sequence }, e5.tinyID && e5.clientTime && e5.random && (n3.ID = "".concat(e5.tinyID, "-").concat(e5.clientTime, "-").concat(e5.random)), e5.time && (n3.time = e5.time)), n3 && (n3.revoker = o3, n3.revokeReason = i4, n3.revokerInfo = { userID: o3, nick: "", avatar: "" }, c3.push(n3));
}));
}), 0 !== c3.length && (M2.l("".concat(this._n, ".onMsgRevoked count:").concat(c3.length, " updateUnreadCount:").concat(t3)), r4.onMessageRevoked(c3, t3), r4.updateRevokerInfo(c3).then(function(e4) {
- a3.emitOEvt(h2.MESSAGE_REVOKED, e4);
+ s4.emitOEvt(h2.MESSAGE_REVOKED, e4);
}));
} }, { key: "onMsgReadReceipt", value: function(e3) {
var i4 = this;
@@ -10534,8 +10541,8 @@ var chat = { exports: {} };
e3 = this._createC2CMessagePack(e3, t3);
return this.req(e3);
} }, { key: "_createC2CMessagePack", value: function(e3, t3) {
- var n3 = null, o3 = (t3 && (t3.offlinePushInfo && (n3 = t3.offlinePushInfo), true === t3.onlineUserOnly) && (n3 ? n3.disablePush = true : n3 = { disablePush: true }), ""), i4 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (o3 = e3.cloudCustomData), []), s4 = (m2(t3) && m2(t3.messageControlInfo) && (s4 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, a3 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === s4 && i4.push("NoUnread"), true === a3 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), this.isOnlineMessage(e3, t3) ? 0 : void 0), a3 = JSON.parse(JSON.stringify(e3.getElements())), r4 = this.get(17).getFileDNList();
- return { P: G2.SEND_C2C_MSG, data: { fromAccount: this.getMyUserID(), toAccount: e3.to, msgBody: ao(e3.type, a3, r4), cloudCustomData: o3, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: s4, nick: e3.nick, avatar: e3.avatar, offlinePushInfo: Lo(n3), messageControlInfo: 0 !== s4 ? i4 : void 0, clientTime: e3.clientTime, needReadReceipt: true === e3.needReadReceipt ? 1 : 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0, cmConfigID: e3._cmConfigID, forbidCallbackControl: kt2(t3) } };
+ var n3 = null, o3 = (t3 && (t3.offlinePushInfo && (n3 = t3.offlinePushInfo), true === t3.onlineUserOnly) && (n3 ? n3.disablePush = true : n3 = { disablePush: true }), ""), i4 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (o3 = e3.cloudCustomData), []), a3 = (m2(t3) && m2(t3.messageControlInfo) && (a3 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, s4 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === a3 && i4.push("NoUnread"), true === s4 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), this.isOnlineMessage(e3, t3) ? 0 : void 0), s4 = JSON.parse(JSON.stringify(e3.getElements())), r4 = this.get(17).getFileDNList();
+ return { P: G2.SEND_C2C_MSG, data: { fromAccount: this.getMyUserID(), toAccount: e3.to, msgBody: uo(e3.type, s4, r4), cloudCustomData: o3, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: a3, nick: e3.nick, avatar: e3.avatar, offlinePushInfo: Go(n3), messageControlInfo: 0 !== a3 ? i4 : void 0, clientTime: e3.clientTime, needReadReceipt: true === e3.needReadReceipt ? 1 : 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0, cmConfigID: e3._cmConfigID, forbidCallbackControl: Ot2(t3) } };
} }, { key: "isOnlineMessage", value: function(e3, t3) {
return !(!t3 || true !== t3.onlineUserOnly);
} }, { key: "revokeMessage", value: function(e3) {
@@ -10544,36 +10551,36 @@ var chat = { exports: {} };
var t3 = e3.to, e3 = e3.keyList;
return M2.l("".concat(this._n, ".deleteMessage toAccount:").concat(t3, " count:").concat(e3.length)), this.req({ P: G2.DEL_C2C_MSG, data: { fromAccount: this.getMyUserID(), to: t3, keyList: e3 } });
} }, { key: "modifyRemoteMessage", value: function(e3) {
- var t3 = e3.from, n3 = e3.to, o3 = e3.version, o3 = void 0 === o3 ? 0 : o3, i4 = e3.sequence, s4 = e3.random, a3 = e3.time, r4 = e3.payload, c3 = e3.type, u3 = e3.cloudCustomData, e3 = e3._elements, l3 = void 0;
- return zt(c3) && (1 < e3.length && e3.splice(0, 1, { type: c3, content: r4 }), l3 = e3), this.req({ P: G2.MODIFY_C2C_MSG, data: { from: t3, to: n3, version: o3, sequence: i4, random: s4, time: a3, elements: l3, cloudCustomData: u3 } });
+ var t3 = e3.from, n3 = e3.to, o3 = e3.version, o3 = void 0 === o3 ? 0 : o3, i4 = e3.sequence, a3 = e3.random, s4 = e3.time, r4 = e3.payload, c3 = e3.type, u3 = e3.cloudCustomData, e3 = e3._elements, l3 = void 0;
+ return Qt2(c3) && (1 < e3.length && e3.splice(0, 1, { type: c3, content: r4 }), l3 = e3), this.req({ P: G2.MODIFY_C2C_MSG, data: { from: t3, to: n3, version: o3, sequence: i4, random: a3, time: s4, elements: l3, cloudCustomData: u3 } });
} }, { key: "setMessageRead", value: function(e3) {
- var t3 = this, n3 = e3.conversationID, o3 = e3.lastMessageTime, i4 = "".concat(this._n, ".").concat("setMessageRead"), e3 = "convID:".concat(n3, " lastMessageTime:").concat(o3), s4 = (M2.l("".concat(i4, " ").concat(e3)), A2(o3) || this.warn("DoNotModifyLastTime"), new P2("setMessageRead"));
- return s4.setMessage(e3), this.req({ P: G2.SET_C2C_MSG_READ, data: { C2CMsgReaded: { cookie: "", C2CMsgReadedItem: [{ toAccount: n3.replace("C2C", ""), lastMessageTime: o3, receipt: 1 }] } } }).then(function() {
- s4.end(), M2.l("".concat(i4, " ok"));
+ var t3 = this, n3 = e3.conversationID, o3 = e3.lastMessageTime, i4 = "".concat(this._n, ".").concat("setMessageRead"), e3 = "convID:".concat(n3, " lastMessageTime:").concat(o3), a3 = (M2.l("".concat(i4, " ").concat(e3)), A2(o3) || this.warn("DoNotModifyLastTime"), new P2("setMessageRead"));
+ return a3.setMessage(e3), this.req({ P: G2.SET_C2C_MSG_READ, data: { C2CMsgReaded: { cookie: "", C2CMsgReadedItem: [{ toAccount: n3.replace("C2C", ""), lastMessageTime: o3, receipt: 1 }] } } }).then(function() {
+ a3.end(), M2.l("".concat(i4, " ok"));
var e4 = t3.get(11);
return e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageTime: o3 }), e4.updateUnreadCount(n3), T2();
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.l("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.l("".concat(i4, " failed. error:"), e4), E2(e4);
});
} }, { key: "getRoamingMessage", value: function(e3) {
- var a3 = this, r4 = "".concat(this._n, ".").concat("getRoamingMessage"), t3 = e3.peerAccount, c3 = e3.conversationID, n3 = e3.count, o3 = e3.lastMessageTime, e3 = e3.messageKey, u3 = "peerAccount:".concat(t3, " count:").concat(n3 || 15, " lastMessageTime:").concat(o3 || 0, " messageKey:").concat(e3), l3 = (M2.l("".concat(r4, " ").concat(u3)), new P2("getRoamingMessage"));
+ var s4 = this, r4 = "".concat(this._n, ".").concat("getRoamingMessage"), t3 = e3.peerAccount, c3 = e3.conversationID, n3 = e3.count, o3 = e3.lastMessageTime, e3 = e3.messageKey, u3 = "peerAccount:".concat(t3, " count:").concat(n3 || 15, " lastMessageTime:").concat(o3 || 0, " messageKey:").concat(e3), l3 = (M2.l("".concat(r4, " ").concat(u3)), new P2("getRoamingMessage"));
return this.req({ P: G2.GET_C2C_ROAMING_MSG, data: { peerAccount: t3, count: n3 || 15, lastMessageTime: o3 || 0, messageKey: e3 } }).then(function(e4) {
- var e4 = e4.data, t4 = e4.complete, n4 = e4.messageList, o4 = e4.messageKey, e4 = e4.lastMessageTime, i4 = (N3(n4) ? M2.l("".concat(r4, " ok. complete:").concat(t4, " but messageList is undefined!")) : M2.l("".concat(r4, " ok. complete:").concat(t4, " count:").concat(n4.length)), l3.setMessage("".concat(u3, " complete:").concat(t4, " length:").concat(n4.length)).end(), a3.get(11)), t4 = 1 === t4, s4 = (t4 && i4.setCompleted(c3), []), n4 = i4.onRoamingMessage(n4, c3, true, s4), o4 = (i4.modifyMessageList(c3), i4.updateIsRead(c3), i4.updateRoamingMsgKeyAndTime(c3, o4, e4), i4.getPeerReadTime(c3)), o4 = (M2.l("".concat(r4, " update isPeerRead property. convID:").concat(c3, " peerReadTime:").concat(o4)), o4 ? i4.updateMsgIsPeerReadProp(c3, o4) : (e4 = c3.replace(R2.CONV_C2C, ""), a3.getRemotePeerReadTime([e4]).then(function() {
+ var e4 = e4.data, t4 = e4.complete, n4 = e4.messageList, o4 = e4.messageKey, e4 = e4.lastMessageTime, i4 = (N3(n4) ? M2.l("".concat(r4, " ok. complete:").concat(t4, " but messageList is undefined!")) : M2.l("".concat(r4, " ok. complete:").concat(t4, " count:").concat(n4.length)), l3.setMessage("".concat(u3, " complete:").concat(t4, " length:").concat(n4.length)).end(), s4.get(11)), t4 = 1 === t4, a3 = (t4 && i4.setCompleted(c3), []), n4 = i4.onRoamingMessage(n4, c3, true, a3), o4 = (i4.modifyMessageList(c3), i4.updateIsRead(c3), i4.updateRoamingMsgKeyAndTime(c3, o4, e4), i4.getPeerReadTime(c3)), o4 = (M2.l("".concat(r4, " update isPeerRead property. convID:").concat(c3, " peerReadTime:").concat(o4)), o4 ? i4.updateMsgIsPeerReadProp(c3, o4) : (e4 = c3.replace(R2.CONV_C2C, ""), s4.getRemotePeerReadTime([e4]).then(function() {
i4.updateMsgIsPeerReadProp(c3, i4.getPeerReadTime(c3));
})), "");
- return 0 < n4.length ? o4 = n4[0].ID : (e4 = i4.getLocalOldestMessage(c3)) && (o4 = e4.ID), M2.l("".concat(r4, " nextReqID:").concat(o4, " storedMsgCount:").concat(n4.length)), { nextReqID: o4, storedMessageList: n4, assembledMessageList: s4, isPullingCompleted: t4 };
+ return 0 < n4.length ? o4 = n4[0].ID : (e4 = i4.getLocalOldestMessage(c3)) && (o4 = e4.ID), M2.l("".concat(r4, " nextReqID:").concat(o4, " storedMsgCount:").concat(n4.length)), { nextReqID: o4, storedMessageList: n4, assembledMessageList: a3, isPullingCompleted: t4 };
}).catch(function(e4) {
return l3.setMessage(u3).setError(e4).end(), M2.w("".concat(r4, " failed. error:"), e4), E2(e4);
});
} }, { key: "getRoamingMessagesHopping", value: function(e3) {
- var s4 = this, a3 = "".concat(this._n, ".").concat("getRoamingMessagesHopping"), t3 = e3.peerAccount, n3 = e3.time, n3 = void 0 === n3 ? 0 : n3, o3 = e3.count, r4 = e3.direction, c3 = "".concat(R2.CONV_C2C).concat(t3), u3 = "peerAccount:".concat(t3, " count:").concat(o3, " time:").concat(n3, " direction:").concat(r4), l3 = (M2.l("".concat(a3, " ").concat(u3)), new P2("getRoamingMessagesHopping"));
+ var a3 = this, s4 = "".concat(this._n, ".").concat("getRoamingMessagesHopping"), t3 = e3.peerAccount, n3 = e3.time, n3 = void 0 === n3 ? 0 : n3, o3 = e3.count, r4 = e3.direction, c3 = "".concat(R2.CONV_C2C).concat(t3), u3 = "peerAccount:".concat(t3, " count:").concat(o3, " time:").concat(n3, " direction:").concat(r4), l3 = (M2.l("".concat(s4, " ").concat(u3)), new P2("getRoamingMessagesHopping"));
return this.req({ P: G2.GET_C2C_ROAMING_MSG, data: { peerAccount: t3, count: o3 + 1, lastMessageTime: n3, direction: r4 } }).then(function(e4) {
- var e4 = e4.data, t4 = e4.complete, n4 = e4.messageList, n4 = void 0 === n4 ? [] : n4, e4 = e4.lastMessageTime, o4 = "complete:".concat(t4, " count:").concat(n4.length), i4 = (M2.l("".concat(a3, " ok. ").concat(o4)), l3.setMessage("".concat(u3, " ").concat(o4)).end(), 1 !== t4 && (1 === r4 ? n4.pop() : n4.shift()), s4.get(11)), o4 = i4.onRoamingMessage(n4, c3, false), n4 = (s4._modifyMessageList(c3, o4), s4._computeResult({ complete: t4, lastMessageTime: e4, resultList: o4 })), t4 = (i4.storeHoppingMessageList(n4.messageList), i4.getPeerReadTime(c3));
- return M2.l("".concat(a3, " update isPeerRead property. convID:").concat(c3, " peerReadTime:").concat(t4)), t4 ? i4.updateMsgIsPeerReadProp(c3, t4) : (e4 = c3.replace(R2.CONV_C2C, ""), s4.getRemotePeerReadTime([e4]).then(function() {
+ var e4 = e4.data, t4 = e4.complete, n4 = e4.messageList, n4 = void 0 === n4 ? [] : n4, e4 = e4.lastMessageTime, o4 = "complete:".concat(t4, " count:").concat(n4.length), i4 = (M2.l("".concat(s4, " ok. ").concat(o4)), l3.setMessage("".concat(u3, " ").concat(o4)).end(), 1 !== t4 && (1 === r4 ? n4.pop() : n4.shift()), a3.get(11)), o4 = i4.onRoamingMessage(n4, c3, false), n4 = (a3._modifyMessageList(c3, o4), a3._computeResult({ complete: t4, lastMessageTime: e4, resultList: o4 })), t4 = (i4.storeHoppingMessageList(n4.messageList), i4.getPeerReadTime(c3));
+ return M2.l("".concat(s4, " update isPeerRead property. convID:").concat(c3, " peerReadTime:").concat(t4)), t4 ? i4.updateMsgIsPeerReadProp(c3, t4) : (e4 = c3.replace(R2.CONV_C2C, ""), a3.getRemotePeerReadTime([e4]).then(function() {
i4.updateMsgIsPeerReadProp(c3, i4.getPeerReadTime(c3));
})), T2(n4);
}).catch(function(e4) {
- return l3.setMessage(u3).setError(e4).end(), M2.w("".concat(a3, " failed. error:"), e4), E2(e4);
+ return l3.setMessage(u3).setError(e4).end(), M2.w("".concat(s4, " failed. error:"), e4), E2(e4);
});
} }, { key: "_computeResult", value: function(e3) {
var t3 = e3.complete, t3 = void 0 === t3 ? 0 : t3, n3 = e3.lastMessageTime, e3 = e3.resultList, e3 = { messageList: d2(void 0 === e3 ? [] : e3), isCompleted: false, nextMessageTime: "" };
@@ -10581,20 +10588,20 @@ var chat = { exports: {} };
} }, { key: "_modifyMessageList", value: function(e3, t3) {
e3 = this.get(11).getLocalConversation(e3);
if (e3)
- for (var n3 = e3.userProfile.nick, o3 = e3.userProfile.avatar, e3 = this.get(4).getNickAndAvatarByUserID(this.getMyUserID()), i4 = e3.nick, s4 = e3.avatar, a3 = t3.length - 1; 0 <= a3; a3--) {
- var r4 = t3[a3];
- "in" === r4.flow && (r4.nick !== n3 && r4.setNickAndAvatar({ nick: n3 }), r4.avatar !== o3) && r4.setNickAndAvatar({ avatar: o3 }), "out" === r4.flow && (r4.nick !== i4 && r4.setNickAndAvatar({ nick: i4 }), r4.avatar !== s4) && r4.setNickAndAvatar({ avatar: s4 });
+ for (var n3 = e3.userProfile.nick, o3 = e3.userProfile.avatar, e3 = this.get(4).getNickAndAvatarByUserID(this.getMyUserID()), i4 = e3.nick, a3 = e3.avatar, s4 = t3.length - 1; 0 <= s4; s4--) {
+ var r4 = t3[s4];
+ "in" === r4.flow && (r4.nick !== n3 && r4.setNickAndAvatar({ nick: n3 }), r4.avatar !== o3) && r4.setNickAndAvatar({ avatar: o3 }), "out" === r4.flow && (r4.nick !== i4 && r4.setNickAndAvatar({ nick: i4 }), r4.avatar !== a3) && r4.setNickAndAvatar({ avatar: a3 });
}
- } }, { key: "getRemotePeerReadTime", value: function(s4) {
- var a3, r4 = this, c3 = "".concat(this._n, ".").concat("getRemotePeerReadTime");
- return S2(s4) ? Promise.resolve() : (a3 = new P2("getRemotePeerReadTime"), M2.l("".concat(c3, " userIDList:").concat(s4)), this.req({ P: G2.GET_C2C_PEER_READ_TIME, data: { userIDList: s4 } }).then(function(e3) {
+ } }, { key: "getRemotePeerReadTime", value: function(a3) {
+ var s4, r4 = this, c3 = "".concat(this._n, ".").concat("getRemotePeerReadTime");
+ return S2(a3) ? Promise.resolve() : (s4 = new P2("getRemotePeerReadTime"), M2.l("".concat(c3, " userIDList:").concat(a3)), this.req({ P: G2.GET_C2C_PEER_READ_TIME, data: { userIDList: a3 } }).then(function(e3) {
var t3 = e3.data.peerReadTimeList;
M2.l("".concat(c3, " ok. peerReadTimeList:").concat(t3));
- for (var n3 = "", o3 = r4.get(11), i4 = 0; i4 < s4.length; i4++)
- n3 += "".concat(s4[i4], "-").concat(t3[i4], " "), 0 < t3[i4] && o3.recordPeerReadTime("".concat(R2.CONV_C2C).concat(s4[i4]), t3[i4]);
- a3.setMessage(n3).end();
+ for (var n3 = "", o3 = r4.get(11), i4 = 0; i4 < a3.length; i4++)
+ n3 += "".concat(a3[i4], "-").concat(t3[i4], " "), 0 < t3[i4] && o3.recordPeerReadTime("".concat(R2.CONV_C2C).concat(a3[i4]), t3[i4]);
+ s4.setMessage(n3).end();
}).catch(function(e3) {
- a3.setError(e3).end(), M2.w("".concat(c3, " failed. error:"), e3);
+ s4.setError(e3).end(), M2.w("".concat(c3, " failed. error:"), e3);
}));
} }, { key: "sendReadReceipt", value: function(e3) {
var t3, n3 = e3[0].conversationID.replace(R2.CONV_C2C, ""), o3 = new P2("sendReadReceipt"), i4 = (o3.setMessage("peerAccount:".concat(n3)), this.getMyUserID()), e3 = e3.filter(function(e4) {
@@ -10620,7 +10627,7 @@ var chat = { exports: {} };
return "".concat(t3, "_").concat(n3, "_").concat(e3);
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._msgFromUnreadDBMap.clear(), this._noticeFromUnreadDBList.length = 0;
- } }]), U2 = { A2KEY_AND_TINYID_UPDATED: "_inner".concat(1), CLOUD_CONFIG: "_inner".concat(2), PROFILE_UPDATED: "_inner".concat(3), CONV_SYNC_COMPLETED: "_inner".concat(4), C2C_UNREAD_HANDLE_COMPLETED: "_inner".concat(5) }, ko = e2(function e3(t3) {
+ } }]), U2 = { A2KEY_AND_TINYID_UPDATED: "_inner".concat(1), CLOUD_CONFIG: "_inner".concat(2), PROFILE_UPDATED: "_inner".concat(3), CONV_SYNC_COMPLETED: "_inner".concat(4), C2C_UNREAD_HANDLE_COMPLETED: "_inner".concat(5) }, Uo = e2(function e3(t3) {
p3(this, e3), this._convM = t3, this._map = /* @__PURE__ */ new Map(), this._n = "MsgListHandler", this._latestMsgSentByPeerMap = /* @__PURE__ */ new Map(), this._latestMsgSentByMeMap = /* @__PURE__ */ new Map(), this._hoppingMsgMap = /* @__PURE__ */ new Map(), this.TOPIC_MSG_LIMIT = 1e3, this._convM.getIEmitInst().on(U2.CLOUD_CONFIG, this._onCloudConfig, this);
}, [{ key: "_onCloudConfig", value: function() {
var e3 = this._convM.getCloudConfig("topic_msg_limit");
@@ -10630,8 +10637,8 @@ var chat = { exports: {} };
var t3, n3 = F2(this._map);
try {
for (n3.s(); !(t3 = n3.n()).done; ) {
- var o3 = j2(t3.value, 2), i4 = o3[0], s4 = o3[1];
- i4.includes(et2) && s4.size >= this.TOPIC_MSG_LIMIT && this._convM.clearMemMsg(i4, true);
+ var o3 = j2(t3.value, 2), i4 = o3[0], a3 = o3[1];
+ i4.includes(it2) && a3.size >= this.TOPIC_MSG_LIMIT && this._convM.clearMemMsg(i4, true);
}
} catch (e4) {
n3.e(e4);
@@ -10642,8 +10649,8 @@ var chat = { exports: {} };
} }, { key: "pushIn", value: function(e3) {
var t3 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], n3 = e3.conversationID, o3 = true, i4 = (this._map.has(n3) || this._map.set(n3, /* @__PURE__ */ new Map()), this._getUniqueIDOfMsg(e3));
if (this._map.get(n3).has(i4)) {
- var s4 = this._map.get(n3).get(i4);
- if (!t3 || true === s4.isModified)
+ var a3 = this._map.get(n3).get(i4);
+ if (!t3 || true === a3.isModified)
return false;
}
return this._map.get(n3).set(i4, e3), this._setLatestMsgSentByPeer(n3, e3), this._setLatestMsgSentByMe(n3, e3), o3;
@@ -10658,23 +10665,23 @@ var chat = { exports: {} };
break;
}
if (n3.startsWith(R2.CONV_C2C)) {
- for (var s4 = e3 - 1; 0 <= s4; s4--)
- if ("in" === o3[s4].flow) {
- this._setLatestMsgSentByPeer(n3, o3[s4]);
+ for (var a3 = e3 - 1; 0 <= a3; a3--)
+ if ("in" === o3[a3].flow) {
+ this._setLatestMsgSentByPeer(n3, o3[a3]);
break;
}
}
}
}
} }, { key: "_unshiftSingleMsg", value: function(e3, t3) {
- var n3, o3, i4 = e3.conversationID, s4 = this._getUniqueIDOfMsg(e3);
- this._map.has(i4) ? (n3 = this._map.get(i4), o3 = Array.from(n3), n3.has(s4) || (o3.unshift([s4, e3]), this._map.set(i4, new Map(o3)), t3.push(e3))) : (this._map.set(i4, /* @__PURE__ */ new Map()), this._map.get(i4).set(s4, e3), t3.push(e3));
+ var n3, o3, i4 = e3.conversationID, a3 = this._getUniqueIDOfMsg(e3);
+ this._map.has(i4) ? (n3 = this._map.get(i4), o3 = Array.from(n3), n3.has(a3) || (o3.unshift([a3, e3]), this._map.set(i4, new Map(o3)), t3.push(e3))) : (this._map.set(i4, /* @__PURE__ */ new Map()), this._map.get(i4).set(a3, e3), t3.push(e3));
} }, { key: "_unshiftMultipleMsgs", value: function(e3, t3) {
- for (var n3 = e3.length, o3 = [], i4 = e3[0].conversationID, s4 = this._map.get(i4), a3 = this._map.has(i4) ? Array.from(s4) : [], r4 = 0; r4 < n3; r4++) {
+ for (var n3 = e3.length, o3 = [], i4 = e3[0].conversationID, a3 = this._map.get(i4), s4 = this._map.has(i4) ? Array.from(a3) : [], r4 = 0; r4 < n3; r4++) {
var c3 = this._getUniqueIDOfMsg(e3[r4]);
- s4 && s4.has(c3) || (o3.push([c3, e3[r4]]), t3.push(e3[r4]));
+ a3 && a3.has(c3) || (o3.push([c3, e3[r4]]), t3.push(e3[r4]));
}
- this._map.set(i4, new Map(o3.concat(a3)));
+ this._map.set(i4, new Map(o3.concat(s4)));
} }, { key: "remove", value: function(e3) {
var t3 = e3.conversationID, e3 = this._getUniqueIDOfMsg(e3);
this._map.has(t3) && this._map.get(t3).delete(e3);
@@ -10685,9 +10692,9 @@ var chat = { exports: {} };
var o3, i4 = F2(e3);
try {
for (i4.s(); !(o3 = i4.n()).done; ) {
- var s4 = j2(o3.value, 2)[1];
- if (s4.sequence === t3 && (N3(n3) || s4.random === n3))
- return s4.isRevoked || (s4.isRevoked = true), s4;
+ var a3 = j2(o3.value, 2)[1];
+ if (a3.sequence === t3 && (N3(n3) || a3.random === n3))
+ return a3.isRevoked || (a3.isRevoked = true), a3;
}
} catch (e4) {
i4.e(e4);
@@ -10703,9 +10710,9 @@ var chat = { exports: {} };
var n3, o3 = null, i4 = F2(t3);
try {
for (i4.s(); !(n3 = i4.n()).done; )
- for (var s4 = d2(j2(n3.value, 2)[1].values()), a3 = s4.length, r4 = 0; r4 < a3; r4++)
- if (s4[r4].ID === e3) {
- o3 = s4[r4];
+ for (var a3 = d2(j2(n3.value, 2)[1].values()), s4 = a3.length, r4 = 0; r4 < s4; r4++)
+ if (a3[r4].ID === e3) {
+ o3 = a3[r4];
break;
}
} catch (e4) {
@@ -10721,8 +10728,8 @@ var chat = { exports: {} };
var n3, o3 = [], i4 = F2(e3);
try {
for (i4.s(); !(n3 = i4.n()).done; ) {
- var s4 = j2(n3.value, 2)[1];
- s4.time <= t3 && !s4.isPeerRead && "out" === s4.flow && (s4.isPeerRead = true, o3.push(s4));
+ var a3 = j2(n3.value, 2)[1];
+ a3.time <= t3 && !a3.isPeerRead && "out" === a3.flow && (a3.isPeerRead = true, o3.push(a3));
}
} catch (e4) {
i4.e(e4);
@@ -10746,19 +10753,19 @@ var chat = { exports: {} };
return e4.time;
}), Math.max.apply(Math, d2(e3))) : 0;
} }, { key: "hasLocalMsg", value: function(e3, t3) {
- for (var n3 = false, o3 = this.getLocalMsgList(e3), i4 = o3.length, s4 = 0; s4 < i4; s4++)
- o3[s4].ID === t3 && (n3 = true);
+ for (var n3 = false, o3 = this.getLocalMsgList(e3), i4 = o3.length, a3 = 0; a3 < i4; a3++)
+ o3[a3].ID === t3 && (n3 = true);
return n3;
} }, { key: "getLocalMsg", value: function(e3, t3) {
- for (var n3 = null, o3 = this.getLocalMsgList(e3), i4 = o3.length, s4 = 0; s4 < i4; s4++)
- if (o3[s4].ID === t3) {
- n3 = o3[s4];
+ for (var n3 = null, o3 = this.getLocalMsgList(e3), i4 = o3.length, a3 = 0; a3 < i4; a3++)
+ if (o3[a3].ID === t3) {
+ n3 = o3[a3];
break;
}
return n3;
} }, { key: "getLocalLastMsg", value: function(e3) {
for (var t3 = this.getLocalMsgList(e3), n3 = void 0, o3 = t3.length - 1; 0 <= o3; o3--)
- if (t3[o3].status === On) {
+ if (t3[o3].status === Pn) {
n3 = t3[o3];
break;
}
@@ -10781,9 +10788,9 @@ var chat = { exports: {} };
if (!S2(e3)) {
var i4 = Array.from(e3.values()), e3 = i4.length;
if (0 !== e3) {
- for (var s4 = null, a3 = 0, r4 = false, c3 = e3 - 1; 0 <= c3; c3--)
- "in" === i4[c3].flow && ((s4 = i4[c3]).nick !== n3 && (s4.setNickAndAvatar({ nick: n3 }), r4 = true), s4.avatar !== o3 && (s4.setNickAndAvatar({ avatar: o3 }), r4 = true), r4) && (a3 += 1);
- M2.l("".concat(this._n, ".modifyMsgSentByPeer convID:").concat(t3, " count:").concat(a3));
+ for (var a3 = null, s4 = 0, r4 = false, c3 = e3 - 1; 0 <= c3; c3--)
+ "in" === i4[c3].flow && ((a3 = i4[c3]).nick !== n3 && (a3.setNickAndAvatar({ nick: n3 }), r4 = true), a3.avatar !== o3 && (a3.setNickAndAvatar({ avatar: o3 }), r4 = true), r4) && (s4 += 1);
+ M2.l("".concat(this._n, ".modifyMsgSentByPeer convID:").concat(t3, " count:").concat(s4));
}
}
} }, { key: "modifyMsgSentByMe", value: function(e3) {
@@ -10791,9 +10798,9 @@ var chat = { exports: {} };
if (!S2(e3)) {
var i4 = Array.from(e3.values()), e3 = i4.length;
if (0 !== e3) {
- for (var s4 = null, a3 = 0, r4 = false, c3 = e3 - 1; 0 <= c3; c3--)
- "out" === i4[c3].flow && ((s4 = i4[c3]).nick !== n3 && (s4.setNickAndAvatar({ nick: n3 }), r4 = true), s4.avatar !== o3 && (s4.setNickAndAvatar({ avatar: o3 }), r4 = true), r4) && (a3 += 1);
- M2.l("".concat(this._n, ".modifyMsgSentByMe convID:").concat(t3, " count:").concat(a3));
+ for (var a3 = null, s4 = 0, r4 = false, c3 = e3 - 1; 0 <= c3; c3--)
+ "out" === i4[c3].flow && ((a3 = i4[c3]).nick !== n3 && (a3.setNickAndAvatar({ nick: n3 }), r4 = true), a3.avatar !== o3 && (a3.setNickAndAvatar({ avatar: o3 }), r4 = true), r4) && (s4 += 1);
+ M2.l("".concat(this._n, ".modifyMsgSentByMe convID:").concat(t3, " count:").concat(s4));
}
}
} }, { key: "getTopicConvIDList", value: function(t3) {
@@ -10801,8 +10808,8 @@ var chat = { exports: {} };
return e3.startsWith("".concat(R2.CONV_GROUP).concat(t3));
});
} }, { key: "onMsgModified", value: function(e3, t3) {
- var n3, o3, i4, s4;
- return (this._map.has(e3) || this._hoppingMsgMap.has(e3)) && (n3 = "".concat(this._n, ".onMsgModified"), i4 = this._getUniqueIDOfMsg(t3), s4 = !!(o3 = this._getTargetMsg(e3, i4)), M2.l("".concat(n3, " convID:").concat(e3, " uniqueID:").concat(i4, " has:").concat(s4)), s4) ? (e3 = t3.messageVersion, i4 = t3.elements, s4 = t3.cloudCustomData, t3 = t3.checkResult, M2.l("".concat(n3, " localVersion:").concat(o3.version, " remoteVersion:").concat(e3)), o3.version < e3 ? (o3.version = e3, o3._elements = JSON.parse(JSON.stringify(i4)), o3.payload = o3._elements[0].content, o3.type = o3._elements[0].type, o3.cloudCustomData = s4, o3.isModified = true, o3.hasRiskContent = nn(t3), { isUpdated: true, message: o3 }) : { isUpdated: false, message: o3 }) : { isUpdated: false, message: null };
+ var n3, o3, i4, a3;
+ return (this._map.has(e3) || this._hoppingMsgMap.has(e3)) && (n3 = "".concat(this._n, ".onMsgModified"), i4 = this._getUniqueIDOfMsg(t3), a3 = !!(o3 = this._getTargetMsg(e3, i4)), M2.l("".concat(n3, " convID:").concat(e3, " uniqueID:").concat(i4, " has:").concat(a3)), a3) ? (e3 = t3.messageVersion, i4 = t3.elements, a3 = t3.cloudCustomData, t3 = t3.checkResult, M2.l("".concat(n3, " localVersion:").concat(o3.version, " remoteVersion:").concat(e3)), o3.version < e3 ? (o3.version = e3, o3._elements = JSON.parse(JSON.stringify(i4)), o3.payload = o3._elements[0].content, o3.type = o3._elements[0].type, o3.cloudCustomData = a3, o3.isModified = true, o3.hasRiskContent = sn(t3), { isUpdated: true, message: o3 }) : { isUpdated: false, message: o3 }) : { isUpdated: false, message: null };
} }, { key: "_getUniqueIDOfMsg", value: function(e3) {
var t3 = e3.from, n3 = e3.to, o3 = e3.random, i4 = e3.sequence, e3 = e3.time;
return "".concat(t3, "-").concat(n3, "-").concat(o3, "-").concat(i4, "-").concat(e3);
@@ -10823,8 +10830,8 @@ var chat = { exports: {} };
var t3 = e3[0].conversationID, n3 = e3.length;
this._hoppingMsgMap.has(t3) || this._hoppingMsgMap.set(t3, /* @__PURE__ */ new Map());
for (var o3 = this._hoppingMsgMap.get(t3), i4 = 0; i4 < n3; i4++) {
- var s4 = e3[i4];
- o3.has(s4.ID) || o3.set(s4.ID, s4);
+ var a3 = e3[i4];
+ o3.has(a3.ID) || o3.set(a3.ID, a3);
}
}
} }, { key: "getHoppingMsg", value: function(e3, t3) {
@@ -10833,13 +10840,13 @@ var chat = { exports: {} };
} }, { key: "reset", value: function() {
this._map.clear(), this._latestMsgSentByPeerMap.clear(), this._latestMsgSentByMeMap.clear(), this._hoppingMsgMap.clear();
} }]);
- function Ro(e3) {
- return p3(this, Ro), (e3 = i3(this, Ro, [e3]))._n = "C2CModule", e3._msgFromUnreadDBMap = /* @__PURE__ */ new Map(), e3._noticeFromUnreadDBList = [], e3;
+ function bo(e3) {
+ return p3(this, bo), (e3 = i3(this, bo, [e3]))._n = "C2CModule", e3._msgFromUnreadDBMap = /* @__PURE__ */ new Map(), e3._noticeFromUnreadDBList = [], e3;
}
- function Ao(e3) {
+ function wo(e3) {
this.mixin(e3);
}
- Ao.mixin = function(e3) {
+ wo.mixin = function(e3) {
e3 = e3.prototype || e3;
e3._isReady = false, e3.ready = function(e4) {
if (e4)
@@ -10858,17 +10865,17 @@ var chat = { exports: {} };
return this._isReady;
};
};
- function Oo(e3, t3, n3) {
- return N3(e3) ? { lastTime: 0, lastSequence: 0, fromAccount: "", messageForShow: "", payload: null, type: "", isRevoked: false, cloudCustomData: "", onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: false, revoker: null } : n3 && e3.ID || e3 instanceof Do ? { lastTime: e3.time || 0, lastSequence: e3.sequence || 0, fromAccount: e3.from || "", messageForShow: Jt2(e3.type, e3.payload, t3), payload: e3.payload || null, type: e3.type || null, isRevoked: e3.isRevoked || false, cloudCustomData: e3.cloudCustomData || "", onlineOnlyFlag: e3._onlineOnlyFlag || false, nick: e3.nick || "", nameCard: e3.nameCard || "", version: e3.version || 0, isPeerRead: e3.isPeerRead || false, revoker: e3.revoker || null } : y2(y2({}, e3), {}, { messageForShow: Jt2(e3.type, e3.payload, t3) });
+ function Fo(e3, t3, n3) {
+ return N3(e3) ? { lastTime: 0, lastSequence: 0, fromAccount: "", messageForShow: "", payload: null, type: "", isRevoked: false, cloudCustomData: "", onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: false, revoker: null } : n3 && e3.ID || e3 instanceof So ? { lastTime: e3.time || 0, lastSequence: e3.sequence || 0, fromAccount: e3.from || "", messageForShow: Zt2(e3.type, e3.payload, t3), payload: e3.payload || null, type: e3.type || null, isRevoked: e3.isRevoked || false, cloudCustomData: e3.cloudCustomData || "", onlineOnlyFlag: e3._onlineOnlyFlag || false, nick: e3.nick || "", nameCard: e3.nameCard || "", version: e3.version || 0, isPeerRead: e3.isPeerRead || false, revoker: e3.revoker || null } : y2(y2({}, e3), {}, { messageForShow: Zt2(e3.type, e3.payload, t3) });
}
- function No(e3, t3) {
- return S2(e3) ? { lastTime: 0, lastSequence: 0, fromAccount: "", payload: null, type: "", messageForShow: "", nick: "", avatar: "", version: 0, cloudCustomData: "", isRevoked: false, revoker: null } : { lastTime: e3.time || 0, lastSequence: e3.sequence || 0, fromAccount: e3.from || "", payload: e3.payload || null, type: e3.type || "", messageForShow: Jt2(e3.type, e3.payload, t3), nick: e3.nick || "", avatar: e3.avatar || "", version: e3.version || 0, cloudCustomData: e3.cloudCustomData || "", isRevoked: e3.isRevoked || false, revoker: e3.revoker || null };
+ function qo(e3, t3) {
+ return S2(e3) ? { lastTime: 0, lastSequence: 0, fromAccount: "", payload: null, type: "", messageForShow: "", nick: "", avatar: "", version: 0, cloudCustomData: "", isRevoked: false, revoker: null } : { lastTime: e3.time || 0, lastSequence: e3.sequence || 0, fromAccount: e3.from || "", payload: e3.payload || null, type: e3.type || "", messageForShow: Zt2(e3.type, e3.payload, t3), nick: e3.nick || "", avatar: e3.avatar || "", version: e3.version || 0, cloudCustomData: e3.cloudCustomData || "", isRevoked: e3.isRevoked || false, revoker: e3.revoker || null };
}
- function Go(e3) {
+ function xo(e3) {
var t3 = String(e3).replace(/[=]+$/, ""), n3 = "";
if (t3.length % 4 == 1)
return "";
- for (var o3, i4, s4 = 0, a3 = 0; i4 = t3.charAt(a3++); ~i4 && (o3 = s4 % 4 ? 64 * o3 + i4 : i4, s4++ % 4) && (n3 += String.fromCharCode(255 & o3 >> (-2 * s4 & 6))))
+ for (var o3, i4, a3 = 0, s4 = 0; i4 = t3.charAt(s4++); ~i4 && (o3 = a3 % 4 ? 64 * o3 + i4 : i4, a3++ % 4) && (n3 += String.fromCharCode(255 & o3 >> (-2 * a3 & 6))))
i4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i4);
try {
return decodeURIComponent(escape(n3));
@@ -10876,7 +10883,7 @@ var chat = { exports: {} };
return "";
}
}
- var Po = ["jpg", "jpeg", "gif", "png", "bmp", "image", "webp"], Uo = ["mp4", "quicktime", "mov"], bo = e2(function e3(t3) {
+ var Vo = ["jpg", "jpeg", "gif", "png", "bmp", "image", "webp"], Bo = ["mp4", "quicktime", "mov"], Ho = e2(function e3(t3) {
var n3 = this;
p3(this, e3), S2(t3) || (this.userID = t3.userID || "", this.nick = t3.nick || "", this.gender = t3.gender || "", this.birthday = t3.birthday || 0, this.location = t3.location || "", this.selfSignature = t3.selfSignature || "", this.allowType = t3.allowType || R2.ALLOW_TYPE_ALLOW_ANY, this.language = t3.language || 0, this.avatar = t3.avatar || "", this.messageSettings = t3.messageSettings || 0, this.adminForbidType = t3.adminForbidType || R2.FORBID_TYPE_NONE, this.level = t3.level || 0, this.role = t3.role || 0, this.lastUpdatedTime = 0, this.profileCustomField = [], S2(t3.profileCustomField)) || t3.profileCustomField.forEach(function(e4) {
n3.profileCustomField.push({ key: e4.key, value: e4.value });
@@ -10886,10 +10893,10 @@ var chat = { exports: {} };
if (S2(e3))
return { valid: false, tips: "empty options" };
if (e3.profileCustomField)
- for (var i4 = e3.profileCustomField.length, s4 = null, a3 = 0; a3 < i4; a3++) {
- if (s4 = e3.profileCustomField[a3], !C2(s4.key) || -1 === s4.key.indexOf("Tag_Profile_Custom"))
+ for (var i4 = e3.profileCustomField.length, a3 = null, s4 = 0; s4 < i4; s4++) {
+ if (a3 = e3.profileCustomField[s4], !C2(a3.key) || -1 === a3.key.indexOf("Tag_Profile_Custom"))
return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" };
- if (!C2(s4.value))
+ if (!C2(a3.value))
return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" };
}
for (t3 in e3)
@@ -10902,10 +10909,10 @@ var chat = { exports: {} };
}
switch (t3) {
case "nick":
- C2(e3[t3]) || (n3 = !(o3 = "nick must be a string")), 500 < _t2(e3[t3]) && (o3 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(_t2(e3[t3]), " bytes"), n3 = false);
+ C2(e3[t3]) || (n3 = !(o3 = "nick must be a string")), 500 < ft2(e3[t3]) && (o3 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(ft2(e3[t3]), " bytes"), n3 = false);
break;
case "gender":
- ft2(ze2, e3.gender) || (o3 = "key:gender, invalid value:" + e3.gender, n3 = false);
+ It2(Qe2, e3.gender) || (o3 = "key:gender, invalid value:" + e3.gender, n3 = false);
break;
case "birthday":
A2(e3.birthday) || (n3 = !(o3 = "birthday must be a number"));
@@ -10917,7 +10924,7 @@ var chat = { exports: {} };
C2(e3.selfSignature) || (n3 = !(o3 = "selfSignature must be a string"));
break;
case "allowType":
- ft2(Ze2, e3.allowType) || (o3 = "key:allowType, invalid value:" + e3.allowType, n3 = false);
+ It2(et2, e3.allowType) || (o3 = "key:allowType, invalid value:" + e3.allowType, n3 = false);
break;
case "language":
A2(e3.language) || (n3 = !(o3 = "language must be a number"));
@@ -10929,7 +10936,7 @@ var chat = { exports: {} };
0 !== e3.messageSettings && 1 !== e3.messageSettings && (n3 = !(o3 = "messageSettings must be 0 or 1"));
break;
case "adminForbidType":
- ft2(Xe2, e3.adminForbidType) || (o3 = "key:adminForbidType, invalid value:" + e3.adminForbidType, n3 = false);
+ It2($e2, e3.adminForbidType) || (o3 = "key:adminForbidType, invalid value:" + e3.adminForbidType, n3 = false);
break;
case "level":
A2(e3.level) || (n3 = !(o3 = "level must be a number"));
@@ -10942,7 +10949,7 @@ var chat = { exports: {} };
}
}
return { valid: n3, tips: o3 };
- } }]), wo = e2(function e3(t3) {
+ } }]), Ko = e2(function e3(t3) {
p3(this, e3), this.MAX_LENGTH = t3, this.map = /* @__PURE__ */ new Map();
}, [{ key: "set", value: function(e3) {
var t3;
@@ -10953,7 +10960,7 @@ var chat = { exports: {} };
this.has(e3) && this.map.delete(e3);
} }, { key: "reset", value: function() {
this.map.clear();
- } }]), Fo = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo", "createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum", "maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers", "isSupportTopic", "inviteOption", "_lastRevokedTime"], qo = e2(function e3(t3) {
+ } }]), Wo = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo", "createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum", "maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers", "isSupportTopic", "inviteOption", "_lastRevokedTime"], Yo = e2(function e3(t3) {
p3(this, e3), this.groupID = "", this.name = "", this.avatar = "", this.type = "", this.introduction = "", this.notification = "", this.ownerID = "", this.createTime = "", this.infoSequence = "", this.lastInfoTime = "", this.selfInfo = { messageRemindType: "", joinTime: "", nameCard: "", role: "", userID: "", memberCustomField: void 0, readedSequence: 0, excludedUnreadSequenceList: void 0 }, this.lastMessage = { lastTime: "", lastSequence: "", fromAccount: "", messageForShow: "" }, this.nextMessageSeq = "", this.memberNum = "", this.memberCount = "", this.maxMemberNum = "", this.maxMemberCount = "", this.joinOption = "", this.inviteOption = "", this.groupCustomField = [], this.muteAllMembers = false, this.isSupportTopic = false, this._lastRevokedTime = 0, this._initGroup(t3);
}, [{ key: "memberNum", get: function() {
return this.memberCount;
@@ -10963,20 +10970,20 @@ var chat = { exports: {} };
}, set: function(e3) {
} }, { key: "_initGroup", value: function(e3) {
for (var t3 in e3)
- Fo.indexOf(t3) < 0 || ("selfInfo" !== t3 ? ("memberNum" === t3 && (this.memberCount = e3[t3]), "maxMemberNum" === t3 && (this.maxMemberCount = e3[t3]), "isSupportTopic" !== t3 ? this[t3] = e3[t3] : this.isSupportTopic = 1 === e3[t3]) : this.updateSelfInfo(e3[t3]));
+ Wo.indexOf(t3) < 0 || ("selfInfo" !== t3 ? ("memberNum" === t3 && (this.memberCount = e3[t3]), "maxMemberNum" === t3 && (this.maxMemberCount = e3[t3]), "isSupportTopic" !== t3 ? this[t3] = e3[t3] : this.isSupportTopic = 1 === e3[t3]) : this.updateSelfInfo(e3[t3]));
} }, { key: "updateGroup", value: function(e3) {
var t3 = this, e3 = (e3.appid = void 0, e3.grossTopicNextMsgSeq = void 0, e3.selfInfo && (e3.selfInfo.grossTopicReadSeq = void 0), JSON.parse(JSON.stringify(e3)));
- e3.lastMsgTime && (this.lastMessage.lastTime = e3.lastMsgTime), N3(e3.muteAllMembers) || ("On" === e3.muteAllMembers ? e3.muteAllMembers = true : e3.muteAllMembers = false), e3.groupCustomField && Lt2(this.groupCustomField, e3.groupCustomField), N3(e3.memberNum) || (this.memberCount = e3.memberNum), N3(e3.maxMemberNum) || (this.maxMemberCount = e3.maxMemberNum), N3(e3.isSupportTopic) || (this.isSupportTopic = A2(e3.isSupportTopic) ? 1 === e3.isSupportTopic : e3.isSupportTopic), dt2(this, e3, ["members", "errorCode", "lastMsgTime", "groupCustomField", "memberNum", "maxMemberNum", "isSupportTopic"]), O2(e3.members) && 0 < e3.members.length && e3.members.forEach(function(e4) {
- e4.userID === t3.selfInfo.userID && dt2(t3.selfInfo, e4, ["sequence"]);
+ e3.lastMsgTime && (this.lastMessage.lastTime = e3.lastMsgTime), N3(e3.muteAllMembers) || ("On" === e3.muteAllMembers ? e3.muteAllMembers = true : e3.muteAllMembers = false), e3.groupCustomField && Rt2(this.groupCustomField, e3.groupCustomField), N3(e3.memberNum) || (this.memberCount = e3.memberNum), N3(e3.maxMemberNum) || (this.maxMemberCount = e3.maxMemberNum), N3(e3.isSupportTopic) || (this.isSupportTopic = A2(e3.isSupportTopic) ? 1 === e3.isSupportTopic : e3.isSupportTopic), ht2(this, e3, ["members", "errorCode", "lastMsgTime", "groupCustomField", "memberNum", "maxMemberNum", "isSupportTopic"]), O2(e3.members) && 0 < e3.members.length && e3.members.forEach(function(e4) {
+ e4.userID === t3.selfInfo.userID && ht2(t3.selfInfo, e4, ["sequence"]);
});
} }, { key: "updateSelfInfo", value: function(e3) {
e3 = { nameCard: e3.nameCard, joinTime: e3.joinTime, role: e3.role, messageRemindType: e3.messageRemindType, readedSequence: e3.readedSequence, excludedUnreadSequenceList: e3.excludedUnreadSequenceList };
- dt2(this.selfInfo, y2({}, e3), [], ["", null, void 0, 0, NaN]);
+ ht2(this.selfInfo, y2({}, e3), [], ["", null, void 0, 0, NaN]);
} }, { key: "setSelfNameCard", value: function(e3) {
this.selfInfo.nameCard = e3;
- } }]), xo = e2(function e3(t3, n3) {
+ } }]), jo = e2(function e3(t3, n3) {
var o3 = 2 < arguments.length && void 0 !== arguments[2] && arguments[2];
- p3(this, e3), this.conversationID = t3.conversationID || "", this.unreadCount = t3.unreadCount || 0, this.type = t3.type || "", this.lastMessage = Oo(t3.lastMessage, n3, o3), t3.lastMsgTime && (this.lastMessage.lastTime = t3.lastMsgTime), this._isInfoCompleted = false, this.peerReadTime = t3.peerReadTime || 0, this.groupAtInfoList = [], this.remark = "", this.isPinned = t3.isPinned || false, this.messageRemindType = t3.messageRemindType, this.markList = t3.markList || [], this.customData = t3.customData || "", this.conversationGroupList = t3.conversationGroupList || [], this.draftText = t3.draftText || "", this._initProfile(t3), this.subType = this.groupProfile ? this.groupProfile.type : "";
+ p3(this, e3), this.conversationID = t3.conversationID || "", this.unreadCount = t3.unreadCount || 0, this.type = t3.type || "", this.lastMessage = Fo(t3.lastMessage, n3, o3), t3.lastMsgTime && (this.lastMessage.lastTime = t3.lastMsgTime), this._isInfoCompleted = false, this.peerReadTime = t3.peerReadTime || 0, this.groupAtInfoList = [], this.remark = t3.remark || "", this.isPinned = t3.isPinned || false, this.messageRemindType = t3.messageRemindType, this.markList = t3.markList || [], this.customData = t3.customData || "", this.conversationGroupList = t3.conversationGroupList || [], this.draftText = t3.draftText || "", this._initProfile(t3), this.subType = this.groupProfile ? this.groupProfile.type : "";
}, [{ key: "toAccount", get: function() {
return this.conversationID.startsWith(R2.CONV_C2C) ? this.conversationID.replace(R2.CONV_C2C, "") : this.conversationID.startsWith(R2.CONV_GROUP) ? this.conversationID.replace(R2.CONV_GROUP, "") : "";
} }, { key: "_initProfile", value: function(t3) {
@@ -10989,18 +10996,18 @@ var chat = { exports: {} };
case "groupProfile":
n3.groupProfile = t3.groupProfile;
}
- }), N3(this.userProfile) && this.type === R2.CONV_C2C ? this.userProfile = new bo({ userID: t3.conversationID.replace("C2C", "") }) : N3(this.groupProfile) && this.type === R2.CONV_GROUP && (this.groupProfile = new qo({ groupID: t3.conversationID.replace("GROUP", "") }));
+ }), N3(this.userProfile) && this.type === R2.CONV_C2C ? this.userProfile = new Ho({ userID: t3.conversationID.replace("C2C", "") }) : N3(this.groupProfile) && this.type === R2.CONV_GROUP && (this.groupProfile = new Yo({ groupID: t3.conversationID.replace("GROUP", "") }));
} }, { key: "updateUnreadCount", value: function(e3) {
var t3 = e3.nextUnreadCount, n3 = e3.isFromGetConversations, e3 = e3.isUnreadC2CMessage;
- N3(t3) || (At2(this.subType) ? this.unreadCount = 0 : n3 && this.type === R2.CONV_GROUP || n3 && this.type === R2.CONV_TOPIC || e3 && this.type === R2.CONV_C2C ? this.unreadCount = t3 : this.unreadCount = this.unreadCount + t3);
+ N3(t3) || (Gt2(this.subType) ? this.unreadCount = 0 : n3 && this.type === R2.CONV_GROUP || n3 && this.type === R2.CONV_TOPIC || e3 && this.type === R2.CONV_C2C ? this.unreadCount = t3 : this.unreadCount = this.unreadCount + t3);
} }, { key: "updateLastMessage", value: function(e3) {
- this.lastMessage = Oo(e3);
+ this.lastMessage = Fo(e3);
} }, { key: "updateGroupAtInfoList", value: function(e3) {
var t3;
this._isNeedMergeGroupAtInfo(e3) || (-1 !== (t3 = (b2(t3 = e3.groupAtType) || B2(t3) || X2(t3) || H2()).slice(0)).indexOf(R2.CONV_AT_ME) && -1 !== t3.indexOf(R2.CONV_AT_ALL) && (t3 = [R2.CONV_AT_ALL_AT_ME]), t3 = { from: e3.from, groupID: e3.groupID, topicID: e3.topicID, messageSequence: e3.sequence, atTypeArray: t3, __random: e3.__random, __sequence: e3.__sequence }, this.groupAtInfoList.push(t3));
} }, { key: "_isNeedMergeGroupAtInfo", value: function(t3) {
var n3, e3 = t3.groupID, o3 = t3.sequence;
- return !!Ot2({ groupID: e3 }) && (n3 = false, this.groupAtInfoList.forEach(function(e4) {
+ return !!Pt2({ groupID: e3 }) && (n3 = false, this.groupAtInfoList.forEach(function(e4) {
e4.messageSequence === o3 && (-1 < e4.atTypeArray.indexOf(R2.CONV_AT_ME) && -1 < t3.groupAtType.indexOf(R2.CONV_AT_ALL) && (e4.atTypeArray = [R2.CONV_AT_ALL_AT_ME]), -1 < e4.atTypeArray.indexOf(R2.CONV_AT_ALL) && -1 < t3.groupAtType.indexOf(R2.CONV_AT_ME) && (e4.atTypeArray = [R2.CONV_AT_ALL_AT_ME], e4.__random = t3.__random, e4.__sequence = t3.__sequence), n3 = true);
}), n3);
} }, { key: "clearGroupAtInfoList", value: function() {
@@ -11016,7 +11023,7 @@ var chat = { exports: {} };
this.lastMessage.revoker = e3;
} }, { key: "setDraftText", value: function(e3) {
this.draftText = e3;
- } }]), Vo = q2(q2(q2({}, R2.MSG_REMIND_ACPT_AND_NOTE, 0), R2.MSG_REMIND_DISCARD, 1), R2.MSG_REMIND_ACPT_NOT_NOTE, 2), Bo = e2(function e3(t3) {
+ } }]), Jo = q2(q2(q2({}, R2.MSG_REMIND_ACPT_AND_NOTE, 0), R2.MSG_REMIND_DISCARD, 1), R2.MSG_REMIND_ACPT_NOT_NOTE, 2), zo = e2(function e3(t3) {
p3(this, e3), this._convM = t3, this._n = "MsgRemindHandler";
}, [{ key: "onAllRcvMsgOptNotify", value: function(e3) {
e3 = this._handleResult(e3);
@@ -11033,48 +11040,48 @@ var chat = { exports: {} };
} }, { key: "set", value: function(e3) {
return e3.groupID ? this._setGroupMsgRemindType(e3) : O2(e3.userIDList) ? this._setC2CMsgRemindType(e3) : void 0;
} }, { key: "_setGroupMsgRemindType", value: function(t3) {
- var n3 = this, o3 = "".concat(this._n, ".").concat("_setGroupMsgRemindType"), e3 = t3.groupID, i4 = t3.messageRemindType, s4 = "groupID:".concat(e3, " messageRemindType:").concat(i4), a3 = new P2("_setGroupMsgRemindType"), r4 = (a3.setMessage(s4), this._get(7));
+ var n3 = this, o3 = "".concat(this._n, ".").concat("_setGroupMsgRemindType"), e3 = t3.groupID, i4 = t3.messageRemindType, a3 = "groupID:".concat(e3, " messageRemindType:").concat(i4), s4 = new P2("_setGroupMsgRemindType"), r4 = (s4.setMessage(a3), this._get(7));
return r4 ? r4.modifyGroupMemberInfo({ groupID: e3, messageRemindType: i4, userID: this._convM.getMyUserID() }).then(function() {
- a3.end(), M2.l("".concat(o3, " ok. ").concat(s4));
+ s4.end(), M2.l("".concat(o3, " ok. ").concat(a3));
var e4 = n3.onGroupMsgRemindTypeUpdated(t3);
return n3._convM.onTotalUnreadCountUpdate(), T2(e4);
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
}) : E2({ code: k2.NO_MODULE });
} }, { key: "onGroupMsgRemindTypeUpdated", value: function(e3) {
var t3, n3, o3 = e3.groupID, e3 = e3.messageRemindType, i4 = (M2.l("".concat(this._n, ".onGroupMsgRemindTypeUpdated groupID:").concat(o3, " messageRemindType:").concat(e3)), this._get(7).getLocalGroupProfile(o3));
- return i4 && (i4.selfInfo.messageRemindType = e3), Nt2(o3) ? (t3 = jt2(n3 = o3), (n3 = this._get(10).getLocalTopic(t3, n3)) && n3.updateSelfInfo({ messageRemindType: e3 }) && this._convM.emitOEvt(h2.TOPIC_UPDATED, { groupID: t3, topic: n3 }), { topic: n3 }) : (this._convM.patchMsgRemindType({ ID: o3, isC2CConversation: false, messageRemindType: e3 }) && this._emitConvUpdate(), { group: i4 });
+ return i4 && (i4.selfInfo.messageRemindType = e3), Ut2(o3) ? (t3 = Xt2(n3 = o3), (n3 = this._get(10).getLocalTopic(t3, n3)) && n3.updateSelfInfo({ messageRemindType: e3 }) && this._convM.emitOEvt(h2.TOPIC_UPDATED, { groupID: t3, topic: n3 }), { topic: n3 }) : (this._convM.patchMsgRemindType({ ID: o3, isC2CConversation: false, messageRemindType: e3 }) && this._emitConvUpdate(), { group: i4 });
} }, { key: "_setC2CMsgRemindType", value: function(e3) {
- var i4 = this, s4 = "".concat(this._n, ".").concat("_setC2CMsgRemindType"), t3 = e3.userIDList, a3 = e3.messageRemindType, r4 = t3.slice(0, 30), e3 = Vo[a3] || 0, c3 = "userIDList:".concat(r4, " messageRemindType:").concat(a3), u3 = new P2("_setC2CMsgRemindType");
+ var i4 = this, a3 = "".concat(this._n, ".").concat("_setC2CMsgRemindType"), t3 = e3.userIDList, s4 = e3.messageRemindType, r4 = t3.slice(0, 30), e3 = Jo[s4] || 0, c3 = "userIDList:".concat(r4, " messageRemindType:").concat(s4), u3 = new P2("_setC2CMsgRemindType");
return u3.setMessage(c3), this._convM.req({ P: G2.SET_C2C_PEER_MUTE_NOTIFICATIONS, data: { userIDList: r4, muteFlag: e3 } }).then(function(e4) {
u3.end();
var e4 = e4.data.errorList, t4 = [], n3 = [], e4 = (O2(e4) && e4.forEach(function(e5) {
t4.push(e5.userID), n3.push({ userID: e5.userID, code: e5.errorCode });
}), r4.filter(function(e5) {
return -1 === t4.indexOf(e5);
- })), o3 = (M2.l("".concat(s4, " ok. ").concat(c3, " successUserIDList:").concat(e4, " failureUserIDList:").concat(JSON.stringify(n3))), 0);
+ })), o3 = (M2.l("".concat(a3, " ok. ").concat(c3, " successUserIDList:").concat(e4, " failureUserIDList:").concat(JSON.stringify(n3))), 0);
return e4.forEach(function(e5) {
- i4._convM.patchMsgRemindType({ ID: e5, isC2CConversation: true, messageRemindType: a3 }) && (o3 += 1);
+ i4._convM.patchMsgRemindType({ ID: e5, isC2CConversation: true, messageRemindType: s4 }) && (o3 += 1);
}), 1 <= o3 && i4._emitConvUpdate(), r4.length = t4.length = 0, i4._convM.onTotalUnreadCountUpdate(), D2({ successUserIDList: e4.map(function(e5) {
return { userID: e5 };
}), failureUserIDList: n3 });
}).catch(function(e4) {
- return u3.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
+ return u3.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
});
} }, { key: "_get", value: function(e3) {
return this._convM.get(e3);
} }, { key: "_emitConvUpdate", value: function() {
this._convM.emitConvUpdate(true, false);
} }, { key: "setAllRcvMsgOpt", value: function(e3) {
- var t3 = "".concat(this._n, ".").concat("setAllRcvMsgOpt"), n3 = e3.messageRemindType, n3 = void 0 === n3 ? R2.MSG_REMIND_ACPT_NOT_NOTE : n3, o3 = e3.isRepeated, o3 = void 0 === o3 || o3, i4 = this._calcStartAndEndTime(e3), s4 = i4.startTime, s4 = void 0 === s4 ? 0 : s4, i4 = i4.endTime, i4 = void 0 === i4 ? 0 : i4, e3 = JSON.stringify(e3), a3 = new P2("setAllRcvMsgOpt");
- return a3.setMessage(e3), M2.l("".concat(t3, " options:").concat(e3)), this._convM.req({ P: G2.SET_ALL_RECEIVE_MSG_OPT, data: { messageRemindType: Vo[n3], startTime: s4, endTime: i4, isRepeated: o3 ? 1 : 0 } }).then(function(e4) {
- return a3.end(), M2.l("".concat(t3, " ok.")), T2(e4);
+ var t3 = "".concat(this._n, ".").concat("setAllRcvMsgOpt"), n3 = e3.messageRemindType, n3 = void 0 === n3 ? R2.MSG_REMIND_ACPT_NOT_NOTE : n3, o3 = e3.isRepeated, o3 = void 0 === o3 || o3, i4 = this._calcStartAndEndTime(e3), a3 = i4.startTime, a3 = void 0 === a3 ? 0 : a3, i4 = i4.endTime, i4 = void 0 === i4 ? 0 : i4, e3 = JSON.stringify(e3), s4 = new P2("setAllRcvMsgOpt");
+ return s4.setMessage(e3), M2.l("".concat(t3, " options:").concat(e3)), this._convM.req({ P: G2.SET_ALL_RECEIVE_MSG_OPT, data: { messageRemindType: Jo[n3], startTime: a3, endTime: i4, isRepeated: o3 ? 1 : 0 } }).then(function(e4) {
+ return s4.end(), M2.l("".concat(t3, " ok.")), T2(e4);
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
});
} }, { key: "_calcStartAndEndTime", value: function(e3) {
- var t3 = e3.startHour, t3 = void 0 === t3 ? 0 : t3, n3 = e3.startMinute, n3 = void 0 === n3 ? 0 : n3, o3 = e3.startSecond, o3 = void 0 === o3 ? 0 : o3, i4 = e3.duration, i4 = void 0 === i4 ? 0 : i4, e3 = e3.isRepeated, e3 = void 0 === e3 || e3, s4 = /* @__PURE__ */ new Date(), a3 = s4.getFullYear(), r4 = s4.getMonth(), s4 = s4.getDate(), a3 = Math.round(new Date(a3, r4, s4, t3, n3, o3).getTime() / 1e3);
- return { startTime: a3, endTime: e3 && 86400 <= i4 ? a3 + 86400 : a3 + i4 };
+ var t3 = e3.startHour, t3 = void 0 === t3 ? 0 : t3, n3 = e3.startMinute, n3 = void 0 === n3 ? 0 : n3, o3 = e3.startSecond, o3 = void 0 === o3 ? 0 : o3, i4 = e3.duration, i4 = void 0 === i4 ? 0 : i4, e3 = e3.isRepeated, e3 = void 0 === e3 || e3, a3 = /* @__PURE__ */ new Date(), s4 = a3.getFullYear(), r4 = a3.getMonth(), a3 = a3.getDate(), s4 = Math.round(new Date(s4, r4, a3, t3, n3, o3).getTime() / 1e3);
+ return { startTime: s4, endTime: e3 && 86400 <= i4 ? s4 + 86400 : s4 + i4 };
} }, { key: "getAllRcvMsgOpt", value: function() {
var t3 = this, n3 = "".concat(this._n, ".").concat("getAllRcvMsgOpt"), o3 = new P2("getAllRcvMsgOpt");
return this._convM.req({ P: G2.GET_ALL_RECEIVE_MSG_OPT, data: { toAccount: this._convM.getMyUserID() } }).then(function(e3) {
@@ -11088,40 +11095,40 @@ var chat = { exports: {} };
return 1 === t3 && (i4 = R2.MSG_REMIND_DISCARD), { messageRemindType: i4 = 2 === t3 ? R2.MSG_REMIND_ACPT_NOT_NOTE : i4, startTime: n3, endTime: o3, isRepeated: 1 === e3 };
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset"));
- } }]), Ho = e2(function e3(t3) {
- p3(this, e3), this._convM = t3, this._n = "ConvGroupHandler", this._convGroupMap = /* @__PURE__ */ new Map(), this._startIndex = 0, this._pagingStatus = Gn;
+ } }]), Xo = e2(function e3(t3) {
+ p3(this, e3), this._convM = t3, this._n = "ConvGroupHandler", this._convGroupMap = /* @__PURE__ */ new Map(), this._startIndex = 0, this._pagingStatus = bn;
}, [{ key: "setConvCustomData", value: function(e3) {
- var i4 = this, s4 = "".concat(this._n, ".").concat("setConvCustomData"), t3 = e3.conversationIDList, a3 = e3.customData, r4 = (M2.l("".concat(s4, " options:"), e3), new P2("setConvCustomData")), n3 = (r4.setMessage(JSON.stringify(e3)), { fromAccount: this._getMyUserID(), itemList: [] }), c3 = [], u3 = [];
+ var i4 = this, a3 = "".concat(this._n, ".").concat("setConvCustomData"), t3 = e3.conversationIDList, s4 = e3.customData, r4 = (M2.l("".concat(a3, " options:"), e3), new P2("setConvCustomData")), n3 = (r4.setMessage(JSON.stringify(e3)), { fromAccount: this._getMyUserID(), itemList: [] }), c3 = [], u3 = [];
return t3.forEach(function(e4) {
var t4;
- return i4._hasLocalConv(e4) ? Gt2(e4) || Pt2(e4) ? (t4 = { operationType: 2, contactItem: void 0, customMark: a3 }, Gt2(e4) ? t4.contactItem = { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } : Pt2(e4) && (t4.contactItem = { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") }), void n3.itemList.push(t4)) : (i4._onConvIDInvalid(u3, e4), true) : (i4._onConvNotFound(u3, e4), true);
+ return i4._hasLocalConv(e4) ? bt2(e4) || wt2(e4) ? (t4 = { operationType: 2, contactItem: void 0, customMark: s4 }, bt2(e4) ? t4.contactItem = { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } : wt2(e4) && (t4.contactItem = { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") }), void n3.itemList.push(t4)) : (i4._onConvIDInvalid(u3, e4), true) : (i4._onConvNotFound(u3, e4), true);
}), u3.length === t3.length ? D2({ successConversationIDList: c3, failureConversationIDList: u3 }) : this._convM.req({ P: G2.SET_CONV_CUSTOM_DATA, data: n3 }).then(function(e4) {
- r4.end(), M2.l("".concat(s4, " ok"));
+ r4.end(), M2.l("".concat(a3, " ok"));
var t4, n4, o3, e4 = e4.data.resultItem;
return O2(e4) && (o3 = false, e4.forEach(function(e5) {
- t4 = i4._concatConvID(e5.contactItem), 0 === e5.resultCode ? (c3.push(t4), (n4 = i4._getLocalConv(t4)) && n4.customData !== a3 && (n4.customData = a3, o3 = true)) : u3.push({ conversationID: t4, code: e5.resultCode, message: e5.resultInfo });
+ t4 = i4._concatConvID(e5.contactItem), 0 === e5.resultCode ? (c3.push(t4), (n4 = i4._getLocalConv(t4)) && n4.customData !== s4 && (n4.customData = s4, o3 = true)) : u3.push({ conversationID: t4, code: e5.resultCode, message: e5.resultInfo });
}), true === o3) && i4._emitConvUpdate(), T2({ successConversationIDList: c3, failureConversationIDList: u3 });
}).catch(function(e4) {
- return r4.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
+ return r4.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
});
} }, { key: "markConv", value: function(e3) {
- var t3, n3, s4, a3, r4, o3, i4, c3, u3, l3, d3 = this;
- return this._convM.canIUse(g2.CONV_MARK) ? (t3 = "".concat(this._n, ".").concat("markConv"), n3 = e3.conversationIDList, s4 = e3.markType, a3 = e3.enableMark, M2.l("".concat(t3, " options:"), e3), r4 = new P2("markConv"), o3 = void r4.setMessage(JSON.stringify(e3)), i4 = void 0, e3 = this._getFlagBit(s4), true === a3 ? i4 = [e3] : o3 = [e3], c3 = { fromAccount: this._getMyUserID(), itemList: [] }, u3 = [], l3 = [], n3.forEach(function(e4) {
+ var t3, n3, a3, s4, r4, o3, i4, c3, u3, l3, d3 = this;
+ return this._convM.canIUse(g2.CONV_MARK) ? (t3 = "".concat(this._n, ".").concat("markConv"), n3 = e3.conversationIDList, a3 = e3.markType, s4 = e3.enableMark, M2.l("".concat(t3, " options:"), e3), r4 = new P2("markConv"), o3 = void r4.setMessage(JSON.stringify(e3)), i4 = void 0, e3 = this._getFlagBit(a3), true === s4 ? i4 = [e3] : o3 = [e3], c3 = { fromAccount: this._getMyUserID(), itemList: [] }, u3 = [], l3 = [], n3.forEach(function(e4) {
var t4;
- return d3._hasLocalConv(e4) ? Gt2(e4) || Pt2(e4) ? (t4 = { operationType: 1, contactItem: void 0, clearMark: o3, setMark: i4 }, Gt2(e4) ? t4.contactItem = { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } : Pt2(e4) && (t4.contactItem = { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") }), void c3.itemList.push(t4)) : (d3._onConvIDInvalid(l3, e4), true) : (d3._onConvNotFound(l3, e4), true);
+ return d3._hasLocalConv(e4) ? bt2(e4) || wt2(e4) ? (t4 = { operationType: 1, contactItem: void 0, clearMark: o3, setMark: i4 }, bt2(e4) ? t4.contactItem = { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } : wt2(e4) && (t4.contactItem = { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") }), void c3.itemList.push(t4)) : (d3._onConvIDInvalid(l3, e4), true) : (d3._onConvNotFound(l3, e4), true);
}), l3.length === n3.length ? D2({ successConversationIDList: u3, failureConversationIDList: l3 }) : this._convM.req({ P: G2.MARK_CONV, data: c3 }).then(function(e4) {
r4.end(), M2.l("".concat(t3, " ok"));
var n4, o4, i5, e4 = e4.data.resultItem;
return O2(e4) && (i5 = false, e4.forEach(function(e5) {
var t4;
- n4 = d3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (u3.push(n4), (o4 = d3._getLocalConv(n4)) && (t4 = o4.markList.indexOf(s4), true === a3 ? -1 === t4 && (o4.markList.push(s4), i5 = true) : -1 !== t4 && (o4.markList.splice(t4, 1), i5 = true))) : l3.push({ conversationID: n4, code: e5.resultCode, message: e5.resultInfo });
+ n4 = d3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (u3.push(n4), (o4 = d3._getLocalConv(n4)) && (t4 = o4.markList.indexOf(a3), true === s4 ? -1 === t4 && (o4.markList.push(a3), i5 = true) : -1 !== t4 && (o4.markList.splice(t4, 1), i5 = true))) : l3.push({ conversationID: n4, code: e5.resultCode, message: e5.resultInfo });
}), true === i5) && d3._emitConvUpdate(), T2({ successConversationIDList: u3, failureConversationIDList: l3 });
}).catch(function(e4) {
return r4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this._convM.noUse("markConv");
} }, { key: "getLocalConvGroupList", value: function() {
var e3 = this;
- return M2.l("".concat(this._n, ".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === bn ? this.getRemoteConvGroupList().then(function() {
+ return M2.l("".concat(this._n, ".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === qn ? this.getRemoteConvGroupList().then(function() {
return T2(d2(e3._convGroupMap.values()));
}) : D2(d2(this._convGroupMap.values()));
} }, { key: "searchConvGroupAndMark", value: function(e3, t3) {
@@ -11141,95 +11148,95 @@ var chat = { exports: {} };
n3._convGroupMap.set(t3, e4);
});
} }, { key: "_handleContactItem", value: function(e3) {
- var s4, a3 = this;
+ var a3, s4 = this;
O2(e3) && e3.forEach(function(e4) {
var t3 = [], n3 = e4.standardMark, o3 = e4.customData, i4 = e4.convGroupIDList;
O2(i4) && i4.forEach(function(e5) {
- a3._convGroupMap.has(e5) && t3.push(a3._convGroupMap.get(e5));
- }), s4 = a3._concatConvID(e4), (s4 = a3._getLocalConv(s4)) && (s4.markList = Xt2(n3), s4.customData = o3 || "", s4.conversationGroupList = [].concat(t3));
+ s4._convGroupMap.has(e5) && t3.push(s4._convGroupMap.get(e5));
+ }), a3 = s4._concatConvID(e4), (a3 = s4._getLocalConv(a3)) && (a3.markList = $t2(n3), a3.customData = o3 || "", a3.conversationGroupList = [].concat(t3));
});
} }, { key: "getRemoteConvGroupList", value: function() {
- var i4 = this, s4 = "".concat(this._n, ".getRemoteConvGroupList");
- return this._pagingStatus = Pn, this._convM.req({ P: G2.GET_CONV_GRP_LIST, data: { fromAccount: this._getMyUserID(), startIndex: this._startIndex } }).then(function(e3) {
+ var i4 = this, a3 = "".concat(this._n, ".getRemoteConvGroupList");
+ return this._pagingStatus = wn, this._convM.req({ P: G2.GET_CONV_GRP_LIST, data: { fromAccount: this._getMyUserID(), startIndex: this._startIndex } }).then(function(e3) {
var e3 = e3.data, t3 = e3.completeFlag, n3 = e3.contactItem, o3 = e3.nextStartIndex, o3 = void 0 === o3 ? 0 : o3, e3 = e3.groupItem;
- if (i4._startIndex = o3, M2.l("".concat(s4, " completeFlag:").concat(t3, " nextStartIndex:").concat(o3, ", groupItem:"), e3, "contactItem:", n3), i4._fillConvGroupMap(e3), i4._handleContactItem(n3), 0 === t3)
+ if (i4._startIndex = o3, M2.l("".concat(a3, " completeFlag:").concat(t3, " nextStartIndex:").concat(o3, ", groupItem:"), e3, "contactItem:", n3), i4._fillConvGroupMap(e3), i4._handleContactItem(n3), 0 === t3)
return i4.getRemoteConvGroupList();
- 1 === t3 && (i4._pagingStatus = Un, i4._emitConvUpdate(), i4._emitConvGroupListUpdate());
+ 1 === t3 && (i4._pagingStatus = Fn, i4._emitConvUpdate(), i4._emitConvGroupListUpdate());
}).catch(function(e3) {
- i4._pagingStatus = bn, M2.w("".concat(s4, " failed. error:"), e3);
+ i4._pagingStatus = qn, M2.w("".concat(a3, " failed. error:"), e3);
});
} }, { key: "createConvGroup", value: function(e3) {
- var s4, a3, r4, t3, c3, u3, l3 = this;
- return this._convM.canIUse(g2.CONV_GROUP) ? (s4 = "".concat(this._n, ".").concat("createConvGroup"), M2.l("".concat(s4, " options:"), e3), (a3 = new P2("createConvGroup")).setMessage(JSON.stringify(e3)), r4 = e3.groupName, e3 = e3.conversationIDList, t3 = { fromAccount: this._getMyUserID(), itemList: [{ groupName: r4, contactItem: [] }] }, c3 = [], u3 = [], e3.forEach(function(e4) {
- return l3._hasLocalConv(e4) ? Gt2(e4) || Pt2(e4) ? void (Gt2(e4) ? t3.itemList[0].contactItem.push({ type: 1, toAccount: e4.replace(R2.CONV_C2C, "") }) : Pt2(e4) && t3.itemList[0].contactItem.push({ type: 2, groupID: e4.replace(R2.CONV_GROUP, "") })) : (l3._onConvIDInvalid(u3, e4), true) : (l3._onConvNotFound(u3, e4), true);
+ var a3, s4, r4, t3, c3, u3, l3 = this;
+ return this._convM.canIUse(g2.CONV_GROUP) ? (a3 = "".concat(this._n, ".").concat("createConvGroup"), M2.l("".concat(a3, " options:"), e3), (s4 = new P2("createConvGroup")).setMessage(JSON.stringify(e3)), r4 = e3.groupName, e3 = e3.conversationIDList, t3 = { fromAccount: this._getMyUserID(), itemList: [{ groupName: r4, contactItem: [] }] }, c3 = [], u3 = [], e3.forEach(function(e4) {
+ return l3._hasLocalConv(e4) ? bt2(e4) || wt2(e4) ? void (bt2(e4) ? t3.itemList[0].contactItem.push({ type: 1, toAccount: e4.replace(R2.CONV_C2C, "") }) : wt2(e4) && t3.itemList[0].contactItem.push({ type: 2, groupID: e4.replace(R2.CONV_GROUP, "") })) : (l3._onConvIDInvalid(u3, e4), true) : (l3._onConvNotFound(u3, e4), true);
}), u3.length === e3.length ? D2({ successConversationIDList: c3, failureConversationIDList: u3 }) : this._convM.req({ P: G2.CREATE_CONV_GRP, data: t3 }).then(function(e4) {
- a3.end(), M2.l("".concat(s4, " ok"));
+ s4.end(), M2.l("".concat(a3, " ok"));
var t4, n3, o3, e4 = e4.data.groupResultItem[0], i4 = e4.groupItem, e4 = e4.resultItem;
return m2(i4) && (l3._convGroupMap.set(i4.convGroupID, i4.groupName), l3._emitConvGroupListUpdate()), O2(e4) && (o3 = false, e4.forEach(function(e5) {
t4 = l3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (c3.push(t4), (n3 = l3._getLocalConv(t4)) && -1 === n3.conversationGroupList.indexOf(r4) && (n3.conversationGroupList.push(r4), o3 = true)) : u3.push({ conversationID: t4, code: e5.resultCode, message: e5.resultInfo });
}), true === o3) && (l3._emitConvUpdate(), l3._emitConvGroupListUpdate()), T2({ successConversationIDList: c3, failureConversationIDList: u3 });
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
})) : this._convM.noUse("createConvGroup");
} }, { key: "deleteConvGroup", value: function(n3) {
- var o3, i4, s4 = this;
+ var o3, i4, a3 = this;
return this._convM.canIUse(g2.CONV_GROUP) ? (o3 = "".concat(this._n, ".").concat("deleteConvGroup"), M2.l("".concat(o3, " groupName:").concat(n3)), (i4 = new P2("deleteConvGroup")).setMessage(n3), this._convM.req({ P: G2.DEL_CONV_GRP, data: { fromAccount: this._getMyUserID(), groupName: [n3] } }).then(function(e3) {
i4.end(), M2.l("".concat(o3, " ok"));
var t3, e3 = e3.data.groupItem;
O2(e3) && (t3 = false, e3.forEach(function(e4) {
- s4._convGroupMap.has(e4.convGroupID) && (s4._convGroupMap.delete(e4.convGroupID), t3 = true);
- }), true === t3) && s4._emitConvGroupListUpdate(), s4._eraseFromConversationGroupList([n3]);
+ a3._convGroupMap.has(e4.convGroupID) && (a3._convGroupMap.delete(e4.convGroupID), t3 = true);
+ }), true === t3) && a3._emitConvGroupListUpdate(), a3._eraseFromConversationGroupList([n3]);
}).catch(function(e3) {
return i4.setError(e3).end(), M2.e("".concat(o3, " failed. error:"), e3), E2(e3);
})) : this._convM.noUse("deleteConvGroup");
} }, { key: "renameConvGroup", value: function(e3) {
- var i4, s4, a3, r4, c3 = this;
- return this._convM.canIUse(g2.CONV_GROUP) ? (i4 = "".concat(this._n, ".").concat("renameConvGroup"), M2.l("".concat(i4, " options:"), e3), (s4 = new P2("renameConvGroup")).setMessage(JSON.stringify(e3)), a3 = e3.oldName, r4 = e3.newName, this._convM.req({ P: G2.RENAME_CONV_GRP, data: { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 1, oldName: a3, newName: r4 } } }).then(function(e4) {
- s4.end(), M2.l("".concat(i4, " ok"));
+ var i4, a3, s4, r4, c3 = this;
+ return this._convM.canIUse(g2.CONV_GROUP) ? (i4 = "".concat(this._n, ".").concat("renameConvGroup"), M2.l("".concat(i4, " options:"), e3), (a3 = new P2("renameConvGroup")).setMessage(JSON.stringify(e3)), s4 = e3.oldName, r4 = e3.newName, this._convM.req({ P: G2.RENAME_CONV_GRP, data: { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 1, oldName: s4, newName: r4 } } }).then(function(e4) {
+ a3.end(), M2.l("".concat(i4, " ok"));
e4 = e4.data.updateGroupResult.convGroupID;
c3._convGroupMap.set(e4, r4), c3._emitConvGroupListUpdate();
var t3, n3, e4 = c3._convM.getLocalConvList(), o3 = false;
e4.forEach(function(e5) {
- t3 = e5.conversationGroupList, -1 !== (n3 = t3.indexOf(a3)) && (t3.splice(n3, 1, r4), o3 = true);
+ t3 = e5.conversationGroupList, -1 !== (n3 = t3.indexOf(s4)) && (t3.splice(n3, 1, r4), o3 = true);
}), true === o3 && c3._emitConvUpdate();
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
})) : this._convM.noUse("renameConvGroup");
} }, { key: "addConvsToGroup", value: function(e3) {
- var i4, s4, t3, a3, n3, r4, c3, u3 = this;
- return this._convM.canIUse(g2.CONV_GROUP) ? (i4 = "".concat(this._n, ".").concat("addConvsToGroup"), M2.l("".concat(i4, " options:"), e3), (s4 = new P2("addConvsToGroup")).setMessage(JSON.stringify(e3)), t3 = e3.conversationIDList, a3 = e3.groupName, n3 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a3, updateItem: [] } }, r4 = [], c3 = [], t3.forEach(function(e4) {
- return u3._hasLocalConv(e4) ? Gt2(e4) || Pt2(e4) ? void (Gt2(e4) ? n3.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } }) : Pt2(e4) && n3.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") } })) : (u3._onConvIDInvalid(c3, e4), true) : (u3._onConvNotFound(c3, e4), true);
+ var i4, a3, t3, s4, n3, r4, c3, u3 = this;
+ return this._convM.canIUse(g2.CONV_GROUP) ? (i4 = "".concat(this._n, ".").concat("addConvsToGroup"), M2.l("".concat(i4, " options:"), e3), (a3 = new P2("addConvsToGroup")).setMessage(JSON.stringify(e3)), t3 = e3.conversationIDList, s4 = e3.groupName, n3 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: s4, updateItem: [] } }, r4 = [], c3 = [], t3.forEach(function(e4) {
+ return u3._hasLocalConv(e4) ? bt2(e4) || wt2(e4) ? void (bt2(e4) ? n3.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } }) : wt2(e4) && n3.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") } })) : (u3._onConvIDInvalid(c3, e4), true) : (u3._onConvNotFound(c3, e4), true);
}), c3.length === t3.length ? D2({ successConversationIDList: r4, failureConversationIDList: c3 }) : this._convM.req({ P: G2.ADD_CONV_TO_GRP, data: n3 }).then(function(e4) {
- s4.end(), M2.l("".concat(i4, " ok"));
+ a3.end(), M2.l("".concat(i4, " ok"));
var t4, n4, o3, e4 = e4.data.updateGroupResult.contactResultItem;
return O2(e4) && (o3 = false, e4.forEach(function(e5) {
- t4 = u3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (n4 = u3._getLocalConv(t4)) && -1 === n4.conversationGroupList.indexOf(a3) && (n4.conversationGroupList.push(a3), r4.push(t4), o3 = true) : c3.push({ conversationID: t4, code: e5.resultCode, message: e5.resultInfo });
- }), true === o3) && (u3._emitConvUpdate(), u3._emitConvInGroupUpdate(a3)), T2({ successConversationIDList: r4, failureConversationIDList: c3 });
+ t4 = u3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (n4 = u3._getLocalConv(t4)) && -1 === n4.conversationGroupList.indexOf(s4) && (n4.conversationGroupList.push(s4), r4.push(t4), o3 = true) : c3.push({ conversationID: t4, code: e5.resultCode, message: e5.resultInfo });
+ }), true === o3) && (u3._emitConvUpdate(), u3._emitConvInGroupUpdate(s4)), T2({ successConversationIDList: r4, failureConversationIDList: c3 });
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
})) : this._convM.noUse("addConvsToGroup");
} }, { key: "deleteConvsFromGroup", value: function(e3) {
- var t3, s4, n3, a3, o3, r4, c3, u3 = this, i4 = "deleteConvsFromGroup";
- return this._convM.canIUse(g2.CONV_GROUP) ? (t3 = "".concat(this._n, ".").concat(i4), M2.l("".concat(t3, " options:"), e3), (s4 = new P2(i4)).setMessage(JSON.stringify(e3)), n3 = e3.conversationIDList, a3 = e3.groupName, o3 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a3, updateItem: [] } }, r4 = [], c3 = [], n3.forEach(function(e4) {
- return u3._hasLocalConv(e4) ? Gt2(e4) || Pt2(e4) ? void (Gt2(e4) ? o3.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } }) : Pt2(e4) && o3.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") } })) : (u3._onConvIDInvalid(c3, e4), true) : (u3._onConvNotFound(c3, e4), true);
+ var t3, a3, n3, s4, o3, r4, c3, u3 = this, i4 = "deleteConvsFromGroup";
+ return this._convM.canIUse(g2.CONV_GROUP) ? (t3 = "".concat(this._n, ".").concat(i4), M2.l("".concat(t3, " options:"), e3), (a3 = new P2(i4)).setMessage(JSON.stringify(e3)), n3 = e3.conversationIDList, s4 = e3.groupName, o3 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: s4, updateItem: [] } }, r4 = [], c3 = [], n3.forEach(function(e4) {
+ return u3._hasLocalConv(e4) ? bt2(e4) || wt2(e4) ? void (bt2(e4) ? o3.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 1, toAccount: e4.replace(R2.CONV_C2C, "") } }) : wt2(e4) && o3.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 2, groupID: e4.replace(R2.CONV_GROUP, "") } })) : (u3._onConvIDInvalid(c3, e4), true) : (u3._onConvNotFound(c3, e4), true);
}), c3.length === n3.length ? D2({ successConversationIDList: r4, failureConversationIDList: c3 }) : this._convM.req({ P: G2.DEL_CONV_FROM_GRP, data: o3 }).then(function(e4) {
- s4.end(), M2.l("".concat(t3, " ok"));
+ a3.end(), M2.l("".concat(t3, " ok"));
var n4, o4, i5, e4 = e4.data.updateGroupResult.contactResultItem;
return O2(e4) && (i5 = false, e4.forEach(function(e5) {
var t4;
- n4 = u3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (o4 = u3._getLocalConv(n4)) && -1 !== (t4 = o4.conversationGroupList.indexOf(a3)) && (o4.conversationGroupList.splice(t4, 1), r4.push(n4), i5 = true) : c3.push({ conversationID: n4, code: e5.resultCode, message: e5.resultInfo });
- }), true === i5) && (u3._emitConvUpdate(), u3._emitConvInGroupUpdate(a3)), T2({ successConversationIDList: r4, failureConversationIDList: c3 });
+ n4 = u3._concatConvID(e5.contactItem), 0 === e5.resultCode ? (o4 = u3._getLocalConv(n4)) && -1 !== (t4 = o4.conversationGroupList.indexOf(s4)) && (o4.conversationGroupList.splice(t4, 1), r4.push(n4), i5 = true) : c3.push({ conversationID: n4, code: e5.resultCode, message: e5.resultInfo });
+ }), true === i5) && (u3._emitConvUpdate(), u3._emitConvInGroupUpdate(s4)), T2({ successConversationIDList: r4, failureConversationIDList: c3 });
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this._convM.noUse(i4);
} }, { key: "onConvMarkUpdated", value: function(e3) {
- var i4, s4, a3 = this;
- S2(e3) || (M2.l("".concat(this._n, ".onConvMarkUpdated markItemList:"), e3), s4 = false, e3.forEach(function(e4) {
+ var i4, a3, s4 = this;
+ S2(e3) || (M2.l("".concat(this._n, ".onConvMarkUpdated markItemList:"), e3), a3 = false, e3.forEach(function(e4) {
var t3 = e4.recentContactItem, n3 = e4.optType, o3 = e4.standardMark, e4 = e4.customMark;
- i4 = a3._concatConvID(t3), (i4 = a3._getLocalConv(i4)) && (1 === n3 ? s4 = a3._diffStandardMark(i4, o3) : 2 === n3 ? s4 = a3._diffCustomMark(i4, e4) : 3 === n3 && (t3 = a3._diffStandardMark(i4, o3), n3 = a3._diffCustomMark(i4, e4), s4 = t3 || n3));
- }), true === s4 && this._emitConvUpdate());
+ i4 = s4._concatConvID(t3), (i4 = s4._getLocalConv(i4)) && (1 === n3 ? a3 = s4._diffStandardMark(i4, o3) : 2 === n3 ? a3 = s4._diffCustomMark(i4, e4) : 3 === n3 && (t3 = s4._diffStandardMark(i4, o3), n3 = s4._diffCustomMark(i4, e4), a3 = t3 || n3));
+ }), true === a3 && this._emitConvUpdate());
} }, { key: "_diffStandardMark", value: function(e3, t3) {
- var t3 = Xt2(t3), n3 = false;
+ var t3 = $t2(t3), n3 = false;
return true !== function(e4, t4) {
if (e4 !== t4) {
if (!e4 || !t4)
@@ -11246,15 +11253,15 @@ var chat = { exports: {} };
var n3 = false;
return e3.customData !== t3 && void 0 !== t3 && (e3.customData = t3, n3 = true), n3;
} }, { key: "onConvGroupCreated", value: function(e3) {
- var s4 = this, a3 = (M2.l("".concat(this._n, ".onConvGroupCreated resultList:"), e3), false), r4 = false;
+ var a3 = this, s4 = (M2.l("".concat(this._n, ".onConvGroupCreated resultList:"), e3), false), r4 = false;
O2(e3) && (e3.forEach(function(e4) {
var t3 = e4.msgGroupItem, n3 = t3.groupID, o3 = t3.groupName;
- s4._convGroupMap.get(n3) !== o3 && (s4._convGroupMap.set(n3, o3), r4 = true);
+ a3._convGroupMap.get(n3) !== o3 && (a3._convGroupMap.set(n3, o3), r4 = true);
var i4, t3 = e4.msgRecentContactItem;
O2(t3) && t3.forEach(function(e5) {
- i4 = s4._concatConvID(e5), (i4 = s4._getLocalConv(i4)) && -1 === i4.conversationGroupList.indexOf(o3) && (i4.conversationGroupList.push(o3), a3 = true);
+ i4 = a3._concatConvID(e5), (i4 = a3._getLocalConv(i4)) && -1 === i4.conversationGroupList.indexOf(o3) && (i4.conversationGroupList.push(o3), s4 = true);
});
- }), true === a3 && this._emitConvUpdate(), true === r4) && this._emitConvGroupListUpdate();
+ }), true === s4 && this._emitConvUpdate(), true === r4) && this._emitConvGroupListUpdate();
} }, { key: "onConvGroupDeleted", value: function(e3) {
var n3, o3 = this, i4 = (M2.l("".concat(this._n, ".onConvGroupDeleted groupItemList:"), e3), []);
O2(e3) && (n3 = false, e3.forEach(function(e4) {
@@ -11269,21 +11276,21 @@ var chat = { exports: {} };
}), this._emitConvUpdate());
} }, { key: "onConvGroupNameUpdated", value: function(e3) {
M2.l("".concat(this._n, ".onConvGroupNameUpdated options:"), e3);
- var t3, n3, o3, i4 = e3.groupID, s4 = e3.groupName, a3 = e3.oldGroupName;
- this._convGroupMap.get(i4) !== s4 && (this._convGroupMap.set(i4, s4), this._emitConvGroupListUpdate(), e3 = this._convM.getLocalConvList(), o3 = false, e3.forEach(function(e4) {
- t3 = e4.conversationGroupList, -1 !== (n3 = t3.indexOf(a3)) && (t3.splice(n3, 1, s4), o3 = true);
+ var t3, n3, o3, i4 = e3.groupID, a3 = e3.groupName, s4 = e3.oldGroupName;
+ this._convGroupMap.get(i4) !== a3 && (this._convGroupMap.set(i4, a3), this._emitConvGroupListUpdate(), e3 = this._convM.getLocalConvList(), o3 = false, e3.forEach(function(e4) {
+ t3 = e4.conversationGroupList, -1 !== (n3 = t3.indexOf(s4)) && (t3.splice(n3, 1, a3), o3 = true);
}), true === o3) && this._emitConvUpdate();
} }, { key: "onConvInGroupUpdated", value: function(e3) {
- var n3, o3, i4, s4 = this, a3 = (M2.l("".concat(this._n, ".onConvInGroupUpdated options:"), e3), e3.oldGroupName), e3 = e3.recentContactUpdateGroupItem;
+ var n3, o3, i4, a3 = this, s4 = (M2.l("".concat(this._n, ".onConvInGroupUpdated options:"), e3), e3.oldGroupName), e3 = e3.recentContactUpdateGroupItem;
O2(e3) && (i4 = false, e3.forEach(function(e4) {
var t3 = e4.contactOptType, e4 = e4.recentContactItem;
- n3 = s4._concatConvID(e4), (n3 = s4._getLocalConv(n3)) && (o3 = n3.conversationGroupList.indexOf(a3), 1 === t3 ? -1 === o3 && (n3.conversationGroupList.push(a3), i4 = true) : 2 === t3 && -1 !== o3 && (n3.conversationGroupList.splice(o3, 1), i4 = true));
- }), true === i4) && (this._emitConvUpdate(), this._emitConvInGroupUpdate(a3));
+ n3 = a3._concatConvID(e4), (n3 = a3._getLocalConv(n3)) && (o3 = n3.conversationGroupList.indexOf(s4), 1 === t3 ? -1 === o3 && (n3.conversationGroupList.push(s4), i4 = true) : 2 === t3 && -1 !== o3 && (n3.conversationGroupList.splice(o3, 1), i4 = true));
+ }), true === i4) && (this._emitConvUpdate(), this._emitConvInGroupUpdate(s4));
} }, { key: "onConvAddedToOrDeletedFromGroup", value: function(e3) {
- var n3, o3, i4 = this, t3 = (M2.l("".concat(this._n, ".onConvAddedToOrDeletedFromGroup options:"), e3), e3.msgRecentContactItem), e3 = e3.msgRecentContactUpdateContactItem, t3 = this._concatConvID(t3), s4 = this._getLocalConv(t3);
- s4 && O2(e3) && (o3 = false, e3.forEach(function(e4) {
+ var n3, o3, i4 = this, t3 = (M2.l("".concat(this._n, ".onConvAddedToOrDeletedFromGroup options:"), e3), e3.msgRecentContactItem), e3 = e3.msgRecentContactUpdateContactItem, t3 = this._concatConvID(t3), a3 = this._getLocalConv(t3);
+ a3 && O2(e3) && (o3 = false, e3.forEach(function(e4) {
var t4 = e4.groupOptType, e4 = e4.recentContactGroupItem.groupName;
- n3 = s4.conversationGroupList.indexOf(e4), 1 === t4 ? -1 === n3 && (s4.conversationGroupList.push(e4), o3 = true) : 2 === t4 && -1 !== n3 && (s4.conversationGroupList.splice(n3, 1), o3 = true), true === o3 && i4._emitConvInGroupUpdate(e4);
+ n3 = a3.conversationGroupList.indexOf(e4), 1 === t4 ? -1 === n3 && (a3.conversationGroupList.push(e4), o3 = true) : 2 === t4 && -1 !== n3 && (a3.conversationGroupList.splice(n3, 1), o3 = true), true === o3 && i4._emitConvInGroupUpdate(e4);
}), true === o3) && this._emitConvUpdate();
} }, { key: "onConvGroupListSynced", value: function(e3) {
O2(e3) && 0 !== e3.length && (M2.l("".concat(this._n, ".onConvGroupListSynced groupItem:"), e3), this._fillConvGroupMap(e3));
@@ -11320,22 +11327,22 @@ var chat = { exports: {} };
return e4.conversationGroupList.includes(t3);
}), this._convM.emitOEvt(h2.CONVERSATION_IN_GROUP_UPDATED, e3);
} }, { key: "reset", value: function() {
- M2.l("".concat(this._n, ".reset")), this._convGroupMap.clear(), this._startIndex = 0, this._pagingStatus = Gn;
- } }]), Ko = (t2(Ii, c2), e2(Ii, [{ key: "_initListeners", value: function() {
+ M2.l("".concat(this._n, ".reset")), this._convGroupMap.clear(), this._startIndex = 0, this._pagingStatus = bn;
+ } }]), Zo = (t2(Li, c2), e2(Li, [{ key: "_initListeners", value: function() {
var e3 = this.getIEmitInst();
e3.on(U2.A2KEY_AND_TINYID_UPDATED, this._init, this), e3.on(U2.PROFILE_UPDATED, this._onProfileUpdated, this), e3.on(U2.CLOUD_CONFIG, this._onCloudConfig, this);
} }, { key: "_init", value: function() {
var e3 = this, t3 = (M2.l("".concat(this._n, "._init")), this.get(13).getItem("conversationMap")), n3 = this.isIntl(), o3 = this.isUsingChatCore();
if (t3) {
- for (var i4 = t3.length, s4 = 0; s4 < i4; s4++) {
- var a3 = t3[s4];
- if (a3) {
- if (this._isNonExistentAccount(a3.conversationID))
+ for (var i4 = t3.length, a3 = 0; a3 < i4; a3++) {
+ var s4 = t3[a3];
+ if (s4) {
+ if (this._isNonExistentAccount(s4.conversationID))
continue;
- if (a3.groupProfile && At2(a3.groupProfile.type))
+ if (s4.groupProfile && Gt2(s4.groupProfile.type))
continue;
}
- this._convMap.set(a3.conversationID, new xo(t3[s4], n3, o3));
+ this._convMap.set(s4.conversationID, new jo(t3[a3], n3, o3));
}
this.emitConvUpdate(true, false);
}
@@ -11352,12 +11359,12 @@ var chat = { exports: {} };
} }, { key: "onNewMessage", value: function(e3) {
this._onSendOrRcvMsg(e3);
} }, { key: "_onSendOrRcvMsg", value: function(e3) {
- var t3 = this, n3 = e3.conversationOptionsList, o3 = e3.isInstantMessage, o3 = void 0 === o3 || o3, i4 = e3.isUnreadC2CMessage, i4 = void 0 !== i4 && i4, s4 = e3.updateUnreadCount, s4 = void 0 === s4 || s4, a3 = e3.isSyncingEnded, a3 = void 0 !== a3 && a3;
- this._isReady ? 0 !== n3.length ? (true === o3 && this._checkNewConv(n3), this._updateLocalConvList({ conversationOptionsList: n3, isInstantMessage: o3, isUnreadC2CMessage: i4, isFromGetConversations: false, updateUnreadCount: s4 }), o3 || (this._convIDFromUnreadDBMap = new Map([].concat(d2(this._convIDFromUnreadDBMap), d2(n3.map(function(e4) {
+ var t3 = this, n3 = e3.conversationOptionsList, o3 = e3.isInstantMessage, o3 = void 0 === o3 || o3, i4 = e3.isUnreadC2CMessage, i4 = void 0 !== i4 && i4, a3 = e3.updateUnreadCount, a3 = void 0 === a3 || a3, s4 = e3.isSyncingEnded, s4 = void 0 !== s4 && s4;
+ this._isReady ? 0 !== n3.length ? (true === o3 && this._checkNewConv(n3), this._updateLocalConvList({ conversationOptionsList: n3, isInstantMessage: o3, isUnreadC2CMessage: i4, isFromGetConversations: false, updateUnreadCount: a3 }), o3 || (this._convIDFromUnreadDBMap = new Map([].concat(d2(this._convIDFromUnreadDBMap), d2(n3.map(function(e4) {
return [e4.conversationID, 1];
- })))), this._diffAndDeleteConv(), a3 && this.emitIEvt(U2.C2C_UNREAD_HANDLE_COMPLETED)), 0 < n3.filter(function(e4) {
+ })))), this._diffAndDeleteConv(), s4 && this.emitIEvt(U2.C2C_UNREAD_HANDLE_COMPLETED)), 0 < n3.filter(function(e4) {
return !t3._isConvNeedShow(e4.conversationID);
- }).length || this.emitConvUpdate()) : a3 && this.emitIEvt(U2.C2C_UNREAD_HANDLE_COMPLETED) : this.ready(function() {
+ }).length || this.emitConvUpdate()) : s4 && this.emitIEvt(U2.C2C_UNREAD_HANDLE_COMPLETED) : this.ready(function() {
t3._onSendOrRcvMsg(e3);
});
} }, { key: "updateConvGroupProfile", value: function(e3) {
@@ -11367,9 +11374,9 @@ var chat = { exports: {} };
o3._convMap.has(t3) && (n3 = true, (t3 = o3._convMap.get(t3)).groupProfile = JSON.parse(JSON.stringify(e4)), t3.lastMessage.lastSequence < e4.nextMessageSeq && (t3.lastMessage.lastSequence = e4.nextMessageSeq - 1), t3.subType || (t3.subType = e4.type));
}), n3 && this.emitConvUpdate(true, false)) : this._tmpGroupList = e3);
} }, { key: "onMessageRevoked", value: function(e3, t3) {
- var n3, o3, i4, s4 = this;
+ var n3, o3, i4, a3 = this;
0 !== e3.length && (n3 = null, o3 = false, i4 = [], e3.forEach(function(e4) {
- (n3 = s4._convMap.get(e4.conversationID)) && (t3 && n3.reduceUnreadCount() && (o3 = n3.type !== R2.CONV_TOPIC), n3.type === R2.CONV_TOPIC ? i4.push(e4) : n3.isLastMessageRevoked({ sequence: e4.sequence, time: e4.time }) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), o3 = true));
+ (n3 = a3._convMap.get(e4.conversationID)) && (t3 && n3.reduceUnreadCount() && (o3 = n3.type !== R2.CONV_TOPIC), n3.type === R2.CONV_TOPIC ? i4.push(e4) : n3.isLastMessageRevoked({ sequence: e4.sequence, time: e4.time }) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), o3 = true));
}), this.get(10).onMessageRevoked(i4), o3) && this.emitConvUpdate(true, false);
} }, { key: "updateRevokerInfo", value: function(u3) {
for (var e3 = /* @__PURE__ */ new Set(), t3 = 0; t3 < u3.length; t3++) {
@@ -11385,8 +11392,8 @@ var chat = { exports: {} };
var t4, n4 = {}, o4 = F2(e4);
try {
for (o4.s(); !(t4 = o4.n()).done; ) {
- var i5 = t4.value, s4 = i5.userID, a3 = i5.nick, r4 = i5.avatar;
- n4[s4] = { nick: a3, avatar: r4 };
+ var i5 = t4.value, a3 = i5.userID, s4 = i5.nick, r4 = i5.avatar;
+ n4[a3] = { nick: s4, avatar: r4 };
}
} catch (e5) {
o4.e(e5);
@@ -11402,8 +11409,8 @@ var chat = { exports: {} };
});
});
} }, { key: "isLastMessageRevoked", value: function(e3) {
- var t3 = false, n3 = e3.conversationID, o3 = e3.sequence, i4 = e3.time, s4 = this._convMap.get(n3);
- return s4 && (t3 = s4.type === R2.CONV_TOPIC ? this.get(10).isLastMessageRevoked({ topicID: n3.replace(R2.CONV_GROUP, ""), sequence: o3 }) : s4.isLastMessageRevoked({ sequence: o3, time: i4 })), M2.l("".concat(this._n, ".isLastMessageRevoked options:"), e3, "ret:".concat(t3)), t3;
+ var t3 = false, n3 = e3.conversationID, o3 = e3.sequence, i4 = e3.time, a3 = this._convMap.get(n3);
+ return a3 && (t3 = a3.type === R2.CONV_TOPIC ? this.get(10).isLastMessageRevoked({ topicID: n3.replace(R2.CONV_GROUP, ""), sequence: o3 }) : a3.isLastMessageRevoked({ sequence: o3, time: i4 })), M2.l("".concat(this._n, ".isLastMessageRevoked options:"), e3, "ret:".concat(t3)), t3;
} }, { key: "onMessageDeleted", value: function(e3) {
var t3 = this;
if (0 !== e3.length) {
@@ -11411,28 +11418,28 @@ var chat = { exports: {} };
e3.forEach(function(e4) {
(n3 = t3._msgListHandler.getLocalMsg(e4.conversationID, e4.ID)) && (n3.isDeleted = true), e4 !== n3 && (e4.isDeleted = true);
});
- for (var e3 = e3[0].conversationID, o3 = this._msgListHandler.getLocalMsgList(e3), i4 = {}, s4 = o3.length - 1; 0 <= s4; s4--)
- if (!o3[s4].isDeleted) {
- i4 = o3[s4];
+ for (var e3 = e3[0].conversationID, o3 = this._msgListHandler.getLocalMsgList(e3), i4 = {}, a3 = o3.length - 1; 0 <= a3; a3--)
+ if (!o3[a3].isDeleted) {
+ i4 = o3[a3];
break;
}
- var a3, r4 = this._convMap.get(e3);
- r4 && (a3 = false, r4.lastMessage.lastSequence === i4.sequence && r4.lastMessage.lastTime === i4.time || (S2(i4) && (i4 = void 0), r4.updateLastMessage(i4), r4.type !== R2.CONV_TOPIC && (a3 = true), M2.l("".concat(this._n, ".onMessageDeleted. update convID:").concat(e3, " with lastMessage:"), r4.lastMessage)), e3.startsWith(R2.CONV_C2C) && this.updateUnreadCount(e3), a3) && this.emitConvUpdate(true, false);
+ var s4, r4 = this._convMap.get(e3);
+ r4 && (s4 = false, r4.lastMessage.lastSequence === i4.sequence && r4.lastMessage.lastTime === i4.time || (S2(i4) && (i4 = void 0), r4.updateLastMessage(i4), r4.type !== R2.CONV_TOPIC && (s4 = true), M2.l("".concat(this._n, ".onMessageDeleted. update convID:").concat(e3, " with lastMessage:"), r4.lastMessage)), e3.startsWith(R2.CONV_C2C) && this.updateUnreadCount(e3), s4) && this.emitConvUpdate(true, false);
}
} }, { key: "onMessageModified", value: function(e3) {
- var t3 = "".concat(this._n, ".onMessageModified"), n3 = e3.conversationType, o3 = e3.from, i4 = e3.to, s4 = e3.time, a3 = e3.sequence, r4 = e3.elements, c3 = e3.cloudCustomData, u3 = e3.messageVersion, l3 = this.getMyUserID(), d3 = "".concat(n3).concat(i4), l3 = (i4 === l3 && n3 === R2.CONV_C2C && (d3 = "".concat(n3).concat(o3)), this._msgListHandler.onMsgModified(d3, e3)), n3 = l3.isUpdated, l3 = l3.message, p4 = (true === n3 && this.emitOEvt(h2.MESSAGE_MODIFIED, [l3]), this._isTopicConv(d3));
- return null === l3 ? M2.l("".concat(t3, " message is null! options:"), e3) : M2.l("".concat(t3, " isUpdated:").concat(n3, " isTopicMessage:").concat(p4, " from:").concat(o3, " to:").concat(i4, " sequence:").concat(l3.sequence, " time:").concat(l3.time)), p4 ? this.get(10).onMessageModified(e3) : (n3 = this._convMap.get(d3)) && (o3 = n3.lastMessage) && o3.lastTime === s4 && o3.lastSequence === a3 && o3.version !== u3 && (M2.l("".concat(t3, " convID:").concat(d3, " lastMessage updated")), o3.type = r4[0].type, o3.payload = r4[0].content, o3.messageForShow = Jt2(o3.type, o3.payload, this.isIntl()), o3.cloudCustomData = c3, o3.version = u3, this.emitConvUpdate(true, false)), l3;
+ var t3 = "".concat(this._n, ".onMessageModified"), n3 = e3.conversationType, o3 = e3.from, i4 = e3.to, a3 = e3.time, s4 = e3.sequence, r4 = e3.elements, c3 = e3.cloudCustomData, u3 = e3.messageVersion, l3 = this.getMyUserID(), d3 = "".concat(n3).concat(i4), l3 = (i4 === l3 && n3 === R2.CONV_C2C && (d3 = "".concat(n3).concat(o3)), this._msgListHandler.onMsgModified(d3, e3)), n3 = l3.isUpdated, l3 = l3.message, p4 = (true === n3 && this.emitOEvt(h2.MESSAGE_MODIFIED, [l3]), this._isTopicConv(d3));
+ return null === l3 ? M2.l("".concat(t3, " message is null! options:"), e3) : M2.l("".concat(t3, " isUpdated:").concat(n3, " isTopicMessage:").concat(p4, " from:").concat(o3, " to:").concat(i4, " sequence:").concat(l3.sequence, " time:").concat(l3.time)), p4 ? this.get(10).onMessageModified(e3) : (n3 = this._convMap.get(d3)) && (o3 = n3.lastMessage) && o3.lastTime === a3 && o3.lastSequence === s4 && o3.version !== u3 && (M2.l("".concat(t3, " convID:").concat(d3, " lastMessage updated")), o3.type = r4[0].type, o3.payload = r4[0].content, o3.messageForShow = Zt2(o3.type, o3.payload, this.isIntl()), o3.cloudCustomData = c3, o3.version = u3, this.emitConvUpdate(true, false)), l3;
} }, { key: "onNewGroupAtTips", value: function(e3) {
var t3 = this, e3 = e3.dataList, n3 = null;
e3.forEach(function(e4) {
e4.groupAtTips ? n3 = e4.groupAtTips : e4.elements ? n3 = y2(y2({}, e4.elements), {}, { sync: true }) : e4.groupAtType && (n3 = y2(y2({}, e4), {}, { sync: true })), n3.__random = e4.random, n3.__sequence = e4.clientSequence, t3._tmpGroupAtTipsList.push(n3);
}), M2.l("".concat(this._n, ".onNewGroupAtTips isReady:").concat(this._isReady), this._tmpGroupAtTipsList), this._isReady && this._handleGroupAtTipsList();
} }, { key: "_handleGroupAtTipsList", value: function() {
- var s4, a3 = this;
- 0 !== this._tmpGroupAtTipsList.length && (s4 = false, this._tmpGroupAtTipsList.forEach(function(e3) {
+ var a3, s4 = this;
+ 0 !== this._tmpGroupAtTipsList.length && (a3 = false, this._tmpGroupAtTipsList.forEach(function(e3) {
var t3 = e3.groupID, n3 = e3.from, o3 = e3.topicID, o3 = void 0 === o3 ? void 0 : o3, i4 = e3.sync, i4 = void 0 !== i4 && i4;
- n3 !== a3.getMyUserID() && (N3(o3) ? (n3 = a3._convMap.get("".concat(R2.CONV_GROUP).concat(t3))) && (n3.updateGroupAtInfoList(e3), s4 = true) : ((t3 = a3._convMap.get("".concat(R2.CONV_GROUP).concat(o3))) && (t3.updateGroupAtInfoList(e3), a3.get(10).onAtInfoUpdated({ topicID: o3, groupAtInfoList: t3.groupAtInfoList })), S2(t3) && i4 && (a3.updateTopicConversation([{ conversationID: "".concat(R2.CONV_GROUP).concat(o3), type: R2.CONV_TOPIC }]), a3._convMap.get("".concat(R2.CONV_GROUP).concat(o3)).updateGroupAtInfoList(e3))));
- }), s4 && this.emitConvUpdate(true, false), this._tmpGroupAtTipsList.length = 0);
+ n3 !== s4.getMyUserID() && (N3(o3) ? (n3 = s4._convMap.get("".concat(R2.CONV_GROUP).concat(t3))) && (n3.updateGroupAtInfoList(e3), a3 = true) : ((t3 = s4._convMap.get("".concat(R2.CONV_GROUP).concat(o3))) && (t3.updateGroupAtInfoList(e3), s4.get(10).onAtInfoUpdated({ topicID: o3, groupAtInfoList: t3.groupAtInfoList })), S2(t3) && i4 && (s4.updateTopicConversation([{ conversationID: "".concat(R2.CONV_GROUP).concat(o3), type: R2.CONV_TOPIC }]), s4._convMap.get("".concat(R2.CONV_GROUP).concat(o3)).updateGroupAtInfoList(e3))));
+ }), a3 && this.emitConvUpdate(true, false), this._tmpGroupAtTipsList.length = 0);
} }, { key: "_checkNewConv", value: function(e3) {
var t3 = this, n3 = [], o3 = [];
e3.forEach(function(e4) {
@@ -11453,13 +11460,13 @@ var chat = { exports: {} };
this.get(13).setItem("conversationMap", t3, e3);
} }, { key: "emitConvUpdate", value: function() {
var e3 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], t3 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConvList();
- t3 && (t3 = this.get(7)) && t3.updateGroupLastMessage(n3), e3 && (this.get(12).isPartialUpdatedConvs() ? (this._diffConvMap(this._convMapForDiff, this._convMap), 0 < this._partialUpdatedConvMap.size && (this.emitOEvt(h2.CONVERSATION_LIST_UPDATED), this.onTotalUnreadCountUpdate(), this._convMapForDiff.clear(), this._convMapForDiff = pt2(this._convMap, true)), 0 === this._convMapForDiff.size && (this._convMapForDiff = pt2(this._convMap, true))) : (this.emitOEvt(h2.CONVERSATION_LIST_UPDATED), this.onTotalUnreadCountUpdate()));
+ t3 && (t3 = this.get(7)) && t3.updateGroupLastMessage(n3), e3 && (this.get(12).isPartialUpdatedConvs() ? (this._diffConvMap(this._convMapForDiff, this._convMap), 0 < this._partialUpdatedConvMap.size && (this.emitOEvt(h2.CONVERSATION_LIST_UPDATED), this.onTotalUnreadCountUpdate(), this._convMapForDiff.clear(), this._convMapForDiff = gt2(this._convMap, true)), 0 === this._convMapForDiff.size && (this._convMapForDiff = gt2(this._convMap, true))) : (this.emitOEvt(h2.CONVERSATION_LIST_UPDATED), this.onTotalUnreadCountUpdate()));
} }, { key: "_diffConvMap", value: function(e3, t3) {
var n3, o3 = F2(t3);
try {
for (o3.s(); !(n3 = o3.n()).done; ) {
- var i4 = j2(n3.value, 2), s4 = i4[0], a3 = i4[1];
- e3.has(s4) && JSON.stringify(a3) === e3.get(s4) || this._partialUpdatedConvMap.set(s4, a3);
+ var i4 = j2(n3.value, 2), a3 = i4[0], s4 = i4[1];
+ e3.has(a3) && JSON.stringify(s4) === e3.get(a3) || this._partialUpdatedConvMap.set(a3, s4);
}
} catch (e4) {
o3.e(e4);
@@ -11467,7 +11474,7 @@ var chat = { exports: {} };
o3.f();
}
} }, { key: "getPartialUpdatedConvs", value: function() {
- var e3 = d2(pt2(this._partialUpdatedConvMap, false).values());
+ var e3 = d2(gt2(this._partialUpdatedConvMap, false).values());
return this._partialUpdatedConvMap.clear(), e3;
} }, { key: "getLocalConvList", value: function() {
var t3 = this;
@@ -11481,12 +11488,12 @@ var chat = { exports: {} };
} }, { key: "getLocalOldestMessage", value: function(e3) {
return this._msgListHandler.getLocalOldestMsg(e3);
} }, { key: "syncConvList", value: function() {
- var o3 = this, e3 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], i4 = "syncConvList", s4 = new P2(i4);
- return this._pagingStatus === Gn && this._convMap.clear(), this._pagingGetConvList(e3).then(function(e4) {
- var t3 = en(o3._pagingGetCostList), n3 = $t2(o3._pagingGetCostList), n3 = (o3._pagingGetCostList.length = 0, o3._pagingStatus = Un, o3._diffAndDeleteConv(), o3.emitConvUpdate(true, false), o3._setStorageConvList(), o3._handleC2CPeerReadTime(), o3.emitIEvt(U2.CONV_SYNC_COMPLETED), "count:".concat(o3._convMap.size, " sum:").concat(n3, " avg:").concat(t3));
- return M2.l("".concat(o3._n, ".").concat(i4, ". ").concat(n3)), s4.setMessage(n3).end(), e4;
+ var o3 = this, e3 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], i4 = "syncConvList", a3 = new P2(i4);
+ return this._pagingStatus === bn && this._convMap.clear(), this._pagingGetConvList(e3).then(function(e4) {
+ var t3 = on(o3._pagingGetCostList), n3 = nn(o3._pagingGetCostList), n3 = (o3._pagingGetCostList.length = 0, o3._pagingStatus = Fn, o3._diffAndDeleteConv(), o3.emitConvUpdate(true, false), o3._setStorageConvList(), o3._handleC2CPeerReadTime(), o3.emitIEvt(U2.CONV_SYNC_COMPLETED), "count:".concat(o3._convMap.size, " sum:").concat(n3, " avg:").concat(t3));
+ return M2.l("".concat(o3._n, ".").concat(i4, ". ").concat(n3)), a3.setMessage(n3).end(), e4;
}).catch(function(e4) {
- return o3._pagingStatus = bn, s4.setMessage(o3._pagingTs).setError(e4).end(), E2(e4);
+ return o3._pagingStatus = qn, a3.setMessage(o3._pagingTs).setError(e4).end(), E2(e4);
});
} }, { key: "_diffAndDeleteConv", value: function() {
var n3, o3 = this;
@@ -11495,25 +11502,25 @@ var chat = { exports: {} };
}), M2.l("".concat(this._n, "._diffAndDeleteConv list:").concat(n3)), n3 = null);
} }, { key: "_pagingGetConvList", value: function() {
var r4 = this, e3 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], c3 = "".concat(this._n, "._pagingGetConvList"), u3 = (M2.l("".concat(c3, " incrementalPullFlag:").concat(e3, " ts:").concat(this._pagingTs, " startIdx:").concat(this._pagingStartIdx) + " pinnedTs:".concat(this._pagingPinnedTs, " pinnedStartIdx:").concat(this._pagingPinnedStartIdx)), Date.now());
- return this._pagingStatus = Pn, this.req({ P: G2.PAGING_GET_CONV_LIST, data: { fromAccount: this.getMyUserID(), timeStamp: e3 ? this._pagingTs : 0, startIndex: e3 ? this._pagingStartIdx : 0, pinnedTimeStamp: e3 ? this._pagingPinnedTs : 0, pinnedStartIndex: e3 ? this._pagingPinnedStartIdx : 0, orderType: 1 } }).then(function(e4) {
- var e4 = e4.data, t3 = e4.completeFlag, n3 = e4.conversations, n3 = void 0 === n3 ? [] : n3, o3 = e4.timeStamp, i4 = e4.startIndex, s4 = e4.pinnedTimeStamp, a3 = e4.pinnedStartIndex, e4 = e4.groupItem;
- if (r4._pagingGetCostList.push(tn(u3, false)), M2.l("".concat(c3, " ok. completeFlag:").concat(t3, " count:").concat(n3.length, " cost:").concat(tn(u3))), r4._convGroupHandler.onConvGroupListSynced(e4), 0 < n3.length && (e4 = r4._getConvOptions(n3), r4._pagingConvIDMap = new Map([].concat(d2(r4._pagingConvIDMap), d2(e4.map(function(e5) {
+ return this._pagingStatus = wn, this.req({ P: G2.PAGING_GET_CONV_LIST, data: { fromAccount: this.getMyUserID(), timeStamp: e3 ? this._pagingTs : 0, startIndex: e3 ? this._pagingStartIdx : 0, pinnedTimeStamp: e3 ? this._pagingPinnedTs : 0, pinnedStartIndex: e3 ? this._pagingPinnedStartIdx : 0, orderType: 1 } }).then(function(e4) {
+ var e4 = e4.data, t3 = e4.completeFlag, n3 = e4.conversations, n3 = void 0 === n3 ? [] : n3, o3 = e4.timeStamp, i4 = e4.startIndex, a3 = e4.pinnedTimeStamp, s4 = e4.pinnedStartIndex, e4 = e4.groupItem;
+ if (r4._pagingGetCostList.push(an(u3, false)), M2.l("".concat(c3, " ok. completeFlag:").concat(t3, " count:").concat(n3.length, " cost:").concat(an(u3))), r4._convGroupHandler.onConvGroupListSynced(e4), 0 < n3.length && (e4 = r4._getConvOptions(n3), r4._pagingConvIDMap = new Map([].concat(d2(r4._pagingConvIDMap), d2(e4.map(function(e5) {
return [e5.conversationID, 1];
})))), r4._updateLocalConvList({ conversationOptionsList: e4, isFromGetConversations: true, updateUnreadCount: true }), r4.isLoggedIn()) && r4.emitConvUpdate(), !r4._isReady) {
if (!r4.isLoggedIn())
return D2();
r4.triggerReady();
}
- return r4._pagingTs = o3, r4._pagingStartIdx = i4, r4._pagingPinnedTs = s4, r4._pagingPinnedStartIdx = a3, 1 !== t3 ? r4._pagingGetConvList() : (r4._handleGroupAtTipsList(), r4._convGroupHandler.getRemoteConvGroupList(), D2());
+ return r4._pagingTs = o3, r4._pagingStartIdx = i4, r4._pagingPinnedTs = a3, r4._pagingPinnedStartIdx = s4, 1 !== t3 ? r4._pagingGetConvList() : (r4._handleGroupAtTipsList(), r4._convGroupHandler.getRemoteConvGroupList(), D2());
}).catch(function(e4) {
throw !r4.isLoggedIn() || r4._isReady || (M2.w("".concat(c3, " failed. error:"), e4), r4.triggerReady()), e4;
});
} }, { key: "_updateLocalConvList", value: function(e3) {
var t3 = e3.isFromGetConversations, n3 = Date.now(), e3 = this._getTmpConvListMapping(e3).newConvList;
- this._convMap = new Map(this._sortConvList(d2(this._convMap))), t3 || this._updateUserOrGroupProfile(e3), M2.l("".concat(this._n, "._updateLocalConvList cost:").concat(tn(n3)));
+ this._convMap = new Map(this._sortConvList(d2(this._convMap))), t3 || this._updateUserOrGroupProfile(e3), M2.l("".concat(this._n, "._updateLocalConvList cost:").concat(an(n3)));
} }, { key: "_getTmpConvListMapping", value: function(e3) {
- for (var t3 = e3.conversationOptionsList, n3 = e3.isFromGetConversations, o3 = e3.isInstantMessage, i4 = e3.isUnreadC2CMessage, s4 = void 0 !== i4 && i4, a3 = e3.updateUnreadCount, r4 = [], c3 = [], u3 = this.get(7), l3 = this.get(8), d3 = this.isIntl(), p4 = this.isUsingChatCore(), _3 = 0, h3 = t3.length; _3 < h3; _3++) {
- var g3 = new xo(t3[_3], d3, p4), f3 = g3.conversationID, m3 = g3.type;
+ for (var t3 = e3.conversationOptionsList, n3 = e3.isFromGetConversations, o3 = e3.isInstantMessage, i4 = e3.isUnreadC2CMessage, a3 = void 0 !== i4 && i4, s4 = e3.updateUnreadCount, r4 = [], c3 = [], u3 = this.get(7), l3 = this.get(8), d3 = this.isIntl(), p4 = this.isUsingChatCore(), _3 = 0, h3 = t3.length; _3 < h3; _3++) {
+ var g3 = new jo(t3[_3], d3, p4), f3 = g3.conversationID, m3 = g3.type;
if (!this._isNonExistentAccount(f3)) {
if (this._convMap.has(f3)) {
var v4 = this._convMap.get(f3);
@@ -11522,9 +11529,9 @@ var chat = { exports: {} };
continue;
}
var I3 = ["unreadCount", "allowType", "adminForbidType", "payload"], M3 = (false === o3 && I3.push("lastMessage"), "boolean" == typeof o3 && I3.push("isPinned"), t3[_3].lastMessage), y3 = !N3(M3);
- y3 || t3[_3].type === R2.CONV_TOPIC || this._onLastMsgNotExist(t3[_3]), N3(o3) && y3 && null === v4.lastMessage.payload && (v4.lastMessage.payload = M3.payload), S2(v4.lastMessage.revoker) || (v4.lastMessage.revoker = null), dt2(v4, g3, I3, [null, void 0, "", 0, NaN]), true === a3 && v4.updateUnreadCount({ nextUnreadCount: g3.unreadCount, isFromGetConversations: n3, isUnreadC2CMessage: s4 }), o3 && y3 && (M3.payload && (v4.lastMessage.payload = M3.payload), v4.type === R2.CONV_GROUP) && (v4.lastMessage.nameCard = M3.nameCard, v4.lastMessage.nick = M3.nick), y3 && v4.lastMessage.cloudCustomData !== M3.cloudCustomData && (v4.lastMessage.cloudCustomData = M3.cloudCustomData || "");
+ y3 || t3[_3].type === R2.CONV_TOPIC || this._onLastMsgNotExist(t3[_3]), N3(o3) && y3 && null === v4.lastMessage.payload && (v4.lastMessage.payload = M3.payload), S2(v4.lastMessage.revoker) || (v4.lastMessage.revoker = null), ht2(v4, g3, I3, [null, void 0, "", 0, NaN]), true === s4 && v4.updateUnreadCount({ nextUnreadCount: g3.unreadCount, isFromGetConversations: n3, isUnreadC2CMessage: a3 }), o3 && y3 && (M3.payload && (v4.lastMessage.payload = M3.payload), v4.type === R2.CONV_GROUP) && (v4.lastMessage.nameCard = M3.nameCard, v4.lastMessage.nick = M3.nick), y3 && v4.lastMessage.cloudCustomData !== M3.cloudCustomData && (v4.lastMessage.cloudCustomData = M3.cloudCustomData || "");
} else
- m3 === R2.CONV_GROUP && u3 ? (I3 = g3.groupProfile.groupID, (y3 = u3.getLocalGroupProfile(I3)) && (g3.groupProfile = y3, true === a3) && g3.updateUnreadCount({ nextUnreadCount: 0 })) : m3 === R2.CONV_C2C && (v4 = f3.replace(R2.CONV_C2C, ""), l3) && l3.isMyFriend(v4) && (g3.remark = l3.getFriendRemark(v4)), r4.push(g3), this._convMap.set(f3, g3);
+ m3 === R2.CONV_GROUP && u3 ? (I3 = g3.groupProfile.groupID, (y3 = u3.getLocalGroupProfile(I3)) && (g3.groupProfile = y3, true === s4) && g3.updateUnreadCount({ nextUnreadCount: 0 })) : m3 === R2.CONV_C2C && (v4 = f3.replace(R2.CONV_C2C, ""), l3) && l3.isMyFriend(v4) && (g3.remark = l3.getFriendRemark(v4)), r4.push(g3), this._convMap.set(f3, g3);
this._convMap.get(f3).type === R2.CONV_TOPIC && c3.push(this._convMap.get(f3));
}
}
@@ -11547,21 +11554,21 @@ var chat = { exports: {} };
} }, { key: "_sortConvListAndEmitEvent", value: function() {
this._convMap = new Map(this._sortConvList(d2(this._convMap))), this.emitConvUpdate(true, false);
} }, { key: "_updateUserOrGroupProfile", value: function(e3) {
- var n3, o3, t3, i4, s4 = this;
+ var n3, o3, t3, i4, a3 = this;
0 !== e3.length && (n3 = [], o3 = [], t3 = this.get(4), i4 = this.get(7), e3.forEach(function(e4) {
var t4;
e4.type === R2.CONV_C2C ? n3.push(e4.toAccount) : e4.type === R2.CONV_GROUP && (t4 = e4.toAccount, i4.hasLocalGroup(t4) ? e4.groupProfile = i4.getLocalGroupProfile(t4) : o3.push(t4));
}), M2.l("".concat(this._n, "._updateUserOrGroupProfile userIDList:").concat(n3, " groupIDList:").concat(o3)), 0 < n3.length && t3.getUserProfile({ userIDList: n3 }).then(function(e4) {
e4 = e4.data;
O2(e4) ? e4.forEach(function(e5) {
- s4._doUpdateUserProfile("".concat(R2.CONV_C2C).concat(e5.userID), e5);
- }) : s4._doUpdateUserProfile("".concat(R2.CONV_C2C).concat(e4.userID), e4);
+ a3._doUpdateUserProfile("".concat(R2.CONV_C2C).concat(e5.userID), e5);
+ }) : a3._doUpdateUserProfile("".concat(R2.CONV_C2C).concat(e4.userID), e4);
}), 0 < o3.length) && i4.getGroupProfileAdvance({ groupIDList: o3, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "FaceUrl"] } }).then(function(e4) {
var e4 = e4.data.successGroupList, n4 = false;
e4.forEach(function(e5) {
var t4 = "".concat(R2.CONV_GROUP).concat(e5.groupID);
- s4._convMap.has(t4) && (t4 = s4._convMap.get(t4), dt2(t4.groupProfile, e5, [], [null, void 0, "", 0, NaN]), !t4.subType && e5.type && (t4.subType = e5.type), n4 = true);
- }), n4 && s4.emitConvUpdate();
+ a3._convMap.has(t4) && (t4 = a3._convMap.get(t4), ht2(t4.groupProfile, e5, [], [null, void 0, "", 0, NaN]), !t4.subType && e5.type && (t4.subType = e5.type), n4 = true);
+ }), n4 && a3.emitConvUpdate();
});
} }, { key: "_doUpdateUserProfile", value: function(e3, t3) {
this.hasLocalConversation(e3) && (this.getLocalConversation(e3).userProfile = t3, this.emitConvUpdate());
@@ -11571,7 +11578,7 @@ var chat = { exports: {} };
return 1 === t3 && !n3._isNonExistentAccount(e4) || 2 === t3;
}), i4 = this.getMyUserID(), e3 = e3.map(function(e4) {
var t3;
- return N3(e4.lastMsg) && (e4.lastMsg = { elements: [] }), 1 === e4.type ? (t3 = { userID: e4.userID, nick: e4.peerNick, avatar: e4.peerAvatar }, o3.push(t3), { conversationID: "".concat(R2.CONV_C2C).concat(e4.userID), type: R2.CONV_C2C, lastMessage: { lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.lastC2CMsgFromAccount, type: e4.lastMsg.elements[0] ? e4.lastMsg.elements[0].type : null, payload: e4.lastMsg.elements[0] ? n3._amendLayersOverLimitProp(e4.lastMsg.elements[0].content, e4.lastMsg.elements[0].type) : null, cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 8 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: e4.lastC2CMsgFromAccount === i4 && e4.time <= e4.c2cPeerReadTime, revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }, unreadCount: 0, userProfile: new bo(t3), peerReadTime: e4.c2cPeerReadTime, isPinned: 1 === e4.isPinned, customData: e4.customMark || "", markList: Xt2(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId), remark: e4.friendRemark || "", messageRemindType: n3._transMsgRemindType(e4.messageRemindType) }) : { conversationID: "".concat(R2.CONV_GROUP).concat(e4.groupID), type: R2.CONV_GROUP, lastMessage: y2(y2({ lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.msgGroupFromAccount }, n3._patchTypeAndPayload(e4)), {}, { cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 2 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: e4.senderNick || "", nameCard: e4.senderNameCard || "", revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }), groupProfile: new qo({ groupID: e4.groupID, name: e4.groupNick, avatar: e4.groupImage, type: e4.groupType, nextMessageSeq: e4.nextMessageSeq }), unreadCount: n3._computeGroupUnreadCount(e4), peerReadTime: 0, isPinned: 1 === e4.isPinned, version: 0, customData: e4.customMark || "", markList: Xt2(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId), messageRemindType: n3._transMsgRemindType(e4.messageRemindType) };
+ return N3(e4.lastMsg) && (e4.lastMsg = { elements: [] }), 1 === e4.type ? (t3 = { userID: e4.userID, nick: e4.peerNick, avatar: e4.peerAvatar }, o3.push(t3), { conversationID: "".concat(R2.CONV_C2C).concat(e4.userID), type: R2.CONV_C2C, lastMessage: { lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.lastC2CMsgFromAccount, type: e4.lastMsg.elements[0] ? e4.lastMsg.elements[0].type : null, payload: e4.lastMsg.elements[0] ? n3._amendLayersOverLimitProp(e4.lastMsg.elements[0].content, e4.lastMsg.elements[0].type) : null, cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 8 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: e4.lastC2CMsgFromAccount === i4 && e4.time <= e4.c2cPeerReadTime, revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }, unreadCount: 0, userProfile: new Ho(t3), peerReadTime: e4.c2cPeerReadTime, isPinned: 1 === e4.isPinned, customData: e4.customMark || "", markList: $t2(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId), remark: e4.friendRemark || "", messageRemindType: n3._transMsgRemindType(e4.messageRemindType) }) : { conversationID: "".concat(R2.CONV_GROUP).concat(e4.groupID), type: R2.CONV_GROUP, lastMessage: y2(y2({ lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.msgGroupFromAccount }, n3._patchTypeAndPayload(e4)), {}, { cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 2 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: e4.senderNick || "", nameCard: e4.senderNameCard || "", revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }), groupProfile: new Yo({ groupID: e4.groupID, name: e4.groupNick, avatar: e4.groupImage, type: e4.groupType, nextMessageSeq: e4.nextMessageSeq }), unreadCount: n3._computeGroupUnreadCount(e4), peerReadTime: 0, isPinned: 1 === e4.isPinned, version: 0, customData: e4.customMark || "", markList: $t2(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId), messageRemindType: n3._transMsgRemindType(e4.messageRemindType) };
});
return 0 < o3.length && this.get(4).onConvProfileUpdated(o3), e3;
} }, { key: "_transMsgRemindType", value: function(e3) {
@@ -11582,46 +11589,46 @@ var chat = { exports: {} };
return 0 < t3 ? t3 : 0;
} }, { key: "_patchTypeAndPayload", value: function(e3) {
var e3 = e3.lastMsg, t3 = e3.event, n3 = e3.elements, n3 = void 0 === n3 ? [] : n3, e3 = e3.groupTips, e3 = void 0 === e3 ? {} : e3;
- return N3(void 0 === t3 ? void 0 : t3) || S2(e3) ? { type: n3[0] ? n3[0].type : null, payload: n3[0] ? this._amendLayersOverLimitProp(n3[0].content, n3[0].type) : null } : ((t3 = new Do(e3)).setElement({ type: R2.MSG_GRP_TIP, content: y2(y2({}, e3.elements), {}, { groupProfile: e3.groupProfile }) }), n3 = JSON.parse(JSON.stringify(t3.payload)), t3 = null, { type: R2.MSG_GRP_TIP, payload: n3 });
+ return N3(void 0 === t3 ? void 0 : t3) || S2(e3) ? { type: n3[0] ? n3[0].type : null, payload: n3[0] ? this._amendLayersOverLimitProp(n3[0].content, n3[0].type) : null } : ((t3 = new So(e3)).setElement({ type: R2.MSG_GRP_TIP, content: y2(y2({}, e3.elements), {}, { groupProfile: e3.groupProfile }) }), n3 = JSON.parse(JSON.stringify(t3.payload)), t3 = null, { type: R2.MSG_GRP_TIP, payload: n3 });
} }, { key: "_amendLayersOverLimitProp", value: function(e3, t3) {
- var n3 = this.getFileDownloadProxy(), o3 = this.getDownloadFileAuthKey(), i4 = this.get(17).getFileDNList(), s4 = e3.layersOverLimit, a3 = null;
- return t3 === R2.MSG_IMAGE && (a3 = new uo(e3, n3, o3, i4)), t3 === R2.MSG_VIDEO && (a3 = new Io(e3, n3, o3, i4)), t3 === R2.MSG_SOUND && (a3 = new po(e3, n3, o3, i4)), t3 === R2.MSG_FILE && ((a3 = new mo(e3, n3, o3, i4)).content.url = void 0), 0 === s4 ? e3.layersOverLimit = false : 1 === s4 && (e3.layersOverLimit = true), a3 && Object.assign(e3, a3.content), e3;
+ var n3 = this.getFileDownloadProxy(), o3 = this.getDownloadFileAuthKey(), i4 = this.get(17).getFileDNList(), a3 = e3.layersOverLimit, s4 = null;
+ return t3 === R2.MSG_IMAGE && (s4 = new _o(e3, n3, o3, i4)), t3 === R2.MSG_VIDEO && (s4 = new Co(e3, n3, o3, i4)), t3 === R2.MSG_SOUND && (s4 = new go(e3, n3, o3, i4)), t3 === R2.MSG_FILE && ((s4 = new Mo(e3, n3, o3, i4)).content.url = void 0), 0 === a3 ? e3.layersOverLimit = false : 1 === a3 && (e3.layersOverLimit = true), s4 && Object.assign(e3, s4.content), e3;
} }, { key: "getLocalMessageList", value: function(e3) {
return this._msgListHandler.getLocalMsgList(e3);
} }, { key: "deleteLocalMessage", value: function(e3) {
- e3 instanceof Do && this._msgListHandler.remove(e3);
+ e3 instanceof So && this._msgListHandler.remove(e3);
} }, { key: "onConvDeleted", value: function(e3) {
O2(e3) && (e3 = e3.map(function(e4) {
var t3 = e4.type, n3 = e4.userID, e4 = e4.groupID;
return 1 === t3 ? "".concat(R2.CONV_C2C).concat(n3) : 2 === t3 ? "".concat(R2.CONV_GROUP).concat(e4) : void 0;
}), M2.l("".concat(this._n, ".onConvDeleted convIDList:").concat(e3)), this.deleteLocalConvList(e3));
} }, { key: "onConvPinnedStatus", value: function(e3, i4) {
- var s4, a3 = this;
- O2(e3) && (s4 = false, e3.forEach(function(e4) {
+ var a3, s4 = this;
+ O2(e3) && (a3 = false, e3.forEach(function(e4) {
var t3, n3 = e4.type, o3 = e4.userID, e4 = e4.groupID;
- 1 === n3 ? t3 = a3.getLocalConversation("".concat(R2.CONV_C2C).concat(o3)) : 2 === n3 && (t3 = a3.getLocalConversation("".concat(R2.CONV_GROUP).concat(e4))), t3 && (M2.l("".concat(a3._n, ".onConvPinnedStatus convID:").concat(t3.conversationID, " localPinned:").concat(t3.isPinned, " remotePinned:").concat(i4)), i4 ? t3.isPinned || (t3.isPinned = true, s4 = true) : t3.isPinned && (t3.isPinned = false, s4 = true));
- }), s4) && this._sortConvListAndEmitEvent();
+ 1 === n3 ? t3 = s4.getLocalConversation("".concat(R2.CONV_C2C).concat(o3)) : 2 === n3 && (t3 = s4.getLocalConversation("".concat(R2.CONV_GROUP).concat(e4))), t3 && (M2.l("".concat(s4._n, ".onConvPinnedStatus convID:").concat(t3.conversationID, " localPinned:").concat(t3.isPinned, " remotePinned:").concat(i4)), i4 ? t3.isPinned || (t3.isPinned = true, a3 = true) : t3.isPinned && (t3.isPinned = false, a3 = true));
+ }), a3) && this._sortConvListAndEmitEvent();
} }, { key: "getMessageList", value: function(e3) {
var r4 = this, c3 = e3.conversationID, t3 = e3.nextReqMessageID, e3 = e3.count, u3 = "".concat(this._n, ".getMessageList"), n3 = this.getLocalConversation(c3), o3 = "";
- if (n3 && n3.groupProfile && (o3 = n3.groupProfile.type), At2(o3))
+ if (n3 && n3.groupProfile && (o3 = n3.groupProfile.type), Gt2(o3))
return M2.l("".concat(u3, " not available in ").concat(o3, ". convID:").concat(c3)), D2({ messageList: [], nextReqMessageID: "", isCompleted: true });
(N3(e3) || 15 < e3) && (e3 = 15), t3 || this._isMeInCommunity(c3) || this.clearMemMsg(c3);
var l3 = this._computeRemainingCount({ conversationID: c3, nextReqMessageID: t3 }), n3 = this._completedMap.has(c3);
if (M2.l("".concat(u3, " convID:").concat(c3, " isEverCleared:").concat(this._isEverCleared(c3), " nextReqMessageID:").concat(t3) + " remainingCount:".concat(l3, " count:").concat(e3, " isCompleted:").concat(n3)), this._needGetHistory({ conversationID: c3, remainingCount: l3, count: e3 }))
return this.getHistoryMessages({ conversationID: c3, nextReqMessageID: t3, count: 20 }).then(function(e4) {
- var t4 = e4.nextReqID, n4 = e4.storedMessageList, o4 = e4.assembledMessageList, e4 = e4.isPullingCompleted, i4 = r4._completedMap.has(c3), s4 = n4, a3 = (0 < l3 && (s4 = r4._msgListHandler.getLocalMsgList(c3).slice(0, n4.length + l3)), { nextReqMessageID: void 0, messageList: void 0, isCompleted: void 0 }), n4 = (r4._isEverCleared(c3) ? (a3.nextReqMessageID = t4, a3.messageList = o4, a3.isCompleted = e4) : (a3.nextReqMessageID = i4 ? "" : t4, a3.messageList = s4, a3.isCompleted = i4), a3.messageList.filter(function(e5) {
+ var t4 = e4.nextReqID, n4 = e4.storedMessageList, o4 = e4.assembledMessageList, e4 = e4.isPullingCompleted, i4 = r4._completedMap.has(c3), a3 = n4, s4 = (0 < l3 && (a3 = r4._msgListHandler.getLocalMsgList(c3).slice(0, n4.length + l3)), { nextReqMessageID: void 0, messageList: void 0, isCompleted: void 0 }), n4 = (r4._isEverCleared(c3) ? (s4.nextReqMessageID = t4, s4.messageList = o4, s4.isCompleted = e4) : (s4.nextReqMessageID = i4 ? "" : t4, s4.messageList = a3, s4.isCompleted = i4), s4.messageList.filter(function(e5) {
return e5.isRevoked;
- }) || []), o4 = a3.messageList.map(function(e5) {
+ }) || []), o4 = s4.messageList.map(function(e5) {
return e5.sequence;
});
- return M2.l("".concat(u3, " ret.nextReqMessageID:").concat(a3.nextReqMessageID, " ret.isCompleted:").concat(a3.isCompleted, " sequenceList:"), o4), O2(n4) && 0 !== n4.length ? r4.updateRevokerInfo(n4).then(function(e5) {
+ return M2.l("".concat(u3, " ret.nextReqMessageID:").concat(s4.nextReqMessageID, " ret.isCompleted:").concat(s4.isCompleted, " sequenceList:"), o4), O2(n4) && 0 !== n4.length ? r4.updateRevokerInfo(n4).then(function(e5) {
return e5.forEach(function(t5) {
var n5 = t5.revokerInfo;
- a3.messageList = a3.messageList.map(function(e6) {
+ s4.messageList = s4.messageList.map(function(e6) {
return e6.ID === t5.ID && n5 && (e6.revokeReason = n5.reason || "", e6.revokerInfo = { userID: n5.revoker || e6.revoker, nick: n5.nick, avatar: n5.avatar }), e6;
});
- }), T2(a3);
- }) : T2(a3);
+ }), T2(s4);
+ }) : T2(s4);
});
this.modifyMessageList(c3);
o3 = this._getMsgListFromMem({ conversationID: c3, nextReqMessageID: t3, count: e3 });
@@ -11629,54 +11636,54 @@ var chat = { exports: {} };
} }, { key: "_isEverCleared", value: function(e3) {
return this._everClearedMap.has(e3);
} }, { key: "_getMsgListFromMem", value: function(e3) {
- var t3 = e3.conversationID, n3 = e3.nextReqMessageID, e3 = e3.count, o3 = "".concat(this._n, "._getMsgListFromMem"), i4 = this._msgListHandler.getLocalMsgList(t3), s4 = i4.length, a3 = Gt2(t3), r4 = 0, c3 = { isCompleted: false, nextReqMessageID: "", messageList: [] }, e3 = (n3 ? (r4 = a3 ? i4.findIndex(function(e4) {
+ var t3 = e3.conversationID, n3 = e3.nextReqMessageID, e3 = e3.count, o3 = "".concat(this._n, "._getMsgListFromMem"), i4 = this._msgListHandler.getLocalMsgList(t3), a3 = i4.length, s4 = bt2(t3), r4 = 0, c3 = { isCompleted: false, nextReqMessageID: "", messageList: [] }, e3 = (n3 ? (r4 = s4 ? i4.findIndex(function(e4) {
return e4.ID === n3;
}) : i4.findIndex(function(e4) {
return e4.sequence + "" === n3;
- })) > e3 ? (c3.messageList = i4.slice(r4 - e3, r4), c3.nextReqMessageID = a3 ? i4[r4 - e3].ID : i4[r4 - e3].sequence + "") : (c3.messageList = i4.slice(0, r4), c3.isCompleted = true) : e3 < s4 ? (c3.messageList = i4.slice(r4 = s4 - e3, s4), c3.nextReqMessageID = a3 ? i4[r4].ID : i4[r4].sequence + "") : (c3.messageList = i4.slice(0, s4), c3.isCompleted = true), c3.messageList.map(function(e4) {
+ })) > e3 ? (c3.messageList = i4.slice(r4 - e3, r4), c3.nextReqMessageID = s4 ? i4[r4 - e3].ID : i4[r4 - e3].sequence + "") : (c3.messageList = i4.slice(0, r4), c3.isCompleted = true) : e3 < a3 ? (c3.messageList = i4.slice(r4 = a3 - e3, a3), c3.nextReqMessageID = s4 ? i4[r4].ID : i4[r4].sequence + "") : (c3.messageList = i4.slice(0, a3), c3.isCompleted = true), c3.messageList.map(function(e4) {
return e4.sequence;
}));
return M2.l("".concat(o3, " convID:").concat(t3) + " ret.nextReqMessageID:".concat(c3.nextReqMessageID, " ret.isCompleted:").concat(c3.isCompleted, " sequenceList:").concat(e3)), c3;
} }, { key: "getMessageListHopping", value: function(e3) {
- var t3, n3, o3 = e3.conversationID, i4 = e3.sequence, s4 = e3.time, a3 = e3.count, e3 = e3.direction, e3 = void 0 === e3 ? 0 : e3;
- return (N3(a3) || 15 < a3) && (a3 = 15), o3.startsWith(R2.CONV_C2C) ? (t3 = this.get(6), n3 = o3.replace(R2.CONV_C2C, ""), t3.getRoamingMessagesHopping({ peerAccount: n3, time: s4, count: a3, direction: e3 })) : o3.startsWith(R2.CONV_GROUP) ? (t3 = this.get(7), n3 = o3.replace(R2.CONV_GROUP, ""), t3.getRoamingMessagesHopping({ groupID: n3, sequence: i4, count: a3, direction: e3 })) : void 0;
+ var t3, n3, o3 = e3.conversationID, i4 = e3.sequence, a3 = e3.time, s4 = e3.count, e3 = e3.direction, e3 = void 0 === e3 ? 0 : e3;
+ return (N3(s4) || 15 < s4) && (s4 = 15), o3.startsWith(R2.CONV_C2C) ? (t3 = this.get(6), n3 = o3.replace(R2.CONV_C2C, ""), t3.getRoamingMessagesHopping({ peerAccount: n3, time: a3, count: s4, direction: e3 })) : o3.startsWith(R2.CONV_GROUP) ? (t3 = this.get(7), n3 = o3.replace(R2.CONV_GROUP, ""), t3.getRoamingMessagesHopping({ groupID: n3, sequence: i4, count: s4, direction: e3 })) : void 0;
} }, { key: "_computeRemainingCount", value: function(e3) {
var t3, n3 = e3.conversationID, o3 = e3.nextReqMessageID, e3 = this._msgListHandler.getLocalMsgList(n3), i4 = e3.length;
- return M2.l("".concat(this._n, "._computeRemainingCount convID:").concat(n3, " nextReqMessageID:").concat(o3, " length:").concat(i4)), o3 ? (t3 = 0, Gt2(n3) ? t3 = e3.findIndex(function(e4) {
+ return M2.l("".concat(this._n, "._computeRemainingCount convID:").concat(n3, " nextReqMessageID:").concat(o3, " length:").concat(i4)), o3 ? (t3 = 0, bt2(n3) ? t3 = e3.findIndex(function(e4) {
return e4.ID === o3;
- }) : Pt2(n3) && (t3 = -1 !== o3.indexOf("-") ? e3.findIndex(function(e4) {
+ }) : wt2(n3) && (t3 = -1 !== o3.indexOf("-") ? e3.findIndex(function(e4) {
return e4.ID === o3;
}) : e3.findIndex(function(e4) {
return e4.sequence + "" === o3;
})), -1 === t3 ? 0 : t3) : i4;
} }, { key: "_needGetHistory", value: function(e3) {
var t3 = e3.conversationID, n3 = e3.remainingCount, e3 = e3.count, o3 = this.getLocalConversation(t3), i4 = "";
- return o3 && o3.groupProfile && (i4 = o3.groupProfile.type), !(Ut2(t3) || At2(i4) || !this._isEverCleared(t3) && (o3 = n3 <= e3 && !this._completedMap.has(t3), M2.l("".concat(this._n, "._needGetHistory convID:").concat(t3, " ret:").concat(o3)), !o3));
+ return o3 && o3.groupProfile && (i4 = o3.groupProfile.type), !(Ft2(t3) || Gt2(i4) || !this._isEverCleared(t3) && (o3 = n3 <= e3 && !this._completedMap.has(t3), M2.l("".concat(this._n, "._needGetHistory convID:").concat(t3, " ret:").concat(o3)), !o3));
} }, { key: "_isTopicConv", value: function(e3) {
e3 = e3.replace(R2.CONV_GROUP, "");
- return Nt2(e3);
+ return Ut2(e3);
} }, { key: "getHistoryMessages", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4 = e3.conversationID, c3 = e3.count, e3 = e3.nextReqMessageID;
- return r4 === R2.CONV_SYSTEM ? D2() : (c3 = 20 < c3 ? 20 : 15, t3 = null, Gt2(r4) ? (a3 = 0, n3 = "", o3 = false, s4 = this._roamingMsgKeyAndTimeMap.has(r4), e3 && (o3 = true, s4 ? (a3 = this._roamingMsgKeyAndTimeMap.get(r4).lastMessageTime, n3 = this._roamingMsgKeyAndTimeMap.get(r4).messageKey) : (i4 = this._msgListHandler.findMessage(e3)) && (a3 = i4.time, M2.l("".concat(this._n, ".getHistoryMessages convID:").concat(r4, " isRelayInfoExisted:").concat(s4, " lastMessageTime:").concat(a3)))), (t3 = this.get(6)).getRoamingMessage({ conversationID: r4, peerAccount: r4.replace(R2.CONV_C2C, ""), count: c3, lastMessageTime: o3 ? a3 : 0, messageKey: o3 ? n3 : "" })) : Pt2(r4) ? (t3 = this.get(7)) ? (i4 = r4.replace(R2.CONV_GROUP, ""), s4 = null, this._convMap.has(r4) && !Nt2(i4) && (s4 = this._convMap.get(r4).lastMessage), a3 = 0, e3 ? a3 = Number(e3) : s4 && (a3 = s4.lastSequence), t3.getRoamingMessage({ conversationID: r4, groupID: i4, count: c3, sequence: a3 })) : E2({ code: k2.NO_MODULE }) : D2());
+ var t3, n3, o3, i4, a3, s4, r4 = e3.conversationID, c3 = e3.count, e3 = e3.nextReqMessageID;
+ return r4 === R2.CONV_SYSTEM ? D2() : (c3 = 20 < c3 ? 20 : 15, t3 = null, bt2(r4) ? (s4 = 0, n3 = "", o3 = false, a3 = this._roamingMsgKeyAndTimeMap.has(r4), e3 && (o3 = true, a3 ? (s4 = this._roamingMsgKeyAndTimeMap.get(r4).lastMessageTime, n3 = this._roamingMsgKeyAndTimeMap.get(r4).messageKey) : (i4 = this._msgListHandler.findMessage(e3)) && (s4 = i4.time, M2.l("".concat(this._n, ".getHistoryMessages convID:").concat(r4, " isRelayInfoExisted:").concat(a3, " lastMessageTime:").concat(s4)))), (t3 = this.get(6)).getRoamingMessage({ conversationID: r4, peerAccount: r4.replace(R2.CONV_C2C, ""), count: c3, lastMessageTime: o3 ? s4 : 0, messageKey: o3 ? n3 : "" })) : wt2(r4) ? (t3 = this.get(7)) ? (i4 = r4.replace(R2.CONV_GROUP, ""), a3 = null, this._convMap.has(r4) && !Ut2(i4) && (a3 = this._convMap.get(r4).lastMessage), s4 = 0, e3 ? s4 = Number(e3) : a3 && (s4 = a3.lastSequence), t3.getRoamingMessage({ conversationID: r4, groupID: i4, count: c3, sequence: s4 })) : E2({ code: k2.NO_MODULE }) : D2());
} }, { key: "patchConvLastMessage", value: function(e3) {
var t3, n3, o3 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], i4 = this.getLocalConversation(e3);
i4 && (t3 = (n3 = i4.lastMessage).messageForShow, n3 = n3.payload, S2(t3) || S2(n3) || o3) && 0 !== (t3 = this._msgListHandler.getLocalMsgList(e3)).length && (n3 = t3[t3.length - 1], M2.l("".concat(this._n, ".patchConvLastMessage bForceUpdate:").concat(o3, " convID:").concat(e3, " payload:"), n3.payload), i4.updateLastMessage(n3));
} }, { key: "onRoamingMessage", value: function() {
- for (var e3, t3, n3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [], o3 = 1 < arguments.length ? arguments[1] : void 0, i4 = !(2 < arguments.length && void 0 !== arguments[2]) || arguments[2], s4 = 3 < arguments.length ? arguments[3] : void 0, a3 = o3.startsWith(R2.CONV_C2C) ? R2.CONV_C2C : R2.CONV_GROUP, r4 = null, c3 = [], o3 = [], u3 = 0, l3 = n3.length, d3 = a3 === R2.CONV_GROUP, p4 = this.getFileDownloadProxy(), _3 = this.getDownloadFileAuthKey(), h3 = O2(s4), g3 = this.get(17).getFileDNList(), f3 = function() {
+ for (var e3, t3, n3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [], o3 = 1 < arguments.length ? arguments[1] : void 0, i4 = !(2 < arguments.length && void 0 !== arguments[2]) || arguments[2], a3 = 3 < arguments.length ? arguments[3] : void 0, s4 = o3.startsWith(R2.CONV_C2C) ? R2.CONV_C2C : R2.CONV_GROUP, r4 = null, c3 = [], o3 = [], u3 = 0, l3 = n3.length, d3 = s4 === R2.CONV_GROUP, p4 = this.getFileDownloadProxy(), _3 = this.getDownloadFileAuthKey(), h3 = O2(a3), g3 = this.get(17).getFileDNList(), f3 = function() {
d3 ? --u3 : ++u3;
}, m3 = function() {
return d3 ? l3 <= u3 : u3 < l3;
}, u3 = d3 ? n3.length - 1 : 0, l3 = d3 ? 0 : n3.length; m3(); f3())
- 1 !== n3[u3].isPlaceMessage && ((r4 = new Do(n3[u3])).to = n3[u3].to, a3 !== R2.CONV_GROUP || N3(n3[u3].topicID) || (r4.to = n3[u3].topicID), r4.isSystemMessage = !!n3[u3].isSystemMessage, r4.conversationType = a3, e3 = 4 === n3[u3].event ? { type: R2.MSG_GRP_TIP, content: y2(y2({}, n3[u3].elements), {}, { groupProfile: n3[u3].groupProfile }) } : n3[u3].elements, d3 || r4.setNickAndAvatar({ nick: n3[u3].nick, avatar: n3[u3].avatar }), S2(e3) ? ((t3 = new P2("emptyMessageBody")).setMessage("from:".concat(r4.from, " to:").concat(r4.to, " sequence:").concat(r4.sequence, " event:").concat(n3[u3].event)), t3.setLevel("warning").end()) : (r4.setElement(e3, p4, _3, g3), r4.reInitialize(this.getMyUserID()), c3.push(r4), h3 && s4.push(r4)));
+ 1 !== n3[u3].isPlaceMessage && ((r4 = new So(n3[u3])).to = n3[u3].to, s4 !== R2.CONV_GROUP || N3(n3[u3].topicID) || (r4.to = n3[u3].topicID), r4.isSystemMessage = !!n3[u3].isSystemMessage, r4.conversationType = s4, e3 = 4 === n3[u3].event ? { type: R2.MSG_GRP_TIP, content: y2(y2({}, n3[u3].elements), {}, { groupProfile: n3[u3].groupProfile }) } : n3[u3].elements, d3 || r4.setNickAndAvatar({ nick: n3[u3].nick, avatar: n3[u3].avatar }), S2(e3) ? ((t3 = new P2("emptyMessageBody")).setMessage("from:".concat(r4.from, " to:").concat(r4.to, " sequence:").concat(r4.sequence, " event:").concat(n3[u3].event)), t3.setLevel("warning").end()) : (r4.setElement(e3, p4, _3, g3), r4.reInitialize(this.getMyUserID()), c3.push(r4), h3 && a3.push(r4)));
return f3 = m3 = null, i4 ? (this._msgListHandler.unshift(c3, o3), c3 = null, o3) : c3;
} }, { key: "findMessage", value: function(e3) {
return this._msgListHandler.findMessage(e3);
} }, { key: "_isMeInCommunity", value: function(e3) {
var t3 = true;
- return this._isTopicConv(e3) && (e3 = jt2(e3.replace(R2.CONV_GROUP, "")), this.get(7).hasLocalGroup(e3) || (t3 = false, M2.l("".concat(this._n, "._isMeInCommunity groupID:").concat(e3, " ret:").concat(t3)))), t3;
+ return this._isTopicConv(e3) && (e3 = Xt2(e3.replace(R2.CONV_GROUP, "")), this.get(7).hasLocalGroup(e3) || (t3 = false, M2.l("".concat(this._n, "._isMeInCommunity groupID:").concat(e3, " ret:").concat(t3)))), t3;
} }, { key: "deleteTopicRoamingInfo", value: function(e3) {
var t3 = this;
- Ot2({ groupID: e3 }) && this._msgListHandler.getTopicConvIDList(e3).forEach(function(e4) {
+ Pt2({ groupID: e3 }) && this._msgListHandler.getTopicConvIDList(e3).forEach(function(e4) {
t3.clearMemMsg(e4);
});
} }, { key: "deleteGroupRoamingInfo", value: function(e3) {
@@ -11688,21 +11695,21 @@ var chat = { exports: {} };
return D2();
if (n3.type !== R2.CONV_GROUP && n3.type !== R2.CONV_TOPIC || S2(n3.groupAtInfoList) || this.deleteGroupAtTips(t3), 0 === n3.unreadCount)
return D2();
- var o3 = this._msgListHandler.getLocalLastMsg(t3), i4 = n3.lastMessage.lastTime, s4 = this._msgListHandler.getLocalMaxTime(t3), s4 = (i4 < s4 && (M2.l("".concat(e3, " update lastMessageTime from ").concat(i4, " to ").concat(s4)), i4 = s4), this._msgListHandler.getLocalMaxSeq(t3)), a3 = n3.lastMessage.lastSequence, r4 = (a3 < s4 && (M2.l("".concat(e3, " update lastMessageSeq from ").concat(a3, " to ").concat(s4)), a3 = s4), n3.type === R2.CONV_TOPIC && N3(o3) && (e3 = this.get(10), o3 = jt2(s4 = t3.replace(R2.CONV_GROUP, "")), e3 = e3.getLocalTopic(o3, s4)) && (a3 = e3.nextMessageSeq - 1), null);
+ var o3 = this._msgListHandler.getLocalLastMsg(t3), i4 = n3.lastMessage.lastTime, a3 = this._msgListHandler.getLocalMaxTime(t3), a3 = (i4 < a3 && (M2.l("".concat(e3, " update lastMessageTime from ").concat(i4, " to ").concat(a3)), i4 = a3), this._msgListHandler.getLocalMaxSeq(t3)), s4 = n3.lastMessage.lastSequence, r4 = (s4 < a3 && (M2.l("".concat(e3, " update lastMessageSeq from ").concat(s4, " to ").concat(a3)), s4 = a3), n3.type === R2.CONV_TOPIC && N3(o3) && (e3 = this.get(10), o3 = Xt2(a3 = t3.replace(R2.CONV_GROUP, "")), e3 = e3.getLocalTopic(o3, a3)) && (s4 = e3.nextMessageSeq - 1), null);
switch (n3.type) {
case R2.CONV_C2C:
return (r4 = this.get(6)) ? r4.setMessageRead({ conversationID: t3, lastMessageTime: i4 }) : E2({ code: k2.NO_MODULE });
case R2.CONV_GROUP:
case R2.CONV_TOPIC:
- return (r4 = this.get(7)) ? r4.setMessageRead({ conversationID: t3, lastMessageSeq: a3 }) : E2({ code: k2.NO_MODULE });
+ return (r4 = this.get(7)) ? r4.setMessageRead({ conversationID: t3, lastMessageSeq: s4 }) : E2({ code: k2.NO_MODULE });
case R2.CONV_SYSTEM:
return n3.unreadCount = 0, this.emitConvUpdate(true, false), D2();
default:
return D2();
}
} }, { key: "setAllMessageRead", value: function() {
- var t3, n3 = this, o3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, e3 = "setAllMessageRead", i4 = "".concat(this._n, ".").concat(e3), s4 = (o3.scope || (o3.scope = R2.READ_ALL_MSG), M2.l("".concat(i4, " options:"), o3), this._createSetAllMessageReadPack(o3));
- return 0 === s4.readAllC2CMessage && 0 === s4.groupMessageReadInfoList.length ? D2() : (t3 = new P2(e3), this.req({ P: G2.SET_ALL_MSG_READ, data: s4 }).then(function(e4) {
+ var t3, n3 = this, o3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, e3 = "setAllMessageRead", i4 = "".concat(this._n, ".").concat(e3), a3 = (o3.scope || (o3.scope = R2.READ_ALL_MSG), M2.l("".concat(i4, " options:"), o3), this._createSetAllMessageReadPack(o3));
+ return 0 === a3.readAllC2CMessage && 0 === a3.groupMessageReadInfoList.length ? D2() : (t3 = new P2(e3), this.req({ P: G2.SET_ALL_MSG_READ, data: a3 }).then(function(e4) {
e4 = e4.data, e4 = n3._handleAllMsgRead(e4);
return t3.setMessage("scope:".concat(o3.scope, " failureGroups:").concat(JSON.stringify(e4))).end(), D2();
}).catch(function(e4) {
@@ -11746,9 +11753,9 @@ var chat = { exports: {} };
var t3, n3 = { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, o3 = e3.scope, i4 = F2(this._convMap);
try {
for (i4.s(); !(t3 = i4.n()).done; ) {
- var s4, a3 = j2(t3.value, 2)[1];
- if (0 < a3.unreadCount)
- if (a3.type === R2.CONV_C2C && 0 === n3.readAllC2CMessage) {
+ var a3, s4 = j2(t3.value, 2)[1];
+ if (0 < s4.unreadCount)
+ if (s4.type === R2.CONV_C2C && 0 === n3.readAllC2CMessage) {
if (o3 === R2.READ_ALL_MSG)
n3.readAllC2CMessage = 1;
else if (o3 === R2.READ_ALL_C2C_MSG) {
@@ -11756,7 +11763,7 @@ var chat = { exports: {} };
break;
}
} else
- a3.type !== R2.CONV_GROUP || o3 !== R2.READ_ALL_GROUP_MSG && o3 !== R2.READ_ALL_MSG || (s4 = this._getConvLastMessageSeq(a3), n3.groupMessageReadInfoList.push({ groupID: a3.groupProfile.groupID, messageSequence: s4 }));
+ s4.type !== R2.CONV_GROUP || o3 !== R2.READ_ALL_GROUP_MSG && o3 !== R2.READ_ALL_MSG || (a3 = this._getConvLastMessageSeq(s4), n3.groupMessageReadInfoList.push({ groupID: s4.groupProfile.groupID, messageSequence: a3 }));
}
} catch (e4) {
i4.e(e4);
@@ -11773,16 +11780,16 @@ var chat = { exports: {} };
var t3 = [];
if (e3 && e3.length)
for (var n3 = 0, o3 = e3.length; n3 < o3; n3++) {
- var i4 = e3[n3], s4 = i4.groupID, a3 = i4.sequence, r4 = i4.retCode, i4 = i4.lastMessageSeq;
- N3(r4) ? this._remoteGroupReadSeqMap.set(s4, i4) : (this._remoteGroupReadSeqMap.set(s4, a3), 0 !== r4 && t3.push("".concat(s4, "-").concat(a3, "-").concat(r4)));
+ var i4 = e3[n3], a3 = i4.groupID, s4 = i4.sequence, r4 = i4.retCode, i4 = i4.lastMessageSeq;
+ N3(r4) ? this._remoteGroupReadSeqMap.set(a3, i4) : (this._remoteGroupReadSeqMap.set(a3, s4), 0 !== r4 && t3.push("".concat(a3, "-").concat(s4, "-").concat(r4)));
}
return t3;
} }, { key: "_updateAllConvUnreadCount", value: function(e3) {
var t3, n3 = e3.readAllC2CMessage, o3 = 0, i4 = F2(this._convMap);
try {
for (i4.s(); !(t3 = i4.n()).done; ) {
- var s4, a3, r4, c3, u3 = j2(t3.value, 2), l3 = u3[0], d3 = u3[1];
- 1 <= d3.unreadCount && (1 === n3 && d3.type === R2.CONV_C2C ? (s4 = this._getConvLastMessageTime(d3), this.updateIsReadAfterReadReport({ conversationID: l3, lastMessageTime: s4 })) : d3.type === R2.CONV_GROUP && (a3 = l3.replace(R2.CONV_GROUP, ""), this._remoteGroupReadSeqMap.has(a3)) && (r4 = this._remoteGroupReadSeqMap.get(a3), c3 = this._getConvLastMessageSeq(d3), this.updateIsReadAfterReadReport({ conversationID: l3, remoteReadSequence: r4 }), r4 <= c3) && this._remoteGroupReadSeqMap.delete(a3), this.updateUnreadCount(l3, false)) && (o3 += 1);
+ var a3, s4, r4, c3, u3 = j2(t3.value, 2), l3 = u3[0], d3 = u3[1];
+ 1 <= d3.unreadCount && (1 === n3 && d3.type === R2.CONV_C2C ? (a3 = this._getConvLastMessageTime(d3), this.updateIsReadAfterReadReport({ conversationID: l3, lastMessageTime: a3 })) : d3.type === R2.CONV_GROUP && (s4 = l3.replace(R2.CONV_GROUP, ""), this._remoteGroupReadSeqMap.has(s4)) && (r4 = this._remoteGroupReadSeqMap.get(s4), c3 = this._getConvLastMessageSeq(d3), this.updateIsReadAfterReadReport({ conversationID: l3, remoteReadSequence: r4 }), r4 <= c3) && this._remoteGroupReadSeqMap.delete(s4), this.updateUnreadCount(l3, false)) && (o3 += 1);
}
} catch (e4) {
i4.e(e4);
@@ -11796,53 +11803,53 @@ var chat = { exports: {} };
} }, { key: "updateIsReadAfterReadReport", value: function(e3) {
var t3 = e3.conversationID, n3 = e3.lastMessageSeq, o3 = e3.lastMessageTime, i4 = this._msgListHandler.getLocalMsgList(t3);
if (0 !== i4.length) {
- for (var s4, a3 = i4.length - 1; 0 <= a3; a3--)
- if (s4 = i4[a3], !(o3 && s4.time > o3 || n3 && s4.sequence > n3)) {
- if ("in" === s4.flow && s4.isRead)
+ for (var a3, s4 = i4.length - 1; 0 <= s4; s4--)
+ if (a3 = i4[s4], !(o3 && a3.time > o3 || n3 && a3.sequence > n3)) {
+ if ("in" === a3.flow && a3.isRead)
break;
- s4.setIsRead(true);
+ a3.setIsRead(true);
}
}
} }, { key: "updateUnreadCount", value: function(e3) {
- var t3, n3 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], o3 = false, i4 = this.getLocalConversation(e3), s4 = this._msgListHandler.getLocalMsgList(e3);
+ var t3, n3 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], o3 = false, i4 = this.getLocalConversation(e3), a3 = this._msgListHandler.getLocalMsgList(e3);
if (i4)
- return (t3 = i4.unreadCount) !== (s4 = s4.filter(function(e4) {
+ return (t3 = i4.unreadCount) !== (a3 = a3.filter(function(e4) {
return !e4.isRead && !e4._onlineOnlyFlag && !e4.isDeleted;
- }).length) && (i4.unreadCount = s4, o3 = true, M2.l("".concat(this._n, ".updateUnreadCount from ").concat(t3, " to ").concat(s4, ", convID:").concat(e3)), true === n3) && this.emitConvUpdate(true, false), o3 && i4.type === R2.CONV_TOPIC && (t3 = i4.unreadCount, s4 = this.get(10), n3 = e3.replace(R2.CONV_GROUP, ""), s4.onUnreadCountUpdatedFromConv(n3, t3)), o3;
+ }).length) && (i4.unreadCount = a3, o3 = true, M2.l("".concat(this._n, ".updateUnreadCount from ").concat(t3, " to ").concat(a3, ", convID:").concat(e3)), true === n3) && this.emitConvUpdate(true, false), o3 && i4.type === R2.CONV_TOPIC && (t3 = i4.unreadCount, a3 = this.get(10), n3 = e3.replace(R2.CONV_GROUP, ""), a3.onUnreadCountUpdatedFromConv(n3, t3)), o3;
} }, { key: "clearGroupAtInfoList", value: function(e3) {
var t3, n3 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], o3 = this.getLocalConversation(e3);
o3 && 0 < o3.groupAtInfoList.length && (o3.clearGroupAtInfoList(), M2.l("".concat(this._n, ".clearGroupAtInfoList convID:").concat(e3)), o3.type === R2.CONV_TOPIC && (o3 = o3.groupAtInfoList, t3 = this.get(10), e3 = e3.replace(R2.CONV_GROUP, ""), t3.onAtInfoUpdated({ topicID: e3, groupAtInfoList: o3 })), true === n3) && this.emitConvUpdate(true, false);
} }, { key: "updateReadReceiptInfo", value: function(e3) {
- var s4, a3, o3, r4 = this, t3 = e3.userID, i4 = void 0 === t3 ? void 0 : t3, t3 = e3.groupID, c3 = void 0 === t3 ? void 0 : t3, t3 = e3.readReceiptList, e3 = e3.timestamp, u3 = void 0 === e3 ? 0 : e3;
- S2(t3) || (s4 = [], N3(i4) ? N3(c3) || (a3 = "".concat(R2.CONV_GROUP).concat(c3), t3.forEach(function(e4) {
- var t4 = e4.tinyID, n3 = e4.clientTime, o4 = e4.random, i5 = e4.readCount, e4 = e4.unreadCount, t4 = "".concat(t4, "-").concat(n3, "-").concat(o4), n3 = r4._msgListHandler.getLocalMsg(a3, t4) || r4._msgListHandler.getHoppingMsg(a3, t4), o4 = { groupID: c3, messageID: t4, readCount: 0, unreadCount: 0 };
- n3 && (A2(i5) && (n3.readReceiptInfo.readCount = i5, o4.readCount = i5), A2(e4) && (n3.readReceiptInfo.unreadCount = e4, o4.unreadCount = e4), s4.push(o4));
+ var a3, s4, o3, r4 = this, t3 = e3.userID, i4 = void 0 === t3 ? void 0 : t3, t3 = e3.groupID, c3 = void 0 === t3 ? void 0 : t3, t3 = e3.readReceiptList, e3 = e3.timestamp, u3 = void 0 === e3 ? 0 : e3;
+ S2(t3) || (a3 = [], N3(i4) ? N3(c3) || (s4 = "".concat(R2.CONV_GROUP).concat(c3), t3.forEach(function(e4) {
+ var t4 = e4.tinyID, n3 = e4.clientTime, o4 = e4.random, i5 = e4.readCount, e4 = e4.unreadCount, t4 = "".concat(t4, "-").concat(n3, "-").concat(o4), n3 = r4._msgListHandler.getLocalMsg(s4, t4) || r4._msgListHandler.getHoppingMsg(s4, t4), o4 = { groupID: c3, messageID: t4, readCount: 0, unreadCount: 0 };
+ n3 && (A2(i5) && (n3.readReceiptInfo.readCount = i5, o4.readCount = i5), A2(e4) && (n3.readReceiptInfo.unreadCount = e4, o4.unreadCount = e4), a3.push(o4));
})) : (o3 = "".concat(R2.CONV_C2C).concat(i4), t3.forEach(function(e4) {
var t4 = e4.tinyID, n3 = e4.clientTime, e4 = e4.random, t4 = "".concat(t4, "-").concat(n3, "-").concat(e4), n3 = r4._msgListHandler.getLocalMsg(o3, t4) || r4._msgListHandler.getHoppingMsg(o3, t4);
- n3 && !n3.readReceiptInfo.isPeerRead && (n3.readReceiptInfo.isPeerRead = true, n3.readReceiptInfo.timestamp = u3, s4.push({ userID: i4, messageID: t4, isPeerRead: true, timestamp: u3 }));
- })), 0 < s4.length && this.emitOEvt(h2.MESSAGE_READ_RECEIPT_RECEIVED, s4));
+ n3 && !n3.readReceiptInfo.isPeerRead && (n3.readReceiptInfo.isPeerRead = true, n3.readReceiptInfo.timestamp = u3, a3.push({ userID: i4, messageID: t4, isPeerRead: true, timestamp: u3 }));
+ })), 0 < a3.length && this.emitOEvt(h2.MESSAGE_READ_RECEIPT_RECEIVED, a3));
} }, { key: "updateIsRead", value: function(e3) {
var t3 = this.getLocalConversation(e3), n3 = this.getLocalMessageList(e3);
- if (t3 && 0 !== n3.length && !Ut2(t3.type)) {
- for (var o3 = [], i4 = 0, s4 = n3.length; i4 < s4; i4++)
+ if (t3 && 0 !== n3.length && !Ft2(t3.type)) {
+ for (var o3 = [], i4 = 0, a3 = n3.length; i4 < a3; i4++)
"in" !== n3[i4].flow ? "out" !== n3[i4].flow || n3[i4].isRead || n3[i4].setIsRead(true) : o3.push(n3[i4]);
- var a3 = 0;
- a3 = t3.type === R2.CONV_C2C ? (e3 = o3.slice(-t3.unreadCount).filter(function(e4) {
+ var s4 = 0;
+ s4 = t3.type === R2.CONV_C2C ? (e3 = o3.slice(-t3.unreadCount).filter(function(e4) {
return e4.isRevoked;
}).length, o3.length - t3.unreadCount - e3) : o3.length - t3.unreadCount;
- for (var r4 = 0; r4 < a3 && !o3[r4].isRead; r4++)
+ for (var r4 = 0; r4 < s4 && !o3[r4].isRead; r4++)
o3[r4].setIsRead(true);
}
} }, { key: "deleteGroupAtTips", value: function(e3) {
- var t3, n3, o3, i4 = this, s4 = "".concat(this._n, ".deleteGroupAtTips"), a3 = (M2.l("".concat(s4)), this._convMap.get(e3));
- return !a3 || 0 === (t3 = a3.groupAtInfoList).length ? Promise.resolve() : (a3 = void 0, e3.startsWith(R2.CONV_GROUP) && (a3 = e3.replace(R2.CONV_GROUP, "")), n3 = d2(t3), (Ot2({ groupID: a3 }) || Nt2(a3)) && 0 === (n3 = t3.filter(function(e4) {
+ var t3, n3, o3, i4 = this, a3 = "".concat(this._n, ".deleteGroupAtTips"), s4 = (M2.l("".concat(a3)), this._convMap.get(e3));
+ return !s4 || 0 === (t3 = s4.groupAtInfoList).length ? Promise.resolve() : (s4 = void 0, e3.startsWith(R2.CONV_GROUP) && (s4 = e3.replace(R2.CONV_GROUP, "")), n3 = d2(t3), (Pt2({ groupID: s4 }) || Ut2(s4)) && 0 === (n3 = t3.filter(function(e4) {
return !e4.atTypeArray.includes(R2.CONV_AT_ALL);
})).length ? (this.clearGroupAtInfoList(e3, false), Promise.resolve()) : (o3 = this.getMyUserID(), this.req({ P: G2.DEL_GROUP_AT_TIPS, data: { messageListToDelete: n3.map(function(e4) {
return { from: e4.from, to: o3, messageSeq: e4.__sequence, messageRandom: e4.__random, groupID: N3(e4.topicID) ? e4.groupID : e4.topicID };
}) } }).then(function() {
- return M2.l("".concat(s4, " ok. count:").concat(t3.length)), i4.clearGroupAtInfoList(e3, false), Promise.resolve();
+ return M2.l("".concat(a3, " ok. count:").concat(t3.length)), i4.clearGroupAtInfoList(e3, false), Promise.resolve();
}).catch(function(e4) {
- return M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
+ return M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
})));
} }, { key: "appendToMessageList", value: function(e3) {
return this._msgListHandler.pushIn(e3);
@@ -11869,7 +11876,7 @@ var chat = { exports: {} };
this._roamingMsgKeyAndTimeMap.set(e3, { messageKey: t3, lastMessageTime: n3 });
} }, { key: "getConvList", value: function(t3) {
var n3, o3 = this, i4 = "".concat(this._n, ".").concat("getConvList"), e3 = "pagingStatus:".concat(this._pagingStatus, ", local conversation count:").concat(this._convMap.size, ", options:").concat(JSON.stringify(t3));
- return M2.l("".concat(i4, ". ").concat(e3)), this._pagingStatus === bn ? ((n3 = new P2("getConvList")).setMessage(e3), this.syncConvList().then(function() {
+ return M2.l("".concat(i4, ". ").concat(e3)), this._pagingStatus === qn ? ((n3 = new P2("getConvList")).setMessage(e3), this.syncConvList().then(function() {
n3.end();
var e4 = o3._getConvList(t3);
return T2({ conversationList: e4, isSyncCompleted: o3._isSyncCompleted() });
@@ -11877,11 +11884,11 @@ var chat = { exports: {} };
return n3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
})) : (e3 = this._getConvList(t3), M2.l("".concat(i4, ". returned conversation count:").concat(e3.length)), D2({ conversationList: e3, isSyncCompleted: this._isSyncCompleted() }));
} }, { key: "_getConvList", value: function(t3) {
- var n3, o3, i4, s4, a3, r4 = this;
+ var n3, o3, i4, a3, s4, r4 = this;
return N3(t3) ? this.getLocalConvList() : O2(t3) ? 0 === t3.length ? [] : this.getLocalConvList().filter(function(e3) {
return t3.includes(e3.conversationID);
- }) : m2(t3) ? (n3 = t3.type, o3 = t3.markType, i4 = t3.groupName, s4 = t3.hasUnreadCount, a3 = t3.hasGroupAtInfo, this.getLocalConvList().filter(function(e3) {
- return r4._filterType(e3, n3) && r4._filterMarkType(e3, o3) && r4._filterGroupName(e3, i4) && r4._filterUnreadCount(e3, s4) && r4._filterGroupAtInfo(e3, a3);
+ }) : m2(t3) ? (n3 = t3.type, o3 = t3.markType, i4 = t3.groupName, a3 = t3.hasUnreadCount, s4 = t3.hasGroupAtInfo, this.getLocalConvList().filter(function(e3) {
+ return r4._filterType(e3, n3) && r4._filterMarkType(e3, o3) && r4._filterGroupName(e3, i4) && r4._filterUnreadCount(e3, a3) && r4._filterGroupAtInfo(e3, s4);
})) : [];
} }, { key: "_filterType", value: function(e3, t3) {
return t3 !== R2.CONV_C2C && t3 !== R2.CONV_GROUP || e3.type === t3;
@@ -11917,10 +11924,10 @@ var chat = { exports: {} };
var t3 = this.get(7);
return !!t3 && t3.hasLocalGroup(e3.replace(R2.CONV_GROUP, ""));
} }, { key: "getConversationProfile", value: function(o3) {
- var i4, s4 = this, a3 = false;
- if (this._convMap.has(o3) ? i4 = this._convMap.get(o3) : (i4 = new xo({ conversationID: o3, type: Gt2(o3) ? R2.CONV_C2C : R2.CONV_GROUP }, this.isIntl(), this.isUsingChatCore()), a3 = true), i4._isInfoCompleted || i4.type === R2.CONV_SYSTEM)
+ var i4, a3 = this, s4 = false;
+ if (this._convMap.has(o3) ? i4 = this._convMap.get(o3) : (i4 = new jo({ conversationID: o3, type: bt2(o3) ? R2.CONV_C2C : R2.CONV_GROUP }, this.isIntl(), this.isUsingChatCore()), s4 = true), i4._isInfoCompleted || i4.type === R2.CONV_SYSTEM)
return D2({ conversation: i4 });
- if (Pt2(o3)) {
+ if (wt2(o3)) {
if (!this.get(7))
return E2({ code: k2.NO_MODULE });
if (!this._hasLocalGroup(o3))
@@ -11929,14 +11936,14 @@ var chat = { exports: {} };
var r4 = "".concat(this._n, ".").concat("getConversationProfile"), c3 = new P2("getConversationProfile");
return M2.l("".concat(r4, ". convID:").concat(o3, " remark:").concat(i4.remark, " lastMessage:"), i4.lastMessage), this._getUserOrGroupProfile(i4).then(function(e3) {
c3.setMessage("convID:".concat(o3, " unreadCount:").concat(e3.data.conversation.unreadCount)).end();
- var t3, n3 = s4.get(8);
- if (n3 && i4.type === R2.CONV_C2C && (t3 = o3.replace(R2.CONV_C2C, ""), n3.isMyFriend(t3)) && (n3 = n3.getFriendRemark(t3), i4.remark !== n3) && (i4.remark = n3, M2.l("".concat(r4, ". convID:").concat(o3, " patch remark:").concat(i4.remark))), M2.l("".concat(r4, " ok. isNewConv:").concat(a3, " convID:").concat(o3)), a3) {
+ var t3, n3 = a3.get(8);
+ if (n3 && i4.type === R2.CONV_C2C && (t3 = o3.replace(R2.CONV_C2C, ""), n3.isMyFriend(t3)) && (n3 = n3.getFriendRemark(t3), i4.remark !== n3) && (i4.remark = n3, M2.l("".concat(r4, ". convID:").concat(o3, " patch remark:").concat(i4.remark))), M2.l("".concat(r4, " ok. isNewConv:").concat(s4, " convID:").concat(o3)), s4) {
if (i4.type === R2.CONV_C2C)
- return s4._onNewC2CConv([o3.replace(R2.CONV_C2C, "")]).then(function() {
+ return a3._onNewC2CConv([o3.replace(R2.CONV_C2C, "")]).then(function() {
return D2({ conversation: i4 });
});
if (i4.type === R2.CONV_GROUP)
- return s4._onNewGroupConv([o3.replace(R2.CONV_GROUP, "")]).then(function() {
+ return a3._onNewGroupConv([o3.replace(R2.CONV_GROUP, "")]).then(function() {
return D2({ conversation: i4 });
});
}
@@ -11954,7 +11961,7 @@ var chat = { exports: {} };
});
} }, { key: "_insertConvAfterTopmost", value: function(e3) {
var t3, n3;
- e3 instanceof xo && !this._convMap.has(e3.conversationID) && (n3 = (t3 = d2(this._convMap)).findIndex(function(e4) {
+ e3 instanceof jo && !this._convMap.has(e3.conversationID) && (n3 = (t3 = d2(this._convMap)).findIndex(function(e4) {
return false === e4[1].isPinned;
}), t3.splice(n3, 0, [e3.conversationID, e3]), this._convMap = new Map(t3), this._setStorageConvList(), this.emitConvUpdate(true, false));
} }, { key: "_onProfileUpdated", value: function(e3) {
@@ -11968,25 +11975,25 @@ var chat = { exports: {} };
} }, { key: "disableMsgPullOnInvite", value: function() {
this._bPullOnInvite = false;
} }, { key: "_isSyncCompleted", value: function() {
- return this._pagingStatus === Un;
+ return this._pagingStatus === Fn;
} }, { key: "_errorLog", value: function(e3, t3, n3, o3) {
- var i4 = new Error("Params validate failed."), s4 = "".concat(this.getErrMsg("API_REFER")).concat(e3);
- throw M2.w("[".concat(e3, "] | ").concat(t3, " | ").concat(this.getErrMsg(n3, o3), ", ").concat(s4)), M2.e("[".concat(e3, "] Invalid ").concat(t3, ": type check failed for ").concat(t3, ".")), i4;
+ var i4 = new Error("Params validate failed."), a3 = "".concat(this.getErrMsg("API_REFER")).concat(e3);
+ throw M2.w("[".concat(e3, "] | ").concat(t3, " | ").concat(this.getErrMsg(n3, o3), ", ").concat(a3)), M2.e("[".concat(e3, "] Invalid ").concat(t3, ": type check failed for ").concat(t3, ".")), i4;
} }, { key: "_isValidConvID", value: function(e3) {
- return Gt2(e3) || Pt2(e3) || Ut2(e3);
+ return bt2(e3) || wt2(e3) || Ft2(e3);
} }, { key: "deleteConversation", value: function(e3) {
var t3 = this, n3 = "deleteConversation";
- return C2(e3) || at2(e3) || this._errorLog(n3, "options", "StringOrObjectRequiredLog"), C2(e3) ? (this._isValidConvID(e3) || this._errorLog(n3, "options", "InvalidConversationID", e3), M2.l("".concat(this._n, ".").concat(n3, " convID:").concat(e3)), this.deleteConvList({ conversationIDList: [e3], flag: 1 })) : (O2(e3.conversationIDList) || this._errorLog(n3, "conversationIDList", "ArrayRequiredLog"), 0 === e3.conversationIDList.length && this._errorLog(n3, "conversationIDList", "NonEmptyArrayLog"), e3.conversationIDList.forEach(function(e4) {
+ return C2(e3) || ut2(e3) || this._errorLog(n3, "options", "StringOrObjectRequiredLog"), C2(e3) ? (this._isValidConvID(e3) || this._errorLog(n3, "options", "InvalidConversationID", e3), M2.l("".concat(this._n, ".").concat(n3, " convID:").concat(e3)), this.deleteConvList({ conversationIDList: [e3], flag: 1 })) : (O2(e3.conversationIDList) || this._errorLog(n3, "conversationIDList", "ArrayRequiredLog"), 0 === e3.conversationIDList.length && this._errorLog(n3, "conversationIDList", "NonEmptyArrayLog"), e3.conversationIDList.forEach(function(e4) {
t3._isValidConvID(e4) || t3._errorLog(n3, "conversationIDList", "InvalidConversationID", e4);
}), "clearHistoryMessage" in e3 && "boolean" != typeof e3.clearHistoryMessage && this._errorLog(n3, "clearHistoryMessage", "BooleanRequiredLog"), 100 < e3.conversationIDList.length && (e3.conversationIDList = e3.conversationIDList.slice(0, 100)), this.deleteConvList(e3));
} }, { key: "deleteConvList", value: function(e3) {
- var t3 = e3.conversationIDList, t3 = void 0 === t3 ? [] : t3, n3 = e3.clearHistoryMessage, n3 = void 0 === n3 || n3, e3 = e3.flag, o3 = void 0 === e3 ? 0 : e3, i4 = "".concat(this._n, ".").concat("deleteConvList"), e3 = "convIDList:".concat(t3, " clearHistoryMessage:").concat(n3), s4 = (M2.l("".concat(i4, " ").concat(e3)), new P2("deleteConvList"));
- return s4.setMessage(e3), Promise.all([this.rmLocalOnlyConvList(t3), this.rmLocalAndRemoteConvList(t3, n3)]).then(function(e4) {
- s4.end();
+ var t3 = e3.conversationIDList, t3 = void 0 === t3 ? [] : t3, n3 = e3.clearHistoryMessage, n3 = void 0 === n3 || n3, e3 = e3.flag, o3 = void 0 === e3 ? 0 : e3, i4 = "".concat(this._n, ".").concat("deleteConvList"), e3 = "convIDList:".concat(t3, " clearHistoryMessage:").concat(n3), a3 = (M2.l("".concat(i4, " ").concat(e3)), new P2("deleteConvList"));
+ return a3.setMessage(e3), Promise.all([this.rmLocalOnlyConvList(t3), this.rmLocalAndRemoteConvList(t3, n3)]).then(function(e4) {
+ a3.end();
e4 = [].concat(d2(e4[0]), d2(e4[1]));
return 0 === e4.length ? E2(new L2({ code: k2.CONV_NOT_FOUND })) : (M2.l("".concat(i4, " ok")), D2(1 === o3 ? { conversationID: e4[0] } : { conversationIDList: e4 }));
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
});
} }, { key: "rmLocalOnlyConvList", value: function(e3) {
var n3 = this;
@@ -12020,20 +12027,20 @@ var chat = { exports: {} };
return o3 === R2.CONV_SYSTEM ? (this.get(7).deleteGroupSystemNotice({ messageList: this._msgListHandler.getLocalMsgList(t3) }), D2({ conversationID: t3 })) : E2({ code: k2.CONV_UN_RECORDED_TYPE });
e3.type = 2, e3.toGroupID = t3.replace(R2.CONV_GROUP, "");
}
- var i4 = "".concat(this._n, ".").concat("clearHistoryMessage"), s4 = new P2("clearHistoryMessage");
- return s4.setMessage("convID:".concat(t3)), M2.l("".concat(i4, ". convID:").concat(t3)), this.setMessageRead({ conversationID: t3 }).then(function() {
+ var i4 = "".concat(this._n, ".").concat("clearHistoryMessage"), a3 = new P2("clearHistoryMessage");
+ return a3.setMessage("convID:".concat(t3)), M2.l("".concat(i4, ". convID:").concat(t3)), this.setMessageRead({ conversationID: t3 }).then(function() {
return n3.req({ P: G2.CLEAR_HISTORY_MSG, data: e3 });
}).then(function() {
- s4.end(), M2.l("".concat(i4, " ok")), n3.clearMemMsg(t3);
+ a3.end(), M2.l("".concat(i4, " ok")), n3.clearMemMsg(t3);
var e4 = n3.getLocalConversation(t3);
return e4 && (e4.updateLastMessage(), n3._sortConvListAndEmitEvent()), D2({ conversationID: t3 });
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
});
} }, { key: "pinConversation", value: function(e3) {
- var t3, n3, o3, i4 = this, s4 = e3.conversationID, a3 = e3.isPinned, r4 = this.getLocalConversation(s4);
- return r4 && r4.isPinned === a3 ? D2({ conversationID: s4 }) : Ut2(s4) ? (r4 && (r4.isPinned = a3), this._sortConvListAndEmitEvent(), D2({ conversationID: s4 })) : (e3 = null, Gt2(s4) ? e3 = { type: 1, toAccount: s4.replace(R2.CONV_C2C, "") } : Pt2(s4) && (e3 = { type: 2, groupID: s4.replace(R2.CONV_GROUP, "") }), null === e3 ? E2({ code: k2.INVALID_CONV_ID }) : (t3 = "".concat(this._n, ".").concat("pinConversation"), n3 = "convID:".concat(s4, " isPinned:").concat(a3), (o3 = new P2("pinConversation")).setMessage(n3), M2.l("".concat(t3, ". ").concat(n3)), this.req({ P: G2.PIN_CONV, data: { fromAccount: this.getMyUserID(), operationType: true === a3 ? 1 : 2, itemList: [e3] } }).then(function() {
- return o3.end(), M2.l("".concat(t3, " ok")), r4 ? r4.isPinned !== a3 && (r4.isPinned = a3) : i4._convMap.set(s4, new xo({ conversationID: s4, type: Gt2(s4) ? R2.CONV_C2C : R2.CONV_GROUP, isPinned: a3 }, i4.isIntl(), i4.isUsingChatCore())), i4._sortConvListAndEmitEvent(), T2({ conversationID: s4 });
+ var t3, n3, o3, i4 = this, a3 = e3.conversationID, s4 = e3.isPinned, r4 = this.getLocalConversation(a3);
+ return r4 && r4.isPinned === s4 ? D2({ conversationID: a3 }) : Ft2(a3) ? (r4 && (r4.isPinned = s4), this._sortConvListAndEmitEvent(), D2({ conversationID: a3 })) : (e3 = null, bt2(a3) ? e3 = { type: 1, toAccount: a3.replace(R2.CONV_C2C, "") } : wt2(a3) && (e3 = { type: 2, groupID: a3.replace(R2.CONV_GROUP, "") }), null === e3 ? E2({ code: k2.INVALID_CONV_ID }) : (t3 = "".concat(this._n, ".").concat("pinConversation"), n3 = "convID:".concat(a3, " isPinned:").concat(s4), (o3 = new P2("pinConversation")).setMessage(n3), M2.l("".concat(t3, ". ").concat(n3)), this.req({ P: G2.PIN_CONV, data: { fromAccount: this.getMyUserID(), operationType: true === s4 ? 1 : 2, itemList: [e3] } }).then(function() {
+ return o3.end(), M2.l("".concat(t3, " ok")), r4 ? r4.isPinned !== s4 && (r4.isPinned = s4) : i4._convMap.set(a3, new jo({ conversationID: a3, type: bt2(a3) ? R2.CONV_C2C : R2.CONV_GROUP, isPinned: s4 }, i4.isIntl(), i4.isUsingChatCore())), i4._sortConvListAndEmitEvent(), T2({ conversationID: a3 });
}).catch(function(e4) {
return o3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})));
@@ -12060,15 +12067,15 @@ var chat = { exports: {} };
var t3 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], n3 = this._convMap.has(e3);
M2.l("".concat(this._n, ".deleteLocalConv convID:").concat(e3, " has:").concat(n3)), n3 && (this._convMap.delete(e3), this._convMapForDiff.delete(e3), this.clearMemMsg(e3), this._setStorageConvList(true), t3) && (n3 = !this._isTopicConv(e3), this.emitConvUpdate(n3, false));
} }, { key: "pullMsgOnInvite", value: function(e3) {
- var t3, n3, o3, i4, s4, a3 = this.get(7);
- a3 && (t3 = "".concat(this._n, ".pullMsgOnInvite"), M2.l("".concat(t3, " flag:").concat(this._bPullOnInvite)), this._bPullOnInvite) && (s4 = this.getLocalLastMessage(e3), n3 = this.getLocalSecondLastMessage(e3), i4 = o3 = 1, s4 && (o3 = s4.sequence), n3 && (i4 = n3.sequence), s4 = a3.getGroupRemoteLastSeq(e3.replace(R2.CONV_GROUP, "")), M2.l("".concat(t3, " convID:").concat(e3, " localLastSeq:").concat(o3, " localSecondLastSeq:").concat(i4, " remoteLastSeq:").concat(s4)), this.clearMemMsg(e3), 1 < o3 - i4 ? this._recursiveGetMsgList([], e3, false, o3, i4) : 1 < s4 - o3 && this._recursiveGetMsgList([], e3, true, s4, o3));
- } }, { key: "_recursiveGetMsgList", value: function(i4, s4, a3, r4, c3, e3) {
+ var t3, n3, o3, i4, a3, s4 = this.get(7);
+ s4 && (t3 = "".concat(this._n, ".pullMsgOnInvite"), M2.l("".concat(t3, " flag:").concat(this._bPullOnInvite)), this._bPullOnInvite) && (a3 = this.getLocalLastMessage(e3), n3 = this.getLocalSecondLastMessage(e3), i4 = o3 = 1, a3 && (o3 = a3.sequence), n3 && (i4 = n3.sequence), a3 = s4.getGroupRemoteLastSeq(e3.replace(R2.CONV_GROUP, "")), M2.l("".concat(t3, " convID:").concat(e3, " localLastSeq:").concat(o3, " localSecondLastSeq:").concat(i4, " remoteLastSeq:").concat(a3)), this.clearMemMsg(e3), 1 < o3 - i4 ? this._recursiveGetMsgList([], e3, false, o3, i4) : 1 < a3 - o3 && this._recursiveGetMsgList([], e3, true, a3, o3));
+ } }, { key: "_recursiveGetMsgList", value: function(i4, a3, s4, r4, c3, e3) {
var u3 = this;
- this.getMessageList({ conversationID: s4, nextReqMessageID: e3 }).then(function(e4) {
+ this.getMessageList({ conversationID: a3, nextReqMessageID: e3 }).then(function(e4) {
var e4 = e4.data, t3 = e4.messageList, n3 = e4.isCompleted, e4 = e4.nextReqMessageID, o3 = t3.filter(function(e5) {
- return a3 ? e5.sequence > c3 && e5.sequence <= r4 : e5.sequence > c3 && e5.sequence < r4;
+ return s4 ? e5.sequence > c3 && e5.sequence <= r4 : e5.sequence > c3 && e5.sequence < r4;
});
- i4.unshift.apply(i4, d2(o3)), !n3 && 0 < t3.length && t3[0].sequence > c3 && i4.length < 60 ? u3._recursiveGetMsgList(i4, s4, a3, r4, c3, e4) : u3._emitMsgReceived(s4, i4);
+ i4.unshift.apply(i4, d2(o3)), !n3 && 0 < t3.length && t3[0].sequence > c3 && i4.length < 60 ? u3._recursiveGetMsgList(i4, a3, s4, r4, c3, e4) : u3._emitMsgReceived(a3, i4);
});
} }, { key: "_emitMsgReceived", value: function(e3, t3) {
var n3, o3, i4 = this;
@@ -12090,7 +12097,7 @@ var chat = { exports: {} };
return !(!this._msgListHandler.hasLocalMsg(e3.conversationID, e3.ID) && !this._sll.has(e3.random));
} }, { key: "modifyMessageList", value: function(e3) {
var t3, n3;
- e3.startsWith(R2.CONV_C2C) && this._convMap.has(e3) && (n3 = this._convMap.get(e3), t3 = Date.now(), this._msgListHandler.modifyMsgSentByPeer({ conversationID: e3, latestNick: n3.userProfile.nick, latestAvatar: n3.userProfile.avatar }), n3 = this.get(4).getNickAndAvatarByUserID(this.getMyUserID()), this._msgListHandler.modifyMsgSentByMe({ conversationID: e3, latestNick: n3.nick, latestAvatar: n3.avatar }), M2.l("".concat(this._n, ".modifyMessageList convID:").concat(e3, " cost:").concat(tn(t3))));
+ e3.startsWith(R2.CONV_C2C) && this._convMap.has(e3) && (n3 = this._convMap.get(e3), t3 = Date.now(), this._msgListHandler.modifyMsgSentByPeer({ conversationID: e3, latestNick: n3.userProfile.nick, latestAvatar: n3.userProfile.avatar }), n3 = this.get(4).getNickAndAvatarByUserID(this.getMyUserID()), this._msgListHandler.modifyMsgSentByMe({ conversationID: e3, latestNick: n3.nick, latestAvatar: n3.avatar }), M2.l("".concat(this._n, ".modifyMessageList convID:").concat(e3, " cost:").concat(an(t3))));
} }, { key: "updateUserProfileSpecifiedKey", value: function(e3) {
M2.l("".concat(this._n, ".updateUserProfileSpecifiedKey options:"), e3);
var t3 = e3.conversationID, n3 = e3.nick, e3 = e3.avatar;
@@ -12099,7 +12106,7 @@ var chat = { exports: {} };
var n3 = this, e3 = this.getLocalConvList(), o3 = Date.now();
e3.forEach(function(e4) {
n3.modifyMessageSentByMe(y2({ conversationID: e4.conversationID }, t3));
- }), M2.l("".concat(this._n, "._onMyProfileModified. modify all messages sent by me, cost:").concat(tn(o3)));
+ }), M2.l("".concat(this._n, "._onMyProfileModified. modify all messages sent by me, cost:").concat(an(o3)));
} }, { key: "modifyMessageSentByMe", value: function(e3) {
this._msgListHandler.modifyMsgSentByMe(e3);
} }, { key: "getLatestMessageSentByMe", value: function(e3) {
@@ -12159,8 +12166,8 @@ var chat = { exports: {} };
var t3 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1];
M2.l("".concat(this._n, ".clearMemMsg convID:").concat(e3, " isOverLimit:").concat(t3)), this._msgListHandler.removeByConvID(e3), this._completedMap.delete(e3), this._roamingMsgKeyAndTimeMap.delete(e3), this._everClearedMap.set(e3, 1);
} }, { key: "reset", value: function() {
- M2.l("".concat(this._n, ".reset")), this._setStorageConvList(true), this._pagingStatus = Gn, this._msgListHandler.reset(), this._msgRemindHandler.reset(), this._roamingMsgKeyAndTimeMap.clear(), this._sll.reset(), this._peerReadTimeMap.clear(), this._completedMap.clear(), this._convMap.clear(), this._pagingTs = 0, this._pagingStartIdx = 0, this._pagingPinnedTs = 0, this._pagingPinnedStartIdx = 0, this._remoteGroupReadSeqMap.clear(), this._convTotalUnreadCount = 0, this._pagingGetCostList.length = 0, this._pagingConvIDMap.clear(), this._convIDFromUnreadDBMap.clear(), this._pagingGetCostList.length = 0, this._convMapForDiff.clear(), this._partialUpdatedConvMap.clear(), this._everClearedMap.clear(), this._bPullOnInvite = true, this._convGroupHandler.reset(), this.resetReady();
- } }])), Wo = e2(function e3(t3) {
+ M2.l("".concat(this._n, ".reset")), this._setStorageConvList(true), this._pagingStatus = bn, this._msgListHandler.reset(), this._msgRemindHandler.reset(), this._roamingMsgKeyAndTimeMap.clear(), this._sll.reset(), this._peerReadTimeMap.clear(), this._completedMap.clear(), this._convMap.clear(), this._pagingTs = 0, this._pagingStartIdx = 0, this._pagingPinnedTs = 0, this._pagingPinnedStartIdx = 0, this._remoteGroupReadSeqMap.clear(), this._convTotalUnreadCount = 0, this._pagingGetCostList.length = 0, this._pagingConvIDMap.clear(), this._convIDFromUnreadDBMap.clear(), this._pagingGetCostList.length = 0, this._convMapForDiff.clear(), this._partialUpdatedConvMap.clear(), this._everClearedMap.clear(), this._bPullOnInvite = true, this._convGroupHandler.reset(), this.resetReady();
+ } }])), Qo = e2(function e3(t3) {
p3(this, e3), this._grpM = t3, this._n = "GroupTipsHandler", this._cachedGroupTipsMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4;
}, [{ key: "onCheckTimer", value: function(e3) {
e3 % 1 == 0 && 0 < this._cachedGroupTipsMap.size && this._check();
@@ -12175,8 +12182,8 @@ var chat = { exports: {} };
var e3 = this._assembly(e3), t3 = e3.eventDataList, n3 = e3.result, e3 = e3.AVChatRoomMessageList;
0 < e3.length && this._grpM.onAVChatRoomMessage(e3), 0 < n3.length && (this._grpM.emitOEvt(h2.MESSAGE_RECEIVED, n3), this._handleTips(n3)), 0 < t3.length && (this._grpM.updateNextMessageSeq(t3), this._grpM.get(11).onNewMessage({ conversationOptionsList: t3, isInstantMessage: true }));
} }, { key: "_assembly", value: function(e3) {
- for (var t3 = e3.event, n3 = e3.dataList, o3 = null, i4 = [], s4 = [], a3 = {}, r4 = [], c3 = 0, u3 = n3.length; c3 < u3; c3++) {
- var l3 = vt2(n3[c3]);
+ for (var t3 = e3.event, n3 = e3.dataList, o3 = null, i4 = [], a3 = [], s4 = {}, r4 = [], c3 = 0, u3 = n3.length; c3 < u3; c3++) {
+ var l3 = yt2(n3[c3]);
if (6 === t3) {
if (this._grpM.isGroupAttributesUpdatedNotice(l3))
continue;
@@ -12188,21 +12195,21 @@ var chat = { exports: {} };
if (v4 || m3)
if (this._grpM.isMessageFromOrToAVChatroom(p4))
l3.event = t3, r4.push(l3);
- else if (l3.currentUser = this._grpM.getMyUserID(), l3.conversationType = R2.CONV_GROUP, (o3 = new Do(l3)).setElement({ type: R2.MSG_GRP_TIP, content: y2(y2({}, l3.elements), {}, { groupProfile: l3.groupProfile }) }), o3.isSystemMessage = false, 1 !== g3) {
+ else if (l3.currentUser = this._grpM.getMyUserID(), l3.conversationType = R2.CONV_GROUP, (o3 = new So(l3)).setElement({ type: R2.MSG_GRP_TIP, content: y2(y2({}, l3.elements), {}, { groupProfile: l3.groupProfile }) }), o3.isSystemMessage = false, 1 !== g3) {
var v4 = this._grpM.get(11), m3 = o3, g3 = m3.conversationID, m3 = m3.sequence;
if (6 === t3)
- o3._onlineOnlyFlag = true, s4.push(o3);
- else if (!v4.pushIntoNoticeResult(s4, o3))
+ o3._onlineOnlyFlag = true, a3.push(o3);
+ else if (!v4.pushIntoNoticeResult(a3, o3))
continue;
- this._grpM.isMessageFromCommunityOfTopic(_3, h3) || 6 === t3 && v4.getLocalConversation(g3) || (6 !== t3 && this._qualityStat(o3), _3 = v4.isRemoteRead({ conversationID: g3, sequence: m3 }), N3(a3[g3]) ? (h3 = 0, "in" !== o3.flow || o3._isExcludedFromUnreadCount || o3._onlineOnlyFlag || _3 || (h3 = 1), a3[g3] = i4.push({ conversationID: g3, unreadCount: h3, type: N3(f3) ? o3.conversationType : f3, subType: o3.conversationSubType, lastMessage: o3._isExcludedFromLastMessage ? "" : o3 }) - 1) : (i4[v4 = a3[g3]].type = o3.conversationType, i4[v4].subType = o3.conversationSubType, i4[v4].lastMessage = o3._isExcludedFromLastMessage ? "" : o3, "in" !== o3.flow || o3._isExcludedFromUnreadCount || o3._onlineOnlyFlag || _3 || i4[v4].unreadCount++));
+ this._grpM.isMessageFromCommunityOfTopic(_3, h3) || 6 === t3 && v4.getLocalConversation(g3) || (6 !== t3 && this._qualityStat(o3), _3 = v4.isRemoteRead({ conversationID: g3, sequence: m3 }), N3(s4[g3]) ? (h3 = 0, "in" !== o3.flow || o3._isExcludedFromUnreadCount || o3._onlineOnlyFlag || _3 || (h3 = 1), s4[g3] = i4.push({ conversationID: g3, unreadCount: h3, type: N3(f3) ? o3.conversationType : f3, subType: o3.conversationSubType, lastMessage: o3._isExcludedFromLastMessage ? "" : o3 }) - 1) : (i4[v4 = s4[g3]].type = o3.conversationType, i4[v4].subType = o3.conversationSubType, i4[v4].lastMessage = o3._isExcludedFromLastMessage ? "" : o3, "in" !== o3.flow || o3._isExcludedFromUnreadCount || o3._onlineOnlyFlag || _3 || i4[v4].unreadCount++));
} else
this._qualityStat(o3);
else
this._cacheAndCompare({ groupID: p4, event: t3, item: l3, groupType: d3 });
}
- return { eventDataList: i4, result: s4, AVChatRoomMessageList: r4 };
+ return { eventDataList: i4, result: a3, AVChatRoomMessageList: r4 };
} }, { key: "_qualityStat", value: function(e3) {
- this._grpM.get(26).addMessageSequence({ key: zn, message: e3 });
+ this._grpM.get(26).addMessageSequence({ key: Qn, message: e3 });
} }, { key: "_handleTips", value: function(e3) {
var t3 = this;
e3.forEach(function(e4) {
@@ -12259,42 +12266,42 @@ var chat = { exports: {} };
e4 && e4.updateRole(R2.GRP_MBR_ROLE_MEMBER);
});
} }, { key: "_onGroupProfileModified", value: function(e3) {
- var t3 = this, e3 = e3.payload, n3 = e3.newGroupProfile, o3 = e3.groupProfile, i4 = e3.operatorInfo, e3 = o3.groupID, s4 = this._grpM.getLocalGroupProfile(e3), o3 = (Object.keys(n3).forEach(function(e4) {
+ var t3 = this, e3 = e3.payload, n3 = e3.newGroupProfile, o3 = e3.groupProfile, i4 = e3.operatorInfo, e3 = o3.groupID, a3 = this._grpM.getLocalGroupProfile(e3), o3 = (Object.keys(n3).forEach(function(e4) {
switch (e4) {
case "ownerID":
- t3._ownerChanged(s4, n3);
+ t3._ownerChanged(a3, n3);
break;
case "groupName":
- s4.name = n3[e4];
+ a3.name = n3[e4];
break;
default:
- s4[e4] = n3[e4];
+ a3[e4] = n3[e4];
}
}), N3(i4) || Object.keys(i4).forEach(function(e4) {
var t4;
- "nameCard" === e4 ? s4.updateSelfInfo({ nameCard: i4[e4] }) : "role" === e4 && (t4 = "", 400 === i4[e4] ? t4 = R2.GRP_MBR_ROLE_OWNER : 300 === i4[e4] ? t4 = R2.GRP_MBR_ROLE_ADMIN : 200 === i4[e4] && (t4 = R2.GRP_MBR_ROLE_MEMBER), s4.updateSelfInfo({ role: t4 }));
- }), !s4.isSupportTopic);
+ "nameCard" === e4 ? a3.updateSelfInfo({ nameCard: i4[e4] }) : "role" === e4 && (t4 = "", 400 === i4[e4] ? t4 = R2.GRP_MBR_ROLE_OWNER : 300 === i4[e4] ? t4 = R2.GRP_MBR_ROLE_ADMIN : 200 === i4[e4] && (t4 = R2.GRP_MBR_ROLE_MEMBER), a3.updateSelfInfo({ role: t4 }));
+ }), !a3.isSupportTopic);
this._grpM.emitGroupListUpdate(true, o3);
} }, { key: "_ownerChanged", value: function(e3, t3) {
var e3 = e3.groupID, n3 = this._grpM.getLocalGroupProfile(e3), o3 = this._grpM.getMyUserID();
o3 === t3.ownerID && (n3.updateGroup({ selfInfo: { role: R2.GRP_MBR_ROLE_OWNER } }), n3 = (t3 = this._grpM.getGroupMemberHandler()).getLocalGroupMemberInfo(e3, o3), o3 = this._grpM.getLocalGroupProfile(e3).ownerID, t3 = t3.getLocalGroupMemberInfo(e3, o3), n3 && n3.updateRole(R2.GRP_MBR_ROLE_OWNER), t3) && t3.updateRole(R2.GRP_MBR_ROLE_MEMBER);
} }, { key: "_onMemberInfoModified", value: function(e3) {
- var t3 = e3.to, n3 = e3.payload, o3 = n3.groupProfile, n3 = n3.memberList, i4 = o3.groupID, s4 = (Nt2(t3) && this._updateTopicMuteTime(e3), this._grpM.getGroupMemberHandler());
+ var t3 = e3.to, n3 = e3.payload, o3 = n3.groupProfile, n3 = n3.memberList, i4 = o3.groupID, a3 = (Ut2(t3) && this._updateTopicMuteTime(e3), this._grpM.getGroupMemberHandler());
n3.forEach(function(e4) {
- var t4 = s4.getLocalGroupMemberInfo(i4, e4.userID);
+ var t4 = a3.getLocalGroupMemberInfo(i4, e4.userID);
t4 && A2(e4.muteTime) && t4.updateMuteUntil(e4.muteTime);
});
} }, { key: "_updateTopicMuteTime", value: function(e3) {
var t3 = e3.to, e3 = e3.payload, n3 = e3.groupProfile, e3 = e3.memberList, o3 = void 0 === e3 ? [] : e3, e3 = this._grpM.get(10), n3 = n3.groupID, i4 = e3.getLocalTopic(n3, t3);
if (i4) {
- for (var s4 = false, a3 = 0; a3 < o3.length; a3++) {
- var r4 = o3[a3];
+ for (var a3 = false, s4 = 0; s4 < o3.length; s4++) {
+ var r4 = o3[s4];
if (r4.userID === this._grpM.getMyUserID() && 0 <= r4.muteTime) {
- i4.updateSelfInfo({ muteTime: r4.muteTime }), s4 = true;
+ i4.updateSelfInfo({ muteTime: r4.muteTime }), a3 = true;
break;
}
}
- s4 && this._grpM.emitOEvt(h2.TOPIC_UPDATED, { groupID: n3, topic: i4 });
+ a3 && this._grpM.emitOEvt(h2.TOPIC_UPDATED, { groupID: n3, topic: i4 });
}
} }, { key: "_onTopicProfileUpdated", value: function(e3) {
var t3 = e3.payload, n3 = t3.groupProfile.groupID, t3 = t3.newTopicInfo;
@@ -12313,8 +12320,8 @@ var chat = { exports: {} };
e3 === R2.GRP_AVCHATROOM ? this._grpM.hasLocalGroup(t3) ? this._notifyCachedGroupTips(t3, e3) : this._grpM.setUnjoinedAVChatRoom(t3) : (this._grpM.updateGroupMap([n3]), this._notifyCachedGroupTips(t3, e3)), this._checkCountMap.has(t3) || this._checkCountMap.set(t3, 0);
} }, { key: "reset", value: function() {
this._cachedGroupTipsMap.clear(), this._checkCountMap.clear();
- } }]), Yo = e2(function e3(t3) {
- p3(this, e3), this._grpM = t3, this._n = "CommonGroupHandler", this.tempConversationList = null, this._cachedGroupMessageMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this.PAGING_GRP_COUNT_LIMIT = 200, this._pagingStatus = Gn, this._pagingGetCostList = [], t3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, this.syncGroupList, this);
+ } }]), $o = e2(function e3(t3) {
+ p3(this, e3), this._grpM = t3, this._n = "CommonGroupHandler", this.tempConversationList = null, this._cachedGroupMessageMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this.PAGING_GRP_COUNT_LIMIT = 200, this._pagingStatus = bn, this._pagingGetCostList = [], t3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, this.syncGroupList, this);
}, [{ key: "onCheckTimer", value: function(e3) {
e3 % 1 == 0 && 0 < this._cachedGroupMessageMap.size && this._check();
} }, { key: "_check", value: function() {
@@ -12326,34 +12333,34 @@ var chat = { exports: {} };
} }, { key: "updateLastMsg", value: function(e3) {
var t3 = "".concat(this._n, ".updateLastMsg");
if (0 !== this._grpM.getGroupMap().size) {
- for (var n3, o3, i4, s4, a3 = false, r4 = e3.length, c3 = 0; c3 < r4; c3++)
- (n3 = e3[c3]).type === R2.CONV_GROUP && 0 !== n3.lastMessage.lastSequence && null !== n3.lastMessage.payload && (o3 = n3.conversationID.split(/^GROUP/)[1], o3 = this._grpM.getLocalGroupProfile(o3)) && (i4 = o3.lastMessage, s4 = n3.lastMessage, JSON.stringify(i4) !== JSON.stringify(s4)) && (o3.lastMessage = y2({}, n3.lastMessage), a3 = true);
- M2.l("".concat(t3, " convCount:").concat(r4, " groupCount:").concat(this._grpM.getLocalGroupList().length, " isUpdated:").concat(a3)), a3 && (this._grpM.sortLocalGroupList(), this._grpM.emitGroupListUpdate(true, false));
+ for (var n3, o3, i4, a3, s4 = false, r4 = e3.length, c3 = 0; c3 < r4; c3++)
+ (n3 = e3[c3]).type === R2.CONV_GROUP && 0 !== n3.lastMessage.lastSequence && null !== n3.lastMessage.payload && (o3 = n3.conversationID.split(/^GROUP/)[1], o3 = this._grpM.getLocalGroupProfile(o3)) && (i4 = o3.lastMessage, a3 = n3.lastMessage, JSON.stringify(i4) !== JSON.stringify(a3)) && (o3.lastMessage = y2({}, n3.lastMessage), s4 = true);
+ M2.l("".concat(t3, " convCount:").concat(r4, " groupCount:").concat(this._grpM.getLocalGroupList().length, " isUpdated:").concat(s4)), s4 && (this._grpM.sortLocalGroupList(), this._grpM.emitGroupListUpdate(true, false));
} else
this.tempConversationList = e3;
} }, { key: "onNewMessage", value: function(e3) {
- var t3 = this._assembly(e3), n3 = t3.conversationOptionsList, o3 = t3.messageList, t3 = t3.AVChatRoomMessageList, t3 = (0 < t3.length && this._grpM.onAVChatRoomMessage(t3), St2(o3)), t3 = (0 < t3.length && this._grpM.emitOEvt(h2.MESSAGE_MODIFIED, t3), 0 < n3.length && (this._grpM.get(11).onNewMessage({ conversationOptionsList: n3, isInstantMessage: false !== e3.isInstantMessage, updateUnreadCount: false !== e3.updateUnreadCount }), this._grpM.updateNextMessageSeq(n3)), Rt2(o3));
+ var t3 = this._assembly(e3), n3 = t3.conversationOptionsList, o3 = t3.messageList, t3 = t3.AVChatRoomMessageList, t3 = (0 < t3.length && this._grpM.onAVChatRoomMessage(t3), At2(o3)), t3 = (0 < t3.length && this._grpM.emitOEvt(h2.MESSAGE_MODIFIED, t3), 0 < n3.length && (this._grpM.get(11).onNewMessage({ conversationOptionsList: n3, isInstantMessage: false !== e3.isInstantMessage, updateUnreadCount: false !== e3.updateUnreadCount }), this._grpM.updateNextMessageSeq(n3)), Nt2(o3));
0 < t3.length && this._grpM.emitOEvt(h2.MESSAGE_RECEIVED, t3), o3.length = 0;
} }, { key: "_assembly", value: function(e3) {
- var t3 = e3.dataList, n3 = e3.event, o3 = e3.isInstantMessage, i4 = null, s4 = [], a3 = [], r4 = [], c3 = {}, u3 = this._grpM.getFileDownloadProxy(), l3 = this._grpM.getDownloadFileAuthKey(), d3 = this._grpM.get(17).getFileDNList(), p4 = t3.length;
+ var t3 = e3.dataList, n3 = e3.event, o3 = e3.isInstantMessage, i4 = null, a3 = [], s4 = [], r4 = [], c3 = {}, u3 = this._grpM.getFileDownloadProxy(), l3 = this._grpM.getDownloadFileAuthKey(), d3 = this._grpM.get(17).getFileDNList(), p4 = t3.length;
1 < p4 && t3.sort(function(e4, t4) {
return e4.sequence - t4.sequence;
});
for (var _3 = this._grpM.get(11), h3 = this._grpM.get(4), g3 = 0; g3 < p4; g3++) {
- var f3, m3 = vt2(t3[g3]), v4 = m3.groupProfile, I3 = v4.groupID, M3 = v4.communityType, M3 = void 0 === M3 ? 0 : M3, y3 = v4.topicID, y3 = void 0 === y3 ? void 0 : y3, C3 = v4.invisible, v4 = v4.groupType, v4 = void 0 === v4 ? void 0 : v4, T3 = void 0, D3 = this._grpM.isMessageFromTopic(M3, y3), E3 = (D3 && (T3 = R2.CONV_TOPIC, m3.to = y3), this._grpM.hasLocalGroup(I3));
- !E3 && this._grpM.isUnjoinedAVChatRoom(I3) || (E3 || D3 ? this._grpM.isMessageFromOrToAVChatroom(I3) ? (m3.event = n3, r4.push(m3)) : (m3.currentUser = this._grpM.getMyUserID(), m3.conversationType = R2.CONV_GROUP, m3.isSystemMessage = !!m3.isSystemMessage, (i4 = new Do(m3)).setElement(m3.elements, u3, l3, d3), 1 !== C3 ? (E3 = 1 === t3[g3].isModified, _3.isMessageSentByCurrentInstance(i4) ? i4.isModified = E3 : E3 = false, 1 === m3.onlineOnlyFlag ? (i4._onlineOnlyFlag = true, _3.isMessageSentByCurrentInstance(i4) || a3.push(i4)) : this._grpM.isMessageFromCommunityOfTopic(M3, y3) ? a3.push(i4) : (i4.from === this._grpM.getMyUserID() && (D3 = _3.getLatestMessageSentByMe(i4.conversationID)) && (C3 = D3.nick, M3 = D3.avatar, C3 === i4.nick && M3 === i4.avatar || (_3.modifyMessageSentByMe({ conversationID: f3, latestNick: i4.nick, latestAvatar: i4.avatar }), h3.mockOnNickAvatarModified(i4.nick, i4.avatar))), _3.pushIntoMessageList(a3, i4, E3) && (this._qualityStat(o3, i4), f3 = (y3 = i4).conversationID, D3 = y3.sequence, C3 = _3.isRemoteRead({ conversationID: f3, sequence: D3 }), N3(c3[f3]) ? (M3 = 0, "in" !== i4.flow || i4._isExcludedFromUnreadCount || C3 || (M3 = 1), c3[f3] = s4.push({ conversationID: f3, unreadCount: M3, type: N3(T3) ? i4.conversationType : T3, subType: i4.conversationSubType, lastMessage: i4._isExcludedFromLastMessage ? "" : i4 }) - 1) : (s4[E3 = c3[f3]].type = N3(T3) ? i4.conversationType : T3, s4[E3].subType = i4.conversationSubType, s4[E3].lastMessage = i4._isExcludedFromLastMessage ? "" : i4, "in" !== i4.flow || i4._isExcludedFromUnreadCount || C3 || s4[E3].unreadCount++)))) : this._qualityStat(o3, i4)) : this._cacheAndCompare({ groupID: I3, event: n3, item: m3, groupType: v4 }));
+ var f3, m3 = yt2(t3[g3]), v4 = m3.groupProfile, I3 = v4.groupID, M3 = v4.communityType, M3 = void 0 === M3 ? 0 : M3, y3 = v4.topicID, y3 = void 0 === y3 ? void 0 : y3, C3 = v4.invisible, v4 = v4.groupType, v4 = void 0 === v4 ? void 0 : v4, T3 = void 0, D3 = this._grpM.isMessageFromTopic(M3, y3), E3 = (D3 && (T3 = R2.CONV_TOPIC, m3.to = y3), this._grpM.hasLocalGroup(I3));
+ !E3 && this._grpM.isUnjoinedAVChatRoom(I3) || (E3 || D3 ? this._grpM.isMessageFromOrToAVChatroom(I3) ? (m3.event = n3, r4.push(m3)) : (m3.currentUser = this._grpM.getMyUserID(), m3.conversationType = R2.CONV_GROUP, m3.isSystemMessage = !!m3.isSystemMessage, (i4 = new So(m3)).setElement(m3.elements, u3, l3, d3), 1 !== C3 ? (E3 = 1 === t3[g3].isModified, _3.isMessageSentByCurrentInstance(i4) ? i4.isModified = E3 : E3 = false, 1 === m3.onlineOnlyFlag ? (i4._onlineOnlyFlag = true, _3.isMessageSentByCurrentInstance(i4) || s4.push(i4)) : this._grpM.isMessageFromCommunityOfTopic(M3, y3) ? s4.push(i4) : (i4.from === this._grpM.getMyUserID() && (D3 = _3.getLatestMessageSentByMe(i4.conversationID)) && (C3 = D3.nick, M3 = D3.avatar, C3 === i4.nick && M3 === i4.avatar || (_3.modifyMessageSentByMe({ conversationID: f3, latestNick: i4.nick, latestAvatar: i4.avatar }), h3.mockOnNickAvatarModified(i4.nick, i4.avatar))), _3.pushIntoMessageList(s4, i4, E3) && (this._qualityStat(o3, i4), f3 = (y3 = i4).conversationID, D3 = y3.sequence, C3 = _3.isRemoteRead({ conversationID: f3, sequence: D3 }), N3(c3[f3]) ? (M3 = 0, "in" !== i4.flow || i4._isExcludedFromUnreadCount || C3 || (M3 = 1), c3[f3] = a3.push({ conversationID: f3, unreadCount: M3, type: N3(T3) ? i4.conversationType : T3, subType: i4.conversationSubType, lastMessage: i4._isExcludedFromLastMessage ? "" : i4 }) - 1) : (a3[E3 = c3[f3]].type = N3(T3) ? i4.conversationType : T3, a3[E3].subType = i4.conversationSubType, a3[E3].lastMessage = i4._isExcludedFromLastMessage ? "" : i4, "in" !== i4.flow || i4._isExcludedFromUnreadCount || C3 || a3[E3].unreadCount++)))) : this._qualityStat(o3, i4)) : this._cacheAndCompare({ groupID: I3, event: n3, item: m3, groupType: v4 }));
}
- return { conversationOptionsList: s4, messageList: a3, AVChatRoomMessageList: r4 };
+ return { conversationOptionsList: a3, messageList: s4, AVChatRoomMessageList: r4 };
} }, { key: "_qualityStat", value: function(e3, t3) {
var n3 = this._grpM.get(26);
- n3.addMessageSequence({ key: zn, message: t3 }), e3 && 0 < t3.clientTime && n3.addMessageDelay(t3.clientTime);
+ n3.addMessageSequence({ key: Qn, message: t3 }), e3 && 0 < t3.clientTime && n3.addMessageDelay(t3.clientTime);
} }, { key: "onMsgRevoked", value: function(e3, t3) {
var n3 = this, u3 = this._grpM.get(11), l3 = [], d3 = [];
e3.dataList.forEach(function(e4) {
- var t4 = e4.elements.revokedInfos, a3 = e4.revokerInfo, r4 = e4.groupProfile, c3 = false;
- r4 && (c3 = Ot2({ groupID: r4.groupID }) || !S2(r4.topicID)), N3(t4) || t4.forEach(function(e5) {
- var t5, n4 = S2(e5.topicID) ? "GROUP".concat(e5.groupID) : "GROUP".concat(e5.topicID), o3 = u3.getLocalConversation(n4), i4 = e5.revokerInfo && e5.revokerInfo.revoker || a3 && a3.revoker, s4 = a3 && a3.reason || "";
- o3 && At2(o3.type) ? t5 = { conversationID: n4, sequence: e5.sequence, ID: "".concat(e5.tinyID, "-").concat(e5.clientTime, "-").concat(e5.random) } : (o3 = u3.revoke(n4, e5.sequence, e5.random)) ? t5 = o3 : (t5 = { conversationID: n4, sequence: e5.sequence }, e5.tinyID && e5.clientTime && e5.random && (t5.ID = "".concat(e5.tinyID, "-").concat(e5.clientTime, "-").concat(e5.random)), e5.time && (t5.time = e5.time)), t5 && (t5.revoker = i4, t5.revokeReason = s4, t5.revokerInfo = { userID: i4, nick: "", avatar: "" }, (c3 ? (t5.revokerInfo.nick = r4.nick, t5.revokerInfo.avatar = r4.avatar, l3) : d3).push(t5));
+ var t4 = e4.elements.revokedInfos, s4 = e4.revokerInfo, r4 = e4.groupProfile, c3 = false;
+ r4 && (c3 = Pt2({ groupID: r4.groupID }) || !S2(r4.topicID)), N3(t4) || t4.forEach(function(e5) {
+ var t5, n4 = S2(e5.topicID) ? "GROUP".concat(e5.groupID) : "GROUP".concat(e5.topicID), o3 = u3.getLocalConversation(n4), i4 = e5.revokerInfo && e5.revokerInfo.revoker || s4 && s4.revoker, a3 = s4 && s4.reason || "";
+ o3 && Gt2(o3.type) ? t5 = { conversationID: n4, sequence: e5.sequence, ID: "".concat(e5.tinyID, "-").concat(e5.clientTime, "-").concat(e5.random) } : (o3 = u3.revoke(n4, e5.sequence, e5.random)) ? t5 = o3 : (t5 = { conversationID: n4, sequence: e5.sequence }, e5.tinyID && e5.clientTime && e5.random && (t5.ID = "".concat(e5.tinyID, "-").concat(e5.clientTime, "-").concat(e5.random)), e5.time && (t5.time = e5.time)), t5 && (t5.revoker = i4, t5.revokeReason = a3, t5.revokerInfo = { userID: i4, nick: "", avatar: "" }, (c3 ? (t5.revokerInfo.nick = r4.nick, t5.revokerInfo.avatar = r4.avatar, l3) : d3).push(t5));
});
}), 0 === d3.length && 0 === l3.length || (u3.onMessageRevoked([].concat(l3, d3), t3), 0 < l3.length && this._grpM.emitOEvt(h2.MESSAGE_REVOKED, l3), 0 < d3.length && u3.updateRevokerInfo(d3).then(function(e4) {
n3._grpM.emitOEvt(h2.MESSAGE_REVOKED, e4);
@@ -12366,47 +12373,47 @@ var chat = { exports: {} };
}), this._grpM.getGroupMap().forEach(function(e4, t4) {
e4.isSupportTopic && n3.delete(t4);
});
- for (var i4 = d2(n3.keys()), s4 = 0, a3 = i4.length; s4 < a3; s4++)
- this._grpM.deleteGroup(i4[s4]);
+ for (var i4 = d2(n3.keys()), a3 = 0, s4 = i4.length; a3 < s4; a3++)
+ this._grpM.deleteGroup(i4[a3]);
} }, { key: "syncGroupList", value: function() {
- var o3, i4, s4 = this, e3 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t3 = (this._pagingStatus === Gn && this._grpM.clearGroupMap(), d2(re2)), n3 = this.PAGING_GRP_COUNT_LIMIT, a3 = [];
- return true === e3 ? this._pagingGetGroupListWithTopic({ limit: n3, offset: 0, groupBaseInfoFilter: t3, groupList: a3 }) : (e3 = "syncGroupList", o3 = "".concat(this._n, ".").concat(e3), i4 = new P2(e3), this._pagingGetGroupList({ limit: n3, offset: 0, groupBaseInfoFilter: t3, groupList: a3 }).then(function() {
- var e4 = en(s4._pagingGetCostList), t4 = $t2(s4._pagingGetCostList), n4 = (s4._pagingGetCostList.length = 0, s4._pagingStatus = Un, s4._groupListTreeShaking(a3), s4._grpM.updateGroupMap(a3), s4._grpM.getLocalGroupList().length), n4 = "count:".concat(n4, " sum:").concat(t4, " avg:").concat(e4);
- return M2.l("".concat(o3, " ok. ").concat(n4)), i4.setMessage(n4).end(), s4.tempConversationList && (s4.updateLastMsg(s4.tempConversationList), s4.tempConversationList = null), s4._grpM.emitGroupListUpdate(true, true), T2({ groupList: s4._grpM.getLocalGroupList() });
+ var o3, i4, a3 = this, e3 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t3 = (this._pagingStatus === bn && this._grpM.clearGroupMap(), d2(re2)), n3 = this.PAGING_GRP_COUNT_LIMIT, s4 = [];
+ return true === e3 ? this._pagingGetGroupListWithTopic({ limit: n3, offset: 0, groupBaseInfoFilter: t3, groupList: s4 }) : (e3 = "syncGroupList", o3 = "".concat(this._n, ".").concat(e3), i4 = new P2(e3), this._pagingGetGroupList({ limit: n3, offset: 0, groupBaseInfoFilter: t3, groupList: s4 }).then(function() {
+ var e4 = on(a3._pagingGetCostList), t4 = nn(a3._pagingGetCostList), n4 = (a3._pagingGetCostList.length = 0, a3._pagingStatus = Fn, a3._groupListTreeShaking(s4), a3._grpM.updateGroupMap(s4), a3._grpM.getLocalGroupList().length), n4 = "count:".concat(n4, " sum:").concat(t4, " avg:").concat(e4);
+ return M2.l("".concat(o3, " ok. ").concat(n4)), i4.setMessage(n4).end(), a3.tempConversationList && (a3.updateLastMsg(a3.tempConversationList), a3.tempConversationList = null), a3._grpM.emitGroupListUpdate(true, true), T2({ groupList: a3._grpM.getLocalGroupList() });
}).catch(function(e4) {
- return s4._pagingStatus = bn, i4.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
+ return a3._pagingStatus = qn, i4.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
}));
} }, { key: "getGroupList", value: function() {
var e3, t3 = this, n3 = "".concat(this._n, ".").concat("getGroupList");
- return M2.l("".concat(n3, " pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === bn || this._pagingStatus === Gn ? this.syncGroupList().then(function() {
+ return M2.l("".concat(n3, " pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === qn || this._pagingStatus === bn ? this.syncGroupList().then(function() {
var e4 = t3._grpM.getLocalGroupList();
return T2({ groupList: e4, isSyncCompleted: t3.isPagingGetCompleted() });
}).catch(function(e4) {
return M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
}) : (e3 = this._grpM.getLocalGroupList(), M2.l("".concat(n3, ". returned group count:").concat(e3.length)), D2({ groupList: e3, isSyncCompleted: this.isPagingGetCompleted() }));
} }, { key: "isPagingGetCompleted", value: function() {
- return this._pagingStatus === Un;
+ return this._pagingStatus === Fn;
} }, { key: "_pagingGetGroupList", value: function(e3) {
- var o3 = this, i4 = "".concat(this._n, ".").concat("_pagingGetGroupList"), t3 = e3.isCommunityRelay, s4 = void 0 !== t3 && t3, a3 = e3.limit, r4 = e3.offset, c3 = e3.groupBaseInfoFilter, u3 = e3.groupList, t3 = void 0, l3 = (s4 && (t3 = R2.GRP_COMMUNITY, c3.push("AtInfoList")), Date.now());
- return this._grpM.req({ P: G2.GET_GRP_LIST, data: { type: t3, memberAccount: this._grpM.getMyUserID(), limit: a3, offset: r4, responseFilter: { groupBaseInfoFilter: c3, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] } } }).then(function(e4) {
- var e4 = e4.data, t4 = e4.groups, t4 = void 0 === t4 ? [] : t4, e4 = e4.totalCount, t4 = (u3.push.apply(u3, d2(t4)), o3._handleGroupAtInfoWithoutTopic(s4, t4), r4 + a3), n3 = !(t4 < e4), e4 = "offset:".concat(r4, " limit:").concat(a3, " total:").concat(e4, " isCompleted:").concat(n3, " ") + "current:".concat(u3.length, " isCommunityRelay:").concat(s4);
- return o3._pagingGetCostList.push(tn(l3, false)), M2.l("".concat(i4, " ok. ").concat(e4, " cost:").concat(tn(l3))), s4 || n3 ? !s4 && n3 ? (M2.l("".concat(i4, " start to get community list")), r4 = 0, o3._pagingGetGroupList({ limit: a3, offset: r4, groupBaseInfoFilter: c3, groupList: u3, isCommunityRelay: true })) : s4 && !n3 ? (r4 = t4, o3._pagingGetGroupList({ limit: a3, offset: r4, groupBaseInfoFilter: c3, groupList: u3, isCommunityRelay: true })) : T2({ groupList: u3 }) : (r4 = t4, o3._pagingGetGroupList({ limit: a3, offset: r4, groupBaseInfoFilter: c3, groupList: u3 }));
+ var o3 = this, i4 = "".concat(this._n, ".").concat("_pagingGetGroupList"), t3 = e3.isCommunityRelay, a3 = void 0 !== t3 && t3, s4 = e3.limit, r4 = e3.offset, c3 = e3.groupBaseInfoFilter, u3 = e3.groupList, t3 = void 0, l3 = (a3 && (t3 = R2.GRP_COMMUNITY, c3.push("AtInfoList")), Date.now());
+ return this._grpM.req({ P: G2.GET_GRP_LIST, data: { type: t3, memberAccount: this._grpM.getMyUserID(), limit: s4, offset: r4, responseFilter: { groupBaseInfoFilter: c3, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] } } }).then(function(e4) {
+ var e4 = e4.data, t4 = e4.groups, t4 = void 0 === t4 ? [] : t4, e4 = e4.totalCount, t4 = (u3.push.apply(u3, d2(t4)), o3._handleGroupAtInfoWithoutTopic(a3, t4), r4 + s4), n3 = !(t4 < e4), e4 = "offset:".concat(r4, " limit:").concat(s4, " total:").concat(e4, " isCompleted:").concat(n3, " ") + "current:".concat(u3.length, " isCommunityRelay:").concat(a3);
+ return o3._pagingGetCostList.push(an(l3, false)), M2.l("".concat(i4, " ok. ").concat(e4, " cost:").concat(an(l3))), a3 || n3 ? !a3 && n3 ? (M2.l("".concat(i4, " start to get community list")), r4 = 0, o3._pagingGetGroupList({ limit: s4, offset: r4, groupBaseInfoFilter: c3, groupList: u3, isCommunityRelay: true })) : a3 && !n3 ? (r4 = t4, o3._pagingGetGroupList({ limit: s4, offset: r4, groupBaseInfoFilter: c3, groupList: u3, isCommunityRelay: true })) : T2({ groupList: u3 }) : (r4 = t4, o3._pagingGetGroupList({ limit: s4, offset: r4, groupBaseInfoFilter: c3, groupList: u3 }));
}).catch(function(e4) {
- return 10018 === e4.code ? (M2.w("".concat(o3.logPrefix, " response size exceeds the limit, request count:").concat(a3)), a3 = 50, o3._pagingGetGroupList({ limit: a3, offset: r4, groupBaseInfoFilter: c3, groupList: u3, isCommunityRelay: s4 })) : s4 ? (11e3 === e4.code && M2.l("".concat(i4, " ok. community unavailable")), D2({ groupList: u3 })) : E2(e4);
+ return 10018 === e4.code ? (M2.w("".concat(o3.logPrefix, " response size exceeds the limit, request count:").concat(s4)), s4 = 50, o3._pagingGetGroupList({ limit: s4, offset: r4, groupBaseInfoFilter: c3, groupList: u3, isCommunityRelay: a3 })) : a3 ? (11e3 === e4.code && M2.l("".concat(i4, " ok. community unavailable")), D2({ groupList: u3 })) : E2(e4);
});
} }, { key: "_pagingGetGroupListWithTopic", value: function(e3) {
- var o3 = this, i4 = "".concat(this._n, "._pagingGetGroupListWithTopic"), s4 = e3.limit, a3 = e3.offset, r4 = e3.groupBaseInfoFilter, c3 = e3.groupList, u3 = Date.now();
- return this._grpM.req({ P: G2.GET_GRP_LIST, data: { type: R2.GRP_COMMUNITY, memberAccount: this._grpM.getMyUserID(), limit: s4, offset: a3, responseFilter: { groupBaseInfoFilter: r4, selfInfoFilter: d2(ce2) }, isSupportTopic: 1, needAppDefineData: 1 } }).then(function(e4) {
- var e4 = e4.data, t3 = e4.groups, e4 = e4.totalCount, t3 = (c3.push.apply(c3, d2(void 0 === t3 ? [] : t3)), a3 + s4), n3 = !(t3 < e4);
- if (M2.l("".concat(i4, " ok. offset:").concat(a3, " limit:").concat(s4, " totalCount:").concat(e4, " isCompleted:").concat(n3, " currentCount:").concat(c3.length, " cost:").concat(tn(u3))), !n3)
- return a3 = t3, o3._pagingGetGroupListWithTopic({ limit: s4, offset: a3, groupBaseInfoFilter: r4, groupList: c3 });
+ var o3 = this, i4 = "".concat(this._n, "._pagingGetGroupListWithTopic"), a3 = e3.limit, s4 = e3.offset, r4 = e3.groupBaseInfoFilter, c3 = e3.groupList, u3 = Date.now();
+ return this._grpM.req({ P: G2.GET_GRP_LIST, data: { type: R2.GRP_COMMUNITY, memberAccount: this._grpM.getMyUserID(), limit: a3, offset: s4, responseFilter: { groupBaseInfoFilter: r4, selfInfoFilter: d2(ce2) }, isSupportTopic: 1, needAppDefineData: 1 } }).then(function(e4) {
+ var e4 = e4.data, t3 = e4.groups, e4 = e4.totalCount, t3 = (c3.push.apply(c3, d2(void 0 === t3 ? [] : t3)), s4 + a3), n3 = !(t3 < e4);
+ if (M2.l("".concat(i4, " ok. offset:").concat(s4, " limit:").concat(a3, " totalCount:").concat(e4, " isCompleted:").concat(n3, " currentCount:").concat(c3.length, " cost:").concat(an(u3))), !n3)
+ return s4 = t3, o3._pagingGetGroupListWithTopic({ limit: a3, offset: s4, groupBaseInfoFilter: r4, groupList: c3 });
o3._grpM.updateGroupMap(c3), o3._grpM.emitGroupListUpdate(true, false);
e4 = o3._grpM.getLocalGroupList().filter(function(e5) {
return true === e5.isSupportTopic;
});
return T2({ groupList: e4 });
}).catch(function(e4) {
- return 10018 === e4.code ? (M2.w("".concat(o3.logPrefix, " response size exceeds the limit, request count:").concat(s4)), s4 = 50, o3._pagingGetGroupListWithTopic({ limit: s4, offset: a3, groupBaseInfoFilter: r4, groupList: c3 })) : E2(e4);
+ return 10018 === e4.code ? (M2.w("".concat(o3.logPrefix, " response size exceeds the limit, request count:").concat(a3)), a3 = 50, o3._pagingGetGroupListWithTopic({ limit: a3, offset: s4, groupBaseInfoFilter: r4, groupList: c3 })) : E2(e4);
});
} }, { key: "_cacheGroupMessage", value: function(e3, t3) {
this._cachedGroupMessageMap.has(e3) || this._cachedGroupMessageMap.set(e3, []), this._cachedGroupMessageMap.get(e3).push(t3);
@@ -12431,8 +12438,8 @@ var chat = { exports: {} };
} }, { key: "setPagingGroupCount", value: function(e3) {
N3(e3) || (this.PAGING_GRP_COUNT_LIMIT = parseInt(e3, 10));
} }, { key: "reset", value: function() {
- this.PAGING_GRP_COUNT_LIMIT = 200, this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._pagingStatus = Gn, this._pagingGetCostList = [];
- } }]), jo = e2(function e3(t3) {
+ this.PAGING_GRP_COUNT_LIMIT = 200, this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._pagingStatus = bn, this._pagingGetCostList = [];
+ } }]), ei = e2(function e3(t3) {
p3(this, e3), this._grpM = t3, this._n = "GroupAttributesHandler", this._groupAttributesMap = /* @__PURE__ */ new Map(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4, this._grpM.getIEmitInst().on(U2.CLOUD_CONFIG, this._onCloudConfig, this);
}, [{ key: "_onCloudConfig", value: function() {
var e3 = this._grpM.getCloudConfig("grp_attr_cache_time");
@@ -12445,44 +12452,44 @@ var chat = { exports: {} };
var t3 = e3.to, e3 = e3.elements.newGroupProfile, n3 = !N3(e3) && !S2(e3.groupAttributeOption);
return n3 && this._onGroupAttributesUpdated({ groupID: t3, groupAttributeOption: e3.groupAttributeOption }), n3;
} }, { key: "_onGroupAttributesUpdated", value: function(e3) {
- var t3, n3 = this, o3 = e3.groupID, e3 = e3.groupAttributeOption, i4 = e3.mainSequence, s4 = e3.isWithChangedAttributeInfo, a3 = e3.groupAttributeList, a3 = void 0 === a3 ? [] : a3, e3 = e3.operationType;
- M2.l("".concat(this._n, ".onGroupAttributesUpdated. ") + "groupID:".concat(o3, " isWithChangedAttributeInfo:").concat(s4, " operationType:").concat(e3)), N3(e3) || (this._groupAttributesCopy = this._getCachedAttributes({ groupID: o3 }), 0 != (t3 = i4 - this._getLocalGroupAttributes(o3).localMainSequence) && (1 === s4 && 1 == t3 ? (this._refreshCachedGroupAttributes({ groupID: o3, remoteMainSequence: i4, groupAttributeList: a3, operationType: e3 }), this._emitGroupAttributesUpdated(o3)) : this._hasLocalGroupAttributes(o3) && (s4 = this._getLocalGroupAttributes(o3).avChatRoomKey, this._getGroupAttributes({ groupID: o3, avChatRoomKey: s4 }).then(function() {
+ var t3, n3 = this, o3 = e3.groupID, e3 = e3.groupAttributeOption, i4 = e3.mainSequence, a3 = e3.isWithChangedAttributeInfo, s4 = e3.groupAttributeList, s4 = void 0 === s4 ? [] : s4, e3 = e3.operationType;
+ M2.l("".concat(this._n, ".onGroupAttributesUpdated. ") + "groupID:".concat(o3, " isWithChangedAttributeInfo:").concat(a3, " operationType:").concat(e3)), N3(e3) || (this._groupAttributesCopy = this._getCachedAttributes({ groupID: o3 }), 0 != (t3 = i4 - this._getLocalGroupAttributes(o3).localMainSequence) && (1 === a3 && 1 == t3 ? (this._refreshCachedGroupAttributes({ groupID: o3, remoteMainSequence: i4, groupAttributeList: s4, operationType: e3 }), this._emitGroupAttributesUpdated(o3)) : this._hasLocalGroupAttributes(o3) && (a3 = this._getLocalGroupAttributes(o3).avChatRoomKey, this._getGroupAttributes({ groupID: o3, avChatRoomKey: a3 }).then(function() {
n3._emitGroupAttributesUpdated(o3);
}))));
} }, { key: "initGroupAttributesCache", value: function(e3) {
var t3 = e3.groupID, e3 = e3.avChatRoomKey, e3 = void 0 === e3 ? void 0 : e3;
this._groupAttributesMap.set(t3, { lastUpdateTime: 0, localMainSequence: 0, remoteMainSequence: 0, attributes: /* @__PURE__ */ new Map(), avChatRoomKey: e3 }), M2.l("".concat(this._n, ".initGroupAttributesCache groupID:").concat(t3, " avChatRoomKey:").concat(e3));
} }, { key: "initGroupAttributes", value: function(e3) {
- var n3 = this, o3 = e3.groupID, i4 = e3.groupAttributes, e3 = this._getLocalGroupAttributes(o3), t3 = e3.remoteMainSequence, e3 = e3.avChatRoomKey, s4 = new P2("initGroupAttributes");
- return s4.setMessage("groupID:".concat(o3, " avChatRoomKey:").concat(e3, " mainSequence:").concat(t3)), this._grpM.req({ P: G2.SET_GRP_ATTR, data: { groupID: o3, avChatRoomKey: e3, mainSequence: t3, groupAttributeList: this._transformGroupAttributes(i4) } }).then(function(e4) {
+ var n3 = this, o3 = e3.groupID, i4 = e3.groupAttributes, e3 = this._getLocalGroupAttributes(o3), t3 = e3.remoteMainSequence, e3 = e3.avChatRoomKey, a3 = new P2("initGroupAttributes");
+ return a3.setMessage("groupID:".concat(o3, " avChatRoomKey:").concat(e3, " mainSequence:").concat(t3)), this._grpM.req({ P: G2.SET_GRP_ATTR, data: { groupID: o3, avChatRoomKey: e3, mainSequence: t3, groupAttributeList: this._transformGroupAttributes(i4) } }).then(function(e4) {
M2.l("".concat(n3._n, ".").concat("initGroupAttributes", " ok. groupID:").concat(o3));
var e4 = e4.data, t4 = e4.mainSequence, e4 = d2(e4.groupAttributeList);
return e4.forEach(function(e5) {
e5.value = i4[e5.key];
- }), n3._groupAttributesCopy = n3._getCachedAttributes({ groupID: o3 }), n3._refreshCachedGroupAttributes({ groupID: o3, remoteMainSequence: t4, groupAttributeList: e4, operationType: 1 }), n3._emitGroupAttributesUpdated(o3), s4.end(), T2({ groupAttributes: i4 });
+ }), n3._groupAttributesCopy = n3._getCachedAttributes({ groupID: o3 }), n3._refreshCachedGroupAttributes({ groupID: o3, remoteMainSequence: t4, groupAttributeList: e4, operationType: 1 }), n3._emitGroupAttributesUpdated(o3), a3.end(), T2({ groupAttributes: i4 });
}).catch(function(e4) {
- return s4.setError(e4).end(), E2(e4);
+ return a3.setError(e4).end(), E2(e4);
});
} }, { key: "setGroupAttributes", value: function(e3) {
- var n3 = this, o3 = "".concat(this._n, ".").concat("setGroupAttributes"), i4 = e3.groupID, s4 = e3.groupAttributes, e3 = this._getLocalGroupAttributes(i4), t3 = e3.remoteMainSequence, a3 = e3.avChatRoomKey, r4 = e3.attributes, e3 = this._transformGroupAttributes(s4), c3 = (e3.forEach(function(e4) {
+ var n3 = this, o3 = "".concat(this._n, ".").concat("setGroupAttributes"), i4 = e3.groupID, a3 = e3.groupAttributes, e3 = this._getLocalGroupAttributes(i4), t3 = e3.remoteMainSequence, s4 = e3.avChatRoomKey, r4 = e3.attributes, e3 = this._transformGroupAttributes(a3), c3 = (e3.forEach(function(e4) {
var t4 = e4.key;
e4.sequence = 0, r4.has(t4) && (e4.sequence = r4.get(t4).sequence);
}), new P2("setGroupAttributes"));
- return c3.setMessage("groupID:".concat(i4, " groupAttributes:").concat(JSON.stringify(s4))), M2.l("".concat(o3, ". groupID:").concat(i4, " mainSequence:").concat(t3)), this._grpM.req({ P: G2.MODIFY_GRP_ATTR, data: { groupID: i4, avChatRoomKey: a3, mainSequence: t3, groupAttributeList: e3 } }).then(function(e4) {
+ return c3.setMessage("groupID:".concat(i4, " groupAttributes:").concat(JSON.stringify(a3))), M2.l("".concat(o3, ". groupID:").concat(i4, " mainSequence:").concat(t3)), this._grpM.req({ P: G2.MODIFY_GRP_ATTR, data: { groupID: i4, avChatRoomKey: s4, mainSequence: t3, groupAttributeList: e3 } }).then(function(e4) {
M2.l("".concat(o3, " ok."));
var e4 = e4.data, t4 = e4.mainSequence, e4 = d2(e4.groupAttributeList);
return e4.forEach(function(e5) {
- e5.value = s4[e5.key];
- }), n3._groupAttributesCopy = n3._getCachedAttributes({ groupID: i4 }), n3._refreshCachedGroupAttributes({ groupID: i4, remoteMainSequence: t4, groupAttributeList: e4, operationType: 2 }), n3._emitGroupAttributesUpdated(i4), c3.end(), T2({ groupAttributes: s4 });
+ e5.value = a3[e5.key];
+ }), n3._groupAttributesCopy = n3._getCachedAttributes({ groupID: i4 }), n3._refreshCachedGroupAttributes({ groupID: i4, remoteMainSequence: t4, groupAttributeList: e4, operationType: 2 }), n3._emitGroupAttributesUpdated(i4), c3.end(), T2({ groupAttributes: a3 });
}).catch(function(e4) {
return c3.setError(e4).end(), E2(e4);
});
} }, { key: "deleteGroupAttributes", value: function(e3) {
- var t3 = this, n3 = e3.groupID, e3 = e3.keyList, e3 = void 0 === e3 ? [] : e3, o3 = this._getLocalGroupAttributes(n3), i4 = o3.remoteMainSequence, s4 = o3.avChatRoomKey, a3 = o3.attributes, r4 = d2(a3.keys()), o3 = G2.CLEAR_GRP_ATTR, c3 = 3, s4 = { groupID: n3, avChatRoomKey: s4, mainSequence: i4 }, u3 = [], l3 = (0 < e3.length && (r4 = [], o3 = G2.DEL_GRP_ATTR, c3 = 4, e3.forEach(function(e4) {
+ var t3 = this, n3 = e3.groupID, e3 = e3.keyList, e3 = void 0 === e3 ? [] : e3, o3 = this._getLocalGroupAttributes(n3), i4 = o3.remoteMainSequence, a3 = o3.avChatRoomKey, s4 = o3.attributes, r4 = d2(s4.keys()), o3 = G2.CLEAR_GRP_ATTR, c3 = 3, a3 = { groupID: n3, avChatRoomKey: a3, mainSequence: i4 }, u3 = [], l3 = (0 < e3.length && (r4 = [], o3 = G2.DEL_GRP_ATTR, c3 = 4, e3.forEach(function(e4) {
var t4 = 0;
- a3.has(e4) && (t4 = a3.get(e4).sequence, r4.push(e4)), u3.push({ key: e4, sequence: t4 });
- }), s4.groupAttributeList = u3), new P2("deleteGroupAttributes"));
- return l3.setMessage("groupID:".concat(n3, " mainSequence:").concat(i4, " keyList:").concat(e3, " proto:").concat(o3)), this._grpM.req({ P: o3, data: s4 }).then(function(e4) {
+ s4.has(e4) && (t4 = s4.get(e4).sequence, r4.push(e4)), u3.push({ key: e4, sequence: t4 });
+ }), a3.groupAttributeList = u3), new P2("deleteGroupAttributes"));
+ return l3.setMessage("groupID:".concat(n3, " mainSequence:").concat(i4, " keyList:").concat(e3, " proto:").concat(o3)), this._grpM.req({ P: o3, data: a3 }).then(function(e4) {
M2.l("".concat(t3._n, ".").concat("deleteGroupAttributes", " ok. groupID:").concat(n3));
e4 = e4.data.mainSequence;
return t3._groupAttributesCopy = t3._getCachedAttributes({ groupID: n3 }), t3._refreshCachedGroupAttributes({ groupID: n3, remoteMainSequence: e4, groupAttributeList: u3, operationType: c3 }), t3._emitGroupAttributesUpdated(n3), l3.end(), T2({ keyList: r4 });
@@ -12490,9 +12497,9 @@ var chat = { exports: {} };
return l3.setError(e4).end(), E2(e4);
});
} }, { key: "getGroupAttributes", value: function(t3) {
- var n3 = this, o3 = "".concat(this._n, ".").concat("getGroupAttributes"), i4 = t3.groupID, e3 = this._getLocalGroupAttributes(i4), s4 = e3.avChatRoomKey, a3 = e3.lastUpdateTime, r4 = e3.localMainSequence, e3 = e3.remoteMainSequence, c3 = new P2("getGroupAttributes");
- if (c3.setMessage("groupID:".concat(i4, " localMainSequence:").concat(r4, " remoteMainSequence:").concat(e3, " keyList:").concat(t3.keyList)), Date.now() - a3 >= this.CACHE_EXPIRE_TIME || r4 < e3)
- return this._getGroupAttributes({ groupID: i4, avChatRoomKey: s4 }).then(function(e4) {
+ var n3 = this, o3 = "".concat(this._n, ".").concat("getGroupAttributes"), i4 = t3.groupID, e3 = this._getLocalGroupAttributes(i4), a3 = e3.avChatRoomKey, s4 = e3.lastUpdateTime, r4 = e3.localMainSequence, e3 = e3.remoteMainSequence, c3 = new P2("getGroupAttributes");
+ if (c3.setMessage("groupID:".concat(i4, " localMainSequence:").concat(r4, " remoteMainSequence:").concat(e3, " keyList:").concat(t3.keyList)), Date.now() - s4 >= this.CACHE_EXPIRE_TIME || r4 < e3)
+ return this._getGroupAttributes({ groupID: i4, avChatRoomKey: a3 }).then(function(e4) {
c3.setMoreMessage("get attributes from remote. count:".concat(e4.length)).end(), M2.l("".concat(o3, " from remote. groupID:").concat(i4));
e4 = n3._getCachedAttributes(t3);
return T2({ groupAttributes: e4 });
@@ -12500,8 +12507,8 @@ var chat = { exports: {} };
return c3.setError(e4).end(), E2(e4);
});
c3.setMoreMessage("get attributes from cache").end(), M2.l("".concat(o3, " from cache. groupID:").concat(i4));
- a3 = this._getCachedAttributes(t3);
- return D2({ groupAttributes: a3 });
+ s4 = this._getCachedAttributes(t3);
+ return D2({ groupAttributes: s4 });
} }, { key: "_getGroupAttributes", value: function(o3) {
var i4 = this, e3 = 0;
return N3(o3.avChatRoomKey) || (e3 = 1), this._grpM.req({ P: G2.GET_GRP_ATTR, data: y2(y2({}, o3), {}, { groupType: e3 }) }).then(function(e4) {
@@ -12514,16 +12521,16 @@ var chat = { exports: {} };
} }, { key: "_refreshCachedGroupAttributes", value: function(e3) {
var t3 = e3.groupID, n3 = e3.remoteMainSequence, o3 = e3.groupAttributeList, e3 = e3.operationType;
if (this._hasLocalGroupAttributes(t3)) {
- var i4 = this._getLocalGroupAttributes(t3), s4 = i4.localMainSequence;
- if (5 === e3 || n3 - s4 == 1)
+ var i4 = this._getLocalGroupAttributes(t3), a3 = i4.localMainSequence;
+ if (5 === e3 || n3 - a3 == 1)
i4.remoteMainSequence = n3, i4.localMainSequence = n3, i4.lastUpdateTime = Date.now(), this._updateCachedAttributes({ groupAttributes: i4, groupAttributeList: o3, operationType: e3 });
else {
- if (s4 === n3)
+ if (a3 === n3)
return;
i4.remoteMainSequence = n3;
}
this._groupAttributesMap.set(t3, i4);
- o3 = "operationType:".concat(e3, " localMainSequence:").concat(s4, " remoteMainSequence:").concat(n3);
+ o3 = "operationType:".concat(e3, " localMainSequence:").concat(a3, " remoteMainSequence:").concat(n3);
M2.l("".concat(this._n, "._refreshCachedGroupAttributes. ").concat(o3));
}
} }, { key: "_getCachedAttributes", value: function(e3) {
@@ -12535,16 +12542,16 @@ var chat = { exports: {} };
o3.has(e4) && (n3[e4] = o3.get(e4).value);
});
else {
- var i4, s4 = F2(o3.keys());
+ var i4, a3 = F2(o3.keys());
try {
- for (s4.s(); !(i4 = s4.n()).done; ) {
- var a3 = i4.value;
- n3[a3] = o3.get(a3).value;
+ for (a3.s(); !(i4 = a3.n()).done; ) {
+ var s4 = i4.value;
+ n3[s4] = o3.get(s4).value;
}
} catch (e4) {
- s4.e(e4);
+ a3.e(e4);
} finally {
- s4.f();
+ a3.f();
}
}
}
@@ -12580,7 +12587,7 @@ var chat = { exports: {} };
this._hasLocalGroupAttributes(e3) && this._groupAttributesMap.delete(e3);
} }, { key: "reset", value: function() {
this._groupAttributesMap.clear(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4;
- } }]), Jo = e2(function e3(t3) {
+ } }]), ti = e2(function e3(t3) {
p3(this, e3), this._grpM = t3, this._n = "GroupCountersHandler", this._groupCountersMap = /* @__PURE__ */ new Map(), this.EXPIRE_TIME = 3e4, this._grpM.getIEmitInst().on(U2.CLOUD_CONFIG, this._onCloudConfig, this);
}, [{ key: "_onCloudConfig", value: function() {
var e3 = this._grpM.getCloudConfig("grp_counter_expire_time");
@@ -12600,40 +12607,40 @@ var chat = { exports: {} };
var t3 = e3.groupID, e3 = e3.avChatRoomKey;
this._groupCountersMap.set(t3, { lastUpdateTime: 0, groupCounterSeq: 0, counters: /* @__PURE__ */ new Map(), avChatRoomKey: e3 }), M2.l("".concat(this._n, ".initGroupCountersCache groupID:").concat(t3, " avChatRoomKey:").concat(e3));
} }, { key: "setGroupCounters", value: function(e3) {
- var t3, n3, o3, i4, s4;
- return this._grpM.canIUse(g2.GRP_COUNTER) ? (t3 = "".concat(this._n, ".").concat("setGroupCounters"), n3 = e3.groupID, e3 = e3.counters, e3 = this._convertObjectToList(e3), o3 = this._getLocalGroupCounters(n3).avChatRoomKey, i4 = "groupID:".concat(n3, " count:").concat(e3.length), (s4 = new P2("setGroupCounters")).setMessage("".concat(i4)), M2.l("".concat(t3, ". ").concat(i4)), this._updateGroupCounters({ groupID: n3, counterList: e3, avChatRoomKey: o3, mode: "Set" }).then(function(e4) {
+ var t3, n3, o3, i4, a3;
+ return this._grpM.canIUse(g2.GRP_COUNTER) ? (t3 = "".concat(this._n, ".").concat("setGroupCounters"), n3 = e3.groupID, e3 = e3.counters, e3 = this._convertObjectToList(e3), o3 = this._getLocalGroupCounters(n3).avChatRoomKey, i4 = "groupID:".concat(n3, " count:").concat(e3.length), (a3 = new P2("setGroupCounters")).setMessage("".concat(i4)), M2.l("".concat(t3, ". ").concat(i4)), this._updateGroupCounters({ groupID: n3, counterList: e3, avChatRoomKey: o3, mode: "Set" }).then(function(e4) {
+ return a3.end(), M2.l("".concat(t3, " ok.")), T2({ counters: e4 });
+ }).catch(function(e4) {
+ return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
+ })) : this._grpM.noUse("setGroupCounters");
+ } }, { key: "increaseGroupCounter", value: function(e3) {
+ var t3, n3, o3, i4, a3, s4, r4 = "increaseGroupCounter";
+ return this._grpM.canIUse(g2.GRP_COUNTER) ? (t3 = "".concat(this._n, ".").concat(r4), n3 = e3.groupID, o3 = e3.key, e3 = e3.value, i4 = this._getLocalGroupCounters(n3).avChatRoomKey, a3 = "groupID:".concat(n3, " key:").concat(o3, " value:").concat(e3), (s4 = new P2(r4)).setMessage("".concat(a3)), M2.l("".concat(t3, ". ").concat(a3)), this._updateGroupCounters({ groupID: n3, counterList: [{ key: o3, value: e3 }], avChatRoomKey: i4, mode: "Increase" }).then(function(e4) {
return s4.end(), M2.l("".concat(t3, " ok.")), T2({ counters: e4 });
}).catch(function(e4) {
return s4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
- })) : this._grpM.noUse("setGroupCounters");
- } }, { key: "increaseGroupCounter", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4 = "increaseGroupCounter";
- return this._grpM.canIUse(g2.GRP_COUNTER) ? (t3 = "".concat(this._n, ".").concat(r4), n3 = e3.groupID, o3 = e3.key, e3 = e3.value, i4 = this._getLocalGroupCounters(n3).avChatRoomKey, s4 = "groupID:".concat(n3, " key:").concat(o3, " value:").concat(e3), (a3 = new P2(r4)).setMessage("".concat(s4)), M2.l("".concat(t3, ". ").concat(s4)), this._updateGroupCounters({ groupID: n3, counterList: [{ key: o3, value: e3 }], avChatRoomKey: i4, mode: "Increase" }).then(function(e4) {
- return a3.end(), M2.l("".concat(t3, " ok.")), T2({ counters: e4 });
- }).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this._grpM.noUse(r4);
} }, { key: "decreaseGroupCounter", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4 = "decreaseGroupCounter";
- return this._grpM.canIUse(g2.GRP_COUNTER) ? (t3 = "".concat(this._n, ".").concat(r4), n3 = e3.groupID, o3 = e3.key, e3 = e3.value, i4 = this._getLocalGroupCounters(n3).avChatRoomKey, s4 = "groupID:".concat(n3, " key:").concat(o3, " value:").concat(e3), (a3 = new P2(r4)).setMessage("".concat(s4)), M2.l("".concat(t3, ". ").concat(s4)), this._updateGroupCounters({ groupID: n3, counterList: [{ key: o3, value: e3 }], avChatRoomKey: i4, mode: "Decrease" }).then(function(e4) {
- return a3.end(), M2.l("".concat(t3, " ok.")), T2({ counters: e4 });
+ var t3, n3, o3, i4, a3, s4, r4 = "decreaseGroupCounter";
+ return this._grpM.canIUse(g2.GRP_COUNTER) ? (t3 = "".concat(this._n, ".").concat(r4), n3 = e3.groupID, o3 = e3.key, e3 = e3.value, i4 = this._getLocalGroupCounters(n3).avChatRoomKey, a3 = "groupID:".concat(n3, " key:").concat(o3, " value:").concat(e3), (s4 = new P2(r4)).setMessage("".concat(a3)), M2.l("".concat(t3, ". ").concat(a3)), this._updateGroupCounters({ groupID: n3, counterList: [{ key: o3, value: e3 }], avChatRoomKey: i4, mode: "Decrease" }).then(function(e4) {
+ return s4.end(), M2.l("".concat(t3, " ok.")), T2({ counters: e4 });
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this._grpM.noUse(r4);
} }, { key: "getGroupCounters", value: function(e3) {
var t3 = this;
if (!this._grpM.canIUse(g2.GRP_COUNTER))
return this._grpM.noUse("getGroupCounters");
- var n3 = "".concat(this._n, ".").concat("getGroupCounters"), o3 = e3.groupID, e3 = e3.keyList, i4 = void 0 === e3 ? [] : e3, e3 = this._getLocalGroupCounters(o3), s4 = e3.avChatRoomKey, e3 = e3.lastUpdateTime, a3 = new P2("getGroupCounters");
- if (a3.setMessage("groupID:".concat(o3)), Date.now() - e3 >= this.EXPIRE_TIME)
- return this._getRemoteGroupCounters({ groupID: o3, avChatRoomKey: s4 }).then(function(e4) {
- a3.setMoreMessage("from remote. count:".concat(e4.length)).end(), M2.l("".concat(n3, " from remote. groupID:").concat(o3));
+ var n3 = "".concat(this._n, ".").concat("getGroupCounters"), o3 = e3.groupID, e3 = e3.keyList, i4 = void 0 === e3 ? [] : e3, e3 = this._getLocalGroupCounters(o3), a3 = e3.avChatRoomKey, e3 = e3.lastUpdateTime, s4 = new P2("getGroupCounters");
+ if (s4.setMessage("groupID:".concat(o3)), Date.now() - e3 >= this.EXPIRE_TIME)
+ return this._getRemoteGroupCounters({ groupID: o3, avChatRoomKey: a3 }).then(function(e4) {
+ s4.setMoreMessage("from remote. count:".concat(e4.length)).end(), M2.l("".concat(n3, " from remote. groupID:").concat(o3));
e4 = t3._getLocalCounters(o3, i4);
return T2({ counters: e4 });
}).catch(function(e4) {
- return a3.setError(e4).end(), E2(e4);
+ return s4.setError(e4).end(), E2(e4);
});
- a3.setMoreMessage("from cache").end(), M2.l("".concat(n3, " from cache. groupID:").concat(o3));
+ s4.setMoreMessage("from cache").end(), M2.l("".concat(n3, " from cache. groupID:").concat(o3));
e3 = this._getLocalCounters(o3, i4);
return D2({ counters: e3 });
} }, { key: "_getRemoteGroupCounters", value: function(n3) {
@@ -12666,8 +12673,8 @@ var chat = { exports: {} };
} }, { key: "_getLocalGroupCounters", value: function(e3) {
return this._hasLocalGroupCounters(e3) || this.initGroupCountersCache({ groupID: e3 }), this._groupCountersMap.get(e3);
} }, { key: "_updateLocalGroupCounters", value: function(e3) {
- var n3, t3, o3, i4 = e3.groupID, s4 = e3.counterList, s4 = void 0 === s4 ? [] : s4, e3 = e3.groupCounterSeq;
- this._hasLocalGroupCounters(i4) && (o3 = this._getLocalGroupCounters(i4), n3 = o3.counters, t3 = o3.avChatRoomKey, o3 = o3.groupCounterSeq, 0 < e3 && e3 < o3 || (s4.forEach(function(e4) {
+ var n3, t3, o3, i4 = e3.groupID, a3 = e3.counterList, a3 = void 0 === a3 ? [] : a3, e3 = e3.groupCounterSeq;
+ this._hasLocalGroupCounters(i4) && (o3 = this._getLocalGroupCounters(i4), n3 = o3.counters, t3 = o3.avChatRoomKey, o3 = o3.groupCounterSeq, 0 < e3 && e3 < o3 || (a3.forEach(function(e4) {
var t4 = e4.key, e4 = e4.value;
n3.set(t4, e4);
}), this._groupCountersMap.set(i4, { lastUpdateTime: Date.now(), groupCounterSeq: e3, counters: n3, avChatRoomKey: t3 })));
@@ -12685,26 +12692,26 @@ var chat = { exports: {} };
o3.has(e4) && (n3[e4] = o3.get(e4));
});
else {
- var i4, s4 = F2(o3.keys());
+ var i4, a3 = F2(o3.keys());
try {
- for (s4.s(); !(i4 = s4.n()).done; ) {
- var a3 = i4.value;
- n3[a3] = o3.get(a3);
+ for (a3.s(); !(i4 = a3.n()).done; ) {
+ var s4 = i4.value;
+ n3[s4] = o3.get(s4);
}
} catch (e4) {
- s4.e(e4);
+ a3.e(e4);
} finally {
- s4.f();
+ a3.f();
}
}
}
return n3;
} }, { key: "reset", value: function() {
this._groupCountersMap.clear(), this.EXPIRE_TIME = 3e4;
- } }]), zo = e2(function e3(t3) {
+ } }]), ni = e2(function e3(t3) {
p3(this, e3);
- var n3 = t3.manager, o3 = t3.groupID, i4 = t3.onInit, s4 = t3.onSuccess, t3 = t3.onFail;
- this._n = "Polling", this._manager = n3, this._grpM = n3._grpM, this._onInit = i4, this._onSuccess = s4, this._onFail = t3, this._groupID = o3, this._timeoutID = -1, this._isRunning = false, this._proto = G2.AV_POLLING;
+ var n3 = t3.manager, o3 = t3.groupID, i4 = t3.onInit, a3 = t3.onSuccess, t3 = t3.onFail;
+ this._n = "Polling", this._manager = n3, this._grpM = n3._grpM, this._onInit = i4, this._onSuccess = a3, this._onFail = t3, this._groupID = o3, this._timeoutID = -1, this._isRunning = false, this._proto = G2.AV_POLLING;
}, [{ key: "start", value: function() {
var e3 = this._grpM.isLoggedIn();
e3 || (this._proto = G2.AV_NOAUTH_POLLING), M2.l("".concat(this._n, ".start pollingInterval:").concat(this._manager.getPollingInterval(), " isLoggedIn:").concat(e3)), this._isRunning = true, this._request();
@@ -12721,8 +12728,8 @@ var chat = { exports: {} };
M2.l("".concat(this._n, ".stop")), -1 < this._timeoutID && (clearTimeout(this._timeoutID), this._timeoutID = -1), this._isRunning = false;
} }, { key: "getPollingTimerID", value: function() {
return this._timeoutID;
- } }]), Xo = { 3: true, 4: true, 5: true, 6: true, 17: true, 20: true, 21: true, 100: true }, Zo = e2(function e3(t3) {
- p3(this, e3), this._grpM = t3, this._n = "AVChatRoomHandler", this._joinedGroupMap = /* @__PURE__ */ new Map(), this._pollingRequestInfoMap = /* @__PURE__ */ new Map(), this._pollingInstanceMap = /* @__PURE__ */ new Map(), this._seqSll = new wo(200), this._IDSll = new wo(100), this._reportMessageStackedCount = 0, this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this.DEFAULT_EXPIRE_TIME = 60, this.DEFAULT_POLLING_INTERVAL = 300, this.MAX_POLLING_INTERVAL = 2e3, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0, this._startBroadcastSeq = 1, this._broadcastMessageIDMap = /* @__PURE__ */ new Map(), this.DEFAULT_POLLING_SIMPLIFIED_MSG = 0;
+ } }]), oi = { 3: true, 4: true, 5: true, 6: true, 17: true, 20: true, 21: true, 100: true }, ii = e2(function e3(t3) {
+ p3(this, e3), this._grpM = t3, this._n = "AVChatRoomHandler", this._joinedGroupMap = /* @__PURE__ */ new Map(), this._pollingRequestInfoMap = /* @__PURE__ */ new Map(), this._pollingInstanceMap = /* @__PURE__ */ new Map(), this._seqSll = new Ko(200), this._IDSll = new Ko(100), this._reportMessageStackedCount = 0, this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this.DEFAULT_EXPIRE_TIME = 60, this.DEFAULT_POLLING_INTERVAL = 300, this.MAX_POLLING_INTERVAL = 2e3, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0, this._startBroadcastSeq = 1, this._broadcastMessageIDMap = /* @__PURE__ */ new Map(), this.DEFAULT_POLLING_SIMPLIFIED_MSG = 0;
}, [{ key: "hasJoinedAVChatRoom", value: function() {
var e3 = [];
return 0 < (e3 = 0 < this._joinedGroupMap.size ? d2(this._joinedGroupMap.values()).filter(function(e4) {
@@ -12741,14 +12748,14 @@ var chat = { exports: {} };
var t3 = this._pollingRequestInfoMap.get(e3);
return e3 === d2(this._pollingInstanceMap.keys())[0] ? y2(y2({}, t3), {}, { startBroadcastSeq: this._startBroadcastSeq, simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }) : y2(y2({}, t3), {}, { simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG });
} }, { key: "_handleSuccess", value: function(e3, t3) {
- var n3, o3 = t3.data, i4 = o3.key, s4 = o3.nextSeq, a3 = o3.rspMsgList, r4 = o3.errorCode, c3 = o3.nextBroadcastSeq, o3 = o3.broadcastMessageList;
- 0 !== r4 ? (r4 = this._pollingRequestInfoMap.get(e3), n3 = new P2("longPollingAVError"), r4 = r4 ? "".concat(r4.key, "-").concat(r4.startSeq) : "requestInfo is undefined", n3.setMessage("".concat(e3, "-").concat(r4, "-").concat(t3.errorInfo)).setCode(t3.errorCode).end(true)) : this.checkJoinedAVChatRoomByID(e3) && (C2(i4) && A2(s4) && this._pollingRequestInfoMap.set(e3, { key: i4, startSeq: s4 }), A2(c3) && c3 > this._startBroadcastSeq && (this._startBroadcastSeq = c3), O2(a3) && 0 < a3.length ? (a3.forEach(function(e4) {
+ var n3, o3 = t3.data, i4 = o3.key, a3 = o3.nextSeq, s4 = o3.rspMsgList, r4 = o3.errorCode, c3 = o3.nextBroadcastSeq, o3 = o3.broadcastMessageList;
+ 0 !== r4 ? (r4 = this._pollingRequestInfoMap.get(e3), n3 = new P2("longPollingAVError"), r4 = r4 ? "".concat(r4.key, "-").concat(r4.startSeq) : "requestInfo is undefined", n3.setMessage("".concat(e3, "-").concat(r4, "-").concat(t3.errorInfo)).setCode(t3.errorCode).end(true)) : this.checkJoinedAVChatRoomByID(e3) && (C2(i4) && A2(a3) && this._pollingRequestInfoMap.set(e3, { key: i4, startSeq: a3 }), A2(c3) && c3 > this._startBroadcastSeq && (this._startBroadcastSeq = c3), O2(s4) && 0 < s4.length ? (s4.forEach(function(e4) {
e4.to = e4.groupID;
- }), this.onMessage(a3, e3)) : (this._pollingNoMessageCount += 1, this._pollingNoMessageCount === this.DEFAULT_POLLING_NO_MESSAGE_COUNT && (this._pollingInterval = this.DEFAULT_POLLING_INTERVAL + this.DEFAULT_POLLING_INTERVAL_PLUS)), this._onBroadcastMessage(o3));
+ }), this.onMessage(s4, e3)) : (this._pollingNoMessageCount += 1, this._pollingNoMessageCount === this.DEFAULT_POLLING_NO_MESSAGE_COUNT && (this._pollingInterval = this.DEFAULT_POLLING_INTERVAL + this.DEFAULT_POLLING_INTERVAL_PLUS)), this._onBroadcastMessage(o3));
} }, { key: "_handleFailure", value: function(e3, t3) {
} }, { key: "onMessage", value: function(e3, t3) {
if (O2(e3) && 0 !== e3.length) {
- var n3 = "".concat(this._n, ".onMessage"), o3 = (t3 && (n3 += " groupID:".concat(t3)), 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL), null), i4 = [], s4 = this._get(11), a3 = this._get(26), r4 = e3.length, c3 = (1 < r4 && e3.sort(function(e4, t4) {
+ var n3 = "".concat(this._n, ".onMessage"), o3 = (t3 && (n3 += " groupID:".concat(t3)), 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL), null), i4 = [], a3 = this._get(11), s4 = this._get(26), r4 = e3.length, c3 = (1 < r4 && e3.sort(function(e4, t4) {
return e4.sequence - t4.sequence;
}), this._get(12).isUnlimitedAVChatRoom()), u3 = false;
M2.getLevel() <= 0 && (t3 = e3.map(function(e4) {
@@ -12756,7 +12763,7 @@ var chat = { exports: {} };
}), M2.l("".concat(n3, " count:").concat(t3.length, " sequenceList:").concat(t3)), t3.length = 0);
for (var l3 = 0; l3 < r4; l3++) {
var d3 = this.restoreMessageFromSimplified(e3[l3]);
- if (Xo[d3.event]) {
+ if (oi[d3.event]) {
if (6 === d3.event) {
if (this._grpM.isGroupAttributesUpdatedNotice(d3))
continue;
@@ -12773,7 +12780,7 @@ var chat = { exports: {} };
this._seqSll.set(o3.sequence);
}
var _3 = this._IDSll.has(o3.ID);
- _3 ? M2.w("".concat(n3, " ID:").concat(o3.ID, " has:").concat(_3)) : (this._IDSll.set(o3.ID), _3 = false, !u3 && this._isMessageSentByCurrentInstance(o3) ? p4 && (_3 = true, o3.isModified = p4, s4.updateMsgIsModifiedProp(o3)) : _3 = true, _3 && (o3.conversationType === R2.CONV_SYSTEM && 5 === o3.payload.operationType && this._onGroupDismissed(o3.payload.groupProfile.groupID), u3 || o3.conversationType === R2.CONV_SYSTEM || (p4 = o3.conversationID.replace(R2.CONV_GROUP, ""), this._pollingInstanceMap.has(p4) ? this._grpM.isLoggedIn() && a3.addMessageSequence({ key: Zn, message: o3 }) : (o3.type !== R2.MSG_GRP_TIP && 0 < o3.clientTime && a3.addMessageDelay(o3.clientTime), a3.addMessageSequence({ key: Xn, message: o3 }))), i4.push(o3)));
+ _3 ? M2.w("".concat(n3, " ID:").concat(o3.ID, " has:").concat(_3)) : (this._IDSll.set(o3.ID), _3 = false, !u3 && this._isMessageSentByCurrentInstance(o3) ? p4 && (_3 = true, o3.isModified = p4, a3.updateMsgIsModifiedProp(o3)) : _3 = true, _3 && (o3.conversationType === R2.CONV_SYSTEM && 5 === o3.payload.operationType && this._onGroupDismissed(o3.payload.groupProfile.groupID), u3 || o3.conversationType === R2.CONV_SYSTEM || (p4 = o3.conversationID.replace(R2.CONV_GROUP, ""), this._pollingInstanceMap.has(p4) ? this._grpM.isLoggedIn() && s4.addMessageSequence({ key: eo, message: o3 }) : (o3.type !== R2.MSG_GRP_TIP && 0 < o3.clientTime && s4.addMessageDelay(o3.clientTime), s4.addMessageSequence({ key: $n, message: o3 }))), i4.push(o3)));
} else
this.onRoomCustomData(d3);
else
@@ -12783,14 +12790,14 @@ var chat = { exports: {} };
} else
M2.w("".concat(n3, ". unknown event:").concat(d3.event));
}
- 0 !== i4.length && (0 < (t3 = St2(i4)).length && this._grpM.emitOEvt(h2.MESSAGE_MODIFIED, t3), u3 || 0 < (t3 = this.packConversationOption(i4)).length && s4.onNewMessage({ conversationOptionsList: t3, isInstantMessage: true }), this._checkMessageStacked(i4), 0 < (t3 = Rt2(i4)).length && this._grpM.emitOEvt(h2.MESSAGE_RECEIVED, t3), i4.length = 0);
+ 0 !== i4.length && (0 < (t3 = At2(i4)).length && this._grpM.emitOEvt(h2.MESSAGE_MODIFIED, t3), u3 || 0 < (t3 = this.packConversationOption(i4)).length && a3.onNewMessage({ conversationOptionsList: t3, isInstantMessage: true }), this._checkMessageStacked(i4), 0 < (t3 = Nt2(i4)).length && this._grpM.emitOEvt(h2.MESSAGE_RECEIVED, t3), i4.length = 0);
}
} }, { key: "handleMessageRevokedNotice", value: function(e3) {
- var t3 = this, i4 = e3.groupID, n3 = e3.elements.revokeMsgList, s4 = e3.revokerInfo, a3 = [];
+ var t3 = this, i4 = e3.groupID, n3 = e3.elements.revokeMsgList, a3 = e3.revokerInfo, s4 = [];
n3.forEach(function(e4) {
- var t4 = e4.tinyID, n4 = e4.clientTime, o3 = e4.random, e4 = e4.sequence, t4 = { conversationID: "".concat(R2.CONV_GROUP).concat(i4), ID: "".concat(t4, "-").concat(n4, "-").concat(o3), revoker: s4.revoker, revokeReason: s4.reason || "", revokerInfo: { userID: s4.revoker, nick: "", avatar: "" }, sequence: e4 };
- a3.push(t4);
- }), 0 !== a3.length && this._get(11).updateRevokerInfo(a3).then(function(e4) {
+ var t4 = e4.tinyID, n4 = e4.clientTime, o3 = e4.random, e4 = e4.sequence, t4 = { conversationID: "".concat(R2.CONV_GROUP).concat(i4), ID: "".concat(t4, "-").concat(n4, "-").concat(o3), revoker: a3.revoker, revokeReason: a3.reason || "", revokerInfo: { userID: a3.revoker, nick: "", avatar: "" }, sequence: e4 };
+ s4.push(t4);
+ }), 0 !== s4.length && this._get(11).updateRevokerInfo(s4).then(function(e4) {
t3._grpM.emitOEvt(h2.MESSAGE_REVOKED, e4);
});
} }, { key: "isBroadcastOrNormal", value: function(e3) {
@@ -12800,7 +12807,7 @@ var chat = { exports: {} };
} }, { key: "isGroupSystemNotice", value: function(e3) {
return 5 === e3;
} }, { key: "restoreGroupTipElements", value: function() {
- var e3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t3 = e3.operatorInfo, t3 = void 0 === t3 ? {} : t3, n3 = e3.operatorID, o3 = e3.userIDList, o3 = void 0 === o3 ? [] : o3, i4 = e3.operationType, i4 = (A2(e3.groupJoinType) || 1 !== i4 && 2 !== i4 || (e3.groupJoinType = 2 === i4 ? 0 : 1), t3.userID), s4 = t3.avatar, t3 = t3.nick, n3 = (e3.operatorInfo = { userID: void 0 === i4 ? n3 : i4, avatar: void 0 === s4 ? "" : s4, nick: void 0 === t3 ? "" : t3 }, o3.map(function(e4) {
+ var e3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t3 = e3.operatorInfo, t3 = void 0 === t3 ? {} : t3, n3 = e3.operatorID, o3 = e3.userIDList, o3 = void 0 === o3 ? [] : o3, i4 = e3.operationType, i4 = (A2(e3.groupJoinType) || 1 !== i4 && 2 !== i4 || (e3.groupJoinType = 2 === i4 ? 0 : 1), t3.userID), a3 = t3.avatar, t3 = t3.nick, n3 = (e3.operatorInfo = { userID: void 0 === i4 ? n3 : i4, avatar: void 0 === a3 ? "" : a3, nick: void 0 === t3 ? "" : t3 }, o3.map(function(e4) {
return { userID: e4 };
}));
return e3.memberInfoList = e3.memberInfoList || n3, e3;
@@ -12823,14 +12830,14 @@ var chat = { exports: {} };
return !!this._get(11).isMessageSentByCurrentInstance(e3);
} }, { key: "packMessage", value: function(e3, t3) {
e3.currentUser = this._grpM.getMyUserID(), e3.conversationType = 5 === t3 ? R2.CONV_SYSTEM : R2.CONV_GROUP, e3.isSystemMessage = !!e3.isSystemMessage;
- var n3 = new Do(e3), e3 = this.packElements(e3, t3), t3 = this._grpM.getFileDownloadProxy(), o3 = this._grpM.getDownloadFileAuthKey(), i4 = this._get(17).getFileDNList();
+ var n3 = new So(e3), e3 = this.packElements(e3, t3), t3 = this._grpM.getFileDownloadProxy(), o3 = this._grpM.getDownloadFileAuthKey(), i4 = this._get(17).getFileDNList();
return n3.setElement(e3, t3, o3, i4), n3;
} }, { key: "packElements", value: function(e3, t3) {
return 4 === t3 || 6 === t3 ? (this._updateMemberCountByGroupTips(e3), { type: R2.MSG_GRP_TIP, content: y2(y2({}, e3.elements), {}, { groupProfile: e3.groupProfile }) }) : 5 === t3 ? { type: R2.MSG_GRP_SYS_NOTICE, content: y2(y2({}, e3.elements), {}, { groupProfile: y2(y2({}, e3.groupProfile), {}, { groupID: e3.groupID }) }) } : e3.elements;
} }, { key: "packConversationOption", value: function(e3) {
for (var t3 = /* @__PURE__ */ new Map(), n3 = 0; n3 < e3.length; n3++) {
- var o3, i4 = e3[n3], s4 = i4.conversationID;
- t3.has(s4) ? "in" === ((o3 = t3.get(s4)).lastMessage = i4).flow && o3.unreadCount++ : t3.set(s4, { conversationID: i4.conversationID, unreadCount: "out" === i4.flow ? 0 : 1, type: i4.conversationType, subType: i4.conversationSubType, lastMessage: i4 });
+ var o3, i4 = e3[n3], a3 = i4.conversationID;
+ t3.has(a3) ? "in" === ((o3 = t3.get(a3)).lastMessage = i4).flow && o3.unreadCount++ : t3.set(a3, { conversationID: i4.conversationID, unreadCount: "out" === i4.flow ? 0 : 1, type: i4.conversationType, subType: i4.conversationSubType, lastMessage: i4 });
}
return d2(t3.values());
} }, { key: "_updateMemberCountByGroupTips", value: function(e3) {
@@ -12839,25 +12846,25 @@ var chat = { exports: {} };
} }, { key: "_onBroadcastMessage", value: function(e3) {
if (!S2(e3)) {
for (var t3 = [], n3 = e3.length, o3 = null, i4 = 0; i4 < n3; i4++) {
- var s4 = this.restoreMessageFromSimplified(e3[i4]);
- Xo[s4.event] ? ((o3 = this.packMessage(s4, s4.event)).isBroadcastMessage = true, this._broadcastMessageIDMap.has(o3.ID) || (t3.push(o3), this._broadcastMessageIDMap.set(o3.ID, 1))) : M2.w("".concat(this._n, "._onBroadcastMessage unknown event:").concat(s4.event));
+ var a3 = this.restoreMessageFromSimplified(e3[i4]);
+ oi[a3.event] ? ((o3 = this.packMessage(a3, a3.event)).isBroadcastMessage = true, this._broadcastMessageIDMap.has(o3.ID) || (t3.push(o3), this._broadcastMessageIDMap.set(o3.ID, 1))) : M2.w("".concat(this._n, "._onBroadcastMessage unknown event:").concat(a3.event));
}
0 < t3.length && this._grpM.emitOEvt(h2.MESSAGE_RECEIVED, t3);
}
} }, { key: "start", value: function(e3) {
var t3;
- this._pollingInstanceMap.has(e3) ? (t3 = this._pollingInstanceMap.get(e3)).isRunning() || t3.start() : ((t3 = new zo({ manager: this, groupID: e3, onInit: this._updatedata.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) })).start(), this._pollingInstanceMap.set(e3, t3), M2.l("".concat(this._n, ".start groupID:").concat(e3)));
+ this._pollingInstanceMap.has(e3) ? (t3 = this._pollingInstanceMap.get(e3)).isRunning() || t3.start() : ((t3 = new ni({ manager: this, groupID: e3, onInit: this._updatedata.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) })).start(), this._pollingInstanceMap.set(e3, t3), M2.l("".concat(this._n, ".start groupID:").concat(e3)));
} }, { key: "handleJoinResult", value: function(o3) {
var i4 = this;
return this._preCheck(o3.group).then(function() {
var e3 = o3.longPollingKey, t3 = o3.group, n3 = t3.groupID;
- return i4._joinedGroupMap.set(n3, t3), i4._grpM.updateGroupMap([t3]), i4._grpM.deleteUnjoinedAVChatRoom(n3), i4._grpM.emitGroupListUpdate(true, false), N3(e3) ? D2({ status: Qe2, group: t3 }) : Promise.resolve();
+ return i4._joinedGroupMap.set(n3, t3), i4._grpM.updateGroupMap([t3]), i4._grpM.deleteUnjoinedAVChatRoom(n3), i4._grpM.emitGroupListUpdate(true, false), N3(e3) ? D2({ status: nt2, group: t3 }) : Promise.resolve();
});
} }, { key: "startRunLoop", value: function(i4) {
- var s4 = this;
+ var a3 = this;
return this.handleJoinResult(i4).then(function() {
var e3 = i4.longPollingKey, t3 = i4.group, n3 = i4.startSeq, o3 = t3.groupID;
- return s4._pollingRequestInfoMap.set(o3, { key: e3, startSeq: void 0 === n3 ? 0 : n3 }), s4.start(o3), s4._grpM.isLoggedIn() ? D2({ status: Qe2, group: t3 }) : D2({ status: Qe2 });
+ return a3._pollingRequestInfoMap.set(o3, { key: e3, startSeq: void 0 === n3 ? 0 : n3 }), a3.start(o3), a3._grpM.isLoggedIn() ? D2({ status: nt2, group: t3 }) : D2({ status: nt2 });
});
} }, { key: "_preCheck", value: function(e3) {
if (!this._get(12).isUnlimitedAVChatRoom() && this.hasJoinedAVChatRoom() && e3.type !== R2.GRP_LIVE) {
@@ -12868,16 +12875,16 @@ var chat = { exports: {} };
}
return Promise.resolve();
} }, { key: "joinWithoutAuth", value: function(e3) {
- var n3 = this, o3 = e3.groupID, i4 = "".concat(this._n, ".").concat("joinWithoutAuth"), s4 = new P2("joinWithoutAuth");
+ var n3 = this, o3 = e3.groupID, i4 = "".concat(this._n, ".").concat("joinWithoutAuth"), a3 = new P2("joinWithoutAuth");
return this._grpM.req({ P: G2.APPLY_JOIN_GRP_NOAUTH, data: e3 }).then(function(e4) {
e4 = e4.data.longPollingKey;
- if (s4.setMessage("groupID:".concat(o3, " longPollingKey:").concat(e4)).end(true), N3(e4))
+ if (a3.setMessage("groupID:".concat(o3, " longPollingKey:").concat(e4)).end(true), N3(e4))
return E2({ code: k2.CANNOT_JOIN_NON_AV_WITHOUT_LOGIN });
M2.l("".concat(i4, " ok. groupID:").concat(o3)), n3._get(11).setCompleted("".concat(R2.CONV_GROUP).concat(o3));
- var t3 = new qo({ groupID: o3 });
- return n3.startRunLoop({ group: t3, longPollingKey: e4 }), T2({ status: Qe2 });
+ var t3 = new Yo({ groupID: o3 });
+ return n3.startRunLoop({ group: t3, longPollingKey: e4 }), T2({ status: nt2 });
}).catch(function(e4) {
- return M2.e("".concat(i4, " failed. groupID:").concat(o3, " error:"), e4), s4.setError(e4).setMessage("groupID:".concat(o3)).end(true), E2(e4);
+ return M2.e("".concat(i4, " failed. groupID:").concat(o3, " error:"), e4), a3.setError(e4).setMessage("groupID:".concat(o3)).end(true), E2(e4);
}).finally(function() {
n3._grpM.get(14).reportAtOnce();
});
@@ -12889,12 +12896,12 @@ var chat = { exports: {} };
return E2(e4);
})) : D2({ memberCount: t3.memberCount });
} }, { key: "_getGroupOnlineMemberCount", value: function(i4) {
- var s4 = this, a3 = "".concat(this._n, ".").concat("_getGroupOnlineMemberCount"), t3 = new P2("_getGroupOnlineMemberCount");
+ var a3 = this, s4 = "".concat(this._n, ".").concat("_getGroupOnlineMemberCount"), t3 = new P2("_getGroupOnlineMemberCount");
return this._grpM.requestOnlineCount(i4).then(function(e3) {
- var t4 = s4._onlineMemberCountMap.get(i4) || {}, e3 = e3.data, n3 = e3.memberCount, n3 = void 0 === n3 ? 0 : n3, e3 = e3.expireTime, e3 = void 0 === e3 ? s4.DEFAULT_EXPIRE_TIME : e3, o3 = (M2.l("".concat(a3, " ok. groupID:").concat(i4, " memberCount:").concat(n3, " expireTime:").concat(e3)), Date.now());
- return S2(t4) && (t4.lastReqTime = o3), s4._onlineMemberCountMap.set(i4, Object.assign(t4, { lastSyncTime: o3, latestUpdateTime: o3, memberCount: n3, expireTime: e3 })), { memberCount: n3 };
+ var t4 = a3._onlineMemberCountMap.get(i4) || {}, e3 = e3.data, n3 = e3.memberCount, n3 = void 0 === n3 ? 0 : n3, e3 = e3.expireTime, e3 = void 0 === e3 ? a3.DEFAULT_EXPIRE_TIME : e3, o3 = (M2.l("".concat(s4, " ok. groupID:").concat(i4, " memberCount:").concat(n3, " expireTime:").concat(e3)), Date.now());
+ return S2(t4) && (t4.lastReqTime = o3), a3._onlineMemberCountMap.set(i4, Object.assign(t4, { lastSyncTime: o3, latestUpdateTime: o3, memberCount: n3, expireTime: e3 })), { memberCount: n3 };
}).catch(function(e3) {
- return M2.w("".concat(a3, " failed. error:"), e3), t3.setCode(e3.code).setMessage("groupID:".concat(i4, " error:").concat(JSON.stringify(e3))).end(), Promise.reject(e3);
+ return M2.w("".concat(s4, " failed. error:"), e3), t3.setCode(e3.code).setMessage("groupID:".concat(i4, " error:").concat(JSON.stringify(e3))).end(), Promise.reject(e3);
});
} }, { key: "_get", value: function(e3) {
return this._grpM.get(e3);
@@ -12951,12 +12958,12 @@ var chat = { exports: {} };
this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this._pollingRequestInfoMap.clear(), this._onlineMemberCountMap.clear(), this._broadcastMessageIDMap.clear();
}
this._seqSll.reset(), this._IDSll.reset(), this._reportMessageStackedCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = 300, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0;
- } }]), Qo = e2(function e3(t3) {
+ } }]), ai = e2(function e3(t3) {
p3(this, e3), this.userID = "", this.avatar = "", this.nick = "", this.role = "", this.joinTime = "", this.lastSendMsgTime = "", this.nameCard = "", this.muteUntil = 0, this.memberCustomField = [], this.isOnline = false, this.updateMember(t3);
}, [{ key: "updateMember", value: function(e3) {
N3(e3.onlineStatus) || (this.isOnline = "Online" === e3.onlineStatus);
var t3 = [null, void 0, "", 0, NaN];
- e3.memberCustomField && Lt2(this.memberCustomField, e3.memberCustomField), dt2(this, e3, ["memberCustomField", "marks", "onlineStatus"], t3);
+ e3.memberCustomField && Rt2(this.memberCustomField, e3.memberCustomField), ht2(this, e3, ["memberCustomField", "marks", "onlineStatus"], t3);
} }, { key: "updateRole", value: function(e3) {
["Owner", "Admin", "Member"].indexOf(e3) < 0 || (this.role = e3);
} }, { key: "updateMuteUntil", value: function(e3) {
@@ -12964,8 +12971,8 @@ var chat = { exports: {} };
} }, { key: "updateNameCard", value: function(e3) {
N3(e3) || (this.nameCard = e3);
} }, { key: "updateMemberCustomField", value: function(e3) {
- e3 && Lt2(this.memberCustomField, e3);
- } }]), $o = e2(function e3(t3) {
+ e3 && Rt2(this.memberCustomField, e3);
+ } }]), si = e2(function e3(t3) {
p3(this, e3), this._grpM = t3, this._n = "GroupMemberHandler", this.groupMemberListMap = /* @__PURE__ */ new Map(), this.DEFAULT_MEMBER_INFO_FILTER = ["Role", "JoinTime", "NameCard", "ShutUpUntil", "OnlineStatus"], this._grpM.getIEmitInst().on(U2.PROFILE_UPDATED, this._onProfileUpdated, this);
}, [{ key: "_onProfileUpdated", value: function(e3) {
for (var n3 = this, o3 = e3.data, i4 = 0; i4 < o3.length; i4++)
@@ -12978,17 +12985,17 @@ var chat = { exports: {} };
} }, { key: "deleteGroupMemberList", value: function(e3) {
this.groupMemberListMap.delete(e3);
} }, { key: "getGroupMemberList", value: function(e3) {
- var t3, o3 = this, i4 = e3.groupID, n3 = e3.role, n3 = void 0 === n3 ? void 0 : n3, s4 = e3.offset, a3 = void 0 === s4 ? 0 : s4, s4 = e3.count, r4 = void 0 === s4 ? 15 : s4, s4 = e3.filter, e3 = void 0 === s4 ? void 0 : s4, c3 = "".concat(this._n, ".").concat("getGroupMemberList"), s4 = this._grpM.hasLocalGroup(i4);
- if (M2.l("".concat(c3, " groupID:").concat(i4, " role:").concat(n3, " offset:").concat(a3, " count:").concat(r4, " hasLocalGroup:").concat(s4)), !s4)
+ var t3, o3 = this, i4 = e3.groupID, n3 = e3.role, n3 = void 0 === n3 ? void 0 : n3, a3 = e3.offset, s4 = void 0 === a3 ? 0 : a3, a3 = e3.count, r4 = void 0 === a3 ? 15 : a3, a3 = e3.filter, e3 = void 0 === a3 ? void 0 : a3, c3 = "".concat(this._n, ".").concat("getGroupMemberList"), a3 = this._grpM.hasLocalGroup(i4);
+ if (M2.l("".concat(c3, " groupID:").concat(i4, " role:").concat(n3, " offset:").concat(s4, " count:").concat(r4, " hasLocalGroup:").concat(a3)), !a3)
return D2({ memberList: [], offset: 0 });
if (this._grpM.getLocalGroupProfile(i4).type === R2.GRP_AVCHATROOM) {
if (this._grpM.canIUse(g2.AV_MBR_LIST))
- return this._getAVChatRoomMemberList({ groupID: i4, offset: a3, filter: e3 });
+ return this._getAVChatRoomMemberList({ groupID: i4, offset: s4, filter: e3 });
this._grpM.warn("LiveOnlineMember");
}
n3 !== R2.GRP_MBR_ROLE_ADMIN && n3 !== R2.GRP_MBR_ROLE_OWNER && n3 !== R2.GRP_MBR_ROLE_MEMBER || (t3 = n3);
- var u3 = new P2("getGroupMemberList"), l3 = 0, s4 = { groupID: i4, limit: 100 < r4 ? 100 : r4, memberRoleFilter: t3 ? [t3] : void 0, memberInfoFilter: this.DEFAULT_MEMBER_INFO_FILTER }, d3 = (Ot2({ groupID: i4 }) ? s4.next = "".concat(a3) : l3 = (s4.offset = a3) + r4, []);
- return this._grpM.req({ P: G2.GET_GRP_MBR_LIST, data: s4 }).then(function(e4) {
+ var u3 = new P2("getGroupMemberList"), l3 = 0, a3 = { groupID: i4, limit: 100 < r4 ? 100 : r4, memberRoleFilter: t3 ? [t3] : void 0, memberInfoFilter: this.DEFAULT_MEMBER_INFO_FILTER }, d3 = (Pt2({ groupID: i4 }) ? a3.next = "".concat(s4) : l3 = (a3.offset = s4) + r4, []);
+ return this._grpM.req({ P: G2.GET_GRP_MBR_LIST, data: a3 }).then(function(e4) {
var e4 = e4.data, t4 = e4.members, n4 = e4.memberNum, e4 = e4.next, e4 = void 0 === e4 ? void 0 : e4;
return N3(e4) || (l3 = S2(e4) ? 0 : e4), O2(t4) && 0 !== t4.length ? (o3._grpM.hasLocalGroup(i4) && (o3._grpM.getLocalGroupProfile(i4).memberNum = n4), d3 = o3._updateLocalGroupMemberMap(i4, t4), o3._grpM.get(4).getUserProfile({ userIDList: t4.map(function(e5) {
return e5.userID;
@@ -12997,42 +13004,42 @@ var chat = { exports: {} };
var e4 = e4.data;
return O2(e4) && 0 !== e4.length ? (e4 = e4.map(function(e5) {
return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar };
- }), o3._updateLocalGroupMemberMap(i4, e4), d3.length < r4 && (l3 = 0), u3.setMessage("groupID:".concat(i4, " offset:").concat(a3, " count:").concat(r4)).end(), M2.l("".concat(c3, " ok.")), T2({ memberList: d3, offset: l3 })) : D2({ memberList: [], offset: l3 });
+ }), o3._updateLocalGroupMemberMap(i4, e4), d3.length < r4 && (l3 = 0), u3.setMessage("groupID:".concat(i4, " offset:").concat(s4, " count:").concat(r4)).end(), M2.l("".concat(c3, " ok.")), T2({ memberList: d3, offset: l3 })) : D2({ memberList: [], offset: l3 });
}).catch(function(e4) {
return u3.setError(e4).end(), M2.e("".concat(c3, " failed. error:"), e4), E2(e4);
});
} }, { key: "_getAVChatRoomMemberList", value: function(e3) {
- var n3 = this, o3 = e3.groupID, t3 = e3.offset, e3 = e3.filter, i4 = "".concat(this._n, ".").concat("_getAVChatRoomMemberList"), s4 = new P2("_getAVChatRoomMemberList");
- return s4.setMessage("groupID:".concat(o3, " offset:").concat(t3, " filter:").concat(e3)), this._grpM.req({ P: G2.GET_AV_MBR_LIST, data: { groupID: o3, offset: t3, filter: e3 } }).then(function(e4) {
- var e4 = e4.data, t4 = e4.memberList, t4 = void 0 === t4 ? [] : t4, e4 = e4.offset, e4 = void 0 === e4 ? 0 : e4, t4 = (s4.end(), M2.l("".concat(i4, " ok. member count:").concat(t4.length, ", next request timestamp:").concat(e4)), t4.map(function(e5) {
+ var n3 = this, o3 = e3.groupID, t3 = e3.offset, e3 = e3.filter, i4 = "".concat(this._n, ".").concat("_getAVChatRoomMemberList"), a3 = new P2("_getAVChatRoomMemberList");
+ return a3.setMessage("groupID:".concat(o3, " offset:").concat(t3, " filter:").concat(e3)), this._grpM.req({ P: G2.GET_AV_MBR_LIST, data: { groupID: o3, offset: t3, filter: e3 } }).then(function(e4) {
+ var e4 = e4.data, t4 = e4.memberList, t4 = void 0 === t4 ? [] : t4, e4 = e4.offset, e4 = void 0 === e4 ? 0 : e4, t4 = (a3.end(), M2.l("".concat(i4, " ok. member count:").concat(t4.length, ", next request timestamp:").concat(e4)), t4.map(function(e5) {
return y2(y2({}, e5), {}, { onlineStatus: "Online" });
})), t4 = n3._updateLocalGroupMemberMap(o3, t4);
return T2({ memberList: t4, offset: e4 });
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
});
} }, { key: "getGroupMemberProfile", value: function(e3) {
- var t3, n3 = this, o3 = "getGroupMemberProfile", i4 = "".concat(this._n, ".").concat(o3), s4 = "groupID:".concat(e3.groupID), a3 = (5 < e3.userIDList.length ? s4 += " userIDList.length:".concat(e3.userIDList.length) : s4 += " userIDList:".concat(e3.userIDList), M2.l("".concat(i4, " ").concat(s4)), 50 < e3.userIDList.length && (e3.userIDList = e3.userIDList.slice(0, 50)), e3.groupID), r4 = e3.userIDList, i4 = this._grpM.getLocalGroupProfile(a3);
- return i4 && At2(i4.type) ? E2({ code: i4 = k2.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(i4, o3) }) : ((t3 = new P2(o3)).setMessage(s4), this._getGroupMemberProfileAdvance(y2(y2({}, e3), {}, { userIDList: r4 })).then(function(e4) {
+ var t3, n3 = this, o3 = "getGroupMemberProfile", i4 = "".concat(this._n, ".").concat(o3), a3 = "groupID:".concat(e3.groupID), s4 = (5 < e3.userIDList.length ? a3 += " userIDList.length:".concat(e3.userIDList.length) : a3 += " userIDList:".concat(e3.userIDList), M2.l("".concat(i4, " ").concat(a3)), 50 < e3.userIDList.length && (e3.userIDList = e3.userIDList.slice(0, 50)), e3.groupID), r4 = e3.userIDList, i4 = this._grpM.getLocalGroupProfile(s4);
+ return i4 && Gt2(i4.type) ? E2({ code: i4 = k2.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(i4, o3) }) : ((t3 = new P2(o3)).setMessage(a3), this._getGroupMemberProfileAdvance(y2(y2({}, e3), {}, { userIDList: r4 })).then(function(e4) {
e4 = e4.data.members;
- return O2(e4) && 0 !== e4.length ? (n3._updateLocalGroupMemberMap(a3, e4), n3._grpM.get(4).getUserProfile({ userIDList: e4.map(function(e5) {
+ return O2(e4) && 0 !== e4.length ? (n3._updateLocalGroupMemberMap(s4, e4), n3._grpM.get(4).getUserProfile({ userIDList: e4.map(function(e5) {
return e5.userID;
}), tagList: [f2.NICK, f2.AVATAR] })) : D2([]);
}).then(function(e4) {
e4 = e4.data.map(function(e5) {
return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar };
- }), n3._updateLocalGroupMemberMap(a3, e4), e4 = r4.filter(function(e5) {
- return n3.hasLocalGroupMember(a3, e5);
+ }), n3._updateLocalGroupMemberMap(s4, e4), e4 = r4.filter(function(e5) {
+ return n3.hasLocalGroupMember(s4, e5);
}).map(function(e5) {
- return n3.getLocalGroupMemberInfo(a3, e5);
+ return n3.getLocalGroupMemberInfo(s4, e5);
});
return t3.end(), T2({ memberList: e4 });
}));
- } }, { key: "addGroupMember", value: function(s4) {
- var a3 = this, r4 = "".concat(this._n, ".").concat("addGroupMember"), e3 = s4.groupID, c3 = this._grpM.getLocalGroupProfile(e3), t3 = c3.type, u3 = new P2("addGroupMember");
- return u3.setMessage("groupID:".concat(e3, " groupType:").concat(t3)), At2(t3) ? (t3 = new L2({ code: k2.CANNOT_ADD_MEMBER_IN_AV }), u3.setError(t3).end(), E2(t3)) : (s4.userIDList = s4.userIDList.map(function(e4) {
+ } }, { key: "addGroupMember", value: function(a3) {
+ var s4 = this, r4 = "".concat(this._n, ".").concat("addGroupMember"), e3 = a3.groupID, c3 = this._grpM.getLocalGroupProfile(e3), t3 = c3.type, u3 = new P2("addGroupMember");
+ return u3.setMessage("groupID:".concat(e3, " groupType:").concat(t3)), Gt2(t3) ? (t3 = new L2({ code: k2.CANNOT_ADD_MEMBER_IN_AV }), u3.setError(t3).end(), E2(t3)) : (a3.userIDList = a3.userIDList.map(function(e4) {
return { userID: e4 };
- }), M2.l("".concat(r4, " groupID:").concat(e3)), this._grpM.req({ P: G2.ADD_GRP_MBR, data: s4 }).then(function(e4) {
+ }), M2.l("".concat(r4, " groupID:").concat(e3)), this._grpM.req({ P: G2.ADD_GRP_MBR, data: a3 }).then(function(e4) {
var e4 = e4.data.members, t4 = (M2.l("".concat(r4, " ok")), e4.filter(function(e5) {
return 1 === e5.result;
}).map(function(e5) {
@@ -13049,39 +13056,39 @@ var chat = { exports: {} };
return 4 === e5.result;
}).map(function(e5) {
return e5.userID;
- }), i4 = "groupID:".concat(s4.groupID, ", ") + "successUserIDList:".concat(t4, ", ") + "failureUserIDList:".concat(n3, ", ") + "existedUserIDList:".concat(o3, ", ") + "overLimitUserIDList:".concat(e4);
- return u3.setMoreMessage(i4).end(), 0 === t4.length ? T2({ successUserIDList: t4, failureUserIDList: n3, existedUserIDList: o3, overLimitUserIDList: e4 }) : (a3._updateConvGroupProfile(c3), T2({ successUserIDList: t4, failureUserIDList: n3, existedUserIDList: o3, overLimitUserIDList: e4, group: c3 }));
+ }), i4 = "groupID:".concat(a3.groupID, ", ") + "successUserIDList:".concat(t4, ", ") + "failureUserIDList:".concat(n3, ", ") + "existedUserIDList:".concat(o3, ", ") + "overLimitUserIDList:".concat(e4);
+ return u3.setMoreMessage(i4).end(), 0 === t4.length ? T2({ successUserIDList: t4, failureUserIDList: n3, existedUserIDList: o3, overLimitUserIDList: e4 }) : (s4._updateConvGroupProfile(c3), T2({ successUserIDList: t4, failureUserIDList: n3, existedUserIDList: o3, overLimitUserIDList: e4, group: c3 }));
}).catch(function(e4) {
return u3.setError(e4).end(), M2.e("".concat(r4, " failed. error:"), e4), E2(e4);
}));
} }, { key: "deleteGroupMember", value: function(e3) {
- var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("deleteGroupMember"), s4 = e3.groupID, a3 = e3.userIDList, r4 = this._grpM.getLocalGroupProfile(s4);
- return N3(r4) ? E2({ code: k2.CANNOT_FIND_GRP }) : At2(r4.type) ? this._grpM.canIUse(g2.AV_BAN_MBR) ? this._banAVChatRoomMember(e3) : this._grpM.noUse("deleteGroupMember") : (t3 = "groupID:".concat(s4, " ").concat(5 < a3.length ? "userIDList.length:".concat(a3.length) : "userIDList:".concat(a3)), M2.l("".concat(i4, " groupID:").concat(s4, " userIDList:"), a3), (n3 = new P2("deleteGroupMember")).setMessage(t3), this._grpM.req({ P: G2.DEL_GRP_MBR, data: e3 }).then(function() {
- return n3.end(), M2.l("".concat(i4, " ok")), o3._updateConvGroupProfile(r4), o3.deleteLocalGroupMembers(s4, a3), T2({ group: r4, userIDList: a3 });
+ var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("deleteGroupMember"), a3 = e3.groupID, s4 = e3.userIDList, r4 = this._grpM.getLocalGroupProfile(a3);
+ return N3(r4) ? E2({ code: k2.CANNOT_FIND_GRP }) : Gt2(r4.type) ? this._grpM.canIUse(g2.AV_BAN_MBR) ? this._banAVChatRoomMember(e3) : this._grpM.noUse("deleteGroupMember") : (t3 = "groupID:".concat(a3, " ").concat(5 < s4.length ? "userIDList.length:".concat(s4.length) : "userIDList:".concat(s4)), M2.l("".concat(i4, " groupID:").concat(a3, " userIDList:"), s4), (n3 = new P2("deleteGroupMember")).setMessage(t3), this._grpM.req({ P: G2.DEL_GRP_MBR, data: e3 }).then(function() {
+ return n3.end(), M2.l("".concat(i4, " ok")), o3._updateConvGroupProfile(r4), o3.deleteLocalGroupMembers(a3, s4), T2({ group: r4, userIDList: s4 });
}).catch(function(e4) {
return n3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
}));
} }, { key: "_updateConvGroupProfile", value: function(e3) {
this._grpM.get(11).updateConvGroupProfile([e3]);
} }, { key: "_banAVChatRoomMember", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, ".").concat("_banAVChatRoomMember"), o3 = e3.groupID, i4 = e3.userIDList, s4 = "groupID:".concat(o3, " ").concat(5 < i4.length ? "userIDList.length:".concat(i4.length) : "userIDList:".concat(i4)), a3 = new P2("_banAVChatRoomMember"), r4 = (a3.setMessage(s4), M2.l("".concat(n3, " groupID:").concat(o3, " userIDList:"), i4), this._grpM.getLocalGroupProfile(o3));
+ var t3 = this, n3 = "".concat(this._n, ".").concat("_banAVChatRoomMember"), o3 = e3.groupID, i4 = e3.userIDList, a3 = "groupID:".concat(o3, " ").concat(5 < i4.length ? "userIDList.length:".concat(i4.length) : "userIDList:".concat(i4)), s4 = new P2("_banAVChatRoomMember"), r4 = (s4.setMessage(a3), M2.l("".concat(n3, " groupID:").concat(o3, " userIDList:"), i4), this._grpM.getLocalGroupProfile(o3));
return N3(e3.duration) || 0 === e3.duration ? E2({ code: k2.BAN_DURATION_INVALID }) : this._grpM.req({ P: G2.BAN_AV_MBR, data: e3 }).then(function() {
- return a3.end(), M2.l("".concat(n3, " ok")), t3.deleteLocalGroupMembers(o3, i4), T2({ group: r4, userIDList: i4 });
+ return s4.end(), M2.l("".concat(n3, " ok")), t3.deleteLocalGroupMembers(o3, i4), T2({ group: r4, userIDList: i4 });
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
});
} }, { key: "setGroupMemberMuteTime", value: function(e3) {
- var t3, n3, o3 = this, i4 = e3.groupID, s4 = e3.userID, e3 = e3.muteTime, a3 = "".concat(this._n, ".").concat("setGroupMemberMuteTime");
- return s4 === this._grpM.getMyUserID() ? E2({ code: k2.CANNOT_MUTE_SELF }) : (t3 = "groupID:".concat(i4, " userID:").concat(s4, " muteTime:").concat(e3), M2.l("".concat(a3, " ").concat(t3)), (n3 = new P2("setGroupMemberMuteTime")).setMessage(t3), this.modifyGroupMemberInfo({ groupID: i4, userID: s4, muteTime: e3 }).then(function(e4) {
- n3.end(), M2.l("".concat(a3, " ok"));
+ var t3, n3, o3 = this, i4 = e3.groupID, a3 = e3.userID, e3 = e3.muteTime, s4 = "".concat(this._n, ".").concat("setGroupMemberMuteTime");
+ return a3 === this._grpM.getMyUserID() ? E2({ code: k2.CANNOT_MUTE_SELF }) : (t3 = "groupID:".concat(i4, " userID:").concat(a3, " muteTime:").concat(e3), M2.l("".concat(s4, " ").concat(t3)), (n3 = new P2("setGroupMemberMuteTime")).setMessage(t3), this.modifyGroupMemberInfo({ groupID: i4, userID: a3, muteTime: e3 }).then(function(e4) {
+ n3.end(), M2.l("".concat(s4, " ok"));
var t4 = o3._grpM.getLocalGroupProfile(i4);
return T2({ group: t4, member: e4 });
}).catch(function(e4) {
- return n3.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
+ return n3.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
}));
} }, { key: "setGroupMemberRole", value: function(e3) {
- var t3, n3, o3 = "".concat(this._n, ".").concat("setGroupMemberRole"), i4 = e3.groupID, s4 = e3.userID, e3 = e3.role, a3 = "groupID:".concat(i4, " userID:").concat(s4, " role:").concat(e3), r4 = this._grpM.getLocalGroupProfile(i4);
- return r4 && r4.selfInfo.role !== R2.GRP_MBR_ROLE_OWNER ? E2({ code: k2.NOT_OWNER }) : (t3 = [R2.GRP_MBR_ROLE_ADMIN, R2.GRP_MBR_ROLE_MEMBER], Ot2({ groupID: i4 }) && t3.push(R2.GRP_MBR_ROLE_CUSTOM), t3.indexOf(e3) < 0 ? E2({ code: k2.INVALID_MEMBER_ROLE }) : s4 === this._grpM.getMyUserID() ? E2({ code: k2.CANNOT_SET_SELF_MEMBER_ROLE }) : ((n3 = new P2("setGroupMemberRole")).setMessage(a3), M2.l("".concat(o3, " ").concat(a3)), this.modifyGroupMemberInfo({ groupID: i4, userID: s4, role: e3 }).then(function(e4) {
+ var t3, n3, o3 = "".concat(this._n, ".").concat("setGroupMemberRole"), i4 = e3.groupID, a3 = e3.userID, e3 = e3.role, s4 = "groupID:".concat(i4, " userID:").concat(a3, " role:").concat(e3), r4 = this._grpM.getLocalGroupProfile(i4);
+ return r4 && r4.selfInfo.role !== R2.GRP_MBR_ROLE_OWNER ? E2({ code: k2.NOT_OWNER }) : (t3 = [R2.GRP_MBR_ROLE_ADMIN, R2.GRP_MBR_ROLE_MEMBER], Pt2({ groupID: i4 }) && t3.push(R2.GRP_MBR_ROLE_CUSTOM), t3.indexOf(e3) < 0 ? E2({ code: k2.INVALID_MEMBER_ROLE }) : a3 === this._grpM.getMyUserID() ? E2({ code: k2.CANNOT_SET_SELF_MEMBER_ROLE }) : ((n3 = new P2("setGroupMemberRole")).setMessage(s4), M2.l("".concat(o3, " ").concat(s4)), this.modifyGroupMemberInfo({ groupID: i4, userID: a3, role: e3 }).then(function(e4) {
return n3.end(), M2.l("".concat(o3, " ok")), T2({ group: r4, member: e4 });
}).catch(function(e4) {
return n3.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
@@ -13090,39 +13097,39 @@ var chat = { exports: {} };
var n3, o3 = this._grpM.get(29);
return !o3 || (n3 = (o3 = o3.filterText(t3[e3], "group_member_profile")).isAllowedToSend, o3 = o3.modifiedText, true === n3 && (t3[e3] = o3, true));
} }, { key: "setGroupMemberNameCard", value: function(e3) {
- var n3, o3, i4, t3, s4, a3 = this, r4 = "setGroupMemberNameCard", c3 = "".concat(this._n, ".").concat(r4);
- return e3.nameCard && false === this._filterProfanity("nameCard", e3) ? E2({ code: k2.PROFANITY_FOUND }) : (n3 = e3.groupID, t3 = e3.userID, o3 = void 0 === t3 ? this._grpM.getMyUserID() : t3, i4 = e3.nameCard, t3 = "groupID:".concat(n3, " userID:").concat(o3, " nameCard:").concat(i4), M2.l("".concat(c3, " ").concat(t3)), (e3 = this._grpM.getLocalGroupProfile(n3)) && At2(e3.type) ? E2({ code: e3 = k2.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(e3, r4) }) : ((s4 = new P2(r4)).setMessage(t3), this.modifyGroupMemberInfo({ groupID: n3, userID: o3, nameCard: i4 }).then(function(e4) {
- M2.l("".concat(c3, " ok")), s4.end();
- var t4 = a3._grpM.getLocalGroupProfile(n3);
- return o3 === a3._grpM.getMyUserID() && t4 && t4.setSelfNameCard(i4), T2({ group: t4, member: e4 });
+ var n3, o3, i4, t3, a3, s4 = this, r4 = "setGroupMemberNameCard", c3 = "".concat(this._n, ".").concat(r4);
+ return e3.nameCard && false === this._filterProfanity("nameCard", e3) ? E2({ code: k2.PROFANITY_FOUND }) : (n3 = e3.groupID, t3 = e3.userID, o3 = void 0 === t3 ? this._grpM.getMyUserID() : t3, i4 = e3.nameCard, t3 = "groupID:".concat(n3, " userID:").concat(o3, " nameCard:").concat(i4), M2.l("".concat(c3, " ").concat(t3)), (e3 = this._grpM.getLocalGroupProfile(n3)) && Gt2(e3.type) ? E2({ code: e3 = k2.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(e3, r4) }) : ((a3 = new P2(r4)).setMessage(t3), this.modifyGroupMemberInfo({ groupID: n3, userID: o3, nameCard: i4 }).then(function(e4) {
+ M2.l("".concat(c3, " ok")), a3.end();
+ var t4 = s4._grpM.getLocalGroupProfile(n3);
+ return o3 === s4._grpM.getMyUserID() && t4 && t4.setSelfNameCard(i4), T2({ group: t4, member: e4 });
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(c3, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(c3, " failed. error:"), e4), E2(e4);
})));
} }, { key: "setGroupMemberCustomField", value: function(e3) {
- var n3, o3 = this, t3 = "setGroupMemberCustomField", i4 = "".concat(this._n, ".").concat(t3), s4 = e3.groupID, a3 = e3.userID, a3 = void 0 === a3 ? this._grpM.getMyUserID() : a3, e3 = e3.memberCustomField, r4 = "groupID:".concat(s4, " userID:").concat(a3, " memberCustomField:").concat(JSON.stringify(e3)), c3 = (M2.l("".concat(i4, " ").concat(r4)), this._grpM.getLocalGroupProfile(s4));
- return c3 && At2(c3.type) ? E2({ code: c3 = k2.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(c3, t3) }) : ((n3 = new P2(t3)).setMessage(r4), this.modifyGroupMemberInfo({ groupID: s4, userID: a3, memberCustomField: e3 }).then(function(e4) {
+ var n3, o3 = this, t3 = "setGroupMemberCustomField", i4 = "".concat(this._n, ".").concat(t3), a3 = e3.groupID, s4 = e3.userID, s4 = void 0 === s4 ? this._grpM.getMyUserID() : s4, e3 = e3.memberCustomField, r4 = "groupID:".concat(a3, " userID:").concat(s4, " memberCustomField:").concat(JSON.stringify(e3)), c3 = (M2.l("".concat(i4, " ").concat(r4)), this._grpM.getLocalGroupProfile(a3));
+ return c3 && Gt2(c3.type) ? E2({ code: c3 = k2.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(c3, t3) }) : ((n3 = new P2(t3)).setMessage(r4), this.modifyGroupMemberInfo({ groupID: a3, userID: s4, memberCustomField: e3 }).then(function(e4) {
n3.end(), M2.l("".concat(i4, " ok"));
- var t4 = o3._grpM.getLocalGroupProfile(s4);
+ var t4 = o3._grpM.getLocalGroupProfile(a3);
return T2({ group: t4, member: e4 });
}).catch(function(e4) {
return n3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
}));
} }, { key: "modifyGroupMemberInfo", value: function(t3) {
var n3 = this, o3 = t3.groupID, i4 = t3.userID, e3 = void 0;
- return Nt2(o3) && (o3 = jt2(e3 = o3)), this._grpM.req({ P: G2.MODIFY_GRP_MBR_INFO, data: y2(y2({}, t3), {}, { groupID: o3, topicID: e3 }) }).then(function() {
+ return Ut2(o3) && (o3 = Xt2(e3 = o3)), this._grpM.req({ P: G2.MODIFY_GRP_MBR_INFO, data: y2(y2({}, t3), {}, { groupID: o3, topicID: e3 }) }).then(function() {
var e4;
- return n3.hasLocalGroupMember(o3, i4) ? (e4 = n3.getLocalGroupMemberInfo(o3, i4), N3(t3.muteTime) || e4.updateMuteUntil(t3.muteTime), N3(t3.role) || e4.updateRole(t3.role), N3(t3.nameCard) || e4.updateNameCard(t3.nameCard), N3(t3.memberCustomField) || e4.updateMemberCustomField(t3.memberCustomField), e4) : (e4 = n3._grpM.getLocalGroupProfile(o3)) && !At2(e4.type) ? n3.getGroupMemberProfile({ groupID: o3, userIDList: [i4] }).then(function(e5) {
+ return n3.hasLocalGroupMember(o3, i4) ? (e4 = n3.getLocalGroupMemberInfo(o3, i4), N3(t3.muteTime) || e4.updateMuteUntil(t3.muteTime), N3(t3.role) || e4.updateRole(t3.role), N3(t3.nameCard) || e4.updateNameCard(t3.nameCard), N3(t3.memberCustomField) || e4.updateMemberCustomField(t3.memberCustomField), e4) : (e4 = n3._grpM.getLocalGroupProfile(o3)) && !Gt2(e4.type) ? n3.getGroupMemberProfile({ groupID: o3, userIDList: [i4] }).then(function(e5) {
return j2(e5.data.memberList, 1)[0];
}) : void 0;
});
} }, { key: "markGroupMemberList", value: function(e3) {
- var o3 = "".concat(this._n, ".").concat("markGroupMemberList"), t3 = e3.groupID, n3 = e3.markType, i4 = e3.enableMark, e3 = e3.userIDList, s4 = void 0 === e3 ? [] : e3, e3 = "groupID:".concat(t3, " markType:").concat(n3, " enableMark:").concat(i4, " userIDList count:").concat(s4.length), a3 = (M2.l("".concat(o3, " ").concat(e3)), 2), r4 = [], i4 = (true === i4 && (a3 = 1), d2(s4)), c3 = (500 < s4.length && (i4 = s4.slice(0, 500), M2.w("".concat(o3, " ").concat(Qt2(500)))), i4.forEach(function(e4) {
+ var o3 = "".concat(this._n, ".").concat("markGroupMemberList"), t3 = e3.groupID, n3 = e3.markType, i4 = e3.enableMark, e3 = e3.userIDList, a3 = void 0 === e3 ? [] : e3, e3 = "groupID:".concat(t3, " markType:").concat(n3, " enableMark:").concat(i4, " userIDList count:").concat(a3.length), s4 = (M2.l("".concat(o3, " ").concat(e3)), 2), r4 = [], i4 = (true === i4 && (s4 = 1), d2(a3)), c3 = (500 < a3.length && (i4 = a3.slice(0, 500), M2.w("".concat(o3, " ").concat(tn(500)))), i4.forEach(function(e4) {
r4.push({ userID: e4, markType: [n3] });
}), i4 = null, new P2("markGroupMemberList"));
- return c3.setMessage(e3), this._grpM.req({ P: G2.MARK_AV_MBR_INFO, data: { groupID: t3, operationType: a3, memberList: r4 } }).then(function(e4) {
- var e4 = e4.data.memberList, e4 = void 0 === e4 ? [] : e4, t4 = [], n4 = [], e4 = (e4.length === s4.length ? t4.push.apply(t4, d2(s4)) : (e4.forEach(function(e5) {
+ return c3.setMessage(e3), this._grpM.req({ P: G2.MARK_AV_MBR_INFO, data: { groupID: t3, operationType: s4, memberList: r4 } }).then(function(e4) {
+ var e4 = e4.data.memberList, e4 = void 0 === e4 ? [] : e4, t4 = [], n4 = [], e4 = (e4.length === a3.length ? t4.push.apply(t4, d2(a3)) : (e4.forEach(function(e5) {
t4.push(e5.userID);
- }), s4.forEach(function(e5) {
+ }), a3.forEach(function(e5) {
t4.includes(e5) || n4.push(e5);
})), "success count:".concat(t4.length, " fail count:").concat(n4.length));
return c3.setMessage(e4).end(), M2.l("".concat(o3, " ok. ").concat(e4)), T2({ successUserIDList: t4, failureUserIDList: n4 });
@@ -13134,7 +13141,7 @@ var chat = { exports: {} };
} }, { key: "_updateLocalGroupMemberMap", value: function(t3, e3) {
var n3 = this;
return O2(e3) && 0 !== e3.length ? e3.map(function(e4) {
- return n3.hasLocalGroupMember(t3, e4.userID) ? n3.getLocalGroupMemberInfo(t3, e4.userID).updateMember(e4) : n3.setLocalGroupMember(t3, new Qo(e4)), n3.getLocalGroupMemberInfo(t3, e4.userID);
+ return n3.hasLocalGroupMember(t3, e4.userID) ? n3.getLocalGroupMemberInfo(t3, e4.userID).updateMember(e4) : n3.setLocalGroupMember(t3, new ai(e4)), n3.getLocalGroupMemberInfo(t3, e4.userID);
}) : [];
} }, { key: "deleteLocalGroupMembers", value: function(e3, t3) {
var n3 = this.groupMemberListMap.get(e3);
@@ -13153,35 +13160,35 @@ var chat = { exports: {} };
return this.groupMemberListMap.has(e3);
} }, { key: "reset", value: function() {
this.groupMemberListMap.clear();
- } }]), ei = [17, 18, 20], ti = e2(function e3(t3) {
+ } }]), ri = [17, 18, 20], ci = e2(function e3(t3) {
p3(this, e3), this._grpM = t3, this._n = "GroupSystemNoticeHandler", this.pendencyMap = /* @__PURE__ */ new Map();
}, [{ key: "onNewGroupSystemNotice", value: function(e3) {
var t3 = e3.dataList, n3 = e3.isSyncingEnded, e3 = e3.isInstantMessage, t3 = (M2.d("".concat(this._n, ".onReceiveSystemNotice count:").concat(t3.length)), this._assembly({ notifiesList: t3, isInstantMessage: e3 })), o3 = t3.eventDataList, t3 = t3.result;
0 < o3.length && (this._grpM.get(11).onNewMessage({ conversationOptionsList: o3, isInstantMessage: e3 }), this._onReceivedGroupSystemNotice({ result: t3, isInstantMessage: e3 })), e3 ? 0 < t3.length && this._grpM.emitOEvt(h2.MESSAGE_RECEIVED, t3) : true === n3 && this._clearGroupSystemNotice();
} }, { key: "_assembly", value: function(e3) {
- for (var t3 = e3.notifiesList, n3 = e3.isInstantMessage, o3 = null, i4 = t3.length, s4 = 0, a3 = [], r4 = { conversationID: R2.CONV_SYSTEM, unreadCount: 0, type: R2.CONV_SYSTEM, subType: null, lastMessage: null }, s4 = 0; s4 < i4; s4++) {
- var c3 = t3[s4], u3 = c3.groupProfile, l3 = u3.communityType, u3 = u3.topicID, u3 = void 0 === u3 ? void 0 : u3, d3 = c3.elements, p4 = d3.topicIDList, p4 = void 0 === p4 ? void 0 : p4, d3 = d3.operationType;
+ for (var t3 = e3.notifiesList, n3 = e3.isInstantMessage, o3 = null, i4 = t3.length, a3 = 0, s4 = [], r4 = { conversationID: R2.CONV_SYSTEM, unreadCount: 0, type: R2.CONV_SYSTEM, subType: null, lastMessage: null }, a3 = 0; a3 < i4; a3++) {
+ var c3 = t3[a3], u3 = c3.groupProfile, l3 = u3.communityType, u3 = u3.topicID, u3 = void 0 === u3 ? void 0 : u3, d3 = c3.elements, p4 = d3.topicIDList, p4 = void 0 === p4 ? void 0 : p4, d3 = d3.operationType;
if (!(2 !== (void 0 === l3 ? 0 : l3) || S2(u3) && S2(p4))) {
- if (ei.includes(d3)) {
+ if (ri.includes(d3)) {
this._handleTopicSystemNotice(c3);
continue;
}
S2(u3) || (c3.to = u3);
}
- 15 !== c3.elements.operationType && (c3.currentUser = this._grpM.getMyUserID(), c3.conversationType = R2.CONV_SYSTEM, c3.conversationID = R2.CONV_SYSTEM, (o3 = new Do(c3)).setElement({ type: R2.MSG_GRP_SYS_NOTICE, content: y2(y2({}, c3.elements), {}, { groupProfile: y2({}, c3.groupProfile) }) }), o3.isSystemMessage = true, (1 === o3.sequence && 1 === o3.random || 2 === o3.sequence && 2 === o3.random) && (o3.sequence = ht2(), o3.random = ht2(), o3.generateMessageID(), M2.l("".concat(this._n, "._assembly regenerate ID:").concat(o3.ID))), this._grpM.get(11).pushIntoNoticeResult(a3, o3)) && (n3 ? r4.unreadCount++ : o3.setIsRead(true), r4.subType = o3.conversationSubType);
+ 15 !== c3.elements.operationType && (c3.currentUser = this._grpM.getMyUserID(), c3.conversationType = R2.CONV_SYSTEM, c3.conversationID = R2.CONV_SYSTEM, (o3 = new So(c3)).setElement({ type: R2.MSG_GRP_SYS_NOTICE, content: y2(y2({}, c3.elements), {}, { groupProfile: y2({}, c3.groupProfile) }) }), o3.isSystemMessage = true, (1 === o3.sequence && 1 === o3.random || 2 === o3.sequence && 2 === o3.random) && (o3.sequence = mt2(), o3.random = mt2(), o3.generateMessageID(), M2.l("".concat(this._n, "._assembly regenerate ID:").concat(o3.ID))), this._grpM.get(11).pushIntoNoticeResult(s4, o3)) && (n3 ? r4.unreadCount++ : o3.setIsRead(true), r4.subType = o3.conversationSubType);
}
- return r4.lastMessage = a3[a3.length - 1], { eventDataList: 0 < a3.length ? [r4] : [], result: a3 };
+ return r4.lastMessage = s4[s4.length - 1], { eventDataList: 0 < s4.length ? [r4] : [], result: s4 };
} }, { key: "_clearGroupSystemNotice", value: function() {
- var s4 = this;
+ var a3 = this;
this._getPendencyList().then(function(e3) {
e3.forEach(function(e4) {
- s4.pendencyMap.set("".concat(e4.from, "_").concat(e4.groupID, "_").concat(e4.to), e4);
+ a3.pendencyMap.set("".concat(e4.from, "_").concat(e4.groupID, "_").concat(e4.to), e4);
});
- var e3 = s4._grpM.get(11).getLocalMessageList(R2.CONV_SYSTEM), i4 = [];
+ var e3 = a3._grpM.get(11).getLocalMessageList(R2.CONV_SYSTEM), i4 = [];
e3.forEach(function(e4) {
var t3 = e4.payload, n3 = t3.operatorID, o3 = t3.operationType, t3 = t3.groupProfile;
- 1 === o3 && (o3 = "".concat(n3, "_").concat(t3.groupID, "_").concat(t3.to), n3 = s4.pendencyMap.get(o3)) && A2(n3.handled) && 0 !== n3.handled && i4.push(e4);
- }), s4.deleteGroupSystemNotice({ messageList: i4 });
+ 1 === o3 && (o3 = "".concat(n3, "_").concat(t3.groupID, "_").concat(t3.to), n3 = a3.pendencyMap.get(o3)) && A2(n3.handled) && 0 !== n3.handled && i4.push(e4);
+ }), a3.deleteGroupSystemNotice({ messageList: i4 });
});
} }, { key: "deleteGroupSystemNotice", value: function(e3) {
var n3 = this, o3 = "".concat(this._n, ".deleteGroupSystemNotice");
@@ -13264,7 +13271,7 @@ var chat = { exports: {} };
});
} }, { key: "_onApplyJoinGroup", value: function(e3) {
var t3 = this, e3 = e3.payload.groupProfile, n3 = e3.groupID, e3 = e3.groupType, o3 = this._grpM.hasLocalGroup(n3);
- M2.l("".concat(this._n, "._onApplyJoinGroup groupID:").concat(n3, " groupType:").concat(e3, " hasGroup:").concat(o3)), o3 || At2(e3) || this._grpM.getGroupProfile({ groupID: n3 }).then(function(e4) {
+ M2.l("".concat(this._n, "._onApplyJoinGroup groupID:").concat(n3, " groupType:").concat(e3, " hasGroup:").concat(o3)), o3 || Gt2(e3) || this._grpM.getGroupProfile({ groupID: n3 }).then(function(e4) {
var e4 = e4.data.group;
e4 && (t3._grpM.updateGroupMap([e4]), e4 = !e4.isSupportTopic, t3._grpM.emitGroupListUpdate(true, e4));
});
@@ -13292,18 +13299,18 @@ var chat = { exports: {} };
var t3 = e3.payload.groupProfile.groupID, e3 = e3.payload.messageRemindType;
this._grpM.get(11).onGroupMsgRemindTypeUpdated({ groupID: t3, messageRemindType: e3 });
} }, { key: "_handleTopicSystemNotice", value: function(e3) {
- var t3 = e3.groupProfile, n3 = t3.groupID, t3 = t3.topicID, e3 = e3.elements, o3 = e3.operationType, i4 = e3.topicIDList, e3 = e3.messageRemindType, s4 = this._grpM.get(10);
- 17 === o3 ? s4.onTopicCreated({ groupID: n3, topicID: t3 }) : 18 === o3 ? s4.onTopicDeleted({ groupID: n3, topicIDList: i4 }) : 20 === o3 && s4.onMessageRemindTypeUpdated({ groupID: n3, topicID: t3, messageRemindType: e3 });
+ var t3 = e3.groupProfile, n3 = t3.groupID, t3 = t3.topicID, e3 = e3.elements, o3 = e3.operationType, i4 = e3.topicIDList, e3 = e3.messageRemindType, a3 = this._grpM.get(10);
+ 17 === o3 ? a3.onTopicCreated({ groupID: n3, topicID: t3 }) : 18 === o3 ? a3.onTopicDeleted({ groupID: n3, topicIDList: i4 }) : 20 === o3 && a3.onMessageRemindTypeUpdated({ groupID: n3, topicID: t3, messageRemindType: e3 });
} }, { key: "reset", value: function() {
this.pendencyMap.clear();
- } }]), ni = ["relayFlag"], oi = (t2(vi, c2), e2(vi, [{ key: "_onCloudConfig", value: function() {
+ } }]), ui = ["relayFlag"], li = (t2(Ei, c2), e2(Ei, [{ key: "_onCloudConfig", value: function() {
var e3 = this.getCloudConfig("polling_interval"), t3 = this.getCloudConfig("polling_interval_plus"), n3 = this.getCloudConfig("polling_no_msg_count"), o3 = this.getCloudConfig("polling_simplified_msg"), i4 = this.getCloudConfig("paging_grp_count");
M2.l("".concat(this._n, "._onCloudConfig pollingInterval:").concat(e3) + " pollingIntervalPlus:".concat(t3, " pollingNoMessageCount:").concat(n3) + " pollingSimplifiedMessage:".concat(o3, " pagingGroupCount:").concat(i4)), this._AVChatRoomHandler.setPollingInterval(e3), this._AVChatRoomHandler.setPollingIntervalPlus(t3), this._AVChatRoomHandler.setPollingNoMessageCount(n3), this._AVChatRoomHandler.setPollingSimplifiedMessage(o3), this._commonGroupHandler.setPagingGroupCount(i4);
} }, { key: "onCheckTimer", value: function(e3) {
this.isLoggedIn() && (this._commonGroupHandler.onCheckTimer(e3), this._groupTipsHandler.onCheckTimer(e3));
} }, { key: "guardForAVChatRoom", value: function(t3) {
var n3, o3 = this;
- return t3.conversationType !== R2.CONV_GROUP || (n3 = Nt2(t3.to) ? jt2(t3.to) : t3.to, this.hasLocalGroup(n3)) ? D2() : this.getGroupProfile({ groupID: n3 }).then(function(e3) {
+ return t3.conversationType !== R2.CONV_GROUP || (n3 = Ut2(t3.to) ? Xt2(t3.to) : t3.to, this.hasLocalGroup(n3)) ? D2() : this.getGroupProfile({ groupID: n3 }).then(function(e3) {
var e3 = e3.data.group.type;
return M2.l("".concat(o3._n, ".guardForAVChatRoom. groupID:").concat(n3, " type:").concat(e3)), e3 === R2.GRP_AVCHATROOM ? E2(new L2({ code: e3 = k2.MSG_SEND_FAIL_NOT_IN_AV, message: o3.getErrMsg(e3, t3.from, n3), data: { message: t3 } })) : D2();
});
@@ -13315,7 +13322,7 @@ var chat = { exports: {} };
var n3, o3 = this;
O2(e3) && (n3 = this.get(10), e3.forEach(function(e4) {
var t3 = e4.conversationID.replace(R2.CONV_GROUP, "");
- Nt2(t3) && n3.updateUnreadCountAndLastMsg(t3, e4.lastMessage), o3.groupMap.has(t3) && (o3.groupMap.get(t3).nextMessageSeq = e4.lastMessage.sequence + 1);
+ Ut2(t3) && n3.updateUnreadCountAndLastMsg(t3, e4.lastMessage), o3.groupMap.has(t3) && (o3.groupMap.get(t3).nextMessageSeq = e4.lastMessage.sequence + 1);
}));
} }, { key: "onNewGroupTips", value: function(e3) {
this._groupTipsHandler.onNewGroupTips(e3);
@@ -13324,11 +13331,11 @@ var chat = { exports: {} };
} }, { key: "onNewGroupSystemNotice", value: function(e3) {
this._groupSystemNoticeHandler.onNewGroupSystemNotice(e3);
} }, { key: "onMsgReadNotice", value: function(e3) {
- var s4 = this;
+ var a3 = this;
e3.dataList.forEach(function(e4) {
var i4, e4 = e4.elements.groupMessageReadNotice;
- N3(e4) || (i4 = s4.get(11), e4.forEach(function(e5) {
- var t3 = e5.groupID, n3 = e5.topicID, n3 = void 0 === n3 ? void 0 : n3, e5 = e5.lastMessageSeq, t3 = (M2.l("".concat(s4._n, ".onMsgReadNotice groupID:").concat(t3, " lastMessageSeq:").concat(e5)), "".concat(R2.CONV_GROUP).concat(t3)), o3 = true;
+ N3(e4) || (i4 = a3.get(11), e4.forEach(function(e5) {
+ var t3 = e5.groupID, n3 = e5.topicID, n3 = void 0 === n3 ? void 0 : n3, e5 = e5.lastMessageSeq, t3 = (M2.l("".concat(a3._n, ".onMsgReadNotice groupID:").concat(t3, " lastMessageSeq:").concat(e5)), "".concat(R2.CONV_GROUP).concat(t3)), o3 = true;
S2(n3) || (t3 = "".concat(R2.CONV_GROUP).concat(n3), o3 = false), i4.updateIsReadAfterReadReport({ conversationID: t3, lastMessageSeq: e5 }), i4.updateUnreadCount(t3, o3), i4.clearGroupAtInfoList(t3, o3);
}));
});
@@ -13347,7 +13354,7 @@ var chat = { exports: {} };
} }, { key: "deleteGroupSystemNotice", value: function(e3) {
this._groupSystemNoticeHandler.deleteGroupSystemNotice(e3);
} }, { key: "initGroupMap", value: function(e3) {
- this.groupMap.set(e3.groupID, new qo(e3));
+ this.groupMap.set(e3.groupID, new Yo(e3));
} }, { key: "clearGroupMap", value: function() {
this.groupMap.clear();
} }, { key: "deleteGroup", value: function(e3) {
@@ -13355,18 +13362,18 @@ var chat = { exports: {} };
} }, { key: "updateGroupMap", value: function(e3) {
var t3, n3 = this, o3 = this.get(11);
e3.forEach(function(e4) {
- t3 = e4.groupID, n3.groupMap.has(t3) ? n3.groupMap.get(t3).updateGroup(e4) : (n3.groupMap.set(t3, new qo(e4)), o3.deleteGroupRoamingInfo(t3));
+ t3 = e4.groupID, n3.groupMap.has(t3) ? n3.groupMap.get(t3).updateGroup(e4) : (n3.groupMap.set(t3, new Yo(e4)), o3.deleteGroupRoamingInfo(t3));
});
- var i4, s4 = this.getMyUserID(), a3 = F2(this.groupMap);
+ var i4, a3 = this.getMyUserID(), s4 = F2(this.groupMap);
try {
- for (a3.s(); !(i4 = a3.n()).done; ) {
+ for (s4.s(); !(i4 = s4.n()).done; ) {
var r4 = j2(i4.value, 2)[1];
- r4.selfInfo.userID = s4, "Owner" === r4.selfInfo.role && (r4.ownerID = s4);
+ r4.selfInfo.userID = a3, "Owner" === r4.selfInfo.role && (r4.ownerID = a3);
}
} catch (e4) {
- a3.e(e4);
+ s4.e(e4);
} finally {
- a3.f();
+ s4.f();
}
} }, { key: "getGroupMap", value: function() {
return this.groupMap;
@@ -13397,7 +13404,7 @@ var chat = { exports: {} };
} }, { key: "getMsgRemindType", value: function(e3) {
var n3 = this;
return !O2(e3) || 0 === e3.length || 0 === (e3 = e3.filter(function(e4) {
- return !At2(n3.getLocalGroupProfile(e4).type);
+ return !Gt2(n3.getLocalGroupProfile(e4).type);
})).length ? Promise.resolve() : (M2.l("".concat(this._n, ".getMsgRemindType groupIDList:").concat(e3)), this.getGroupProfileAdvance({ groupIDList: e3, responseFilter: { memberInfoFilter: ["MsgFlag"] } }).then(function(e4) {
var e4 = e4.data.successGroupList, t3 = n3.get(11);
e4.forEach(function(e5) {
@@ -13409,18 +13416,18 @@ var chat = { exports: {} };
} }, { key: "syncCommunityWithTopic", value: function() {
return this._commonGroupHandler.syncGroupList(true);
} }, { key: "getGroupProfile", value: function(t3) {
- var n3 = this, o3 = "".concat(this._n, ".").concat("getGroupProfile"), i4 = new P2("getGroupProfile"), s4 = t3.groupID, e3 = t3.groupCustomFieldFilter, e3 = (M2.l("".concat(o3, " groupID:").concat(s4)), { groupIDList: [s4], responseFilter: { groupBaseInfoFilter: d2(re2), groupCustomFieldFilter: e3, memberInfoFilter: [].concat(d2(ce2), ["NameCard"]) } });
+ var n3 = this, o3 = "".concat(this._n, ".").concat("getGroupProfile"), i4 = new P2("getGroupProfile"), a3 = t3.groupID, e3 = t3.groupCustomFieldFilter, e3 = (M2.l("".concat(o3, " groupID:").concat(a3)), { groupIDList: [a3], responseFilter: { groupBaseInfoFilter: d2(re2), groupCustomFieldFilter: e3, memberInfoFilter: [].concat(d2(ce2), ["NameCard"]) } });
return this.getGroupProfileAdvance(e3).then(function(e4) {
var e4 = e4.data, t4 = e4.successGroupList, e4 = e4.failureGroupList;
- return M2.l("".concat(o3, " ok")), 0 < e4.length ? E2(e4[0]) : ((e4 = At2(t4[0].type) && !n3.hasLocalGroup(s4) ? new qo(t4[0]) : (n3.updateGroupMap(t4), n3.getLocalGroupProfile(s4))).isSupportTopic || n3.get(11).updateConvGroupProfile([e4]), i4.setMessage("groupID:".concat(s4, " type:").concat(e4.type, " muteAllMembers:").concat(e4.muteAllMembers, " ownerID:").concat(e4.ownerID)).end(), T2({ group: e4 }));
+ return M2.l("".concat(o3, " ok")), 0 < e4.length ? E2(e4[0]) : ((e4 = Gt2(t4[0].type) && !n3.hasLocalGroup(a3) ? new Yo(t4[0]) : (n3.updateGroupMap(t4), n3.getLocalGroupProfile(a3))).isSupportTopic || n3.get(11).updateConvGroupProfile([e4]), i4.setMessage("groupID:".concat(a3, " type:").concat(e4.type, " muteAllMembers:").concat(e4.muteAllMembers, " ownerID:").concat(e4.ownerID)).end(), T2({ group: e4 }));
}).catch(function(e4) {
return i4.setError(e4).setMessage("groupID:".concat(t3.groupID)).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
});
} }, { key: "getGroupProfileAdvance", value: function(e3) {
- var t3, n3 = "".concat(this._n, ".getGroupProfileAdvance"), o3 = e3.groupIDList, i4 = (O2(o3) && 50 < o3.length && (this.warn("GetGroupProfileLimit"), o3.length = 50), []), s4 = [], o3 = (o3.forEach(function(e4) {
- (Ot2({ groupID: e4 }) ? s4 : i4).push(e4);
+ var t3, n3 = "".concat(this._n, ".getGroupProfileAdvance"), o3 = e3.groupIDList, i4 = (O2(o3) && 50 < o3.length && (this.warn("GetGroupProfileLimit"), o3.length = 50), []), a3 = [], o3 = (o3.forEach(function(e4) {
+ (Pt2({ groupID: e4 }) ? a3 : i4).push(e4);
}), []);
- return 0 < i4.length && (t3 = this._getGroupProfileAdvance(y2(y2({}, e3), {}, { groupIDList: i4 })), o3.push(t3)), 0 < s4.length && (t3 = this._getGroupProfileAdvance(y2(y2({}, e3), {}, { groupIDList: s4, relayFlag: 0 < i4.length })), o3.push(t3)), Promise.all(o3).then(function(e4) {
+ return 0 < i4.length && (t3 = this._getGroupProfileAdvance(y2(y2({}, e3), {}, { groupIDList: i4 })), o3.push(t3)), 0 < a3.length && (t3 = this._getGroupProfileAdvance(y2(y2({}, e3), {}, { groupIDList: a3, relayFlag: 0 < i4.length })), o3.push(t3)), Promise.all(o3).then(function(e4) {
var t4 = [], n4 = [];
return e4.forEach(function(e5) {
t4.push.apply(t4, d2(e5.successGroupList)), n4.push.apply(n4, d2(e5.failureGroupList));
@@ -13429,7 +13436,7 @@ var chat = { exports: {} };
return M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
});
} }, { key: "_getGroupProfileAdvance", value: function(t3) {
- var n3 = this, e3 = t3.relayFlag, o3 = void 0 !== e3 && e3, i4 = W2(t3, ni);
+ var n3 = this, e3 = t3.relayFlag, o3 = void 0 !== e3 && e3, i4 = W2(t3, ui);
return this.req({ P: G2.GET_GRP_PROFILE, data: i4 }).then(function(e4) {
M2.l("".concat(n3._n, "._getGroupProfileAdvance ok. options:"), i4);
e4 = e4.data.groups;
@@ -13441,40 +13448,40 @@ var chat = { exports: {} };
return new L2({ code: e5.errorCode, message: e5.errorInfo, data: { groupID: e5.groupID } });
}) };
}).catch(function(e4) {
- return o3 && Ot2({ groupID: t3.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : E2(e4);
+ return o3 && Pt2({ groupID: t3.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : E2(e4);
});
- } }, { key: "createGroup", value: function(a3) {
- var r4 = this, e3 = [R2.GRP_PUBLIC, R2.GRP_WORK, R2.GRP_MEETING, R2.GRP_AVCHATROOM, R2.GRP_COMMUNITY], c3 = "".concat(this._n, ".").concat("createGroup"), t3 = a3.type, n3 = a3.groupID;
- if (a3.name && false === this._filterProfanity("name", a3))
+ } }, { key: "createGroup", value: function(s4) {
+ var r4 = this, e3 = [R2.GRP_PUBLIC, R2.GRP_WORK, R2.GRP_MEETING, R2.GRP_AVCHATROOM, R2.GRP_COMMUNITY], c3 = "".concat(this._n, ".").concat("createGroup"), t3 = s4.type, n3 = s4.groupID;
+ if (s4.name && false === this._filterProfanity("name", s4))
return E2({ code: k2.PROFANITY_FOUND });
- if (a3.introduction && false === this._filterProfanity("introduction", a3))
+ if (s4.introduction && false === this._filterProfanity("introduction", s4))
return E2({ code: k2.PROFANITY_FOUND });
- if (a3.notification && false === this._filterProfanity("notification", a3))
+ if (s4.notification && false === this._filterProfanity("notification", s4))
return E2({ code: k2.PROFANITY_FOUND });
if (!e3.includes(t3))
return E2({ code: k2.ILLEGAL_GRP_TYPE });
- if (!Ot2({ type: t3 })) {
- if (!S2(n3) && Ot2({ groupID: n3 }))
+ if (!Pt2({ type: t3 })) {
+ if (!S2(n3) && Pt2({ groupID: n3 }))
return E2({ code: k2.ILLEGAL_GRP_ID });
- a3.isSupportTopic = void 0;
+ s4.isSupportTopic = void 0;
}
- if (At2(t3) && !N3(a3.memberList) && 0 < a3.memberList.length && (a3.memberList = void 0), this._canIUseJoinOption(t3) || N3(a3.joinOption) || (a3.joinOption = void 0), Ot2({ type: t3 })) {
- if (!S2(n3) && !Ot2({ groupID: n3 }))
+ if (Gt2(t3) && !N3(s4.memberList) && 0 < s4.memberList.length && (s4.memberList = void 0), this._canIUseJoinOption(t3) || N3(s4.joinOption) || (s4.joinOption = void 0), Pt2({ type: t3 })) {
+ if (!S2(n3) && !Pt2({ groupID: n3 }))
return E2({ code: k2.ILLEGAL_GRP_ID });
- a3.isSupportTopic = true === a3.isSupportTopic ? 1 : 0;
+ s4.isSupportTopic = true === s4.isSupportTopic ? 1 : 0;
}
- var u3 = new P2("createGroup"), l3 = (M2.l("".concat(c3, " options:"), a3), null), d3 = [];
- return this.req({ P: G2.CREATE_GRP, data: y2(y2({}, a3), {}, { ownerID: this.getMyUserID(), webPushFlag: 1 }) }).then(function(e4) {
- var t4, n4, o3, e4 = e4.data, i4 = e4.groupID, e4 = e4.overLimitUserIDList, s4 = void 0 === e4 ? [] : e4, e4 = (l3 = i4, d3 = s4, "groupType:".concat(a3.type, " groupID:").concat(i4, " overLimitUserIDList:").concat(s4));
- return u3.setMessage(e4).end(), M2.l("".concat(c3, " ok. ").concat(e4)), a3.type === R2.GRP_AVCHATROOM || a3.type === R2.GRP_COMMUNITY && 1 === a3.isSupportTopic || (S2(a3.memberList) || S2(s4) || (a3.memberList = a3.memberList.filter(function(e5) {
- return -1 === s4.indexOf(e5.userID);
- })), r4.updateGroupMap([y2(y2({}, a3), {}, { groupID: i4 })]), e4 = r4.get(2), o3 = "", t4 = 0, a3.type === R2.GRP_COMMUNITY ? (o3 = r4.isIntl() ? "Create Community" : "创建社群", t4 = 1) : o3 = r4.isIntl() ? "Create Group" : "创建群组", n4 = r4.get(4).getMyNick(), o3 = e4.createCustomMessage({ to: i4, conversationType: R2.CONV_GROUP, payload: { data: JSON.stringify({ businessID: "group_create", content: o3, cmd: t4, opUser: n4 || r4.getMyUserID(), version: 4 }) } }), e4.sendMessageInstance(o3), r4.emitGroupListUpdate()), r4.getGroupProfile({ groupID: i4 });
+ var u3 = new P2("createGroup"), l3 = (M2.l("".concat(c3, " options:"), s4), null), d3 = [];
+ return this.req({ P: G2.CREATE_GRP, data: y2(y2({}, s4), {}, { ownerID: this.getMyUserID(), webPushFlag: 1 }) }).then(function(e4) {
+ var t4, n4, o3, e4 = e4.data, i4 = e4.groupID, e4 = e4.overLimitUserIDList, a3 = void 0 === e4 ? [] : e4, e4 = (l3 = i4, d3 = a3, "groupType:".concat(s4.type, " groupID:").concat(i4, " overLimitUserIDList:").concat(a3));
+ return u3.setMessage(e4).end(), M2.l("".concat(c3, " ok. ").concat(e4)), s4.type === R2.GRP_AVCHATROOM || s4.type === R2.GRP_COMMUNITY && 1 === s4.isSupportTopic || (S2(s4.memberList) || S2(a3) || (s4.memberList = s4.memberList.filter(function(e5) {
+ return -1 === a3.indexOf(e5.userID);
+ })), r4.updateGroupMap([y2(y2({}, s4), {}, { groupID: i4 })]), e4 = r4.get(2), o3 = "", t4 = 0, s4.type === R2.GRP_COMMUNITY ? (o3 = r4.isIntl() ? "Create Community" : "创建社群", t4 = 1) : o3 = r4.isIntl() ? "Create Group" : "创建群组", n4 = r4.get(4).getMyNick(), o3 = e4.createCustomMessage({ to: i4, conversationType: R2.CONV_GROUP, payload: { data: JSON.stringify({ businessID: "group_create", content: o3, cmd: t4, opUser: n4 || r4.getMyUserID(), version: 4 }) } }), e4.sendMessageInstance(o3), r4.emitGroupListUpdate()), r4.getGroupProfile({ groupID: i4 });
}).then(function(e4) {
var e4 = e4.data.group, t4 = e4.selfInfo, n4 = t4.nameCard, t4 = t4.joinTime;
return e4.updateSelfInfo({ nameCard: n4, joinTime: t4, messageRemindType: R2.MSG_REMIND_ACPT_AND_NOTE, role: R2.GRP_MBR_ROLE_OWNER }), T2({ group: e4, overLimitUserIDList: d3 });
}).catch(function(e4) {
var t4;
- return u3.setMessage("groupType:".concat(a3.type)).setError(e4).end(), 10010 === e4.code || 10007 === e4.code ? (r4._silentlyGetGroupProfile(e4.code, l3), r4.updateGroupMap([y2(y2({}, a3), {}, { groupID: l3 })]), (t4 = r4.getLocalGroupProfile(l3)).selfInfo.role = R2.GRP_MBR_ROLE_OWNER, T2({ group: t4, overLimitUserIDList: d3 })) : (M2.e("".concat(c3, " failed. error:"), e4), E2(e4));
+ return u3.setMessage("groupType:".concat(s4.type)).setError(e4).end(), 10010 === e4.code || 10007 === e4.code ? (r4._silentlyGetGroupProfile(e4.code, l3), r4.updateGroupMap([y2(y2({}, s4), {}, { groupID: l3 })]), (t4 = r4.getLocalGroupProfile(l3)).selfInfo.role = R2.GRP_MBR_ROLE_OWNER, T2({ group: t4, overLimitUserIDList: d3 })) : (M2.e("".concat(c3, " failed. error:"), e4), E2(e4));
});
} }, { key: "dismissGroup", value: function(e3) {
var t3 = this, n3 = "".concat(this._n, ".").concat("dismissGroup"), o3 = "groupID:".concat(e3), i4 = new P2("dismissGroup");
@@ -13492,28 +13499,28 @@ var chat = { exports: {} };
}));
} }, { key: "_filterProfanity", value: function(e3, t3) {
var n3, o3 = this.get(29);
- return !o3 || (n3 = (o3 = o3.filterText(t3[e3], ae2)).isAllowedToSend, o3 = o3.modifiedText, true === n3 && (t3[e3] = o3, true));
+ return !o3 || (n3 = (o3 = o3.filterText(t3[e3], se2)).isAllowedToSend, o3 = o3.modifiedText, true === n3 && (t3[e3] = o3, true));
} }, { key: "joinGroup", value: function(t3) {
- var n3, o3 = this, i4 = t3.groupID, s4 = "".concat(this._n, ".joinGroup");
+ var n3, o3 = this, i4 = t3.groupID, a3 = "".concat(this._n, ".joinGroup");
return this.deleteUnjoinedAVChatRoom(i4), this.hasLocalGroup(i4) ? this.isLoggedIn() ? (n3 = new P2("applyJoinGroup"), this.getGroupProfile({ groupID: i4 }).then(function() {
return n3.setMessage("groupID:".concat(i4, " joinedStatus:").concat(R2.JOIN_STATUS_ALREADY_IN_GROUP)).end(), D2({ status: R2.JOIN_STATUS_ALREADY_IN_GROUP });
}).catch(function(e3) {
- return n3.setMessage("groupID:".concat(i4, " unjoined")).end(), M2.w("".concat(s4, " ").concat(i4, " was unjoined, now join!")), o3.groupMap.delete(i4), o3.applyJoinGroup(t3);
- })) : D2({ status: R2.JOIN_STATUS_ALREADY_IN_GROUP }) : (M2.l("".concat(s4, " groupID:").concat(i4)), this.isLoggedIn() ? this.applyJoinGroup(t3) : this._AVChatRoomHandler.joinWithoutAuth(t3));
+ return n3.setMessage("groupID:".concat(i4, " unjoined")).end(), M2.w("".concat(a3, " ").concat(i4, " was unjoined, now join!")), o3.groupMap.delete(i4), o3.applyJoinGroup(t3);
+ })) : D2({ status: R2.JOIN_STATUS_ALREADY_IN_GROUP }) : (M2.l("".concat(a3, " groupID:").concat(i4)), this.isLoggedIn() ? this.applyJoinGroup(t3) : this._AVChatRoomHandler.joinWithoutAuth(t3));
} }, { key: "applyJoinGroup", value: function(e3) {
var c3, u3, l3 = this, d3 = "".concat(this._n, ".").concat("applyJoinGroup"), p4 = e3.groupID;
return S2(e3.applyMessage) || false !== this._filterProfanity("applyMessage", e3) ? (c3 = new P2("applyJoinGroup"), e3 = y2({}, e3), (u3 = this.canIUse(g2.AV_HISTORY_MSG)) && (e3.historyMessageFlag = 1), this.get(11).deleteTopicRoamingInfo(p4), this.req({ P: G2.APPLY_JOIN_GRP, data: e3 }).then(function(e4) {
- var e4 = e4.data, t3 = e4.joinedStatus, n3 = e4.longPollingKey, o3 = e4.startSeq, i4 = e4.avChatRoomFlag, s4 = e4.avChatRoomKey, a3 = e4.messageList, e4 = "groupID:".concat(p4, " joinedStatus:").concat(t3, " longPollingKey:").concat(n3, " startSeq:").concat(o3) + " avChatRoomFlag:".concat(i4, " canGetAVChatRoomHistoryMsg:").concat(u3, ",") + " historyMsgCount:".concat(S2(a3) ? 0 : a3.length);
+ var e4 = e4.data, t3 = e4.joinedStatus, n3 = e4.longPollingKey, o3 = e4.startSeq, i4 = e4.avChatRoomFlag, a3 = e4.avChatRoomKey, s4 = e4.messageList, e4 = "groupID:".concat(p4, " joinedStatus:").concat(t3, " longPollingKey:").concat(n3, " startSeq:").concat(o3) + " avChatRoomFlag:".concat(i4, " canGetAVChatRoomHistoryMsg:").concat(u3, ",") + " historyMsgCount:".concat(S2(s4) ? 0 : s4.length);
switch (c3.setMessage(e4).end(), M2.l("".concat(d3, " ok. ").concat(e4)), t3) {
- case $e2:
- return T2({ status: $e2 });
- case Qe2:
+ case ot2:
+ return T2({ status: ot2 });
+ case nt2:
return l3.getGroupProfile({ groupID: p4 }).then(function(e5) {
e5 = e5.data.group;
- return l3._handleJoinResult({ group: e5, avChatRoomFlag: i4, longPollingKey: n3, startSeq: o3, avChatRoomKey: s4, messageList: a3 });
+ return l3._handleJoinResult({ group: e5, avChatRoomFlag: i4, longPollingKey: n3, startSeq: o3, avChatRoomKey: a3, messageList: s4 });
}).catch(function(e5) {
var t4;
- return 10010 === e5.code || 10007 === e5.code ? (l3._silentlyGetGroupProfile(e5.code, p4), t4 = new qo({ groupID: p4 }), l3.updateGroupMap([t4]), l3._handleJoinResult({ group: t4, avChatRoomFlag: i4, longPollingKey: n3, startSeq: o3, avChatRoomKey: s4, messageList: a3 })) : (M2.e("".concat(d3, " failed. error:"), e5), E2(e5));
+ return 10010 === e5.code || 10007 === e5.code ? (l3._silentlyGetGroupProfile(e5.code, p4), t4 = new Yo({ groupID: p4 }), l3.updateGroupMap([t4]), l3._handleJoinResult({ group: t4, avChatRoomFlag: i4, longPollingKey: n3, startSeq: o3, avChatRoomKey: a3, messageList: s4 })) : (M2.e("".concat(d3, " failed. error:"), e5), E2(e5));
});
default:
var r4 = new L2({ code: k2.JOIN_GRP_FAIL });
@@ -13523,14 +13530,14 @@ var chat = { exports: {} };
return c3.setMessage("groupID:".concat(p4)).setError(e4).end(), M2.e("".concat(d3, " failed. error:"), e4), E2(e4);
})) : E2({ code: k2.PROFANITY_FOUND });
} }, { key: "_handleJoinResult", value: function(e3) {
- var t3 = this, n3 = e3.group, o3 = e3.avChatRoomFlag, i4 = e3.longPollingKey, s4 = e3.startSeq, a3 = e3.avChatRoomKey, r4 = e3.messageList, c3 = n3.groupID;
- return 1 === o3 ? (this.get(11).setCompleted("".concat(R2.CONV_GROUP).concat(c3)), this._groupAttributesHandler.initGroupAttributesCache({ groupID: c3, avChatRoomKey: a3 }), this._groupCountersHandler.initGroupCountersCache({ groupID: c3, avChatRoomKey: a3 }), (e3 = N3(i4) ? this._AVChatRoomHandler.handleJoinResult({ group: n3 }) : this._AVChatRoomHandler.startRunLoop({ group: n3, longPollingKey: i4, startSeq: s4 })).then(function() {
+ var t3 = this, n3 = e3.group, o3 = e3.avChatRoomFlag, i4 = e3.longPollingKey, a3 = e3.startSeq, s4 = e3.avChatRoomKey, r4 = e3.messageList, c3 = n3.groupID;
+ return 1 === o3 ? (this.get(11).setCompleted("".concat(R2.CONV_GROUP).concat(c3)), this._groupAttributesHandler.initGroupAttributesCache({ groupID: c3, avChatRoomKey: s4 }), this._groupCountersHandler.initGroupCountersCache({ groupID: c3, avChatRoomKey: s4 }), (e3 = N3(i4) ? this._AVChatRoomHandler.handleJoinResult({ group: n3 }) : this._AVChatRoomHandler.startRunLoop({ group: n3, longPollingKey: i4, startSeq: a3 })).then(function() {
t3._onAVChatRoomHistoryMessage(r4, c3);
- }), e3) : (this.emitGroupListUpdate(true, false), T2({ status: Qe2, group: n3 }));
+ }), e3) : (this.emitGroupListUpdate(true, false), T2({ status: nt2, group: n3 }));
} }, { key: "quitGroup", value: function(e3) {
- var t3, n3 = this, o3 = "".concat(this._n, ".").concat("quitGroup"), i4 = "groupID:".concat(e3), s4 = (M2.l("".concat(o3, " ").concat(i4)), this.checkJoinedAVChatRoomByID(e3));
- return s4 || this.hasLocalGroup(e3) ? s4 && !this.isLoggedIn() ? (M2.l("".concat(o3, " anonymously ok. ").concat(i4)), this.deleteLocalGroupAndConversation(e3), this._AVChatRoomHandler.reset(e3), D2({ groupID: e3 })) : ((t3 = new P2("quitGroup")).setMessage(i4), this.req({ P: G2.QUIT_GRP, data: { groupID: e3 } }).then(function() {
- return t3.end(), M2.l("".concat(o3, " ok")), n3.deleteLocalGroupAndConversation(e3), s4 && n3._AVChatRoomHandler.reset(e3), n3._groupAttributesHandler.deleteLocalGroupAttributes(e3), T2({ groupID: e3 });
+ var t3, n3 = this, o3 = "".concat(this._n, ".").concat("quitGroup"), i4 = "groupID:".concat(e3), a3 = (M2.l("".concat(o3, " ").concat(i4)), this.checkJoinedAVChatRoomByID(e3));
+ return a3 || this.hasLocalGroup(e3) ? a3 && !this.isLoggedIn() ? (M2.l("".concat(o3, " anonymously ok. ").concat(i4)), this.deleteLocalGroupAndConversation(e3), this._AVChatRoomHandler.reset(e3), D2({ groupID: e3 })) : ((t3 = new P2("quitGroup")).setMessage(i4), this.req({ P: G2.QUIT_GRP, data: { groupID: e3 } }).then(function() {
+ return t3.end(), M2.l("".concat(o3, " ok")), n3.deleteLocalGroupAndConversation(e3), a3 && n3._AVChatRoomHandler.reset(e3), n3._groupAttributesHandler.deleteLocalGroupAttributes(e3), T2({ groupID: e3 });
}).catch(function(e4) {
return t3.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
})) : E2({ code: k2.MEMBER_NOT_IN_GRP });
@@ -13540,31 +13547,31 @@ var chat = { exports: {} };
e4 = e4.data.groupProfile;
if (0 !== e4[0].errorCode)
throw new L2({ code: e4[0].errorCode, message: e4[0].errorInfo });
- return o3.end(), M2.l("".concat(t3, " ok")), T2({ group: new qo(e4[0]) });
+ return o3.end(), M2.l("".concat(t3, " ok")), T2({ group: new Yo(e4[0]) });
}).catch(function(e4) {
return o3.setError(e4).end(), M2.w("".concat(t3, " failed. error:"), e4), E2(e4);
});
} }, { key: "changeGroupOwner", value: function(i4) {
- var s4, a3 = this, r4 = "".concat(this._n, ".").concat("changeGroupOwner");
- return this.hasLocalGroup(i4.groupID) && this.getLocalGroupProfile(i4.groupID).type === R2.GRP_AVCHATROOM ? E2({ code: k2.CANNOT_CHANGE_OWNER_IN_AV }) : i4.newOwnerID === this.getMyUserID() ? E2({ code: k2.CANNOT_CHANGE_OWNER_TO_SELF }) : ((s4 = new P2("changeGroupOwner")).setMessage("groupID:".concat(i4.groupID, " newOwnerID:").concat(i4.newOwnerID)), M2.l("".concat(r4, " groupID:").concat(i4.groupID)), this.req({ P: G2.CHANGE_GRP_OWNER, data: i4 }).then(function() {
- s4.end(), M2.l("".concat(r4, " ok"));
- var e3, t3 = i4.groupID, n3 = i4.newOwnerID, o3 = (a3.groupMap.get(t3).ownerID = n3, a3._groupMemberHandler.getLocalGroupMemberList(t3));
- return o3 instanceof Map && (e3 = o3.get(a3.getMyUserID()), N3(e3) || (e3.updateRole("Member"), a3.groupMap.get(t3).selfInfo.role = "Member"), e3 = o3.get(n3), N3(e3) || e3.updateRole("Owner")), a3.emitGroupListUpdate(true, false), T2({ group: a3.groupMap.get(t3) });
+ var a3, s4 = this, r4 = "".concat(this._n, ".").concat("changeGroupOwner");
+ return this.hasLocalGroup(i4.groupID) && this.getLocalGroupProfile(i4.groupID).type === R2.GRP_AVCHATROOM ? E2({ code: k2.CANNOT_CHANGE_OWNER_IN_AV }) : i4.newOwnerID === this.getMyUserID() ? E2({ code: k2.CANNOT_CHANGE_OWNER_TO_SELF }) : ((a3 = new P2("changeGroupOwner")).setMessage("groupID:".concat(i4.groupID, " newOwnerID:").concat(i4.newOwnerID)), M2.l("".concat(r4, " groupID:").concat(i4.groupID)), this.req({ P: G2.CHANGE_GRP_OWNER, data: i4 }).then(function() {
+ a3.end(), M2.l("".concat(r4, " ok"));
+ var e3, t3 = i4.groupID, n3 = i4.newOwnerID, o3 = (s4.groupMap.get(t3).ownerID = n3, s4._groupMemberHandler.getLocalGroupMemberList(t3));
+ return o3 instanceof Map && (e3 = o3.get(s4.getMyUserID()), N3(e3) || (e3.updateRole("Member"), s4.groupMap.get(t3).selfInfo.role = "Member"), e3 = o3.get(n3), N3(e3) || e3.updateRole("Owner")), s4.emitGroupListUpdate(true, false), T2({ group: s4.groupMap.get(t3) });
}).catch(function(e3) {
- return s4.setError(e3).end(), M2.e("".concat(r4, " failed. error:"), e3), E2(e3);
+ return a3.setError(e3).end(), M2.e("".concat(r4, " failed. error:"), e3), E2(e3);
}));
} }, { key: "getGroupApplicationList", value: function() {
return this._groupSystemNoticeHandler.getGroupApplicationList();
} }, { key: "handleGroupApplication", value: function(e3) {
- var t3, n3, o3, i4, s4, a3 = this, r4 = "".concat(this._n, ".").concat("handleGroupApplication"), c3 = e3.handleAction, u3 = e3.handleMessage, l3 = e3.message, d3 = e3.application, p4 = (l3 ? (t3 = l3.payload.operatorID, n3 = l3.payload.groupProfile.groupID, o3 = l3.payload.authentication, i4 = l3.payload.messageKey) : d3 && (t3 = d3.applicant, n3 = d3.groupID, o3 = d3.authentication, i4 = d3.messageKey), G2.HANDLE_GRP_APPLICATION), _3 = (d3 && 2 === d3.applicationType && (p4 = G2.HANDLE_INVITE_JOIN_GRP, s4 = d3.userID), new P2("handleGroupApplication"));
- return _3.setMessage("groupID:".concat(n3)), M2.l("".concat(r4, " groupID:").concat(n3)), this.req({ P: p4, data: { handleAction: c3, handleMessage: u3, applicant: t3, invitee: s4, groupID: n3, authentication: o3, messageKey: i4 } }).then(function() {
- return _3.end(), M2.l("".concat(r4, " ok")), l3 && a3._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), T2({ group: a3.getLocalGroupProfile(n3) });
+ var t3, n3, o3, i4, a3, s4 = this, r4 = "".concat(this._n, ".").concat("handleGroupApplication"), c3 = e3.handleAction, u3 = e3.handleMessage, l3 = e3.message, d3 = e3.application, p4 = (l3 ? (t3 = l3.payload.operatorID, n3 = l3.payload.groupProfile.groupID, o3 = l3.payload.authentication, i4 = l3.payload.messageKey) : d3 && (t3 = d3.applicant, n3 = d3.groupID, o3 = d3.authentication, i4 = d3.messageKey), G2.HANDLE_GRP_APPLICATION), _3 = (d3 && 2 === d3.applicationType && (p4 = G2.HANDLE_INVITE_JOIN_GRP, a3 = d3.userID), new P2("handleGroupApplication"));
+ return _3.setMessage("groupID:".concat(n3)), M2.l("".concat(r4, " groupID:").concat(n3)), this.req({ P: p4, data: { handleAction: c3, handleMessage: u3, applicant: t3, invitee: a3, groupID: n3, authentication: o3, messageKey: i4 } }).then(function() {
+ return _3.end(), M2.l("".concat(r4, " ok")), l3 && s4._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), T2({ group: s4.getLocalGroupProfile(n3) });
}).catch(function(e4) {
return _3.setError(e4).end(), M2.e("".concat(r4, " failed. error"), e4), E2(e4);
});
} }, { key: "handleGroupInvitation", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, ".").concat("handleGroupInvitation"), o3 = e3.message.payload, i4 = o3.groupProfile.groupID, s4 = o3.authentication, a3 = o3.messageKey, o3 = o3.operatorID, r4 = e3.handleAction, c3 = new P2("handleGroupInvitation");
- return c3.setMessage("groupID:".concat(i4, " inviter:").concat(o3, " handleAction:").concat(r4)), M2.l("".concat(n3, " groupID:").concat(i4, " inviter:").concat(o3, " handleAction:").concat(r4)), this.req({ P: G2.HANDLE_GRP_INVITATION, data: y2(y2({}, e3), {}, { inviter: o3, groupID: i4, authentication: s4, messageKey: a3 }) }).then(function() {
+ var t3 = this, n3 = "".concat(this._n, ".").concat("handleGroupInvitation"), o3 = e3.message.payload, i4 = o3.groupProfile.groupID, a3 = o3.authentication, s4 = o3.messageKey, o3 = o3.operatorID, r4 = e3.handleAction, c3 = new P2("handleGroupInvitation");
+ return c3.setMessage("groupID:".concat(i4, " inviter:").concat(o3, " handleAction:").concat(r4)), M2.l("".concat(n3, " groupID:").concat(i4, " inviter:").concat(o3, " handleAction:").concat(r4)), this.req({ P: G2.HANDLE_GRP_INVITATION, data: y2(y2({}, e3), {}, { inviter: o3, groupID: i4, authentication: a3, messageKey: s4 }) }).then(function() {
return c3.end(), M2.l("".concat(n3, " ok")), t3._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), T2({ group: t3.getLocalGroupProfile(i4) });
}).catch(function(e4) {
return c3.setError(e4).end(), M2.e("".concat(n3, " failed. error"), e4), E2(e4);
@@ -13594,42 +13601,42 @@ var chat = { exports: {} };
return this.groupMap.has(e3);
} }, { key: "deleteLocalGroupAndConversation", value: function(e3) {
var t3 = this.checkJoinedAVChatRoomByID(e3), n3 = (M2.l("".concat(this._n, ".deleteLocalGroupAndConversation groupID:").concat(e3, " isJoinedAVChatRoom:").concat(t3)), this.get(11)), o3 = "".concat(R2.CONV_GROUP).concat(e3);
- t3 && (this.stopMessageLongPolling({ groupID: e3 }), n3.deleteLocalConv(o3)), Ot2({ groupID: e3 }) && (t3 = this.getLocalGroupProfile(e3)) && true === t3.isSupportTopic && this.get(10).deleteTopicListInCommunity(e3), n3.clearUnreadCount(o3), n3.setCompleted(o3), this._deleteLocalGroup(e3), this._onlineMemberCountMap.delete(e3), this.emitGroupListUpdate(true, false);
+ t3 && (this.stopMessageLongPolling({ groupID: e3 }), n3.deleteLocalConv(o3)), Pt2({ groupID: e3 }) && (t3 = this.getLocalGroupProfile(e3)) && true === t3.isSupportTopic && this.get(10).deleteTopicListInCommunity(e3), n3.clearUnreadCount(o3), n3.setCompleted(o3), this._deleteLocalGroup(e3), this._onlineMemberCountMap.delete(e3), this.emitGroupListUpdate(true, false);
} }, { key: "_deleteLocalGroup", value: function(e3) {
this.groupMap.delete(e3), this._groupMemberHandler.deleteGroupMemberList(e3);
} }, { key: "sendMessage", value: function(e3, t3) {
return O2(e3._receiverList) && 0 < e3._receiverList.length && !this.canIUse(g2.MSG_TO_SPECIFIED_GRP_MBR) ? this.noUse("Targeted Group Message") : (e3 = this.createGroupMessagePack(e3, t3), this.req(e3));
} }, { key: "createGroupMessagePack", value: function(e3, t3) {
- var n3 = null, o3 = (t3 && t3.offlinePushInfo && (n3 = t3.offlinePushInfo), ""), i4 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (o3 = e3.cloudCustomData), []), s4 = (m2(t3) && m2(t3.messageControlInfo) && (s4 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, a3 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === s4 && i4.push("NoUnread"), true === a3 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), void 0), a3 = (O2(e3._receiverList) && 0 < e3._receiverList.length && (s4 = e3._receiverList, 50 < e3._receiverList.length) && (s4 = e3._receiverList.slice(0, 50), this.warn("ReceiverListLimit")), this.isOnlineMessage(e3, t3) ? 1 : 0), r4 = JSON.parse(JSON.stringify(e3.getElements())), c3 = this.get(17).getFileDNList(), u3 = e3.getGroupAtInfoList(), r4 = { fromAccount: this.getMyUserID(), groupID: e3.to, msgBody: ao(e3.type, r4, c3), cloudCustomData: o3, random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: e3.type !== R2.MSG_TEXT || S2(u3) ? void 0 : u3, onlineOnlyFlag: a3, clientTime: e3.clientTime, offlinePushInfo: Lo(n3), messageControlInfo: 0 == a3 ? i4 : void 0, needReadReceipt: true !== e3.needReadReceipt || this.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, receiverList: s4, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0, cmConfigID: e3._cmConfigID, forbidCallbackControl: kt2(t3) };
- return Nt2(e3.to) && (r4.groupID = jt2(e3.to), r4.topicID = e3.to), { P: G2.SEND_GRP_MSG, data: r4 };
+ var n3 = null, o3 = (t3 && t3.offlinePushInfo && (n3 = t3.offlinePushInfo), ""), i4 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (o3 = e3.cloudCustomData), []), a3 = (m2(t3) && m2(t3.messageControlInfo) && (a3 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, s4 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === a3 && i4.push("NoUnread"), true === s4 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), void 0), s4 = (O2(e3._receiverList) && 0 < e3._receiverList.length && (a3 = e3._receiverList, 50 < e3._receiverList.length) && (a3 = e3._receiverList.slice(0, 50), this.warn("ReceiverListLimit")), this.isOnlineMessage(e3, t3) ? 1 : 0), r4 = JSON.parse(JSON.stringify(e3.getElements())), c3 = this.get(17).getFileDNList(), u3 = e3.getGroupAtInfoList(), r4 = { fromAccount: this.getMyUserID(), groupID: e3.to, msgBody: uo(e3.type, r4, c3), cloudCustomData: o3, random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: e3.type !== R2.MSG_TEXT || S2(u3) ? void 0 : u3, onlineOnlyFlag: s4, clientTime: e3.clientTime, offlinePushInfo: Go(n3), messageControlInfo: 0 == s4 ? i4 : void 0, needReadReceipt: true !== e3.needReadReceipt || this.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, receiverList: a3, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0, cmConfigID: e3._cmConfigID, forbidCallbackControl: Ot2(t3) };
+ return Ut2(e3.to) && (r4.groupID = Xt2(e3.to), r4.topicID = e3.to), { P: G2.SEND_GRP_MSG, data: r4 };
} }, { key: "revokeMessage", value: function(e3) {
var t3 = { groupID: e3.to, msgSeqList: [{ msgSeq: e3.sequence }] };
- return Nt2(e3.to) && (t3.groupID = jt2(e3.to), t3.topicID = e3.to), this.req({ P: G2.REVOKE_GRP_MSG, data: t3 });
+ return Ut2(e3.to) && (t3.groupID = Xt2(e3.to), t3.topicID = e3.to), this.req({ P: G2.REVOKE_GRP_MSG, data: t3 });
} }, { key: "deleteMessage", value: function(e3) {
var t3 = e3.to, e3 = e3.keyList, e3 = (M2.l("".concat(this._n, ".deleteMessage groupID:").concat(t3, " count:").concat(e3.length)), { groupID: t3, deleter: this.getMyUserID(), keyList: e3 });
- return Nt2(t3) && (e3.groupID = jt2(t3), e3.topicID = t3), this.req({ P: G2.DEL_GRP_MSG, data: e3 });
+ return Ut2(t3) && (e3.groupID = Xt2(t3), e3.topicID = t3), this.req({ P: G2.DEL_GRP_MSG, data: e3 });
} }, { key: "modifyRemoteMessage", value: function(e3) {
- var t3 = e3.to, n3 = e3.sequence, o3 = e3.payload, i4 = e3.type, s4 = e3.version, s4 = void 0 === s4 ? 0 : s4, a3 = e3.cloudCustomData, e3 = e3._elements, r4 = t3, c3 = void 0, t3 = (Nt2(t3) && (r4 = jt2(t3), c3 = t3), void 0);
- return zt(i4) && (1 < e3.length && e3.splice(0, 1, { type: i4, content: o3 }), t3 = e3), this.req({ P: G2.MODIFY_GRP_MSG, data: { groupID: r4, topicID: c3, sequence: n3, version: s4, elements: t3, cloudCustomData: a3 } });
+ var t3 = e3.to, n3 = e3.sequence, o3 = e3.payload, i4 = e3.type, a3 = e3.version, a3 = void 0 === a3 ? 0 : a3, s4 = e3.cloudCustomData, e3 = e3._elements, r4 = t3, c3 = void 0, t3 = (Ut2(t3) && (r4 = Xt2(t3), c3 = t3), void 0);
+ return Qt2(i4) && (1 < e3.length && e3.splice(0, 1, { type: i4, content: o3 }), t3 = e3), this.req({ P: G2.MODIFY_GRP_MSG, data: { groupID: r4, topicID: c3, sequence: n3, version: a3, elements: t3, cloudCustomData: s4 } });
} }, { key: "getRoamingMessage", value: function(e3) {
var r4 = this, c3 = "".concat(this._n, ".").concat("getRoamingMessage"), u3 = e3.conversationID, l3 = e3.groupID, e3 = e3.sequence, d3 = new P2("getRoamingMessage"), p4 = 0, _3 = void 0;
- return Nt2(l3) && (l3 = jt2(_3 = l3)), this._computeLastSequence({ groupID: l3, topicID: _3, sequence: e3 }).then(function(e4) {
+ return Ut2(l3) && (l3 = Xt2(_3 = l3)), this._computeLastSequence({ groupID: l3, topicID: _3, sequence: e3 }).then(function(e4) {
return p4 = e4, M2.l("".concat(c3, " groupID:").concat(l3, " startSequence:").concat(p4)), r4.req({ P: G2.GET_GRP_ROAMING_MSG, data: { groupID: l3, count: 21, sequence: p4, topicID: _3 } });
}).then(function(e4) {
- var t3 = e4.data, n3 = t3.messageList, o3 = t3.complete, t3 = t3.invisibleSequenceList, t3 = void 0 === t3 ? [] : t3, e4 = e4.data.nextSequence, e4 = void 0 === e4 ? 0 : e4, i4 = (N3(n3) ? M2.l("".concat(c3, " ok. complete:").concat(o3, " nextSequence:").concat(e4, " but messageList is undefined!")) : M2.l("".concat(c3, " ok. complete:").concat(o3, " nextSequence:").concat(e4, " count:").concat(n3.length)), d3.setMessage("groupID:".concat(l3, " topicID:").concat(_3, " startSequence:").concat(p4, " complete:").concat(o3, " nextSequence:").concat(e4)).end(), r4.get(11)), s4 = [], a3 = [], n3 = (S2(n3) || (s4 = i4.onRoamingMessage(n3, u3, true, a3), i4.updateIsRead(u3), i4.patchConvLastMessage(u3)), 2 === o3 || e4 < 1);
- return n3 && (i4.setCompleted(u3), e4 = ""), M2.l("".concat(c3, " isPullingCompleted:").concat(n3, " nextReqID:").concat(e4, " storedMsgCount:").concat(s4.length) + " invisibleSeqCount:".concat(t3.length)), { nextReqID: e4 + "", storedMessageList: s4, assembledMessageList: a3, isPullingCompleted: n3 };
+ var t3 = e4.data, n3 = t3.messageList, o3 = t3.complete, t3 = t3.invisibleSequenceList, t3 = void 0 === t3 ? [] : t3, e4 = e4.data.nextSequence, e4 = void 0 === e4 ? 0 : e4, i4 = (N3(n3) ? M2.l("".concat(c3, " ok. complete:").concat(o3, " nextSequence:").concat(e4, " but messageList is undefined!")) : M2.l("".concat(c3, " ok. complete:").concat(o3, " nextSequence:").concat(e4, " count:").concat(n3.length)), d3.setMessage("groupID:".concat(l3, " topicID:").concat(_3, " startSequence:").concat(p4, " complete:").concat(o3, " nextSequence:").concat(e4)).end(), r4.get(11)), a3 = [], s4 = [], n3 = (S2(n3) || (a3 = i4.onRoamingMessage(n3, u3, true, s4), i4.updateIsRead(u3), i4.patchConvLastMessage(u3)), 2 === o3 || e4 < 1);
+ return n3 && (i4.setCompleted(u3), e4 = ""), M2.l("".concat(c3, " isPullingCompleted:").concat(n3, " nextReqID:").concat(e4, " storedMsgCount:").concat(a3.length) + " invisibleSeqCount:".concat(t3.length)), { nextReqID: e4 + "", storedMessageList: a3, assembledMessageList: s4, isPullingCompleted: n3 };
}).catch(function(e4) {
return d3.setError(e4).setMessage("groupID:".concat(l3, " topicID:").concat(_3, " startSequence:").concat(p4)).end(), M2.w("".concat(c3, " failed. error:"), e4), E2(e4);
});
} }, { key: "_getGroupIDOfMessage", value: function(e3) {
return e3.conversationID.replace(R2.CONV_GROUP, "");
} }, { key: "getReadReceiptList", value: function(n3) {
- var t3, o3 = "".concat(this._n, ".").concat("getReadReceiptList"), e3 = this._getGroupIDOfMessage(n3[0]), i4 = this.getMyUserID(), s4 = n3.filter(function(e4) {
+ var t3, o3 = "".concat(this._n, ".").concat("getReadReceiptList"), e3 = this._getGroupIDOfMessage(n3[0]), i4 = this.getMyUserID(), a3 = n3.filter(function(e4) {
return e4.from === i4 && true === e4.needReadReceipt;
}).map(function(e4) {
return { sequence: e4.sequence };
});
- return M2.l("".concat(o3, " groupID:").concat(e3, " sequenceList:").concat(JSON.stringify(s4))), 0 === s4.length ? D2({ messageList: n3 }) : ((t3 = new P2("getReadReceiptList")).setMessage("groupID:".concat(e3)), this.req({ P: G2.GET_READ_RECEIPT, data: { groupID: e3, sequenceList: s4 } }).then(function(e4) {
+ return M2.l("".concat(o3, " groupID:").concat(e3, " sequenceList:").concat(JSON.stringify(a3))), 0 === a3.length ? D2({ messageList: n3 }) : ((t3 = new P2("getReadReceiptList")).setMessage("groupID:".concat(e3)), this.req({ P: G2.GET_READ_RECEIPT, data: { groupID: e3, sequenceList: a3 } }).then(function(e4) {
t3.end(), M2.l("".concat(o3, " ok"));
e4 = e4.data.readReceiptList;
return O2(e4) && e4.forEach(function(t4) {
@@ -13652,11 +13659,11 @@ var chat = { exports: {} };
return o3.setError(e4).end(), M2.w("".concat(t3, " failed. error:"), e4), E2(e4);
}));
} }, { key: "getReadReceiptDetail", value: function(e3) {
- var i4 = this, t3 = e3.message, n3 = e3.filter, o3 = e3.cursor, e3 = e3.count, s4 = this._getGroupIDOfMessage(t3), a3 = t3.ID, t3 = t3.sequence, r4 = "".concat(this._n, ".").concat("getReadReceiptDetail"), c3 = this._receiptDetailCompleteMap.get(a3) || false, u3 = 0 !== n3 && 1 !== n3 ? 0 : n3, n3 = C2(o3) ? o3 : "", o3 = !A2(e3) || e3 <= 0 || 100 <= e3 ? 100 : e3, e3 = "groupID:".concat(s4, " sequence:").concat(t3, " cursor:").concat(n3, " filter:").concat(u3, " completeFlag:").concat(c3), l3 = (M2.l("".concat(r4, " ").concat(e3)), { cursor: "", isCompleted: false, messageID: a3, unreadUserIDList: [], readUserIDList: [] }), d3 = new P2("getReadReceiptDetail");
- return d3.setMessage(e3), this.req({ P: G2.GET_READ_RECEIPT_DETAIL, data: { groupID: s4, sequence: t3, flag: u3, cursor: n3, count: o3 } }).then(function(e4) {
+ var i4 = this, t3 = e3.message, n3 = e3.filter, o3 = e3.cursor, e3 = e3.count, a3 = this._getGroupIDOfMessage(t3), s4 = t3.ID, t3 = t3.sequence, r4 = "".concat(this._n, ".").concat("getReadReceiptDetail"), c3 = this._receiptDetailCompleteMap.get(s4) || false, u3 = 0 !== n3 && 1 !== n3 ? 0 : n3, n3 = C2(o3) ? o3 : "", o3 = !A2(e3) || e3 <= 0 || 100 <= e3 ? 100 : e3, e3 = "groupID:".concat(a3, " sequence:").concat(t3, " cursor:").concat(n3, " filter:").concat(u3, " completeFlag:").concat(c3), l3 = (M2.l("".concat(r4, " ").concat(e3)), { cursor: "", isCompleted: false, messageID: s4, unreadUserIDList: [], readUserIDList: [] }), d3 = new P2("getReadReceiptDetail");
+ return d3.setMessage(e3), this.req({ P: G2.GET_READ_RECEIPT_DETAIL, data: { groupID: a3, sequence: t3, flag: u3, cursor: n3, count: o3 } }).then(function(e4) {
d3.end();
var e4 = e4.data, t4 = e4.cursor, n4 = e4.isCompleted, o4 = e4.unreadUserIDList, e4 = e4.readUserIDList;
- return l3.cursor = t4, 1 === n4 && (l3.isCompleted = true, i4._receiptDetailCompleteMap.set(a3, true)), 0 === u3 ? l3.readUserIDList = e4.map(function(e5) {
+ return l3.cursor = t4, 1 === n4 && (l3.isCompleted = true, i4._receiptDetailCompleteMap.set(s4, true)), 0 === u3 ? l3.readUserIDList = e4.map(function(e5) {
return e5.userID;
}) : 1 === u3 && (l3.unreadUserIDList = o4.map(function(e5) {
return e5.userID;
@@ -13674,12 +13681,12 @@ var chat = { exports: {} };
});
} }, { key: "getRoamingMessagesHopping", value: function(c3) {
var u3 = this, l3 = "".concat(this._n, ".").concat("getRoamingMessagesHopping"), t3 = c3.groupID, n3 = c3.count, d3 = c3.sequence, p4 = c3.direction, o3 = void 0;
- return N3(d3) && 1 === p4 ? D2({ messageList: [], isCompleted: true, nextMessageSeq: "" }) : (Nt2(t3) && (t3 = jt2(o3 = t3)), this._computeReqSeqHopping({ groupID: t3, topicID: o3, sequence: d3 }).then(function(e3) {
+ return N3(d3) && 1 === p4 ? D2({ messageList: [], isCompleted: true, nextMessageSeq: "" }) : (Ut2(t3) && (t3 = Xt2(o3 = t3)), this._computeReqSeqHopping({ groupID: t3, topicID: o3, sequence: d3 }).then(function(e3) {
N3(d3) || 1 !== p4 || (e3 = d3 + n3 - 1);
- var a3 = "".concat(o3 ? "topicID:".concat(o3) : "groupID:".concat(t3), " sequence:").concat(d3, " reqSeq:").concat(e3, " direction:").concat(p4), r4 = (M2.l("".concat(l3, " ").concat(a3)), new P2("getRoamingMessagesHopping"));
+ var s4 = "".concat(o3 ? "topicID:".concat(o3) : "groupID:".concat(t3), " sequence:").concat(d3, " reqSeq:").concat(e3, " direction:").concat(p4), r4 = (M2.l("".concat(l3, " ").concat(s4)), new P2("getRoamingMessagesHopping"));
return u3.req({ P: G2.GET_GRP_ROAMING_MSG, data: { groupID: t3, topicID: o3, count: n3, sequence: e3 } }).then(function(e4) {
- var e4 = e4.data, t4 = e4.messageList, t4 = void 0 === t4 ? [] : t4, n4 = e4.complete, o4 = e4.nextSequence, o4 = void 0 === o4 ? 0 : o4, e4 = e4.invisibleSequenceList, e4 = void 0 === e4 ? [] : e4, i4 = "complete:".concat(n4, " nextSequence:").concat(o4, " remoteMsgCount:").concat(t4.length, " invisibleSequenceList:").concat(e4), i4 = (r4.setMessage("".concat(a3, " ").concat(i4)).end(), M2.l("".concat(l3, " ok. ").concat(i4)), "".concat(R2.CONV_GROUP).concat(c3.groupID)), s4 = u3.get(11), i4 = s4.onRoamingMessage(t4, i4, false), t4 = u3._computeResult({ groupID: c3.groupID, direction: p4, sequence: d3, remoteMessageList: t4, processedMessageList: i4, complete: n4, nextSequence: o4, invisibleSequenceList: e4 });
- return s4.storeHoppingMessageList(t4.messageList), T2(t4);
+ var e4 = e4.data, t4 = e4.messageList, t4 = void 0 === t4 ? [] : t4, n4 = e4.complete, o4 = e4.nextSequence, o4 = void 0 === o4 ? 0 : o4, e4 = e4.invisibleSequenceList, e4 = void 0 === e4 ? [] : e4, i4 = "complete:".concat(n4, " nextSequence:").concat(o4, " remoteMsgCount:").concat(t4.length, " invisibleSequenceList:").concat(e4), i4 = (r4.setMessage("".concat(s4, " ").concat(i4)).end(), M2.l("".concat(l3, " ok. ").concat(i4)), "".concat(R2.CONV_GROUP).concat(c3.groupID)), a3 = u3.get(11), i4 = a3.onRoamingMessage(t4, i4, false), t4 = u3._computeResult({ groupID: c3.groupID, direction: p4, sequence: d3, remoteMessageList: t4, processedMessageList: i4, complete: n4, nextSequence: o4, invisibleSequenceList: e4 });
+ return a3.storeHoppingMessageList(t4.messageList), T2(t4);
}).catch(function(e4) {
return r4.setError(e4).setMessage("groupID:".concat(t3, " sequence:").concat(d3, " count:").concat(n3)).end(), M2.w("".concat(l3, " failed. error:"), e4), E2(e4);
});
@@ -13693,49 +13700,49 @@ var chat = { exports: {} };
return E2(e4);
}) : Promise.resolve(0);
} }, { key: "_computeResult", value: function(e3) {
- var t3 = { messageList: [], isCompleted: false, nextMessageSeq: "" }, n3 = e3.groupID, o3 = e3.direction, i4 = e3.sequence, s4 = e3.remoteMessageList, s4 = void 0 === s4 ? [] : s4, a3 = e3.processedMessageList, a3 = void 0 === a3 ? [] : a3, r4 = e3.complete, c3 = e3.nextSequence, e3 = e3.invisibleSequenceList;
+ var t3 = { messageList: [], isCompleted: false, nextMessageSeq: "" }, n3 = e3.groupID, o3 = e3.direction, i4 = e3.sequence, a3 = e3.remoteMessageList, a3 = void 0 === a3 ? [] : a3, s4 = e3.processedMessageList, s4 = void 0 === s4 ? [] : s4, r4 = e3.complete, c3 = e3.nextSequence, e3 = e3.invisibleSequenceList;
if (0 === o3)
- return t3.nextMessageSeq = c3, (2 === r4 || c3 < 1) && (t3.isCompleted = true, t3.nextMessageSeq = ""), t3.messageList = a3, t3;
+ return t3.nextMessageSeq = c3, (2 === r4 || c3 < 1) && (t3.isCompleted = true, t3.nextMessageSeq = ""), t3.messageList = s4, t3;
if (1 === o3) {
- if (S2(s4)) {
+ if (S2(a3)) {
if (S2(e3))
return t3.isCompleted = true, t3.nextMessageSeq = "", t3;
t3.nextMessageSeq = e3[0] + 1;
} else {
- r4 = s4[0].sequence, c3 = e3[0] || 0;
+ r4 = a3[0].sequence, c3 = e3[0] || 0;
t3.nextMessageSeq = c3 < r4 ? r4 + 1 : c3 + 1;
}
- return a3.forEach(function(e4) {
+ return s4.forEach(function(e4) {
e4.sequence >= i4 && t3.messageList.push(e4);
- }), (Ot2({ groupID: n3 }) || Nt2(n3)) && 0 === t3.messageList.length && s4[0].sequence < i4 && (t3.isCompleted = true, t3.nextMessageSeq = ""), t3;
+ }), (Pt2({ groupID: n3 }) || Ut2(n3)) && 0 === t3.messageList.length && a3[0].sequence < i4 && (t3.isCompleted = true, t3.nextMessageSeq = ""), t3;
}
} }, { key: "setMessageRead", value: function(e3) {
- var o3 = this, i4 = e3.conversationID, s4 = e3.lastMessageSeq, a3 = "".concat(this._n, ".").concat("setMessageRead"), e3 = "convID:".concat(i4, " lastMessageSeq:").concat(s4), r4 = (M2.l("".concat(a3, " ").concat(e3)), A2(s4) || this.warn("DoNotModifyLastSeq"), new P2("setMessageRead")), c3 = (r4.setMessage(e3), i4.replace(R2.CONV_GROUP, "")), u3 = void 0;
- return Nt2(c3) && (c3 = jt2(u3 = c3)), this.req({ P: G2.SET_GRP_MSG_READ, data: { groupID: c3, topicID: u3, messageReadSeq: s4 } }).then(function() {
- r4.end(), M2.l("".concat(a3, " ok"));
- var e4, t3 = o3.get(11), n3 = (t3.updateIsReadAfterReadReport({ conversationID: i4, lastMessageSeq: s4 }), true);
- return !N3(u3) && (n3 = false, e4 = o3.get(10).getLocalTopic(c3, u3)) && e4.updateSelfInfo({ readedSequence: s4 }), t3.updateUnreadCount(i4, n3), T2();
+ var o3 = this, i4 = e3.conversationID, a3 = e3.lastMessageSeq, s4 = "".concat(this._n, ".").concat("setMessageRead"), e3 = "convID:".concat(i4, " lastMessageSeq:").concat(a3), r4 = (M2.l("".concat(s4, " ").concat(e3)), A2(a3) || this.warn("DoNotModifyLastSeq"), new P2("setMessageRead")), c3 = (r4.setMessage(e3), i4.replace(R2.CONV_GROUP, "")), u3 = void 0;
+ return Ut2(c3) && (c3 = Xt2(u3 = c3)), this.req({ P: G2.SET_GRP_MSG_READ, data: { groupID: c3, topicID: u3, messageReadSeq: a3 } }).then(function() {
+ r4.end(), M2.l("".concat(s4, " ok"));
+ var e4, t3 = o3.get(11), n3 = (t3.updateIsReadAfterReadReport({ conversationID: i4, lastMessageSeq: a3 }), true);
+ return !N3(u3) && (n3 = false, e4 = o3.get(10).getLocalTopic(c3, u3)) && e4.updateSelfInfo({ readedSequence: a3 }), t3.updateUnreadCount(i4, n3), T2();
}).catch(function(e4) {
- return r4.setError(e4).end(), M2.l("".concat(a3, " failed. error:"), e4), E2(e4);
+ return r4.setError(e4).end(), M2.l("".concat(s4, " failed. error:"), e4), E2(e4);
});
} }, { key: "_computeLastSequence", value: function(e3) {
var t3 = e3.groupID, n3 = e3.topicID, n3 = void 0 === n3 ? void 0 : n3, e3 = e3.sequence;
return 0 < e3 ? Promise.resolve(e3) : N3(n3) ? this.getGroupLastSequence(t3) : Promise.resolve(0);
} }, { key: "getGroupLastSequence", value: function(e3) {
- var t3 = "".concat(this._n, ".").concat("getGroupLastSequence"), n3 = new P2("getGroupLastSequence"), o3 = 0, i4 = "", s4 = "groupID:".concat(e3);
+ var t3 = "".concat(this._n, ".").concat("getGroupLastSequence"), n3 = new P2("getGroupLastSequence"), o3 = 0, i4 = "", a3 = "groupID:".concat(e3);
if (this.hasLocalGroup(e3)) {
- var a3 = this.getLocalGroupProfile(e3), r4 = a3.lastMessage;
+ var s4 = this.getLocalGroupProfile(e3), r4 = s4.lastMessage;
if (0 < r4.lastSequence && false === r4.onlineOnlyFlag)
- return o3 = r4.lastSequence, i4 = "".concat(s4, ", ").concat(o3, " from group.lastMessage.lastSequence"), M2.l("".concat(t3, " ").concat(i4)), n3.setMessage(i4).end(), Promise.resolve(o3);
- if (1 < a3.nextMessageSeq)
- return o3 = a3.nextMessageSeq - 1, i4 = "".concat(s4, ", ").concat(o3, " from group.nextMessageSeq"), M2.l("".concat(t3, " ").concat(i4)), n3.setMessage(i4).end(), Promise.resolve(o3);
+ return o3 = r4.lastSequence, i4 = "".concat(a3, ", ").concat(o3, " from group.lastMessage.lastSequence"), M2.l("".concat(t3, " ").concat(i4)), n3.setMessage(i4).end(), Promise.resolve(o3);
+ if (1 < s4.nextMessageSeq)
+ return o3 = s4.nextMessageSeq - 1, i4 = "".concat(a3, ", ").concat(o3, " from group.nextMessageSeq"), M2.l("".concat(t3, " ").concat(i4)), n3.setMessage(i4).end(), Promise.resolve(o3);
}
r4 = this.get(11).getLocalConversation("GROUP".concat(e3));
- return r4 && r4.lastMessage.lastSequence && false === r4.lastMessage.onlineOnlyFlag ? (o3 = r4.lastMessage.lastSequence, i4 = "".concat(s4, ", ").concat(o3, " from conversation.lastMessage.lastSequence"), M2.l("".concat(t3, " ").concat(i4)), n3.setMessage(i4).end(), Promise.resolve(o3)) : this.getGroupProfileAdvance({ groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }).then(function(e4) {
+ return r4 && r4.lastMessage.lastSequence && false === r4.lastMessage.onlineOnlyFlag ? (o3 = r4.lastMessage.lastSequence, i4 = "".concat(a3, ", ").concat(o3, " from conversation.lastMessage.lastSequence"), M2.l("".concat(t3, " ").concat(i4)), n3.setMessage(i4).end(), Promise.resolve(o3)) : this.getGroupProfileAdvance({ groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }).then(function(e4) {
e4 = e4.data.successGroupList;
- return S2(e4) ? M2.w("".concat(t3, " ").concat(s4, ", empty successGroupList")) : (o3 = e4[0].nextMessageSeq - 1, i4 = "".concat(s4, ", ").concat(o3, " from remote"), M2.l("".concat(t3, " ").concat(i4))), n3.setMessage(i4).end(), o3;
+ return S2(e4) ? M2.w("".concat(t3, " ").concat(a3, ", empty successGroupList")) : (o3 = e4[0].nextMessageSeq - 1, i4 = "".concat(a3, ", ").concat(o3, " from remote"), M2.l("".concat(t3, " ").concat(i4))), n3.setMessage(i4).end(), o3;
}).catch(function(e4) {
- return n3.setError(e4).setMessage(s4).end(), M2.w("".concat(t3, " failed. error:"), e4), E2(e4);
+ return n3.setError(e4).setMessage(a3).end(), M2.w("".concat(t3, " failed. error:"), e4), E2(e4);
});
} }, { key: "isMessageFromOrToAVChatroom", value: function(e3) {
return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3);
@@ -13788,20 +13795,20 @@ var chat = { exports: {} };
var n3 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1;
return M2.l("".concat(this._n, ".modifyMsgExts operateType:").concat(n3)), this.req({ P: G2.MODIFY_GRP_MSG_EXT, data: { groupID: e3.to, messageSequence: e3.sequence, extensionList: t3, operateType: n3 } });
} }, { key: "_genNotifyReqList", value: function(e3) {
- for (var t3, n3, o3, i4, s4 = [], a3 = 0, r4 = e3.length; a3 < r4; a3++)
- t3 = e3[a3], i4 = this.getLocalGroupProfile(t3).type, n3 = this._getGroupLastRevokedTime(t3), o3 = 1e3 * He2(), i4 = { notifyType: 1, limit: 20, type: Ot2({ type: i4, groupID: t3 }) ? R2.GRP_COMMUNITY : void 0, groupID: t3, beginTime: n3, endTime: o3 }, s4.push(i4);
- return s4;
+ for (var t3, n3, o3, i4, a3 = [], s4 = 0, r4 = e3.length; s4 < r4; s4++)
+ t3 = e3[s4], i4 = this.getLocalGroupProfile(t3).type, n3 = this._getGroupLastRevokedTime(t3), o3 = 1e3 * Ye2(), i4 = { notifyType: 1, limit: 20, type: Pt2({ type: i4, groupID: t3 }) ? R2.GRP_COMMUNITY : void 0, groupID: t3, beginTime: n3, endTime: o3 }, a3.push(i4);
+ return a3;
} }, { key: "getNotice", value: function(e3) {
var r4 = this, t3 = "".concat(this._n, ".getNotice"), e3 = e3.filter(function(e4) {
var t4;
- return !!r4.hasLocalGroup(e4) && (t4 = (e4 = r4.getLocalGroupProfile(e4)).type, e4 = e4.isSupportTopic, !At2(t4)) && !e4;
+ return !!r4.hasLocalGroup(e4) && (t4 = (e4 = r4.getLocalGroupProfile(e4)).type, e4 = e4.isSupportTopic, !Gt2(t4)) && !e4;
});
0 !== e3.length && (M2.l("".concat(t3, " list:").concat(e3)), this.req({ P: G2.GET_GRP_NOTIFY, data: { notifyReqList: this._genNotifyReqList(e3) } }).then(function(e4) {
- var i4, s4, e4 = e4.data.notifyRspList, a3 = [];
- O2(e4) && (i4 = { dataList: [] }, s4 = "".concat(t3, " ok."), e4.forEach(function(e5) {
+ var i4, a3, e4 = e4.data.notifyRspList, s4 = [];
+ O2(e4) && (i4 = { dataList: [] }, a3 = "".concat(t3, " ok."), e4.forEach(function(e5) {
var t4 = e5.nextRevokedTime, n3 = e5.groupID, o3 = e5.notifyList;
- s4 += " groupID:".concat(n3, " nextRevokedTime:").concat(t4, " count:").concat(o3.length, "\n"), i4.dataList.push({ elements: { revokedInfos: r4._genRevokedInfos(e5) } }), 0 !== t4 ? (r4._setGroupLastRevokedTime(n3, t4), a3.push(n3)) : r4._setGroupLastRevokedTime(n3, 1e3 * He2());
- }), M2.l(s4), r4.onMsgRevoked(i4, false)), 0 < a3.length && r4.getNotice(a3);
+ a3 += " groupID:".concat(n3, " nextRevokedTime:").concat(t4, " count:").concat(o3.length, "\n"), i4.dataList.push({ elements: { revokedInfos: r4._genRevokedInfos(e5) } }), 0 !== t4 ? (r4._setGroupLastRevokedTime(n3, t4), s4.push(n3)) : r4._setGroupLastRevokedTime(n3, 1e3 * Ye2());
+ }), M2.l(a3), r4.onMsgRevoked(i4, false)), 0 < s4.length && r4.getNotice(s4);
}).catch(function(e4) {
M2.e("".concat(t3, " failed. error:"), e4);
}));
@@ -13850,9 +13857,9 @@ var chat = { exports: {} };
this._AVChatRoomHandler.restartPolling();
} }, { key: "getPollingTimerID", value: function(e3) {
var t3;
- return e3 && (t3 = this.getLocalGroupProfile(e3)) && At2(t3.type) ? this._AVChatRoomHandler.getPollingTimerID(e3) : -1;
+ return e3 && (t3 = this.getLocalGroupProfile(e3)) && Gt2(t3.type) ? this._AVChatRoomHandler.getPollingTimerID(e3) : -1;
} }, { key: "_canIUseJoinOption", value: function(e3) {
- return e3 === R2.GRP_PUBLIC || Ot2({ type: e3 });
+ return e3 === R2.GRP_PUBLIC || Pt2({ type: e3 });
} }, { key: "_silentlyGetGroupProfile", value: function(e3, t3) {
var n3 = setTimeout(this.getGroupProfile.bind(this, { groupID: t3 }), 3e3);
this._timeoutIDs.push(n3), M2.l("".concat(this._n, "._silentlyGetGroupProfile errorCode:").concat(e3, " groupID:").concat(t3, " timeoutIDs:").concat(this._timeoutIDs));
@@ -13863,30 +13870,30 @@ var chat = { exports: {} };
} }, { key: "startMessageLongPolling", value: function(e3) {
var t3, n3 = e3.groupID, o3 = e3.longPollingKey, e3 = e3.longPollingSequence, e3 = void 0 === e3 ? 1 : e3, i4 = this.get(12).isUnlimitedAVChatRoom();
if (!S2(o3))
- return this._AVChatRoomHandler.hasPollingInstance(n3) && this.stopMessageLongPolling({ groupID: n3 }), t3 = this._AVChatRoomHandler.getJoinedLiveList(), !i4 && 0 < t3.length && this.stopMessageLongPolling({ groupID: t3[0] }), i4 = new qo({ groupID: n3, type: R2.GRP_LIVE }), M2.l("".concat(this._n, ".startMessageLongPolling groupID:").concat(n3, " longPollingKey:").concat(o3, " longPollingSequence:").concat(e3)), this._AVChatRoomHandler.startRunLoop({ group: i4, longPollingKey: o3, startSeq: e3 });
+ return this._AVChatRoomHandler.hasPollingInstance(n3) && this.stopMessageLongPolling({ groupID: n3 }), t3 = this._AVChatRoomHandler.getJoinedLiveList(), !i4 && 0 < t3.length && this.stopMessageLongPolling({ groupID: t3[0] }), i4 = new Yo({ groupID: n3, type: R2.GRP_LIVE }), M2.l("".concat(this._n, ".startMessageLongPolling groupID:").concat(n3, " longPollingKey:").concat(o3, " longPollingSequence:").concat(e3)), this._AVChatRoomHandler.startRunLoop({ group: i4, longPollingKey: o3, startSeq: e3 });
index.__f__("warn", "at node_modules/@tencentcloud/chat/index.js:1", "".concat(this._n, ".startMessageLongPolling longPollingKey is empty."));
} }, { key: "stopMessageLongPolling", value: function(e3) {
var e3 = e3.groupID, t3 = this.get(11);
return this._AVChatRoomHandler.reset(e3), this._deleteLocalGroup(e3), t3.deleteLocalConv("".concat(R2.CONV_GROUP).concat(e3)), M2.l("".concat(this._n, ".stopMessageLongPolling ok, groupID:").concat(e3)), D2({ groupID: e3 });
} }, { key: "reset", value: function() {
this.groupMap.clear(), this._unjoinedAVChatRoomList.clear(), this._receiptDetailCompleteMap.clear(), this._onlineMemberCountMap.clear(), this._commonGroupHandler.reset(), this._groupSystemNoticeHandler.reset(), this._groupTipsHandler.reset(), this._groupAttributesHandler.reset(), this._groupCountersHandler.reset(), this._AVChatRoomHandler.reset(), this._groupMemberHandler.reset(), this._clearTimeoutIDs();
- } }])), ii = ["topicID", "topicName", "avatar", "introduction", "notification", "unreadCount", "muteAllMembers", "customData", "groupAtInfoList", "nextMessageSeq", "selfInfo"], si = e2(function e3(t3, n3) {
- p3(this, e3), this.topicID = "", this.topicName = "", this.avatar = "", this.introduction = "", this.notification = "", this.unreadCount = 0, this.muteAllMembers = false, this.customData = "", this.groupAtInfoList = [], this.nextMessageSeq = 0, this.lastMessage = No(t3.lastMessage, n3), this.selfInfo = { muteTime: 0, readedSequence: 0, messageRemindType: "", excludedUnreadSequenceList: void 0 }, this._initTopic(t3);
+ } }])), di = ["topicID", "topicName", "avatar", "introduction", "notification", "unreadCount", "muteAllMembers", "customData", "groupAtInfoList", "nextMessageSeq", "selfInfo"], pi = e2(function e3(t3, n3) {
+ p3(this, e3), this.topicID = "", this.topicName = "", this.avatar = "", this.introduction = "", this.notification = "", this.unreadCount = 0, this.muteAllMembers = false, this.customData = "", this.groupAtInfoList = [], this.nextMessageSeq = 0, this.lastMessage = qo(t3.lastMessage, n3), this.selfInfo = { muteTime: 0, readedSequence: 0, messageRemindType: "", excludedUnreadSequenceList: void 0 }, this._initTopic(t3);
}, [{ key: "_initTopic", value: function(e3) {
for (var t3 in e3)
- ii.indexOf(t3) < 0 || ("selfInfo" === t3 ? this.updateSelfInfo(e3[t3]) : this[t3] = "muteAllMembers" === t3 ? 1 === e3[t3] : e3[t3]);
+ di.indexOf(t3) < 0 || ("selfInfo" === t3 ? this.updateSelfInfo(e3[t3]) : this[t3] = "muteAllMembers" === t3 ? 1 === e3[t3] : e3[t3]);
} }, { key: "updateUnreadCount", value: function() {
this.unreadCount = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0;
} }, { key: "updateNextMessageSeq", value: function(e3) {
this.nextMessageSeq = e3;
} }, { key: "updateLastMessage", value: function(e3) {
- this.lastMessage = No(e3);
+ this.lastMessage = qo(e3);
} }, { key: "updateGroupAtInfoList", value: function(e3) {
this.groupAtInfoList = JSON.parse(JSON.stringify(e3));
} }, { key: "updateTopic", value: function(e3) {
- N3(e3.selfInfo) || this.updateSelfInfo(e3.selfInfo), N3(e3.muteAllMembers) || (this.muteAllMembers = 1 === e3.muteAllMembers), dt2(this, e3, ["groupID", "lastMessageTime", "selfInfo", "muteAllMembers", "lastMsg"]);
+ N3(e3.selfInfo) || this.updateSelfInfo(e3.selfInfo), N3(e3.muteAllMembers) || (this.muteAllMembers = 1 === e3.muteAllMembers), ht2(this, e3, ["groupID", "lastMessageTime", "selfInfo", "muteAllMembers", "lastMsg"]);
} }, { key: "updateSelfInfo", value: function(e3) {
- return 0 === dt2(this.selfInfo, e3, [], [""]);
+ return 0 === ht2(this.selfInfo, e3, [], [""]);
} }, { key: "reduceUnreadCount", value: function() {
return 1 <= this.unreadCount && (--this.unreadCount, true);
} }, { key: "isLastMessageRevoked", value: function(e3) {
@@ -13895,7 +13902,7 @@ var chat = { exports: {} };
this.lastMessage.isRevoked = e3;
} }, { key: "setLastMessageRevoker", value: function(e3) {
this.lastMessage.revoker = e3;
- } }]), ai = (t2(mi, c2), e2(mi, [{ key: "_onCloudConfig", value: function() {
+ } }]), _i = (t2(Di, c2), e2(Di, [{ key: "_onCloudConfig", value: function() {
var e3 = this.getCloudConfig("topic_cache_time"), t3 = this.getCloudConfig("topic_last_active_time");
N3(e3) || (this.TOPIC_CACHE_TIME = Number(e3)), N3(t3) || (this.TOPIC_LAST_ACTIVE_TIME = Number(t3));
} }, { key: "onTopicCreated", value: function(e3) {
@@ -13911,56 +13918,56 @@ var chat = { exports: {} };
n3 && (n3.updateTopic(e3), this.emitOEvt(h2.TOPIC_UPDATED, { groupID: t3, topic: n3 }));
} }, { key: "onTopicLatestMsg", value: function(e3) {
var t3, n3, e3 = e3 || {}, o3 = e3.topicLatestMessage, e3 = e3.excludedUnreadSequenceList;
- S2(o3) || (t3 = o3.groupProfile.topicID, o3.conversationType = R2.CONV_GROUP, o3.to = t3, (n3 = new Do(o3)).setElement(o3.elements), this.updateUnreadCountAndLastMsg(t3, n3, e3));
+ S2(o3) || (t3 = o3.groupProfile.topicID, o3.conversationType = R2.CONV_GROUP, o3.to = t3, (n3 = new So(o3)).setElement(o3.elements), this.updateUnreadCountAndLastMsg(t3, n3, e3));
} }, { key: "onMessageRemindTypeUpdated", value: function(e3) {
var t3, n3 = e3.groupID, o3 = e3.topicID, e3 = e3.messageRemindType, i4 = this.getLocalTopic(n3, o3);
i4 && ((t3 = i4.updateSelfInfo({ messageRemindType: e3 })) && this.emitOEvt(h2.TOPIC_UPDATED, { groupID: n3, topic: i4 }), M2.l("".concat(this._n, ".onMessageRemindTypeUpdated topicID:").concat(o3, " messageRemindType:").concat(e3, " isUpdated:").concat(t3)));
} }, { key: "onAtInfoUpdated", value: function(e3) {
- var t3 = e3.topicID, e3 = e3.groupAtInfoList, n3 = jt2(t3), t3 = this.getLocalTopic(n3, t3);
+ var t3 = e3.topicID, e3 = e3.groupAtInfoList, n3 = Xt2(t3), t3 = this.getLocalTopic(n3, t3);
t3 && !N3(e3) && (t3.updateGroupAtInfoList(e3), this.emitOEvt(h2.TOPIC_UPDATED, { groupID: n3, topic: t3 }));
} }, { key: "onUnreadCountUpdatedFromConv", value: function(e3) {
- var t3 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0, n3 = jt2(e3), e3 = this.getLocalTopic(n3, e3);
+ var t3 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0, n3 = Xt2(e3), e3 = this.getLocalTopic(n3, e3);
e3 && e3.unreadCount !== t3 && (e3.updateUnreadCount(t3), 0 === t3 && e3.updateSelfInfo({ readedSequence: e3.lastMessage.lastSequence }), this.emitOEvt(h2.TOPIC_UPDATED, { groupID: n3, topic: e3 }));
} }, { key: "onMessageSent", value: function(e3) {
var t3, n3, o3 = e3.groupID, i4 = e3.topicID, e3 = e3.lastMessage, i4 = this.getLocalTopic(o3, i4);
i4 && (n3 = (t3 = void 0 === (t3 = e3.sequence) ? 0 : t3) + 1) > i4.nextMessageSeq && (i4.updateNextMessageSeq(n3), i4.updateLastMessage(e3), i4.updateSelfInfo({ readedSequence: t3 }), i4.updateUnreadCount(0), this.emitOEvt(h2.TOPIC_UPDATED, { groupID: o3, topic: i4 }));
} }, { key: "onMessageModified", value: function(e3) {
- var t3, n3 = e3.to, o3 = e3.time, i4 = e3.sequence, s4 = e3.elements, a3 = e3.cloudCustomData, r4 = e3.messageVersion, c3 = jt2(n3), u3 = this.getLocalTopic(c3, n3);
- u3 && (t3 = u3.lastMessage, M2.d("".concat(this._n, ".onMessageModified topicID:").concat(n3, " lastMessage:"), JSON.stringify(t3), "options:", JSON.stringify(e3)), t3) && (null === t3.payload || t3.lastTime === o3 && t3.lastSequence === i4 && t3.version !== r4) && (t3.type = s4[0].type, t3.payload = s4[0].content, t3.messageForShow = Jt2(t3.type, t3.payload, this.isIntl()), t3.cloudCustomData = a3, t3.version = r4, t3.lastSequence = i4, t3.lastTime = o3, this.emitOEvt(h2.TOPIC_UPDATED, { groupID: c3, topic: u3 }));
+ var t3, n3 = e3.to, o3 = e3.time, i4 = e3.sequence, a3 = e3.elements, s4 = e3.cloudCustomData, r4 = e3.messageVersion, c3 = Xt2(n3), u3 = this.getLocalTopic(c3, n3);
+ u3 && (t3 = u3.lastMessage, M2.d("".concat(this._n, ".onMessageModified topicID:").concat(n3, " lastMessage:"), JSON.stringify(t3), "options:", JSON.stringify(e3)), t3) && (null === t3.payload || t3.lastTime === o3 && t3.lastSequence === i4 && t3.version !== r4) && (t3.type = a3[0].type, t3.payload = a3[0].content, t3.messageForShow = Zt2(t3.type, t3.payload, this.isIntl()), t3.cloudCustomData = s4, t3.version = r4, t3.lastSequence = i4, t3.lastTime = o3, this.emitOEvt(h2.TOPIC_UPDATED, { groupID: c3, topic: u3 }));
} }, { key: "onMessageRevoked", value: function(e3) {
- var n3, o3, i4, s4 = this;
+ var n3, o3, i4, a3 = this;
0 !== e3.length && (o3 = n3 = null, i4 = false, e3.forEach(function(e4) {
var t3 = e4.to;
- o3 = jt2(t3), (n3 = s4.getLocalTopic(o3, t3)) && (n3.reduceUnreadCount() && (i4 = true), n3.isLastMessageRevoked(e4) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), i4 = true), (t3 = n3.selfInfo.excludedUnreadSequenceList || []).push(e4.sequence), n3.updateSelfInfo({ excludedUnreadSequenceList: t3 }));
+ o3 = Xt2(t3), (n3 = a3.getLocalTopic(o3, t3)) && (n3.reduceUnreadCount() && (i4 = true), n3.isLastMessageRevoked(e4) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), i4 = true), (t3 = n3.selfInfo.excludedUnreadSequenceList || []).push(e4.sequence), n3.updateSelfInfo({ excludedUnreadSequenceList: t3 }));
}), i4) && this.emitOEvt(h2.TOPIC_UPDATED, { groupID: o3, topic: n3 });
} }, { key: "isLastMessageRevoked", value: function(e3) {
- var t3 = e3.topicID, e3 = e3.sequence, n3 = jt2(t3), n3 = this.getLocalTopic(n3, t3), t3 = false;
+ var t3 = e3.topicID, e3 = e3.sequence, n3 = Xt2(t3), n3 = this.getLocalTopic(n3, t3), t3 = false;
return t3 = n3 ? n3.isLastMessageRevoked({ sequence: e3 }) : t3;
} }, { key: "updateUnreadCountAndLastMsg", value: function(e3, t3, n3) {
- var o3, i4 = jt2(e3), s4 = this.getLocalTopic(i4, e3);
- s4 && (o3 = s4.selfInfo.excludedUnreadSequenceList || [], N3(n3) || (o3 = n3), t3._isExcludedFromUnreadCount && o3.push(t3.sequence), s4.updateSelfInfo({ excludedUnreadSequenceList: o3 }), M2.l("".concat(this._n, ".updateUnreadCountAndLastMsg seq:").concat(t3.sequence, " lastSeq:").concat(s4.lastMessage.lastSequence)), t3.sequence > s4.lastMessage.lastSequence) && (s4.updateLastMessage(t3), n3 = t3.sequence + 1, s4.updateNextMessageSeq(n3), o3 = this._computeUnreadCount(s4), s4.updateUnreadCount(o3), (t3 = this.get(11).getLocalConversation("".concat(R2.CONV_GROUP).concat(e3))) && t3.updateUnreadCount({ nextUnreadCount: o3, isFromGetConversations: true }), this.emitOEvt(h2.TOPIC_UPDATED, { groupID: i4, topic: s4 }));
+ var o3, i4 = Xt2(e3), a3 = this.getLocalTopic(i4, e3);
+ a3 && (o3 = a3.selfInfo.excludedUnreadSequenceList || [], N3(n3) || (o3 = n3), t3._isExcludedFromUnreadCount && o3.push(t3.sequence), a3.updateSelfInfo({ excludedUnreadSequenceList: o3 }), M2.l("".concat(this._n, ".updateUnreadCountAndLastMsg seq:").concat(t3.sequence, " lastSeq:").concat(a3.lastMessage.lastSequence)), t3.sequence > a3.lastMessage.lastSequence) && (a3.updateLastMessage(t3), n3 = t3.sequence + 1, a3.updateNextMessageSeq(n3), o3 = this._computeUnreadCount(a3), a3.updateUnreadCount(o3), (t3 = this.get(11).getLocalConversation("".concat(R2.CONV_GROUP).concat(e3))) && t3.updateUnreadCount({ nextUnreadCount: o3, isFromGetConversations: true }), this.emitOEvt(h2.TOPIC_UPDATED, { groupID: i4, topic: a3 }));
} }, { key: "getJoinedCommunityList", value: function() {
return this.get(7).syncCommunityWithTopic();
} }, { key: "createTopicInCommunity", value: function(t3) {
var n3, o3 = this, i4 = "".concat(this._n, ".").concat("createTopicInCommunity"), e3 = t3.topicID;
- return N3(e3) || Nt2(e3) ? t3.topicName && false === this._filterProfanity("topicName", t3) || t3.introduction && false === this._filterProfanity("introduction", t3) || t3.notification && false === this._filterProfanity("notification", t3) ? E2({ code: k2.PROFANITY_FOUND }) : (n3 = new P2("createTopicInCommunity"), this.req({ P: G2.CREATE_TOPIC, data: y2({}, t3) }).then(function(e4) {
+ return N3(e3) || Ut2(e3) ? t3.topicName && false === this._filterProfanity("topicName", t3) || t3.introduction && false === this._filterProfanity("introduction", t3) || t3.notification && false === this._filterProfanity("notification", t3) ? E2({ code: k2.PROFANITY_FOUND }) : (n3 = new P2("createTopicInCommunity"), this.req({ P: G2.CREATE_TOPIC, data: y2({}, t3) }).then(function(e4) {
e4 = e4.data.topicID;
return n3.setMessage("topicID:".concat(e4)).end(), M2.l("".concat(i4, " ok. topicID:").concat(e4)), o3._updateTopicMap([y2(y2({}, t3), {}, { topicID: e4 })]), T2({ topicID: e4 });
}).catch(function(e4) {
return n3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
})) : E2({ code: k2.ILLEGAL_TOPIC_ID });
} }, { key: "deleteTopicFromCommunity", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, ".").concat("deleteTopicFromCommunity"), s4 = e3.groupID, e3 = e3.topicIDList, e3 = void 0 === e3 ? [] : e3, a3 = new P2("deleteTopicFromCommunity");
- return a3.setMessage("groupID:".concat(s4, " topicIDList:").concat(e3)), this.req({ P: G2.DEL_TOPIC, data: { groupID: s4, topicIDList: e3 } }).then(function(e4) {
+ var t3 = this, n3 = "".concat(this._n, ".").concat("deleteTopicFromCommunity"), a3 = e3.groupID, e3 = e3.topicIDList, e3 = void 0 === e3 ? [] : e3, s4 = new P2("deleteTopicFromCommunity");
+ return s4.setMessage("groupID:".concat(a3, " topicIDList:").concat(e3)), this.req({ P: G2.DEL_TOPIC, data: { groupID: a3, topicIDList: e3 } }).then(function(e4) {
var e4 = e4.data.resultList, o3 = [], i4 = [], e4 = ((void 0 === e4 ? [] : e4).forEach(function(e5) {
var t4 = e5.topicID, n4 = e5.errorCode, e5 = e5.errorInfo;
0 === n4 ? o3.push({ topicID: t4 }) : i4.push({ topicID: t4, code: n4, message: e5 });
}), "success count:".concat(o3.length, ", fail count:").concat(i4.length));
- return a3.setMoreMessage(e4).end(), M2.l("".concat(n3, " ok. ").concat(e4)), o3.forEach(function(e5) {
- t3._deleteLocalTopic(s4, e5.topicID);
+ return s4.setMoreMessage(e4).end(), M2.l("".concat(n3, " ok. ").concat(e4)), o3.forEach(function(e5) {
+ t3._deleteLocalTopic(a3, e5.topicID);
}), T2({ successTopicList: o3, failureTopicList: i4 });
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
});
} }, { key: "updateTopicProfile", value: function(e3) {
var t3, n3 = this, o3 = "".concat(this._n, ".").concat("updateTopicProfile");
@@ -13972,19 +13979,19 @@ var chat = { exports: {} };
} }, { key: "getTopicList", value: function(e3) {
var t3 = this, n3 = "".concat(this._n, ".").concat("getTopicList"), o3 = e3.groupID, e3 = e3.topicIDList, e3 = void 0 === e3 ? [] : e3, i4 = 0 === e3.length, c3 = new P2("getTopicList");
if (c3.setMessage("groupID:".concat(o3)), this._getTopicTimeMap.has(o3)) {
- var s4 = this._getTopicTimeMap.get(o3), a3 = s4.isGetAll, s4 = s4.time;
- if ((a3 || !a3 && !i4) && Date.now() - s4 < 1e3 * this.TOPIC_CACHE_TIME) {
- a3 = this._getLocalTopicList(o3, e3);
- if (i4 || a3.length === e3.length)
- return c3.setMoreMessage("from cache, topic count:".concat(a3.length)).end(), M2.l("".concat(n3, " groupID:").concat(o3, " from cache, topic count:").concat(a3.length)), D2({ successTopicList: a3, failureTopicList: [] });
+ var a3 = this._getTopicTimeMap.get(o3), s4 = a3.isGetAll, a3 = a3.time;
+ if ((s4 || !s4 && !i4) && Date.now() - a3 < 1e3 * this.TOPIC_CACHE_TIME) {
+ s4 = this._getLocalTopicList(o3, e3);
+ if (i4 || s4.length === e3.length)
+ return c3.setMoreMessage("from cache, topic count:".concat(s4.length)).end(), M2.l("".concat(n3, " groupID:").concat(o3, " from cache, topic count:").concat(s4.length)), D2({ successTopicList: s4, failureTopicList: [] });
}
}
return this.req({ P: G2.GET_TOPIC_LIST, data: { groupID: o3, topicIDList: e3 } }).then(function(e4) {
- var e4 = e4.data.topicInfoList, s5 = [], a4 = [], r4 = [], e4 = ((void 0 === e4 ? [] : e4).forEach(function(e5) {
+ var e4 = e4.data.topicInfoList, a4 = [], s5 = [], r4 = [], e4 = ((void 0 === e4 ? [] : e4).forEach(function(e5) {
var t4 = e5.topic, n4 = e5.selfInfo, o4 = e5.errorCode, e5 = e5.errorInfo, i5 = t4.topicID;
- 0 === o4 ? (s5.push(y2(y2({}, t4), {}, { selfInfo: n4 })), a4.push(i5)) : r4.push({ topicID: i5, code: o4, message: e5 });
- }), t3._updateTopicMap(s5), t3._handleTopicAtInfo(s5), "success count:".concat(a4.length, ", fail count:").concat(r4.length)), e4 = (c3.setMoreMessage(e4).end(), M2.l("".concat(n3, " groupID:").concat(o3, " from remote, ").concat(e4)), []);
- return S2(a4) || (t3._getTopicTimeMap.set(o3, { time: Date.now(), isGetAll: i4 }), e4 = t3._getLocalTopicList(o3, a4)), T2({ successTopicList: e4, failureTopicList: r4 });
+ 0 === o4 ? (a4.push(y2(y2({}, t4), {}, { selfInfo: n4 })), s5.push(i5)) : r4.push({ topicID: i5, code: o4, message: e5 });
+ }), t3._updateTopicMap(a4), t3._handleTopicAtInfo(a4), "success count:".concat(s5.length, ", fail count:").concat(r4.length)), e4 = (c3.setMoreMessage(e4).end(), M2.l("".concat(n3, " groupID:").concat(o3, " from remote, ").concat(e4)), []);
+ return S2(s5) || (t3._getTopicTimeMap.set(o3, { time: Date.now(), isGetAll: i4 }), e4 = t3._getLocalTopicList(o3, s5)), T2({ successTopicList: e4, failureTopicList: r4 });
}).catch(function(e4) {
return c3.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
});
@@ -14001,21 +14008,21 @@ var chat = { exports: {} };
} }, { key: "_deleteLocalTopic", value: function(e3, t3) {
this._topicMap.has(e3) && this._topicMap.get(e3).has(t3) && (this._topicMap.get(e3).delete(t3), M2.l("".concat(this._n, "._deleteLocalTopic groupID:").concat(e3, " topicID:").concat(t3)));
} }, { key: "_updateTopicMap", value: function(e3) {
- var i4 = this, s4 = [];
+ var i4 = this, a3 = [];
e3.forEach(function(e4) {
- var t3 = e4.groupID, n3 = e4.topicID, o3 = null, e4 = (i4._topicMap.has(t3) || i4._topicMap.set(t3, /* @__PURE__ */ new Map()), i4._topicMap.get(t3).has(n3) ? (o3 = i4._topicMap.get(t3).get(n3)).updateTopic(e4) : (i4._getTopicLastMessage(e4), o3 = new si(e4, i4.isIntl()), i4._topicMap.get(t3).set(n3, o3)), i4._computeUnreadCount(o3));
- o3.updateUnreadCount(e4), s4.push({ conversationID: "".concat(R2.CONV_GROUP).concat(n3), type: R2.CONV_TOPIC, unreadCount: e4 });
- }), 0 < s4.length && this.get(11).updateTopicConversation(s4);
+ var t3 = e4.groupID, n3 = e4.topicID, o3 = null, e4 = (i4._topicMap.has(t3) || i4._topicMap.set(t3, /* @__PURE__ */ new Map()), i4._topicMap.get(t3).has(n3) ? (o3 = i4._topicMap.get(t3).get(n3)).updateTopic(e4) : (i4._getTopicLastMessage(e4), o3 = new pi(e4, i4.isIntl()), i4._topicMap.get(t3).set(n3, o3)), i4._computeUnreadCount(o3));
+ o3.updateUnreadCount(e4), a3.push({ conversationID: "".concat(R2.CONV_GROUP).concat(n3), type: R2.CONV_TOPIC, unreadCount: e4 });
+ }), 0 < a3.length && this.get(11).updateTopicConversation(a3);
} }, { key: "resetGetTopicTime", value: function(e3) {
var t3 = this;
N3(e3) ? d2(this._getTopicTimeMap.keys()).forEach(function(e4) {
t3._getTopicTimeMap.set(e4, 0);
}) : this._getTopicTimeMap.set(e3, 0);
} }, { key: "getTopicListOnReconnected", value: function() {
- var o3 = this, e3 = d2(this._topicMap.keys()), i4 = [], s4 = this.get(11);
+ var o3 = this, e3 = d2(this._topicMap.keys()), i4 = [], a3 = this.get(11);
e3.forEach(function(e4) {
var n3 = [], t3 = o3._getLocalTopicList(e4);
- s4.deleteTopicRoamingInfo(e4), t3.forEach(function(e5) {
+ a3.deleteTopicRoamingInfo(e4), t3.forEach(function(e5) {
var t4 = e5.lastMessage.lastTime, t4 = void 0 === t4 ? 0 : t4;
Date.now() - 1e3 * t4 < 1e3 * o3.TOPIC_LAST_ACTIVE_TIME && n3.push(e5.topicID);
}), 0 < n3.length && i4.push({ groupID: e4, topicIDList: n3 });
@@ -14051,34 +14058,34 @@ var chat = { exports: {} };
}), 1 <= n3) && (e3 -= n3), e3 < 0 ? 0 : e3;
} }, { key: "_filterProfanity", value: function(e3, t3) {
var n3, o3 = this.get(29);
- return !o3 || (n3 = (o3 = o3.filterText(t3[e3], ae2)).isAllowedToSend, o3 = o3.modifiedText, true === n3 && (t3[e3] = o3, true));
+ return !o3 || (n3 = (o3 = o3.filterText(t3[e3], se2)).isAllowedToSend, o3 = o3.modifiedText, true === n3 && (t3[e3] = o3, true));
} }, { key: "getMessageExtensions", value: function(e3, t3) {
M2.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t3));
- var n3 = jt2(e3.to);
+ var n3 = Xt2(e3.to);
return this.req({ P: G2.GET_GRP_MSG_EXT, data: { groupID: n3, topicID: e3.to, messageSequence: e3.sequence, startSequence: t3 } });
} }, { key: "modifyMsgExts", value: function(e3, t3) {
- var n3 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1, o3 = (M2.l("".concat(this._n, ".modifyMsgExts operateType:").concat(n3)), jt2(e3.to));
+ var n3 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1, o3 = (M2.l("".concat(this._n, ".modifyMsgExts operateType:").concat(n3)), Xt2(e3.to));
return this.req({ P: G2.MODIFY_GRP_MSG_EXT, data: { groupID: o3, topicID: e3.to, messageSequence: e3.sequence, extensionList: t3, operateType: n3 } });
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._topicMap.clear(), this._getTopicTimeMap.clear(), this.TOPIC_CACHE_TIME = 300, this.TOPIC_LAST_ACTIVE_TIME = 3600;
- } }])), ri = e2(function e3(t3) {
+ } }])), hi = e2(function e3(t3) {
p3(this, e3), this._userM = t3, this._n = "ProfileHandler", this.TAG = "profile", this.accountProfileMap = /* @__PURE__ */ new Map(), this.expirationTime = 864e5;
}, [{ key: "setExpirationTime", value: function(e3) {
this.expirationTime = e3;
} }, { key: "getUserProfile", value: function(e3) {
var t3 = this, n3 = "".concat(this._n, ".").concat("getUserProfile"), o3 = e3.userIDList;
- e3.fromAccount = this._userM.getMyAccount(), 100 < o3.length && (M2.w("".concat(n3, " ").concat(Qt2(100))), o3.length = 100);
- for (var i4, s4 = [], a3 = [], r4 = 0, c3 = o3.length; r4 < c3; r4++)
- i4 = o3[r4], this._userM.isMyFriend(i4) && this._contains(i4) ? a3.push(this._getProfileFromMap(i4)) : s4.push(i4);
- if (0 === s4.length)
- return D2(a3);
- e3.toAccount = s4;
+ e3.fromAccount = this._userM.getMyAccount(), 100 < o3.length && (M2.w("".concat(n3, " ").concat(tn(100))), o3.length = 100);
+ for (var i4, a3 = [], s4 = [], r4 = 0, c3 = o3.length; r4 < c3; r4++)
+ i4 = o3[r4], this._userM.isMyFriend(i4) && this._contains(i4) ? s4.push(this._getProfileFromMap(i4)) : a3.push(i4);
+ if (0 === a3.length)
+ return D2(s4);
+ e3.toAccount = a3;
var u3 = e3.bFromGetMyProfile || false, l3 = [], d3 = (e3.toAccount.forEach(function(e4) {
l3.push({ toAccount: e4, standardSequence: 0, customSequence: 0 });
}), e3.userItem = l3, new P2("getUserProfile"));
return d3.setMessage(5 < o3.length ? "userIDList.length:".concat(o3.length) : "userIDList:".concat(o3)), this._userM.req({ P: G2.GET_USER_PROFILE, data: e3 }).then(function(e4) {
d3.end(), M2.i("".concat(n3, " ok"));
- e4 = t3._handleResponse(e4).concat(a3);
+ e4 = t3._handleResponse(e4).concat(s4);
return T2(u3 ? e4[0] : e4);
}).catch(function(e4) {
return d3.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
@@ -14091,10 +14098,10 @@ var chat = { exports: {} };
if (!O2(t3))
return [];
for (var n3 = [], e3 = Date.now(), o3 = 0, i4 = t3.length; o3 < i4; o3++) {
- var s4 = t3[o3], a3 = s4.to, s4 = s4.profileItem;
- "@TLS#NOT_FOUND" !== a3 && "" !== a3 && (a3 = this._update(a3, this._getLatestProfileFromResponse(a3, s4)).latestProfile, n3.push(a3));
+ var a3 = t3[o3], s4 = a3.to, a3 = a3.profileItem;
+ "@TLS#NOT_FOUND" !== s4 && "" !== s4 && (s4 = this._update(s4, this._getLatestProfileFromResponse(s4, a3)).latestProfile, n3.push(s4));
}
- return M2.l("".concat(this._n, "._handleResponse cost:").concat(tn(e3))), n3;
+ return M2.l("".concat(this._n, "._handleResponse cost:").concat(an(e3))), n3;
} }, { key: "_getLatestProfileFromResponse", value: function(e3, t3) {
var n3 = { userID: e3, profileCustomField: [] };
if (!S2(t3))
@@ -14144,25 +14151,25 @@ var chat = { exports: {} };
}
return n3;
} }, { key: "updateMyProfile", value: function(o3) {
- var i4 = this, s4 = "".concat(this._n, ".").concat("updateMyProfile");
+ var i4 = this, a3 = "".concat(this._n, ".").concat("updateMyProfile");
if (o3.nick && false === this._userM.filterProfanity("nick", o3))
return E2({ code: k2.PROFANITY_FOUND });
if (o3.selfSignature && false === this._userM.filterProfanity("selfSignature", o3))
return E2({ code: k2.PROFANITY_FOUND });
- var a3 = new P2("updateMyProfile"), e3 = (a3.setMessage(JSON.stringify(o3)), new bo().validate(o3));
+ var s4 = new P2("updateMyProfile"), e3 = (s4.setMessage(JSON.stringify(o3)), new Ho().validate(o3));
if (!e3.valid)
- return a3.setCode(k2.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(e3.tips)).end(), M2.e("".concat(s4, " info:").concat(e3.tips)), E2({ code: k2.UPDATE_PROFILE_INVALID_PARAM });
+ return s4.setCode(k2.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(e3.tips)).end(), M2.e("".concat(a3, " info:").concat(e3.tips)), E2({ code: k2.UPDATE_PROFILE_INVALID_PARAM });
var t3, r4, n3 = [];
for (t3 in o3)
Object.prototype.hasOwnProperty.call(o3, t3) && ("profileCustomField" === t3 ? o3.profileCustomField.forEach(function(e4) {
n3.push({ tag: e4.key, value: e4.value });
}) : n3.push({ tag: f2[t3.toUpperCase()], value: o3[t3] }));
- return 0 === n3.length ? (e3 = new L2({ code: k2.UPDATE_PROFILE_NO_KEY }), a3.setError(e3).end(), M2.e("".concat(s4, " failed. error:"), e3), E2(e3)) : (r4 = this._userM.getMyAccount(), this._userM.req({ P: G2.UPDATE_MY_PROFILE, data: { fromAccount: r4, profileItem: n3 } }).then(function(e4) {
- a3.end(), M2.i("".concat(s4, " ok"));
+ return 0 === n3.length ? (e3 = new L2({ code: k2.UPDATE_PROFILE_NO_KEY }), s4.setError(e3).end(), M2.e("".concat(a3, " failed. error:"), e3), E2(e3)) : (r4 = this._userM.getMyAccount(), this._userM.req({ P: G2.UPDATE_MY_PROFILE, data: { fromAccount: r4, profileItem: n3 } }).then(function(e4) {
+ s4.end(), M2.i("".concat(a3, " ok"));
var t4 = i4._update(r4, o3), n4 = t4.isProfileUpdated, t4 = t4.latestProfile;
return true === n4 && i4._userM.emitOEvt(h2.PROFILE_UPDATED, [t4]), D2(t4);
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
}));
} }, { key: "onProfileModified", value: function(e3) {
var t3 = e3.dataList;
@@ -14170,8 +14177,8 @@ var chat = { exports: {} };
var n3 = t3.length;
M2.d("".concat(this._n, ".onProfileModified count:").concat(n3, " dataList:"), e3.dataList);
for (var o3 = [], i4 = 0; i4 < n3; i4++) {
- var s4 = t3[i4].userID, s4 = this._update(s4, this._getLatestProfileFromResponse(s4, t3[i4].profileList)), a3 = s4.isProfileUpdated, s4 = s4.latestProfile;
- true === a3 && o3.push(s4);
+ var a3 = t3[i4].userID, a3 = this._update(a3, this._getLatestProfileFromResponse(a3, t3[i4].profileList)), s4 = a3.isProfileUpdated, a3 = a3.latestProfile;
+ true === s4 && o3.push(a3);
}
0 < o3.length && (this._userM.emitIEvt(U2.PROFILE_UPDATED, o3), this._userM.emitOEvt(h2.PROFILE_UPDATED, o3));
}
@@ -14183,7 +14190,7 @@ var chat = { exports: {} };
}
} }, { key: "_update", value: function(e3, t3) {
var n3, o3 = false, i4 = Date.now();
- return this._contains(e3) ? (n3 = this._getProfileFromMap(e3), t3.profileCustomField && true === Lt2(n3.profileCustomField, t3.profileCustomField) && (n3.lastUpdatedTime = i4, o3 = true), 0 < dt2(n3, t3, ["profileCustomField"]) && (n3.lastUpdatedTime = i4, o3 = true)) : (n3 = new bo(t3), !this._userM.isMyFriend(e3) && e3 !== this._userM.getMyAccount() || (n3.lastUpdatedTime = i4, o3 = true, this.accountProfileMap.set(e3, n3))), this._flush(e3 === this._userM.getMyAccount()), true === o3 && M2.l("".concat(this._n, "._update account:").concat(e3, " isUpdated:").concat(o3)), { isProfileUpdated: o3, latestProfile: n3 };
+ return this._contains(e3) ? (n3 = this._getProfileFromMap(e3), t3.profileCustomField && true === Rt2(n3.profileCustomField, t3.profileCustomField) && (n3.lastUpdatedTime = i4, o3 = true), 0 < ht2(n3, t3, ["profileCustomField"]) && (n3.lastUpdatedTime = i4, o3 = true)) : (n3 = new Ho(t3), !this._userM.isMyFriend(e3) && e3 !== this._userM.getMyAccount() || (n3.lastUpdatedTime = i4, o3 = true, this.accountProfileMap.set(e3, n3))), this._flush(e3 === this._userM.getMyAccount()), true === o3 && M2.l("".concat(this._n, "._update account:").concat(e3, " isUpdated:").concat(o3)), { isProfileUpdated: o3, latestProfile: n3 };
} }, { key: "_flush", value: function(e3) {
var t3 = d2(this.accountProfileMap.values()), n3 = this._userM.getStorageModule();
M2.d("".concat(this._n, "._flush length:").concat(t3.length, " flushAtOnce:").concat(e3)), n3.setItem(this.TAG, t3, e3);
@@ -14195,8 +14202,8 @@ var chat = { exports: {} };
var e3 = this._userM.getStorageModule().getItem(this.TAG);
return S2(e3) ? [] : e3;
} }, { key: "onConvProfileUpdated", value: function(e3) {
- for (var t3, n3, o3, i4 = [], s4 = 0, a3 = e3.length; s4 < a3; s4++)
- n3 = (t3 = e3[s4]).userID, this._userM.isMyFriend(n3) && (this._contains(n3) ? (o3 = this._getProfileFromMap(n3), 0 < dt2(o3, t3) && i4.push(n3)) : i4.push(t3.userID));
+ for (var t3, n3, o3, i4 = [], a3 = 0, s4 = e3.length; a3 < s4; a3++)
+ n3 = (t3 = e3[a3]).userID, this._userM.isMyFriend(n3) && (this._contains(n3) ? (o3 = this._getProfileFromMap(n3), 0 < ht2(o3, t3) && i4.push(n3)) : i4.push(t3.userID));
0 !== i4.length && (M2.l("".concat(this._n, ".onConvProfileUpdated toAccountList:").concat(i4)), this.getUserProfile({ userIDList: i4 }));
} }, { key: "getNickAndAvatarByUserID", value: function(e3) {
return this._contains(e3) ? { nick: (e3 = this._getProfileFromMap(e3)).nick, avatar: e3.avatar } : { nick: "", avatar: "" };
@@ -14218,33 +14225,33 @@ var chat = { exports: {} };
return t3;
} }, { key: "reset", value: function() {
this._flush(true), this.accountProfileMap.clear();
- } }]), ci = e2(function e3(t3) {
+ } }]), gi = e2(function e3(t3) {
p3(this, e3);
- }), ui = e2(function e3(t3) {
+ }), fi = e2(function e3(t3) {
p3(this, e3), this._userM = t3, this._n = "BlacklistHandler", this._blacklistMap = /* @__PURE__ */ new Map(), this._startIndex = 0;
}, [{ key: "getLocalBlacklist", value: function() {
return d2(this._blacklistMap.keys());
} }, { key: "getBlacklist", value: function() {
- var o3 = this, i4 = "".concat(this._n, ".getBlacklist"), e3 = { fromAccount: this._userM.getMyAccount(), maxLimited: 100, startIndex: this._startIndex }, s4 = new P2("getBlacklist");
+ var o3 = this, i4 = "".concat(this._n, ".getBlacklist"), e3 = { fromAccount: this._userM.getMyAccount(), maxLimited: 100, startIndex: this._startIndex }, a3 = new P2("getBlacklist");
return this._userM.req({ P: G2.GET_BL, data: e3 }).then(function(e4) {
var e4 = e4.data, t3 = e4.blackListItem, e4 = e4.startIndex, n3 = S2(t3) ? 0 : t3.length;
- s4.setMessage("count:".concat(n3)).end(), M2.i("".concat(i4, " ok")), o3._startIndex = e4, o3._handleResponse(t3, true), o3._userM.emitOEvt(h2.BLACKLIST_UPDATED, d2(o3._blacklistMap.keys())), 0 !== o3._startIndex && o3.getBlacklist();
+ a3.setMessage("count:".concat(n3)).end(), M2.i("".concat(i4, " ok")), o3._startIndex = e4, o3._handleResponse(t3, true), o3._userM.emitOEvt(h2.BLACKLIST_UPDATED, d2(o3._blacklistMap.keys())), 0 !== o3._startIndex && o3.getBlacklist();
}).catch(function(e4) {
- return s4.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
+ return a3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
});
} }, { key: "addBlacklist", value: function(t3) {
- var e3, n3, o3 = this, i4 = new P2("addToBlacklist"), s4 = "".concat(this._n, ".addBlacklist"), a3 = this._userM.getMyAccount();
- return 1 === t3.userIDList.length && t3.userIDList[0] === a3 ? (n3 = this._userM.getErrMsg(e3 = k2.CANNOT_ADD_SELF_TO_BLACKLIST), i4.setCode(e3).setMessage(n3).end(), n3 = new L2({ code: e3 }), M2.e("".concat(s4, " failed. error:"), n3), E2(n3)) : (t3.userIDList.includes(a3) && (t3.userIDList = t3.userIDList.filter(function(e4) {
- return e4 !== a3;
+ var e3, n3, o3 = this, i4 = new P2("addToBlacklist"), a3 = "".concat(this._n, ".addBlacklist"), s4 = this._userM.getMyAccount();
+ return 1 === t3.userIDList.length && t3.userIDList[0] === s4 ? (n3 = this._userM.getErrMsg(e3 = k2.CANNOT_ADD_SELF_TO_BLACKLIST), i4.setCode(e3).setMessage(n3).end(), n3 = new L2({ code: e3 }), M2.e("".concat(a3, " failed. error:"), n3), E2(n3)) : (t3.userIDList.includes(s4) && (t3.userIDList = t3.userIDList.filter(function(e4) {
+ return e4 !== s4;
})), t3.fromAccount = this._userM.getMyAccount(), t3.toAccount = t3.userIDList, this._userM.req({ P: G2.ADD_TO_BL, data: t3 }).then(function(e4) {
- return i4.setMessage(5 < t3.userIDList.length ? "userIDList.length:".concat(t3.userIDList.length) : "userIDList:".concat(t3.userIDList)).end(), M2.i("".concat(s4, " ok")), o3._handleResponse(e4.resultItem, true), T2(d2(o3._blacklistMap.keys()));
+ return i4.setMessage(5 < t3.userIDList.length ? "userIDList.length:".concat(t3.userIDList.length) : "userIDList:".concat(t3.userIDList)).end(), M2.i("".concat(a3, " ok")), o3._handleResponse(e4.resultItem, true), T2(d2(o3._blacklistMap.keys()));
}).catch(function(e4) {
- return i4.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4), E2(e4);
+ return i4.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4), E2(e4);
}));
} }, { key: "_handleResponse", value: function(e3, t3) {
if (!S2(e3))
- for (var n3, o3, i4, s4 = 0, a3 = e3.length; s4 < a3; s4++)
- o3 = e3[s4].to, i4 = e3[s4].resultCode, !N3(i4) && 0 !== i4 || (t3 ? ((n3 = this._blacklistMap.has(o3) ? this._blacklistMap.get(o3) : new ci()).userID = o3, S2(e3[s4].addBlackTimeStamp) || (n3.timeStamp = e3[s4].addBlackTimeStamp), this._blacklistMap.set(o3, n3)) : this._blacklistMap.has(o3) && (n3 = this._blacklistMap.get(o3), this._blacklistMap.delete(o3)));
+ for (var n3, o3, i4, a3 = 0, s4 = e3.length; a3 < s4; a3++)
+ o3 = e3[a3].to, i4 = e3[a3].resultCode, !N3(i4) && 0 !== i4 || (t3 ? ((n3 = this._blacklistMap.has(o3) ? this._blacklistMap.get(o3) : new gi()).userID = o3, S2(e3[a3].addBlackTimeStamp) || (n3.timeStamp = e3[a3].addBlackTimeStamp), this._blacklistMap.set(o3, n3)) : this._blacklistMap.has(o3) && (n3 = this._blacklistMap.get(o3), this._blacklistMap.delete(o3)));
M2.l("".concat(this._n, "._handleResponse total:").concat(this._blacklistMap.size, " bAdd:").concat(t3));
} }, { key: "deleteBlacklist", value: function(t3) {
var n3 = this, o3 = "".concat(this._n, ".deleteBlacklist"), i4 = new P2("removeFromBlacklist");
@@ -14262,18 +14269,18 @@ var chat = { exports: {} };
0 < i4 && (M2.l("".concat(this._n, ".onAccountDeleted count:").concat(i4, " ").concat(i4 < 30 ? "userIDList:".concat(e3) : "")), this._userM.emitOEvt(h2.BLACKLIST_UPDATED, d2(this._blacklistMap.keys())));
} }, { key: "onAccountAdded", value: function(e3) {
for (var t3, n3 = [], o3 = 0, i4 = e3.length; o3 < i4; o3++)
- t3 = e3[o3], this._blacklistMap.has(t3) || (this._blacklistMap.set(t3, new ci({ userID: t3 })), n3.push(t3));
+ t3 = e3[o3], this._blacklistMap.has(t3) || (this._blacklistMap.set(t3, new gi({ userID: t3 })), n3.push(t3));
0 < n3.length && (M2.l("".concat(this._n, ".onAccountAdded count:").concat(n3.length, " userIDList:"), n3), this._userM.emitOEvt(h2.BLACKLIST_UPDATED, d2(this._blacklistMap.keys())));
} }, { key: "reset", value: function() {
this._blacklistMap.clear(), this._startIndex = 0;
- } }]), li = e2(function e3(t3) {
+ } }]), mi = e2(function e3(t3) {
p3(this, e3), this._userM = t3, this._n = "UserStatusHandler", this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100, this._userM.getIEmitInst().on(U2.CLOUD_CONFIG, this._onCloudConfig, this);
}, [{ key: "_onCloudConfig", value: function() {
var e3 = this._userM.getCloudConfig("status_query_count"), t3 = this._userM.getCloudConfig("status_sub_count"), n3 = this._userM.getCloudConfig("status_unsub_count");
M2.l("".concat(this._n, "._onCloudConfig statusQueryCount:").concat(e3, " statusSubscribeCount:").concat(t3) + " statusUnsubscribeCount:".concat(n3)), N3(e3) || (this.MAX_QUERY_USER_COUNT = parseInt(e3, 10)), N3(e3) || (this.MAX_SUBSCRIBE_USER_COUNT = parseInt(t3, 10)), N3(e3) || (this.MAX_UNSUBSCRIBE_USER_COUNT = parseInt(n3, 10));
} }, { key: "onUserStatusUpdated", value: function(e3) {
var e3 = e3.dataList, o3 = this._userM.getMyUserID(), i4 = this._userM.get(12), e3 = e3.map(function(e4) {
- var t3 = e4.to, n3 = e4.statusType, e4 = e4.customStatus, e4 = Go(e4);
+ var t3 = e4.to, n3 = e4.statusType, e4 = e4.customStatus, e4 = xo(e4);
return t3 === o3 && i4.setCustomStatus(e4), { userID: t3, statusType: n3, customStatus: e4 };
});
M2.l("".concat(this._n, ".onUserStatusUpdated list:").concat(JSON.stringify(e3))), this._userM.emitOEvt(h2.USER_STATUS_UPDATED, e3);
@@ -14285,28 +14292,28 @@ var chat = { exports: {} };
return t3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
}));
} }, { key: "getUserStatus", value: function(e3) {
- var o3 = "".concat(this._n, ".").concat("getUserStatus"), e3 = e3.userIDList, i4 = void 0 === e3 ? [] : e3, e3 = this._userM.getMyUserID(), t3 = d2(i4), s4 = void 0, n3 = t3.indexOf(e3);
- if (-1 < n3 && (t3.splice(n3, 1), s4 = { userID: e3, statusType: 1, customStatus: this._userM.get(12).getCustomStatus() }), 0 === t3.length)
- return D2({ successUserList: [s4], failureUserList: [] });
+ var o3 = "".concat(this._n, ".").concat("getUserStatus"), e3 = e3.userIDList, i4 = void 0 === e3 ? [] : e3, e3 = this._userM.getMyUserID(), t3 = d2(i4), a3 = void 0, n3 = t3.indexOf(e3);
+ if (-1 < n3 && (t3.splice(n3, 1), a3 = { userID: e3, statusType: 1, customStatus: this._userM.get(12).getCustomStatus() }), 0 === t3.length)
+ return D2({ successUserList: [a3], failureUserList: [] });
if (!this._userM.canIUse(g2.USER_STATUS))
return this._userM.noUse("getUserStatus");
- t3.length > this.MAX_QUERY_USER_COUNT && (M2.w("".concat(o3, " ").concat(Qt2(this.MAX_QUERY_USER_COUNT))), t3 = i4.slice(0, this.MAX_QUERY_USER_COUNT));
- var a3 = new P2("getUserStatus");
+ t3.length > this.MAX_QUERY_USER_COUNT && (M2.w("".concat(o3, " ").concat(tn(this.MAX_QUERY_USER_COUNT))), t3 = i4.slice(0, this.MAX_QUERY_USER_COUNT));
+ var s4 = new P2("getUserStatus");
return this._userM.req({ P: G2.GET_USER_STATUS, data: { userIDList: t3 } }).then(function(e4) {
var e4 = e4.data, t4 = e4.successUserList, t4 = void 0 === t4 ? [] : t4, e4 = e4.failureUserList, e4 = void 0 === e4 ? [] : e4, t4 = t4.map(function(e5) {
var t5 = e5.userID, n5 = e5.statusType, e5 = e5.customStatus;
- return { userID: t5, statusType: n5, customStatus: Go(e5) };
+ return { userID: t5, statusType: n5, customStatus: xo(e5) };
}), e4 = e4.map(function(e5) {
var t5 = e5.userID, n5 = e5.invalidUserID, o4 = e5.errorCode, e5 = e5.errorInfo;
return { userID: S2(n5) ? t5 : n5, code: o4, message: e5 };
- }), n4 = (N3(s4) || t4.unshift(s4), "userID count:".concat(i4.length, ", success count:").concat(t4.length, ", fail count:").concat(e4.length));
- return a3.setMessage("".concat(n4)).end(), M2.l("".concat(o3, " ok. ").concat(n4, ".")), T2({ successUserList: t4, failureUserList: e4 });
+ }), n4 = (N3(a3) || t4.unshift(a3), "userID count:".concat(i4.length, ", success count:").concat(t4.length, ", fail count:").concat(e4.length));
+ return s4.setMessage("".concat(n4)).end(), M2.l("".concat(o3, " ok. ").concat(n4, ".")), T2({ successUserList: t4, failureUserList: e4 });
}).catch(function(e4) {
- return a3.setMessage("userID count:".concat(i4.length)).setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
+ return s4.setMessage("userID count:".concat(i4.length)).setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
});
} }, { key: "subscribeUserStatus", value: function(e3) {
- var t3, n3, o3, i4, s4 = "subscribeUserStatus";
- return this._userM.canIUse(g2.USER_STATUS) ? (t3 = "".concat(this._n, ".").concat(s4), (n3 = d2(e3 = void 0 === (e3 = e3.userIDList) ? [] : e3)).length > this.MAX_SUBSCRIBE_USER_COUNT && (M2.w("".concat(t3, " ").concat(Qt2(this.MAX_SUBSCRIBE_USER_COUNT))), n3 = e3.slice(0, this.MAX_SUBSCRIBE_USER_COUNT)), o3 = new P2(s4), i4 = "userID count:".concat(e3.length), M2.l("".concat(t3, " ").concat(i4)), this._userM.req({ P: G2.SUB_USER_STATUS, data: { userIDList: n3 } }).then(function(e4) {
+ var t3, n3, o3, i4, a3 = "subscribeUserStatus";
+ return this._userM.canIUse(g2.USER_STATUS) ? (t3 = "".concat(this._n, ".").concat(a3), (n3 = d2(e3 = void 0 === (e3 = e3.userIDList) ? [] : e3)).length > this.MAX_SUBSCRIBE_USER_COUNT && (M2.w("".concat(t3, " ").concat(tn(this.MAX_SUBSCRIBE_USER_COUNT))), n3 = e3.slice(0, this.MAX_SUBSCRIBE_USER_COUNT)), o3 = new P2(a3), i4 = "userID count:".concat(e3.length), M2.l("".concat(t3, " ").concat(i4)), this._userM.req({ P: G2.SUB_USER_STATUS, data: { userIDList: n3 } }).then(function(e4) {
e4 = e4.data.failureUserList, e4 = (void 0 === e4 ? [] : e4).map(function(e5) {
var t4 = e5.userID, n4 = e5.invalidUserID, o4 = e5.errorCode, e5 = e5.errorInfo;
return { userID: S2(n4) ? t4 : n4, code: o4, message: e5 };
@@ -14314,10 +14321,10 @@ var chat = { exports: {} };
return o3.setMessage("".concat(i4, " fail count:").concat(e4.length)).end(), M2.l("".concat(t3, " ok. fail count:").concat(e4.length, ".")), T2({ failureUserList: e4 });
}).catch(function(e4) {
return o3.setMessage(i4).setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
- })) : this._userM.noUse(s4);
+ })) : this._userM.noUse(a3);
} }, { key: "unsubscribeUserStatus", value: function(e3) {
- var t3, n3, o3, i4, s4 = "unsubscribeUserStatus";
- return this._userM.canIUse(g2.USER_STATUS) ? (t3 = "".concat(this._n, ".").concat(s4), n3 = d2(e3 = void 0 === (e3 = (e3 || {}).userIDList) ? [] : e3), e3.length > this.MAX_UNSUBSCRIBE_USER_COUNT && (M2.w("".concat(t3, " ").concat(Qt2(this.MAX_UNSUBSCRIBE_USER_COUNT))), n3 = e3.slice(0, this.MAX_UNSUBSCRIBE_USER_COUNT)), o3 = new P2(s4), i4 = "userID count:".concat(e3.length), M2.l("".concat(t3, " ").concat(i4)), e3 = { userIDList: n3 }, 0 === n3.length && (e3.userIDList = void 0, e3.unsubscribeAll = 1), this._userM.req({ P: G2.UNSUB_USER_STATUS, data: e3 }).then(function(e4) {
+ var t3, n3, o3, i4, a3 = "unsubscribeUserStatus";
+ return this._userM.canIUse(g2.USER_STATUS) ? (t3 = "".concat(this._n, ".").concat(a3), n3 = d2(e3 = void 0 === (e3 = (e3 || {}).userIDList) ? [] : e3), e3.length > this.MAX_UNSUBSCRIBE_USER_COUNT && (M2.w("".concat(t3, " ").concat(tn(this.MAX_UNSUBSCRIBE_USER_COUNT))), n3 = e3.slice(0, this.MAX_UNSUBSCRIBE_USER_COUNT)), o3 = new P2(a3), i4 = "userID count:".concat(e3.length), M2.l("".concat(t3, " ").concat(i4)), e3 = { userIDList: n3 }, 0 === n3.length && (e3.userIDList = void 0, e3.unsubscribeAll = 1), this._userM.req({ P: G2.UNSUB_USER_STATUS, data: e3 }).then(function(e4) {
e4 = e4.data.failureUserList, e4 = (void 0 === e4 ? [] : e4).map(function(e5) {
var t4 = e5.userID, n4 = e5.invalidUserID, o4 = e5.errorCode, e5 = e5.errorInfo;
return { userID: S2(n4) ? t4 : n4, code: o4, message: e5 };
@@ -14325,10 +14332,10 @@ var chat = { exports: {} };
return o3.setMessage("".concat(i4, " fail count:").concat(e4.length)).end(), M2.l("".concat(t3, " ok. fail count:").concat(e4.length, ".")), T2({ failureUserList: e4 });
}).catch(function(e4) {
return o3.setMessage("".concat(i4)).setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
- })) : this._userM.noUse(s4);
+ })) : this._userM.noUse(a3);
} }, { key: "reset", value: function() {
this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100;
- } }]), di = (t2(fi, c2), e2(fi, [{ key: "onContextUpdated", value: function(e3) {
+ } }]), vi = (t2(Ti, c2), e2(Ti, [{ key: "onContextUpdated", value: function(e3) {
this._profileHandler.getMyProfile(), this._blacklistHandler.getBlacklist();
} }, { key: "mockOnNickAvatarModified", value: function(e3, t3) {
M2.l("".concat(this._n, "._mockOnNickAvatarModified nick:").concat(e3, " avatar:").concat(t3)), this.onProfileModified({ dataList: [{ pushType: 1, userID: this.getMyUserID(), profileList: [{ tag: f2.NICK, value: e3 }, { tag: f2.AVATAR, value: t3 }] }] });
@@ -14384,8 +14391,8 @@ var chat = { exports: {} };
return this._userStatusHandler.unsubscribeUserStatus(e3);
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._profileHandler.reset(), this._blacklistHandler.reset(), this._userStatusHandler.reset();
- } }])), pi = e2(function e3(t3, n3) {
- p3(this, e3), this._m = t3, this._isLoggedIn = false, this._SDKAppID = n3.SDKAppID, this._userID = n3.userID || "", this._userSig = n3.userSig || "", this._version = "3.5.4", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._contentType = "json", this._unlimitedAVChatRoom = n3.unlimitedAVChatRoom, this._scene = n3.scene || "", this._oversea = n3.oversea, this._instanceID = n3.instanceID, this._statusInstanceID = 0, this._isDevMode = n3.devMode, this._isTestEnv = n3.testEnv, this._proxyServer = n3.proxyServer, this._fileUploadProxy = n3.fileUploadProxy, this._fileDownloadProxy = n3.fileDownloadProxy, this._applicationID = 0, this._isPartialUpdatedConvs = n3.partialUpdatedConversations, this._isIndependentDomainDisabled = n3.disableIndependentDomain, this._isUsingChatCore = false, this._uiPlatform = 0, this._authKey = "", this._customLoginInfo = "";
+ } }])), Ii = e2(function e3(t3, n3) {
+ p3(this, e3), this._m = t3, this._isLoggedIn = false, this._SDKAppID = n3.SDKAppID, this._userID = n3.userID || "", this._userSig = n3.userSig || "", this._version = "3.5.5", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._contentType = "json", this._unlimitedAVChatRoom = n3.unlimitedAVChatRoom, this._scene = n3.scene || "", this._oversea = n3.oversea, this._instanceID = n3.instanceID, this._statusInstanceID = 0, this._isDevMode = n3.devMode, this._isTestEnv = n3.testEnv, this._proxyServer = n3.proxyServer, this._fileUploadProxy = n3.fileUploadProxy, this._fileDownloadProxy = n3.fileDownloadProxy, this._applicationID = 0, this._isPartialUpdatedConvs = n3.partialUpdatedConversations, this._isIndependentDomainDisabled = n3.disableIndependentDomain, this._isUsingChatCore = false, this._uiPlatform = 0, this._authKey = "", this._customLoginInfo = "";
}, [{ key: "isLoggedIn", value: function() {
return this._isLoggedIn;
} }, { key: "isOversea", value: function() {
@@ -14446,7 +14453,7 @@ var chat = { exports: {} };
} }, { key: "getCustomStatus", value: function() {
return this._customStatus;
} }, { key: "getScene", value: function() {
- return Ne2 ? window.tencent_cloud_im_csig_flutter_for_web_25F_cy : this._isTUIKit() ? "tuikit" : this._scene;
+ return Ue2 ? window.tencent_cloud_im_csig_flutter_for_web_25F_cy : this._isTUIKit() ? "tuikit" : this._scene;
} }, { key: "getInstanceID", value: function() {
return this._instanceID;
} }, { key: "getStatusInstanceID", value: function() {
@@ -14482,13 +14489,13 @@ var chat = { exports: {} };
} }, { key: "_isTUIKit", value: function() {
var e3 = false, t3 = false, n3 = false, o3 = false, i4 = [];
v3 && (i4 = Object.keys(I2));
- for (var s4 = 0, a3 = (i4 = Ie2 ? me2 ? Object.keys(index) : Object.keys(window) : i4).length; s4 < a3; s4++)
- if (i4[s4].toLowerCase().includes("uikit")) {
+ for (var a3 = 0, s4 = (i4 = Ce2 ? Me2 ? Object.keys(index) : Object.keys(window) : i4).length; a3 < s4; a3++)
+ if (i4[a3].toLowerCase().includes("uikit")) {
e3 = true;
break;
}
- var r4, i4 = null, c3 = (v3 && !ct2(I2.createGamePortal) && ct2(getApp) && !N3(getApp()) && (r4 = getApp().globalData, m2(r4)) && true === r4.isTUIKit && (t3 = true), true === this._m.get(13).getStorageSync("TIM_".concat(this._SDKAppID, "_isTUIKit")) && (n3 = true), null);
- if (le2 && !_e2 && "undefined" == typeof index && __wxConfig && (c3 = __wxConfig.pages), pe2 && "undefined" == typeof index && __qqConfig && (c3 = __qqConfig.pages), O2(c3) && 0 < c3.length) {
+ var r4, i4 = null, c3 = (v3 && !dt2(I2.createGamePortal) && dt2(getApp) && !N3(getApp()) && (r4 = getApp().globalData, m2(r4)) && true === r4.isTUIKit && (t3 = true), true === this._m.get(13).getStorageSync("TIM_".concat(this._SDKAppID, "_isTUIKit")) && (n3 = true), null);
+ if (_e2 && !fe2 && "undefined" == typeof index && __wxConfig && (c3 = __wxConfig.pages), ge2 && "undefined" == typeof index && __qqConfig && (c3 = __qqConfig.pages), O2(c3) && 0 < c3.length) {
for (var u3 = 0, l3 = c3.length; u3 < l3; u3++)
if (c3[u3].toLowerCase().includes("tui")) {
o3 = true;
@@ -14499,7 +14506,7 @@ var chat = { exports: {} };
return e3 || t3 || n3 || o3;
} }, { key: "reset", value: function() {
this._isLoggedIn = false, this._userSig = "", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._statusInstanceID = 0;
- } }]), _i = { "k-vue2-pc": 1, "k-vue2-h5": 2, "k-vue2-h5-uni": 3, "k-vue2-app-uni": 4, "k-vue2-mp-uni": 5, "k-vue2-pc-uni": 6, "k-vue3-pc": 7, "k-vue3-h5": 8, "k-vue3-h5-uni": 9, "k-vue3-app-uni": 10, "k-vue3-mp-uni": 11, "k-vue3-pc-uni": 12, "k-rn": 13 }, hi = (t2(gi, c2), e2(gi, [{ key: "onCheckTimer", value: function(e3) {
+ } }]), Mi = { "k-vue2-pc": 1, "k-vue2-h5": 2, "k-vue2-h5-uni": 3, "k-vue2-app-uni": 4, "k-vue2-mp-uni": 5, "k-vue2-pc-uni": 6, "k-vue3-pc": 7, "k-vue3-h5": 8, "k-vue3-h5-uni": 9, "k-vue3-app-uni": 10, "k-vue3-mp-uni": 11, "k-vue3-pc-uni": 12, "k-rn": 13 }, yi = (t2(Ci, c2), e2(Ci, [{ key: "onCheckTimer", value: function(e3) {
this.isLoggedIn() && e3 % this._helloInterval == 0 && this._hello();
} }, { key: "getPushModule", value: function() {
var e3 = void 0, t3 = this.get(36), n3 = this.get(28);
@@ -14513,13 +14520,13 @@ var chat = { exports: {} };
var t3, n3 = this._checkLoginInfo(e3);
return 0 !== n3.code ? E2(n3) : (n3 = this.get(12), t3 = e3.userID, e3 = e3.userSig, n3.setUserID(t3), n3.setUserSig(e3), this.get(20).updateProtocolConfig(), this._login());
} }, { key: "_login", value: function() {
- var _3 = this, h3 = this.get(12), g3 = h3.getScene(), e3 = 0, t3 = g3, f3 = (g3 && g3.startsWith("k-") && (t3 = _i[g3], g3 = "tuikit"), new P2("login")), n3 = (f3.setMessage("".concat(t3)).setMoreMessage("identifier:".concat(this.getMyUserID())), "tuikit" === g3), o3 = 0, n3 = (me2 ? o3 = n3 ? 3 === t3 || 4 === t3 || 5 === t3 || 6 === t3 ? 31 : 9 === t3 || 10 === t3 || 11 === t3 || 12 === t3 ? 32 : 4 : 3 : v3 ? o3 = de2 ? 36 : "tuikit" === g3 ? 12 : 11 : Ie2 ? o3 = Ne2 ? "flutter_web_uikit" === g3 ? 21 : 20 : this._isReactUIKit() ? Oe2 ? 25 : 24 : n3 ? 1 === t3 || 2 === t3 ? 29 : 7 === t3 || 8 === t3 ? 30 : Oe2 ? 17 : 14 : Oe2 ? 16 : 13 : 13 === t3 && (o3 = 38), f3.setUIPlatform(o3), h3.setUIPlatform(o3), this.getPushModule()), m3 = (n3 && (this._isWebUniapp = n3.getUniAppPlatform(), t3 = this._getStatusInstanceID(), h3.setStatusInstanceID(t3), this.get(20).updateProtocolConfig(), e3 = n3.getDeviceBrand()), "".concat(this._n, "._login"));
+ var _3 = this, h3 = this.get(12), g3 = h3.getScene(), e3 = 0, t3 = g3, f3 = (g3 && g3.startsWith("k-") && (t3 = Mi[g3], g3 = "tuikit"), new P2("login")), n3 = (f3.setMessage("".concat(t3)).setMoreMessage("identifier:".concat(this.getMyUserID())), "tuikit" === g3), o3 = 0, n3 = (Me2 ? o3 = n3 ? 3 === t3 || 4 === t3 || 5 === t3 || 6 === t3 ? 31 : 9 === t3 || 10 === t3 || 11 === t3 || 12 === t3 ? 32 : 4 : 3 : v3 ? o3 = he2 ? 36 : "tuikit" === g3 ? 12 : 11 : Ce2 ? o3 = Ue2 ? "flutter_web_uikit" === g3 ? 21 : 20 : this._isReactUIKit() ? Pe2 ? 25 : 24 : n3 ? 1 === t3 || 2 === t3 ? 29 : 7 === t3 || 8 === t3 ? 30 : Pe2 ? 17 : 14 : Pe2 ? 16 : 13 : 13 === t3 && (o3 = 38), f3.setUIPlatform(o3), h3.setUIPlatform(o3), this.getPushModule()), m3 = (n3 && (this._isWebUniapp = n3.getUniAppPlatform(), t3 = this._getStatusInstanceID(), h3.setStatusInstanceID(t3), this.get(20).updateProtocolConfig(), e3 = n3.getDeviceBrand()), "".concat(this._n, "._login"));
return this._lastLoginTs = Date.now(), this.req({ P: G2.LOGIN, data: { deviceBrand: e3, isWebUniapp: this._isWebUniapp, customInfo: h3.getCustomLoginInfo() } }).then(function(e4) {
_3._lastLoginTs = 0;
- var t4 = Date.now(), n4 = null, o4 = e4.data, i4 = o4.a2Key, s4 = o4.tinyID, a3 = o4.helloInterval, r4 = o4.instanceID, c3 = o4.timeStamp, u3 = o4.customStatus, u3 = void 0 === u3 ? "" : u3, l3 = o4.purchaseBits, o4 = o4.authKey, o4 = void 0 === o4 ? "" : o4, d3 = 1e3 * c3, p4 = t4 - f3.getStartTs(), p4 = d3 + parseInt(p4 / 2) - t4, t4 = f3.getStartTs() + p4;
- if (f3.start(t4), t4 = d3, Be2 = p4, (d3 = /* @__PURE__ */ new Date()).setTime(t4), M2.i("baseTime from server:".concat(d3, " offset:").concat(Be2)), s4) {
+ var t4 = Date.now(), n4 = null, o4 = e4.data, i4 = o4.a2Key, a3 = o4.tinyID, s4 = o4.helloInterval, r4 = o4.instanceID, c3 = o4.timeStamp, u3 = o4.customStatus, u3 = void 0 === u3 ? "" : u3, l3 = o4.purchaseBits, o4 = o4.authKey, o4 = void 0 === o4 ? "" : o4, d3 = 1e3 * c3, p4 = t4 - f3.getStartTs(), p4 = d3 + parseInt(p4 / 2) - t4, t4 = f3.getStartTs() + p4;
+ if (f3.start(t4), t4 = d3, We2 = p4, (d3 = /* @__PURE__ */ new Date()).setTime(t4), M2.i("baseTime from server:".concat(d3, " offset:").concat(We2)), a3) {
if (i4)
- return t4 = _3.get(21).getSocketID(), d3 = Go(u3), u3 = "socketID:".concat(t4, " scene:").concat(g3, " helloInterval:").concat(a3, " instanceID:").concat(r4, " timeStamp:").concat(c3) + " offset:".concat(p4, " customStatus:").concat(d3, " isWebUniapp:").concat(_3._isWebUniapp), M2.l("".concat(m3, " ok. ").concat(u3)), c3 = t4 = "", le2 && ct2(I2.getAccountInfoSync) && (p4 = I2.getAccountInfoSync().miniProgram) && (t4 = p4.appId, c3 = p4.envVersion), f3.setMoreMessage("".concat(u3, " href:").concat(Ie2 ? window.location.href : "", " mpAppId:").concat(t4, " envVersion:").concat(c3, " authKey:").concat(o4)).end(), h3.setA2Key(i4), h3.setTinyID(s4), h3.setStatusInstanceID(r4), h3.setCustomStatus(d3), h3.setDowloadFileAuthKey(o4), l3 && _3.get(27).onPushedConfig({ errorCode: 0, expiredTime: 0, purchaseBits: l3 }), _3.get(20).updateProtocolConfig(), _3.emitIEvt(U2.A2KEY_AND_TINYID_UPDATED), _3._helloInterval = a3, _3.triggerReady(), (p4 = _3.getPushModule()) && (index.setStorageSync("timUniAppInstanceID", r4), p4.init()), _3._fetchCloudControlConfig(), _3.get(29).init(), e4;
+ return t4 = _3.get(21).getSocketID(), d3 = xo(u3), u3 = "socketID:".concat(t4, " scene:").concat(g3, " helloInterval:").concat(s4, " instanceID:").concat(r4, " timeStamp:").concat(c3) + " offset:".concat(p4, " customStatus:").concat(d3, " isWebUniapp:").concat(_3._isWebUniapp), M2.l("".concat(m3, " ok. ").concat(u3)), c3 = t4 = "", _e2 && dt2(I2.getAccountInfoSync) && (p4 = I2.getAccountInfoSync().miniProgram) && (t4 = p4.appId, c3 = p4.envVersion), f3.setMoreMessage("".concat(u3, " href:").concat(Ce2 ? window.location.href : "", " mpAppId:").concat(t4, " envVersion:").concat(c3, " authKey:").concat(o4)).end(), h3.setA2Key(i4), h3.setTinyID(a3), h3.setStatusInstanceID(r4), h3.setCustomStatus(d3), h3.setDowloadFileAuthKey(o4), l3 && _3.get(27).onPushedConfig({ errorCode: 0, expiredTime: 0, purchaseBits: l3 }), _3.get(20).updateProtocolConfig(), _3.emitIEvt(U2.A2KEY_AND_TINYID_UPDATED), _3._helloInterval = s4, _3.triggerReady(), (p4 = _3.getPushModule()) && (index.setStorageSync("timUniAppInstanceID", r4), p4.init()), _3._fetchCloudControlConfig(), _3.get(29).init(), e4;
n4 = new L2({ code: k2.NO_A2KEY });
} else
n4 = new L2({ code: k2.NO_TINYID });
@@ -14551,7 +14558,7 @@ var chat = { exports: {} };
var t3 = 0;
return S2(this.get(12).getSDKAppID()) ? t3 = k2.NO_SDKAPPID : S2(e3.userID) ? t3 = k2.NO_IDENTIFIER : S2(e3.userSig) && (t3 = k2.NO_USERSIG), { code: t3 };
} }, { key: "_isReactUIKit", value: function() {
- return Ie2 && void 0 !== window.tencent_cloud_im_csig_react_uikit_23F_xa;
+ return Ce2 && void 0 !== window.tencent_cloud_im_csig_react_uikit_23F_xa;
} }, { key: "onMultipleAccountKickedOut", value: function(e3) {
var t3 = this;
new P2("kickedOut").setMessage("type:".concat(R2.KICKED_OUT_MULT_ACCOUNT, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), M2.w("".concat(this._n, ".onMultipleAccountKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), this.logout(1).then(function() {
@@ -14569,32 +14576,32 @@ var chat = { exports: {} };
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this.resetReady(), this._helloInterval = 120, this._lastLoginTs = 0, this._lastWsHelloTs = 0, this._isWebUniapp = 0;
} }]));
- function gi(e3) {
- return p3(this, gi), (e3 = i3(this, gi, [e3]))._n = "SignModule", e3._helloInterval = 120, e3._lastLoginTs = 0, e3._lastWsHelloTs = 0, e3._isWebUniapp = 0, Ao.mixin(e3), e3;
+ function Ci(e3) {
+ return p3(this, Ci), (e3 = i3(this, Ci, [e3]))._n = "SignModule", e3._helloInterval = 120, e3._lastLoginTs = 0, e3._lastWsHelloTs = 0, e3._isWebUniapp = 0, wo.mixin(e3), e3;
}
- function fi(e3) {
- return p3(this, fi), (e3 = i3(this, fi, [e3]))._n = "UserModule", e3._profileHandler = new ri(e3), e3._blacklistHandler = new ui(e3), e3._userStatusHandler = new li(e3), e3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, e3.onContextUpdated, e3), e3;
+ function Ti(e3) {
+ return p3(this, Ti), (e3 = i3(this, Ti, [e3]))._n = "UserModule", e3._profileHandler = new hi(e3), e3._blacklistHandler = new fi(e3), e3._userStatusHandler = new mi(e3), e3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, e3.onContextUpdated, e3), e3;
}
- function mi(e3) {
- return p3(this, mi), (e3 = i3(this, mi, [e3]))._n = "TopicModule", e3._topicMap = /* @__PURE__ */ new Map(), e3._getTopicTimeMap = /* @__PURE__ */ new Map(), e3.TOPIC_CACHE_TIME = 300, e3.TOPIC_LAST_ACTIVE_TIME = 3600, e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
+ function Di(e3) {
+ return p3(this, Di), (e3 = i3(this, Di, [e3]))._n = "TopicModule", e3._topicMap = /* @__PURE__ */ new Map(), e3._getTopicTimeMap = /* @__PURE__ */ new Map(), e3.TOPIC_CACHE_TIME = 300, e3.TOPIC_LAST_ACTIVE_TIME = 3600, e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function vi(e3) {
- return p3(this, vi), (e3 = i3(this, vi, [e3]))._n = "GroupModule", e3._commonGroupHandler = new Yo(e3), e3._groupAttributesHandler = new jo(e3), e3._groupCountersHandler = new Jo(e3), e3._AVChatRoomHandler = new Zo(e3), e3._groupTipsHandler = new Wo(e3), e3._groupSystemNoticeHandler = new ti(e3), e3._groupMemberHandler = new $o(e3), e3.groupMap = /* @__PURE__ */ new Map(), e3._unjoinedAVChatRoomList = /* @__PURE__ */ new Map(), e3._receiptDetailCompleteMap = /* @__PURE__ */ new Map(), e3._onlineMemberCountMap = /* @__PURE__ */ new Map(), e3._timeoutIDs = [], e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
+ function Ei(e3) {
+ return p3(this, Ei), (e3 = i3(this, Ei, [e3]))._n = "GroupModule", e3._commonGroupHandler = new $o(e3), e3._groupAttributesHandler = new ei(e3), e3._groupCountersHandler = new ti(e3), e3._AVChatRoomHandler = new ii(e3), e3._groupTipsHandler = new Qo(e3), e3._groupSystemNoticeHandler = new ci(e3), e3._groupMemberHandler = new si(e3), e3.groupMap = /* @__PURE__ */ new Map(), e3._unjoinedAVChatRoomList = /* @__PURE__ */ new Map(), e3._receiptDetailCompleteMap = /* @__PURE__ */ new Map(), e3._onlineMemberCountMap = /* @__PURE__ */ new Map(), e3._timeoutIDs = [], e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function Ii(e3) {
- return p3(this, Ii), (e3 = i3(this, Ii, [e3]))._n = "ConvModule", Ao.mixin(e3), e3._msgListHandler = new ko(e3), e3._msgRemindHandler = new Bo(e3), e3._convGroupHandler = new Ho(e3), e3._sll = new wo(100), e3._pagingStatus = Gn, e3._pagingTs = 0, e3._pagingStartIdx = 0, e3._pagingPinnedTs = 0, e3._pagingPinnedStartIdx = 0, e3._pagingConvIDMap = /* @__PURE__ */ new Map(), e3._convIDFromUnreadDBMap = /* @__PURE__ */ new Map(), e3._convMap = /* @__PURE__ */ new Map(), e3._tmpGroupList = [], e3._tmpGroupAtTipsList = [], e3._peerReadTimeMap = /* @__PURE__ */ new Map(), e3._completedMap = /* @__PURE__ */ new Map(), e3._roamingMsgKeyAndTimeMap = /* @__PURE__ */ new Map(), e3._remoteGroupReadSeqMap = /* @__PURE__ */ new Map(), e3._convTotalUnreadCount = 0, e3._pagingGetCostList = [], e3._convMapForDiff = /* @__PURE__ */ new Map(), e3._partialUpdatedConvMap = /* @__PURE__ */ new Map(), e3._everClearedMap = /* @__PURE__ */ new Map(), e3._bPullOnInvite = true, e3._initListeners(), e3;
+ function Li(e3) {
+ return p3(this, Li), (e3 = i3(this, Li, [e3]))._n = "ConvModule", wo.mixin(e3), e3._msgListHandler = new Uo(e3), e3._msgRemindHandler = new zo(e3), e3._convGroupHandler = new Xo(e3), e3._sll = new Ko(100), e3._pagingStatus = bn, e3._pagingTs = 0, e3._pagingStartIdx = 0, e3._pagingPinnedTs = 0, e3._pagingPinnedStartIdx = 0, e3._pagingConvIDMap = /* @__PURE__ */ new Map(), e3._convIDFromUnreadDBMap = /* @__PURE__ */ new Map(), e3._convMap = /* @__PURE__ */ new Map(), e3._tmpGroupList = [], e3._tmpGroupAtTipsList = [], e3._peerReadTimeMap = /* @__PURE__ */ new Map(), e3._completedMap = /* @__PURE__ */ new Map(), e3._roamingMsgKeyAndTimeMap = /* @__PURE__ */ new Map(), e3._remoteGroupReadSeqMap = /* @__PURE__ */ new Map(), e3._convTotalUnreadCount = 0, e3._pagingGetCostList = [], e3._convMapForDiff = /* @__PURE__ */ new Map(), e3._partialUpdatedConvMap = /* @__PURE__ */ new Map(), e3._everClearedMap = /* @__PURE__ */ new Map(), e3._bPullOnInvite = true, e3._initListeners(), e3;
}
- function Mi() {
+ function Si() {
return null;
}
- function yi(e3) {
+ function ki(e3) {
var t3 = e3.get(12);
- return { SDKType: 10, SDKAppID: t3.getSDKAppID(), SDKVersion: t3.getVersion(), tinyID: Number(t3.getTinyID()), userID: t3.getUserID(), platform: e3.getPlatform(), instanceID: t3.getInstanceID(), traceID: He2() };
+ return { SDKType: 10, SDKAppID: t3.getSDKAppID(), SDKVersion: t3.getVersion(), tinyID: Number(t3.getTinyID()), userID: t3.getUserID(), platform: e3.getPlatform(), instanceID: t3.getInstanceID(), traceID: Ye2() };
}
- var Ci = e2(function e3(t3) {
+ var Ri = e2(function e3(t3) {
p3(this, e3), this._m = t3, this._n = "StorageModule", this._storageQueue = /* @__PURE__ */ new Map(), this._errorTolerantHandle();
}, [{ key: "_errorTolerantHandle", value: function() {
- v3 || "undefined" != typeof window && this._canIUseCookies() || (this.getItem = Mi, this.setItem = Mi, this.removeItem = Mi, this.clear = Mi);
+ v3 || "undefined" != typeof window && this._canIUseCookies() || (this.getItem = Si, this.setItem = Si, this.removeItem = Si, this.clear = Si);
} }, { key: "onCheckTimer", value: function(e3) {
e3 % 20 == 0 && 0 !== this._storageQueue.size && this._doFlush();
} }, { key: "_doFlush", value: function() {
@@ -14669,16 +14676,16 @@ var chat = { exports: {} };
"number" == typeof e3[t3] && ("kb" === o3.toLowerCase() ? n3[t3] = Math.round(e3[t3] / 1024) : "mb" === o3.toLowerCase() ? n3[t3] = Math.round(e3[t3] / 1024 / 1024) : n3[t3] = e3[t3]);
return n3;
} }, { key: "_setStorageSync", value: function(e3, t3) {
- v3 ? ge2 ? my.setStorageSync({ key: e3, data: t3 }) : I2.setStorageSync(e3, t3) : this._canIUseCookies() && localStorage.setItem(e3, JSON.stringify(t3));
+ v3 ? ve2 ? my.setStorageSync({ key: e3, data: t3 }) : I2.setStorageSync(e3, t3) : this._canIUseCookies() && localStorage.setItem(e3, JSON.stringify(t3));
} }, { key: "getStorageSync", value: function(e3) {
- return v3 ? ge2 ? my.getStorageSync({ key: e3 }).data : I2.getStorageSync(e3) : this._canIUseCookies() ? JSON.parse(localStorage.getItem(e3)) : {};
+ return v3 ? ve2 ? my.getStorageSync({ key: e3 }).data : I2.getStorageSync(e3) : this._canIUseCookies() ? JSON.parse(localStorage.getItem(e3)) : {};
} }, { key: "_removeStorageSync", value: function(e3) {
- v3 ? ge2 ? my.removeStorageSync({ key: e3 }) : I2.removeStorageSync(e3) : this._canIUseCookies() && localStorage.removeItem(e3);
+ v3 ? ve2 ? my.removeStorageSync({ key: e3 }) : I2.removeStorageSync(e3) : this._canIUseCookies() && localStorage.removeItem(e3);
} }, { key: "_canIUseCookies", value: function() {
return "undefined" != typeof window && navigator && navigator.cookieEnabled && localStorage;
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._doFlush();
- } }]), Ti = e2(function e3(t3) {
+ } }]), Ai = e2(function e3(t3) {
p3(this, e3), this._n = "SSOLogBody", this._report = [];
}, [{ key: "pushIn", value: function(e3) {
M2.d("".concat(this._n, ".pushIn"), this._report.length, e3), this._report.push(e3);
@@ -14694,11 +14701,11 @@ var chat = { exports: {} };
} }, { key: "getLogsInMemory", value: function() {
var e3 = this._report.slice();
return this._reset(), e3;
- } }]), Di = (t2(ki, c2), e2(ki, [{ key: "reportAtOnce", value: function() {
+ } }]), Oi = (t2(Ui, c2), e2(Ui, [{ key: "reportAtOnce", value: function() {
this._report();
} }, { key: "_onLoginSuccess", value: function() {
var t3 = this, e3 = this.get(13), n3 = e3.getItem(this.TAG, false);
- !S2(n3) && ct2(n3.forEach) && (M2.l("".concat(this._n, "._onLoginSuccess. logs count:").concat(n3.length)), n3.forEach(function(e4) {
+ !S2(n3) && dt2(n3.forEach) && (M2.l("".concat(this._n, "._onLoginSuccess. logs count:").concat(n3.length)), n3.forEach(function(e4) {
t3._reportBody.pushIn(e4);
}), e3.removeItem(this.TAG, false));
} }, { key: "_onCloudConfig", value: function() {
@@ -14714,12 +14721,12 @@ var chat = { exports: {} };
Date.now() < this._lastReportTime + this.WAITING_TIME || this._reportBody.isEmpty() || this._report();
} }, { key: "_filterLogs", value: function(e3) {
var t3 = this, n3 = this.get(12), o3 = n3.getSDKAppID(), n3 = n3.getTinyID();
- return Wt2(this.REPORT_SDKAPPID_BLACKLIST, o3) && !Yt2(this.REPORT_TINYID_WHITELIST, n3) ? [] : e3.filter(function(e4) {
+ return Jt2(this.REPORT_SDKAPPID_BLACKLIST, o3) && !zt(this.REPORT_TINYID_WHITELIST, n3) ? [] : e3.filter(function(e4) {
return t3.REPORT_LEVEL.includes(e4.level);
});
} }, { key: "_report", value: function() {
var t3, e3, n3 = this;
- this._reportBody.isEmpty() || (t3 = this._reportBody.getLogsInMemory(), 0 !== (e3 = this._filterLogs(t3)).length ? (e3 = { header: yi(this), event: e3 }, this.req({ P: G2.SSO_STAT, data: y2({}, e3) }).then(function() {
+ this._reportBody.isEmpty() || (t3 = this._reportBody.getLogsInMemory(), 0 !== (e3 = this._filterLogs(t3)).length ? (e3 = { header: ki(this), event: e3 }, this.req({ P: G2.SSO_STAT, data: y2({}, e3) }).then(function() {
n3._lastReportTime = Date.now();
}).catch(function(e4) {
M2.w("".concat(n3._n, "._report failed. error:"), e4), n3._lastReportTime = Date.now(), n3._reportBody.backfill(t3), n3._reportBody.getLogsNumInMemory() > n3.MAX_THRESHOLD && n3._flushAtOnce();
@@ -14729,52 +14736,52 @@ var chat = { exports: {} };
S2(t3) ? (M2.l("".concat(o3, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false)) : ((n3 = n3.concat(t3)).length > this.MAX_THRESHOLD && (n3 = n3.slice(0, this.MAX_THRESHOLD)), M2.l("".concat(o3, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false));
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._lastReportTime = 0, this._report(), this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [];
- } }])), Ei = "none", Li = "online", Si = e2(function e3(t3) {
- p3(this, e3), this._m = t3, this._networkType = Li, this._n = "NetMonitorModule", this._mpNetworkStatusCallback = null, this._webOnlineCallback = null, this._webOfflineCallback = null, this._removeListener = null, this._m.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, this._startRN, this);
+ } }])), Ni = "none", Gi = "online", Pi = e2(function e3(t3) {
+ p3(this, e3), this._m = t3, this._networkType = Gi, this._n = "NetMonitorModule", this._mpNetworkStatusCallback = null, this._webOnlineCallback = null, this._webOfflineCallback = null, this._removeListener = null, this._m.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, this._startRN, this);
}, [{ key: "_startRN", value: function() {
var e3, n3 = this;
- ve2 && (e3 = this._m.get(18).getPlugin("chat-network-monitor")) && (this._removeListener = e3.addEventListener(function(e4) {
+ ye2 && (e3 = this._m.get(18).getPlugin("chat-network-monitor")) && (this._removeListener = e3.addEventListener(function(e4) {
var t3 = e4.isConnected, e4 = e4.type;
n3._networkType !== e4 && n3._onNetworkStatusChange({ isConnected: void 0 !== t3 && t3, networkType: e4 });
}));
} }, { key: "start", value: function() {
var t3 = this, n3 = "".concat(this._n, ".start");
v3 ? (I2.getNetworkType({ success: function(e3) {
- t3._networkType = e3.networkType || e3.subtype || "", e3.networkType === Ei ? M2.w("".concat(n3, " no network, please check!")) : M2.i("".concat(n3, " networkType:").concat(e3.networkType));
- } }), this._mpNetworkStatusCallback = this._onNetworkStatusChange.bind(this), I2.onNetworkStatusChange(this._mpNetworkStatusCallback)) : Ie2 && (this._networkType = Li, this._webOnlineCallback = this._onWebOnline.bind(this), this._webOfflineCallback = this._onWebOffline.bind(this), window.addEventListener("online", this._webOnlineCallback), window.addEventListener("offline", this._webOfflineCallback));
+ t3._networkType = e3.networkType || e3.subtype || "", e3.networkType === Ni ? M2.w("".concat(n3, " no network, please check!")) : M2.i("".concat(n3, " networkType:").concat(e3.networkType));
+ } }), this._mpNetworkStatusCallback = this._onNetworkStatusChange.bind(this), I2.onNetworkStatusChange(this._mpNetworkStatusCallback)) : Ce2 && (this._networkType = Gi, this._webOnlineCallback = this._onWebOnline.bind(this), this._webOfflineCallback = this._onWebOffline.bind(this), window.addEventListener("online", this._webOnlineCallback), window.addEventListener("offline", this._webOfflineCallback));
} }, { key: "_onWebOnline", value: function() {
- this._onNetworkStatusChange({ isConnected: true, networkType: Li });
+ this._onNetworkStatusChange({ isConnected: true, networkType: Gi });
} }, { key: "_onWebOffline", value: function() {
- this._onNetworkStatusChange({ isConnected: false, networkType: Ei });
+ this._onNetworkStatusChange({ isConnected: false, networkType: Ni });
} }, { key: "_onNetworkStatusChange", value: function(e3) {
var t3 = e3.isConnected, e3 = e3.networkType, n3 = "".concat(this._n, "._onNetworkStatusChange"), o3 = false, i4 = "previous:".concat(this._networkType, " current:").concat(e3);
t3 ? (M2.i("".concat(n3, " ").concat(i4)), this._networkType !== e3 && (o3 = true, this._networkType = e3, this._m.get(21).reConnect(true))) : this._networkType !== e3 && (o3 = true, this._networkType = e3, M2.w("".concat(n3, " no network, please check!")), this._m.get(21).offline()), o3 && new P2("networkChange").setMessage("isConnected:".concat(t3, " ").concat(i4)).end();
} }, { key: "isOnline", value: function() {
- return this._networkType !== Ei;
+ return this._networkType !== Ni;
} }, { key: "getNetworkType", value: function() {
return this._networkType;
} }, { key: "reset", value: function() {
- M2.l("".concat(this._n, ".reset")), v3 ? null !== this._mpNetworkStatusCallback && (I2.offNetworkStatusChange && I2.offNetworkStatusChange(this._mpNetworkStatusCallback), this._mpNetworkStatusCallback = null) : Ie2 ? (null !== this._webOnlineCallback && (window.removeEventListener("online", this._webOnlineCallback), this._webOnlineCallback = null), null !== this._onWebOffline && (window.removeEventListener("offline", this._webOfflineCallback), this._webOfflineCallback = null)) : ve2 && this._removeListener && (this._removeListener(), this._removeListener = null);
+ M2.l("".concat(this._n, ".reset")), v3 ? null !== this._mpNetworkStatusCallback && (I2.offNetworkStatusChange && I2.offNetworkStatusChange(this._mpNetworkStatusCallback), this._mpNetworkStatusCallback = null) : Ce2 ? (null !== this._webOnlineCallback && (window.removeEventListener("online", this._webOnlineCallback), this._webOnlineCallback = null), null !== this._onWebOffline && (window.removeEventListener("offline", this._webOfflineCallback), this._webOfflineCallback = null)) : ye2 && this._removeListener && (this._removeListener(), this._removeListener = null);
} }]);
- function ki(e3) {
- p3(this, ki), (e3 = i3(this, ki, [e3]))._n = "EventStatModule", e3.TAG = "im-ssolog-event", e3._reportBody = new Ti(), e3.MIN_THRESHOLD = 20, e3.MAX_THRESHOLD = 100, e3.WAITING_TIME = 6e4, e3.REPORT_LEVEL = [4, 5, 6], e3.REPORT_SDKAPPID_BLACKLIST = [], e3.REPORT_TINYID_WHITELIST = [], e3._lastReportTime = Date.now();
+ function Ui(e3) {
+ p3(this, Ui), (e3 = i3(this, Ui, [e3]))._n = "EventStatModule", e3.TAG = "im-ssolog-event", e3._reportBody = new Ai(), e3.MIN_THRESHOLD = 20, e3.MAX_THRESHOLD = 100, e3.WAITING_TIME = 6e4, e3.REPORT_LEVEL = [4, 5, 6], e3.REPORT_SDKAPPID_BLACKLIST = [], e3.REPORT_TINYID_WHITELIST = [], e3._lastReportTime = Date.now();
var t3 = e3.getIEmitInst();
return t3.on(U2.A2KEY_AND_TINYID_UPDATED, e3._onLoginSuccess, e3), t3.on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function Ri(e3, t3) {
+ function bi(e3, t3) {
return e3(t3 = { exports: {} }, t3.exports), t3.exports;
}
- var Ai = Ri(function(e3) {
+ var wi = bi(function(e3) {
var o3 = Object.prototype.hasOwnProperty, _3 = "~";
function n3() {
}
- function s4(e4, t4, n4) {
+ function a3(e4, t4, n4) {
this.fn = e4, this.context = t4, this.once = n4 || false;
}
function i4(e4, t4, n4, o4, i5) {
if ("function" != typeof n4)
throw new TypeError("The listener must be a function");
- n4 = new s4(n4, o4 || e4, i5), o4 = _3 ? _3 + t4 : t4;
+ n4 = new a3(n4, o4 || e4, i5), o4 = _3 ? _3 + t4 : t4;
return e4._events[o4] ? e4._events[o4].fn ? e4._events[o4] = [e4._events[o4], n4] : e4._events[o4].push(n4) : (e4._events[o4] = n4, e4._eventsCount++), e4;
}
function c3(e4, t4) {
@@ -14802,11 +14809,11 @@ var chat = { exports: {} };
}, t3.prototype.listenerCount = function(e4) {
e4 = _3 ? _3 + e4 : e4, e4 = this._events[e4];
return e4 ? e4.fn ? 1 : e4.length : 0;
- }, t3.prototype.emit = function(e4, t4, n4, o4, i5, s5) {
- var a3 = _3 ? _3 + e4 : e4;
- if (!this._events[a3])
+ }, t3.prototype.emit = function(e4, t4, n4, o4, i5, a4) {
+ var s4 = _3 ? _3 + e4 : e4;
+ if (!this._events[s4])
return false;
- var r4, c4 = this._events[a3], u3 = arguments.length;
+ var r4, c4 = this._events[s4], u3 = arguments.length;
if (c4.fn) {
switch (c4.once && this.removeListener(e4, c4.fn, void 0, true), u3) {
case 1:
@@ -14820,7 +14827,7 @@ var chat = { exports: {} };
case 5:
return c4.fn.call(c4.context, t4, n4, o4, i5), true;
case 6:
- return c4.fn.call(c4.context, t4, n4, o4, i5, s5), true;
+ return c4.fn.call(c4.context, t4, n4, o4, i5, a4), true;
}
for (p4 = 1, r4 = new Array(u3 - 1); p4 < u3; p4++)
r4[p4 - 1] = arguments[p4];
@@ -14859,9 +14866,9 @@ var chat = { exports: {} };
if (i5.fn)
i5.fn !== t4 || o4 && !i5.once || n4 && i5.context !== n4 || c3(this, e4);
else {
- for (var s5 = 0, a3 = [], r4 = i5.length; s5 < r4; s5++)
- (i5[s5].fn !== t4 || o4 && !i5[s5].once || n4 && i5[s5].context !== n4) && a3.push(i5[s5]);
- a3.length ? this._events[e4] = 1 === a3.length ? a3[0] : a3 : c3(this, e4);
+ for (var a4 = 0, s4 = [], r4 = i5.length; a4 < r4; a4++)
+ (i5[a4].fn !== t4 || o4 && !i5[a4].once || n4 && i5[a4].context !== n4) && s4.push(i5[a4]);
+ s4.length ? this._events[e4] = 1 === s4.length ? s4[0] : s4 : c3(this, e4);
}
} else
c3(this, e4);
@@ -14869,7 +14876,7 @@ var chat = { exports: {} };
}, t3.prototype.removeAllListeners = function(e4) {
return e4 ? (e4 = _3 ? _3 + e4 : e4, this._events[e4] && c3(this, e4)) : (this._events = new n3(), this._eventsCount = 0), this;
}, t3.prototype.off = t3.prototype.removeListener, t3.prototype.addListener = t3.prototype.on, t3.prefixed = _3, e3.exports = t3.EventEmitter = t3;
- }), Oi = ["rich.my-imcloud.com", "imrich.qcloud.com"], Ni = ["requestSnapshotUrl"], Gi = (t2(Fi, c2), e2(Fi, [{ key: "_init", value: function() {
+ }), Fi = ["rich.my-imcloud.com", "imrich.qcloud.com"], qi = ["requestSnapshotUrl"], xi = (t2(Wi, c2), e2(Wi, [{ key: "_init", value: function() {
this._fileDownloadProxy = this.getFileDownloadProxy(), this._authKey = this.getDownloadFileAuthKey();
var e3 = this.get(18);
this.TIMUploadPlugin = e3.getPlugin("tim-upload-plugin"), this.TIMUploadPlugin ? this._initUploaderMethod() : (this.COSSDK = e3.getPlugin(e3 = v3 ? "cos-wx-sdk" : "cos-js-sdk"), this.COSSDK ? (this._getAuthorizationKey(), this.warn("CosReplacement", e3)) : this.warn("PluginUndetected"));
@@ -14877,8 +14884,8 @@ var chat = { exports: {} };
var t3 = this, e3 = "".concat(this._n, "._onCloudConfig"), n3 = this.getCloudConfig("upload_size_limit"), o3 = this.getCloudConfig("simple_cos"), i4 = this.getCloudConfig("file_dn_list");
if (M2.l("".concat(e3, " uploadSizeLimit:").concat(n3, " simpleCos:").concat(o3)), !N3(n3))
try {
- var s4 = JSON.parse(n3);
- this.UPLOAD_SIZE_LIMIT = { A: s4.a ? 1048576 * parseInt(s4.a) : this.UPLOAD_SIZE_LIMIT.A, F: s4.f ? 1048576 * parseInt(s4.f) : this.UPLOAD_SIZE_LIMIT.F, I: s4.i ? 1048576 * parseInt(s4.i) : this.UPLOAD_SIZE_LIMIT.I, V: s4.v ? 1048576 * parseInt(s4.v) : this.UPLOAD_SIZE_LIMIT.V };
+ var a3 = JSON.parse(n3);
+ this.UPLOAD_SIZE_LIMIT = { A: a3.a ? 1048576 * parseInt(a3.a) : this.UPLOAD_SIZE_LIMIT.A, F: a3.f ? 1048576 * parseInt(a3.f) : this.UPLOAD_SIZE_LIMIT.F, I: a3.i ? 1048576 * parseInt(a3.i) : this.UPLOAD_SIZE_LIMIT.I, V: a3.v ? 1048576 * parseInt(a3.v) : this.UPLOAD_SIZE_LIMIT.V };
} catch (e4) {
}
if (N3(o3) || (this.isSimpleCos = "1" === o3), !N3(i4))
@@ -14889,21 +14896,21 @@ var chat = { exports: {} };
} catch (e4) {
}
} }, { key: "_getAuthorizationKey", value: function() {
- var n3 = this, o3 = "".concat(this._n, ".").concat("_getAuthorizationKey"), i4 = new P2("_getAuthorizationKey"), s4 = Math.ceil(Date.now() / 1e3);
+ var n3 = this, o3 = "".concat(this._n, ".").concat("_getAuthorizationKey"), i4 = new P2("_getAuthorizationKey"), a3 = Math.ceil(Date.now() / 1e3);
this.req({ P: G2.COS_SIGN, data: { duration: this.expiredTimeLimit } }).then(function(e3) {
- var e3 = e3.data, t3 = (M2.l("".concat(o3, " ok. data:"), e3), e3.expiredTime - s4);
- i4.setMessage("requestId:".concat(e3.requestId, " requestTime:").concat(s4, " expiredTime:").concat(e3.expiredTime, " diff:").concat(t3, "s")).end(), !v3 && e3.region && (n3.region = e3.region), n3.appid = e3.appid, n3.bucketName = e3.bucketName, n3.ciUrl = e3.ciUrl, n3.directory = e3.directory, n3.downloadUrl = e3.downloadUrl, n3.uploadUrl = e3.uploadUrl, n3.cosOptions = { secretId: e3.secretId, secretKey: e3.secretKey, sessionToken: e3.sessionToken, expiredTime: e3.expiredTime }, M2.l("".concat(o3, " ok. region:").concat(n3.region, " bucketName:").concat(n3.bucketName)), n3._initUploaderMethod();
+ var e3 = e3.data, t3 = (M2.l("".concat(o3, " ok. data:"), e3), e3.expiredTime - a3);
+ i4.setMessage("requestId:".concat(e3.requestId, " requestTime:").concat(a3, " expiredTime:").concat(e3.expiredTime, " diff:").concat(t3, "s")).end(), !v3 && e3.region && (n3.region = e3.region), n3.appid = e3.appid, n3.bucketName = e3.bucketName, n3.ciUrl = e3.ciUrl, n3.directory = e3.directory, n3.downloadUrl = e3.downloadUrl, n3.uploadUrl = e3.uploadUrl, n3.cosOptions = { secretId: e3.secretId, secretKey: e3.secretKey, sessionToken: e3.sessionToken, expiredTime: e3.expiredTime }, M2.l("".concat(o3, " ok. region:").concat(n3.region, " bucketName:").concat(n3.bucketName)), n3._initUploaderMethod();
}).catch(function(e3) {
i4.setError(e3).end(), M2.w("".concat(o3, " failed. error:"), e3);
});
} }, { key: "_getCosPreSigUrl", value: function(t3) {
- var i4 = this, s4 = "".concat(this._n, ".").concat("_getCosPreSigUrl"), a3 = Math.ceil(Date.now() / 1e3), r4 = new P2("_getCosPreSigUrl"), e3 = { uploadMethod: t3.uploadMethod, platform: this.getPlatform(), SDKAppID: this.getSDKAppID(), userID: t3.userID, conversationType: t3.conversationType, uploadConfig: [{ fileID: 1, fileType: t3.fileType, fileName: t3.fileName }] }, n3 = G2.SIMPLE_COS_PRE_SIG;
+ var i4 = this, a3 = "".concat(this._n, ".").concat("_getCosPreSigUrl"), s4 = Math.ceil(Date.now() / 1e3), r4 = new P2("_getCosPreSigUrl"), e3 = { uploadMethod: t3.uploadMethod, platform: this.getPlatform(), SDKAppID: this.getSDKAppID(), userID: t3.userID, conversationType: t3.conversationType, uploadConfig: [{ fileID: 1, fileType: t3.fileType, fileName: t3.fileName }] }, n3 = G2.SIMPLE_COS_PRE_SIG;
return this.isSimpleCos || (e3 = { fileType: t3.fileType, fileName: t3.fileName, uploadMethod: t3.uploadMethod, duration: t3.duration }, n3 = G2.COS_PRE_SIG), this.req({ P: n3, data: e3 }).then(function(e4) {
i4.tryCount = 0;
- var t4, n4, e4 = e4.data || {}, o3 = (M2.l("".concat(s4, " ok. isSimpleCos:").concat(i4.isSimpleCos, " data:"), e4), "");
- return o3 = i4.isSimpleCos ? (t4 = (n4 = e4.preSig[0]).uploadUrl, n4 = n4.fileKey, "uploadIP:".concat(e4.uploadIP, " uploadUrl:").concat(t4, " fileKey:").concat(n4, " cost:").concat(tn(a3))) : "requestId:".concat(e4.requestId, " expiredTime:").concat(e4.expiredTime, " diff:").concat(e4.expiredTime - a3, "s"), r4.setMessage(o3).end(), e4;
+ var t4, n4, e4 = e4.data || {}, o3 = (M2.l("".concat(a3, " ok. isSimpleCos:").concat(i4.isSimpleCos, " data:"), e4), "");
+ return o3 = i4.isSimpleCos ? (t4 = (n4 = e4.preSig[0]).uploadUrl, n4 = n4.fileKey, "uploadIP:".concat(e4.uploadIP, " uploadUrl:").concat(t4, " fileKey:").concat(n4, " cost:").concat(an(s4))) : "requestId:".concat(e4.requestId, " expiredTime:").concat(e4.expiredTime, " diff:").concat(e4.expiredTime - s4, "s"), r4.setMessage(o3).end(), e4;
}).catch(function(e4) {
- return -1 === e4.code && (e4.code = k2.COS_GET_SIG_FAIL), r4.setError(e4).end(), M2.w("".concat(s4, " failed. error:"), e4), i4.tryCount < 1 ? (i4.tryCount++, i4._getCosPreSigUrl(t3)) : (i4.tryCount = 0, E2({ code: k2.COS_GET_SIG_FAIL }));
+ return -1 === e4.code && (e4.code = k2.COS_GET_SIG_FAIL), r4.setError(e4).end(), M2.w("".concat(a3, " failed. error:"), e4), i4.tryCount < 1 ? (i4.tryCount++, i4._getCosPreSigUrl(t3)) : (i4.tryCount = 0, E2({ code: k2.COS_GET_SIG_FAIL }));
});
} }, { key: "_initUploaderMethod", value: function() {
var n3 = this;
@@ -14926,42 +14933,42 @@ var chat = { exports: {} };
var t3 = this.get(26);
switch (e3.type) {
case R2.MSG_IMAGE:
- return t3.addTotalCount(Jn), this._uploadImage(e3);
+ return t3.addTotalCount(Zn), this._uploadImage(e3);
case R2.MSG_FILE:
- return t3.addTotalCount(Jn), this._uploadFile(e3);
+ return t3.addTotalCount(Zn), this._uploadFile(e3);
case R2.MSG_AUDIO:
- return t3.addTotalCount(Jn), this._uploadAudio(e3);
+ return t3.addTotalCount(Zn), this._uploadAudio(e3);
case R2.MSG_VIDEO:
- return t3.addTotalCount(Jn), this._uploadVideo(e3);
+ return t3.addTotalCount(Zn), this._uploadVideo(e3);
default:
return Promise.resolve();
}
} }, { key: "_uploadImage", value: function(v4) {
var I3 = this, e3 = this.get(2), M3 = v4.getElements()[0], t3 = e3.getMessageOption(v4.clientSequence);
return this.doUploadImage({ file: t3.payload.file, to: t3.to, message: v4, onProgress: function(e4) {
- if (M3.updatePercent(e4), ct2(t3.onProgress))
+ if (M3.updatePercent(e4), dt2(t3.onProgress))
try {
t3.onProgress(e4);
} catch (e5) {
return E2({ code: k2.MSG_ONPROGRESS_ERR });
}
} }).then(function(e4) {
- var t4 = e4.location, n3 = e4.fileType, o3 = e4.fileSize, i4 = e4.width, s4 = e4.height, a3 = e4.smallImageUrl, r4 = e4.smallImageWidth, c3 = e4.smallImageHeight, u3 = e4.largeImageUrl, l3 = e4.largeImageWidth, d3 = e4.largeImageHeight, p4 = e4.imageInfoArray, e4 = I3.isPrivateNetWork() ? t4 : mt2(t4);
+ var t4 = e4.location, n3 = e4.fileType, o3 = e4.fileSize, i4 = e4.width, a3 = e4.height, s4 = e4.smallImageUrl, r4 = e4.smallImageWidth, c3 = e4.smallImageHeight, u3 = e4.largeImageUrl, l3 = e4.largeImageWidth, d3 = e4.largeImageHeight, p4 = e4.imageInfoArray, e4 = I3.isPrivateNetWork() ? t4 : Mt2(t4);
M3.updateImageFormat(n3);
- var _3, h3, g3 = { size: o3, url: e4, width: i4, height: s4 };
+ var _3, h3, g3 = { size: o3, url: e4, width: i4, height: a3 };
if (p4 && 0 < p4.length)
for (var f3 = 0; f3 < p4.length; f3++) {
var m3 = p4[f3];
1 === m3.type ? _3 = m3 : 2 === m3.type ? h3 = m3 : g3 = y2(y2({}, g3), m3);
}
else
- h3 = a3 && u3 ? (_3 = { url: a3, width: r4, height: c3 }, { url: u3, width: l3, height: d3 }) : (_3 = Vt2({ originUrl: e4, originWidth: i4, originHeight: s4, min: 198 }), Vt2({ originUrl: e4, originWidth: i4, originHeight: s4, min: 720 }));
+ h3 = s4 && u3 ? (_3 = { url: s4, width: r4, height: c3 }, { url: u3, width: l3, height: d3 }) : (_3 = Kt2({ originUrl: e4, originWidth: i4, originHeight: a3, min: 198 }), Kt2({ originUrl: e4, originWidth: i4, originHeight: a3, min: 720 }));
return M3.updateImageInfoArray([y2({}, g3), y2({}, h3), y2({}, _3)]), v4;
});
} }, { key: "_uploadFile", value: function(n3) {
var o3 = this, e3 = this.get(2), i4 = n3.getElements()[0], t3 = e3.getMessageOption(n3.clientSequence);
return this.doUploadFile({ file: t3.payload.file, to: t3.to, message: n3, onProgress: function(e4) {
- if (i4.updatePercent(e4), ct2(t3.onProgress))
+ if (i4.updatePercent(e4), dt2(t3.onProgress))
try {
t3.onProgress(e4);
} catch (e5) {
@@ -14969,42 +14976,42 @@ var chat = { exports: {} };
}
} }).then(function(e4) {
var e4 = e4.location, t4 = e4;
- return o3.isPrivateNetWork() || (t4 = so(t4 = mt2(e4), o3._fileDownloadProxy, o3._authKey, o3._fileDNList)), i4.updateFileUrl(t4), n3;
+ return o3.isPrivateNetWork() || (t4 = co(t4 = Mt2(e4), o3._fileDownloadProxy, o3._authKey, o3._fileDNList)), i4.updateFileUrl(t4), n3;
});
} }, { key: "_uploadAudio", value: function(t3) {
var n3 = this, e3 = this.get(2), o3 = t3.getElements()[0], i4 = e3.getMessageOption(t3.clientSequence);
return this.doUploadAudio({ file: i4.payload.file, to: i4.to, message: t3, onProgress: function(e4) {
- if (o3.updatePercent(e4), ct2(i4.onProgress))
+ if (o3.updatePercent(e4), dt2(i4.onProgress))
try {
i4.onProgress(e4);
} catch (e5) {
return E2({ code: k2.MSG_ONPROGRESS_ERR });
}
} }).then(function(e4) {
- e4 = e4.location, e4 = n3.isPrivateNetWork() ? e4 : mt2(e4);
+ e4 = e4.location, e4 = n3.isPrivateNetWork() ? e4 : Mt2(e4);
return o3.updateAudioUrl(e4), t3;
});
} }, { key: "_uploadVideo", value: function(n3) {
var o3 = this, e3 = this.get(2), i4 = n3.getElements()[0], t3 = e3.getMessageOption(n3.clientSequence);
return this.doUploadVideo({ file: t3.payload.file, to: t3.to, message: n3, onProgress: function(e4) {
- if (i4.updatePercent(e4), ct2(t3.onProgress))
+ if (i4.updatePercent(e4), dt2(t3.onProgress))
try {
t3.onProgress(e4);
} catch (e5) {
return E2({ code: k2.MSG_ONPROGRESS_ERR });
}
} }).then(function(e4) {
- var t4 = e4.location, e4 = e4.snapshotInfo, t4 = o3.isPrivateNetWork() ? t4 : mt2(t4);
+ var t4 = e4.location, e4 = e4.snapshotInfo, t4 = o3.isPrivateNetWork() ? t4 : Mt2(t4);
return i4.updateVideoUrl(t4), S2(e4) || i4.updateSnapshotInfo(e4), n3;
});
} }, { key: "_checkSizeError", value: function(e3) {
var t3 = "";
return "A" === e3 ? t3 = "audio" : "I" === e3 ? t3 = "image" : "V" === e3 ? t3 = "video" : "F" === e3 && (t3 = "file"), E2({ code: k2["MSG_".concat(e3, "_SIZE_LIMIT")], message: this.getErrMsg("UploadSizeLimit", t3, "".concat(this.UPLOAD_SIZE_LIMIT[e3] / 1048576, "MB")) });
} }, { key: "doUploadImage", value: function(o3) {
- var e3, i4, s4 = this;
+ var e3, i4, a3 = this;
return !o3.file || this._isEmptyFileList(o3.file.files) ? E2({ code: k2.MSG_I_SELECT_F_FIRST }) : true !== (e3 = this._checkImageType(o3.file)) ? e3 : true !== (e3 = this._checkImageSize(o3.file)) ? e3 : (i4 = null, this._setUploadFileType(1), this.uploadByCOS(o3).then(function(e4) {
- if (i4 = e4, s4.isPrivateNetWork())
- return wt2(n3);
+ if (i4 = e4, a3.isPrivateNetWork())
+ return xt2(n3);
if (O2(i4.imageInfoArray)) {
var t3 = i4.imageInfoArray.find(function(e5) {
return 3 === e5.type;
@@ -15013,19 +15020,19 @@ var chat = { exports: {} };
return t3;
}
var n3;
- return ve2 ? { width: o3.file.width, height: o3.file.height } : (n3 = mt2(e4.location), s4.COSSDK ? wt2(n3) : wt2(n3 = so(n3, s4._fileDownloadProxy, s4._authKey, s4._fileDNList)));
+ return ye2 ? { width: o3.file.width, height: o3.file.height } : (n3 = Mt2(e4.location), a3.COSSDK ? xt2(n3) : xt2(n3 = co(n3, a3._fileDownloadProxy, a3._authKey, a3._fileDNList)));
}).then(function(e4) {
return i4.width = e4.width, i4.height = e4.height, Promise.resolve(i4);
}));
} }, { key: "_checkImageType", value: function(e3) {
- var t3 = "", t3 = v3 ? e3.url.slice(e3.url.lastIndexOf(".") + 1) : ve2 ? e3.type.split("/")[1] : e3.files[0].name.slice(e3.files[0].name.lastIndexOf(".") + 1);
- return 0 <= Po.indexOf(t3.toLowerCase()) || E2({ code: k2.MSG_I_TYPES_LIMIT });
+ var t3 = "", t3 = v3 ? e3.url.slice(e3.url.lastIndexOf(".") + 1) : ye2 ? e3.type.split("/")[1] : e3.files[0].name.slice(e3.files[0].name.lastIndexOf(".") + 1);
+ return 0 <= Vo.indexOf(t3.toLowerCase()) || E2({ code: k2.MSG_I_TYPES_LIMIT });
} }, { key: "_checkImageSize", value: function(e3) {
- return 0 === (e3 = (v3 || ve2 ? e3 : e3.files[0]).size) ? E2({ code: k2.MSG_F_IS_EMPTY }) : e3 < this.UPLOAD_SIZE_LIMIT.I || this._checkSizeError("I");
+ return 0 === (e3 = (v3 || ye2 ? e3 : e3.files[0]).size) ? E2({ code: k2.MSG_F_IS_EMPTY }) : e3 < this.UPLOAD_SIZE_LIMIT.I || this._checkSizeError("I");
} }, { key: "doUploadFile", value: function(e3) {
return !e3.file || this._isEmptyFileList(e3.file.files) ? E2({ code: k2.MSG_F_SELECT_F_FIRST }) : e3.file.files[0].size > this.UPLOAD_SIZE_LIMIT.F ? this._checkSizeError("F") : 0 === e3.file.files[0].size ? E2({ code: k2.MSG_F_IS_EMPTY }) : (this._setUploadFileType(255), this.uploadByCOS(e3));
} }, { key: "doUploadVideo", value: function(e3) {
- return e3.file.videoFile.size > this.UPLOAD_SIZE_LIMIT.V ? this._checkSizeError("V") : 0 === e3.file.videoFile.size ? E2({ code: k2.MSG_F_IS_EMPTY }) : -1 === Uo.indexOf(e3.file.videoFile.type) ? E2({ code: k2.MSG_V_TYPES_LIMIT }) : (this._setUploadFileType(2), v3 || ve2 ? this.handleVideoUpload(y2(y2({}, e3), {}, { file: e3.file.videoFile })) : Ie2 ? this.handleVideoUpload(e3) : void 0);
+ return e3.file.videoFile.size > this.UPLOAD_SIZE_LIMIT.V ? this._checkSizeError("V") : 0 === e3.file.videoFile.size ? E2({ code: k2.MSG_F_IS_EMPTY }) : -1 === Bo.indexOf(e3.file.videoFile.type) ? E2({ code: k2.MSG_V_TYPES_LIMIT }) : (this._setUploadFileType(2), v3 || ye2 ? this.handleVideoUpload(y2(y2({}, e3), {}, { file: e3.file.videoFile })) : Ce2 ? this.handleVideoUpload(e3) : void 0);
} }, { key: "handleVideoUpload", value: function(n3) {
var o3 = this;
return new Promise(function(t3, e3) {
@@ -15043,28 +15050,28 @@ var chat = { exports: {} };
return e3.file ? e3.file.size > this.UPLOAD_SIZE_LIMIT.A ? this._checkSizeError("A") : 0 === e3.file.size ? E2({ code: k2.MSG_F_IS_EMPTY }) : (this._setUploadFileType(3), this.uploadByCOS(e3)) : E2({ code: k2.MSG_A_UPLOAD_FAIL });
} }, { key: "uploadByCOS", value: function(t3) {
var c3, u3, l3, d3, p4 = this;
- return ct2(this._cosUploadMethod) ? this.timUploadPlugin ? this._uploadWithPreSigUrl(t3) : (c3 = new P2("upload"), u3 = "".concat(this._n, ".uploadByCOS"), l3 = Date.now(), d3 = this._getFile(t3), new Promise(function(s4, a3) {
+ return dt2(this._cosUploadMethod) ? this.timUploadPlugin ? this._uploadWithPreSigUrl(t3) : (c3 = new P2("upload"), u3 = "".concat(this._n, ".uploadByCOS"), l3 = Date.now(), d3 = this._getFile(t3), new Promise(function(a3, s4) {
var e3 = v3 ? p4._createCosOptionsWXMiniApp(t3) : p4._createCosOptionsWeb(t3), r4 = p4;
p4._cosUploadMethod(e3, function(e4, t4) {
var n3, o3, i4 = /* @__PURE__ */ Object.create(null);
- t4 ? e4 || O2(t4.files) && t4.files[0].error ? (n3 = new L2({ code: k2.MSG_F_UPLOAD_FAIL }), c3.setError(n3).end(), M2.l("".concat(u3, " failed. error:"), t4.files[0].error), 403 === t4.files[0].error.statusCode && p4._getAuthorizationKey(), a3(n3)) : (i4.fileName = d3.name, i4.fileSize = d3.size, i4.fileType = d3.type.slice(d3.type.indexOf("/") + 1).toLowerCase(), i4.location = (v3 ? t4 : t4.files[0].data).Location, n3 = Date.now() - l3, t4 = r4._formatFileSize(d3.size), o3 = r4._formatSpeed(1e3 * d3.size / n3), t4 = "size:".concat(t4, " time:").concat(n3, "ms speed:").concat(o3), M2.l("".concat(u3, " success. name:").concat(d3.name, " ").concat(t4)), s4(i4), (o3 = p4.get(26)).addCost(Jn, n3), o3.addFileSize(Jn, d3.size), c3.setMessage(t4).end()) : (i4 = new L2({ code: k2.MSG_F_UPLOAD_FAIL }), c3.setError(i4).end(), M2.w("".concat(u3, " failed. error:"), e4), 403 === e4.statusCode && p4._getAuthorizationKey(), a3(i4));
+ t4 ? e4 || O2(t4.files) && t4.files[0].error ? (n3 = new L2({ code: k2.MSG_F_UPLOAD_FAIL }), c3.setError(n3).end(), M2.l("".concat(u3, " failed. error:"), t4.files[0].error), 403 === t4.files[0].error.statusCode && p4._getAuthorizationKey(), s4(n3)) : (i4.fileName = d3.name, i4.fileSize = d3.size, i4.fileType = d3.type.slice(d3.type.indexOf("/") + 1).toLowerCase(), i4.location = (v3 ? t4 : t4.files[0].data).Location, n3 = Date.now() - l3, t4 = r4._formatFileSize(d3.size), o3 = r4._formatSpeed(1e3 * d3.size / n3), t4 = "size:".concat(t4, " time:").concat(n3, "ms speed:").concat(o3), M2.l("".concat(u3, " success. name:").concat(d3.name, " ").concat(t4)), a3(i4), (o3 = p4.get(26)).addCost(Zn, n3), o3.addFileSize(Zn, d3.size), c3.setMessage(t4).end()) : (i4 = new L2({ code: k2.MSG_F_UPLOAD_FAIL }), c3.setError(i4).end(), M2.w("".concat(u3, " failed. error:"), e4), 403 === e4.statusCode && p4._getAuthorizationKey(), s4(i4));
});
})) : (this.warn("PluginUndetected"), E2({ code: k2.COS_UNDETECTED }));
} }, { key: "_uploadWithPreSigUrl", value: function(e3) {
var p4 = this, _3 = "".concat(this._n, "._uploadWithPreSigUrl"), h3 = this._getFile(e3);
return this._createCosOptionsPreSigUrl(e3).then(function(d3) {
- return new Promise(function(s4, a3) {
- var r4 = new P2("upload"), e4 = d3.requestSnapshotUrl, c3 = void 0 === e4 ? void 0 : e4, u3 = W2(d3, Ni), l3 = Date.now();
+ return new Promise(function(a3, s4) {
+ var r4 = new P2("upload"), e4 = d3.requestSnapshotUrl, c3 = void 0 === e4 ? void 0 : e4, u3 = W2(d3, qi), l3 = Date.now();
p4._cosUploadMethod(u3, function(e5, t3) {
if (e5 || 403 === t3.statusCode)
- r4.setError(new L2(e5)).end(), o3 = { HttpStatusCode: 9999, CostTime: tn(l3, false), error: e5, url: d3.url }, t3.data && t3.data.uploadIP && (o3.uploadIP = t3.data.uploadIP), p4._uploadSSOLog(o3), M2.l("".concat(_3, " failed, error:"), e5), a3(new L2({ code: k2.MSG_F_UPLOAD_FAIL }));
+ r4.setError(new L2(e5)).end(), o3 = { HttpStatusCode: 9999, CostTime: an(l3, false), error: e5, url: d3.url }, t3.data && t3.data.uploadIP && (o3.uploadIP = t3.data.uploadIP), p4._uploadSSOLog(o3), M2.l("".concat(_3, " failed, error:"), e5), s4(new L2({ code: k2.MSG_F_UPLOAD_FAIL }));
else {
- var n3 = /* @__PURE__ */ Object.create(null), o3 = t3.data.location || "", e5 = (p4.isPrivateNetWork() || 0 !== o3.indexOf("https://") && 0 !== o3.indexOf("http://") || (o3 = o3.split("//")[1]), n3.fileName = h3.name, n3.fileSize = h3.size, n3.fileType = h3.type.slice(h3.type.indexOf("/") + 1).toLowerCase(), n3.location = o3, tn(l3, false)), o3 = p4._formatFileSize(h3.size), i4 = p4._formatSpeed(1e3 * h3.size / e5), o3 = "size:".concat(o3, " time:").concat(e5, "ms speed:").concat(i4, " res:").concat(JSON.stringify(t3.data)), i4 = (M2.l("".concat(_3, " ok. name:").concat(h3.name, " ").concat(o3)), r4.setMessage(o3).end(), { HttpStatusCode: t3.statusCode, FileSize: h3.size, CostTime: e5, url: d3.url }), o3 = (t3.data && t3.data.uploadIP && (i4.uploadIP = t3.data.uploadIP), p4._uploadSSOLog(i4), p4.get(26)), i4 = (o3.addCost(Jn, e5), o3.addFileSize(Jn, h3.size), []);
+ var n3 = /* @__PURE__ */ Object.create(null), o3 = t3.data.location || "", e5 = (p4.isPrivateNetWork() || 0 !== o3.indexOf("https://") && 0 !== o3.indexOf("http://") || (o3 = o3.split("//")[1]), n3.fileName = h3.name, n3.fileSize = h3.size, n3.fileType = h3.type.slice(h3.type.indexOf("/") + 1).toLowerCase(), n3.location = o3, an(l3, false)), o3 = p4._formatFileSize(h3.size), i4 = p4._formatSpeed(1e3 * h3.size / e5), o3 = "size:".concat(o3, " time:").concat(e5, "ms speed:").concat(i4, " res:").concat(JSON.stringify(t3.data)), i4 = (M2.l("".concat(_3, " ok. name:").concat(h3.name, " ").concat(o3)), r4.setMessage(o3).end(), { HttpStatusCode: t3.statusCode, FileSize: h3.size, CostTime: e5, url: d3.url }), o3 = (t3.data && t3.data.uploadIP && (i4.uploadIP = t3.data.uploadIP), p4._uploadSSOLog(i4), p4.get(26)), i4 = (o3.addCost(Zn, e5), o3.addFileSize(Zn, h3.size), []);
if (u3.thumbUrl && u3.largeUrl && i4.push.apply(i4, [p4._getSmallImageInfoByUrl(u3.thumbUrl, n3), p4._getLargeImageInfoByUrl(u3.largeUrl, n3)]), 1 === p4.uploadFileType && p4.isSimpleCos && !p4.isPrivateNetWork() && (i4.push(p4._getImageInfoArray(u3.downloadUrl, n3)), t3.data.uploadIP) && i4.push(p4._getDownloadIP(u3.downloadUrl.split("//")[1].split("/")[0], n3)), c3 && i4.push(p4._getSnapshotInfoByUrl(c3, n3)), 0 < i4.length)
return Promise.all(i4).then(function() {
- s4(n3);
+ a3(n3);
});
- s4(n3);
+ a3(n3);
}
});
});
@@ -15073,16 +15080,16 @@ var chat = { exports: {} };
var o3 = "".concat(this._n, "._getDownloadIP"), i4 = Date.now();
return this.req({ P: G2.GET_IP, data: { domainName: e3 } }).then(function(e4) {
var t3;
- e4.data && e4.data.ip && (M2.l("".concat(o3, " ok. downloadIP:").concat(e4.data.ip, " cost:").concat(tn(i4))), (t3 = n3.location.split("/"))[0] = e4.data.ip, n3.location = t3.join("/"));
+ e4.data && e4.data.ip && (M2.l("".concat(o3, " ok. downloadIP:").concat(e4.data.ip, " cost:").concat(an(i4))), (t3 = n3.location.split("/"))[0] = e4.data.ip, n3.location = t3.join("/"));
}).catch(function(e4) {
});
} }, { key: "_getImageInfoArray", value: function(t3, n3) {
- var o3 = this, i4 = "".concat(this._n, "._getImageInfoArray"), s4 = Date.now();
+ var o3 = this, i4 = "".concat(this._n, "._getImageInfoArray"), a3 = Date.now();
return this.req({ P: G2.GET_IMAGE_INFO, data: { imageUrl: t3 } }).then(function(e3) {
e3 = e3.data || {};
- return M2.l("".concat(i4, " ok. data: ").concat(JSON.stringify(e3), " cost:").concat(tn(s4))), n3.imageInfoArray = e3.imageInfoArray, e3;
+ return M2.l("".concat(i4, " ok. data: ").concat(JSON.stringify(e3), " cost:").concat(an(a3))), n3.imageInfoArray = e3.imageInfoArray, e3;
}).catch(function(e3) {
- n3.imageInfoArray = void 0, o3._uploadSSOLog({ HttpStatusCode: 1e4, CostTime: tn(s4, false), url: t3 });
+ n3.imageInfoArray = void 0, o3._uploadSSOLog({ HttpStatusCode: 1e4, CostTime: an(a3, false), url: t3 });
});
} }, { key: "_uploadSSOLog", value: function(e3) {
var t3, n3;
@@ -15091,13 +15098,13 @@ var chat = { exports: {} };
var t3 = this.get(12).getFileUploadProxy(), n3 = e3;
return n3 = t3 ? e3.replace(/^https:\/\/[^/]+/, t3) : n3;
} }, { key: "_getFile", value: function(e3) {
- return O2(e3.file.files) || ut2(e3.file.files) ? e3.file.files[0] : e3.file;
+ return O2(e3.file.files) || pt2(e3.file.files) ? e3.file.files[0] : e3.file;
} }, { key: "_formatFileSize", value: function(e3) {
return e3 < 1024 ? e3 + "B" : e3 < 1048576 ? Math.floor(e3 / 1024) + "KB" : Math.floor(e3 / 1048576) + "MB";
} }, { key: "_formatSpeed", value: function(e3) {
- return e3 <= 1048576 ? Kt2(e3 / 1024, 1) + "KB/s" : Kt2(e3 / 1048576, 1) + "MB/s";
+ return e3 <= 1048576 ? jt2(e3 / 1024, 1) + "KB/s" : jt2(e3 / 1048576, 1) + "MB/s";
} }, { key: "_createCosOptionsWeb", value: function(t3) {
- var e3 = this._getFile(t3), n3 = e3.name, n3 = n3.slice(n3.lastIndexOf(".")), n3 = this._genFileName("".concat(ht2(999999)).concat(n3));
+ var e3 = this._getFile(t3), n3 = e3.name, n3 = n3.slice(n3.lastIndexOf(".")), n3 = this._genFileName("".concat(mt2(999999)).concat(n3));
return { files: [{ Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(n3), Body: e3 }], SliceSize: 1048576, onProgress: function(e4) {
if ("function" == typeof t3.onProgress)
try {
@@ -15118,10 +15125,10 @@ var chat = { exports: {} };
}
} };
} }, { key: "_createCosOptionsPreSigUrl", value: function(r4) {
- var e3, c3 = this, u3 = "", l3 = "", t3 = 0, n3 = this._getFile(r4), t3 = v3 || ve2 ? (u3 = r4.message.type === R2.MSG_FILE ? (e3 = (e3 = n3.name).slice(e3.lastIndexOf(".")), this._genFileName("".concat(ht2(999999)).concat(e3))) : this._genFileName(n3.name), l3 = n3.url, 1) : (e3 = (e3 = n3.name).slice(e3.lastIndexOf(".")), u3 = this._genFileName("".concat(ht2(999999)).concat(e3)), l3 = n3, 0);
- return this._getCosPreSigUrl({ fileType: this.uploadFileType, fileName: u3, uploadMethod: t3, duration: this.duration, userID: r4.message.from, conversationType: Gt2(r4.message.conversationID) ? 1 : 2 }).then(function(e4) {
- var t4 = c3.isSimpleCos ? e4.preSig[0] : e4, n4 = t4.uploadUrl, o3 = t4.downloadUrl, i4 = t4.requestSnapshotUrl, i4 = void 0 === i4 ? void 0 : i4, s4 = t4.thumbUrl, a3 = t4.largeUrl, t4 = t4.fileKey, e4 = e4.uploadIP, e4 = void 0 === e4 ? "" : e4;
- return { url: c3._getRawOrUploadProxyUrl(n4), fileType: c3.uploadFileType, fileName: u3, resources: l3, downloadUrl: o3, requestSnapshotUrl: i4, thumbUrl: s4, largeUrl: a3, fileKey: t4, uploadIP: !c3.isPrivateNetWork() && e4, onProgress: function(e5) {
+ var e3, c3 = this, u3 = "", l3 = "", t3 = 0, n3 = this._getFile(r4), t3 = v3 || ye2 ? (u3 = r4.message.type === R2.MSG_FILE ? (e3 = (e3 = n3.name).slice(e3.lastIndexOf(".")), this._genFileName("".concat(mt2(999999)).concat(e3))) : this._genFileName(n3.name), l3 = n3.url, 1) : (e3 = (e3 = n3.name).slice(e3.lastIndexOf(".")), u3 = this._genFileName("".concat(mt2(999999)).concat(e3)), l3 = n3, 0);
+ return this._getCosPreSigUrl({ fileType: this.uploadFileType, fileName: u3, uploadMethod: t3, duration: this.duration, userID: r4.message.from, conversationType: bt2(r4.message.conversationID) ? 1 : 2 }).then(function(e4) {
+ var t4 = c3.isSimpleCos ? e4.preSig[0] : e4, n4 = t4.uploadUrl, o3 = t4.downloadUrl, i4 = t4.requestSnapshotUrl, i4 = void 0 === i4 ? void 0 : i4, a3 = t4.thumbUrl, s4 = t4.largeUrl, t4 = t4.fileKey, e4 = e4.uploadIP, e4 = void 0 === e4 ? "" : e4;
+ return { url: c3._getRawOrUploadProxyUrl(n4), fileType: c3.uploadFileType, fileName: u3, resources: l3, downloadUrl: o3, requestSnapshotUrl: i4, thumbUrl: a3, largeUrl: s4, fileKey: t4, uploadIP: !c3.isPrivateNetWork() && e4, onProgress: function(e5) {
if ("function" == typeof r4.onProgress)
try {
r4.onProgress(e5.percent);
@@ -15131,141 +15138,141 @@ var chat = { exports: {} };
} };
});
} }, { key: "_genFileName", value: function(e3) {
- return "".concat(Ft2(), "-").concat(e3);
+ return "".concat(Vt2(), "-").concat(e3);
} }, { key: "_setUploadFileType", value: function(e3) {
this.uploadFileType = e3;
} }, { key: "_getSnapshotInfoByUrl", value: function(e3, n3) {
- var o3 = this, i4 = "_getSnapshotInfoByUrl", s4 = new P2(i4);
- return this.req({ P: G2.VIDEO_COVER, data: { platform: this.getPlatform(), coverName: this._genFileName(ht2(99999)), requestSnapshotUrl: e3 } }).then(function(e4) {
+ var o3 = this, i4 = "_getSnapshotInfoByUrl", a3 = new P2(i4);
+ return this.req({ P: G2.VIDEO_COVER, data: { platform: this.getPlatform(), coverName: this._genFileName(mt2(99999)), requestSnapshotUrl: e3 } }).then(function(e4) {
var t3, e4 = (e4.data || {}).snapshotUrl;
- return M2.l("".concat(o3._n, ".").concat(i4, " ok. snapshotUrl:").concat(e4)), s4.setMessage("snapshotUrl:".concat(e4)).end(), S2(e4) ? {} : wt2(t3 = so(e4, o3._fileDownloadProxy, o3._authKey, o3._fileDNList)).then(function(e5) {
+ return M2.l("".concat(o3._n, ".").concat(i4, " ok. snapshotUrl:").concat(e4)), a3.setMessage("snapshotUrl:".concat(e4)).end(), S2(e4) ? {} : xt2(t3 = co(e4, o3._fileDownloadProxy, o3._authKey, o3._fileDNList)).then(function(e5) {
n3.snapshotInfo = { snapshotUrl: t3, snapshotWidth: e5.width, snapshotHeight: e5.height };
});
}).catch(function(e4) {
- return M2.w("".concat(o3._n, ".").concat(i4, " failed. error:"), e4), s4.setCode(e4.errorCode).setMessage(e4.errorInfo).end(), {};
+ return M2.w("".concat(o3._n, ".").concat(i4, " failed. error:"), e4), a3.setCode(e4.errorCode).setMessage(e4.errorInfo).end(), {};
});
} }, { key: "_getSmallImageInfoByUrl", value: function(t3, n3) {
- return wt2(so(t3, this._fileDownloadProxy, this._authKey, this._fileDNList)).then(function(e3) {
+ return xt2(co(t3, this._fileDownloadProxy, this._authKey, this._fileDNList)).then(function(e3) {
n3.smallImageUrl = t3, n3.smallImageWidth = e3.width, n3.smallImageHeight = e3.height;
});
} }, { key: "_getLargeImageInfoByUrl", value: function(t3, n3) {
- return wt2(so(t3, this._fileDownloadProxy, this._authKey, this._fileDNList)).then(function(e3) {
+ return xt2(co(t3, this._fileDownloadProxy, this._authKey, this._fileDNList)).then(function(e3) {
n3.largeImageUrl = t3, n3.largeImageWidth = e3.width, n3.largeImageHeight = e3.height;
});
} }, { key: "_isEmptyFileList", value: function(e3) {
- return !(!ut2(e3) || 0 !== e3.length);
+ return !(!pt2(e3) || 0 !== e3.length);
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset"));
- } }])), Pi = ["downloadKey", "pbDownloadKey", "messageList"], Ui = e2(function e3(t3) {
+ } }])), Vi = ["downloadKey", "pbDownloadKey", "messageList"], Bi = e2(function e3(t3) {
p3(this, e3), this._n = "MergerMessageHandler", this._msgM = t3;
}, [{ key: "uploadMergerMessage", value: function(e3, n3) {
- var o3 = "".concat(this._n, ".").concat("uploadMergerMessage"), e3 = (M2.d("".concat(o3, " message:"), e3, "messageBytes:".concat(n3)), JSON.parse(JSON.stringify(e3.payload)).messageList), i4 = e3.length, t3 = this._msgM.get(17).getFileDNList(), s4 = new P2("uploadMergerMessage");
+ var o3 = "".concat(this._n, ".").concat("uploadMergerMessage"), e3 = (M2.d("".concat(o3, " message:"), e3, "messageBytes:".concat(n3)), JSON.parse(JSON.stringify(e3.payload)).messageList), i4 = e3.length, t3 = this._msgM.get(17).getFileDNList(), a3 = new P2("uploadMergerMessage");
return e3.forEach(function(e4) {
- ao(e4.messageBody[0].type, e4.messageBody, t3);
+ uo(e4.messageBody[0].type, e4.messageBody, t3);
}), this._msgM.req({ P: G2.UPLOAD_MERGER_MSG, data: { messageList: e3 } }).then(function(e4) {
M2.d("".concat(o3, " ok. response:"), e4.data);
var e4 = e4.data, t4 = e4.pbDownloadKey, e4 = e4.downloadKey, t4 = { pbDownloadKey: t4, downloadKey: e4, messageNumber: i4 };
- return s4.setMessage("".concat(i4, "-").concat(n3, "-").concat(e4)).end(), t4;
+ return a3.setMessage("".concat(i4, "-").concat(n3, "-").concat(e4)).end(), t4;
}).catch(function(e4) {
- throw M2.w("".concat(o3, " failed. error:"), e4), s4.setError(e4).end(), e4;
+ throw M2.w("".concat(o3, " failed. error:"), e4), a3.setError(e4).end(), e4;
});
} }, { key: "downloadMergerMessage", value: function(i4) {
- var s4 = this, a3 = "".concat(this._n, ".").concat("downloadMergerMessage"), t3 = (M2.d("".concat(a3, " message:"), i4), i4.payload.downloadKey), r4 = this._msgM.getFileDownloadProxy(), c3 = this._msgM.getDownloadFileAuthKey(), u3 = new P2("downloadMergerMessage");
+ var a3 = this, s4 = "".concat(this._n, ".").concat("downloadMergerMessage"), t3 = (M2.d("".concat(s4, " message:"), i4), i4.payload.downloadKey), r4 = this._msgM.getFileDownloadProxy(), c3 = this._msgM.getDownloadFileAuthKey(), u3 = new P2("downloadMergerMessage");
return u3.setMessage("downloadKey:".concat(t3)), this._msgM.req({ P: G2.DOWNLOAD_MERGER_MSG, data: { downloadKey: t3 } }).then(function(e3) {
- M2.d("".concat(a3, " ok. response:"), e3.data);
- var t4, n3, o3 = s4._msgM.get(17).getFileDNList();
- return ct2(i4.clearElement) ? ((t4 = i4.payload).downloadKey, t4.pbDownloadKey, t4.messageList, t4 = W2(t4, Pi), i4.clearElement(), i4.setElement({ type: i4.type, content: y2({ messageList: e3.data.messageList }, t4) }, r4, c3, o3)) : (n3 = [], e3.data.messageList.forEach(function(e4) {
- S2(e4) || (e4 = new yo(e4, r4, c3, o3), n3.push(e4));
+ M2.d("".concat(s4, " ok. response:"), e3.data);
+ var t4, n3, o3 = a3._msgM.get(17).getFileDNList();
+ return dt2(i4.clearElement) ? ((t4 = i4.payload).downloadKey, t4.pbDownloadKey, t4.messageList, t4 = W2(t4, Vi), i4.clearElement(), i4.setElement({ type: i4.type, content: y2({ messageList: e3.data.messageList }, t4) }, r4, c3, o3)) : (n3 = [], e3.data.messageList.forEach(function(e4) {
+ S2(e4) || (e4 = new Do(e4, r4, c3, o3), n3.push(e4));
}), i4.payload.messageList = n3, i4.payload.downloadKey = "", i4.payload.pbDownloadKey = ""), u3.end(), i4;
}).catch(function(e3) {
- throw M2.w("".concat(a3, " failed. key:").concat(t3, " error:"), e3), u3.setError(e3).end(), e3;
+ throw M2.w("".concat(s4, " failed. key:").concat(t3, " error:"), e3), u3.setError(e3).end(), e3;
});
} }, { key: "createMergerMessagePack", value: function(e3, t3, n3) {
return e3.conversationType === R2.CONV_C2C ? this._createC2CMergerMessagePack(e3, t3, n3) : this._createGroupMergerMessagePack(e3, t3, n3);
} }, { key: "_createC2CMergerMessagePack", value: function(e3, t3, n3) {
- var o3 = null, i4 = (t3 && (t3.offlinePushInfo && (o3 = t3.offlinePushInfo), true === t3.onlineUserOnly) && (o3 ? o3.disablePush = true : o3 = { disablePush: true }), []), s4 = (m2(t3) && m2(t3.messageControlInfo) && (s4 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, a3 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === s4 && i4.push("NoUnread"), true === a3 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), ""), a3 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (s4 = e3.cloudCustomData), n3.pbDownloadKey), r4 = n3.downloadKey, n3 = n3.messageNumber, c3 = e3.payload, u3 = c3.title, l3 = c3.abstractList, c3 = c3.compatibleText, d3 = this._msgM.get(6), d3 = d3 && d3.isOnlineMessage(e3, t3) ? 0 : void 0;
- return { P: G2.SEND_C2C_MSG, data: { fromAccount: this._msgM.getMyUserID(), toAccount: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: a3, downloadKey: r4, title: u3, abstractList: l3, compatibleText: c3, messageNumber: n3 } }], cloudCustomData: s4, clientTime: e3.clientTime, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: d3, offlinePushInfo: Lo(o3), messageControlInfo: 0 !== d3 ? i4 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0 } };
+ var o3 = null, i4 = (t3 && (t3.offlinePushInfo && (o3 = t3.offlinePushInfo), true === t3.onlineUserOnly) && (o3 ? o3.disablePush = true : o3 = { disablePush: true }), []), a3 = (m2(t3) && m2(t3.messageControlInfo) && (a3 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, s4 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === a3 && i4.push("NoUnread"), true === s4 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), ""), s4 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (a3 = e3.cloudCustomData), n3.pbDownloadKey), r4 = n3.downloadKey, n3 = n3.messageNumber, c3 = e3.payload, u3 = c3.title, l3 = c3.abstractList, c3 = c3.compatibleText, d3 = this._msgM.get(6), d3 = d3 && d3.isOnlineMessage(e3, t3) ? 0 : void 0;
+ return { P: G2.SEND_C2C_MSG, data: { fromAccount: this._msgM.getMyUserID(), toAccount: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: s4, downloadKey: r4, title: u3, abstractList: l3, compatibleText: c3, messageNumber: n3 } }], cloudCustomData: a3, clientTime: e3.clientTime, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: d3, offlinePushInfo: Go(o3), messageControlInfo: 0 !== d3 ? i4 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0 } };
} }, { key: "_createGroupMergerMessagePack", value: function(e3, t3, n3) {
- var o3 = null, i4 = (t3 && t3.offlinePushInfo && (o3 = t3.offlinePushInfo), []), s4 = (m2(t3) && m2(t3.messageControlInfo) && (s4 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, a3 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === s4 && i4.push("NoUnread"), true === a3 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), ""), a3 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (s4 = e3.cloudCustomData), n3.pbDownloadKey), r4 = n3.downloadKey, n3 = n3.messageNumber, c3 = e3.payload, u3 = c3.title, l3 = c3.abstractList, c3 = c3.compatibleText, d3 = this._msgM.get(7), t3 = d3 && d3.isOnlineMessage(e3, t3) ? 1 : 0;
- return { P: G2.SEND_GRP_MSG, data: { fromAccount: this._msgM.getMyUserID(), groupID: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: a3, downloadKey: r4, title: u3, abstractList: l3, compatibleText: c3, messageNumber: n3 } }], random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: void 0, cloudCustomData: s4, onlineOnlyFlag: t3, offlinePushInfo: Lo(o3), clientTime: e3.clientTime, needReadReceipt: true !== e3.needReadReceipt || d3.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, messageControlInfo: 0 == t3 ? i4 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0 } };
- } }]), bi = { ERR_SVR_COMM_SENSITIVE_TEXT: 80001, ERR_SVR_COMM_BODY_SIZE_LIMIT: 80002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, ERR_SVR_MSG_PKG_PARSE_FAILED: 20001, ERR_SVR_MSG_INTERNAL_AUTH_FAILED: 20002, ERR_SVR_MSG_INVALID_ID: 20003, ERR_SVR_MSG_PUSH_DENY: 20006, ERR_SVR_MSG_IN_PEER_BLACKLIST: 20007, ERR_SVR_MSG_BOTH_NOT_FRIEND: 20009, ERR_SVR_MSG_NOT_PEER_FRIEND: 20010, ERR_SVR_MSG_NOT_SELF_FRIEND: 20011, ERR_SVR_MSG_SHUTUP_DENY: 20012, ERR_SVR_GROUP_INVALID_PARAMETERS: 10004, ERR_SVR_GROUP_PERMISSION_DENY: 10007, ERR_SVR_GROUP_NOT_FOUND: 10010, ERR_SVR_GROUP_INVALID_GROUPID: 10015, ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY: 10016, ERR_SVR_GROUP_SHUTUP_DENY: 10017, MSG_SEND_FAIL: 2100, OVER_FREQUENCY_LIMIT: 2996 }, wi = [k2.MSG_ONPROGRESS_ERR, k2.MSG_I_SELECT_F_FIRST, k2.MSG_I_TYPES_LIMIT, k2.MSG_F_IS_EMPTY, k2.MSG_I_SIZE_LIMIT, k2.MSG_F_SELECT_F_FIRST, k2.MSG_F_SIZE_LIMIT, k2.MSG_V_SIZE_LIMIT, k2.MSG_V_TYPES_LIMIT, k2.MSG_A_UPLOAD_FAIL, k2.MSG_A_SIZE_LIMIT, k2.COS_UNDETECTED];
- function Fi(e3) {
- p3(this, Fi), (e3 = i3(this, Fi, [e3]))._n = "UploadModule", e3.TIMUploadPlugin = null, e3.timUploadPlugin = null, e3.COSSDK = null, e3._cosUploadMethod = null, e3.expiredTimeLimit = 600, e3.appid = 0, e3.bucketName = "", e3.ciUrl = "", e3.directory = "", e3.downloadUrl = "", e3.uploadUrl = "", e3.region = "ap-shanghai", e3.cos = null, e3.cosOptions = { secretId: "", secretKey: "", sessionToken: "", expiredTime: 0 }, e3.uploadFileType = "", e3.duration = 900, e3.tryCount = 0, e3.UPLOAD_SIZE_LIMIT = { A: 20971520, F: 104857600, I: 20971520, V: 104857600 }, e3.isSimpleCos = false, e3._fileDownloadProxy = "", e3._authKey = "", e3._fileDNList = Oi;
+ var o3 = null, i4 = (t3 && t3.offlinePushInfo && (o3 = t3.offlinePushInfo), []), a3 = (m2(t3) && m2(t3.messageControlInfo) && (a3 = (r4 = t3.messageControlInfo).excludedFromUnreadCount, s4 = r4.excludedFromLastMessage, r4 = r4.excludedFromContentModeration, true === a3 && i4.push("NoUnread"), true === s4 && i4.push("NoLastMsg"), true === r4) && i4.push("NoMsgCheck"), ""), s4 = (C2(e3.cloudCustomData) && 0 < e3.cloudCustomData.length && (a3 = e3.cloudCustomData), n3.pbDownloadKey), r4 = n3.downloadKey, n3 = n3.messageNumber, c3 = e3.payload, u3 = c3.title, l3 = c3.abstractList, c3 = c3.compatibleText, d3 = this._msgM.get(7), t3 = d3 && d3.isOnlineMessage(e3, t3) ? 1 : 0;
+ return { P: G2.SEND_GRP_MSG, data: { fromAccount: this._msgM.getMyUserID(), groupID: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: s4, downloadKey: r4, title: u3, abstractList: l3, compatibleText: c3, messageNumber: n3 } }], random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: void 0, cloudCustomData: a3, onlineOnlyFlag: t3, offlinePushInfo: Go(o3), clientTime: e3.clientTime, needReadReceipt: true !== e3.needReadReceipt || d3.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, messageControlInfo: 0 == t3 ? i4 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0, isRelayMessage: true === e3._relayFlag ? 1 : 0 } };
+ } }]), Hi = { ERR_SVR_COMM_SENSITIVE_TEXT: 80001, ERR_SVR_COMM_BODY_SIZE_LIMIT: 80002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, ERR_SVR_MSG_PKG_PARSE_FAILED: 20001, ERR_SVR_MSG_INTERNAL_AUTH_FAILED: 20002, ERR_SVR_MSG_INVALID_ID: 20003, ERR_SVR_MSG_PUSH_DENY: 20006, ERR_SVR_MSG_IN_PEER_BLACKLIST: 20007, ERR_SVR_MSG_BOTH_NOT_FRIEND: 20009, ERR_SVR_MSG_NOT_PEER_FRIEND: 20010, ERR_SVR_MSG_NOT_SELF_FRIEND: 20011, ERR_SVR_MSG_SHUTUP_DENY: 20012, ERR_SVR_GROUP_INVALID_PARAMETERS: 10004, ERR_SVR_GROUP_PERMISSION_DENY: 10007, ERR_SVR_GROUP_NOT_FOUND: 10010, ERR_SVR_GROUP_INVALID_GROUPID: 10015, ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY: 10016, ERR_SVR_GROUP_SHUTUP_DENY: 10017, MSG_SEND_FAIL: 2100, OVER_FREQUENCY_LIMIT: 2996 }, Ki = [k2.MSG_ONPROGRESS_ERR, k2.MSG_I_SELECT_F_FIRST, k2.MSG_I_TYPES_LIMIT, k2.MSG_F_IS_EMPTY, k2.MSG_I_SIZE_LIMIT, k2.MSG_F_SELECT_F_FIRST, k2.MSG_F_SIZE_LIMIT, k2.MSG_V_SIZE_LIMIT, k2.MSG_V_TYPES_LIMIT, k2.MSG_A_UPLOAD_FAIL, k2.MSG_A_SIZE_LIMIT, k2.COS_UNDETECTED];
+ function Wi(e3) {
+ p3(this, Wi), (e3 = i3(this, Wi, [e3]))._n = "UploadModule", e3.TIMUploadPlugin = null, e3.timUploadPlugin = null, e3.COSSDK = null, e3._cosUploadMethod = null, e3.expiredTimeLimit = 600, e3.appid = 0, e3.bucketName = "", e3.ciUrl = "", e3.directory = "", e3.downloadUrl = "", e3.uploadUrl = "", e3.region = "ap-shanghai", e3.cos = null, e3.cosOptions = { secretId: "", secretKey: "", sessionToken: "", expiredTime: 0 }, e3.uploadFileType = "", e3.duration = 900, e3.tryCount = 0, e3.UPLOAD_SIZE_LIMIT = { A: 20971520, F: 104857600, I: 20971520, V: 104857600 }, e3.isSimpleCos = false, e3._fileDownloadProxy = "", e3._authKey = "", e3._fileDNList = Fi;
var t3 = e3.getIEmitInst();
return t3.on(U2.A2KEY_AND_TINYID_UPDATED, e3._init, e3), t3.on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function qi(e3) {
+ function Yi(e3) {
var t3 = false;
- return Object.values(bi).includes(e3) && (t3 = true), t3 = 120001 <= e3 && e3 <= 13e4 || 10100 <= e3 && e3 <= 10200 ? true : t3;
+ return Object.values(Hi).includes(e3) && (t3 = true), t3 = 120001 <= e3 && e3 <= 13e4 || 10100 <= e3 && e3 <= 10200 ? true : t3;
}
- t2(Qi, c2);
- var xi = e2(Qi, [{ key: "createTextMessage", value: function(e3) {
- var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new Do(e3)), e3 = C2(e3.payload) ? e3.payload : e3.payload.text, e3 = new no({ text: e3 }), t3 = this._getNickAndAvatarByUserID(t3);
+ t2(aa, c2);
+ var ji = e2(aa, [{ key: "createTextMessage", value: function(e3) {
+ var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new So(e3)), e3 = C2(e3.payload) ? e3.payload : e3.payload.text, e3 = new ao({ text: e3 }), t3 = this._getNickAndAvatarByUserID(t3);
return n3.setElement(e3), n3.setNickAndAvatar(t3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
} }, { key: "createImageMessage", value: function(e3) {
- var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new Do(e3));
+ var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new So(e3));
if (v3) {
var o3 = e3.payload.file;
- if (st2(o3))
+ if (ct2(o3))
return void this.warn("FileUnsupportedInMP", "createImageMessage");
var i4 = o3.tempFiles[0].path || o3.tempFiles[0].tempFilePath, o3 = { url: i4, name: i4.slice(i4.lastIndexOf("/") + 1), size: o3.tempFiles && o3.tempFiles[0].size || 1, type: i4.slice(i4.lastIndexOf(".") + 1).toLowerCase() };
e3.payload.file = o3;
} else
- ve2 ? (o3 = { url: (i4 = e3.payload.file).uri, name: i4.fileName, size: i4.fileSize || 1, type: i4.type, width: i4.width, height: i4.height }, e3.payload.file = o3) : Ie2 && (st2(e3.payload.file) ? (i4 = e3.payload.file, e3.payload.file = { files: [i4] }) : m2(e3.payload.file) && "undefined" != typeof index && (o3 = e3.payload.file.tempFiles[0], e3.payload.file = { files: [o3] }));
- i4 = this.get(17).getFileDNList(), o3 = new uo({ imageFormat: je2.UNKNOWN, uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }, this.getFileDownloadProxy(), this.getDownloadFileAuthKey(), i4), i4 = this._getNickAndAvatarByUserID(t3);
+ ye2 ? (o3 = { url: (i4 = e3.payload.file).uri, name: i4.fileName, size: i4.fileSize || 1, type: i4.type, width: i4.width, height: i4.height }, e3.payload.file = o3) : Ce2 && (ct2(e3.payload.file) ? (i4 = e3.payload.file, e3.payload.file = { files: [i4] }) : m2(e3.payload.file) && "undefined" != typeof index && (o3 = e3.payload.file.tempFiles[0], e3.payload.file = { files: [o3] }));
+ i4 = this.get(17).getFileDNList(), o3 = new _o({ imageFormat: Xe2.UNKNOWN, uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }, this.getFileDownloadProxy(), this.getDownloadFileAuthKey(), i4), i4 = this._getNickAndAvatarByUserID(t3);
return n3.setElement(o3), n3.setNickAndAvatar(i4), n3.setNameCard(this._getNameCardByGroupID(n3)), this._messageOptionsMap.set(n3.clientSequence, e3), n3;
} }, { key: "createAudioMessage", value: function(e3) {
- var t3 = e3.payload.file, n3 = (v3 && (n3 = { url: t3.tempFilePath, name: t3.tempFilePath.slice(t3.tempFilePath.lastIndexOf("/") + 1), size: t3.fileSize, second: parseInt(t3.duration) / 1e3, type: t3.tempFilePath.slice(t3.tempFilePath.lastIndexOf(".") + 1).toLowerCase() }, e3.payload.file = n3), ve2 && (n3 = { url: t3.uri, name: t3.uri.slice(t3.uri.lastIndexOf("/") + 1), size: t3.fileSize || 1, second: Math.floor(t3.duration / 1e3), type: t3.uri.slice(t3.uri.lastIndexOf(".") + 1).toLowerCase() }, e3.payload.file = n3, S2(t3.uri)) && this.warn("VoiceFileInRN"), this.getMyUserID()), o3 = (e3.currentUser = n3, e3.senderTinyID = this.getMyTinyID(), this.get(17).getFileDNList()), i4 = new Do(e3), t3 = new po({ second: Math.floor(t3.duration / 1e3), size: t3.fileSize || t3.size || 1, url: t3.tempFilePath || t3.uri, uuid: this._generateUUID(e3.payload.file) }, this.getFileDownloadProxy(), this.getDownloadFileAuthKey(), o3), o3 = this._getNickAndAvatarByUserID(n3);
+ var t3 = e3.payload.file, n3 = (v3 && (n3 = { url: t3.tempFilePath, name: t3.tempFilePath.slice(t3.tempFilePath.lastIndexOf("/") + 1), size: t3.fileSize, second: parseInt(t3.duration) / 1e3, type: t3.tempFilePath.slice(t3.tempFilePath.lastIndexOf(".") + 1).toLowerCase() }, e3.payload.file = n3), ye2 && (n3 = { url: t3.uri, name: t3.uri.slice(t3.uri.lastIndexOf("/") + 1), size: t3.fileSize || 1, second: Math.floor(t3.duration / 1e3), type: t3.uri.slice(t3.uri.lastIndexOf(".") + 1).toLowerCase() }, e3.payload.file = n3, S2(t3.uri)) && this.warn("VoiceFileInRN"), this.getMyUserID()), o3 = (e3.currentUser = n3, e3.senderTinyID = this.getMyTinyID(), this.get(17).getFileDNList()), i4 = new So(e3), t3 = new go({ second: Math.floor(t3.duration / 1e3), size: t3.fileSize || t3.size || 1, url: t3.tempFilePath || t3.uri, uuid: this._generateUUID(e3.payload.file) }, this.getFileDownloadProxy(), this.getDownloadFileAuthKey(), o3), o3 = this._getNickAndAvatarByUserID(n3);
return i4.setElement(t3), i4.setNickAndAvatar(o3), i4.setNameCard(this._getNameCardByGroupID(i4)), this._messageOptionsMap.set(i4.clientSequence, e3), i4;
} }, { key: "createVideoMessage", value: function(e3) {
var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), e3.payload.file.thumbUrl = "", e3.payload.file.thumbSize = 0, {});
if (v3) {
- if (ge2)
+ if (ve2)
return void this.warn("VideoUnsupportedInAlipay");
- if (st2(e3.payload.file))
+ if (ct2(e3.payload.file))
return void this.warn("FileUnsupportedInMP", "createVideoMessage");
var o3 = e3.payload.file;
O2(o3.tempFiles) && (o3 = o3.tempFiles[0]), n3.url = o3.tempFilePath, n3.name = o3.tempFilePath.slice(o3.tempFilePath.lastIndexOf("/") + 1), n3.size = o3.size || 1, n3.second = o3.duration || 0, n3.type = o3.tempFilePath.slice(o3.tempFilePath.lastIndexOf(".") + 1).toLowerCase();
} else
- ve2 ? (o3 = e3.payload.file, n3.url = o3.uri, n3.name = o3.fileName, n3.size = o3.fileSize || 1, n3.second = o3.duration || 0, n3.type = o3.type.split("/")[1]) : Ie2 && (st2(e3.payload.file) ? (o3 = e3.payload.file, e3.payload.file.files = [o3]) : m2(e3.payload.file) && "undefined" != typeof index && (o3 = e3.payload.file.tempFile, e3.payload.file.files = [o3]), o3 = e3.payload.file, n3.url = window.URL.createObjectURL(o3.files[0]), n3.name = o3.files[0].name, n3.size = o3.files[0].size || 1, n3.second = o3.files[0].duration || 0, n3.type = o3.files[0].type.split("/")[1]);
+ ye2 ? (o3 = e3.payload.file, n3.url = o3.uri, n3.name = o3.fileName, n3.size = o3.fileSize || 1, n3.second = o3.duration || 0, n3.type = o3.type.split("/")[1]) : Ce2 && (ct2(e3.payload.file) ? (o3 = e3.payload.file, e3.payload.file.files = [o3]) : m2(e3.payload.file) && "undefined" != typeof index && (o3 = e3.payload.file.tempFile, e3.payload.file.files = [o3]), o3 = e3.payload.file, n3.url = window.URL.createObjectURL(o3.files[0]), n3.name = o3.files[0].name, n3.size = o3.files[0].size || 1, n3.second = o3.files[0].duration || 0, n3.type = o3.files[0].type.split("/")[1]);
e3.payload.file.videoFile = n3;
- var o3 = this.get(17).getFileDNList(), i4 = new Do(e3), n3 = new Io({ videoFormat: n3.type, videoSecond: Kt2(n3.second, 0), videoSize: n3.size, remoteVideoUrl: "", videoUrl: n3.url, videoUUID: this._generateUUID(e3.payload.file.videoFile), thumbUUID: this._generateUUID(e3.payload.file.videoFile, "jpg"), thumbWidth: e3.payload.file.width || 200, thumbHeight: e3.payload.file.height || 200, thumbUrl: e3.payload.file.thumbUrl, thumbSize: e3.payload.file.thumbSize, thumbFormat: "jpg" }, this.getFileDownloadProxy(), this.getDownloadFileAuthKey(), o3), o3 = this._getNickAndAvatarByUserID(t3);
+ var o3 = this.get(17).getFileDNList(), i4 = new So(e3), n3 = new Co({ videoFormat: n3.type, videoSecond: jt2(n3.second, 0), videoSize: n3.size, remoteVideoUrl: "", videoUrl: n3.url, videoUUID: this._generateUUID(e3.payload.file.videoFile), thumbUUID: this._generateUUID(e3.payload.file.videoFile, "jpg"), thumbWidth: e3.payload.file.width || 200, thumbHeight: e3.payload.file.height || 200, thumbUrl: e3.payload.file.thumbUrl, thumbSize: e3.payload.file.thumbSize, thumbFormat: "jpg" }, this.getFileDownloadProxy(), this.getDownloadFileAuthKey(), o3), o3 = this._getNickAndAvatarByUserID(t3);
return i4.setElement(n3), i4.setNickAndAvatar(o3), i4.setNameCard(this._getNameCardByGroupID(i4)), this._messageOptionsMap.set(i4.clientSequence, e3), i4;
} }, { key: "createCustomMessage", value: function(e3) {
- var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new Do(e3)), e3 = new vo({ data: e3.payload.data, description: e3.payload.description, extension: e3.payload.extension }), t3 = this._getNickAndAvatarByUserID(t3);
+ var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new So(e3)), e3 = new yo({ data: e3.payload.data, description: e3.payload.description, extension: e3.payload.extension }), t3 = this._getNickAndAvatarByUserID(t3);
return n3.setElement(e3), n3.setNickAndAvatar(t3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
} }, { key: "createFaceMessage", value: function(e3) {
- var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new Do(e3)), e3 = new lo(e3.payload), t3 = this._getNickAndAvatarByUserID(t3);
+ var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new So(e3)), e3 = new ho(e3.payload), t3 = this._getNickAndAvatarByUserID(t3);
return n3.setElement(e3), n3.setNickAndAvatar(t3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
} }, { key: "createMergerMessage", value: function(e3) {
- var t3 = this.getMyUserID(), t3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), this._getNickAndAvatarByUserID(t3)), n3 = new Do(e3), e3 = new Co(e3.payload);
+ var t3 = this.getMyUserID(), t3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), this._getNickAndAvatarByUserID(t3)), n3 = new So(e3), e3 = new Eo(e3.payload);
return n3.setElement(e3), n3.setNickAndAvatar(t3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3.setRelayFlag(true), n3;
} }, { key: "createForwardMessage", value: function(e3) {
- var t3, n3, o3 = e3.to, i4 = e3.conversationType, s4 = e3.priority, a3 = e3.payload, r4 = e3.needReadReceipt, c3 = e3.receiverList;
- return O2(a3._elements) ? (t3 = this.getMyUserID(), n3 = this._getNickAndAvatarByUserID(t3), a3.type === R2.MSG_GRP_TIP ? E2({ code: k2.MSG_FORWARD_TYPE_INVALID }) : (i4 = { to: o3, conversationType: i4, conversationID: "".concat(i4).concat(o3), priority: s4, isPlaceMessage: 0, status: An, currentUser: t3, senderTinyID: this.getMyTinyID(), cloudCustomData: e3.cloudCustomData || a3.cloudCustomData || "", needReadReceipt: r4, receiverList: c3, isSupportExtension: e3.isSupportExtension || false }, (o3 = new Do(i4)).setElement(a3._elements[0]), o3.setNickAndAvatar(n3), o3.setNameCard(this._getNameCardByGroupID(a3)), o3.setRelayFlag(true), o3)) : E2({ code: k2.MSG_FORWARD_INVALID_ELEMENTS });
+ var t3, n3, o3 = e3.to, i4 = e3.conversationType, a3 = e3.priority, s4 = e3.payload, r4 = e3.needReadReceipt, c3 = e3.receiverList;
+ return O2(s4._elements) ? (t3 = this.getMyUserID(), n3 = this._getNickAndAvatarByUserID(t3), s4.type === R2.MSG_GRP_TIP ? E2({ code: k2.MSG_FORWARD_TYPE_INVALID }) : (i4 = { to: o3, conversationType: i4, conversationID: "".concat(i4).concat(o3), priority: a3, isPlaceMessage: 0, status: Gn, currentUser: t3, senderTinyID: this.getMyTinyID(), cloudCustomData: e3.cloudCustomData || s4.cloudCustomData || "", needReadReceipt: r4, receiverList: c3, isSupportExtension: e3.isSupportExtension || false }, (o3 = new So(i4)).setElement(s4._elements[0]), o3.setNickAndAvatar(n3), o3.setNameCard(this._getNameCardByGroupID(s4)), o3.setRelayFlag(true), o3)) : E2({ code: k2.MSG_FORWARD_INVALID_ELEMENTS });
} }, { key: "downloadMergerMessage", value: function(e3) {
return this._mergerMessageHandler.downloadMergerMessage(e3);
} }, { key: "createFileMessage", value: function(e3) {
if (v3) {
- if (!le2 && !pe2 && !fe2)
+ if (!_e2 && !ge2 && !Ie2)
return;
var t3 = I2.getSystemInfoSync().SDKVersion;
- if (le2 && xt2(t3, "2.5.0") < 0)
+ if (_e2 && Ht2(t3, "2.5.0") < 0)
return void this.warn("WXChooseMessageFile");
- if (pe2 && xt2(t3, "1.18.0") < 0)
+ if (ge2 && Ht2(t3, "1.18.0") < 0)
return void this.warn("QQChooseMessageFile");
}
- Ie2 || fe2 ? st2(e3.payload.file) ? (t3 = e3.payload.file, e3.payload.file = { files: [t3] }) : m2(e3.payload.file) && "undefined" != typeof index && (o3 = (t3 = e3.payload.file).tempFiles, t3 = t3.files, n3 = null, O2(o3) ? n3 = o3[0] : O2(t3) && (n3 = t3[0]), e3.payload.file = { files: [n3] }) : le2 || pe2 ? (t3 = y2(y2({}, (o3 = e3.payload.file.tempFiles)[0]), {}, { url: o3[0].path }), e3.payload.file = { files: [t3] }) : ve2 && (o3 = y2(y2({}, n3 = e3.payload.file), {}, { url: n3.uri }), e3.payload.file = { files: [o3] });
- var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new Do(e3)), o3 = new mo({ uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), t3 = this._getNickAndAvatarByUserID(t3);
+ Ce2 || Ie2 ? ct2(e3.payload.file) ? (t3 = e3.payload.file, e3.payload.file = { files: [t3] }) : m2(e3.payload.file) && "undefined" != typeof index && (o3 = (t3 = e3.payload.file).tempFiles, t3 = t3.files, n3 = null, O2(o3) ? n3 = o3[0] : O2(t3) && (n3 = t3[0]), e3.payload.file = { files: [n3] }) : _e2 || ge2 ? (t3 = y2(y2({}, (o3 = e3.payload.file.tempFiles)[0]), {}, { url: o3[0].path }), e3.payload.file = { files: [t3] }) : ye2 && (o3 = y2(y2({}, n3 = e3.payload.file), {}, { url: n3.uri }), e3.payload.file = { files: [o3] });
+ var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new So(e3)), o3 = new Mo({ uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), t3 = this._getNickAndAvatarByUserID(t3);
return n3.setElement(o3), n3.setNickAndAvatar(t3), n3.setNameCard(this._getNameCardByGroupID(n3)), this._messageOptionsMap.set(n3.clientSequence, e3), n3;
} }, { key: "createLocationMessage", value: function(e3) {
- var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new Do(e3)), e3 = new Mo(e3.payload), t3 = this._getNickAndAvatarByUserID(t3);
+ var t3 = this.getMyUserID(), n3 = (e3.currentUser = t3, e3.senderTinyID = this.getMyTinyID(), new So(e3)), e3 = new To(e3.payload), t3 = this._getNickAndAvatarByUserID(t3);
return n3.setElement(e3), n3.setNickAndAvatar(t3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
} }, { key: "_onNoModule", value: function() {
return E2({ code: k2.NO_MODULE });
- } }, { key: "sendMessageInstance", value: function(i4, s4) {
- var a3 = this;
- if (false === this.get(29).filterMessage(i4, s4))
+ } }, { key: "sendMessageInstance", value: function(i4, a3) {
+ var s4 = this;
+ if (false === this.get(29).filterMessage(i4, a3))
return i4.hasRiskContent = true, this._onSendMessageFailed(i4, new L2({ code: k2.PROFANITY_FOUND }));
var r4, c3, u3, l3, t3 = null;
if (i4.conversationType === R2.CONV_C2C)
@@ -15275,35 +15282,35 @@ var chat = { exports: {} };
return E2({ code: k2.MSG_INVALID_CONV_TYPE });
t3 = this.get(7);
}
- return t3 ? (c3 = "".concat(this._n, ".sendMessageInstance"), u3 = this.get(11), l3 = t3.isOnlineMessage(i4, s4), this.get(17).upload(i4).then(function() {
- return a3._getSendMessageSpecifiedKey(i4) === jn && a3.get(26).addSuccessCount(Jn), a3._guardForGroup(i4).then(function() {
+ return t3 ? (c3 = "".concat(this._n, ".sendMessageInstance"), u3 = this.get(11), l3 = t3.isOnlineMessage(i4, a3), this.get(17).upload(i4).then(function() {
+ return s4._getSendMessageSpecifiedKey(i4) === Xn && s4.get(26).addSuccessCount(Zn), s4._guardForGroup(i4).then(function() {
if (!i4.isSendable())
return E2({ code: k2.MSG_F_URL_IS_EMPTY });
- a3._addSendMessageTotalCount(i4), r4 = Date.now();
+ s4._addSendMessageTotalCount(i4), r4 = Date.now();
var e3 = function(e4) {
var t4 = "utf-8";
- Ie2 && document && (t4 = document.charset.toLowerCase());
+ Ce2 && document && (t4 = document.charset.toLowerCase());
var n3, o3 = 0, i5 = e4.length;
if ("utf-8" === t4 || "utf8" === t4)
- for (var s5 = 0; s5 < i5; s5++)
- (n3 = e4.codePointAt(s5)) <= 127 ? o3 += 1 : n3 <= 2047 ? o3 += 2 : n3 <= 65535 ? o3 += 3 : (o3 += 4, s5++);
- else if ("utf-16" === t4 || "utf16" === t4)
for (var a4 = 0; a4 < i5; a4++)
- (n3 = e4.codePointAt(a4)) <= 65535 ? o3 += 2 : (o3 += 4, a4++);
+ (n3 = e4.codePointAt(a4)) <= 127 ? o3 += 1 : n3 <= 2047 ? o3 += 2 : n3 <= 65535 ? o3 += 3 : (o3 += 4, a4++);
+ else if ("utf-16" === t4 || "utf16" === t4)
+ for (var s5 = 0; s5 < i5; s5++)
+ (n3 = e4.codePointAt(s5)) <= 65535 ? o3 += 2 : (o3 += 4, s5++);
else
o3 = e4.replace(/[^\x00-\xff]/g, "aa").length;
return o3;
}(JSON.stringify(i4));
- return i4.type === R2.MSG_MERGER && 11264 < e3 ? a3._mergerMessageHandler.uploadMergerMessage(i4, e3).then(function(e4) {
- e4 = a3._mergerMessageHandler.createMergerMessagePack(i4, s4, e4);
- return a3.req(e4);
- }) : (u3.setMessageRandom(i4), t3.sendMessage(i4, s4));
+ return i4.type === R2.MSG_MERGER && 11264 < e3 ? s4._mergerMessageHandler.uploadMergerMessage(i4, e3).then(function(e4) {
+ e4 = s4._mergerMessageHandler.createMergerMessagePack(i4, a3, e4);
+ return s4.req(e4);
+ }) : (u3.setMessageRandom(i4), t3.sendMessage(i4, a3));
}).then(function(e3) {
- var e3 = e3.data, t4 = e3.time, n3 = e3.sequence, o3 = e3.readReceiptCode, e3 = e3.messageDropReason, e3 = (A2(o3) && 0 !== o3 && (new P2("sendMessageWithReceipt").setMessage("from:".concat(i4.from, " to:").concat(i4.to, " sequence:").concat(n3, " readReceiptCode:").concat(o3)).end(), M2.w("".concat(c3, " readReceiptCode:").concat(o3, " message:").concat(a3.getErrMsg(o3)))), e3 && (o3 = new P2("messageDropReason"), e3 = "from:".concat(i4.from, " to:").concat(i4.to, " sequence:").concat(n3, " messageDropReason:").concat(e3), o3.setMessage(e3).end(), M2.w("".concat(c3, " ").concat(e3))), a3._addSendMessageSuccessCount(i4, r4), a3._messageOptionsMap.delete(i4.clientSequence), true === i4.isResend && (o3 = u3.findMessage(i4.ID)) && (M2.l("".concat(c3, " resend ok. ID:").concat(o3.ID)), u3.deleteLocalMessage(o3)), i4.status = On, i4.time = t4, false);
- return i4.conversationType === R2.CONV_GROUP ? i4.sequence = n3 : i4.conversationType === R2.CONV_C2C && (o3 = u3.getLatestMessageSentByMe(i4.conversationID)) && (t4 = o3.nick, n3 = o3.avatar, t4 === i4.nick && n3 === i4.avatar || (e3 = true)), e3 && u3.modifyMessageSentByMe({ conversationID: i4.conversationID, latestNick: i4.nick, latestAvatar: i4.avatar }), true === l3 ? i4._onlineOnlyFlag = true : (u3.appendToMessageList(i4), o3 = i4, m2(s4) && m2(s4.messageControlInfo) && (true === s4.messageControlInfo.excludedFromLastMessage && (i4._isExcludedFromLastMessage = true, o3 = ""), true === s4.messageControlInfo.excludedFromUnreadCount) && (i4._isExcludedFromUnreadCount = true), t4 = i4.conversationType, Nt2(i4.to) && (t4 = R2.CONV_TOPIC, a3.get(10).onMessageSent({ groupID: jt2(i4.to), topicID: i4.to, lastMessage: o3 })), u3.onMessageSent({ conversationOptionsList: [{ conversationID: i4.conversationID, unreadCount: 0, type: t4, subType: i4.conversationSubType, lastMessage: o3 }] })), i4._relayFlag || "TIMImageElem" !== i4.type || Bt2(i4.payload.imageInfoArray), T2({ message: i4 });
+ var e3 = e3.data, t4 = e3.time, n3 = e3.sequence, o3 = e3.readReceiptCode, e3 = e3.messageDropReason, e3 = (A2(o3) && 0 !== o3 && (new P2("sendMessageWithReceipt").setMessage("from:".concat(i4.from, " to:").concat(i4.to, " sequence:").concat(n3, " readReceiptCode:").concat(o3)).end(), M2.w("".concat(c3, " readReceiptCode:").concat(o3, " message:").concat(s4.getErrMsg(o3)))), e3 && (o3 = new P2("messageDropReason"), e3 = "from:".concat(i4.from, " to:").concat(i4.to, " sequence:").concat(n3, " messageDropReason:").concat(e3), o3.setMessage(e3).end(), M2.w("".concat(c3, " ").concat(e3))), s4._addSendMessageSuccessCount(i4, r4), s4._messageOptionsMap.delete(i4.clientSequence), true === i4.isResend && (o3 = u3.findMessage(i4.ID)) && (M2.l("".concat(c3, " resend ok. ID:").concat(o3.ID)), u3.deleteLocalMessage(o3)), i4.status = Pn, i4.time = t4, false);
+ return i4.conversationType === R2.CONV_GROUP ? i4.sequence = n3 : i4.conversationType === R2.CONV_C2C && (o3 = u3.getLatestMessageSentByMe(i4.conversationID)) && (t4 = o3.nick, n3 = o3.avatar, t4 === i4.nick && n3 === i4.avatar || (e3 = true)), e3 && u3.modifyMessageSentByMe({ conversationID: i4.conversationID, latestNick: i4.nick, latestAvatar: i4.avatar }), true === l3 ? i4._onlineOnlyFlag = true : (u3.appendToMessageList(i4), o3 = i4, m2(a3) && m2(a3.messageControlInfo) && (true === a3.messageControlInfo.excludedFromLastMessage && (i4._isExcludedFromLastMessage = true, o3 = ""), true === a3.messageControlInfo.excludedFromUnreadCount) && (i4._isExcludedFromUnreadCount = true), t4 = i4.conversationType, Ut2(i4.to) && (t4 = R2.CONV_TOPIC, s4.get(10).onMessageSent({ groupID: Xt2(i4.to), topicID: i4.to, lastMessage: o3 })), u3.onMessageSent({ conversationOptionsList: [{ conversationID: i4.conversationID, unreadCount: 0, type: t4, subType: i4.conversationSubType, lastMessage: o3 }] })), i4._relayFlag || "TIMImageElem" !== i4.type || Wt2(i4.payload.imageInfoArray), T2({ message: i4 });
});
}).catch(function(e3) {
- return a3._onSendMessageFailed(i4, e3, l3);
+ return s4._onSendMessageFailed(i4, e3, l3);
})) : this._onNoModule();
} }, { key: "_guardForGroup", value: function(e3) {
if (e3.conversationType !== R2.CONV_GROUP)
@@ -15311,26 +15318,26 @@ var chat = { exports: {} };
var t3 = this.get(7);
if (!t3)
return this._onNoModule();
- if (Ot2({ groupID: e3.to })) {
+ if (Pt2({ groupID: e3.to })) {
var n3 = t3.getLocalGroupProfile(e3.to);
if (n3 && n3.isSupportTopic)
return E2({ code: k2.MSG_SEND_GRP_WITH_TOPIC_FAIL });
}
return t3.guardForAVChatRoom(e3);
} }, { key: "_onSendMessageFailed", value: function(e3, t3) {
- var n3 = 2 < arguments.length && void 0 !== arguments[2] && arguments[2], o3 = "".concat(this._n, "._onSendMessageFailed"), i4 = (e3.status = Nn, 80001 !== t3.code && 80004 !== t3.code || (e3.hasRiskContent = true), this.get(11)), s4 = (i4.deleteMessageRandom(e3), 10100 <= t3.code && t3.code <= 10200 || 120001 <= t3.code && t3.code <= 13e4), n3 = (n3 || s4 || true === i4.appendToMessageList(e3) && M2.l("".concat(o3, " message stored, ID:").concat(e3.ID)), this._addSendMessageFailCountOnUser(e3, t3), new P2("sendMessage")), s4 = "head.seq:".concat(t3.data.headSeq, " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to);
- return Ie2 && ("connection" in navigator && (i4 = navigator.connection, s4 += " downlink:".concat(i4.downlink, " effectiveType:").concat(i4.effectiveType, " rtt:").concat(i4.rtt)), "memory" in window.performance) && (i4 = window.performance.memory, s4 += " usedJSHeapSize:".concat(i4.usedJSHeapSize, " totalJSHeapSize:").concat(i4.totalJSHeapSize, " jsHeapSizeLimit:").concat(i4.jsHeapSizeLimit)), n3.setMessage(s4).setError(t3).end(), M2.e("".concat(o3, " ").concat(s4, " error:"), t3), E2(new L2({ code: t3 && t3.code ? t3.code : k2.MSG_SEND_FAIL, message: t3 && t3.message ? t3.message : void 0, data: { message: e3 } }));
+ var n3 = 2 < arguments.length && void 0 !== arguments[2] && arguments[2], o3 = "".concat(this._n, "._onSendMessageFailed"), i4 = (e3.status = Un, 80001 !== t3.code && 80004 !== t3.code || (e3.hasRiskContent = true), this.get(11)), a3 = (i4.deleteMessageRandom(e3), 10100 <= t3.code && t3.code <= 10200 || 120001 <= t3.code && t3.code <= 13e4), n3 = (n3 || a3 || true === i4.appendToMessageList(e3) && M2.l("".concat(o3, " message stored, ID:").concat(e3.ID)), this._addSendMessageFailCountOnUser(e3, t3), new P2("sendMessage")), a3 = "head.seq:".concat(t3.data.headSeq, " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to);
+ return Ce2 && ("connection" in navigator && (i4 = navigator.connection, a3 += " downlink:".concat(i4.downlink, " effectiveType:").concat(i4.effectiveType, " rtt:").concat(i4.rtt)), "memory" in window.performance) && (i4 = window.performance.memory, a3 += " usedJSHeapSize:".concat(i4.usedJSHeapSize, " totalJSHeapSize:").concat(i4.totalJSHeapSize, " jsHeapSizeLimit:").concat(i4.jsHeapSizeLimit)), n3.setMessage(a3).setError(t3).end(), M2.e("".concat(o3, " ").concat(a3, " error:"), t3), E2(new L2({ code: t3 && t3.code ? t3.code : k2.MSG_SEND_FAIL, message: t3 && t3.message ? t3.message : void 0, data: { message: e3 } }));
} }, { key: "_getSendMessageSpecifiedKey", value: function(e3) {
if ([R2.MSG_IMAGE, R2.MSG_AUDIO, R2.MSG_VIDEO, R2.MSG_FILE].includes(e3.type))
- return jn;
+ return Xn;
if (e3.conversationType === R2.CONV_C2C)
- return Kn;
+ return jn;
if (e3.conversationType === R2.CONV_GROUP) {
var t3 = this.get(7);
if (t3) {
t3 = t3.getLocalGroupProfile(e3.to);
if (t3)
- return e3 = t3.type, At2(e3) ? Yn : Wn;
+ return e3 = t3.type, Gt2(e3) ? zn : Jn;
}
}
} }, { key: "_addSendMessageTotalCount", value: function(e3) {
@@ -15338,12 +15345,12 @@ var chat = { exports: {} };
e3 && this.get(26).addTotalCount(e3);
} }, { key: "_addSendMessageSuccessCount", value: function(e3, t3) {
var n3, e3 = this._getSendMessageSpecifiedKey(e3);
- e3 && ((n3 = this.get(26)).addSuccessCount(e3), n3.addCost(e3, tn(t3, false)));
+ e3 && ((n3 = this.get(26)).addSuccessCount(e3), n3.addCost(e3, an(t3, false)));
} }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t3) {
var n3, t3 = t3.code, t3 = void 0 === t3 ? -1 : t3, o3 = this.get(26), e3 = this._getSendMessageSpecifiedKey(e3);
- e3 === jn && (n3 = false, n3 = wi.includes(t3) ? true : n3) ? o3.addFailedCountOfUserSide(Jn) : qi(t3) && e3 && o3.addFailedCountOfUserSide(e3);
+ e3 === Xn && (n3 = false, n3 = Ki.includes(t3) ? true : n3) ? o3.addFailedCountOfUserSide(Zn) : Yi(t3) && e3 && o3.addFailedCountOfUserSide(e3);
} }, { key: "resendMessage", value: function(e3, t3) {
- return e3.isResend = true, e3.status = An, this.sendMessageInstance(e3, t3);
+ return e3.isResend = true, e3.status = Gn, this.sendMessageInstance(e3, t3);
} }, { key: "revokeMessage", value: function(n3) {
var o3, i4, t3 = this, e3 = null;
return n3.conversationType === R2.CONV_C2C ? e3 = this.get(6) : n3.conversationType === R2.CONV_GROUP && (e3 = this.get(7)), e3 ? ((o3 = new P2("revokeMessage")).setMessage("type:".concat(n3.type, " from:").concat(n3.from, " to:").concat(n3.to)), i4 = "".concat(this._n, ".").concat("revokeMessage"), e3.revokeMessage(n3).then(function(e4) {
@@ -15355,24 +15362,24 @@ var chat = { exports: {} };
return M2.w("".concat(i4, " failed. error:"), e4), E2(t4);
})) : this._onNoModule();
} }, { key: "deleteMessage", value: function(e3) {
- var t3 = this, n3 = null, o3 = e3[0], i4 = o3.conversationID, s4 = "", a3 = [], r4 = [];
+ var t3 = this, n3 = null, o3 = e3[0], i4 = o3.conversationID, a3 = "", s4 = [], r4 = [];
if (o3.conversationType === R2.CONV_C2C)
- n3 = this.get(6), s4 = i4.replace(R2.CONV_C2C, ""), e3.forEach(function(e4) {
- e4 && e4.status === On && e4.conversationID === i4 && (e4._onlineOnlyFlag || a3.push("".concat(e4.sequence, "_").concat(e4.random, "_").concat(e4.time)), r4.push(e4));
+ n3 = this.get(6), a3 = i4.replace(R2.CONV_C2C, ""), e3.forEach(function(e4) {
+ e4 && e4.status === Pn && e4.conversationID === i4 && (e4._onlineOnlyFlag || s4.push("".concat(e4.sequence, "_").concat(e4.random, "_").concat(e4.time)), r4.push(e4));
});
else if (o3.conversationType === R2.CONV_GROUP)
- n3 = this.get(7), s4 = i4.replace(R2.CONV_GROUP, ""), e3.forEach(function(e4) {
- e4 && e4.status === On && e4.conversationID === i4 && (e4._onlineOnlyFlag || a3.push("".concat(e4.sequence)), r4.push(e4));
+ n3 = this.get(7), a3 = i4.replace(R2.CONV_GROUP, ""), e3.forEach(function(e4) {
+ e4 && e4.status === Pn && e4.conversationID === i4 && (e4._onlineOnlyFlag || s4.push("".concat(e4.sequence)), r4.push(e4));
});
else if (o3.conversationType === R2.CONV_SYSTEM)
return E2({ code: k2.CANNOT_DELETE_GRP_SYSTEM_NOTICE });
if (!n3)
return this._onNoModule();
- if (0 === a3.length)
+ if (0 === s4.length)
return this._onMessageDeleted(r4);
- 30 < a3.length && (a3 = a3.slice(0, 30), r4 = r4.slice(0, 30));
- var c3 = new P2("deleteMessage"), u3 = (c3.setMessage("to:".concat(s4, " count:").concat(a3.length)), "".concat(this._n, ".").concat("deleteMessage"));
- return n3.deleteMessage({ to: s4, keyList: a3 }).then(function(e4) {
+ 30 < s4.length && (s4 = s4.slice(0, 30), r4 = r4.slice(0, 30));
+ var c3 = new P2("deleteMessage"), u3 = (c3.setMessage("to:".concat(a3, " count:").concat(s4.length)), "".concat(this._n, ".").concat("deleteMessage"));
+ return n3.deleteMessage({ to: a3, keyList: s4 }).then(function(e4) {
return c3.end(), M2.i("".concat(u3, " ok")), t3._onMessageDeleted(r4);
}).catch(function(e4) {
c3.setError(e4).end(), M2.w("".concat(u3, " failed. error:"), e4);
@@ -15392,8 +15399,8 @@ var chat = { exports: {} };
return i4.setCode(e4.code).setMoreMessage(e4.requestID).end(), M2.w("".concat(o3, " failed. error:"), e4), E2({ code: e4.code || k2.TRANSLATE_TEXT_FAIL, message: e4.message });
});
} }, { key: "convertVoiceToText", value: function(e3) {
- var t3, o3, i4, n3 = e3.message, e3 = e3.language, s4 = n3.payload.url, n3 = (n3.from === this.getMyUserID() && "out" === n3.flow && (s4 = n3.payload.remoteAudioUrl), /\.(wav|pcm|ogg-opus|speex|silk|mp3|m4a|aac|amr)/);
- return n3.test(s4) ? (n3 = n3.exec(s4)[1] || "mp3", t3 = "16k_zh-PY", e3 ? "zh (cmn-Hans-CN)" === e3 ? t3 = "16k_zh" : "en-US" === e3 ? t3 = "16k_en" : "yue-Hant-HK" === e3 ? t3 = "16k_yue" : "ja-JP" === e3 && (t3 = "16k_ja") : t3 = "16k_zh-PY", e3 = "serviceType:".concat(t3, " url:").concat(s4), o3 = "".concat(this._n, ".").concat("convertVoiceToText"), M2.i("".concat(o3, " ").concat(e3)), (i4 = new P2("convertVoiceToText")).setMessage(e3), this.req({ P: G2.VOICE_TO_TEXT, data: { url: s4, language: t3, SDKAppID: this.getSDKAppID(), format: n3 } }).then(function(e4) {
+ var t3, o3, i4, n3 = e3.message, e3 = e3.language, a3 = n3.payload.url, n3 = (n3.from === this.getMyUserID() && "out" === n3.flow && (a3 = n3.payload.remoteAudioUrl), /\.(wav|pcm|ogg-opus|speex|silk|mp3|m4a|aac|amr)/);
+ return n3.test(a3) ? (n3 = n3.exec(a3)[1] || "mp3", t3 = "16k_zh-PY", e3 ? "zh (cmn-Hans-CN)" === e3 ? t3 = "16k_zh" : "en-US" === e3 ? t3 = "16k_en" : "yue-Hant-HK" === e3 ? t3 = "16k_yue" : "ja-JP" === e3 && (t3 = "16k_ja") : t3 = "16k_zh-PY", e3 = "serviceType:".concat(t3, " url:").concat(a3), o3 = "".concat(this._n, ".").concat("convertVoiceToText"), M2.i("".concat(o3, " ").concat(e3)), (i4 = new P2("convertVoiceToText")).setMessage(e3), this.req({ P: G2.VOICE_TO_TEXT, data: { url: a3, language: t3, SDKAppID: this.getSDKAppID(), format: n3 } }).then(function(e4) {
var e4 = e4.data, t4 = e4.error, n4 = e4.requestID, e4 = e4.result;
if (0 === t4.code)
return i4.end(), M2.i("".concat(o3, " ok. requestID:").concat(n4)), T2({ result: e4 });
@@ -15414,21 +15421,21 @@ var chat = { exports: {} };
if (e3.isMessageFromOrToAVChatroom(i4))
return E2({ code: k2.MSG_MODIFY_DISABLED_IN_AV, data: { message: n3 } });
}
- var s4 = new P2("modifyMessage"), a3 = (s4.setMessage("to:".concat(i4)), "".concat(this._n, ".modifyRemoteMessage"));
+ var a3 = new P2("modifyMessage"), s4 = (a3.setMessage("to:".concat(i4)), "".concat(this._n, ".modifyRemoteMessage"));
return e3.modifyRemoteMessage(n3).then(function(e4) {
- s4.end(), M2.i("".concat(a3, " ok"));
+ a3.end(), M2.i("".concat(s4, " ok"));
e4 = o3._onModifyRemoteMessageResp(n3, e4.data);
return T2({ message: e4 });
}).catch(function(e4) {
var t4;
- return s4.setCode(e4.code).setMoreMessage(e4.message).end(), M2.w("".concat(a3, " failed. error:"), e4), 20027 === e4.code ? (t4 = o3._onModifyRemoteMessageResp(n3, e4.data), E2({ code: k2.MSG_MODIFY_CONFLICT, data: { message: t4 } })) : E2({ code: e4.code, message: e4.message, data: { message: n3 } });
+ return a3.setCode(e4.code).setMoreMessage(e4.message).end(), M2.w("".concat(s4, " failed. error:"), e4), 20027 === e4.code ? (t4 = o3._onModifyRemoteMessageResp(n3, e4.data), E2({ code: k2.MSG_MODIFY_CONFLICT, data: { message: t4 } })) : E2({ code: e4.code, message: e4.message, data: { message: n3 } });
});
} }, { key: "_onModifyRemoteMessageResp", value: function(e3, t3) {
M2.d("".concat(this._n, "._onModifyRemoteMessageResp options:"), t3);
- var n3 = e3.conversationType, o3 = e3.from, i4 = e3.to, s4 = e3.random, a3 = e3.sequence, e3 = e3.time, r4 = t3.elements, c3 = t3.messageVersion, t3 = t3.cloudCustomData, t3 = void 0 === t3 ? "" : t3;
- return this.get(11).onMessageModified({ conversationType: n3, from: o3, to: i4, time: e3, random: s4, sequence: a3, elements: r4, cloudCustomData: t3, messageVersion: c3 });
+ var n3 = e3.conversationType, o3 = e3.from, i4 = e3.to, a3 = e3.random, s4 = e3.sequence, e3 = e3.time, r4 = t3.elements, c3 = t3.messageVersion, t3 = t3.cloudCustomData, t3 = void 0 === t3 ? "" : t3;
+ return this.get(11).onMessageModified({ conversationType: n3, from: o3, to: i4, time: e3, random: a3, sequence: s4, elements: r4, cloudCustomData: t3, messageVersion: c3 });
} }, { key: "_generateUUID", value: function(e3, t3) {
- var n3 = this.get(12), n3 = "".concat(n3.getSDKAppID(), "-").concat(n3.getUserID(), "-").concat(gt2());
+ var n3 = this.get(12), n3 = "".concat(n3.getSDKAppID(), "-").concat(n3.getUserID(), "-").concat(vt2());
return t3 ? "".concat(n3, ".").concat(t3) : (e3 = (t3 = e3.name || e3.value || e3.url || e3.tempFilePath) && t3.slice(t3.lastIndexOf(".") + 1)) ? "".concat(n3, ".").concat(e3) : n3;
} }, { key: "getMessageOption", value: function(e3) {
return this._messageOptionsMap.get(e3);
@@ -15443,8 +15450,8 @@ var chat = { exports: {} };
return "";
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._messageOptionsMap.clear();
- } }]), Vi = (t2(Zi, c2), e2(Zi, [{ key: "onMsgExtNotify", value: function(e3) {
- var o3 = this, e3 = e3.dataList, t3 = e3.messageInfo, i4 = e3.operateType, n3 = e3.operateResultList, s4 = e3.tinyID, e3 = e3.globalSequence, a3 = t3.clientTime, t3 = t3.random, r4 = "".concat(s4, "-").concat(a3, "-").concat(t3), c3 = [], u3 = [], l3 = (M2.l("".concat(this._n, ".onMsgExtNotify messageID:").concat(r4, " operateType:").concat(i4, " globalSequence:").concat(e3)), this._updateGlobalSeq(r4, e3), false), d3 = false;
+ } }]), Ji = (t2(ia, c2), e2(ia, [{ key: "onMsgExtNotify", value: function(e3) {
+ var o3 = this, e3 = e3.dataList, t3 = e3.messageInfo, i4 = e3.operateType, n3 = e3.operateResultList, a3 = e3.tinyID, e3 = e3.globalSequence, s4 = t3.clientTime, t3 = t3.random, r4 = "".concat(a3, "-").concat(s4, "-").concat(t3), c3 = [], u3 = [], l3 = (M2.l("".concat(this._n, ".onMsgExtNotify messageID:").concat(r4, " operateType:").concat(i4, " globalSequence:").concat(e3)), this._updateGlobalSeq(r4, e3), false), d3 = false;
n3.forEach(function(e4) {
var t4 = e4.extensions, t4 = void 0 === t4 ? [] : t4, n4 = e4.clearSequence;
1 === i4 ? (l3 = true, t4.forEach(function(e5) {
@@ -15456,51 +15463,51 @@ var chat = { exports: {} };
}), o3._clearLocalExt(r4, n4));
}), l3 && this.emitOEvt(h2.MESSAGE_EXTENSIONS_UPDATED, { messageID: r4, extensions: c3 }), d3 && this.emitOEvt(h2.MESSAGE_EXTENSIONS_DELETED, { messageID: r4, keyList: u3 });
} }, { key: "setMessageExtensions", value: function(e3, t3) {
- var o3, n3, i4, s4, a3, r4, c3, u3 = "setMessageExtensions";
- return this.canIUse(g2.MSG_EXT) ? (o3 = "".concat(this._n, ".").concat(u3), n3 = e3.ID, i4 = e3.conversationID, s4 = e3.sequence, a3 = e3.time, r4 = d2(t3), 20 < t3.length && (r4 = t3.slice(0, 20), M2.w("".concat(o3, ". the length of extensions cannot exceed 20."))), t3 = "convID:".concat(i4, " messageID:").concat(n3, " sequence:").concat(s4, " time:").concat(a3, " count:").concat(r4.length), (c3 = new P2(u3)).setMessage(t3), M2.l("".concat(o3, " ").concat(t3)), this._modifyMsgExts(e3, r4).then(function(e4) {
+ var o3, n3, i4, a3, s4, r4, c3, u3 = "setMessageExtensions";
+ return this.canIUse(g2.MSG_EXT) ? (o3 = "".concat(this._n, ".").concat(u3), n3 = e3.ID, i4 = e3.conversationID, a3 = e3.sequence, s4 = e3.time, r4 = d2(t3), 20 < t3.length && (r4 = t3.slice(0, 20), M2.w("".concat(o3, ". the length of extensions cannot exceed 20."))), t3 = "convID:".concat(i4, " messageID:").concat(n3, " sequence:").concat(a3, " time:").concat(s4, " count:").concat(r4.length), (c3 = new P2(u3)).setMessage(t3), M2.l("".concat(o3, " ").concat(t3)), this._modifyMsgExts(e3, r4).then(function(e4) {
var t4 = e4.resultList, n4 = e4.successCount, e4 = e4.failureCount, n4 = "successCount:".concat(n4, " failCount:").concat(e4);
return c3.setMoreMessage(n4).end(), M2.l("".concat(o3, " ok. ").concat(n4)), T2({ extensions: t4 });
}).catch(function(e4) {
return c3.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
})) : this.noUse(u3);
} }, { key: "getMessageExtensions", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4, c3 = this, u3 = "getMessageExtensions";
- return this.canIUse(g2.MSG_EXT) ? (t3 = "".concat(this._n, ".").concat(u3), n3 = e3.ID, s4 = e3.conversationID, o3 = e3.sequence, i4 = e3.time, s4 = "convID:".concat(s4, " messageID:").concat(n3, " sequence:").concat(o3, " time:").concat(i4), (a3 = new P2(u3)).setMessage(s4), r4 = void M2.l("".concat(t3, " ").concat(s4)), this.getMsgExtsMap.has(n3) && (r4 = this._getGlobalSeq(n3)), this._getMsgExts(e3, r4).then(function(e4) {
- return a3.end(), M2.l("".concat(t3, " ok. extCount:").concat(e4.length)), N3(r4) && 0 < e4.length && c3.getMsgExtsMap.set(n3, 1), T2({ extensions: e4 });
+ var t3, n3, o3, i4, a3, s4, r4, c3 = this, u3 = "getMessageExtensions";
+ return this.canIUse(g2.MSG_EXT) ? (t3 = "".concat(this._n, ".").concat(u3), n3 = e3.ID, a3 = e3.conversationID, o3 = e3.sequence, i4 = e3.time, a3 = "convID:".concat(a3, " messageID:").concat(n3, " sequence:").concat(o3, " time:").concat(i4), (s4 = new P2(u3)).setMessage(a3), r4 = void M2.l("".concat(t3, " ").concat(a3)), this.getMsgExtsMap.has(n3) && (r4 = this._getGlobalSeq(n3)), this._getMsgExts(e3, r4).then(function(e4) {
+ return s4.end(), M2.l("".concat(t3, " ok. extCount:").concat(e4.length)), N3(r4) && 0 < e4.length && c3.getMsgExtsMap.set(n3, 1), T2({ extensions: e4 });
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this.noUse(u3);
} }, { key: "deleteMessageExtensions", value: function(e3, t3) {
- var i4, n3, s4, o3, a3, r4, c3, u3 = "deleteMessageExtensions";
- return this.canIUse(g2.MSG_EXT) ? (i4 = "".concat(this._n, ".").concat(u3), n3 = [], s4 = 3, S2(t3) || (s4 = 2, t3.forEach(function(e4) {
+ var i4, n3, a3, o3, s4, r4, c3, u3 = "deleteMessageExtensions";
+ return this.canIUse(g2.MSG_EXT) ? (i4 = "".concat(this._n, ".").concat(u3), n3 = [], a3 = 3, S2(t3) || (a3 = 2, t3.forEach(function(e4) {
n3.push({ key: e4, value: "", seq: 0 });
- })), t3 = e3.ID, r4 = e3.conversationID, o3 = e3.sequence, a3 = e3.time, r4 = "convID:".concat(r4, " messageID:").concat(t3, " sequence:").concat(o3, " time:").concat(a3, " operateType:").concat(s4), (c3 = new P2(u3)).setMessage(r4), M2.l("".concat(i4, " ").concat(r4)), this._modifyMsgExts(e3, n3, s4).then(function(e4) {
+ })), t3 = e3.ID, r4 = e3.conversationID, o3 = e3.sequence, s4 = e3.time, r4 = "convID:".concat(r4, " messageID:").concat(t3, " sequence:").concat(o3, " time:").concat(s4, " operateType:").concat(a3), (c3 = new P2(u3)).setMessage(r4), M2.l("".concat(i4, " ").concat(r4)), this._modifyMsgExts(e3, n3, a3).then(function(e4) {
var t4 = e4.resultList, n4 = e4.successCount, e4 = e4.failureCount, o4 = "";
- return 2 === s4 && (o4 = "success count:".concat(n4, " fail count:").concat(e4)), c3.setMoreMessage("".concat(o4)).end(), M2.l("".concat(i4, " ok. ").concat(o4)), T2({ extensions: t4 });
+ return 2 === a3 && (o4 = "success count:".concat(n4, " fail count:").concat(e4)), c3.setMoreMessage("".concat(o4)).end(), M2.l("".concat(i4, " ok. ").concat(o4)), T2({ extensions: t4 });
}).catch(function(e4) {
return c3.setError(e4).end(), M2.e("".concat(i4, " failed. error:"), e4), E2(e4);
})) : this.noUse(u3);
} }, { key: "_modifyMsgExts", value: function(n3, e3) {
- var o3 = this, t3 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1, i4 = Nt2(n3.to) ? R2.CONV_TOPIC : n3.conversationType, s4 = void 0, a3 = (3 !== t3 && (s4 = this._getReqExts(n3, e3)), null);
+ var o3 = this, t3 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1, i4 = Ut2(n3.to) ? R2.CONV_TOPIC : n3.conversationType, a3 = void 0, s4 = (3 !== t3 && (a3 = this._getReqExts(n3, e3)), null);
switch (i4) {
case R2.CONV_C2C:
- a3 = this.get(6);
+ s4 = this.get(6);
break;
case R2.CONV_GROUP:
- a3 = this.get(7);
+ s4 = this.get(7);
break;
case R2.CONV_TOPIC:
- a3 = this.get(10);
+ s4 = this.get(10);
break;
default:
return E2({ code: k2.NO_MODULE });
}
- return a3.modifyMsgExts(n3, s4, t3).then(function(e4) {
- var e4 = e4.data, t4 = e4.extensions, e4 = e4.seq, i5 = [], s5 = 0, a4 = 0, r4 = [];
+ return s4.modifyMsgExts(n3, a3, t3).then(function(e4) {
+ var e4 = e4.data, t4 = e4.extensions, e4 = e4.seq, i5 = [], a4 = 0, s5 = 0, r4 = [];
return (t4 = S2(t4) ? [] : t4).forEach(function(e5) {
var t5 = e5.errorCode, e5 = e5.extension, n4 = e5.key, o4 = e5.value, e5 = e5.seq;
- i5.push({ code: t5, key: n4, value: o4 }), 0 === t5 ? s5++ : a4++, r4.push({ key: n4, value: o4, seq: e5 });
- }), o3._updateGlobalSeq(n3.ID, e4), 0 < r4.length && (o3._updateLocalExt(n3.ID, r4), r4 = null), { resultList: i5, successCount: s5, failureCount: a4 };
+ i5.push({ code: t5, key: n4, value: o4 }), 0 === t5 ? a4++ : s5++, r4.push({ key: n4, value: o4, seq: e5 });
+ }), o3._updateGlobalSeq(n3.ID, e4), 0 < r4.length && (o3._updateLocalExt(n3.ID, r4), r4 = null), { resultList: i5, successCount: a4, failureCount: s5 };
}).catch(function(e4) {
return E2(e4);
});
@@ -15514,8 +15521,8 @@ var chat = { exports: {} };
i4.push({ key: t4, value: e4, seq: 0 });
}), i4;
} }, { key: "_getMsgExts", value: function(i4, e3) {
- var s4 = this, a3 = "".concat(this._n, "._getMsgExts"), r4 = i4.ID, t3 = i4.to, n3 = null;
- switch (Nt2(t3) ? R2.CONV_TOPIC : i4.conversationType) {
+ var a3 = this, s4 = "".concat(this._n, "._getMsgExts"), r4 = i4.ID, t3 = i4.to, n3 = null;
+ switch (Ut2(t3) ? R2.CONV_TOPIC : i4.conversationType) {
case R2.CONV_C2C:
n3 = this.get(6);
break;
@@ -15530,7 +15537,7 @@ var chat = { exports: {} };
}
return n3.getMessageExtensions(i4, e3).then(function(e4) {
var e4 = e4.data, t4 = e4.extensions, n4 = e4.completeFlag, o3 = e4.globalSequence, e4 = e4.clearSequence, t4 = S2(t4) ? [] : t4;
- return M2.l("".concat(a3, " ok. completeFlag:").concat(n4, " globalSequence:").concat(o3, " clearSequence:").concat(e4, " count:").concat(t4.length)), s4._updateLocalExt(r4, t4), s4._clearLocalExt(r4, e4), s4._updateGlobalSeq(r4, o3), 1 !== n4 ? (e4 = t4.slice(-1)[0].seq + 1, s4._getMsgExts(i4, e4)) : s4._getLocalExtList(r4);
+ return M2.l("".concat(s4, " ok. completeFlag:").concat(n4, " globalSequence:").concat(o3, " clearSequence:").concat(e4, " count:").concat(t4.length)), a3._updateLocalExt(r4, t4), a3._clearLocalExt(r4, e4), a3._updateGlobalSeq(r4, o3), 1 !== n4 ? (e4 = t4.slice(-1)[0].seq + 1, a3._getMsgExts(i4, e4)) : a3._getLocalExtList(r4);
}).catch(function(e4) {
return E2(e4);
});
@@ -15562,86 +15569,86 @@ var chat = { exports: {} };
this.globalSeqMap.set(e3, t3);
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this.msgExtMap.clear(), this.globalSeqMap.clear(), this.getMsgExtsMap.clear();
- } }])), Bi = (t2(Xi, c2), e2(Xi, [{ key: "onReactionNotifyList", value: function(e3) {
- var s4 = this, e3 = (e3 || {}).dataList;
+ } }])), zi = (t2(oa, c2), e2(oa, [{ key: "onReactionNotifyList", value: function(e3) {
+ var a3 = this, e3 = (e3 || {}).dataList;
(void 0 === e3 ? [] : e3).forEach(function(e4) {
var t3 = e4.C2CMessageInfo, n3 = e4.groupMessageInfo, n3 = void 0 === n3 ? {} : n3, e4 = e4.reactionList, e4 = void 0 === e4 ? [] : e4, t3 = y2(y2({}, void 0 === t3 ? {} : t3), n3), n3 = t3.tinyID, o3 = t3.clientTime, t3 = t3.random, n3 = "".concat(n3, "-").concat(o3, "-").concat(t3), i4 = [];
e4.forEach(function(e5) {
N3(e5.userIDList) && (e5.userIDList = [], e5.count = 0), i4.push.apply(i4, d2(e5.userIDList));
- }), M2.l("".concat(s4._n, ".onReactionNotifyList messageID:").concat(n3, " reactionList:").concat(e4.length)), s4._handleReactionSummary([{ messageID: n3, reactionList: e4 }], i4).then(function(e5) {
- s4.emitOEvt(h2.MESSAGE_REACTIONS_UPDATED, y2({}, e5[0]));
+ }), M2.l("".concat(a3._n, ".onReactionNotifyList messageID:").concat(n3, " reactionList:").concat(e4.length)), a3._handleReactionSummary([{ messageID: n3, reactionList: e4 }], i4).then(function(e5) {
+ a3.emitOEvt(h2.MESSAGE_REACTIONS_UPDATED, y2({}, e5[0]));
});
});
} }, { key: "onReactionNotify", value: function(e3) {
var e3 = e3.dataList || {}, t3 = e3.C2CMessageInfo, n3 = e3.groupMessageInfo, n3 = void 0 === n3 ? {} : n3, o3 = e3.reactionID, e3 = e3.operateType, t3 = y2(y2({}, void 0 === t3 ? {} : t3), n3), n3 = t3.tinyID, i4 = t3.clientTime, t3 = t3.random, n3 = "".concat(n3, "-").concat(i4, "-").concat(t3), i4 = (M2.l("".concat(this._n, ".onReactionNotify messageID:").concat(n3, " reactionID:").concat(o3, " operateType:").concat(e3)), 1 === e3 ? this._addReactedByMyselfMap(n3, o3) : this._removeReactedByMyselfMap(n3, o3), "".concat(n3, "-").concat(o3));
this._reactionInfoMap.has(i4) && ((t3 = this._reactionInfoMap.get(i4)).reactedByMyself = 1 === e3, this.emitOEvt(h2.MESSAGE_REACTIONS_UPDATED, { messageID: n3, reactionList: [t3] }));
} }, { key: "addMessageReaction", value: function(t3, n3) {
- var o3, e3, i4, s4, a3 = this, r4 = "addMessageReaction";
- return this.canIUse(g2.MSG_REACTION) ? (o3 = "".concat(this._n, ".").concat(r4), s4 = t3.ID, e3 = t3.conversationID, e3 = "convID:".concat(e3, " messageID:").concat(s4, " reactionID:").concat(n3), (i4 = new P2(r4)).setMessage(e3), M2.l("".concat(o3, " ").concat(e3)), s4 = this._createReactionOperationPack(t3, n3, 1), this._addReactedByMyselfMap(t3.ID, n3), this.req(s4).then(function() {
+ var o3, e3, i4, a3, s4 = this, r4 = "addMessageReaction";
+ return this.canIUse(g2.MSG_REACTION) ? (o3 = "".concat(this._n, ".").concat(r4), a3 = t3.ID, e3 = t3.conversationID, e3 = "convID:".concat(e3, " messageID:").concat(a3, " reactionID:").concat(n3), (i4 = new P2(r4)).setMessage(e3), M2.l("".concat(o3, " ").concat(e3)), a3 = this._createReactionOperationPack(t3, n3, 1), this._addReactedByMyselfMap(t3.ID, n3), this.req(a3).then(function() {
return i4.end(), M2.l("".concat(o3, " ok.")), T2();
}).catch(function(e4) {
- return a3._removeReactedByMyselfMap(t3.ID, n3), i4.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
+ return s4._removeReactedByMyselfMap(t3.ID, n3), i4.setError(e4).end(), M2.e("".concat(o3, " failed. error:"), e4), E2(e4);
})) : this.noUse(r4);
} }, { key: "removeMessageReaction", value: function(e3, t3) {
- var n3, o3, i4, s4, a3 = "removeMessageReaction";
- return this.canIUse(g2.MSG_REACTION) ? (n3 = "".concat(this._n, ".").concat(a3), s4 = e3.ID, o3 = e3.conversationID, o3 = "convID:".concat(o3, " messageID:").concat(s4, " reactionID:").concat(t3), (i4 = new P2(a3)).setMessage(o3), M2.l("".concat(n3, " ").concat(o3)), s4 = this._createReactionOperationPack(e3, t3, 2), this._removeReactedByMyselfMap(e3.ID, t3), this.req(s4).then(function() {
+ var n3, o3, i4, a3, s4 = "removeMessageReaction";
+ return this.canIUse(g2.MSG_REACTION) ? (n3 = "".concat(this._n, ".").concat(s4), a3 = e3.ID, o3 = e3.conversationID, o3 = "convID:".concat(o3, " messageID:").concat(a3, " reactionID:").concat(t3), (i4 = new P2(s4)).setMessage(o3), M2.l("".concat(n3, " ").concat(o3)), a3 = this._createReactionOperationPack(e3, t3, 2), this._removeReactedByMyselfMap(e3.ID, t3), this.req(a3).then(function() {
return i4.end(), M2.l("".concat(n3, " ok.")), T2();
}).catch(function(e4) {
return i4.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4), E2(e4);
- })) : this.noUse(a3);
+ })) : this.noUse(s4);
} }, { key: "getMessageReactions", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4 = this, c3 = "getMessageReactions";
- return this.canIUse(g2.MSG_REACTION) ? (t3 = "".concat(this._n, ".").concat(c3), n3 = e3.messageList, a3 = e3.maxUserCountPerReaction, o3 = n3[0].conversationID, o3 = "convID:".concat(o3, " maxUserCountPerReaction:").concat(a3, " msgCount:").concat(n3.length), (i4 = new P2(c3)).setMessage(o3), M2.l("".concat(t3, " ").concat(o3)), s4 = /* @__PURE__ */ new Map(), a3 = this._createReactionSummaryPack(y2(y2({}, e3), {}, { messageIDMap: s4 })), this.req(a3).then(function(e4) {
+ var t3, n3, o3, i4, a3, s4, r4 = this, c3 = "getMessageReactions";
+ return this.canIUse(g2.MSG_REACTION) ? (t3 = "".concat(this._n, ".").concat(c3), n3 = e3.messageList, s4 = e3.maxUserCountPerReaction, o3 = n3[0].conversationID, o3 = "convID:".concat(o3, " maxUserCountPerReaction:").concat(s4, " msgCount:").concat(n3.length), (i4 = new P2(c3)).setMessage(o3), M2.l("".concat(t3, " ").concat(o3)), a3 = /* @__PURE__ */ new Map(), s4 = this._createReactionSummaryPack(y2(y2({}, e3), {}, { messageIDMap: a3 })), this.req(s4).then(function(e4) {
var e4 = e4.data.resultList, o4 = [], i5 = [];
return (void 0 === e4 ? [] : e4).forEach(function(e5) {
- var t4 = e5.messageKey, t4 = void 0 === t4 ? void 0 : t4, n4 = e5.messageSequence, n4 = void 0 === n4 ? void 0 : n4, e5 = e5.reactionList, e5 = void 0 === e5 ? [] : e5, n4 = N3(t4) ? s4.get(n4) : s4.get(t4);
+ var t4 = e5.messageKey, t4 = void 0 === t4 ? void 0 : t4, n4 = e5.messageSequence, n4 = void 0 === n4 ? void 0 : n4, e5 = e5.reactionList, e5 = void 0 === e5 ? [] : e5, n4 = N3(t4) ? a3.get(n4) : a3.get(t4);
o4.push({ messageID: n4, reactionList: e5 }), e5.forEach(function(e6) {
i5.push.apply(i5, d2(e6.userIDList));
});
}), r4._handleReactionSummary(o4, i5);
}).then(function(e4) {
- return i4.end(), M2.l("".concat(t3, " ok.")), s4.clear(), T2({ resultList: e4 });
+ return i4.end(), M2.l("".concat(t3, " ok.")), a3.clear(), T2({ resultList: e4 });
}).catch(function(e4) {
return i4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this.noUse(c3);
} }, { key: "getAllUserListOfMessageReaction", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4, c3, u3 = this, l3 = "getAllUserListOfMessageReaction";
- return this.canIUse(g2.MSG_REACTION) ? (t3 = "".concat(this._n, ".").concat(l3), s4 = e3.message, n3 = e3.reactionID, o3 = e3.nextSeq, i4 = e3.count, c3 = s4.ID, s4 = s4.conversationID, s4 = "convID:".concat(s4, " messageID:").concat(c3, " reactionID:").concat(n3, " nextSeq:").concat(o3, " count:").concat(i4), (a3 = new P2(l3)).setMessage(s4), M2.l("".concat(t3, " ").concat(s4)), r4 = { userList: [], nextSeq: 0, isCompleted: false }, c3 = this._createReactionUserListPack(e3), this.req(c3).then(function(e4) {
+ var t3, n3, o3, i4, a3, s4, r4, c3, u3 = this, l3 = "getAllUserListOfMessageReaction";
+ return this.canIUse(g2.MSG_REACTION) ? (t3 = "".concat(this._n, ".").concat(l3), a3 = e3.message, n3 = e3.reactionID, o3 = e3.nextSeq, i4 = e3.count, c3 = a3.ID, a3 = a3.conversationID, a3 = "convID:".concat(a3, " messageID:").concat(c3, " reactionID:").concat(n3, " nextSeq:").concat(o3, " count:").concat(i4), (s4 = new P2(l3)).setMessage(a3), M2.l("".concat(t3, " ").concat(a3)), r4 = { userList: [], nextSeq: 0, isCompleted: false }, c3 = this._createReactionUserListPack(e3), this.req(c3).then(function(e4) {
var e4 = e4.data, t4 = e4.userIDList, t4 = void 0 === t4 ? [] : t4, e4 = e4.nextSeq, e4 = void 0 === e4 ? 0 : e4;
return r4.nextSeq = e4, r4.isCompleted = 0 === e4, u3.get(4).getUserNickAndAvatar(t4);
}).then(function(e4) {
- return r4.userList = e4, a3.end(), M2.l("".concat(t3, " ok.")), T2(r4);
+ return r4.userList = e4, s4.end(), M2.l("".concat(t3, " ok.")), T2(r4);
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
})) : this.noUse(l3);
} }, { key: "_createReactionOperationPack", value: function(e3, t3, n3) {
- var o3, i4, s4 = void 0, t3 = { reactionID: t3, userIDList: [this.getMyUserID()] };
- return e3.conversationType === R2.CONV_C2C && (o3 = this.get(6), s4 = 1 === n3 ? G2.ADD_C2C_MSG_REACTION : G2.RM_C2C_MSG_REACTION, t3.from = e3.from, t3.to = e3.to, t3.messageKey = o3.getMessageKey(e3)), e3.conversationType === R2.CONV_GROUP && (o3 = void 0, i4 = e3.to, Nt2(e3.to) && (i4 = jt2(o3 = e3.to)), s4 = 1 === n3 ? G2.ADD_GRP_MSG_REACTION : G2.RM_GRP_MSG_REACTION, t3.groupID = i4, t3.topicID = o3, t3.messageSequence = e3.sequence), { P: s4, data: t3 };
+ var o3, i4, a3 = void 0, t3 = { reactionID: t3, userIDList: [this.getMyUserID()] };
+ return e3.conversationType === R2.CONV_C2C && (o3 = this.get(6), a3 = 1 === n3 ? G2.ADD_C2C_MSG_REACTION : G2.RM_C2C_MSG_REACTION, t3.from = e3.from, t3.to = e3.to, t3.messageKey = o3.getMessageKey(e3)), e3.conversationType === R2.CONV_GROUP && (o3 = void 0, i4 = e3.to, Ut2(e3.to) && (i4 = Xt2(o3 = e3.to)), a3 = 1 === n3 ? G2.ADD_GRP_MSG_REACTION : G2.RM_GRP_MSG_REACTION, t3.groupID = i4, t3.topicID = o3, t3.messageSequence = e3.sequence), { P: a3, data: t3 };
} }, { key: "_createReactionSummaryPack", value: function(e3) {
- var n3, t3, o3, i4 = e3.messageList, s4 = e3.maxUserCountPerReaction, s4 = void 0 === s4 ? 10 : s4, a3 = e3.messageIDMap, e3 = i4[0], r4 = void 0, c3 = void 0;
+ var n3, t3, o3, i4 = e3.messageList, a3 = e3.maxUserCountPerReaction, a3 = void 0 === a3 ? 10 : a3, s4 = e3.messageIDMap, e3 = i4[0], r4 = void 0, c3 = void 0;
return e3.conversationType === R2.CONV_C2C && (n3 = this.get(6), t3 = i4.map(function(e4) {
var t4 = n3.getMessageKey(e4);
- return a3.set(t4, e4.ID), t4;
- }), r4 = G2.GET_C2C_MSG_REACTIONS, c3 = { from: e3.from, to: e3.to, messageKeyList: t3, count: s4 }), e3.conversationType === R2.CONV_GROUP && (t3 = void 0, o3 = e3.to, Nt2(e3.to) && (o3 = jt2(t3 = e3.to)), e3 = i4.map(function(e4) {
- return a3.set(e4.sequence, e4.ID), e4.sequence;
- }), r4 = G2.GET_GRP_MSG_REACTIONS, c3 = { groupID: o3, topicID: t3, messageSequenceList: e3, count: s4 }), { P: r4, data: c3 };
+ return s4.set(t4, e4.ID), t4;
+ }), r4 = G2.GET_C2C_MSG_REACTIONS, c3 = { from: e3.from, to: e3.to, messageKeyList: t3, count: a3 }), e3.conversationType === R2.CONV_GROUP && (t3 = void 0, o3 = e3.to, Ut2(e3.to) && (o3 = Xt2(t3 = e3.to)), e3 = i4.map(function(e4) {
+ return s4.set(e4.sequence, e4.ID), e4.sequence;
+ }), r4 = G2.GET_GRP_MSG_REACTIONS, c3 = { groupID: o3, topicID: t3, messageSequenceList: e3, count: a3 }), { P: r4, data: c3 };
} }, { key: "_createReactionUserListPack", value: function(e3) {
var t3 = e3.message, n3 = e3.reactionID, o3 = e3.nextSeq, e3 = e3.count, e3 = void 0 === e3 ? 100 : e3, i4 = void 0, n3 = { reactionID: n3, nextSeq: void 0 === o3 ? 0 : o3, count: 100 < e3 ? 100 : e3 };
- return t3.conversationType === R2.CONV_C2C && (o3 = this.get(6), i4 = G2.GET_C2C_MSG_REACTION_USER_LIST, n3.from = t3.from, n3.to = t3.to, n3.messageKey = o3.getMessageKey(t3)), t3.conversationType === R2.CONV_GROUP && (e3 = void 0, o3 = t3.to, Nt2(t3.to) && (o3 = jt2(e3 = t3.to)), i4 = G2.GET_GRP_MSG_REACTION_USER_LIST, n3.groupID = o3, n3.topicID = e3, n3.messageSequence = t3.sequence), { P: i4, data: n3 };
+ return t3.conversationType === R2.CONV_C2C && (o3 = this.get(6), i4 = G2.GET_C2C_MSG_REACTION_USER_LIST, n3.from = t3.from, n3.to = t3.to, n3.messageKey = o3.getMessageKey(t3)), t3.conversationType === R2.CONV_GROUP && (e3 = void 0, o3 = t3.to, Ut2(t3.to) && (o3 = Xt2(e3 = t3.to)), i4 = G2.GET_GRP_MSG_REACTION_USER_LIST, n3.groupID = o3, n3.topicID = e3, n3.messageSequence = t3.sequence), { P: i4, data: n3 };
} }, { key: "_handleReactionSummary", value: function(t3, e3) {
var c3 = this;
return this.get(4).getUserNickAndAvatar(e3).then(function(r4) {
var e4 = [];
- return t3.forEach(function(s4) {
- var a3 = [];
- s4.reactionList.forEach(function(e5) {
+ return t3.forEach(function(a3) {
+ var s4 = [];
+ a3.reactionList.forEach(function(e5) {
var t4 = e5.reactionID, n3 = e5.count, o3 = e5.userIDList, e5 = e5.reactedByMyself, e5 = void 0 === e5 ? void 0 : e5, i4 = [], o3 = (o3.forEach(function(t5) {
r4.forEach(function(e6) {
t5 === e6.userID && i4.push(e6);
});
- }), { reactionID: t4, totalUserCount: n3, partialUserList: i4, reactedByMyself: c3._computeReactedByMyself({ reactedByMyself: e5, messageID: s4.messageID, reactionID: t4 }) });
- a3.push(o3), N3(e5) && !c3._reactedByMyselfMap.has(s4.messageID) && (n3 = "".concat(s4.messageID, "-").concat(t4), c3._reactionInfoMap.set(n3, o3));
- }), e4.push({ messageID: s4.messageID, reactionList: a3 });
+ }), { reactionID: t4, totalUserCount: n3, partialUserList: i4, reactedByMyself: c3._computeReactedByMyself({ reactedByMyself: e5, messageID: a3.messageID, reactionID: t4 }) });
+ s4.push(o3), N3(e5) && !c3._reactedByMyselfMap.has(a3.messageID) && (n3 = "".concat(a3.messageID, "-").concat(t4), c3._reactionInfoMap.set(n3, o3));
+ }), e4.push({ messageID: a3.messageID, reactionList: s4 });
}), e4;
});
} }, { key: "_addReactedByMyselfMap", value: function(e3, t3) {
@@ -15655,28 +15662,28 @@ var chat = { exports: {} };
return N3(t3) ? !!this._reactedByMyselfMap.has(n3) && this._reactedByMyselfMap.get(n3).includes(e3) : 1 === t3;
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._reactedByMyselfMap.clear(), this._reactionInfoMap.clear();
- } }])), Hi = (t2(zi, c2), e2(zi, [{ key: "sendMessage", value: function(e3) {
+ } }])), Xi = (t2(na, c2), e2(na, [{ key: "sendMessage", value: function(e3) {
var o3 = this, i4 = this._createMsg(e3);
if (null === i4)
return E2({ code: k2.MSG_SEND_FAIL });
this._addSendMessageTotalCount(i4);
- var s4 = Date.now();
+ var a3 = Date.now();
return this.get(11).setMessageRandom(i4), this._sendComboMessage(i4, e3).then(function(e4) {
- var e4 = e4.data, t3 = e4.time, n3 = e4.sequence, e4 = e4.readReceiptCode, e4 = (A2(e4) && 0 !== e4 && (new P2("sendMessageWithReceipt").setMessage("from:".concat(i4.from, " to:").concat(i4.to, " sequence:").concat(n3, " readReceiptCode:").concat(e4)).end(), M2.w("".concat(o3._n, ".sendMessage readReceiptCode:").concat(e4, " message:").concat(o3.getErrMsg(e4)))), o3._addSendMessageSuccessCount(i4, s4), o3.get(11)), t3 = (i4.status = On, i4.time = t3, i4.conversationType === R2.CONV_GROUP && (i4.sequence = n3), e4.appendToMessageList(i4), i4);
+ var e4 = e4.data, t3 = e4.time, n3 = e4.sequence, e4 = e4.readReceiptCode, e4 = (A2(e4) && 0 !== e4 && (new P2("sendMessageWithReceipt").setMessage("from:".concat(i4.from, " to:").concat(i4.to, " sequence:").concat(n3, " readReceiptCode:").concat(e4)).end(), M2.w("".concat(o3._n, ".sendMessage readReceiptCode:").concat(e4, " message:").concat(o3.getErrMsg(e4)))), o3._addSendMessageSuccessCount(i4, a3), o3.get(11)), t3 = (i4.status = Pn, i4.time = t3, i4.conversationType === R2.CONV_GROUP && (i4.sequence = n3), e4.appendToMessageList(i4), i4);
return true === i4._isExcludedFromLastMessage && (t3 = ""), e4.onMessageSent({ conversationOptionsList: [{ conversationID: i4.conversationID, unreadCount: 0, type: i4.conversationType, subType: i4.conversationSubType, lastMessage: t3 }] }), T2({ message: i4 });
}).catch(function(e4) {
return o3._onSendMessageFailed(i4, e4);
});
} }, { key: "_sendComboMessage", value: function(e3, t3) {
var n3 = this._m.get(20), o3 = "";
- return e3.conversationType === R2.CONV_C2C && (o3 = "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SEND_C2C_MSG)), e3.conversationType === R2.CONV_GROUP && (o3 = "".concat(s3.NAME.GRP, ".").concat(G2.SEND_GRP_MSG)), n3.sendComboMessage({ servcmd: o3, data: t3 });
+ return e3.conversationType === R2.CONV_C2C && (o3 = "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SEND_C2C_MSG)), e3.conversationType === R2.CONV_GROUP && (o3 = "".concat(a2.NAME.GRP, ".").concat(G2.SEND_GRP_MSG)), n3.sendComboMessage({ servcmd: o3, data: t3 });
} }, { key: "_createMsg", value: function(e3) {
var t3 = "".concat(this._n, "._createMsg"), n3 = null;
try {
- var o3, i4 = this.getMyUserID(), s4 = {};
- s4.senderTinyID = this.getMyTinyID(), s4.currentUser = i4, s4.from = e3.From_Account || i4, e3.GroupId ? (s4.conversationID = "".concat(R2.CONV_GROUP).concat(e3.GroupId), s4.conversationType = R2.CONV_GROUP, s4.to = e3.GroupId) : e3.To_Account && (s4.conversationID = "".concat(R2.CONV_C2C).concat(e3.To_Account), s4.conversationType = R2.CONV_C2C, s4.to = e3.To_Account), s4.time = e3.MsgTimeStamp || 0, s4.random = e3.Random || e3.MsgRandom || 0, s4.priority = e3.MsgPriority, C2(e3.CloudCustomData) && 0 < e3.CloudCustomData.length && (s4.cloudCustomData = e3.CloudCustomData), O2(e3.SendMsgControl) && (s4.messageControlInfo = {}, e3.SendMsgControl.includes("NoUnread") && (s4.messageControlInfo.excludedFromUnreadCount = 1), e3.SendMsgControl.includes("NoLastMsg")) && (s4.messageControlInfo.excludedFromLastMessage = 1), s4.conversationType === R2.CONV_GROUP && O2(e3.To_Account) && 0 < e3.To_Account.length && (o3 = e3.To_Account, 50 < e3.To_Account.length && (o3 = e3.To_Account.slice(0, 50), M2.w("".concat(t3, " To_Account must be less than or equal to 50."))), s4.receiverList = d2(o3), e3.To_Account = d2(o3)), 1 !== e3.IsNeedReadReceipt && 1 !== e3.NeedReadReceipt || (s4.needReadReceipt = true), 1 === e3.SupportMessageExtension && (s4.isSupportExtension = true), (n3 = new Do(s4)).status = An, e3.MsgClientTime = n3.clientTime, n3.conversationType === R2.CONV_C2C && (e3.MsgSeq = n3.sequence);
- for (var a3, r4 = e3.MsgBody.length, c3 = 0; c3 < r4; c3++)
- "TIMTextElem" === (a3 = e3.MsgBody[c3]).MsgType ? n3.setTextElement(a3.MsgContent.Text) : "TIMCustomElem" === a3.MsgType ? n3.setCustomElement({ data: a3.MsgContent.Data || "", description: a3.MsgContent.Desc || "", extension: a3.MsgContent.Ext || "" }) : "TIMFaceElem" === a3.MsgType && n3.setFaceElement({ index: a3.MsgContent.Index, data: a3.MsgContent.Data });
+ var o3, i4 = this.getMyUserID(), a3 = {};
+ a3.senderTinyID = this.getMyTinyID(), a3.currentUser = i4, a3.from = e3.From_Account || i4, e3.GroupId ? (a3.conversationID = "".concat(R2.CONV_GROUP).concat(e3.GroupId), a3.conversationType = R2.CONV_GROUP, a3.to = e3.GroupId) : e3.To_Account && (a3.conversationID = "".concat(R2.CONV_C2C).concat(e3.To_Account), a3.conversationType = R2.CONV_C2C, a3.to = e3.To_Account), a3.time = e3.MsgTimeStamp || 0, a3.random = e3.Random || e3.MsgRandom || 0, a3.priority = e3.MsgPriority, C2(e3.CloudCustomData) && 0 < e3.CloudCustomData.length && (a3.cloudCustomData = e3.CloudCustomData), O2(e3.SendMsgControl) && (a3.messageControlInfo = {}, e3.SendMsgControl.includes("NoUnread") && (a3.messageControlInfo.excludedFromUnreadCount = 1), e3.SendMsgControl.includes("NoLastMsg")) && (a3.messageControlInfo.excludedFromLastMessage = 1), a3.conversationType === R2.CONV_GROUP && O2(e3.To_Account) && 0 < e3.To_Account.length && (o3 = e3.To_Account, 50 < e3.To_Account.length && (o3 = e3.To_Account.slice(0, 50), M2.w("".concat(t3, " To_Account must be less than or equal to 50."))), a3.receiverList = d2(o3), e3.To_Account = d2(o3)), 1 !== e3.IsNeedReadReceipt && 1 !== e3.NeedReadReceipt || (a3.needReadReceipt = true), 1 === e3.SupportMessageExtension && (a3.isSupportExtension = true), (n3 = new So(a3)).status = Gn, e3.MsgClientTime = n3.clientTime, n3.conversationType === R2.CONV_C2C && (e3.MsgSeq = n3.sequence);
+ for (var s4, r4 = e3.MsgBody.length, c3 = 0; c3 < r4; c3++)
+ "TIMTextElem" === (s4 = e3.MsgBody[c3]).MsgType ? n3.setTextElement(s4.MsgContent.Text) : "TIMCustomElem" === s4.MsgType ? n3.setCustomElement({ data: s4.MsgContent.Data || "", description: s4.MsgContent.Desc || "", extension: s4.MsgContent.Ext || "" }) : "TIMFaceElem" === s4.MsgType && n3.setFaceElement({ index: s4.MsgContent.Index, data: s4.MsgContent.Data });
var u3 = n3.getElements();
n3.payload = u3[0].content, n3.type = u3[0].type;
} catch (e4) {
@@ -15684,27 +15691,27 @@ var chat = { exports: {} };
}
return n3;
} }, { key: "_onSendMessageFailed", value: function(e3, t3) {
- e3.status = Nn, this.get(11).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t3);
+ e3.status = Un, this.get(11).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t3);
var n3 = new P2("sendMessage"), o3 = "head.seq:".concat(t3.data.headSeq, " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to);
return n3.setMessage(o3).setError(t3).end(), M2.e("".concat(this._n, "._onSendMessageFailed ").concat(o3, " error:"), t3), E2(new L2({ code: t3 && t3.code ? t3.code : k2.MSG_SEND_FAIL, message: t3 && t3.message ? t3.message : void 0, data: { message: e3 } }));
} }, { key: "_getSendMessageSpecifiedKey", value: function(e3) {
if (e3.conversationType === R2.CONV_C2C)
- return Kn;
+ return jn;
if (e3.conversationType === R2.CONV_GROUP) {
var e3 = this.get(7).getLocalGroupProfile(e3.to);
if (e3)
- return e3 = e3.type, At2(e3) ? Yn : Wn;
+ return e3 = e3.type, Gt2(e3) ? zn : Jn;
}
} }, { key: "_addSendMessageTotalCount", value: function(e3) {
e3 = this._getSendMessageSpecifiedKey(e3);
e3 && this.get(26).addTotalCount(e3);
} }, { key: "_addSendMessageSuccessCount", value: function(e3, t3) {
var n3, e3 = this._getSendMessageSpecifiedKey(e3);
- e3 && ((n3 = this.get(26)).addSuccessCount(e3), n3.addCost(e3, tn(t3, false)));
+ e3 && ((n3 = this.get(26)).addSuccessCount(e3), n3.addCost(e3, an(t3, false)));
} }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t3) {
var t3 = t3.code, t3 = void 0 === t3 ? -1 : t3, n3 = this.get(26), e3 = this._getSendMessageSpecifiedKey(e3);
- qi(t3) && e3 && n3.addFailedCountOfUserSide(e3);
- } }])), Ki = (t2(Ji, c2), e2(Ji, [{ key: "registerPlugin", value: function(t3) {
+ Yi(t3) && e3 && n3.addFailedCountOfUserSide(e3);
+ } }])), Zi = (t2(ta, c2), e2(ta, [{ key: "registerPlugin", value: function(t3) {
var n3 = this, o3 = "0";
Object.keys(t3).forEach(function(e3) {
n3.plugins[e3] = t3[e3], "tim-upload-plugin" === e3 && "function" == typeof t3[e3].getVersion && (o3 = t3[e3].getVersion());
@@ -15712,15 +15719,15 @@ var chat = { exports: {} };
} }, { key: "getPlugin", value: function(e3) {
return this.plugins[e3];
} }, { key: "reset", value: function() {
- } }])), Wi = (t2(ji, c2), e2(ji, [{ key: "_init", value: function() {
+ } }])), Qi = (t2(ea, c2), e2(ea, [{ key: "_init", value: function() {
this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 });
} }, { key: "_startSync", value: function(e3) {
- var i4 = this, t3 = e3.cookie, n3 = e3.syncFlag, o3 = e3.isOnlineSync, s4 = "".concat(this._n, "._startSync"), a3 = (M2.l("".concat(s4, " options:"), e3), new P2("syncUnread"));
- a3.setMessage(JSON.stringify(e3)), this.req({ P: G2.SYNC_UNREAD_MSG, data: { cookie: t3, syncFlag: n3, isOnlineSync: o3 } }).then(function(e4) {
+ var i4 = this, t3 = e3.cookie, n3 = e3.syncFlag, o3 = e3.isOnlineSync, a3 = "".concat(this._n, "._startSync"), s4 = (M2.l("".concat(a3, " options:"), e3), new P2("syncUnread"));
+ s4.setMessage(JSON.stringify(e3)), this.req({ P: G2.SYNC_UNREAD_MSG, data: { cookie: t3, syncFlag: n3, isOnlineSync: o3 } }).then(function(e4) {
var t4 = e4.data, n4 = t4.cookie, t4 = t4.syncFlag, o4 = "$cookie:".concat(n4, " syncFlag:").concat(t4);
- M2.l("".concat(s4, " ok. ").concat(o4)), i4._cookie = n4, a3.setMoreMessage(o4).end(), S2(n4) || (0 === t4 || 1 === t4 ? (i4._dispatch(y2(y2({}, e4.data), {}, { isSyncingEnded: false })), i4._startSync({ cookie: n4, syncFlag: t4, isOnlineSync: 0 })) : 2 === t4 && i4._dispatch(y2(y2({}, e4.data), {}, { isSyncingEnded: true })));
+ M2.l("".concat(a3, " ok. ").concat(o4)), i4._cookie = n4, s4.setMoreMessage(o4).end(), S2(n4) || (0 === t4 || 1 === t4 ? (i4._dispatch(y2(y2({}, e4.data), {}, { isSyncingEnded: false })), i4._startSync({ cookie: n4, syncFlag: t4, isOnlineSync: 0 })) : 2 === t4 && i4._dispatch(y2(y2({}, e4.data), {}, { isSyncingEnded: true })));
}).catch(function(e4) {
- a3.setError(e4).end(), M2.e("".concat(s4, " failed. error:"), e4);
+ s4.setError(e4).end(), M2.e("".concat(a3, " failed. error:"), e4);
});
} }, { key: "_dispatch", value: function(e3) {
e3.eventArray && this.get(20).onMessage({ head: {}, body: { eventArray: e3.eventArray, isInstantMessage: this._onlineSyncFlag, isSyncingEnded: e3.isSyncingEnded } }), this.get(6).onNewMessage({ dataList: e3.messageList, isInstantMessage: !!e3.isSyncingEnded && this._onlineSyncFlag, C2CRemainingUnreadList: e3.C2CRemainingUnreadList, C2CPairUnreadList: e3.C2CPairUnreadList, isSyncingEnded: e3.isSyncingEnded });
@@ -15730,91 +15737,91 @@ var chat = { exports: {} };
M2.l("".concat(this._n, ".syncOnReconnected cookie:").concat(this._cookie)), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 });
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._onlineSyncFlag = false, this._cookie = "";
- } }])), Yi = { req: { toAccount: "To_Account", fromAccount: "From_Account", to: "To_Account", from: "From_Account", groupID: "GroupId", groupAtUserID: "GroupAt_Account", extension: "Ext", data: "Data", description: "Desc", elements: "MsgBody", sizeType: "Type", downloadFlag: "Download_Flag", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", videoUrl: "", imageUrl: "URL", fileUrl: "Url", uuid: "UUID", priority: "MsgPriority", receiverUserID: "To_Account", receiverGroupID: "GroupId", messageSender: "SenderId", messageReceiver: "ReceiverId", nick: "From_AccountNick", avatar: "From_AccountHeadurl", messageNumber: "MsgNum", pbDownloadKey: "PbMsgKey", downloadKey: "JsonMsgKey", applicationType: "PendencyType", userIDList: "To_Account", groupNameList: "GroupName", userID: "To_Account", groupAttributeList: "GroupAttr", mainSequence: "AttrMainSeq", avChatRoomKey: "BytesKey", attributeControl: "AttrControl", sequence: "seq", messageControlInfo: "SendMsgControl", updateSequence: "UpdateSeq", clientTime: "MsgClientTime", sequenceList: "MsgSeqList", topicID: "TopicId", customData: "CustomString", isSupportTopic: "SupportTopic", isWebUniapp: "is_web_uniapp", isSupportExtension: "SupportMessageExtension", messageSequence: "MsgSeq", messageKey: "MsgKey", startSequence: "startSeq", simplifiedMessage: "DownsizeFlag", isRelayMessage: "IsRelayMsg", reactionID: "Reaction", messageSequenceList: "MsgSeqList", messageKeyList: "MsgKeyList", cmConfigID: "CustomModerationConfigID" }, res: { MsgPriority: "priority", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", Download_Flag: "downloadFlag", GroupId: "groupID", Member_Account: "userID", MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", MsgSeq: "sequence", MsgRandom: "random", MsgTime: "time", MsgTimeStamp: "time", MsgContent: "content", MsgBody: "elements", From_AccountNick: "nick", From_AccountHeadurl: "avatar", GroupWithdrawInfoArray: "revokedInfos", GroupReadInfoArray: "groupMessageReadNotice", LastReadMsgSeq: "lastMessageSeq", WithdrawC2cMsgNotify: "c2cMessageRevokedNotify", C2cWithdrawInfoArray: "revokedInfos", C2cReadedReceipt: "c2cMessageReadReceipt", ReadC2cMsgNotify: "c2cMessageReadNotice", LastReadTime: "peerReadTime", MsgRand: "random", MsgType: "type", MsgShow: "messageShow", NextMsgSeq: "nextMessageSeq", FaceUrl: "avatar", ProfileDataMod: "profileModify", Profile_Account: "userID", ValueBytes: "value", ValueNum: "value", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgFrom_AccountExtraInfo: "messageFromAccountExtraInformation", Operator_Account: "operatorID", OpType: "operationType", ReportType: "operationType", UserId: "userID", User_Account: "userID", List_Account: "userIDList", MsgOperatorMemberExtraInfo: "operatorInfo", MsgMemberExtraInfo: "memberInfoList", ImageUrl: "avatar", NickName: "nick", MsgGroupNewInfo: "newGroupProfile", MsgAppDefinedData: "groupCustomField", Owner_Account: "ownerID", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupNotification: "notification", GroupApplyJoinOption: "joinOption", MsgKey: "messageKey", GroupInfo: "groupProfile", ShutupTime: "muteTime", Desc: "description", Ext: "extension", GroupAt_Account: "groupAtUserID", MsgNum: "messageNumber", PbMsgKey: "pbDownloadKey", JsonMsgKey: "downloadKey", MsgModifiedFlag: "isModified", PendencyItem: "applicationItem", PendencyType: "applicationType", AddTime: "time", AddSource: "source", AddWording: "wording", ProfileImImage: "avatar", PendencyAdd: "friendApplicationAdded", FrienPencydDel_Account: "friendApplicationDeletedUserIDList", Peer_Account: "userID", GroupAttr: "groupAttributeList", GroupAttrAry: "groupAttributeList", AttrMainSeq: "mainSequence", seq: "sequence", GroupAttrOption: "groupAttributeOption", BytesChangedKeys: "changedKeyList", GroupAttrInfo: "groupAttributeList", GroupAttrSeq: "mainSequence", PushChangedAttrValFlag: "isWithChangedAttributeInfo", SubKeySeq: "sequence", Val: "value", MsgGroupFromCardName: "senderNameCard", MsgGroupFromNickName: "senderNick", C2cNick: "peerNick", C2cImage: "peerAvatar", SendMsgControl: "messageControlInfo", NoLastMsg: "excludedFromLastMessage", NoUnread: "excludedFromUnreadCount", UpdateSeq: "updateSequence", MuteNotifications: "muteFlag", MsgClientTime: "clientTime", TinyId: "tinyID", GroupMsgReceiptList: "readReceiptList", ReadNum: "readCount", UnreadNum: "unreadCount", TopicId: "topicID", MillionGroupFlag: "communityType", SupportTopic: "isSupportTopic", MsgTopicNewInfo: "newTopicInfo", ShutupAll: "muteAllMembers", CustomString: "customData", TopicFaceUrl: "avatar", TopicIntroduction: "introduction", TopicNotification: "notification", TopicIdArray: "topicIDList", MsgVersion: "messageVersion", C2cMsgModNotifys: "c2cMessageModified", GroupMsgModNotifys: "groupMessageModified", ApplyJoinOption: "joinOption", MsgFlag: "messageRemindType", AtInfoList: "groupAtInfoList", AtFlagList: "groupAtType", AtMsgSeq: "sequence", BanDuration: "duration", BanDescription: "reason", NotVisible: "invisible", BytesTag: "tag", BytesValue: "value", RptBytesValue: "value", LatestSeq: "globalSequence", ClearSeq: "clearSequence", SupportMessageExtension: "isSupportExtension", ExtensionList: "extensions", GroupCounter: "counterList", Revoker_Account: "revoker", MsgExtensionNotify: "messageExtensionNotify", ExtensionC2cMsgInfo: "messageInfo", ExtensionGroupMsgInfo: "messageInfo", MsgOptType: "operateType", SetKVInfo: "operateResultList", DeleteKVInfo: "operateResultList", ClearKVInfo: "operateResultList", MsgKeyValue: "extensions", ClearMsgSeq: "clearSequence", MsgLastSeq: "globalSequence", InviteJoinOption: "inviteOption", MemberList_Account: "inviteeList", MsgMemberExtraInfoList: "inviteeInfoList", E: "event", GInf: "groupProfile", MCT: "clientTime", MR: "random", MP: "priority", MTS: "time", GId: "groupID", MS: "sequence", CCD: "cloudCustomData", F_Account: "from", F_Hd: "avatar", F_NN: "nick", GN: "groupName", GT: "groupType", IsSys: "isSystemMessage", OpInf: "operatorInfo", Img: "avatar", NN: "nick", OnlineInf: "onlineMemberInfo", ET: "expireTime", Num: "onlineMemberNum", Opt: "operationType", O_Account: "operatorID", RT: "operationType", UDF: "userDefinedField", L_Account: "userIDList", IsPlaceMsg: "isPlaceMessage", MsgCheckResult: "checkResult", Results: "resultList", Reaction: "reactionID", Reaction_Account: "userIDList", MsgReactionNotifyList: "messageReactionNotifyList", MsgReactionNotify: "messageReactionNotify", MsgReactionSummary: "reactionList", C2CMsgInfo: "C2CMessageInfo", GroupMsgInfo: "groupMessageInfo", int32_err_code: "errorCode", str_err_msg: "errorMsg", MsgDropReason: "messageDropReason", ReactedByMe: "reactedByMyself", Level: "messageRemindType", PeerReadTime: "timestamp", NoUnreadSeqList: "excludedUnreadSequenceList", NewMsg: "topicLatestMessage" }, ignoreKeyWord: ["C2C", "ID", "USP"] };
- function ji(e3) {
- return p3(this, ji), (e3 = i3(this, ji, [e3]))._n = "SyncUnreadMsgModule", e3._cookie = "", e3._onlineSyncFlag = false, e3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, e3._init, e3), e3;
+ } }])), $i = { req: { toAccount: "To_Account", fromAccount: "From_Account", to: "To_Account", from: "From_Account", groupID: "GroupId", groupAtUserID: "GroupAt_Account", extension: "Ext", data: "Data", description: "Desc", elements: "MsgBody", sizeType: "Type", downloadFlag: "Download_Flag", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", videoUrl: "", imageUrl: "URL", fileUrl: "Url", uuid: "UUID", priority: "MsgPriority", receiverUserID: "To_Account", receiverGroupID: "GroupId", messageSender: "SenderId", messageReceiver: "ReceiverId", nick: "From_AccountNick", avatar: "From_AccountHeadurl", messageNumber: "MsgNum", pbDownloadKey: "PbMsgKey", downloadKey: "JsonMsgKey", applicationType: "PendencyType", userIDList: "To_Account", groupNameList: "GroupName", userID: "To_Account", groupAttributeList: "GroupAttr", mainSequence: "AttrMainSeq", avChatRoomKey: "BytesKey", attributeControl: "AttrControl", sequence: "seq", messageControlInfo: "SendMsgControl", updateSequence: "UpdateSeq", clientTime: "MsgClientTime", sequenceList: "MsgSeqList", topicID: "TopicId", customData: "CustomString", isSupportTopic: "SupportTopic", isWebUniapp: "is_web_uniapp", isSupportExtension: "SupportMessageExtension", messageSequence: "MsgSeq", messageKey: "MsgKey", startSequence: "startSeq", simplifiedMessage: "DownsizeFlag", isRelayMessage: "IsRelayMsg", reactionID: "Reaction", messageSequenceList: "MsgSeqList", messageKeyList: "MsgKeyList", cmConfigID: "CustomModerationConfigID" }, res: { MsgPriority: "priority", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", Download_Flag: "downloadFlag", GroupId: "groupID", Member_Account: "userID", MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", MsgSeq: "sequence", MsgRandom: "random", MsgTime: "time", MsgTimeStamp: "time", MsgContent: "content", MsgBody: "elements", From_AccountNick: "nick", From_AccountHeadurl: "avatar", GroupWithdrawInfoArray: "revokedInfos", GroupReadInfoArray: "groupMessageReadNotice", LastReadMsgSeq: "lastMessageSeq", WithdrawC2cMsgNotify: "c2cMessageRevokedNotify", C2cWithdrawInfoArray: "revokedInfos", C2cReadedReceipt: "c2cMessageReadReceipt", ReadC2cMsgNotify: "c2cMessageReadNotice", LastReadTime: "peerReadTime", MsgRand: "random", MsgType: "type", MsgShow: "messageShow", NextMsgSeq: "nextMessageSeq", FaceUrl: "avatar", ProfileDataMod: "profileModify", Profile_Account: "userID", ValueBytes: "value", ValueNum: "value", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgFrom_AccountExtraInfo: "messageFromAccountExtraInformation", Operator_Account: "operatorID", OpType: "operationType", ReportType: "operationType", UserId: "userID", User_Account: "userID", List_Account: "userIDList", MsgOperatorMemberExtraInfo: "operatorInfo", MsgMemberExtraInfo: "memberInfoList", ImageUrl: "avatar", NickName: "nick", MsgGroupNewInfo: "newGroupProfile", MsgAppDefinedData: "groupCustomField", Owner_Account: "ownerID", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupNotification: "notification", GroupApplyJoinOption: "joinOption", MsgKey: "messageKey", GroupInfo: "groupProfile", ShutupTime: "muteTime", Desc: "description", Ext: "extension", GroupAt_Account: "groupAtUserID", MsgNum: "messageNumber", PbMsgKey: "pbDownloadKey", JsonMsgKey: "downloadKey", MsgModifiedFlag: "isModified", PendencyItem: "applicationItem", PendencyType: "applicationType", AddTime: "time", AddSource: "source", AddWording: "wording", ProfileImImage: "avatar", PendencyAdd: "friendApplicationAdded", FrienPencydDel_Account: "friendApplicationDeletedUserIDList", Peer_Account: "userID", GroupAttr: "groupAttributeList", GroupAttrAry: "groupAttributeList", AttrMainSeq: "mainSequence", seq: "sequence", GroupAttrOption: "groupAttributeOption", BytesChangedKeys: "changedKeyList", GroupAttrInfo: "groupAttributeList", GroupAttrSeq: "mainSequence", PushChangedAttrValFlag: "isWithChangedAttributeInfo", SubKeySeq: "sequence", Val: "value", MsgGroupFromCardName: "senderNameCard", MsgGroupFromNickName: "senderNick", C2cNick: "peerNick", C2cImage: "peerAvatar", SendMsgControl: "messageControlInfo", NoLastMsg: "excludedFromLastMessage", NoUnread: "excludedFromUnreadCount", UpdateSeq: "updateSequence", MuteNotifications: "muteFlag", MsgClientTime: "clientTime", TinyId: "tinyID", GroupMsgReceiptList: "readReceiptList", ReadNum: "readCount", UnreadNum: "unreadCount", TopicId: "topicID", MillionGroupFlag: "communityType", SupportTopic: "isSupportTopic", MsgTopicNewInfo: "newTopicInfo", ShutupAll: "muteAllMembers", CustomString: "customData", TopicFaceUrl: "avatar", TopicIntroduction: "introduction", TopicNotification: "notification", TopicIdArray: "topicIDList", MsgVersion: "messageVersion", C2cMsgModNotifys: "c2cMessageModified", GroupMsgModNotifys: "groupMessageModified", ApplyJoinOption: "joinOption", MsgFlag: "messageRemindType", AtInfoList: "groupAtInfoList", AtFlagList: "groupAtType", AtMsgSeq: "sequence", BanDuration: "duration", BanDescription: "reason", NotVisible: "invisible", BytesTag: "tag", BytesValue: "value", RptBytesValue: "value", LatestSeq: "globalSequence", ClearSeq: "clearSequence", SupportMessageExtension: "isSupportExtension", ExtensionList: "extensions", GroupCounter: "counterList", Revoker_Account: "revoker", MsgExtensionNotify: "messageExtensionNotify", ExtensionC2cMsgInfo: "messageInfo", ExtensionGroupMsgInfo: "messageInfo", MsgOptType: "operateType", SetKVInfo: "operateResultList", DeleteKVInfo: "operateResultList", ClearKVInfo: "operateResultList", MsgKeyValue: "extensions", ClearMsgSeq: "clearSequence", MsgLastSeq: "globalSequence", InviteJoinOption: "inviteOption", MemberList_Account: "inviteeList", MsgMemberExtraInfoList: "inviteeInfoList", E: "event", GInf: "groupProfile", MCT: "clientTime", MR: "random", MP: "priority", MTS: "time", GId: "groupID", MS: "sequence", CCD: "cloudCustomData", F_Account: "from", F_Hd: "avatar", F_NN: "nick", GN: "groupName", GT: "groupType", IsSys: "isSystemMessage", OpInf: "operatorInfo", Img: "avatar", NN: "nick", OnlineInf: "onlineMemberInfo", ET: "expireTime", Num: "onlineMemberNum", Opt: "operationType", O_Account: "operatorID", RT: "operationType", UDF: "userDefinedField", L_Account: "userIDList", IsPlaceMsg: "isPlaceMessage", MsgCheckResult: "checkResult", Results: "resultList", Reaction: "reactionID", Reaction_Account: "userIDList", MsgReactionNotifyList: "messageReactionNotifyList", MsgReactionNotify: "messageReactionNotify", MsgReactionSummary: "reactionList", C2CMsgInfo: "C2CMessageInfo", GroupMsgInfo: "groupMessageInfo", int32_err_code: "errorCode", str_err_msg: "errorMsg", MsgDropReason: "messageDropReason", ReactedByMe: "reactedByMyself", Level: "messageRemindType", PeerReadTime: "timestamp", NoUnreadSeqList: "excludedUnreadSequenceList", NewMsg: "topicLatestMessage" }, ignoreKeyWord: ["C2C", "ID", "USP"] };
+ function ea(e3) {
+ return p3(this, ea), (e3 = i3(this, ea, [e3]))._n = "SyncUnreadMsgModule", e3._cookie = "", e3._onlineSyncFlag = false, e3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, e3._init, e3), e3;
}
- function Ji(e3) {
- return p3(this, Ji), (e3 = i3(this, Ji, [e3]))._n = "PluginModule", e3.plugins = {}, e3;
+ function ta(e3) {
+ return p3(this, ta), (e3 = i3(this, ta, [e3]))._n = "PluginModule", e3.plugins = {}, e3;
}
- function zi(e3) {
- return p3(this, zi), (e3 = i3(this, zi, [e3]))._n = "ComboMsgModule", e3;
+ function na(e3) {
+ return p3(this, na), (e3 = i3(this, na, [e3]))._n = "ComboMsgModule", e3;
}
- function Xi(e3) {
- return p3(this, Xi), (e3 = i3(this, Xi, [e3]))._n = "MsgReactionModule", e3._reactedByMyselfMap = /* @__PURE__ */ new Map(), e3._reactionInfoMap = /* @__PURE__ */ new Map(), e3;
+ function oa(e3) {
+ return p3(this, oa), (e3 = i3(this, oa, [e3]))._n = "MsgReactionModule", e3._reactedByMyselfMap = /* @__PURE__ */ new Map(), e3._reactionInfoMap = /* @__PURE__ */ new Map(), e3;
}
- function Zi(e3) {
- return p3(this, Zi), (e3 = i3(this, Zi, [e3]))._n = "MsgExtModule", e3.msgExtMap = /* @__PURE__ */ new Map(), e3.globalSeqMap = /* @__PURE__ */ new Map(), e3.getMsgExtsMap = /* @__PURE__ */ new Map(), e3;
+ function ia(e3) {
+ return p3(this, ia), (e3 = i3(this, ia, [e3]))._n = "MsgExtModule", e3.msgExtMap = /* @__PURE__ */ new Map(), e3.globalSeqMap = /* @__PURE__ */ new Map(), e3.getMsgExtsMap = /* @__PURE__ */ new Map(), e3;
}
- function Qi(e3) {
- return p3(this, Qi), (e3 = i3(this, Qi, [e3]))._n = "MessageModule", e3._messageOptionsMap = /* @__PURE__ */ new Map(), e3._mergerMessageHandler = new Ui(e3), e3;
+ function aa(e3) {
+ return p3(this, aa), (e3 = i3(this, aa, [e3]))._n = "MessageModule", e3._messageOptionsMap = /* @__PURE__ */ new Map(), e3._mergerMessageHandler = new Bi(e3), e3;
}
- function $i(e3, t3) {
+ function sa(e3, t3) {
if ("string" == typeof e3 || Array.isArray(e3))
return t3 = Object.assign({ pascalCase: false }, t3), 0 === (e3 = Array.isArray(e3) ? e3.map(function(e4) {
return e4.trim();
}).filter(function(e4) {
return e4.length;
- }).join("-") : e3.trim()).length ? "" : 1 === e3.length ? t3.pascalCase ? e3.toUpperCase() : e3.toLowerCase() : (e3 = e3 = (e3 = e3 !== e3.toLowerCase() ? es2(e3) : e3).replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, function(e4, t4) {
+ }).join("-") : e3.trim()).length ? "" : 1 === e3.length ? t3.pascalCase ? e3.toUpperCase() : e3.toLowerCase() : (e3 = e3 = (e3 = e3 !== e3.toLowerCase() ? ra(e3) : e3).replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, function(e4, t4) {
return t4.toUpperCase();
}).replace(/\d+(\w|$)/g, function(e4) {
return e4.toUpperCase();
}), t3.pascalCase ? e3.charAt(0).toUpperCase() + e3.slice(1) : e3);
throw new TypeError("Expected the input to be `string | string[]`");
}
- var es2 = function(e3) {
+ var ra = function(e3) {
for (var t3 = false, n3 = false, o3 = false, i4 = 0; i4 < e3.length; i4++) {
- var s4 = e3[i4];
- t3 && /[a-zA-Z]/.test(s4) && s4.toUpperCase() === s4 ? (e3 = e3.slice(0, i4) + "-" + e3.slice(i4), o3 = n3, n3 = !(t3 = false), i4++) : n3 && o3 && /[a-zA-Z]/.test(s4) && s4.toLowerCase() === s4 ? (e3 = e3.slice(0, i4 - 1) + "-" + e3.slice(i4 - 1), o3 = n3, t3 = !(n3 = false)) : (t3 = s4.toLowerCase() === s4 && s4.toUpperCase() !== s4, o3 = n3, n3 = s4.toUpperCase() === s4 && s4.toLowerCase() !== s4);
+ var a3 = e3[i4];
+ t3 && /[a-zA-Z]/.test(a3) && a3.toUpperCase() === a3 ? (e3 = e3.slice(0, i4) + "-" + e3.slice(i4), o3 = n3, n3 = !(t3 = false), i4++) : n3 && o3 && /[a-zA-Z]/.test(a3) && a3.toLowerCase() === a3 ? (e3 = e3.slice(0, i4 - 1) + "-" + e3.slice(i4 - 1), o3 = n3, t3 = !(n3 = false)) : (t3 = a3.toLowerCase() === a3 && a3.toUpperCase() !== a3, o3 = n3, n3 = a3.toUpperCase() === a3 && a3.toLowerCase() !== a3);
}
return e3;
};
- function ts2(e3, t3) {
+ function ca(e3, t3) {
var r4 = 0;
return function n3(e4, i4) {
- var t4, o3, s4, a3;
+ var t4, o3, a3, s4;
return 100 < ++r4 ? (r4--, e4) : O2(e4) ? (t4 = e4.map(function(e5) {
- return at2(e5) ? n3(e5, i4) : e5;
- }), r4--, t4) : at2(e4) ? (o3 = e4, s4 = function(e5, t5) {
- if (!lt2(t5))
+ return ut2(e5) ? n3(e5, i4) : e5;
+ }), r4--, t4) : ut2(e4) ? (o3 = e4, a3 = function(e5, t5) {
+ if (!_t2(t5))
return false;
- if (t5 !== $i(t5))
- for (var n4 = 0; n4 < Yi.ignoreKeyWord.length && !t5.includes(Yi.ignoreKeyWord[n4]); n4++)
+ if (t5 !== sa(t5))
+ for (var n4 = 0; n4 < $i.ignoreKeyWord.length && !t5.includes($i.ignoreKeyWord[n4]); n4++)
;
var o4;
- return N3(i4[t5]) ? (o4 = t5)[0].toUpperCase() + $i(o4).slice(1) : i4[t5];
- }, a3 = /* @__PURE__ */ Object.create(null), Object.keys(o3).forEach(function(e5) {
- var t5 = s4(o3[e5], e5);
- t5 && (a3[t5] = o3[e5]);
- }), t4 = bt2(t4 = a3, function(e5, t5) {
- return O2(e5) || at2(e5) ? n3(e5, i4) : e5;
+ return N3(i4[t5]) ? (o4 = t5)[0].toUpperCase() + sa(o4).slice(1) : i4[t5];
+ }, s4 = /* @__PURE__ */ Object.create(null), Object.keys(o3).forEach(function(e5) {
+ var t5 = a3(o3[e5], e5);
+ t5 && (s4[t5] = o3[e5]);
+ }), t4 = qt2(t4 = s4, function(e5, t5) {
+ return O2(e5) || ut2(e5) ? n3(e5, i4) : e5;
}), r4--, t4) : void 0;
}(e3, t3);
}
- for (var ns = String.fromCharCode, os = function(e3) {
+ for (var ua = String.fromCharCode, la = function(e3) {
var t3 = 0 | e3.charCodeAt(0);
if (55296 <= t3)
if (t3 < 56320) {
e3 = 0 | e3.charCodeAt(1);
if (56320 <= e3 && e3 <= 57343) {
if (65535 < (t3 = (t3 << 10) + e3 - 56613888 | 0))
- return ns(240 | t3 >>> 18, 128 | t3 >>> 12 & 63, 128 | t3 >>> 6 & 63, 128 | 63 & t3);
+ return ua(240 | t3 >>> 18, 128 | t3 >>> 12 & 63, 128 | t3 >>> 6 & 63, 128 | 63 & t3);
} else
t3 = 65533;
} else
t3 <= 57343 && (t3 = 65533);
- return t3 <= 2047 ? ns(192 | t3 >>> 6, 128 | 63 & t3) : ns(224 | t3 >>> 12, 128 | t3 >>> 6 & 63, 128 | 63 & t3);
- }, is = function(e3) {
- for (var t3 = void 0 === e3 ? "" : ("" + e3).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, os), n3 = 0 | t3.length, o3 = new Uint8Array(n3), i4 = 0; i4 < n3; i4 = i4 + 1 | 0)
+ return t3 <= 2047 ? ua(192 | t3 >>> 6, 128 | 63 & t3) : ua(224 | t3 >>> 12, 128 | t3 >>> 6 & 63, 128 | 63 & t3);
+ }, da = function(e3) {
+ for (var t3 = void 0 === e3 ? "" : ("" + e3).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, la), n3 = 0 | t3.length, o3 = new Uint8Array(n3), i4 = 0; i4 < n3; i4 = i4 + 1 | 0)
o3[i4] = 0 | t3.charCodeAt(i4);
return o3;
- }, ss2 = e2(function e3(t3) {
+ }, pa = e2(function e3(t3) {
p3(this, e3);
var n3, i4, o3 = (this._handler = t3).getURL();
- this._socket = null, this._workerSocket = null, this._id = ht2(), this._handler.getIsWorkerEnabled() ? (n3 = URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'], { type: "application/javascript; charset=utf-8" })), this._workerSocket = new Worker(n3), (i4 = this)._workerSocket.onmessage = function(e4) {
+ this._socket = null, this._workerSocket = null, this._id = mt2(), this._handler.getIsWorkerEnabled() ? (n3 = URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'], { type: "application/javascript; charset=utf-8" })), this._workerSocket = new Worker(n3), (i4 = this)._workerSocket.onmessage = function(e4) {
var t4 = e4.data, n4 = t4.callback, o4 = t4.e, t4 = t4.extensions;
"onOpen" === n4 ? i4._onOpen(t4) : "onClose" === n4 ? i4._onClose(o4) : "onError" === n4 ? i4._onError(o4) : "onMessage" === n4 && i4._onMessage(e4.data);
- }, this._workerSocket.postMessage({ cmd: "start", id: this._id, url: o3 })) : v3 ? ge2 ? (I2.connectSocket({ url: o3, header: { "content-type": "application/json" } }), I2.onSocketClose(this._onClose.bind(this)), I2.onSocketOpen(this._onOpen.bind(this)), I2.onSocketMessage(this._onMessage.bind(this)), I2.onSocketError(this._onError.bind(this))) : (this._socket = I2.connectSocket({ url: o3, header: { "content-type": "application/json" }, complete: function() {
+ }, this._workerSocket.postMessage({ cmd: "start", id: this._id, url: o3 })) : v3 ? ve2 ? (I2.connectSocket({ url: o3, header: { "content-type": "application/json" } }), I2.onSocketClose(this._onClose.bind(this)), I2.onSocketOpen(this._onOpen.bind(this)), I2.onSocketMessage(this._onMessage.bind(this)), I2.onSocketError(this._onError.bind(this))) : (this._socket = I2.connectSocket({ url: o3, header: { "content-type": "application/json" }, complete: function() {
} }), this._socket.onClose(this._onClose.bind(this)), this._socket.onOpen(this._onOpen.bind(this)), this._socket.onMessage(this._onMessage.bind(this)), this._socket.onError(this._onError.bind(this))) : (this._socket = new WebSocket(o3), this._socket.binaryType = "arraybuffer", this._socket.onopen = this._onOpen.bind(this, this._socket.extensions), this._socket.onmessage = this._onMessage.bind(this), this._socket.onclose = this._onClose.bind(this), this._socket.onerror = this._onError.bind(this)), this._canIUseBinaryFrame = t3.canIUseBinaryFrame();
}, [{ key: "getID", value: function() {
return this._id;
@@ -15825,13 +15832,13 @@ var chat = { exports: {} };
} }, { key: "_onMessage", value: function(e3) {
e3 = this._canIUseBinaryFrame ? this._isAppCompressedData(e3.data) ? this._handler.inflate(e3.data) : function(e4) {
for (var t3 = new Uint8Array(e4), n3 = "", o3 = 0, i4 = t3.length; o3 < i4; ) {
- var s4 = t3[o3], a3 = 0, r4 = 0;
- if (s4 <= 127 ? (a3 = 0, r4 = 255 & s4) : s4 <= 223 ? (a3 = 1, r4 = 31 & s4) : s4 <= 239 ? (a3 = 2, r4 = 15 & s4) : s4 <= 244 && (a3 = 3, r4 = 7 & s4), 0 < i4 - o3 - a3)
- for (var c3 = 0; c3 < a3; )
- r4 = r4 << 6 | 63 & (s4 = t3[o3 + c3 + 1]), c3 += 1;
+ var a3 = t3[o3], s4 = 0, r4 = 0;
+ if (a3 <= 127 ? (s4 = 0, r4 = 255 & a3) : a3 <= 223 ? (s4 = 1, r4 = 31 & a3) : a3 <= 239 ? (s4 = 2, r4 = 15 & a3) : a3 <= 244 && (s4 = 3, r4 = 7 & a3), 0 < i4 - o3 - s4)
+ for (var c3 = 0; c3 < s4; )
+ r4 = r4 << 6 | 63 & (a3 = t3[o3 + c3 + 1]), c3 += 1;
else
- r4 = 65533, a3 = i4 - o3;
- n3 += String.fromCodePoint(r4), o3 += a3 + 1;
+ r4 = 65533, s4 = i4 - o3;
+ n3 += String.fromCodePoint(r4), o3 += s4 + 1;
}
return n3;
}(e3.data) : e3.data;
@@ -15844,81 +15851,81 @@ var chat = { exports: {} };
} }, { key: "setIsWorkerEnabled", value: function(e3) {
this._isWorkerEnabled = true;
} }, { key: "close", value: function(e3) {
- this._workerSocket && (this._workerSocket.postMessage({ cmd: "stop", code: e3 }), this._workerSocket.terminate(), this._workerSocket = null), ge2 ? (I2.offSocketClose(), I2.offSocketMessage(), I2.offSocketOpen(), I2.offSocketError(), I2.closeSocket()) : this._socket && (v3 ? (this._socket.onClose(function() {
+ this._workerSocket && (this._workerSocket.postMessage({ cmd: "stop", code: e3 }), this._workerSocket.terminate(), this._workerSocket = null), ve2 ? (I2.offSocketClose(), I2.offSocketMessage(), I2.offSocketOpen(), I2.offSocketError(), I2.closeSocket()) : this._socket && (v3 ? (this._socket.onClose(function() {
}), this._socket.onOpen(function() {
}), this._socket.onMessage(function() {
}), this._socket.onError(function() {
- })) : (this._socket.onopen = null, this._socket.onmessage = null, this._socket.onclose = null, this._socket.onerror = null), he2 ? this._socket.close({ code: e3 }) : this._socket.close(e3), this._socket = null);
+ })) : (this._socket.onopen = null, this._socket.onmessage = null, this._socket.onclose = null, this._socket.onerror = null), me2 ? this._socket.close({ code: e3 }) : this._socket.close(e3), this._socket = null);
} }, { key: "send", value: function(e3) {
- this._workerSocket ? this._workerSocket.postMessage({ cmd: "sendMessage", data: this._canIUseBinaryFrame ? is(e3.data).buffer : e3.data }) : ge2 ? I2.sendSocketMessage({ data: e3.data, fail: function() {
+ this._workerSocket ? this._workerSocket.postMessage({ cmd: "sendMessage", data: this._canIUseBinaryFrame ? da(e3.data).buffer : e3.data }) : ve2 ? I2.sendSocketMessage({ data: e3.data, fail: function() {
e3.fail && e3.requestID && e3.fail(e3.requestID);
- } }) : this._socket && (v3 ? this._socket.send({ data: this._canIUseBinaryFrame ? is(e3.data).buffer : e3.data, fail: function() {
+ } }) : this._socket && (v3 ? this._socket.send({ data: this._canIUseBinaryFrame ? da(e3.data).buffer : e3.data, fail: function() {
e3.fail && e3.requestID && e3.fail(e3.requestID);
- } }) : this._socket.send(this._canIUseBinaryFrame ? is(e3.data) : e3.data));
- } }]), as = ["keyMap"], rs = ["keyMap"], cs = "connected", us = "connecting", ls = "disconnected", ds = e2(function e3(t3) {
- p3(this, e3), this._chM = t3, this._n = "SocketHandler", this._promiseMap = /* @__PURE__ */ new Map(), this._readyState = ls, this._simpleRequestMap = /* @__PURE__ */ new Map(), this.MAX_SIZE = 100, this._startSequence = ht2(), this._startTs = 0, this._reConnectFlag = false, this._nextPingTs = 0, this._reConnectCount = 0, this.MAX_RECONNECT_COUNT = 3, this._socketID = -1, this._random = 0, this._socket = null, this._url = "", this._onOpenTs = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true, this._currentSite = se2, this._setWebsocketHost(), this._initConnection();
+ } }) : this._socket.send(this._canIUseBinaryFrame ? da(e3.data) : e3.data));
+ } }]), _a = ["keyMap"], ha = ["keyMap"], ga = "connected", fa = "connecting", ma = "disconnected", va = e2(function e3(t3) {
+ p3(this, e3), this._chM = t3, this._n = "SocketHandler", this._promiseMap = /* @__PURE__ */ new Map(), this._readyState = ma, this._simpleRequestMap = /* @__PURE__ */ new Map(), this.MAX_SIZE = 100, this._startSequence = mt2(), this._startTs = 0, this._reConnectFlag = false, this._nextPingTs = 0, this._reConnectCount = 0, this.MAX_RECONNECT_COUNT = 3, this._socketID = -1, this._random = 0, this._socket = null, this._url = "", this._onOpenTs = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true, this._currentSite = ae2, this._setWebsocketHost(), this._initConnection();
}, [{ key: "_setWebsocketHost", value: function() {
var e3 = this._chM.get(12);
- this._currentSite = se2, this._chM.isOversea() && (this._currentSite = "OVERSEA"), e3.isSingaporeSite() ? this._currentSite = "SINGAPORE" : e3.isKoreaSite() ? this._currentSite = "KOREA" : e3.isGermanySite() ? this._currentSite = "GERMANY" : e3.isIndiaSite() ? this._currentSite = "IND" : e3.isJapanSite() ? this._currentSite = "JPN" : e3.isUSASite() ? this._currentSite = "USA" : e3.isIndonesiaSite() && (this._currentSite = "INDONESIA"), s3.HOST.setCurrent(this._currentSite);
+ this._currentSite = ae2, this._chM.isOversea() && (this._currentSite = "OVERSEA"), e3.isSingaporeSite() ? this._currentSite = "SINGAPORE" : e3.isKoreaSite() ? this._currentSite = "KOREA" : e3.isGermanySite() ? this._currentSite = "GERMANY" : e3.isIndiaSite() ? this._currentSite = "IND" : e3.isJapanSite() ? this._currentSite = "JPN" : e3.isUSASite() ? this._currentSite = "USA" : e3.isIndonesiaSite() && (this._currentSite = "INDONESIA"), a2.HOST.setCurrent(this._currentSite);
} }, { key: "_initConnection", value: function() {
- var e3 = this._chM.get(12).getSDKAppID() + "", t3 = this._chM.get(12).isIndependentDomainDisabled(), t3 = (N3(s3.HOST.CURRENT.BACKUP) ? this._url = s3.HOST.CURRENT.DEFAULT : "" === this._url ? this._url = t3 ? s3.HOST.CURRENT.DEFAULT : s3.HOST.CURRENT.DEFAULT0.replace("*", e3) : -1 < this._url.indexOf(e3) ? this._url = s3.HOST.CURRENT.DEFAULT : this._url === s3.HOST.CURRENT.DEFAULT ? this._url = s3.HOST.CURRENT.IPV6 : this._url === s3.HOST.CURRENT.IPV6 ? this._url = Ie2 ? this._genRandomDomain() : s3.HOST.CURRENT.BACKUP : this._isWebBackupUrl(this._url) || this._url === s3.HOST.CURRENT.BACKUP ? this._url = this._canIUseAnyCast() ? s3.HOST.CURRENT.ANYCAST : s3.HOST.CURRENT.DEFAULT : this._url === s3.HOST.CURRENT.ANYCAST && (s3.HOST.CURRENT.ANYCAST = "", this._url = s3.HOST.CURRENT.DEFAULT), this._chM.get(12)), e3 = t3.getProxyServer();
+ var e3 = this._chM.get(12).getSDKAppID() + "", t3 = this._chM.get(12).isIndependentDomainDisabled(), t3 = (N3(a2.HOST.CURRENT.BACKUP) ? this._url = a2.HOST.CURRENT.DEFAULT : "" === this._url ? this._url = t3 ? a2.HOST.CURRENT.DEFAULT : a2.HOST.CURRENT.DEFAULT0.replace("*", e3) : -1 < this._url.indexOf(e3) ? this._url = a2.HOST.CURRENT.DEFAULT : this._url === a2.HOST.CURRENT.DEFAULT ? this._url = a2.HOST.CURRENT.IPV6 : this._url === a2.HOST.CURRENT.IPV6 ? this._url = Ce2 ? this._genRandomDomain() : a2.HOST.CURRENT.BACKUP : this._isWebBackupUrl(this._url) || this._url === a2.HOST.CURRENT.BACKUP ? this._url = this._canIUseAnyCast() ? a2.HOST.CURRENT.ANYCAST : a2.HOST.CURRENT.DEFAULT : this._url === a2.HOST.CURRENT.ANYCAST && (a2.HOST.CURRENT.ANYCAST = "", this._url = a2.HOST.CURRENT.DEFAULT), this._chM.get(12)), e3 = t3.getProxyServer();
S2(e3) || (this._url = e3), t3.isTestEnv() && (this._url = ee2.TEST[this._currentSite].DEFAULT), this._connect(), this._nextPingTs = 0;
} }, { key: "_genRandomDomain", value: function() {
var e3 = Math.floor(10001 * Math.random()) + 1e4;
- return s3.HOST.CURRENT.BACKUP_WEB.replace("*", e3);
+ return a2.HOST.CURRENT.BACKUP_WEB.replace("*", e3);
} }, { key: "_isWebBackupUrl", value: function(e3) {
return e3.includes("my-cpaas.com");
} }, { key: "_canIUseAnyCast", value: function() {
- return Ie2 && s3.HOST.CURRENT.ANYCAST;
+ return Ce2 && a2.HOST.CURRENT.ANYCAST;
} }, { key: "onCheckTimer", value: function(e3) {
e3 % 1 == 0 && (this._checkPromiseMap(), this._checkNativeAppWS());
} }, { key: "_checkPromiseMap", value: function() {
- var s4 = this;
+ var a3 = this;
0 !== this._promiseMap.size && this._promiseMap.forEach(function(e3, t3) {
var n3 = e3.reject, o3 = e3.timestamp, e3 = e3.headSeq, i4 = 15e3;
- -1 !== t3.indexOf(G2.LOGIN) ? i4 = 9e4 : -1 !== t3.indexOf(G2.PING) && (i4 = 3e3), Date.now() - o3 >= i4 && (M2.l("".concat(s4._n, "._checkPromiseMap request timeout, delete requestID:").concat(t3)), s4._promiseMap.delete(t3), n3(new L2({ code: k2.NETWORK_TIMEOUT, data: { headSeq: e3 } })), s4._chM.onRequestTimeout());
+ -1 !== t3.indexOf(G2.LOGIN) ? i4 = 9e4 : -1 !== t3.indexOf(G2.PING) && (i4 = 3e3), Date.now() - o3 >= i4 && (M2.l("".concat(a3._n, "._checkPromiseMap request timeout, delete requestID:").concat(t3)), a3._promiseMap.delete(t3), n3(new L2({ code: k2.NETWORK_TIMEOUT, data: { headSeq: e3 } })), a3._chM.onRequestTimeout());
});
} }, { key: "_checkNativeAppWS", value: function() {
- fe2 && !this.isConnected() && this._reConnect();
+ Ie2 && !this.isConnected() && this._reConnect();
} }, { key: "onOpen", value: function(e3) {
var t3, n3;
- this._readyState !== ls && (this._onOpenTs = Date.now(), n3 = e3.id, e3 = e3.res, this._socketID = n3, t3 = tn(this._startTs, false), n3 = "socketID:".concat(n3, " res:").concat(e3), M2.l("".concat(this._n, "._onOpen cost:").concat(t3, " ms. ").concat(n3)), new P2("wsOnOpen").setMessage(t3).setCostTime(t3).setMoreMessage(n3).end(), this._readyState = cs, this._reConnectCount = 0, this._resend(), true === this._reConnectFlag && (this._chM.onReconnected(), this._reConnectFlag = false), this._chM.onOpen());
+ this._readyState !== ma && (this._onOpenTs = Date.now(), n3 = e3.id, e3 = e3.res, this._socketID = n3, t3 = an(this._startTs, false), n3 = "socketID:".concat(n3, " res:").concat(e3), M2.l("".concat(this._n, "._onOpen cost:").concat(t3, " ms. ").concat(n3)), new P2("wsOnOpen").setMessage(t3).setCostTime(t3).setMoreMessage(n3).end(), this._readyState = ga, this._reConnectCount = 0, this._resend(), true === this._reConnectFlag && (this._chM.onReconnected(), this._reConnectFlag = false), this._chM.onOpen());
} }, { key: "onClose", value: function(e3) {
var t3 = new P2("wsOnClose"), n3 = e3.id, e3 = e3.e, o3 = "sourceSocketID:".concat(n3, " currentSocketID:").concat(this._socketID, " code:").concat(e3.code, " reason:").concat(e3.reason), i4 = 0;
- 0 !== this._onOpenTs && (i4 = Date.now() - this._onOpenTs), t3.setMessage(i4).setCostTime(i4).setMoreMessage(o3).setCode(e3.code).end(true), M2.l("".concat(this._n, "._onClose ").concat(o3, " onlineTime:").concat(i4)), n3 === this._socketID && (this._readyState = ls, i4 < 1e3 ? this._chM.onReconnectFailed() : this._chM.onClose());
+ 0 !== this._onOpenTs && (i4 = Date.now() - this._onOpenTs), t3.setMessage(i4).setCostTime(i4).setMoreMessage(o3).setCode(e3.code).end(true), M2.l("".concat(this._n, "._onClose ").concat(o3, " onlineTime:").concat(i4)), n3 === this._socketID && (this._readyState = ma, i4 < 1e3 ? this._chM.onReconnectFailed() : this._chM.onClose());
} }, { key: "onError", value: function(e3) {
var t3 = e3.id, e3 = e3.e, n3 = "sourceSocketID:".concat(t3, " currentSocketID:").concat(this._socketID);
- new P2("wsOnError").setMessage(e3.errMsg || JSON.stringify(e3, ["message", "code"])).setMoreMessage(n3).setLevel("error").end(true), M2.w("".concat(this._n, "._onError"), e3, n3), t3 === this._socketID && (this._readyState = ls, this._chM.onError());
+ new P2("wsOnError").setMessage(e3.errMsg || JSON.stringify(e3, ["message", "code"])).setMoreMessage(n3).setLevel("error").end(true), M2.w("".concat(this._n, "._onError"), e3, n3), t3 === this._socketID && (this._readyState = ma, this._chM.onError());
} }, { key: "onMessage", value: function(t3) {
- var e3, n3, o3, i4, s4, a3;
+ var e3, n3, o3, i4, a3, s4;
try {
e3 = JSON.parse(t3.data);
} catch (e4) {
new P2("jsonParseError").setMessage(t3.data).end();
}
- e3 && e3.head && (t3 = this._getRequestIDFromHead(e3.head), n3 = e3.body, this._chM.get(30).isTRTCCommand(t3) || (a3 = Ht2(e3.head), n3 = function t4(e4, n4) {
- var o4, i5, s5;
+ e3 && e3.head && (t3 = this._getRequestIDFromHead(e3.head), n3 = e3.body, this._chM.get(30).isTRTCCommand(t3) || (s4 = Yt2(e3.head), n3 = function t4(e4, n4) {
+ var o4, i5, a4;
return O2(e4) ? e4.map(function(e5) {
- return at2(e5) ? t4(e5, n4) : e5;
- }) : at2(e4) ? (o4 = e4, i5 = function(e5, t5) {
- return N3(n4[t5]) ? $i(t5) : n4[t5];
- }, s5 = {}, Object.keys(o4).forEach(function(e5) {
- s5[i5(o4[e5], e5)] = o4[e5];
- }), bt2(s5, function(e5) {
- return O2(e5) || at2(e5) ? t4(e5, n4) : e5;
+ return ut2(e5) ? t4(e5, n4) : e5;
+ }) : ut2(e4) ? (o4 = e4, i5 = function(e5, t5) {
+ return N3(n4[t5]) ? sa(t5) : n4[t5];
+ }, a4 = {}, Object.keys(o4).forEach(function(e5) {
+ a4[i5(o4[e5], e5)] = o4[e5];
+ }), qt2(a4, function(e5) {
+ return O2(e5) || ut2(e5) ? t4(e5, n4) : e5;
})) : void 0;
- }(e3.body, this._getResKeyMap(a3))), M2.d("".concat(this._n, ".onMessage ret:").concat(JSON.stringify(n3), " requestID:").concat(t3, " has:").concat(this._promiseMap.has(t3))), this._setNextPingTs(), this._promiseMap.has(t3) ? (o3 = (a3 = this._promiseMap.get(t3)).resolve, i4 = a3.reject, s4 = a3.timestamp, a3 = a3.headSeq, this._promiseMap.delete(t3), this._calcRTT(s4), n3.errorCode && 0 !== n3.errorCode ? (this._chM.onErrorCodeNotZero(n3), i4(new L2({ code: n3.errorCode, message: n3.errorInfo || "", data: t3.includes(G2.MODIFY_C2C_MSG) || t3.includes(G2.MODIFY_GRP_MSG) ? { elements: n3.elements, messageVersion: n3.messageVersion, cloudCustomData: n3.cloudCustomData, headSeq: a3 } : { headSeq: a3 } }))) : o3(T2(n3))) : this._chM.onMessage({ head: e3.head, body: n3 }));
+ }(e3.body, this._getResKeyMap(s4))), M2.d("".concat(this._n, ".onMessage ret:").concat(JSON.stringify(n3), " requestID:").concat(t3, " has:").concat(this._promiseMap.has(t3))), this._setNextPingTs(), this._promiseMap.has(t3) ? (o3 = (s4 = this._promiseMap.get(t3)).resolve, i4 = s4.reject, a3 = s4.timestamp, s4 = s4.headSeq, this._promiseMap.delete(t3), this._calcRTT(a3), n3.errorCode && 0 !== n3.errorCode ? (this._chM.onErrorCodeNotZero(n3), i4(new L2({ code: n3.errorCode, message: n3.errorInfo || "", data: t3.includes(G2.MODIFY_C2C_MSG) || t3.includes(G2.MODIFY_GRP_MSG) ? { elements: n3.elements, messageVersion: n3.messageVersion, cloudCustomData: n3.cloudCustomData, headSeq: s4 } : { headSeq: s4 } }))) : o3(T2(n3))) : this._chM.onMessage({ head: e3.head, body: n3 }));
} }, { key: "_calcRTT", value: function(e3) {
e3 = Date.now() - e3;
this._chM.get(26).addRTT(e3);
} }, { key: "_connect", value: function() {
- this._readyState !== us && this._readyState !== cs && (this._startTs = Date.now(), this._onOpenTs = 0, this._readyState = us, this._socket = new ss2(this), this._socketID = this._socket.getID(), M2.l("".concat(this._n, "._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled(), " socketID:").concat(this._socketID, " url:").concat(this.getURL())), new P2("wsConnect").setMessage("socketID:".concat(this._socketID, " url:").concat(this.getURL())).end());
+ this._readyState !== fa && this._readyState !== ga && (this._startTs = Date.now(), this._onOpenTs = 0, this._readyState = fa, this._socket = new pa(this), this._socketID = this._socket.getID(), M2.l("".concat(this._n, "._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled(), " socketID:").concat(this._socketID, " url:").concat(this.getURL())), new P2("wsConnect").setMessage("socketID:".concat(this._socketID, " url:").concat(this.getURL())).end());
} }, { key: "getURL", value: function() {
this._chM.isDevMode() && (this._canIUseBinaryFrame = false);
- var e3 = qt2(), t3 = ((ge2 || le2 && "windows" === e3 || fe2) && (this._canIUseBinaryFrame = false), -1), n3 = ("ios" === e3 ? t3 = Te2 || -1 : "android" === e3 && (t3 = Ee2 || -1), this._chM.get(12)), o3 = this._chM.getPlatform(), i4 = n3.getSDKAppID(), n3 = n3.getInstanceID(), i4 = "sdkappid=".concat(i4, "&instanceid=").concat(n3, "&random=").concat(this._getRandom(), "&platform=").concat(o3, "&host=").concat(e3) + "&version=".concat(t3, "&sdkversion=").concat("3.5.4");
- return de2 && (i4 += "&isminigame=1"), this._chM.canIUseInflate() && (i4 += "&compress=gzip"), (this._canIUseBinaryFrame ? "".concat(this._url, "/binfo?") : "".concat(this._url, "/info?")).concat(i4);
+ var e3 = Bt2(), t3 = ((ve2 || _e2 && "windows" === e3 || Ie2) && (this._canIUseBinaryFrame = false), -1), n3 = ("ios" === e3 ? t3 = Le2 || -1 : "android" === e3 && (t3 = ke2 || -1), this._chM.get(12)), o3 = this._chM.getPlatform(), i4 = n3.getSDKAppID(), n3 = n3.getInstanceID(), i4 = "sdkappid=".concat(i4, "&instanceid=").concat(n3, "&random=").concat(this._getRandom(), "&platform=").concat(o3, "&host=").concat(e3) + "&version=".concat(t3, "&sdkversion=").concat("3.5.5");
+ return he2 && (i4 += "&isminigame=1"), this._chM.canIUseInflate() && (i4 += "&compress=gzip"), (this._canIUseBinaryFrame ? "".concat(this._url, "/binfo?") : "".concat(this._url, "/info?")).concat(i4);
} }, { key: "_closeConnection", value: function(e3) {
- M2.l("".concat(this._n, "._closeConnection socketID:").concat(this._socketID)), this._socket && (this._socket.close(e3), this._socketID = -1, this._socket = null, this._readyState = ls);
+ M2.l("".concat(this._n, "._closeConnection socketID:").concat(this._socketID)), this._socket && (this._socket.close(e3), this._socketID = -1, this._socket = null, this._readyState = ma);
} }, { key: "_resend", value: function() {
var i4 = this;
if (M2.l("".concat(this._n, "._resend reConnectFlag:").concat(this._reConnectFlag), "promiseMap.size:".concat(this._promiseMap.size, " simpleRequestMap.size:").concat(this._simpleRequestMap.size)), 0 < this._promiseMap.size && this._promiseMap.forEach(function(e4, t4) {
@@ -15928,8 +15935,8 @@ var chat = { exports: {} };
var e3, t3 = F2(this._simpleRequestMap);
try {
for (t3.s(); !(e3 = t3.n()).done; ) {
- var n3 = j2(e3.value, 2), o3 = n3[0], s4 = n3[1];
- this._execute(o3, s4);
+ var n3 = j2(e3.value, 2), o3 = n3[0], a3 = n3[1];
+ this._execute(o3, a3);
}
} catch (e4) {
t3.e(e4);
@@ -15939,14 +15946,14 @@ var chat = { exports: {} };
this._simpleRequestMap.clear();
}
} }, { key: "send", value: function(n3) {
- var o3 = this, i4 = (n3.head.seq = this._getSequence(), n3.head.reqtime = Math.floor(Date.now() / 1e3), n3.head.cs = this._calcCheckSum(n3.head.servcmd, n3.body), n3.keyMap, W2(n3, as)), s4 = this._getRequestIDFromHead(n3.head), a3 = JSON.stringify(i4);
+ var o3 = this, i4 = (n3.head.seq = this._getSequence(), n3.head.reqtime = Math.floor(Date.now() / 1e3), n3.head.cs = this._calcCheckSum(n3.head.servcmd, n3.body), n3.keyMap, W2(n3, _a)), a3 = this._getRequestIDFromHead(n3.head), s4 = JSON.stringify(i4);
return new Promise(function(e3, t3) {
- o3._promiseMap.set(s4, { resolve: e3, reject: t3, timestamp: Date.now(), uplinkData: a3, headSeq: n3.head.seq }), M2.d("".concat(o3._n, ".send uplinkData:").concat(JSON.stringify(i4), " requestID:").concat(s4, " readyState:").concat(o3._readyState)), o3._readyState !== cs ? o3._reConnect() : (o3._execute(s4, a3), o3._chM.get(26).addRequestCount());
+ o3._promiseMap.set(a3, { resolve: e3, reject: t3, timestamp: Date.now(), uplinkData: s4, headSeq: n3.head.seq }), M2.d("".concat(o3._n, ".send uplinkData:").concat(JSON.stringify(i4), " requestID:").concat(a3, " readyState:").concat(o3._readyState)), o3._readyState !== ga ? o3._reConnect() : (o3._execute(a3, s4), o3._chM.get(26).addRequestCount());
});
} }, { key: "simplySend", value: function(e3) {
e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap;
- var t3 = W2(e3, rs), e3 = this._getRequestIDFromHead(e3.head), t3 = JSON.stringify(t3);
- this._readyState !== cs ? (this._simpleRequestMap.size < this.MAX_SIZE ? this._simpleRequestMap.set(e3, t3) : M2.l("".concat(this._n, ".simplySend. simpleRequestMap is full, drop request!")), this._reConnect()) : this._execute(e3, t3);
+ var t3 = W2(e3, ha), e3 = this._getRequestIDFromHead(e3.head), t3 = JSON.stringify(t3);
+ this._readyState !== ga ? (this._simpleRequestMap.size < this.MAX_SIZE ? this._simpleRequestMap.set(e3, t3) : M2.l("".concat(this._n, ".simplySend. simpleRequestMap is full, drop request!")), this._reConnect()) : this._execute(e3, t3);
} }, { key: "_execute", value: function(e3, t3) {
this._socket.send({ data: t3, fail: v3 ? this._onSendFail.bind(this) : void 0, requestID: e3 });
} }, { key: "_onSendFail", value: function(e3) {
@@ -15954,25 +15961,25 @@ var chat = { exports: {} };
} }, { key: "_getSequence", value: function() {
var e3;
if (this._startSequence < 2415919103)
- return e3 = this._startSequence, this._startSequence += 1, 2415919103 === this._startSequence && (this._startSequence = ht2()), e3;
+ return e3 = this._startSequence, this._startSequence += 1, 2415919103 === this._startSequence && (this._startSequence = mt2()), e3;
} }, { key: "_getRequestIDFromHead", value: function(e3) {
return e3.servcmd + e3.seq;
} }, { key: "_getResKeyMap", value: function(e3) {
e3 = this._chM.getKeyMap(e3);
- return y2(y2({}, Yi.res), e3.res);
+ return y2(y2({}, $i.res), e3.res);
} }, { key: "_reConnect", value: function() {
- this._readyState !== cs && this._readyState !== us && this.forcedReconnect();
+ this._readyState !== ga && this._readyState !== fa && this.forcedReconnect();
} }, { key: "forcedReconnect", value: function() {
var e3 = "".concat(this._n, ".forcedReconnect");
M2.l("".concat(e3, " count:").concat(this._reConnectCount, " readyState:").concat(this._readyState)), this._reConnectFlag = true, this._resetRandom(), this._reConnectCount < this.MAX_RECONNECT_COUNT ? (this._reConnectCount += 1, this._closeConnection(4001), this._initConnection()) : (this._reConnectCount = 0, this._chM.get(15).isOnline() ? (M2.w("".concat(e3, " disconnected from wsserver but network is ok, continue...")), this._closeConnection(4001), this._initConnection()) : this._chM.onReconnectFailed());
} }, { key: "getReconnectFlag", value: function() {
return this._reConnectFlag;
} }, { key: "_setNextPingTs", value: function() {
- this._nextPingTs = fe2 ? Date.now() + 5e3 : Date.now() + 1e4;
+ this._nextPingTs = Ie2 ? Date.now() + 5e3 : Date.now() + 1e4;
} }, { key: "getNextPingTs", value: function() {
return this._nextPingTs;
} }, { key: "isConnected", value: function() {
- return this._readyState === cs;
+ return this._readyState === ga;
} }, { key: "canIUseBinaryFrame", value: function() {
return this._canIUseBinaryFrame;
} }, { key: "getSocketID", value: function() {
@@ -15983,7 +15990,7 @@ var chat = { exports: {} };
} }, { key: "setIsWorkerEnabled", value: function(e3) {
M2.l("".concat(this._n, ".setIsWorkerEnabled flag:").concat(e3)), this._isWorkerEnabled = e3;
} }, { key: "getIsWorkerEnabled", value: function() {
- return this._isWorkerEnabled && Ae2;
+ return this._isWorkerEnabled && Ge2;
} }, { key: "_getRandom", value: function() {
return 0 === this._random && (this._random = Math.random()), this._random;
} }, { key: "_resetRandom", value: function() {
@@ -15991,18 +15998,18 @@ var chat = { exports: {} };
} }, { key: "_calcCheckSum", value: function(e3, t3) {
if (-1 !== e3.indexOf(G2.PING) || -1 !== e3.indexOf(G2.LOGIN) || -1 !== e3.indexOf(G2.LOGOUT) || -1 !== e3.indexOf(G2.AV_POLLING) || -1 !== e3.indexOf(G2.AV_NOAUTH_POLLING))
return 0;
- for (var n3 = is(JSON.stringify(t3)), o3 = 4294967295, i4 = 0, s4 = n3.length; i4 < s4; i4++) {
+ for (var n3 = da(JSON.stringify(t3)), o3 = 4294967295, i4 = 0, a3 = n3.length; i4 < a3; i4++) {
o3 ^= n3[i4];
- for (var a3 = 0; a3 < 8; a3++)
+ for (var s4 = 0; s4 < 8; s4++)
1 == (1 & o3) ? o3 = o3 >>> 1 ^ 3988292384 : o3 >>>= 1;
}
return (4294967295 ^ o3) >>> 0;
} }, { key: "close", value: function() {
- M2.l("".concat(this._n, ".close")), this._closeConnection(4e3), this._promiseMap.clear(), this._startSequence = ht2(), this._readyState = ls, this._simpleRequestMap.clear(), this._reConnectFlag = false, this._reConnectCount = 0, this._onOpenTs = 0, this._url = "", this._random = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true;
- } }]), ps = function(s4, a3, r4) {
+ M2.l("".concat(this._n, ".close")), this._closeConnection(4e3), this._promiseMap.clear(), this._startSequence = mt2(), this._readyState = ma, this._simpleRequestMap.clear(), this._reConnectFlag = false, this._reConnectCount = 0, this._onOpenTs = 0, this._url = "", this._random = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true;
+ } }]), Ia = function(a3, s4, r4) {
return new Promise(function(t3, e3) {
var n3, o3, i4 = "application/x-www-form-urlencoded;charset=UTF-8";
- v3 ? I2.request({ url: a3, data: r4, method: s4, timeout: 3e3, header: { "content-type": i4 }, success: function(e4) {
+ v3 ? I2.request({ url: s4, data: r4, method: a3, timeout: 3e3, header: { "content-type": i4 }, success: function(e4) {
e4 && e4.data && e4.data.NetCheckInfo && M2.l("".concat("getconninfo ok in", " miniapp. ret:"), e4.data), t3();
}, fail: function() {
e3(new L2({ code: k2.NETWORK_ERROR }));
@@ -16010,9 +16017,9 @@ var chat = { exports: {} };
n3.abort(), e3(new L2({ code: k2.NETWORK_TIMEOUT }));
}, 3e3), n3.onreadystatechange = function() {
4 === n3.readyState && (o3 && clearTimeout(o3), 200 === n3.status || 304 === n3.status ? (n3.responseText && -1 < n3.responseText.indexOf("NetCheckInfo") && M2.l("".concat("getconninfo ok in", " web. ret:"), JSON.parse(n3.responseText)), t3()) : e3(new L2({ code: k2.NETWORK_ERROR })));
- }, n3.open(s4, a3, true), n3.setRequestHeader("Content-type", i4), r4 ? n3.send(r4) : n3.send());
+ }, n3.open(a3, s4, true), n3.setRequestHeader("Content-type", i4), r4 ? n3.send(r4) : n3.send());
});
- }, _s = (t2(Ds, c2), e2(Ds, [{ key: "onCheckTimer", value: function(e3) {
+ }, Ma = (t2(Oa, c2), e2(Oa, [{ key: "onCheckTimer", value: function(e3) {
this._socketHandler && (this.isLoggedIn() ? (0 < this._timerForNotLoggedIn && (clearInterval(this._timerForNotLoggedIn), this._timerForNotLoggedIn = -1), this._socketHandler.onCheckTimer(e3)) : this._socketHandler.onCheckTimer(1), this._checkNextPing());
} }, { key: "onErrorCodeNotZero", value: function(e3) {
this.get(20).onErrorCodeNotZero(e3);
@@ -16021,8 +16028,8 @@ var chat = { exports: {} };
} }, { key: "send", value: function(e3) {
return this._socketHandler ? this._previousState !== R2.NET_STATE_CONNECTED && e3.head.servcmd.includes(G2.SSO_STAT) ? (this.reConnect(), this.isPrivateNetWork() ? Promise.resolve() : this._sendLogViaHTTP(e3)) : this._socketHandler.send(e3) : Promise.reject();
} }, { key: "_sendLogViaHTTP", value: function(e3) {
- var t3 = s3.HOST.CURRENT.STAT, t3 = "".concat(t3, "/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e3.head.sdkappid, "&reqtime=").concat(Date.now()), e3 = JSON.stringify(e3.body);
- return ps("POST", t3, e3);
+ var t3 = a2.HOST.CURRENT.STAT, t3 = "".concat(t3, "/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e3.head.sdkappid, "&reqtime=").concat(Date.now()), e3 = JSON.stringify(e3.body);
+ return Ia("POST", t3, e3);
} }, { key: "simplySend", value: function(e3) {
return this._socketHandler ? this._socketHandler.simplySend(e3) : Promise.reject();
} }, { key: "onOpen", value: function() {
@@ -16030,7 +16037,7 @@ var chat = { exports: {} };
} }, { key: "onClose", value: function() {
this._socketHandler && this._socketHandler.getReconnectFlag() && this._emitNetStateChangeEvent(R2.NET_STATE_DISCONNECTED), this.reConnect();
} }, { key: "onError", value: function() {
- v3 && !fe2 && this.warn("DomainNameInMP"), this._emitNetStateChangeEvent(R2.NET_STATE_DISCONNECTED);
+ v3 && !Ie2 && this.warn("DomainNameInMP"), this._emitNetStateChangeEvent(R2.NET_STATE_DISCONNECTED);
} }, { key: "getKeyMap", value: function(e3) {
return this.get(20).getKeyMap(e3);
} }, { key: "onRequestTimeout", value: function() {
@@ -16038,7 +16045,7 @@ var chat = { exports: {} };
} }, { key: "onSendFail", value: function() {
this._emitNetStateChangeEvent(R2.NET_STATE_DISCONNECTED);
} }, { key: "onReconnected", value: function() {
- M2.l("".concat(this._n, ".onReconnected cost:").concat(tn(this._disconnectedTS, true, true))), this._m.restartTimer(), this.get(20).onReconnected(tn(this._disconnectedTS, false, false)), this._disconnectedTS = 0, this._emitNetStateChangeEvent(R2.NET_STATE_CONNECTED);
+ M2.l("".concat(this._n, ".onReconnected cost:").concat(an(this._disconnectedTS, true, true))), this._m.restartTimer(), this.get(20).onReconnected(an(this._disconnectedTS, false, false)), this._disconnectedTS = 0, this._emitNetStateChangeEvent(R2.NET_STATE_CONNECTED);
} }, { key: "onReconnectFailed", value: function() {
M2.l("".concat(this._n, ".onReconnectFailed")), this._emitNetStateChangeEvent(R2.NET_STATE_DISCONNECTED);
} }, { key: "setIsWorkerEnabled", value: function(e3) {
@@ -16074,22 +16081,22 @@ var chat = { exports: {} };
this.isPrivateNetWork() || (this._lastDiagnoseTS = Date.now(), this._diagnoseBySSO(), this._diagnoseByCDN());
} }, { key: "_diagnoseBySSO", value: function() {
var t3 = this, e3 = this._socketHandler.getURL(), n3 = e3.split("/")[2];
- n3.startsWith("ws") && (e3 = e3.slice(e3.indexOf("info?") + 5), n3 = "https://".concat(n3, "/v3/netcheck/getconninfo?").concat(e3, "&reqtime=").concat(Date.now()), ps("GET", n3).catch(function(e4) {
+ n3.startsWith("ws") && (e3 = e3.slice(e3.indexOf("info?") + 5), n3 = "https://".concat(n3, "/v3/netcheck/getconninfo?").concat(e3, "&reqtime=").concat(Date.now()), Ia("GET", n3).catch(function(e4) {
M2.w("".concat(t3._n, "._diagnoseBySSO failed. error:"), e4);
}));
} }, { key: "_diagnoseByCDN", value: function() {
var t3 = this, e3 = this._socketHandler.getURL(), e3 = e3.slice(e3.indexOf("info?") + 5), e3 = "https://boce-cdn.my-imcloud.com/v3/netcheck/getconninfo?".concat(e3, "&reqtime=").concat(Date.now());
- ps("GET", e3).catch(function(e4) {
+ Ia("GET", e3).catch(function(e4) {
M2.w("".concat(t3._n, "._diagnoseByCDN failed. error:"), e4);
});
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._previousState = R2.NET_STATE_CONNECTED, this._probing = false, this._fatalErrorFlag = false, this._timerForNotLoggedIn = setInterval(this.onCheckTimer.bind(this), 1e3), this._disconnectedTS = 0, this._lastDiagnoseTS = 0;
- } }])), hs = ["a2", "tinyid"], gs = ["a2", "tinyid"], fs = e2(function e3(t3) {
+ } }])), ya = ["a2", "tinyid"], Ca = ["a2", "tinyid"], Ta = e2(function e3(t3) {
p3(this, e3), this._n = "PHandler", this._sessionM = t3, this._map = /* @__PURE__ */ new Map(), this._fillMap();
}, [{ key: "_fillMap", value: function() {
this._map.clear();
var e3 = this._sessionM.genCommonHead(), t3 = this._sessionM.genCosSpecifiedHead(), n3 = this._sessionM.genSSOReportHead();
- this._map.set(G2.LOGIN, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.LOGIN) }), body: { state: "Online", isWebUniapp: 0, deviceBrand: 0, customInfo: "" }, keyMap: { req: { deviceBrand: "InstType" }, res: { InstId: "instanceID", HelloInterval: "helloInterval", RichMsgAuthKey: "authKey" } } }), this._map.set(G2.LOGOUT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.LOGOUT) }), body: { type: 0, isWebUniapp: 0 }, keyMap: { req: { type: "wslogout_type" } } }), this._map.set(G2.HELLO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.HELLO) }), body: { isWebUniapp: 0 }, keyMap: { res: { NewInstInfo: "newInstanceInfo" } } }), this._map.set(G2.KICK_OTHER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.STAT_SERVICE, ".").concat(G2.KICK_OTHER) }), body: {} }), this._map.set(G2.COS_SIGN, { head: y2(y2({}, t3), {}, { servcmd: "".concat(s3.NAME.IM_COS_SIGN, ".").concat(G2.COS_SIGN) }), body: { cmd: "open_im_cos_svc", subCmd: "get_cos_token", duration: 300, version: 2 }, keyMap: { req: { userSig: "usersig", subCmd: "sub_cmd", cmd: "cmd", duration: "duration", version: "version" }, res: { expired_time: "expiredTime", bucket_name: "bucketName", session_token: "sessionToken", tmp_secret_id: "secretId", tmp_secret_key: "secretKey" } } }), this._map.set(G2.COS_PRE_SIG, { head: y2(y2({}, t3), {}, { servcmd: "".concat(s3.NAME.CUSTOM_UPLOAD, ".").concat(G2.COS_PRE_SIG) }), body: { fileType: void 0, fileName: void 0, uploadMethod: 0, duration: 900 }, keyMap: { req: { userSig: "usersig", fileType: "file_type", fileName: "file_name", uploadMethod: "upload_method" }, res: { expired_time: "expiredTime", request_id: "requestId", head_url: "headUrl", upload_url: "uploadUrl", download_url: "downloadUrl", ci_url: "ciUrl", snapshot_url: "requestSnapshotUrl" } } }), this._map.set(G2.SIMPLE_COS_PRE_SIG, { head: y2(y2({}, t3), {}, { servcmd: "".concat(s3.NAME.CUSTOM_UPLOAD, ".").concat(G2.SIMPLE_COS_PRE_SIG) }), body: { uploadMethod: 0, platform: 2, SDKAppID: 0, userID: "", conversationType: 1, uploadConfig: [{ fileID: 1, fileType: 1, fileName: "" }] }, keyMap: { req: { platform: "uint32_platform", SDKAppID: "uint32_sdkappid", userID: "str_user_id", uploadMethod: "uint32_upload_method", conversationType: "uint32_scene", uploadConfig: "rpt_upload_object", fileID: "uint32_file_id", fileType: "uint32_file_type", fileName: "str_file_name" }, res: { str_final_ip: "uploadIP", rpt_pre_sig: "preSig", uint32_file_id: "fileID", uint32_exist_flag: "existFlag", str_download_url: "downloadUrl", str_upload_url: "uploadUrl", str_snapshot_url: "requestSnapshotUrl", str_file_key: "fileKey" } } }), this._map.set(G2.GET_IMAGE_INFO, { head: y2(y2({}, t3), {}, { servcmd: "".concat(s3.NAME.CUSTOM_UPLOAD, ".").concat(G2.GET_IMAGE_INFO) }), body: { imageUrl: "" }, keyMap: { req: { imageUrl: "str_image_url" }, res: { rpt_msg_image_info: "imageInfoArray", uint32_image_type: "type", str_url: "url", uint32_width: "width", uint32_height: "height", str_image_format: "imageFormat" } } }), this._map.set(G2.GET_IP, { head: y2(y2({}, t3), {}, { servcmd: "".concat(s3.NAME.CUSTOM_UPLOAD, ".").concat(G2.GET_IP) }), body: { domainName: "" }, keyMap: { req: { domainName: "str_domain" }, res: { str_final_ip: "ip" } } }), this._map.set(G2.VIDEO_COVER, { head: y2(y2({}, t3), {}, { servcmd: "".concat(s3.NAME.CUSTOM_UPLOAD, ".").concat(G2.VIDEO_COVER) }), body: { version: 1, platform: void 0, coverName: void 0, requestSnapshotUrl: void 0 }, keyMap: { req: { version: "version", platform: "platform", coverName: "cover_name", requestSnapshotUrl: "snapshot_url" }, res: { error_code: "errorCode", error_msg: "errorInfo", download_url: "snapshotUrl" } } }), this._map.set(G2.FETCH_COMMERCIAL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_CONFIG_MANAGER, ".").concat(G2.FETCH_COMMERCIAL_CONFIG) }), body: { SDKAppID: 0 }, keyMap: { req: { SDKAppID: "uint32_sdkappid" }, res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }), this._map.set(G2.PUSHED_COMMERCIAL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_CONFIG_MANAGER, ".").concat(G2.PUSHED_COMMERCIAL_CONFIG) }), body: {}, keyMap: { res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }), this._map.set(G2.FETCH_CLOUD_CTRL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_CONFIG_MANAGER, ".").concat(G2.FETCH_CLOUD_CTRL_CONFIG) }), body: { SDKAppID: 0, version: 0 }, keyMap: { req: { SDKAppID: "uint32_sdkappid", version: "uint64_version" }, res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }), this._map.set(G2.PUSHED_CLOUD_CTRL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_CONFIG_MANAGER, ".").concat(G2.PUSHED_CLOUD_CTRL_CONFIG) }), body: {}, keyMap: { res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }), this._map.set(G2.OVERLOAD_NOTIFY, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OVERLOAD_PUSH, ".").concat(G2.OVERLOAD_NOTIFY) }), body: {}, keyMap: { res: { OverLoadServCmd: "overloadCommand", DelaySecs: "waitingTime" } } }), this._map.set(G2.SYNC_UNREAD_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SYNC_UNREAD_MSG) }), body: { cookie: "", syncFlag: 0, needAbstract: 1, isOnlineSync: 0, needSignaling: 1, needCachedMsg: 1 }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", from: "From_Account", to: "To_Account", time: "MsgTimeStamp", sequence: "MsgSeq", random: "MsgRandom", elements: "MsgBody" }, res: { MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", ClientSeq: "clientSequence", MsgSeq: "sequence", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgRandom: "random", MsgTimeStamp: "time", MsgContent: "content", ToGroupId: "to", MsgKey: "messageKey", GroupTips: "groupTips", MsgBody: "elements", MsgType: "type", C2CRemainingUnreadCount: "C2CRemainingUnreadList", C2CPairUnreadCount: "C2CPairUnreadList" } } }), this._map.set(G2.GET_PROFANITY_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_MSG_AUDIT_MGR, ".").concat(G2.GET_PROFANITY_LIST) }), body: { version: 0, deviceID: "", startIndex: void 0 }, keyMap: { req: { version: "uint64_version", deviceID: "str_device_id", startIndex: "uint64_start_index" }, res: { msg_cmd_error_code: "errorInfo", str_err_msg: "errorMessage", uint32_code: "errorCode", msg_scene_ctl_config: "filterConfig", uint64_c2c_custom_msg_flag: "c2c_custom_message", uint64_c2c_text_msg_flag: "c2c_text_message", uint64_group_custom_msg_flag: "group_custom_message", uint64_group_text_msg_flag: "group_text_message", uint64_group_info_flag: "group_profile", uint64_group_member_info_flag: "group_member_profile", uint64_relation_chain_flag: "sns", uint64_user_info_flag: "user_profile", rpt_msg_dirty_word: "lexicon", str_dirty_word: "profanity", str_replaced_content: "replacement", uint64_filter_type: "filterType", uint64_id: "id", uint64_word_type: "profanityType", uint64_complete_flag: "completeFlag", uint64_next_start_index: "nextStartIndex", uint64_version: "version", uint64_expired_time: "expiredTime" } } }), this._map.set(G2.SEND_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SEND_C2C_MSG) }), body: { fromAccount: "", toAccount: "", msgSeq: 0, msgRandom: 0, msgBody: [], cloudCustomData: void 0, nick: "", avatar: "", msgLifeTime: void 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { sound: "", badgeMode: 0, isVoipPush: void 0, image: "" }, androidInfo: { sound: "", XiaoMiChannelID: "", OPPOChannelID: "", GoogleChannelID: "", VIVOClassification: 1, VIVOCategory: "", HuaWeiCategory: "", OPPOCategory: "", HuaWeiImage: "", HonorImage: "", GoogleImage: "", HonorImportance: "" } }, messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, isSupportExtension: 0, isRelayMessage: 0, cmConfigID: void 0, forbidCallbackControl: void 0 }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", count: "MaxCnt", lastMessageTime: "LastMsgTime", messageKey: "MsgKey", peerAccount: "Peer_Account", data: "Data", description: "Desc", extension: "Ext", type: "MsgType", content: "MsgContent", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", nick: "From_AccountNick", avatar: "From_AccountHeadurl", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "IsNeedReadReceipt", GoogleChannelID: "GoogleChannelID", XiaoMiChannelID: "XiaoMiChannelID", OPPOChannelID: "OPPOChannelID", OPPOCategory: "OPPOCategory", VIVOClassification: "VIVOClassification", VIVOCategory: "VIVOCategory", HonorImportance: "HonorImportance" } } }), this._map.set(G2.SEND_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.SEND_GRP_MSG) }), body: { fromAccount: "", groupID: "", random: 0, clientSequence: 0, priority: "", msgBody: [], cloudCustomData: void 0, onlineOnlyFlag: 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { sound: "", badgeMode: 0, isVoipPush: void 0, image: "" }, androidInfo: { sound: "", XiaoMiChannelID: "", OPPOChannelID: "", GoogleChannelID: "", VIVOClassification: 1, VIVOCategory: "", HuaWeiCategory: "", OPPOCategory: "", HuaWeiImage: "", HonorImage: "", GoogleImage: "", HonorImportance: "" } }, groupAtInfo: [], messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, topicID: void 0, receiverList: void 0, isSupportExtension: 0, isRelayMessage: 0, cmConfigID: void 0, forbidCallbackControl: void 0 }, keyMap: { req: { to: "GroupId", extension: "Ext", data: "Data", description: "Desc", random: "Random", sequence: "ReqMsgSeq", count: "ReqMsgNumber", type: "MsgType", priority: "MsgPriority", content: "MsgContent", elements: "MsgBody", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", clientSequence: "ClientSeq", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "NeedReadReceipt", receiverList: "To_Account", GoogleChannelID: "GoogleChannelID", XiaoMiChannelID: "XiaoMiChannelID", OPPOChannelID: "OPPOChannelID", OPPOCategory: "OPPOCategory", VIVOClassification: "VIVOClassification", VIVOCategory: "VIVOCategory", HonorImportance: "HonorImportance" }, res: { MsgTime: "time", MsgSeq: "sequence" } } }), this._map.set(G2.REVOKE_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.REVOKE_C2C_MSG) }), body: { msgInfo: { fromAccount: "", toAccount: "", msgTimeStamp: 0, msgSeq: 0, msgRandom: 0 } }, keyMap: { req: { msgInfo: "MsgInfo", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom" } } }), this._map.set(G2.REVOKE_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.REVOKE_GRP_MSG) }), body: { groupID: "", msgSeqList: void 0, topicID: "" }, keyMap: { req: { msgSeqList: "MsgSeqList", msgSeq: "MsgSeq" } } }), this._map.set(G2.GET_C2C_ROAMING_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.GET_C2C_ROAMING_MSG) }), body: { peerAccount: "", count: 15, lastMessageTime: 0, messageKey: "", withRecalledMessage: 1, direction: 0 }, keyMap: { req: { messageKey: "MsgKey", peerAccount: "Peer_Account", count: "MaxCnt", lastMessageTime: "LastMsgTime", withRecalledMessage: "WithRecalledMsg", direction: "GetDirection" }, res: { LastMsgTime: "lastMessageTime", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer" } } }), this._map.set(G2.MODIFY_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.MODIFY_C2C_MSG) }), body: { from: "", to: "", sequence: 0, random: 0, time: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { req: { sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }), this._map.set(G2.GET_GRP_ROAMING_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_ROAMING_MSG) }), body: { withRecalledMsg: 1, groupID: "", count: 15, sequence: "", topicID: void 0 }, keyMap: { req: { sequence: "ReqMsgSeq", count: "ReqMsgNumber", withRecalledMessage: "WithRecalledMsg" }, res: { Random: "random", MsgTime: "time", MsgSeq: "sequence", ReqMsgSeq: "sequence", RspMsgList: "messageList", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgPriority: "priority", MsgBody: "elements", MsgType: "type", MsgContent: "content", IsFinished: "complete", Download_Flag: "downloadFlag", ClientSeq: "clientSequence", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList", NextReqMsgSeq: "nextSequence" } } }), this._map.set(G2.SET_C2C_MSG_READ, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SET_C2C_MSG_READ) }), body: { C2CMsgReaded: void 0 }, keyMap: { req: { lastMessageTime: "LastedMsgTime" } } }), this._map.set(G2.SET_C2C_PEER_MUTE_NOTIFICATIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { userIDList: void 0, muteFlag: 0 }, keyMap: { req: { userIDList: "Peer_Account", muteFlag: "Mute_Notifications" } } }), this._map.set(G2.GET_C2C_PEER_MUTE_NOTIFICATIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.GET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { toAccount: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Peer_Account" }, res: { MuteNotificationsList: "muteFlagList" } } }), this._map.set(G2.SET_GRP_MSG_READ, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.SET_GRP_MSG_READ) }), body: { groupID: void 0, messageReadSeq: void 0, topicID: void 0 }, keyMap: { req: { messageReadSeq: "MsgReadedSeq" } } }), this._map.set(G2.SET_ALL_MSG_READ, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SET_ALL_MSG_READ) }), body: { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, keyMap: { req: { readAllC2CMessage: "C2CReadAllMsg", groupMessageReadInfoList: "GroupReadInfo", messageSequence: "MsgSeq" }, res: { C2CReadAllMsg: "readAllC2CMessage", GroupReadInfoArray: "groupMessageReadInfoList" } } }), this._map.set(G2.DEL_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.DEL_C2C_MSG) }), body: { fromAccount: "", to: "", keyList: void 0 }, keyMap: { req: { keyList: "MsgKeyList" } } }), this._map.set(G2.DEL_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.DEL_GRP_MSG) }), body: { groupID: "", deleter: "", keyList: void 0, topicID: void 0 }, keyMap: { req: { deleter: "Deleter_Account", keyList: "Seqs" } } }), this._map.set(G2.TRANSLATE_TEXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_TRANSLATE, ".").concat(G2.TRANSLATE_TEXT) }), body: { sourceTextList: void 0, SDKAppID: 0, from: 0, source: "", target: "" }, keyMap: { req: { sourceTextList: "SourceText", SDKAppID: "SdkAppId", from: "FromAccount" }, res: { TargetText: "translatedTextList", RequestId: "requestID", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(G2.VOICE_TO_TEXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_SPEECH, ".").concat(G2.VOICE_TO_TEXT) }), body: { url: "", SDKAppID: 0, format: "", sourceType: 0, language: "" }, keyMap: { req: { url: "BytesUrl", SDKAppID: "Uint32Sdkappid", format: "BytesVoiceFormat", sourceType: "Uint64SourceType", language: "BytesEngServiceType" }, res: { BytesRequestid: "requestID", BytesResult: "result", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(G2.MODIFY_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.MODIFY_GRP_MSG) }), body: { groupID: "", topicID: void 0, sequence: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { req: { sequence: "MsgSeq", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }), this._map.set(G2.GET_READ_RECEIPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { req: { sequence: "MsgSeq" } } }), this._map.set(G2.SEND_C2C_READ_RECEIPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.SEND_C2C_READ_RECEIPT) }), body: { peerAccount: "", messageInfoList: void 0 }, keyMap: { req: { peerAccount: "Peer_Account", messageInfoList: "C2CMsgInfo", fromAccount: "From_Account", toAccount: "To_Account", sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", clientTime: "MsgClientTime" } } }), this._map.set(G2.SEND_READ_RECEIPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.SEND_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { req: { sequenceList: "MsgSeqList", sequence: "MsgSeq" } } }), this._map.set(G2.GET_READ_RECEIPT_DETAIL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_READ_RECEIPT_DETAIL) }), body: { groupID: "", sequence: void 0, flag: 0, cursor: 0, count: 0 }, keyMap: { req: { sequence: "MsgSeq", count: "Num" }, res: { ReadList: "readUserIDList", Read_Account: "userID", UnreadList: "unreadUserIDList", Unread_Account: "userID", IsFinish: "isCompleted" } } }), this._map.set(G2.GET_GRP_RECEIPTS_BY_USERS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_RECEIPTS_BY_USERS) }), body: { groupID: "", dataList: void 0 }, keyMap: { req: { dataList: "MemberReadMsgList", sequence: "MsgSeq", userIDList: "MemberList_Account" }, res: { MsgReadList: "dataList", Read_Account: "userID", Read_Time: "readTime" } } }), this._map.set(G2.MODIFY_C2C_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.MODIFY_C2C_MSG_EXT) }), body: { from: void 0, to: void 0, messageKey: void 0, operateType: void 0, extensionList: void 0 } }), this._map.set(G2.GET_C2C_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_C2C_MSG_EXT) }), body: { from: void 0, to: void 0, messageKey: void 0, startSequence: void 0 } }), this._map.set(G2.MODIFY_GRP_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.MODIFY_GRP_MSG_EXT) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, operateType: void 0, extensionList: void 0 } }), this._map.set(G2.GET_GRP_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_GRP_MSG_EXT) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, startSequence: void 0 } }), this._map.set(G2.ADD_C2C_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.ADD_C2C_MSG_REACTION) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Add_Account" } } }), this._map.set(G2.RM_C2C_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.RM_C2C_MSG_REACTION) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Del_Account" } } }), this._map.set(G2.GET_C2C_MSG_REACTIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_C2C_MSG_REACTIONS) }), body: { from: void 0, to: void 0, messageKeyList: void 0, count: void 0 } }), this._map.set(G2.GET_C2C_MSG_REACTION_USER_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_C2C_MSG_REACTION_USER_LIST) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, count: void 0 } }), this._map.set(G2.ADD_GRP_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.ADD_GRP_MSG_REACTION) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Add_Account" } } }), this._map.set(G2.RM_GRP_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.RM_GRP_MSG_REACTION) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Del_Account" } } }), this._map.set(G2.GET_GRP_MSG_REACTIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_GRP_MSG_REACTIONS) }), body: { groupID: void 0, topicID: void 0, messageSequenceList: void 0, count: void 0 }, keyMap: { res: { MsgSeq: "messageSequence" } } }), this._map.set(G2.GET_GRP_MSG_REACTION_USER_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_GRP_MSG_REACTION_USER_LIST) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, nextSeq: void 0, count: void 0 } }), this._map.set(G2.GET_C2C_PEER_READ_TIME, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.GET_C2C_PEER_READ_TIME) }), body: { userIDList: void 0 }, keyMap: { req: { userIDList: "To_Account" }, res: { ReadTime: "peerReadTimeList" } } }), this._map.set(G2.PAGING_GET_CONV_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.PAGING_GET_CONV_LIST) }), body: { fromAccount: void 0, timeStamp: void 0, startIndex: void 0, pinnedTimeStamp: void 0, pinnedStartIndex: void 0, orderType: void 0, messageAssistFlag: 15, assistFlag: 31 }, keyMap: { req: { messageAssistFlag: "MsgAssistFlags", assistFlag: "AssistFlags", pinnedTimeStamp: "TopTimeStamp", pinnedStartIndex: "TopStartIndex" }, res: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime", LastMsgFlags: "lastMessageFlag", TopFlags: "isPinned", TopTimeStamp: "pinnedTimeStamp", TopStartIndex: "pinnedStartIndex", GroupId: "convGroupID", C2cRemark: "friendRemark", MsgRecvOption: "messageRemindType", GroupIgnoredUnreadSeqCount: "noUnreadCount", GroupNextMsgSeq: "nextMessageSeq" } } }), this._map.set(G2.DEL_CONV, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.DEL_CONV) }), body: { fromAccount: "", conversationList: void 0, clearHistoryMessage: void 0 }, keyMap: { req: { toGroupID: "ToGroupid", clearHistoryMessage: "ClearRamble", conversationList: "ContactItem" }, res: { ResultItem: "resultList", ToGroupid: "groupID", ResultCode: "code", ResultInfo: "info" } } }), this._map.set(G2.CLEAR_HISTORY_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.CLEAR_HISTORY_MSG) }), body: { fromAccount: "", toAccount: void 0, type: 1, toGroupID: void 0 }, keyMap: { req: { toGroupID: "ToGroupid" } } }), this._map.set(G2.PIN_CONV, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.PIN_CONV) }), body: { fromAccount: "", operationType: 1, itemList: void 0 }, keyMap: { req: { itemList: "RecentContactItem" } } }), this._map.set(G2.DEL_GROUP_AT_TIPS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.DEL_GROUP_AT_TIPS) }), body: { messageListToDelete: void 0 }, keyMap: { req: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }), this._map.set(G2.SET_CONV_CUSTOM_DATA, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.MARK_CONV) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, res: { ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(G2.MARK_CONV, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.MARK_CONV) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, res: { ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(G2.CREATE_CONV_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.CREATE_CONV_GRP) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "GroupContactItem", groupID: "ToGroupId" }, res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(G2.DEL_CONV_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.DEL_CONV_GRP) }), body: { fromAccount: "", groupName: void 0 }, keyMap: { res: { GroupId: "convGroupID" } } }), this._map.set(G2.RENAME_CONV_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { req: { oldName: "OldGroupName", newName: "NewGroupName", groupID: "ToGroupId", operationType: "ContactOptType", groupName: "OldGroupName", updateItem: "ContactUpdateItem" }, res: { ContactOptType: "operationType", ToGroupId: "groupID", GroupId: "convGroupID" } } }), this._map.set(G2.ADD_CONV_TO_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: { groupName: void 0, updateGroupType: void 0, updateItem: void 0 } } }), this._map.set(G2.DEL_CONV_FROM_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 } }), this._map.set(G2.GET_CONV_GRP_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.GET_CONV_GRP_LIST) }), body: { fromAccount: "", startIndex: void 0 }, keyMap: { res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList" } } }), this._map.set(G2.SEARCH_CONV_GRP_MARK, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.RECENT_CONTACT, ".").concat(G2.SEARCH_CONV_GRP_MARK) }), body: { fromAccount: "", contactItem: void 0 }, keyMap: { req: { groupID: "ToGroupId" }, res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList", ContactResultItem: "contactItem" } } }), this._map.set(G2.GET_USER_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.PROFILE, ".").concat(G2.GET_USER_PROFILE) }), body: { fromAccount: "", userItem: [] }, keyMap: { req: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }), this._map.set(G2.UPDATE_MY_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.PROFILE, ".").concat(G2.UPDATE_MY_PROFILE) }), body: { fromAccount: "", profileItem: [{ tag: f2.NICK, value: "" }, { tag: f2.GENDER, value: "" }, { tag: f2.ALLOWTYPE, value: "" }, { tag: f2.AVATAR, value: "" }] }, keyMap: { req: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }), this._map.set(G2.GET_BL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.GET_BL) }), body: { fromAccount: "", startIndex: 0, maxLimited: 30 } }), this._map.set(G2.ADD_TO_BL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.ADD_TO_BL) }), body: { fromAccount: "", toAccount: [] } }), this._map.set(G2.RM_FROM_BL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.RM_FROM_BL) }), body: { fromAccount: "", toAccount: [] } }), this._map.set(G2.SET_SELF_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.SET_SELF_STATUS) }), body: { customStatus: "" } }), this._map.set(G2.GET_USER_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.GET_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { res: { UserStatusList: "successUserList", ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID", Status: "statusType" } } }), this._map.set(G2.SUB_USER_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.SUB_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { res: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }), this._map.set(G2.UNSUB_USER_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.UNSUB_USER_STATUS) }), body: { userIDList: void 0, unsubscribeAll: void 0 }, keyMap: { res: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }), this._map.set(G2.GET_FD_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.GET_FD_LIST) }), body: { fromAccount: "", startIndex: 0, standardSequence: 0, customSequence: 0 }, keyMap: { res: { FriendNum: "friendCount", UserDataItem: "resultList", ValueItem: "tagValueList" } } }), this._map.set(G2.ADD_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.ADD_FD) }), body: { fromAccount: "", addFriendItem: [], type: "" }, keyMap: { req: { source: "AddSource", wording: "AddWording", type: "AddType" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.UPDATE_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.UPDATE_FD) }), body: { fromAccount: "", updateItem: void 0 }, keyMap: { req: { snsItem: "SnsItem" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.DEL_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.DEL_FD) }), body: { fromAccount: "", userIDList: [], type: "" }, keyMap: { req: { type: "DeleteType" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.GET_FD_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.GET_FD_PROFILE) }), body: { fromAccount: "", userIDList: void 0 }, keyMap: { res: { InfoItem: "resultList", SnsProfileItem: "tagValueList" } } }), this._map.set(G2.CHECK_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.CHECK_FD) }), body: { fromAccount: "", userIDList: [], type: "" }, keyMap: { req: { type: "CheckType" }, res: { InfoItem: "resultList" } } }), this._map.set(G2.GET_FD_APPLICATION_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.GET_FD_APPLICATION_LIST) }), body: { fromAccount: "", applicationType: "", startTime: 0, maxLimited: 0, lastSequence: 0 }, keyMap: { res: { PendencyItem: "resultList", AddSource: "source", AddTime: "time", AddWording: "wording", Image: "avatar", UnreadPendencyCount: "unreadCount", To_Account: "userID", PendencyType: "type" } } }), this._map.set(G2.RESPOND_FD_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.RESPOND_FD_APPLICATION) }), body: { fromAccount: "", responseFriendItem: [] }, keyMap: { req: { tag: "TagName", action: "ResponseAction" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.DEL_FD_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.DEL_FD_APPLICATION) }), body: { fromAccount: "", type: "", userIDList: void 0 }, keyMap: { req: { type: "PendencyType", userIDList: "To_Account" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.REPORT_FD_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.REPORT_FD_APPLICATION) }), body: { fromAccount: "", latestTimeStamp: "" }, keyMap: { req: { latestTimeStamp: "LatestPendencyTimeStamp" } } }), this._map.set(G2.CREATE_FD_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.CREATE_FD_GRP) }), body: { fromAccount: "", groupName: void 0, userIDList: void 0 }, keyMap: { req: { groupName: "GroupName", userIDList: "To_Account" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.DEL_FD_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.DEL_FD_GRP) }), body: { fromAccount: "", nameList: void 0 }, keyMap: { req: { nameList: "GroupName" } } }), this._map.set(G2.GET_FD_GRP_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.GET_FD_GRP_LIST) }), body: { fromAccount: "", lastSequence: 0, needFriend: "Need_Friend_Type_Yes" }, keyMap: { res: { ResultItem: "resultList", GroupName: "name", FriendNumber: "friendCount", To_Account: "userIDList" } } }), this._map.set(G2.UPDATE_FD_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FD, ".").concat(G2.UPDATE_FD_GRP) }), body: { fromAccount: "", oldName: "", newName: void 0, updateGroupItem: void 0 }, keyMap: { req: { oldName: "GroupOldName", newName: "GroupNewName" }, res: { UpdateType: "type", ResultItem: "resultList" } } }), this._map.set(G2.GET_GRP_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_LIST) }), body: { memberAccount: "", limit: void 0, offset: void 0, groupType: void 0, responseFilter: { groupBaseInfoFilter: void 0, selfInfoFilter: void 0 }, isSupportTopic: 0, needAppDefineData: 1 }, keyMap: { req: { memberAccount: "Member_Account" }, res: { GroupIdList: "groups", MsgSeq: "readedSequence", LastRecallTime: "_lastRevokedTime", AppDefinedData: "groupCustomField" } } }), this._map.set(G2.GET_GRP_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_PROFILE) }), body: { groupIDList: void 0, responseFilter: { groupBaseInfoFilter: void 0, groupCustomFieldFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 } }, keyMap: { req: { groupIDList: "GroupIdList", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", groupCustomFieldFilter: "AppDefinedDataFilter_Group", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { GroupIdList: "groups", AppDefinedData: "groupCustomField", AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_Group: "groupCustomFieldFilter", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", InfoSeq: "infoSequence", MemberList: "members", GroupInfo: "groups", ShutUpUntil: "muteUntil", ShutUpAllMember: "muteAllMembers" } } }), this._map.set(G2.CREATE_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.CREATE_GRP) }), body: { type: void 0, name: void 0, groupID: void 0, ownerID: void 0, introduction: void 0, notification: void 0, maxMemberNum: void 0, joinOption: void 0, memberList: void 0, groupCustomField: void 0, memberCustomField: void 0, webPushFlag: 1, avatar: "", isSupportTopic: void 0, inviteOption: void 0 }, keyMap: { req: { ownerID: "Owner_Account", userID: "Member_Account", avatar: "FaceUrl", maxMemberNum: "MaxMemberCount", joinOption: "ApplyJoinOption", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", inviteOption: "InviteJoinOption" }, res: { HugeGroupFlag: "avChatRoomFlag", OverJoinedGroupLimit_Account: "overLimitUserIDList" } } }), this._map.set(G2.DISMISS_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.DISMISS_GRP) }), body: { groupID: void 0 } }), this._map.set(G2.UPDATE_GRP_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.UPDATE_GRP_PROFILE) }), body: { groupID: void 0, name: void 0, introduction: void 0, notification: void 0, avatar: void 0, joinOption: void 0, groupCustomField: void 0, muteAllMembers: void 0, inviteOption: void 0 }, keyMap: { req: { groupCustomField: "AppDefinedData", muteAllMembers: "ShutUpAllMember", joinOption: "ApplyJoinOption", avatar: "FaceUrl", inviteOption: "InviteJoinOption" }, res: { AppDefinedData: "groupCustomField", ShutUpAllMember: "muteAllMembers" } } }), this._map.set(G2.APPLY_JOIN_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.APPLY_JOIN_GRP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1, historyMessageFlag: void 0 }, keyMap: { req: { applyMessage: "ApplyMsg", historyMessageFlag: "HugeGroupHistoryMsgFlag" }, res: { HugeGroupFlag: "avChatRoomFlag", AVChatRoomKey: "avChatRoomKey", RspMsgList: "messageList", ToGroupId: "to" } } }), this._map.set(G2.APPLY_JOIN_GRP_NOAUTH, (e3.a2, e3.tinyid, { head: y2(y2({}, W2(e3, hs)), {}, { servcmd: "".concat(s3.NAME.BIG_GRP_NO_AUTH, ".").concat(G2.APPLY_JOIN_GRP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1 }, keyMap: { req: { applyMessage: "ApplyMsg" }, res: { HugeGroupFlag: "avChatRoomFlag" } } })), this._map.set(G2.QUIT_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.QUIT_GRP) }), body: { groupID: void 0 } }), this._map.set(G2.SEARCH_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.SEARCH_GRP) }), body: { groupIDList: void 0, responseFilter: { groupBasePublicInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "CreateTime", "Owner_Account", "LastInfoTime", "LastMsgTime", "NextMsgSeq", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "InviteJoinOption"] } } }), this._map.set(G2.CHANGE_GRP_OWNER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.CHANGE_GRP_OWNER) }), body: { groupID: void 0, newOwnerID: void 0 }, keyMap: { req: { newOwnerID: "NewOwner_Account" } } }), this._map.set(G2.HANDLE_GRP_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.HANDLE_GRP_APPLICATION) }), body: { groupID: void 0, applicant: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { req: { applicant: "Applicant_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }), this._map.set(G2.HANDLE_INVITE_JOIN_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.HANDLE_INVITE_JOIN_GRP) }), body: { groupID: void 0, applicant: void 0, invitee: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, userDefinedField: void 0 }, keyMap: { req: { applicant: "Applicant_Account", invitee: "Invited_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg" } } }), this._map.set(G2.HANDLE_GRP_INVITATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.HANDLE_GRP_INVITATION) }), body: { groupID: void 0, inviter: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { req: { inviter: "Inviter_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }), this._map.set(G2.GET_GRP_PENDENCY, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_PENDENCY) }), body: { startTime: void 0, limit: void 0, handleAccount: void 0 }, keyMap: { req: { handleAccount: "Handle_Account" }, res: { To_Account: "userID", ApplyInviteMsg: "note" } } }), this._map.set(G2.DEL_GRP_SYSTEM_NOTICE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.DEL_GRP_SYSTEM_NOTICE) }), body: { messageListToDelete: void 0 }, keyMap: { req: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }), this._map.set(G2.AV_POLLING, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.BIG_GRP_POLLING, ".").concat(G2.AV_POLLING) }), body: { USP: 1, startSeq: 1, startBroadcastSeq: void 0, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { req: { USP: "USP" }, res: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } }), this._map.set(G2.AV_NOAUTH_POLLING, (e3.a2, e3.tinyid, { head: y2(y2({}, W2(e3, gs)), {}, { servcmd: "".concat(s3.NAME.BIG_GRP_POLLING_NO_AUTH, ".").concat(G2.AV_POLLING) }), body: { USP: 1, startSeq: 1, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { req: { USP: "USP" }, res: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } })), this._map.set(G2.GET_ONLINE_MBR_NUM, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_ONLINE_MBR_NUM) }), body: { groupID: void 0 }, keyMap: { res: { OnlineMemberNum: "memberCount" } } }), this._map.set(G2.SET_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.SET_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key", value: "value" } } }), this._map.set(G2.MODIFY_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.MODIFY_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key", value: "value" } } }), this._map.set(G2.DEL_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.DEL_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key" } } }), this._map.set(G2.CLEAR_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.CLEAR_GRP_ATTR) }), body: { groupID: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] } }), this._map.set(G2.GET_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_ATTR, ".").concat(G2.GET_GRP_ATTR) }), body: { groupID: void 0, avChatRoomKey: void 0, groupType: 1 }, keyMap: { req: { avChatRoomKey: "Key", groupType: "GroupType" } } }), this._map.set(G2.GET_GRP_NOTIFY, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_NOTIFY) }), body: { notifyReqList: [] }, keyMap: { req: { notifyReqList: "NotifyReqList" }, res: { NextMsgTime: "nextRevokedTime", NotifyMsgList: "notifyList", NotifyRspList: "notifyRspList" } } }), this._map.set(G2.UPDATE_GRP_COUNTER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.UPDATE_GRP_COUNTER) }), body: { groupID: void 0, counterList: void 0, avChatRoomKey: void 0, mode: void 0 }, keyMap: { req: { counterList: "GroupCounter" } } }), this._map.set(G2.GET_GRP_COUNTER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_COUNTER) }), body: { groupID: void 0, keyList: [], avChatRoomKey: void 0 }, keyMap: { req: { keyList: "GroupCounterKeys" } } }), this._map.set(G2.CREATE_TOPIC, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_COMMUNITY, ".").concat(G2.CREATE_TOPIC) }), body: { groupID: void 0, topicName: void 0, avatar: void 0, customData: void 0, topicID: void 0, notification: void 0, introduction: void 0 }, keyMap: { req: { avatar: "FaceUrl" } } }), this._map.set(G2.DEL_TOPIC, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_COMMUNITY, ".").concat(G2.DEL_TOPIC) }), body: { groupID: void 0, topicIDList: void 0 }, keyMap: { req: { topicIDList: "TopicIdList" }, res: { DestroyResultItem: "resultList" } } }), this._map.set(G2.UPDATE_TOPIC_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_COMMUNITY, ".").concat(G2.UPDATE_TOPIC_PROFILE) }), body: { groupID: void 0, topicID: void 0, avatar: void 0, customData: void 0, notification: void 0, introduction: void 0, muteAllMembers: void 0, topicName: void 0 }, keyMap: { req: { avatar: "FaceUrl", muteAllMembers: "ShutUpAllMember" } } }), this._map.set(G2.GET_TOPIC_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_COMMUNITY, ".").concat(G2.GET_TOPIC_LIST) }), body: { groupID: void 0, topicIDList: void 0, MemberInfoFilter: ["NoUnreadSeqList"] }, keyMap: { req: { topicIDList: "TopicIdList" }, res: { TopicAndSelfInfo: "topicInfoList", TopicInfo: "topic", GroupID: "groupID", ShutUpTime: "muteTime", ShutUpAllFlag: "muteAllMembers", LastMsgTime: "lastMessageTime", MsgSeq: "readedSequence", LastMsgSeq: "sequence" } } }), this._map.set(G2.GET_GRP_MBR_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_MBR_LIST) }), body: { groupID: void 0, limit: 0, offset: void 0, next: void 0, memberRoleFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { req: { memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", MemberList: "members", ShutUpUntil: "muteUntil" } } }), this._map.set(G2.GET_AV_MBR_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_AV, ".").concat(G2.GET_AV_MBR_LIST) }), body: { groupID: void 0, offset: void 0, filter: void 0 }, keyMap: { req: { offset: "Timestamp", filter: "Mark" }, res: { NextTimestamp: "offset" } } }), this._map.set(G2.GET_GRP_MBR_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.GET_GRP_MBR_PROFILE) }), body: { groupID: void 0, userIDList: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { req: { userIDList: "Member_List_Account", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { MemberList: "members", ShutUpUntil: "muteUntil", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", AppMemberDefinedData: "memberCustomField" } } }), this._map.set(G2.ADD_GRP_MBR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.ADD_GRP_MBR) }), body: { groupID: void 0, silence: void 0, userIDList: void 0 }, keyMap: { req: { userID: "Member_Account", userIDList: "MemberList" }, res: { MemberList: "members" } } }), this._map.set(G2.DEL_GRP_MBR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.DEL_GRP_MBR) }), body: { groupID: void 0, userIDList: void 0, reason: void 0 }, keyMap: { req: { userIDList: "MemberToDel_Account" } } }), this._map.set(G2.BAN_AV_MBR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.BAN_AV_MBR) }), body: { groupID: void 0, userIDList: void 0, duration: void 0, reason: "" }, keyMap: { req: { userIDList: "Members_Account", duration: "Duration", reason: "Description" } } }), this._map.set(G2.MODIFY_GRP_MBR_INFO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP, ".").concat(G2.MODIFY_GRP_MBR_INFO) }), body: { groupID: void 0, topicID: void 0, userID: void 0, messageRemindType: void 0, nameCard: void 0, role: void 0, memberCustomField: void 0, muteTime: void 0 }, keyMap: { req: { userID: "Member_Account", memberCustomField: "AppMemberDefinedData", muteTime: "ShutUpTime", messageRemindType: "MsgFlag" } } }), this._map.set(G2.MARK_AV_MBR_INFO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_AV, ".").concat(G2.MARK_AV_MBR_INFO) }), body: { groupID: void 0, operationType: 1, memberList: [] }, keyMap: { req: { operationType: "CommandType", memberList: "MemberList", markType: "Marks", userID: "Member_Account" }, res: { CommandType: "operationType", Marks: "markType", Member_Account: "userID" } } }), this._map.set(G2.CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.MSG_SEARCH, ".").concat(G2.CS) }), body: { keywordList: void 0, keywordListMatchType: "or", account: void 0, groupID: void 0, count: 100, cursor: void 0, messageTypeList: void 0, senderUserIDList: void 0, startTime: void 0, endTime: void 0 }, keyMap: { req: { keywordListMatchType: "MatchType", account: "PeerAccount", groupID: "GroupID", messageTypeList: "MsgTypeList", senderUserIDList: "SendUserIDList", keywords: "Keywords", keywordMatchType: "KeywordMatchType", count: "Count", miniBirthday: "UserBirthStart", maxBirthday: "UserBirthEnd", gender: "UserGenderType", groupTypeList: "GroupType", groupIDList: "GroupIdList" }, res: { GroupID: "groupID", UserID: "userID", ErrorCode: "code", ErrorInfo: "message", TotalCount: "totalCount", Count: "messageCount", LastMsgTime: "lastMessageTime", ConversationMsgs: "searchResult", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer", MsgSeq: "sequence", ReqMsgSeq: "sequence", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgContent: "content", ClientSeq: "clientSequence", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList", Users: "userList", ProfileItems: "profileItems", StrValue: "value", IntValue: "value", Groups: "groupList", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupOwnerUserID: "ownerID", GroupOwnerUserName: "ownerNick", GroupOwnerTinyID: "ownerTinyID", GroupMemberNum: "memberNum", GroupName: "name", GroupType: "type", GroupMembers: "groupMemberList", GroupMemberUserID: "userID", GroupMemberTinyID: "userTinyID", GroupMemberUserName: "nick", GroupMemberNameCard: "nameCard" } } }), this._map.set(G2.USER_CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.USER_SEARCH, ".").concat(G2.CS) }), body: { keywords: void 0, keywordMatchType: 0, miniBirthday: void 0, maxBirthday: void 0, gender: void 0, count: 20, cursor: void 0 } }), this._map.set(G2.GRP_CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_SEARCH, ".").concat(G2.CS) }), body: { keywords: void 0, keywordMatchType: 0, groupType: void 0, count: 20, cursor: void 0 } }), this._map.set(G2.MBR_CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.GRP_MEMBER_SEARCH, ".").concat(G2.CS) }), body: { keywords: void 0, keywordMatchType: 0, groupType: void 0, groupIDList: void 0, count: 20, cursor: void 0 } }), this._map.set(G2.SSO_STAT, { head: y2(y2({}, n3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STAT, ".").concat(G2.SSO_STAT) }), body: { header: {}, event: [], quality: [] }, keyMap: { req: { SDKType: "sdk_type", SDKVersion: "sdk_version", deviceType: "device_type", platform: "platform", instanceID: "instance_id", traceID: "trace_id", SDKAppID: "sdk_app_id", userID: "user_id", tinyID: "tiny_id", extension: "extension", timestamp: "timestamp", networkType: "network_type", eventType: "event_type", code: "error_code", message: "error_message", moreMessage: "more_message", duplicate: "duplicate", costTime: "cost_time", level: "level", qualityType: "quality_type", reportIndex: "report_index", wholePeriod: "whole_period", totalCount: "total_count", rttCount: "success_count_business", successRateOfRequest: "percent_business", countLessThan1Second: "success_count_business", percentOfCountLessThan1Second: "percent_business", countLessThan3Second: "success_count_platform", percentOfCountLessThan3Second: "percent_platform", successCountOfBusiness: "success_count_business", successRateOfBusiness: "percent_business", successCountOfPlatform: "success_count_platform", successRateOfPlatform: "percent_platform", successCountOfMessageReceived: "success_count_business", successRateOfMessageReceived: "percent_business", avgRTT: "average_value", avgDelay: "average_value", avgValue: "average_value", uiPlatform: "ui_platform" } } }), this._map.set(G2.PING, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.HEARTBEAT, ".").concat(G2.PING) }), body: {} }), this._map.set(G2.MSG_PUSH, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_PUSH, ".").concat(G2.MSG_PUSH) }), body: {}, keyMap: { res: { C2cMsgArray: "C2CMessageArray", GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", C2cNotifyMsgArray: "C2CNotifyMessageArray", C2cMsgInfo: "C2CReadReceiptArray", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyAdd_Account: "userID", ProfileImNick: "nick", PendencyType: "applicationType", C2CReadAllMsg: "readAllC2CMessage", IsNeedReadReceipt: "needReadReceipt", Status: "statusType" } } }), this._map.set(G2.MULTI_MSG_PUSH, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_PUSH, ".").concat(G2.MULTI_MSG_PUSH) }), body: {}, keyMap: { res: { GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyType: "applicationType" } } }), this._map.set(G2.MSG_PUSH_ACK, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OPEN_IM, ".").concat(G2.MSG_PUSH_ACK) }), body: { sessionData: void 0 }, keyMap: { req: { sessionData: "SessionData" } } }), this._map.set(G2.STATUS_FORCE_OFFLINE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.STATUS_FORCE_OFFLINE) }), body: {}, keyMap: { res: { C2cNotifyMsgArray: "C2CNotifyMessageArray", NoticeSeq: "noticeSequence", KickoutMsgNotify: "kickoutMsgNotify", NewInstInfo: "newInstanceInfo" } } }), this._map.set(G2.DOWNLOAD_MERGER_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_LONG_MSG, ".").concat(G2.DOWNLOAD_MERGER_MSG) }), body: { downloadKey: "" }, keyMap: { res: { Data: "data", Desc: "description", Ext: "extension", Download_Flag: "downloadFlag", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID" } } }), this._map.set(G2.UPLOAD_MERGER_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_LONG_MSG, ".").concat(G2.UPLOAD_MERGER_MSG) }), body: { messageList: [] }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", type: "MsgType", content: "MsgContent", data: "Data", description: "Desc", extension: "Ext", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody" } } }), this._map.set(G2.FOLLOW, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FOLLOW, ".").concat(G2.FOLLOW) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "FollowItem" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(G2.UNFOLLOW, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FOLLOW, ".").concat(G2.UNFOLLOW) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(G2.GET_FOLLOW_INFO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FOLLOW, ".").concat(G2.GET_FOLLOW_INFO) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { FollowInfo: "followInfoList", To_Account: "userID", FollowerCount: "followersCount", FollowingCount: "followingCount", MutualFollowingCount: "mutualFollowersCount" } } }), this._map.set(G2.GET_FOLLOW, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FOLLOW, ".").concat(G2.GET_FOLLOW) }), body: { fromAccount: "", type: 1, nextCursor: "", count: 500 }, keyMap: { req: { type: "FollowType", nextCursor: "StartCursor", count: "WantNum" }, res: { FollowItem: "resultList", To_Account: "userID", ProfileItem: "profileList" } } }), this._map.set(G2.CHECK_FOLLOW_TYPE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.FOLLOW, ".").concat(G2.CHECK_FOLLOW_TYPE) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(G2.SET_TOKEN, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.SET_TOKEN) }), body: { tokenID: "", pushMsg: 0, sdkAppID: 0, businessID: "", deviceBrand: "", deviceToken: "", isTpns: 0, isWebUniapp: 0, notificationStatus: 0, deviceModel: "", systemVersion: "", pushVersion: "" }, keyMap: { req: { tokenID: "TokenID", pushMsg: "PushMsg", sdkAppID: "EnterVersion", businessID: "BusiID", deviceBrand: "InstType", deviceToken: "VarToken", isTpns: "IsTpns", notificationStatus: "NotificationStatus", deviceModel: "DeviceModel", systemVersion: "SystemVersion", pushVersion: "PushPluginVersion" } } }), this._map.set(G2.STAT_FOREGROUND, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.STAT_FOREGROUND) }), body: { isWebUniapp: 0 } }), this._map.set(G2.STAT_BACKGROUND, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_OPEN_STATUS, ".").concat(G2.STAT_BACKGROUND) }), body: { C2CUnread: 0, GroupUnread: 0, isWebUniapp: 0 }, keyMap: { req: { c2cUnreadCount: "C2cUnread", groupUnreadCount: "GrpUnread" } } }), this._map.set(G2.PUSH_REPORT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.OFFLINE_PUSH_REPORT, ".").concat(G2.PUSH_REPORT) }), body: { eventList: [] }, keyMap: { req: { eventList: "UinappPushEvents", type: "EventType", time: "EventTime", pushId: "ClickExt" } } }), this._map.set(G2.SET_ALL_RECEIVE_MSG_OPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_MSG_LOGIC, ".").concat(G2.SET_ALL_RECEIVE_MSG_OPT) }), body: { startTime: 0, endTime: 0, isRepeated: 0, messageRemindType: 0 }, keyMap: { req: { messageRemindType: "Level" } } }), this._map.set(G2.GET_ALL_RECEIVE_MSG_OPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(s3.NAME.IM_MSG_LOGIC, ".").concat(G2.GET_ALL_RECEIVE_MSG_OPT) }), body: { toAccount: void 0 } });
+ this._map.set(G2.LOGIN, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.LOGIN) }), body: { state: "Online", isWebUniapp: 0, deviceBrand: 0, customInfo: "" }, keyMap: { req: { deviceBrand: "InstType" }, res: { InstId: "instanceID", HelloInterval: "helloInterval", RichMsgAuthKey: "authKey" } } }), this._map.set(G2.LOGOUT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.LOGOUT) }), body: { type: 0, isWebUniapp: 0 }, keyMap: { req: { type: "wslogout_type" } } }), this._map.set(G2.HELLO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.HELLO) }), body: { isWebUniapp: 0 }, keyMap: { res: { NewInstInfo: "newInstanceInfo" } } }), this._map.set(G2.KICK_OTHER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.STAT_SERVICE, ".").concat(G2.KICK_OTHER) }), body: {} }), this._map.set(G2.COS_SIGN, { head: y2(y2({}, t3), {}, { servcmd: "".concat(a2.NAME.IM_COS_SIGN, ".").concat(G2.COS_SIGN) }), body: { cmd: "open_im_cos_svc", subCmd: "get_cos_token", duration: 300, version: 2 }, keyMap: { req: { userSig: "usersig", subCmd: "sub_cmd", cmd: "cmd", duration: "duration", version: "version" }, res: { expired_time: "expiredTime", bucket_name: "bucketName", session_token: "sessionToken", tmp_secret_id: "secretId", tmp_secret_key: "secretKey" } } }), this._map.set(G2.COS_PRE_SIG, { head: y2(y2({}, t3), {}, { servcmd: "".concat(a2.NAME.CUSTOM_UPLOAD, ".").concat(G2.COS_PRE_SIG) }), body: { fileType: void 0, fileName: void 0, uploadMethod: 0, duration: 900 }, keyMap: { req: { userSig: "usersig", fileType: "file_type", fileName: "file_name", uploadMethod: "upload_method" }, res: { expired_time: "expiredTime", request_id: "requestId", head_url: "headUrl", upload_url: "uploadUrl", download_url: "downloadUrl", ci_url: "ciUrl", snapshot_url: "requestSnapshotUrl" } } }), this._map.set(G2.SIMPLE_COS_PRE_SIG, { head: y2(y2({}, t3), {}, { servcmd: "".concat(a2.NAME.CUSTOM_UPLOAD, ".").concat(G2.SIMPLE_COS_PRE_SIG) }), body: { uploadMethod: 0, platform: 2, SDKAppID: 0, userID: "", conversationType: 1, uploadConfig: [{ fileID: 1, fileType: 1, fileName: "" }] }, keyMap: { req: { platform: "uint32_platform", SDKAppID: "uint32_sdkappid", userID: "str_user_id", uploadMethod: "uint32_upload_method", conversationType: "uint32_scene", uploadConfig: "rpt_upload_object", fileID: "uint32_file_id", fileType: "uint32_file_type", fileName: "str_file_name" }, res: { str_final_ip: "uploadIP", rpt_pre_sig: "preSig", uint32_file_id: "fileID", uint32_exist_flag: "existFlag", str_download_url: "downloadUrl", str_upload_url: "uploadUrl", str_snapshot_url: "requestSnapshotUrl", str_file_key: "fileKey" } } }), this._map.set(G2.GET_IMAGE_INFO, { head: y2(y2({}, t3), {}, { servcmd: "".concat(a2.NAME.CUSTOM_UPLOAD, ".").concat(G2.GET_IMAGE_INFO) }), body: { imageUrl: "" }, keyMap: { req: { imageUrl: "str_image_url" }, res: { rpt_msg_image_info: "imageInfoArray", uint32_image_type: "type", str_url: "url", uint32_width: "width", uint32_height: "height", str_image_format: "imageFormat" } } }), this._map.set(G2.GET_IP, { head: y2(y2({}, t3), {}, { servcmd: "".concat(a2.NAME.CUSTOM_UPLOAD, ".").concat(G2.GET_IP) }), body: { domainName: "" }, keyMap: { req: { domainName: "str_domain" }, res: { str_final_ip: "ip" } } }), this._map.set(G2.VIDEO_COVER, { head: y2(y2({}, t3), {}, { servcmd: "".concat(a2.NAME.CUSTOM_UPLOAD, ".").concat(G2.VIDEO_COVER) }), body: { version: 1, platform: void 0, coverName: void 0, requestSnapshotUrl: void 0 }, keyMap: { req: { version: "version", platform: "platform", coverName: "cover_name", requestSnapshotUrl: "snapshot_url" }, res: { error_code: "errorCode", error_msg: "errorInfo", download_url: "snapshotUrl" } } }), this._map.set(G2.FETCH_COMMERCIAL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_CONFIG_MANAGER, ".").concat(G2.FETCH_COMMERCIAL_CONFIG) }), body: { SDKAppID: 0 }, keyMap: { req: { SDKAppID: "uint32_sdkappid" }, res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }), this._map.set(G2.PUSHED_COMMERCIAL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_CONFIG_MANAGER, ".").concat(G2.PUSHED_COMMERCIAL_CONFIG) }), body: {}, keyMap: { res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }), this._map.set(G2.FETCH_CLOUD_CTRL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_CONFIG_MANAGER, ".").concat(G2.FETCH_CLOUD_CTRL_CONFIG) }), body: { SDKAppID: 0, version: 0 }, keyMap: { req: { SDKAppID: "uint32_sdkappid", version: "uint64_version" }, res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }), this._map.set(G2.PUSHED_CLOUD_CTRL_CONFIG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_CONFIG_MANAGER, ".").concat(G2.PUSHED_CLOUD_CTRL_CONFIG) }), body: {}, keyMap: { res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }), this._map.set(G2.OVERLOAD_NOTIFY, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OVERLOAD_PUSH, ".").concat(G2.OVERLOAD_NOTIFY) }), body: {}, keyMap: { res: { OverLoadServCmd: "overloadCommand", DelaySecs: "waitingTime" } } }), this._map.set(G2.SYNC_UNREAD_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SYNC_UNREAD_MSG) }), body: { cookie: "", syncFlag: 0, needAbstract: 1, isOnlineSync: 0, needSignaling: 1, needCachedMsg: 1 }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", from: "From_Account", to: "To_Account", time: "MsgTimeStamp", sequence: "MsgSeq", random: "MsgRandom", elements: "MsgBody" }, res: { MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", ClientSeq: "clientSequence", MsgSeq: "sequence", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgRandom: "random", MsgTimeStamp: "time", MsgContent: "content", ToGroupId: "to", MsgKey: "messageKey", GroupTips: "groupTips", MsgBody: "elements", MsgType: "type", C2CRemainingUnreadCount: "C2CRemainingUnreadList", C2CPairUnreadCount: "C2CPairUnreadList" } } }), this._map.set(G2.GET_PROFANITY_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_MSG_AUDIT_MGR, ".").concat(G2.GET_PROFANITY_LIST) }), body: { version: 0, deviceID: "", startIndex: void 0 }, keyMap: { req: { version: "uint64_version", deviceID: "str_device_id", startIndex: "uint64_start_index" }, res: { msg_cmd_error_code: "errorInfo", str_err_msg: "errorMessage", uint32_code: "errorCode", msg_scene_ctl_config: "filterConfig", uint64_c2c_custom_msg_flag: "c2c_custom_message", uint64_c2c_text_msg_flag: "c2c_text_message", uint64_group_custom_msg_flag: "group_custom_message", uint64_group_text_msg_flag: "group_text_message", uint64_group_info_flag: "group_profile", uint64_group_member_info_flag: "group_member_profile", uint64_relation_chain_flag: "sns", uint64_user_info_flag: "user_profile", rpt_msg_dirty_word: "lexicon", str_dirty_word: "profanity", str_replaced_content: "replacement", uint64_filter_type: "filterType", uint64_id: "id", uint64_word_type: "profanityType", uint64_complete_flag: "completeFlag", uint64_next_start_index: "nextStartIndex", uint64_version: "version", uint64_expired_time: "expiredTime" } } }), this._map.set(G2.SEND_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SEND_C2C_MSG) }), body: { fromAccount: "", toAccount: "", msgSeq: 0, msgRandom: 0, msgBody: [], cloudCustomData: void 0, nick: "", avatar: "", msgLifeTime: void 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { sound: "", badgeMode: 0, isVoipPush: void 0, image: "", interruptionLevel: "active", contentAvailable: 0 }, androidInfo: { sound: "", XiaoMiChannelID: "", OPPOChannelID: "", GoogleChannelID: "", VIVOClassification: 1, VIVOCategory: "", HuaWeiCategory: "", OPPOCategory: "", HuaWeiImage: "", HonorImage: "", GoogleImage: "", HonorImportance: "", MeizuNotifyType: void 0 } }, messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, isSupportExtension: 0, isRelayMessage: 0, cmConfigID: void 0, forbidCallbackControl: void 0 }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", count: "MaxCnt", lastMessageTime: "LastMsgTime", messageKey: "MsgKey", peerAccount: "Peer_Account", data: "Data", description: "Desc", extension: "Ext", type: "MsgType", content: "MsgContent", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", nick: "From_AccountNick", avatar: "From_AccountHeadurl", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "IsNeedReadReceipt", GoogleChannelID: "GoogleChannelID", XiaoMiChannelID: "XiaoMiChannelID", OPPOChannelID: "OPPOChannelID", OPPOCategory: "OPPOCategory", VIVOClassification: "VIVOClassification", VIVOCategory: "VIVOCategory", HonorImportance: "HonorImportance", MeizuNotifyType: "MeiZuNoticeMsgType" } } }), this._map.set(G2.SEND_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.SEND_GRP_MSG) }), body: { fromAccount: "", groupID: "", random: 0, clientSequence: 0, priority: "", msgBody: [], cloudCustomData: void 0, onlineOnlyFlag: 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { sound: "", badgeMode: 0, isVoipPush: void 0, image: "", interruptionLevel: "active", contentAvailable: 0 }, androidInfo: { sound: "", XiaoMiChannelID: "", OPPOChannelID: "", GoogleChannelID: "", VIVOClassification: 1, VIVOCategory: "", HuaWeiCategory: "", OPPOCategory: "", HuaWeiImage: "", HonorImage: "", GoogleImage: "", HonorImportance: "", MeizuNotifyType: void 0 } }, groupAtInfo: [], messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, topicID: void 0, receiverList: void 0, isSupportExtension: 0, isRelayMessage: 0, cmConfigID: void 0, forbidCallbackControl: void 0 }, keyMap: { req: { to: "GroupId", extension: "Ext", data: "Data", description: "Desc", random: "Random", sequence: "ReqMsgSeq", count: "ReqMsgNumber", type: "MsgType", priority: "MsgPriority", content: "MsgContent", elements: "MsgBody", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", clientSequence: "ClientSeq", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "NeedReadReceipt", receiverList: "To_Account", GoogleChannelID: "GoogleChannelID", XiaoMiChannelID: "XiaoMiChannelID", OPPOChannelID: "OPPOChannelID", OPPOCategory: "OPPOCategory", VIVOClassification: "VIVOClassification", VIVOCategory: "VIVOCategory", HonorImportance: "HonorImportance", MeizuNotifyType: "MeiZuNoticeMsgType" }, res: { MsgTime: "time", MsgSeq: "sequence" } } }), this._map.set(G2.REVOKE_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.REVOKE_C2C_MSG) }), body: { msgInfo: { fromAccount: "", toAccount: "", msgTimeStamp: 0, msgSeq: 0, msgRandom: 0 } }, keyMap: { req: { msgInfo: "MsgInfo", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom" } } }), this._map.set(G2.REVOKE_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.REVOKE_GRP_MSG) }), body: { groupID: "", msgSeqList: void 0, topicID: "" }, keyMap: { req: { msgSeqList: "MsgSeqList", msgSeq: "MsgSeq" } } }), this._map.set(G2.GET_C2C_ROAMING_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.GET_C2C_ROAMING_MSG) }), body: { peerAccount: "", count: 15, lastMessageTime: 0, messageKey: "", withRecalledMessage: 1, direction: 0 }, keyMap: { req: { messageKey: "MsgKey", peerAccount: "Peer_Account", count: "MaxCnt", lastMessageTime: "LastMsgTime", withRecalledMessage: "WithRecalledMsg", direction: "GetDirection" }, res: { LastMsgTime: "lastMessageTime", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer" } } }), this._map.set(G2.MODIFY_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.MODIFY_C2C_MSG) }), body: { from: "", to: "", sequence: 0, random: 0, time: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { req: { sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }), this._map.set(G2.GET_GRP_ROAMING_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_ROAMING_MSG) }), body: { withRecalledMsg: 1, groupID: "", count: 15, sequence: "", topicID: void 0 }, keyMap: { req: { sequence: "ReqMsgSeq", count: "ReqMsgNumber", withRecalledMessage: "WithRecalledMsg" }, res: { Random: "random", MsgTime: "time", MsgSeq: "sequence", ReqMsgSeq: "sequence", RspMsgList: "messageList", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgPriority: "priority", MsgBody: "elements", MsgType: "type", MsgContent: "content", IsFinished: "complete", Download_Flag: "downloadFlag", ClientSeq: "clientSequence", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList", NextReqMsgSeq: "nextSequence" } } }), this._map.set(G2.SET_C2C_MSG_READ, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SET_C2C_MSG_READ) }), body: { C2CMsgReaded: void 0 }, keyMap: { req: { lastMessageTime: "LastedMsgTime" } } }), this._map.set(G2.SET_C2C_PEER_MUTE_NOTIFICATIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { userIDList: void 0, muteFlag: 0 }, keyMap: { req: { userIDList: "Peer_Account", muteFlag: "Mute_Notifications" } } }), this._map.set(G2.GET_C2C_PEER_MUTE_NOTIFICATIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.GET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { toAccount: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Peer_Account" }, res: { MuteNotificationsList: "muteFlagList" } } }), this._map.set(G2.SET_GRP_MSG_READ, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.SET_GRP_MSG_READ) }), body: { groupID: void 0, messageReadSeq: void 0, topicID: void 0 }, keyMap: { req: { messageReadSeq: "MsgReadedSeq" } } }), this._map.set(G2.SET_ALL_MSG_READ, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SET_ALL_MSG_READ) }), body: { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, keyMap: { req: { readAllC2CMessage: "C2CReadAllMsg", groupMessageReadInfoList: "GroupReadInfo", messageSequence: "MsgSeq" }, res: { C2CReadAllMsg: "readAllC2CMessage", GroupReadInfoArray: "groupMessageReadInfoList" } } }), this._map.set(G2.DEL_C2C_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.DEL_C2C_MSG) }), body: { fromAccount: "", to: "", keyList: void 0 }, keyMap: { req: { keyList: "MsgKeyList" } } }), this._map.set(G2.DEL_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.DEL_GRP_MSG) }), body: { groupID: "", deleter: "", keyList: void 0, topicID: void 0 }, keyMap: { req: { deleter: "Deleter_Account", keyList: "Seqs" } } }), this._map.set(G2.TRANSLATE_TEXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_TRANSLATE, ".").concat(G2.TRANSLATE_TEXT) }), body: { sourceTextList: void 0, SDKAppID: 0, from: 0, source: "", target: "" }, keyMap: { req: { sourceTextList: "SourceText", SDKAppID: "SdkAppId", from: "FromAccount" }, res: { TargetText: "translatedTextList", RequestId: "requestID", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(G2.VOICE_TO_TEXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_SPEECH, ".").concat(G2.VOICE_TO_TEXT) }), body: { url: "", SDKAppID: 0, format: "", sourceType: 0, language: "" }, keyMap: { req: { url: "BytesUrl", SDKAppID: "Uint32Sdkappid", format: "BytesVoiceFormat", sourceType: "Uint64SourceType", language: "BytesEngServiceType" }, res: { BytesRequestid: "requestID", BytesResult: "result", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(G2.MODIFY_GRP_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.MODIFY_GRP_MSG) }), body: { groupID: "", topicID: void 0, sequence: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { req: { sequence: "MsgSeq", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }), this._map.set(G2.GET_READ_RECEIPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { req: { sequence: "MsgSeq" } } }), this._map.set(G2.SEND_C2C_READ_RECEIPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.SEND_C2C_READ_RECEIPT) }), body: { peerAccount: "", messageInfoList: void 0 }, keyMap: { req: { peerAccount: "Peer_Account", messageInfoList: "C2CMsgInfo", fromAccount: "From_Account", toAccount: "To_Account", sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", clientTime: "MsgClientTime" } } }), this._map.set(G2.SEND_READ_RECEIPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.SEND_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { req: { sequenceList: "MsgSeqList", sequence: "MsgSeq" } } }), this._map.set(G2.GET_READ_RECEIPT_DETAIL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_READ_RECEIPT_DETAIL) }), body: { groupID: "", sequence: void 0, flag: 0, cursor: 0, count: 0 }, keyMap: { req: { sequence: "MsgSeq", count: "Num" }, res: { ReadList: "readUserIDList", Read_Account: "userID", UnreadList: "unreadUserIDList", Unread_Account: "userID", IsFinish: "isCompleted" } } }), this._map.set(G2.GET_GRP_RECEIPTS_BY_USERS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_RECEIPTS_BY_USERS) }), body: { groupID: "", dataList: void 0 }, keyMap: { req: { dataList: "MemberReadMsgList", sequence: "MsgSeq", userIDList: "MemberList_Account" }, res: { MsgReadList: "dataList", Read_Account: "userID", Read_Time: "readTime" } } }), this._map.set(G2.MODIFY_C2C_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.MODIFY_C2C_MSG_EXT) }), body: { from: void 0, to: void 0, messageKey: void 0, operateType: void 0, extensionList: void 0 } }), this._map.set(G2.GET_C2C_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_C2C_MSG_EXT) }), body: { from: void 0, to: void 0, messageKey: void 0, startSequence: void 0 } }), this._map.set(G2.MODIFY_GRP_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.MODIFY_GRP_MSG_EXT) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, operateType: void 0, extensionList: void 0 } }), this._map.set(G2.GET_GRP_MSG_EXT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_GRP_MSG_EXT) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, startSequence: void 0 } }), this._map.set(G2.ADD_C2C_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.ADD_C2C_MSG_REACTION) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Add_Account" } } }), this._map.set(G2.RM_C2C_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.RM_C2C_MSG_REACTION) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Del_Account" } } }), this._map.set(G2.GET_C2C_MSG_REACTIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_C2C_MSG_REACTIONS) }), body: { from: void 0, to: void 0, messageKeyList: void 0, count: void 0 } }), this._map.set(G2.GET_C2C_MSG_REACTION_USER_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_C2C_MSG_REACTION_USER_LIST) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, count: void 0 } }), this._map.set(G2.ADD_GRP_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.ADD_GRP_MSG_REACTION) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Add_Account" } } }), this._map.set(G2.RM_GRP_MSG_REACTION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.RM_GRP_MSG_REACTION) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Del_Account" } } }), this._map.set(G2.GET_GRP_MSG_REACTIONS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_GRP_MSG_REACTIONS) }), body: { groupID: void 0, topicID: void 0, messageSequenceList: void 0, count: void 0 }, keyMap: { res: { MsgSeq: "messageSequence" } } }), this._map.set(G2.GET_GRP_MSG_REACTION_USER_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM_MSG_EXT, ".").concat(G2.GET_GRP_MSG_REACTION_USER_LIST) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, nextSeq: void 0, count: void 0 } }), this._map.set(G2.GET_C2C_PEER_READ_TIME, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.GET_C2C_PEER_READ_TIME) }), body: { userIDList: void 0 }, keyMap: { req: { userIDList: "To_Account" }, res: { ReadTime: "peerReadTimeList" } } }), this._map.set(G2.PAGING_GET_CONV_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.PAGING_GET_CONV_LIST) }), body: { fromAccount: void 0, timeStamp: void 0, startIndex: void 0, pinnedTimeStamp: void 0, pinnedStartIndex: void 0, orderType: void 0, messageAssistFlag: 15, assistFlag: 31 }, keyMap: { req: { messageAssistFlag: "MsgAssistFlags", assistFlag: "AssistFlags", pinnedTimeStamp: "TopTimeStamp", pinnedStartIndex: "TopStartIndex" }, res: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime", LastMsgFlags: "lastMessageFlag", TopFlags: "isPinned", TopTimeStamp: "pinnedTimeStamp", TopStartIndex: "pinnedStartIndex", GroupId: "convGroupID", C2cRemark: "friendRemark", MsgRecvOption: "messageRemindType", GroupIgnoredUnreadSeqCount: "noUnreadCount", GroupNextMsgSeq: "nextMessageSeq" } } }), this._map.set(G2.DEL_CONV, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.DEL_CONV) }), body: { fromAccount: "", conversationList: void 0, clearHistoryMessage: void 0 }, keyMap: { req: { toGroupID: "ToGroupid", clearHistoryMessage: "ClearRamble", conversationList: "ContactItem" }, res: { ResultItem: "resultList", ToGroupid: "groupID", ResultCode: "code", ResultInfo: "info" } } }), this._map.set(G2.CLEAR_HISTORY_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.CLEAR_HISTORY_MSG) }), body: { fromAccount: "", toAccount: void 0, type: 1, toGroupID: void 0 }, keyMap: { req: { toGroupID: "ToGroupid" } } }), this._map.set(G2.PIN_CONV, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.PIN_CONV) }), body: { fromAccount: "", operationType: 1, itemList: void 0 }, keyMap: { req: { itemList: "RecentContactItem" } } }), this._map.set(G2.DEL_GROUP_AT_TIPS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.DEL_GROUP_AT_TIPS) }), body: { messageListToDelete: void 0 }, keyMap: { req: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }), this._map.set(G2.SET_CONV_CUSTOM_DATA, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.MARK_CONV) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, res: { ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(G2.MARK_CONV, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.MARK_CONV) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, res: { ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(G2.CREATE_CONV_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.CREATE_CONV_GRP) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "GroupContactItem", groupID: "ToGroupId" }, res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(G2.DEL_CONV_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.DEL_CONV_GRP) }), body: { fromAccount: "", groupName: void 0 }, keyMap: { res: { GroupId: "convGroupID" } } }), this._map.set(G2.RENAME_CONV_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { req: { oldName: "OldGroupName", newName: "NewGroupName", groupID: "ToGroupId", operationType: "ContactOptType", groupName: "OldGroupName", updateItem: "ContactUpdateItem" }, res: { ContactOptType: "operationType", ToGroupId: "groupID", GroupId: "convGroupID" } } }), this._map.set(G2.ADD_CONV_TO_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: { groupName: void 0, updateGroupType: void 0, updateItem: void 0 } } }), this._map.set(G2.DEL_CONV_FROM_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 } }), this._map.set(G2.GET_CONV_GRP_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.GET_CONV_GRP_LIST) }), body: { fromAccount: "", startIndex: void 0 }, keyMap: { res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList" } } }), this._map.set(G2.SEARCH_CONV_GRP_MARK, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.RECENT_CONTACT, ".").concat(G2.SEARCH_CONV_GRP_MARK) }), body: { fromAccount: "", contactItem: void 0 }, keyMap: { req: { groupID: "ToGroupId" }, res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList", ContactResultItem: "contactItem" } } }), this._map.set(G2.GET_USER_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.PROFILE, ".").concat(G2.GET_USER_PROFILE) }), body: { fromAccount: "", userItem: [] }, keyMap: { req: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }), this._map.set(G2.UPDATE_MY_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.PROFILE, ".").concat(G2.UPDATE_MY_PROFILE) }), body: { fromAccount: "", profileItem: [{ tag: f2.NICK, value: "" }, { tag: f2.GENDER, value: "" }, { tag: f2.ALLOWTYPE, value: "" }, { tag: f2.AVATAR, value: "" }] }, keyMap: { req: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }), this._map.set(G2.GET_BL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.GET_BL) }), body: { fromAccount: "", startIndex: 0, maxLimited: 30 } }), this._map.set(G2.ADD_TO_BL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.ADD_TO_BL) }), body: { fromAccount: "", toAccount: [] } }), this._map.set(G2.RM_FROM_BL, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.RM_FROM_BL) }), body: { fromAccount: "", toAccount: [] } }), this._map.set(G2.SET_SELF_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.SET_SELF_STATUS) }), body: { customStatus: "" } }), this._map.set(G2.GET_USER_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.GET_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { res: { UserStatusList: "successUserList", ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID", Status: "statusType" } } }), this._map.set(G2.SUB_USER_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.SUB_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { res: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }), this._map.set(G2.UNSUB_USER_STATUS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.UNSUB_USER_STATUS) }), body: { userIDList: void 0, unsubscribeAll: void 0 }, keyMap: { res: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }), this._map.set(G2.GET_FD_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.GET_FD_LIST) }), body: { fromAccount: "", startIndex: 0, standardSequence: 0, customSequence: 0 }, keyMap: { res: { FriendNum: "friendCount", UserDataItem: "resultList", ValueItem: "tagValueList" } } }), this._map.set(G2.ADD_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.ADD_FD) }), body: { fromAccount: "", addFriendItem: [], type: "" }, keyMap: { req: { source: "AddSource", wording: "AddWording", type: "AddType" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.UPDATE_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.UPDATE_FD) }), body: { fromAccount: "", updateItem: void 0 }, keyMap: { req: { snsItem: "SnsItem" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.DEL_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.DEL_FD) }), body: { fromAccount: "", userIDList: [], type: "" }, keyMap: { req: { type: "DeleteType" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.GET_FD_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.GET_FD_PROFILE) }), body: { fromAccount: "", userIDList: void 0 }, keyMap: { res: { InfoItem: "resultList", SnsProfileItem: "tagValueList" } } }), this._map.set(G2.CHECK_FD, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.CHECK_FD) }), body: { fromAccount: "", userIDList: [], type: "" }, keyMap: { req: { type: "CheckType" }, res: { InfoItem: "resultList" } } }), this._map.set(G2.GET_FD_APPLICATION_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.GET_FD_APPLICATION_LIST) }), body: { fromAccount: "", applicationType: "", startTime: 0, maxLimited: 0, lastSequence: 0 }, keyMap: { res: { PendencyItem: "resultList", AddSource: "source", AddTime: "time", AddWording: "wording", Image: "avatar", UnreadPendencyCount: "unreadCount", To_Account: "userID", PendencyType: "type" } } }), this._map.set(G2.RESPOND_FD_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.RESPOND_FD_APPLICATION) }), body: { fromAccount: "", responseFriendItem: [] }, keyMap: { req: { tag: "TagName", action: "ResponseAction" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.DEL_FD_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.DEL_FD_APPLICATION) }), body: { fromAccount: "", type: "", userIDList: void 0 }, keyMap: { req: { type: "PendencyType", userIDList: "To_Account" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.REPORT_FD_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.REPORT_FD_APPLICATION) }), body: { fromAccount: "", latestTimeStamp: "" }, keyMap: { req: { latestTimeStamp: "LatestPendencyTimeStamp" } } }), this._map.set(G2.CREATE_FD_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.CREATE_FD_GRP) }), body: { fromAccount: "", groupName: void 0, userIDList: void 0 }, keyMap: { req: { groupName: "GroupName", userIDList: "To_Account" }, res: { ResultItem: "resultList" } } }), this._map.set(G2.DEL_FD_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.DEL_FD_GRP) }), body: { fromAccount: "", nameList: void 0 }, keyMap: { req: { nameList: "GroupName" } } }), this._map.set(G2.GET_FD_GRP_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.GET_FD_GRP_LIST) }), body: { fromAccount: "", lastSequence: 0, needFriend: "Need_Friend_Type_Yes" }, keyMap: { res: { ResultItem: "resultList", GroupName: "name", FriendNumber: "friendCount", To_Account: "userIDList" } } }), this._map.set(G2.UPDATE_FD_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FD, ".").concat(G2.UPDATE_FD_GRP) }), body: { fromAccount: "", oldName: "", newName: void 0, updateGroupItem: void 0 }, keyMap: { req: { oldName: "GroupOldName", newName: "GroupNewName" }, res: { UpdateType: "type", ResultItem: "resultList" } } }), this._map.set(G2.GET_GRP_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_LIST) }), body: { memberAccount: "", limit: void 0, offset: void 0, groupType: void 0, responseFilter: { groupBaseInfoFilter: void 0, selfInfoFilter: void 0 }, isSupportTopic: 0, needAppDefineData: 1 }, keyMap: { req: { memberAccount: "Member_Account" }, res: { GroupIdList: "groups", MsgSeq: "readedSequence", LastRecallTime: "_lastRevokedTime", AppDefinedData: "groupCustomField" } } }), this._map.set(G2.GET_GRP_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_PROFILE) }), body: { groupIDList: void 0, responseFilter: { groupBaseInfoFilter: void 0, groupCustomFieldFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 } }, keyMap: { req: { groupIDList: "GroupIdList", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", groupCustomFieldFilter: "AppDefinedDataFilter_Group", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { GroupIdList: "groups", AppDefinedData: "groupCustomField", AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_Group: "groupCustomFieldFilter", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", InfoSeq: "infoSequence", MemberList: "members", GroupInfo: "groups", ShutUpUntil: "muteUntil", ShutUpAllMember: "muteAllMembers" } } }), this._map.set(G2.CREATE_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.CREATE_GRP) }), body: { type: void 0, name: void 0, groupID: void 0, ownerID: void 0, introduction: void 0, notification: void 0, maxMemberNum: void 0, joinOption: void 0, memberList: void 0, groupCustomField: void 0, memberCustomField: void 0, webPushFlag: 1, avatar: "", isSupportTopic: void 0, inviteOption: void 0 }, keyMap: { req: { ownerID: "Owner_Account", userID: "Member_Account", avatar: "FaceUrl", maxMemberNum: "MaxMemberCount", joinOption: "ApplyJoinOption", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", inviteOption: "InviteJoinOption" }, res: { HugeGroupFlag: "avChatRoomFlag", OverJoinedGroupLimit_Account: "overLimitUserIDList" } } }), this._map.set(G2.DISMISS_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.DISMISS_GRP) }), body: { groupID: void 0 } }), this._map.set(G2.UPDATE_GRP_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.UPDATE_GRP_PROFILE) }), body: { groupID: void 0, name: void 0, introduction: void 0, notification: void 0, avatar: void 0, joinOption: void 0, groupCustomField: void 0, muteAllMembers: void 0, inviteOption: void 0 }, keyMap: { req: { groupCustomField: "AppDefinedData", muteAllMembers: "ShutUpAllMember", joinOption: "ApplyJoinOption", avatar: "FaceUrl", inviteOption: "InviteJoinOption" }, res: { AppDefinedData: "groupCustomField", ShutUpAllMember: "muteAllMembers" } } }), this._map.set(G2.APPLY_JOIN_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.APPLY_JOIN_GRP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1, historyMessageFlag: void 0 }, keyMap: { req: { applyMessage: "ApplyMsg", historyMessageFlag: "HugeGroupHistoryMsgFlag" }, res: { HugeGroupFlag: "avChatRoomFlag", AVChatRoomKey: "avChatRoomKey", RspMsgList: "messageList", ToGroupId: "to" } } }), this._map.set(G2.APPLY_JOIN_GRP_NOAUTH, (e3.a2, e3.tinyid, { head: y2(y2({}, W2(e3, ya)), {}, { servcmd: "".concat(a2.NAME.BIG_GRP_NO_AUTH, ".").concat(G2.APPLY_JOIN_GRP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1 }, keyMap: { req: { applyMessage: "ApplyMsg" }, res: { HugeGroupFlag: "avChatRoomFlag" } } })), this._map.set(G2.QUIT_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.QUIT_GRP) }), body: { groupID: void 0 } }), this._map.set(G2.SEARCH_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.SEARCH_GRP) }), body: { groupIDList: void 0, responseFilter: { groupBasePublicInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "CreateTime", "Owner_Account", "LastInfoTime", "LastMsgTime", "NextMsgSeq", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "InviteJoinOption"] } } }), this._map.set(G2.CHANGE_GRP_OWNER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.CHANGE_GRP_OWNER) }), body: { groupID: void 0, newOwnerID: void 0 }, keyMap: { req: { newOwnerID: "NewOwner_Account" } } }), this._map.set(G2.HANDLE_GRP_APPLICATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.HANDLE_GRP_APPLICATION) }), body: { groupID: void 0, applicant: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { req: { applicant: "Applicant_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }), this._map.set(G2.HANDLE_INVITE_JOIN_GRP, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.HANDLE_INVITE_JOIN_GRP) }), body: { groupID: void 0, applicant: void 0, invitee: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, userDefinedField: void 0 }, keyMap: { req: { applicant: "Applicant_Account", invitee: "Invited_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg" } } }), this._map.set(G2.HANDLE_GRP_INVITATION, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.HANDLE_GRP_INVITATION) }), body: { groupID: void 0, inviter: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { req: { inviter: "Inviter_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }), this._map.set(G2.GET_GRP_PENDENCY, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_PENDENCY) }), body: { startTime: void 0, limit: void 0, handleAccount: void 0 }, keyMap: { req: { handleAccount: "Handle_Account" }, res: { To_Account: "userID", ApplyInviteMsg: "note" } } }), this._map.set(G2.DEL_GRP_SYSTEM_NOTICE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.DEL_GRP_SYSTEM_NOTICE) }), body: { messageListToDelete: void 0 }, keyMap: { req: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }), this._map.set(G2.AV_POLLING, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.BIG_GRP_POLLING, ".").concat(G2.AV_POLLING) }), body: { USP: 1, startSeq: 1, startBroadcastSeq: void 0, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { req: { USP: "USP" }, res: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } }), this._map.set(G2.AV_NOAUTH_POLLING, (e3.a2, e3.tinyid, { head: y2(y2({}, W2(e3, Ca)), {}, { servcmd: "".concat(a2.NAME.BIG_GRP_POLLING_NO_AUTH, ".").concat(G2.AV_POLLING) }), body: { USP: 1, startSeq: 1, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { req: { USP: "USP" }, res: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } })), this._map.set(G2.GET_ONLINE_MBR_NUM, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_ONLINE_MBR_NUM) }), body: { groupID: void 0 }, keyMap: { res: { OnlineMemberNum: "memberCount" } } }), this._map.set(G2.SET_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.SET_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key", value: "value" } } }), this._map.set(G2.MODIFY_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.MODIFY_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key", value: "value" } } }), this._map.set(G2.DEL_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.DEL_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key" } } }), this._map.set(G2.CLEAR_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.CLEAR_GRP_ATTR) }), body: { groupID: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] } }), this._map.set(G2.GET_GRP_ATTR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_ATTR, ".").concat(G2.GET_GRP_ATTR) }), body: { groupID: void 0, avChatRoomKey: void 0, groupType: 1 }, keyMap: { req: { avChatRoomKey: "Key", groupType: "GroupType" } } }), this._map.set(G2.GET_GRP_NOTIFY, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_NOTIFY) }), body: { notifyReqList: [] }, keyMap: { req: { notifyReqList: "NotifyReqList" }, res: { NextMsgTime: "nextRevokedTime", NotifyMsgList: "notifyList", NotifyRspList: "notifyRspList" } } }), this._map.set(G2.UPDATE_GRP_COUNTER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.UPDATE_GRP_COUNTER) }), body: { groupID: void 0, counterList: void 0, avChatRoomKey: void 0, mode: void 0 }, keyMap: { req: { counterList: "GroupCounter" } } }), this._map.set(G2.GET_GRP_COUNTER, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_COUNTER) }), body: { groupID: void 0, keyList: [], avChatRoomKey: void 0 }, keyMap: { req: { keyList: "GroupCounterKeys" } } }), this._map.set(G2.CREATE_TOPIC, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_COMMUNITY, ".").concat(G2.CREATE_TOPIC) }), body: { groupID: void 0, topicName: void 0, avatar: void 0, customData: void 0, topicID: void 0, notification: void 0, introduction: void 0 }, keyMap: { req: { avatar: "FaceUrl" } } }), this._map.set(G2.DEL_TOPIC, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_COMMUNITY, ".").concat(G2.DEL_TOPIC) }), body: { groupID: void 0, topicIDList: void 0 }, keyMap: { req: { topicIDList: "TopicIdList" }, res: { DestroyResultItem: "resultList" } } }), this._map.set(G2.UPDATE_TOPIC_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_COMMUNITY, ".").concat(G2.UPDATE_TOPIC_PROFILE) }), body: { groupID: void 0, topicID: void 0, avatar: void 0, customData: void 0, notification: void 0, introduction: void 0, muteAllMembers: void 0, topicName: void 0 }, keyMap: { req: { avatar: "FaceUrl", muteAllMembers: "ShutUpAllMember" } } }), this._map.set(G2.GET_TOPIC_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_COMMUNITY, ".").concat(G2.GET_TOPIC_LIST) }), body: { groupID: void 0, topicIDList: void 0, MemberInfoFilter: ["NoUnreadSeqList"] }, keyMap: { req: { topicIDList: "TopicIdList" }, res: { TopicAndSelfInfo: "topicInfoList", TopicInfo: "topic", GroupID: "groupID", ShutUpTime: "muteTime", ShutUpAllFlag: "muteAllMembers", LastMsgTime: "lastMessageTime", MsgSeq: "readedSequence", LastMsgSeq: "sequence" } } }), this._map.set(G2.GET_GRP_MBR_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_MBR_LIST) }), body: { groupID: void 0, limit: 0, offset: void 0, next: void 0, memberRoleFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { req: { memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", MemberList: "members", ShutUpUntil: "muteUntil" } } }), this._map.set(G2.GET_AV_MBR_LIST, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_AV, ".").concat(G2.GET_AV_MBR_LIST) }), body: { groupID: void 0, offset: void 0, filter: void 0 }, keyMap: { req: { offset: "Timestamp", filter: "Mark" }, res: { NextTimestamp: "offset" } } }), this._map.set(G2.GET_GRP_MBR_PROFILE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.GET_GRP_MBR_PROFILE) }), body: { groupID: void 0, userIDList: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { req: { userIDList: "Member_List_Account", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { MemberList: "members", ShutUpUntil: "muteUntil", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", AppMemberDefinedData: "memberCustomField" } } }), this._map.set(G2.ADD_GRP_MBR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.ADD_GRP_MBR) }), body: { groupID: void 0, silence: void 0, userIDList: void 0 }, keyMap: { req: { userID: "Member_Account", userIDList: "MemberList" }, res: { MemberList: "members" } } }), this._map.set(G2.DEL_GRP_MBR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.DEL_GRP_MBR) }), body: { groupID: void 0, userIDList: void 0, reason: void 0 }, keyMap: { req: { userIDList: "MemberToDel_Account" } } }), this._map.set(G2.BAN_AV_MBR, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.BAN_AV_MBR) }), body: { groupID: void 0, userIDList: void 0, duration: void 0, reason: "" }, keyMap: { req: { userIDList: "Members_Account", duration: "Duration", reason: "Description" } } }), this._map.set(G2.MODIFY_GRP_MBR_INFO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP, ".").concat(G2.MODIFY_GRP_MBR_INFO) }), body: { groupID: void 0, topicID: void 0, userID: void 0, messageRemindType: void 0, nameCard: void 0, role: void 0, memberCustomField: void 0, muteTime: void 0 }, keyMap: { req: { userID: "Member_Account", memberCustomField: "AppMemberDefinedData", muteTime: "ShutUpTime", messageRemindType: "MsgFlag" } } }), this._map.set(G2.MARK_AV_MBR_INFO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_AV, ".").concat(G2.MARK_AV_MBR_INFO) }), body: { groupID: void 0, operationType: 1, memberList: [] }, keyMap: { req: { operationType: "CommandType", memberList: "MemberList", markType: "Marks", userID: "Member_Account" }, res: { CommandType: "operationType", Marks: "markType", Member_Account: "userID" } } }), this._map.set(G2.CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.MSG_SEARCH, ".").concat(G2.CS) }), body: { keywordList: void 0, keywordListMatchType: "or", account: void 0, groupID: void 0, count: 100, cursor: void 0, messageTypeList: void 0, senderUserIDList: void 0, startTime: void 0, endTime: void 0 }, keyMap: { req: { keywordListMatchType: "MatchType", account: "PeerAccount", groupID: "GroupID", messageTypeList: "MsgTypeList", senderUserIDList: "SendUserIDList", keywords: "Keywords", keywordMatchType: "KeywordMatchType", count: "Count", miniBirthday: "UserBirthStart", maxBirthday: "UserBirthEnd", gender: "UserGenderType", groupTypeList: "GroupType", groupIDList: "GroupIdList" }, res: { GroupID: "groupID", UserID: "userID", ErrorCode: "code", ErrorInfo: "message", TotalCount: "totalCount", Count: "messageCount", LastMsgTime: "lastMessageTime", ConversationMsgs: "searchResult", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer", MsgSeq: "sequence", ReqMsgSeq: "sequence", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgContent: "content", ClientSeq: "clientSequence", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList", Users: "userList", ProfileItems: "profileItems", StrValue: "value", IntValue: "value", Groups: "groupList", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupOwnerUserID: "ownerID", GroupOwnerUserName: "ownerNick", GroupOwnerTinyID: "ownerTinyID", GroupMemberNum: "memberNum", GroupName: "name", GroupType: "type", GroupMembers: "groupMemberList", GroupMemberUserID: "userID", GroupMemberTinyID: "userTinyID", GroupMemberUserName: "nick", GroupMemberNameCard: "nameCard" } } }), this._map.set(G2.USER_CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.USER_SEARCH, ".").concat(G2.CS) }), body: { keywords: void 0, keywordMatchType: 0, miniBirthday: void 0, maxBirthday: void 0, gender: void 0, count: 20, cursor: void 0 } }), this._map.set(G2.GRP_CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_SEARCH, ".").concat(G2.CS) }), body: { keywords: void 0, keywordMatchType: 0, groupType: void 0, count: 20, cursor: void 0 } }), this._map.set(G2.MBR_CS, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.GRP_MEMBER_SEARCH, ".").concat(G2.CS) }), body: { keywords: void 0, keywordMatchType: 0, groupType: void 0, groupIDList: void 0, count: 20, cursor: void 0 } }), this._map.set(G2.SSO_STAT, { head: y2(y2({}, n3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STAT, ".").concat(G2.SSO_STAT) }), body: { header: {}, event: [], quality: [] }, keyMap: { req: { SDKType: "sdk_type", SDKVersion: "sdk_version", deviceType: "device_type", platform: "platform", instanceID: "instance_id", traceID: "trace_id", SDKAppID: "sdk_app_id", userID: "user_id", tinyID: "tiny_id", extension: "extension", timestamp: "timestamp", networkType: "network_type", eventType: "event_type", code: "error_code", message: "error_message", moreMessage: "more_message", duplicate: "duplicate", costTime: "cost_time", level: "level", qualityType: "quality_type", reportIndex: "report_index", wholePeriod: "whole_period", totalCount: "total_count", rttCount: "success_count_business", successRateOfRequest: "percent_business", countLessThan1Second: "success_count_business", percentOfCountLessThan1Second: "percent_business", countLessThan3Second: "success_count_platform", percentOfCountLessThan3Second: "percent_platform", successCountOfBusiness: "success_count_business", successRateOfBusiness: "percent_business", successCountOfPlatform: "success_count_platform", successRateOfPlatform: "percent_platform", successCountOfMessageReceived: "success_count_business", successRateOfMessageReceived: "percent_business", avgRTT: "average_value", avgDelay: "average_value", avgValue: "average_value", uiPlatform: "ui_platform" } } }), this._map.set(G2.PING, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.HEARTBEAT, ".").concat(G2.PING) }), body: {} }), this._map.set(G2.MSG_PUSH, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_PUSH, ".").concat(G2.MSG_PUSH) }), body: {}, keyMap: { res: { C2cMsgArray: "C2CMessageArray", GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", C2cNotifyMsgArray: "C2CNotifyMessageArray", C2cMsgInfo: "C2CReadReceiptArray", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyAdd_Account: "userID", ProfileImNick: "nick", PendencyType: "applicationType", C2CReadAllMsg: "readAllC2CMessage", IsNeedReadReceipt: "needReadReceipt", Status: "statusType" } } }), this._map.set(G2.MULTI_MSG_PUSH, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_PUSH, ".").concat(G2.MULTI_MSG_PUSH) }), body: {}, keyMap: { res: { GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyType: "applicationType" } } }), this._map.set(G2.MSG_PUSH_ACK, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OPEN_IM, ".").concat(G2.MSG_PUSH_ACK) }), body: { sessionData: void 0 }, keyMap: { req: { sessionData: "SessionData" } } }), this._map.set(G2.STATUS_FORCE_OFFLINE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.STATUS_FORCE_OFFLINE) }), body: {}, keyMap: { res: { C2cNotifyMsgArray: "C2CNotifyMessageArray", NoticeSeq: "noticeSequence", KickoutMsgNotify: "kickoutMsgNotify", NewInstInfo: "newInstanceInfo" } } }), this._map.set(G2.DOWNLOAD_MERGER_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_LONG_MSG, ".").concat(G2.DOWNLOAD_MERGER_MSG) }), body: { downloadKey: "" }, keyMap: { res: { Data: "data", Desc: "description", Ext: "extension", Download_Flag: "downloadFlag", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID" } } }), this._map.set(G2.UPLOAD_MERGER_MSG, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_LONG_MSG, ".").concat(G2.UPLOAD_MERGER_MSG) }), body: { messageList: [] }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", type: "MsgType", content: "MsgContent", data: "Data", description: "Desc", extension: "Ext", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody" } } }), this._map.set(G2.FOLLOW, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FOLLOW, ".").concat(G2.FOLLOW) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "FollowItem" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(G2.UNFOLLOW, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FOLLOW, ".").concat(G2.UNFOLLOW) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(G2.GET_FOLLOW_INFO, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FOLLOW, ".").concat(G2.GET_FOLLOW_INFO) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { FollowInfo: "followInfoList", To_Account: "userID", FollowerCount: "followersCount", FollowingCount: "followingCount", MutualFollowingCount: "mutualFollowersCount" } } }), this._map.set(G2.GET_FOLLOW, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FOLLOW, ".").concat(G2.GET_FOLLOW) }), body: { fromAccount: "", type: 1, nextCursor: "", count: 500 }, keyMap: { req: { type: "FollowType", nextCursor: "StartCursor", count: "WantNum" }, res: { FollowItem: "resultList", To_Account: "userID", ProfileItem: "profileList" } } }), this._map.set(G2.CHECK_FOLLOW_TYPE, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.FOLLOW, ".").concat(G2.CHECK_FOLLOW_TYPE) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(G2.SET_TOKEN, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.SET_TOKEN) }), body: { tokenID: "", pushMsg: 0, sdkAppID: 0, businessID: "", deviceBrand: "", deviceToken: "", isTpns: 0, isWebUniapp: 0, notificationStatus: 0, deviceModel: "", systemVersion: "", pushVersion: "" }, keyMap: { req: { tokenID: "TokenID", pushMsg: "PushMsg", sdkAppID: "EnterVersion", businessID: "BusiID", deviceBrand: "InstType", deviceToken: "VarToken", isTpns: "IsTpns", notificationStatus: "NotificationStatus", deviceModel: "DeviceModel", systemVersion: "SystemVersion", pushVersion: "PushPluginVersion" } } }), this._map.set(G2.STAT_FOREGROUND, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.STAT_FOREGROUND) }), body: { isWebUniapp: 0 } }), this._map.set(G2.STAT_BACKGROUND, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_OPEN_STATUS, ".").concat(G2.STAT_BACKGROUND) }), body: { C2CUnread: 0, GroupUnread: 0, isWebUniapp: 0 }, keyMap: { req: { c2cUnreadCount: "C2cUnread", groupUnreadCount: "GrpUnread" } } }), this._map.set(G2.PUSH_REPORT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.OFFLINE_PUSH_REPORT, ".").concat(G2.PUSH_REPORT) }), body: { eventList: [] }, keyMap: { req: { eventList: "UinappPushEvents", type: "EventType", time: "EventTime", pushId: "ClickExt" } } }), this._map.set(G2.SET_ALL_RECEIVE_MSG_OPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_MSG_LOGIC, ".").concat(G2.SET_ALL_RECEIVE_MSG_OPT) }), body: { startTime: 0, endTime: 0, isRepeated: 0, messageRemindType: 0 }, keyMap: { req: { messageRemindType: "Level" } } }), this._map.set(G2.GET_ALL_RECEIVE_MSG_OPT, { head: y2(y2({}, e3), {}, { servcmd: "".concat(a2.NAME.IM_MSG_LOGIC, ".").concat(G2.GET_ALL_RECEIVE_MSG_OPT) }), body: { toAccount: void 0 } });
} }, { key: "has", value: function(e3) {
return this._map.has(e3);
} }, { key: "get", value: function(e3) {
@@ -16101,38 +16108,38 @@ var chat = { exports: {} };
} }, { key: "getProtocolData", value: function(e3) {
var t3 = e3.P, n3 = e3.data, e3 = this.get(t3), t3 = null;
if (n3) {
- var o3, i4 = this._simpleDeepCopy(e3), i4 = this._updateService(n3, i4), s4 = i4.body, a3 = /* @__PURE__ */ Object.create(null);
- for (o3 in s4)
- if (Object.prototype.hasOwnProperty.call(s4, o3)) {
- if (a3[o3] = s4[o3], void 0 === n3[o3])
+ var o3, i4 = this._simpleDeepCopy(e3), i4 = this._updateService(n3, i4), a3 = i4.body, s4 = /* @__PURE__ */ Object.create(null);
+ for (o3 in a3)
+ if (Object.prototype.hasOwnProperty.call(a3, o3)) {
+ if (s4[o3] = a3[o3], void 0 === n3[o3])
continue;
- a3[o3] = n3[o3];
+ s4[o3] = n3[o3];
}
- i4.body = a3, t3 = this._getUplinkData(i4);
+ i4.body = s4, t3 = this._getUplinkData(i4);
} else
t3 = this._getUplinkData(e3);
return t3;
} }, { key: "_getUplinkData", value: function(e3) {
- var e3 = this._dataCleaner(e3), t3 = Ht2(e3.head), t3 = ts2(e3.body, this._getReqKeyMap(t3));
+ var e3 = this._dataCleaner(e3), t3 = Yt2(e3.head), t3 = ca(e3.body, this._getReqKeyMap(t3));
return e3.body = t3, e3;
} }, { key: "_updateService", value: function(e3, t3) {
- var n3, o3, i4 = Ht2(t3.head);
- return this._isFromGroupRequest(t3) && (n3 = e3.type, o3 = e3.groupID, e3 = void 0 === (e3 = e3.groupIDList) ? [] : e3, N3(o3 = void 0 === o3 ? void 0 : o3) && (o3 = e3[0] || ""), Ot2({ type: n3, groupID: o3 })) && (t3.head.servcmd = "".concat(s3.NAME.GRP_COMMUNITY, ".").concat(i4)), t3;
+ var n3, o3, i4 = Yt2(t3.head);
+ return this._isFromGroupRequest(t3) && (n3 = e3.type, o3 = e3.groupID, e3 = void 0 === (e3 = e3.groupIDList) ? [] : e3, N3(o3 = void 0 === o3 ? void 0 : o3) && (o3 = e3[0] || ""), Pt2({ type: n3, groupID: o3 })) && (t3.head.servcmd = "".concat(a2.NAME.GRP_COMMUNITY, ".").concat(i4)), t3;
} }, { key: "_isFromGroupRequest", value: function(e3) {
- return e3.head.servcmd.includes(s3.NAME.GRP) || e3.head.servcmd.includes(s3.NAME.GRP_ATTR);
+ return e3.head.servcmd.includes(a2.NAME.GRP) || e3.head.servcmd.includes(a2.NAME.GRP_ATTR);
} }, { key: "_getReqKeyMap", value: function(e3) {
e3 = this.getKeyMap(e3);
- return y2(y2({}, Yi.req), e3.req);
+ return y2(y2({}, $i.req), e3.req);
} }, { key: "_dataCleaner", value: function(e3) {
var t3, n3 = Array.isArray(e3) ? [] : /* @__PURE__ */ Object.create(null);
for (t3 in e3)
- Object.prototype.hasOwnProperty.call(e3, t3) && lt2(t3) && null !== e3[t3] && void 0 !== e3[t3] && ("object" !== z2(e3[t3]) ? n3[t3] = e3[t3] : n3[t3] = this._dataCleaner.bind(this)(e3[t3]));
+ Object.prototype.hasOwnProperty.call(e3, t3) && _t2(t3) && null !== e3[t3] && void 0 !== e3[t3] && ("object" !== z2(e3[t3]) ? n3[t3] = e3[t3] : n3[t3] = this._dataCleaner.bind(this)(e3[t3]));
return n3;
} }, { key: "_simpleDeepCopy", value: function(e3) {
- for (var t3, n3 = Object.keys(e3), o3 = {}, i4 = 0, s4 = n3.length; i4 < s4; i4++)
- t3 = n3[i4], O2(e3[t3]) ? o3[t3] = Array.from(e3[t3]) : at2(e3[t3]) ? o3[t3] = this._simpleDeepCopy(e3[t3]) : o3[t3] = e3[t3];
+ for (var t3, n3 = Object.keys(e3), o3 = {}, i4 = 0, a3 = n3.length; i4 < a3; i4++)
+ t3 = n3[i4], O2(e3[t3]) ? o3[t3] = Array.from(e3[t3]) : ut2(e3[t3]) ? o3[t3] = this._simpleDeepCopy(e3[t3]) : o3[t3] = e3[t3];
return o3;
- } }]), ms = [G2.MSG_PUSH_ACK], vs = e2(function e3(t3) {
+ } }]), Da = [G2.MSG_PUSH_ACK], Ea = e2(function e3(t3) {
p3(this, e3), this._sessionM = t3, this._n = "MsgDispatcher", this._eventHandlerMap = /* @__PURE__ */ new Map(), this._eventHandlerMap.set("C2CMessageArray", this._onC2CMsgArray.bind(this)), this._eventHandlerMap.set("groupMessageArray", this._onGroupMsgArray.bind(this)), this._eventHandlerMap.set("groupTips", this._onGroupTips.bind(this)), this._eventHandlerMap.set("C2CNotifyMessageArray", this._onC2CNotifyMsgArray.bind(this)), this._eventHandlerMap.set("C2CReadReceiptArray", this._onC2CReadReceiptArray.bind(this)), this._eventHandlerMap.set("profileModify", this._onProfileModified.bind(this)), this._eventHandlerMap.set("friendListMod", this._onRelationChainModified.bind(this)), this._eventHandlerMap.set("recentContactMod", this._onRecentContact.bind(this)), this._eventHandlerMap.set("readAllC2CMessage", this._onAllMsgRead.bind(this)), this._eventHandlerMap.set("c2cMessageModified", this._onC2CMsgModified.bind(this)), this._eventHandlerMap.set("groupMessageModified", this._onGroupMsgModified.bind(this)), this._eventHandlerMap.set("userStatusList", this._onUserStatusList.bind(this)), this._eventHandlerMap.set("messageExtensionNotify", this._onMsgExtNotify.bind(this)), this._eventHandlerMap.set("messageReactionNotifyList", this._onMsgReactionNotifyList.bind(this)), this._eventHandlerMap.set("messageReactionNotify", this._onMsgReactionNotify.bind(this)), this._eventHandlerMap.set("followChangeList", this._onFollowNotify.bind(this)), this._keys = d2(this._eventHandlerMap.keys());
}, [{ key: "_onC2CMsgArray", value: function(e3) {
var t3 = this._sessionM.get(6);
@@ -16151,7 +16158,7 @@ var chat = { exports: {} };
} }, { key: "_onGroupTips", value: function(e3) {
var t3 = this._sessionM.get(7);
if (t3) {
- var n3 = e3.event, o3 = e3.dataList, i4 = e3.isInstantMessage, s4 = void 0 === i4 || i4, a3 = e3.isSyncingEnded;
+ var n3 = e3.event, o3 = e3.dataList, i4 = e3.isInstantMessage, a3 = void 0 === i4 || i4, s4 = e3.isSyncingEnded;
switch (n3) {
case 4:
case 6:
@@ -16165,7 +16172,7 @@ var chat = { exports: {} };
t3.onMsgReadNotice({ dataList: o3 });
else {
if (!O2(o3[r4].elements.readReceiptList)) {
- t3.onNewGroupSystemNotice({ dataList: o3, isInstantMessage: s4, isSyncingEnded: a3 });
+ t3.onNewGroupSystemNotice({ dataList: o3, isInstantMessage: a3, isSyncingEnded: s4 });
break;
}
t3.onReadReceiptList({ dataList: o3 });
@@ -16179,10 +16186,10 @@ var chat = { exports: {} };
}
}
} }, { key: "_onC2CNotifyMsgArray", value: function(e3) {
- var o3, i4 = this, s4 = e3.dataList;
- O2(s4) && (o3 = this._sessionM.get(6), s4.forEach(function(e4) {
+ var o3, i4 = this, a3 = e3.dataList;
+ O2(a3) && (o3 = this._sessionM.get(6), a3.forEach(function(e4) {
var t3, n3;
- m2(e4) && (e4.hasOwnProperty("kickoutMsgNotify") ? (t3 = (n3 = e4.kickoutMsgNotify).kickType, n3 = void 0 === (n3 = n3.newInstanceInfo) ? {} : n3, 1 === t3 ? i4._sessionM.onMultipleAccountKickedOut(n3) : 2 === t3 ? i4._sessionM.onMultipleDeviceKickedOut(n3) : 3 === t3 && i4._sessionM.onRestApiKickedOut(n3)) : e4.hasOwnProperty("c2cMessageRevokedNotify") ? o3 && o3.onMsgRevoked({ dataList: s4 }, true) : e4.hasOwnProperty("c2cMessageReadReceipt") ? o3 && o3.onMsgReadReceipt({ dataList: s4 }) : e4.hasOwnProperty("c2cMessageReadNotice") ? o3 && o3.onMsgReadNotice({ dataList: s4 }) : e4.hasOwnProperty("muteNotificationsSync") && i4._sessionM.get(11).onC2CMsgRemindTypeSynced({ dataList: s4 }));
+ m2(e4) && (e4.hasOwnProperty("kickoutMsgNotify") ? (t3 = (n3 = e4.kickoutMsgNotify).kickType, n3 = void 0 === (n3 = n3.newInstanceInfo) ? {} : n3, 1 === t3 ? i4._sessionM.onMultipleAccountKickedOut(n3) : 2 === t3 ? i4._sessionM.onMultipleDeviceKickedOut(n3) : 3 === t3 && i4._sessionM.onRestApiKickedOut(n3)) : e4.hasOwnProperty("c2cMessageRevokedNotify") ? o3 && o3.onMsgRevoked({ dataList: a3 }, true) : e4.hasOwnProperty("c2cMessageReadReceipt") ? o3 && o3.onMsgReadReceipt({ dataList: a3 }) : e4.hasOwnProperty("c2cMessageReadNotice") ? o3 && o3.onMsgReadNotice({ dataList: a3 }) : e4.hasOwnProperty("muteNotificationsSync") && i4._sessionM.get(11).onC2CMsgRemindTypeSynced({ dataList: a3 }));
}));
} }, { key: "_onC2CReadReceiptArray", value: function(e3) {
this._sessionM.get(6).onReadReceiptList(e3);
@@ -16218,12 +16225,12 @@ var chat = { exports: {} };
} }, { key: "onMessage", value: function(e3) {
var t3 = this, n3 = e3.body;
if (this._filterMsgFromIMOpenPush(e3)) {
- var o3, i4 = n3.eventArray, s4 = n3.isInstantMessage, a3 = n3.isSyncingEnded, r4 = n3.needSync;
+ var o3, i4 = n3.eventArray, a3 = n3.isInstantMessage, s4 = n3.isSyncingEnded, r4 = n3.needSync;
if (O2(i4))
for (var c3, u3, l3, d3 = 0, p4 = i4.length; d3 < p4; d3++)
100 !== (l3 = (c3 = i4[d3]).event) ? 24 !== l3 ? 26 !== l3 ? (o3 = Object.keys(c3).find(function(e4) {
return -1 !== t3._keys.indexOf(e4);
- })) ? (u3 = 14 === l3 ? { readAllC2CMessage: c3[o3], groupMessageReadInfoList: c3.groupMessageReadNotice || [] } : 16 === l3 ? { userID: c3.userID, timestamp: c3.timestamp, readReceiptList: c3[o3] } : c3[o3], this._eventHandlerMap.get(o3)({ event: l3, dataList: u3, isInstantMessage: s4, isSyncingEnded: a3, needSync: r4 })) : M2.l("".concat(this._n, ".onMessage unknown eventItem:"), c3) : this._onTopicLatestMsg(c3) : this._onAllRcvMsgOptNotify(c3) : this._onRoomCustomData(c3.content);
+ })) ? (u3 = 14 === l3 ? { readAllC2CMessage: c3[o3], groupMessageReadInfoList: c3.groupMessageReadNotice || [] } : 16 === l3 ? { userID: c3.userID, timestamp: c3.timestamp, readReceiptList: c3[o3] } : c3[o3], this._eventHandlerMap.get(o3)({ event: l3, dataList: u3, isInstantMessage: a3, isSyncingEnded: s4, needSync: r4 })) : M2.l("".concat(this._n, ".onMessage unknown eventItem:"), c3) : this._onTopicLatestMsg(c3) : this._onAllRcvMsgOptNotify(c3) : this._onRoomCustomData(c3.content);
}
} }, { key: "_onRoomCustomData", value: function(e3) {
this._sessionM.get(30).onRoomCustomDataReceived(e3), M2.l("".concat(this._n, "._onRoomCustomData data:").concat(e3));
@@ -16231,29 +16238,29 @@ var chat = { exports: {} };
this._sessionM.get(11).onAllRcvMsgOptNotify(e3);
} }, { key: "_filterMsgFromIMOpenPush", value: function(e3) {
var t3 = e3.head, e3 = e3.body, t3 = t3.servcmd, n3 = false;
- return !(n3 = N3(t3) ? n3 : t3.includes(s3.NAME.IM_CONFIG_MANAGER) || t3.includes(s3.NAME.OVERLOAD_PUSH) || t3.includes(s3.NAME.STAT_SERVICE)) || (t3.includes(G2.PUSHED_CLOUD_CTRL_CONFIG) ? this._sessionM.get(23).onPushedConfig(e3) : t3.includes(G2.PUSHED_COMMERCIAL_CONFIG) ? this._sessionM.get(27).onPushedConfig(e3) : t3.includes(G2.OVERLOAD_NOTIFY) ? this._sessionM.onPushedServerOverload(e3) : t3.includes(G2.KICK_OTHER) && (n3 = Date.now(), this._sessionM.reLoginOnKickOther(), e3 = new P2("kickOther"), n3 = n3 - (t3 = this._sessionM.get(1).getLastWsHelloTs()), e3.setMessage("last wshello time:".concat(t3, " diff:").concat(n3, "ms")).end()), false);
- } }]), Is = [{ cmd: G2.GET_GRP_PROFILE, interval: 1, count: 8 }, { cmd: G2.UPDATE_GRP_PROFILE, interval: 1, count: 8 }, { cmd: G2.GET_AV_MBR_LIST, interval: 3, count: 1 }, { cmd: G2.GET_GRP_PENDENCY, interval: 1, count: 15 }, { cmd: G2.GET_TOPIC_LIST, interval: 1, count: 10 }, { cmd: G2.SET_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.MODIFY_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.DEL_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.CLEAR_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.GET_GRP_ATTR, interval: 5, count: 20 }, { cmd: G2.UPDATE_GRP_COUNTER, interval: 5, count: 20 }, { cmd: G2.GET_GRP_COUNTER, interval: 5, count: 20 }, { cmd: G2.SET_ALL_MSG_READ, interval: 1, count: 1 }, { cmd: G2.GET_USER_STATUS, interval: 5, count: 20 }, { cmd: G2.SUB_USER_STATUS, interval: 5, count: 20 }, { cmd: G2.UNSUB_USER_STATUS, interval: 5, count: 20 }, { cmd: G2.CS, interval: 5, count: 20 }, { cmd: G2.GRP_CS, interval: 5, count: 20 }, { cmd: G2.MBR_CS, interval: 5, count: 20 }, { cmd: G2.USER_CS, interval: 5, count: 20 }, { cmd: G2.CHECK_FOLLOW_TYPE, interval: 5, count: 20 }, { cmd: G2.GET_GRP_ROAMING_MSG, interval: 1, count: 20 }, { cmd: G2.GET_C2C_ROAMING_MSG, interval: 1, count: 20 }], Ms = /* @__PURE__ */ new Map(), ys = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"], Cs = 0, Ts = ys.length; Cs < Ts; Cs++)
- Ms.set(Cs, ys[Cs]);
- function Ds(e3) {
- return p3(this, Ds), (e3 = i3(this, Ds, [e3]))._n = "ChannelModule", e3._socketHandler = new ds(e3), e3._probing = false, e3._isAppShowing = true, e3._previousState = R2.NET_STATE_CONNECTED, e3._timerForNotLoggedIn = -1, e3._timerForNotLoggedIn = setInterval(e3.onCheckTimer.bind(e3), 1e3), e3._fatalErrorFlag = false, e3._disconnectedTS = 0, e3._lastDiagnoseTS = 0, e3;
+ return !(n3 = N3(t3) ? n3 : t3.includes(a2.NAME.IM_CONFIG_MANAGER) || t3.includes(a2.NAME.OVERLOAD_PUSH) || t3.includes(a2.NAME.STAT_SERVICE)) || (t3.includes(G2.PUSHED_CLOUD_CTRL_CONFIG) ? this._sessionM.get(23).onPushedConfig(e3) : t3.includes(G2.PUSHED_COMMERCIAL_CONFIG) ? this._sessionM.get(27).onPushedConfig(e3) : t3.includes(G2.OVERLOAD_NOTIFY) ? this._sessionM.onPushedServerOverload(e3) : t3.includes(G2.KICK_OTHER) && (n3 = Date.now(), this._sessionM.reLoginOnKickOther(), e3 = new P2("kickOther"), n3 = n3 - (t3 = this._sessionM.get(1).getLastWsHelloTs()), e3.setMessage("last wshello time:".concat(t3, " diff:").concat(n3, "ms")).end()), false);
+ } }]), La = [{ cmd: G2.GET_GRP_PROFILE, interval: 1, count: 8 }, { cmd: G2.UPDATE_GRP_PROFILE, interval: 1, count: 8 }, { cmd: G2.GET_AV_MBR_LIST, interval: 3, count: 1 }, { cmd: G2.GET_GRP_PENDENCY, interval: 1, count: 15 }, { cmd: G2.GET_TOPIC_LIST, interval: 1, count: 10 }, { cmd: G2.SET_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.MODIFY_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.DEL_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.CLEAR_GRP_ATTR, interval: 5, count: 10 }, { cmd: G2.GET_GRP_ATTR, interval: 5, count: 20 }, { cmd: G2.UPDATE_GRP_COUNTER, interval: 5, count: 20 }, { cmd: G2.GET_GRP_COUNTER, interval: 5, count: 20 }, { cmd: G2.SET_ALL_MSG_READ, interval: 1, count: 1 }, { cmd: G2.GET_USER_STATUS, interval: 5, count: 20 }, { cmd: G2.SUB_USER_STATUS, interval: 5, count: 20 }, { cmd: G2.UNSUB_USER_STATUS, interval: 5, count: 20 }, { cmd: G2.CS, interval: 5, count: 20 }, { cmd: G2.GRP_CS, interval: 5, count: 20 }, { cmd: G2.MBR_CS, interval: 5, count: 20 }, { cmd: G2.USER_CS, interval: 5, count: 20 }, { cmd: G2.CHECK_FOLLOW_TYPE, interval: 5, count: 20 }, { cmd: G2.GET_GRP_ROAMING_MSG, interval: 1, count: 20 }, { cmd: G2.GET_C2C_ROAMING_MSG, interval: 1, count: 20 }], Sa = /* @__PURE__ */ new Map(), ka = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"], Ra = 0, Aa = ka.length; Ra < Aa; Ra++)
+ Sa.set(Ra, ka[Ra]);
+ function Oa(e3) {
+ return p3(this, Oa), (e3 = i3(this, Oa, [e3]))._n = "ChannelModule", e3._socketHandler = new va(e3), e3._probing = false, e3._isAppShowing = true, e3._previousState = R2.NET_STATE_CONNECTED, e3._timerForNotLoggedIn = -1, e3._timerForNotLoggedIn = setInterval(e3.onCheckTimer.bind(e3), 1e3), e3._fatalErrorFlag = false, e3._disconnectedTS = 0, e3._lastDiagnoseTS = 0, e3;
}
- function Es(e3) {
- for (var t3, n3, o3 = e3, i4 = "", s4 = 0, a3 = (o3 = e3.length % 8 != 0 ? "0".repeat(8 - e3.length % 8) + e3 : o3).length; s4 < a3; s4 += 8)
- t3 = parseInt(o3.slice(s4, s4 + 4), 2), n3 = parseInt(o3.slice(s4 + 4, s4 + 8), 2), i4 += Ms.get(t3) + Ms.get(n3);
+ function Na(e3) {
+ for (var t3, n3, o3 = e3, i4 = "", a3 = 0, s4 = (o3 = e3.length % 8 != 0 ? "0".repeat(8 - e3.length % 8) + e3 : o3).length; a3 < s4; a3 += 8)
+ t3 = parseInt(o3.slice(a3, a3 + 4), 2), n3 = parseInt(o3.slice(a3 + 4, a3 + 8), 2), i4 += Sa.get(t3) + Sa.get(n3);
return i4;
}
- function Ls(e3) {
+ function Ga(e3) {
var t3;
return e3 < 0 || 53 < e3 ? NaN : (t3 = 0 | 1073741824 * Math.random(), 30 < e3 ? t3 + 1073741824 * (0 | Math.random() * (1 << e3 - 30)) : t3 >>> 30 - e3);
}
- function Ss(e3, t3) {
+ function Pa(e3, t3) {
for (var n3 = e3.toString(16), o3 = t3 - n3.length, i4 = "0"; 0 < o3; o3 >>>= 1, i4 += i4)
1 & o3 && (n3 = i4 + n3);
return n3;
}
- t2(va, c2);
- var ks2 = e2(va, [{ key: "_init", value: function() {
- this._updateCmdFreqLimitMap(Is);
+ t2(Es, c2);
+ var Ua = e2(Es, [{ key: "_init", value: function() {
+ this._updateCmdFreqLimitMap(La);
} }, { key: "_onCloudConfig", value: function() {
var e3 = this.getCloudConfig("cmd_frequency_limit");
N3(e3) || (e3 = JSON.parse(e3), this._updateCmdFreqLimitMap(e3));
@@ -16267,18 +16274,18 @@ var chat = { exports: {} };
} }, { key: "req", value: function(e3) {
M2.d("".concat(this._n, ".req options:"), e3);
var t3, n3, o3 = e3.P;
- return this._pHandler.has(o3) ? (t3 = (e3 = this.getProtocolData(e3)).head.servcmd, this._isFreqOverLimit(t3) ? E2({ code: n3 = k2.OVER_FREQUENCY_LIMIT, message: this.getErrMsg(n3, this._getCmd(t3)) }) : this._isServerOverload(t3) ? E2({ code: n3 = k2.OPEN_SERVICE_OVERLOAD_ERROR, message: this.getErrMsg(n3, this._getCmd(t3)) }) : (n3 = this.get(21), ms.includes(o3) ? n3.simplySend(e3) : n3.send(e3))) : (M2.w("".concat(this._n, ".req unknown P:").concat(o3)), E2({ code: k2.NO_PROTOCOL }));
+ return this._pHandler.has(o3) ? (t3 = (e3 = this.getProtocolData(e3)).head.servcmd, this._isFreqOverLimit(t3) ? E2({ code: n3 = k2.OVER_FREQUENCY_LIMIT, message: this.getErrMsg(n3, this._getCmd(t3)) }) : this._isServerOverload(t3) ? E2({ code: n3 = k2.OPEN_SERVICE_OVERLOAD_ERROR, message: this.getErrMsg(n3, this._getCmd(t3)) }) : (n3 = this.get(21), Da.includes(o3) ? n3.simplySend(e3) : n3.send(e3))) : (M2.w("".concat(this._n, ".req unknown P:").concat(o3)), E2({ code: k2.NO_PROTOCOL }));
} }, { key: "getKeyMap", value: function(e3) {
return this._pHandler.getKeyMap(e3);
} }, { key: "genCommonHead", value: function() {
var e3 = this.get(12);
- return { ver: "v4", platform: this._platform, websdkappid: oe2, websdkversion: ne2, a2: e3.getA2Key() || void 0, tinyid: e3.getTinyID() || void 0, status_instid: e3.getStatusInstanceID(), sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getA2Key() ? void 0 : e3.getUserID(), usersig: e3.getA2Key() ? void 0 : e3.getUserSig(), sdkability: 75689843, sdkability_ext: Es(""), cappid: e3.getApplicationID(), cs: 0 };
+ return { ver: "v4", platform: this._platform, websdkappid: oe2, websdkversion: ne2, a2: e3.getA2Key() || void 0, tinyid: e3.getTinyID() || void 0, status_instid: e3.getStatusInstanceID(), sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getA2Key() ? void 0 : e3.getUserID(), usersig: e3.getA2Key() ? void 0 : e3.getUserSig(), sdkability: 75689843, sdkability_ext: Na(""), cappid: e3.getApplicationID(), cs: 0 };
} }, { key: "genCosSpecifiedHead", value: function() {
var e3 = this.get(12);
- return { ver: "v4", platform: this._platform, websdkappid: oe2, websdkversion: ne2, sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getUserID(), usersig: e3.getUserSig(), status_instid: e3.getStatusInstanceID(), sdkability: 75689843, sdkability_ext: Es(""), cappid: e3.getApplicationID(), cs: 0 };
+ return { ver: "v4", platform: this._platform, websdkappid: oe2, websdkversion: ne2, sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getUserID(), usersig: e3.getUserSig(), status_instid: e3.getStatusInstanceID(), sdkability: 75689843, sdkability_ext: Na(""), cappid: e3.getApplicationID(), cs: 0 };
} }, { key: "genSSOReportHead", value: function() {
var e3 = this.get(12);
- return { ver: "v4", platform: this._platform, websdkappid: oe2, websdkversion: ne2, sdkappid: e3.getSDKAppID(), contenttype: "", reqtime: 0, identifier: "", usersig: "", status_instid: e3.getStatusInstanceID(), sdkability: 75689843, sdkability_ext: Es(""), cappid: e3.getApplicationID(), cs: 0 };
+ return { ver: "v4", platform: this._platform, websdkappid: oe2, websdkversion: ne2, sdkappid: e3.getSDKAppID(), contenttype: "", reqtime: 0, identifier: "", usersig: "", status_instid: e3.getStatusInstanceID(), sdkability: 75689843, sdkability_ext: Na(""), cappid: e3.getApplicationID(), cs: 0 };
} }, { key: "getProtocolData", value: function(e3) {
return this._pHandler.getProtocolData(e3);
} }, { key: "trans", value: function(e3) {
@@ -16300,12 +16307,12 @@ var chat = { exports: {} };
} }, { key: "_reLoginOnReconnected", value: function() {
M2.l("".concat(this._n, "._reLoginOnReconnected")), this._reLogin();
} }, { key: "_reLogin", value: function() {
- var e3, t3, a3, r4 = this, c3 = "".concat(this._n, "._reLogin");
- this.isLoggedIn() && (e3 = 0, (t3 = this.get(1).getPushModule()) && (e3 = t3.getUniAppPlatform()), a3 = new P2("reLogin"), this.req({ P: G2.LOGIN, data: { isWebUniapp: e3, customInfo: this.get(12).getCustomLoginInfo() } }).then(function(e4) {
- var e4 = e4.data, t4 = e4.instanceID, e4 = e4.customStatus, n3 = r4.get(12), o3 = Go(e4), i4 = (n3.setStatusInstanceID(t4), r4.get(21)), s4 = i4.getSocketID(), s4 = "socketID:".concat(s4, " instanceID:").concat(t4, " customStatus:").concat(o3), t4 = (a3.setMessage(s4).end(true), M2.l("".concat(c3, " ok. ").concat(s4)), n3.getCustomStatus() !== o3 && r4.get(4).onUserStatusUpdated({ dataList: [{ to: r4.getMyUserID(), statusType: R2.USER_STATUS_ONLINE, customStatus: e4 }] }), i4.diagnose(), r4.get(11).syncConvList(r4._incrementalPullContactFlag).then(function() {
+ var e3, t3, s4, r4 = this, c3 = "".concat(this._n, "._reLogin");
+ this.isLoggedIn() && (e3 = 0, (t3 = this.get(1).getPushModule()) && (e3 = t3.getUniAppPlatform()), s4 = new P2("reLogin"), this.req({ P: G2.LOGIN, data: { isWebUniapp: e3, customInfo: this.get(12).getCustomLoginInfo() } }).then(function(e4) {
+ var e4 = e4.data, t4 = e4.instanceID, e4 = e4.customStatus, n3 = r4.get(12), o3 = xo(e4), i4 = (n3.setStatusInstanceID(t4), r4.get(21)), a3 = i4.getSocketID(), a3 = "socketID:".concat(a3, " instanceID:").concat(t4, " customStatus:").concat(o3), t4 = (s4.setMessage(a3).end(true), M2.l("".concat(c3, " ok. ").concat(a3)), n3.getCustomStatus() !== o3 && r4.get(4).onUserStatusUpdated({ dataList: [{ to: r4.getMyUserID(), statusType: R2.USER_STATUS_ONLINE, customStatus: e4 }] }), i4.diagnose(), r4.get(11).syncConvList(r4._incrementalPullContactFlag).then(function() {
M2.l("".concat(c3, ", sync conv list ok.")), r4.get(25).start();
- }), r4.get(7)), s4 = (t4 && t4.updateLocalMainSequenceOnReconnected(), r4.get(10)), n3 = (s4.resetGetTopicTime(), s4.getTopicListOnReconnected(), r4.get(35));
- n3 && n3.clearCacheOnReconnected();
+ }), r4.get(7)), a3 = (t4 && t4.updateLocalMainSequenceOnReconnected(), r4.get(10)), n3 = (a3.resetGetTopicTime(), a3.getTopicListOnReconnected(), r4.get(35)), o3 = (n3 && n3.clearCacheOnReconnected(), r4.get(8));
+ o3 && o3.updateCacheOnReconnected();
}));
} }, { key: "onMultipleAccountKickedOut", value: function(e3) {
this.get(1).onMultipleAccountKickedOut(e3);
@@ -16338,8 +16345,8 @@ var chat = { exports: {} };
var t3 = e3.overloadCommand, e3 = e3.waitingTime;
this._serverOverloadInfoMap.set(t3, { overloadTime: Date.now(), waitingTime: e3 }), M2.w("".concat(this._n, ".onPushedServerOverload waitingTime:").concat(e3, "s cmd:").concat(this._getCmd(t3)));
} }, { key: "reset", value: function() {
- M2.l("".concat(this._n, ".reset")), this._updateCmdFreqLimitMap(Is), this._cmdReqInfoMap.clear(), this._serverOverloadInfoMap.clear(), this._incrementalPullContactFlag = true;
- } }]), Rs = (t2(ma, c2), e2(ma, [{ key: "getCloudConfig", value: function(e3) {
+ M2.l("".concat(this._n, ".reset")), this._updateCmdFreqLimitMap(La), this._cmdReqInfoMap.clear(), this._serverOverloadInfoMap.clear(), this._incrementalPullContactFlag = true;
+ } }]), ba = (t2(Ds, c2), e2(Ds, [{ key: "getCloudConfig", value: function(e3) {
return N3(e3) ? this._cloudConfig : this._cloudConfig.has(e3) ? this._cloudConfig.get(e3) : void 0;
} }, { key: "getServerConfig", value: function(e3) {
var t3 = { code: 0, data: "" };
@@ -16347,31 +16354,31 @@ var chat = { exports: {} };
} }, { key: "_canFetch", value: function() {
return this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime;
} }, { key: "fetchConfig", value: function() {
- var o3, i4 = this, s4 = "".concat(this._n, ".fetchConfig"), e3 = this._canFetch();
- M2.l("".concat(s4, " canFetch:").concat(e3)), e3 && (o3 = new P2("fetchCloudCtrlConfig"), e3 = this.get(12).getSDKAppID(), this._isFetching = true, this.req({ P: G2.FETCH_CLOUD_CTRL_CONFIG, data: { SDKAppID: e3, version: this._version } }).then(function(e4) {
+ var o3, i4 = this, a3 = "".concat(this._n, ".fetchConfig"), e3 = this._canFetch();
+ M2.l("".concat(a3, " canFetch:").concat(e3)), e3 && (o3 = new P2("fetchCloudCtrlConfig"), e3 = this.get(12).getSDKAppID(), this._isFetching = true, this.req({ P: G2.FETCH_CLOUD_CTRL_CONFIG, data: { SDKAppID: e3, version: this._version } }).then(function(e4) {
i4._isFetching = false;
var t3 = e4.data, n3 = t3.version, t3 = t3.cloudControlConfig;
- o3.setMessage("version:".concat(i4._version, " newVersion:").concat(n3, " config:").concat(t3)).end(), M2.l("".concat(s4, " ok")), i4._parse(e4.data);
+ o3.setMessage("version:".concat(i4._version, " newVersion:").concat(n3, " config:").concat(t3)).end(), M2.l("".concat(a3, " ok")), i4._parse(e4.data);
}).catch(function(e4) {
- i4._isFetching = false, o3.setError(e4).end(), M2.l("".concat(s4, " failed. error:"), e4), i4._setExpiredTime(12e4);
+ i4._isFetching = false, o3.setError(e4).end(), M2.l("".concat(a3, " failed. error:"), e4), i4._setExpiredTime(12e4);
}));
} }, { key: "onPushedConfig", value: function(e3) {
M2.l("".concat(this._n, ".onPushedConfig config:"), e3), new P2("pushedCloudCtrlConfig").setMessage("newVersion:".concat(e3.version, " config:").concat(e3.cloudControlConfig)).end(), this._parse(e3);
} }, { key: "onCheckTimer", value: function(e3) {
this._canFetch() && this.fetchConfig();
} }, { key: "_parse", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, "._parse"), o3 = e3.errorCode, i4 = e3.errorMessage, s4 = e3.cloudControlConfig, a3 = e3.version, r4 = e3.expiredTime;
+ var t3 = this, n3 = "".concat(this._n, "._parse"), o3 = e3.errorCode, i4 = e3.errorMessage, a3 = e3.cloudControlConfig, s4 = e3.version, r4 = e3.expiredTime;
if (0 === o3) {
- if (this._version !== a3) {
+ if (this._version !== s4) {
var c3 = null;
try {
- c3 = JSON.parse(s4);
+ c3 = JSON.parse(a3);
} catch (e4) {
- this.isPrivateNetWork() || M2.e("".concat(n3, " failed. config:"), s4);
+ this.isPrivateNetWork() || M2.e("".concat(n3, " failed. config:"), a3);
}
c3 && (this._cloudConfig.clear(), Object.keys(c3).forEach(function(e4) {
t3._cloudConfig.set(e4, c3[e4]);
- }), this._version = a3, this.emitIEvt(U2.CLOUD_CONFIG));
+ }), this._version = s4, this.emitIEvt(U2.CLOUD_CONFIG), this.emitOEvt(h2.SERVER_CONFIG_UPDATED, { config: c3 }));
}
this._setExpiredTime(1e3 * r4);
} else
@@ -16380,25 +16387,25 @@ var chat = { exports: {} };
this._expiredTime = Date.now() + e3;
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._cloudConfig.clear(), this._expiredTime = 0, this._version = 0, this._isFetching = false;
- } }])), As = (t2(fa, c2), e2(fa, [{ key: "start", value: function() {
+ } }])), wa = (t2(Ts, c2), e2(Ts, [{ key: "start", value: function() {
this._recoverGroupChat(), this._recoverC2CChat();
} }, { key: "_recoverGroupChat", value: function() {
- var n3, o3, i4, s4, a3 = this, e3 = this._getLocalConvList().filter(function(e4) {
+ var n3, o3, i4, a3, s4 = this, e3 = this._getLocalConvList().filter(function(e4) {
return e4.type === R2.CONV_GROUP && e4.groupProfile.type !== R2.GRP_AVCHATROOM;
}), r4 = this.get(11), c3 = [];
e3.forEach(function(e4) {
var t3 = e4.conversationID, e4 = e4.lastMessage;
- n3 = t3.replace(R2.CONV_GROUP, ""), o3 = r4.getLocalLastMessage(t3), e4 && 0 !== e4.lastSequence && o3 && (i4 = e4.lastSequence, o3 = o3.sequence, s4 = i4 - o3, 0 < o3) && 1 <= s4 && s4 < 300 ? a3._recoverGroupMsg({ groupID: n3, localLastMessageSequence: o3, remoteLastMessageSequence: i4 }) : c3.push(n3);
+ n3 = t3.replace(R2.CONV_GROUP, ""), o3 = r4.getLocalLastMessage(t3), e4 && 0 !== e4.lastSequence && o3 && (i4 = e4.lastSequence, o3 = o3.sequence, a3 = i4 - o3, 0 < o3) && 1 <= a3 && a3 < 300 ? s4._recoverGroupMsg({ groupID: n3, localLastMessageSequence: o3, remoteLastMessageSequence: i4 }) : c3.push(n3);
}), this._getGroupNotice(c3);
} }, { key: "_recoverC2CChat", value: function() {
- var n3, o3, i4, s4 = this, e3 = this._getLocalConvList().filter(function(e4) {
+ var n3, o3, i4, a3 = this, e3 = this._getLocalConvList().filter(function(e4) {
return e4.type === R2.CONV_C2C;
- }), a3 = this.get(11), r4 = [Promise.resolve()], c3 = [];
+ }), s4 = this.get(11), r4 = [Promise.resolve()], c3 = [];
e3.forEach(function(e4) {
var t3 = e4.conversationID, e4 = e4.lastMessage;
- n3 = a3.getLocalLastMessage(t3), e4 && 0 !== e4.lastTime && n3 && (o3 = e4.lastTime, n3 = n3.time, i4 = o3 - n3, 0 < n3) && 1 <= i4 && i4 <= 600 && (r4.push(s4._recoverC2CMsg({ conversationID: t3, localLastMessageTime: n3, remoteLastMessageTime: o3 })), c3.push(t3));
+ n3 = s4.getLocalLastMessage(t3), e4 && 0 !== e4.lastTime && n3 && (o3 = e4.lastTime, n3 = n3.time, i4 = o3 - n3, 0 < n3) && 1 <= i4 && i4 <= 600 && (r4.push(a3._recoverC2CMsg({ conversationID: t3, localLastMessageTime: n3, remoteLastMessageTime: o3 })), c3.push(t3));
}), Promise.all(r4).then(function() {
- M2.l("".concat(s4._n, "._recoverC2CChat all done, convIDList:"), c3), s4.get(19).syncOnReconnected();
+ M2.l("".concat(a3._n, "._recoverC2CChat all done, convIDList:"), c3), a3.get(19).syncOnReconnected();
});
} }, { key: "_getLocalConvList", value: function() {
return this.get(11).getLocalConvList();
@@ -16413,12 +16420,12 @@ var chat = { exports: {} };
1 < n3.length && n3.sort(function(e5, t4) {
return e5.sequence - t4.sequence;
});
- for (var s4 = false, a3 = 0, r4 = n3.length; a3 < r4; a3++)
- if (n3[a3].from === R2.CONV_SYSTEM) {
- s4 = true;
+ for (var a3 = false, s4 = 0, r4 = n3.length; s4 < r4; s4++)
+ if (n3[s4].from === R2.CONV_SYSTEM) {
+ a3 = true;
break;
}
- if (s4)
+ if (a3)
for (var c3 = 0, u3 = n3.length; c3 < u3; c3++) {
var l3 = n3[c3];
l3.from !== R2.CONV_SYSTEM ? i4.onNewMessage({ dataList: [l3], isInstantMessage: false, updateUnreadCount: false }) : i4.onNewGroupTips({ event: l3.event, dataList: [l3] });
@@ -16446,15 +16453,15 @@ var chat = { exports: {} };
var t3 = e3.groupID, e3 = e3.sequence;
return this.req({ P: G2.GET_GRP_ROAMING_MSG, data: { groupID: t3, count: this.PULL_LIMIT_COUNT, sequence: e3 + this.PULL_LIMIT_COUNT - 1 } });
} }, { key: "_recoverC2CMsg", value: function(e3) {
- var o3 = this, i4 = "".concat(this._n, ".").concat("_recoverC2CMsg"), s4 = (M2.l("".concat(i4, " options:"), e3), e3.conversationID), t3 = e3.localLastMessageTime, a3 = e3.remoteLastMessageTime, r4 = JSON.stringify(e3), c3 = new P2("_recoverC2CMsg");
- return c3.setMessage(r4), this._getC2CRoamingMsg({ conversationID: s4, time: t3 }).then(function(e4) {
+ var o3 = this, i4 = "".concat(this._n, ".").concat("_recoverC2CMsg"), a3 = (M2.l("".concat(i4, " options:"), e3), e3.conversationID), t3 = e3.localLastMessageTime, s4 = e3.remoteLastMessageTime, r4 = JSON.stringify(e3), c3 = new P2("_recoverC2CMsg");
+ return c3.setMessage(r4), this._getC2CRoamingMsg({ conversationID: a3, time: t3 }).then(function(e4) {
var e4 = e4.data, t4 = e4.complete, e4 = e4.messageList;
if (!N3(e4)) {
var n3 = e4.length, n3 = (o3.get(6).onNewMessage({ dataList: e4, isInstantMessage: true }), e4[n3 - 1].time), e4 = e4.map(function(e5) {
return e5.random;
}), e4 = "".concat(r4, " complete:").concat(t4, " randomList:").concat(e4);
- if (M2.l("".concat(i4, " ").concat(e4)), c3.setMessage(e4).end(), n3 < a3 && 1 !== t4)
- return o3._recoverC2CMsg({ conversationID: s4, localLastMessageTime: n3, remoteLastMessageTime: a3 });
+ if (M2.l("".concat(i4, " ").concat(e4)), c3.setMessage(e4).end(), n3 < s4 && 1 !== t4)
+ return o3._recoverC2CMsg({ conversationID: a3, localLastMessageTime: n3, remoteLastMessageTime: s4 });
}
}).catch(function(e4) {
c3.setError(e4).end(), M2.w("".concat(i4, " failed. error:"), e4);
@@ -16464,35 +16471,35 @@ var chat = { exports: {} };
return this.req({ P: G2.GET_C2C_ROAMING_MSG, data: { peerAccount: t3.replace(R2.CONV_C2C, ""), count: this.PULL_LIMIT_COUNT + 1, lastMessageTime: e3, direction: 1 } });
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset"));
- } }])), Os = e2(function e3() {
+ } }])), Fa = e2(function e3() {
p3(this, e3), this._n = "AvgE2EDelay", this._e2eDelayArray = [];
}, [{ key: "addMessageDelay", value: function(e3) {
- e3 = xe2() - e3;
+ e3 = He2() - e3;
0 <= e3 && this._e2eDelayArray.push(e3);
} }, { key: "_calcAvg", value: function(e3, t3) {
var n3;
return 0 === t3 ? 0 : (n3 = 0, e3.forEach(function(e4) {
n3 += e4;
- }), Kt2(n3 / t3, 1));
+ }), jt2(n3 / t3, 1));
} }, { key: "_calcCountWithLimit", value: function(e3) {
var t3 = e3.e2eDelayArray, n3 = e3.min, o3 = e3.max;
return t3.filter(function(e4) {
return n3 <= e4 && e4 < o3;
}).length;
} }, { key: "_calcPercent", value: function(e3, t3) {
- e3 = Kt2(e3 / t3 * 100, 2);
+ e3 = jt2(e3 / t3 * 100, 2);
return e3 = 100 < e3 ? 100 : e3;
} }, { key: "_checkE2EDelayException", value: function(e3, t3) {
- var n3, o3, i4, s4 = e3.filter(function(e4) {
+ var n3, o3, i4, a3 = e3.filter(function(e4) {
return t3 < e4;
});
- 0 < s4.length && (n3 = s4.length, o3 = Math.min.apply(Math, d2(s4)), i4 = Math.max.apply(Math, d2(s4)), s4 = this._calcAvg(s4, n3), 50 < (e3 = Kt2(n3 / e3.length * 100, 2))) && new P2("messageE2EDelayException").setMessage("count:".concat(n3, " min:").concat(o3, " max:").concat(i4, " avg:").concat(s4, " percent:").concat(e3)).setLevel("warning").end();
+ 0 < a3.length && (n3 = a3.length, o3 = Math.min.apply(Math, d2(a3)), i4 = Math.max.apply(Math, d2(a3)), a3 = this._calcAvg(a3, n3), 50 < (e3 = jt2(n3 / e3.length * 100, 2))) && new P2("messageE2EDelayException").setMessage("count:".concat(n3, " min:").concat(o3, " max:").concat(i4, " avg:").concat(a3, " percent:").concat(e3)).setLevel("warning").end();
} }, { key: "getStatResult", value: function() {
- var e3, t3, n3, o3, i4, s4, a3 = this._e2eDelayArray.length;
- return 0 === a3 ? null : (e3 = d2(this._e2eDelayArray), t3 = this._calcCountWithLimit({ e2eDelayArray: e3, min: 0, max: 1 }), n3 = this._calcCountWithLimit({ e2eDelayArray: e3, min: 1, max: 3 }), o3 = this._calcPercent(t3, a3), i4 = this._calcPercent(n3, a3), s4 = this._calcAvg(e3, a3), this._checkE2EDelayException(e3, 3), e3.length = 0, this.reset(), { totalCount: a3, countLessThan1Second: t3, percentOfCountLessThan1Second: o3, countLessThan3Second: n3, percentOfCountLessThan3Second: i4, avgDelay: s4 });
+ var e3, t3, n3, o3, i4, a3, s4 = this._e2eDelayArray.length;
+ return 0 === s4 ? null : (e3 = d2(this._e2eDelayArray), t3 = this._calcCountWithLimit({ e2eDelayArray: e3, min: 0, max: 1 }), n3 = this._calcCountWithLimit({ e2eDelayArray: e3, min: 1, max: 3 }), o3 = this._calcPercent(t3, s4), i4 = this._calcPercent(n3, s4), a3 = this._calcAvg(e3, s4), this._checkE2EDelayException(e3, 3), e3.length = 0, this.reset(), { totalCount: s4, countLessThan1Second: t3, percentOfCountLessThan1Second: o3, countLessThan3Second: n3, percentOfCountLessThan3Second: i4, avgDelay: a3 });
} }, { key: "reset", value: function() {
this._e2eDelayArray.length = 0;
- } }]), Ns = e2(function e3() {
+ } }]), qa2 = e2(function e3() {
p3(this, e3), this._n = "AvgRTT", this._requestCount = 0, this._rttArray = [];
}, [{ key: "addRequestCount", value: function() {
this._requestCount += 1;
@@ -16503,7 +16510,7 @@ var chat = { exports: {} };
} }, { key: "_calcRTTCount", value: function(e3) {
return e3.length;
} }, { key: "_calcSuccessRateOfRequest", value: function(e3, t3) {
- return 0 === t3 ? 0 : 100 < (e3 = Kt2(e3 / t3 * 100, 2)) ? 100 : e3;
+ return 0 === t3 ? 0 : 100 < (e3 = jt2(e3 / t3 * 100, 2)) ? 100 : e3;
} }, { key: "_calcAvg", value: function(e3, t3) {
var n3;
return 0 === t3 ? 0 : (n3 = 0, e3.forEach(function(e4) {
@@ -16518,7 +16525,7 @@ var chat = { exports: {} };
return 0 === n3 ? null : (e3 = this._calcRTTCount(o3), t3 = this._calcSuccessRateOfRequest(e3, n3), o3 = this._calcAvg(o3, e3), M2.l("".concat(this._n, ".getStatResult max:").concat(this._calcMax(), " min:").concat(this._calcMin(), " avg:").concat(o3)), this.reset(), { totalCount: n3, rttCount: e3, successRateOfRequest: t3, avgRTT: o3 });
} }, { key: "reset", value: function() {
this._requestCount = 0, this._rttArray.length = 0;
- } }]), Gs = e2(function e3() {
+ } }]), xa = e2(function e3() {
p3(this, e3), this._map = /* @__PURE__ */ new Map();
}, [{ key: "initMap", value: function(e3) {
var t3 = this;
@@ -16536,10 +16543,10 @@ var chat = { exports: {} };
} }, { key: "addFileSize", value: function(e3, t3) {
return !(N3(e3) || !this._map.has(e3) || (this._map.get(e3).fileSizeArray.push(t3), 0));
} }, { key: "_calcSuccessRateOfBusiness", value: function(e3) {
- return N3(e3) || !this._map.has(e3) ? -1 : 100 < (e3 = Kt2((e3 = this._map.get(e3)).successCount / e3.totalCount * 100, 2)) ? 100 : e3;
+ return N3(e3) || !this._map.has(e3) ? -1 : 100 < (e3 = jt2((e3 = this._map.get(e3)).successCount / e3.totalCount * 100, 2)) ? 100 : e3;
} }, { key: "_calcSuccessRateOfPlatform", value: function(e3) {
var t3;
- return N3(e3) || !this._map.has(e3) ? -1 : (t3 = this._map.get(e3), 100 < (e3 = Kt2(e3 = this._calcSuccessCountOfPlatform(e3) / t3.totalCount * 100, 2)) ? 100 : e3);
+ return N3(e3) || !this._map.has(e3) ? -1 : (t3 = this._map.get(e3), 100 < (e3 = jt2(e3 = this._calcSuccessCountOfPlatform(e3) / t3.totalCount * 100, 2)) ? 100 : e3);
} }, { key: "_calcTotalCount", value: function(e3) {
return N3(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).totalCount;
} }, { key: "_calcSuccessCountOfBusiness", value: function(e3) {
@@ -16547,7 +16554,7 @@ var chat = { exports: {} };
} }, { key: "_calcSuccessCountOfPlatform", value: function(e3) {
return N3(e3) || !this._map.has(e3) ? -1 : (e3 = this._map.get(e3)).successCount + e3.failedCountOfUserSide;
} }, { key: "_calcAvg", value: function(e3) {
- return N3(e3) || !this._map.has(e3) ? -1 : e3 === Jn ? this._calcAvgSpeed(e3) : this._calcAvgCost(e3);
+ return N3(e3) || !this._map.has(e3) ? -1 : e3 === Zn ? this._calcAvgSpeed(e3) : this._calcAvgCost(e3);
} }, { key: "_calcAvgCost", value: function(e3) {
var t3, n3 = this._map.get(e3).costArray.length;
return 0 === n3 ? 0 : (t3 = 0, this._map.get(e3).costArray.forEach(function(e4) {
@@ -16561,11 +16568,11 @@ var chat = { exports: {} };
n3 += e4;
}), parseInt(1e3 * n3 / t3);
} }, { key: "getStatResult", value: function(e3) {
- var t3, n3, o3, i4, s4, a3 = this._calcTotalCount(e3);
- return 0 === a3 ? null : (t3 = this._calcSuccessCountOfBusiness(e3), n3 = this._calcSuccessRateOfBusiness(e3), o3 = this._calcSuccessCountOfPlatform(e3), i4 = this._calcSuccessRateOfPlatform(e3), s4 = this._calcAvg(e3), this.reset(e3), { totalCount: a3, successCountOfBusiness: t3, successRateOfBusiness: n3, successCountOfPlatform: o3, successRateOfPlatform: i4, avgValue: s4 });
+ var t3, n3, o3, i4, a3, s4 = this._calcTotalCount(e3);
+ return 0 === s4 ? null : (t3 = this._calcSuccessCountOfBusiness(e3), n3 = this._calcSuccessRateOfBusiness(e3), o3 = this._calcSuccessCountOfPlatform(e3), i4 = this._calcSuccessRateOfPlatform(e3), a3 = this._calcAvg(e3), this.reset(e3), { totalCount: s4, successCountOfBusiness: t3, successRateOfBusiness: n3, successCountOfPlatform: o3, successRateOfPlatform: i4, avgValue: a3 });
} }, { key: "reset", value: function(e3) {
N3(e3) ? this._map.clear() : this._map.set(e3, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] });
- } }]), Ps = e2(function e3() {
+ } }]), Va = e2(function e3() {
p3(this, e3), this._lastMap = /* @__PURE__ */ new Map(), this._currentMap = /* @__PURE__ */ new Map();
}, [{ key: "initMap", value: function(e3) {
var t3 = this;
@@ -16573,8 +16580,8 @@ var chat = { exports: {} };
t3._lastMap.set(e4, /* @__PURE__ */ new Map()), t3._currentMap.set(e4, /* @__PURE__ */ new Map());
});
} }, { key: "addMessageSequence", value: function(e3) {
- var t3, n3, o3, i4 = e3.key, s4 = e3.message;
- return !(N3(i4) || !this._lastMap.has(i4) || !this._currentMap.has(i4) || (t3 = s4.conversationID, s4 = s4.sequence, t3 = t3.replace(R2.CONV_GROUP, ""), 0 !== this._lastMap.get(i4).size && this._lastMap.get(i4).has(t3) && (o3 = (n3 = this._lastMap.get(i4).get(t3)).length - 1, s4 > n3[0]) && s4 < n3[o3] ? (n3.push(s4), n3.sort(), this._lastMap.get(i4).set(t3, n3)) : this._addCurrentMap(e3), 0));
+ var t3, n3, o3, i4 = e3.key, a3 = e3.message;
+ return !(N3(i4) || !this._lastMap.has(i4) || !this._currentMap.has(i4) || (t3 = a3.conversationID, a3 = a3.sequence, t3 = t3.replace(R2.CONV_GROUP, ""), 0 !== this._lastMap.get(i4).size && this._lastMap.get(i4).has(t3) && (o3 = (n3 = this._lastMap.get(i4).get(t3)).length - 1, a3 > n3[0]) && a3 < n3[o3] ? (n3.push(a3), n3.sort(), this._lastMap.get(i4).set(t3, n3)) : this._addCurrentMap(e3), 0));
} }, { key: "_addCurrentMap", value: function(e3) {
var t3 = e3.key, e3 = e3.message, n3 = e3.conversationID, e3 = e3.sequence, n3 = n3.replace(R2.CONV_GROUP, "");
this._currentMap.get(t3).has(n3) || this._currentMap.get(t3).set(n3, []), this._currentMap.get(t3).get(n3).push(e3);
@@ -16584,8 +16591,8 @@ var chat = { exports: {} };
var t3, n3 = this._lastMap.get(e3), o3 = F2(this._currentMap.get(e3));
try {
for (o3.s(); !(t3 = o3.n()).done; ) {
- var i4 = j2(t3.value, 2), s4 = i4[0], a3 = i4[1];
- n3.set(s4, a3);
+ var i4 = j2(t3.value, 2), a3 = i4[0], s4 = i4[1];
+ n3.set(a3, s4);
}
} catch (e4) {
o3.e(e4);
@@ -16599,12 +16606,12 @@ var chat = { exports: {} };
return N3(this._currentMap.get(e3)) || N3(this._lastMap.get(e3)) ? null : 0 === this._lastMap.get(e3).size ? (this._copyData(e3), null) : (i4 = o3 = 0, this._lastMap.get(e3).forEach(function(e4, t4) {
var e4 = d2(e4.values()), n3 = e4.length, e4 = e4[n3 - 1] - e4[0] + 1;
o3 += e4, i4 += n3;
- }), 0 === o3 ? null : (100 < (t3 = Kt2(i4 / o3 * 100, 2)) && (t3 = 100), this._copyData(e3), { totalCount: o3, successCountOfMessageReceived: i4, successRateOfMessageReceived: t3 }));
+ }), 0 === o3 ? null : (100 < (t3 = jt2(i4 / o3 * 100, 2)) && (t3 = 100), this._copyData(e3), { totalCount: o3, successCountOfMessageReceived: i4, successRateOfMessageReceived: t3 }));
} }, { key: "reset", value: function() {
this._currentMap.clear(), this._lastMap.clear();
- } }]), Us = (t2(ga, c2), e2(ga, [{ key: "_onLoginSuccess", value: function() {
+ } }]), Ba = (t2(Cs, c2), e2(Cs, [{ key: "_onLoginSuccess", value: function() {
var t3 = this, e3 = (this._rateMessageSent.initMap(this._messageSentItems), this._rateMessageReceived.initMap(this._messageReceivedItems), this.get(13)), n3 = e3.getItem(this.TAG, false);
- !S2(n3) && ct2(n3.forEach) && (M2.l("".concat(this._n, "._onLoginSuccess. logs count:").concat(n3.length)), n3.forEach(function(e4) {
+ !S2(n3) && dt2(n3.forEach) && (M2.l("".concat(this._n, "._onLoginSuccess. logs count:").concat(n3.length)), n3.forEach(function(e4) {
t3._statInfoArr.push(e4);
}), e3.removeItem(this.TAG, false));
} }, { key: "_onCloudConfig", value: function() {
@@ -16633,24 +16640,24 @@ var chat = { exports: {} };
} }, { key: "addMessageSequence", value: function(e3) {
this._rateMessageReceived.addMessageSequence(e3) || M2.w("".concat(this._n, ".addMessageSequence invalid key:"), e3.key);
} }, { key: "_getQualityItem", value: function(e3) {
- var t3 = {}, n3 = eo[this.get(15).getNetworkType()], n3 = (N3(n3) && (n3 = 8), { qualityType: Qn[e3], timestamp: He2(), networkType: n3, extension: "" });
+ var t3 = {}, n3 = oo[this.get(15).getNetworkType()], n3 = (N3(n3) && (n3 = 8), { qualityType: to[e3], timestamp: Ye2(), networkType: n3, extension: "" });
switch (e3) {
- case Bn:
+ case Wn:
t3 = this._avgRTT.getStatResult();
break;
- case Hn:
+ case Yn:
t3 = this._avgE2EDelay.getStatResult();
break;
- case Kn:
- case Wn:
- case Yn:
case jn:
case Jn:
- t3 = this._rateMessageSent.getStatResult(e3);
- break;
case zn:
case Xn:
case Zn:
+ t3 = this._rateMessageSent.getStatResult(e3);
+ break;
+ case Qn:
+ case $n:
+ case eo:
t3 = this._rateMessageReceived.getStatResult(e3);
}
return null === t3 ? null : y2(y2({}, n3), t3);
@@ -16658,9 +16665,9 @@ var chat = { exports: {} };
var t3 = this, n3 = [], o3 = null, e3 = (N3(e3) ? this._qualityItems.forEach(function(e4) {
null !== (o3 = t3._getQualityItem(e4)) && (o3.reportIndex = t3.reportIndex, o3.wholePeriod = t3.wholePeriod, n3.push(o3));
}) : null !== (o3 = this._getQualityItem(e3)) && (o3.reportIndex = this.reportIndex, o3.wholePeriod = this.wholePeriod, n3.push(o3)), M2.d("".concat(this._n, "._report"), n3), 0 < this._statInfoArr.length && (n3 = n3.concat(this._statInfoArr), this._statInfoArr = []), this.get(12)), i4 = e3.getSDKAppID(), e3 = e3.getTinyID();
- 0 < (n3 = Wt2(this.REPORT_SDKAPPID_BLACKLIST, i4) && !Yt2(this.REPORT_TINYID_WHITELIST, e3) ? [] : n3).length && this._doReport(n3);
+ 0 < (n3 = Jt2(this.REPORT_SDKAPPID_BLACKLIST, i4) && !zt(this.REPORT_TINYID_WHITELIST, e3) ? [] : n3).length && this._doReport(n3);
} }, { key: "_doReport", value: function(t3) {
- var n3 = this, e3 = { header: yi(this), quality: t3 };
+ var n3 = this, e3 = { header: ki(this), quality: t3 };
this.req({ P: G2.SSO_STAT, data: y2({}, e3) }).then(function() {
n3.reportIndex++, n3.wholePeriod = false;
}).catch(function(e4) {
@@ -16671,11 +16678,13 @@ var chat = { exports: {} };
S2(t3) ? (M2.l("".concat(o3, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false)) : (10 < (n3 = n3.concat(t3)).length && (n3 = n3.slice(0, 10)), M2.l("".concat(o3, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false)), this._statInfoArr = [];
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._report(), this.reportIndex = 0, this.wholePeriod = false, this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [], this._avgRTT.reset(), this._avgE2EDelay.reset(), this._rateMessageSent.reset(), this._rateMessageReceived.reset();
- } }])), bs = e2(function e3(t3) {
+ } }])), Ha = e2(function e3(t3) {
p3(this, e3), S2(t3) || (this.userID = t3.userID || "", this.nick = t3.nick || "", this.avatar = t3.avatar || "", this.time = t3.time || 0, this.source = t3.source || "", this.wording = t3.wording || "", this.type = t3.type || "");
- }), ws = e2(function e3(t3) {
+ }), Ka = e2(function e3(t3) {
p3(this, e3), this._snsM = t3, this._n = "FriendApplicationHandler", this._startTime = 0, this._maxLimited = 100, this._currentSeq = 0, this._map = /* @__PURE__ */ new Map(), this._unreadCount = 0;
- }, [{ key: "getLocalApplicationList", value: function() {
+ }, [{ key: "updateCacheOnReconnected", value: function() {
+ this._startTime = 0, this._currentSeq = 0, this.getApplicationList();
+ } }, { key: "getLocalApplicationList", value: function() {
return { friendApplicationList: d2(this._map.values()), unreadCount: this._unreadCount };
} }, { key: "_onApplicationListUpdated", value: function() {
this._snsM.emitOEvt(h2.FRIEND_APPLICATION_LIST_UPDATED, { friendApplicationList: d2(this._map.values()), unreadCount: this._unreadCount });
@@ -16685,39 +16694,39 @@ var chat = { exports: {} };
var n3, o3, i4 = this;
S2(e3) || (n3 = "", n3 = t3 === this._snsM.getMyUserID() ? R2.SNS_APPLICATION_SENT_BY_ME : R2.SNS_APPLICATION_SENT_TO_ME, o3 = false, e3.forEach(function(e4) {
var t4 = "".concat(e4.userID, "_").concat(n3);
- n3 !== R2.SNS_APPLICATION_SENT_TO_ME || i4._map.has(t4) || (i4._unreadCount += 1), i4._map.set(t4, new bs(y2(y2({}, e4), {}, { type: n3 }))), o3 = true;
+ n3 !== R2.SNS_APPLICATION_SENT_TO_ME || i4._map.has(t4) || (i4._unreadCount += 1), i4._map.set(t4, new Ha(y2(y2({}, e4), {}, { type: n3 }))), o3 = true;
}), o3 && this._onApplicationListUpdated());
} }, { key: "onApplicationDeleted", value: function(e3) {
S2(e3) || (this._startTime = 0, this._currentSeq = 0, this.getApplicationList());
} }, { key: "getApplicationList", value: function() {
- var s4 = this, a3 = "".concat(this._n, ".").concat("getApplicationList"), r4 = new P2("getApplicationList");
+ var a3 = this, s4 = "".concat(this._n, ".").concat("getApplicationList"), r4 = new P2("getApplicationList");
return this._snsM.req({ P: G2.GET_FD_APPLICATION_LIST, data: { applicationType: R2.SNS_APPLICATION_TYPE_BOTH, fromAccount: this._snsM.getMyUserID(), maxLimited: this._maxLimited, startTime: this._startTime, lastSequence: this._currentSeq } }).then(function(e3) {
- var e3 = e3.data, t3 = e3.resultList, n3 = e3.unreadCount, o3 = e3.startTime, e3 = e3.currentSequence, i4 = (s4._startTime = o3, s4._currentSeq = e3, s4._unreadCount = n3, O2(t3) ? t3.length : 0), i4 = "applicationCount:".concat(i4, " unreadCount:").concat(n3, " startTime:").concat(o3, " currentSequence:").concat(e3);
- r4.setMessage(i4).end(), M2.i("".concat(a3, " ok. ").concat(i4)), s4._map.clear(), O2(t3) && t3.forEach(function(e4) {
- var t4 = e4.userID, n4 = e4.type, e4 = new bs(e4);
- s4._map.set("".concat(t4, "_").concat(n4), e4);
- }), s4._onApplicationListUpdated();
+ var e3 = e3.data, t3 = e3.resultList, n3 = e3.unreadCount, o3 = e3.startTime, e3 = e3.currentSequence, i4 = (a3._startTime = o3, a3._currentSeq = e3, a3._unreadCount = n3, O2(t3) ? t3.length : 0), i4 = "applicationCount:".concat(i4, " unreadCount:").concat(n3, " startTime:").concat(o3, " currentSequence:").concat(e3);
+ r4.setMessage(i4).end(), M2.i("".concat(s4, " ok. ").concat(i4)), a3._map.clear(), O2(t3) && t3.forEach(function(e4) {
+ var t4 = e4.userID, n4 = e4.type, e4 = new Ha(e4);
+ a3._map.set("".concat(t4, "_").concat(n4), e4);
+ }), a3._onApplicationListUpdated();
}).catch(function(e3) {
- return r4.setError(e3).end(), M2.w("".concat(a3, " failed. error:"), e3), E2(e3);
+ return r4.setError(e3).end(), M2.w("".concat(s4, " failed. error:"), e3), E2(e3);
});
} }, { key: "deleteApplication", value: function(e3) {
- var i4, s4 = "".concat(this._n, ".").concat("deleteApplication"), a3 = e3.userID, r4 = e3.type;
- return r4 && (r4 === R2.SNS_APPLICATION_SENT_BY_ME || r4 === R2.SNS_APPLICATION_SENT_TO_ME) || (r4 = R2.SNS_APPLICATION_SENT_TO_ME), this._map.has("".concat(a3, "_").concat(r4)) ? ((i4 = new P2("deleteApplication")).setMessage("userID:".concat(a3, " type:").concat(r4)), this._snsM.req({ P: G2.DEL_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), userIDList: [a3], type: r4 } }).then(function(e4) {
+ var i4, a3 = "".concat(this._n, ".").concat("deleteApplication"), s4 = e3.userID, r4 = e3.type;
+ return r4 && (r4 === R2.SNS_APPLICATION_SENT_BY_ME || r4 === R2.SNS_APPLICATION_SENT_TO_ME) || (r4 = R2.SNS_APPLICATION_SENT_TO_ME), this._map.has("".concat(s4, "_").concat(r4)) ? ((i4 = new P2("deleteApplication")).setMessage("userID:".concat(s4, " type:").concat(r4)), this._snsM.req({ P: G2.DEL_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), userIDList: [s4], type: r4 } }).then(function(e4) {
var e4 = e4.data.resultList, t3 = e4[0], n3 = t3.to, o3 = t3.resultCode, t3 = t3.resultInfo;
- return i4.setMoreMessage("resultList:".concat(JSON.stringify(e4))).end(), M2.i("".concat(s4, " ok. userID:").concat(a3, " type:").concat(r4)), 0 === o3 ? T2() : E2({ userID: n3, code: o3, message: t3 });
+ return i4.setMoreMessage("resultList:".concat(JSON.stringify(e4))).end(), M2.i("".concat(a3, " ok. userID:").concat(s4, " type:").concat(r4)), 0 === o3 ? T2() : E2({ userID: n3, code: o3, message: t3 });
}).catch(function(e4) {
- return i4.setError(e4).end(), M2.w("".concat(s4, " failed. error:"), e4), E2(e4);
+ return i4.setError(e4).end(), M2.w("".concat(a3, " failed. error:"), e4), E2(e4);
})) : E2({ code: k2.FRIEND_APPLICATION_NOT_EXIST });
} }, { key: "acceptApplication", value: function(e3) {
- var n3 = "".concat(this._n, ".").concat("acceptApplication"), o3 = e3.userID, t3 = e3.remark, i4 = e3.tag, s4 = e3.type, a3 = (s4 && (s4 === R2.SNS_APPLICATION_AGREE || s4 === R2.SNS_APPLICATION_AGREE_AND_ADD) || (s4 = R2.SNS_APPLICATION_AGREE_AND_ADD), new P2("acceptApplication"));
- return a3.setMessage("userID:".concat(o3, " type:").concat(s4)), this._snsM.req({ P: G2.RESPOND_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), responseFriendItem: [{ userID: o3, remark: t3, tag: i4, action: s4 }] } }).then(function(e4) {
- a3.end();
+ var n3 = "".concat(this._n, ".").concat("acceptApplication"), o3 = e3.userID, t3 = e3.remark, i4 = e3.tag, a3 = e3.type, s4 = (a3 && (a3 === R2.SNS_APPLICATION_AGREE || a3 === R2.SNS_APPLICATION_AGREE_AND_ADD) || (a3 = R2.SNS_APPLICATION_AGREE_AND_ADD), new P2("acceptApplication"));
+ return s4.setMessage("userID:".concat(o3, " type:").concat(a3)), this._snsM.req({ P: G2.RESPOND_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), responseFriendItem: [{ userID: o3, remark: t3, tag: i4, action: a3 }] } }).then(function(e4) {
+ s4.end();
var e4 = e4.data.resultList[0], t4 = e4.resultCode, e4 = e4.resultInfo;
if (0 !== t4)
return E2({ code: t4, message: e4 });
- M2.i("".concat(n3, " ok. userID:").concat(o3, " type:").concat(s4));
+ M2.i("".concat(n3, " ok. userID:").concat(o3, " type:").concat(a3));
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.w("".concat(n3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.w("".concat(n3, " failed. error:"), e4), E2(e4);
});
} }, { key: "refuseApplication", value: function(e3) {
var n3 = "".concat(this._n, ".").concat("refuseApplication"), o3 = e3.userID, i4 = new P2("refuseApplication");
@@ -16732,87 +16741,87 @@ var chat = { exports: {} };
});
} }, { key: "setApplicationRead", value: function() {
var t3 = this, n3 = "".concat(this._n, ".").concat("setApplicationRead"), o3 = new P2("setApplicationRead");
- return this._snsM.req({ P: G2.REPORT_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), latestTimeStamp: Kt2(He2() / 1e3, 0) } }).then(function(e3) {
+ return this._snsM.req({ P: G2.REPORT_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), latestTimeStamp: jt2(Ye2() / 1e3, 0) } }).then(function(e3) {
o3.end(), M2.i("".concat(n3, " ok")), t3._unreadCount = 0;
}).catch(function(e3) {
return o3.setError(e3).end(), M2.w("".concat(n3, " failed. error:"), e3), E2(e3);
});
} }, { key: "reset", value: function() {
- this._maxLimited = 100, this._currentSeq = 0, this._unreadCount = 0, this._map.clear();
- } }]), Fs = e2(function e3(t3, n3) {
+ this._maxLimited = 100, this._startTime = 0, this._currentSeq = 0, this._unreadCount = 0, this._map.clear();
+ } }]), Wa = e2(function e3(t3, n3) {
p3(this, e3), this.userID = t3, this.remark = "", this.groupList = [], this.source = "", this.addTime = 0, this.friendCustomField = [], this.timestamp = 0;
var o3 = {}, i4 = [];
if (o3.userID = t3, !S2(n3))
- for (var s4, a3 = "", r4 = 0, c3 = n3.length; r4 < c3; r4++)
- if (a3 = n3[r4].tag, s4 = n3[r4].value, -1 < a3.indexOf("Tag_SNS_Custom"))
- this.friendCustomField.push({ key: a3, value: s4 });
- else if (-1 < a3.indexOf("Tag_Profile_Custom"))
- i4.push({ key: a3, value: s4 });
+ for (var a3, s4 = "", r4 = 0, c3 = n3.length; r4 < c3; r4++)
+ if (s4 = n3[r4].tag, a3 = n3[r4].value, -1 < s4.indexOf("Tag_SNS_Custom"))
+ this.friendCustomField.push({ key: s4, value: a3 });
+ else if (-1 < s4.indexOf("Tag_Profile_Custom"))
+ i4.push({ key: s4, value: a3 });
else
- switch (a3) {
+ switch (s4) {
case f2.NICK:
- o3.nick = s4;
+ o3.nick = a3;
break;
case f2.GENDER:
- o3.gender = s4;
+ o3.gender = a3;
break;
case f2.BIRTHDAY:
- o3.birthday = s4;
+ o3.birthday = a3;
break;
case f2.LOCATION:
- o3.location = s4;
+ o3.location = a3;
break;
case f2.SELFSIGNATURE:
- o3.selfSignature = s4;
+ o3.selfSignature = a3;
break;
case f2.ALLOWTYPE:
- o3.allowType = s4;
+ o3.allowType = a3;
break;
case f2.LANGUAGE:
- o3.language = s4;
+ o3.language = a3;
break;
case f2.AVATAR:
- o3.avatar = s4;
+ o3.avatar = a3;
break;
case f2.MESSAGESETTINGS:
- o3.messageSettings = s4;
+ o3.messageSettings = a3;
break;
case f2.ADMINFORBIDTYPE:
- o3.adminForbidType = s4;
+ o3.adminForbidType = a3;
break;
case f2.LEVEL:
- o3.level = s4;
+ o3.level = a3;
break;
case f2.ROLE:
- o3.role = s4;
+ o3.role = a3;
break;
- case Je2.REMARK:
- this.remark = s4;
+ case Ze2.REMARK:
+ this.remark = a3;
break;
- case Je2.ADDTIME:
- this.addTime = s4;
+ case Ze2.ADDTIME:
+ this.addTime = a3;
break;
- case Je2.GROUP:
- this.groupList = JSON.parse(JSON.stringify(s4));
+ case Ze2.GROUP:
+ this.groupList = JSON.parse(JSON.stringify(a3));
break;
- case Je2.ADDSOURCE:
- this.source = s4;
+ case Ze2.ADDSOURCE:
+ this.source = a3;
break;
- case Je2.ADDWORDING:
+ case Ze2.ADDWORDING:
break;
default:
M2.l("snsProfileItem unknown tag->", n3[r4].tag);
}
- this.profile = new bo(y2(y2({}, o3), {}, { profileCustomField: i4 }));
+ this.profile = new Ho(y2(y2({}, o3), {}, { profileCustomField: i4 }));
}, [{ key: "validate", value: function(e3) {
var t3, n3 = true, o3 = "";
if (S2(e3))
return { valid: false, tips: "empty options" };
if (e3.profileCustomField)
- for (var i4 = e3.profileCustomField.length, s4 = null, a3 = 0; a3 < i4; a3++) {
- if (s4 = e3.profileCustomField[a3], !C2(s4.key) || -1 === s4.key.indexOf("Tag_Profile_Custom"))
+ for (var i4 = e3.profileCustomField.length, a3 = null, s4 = 0; s4 < i4; s4++) {
+ if (a3 = e3.profileCustomField[s4], !C2(a3.key) || -1 === a3.key.indexOf("Tag_Profile_Custom"))
return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" };
- if (!C2(s4.value))
+ if (!C2(a3.value))
return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" };
}
for (t3 in e3)
@@ -16825,10 +16834,10 @@ var chat = { exports: {} };
}
switch (t3) {
case "nick":
- C2(e3[t3]) || (n3 = !(o3 = "nick must be a string")), 500 < _t2(e3[t3]) && (o3 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(_t2(e3[t3]), " bytes"), n3 = false);
+ C2(e3[t3]) || (n3 = !(o3 = "nick must be a string")), 500 < ft2(e3[t3]) && (o3 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(ft2(e3[t3]), " bytes"), n3 = false);
break;
case "gender":
- ft2(ze2, e3.gender) || (o3 = "key:gender, invalid value:" + e3.gender, n3 = false);
+ It2(Qe2, e3.gender) || (o3 = "key:gender, invalid value:" + e3.gender, n3 = false);
break;
case "birthday":
A2(e3.birthday) || (n3 = !(o3 = "birthday must be a number"));
@@ -16840,7 +16849,7 @@ var chat = { exports: {} };
C2(e3.selfSignature) || (n3 = !(o3 = "selfSignature must be a string"));
break;
case "allowType":
- ft2(Ze2, e3.allowType) || (o3 = "key:allowType, invalid value:" + e3.allowType, n3 = false);
+ It2(et2, e3.allowType) || (o3 = "key:allowType, invalid value:" + e3.allowType, n3 = false);
break;
case "language":
A2(e3.language) || (n3 = !(o3 = "language must be a number"));
@@ -16852,7 +16861,7 @@ var chat = { exports: {} };
0 !== e3.messageSettings && 1 !== e3.messageSettings && (n3 = !(o3 = "messageSettings must be 0 or 1"));
break;
case "adminForbidType":
- ft2(Xe2, e3.adminForbidType) || (o3 = "key:adminForbidType, invalid value:" + e3.adminForbidType, n3 = false);
+ It2($e2, e3.adminForbidType) || (o3 = "key:adminForbidType, invalid value:" + e3.adminForbidType, n3 = false);
break;
case "level":
A2(e3.level) || (n3 = !(o3 = "level must be a number"));
@@ -16866,14 +16875,14 @@ var chat = { exports: {} };
}
return { valid: n3, tips: o3 };
} }, { key: "update", value: function(e3) {
- var n3 = this, o3 = "", i4 = "", s4 = [];
+ var n3 = this, o3 = "", i4 = "", a3 = [];
this.friendCustomField.forEach(function(e4) {
- s4.push(e4.key);
+ a3.push(e4.key);
});
- for (var a3 = 0, t3 = e3.length; a3 < t3; a3++)
+ for (var s4 = 0, t3 = e3.length; s4 < t3; s4++)
!function() {
- if (o3 = e3[a3].tag, i4 = e3[a3].value, -1 < o3.indexOf("Tag_SNS_Custom"))
- -1 < s4.indexOf(o3) ? n3.friendCustomField.forEach(function(e4) {
+ if (o3 = e3[s4].tag, i4 = e3[s4].value, -1 < o3.indexOf("Tag_SNS_Custom"))
+ -1 < a3.indexOf(o3) ? n3.friendCustomField.forEach(function(e4) {
e4.key === o3 && (e4.value = i4);
}) : n3.friendCustomField.push({ key: o3, value: i4 });
else if (-1 < o3.indexOf("Tag_Profile_Custom")) {
@@ -16919,25 +16928,25 @@ var chat = { exports: {} };
case f2.ROLE:
n3.profile.role = i4;
break;
- case Je2.REMARK:
+ case Ze2.REMARK:
n3.remark = i4;
break;
- case Je2.ADDTIME:
+ case Ze2.ADDTIME:
n3.addTime = i4;
break;
- case Je2.GROUP:
+ case Ze2.GROUP:
n3.groupList = JSON.parse(JSON.stringify(i4));
break;
- case Je2.ADDSOURCE:
+ case Ze2.ADDSOURCE:
n3.source = i4;
break;
- case Je2.ADDWORDING:
+ case Ze2.ADDWORDING:
break;
default:
- M2.d("snsProfileItem unkown tag->", e3[a3].tag);
+ M2.d("snsProfileItem unkown tag->", e3[s4].tag);
}
}();
- this.timestamp = Date.now(), s4.length = 0;
+ this.timestamp = Date.now(), a3.length = 0;
} }, { key: "updateProfile", value: function(e3) {
this.profile = JSON.parse(JSON.stringify(e3)), this.timestamp = Date.now();
} }, { key: "addToGroupList", value: function(e3) {
@@ -16945,9 +16954,11 @@ var chat = { exports: {} };
} }, { key: "removeFromGroupList", value: function(e3) {
e3 = this.groupList.indexOf(e3);
-1 < e3 && (this.groupList.splice(e3, 1), this.count = this.groupList.length);
- } }]), qs = e2(function e3(t3) {
+ } }]), Ya = e2(function e3(t3) {
p3(this, e3), this._snsM = t3, this._n = "FriendHandler", this._map = /* @__PURE__ */ new Map(), this._startIdx = 0, this._standardSeq = 0, this._customSeq = 0, this._expirationTime = 18e4;
- }, [{ key: "getLocalFriendList", value: function() {
+ }, [{ key: "updateCacheOnReconnected", value: function() {
+ this._startIdx = 0, this._standardSeq = 0, this._customSeq = 0, this.pagingGetFriendList();
+ } }, { key: "getLocalFriendList", value: function() {
return d2(this._map.values());
} }, { key: "getFriendRemark", value: function(e3) {
return this._map.has(e3) ? this._map.get(e3).remark : "";
@@ -16960,7 +16971,7 @@ var chat = { exports: {} };
} }, { key: "onFriendAdded", value: function(t3) {
var n3 = this;
0 !== t3.length && (M2.l("".concat(this._n, ".onFriendAdded userIDList:").concat(t3)), t3.forEach(function(e3) {
- n3._map.set(e3, new Fs(e3));
+ n3._map.set(e3, new Wa(e3));
}), this.getFriendProfile({ userIDList: t3 }).then(function(e3) {
t3.forEach(function(e4) {
var t4 = n3._map.get(e4);
@@ -16976,85 +16987,85 @@ var chat = { exports: {} };
} }, { key: "_onFriendListUpdated", value: function() {
this._snsM.emitOEvt(h2.FRIEND_LIST_UPDATED), this._snsM.get(11).checkAndPatchRemark();
} }, { key: "getFriendProfile", value: function(e3) {
- var t3, s4 = this, n3 = "".concat(this._n, ".").concat("getFriendProfile"), e3 = e3.userIDList, a3 = [], r4 = [], o3 = [];
+ var t3, a3 = this, n3 = "".concat(this._n, ".").concat("getFriendProfile"), e3 = e3.userIDList, s4 = [], r4 = [], o3 = [];
return e3.forEach(function(e4) {
var t4;
- s4._map.has(e4) ? (t4 = s4._map.get(e4), Date.now() - t4.timestamp < s4._expirationTime ? r4.push(t4) : o3.push(e4)) : a3.push({ userID: e4, code: k2.NOT_MY_FRIEND, message: s4._snsM.getErrMsg(k2.NOT_MY_FRIEND) });
- }), 0 === o3.length ? (M2.i("".concat(n3, " newUserIDList is empty")), D2({ friendList: r4, failureUserIDList: a3 })) : ((t3 = new P2("getFriendProfile")).setMessage("userIDList:".concat(o3)), M2.i("".concat(n3, " userIDList:").concat(o3)), this._snsM.req({ P: G2.GET_FD_PROFILE, data: { fromAccount: this._snsM.getMyUserID(), userIDList: o3 } }).then(function(e4) {
+ a3._map.has(e4) ? (t4 = a3._map.get(e4), Date.now() - t4.timestamp < a3._expirationTime ? r4.push(t4) : o3.push(e4)) : s4.push({ userID: e4, code: k2.NOT_MY_FRIEND, message: a3._snsM.getErrMsg(k2.NOT_MY_FRIEND) });
+ }), 0 === o3.length ? (M2.i("".concat(n3, " newUserIDList is empty")), D2({ friendList: r4, failureUserIDList: s4 })) : ((t3 = new P2("getFriendProfile")).setMessage("userIDList:".concat(o3)), M2.i("".concat(n3, " userIDList:").concat(o3)), this._snsM.req({ P: G2.GET_FD_PROFILE, data: { fromAccount: this._snsM.getMyUserID(), userIDList: o3 } }).then(function(e4) {
return t3.end(), M2.i("".concat(n3, " ok")), e4.data.resultList.forEach(function(e5) {
var t4, n4 = e5.to, o4 = e5.resultCode, i4 = e5.resultInfo, e5 = e5.tagValueList;
- N3(o4) || 0 === o4 ? (s4._map.has(n4) ? (t4 = s4._map.get(n4)).update(e5) : (t4 = new Fs(n4, e5), s4._map.set(n4, t4)), r4.push(t4)) : a3.push({ userID: n4, code: o4, message: i4 });
- }), T2({ friendList: r4, failureUserIDList: a3 });
+ N3(o4) || 0 === o4 ? (a3._map.has(n4) ? (t4 = a3._map.get(n4)).update(e5) : (t4 = new Wa(n4, e5), a3._map.set(n4, t4)), r4.push(t4)) : s4.push({ userID: n4, code: o4, message: i4 });
+ }), T2({ friendList: r4, failureUserIDList: s4 });
}).catch(function(e4) {
return t3.setError(e4).end(), M2.w("".concat(n3, " failed. error:"), e4), E2(e4);
}));
} }, { key: "isMyFriend", value: function(e3) {
return this._map.has(e3);
} }, { key: "pagingGetFriendList", value: function() {
- var a3 = this, r4 = "".concat(this._n, ".").concat("getFriendList"), c3 = new P2("getFriendList"), u3 = Date.now();
+ var s4 = this, r4 = "".concat(this._n, ".").concat("getFriendList"), c3 = new P2("getFriendList"), u3 = Date.now();
this._snsM.req({ P: G2.GET_FD_LIST, data: { fromAccount: this._snsM.getMyUserID(), startIndex: this._startIdx, standardSequence: this._standardSeq, customSequence: this._customSeq } }).then(function(e3) {
- var e3 = e3.data, t3 = e3.friendCount, n3 = e3.resultList, o3 = e3.nextStartIndex, i4 = e3.standardSequence, s4 = e3.customSequence, e3 = e3.completeFlag, t3 = (a3._startIdx = o3, a3._standardSeq = i4, a3._customSeq = s4, "friendCount:".concat(t3, " nextStartIndex:").concat(o3, " standardSequence:").concat(i4, " ") + "customSequence:".concat(s4, " completeFlag:").concat(e3, " cost:").concat(tn(u3)));
+ var e3 = e3.data, t3 = e3.friendCount, n3 = e3.resultList, o3 = e3.nextStartIndex, i4 = e3.standardSequence, a3 = e3.customSequence, e3 = e3.completeFlag, t3 = (s4._startIdx = o3, s4._standardSeq = i4, s4._customSeq = a3, "friendCount:".concat(t3, " nextStartIndex:").concat(o3, " standardSequence:").concat(i4, " ") + "customSequence:".concat(a3, " completeFlag:").concat(e3, " cost:").concat(an(u3)));
c3.setMessage(t3).end(), M2.i("".concat(r4, " ok."), t3), S2(n3) || n3.forEach(function(e4) {
var t4 = e4.to, e4 = e4.tagValueList;
- a3._map.set(t4, new Fs(t4, e4));
- }), 0 === e3 ? a3.pagingGetFriendList() : (a3._snsM.emitOEvt(h2.FRIEND_LIST_UPDATED), a3._pagingGetFriendProfile());
+ s4._map.set(t4, new Wa(t4, e4));
+ }), 0 === e3 ? s4.pagingGetFriendList() : (s4._snsM.emitOEvt(h2.FRIEND_LIST_UPDATED), s4._pagingGetFriendProfile());
}).catch(function(e3) {
return c3.setError(e3).end(), M2.w("".concat(r4, " failed. error:"), e3), E2(e3);
});
} }, { key: "_pagingGetFriendProfile", value: function() {
var n3 = this, e3 = d2(this._map.keys()), t3 = this._snsM.get(4), o3 = e3.length, i4 = o3 <= 100 ? 1 : Math.ceil(o3 / 100);
M2.l("".concat(this._n, "._pagingGetFriendProfile friendCount:").concat(o3, " pageCount:").concat(i4));
- for (var s4 = 0; s4 < i4; s4++)
- t3.getUserProfile({ userIDList: e3.slice(100 * s4, 100 * (s4 + 1)) }).then(function(e4) {
+ for (var a3 = 0; a3 < i4; a3++)
+ t3.getUserProfile({ userIDList: e3.slice(100 * a3, 100 * (a3 + 1)) }).then(function(e4) {
e4.data.forEach(function(e5) {
var t4 = n3._map.get(e5.userID);
t4 && t4.updateProfile(e5);
}), n3._onFriendListUpdated();
});
} }, { key: "addFriend", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4, c3 = this, u3 = "".concat(this._n, ".").concat("addFriend");
- return e3.wording && false === this._snsM.filterProfanity("wording", e3) ? E2({ code: k2.PROFANITY_FOUND }) : (t3 = e3.to, n3 = e3.source, o3 = e3.type, i4 = e3.wording, s4 = e3.remark, e3 = e3.groupName, (a3 = o3) && (a3 === R2.SNS_ADD_TYPE_SINGLE || a3 === R2.SNS_ADD_TYPE_BOTH) || (a3 = R2.SNS_ADD_TYPE_BOTH), (r4 = new P2("addFriend")).setMessage("to:".concat(t3, " source:").concat(n3, " type:").concat(a3)), this._snsM.req({ P: G2.ADD_FD, data: { fromAccount: this._snsM.getMyUserID(), addFriendItem: [{ to: t3, source: n3, wording: i4, remark: s4, groupName: e3 }], type: a3 } }).then(function(e4) {
+ var t3, n3, o3, i4, a3, s4, r4, c3 = this, u3 = "".concat(this._n, ".").concat("addFriend");
+ return e3.wording && false === this._snsM.filterProfanity("wording", e3) ? E2({ code: k2.PROFANITY_FOUND }) : (t3 = e3.to, n3 = e3.source, o3 = e3.type, i4 = e3.wording, a3 = e3.remark, e3 = e3.groupName, (s4 = o3) && (s4 === R2.SNS_ADD_TYPE_SINGLE || s4 === R2.SNS_ADD_TYPE_BOTH) || (s4 = R2.SNS_ADD_TYPE_BOTH), (r4 = new P2("addFriend")).setMessage("to:".concat(t3, " source:").concat(n3, " type:").concat(s4)), this._snsM.req({ P: G2.ADD_FD, data: { fromAccount: this._snsM.getMyUserID(), addFriendItem: [{ to: t3, source: n3, wording: i4, remark: a3, groupName: e3 }], type: s4 } }).then(function(e4) {
var e4 = e4.data.resultList, e4 = (r4.setMoreMessage("resultList:".concat(JSON.stringify(e4))).end(), e4[0]), t4 = e4.to, n4 = e4.resultCode, e4 = e4.resultInfo;
- return M2.i("".concat(u3, " ok. to:").concat(t4, " type:").concat(a3, " code:").concat(n4)), N3(n4) || 0 === n4 ? T2({ userID: t4, code: 0 }) : 30539 === n4 ? T2({ userID: t4, code: n4, message: c3._snsM.getErrMsg(n4) }) : E2({ userID: t4, code: n4, message: c3._snsM.getErrMsg(n4) || e4 });
+ return M2.i("".concat(u3, " ok. to:").concat(t4, " type:").concat(s4, " code:").concat(n4)), N3(n4) || 0 === n4 ? T2({ userID: t4, code: 0 }) : 30539 === n4 ? T2({ userID: t4, code: n4, message: c3._snsM.getErrMsg(n4) }) : E2({ userID: t4, code: n4, message: c3._snsM.getErrMsg(n4) || e4 });
}).catch(function(e4) {
return r4.setError(e4).end(), M2.w("".concat(u3, " failed. error:"), e4), E2(e4);
}));
} }, { key: "deleteFriend", value: function(e3) {
- var t3, n3 = this, o3 = "".concat(this._n, ".").concat("deleteFriend"), i4 = e3.userIDList, e3 = e3.type, s4 = (1e3 < i4.length && (M2.w("".concat(o3, " ").concat(Qt2(1e3))), i4.length = 1e3), []), a3 = [], r4 = [];
+ var t3, n3 = this, o3 = "".concat(this._n, ".").concat("deleteFriend"), i4 = e3.userIDList, e3 = e3.type, a3 = (1e3 < i4.length && (M2.w("".concat(o3, " ").concat(tn(1e3))), i4.length = 1e3), []), s4 = [], r4 = [];
return i4.forEach(function(e4) {
- n3._map.has(e4) ? r4.push(e4) : s4.push({ userID: e4, code: k2.NOT_MY_FRIEND, message: n3._snsM.getErrMsg(k2.NOT_MY_FRIEND) });
- }), 0 === r4.length ? D2({ successUserIDList: a3, failureUserIDList: s4 }) : ((i4 = e3) && (i4 === R2.SNS_DELETE_TYPE_SINGLE || i4 === R2.SNS_DELETE_TYPE_BOTH) || (i4 = R2.SNS_DELETE_TYPE_BOTH), (t3 = new P2("deleteFriend")).setMessage("userIDList:".concat(r4, " type:").concat(i4)), this._snsM.req({ P: G2.DEL_FD, data: { fromAccount: this._snsM.getMyUserID(), userIDList: r4, type: i4 } }).then(function(e4) {
+ n3._map.has(e4) ? r4.push(e4) : a3.push({ userID: e4, code: k2.NOT_MY_FRIEND, message: n3._snsM.getErrMsg(k2.NOT_MY_FRIEND) });
+ }), 0 === r4.length ? D2({ successUserIDList: s4, failureUserIDList: a3 }) : ((i4 = e3) && (i4 === R2.SNS_DELETE_TYPE_SINGLE || i4 === R2.SNS_DELETE_TYPE_BOTH) || (i4 = R2.SNS_DELETE_TYPE_BOTH), (t3 = new P2("deleteFriend")).setMessage("userIDList:".concat(r4, " type:").concat(i4)), this._snsM.req({ P: G2.DEL_FD, data: { fromAccount: this._snsM.getMyUserID(), userIDList: r4, type: i4 } }).then(function(e4) {
t3.end(), M2.i("".concat(o3, " ok"));
e4 = e4.data.resultList;
return S2(e4) || e4.forEach(function(e5) {
var t4 = e5.to, n4 = e5.resultCode, e5 = e5.resultInfo;
- N3(n4) || 0 === n4 ? a3.push({ userID: t4 }) : s4.push({ userID: t4, code: n4, message: e5 });
- }), T2({ successUserIDList: a3, failureUserIDList: s4 });
+ N3(n4) || 0 === n4 ? s4.push({ userID: t4 }) : a3.push({ userID: t4, code: n4, message: e5 });
+ }), T2({ successUserIDList: s4, failureUserIDList: a3 });
}).catch(function(e4) {
return t3.setError(e4).end(), M2.w("".concat(o3, " error:"), e4), E2(e4);
}));
} }, { key: "updateFriend", value: function(e3) {
- var o3, i4, t3, s4 = this, n3 = e3.userID, a3 = e3.remark, r4 = e3.friendCustomField;
- return this._map.has(n3) ? (o3 = "".concat(this._n, ".").concat("updateFriend"), (i4 = new P2("updateFriend")).setMessage("userID:".concat(n3, " remark:").concat(a3, " friendCustomField:").concat(r4)), t3 = [], N3(a3) || t3.push({ tag: Je2.REMARK, value: a3 }), O2(r4) && 0 < r4.length && r4.forEach(function(e4) {
+ var o3, i4, t3, a3 = this, n3 = e3.userID, s4 = e3.remark, r4 = e3.friendCustomField;
+ return this._map.has(n3) ? (o3 = "".concat(this._n, ".").concat("updateFriend"), (i4 = new P2("updateFriend")).setMessage("userID:".concat(n3, " remark:").concat(s4, " friendCustomField:").concat(r4)), t3 = [], N3(s4) || t3.push({ tag: Ze2.REMARK, value: s4 }), O2(r4) && 0 < r4.length && r4.forEach(function(e4) {
t3.push({ tag: e4.key, value: e4.value });
}), this._snsM.req({ P: G2.UPDATE_FD, data: { fromAccount: this._snsM.getMyUserID(), updateItem: [{ to: n3, snsItem: t3 }] } }).then(function(e4) {
i4.end(), M2.i("".concat(o3, " ok"));
var e4 = e4.data.resultList[0], t4 = e4.to, n4 = e4.resultCode, e4 = e4.resultInfo;
- return N3(n4) || 0 === n4 ? ((t4 = s4._map.get(t4)) && (N3(a3) || (t4.remark = a3), O2(r4) && 0 < r4.length && Lt2(t4.friendCustomField, r4), s4._onFriendListUpdated()), T2(t4)) : E2({ code: n4, message: e4 });
+ return N3(n4) || 0 === n4 ? ((t4 = a3._map.get(t4)) && (N3(s4) || (t4.remark = s4), O2(r4) && 0 < r4.length && Rt2(t4.friendCustomField, r4), a3._onFriendListUpdated()), T2(t4)) : E2({ code: n4, message: e4 });
}).catch(function(e4) {
return i4.setError(e4).end(), M2.w("".concat(o3, " failed. error:"), e4), E2(e4);
})) : E2({ code: k2.NOT_MY_FRIEND });
} }, { key: "checkFriend", value: function(e3) {
- var t3 = "".concat(this._n, ".").concat("checkFriend"), n3 = e3.userIDList, o3 = e3.type, a3 = (o3 && (o3 === R2.SNS_CHECK_TYPE_SINGLE || o3 === R2.SNS_CHECK_TYPE_BOTH) || (o3 = R2.SNS_CHECK_TYPE_BOTH), new P2("checkFriend"));
- return a3.setMessage("userIDList:".concat(n3, " type:").concat(o3)), this._snsM.req({ P: G2.CHECK_FD, data: { fromAccount: this._snsM.getMyUserID(), userIDList: n3, type: o3 } }).then(function(e4) {
- a3.end(), M2.i("".concat(t3, " ok. userIDList:").concat(n3, " type:").concat(o3));
- var i4 = [], s4 = [], e4 = e4.data.resultList;
+ var t3 = "".concat(this._n, ".").concat("checkFriend"), n3 = e3.userIDList, o3 = e3.type, s4 = (o3 && (o3 === R2.SNS_CHECK_TYPE_SINGLE || o3 === R2.SNS_CHECK_TYPE_BOTH) || (o3 = R2.SNS_CHECK_TYPE_BOTH), new P2("checkFriend"));
+ return s4.setMessage("userIDList:".concat(n3, " type:").concat(o3)), this._snsM.req({ P: G2.CHECK_FD, data: { fromAccount: this._snsM.getMyUserID(), userIDList: n3, type: o3 } }).then(function(e4) {
+ s4.end(), M2.i("".concat(t3, " ok. userIDList:").concat(n3, " type:").concat(o3));
+ var i4 = [], a3 = [], e4 = e4.data.resultList;
return O2(e4) && e4.forEach(function(e5) {
var t4 = e5.to, n4 = e5.relation, o4 = e5.resultCode, e5 = e5.resultInfo;
- N3(o4) || 0 === o4 ? i4.push({ userID: t4, code: 0, relation: n4 }) : s4.push({ userID: t4, code: o4, message: e5 });
- }), T2({ successUserIDList: i4, failureUserIDList: s4 });
+ N3(o4) || 0 === o4 ? i4.push({ userID: t4, code: 0, relation: n4 }) : a3.push({ userID: t4, code: o4, message: e5 });
+ }), T2({ successUserIDList: i4, failureUserIDList: a3 });
}).catch(function(e4) {
- return a3.setError(e4).end(), M2.w("".concat(t3, " failed. error:"), e4), E2(e4);
+ return s4.setError(e4).end(), M2.w("".concat(t3, " failed. error:"), e4), E2(e4);
});
} }, { key: "onAddedToFriendGroup", value: function(e3) {
var t3 = this, n3 = e3.name, e3 = e3.userIDList;
@@ -17068,16 +17079,18 @@ var chat = { exports: {} };
});
} }, { key: "reset", value: function() {
this._map.clear(), this._startIdx = 0, this._standardSeq = 0, this._customSeq = 0;
- } }]), xs = e2(function e3(t3) {
+ } }]), ja = e2(function e3(t3) {
p3(this, e3), S2(t3) || (this.name = t3.name || "", this.userIDList = t3.userIDList || [], this.count = this.userIDList.length || 0);
}, [{ key: "addToUserIDList", value: function(e3) {
-1 === this.userIDList.indexOf(e3) && (this.userIDList.push(e3), this.count = this.userIDList.length);
} }, { key: "removeFromUserIDList", value: function(e3) {
e3 = this.userIDList.indexOf(e3);
-1 < e3 && (this.userIDList.splice(e3, 1), this.count = this.userIDList.length);
- } }]), Vs = e2(function e3(t3) {
+ } }]), Ja = e2(function e3(t3) {
p3(this, e3), this._snsM = t3, this._n = "FriendGroupHandler", this._map = /* @__PURE__ */ new Map();
- }, [{ key: "getLocalGroupList", value: function() {
+ }, [{ key: "updateCacheOnReconnected", value: function() {
+ this.getGroupList();
+ } }, { key: "getLocalGroupList", value: function() {
return d2(this._map.values());
} }, { key: "_onGroupListUpdated", value: function() {
var e3 = d2(this._map.values());
@@ -17088,69 +17101,69 @@ var chat = { exports: {} };
o3.end();
e3 = e3.data.resultList;
S2(e3) ? M2.i("".concat(t3, " ok. count:0")) : (M2.i("".concat(t3, " ok. count:").concat(e3.length)), n3._map.clear(), e3.forEach(function(e4) {
- var t4 = new xs(e4);
+ var t4 = new ja(e4);
n3._map.set(e4.name, t4);
}), n3._onGroupListUpdated());
}).catch(function(e3) {
return o3.setError(e3).end(), M2.w("".concat(t3, " error:"), e3), E2(e3);
});
} }, { key: "createGroup", value: function(e3) {
- var t3, n3, o3 = this, a3 = "".concat(this._n, ".").concat("createGroup"), r4 = e3.name, e3 = e3.userIDList;
+ var t3, n3, o3 = this, s4 = "".concat(this._n, ".").concat("createGroup"), r4 = e3.name, e3 = e3.userIDList;
return this._map.has(r4) ? E2({ code: k2.FRIEND_GRP_EXISTED }) : (t3 = "name:".concat(r4, " userIDList:").concat(e3), (n3 = new P2("createGroup")).setMessage(t3), this._snsM.req({ P: G2.CREATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), groupName: [r4], userIDList: O2(e3) ? e3 : void 0 } }).then(function(e4) {
- n3.end(), M2.l("".concat(a3, " ok. ").concat(t3));
- var e4 = e4.data.resultList, i4 = [], s4 = [], e4 = (e4 && e4.forEach(function(e5) {
+ n3.end(), M2.l("".concat(s4, " ok. ").concat(t3));
+ var e4 = e4.data.resultList, i4 = [], a3 = [], e4 = (e4 && e4.forEach(function(e5) {
var t4 = e5.to, n4 = e5.resultCode, o4 = e5.resultInfo;
- N3(n4) || 0 === n4 ? i4.push(t4) : (t4 = { userID: e5.to, code: n4, message: o4 }, s4.push(t4));
- }), new xs({ name: r4, userIDList: i4 }));
- return o3._map.set(r4, e4), o3._snsM.onAddedToFriendGroup({ name: r4, userIDList: i4 }), o3._onGroupListUpdated(), T2({ friendGroup: e4, failureUserIDList: s4 });
+ N3(n4) || 0 === n4 ? i4.push(t4) : (t4 = { userID: e5.to, code: n4, message: o4 }, a3.push(t4));
+ }), new ja({ name: r4, userIDList: i4 }));
+ return o3._map.set(r4, e4), o3._snsM.onAddedToFriendGroup({ name: r4, userIDList: i4 }), o3._onGroupListUpdated(), T2({ friendGroup: e4, failureUserIDList: a3 });
}).catch(function(e4) {
- return n3.setError(e4).end(), M2.w("".concat(a3, " failed. error:"), e4), E2(e4);
+ return n3.setError(e4).end(), M2.w("".concat(s4, " failed. error:"), e4), E2(e4);
}));
} }, { key: "deleteGroup", value: function(e3) {
- var n3, o3, i4 = this, s4 = "".concat(this._n, ".").concat("deleteGroup"), a3 = e3.name;
- return this._map.has(a3) ? (n3 = "name:".concat(a3), (o3 = new P2("deleteGroup")).setMessage(n3), this._snsM.req({ P: G2.DEL_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), nameList: [a3] } }).then(function(e4) {
- o3.end(), M2.l("".concat(s4, " ok. ").concat(n3));
- var t3 = i4._map.get(a3);
- return t3 && (i4._snsM.onRemovedFromFriendGroup({ name: a3, userIDList: t3.userIDList }), i4._map.delete(a3), t3.userIDList.length = 0), i4._onGroupListUpdated(), T2(t3);
+ var n3, o3, i4 = this, a3 = "".concat(this._n, ".").concat("deleteGroup"), s4 = e3.name;
+ return this._map.has(s4) ? (n3 = "name:".concat(s4), (o3 = new P2("deleteGroup")).setMessage(n3), this._snsM.req({ P: G2.DEL_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), nameList: [s4] } }).then(function(e4) {
+ o3.end(), M2.l("".concat(a3, " ok. ").concat(n3));
+ var t3 = i4._map.get(s4);
+ return t3 && (i4._snsM.onRemovedFromFriendGroup({ name: s4, userIDList: t3.userIDList }), i4._map.delete(s4), t3.userIDList.length = 0), i4._onGroupListUpdated(), T2(t3);
}).catch(function(e4) {
- return o3.setError(e4).end(), M2.w("".concat(s4, " failed. error:"), e4), E2(e4);
+ return o3.setError(e4).end(), M2.w("".concat(a3, " failed. error:"), e4), E2(e4);
})) : this._onGroupNotExist();
} }, { key: "renameGroup", value: function(e3) {
- var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("renameGroup"), s4 = e3.oldName, a3 = e3.newName;
- return this._map.has(s4) ? (t3 = "oldName:".concat(s4, " newName:").concat(a3), (n3 = new P2("renameGroup")).setMessage(t3), this._snsM.req({ P: G2.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: s4, newName: a3 } }).then(function() {
+ var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("renameGroup"), a3 = e3.oldName, s4 = e3.newName;
+ return this._map.has(a3) ? (t3 = "oldName:".concat(a3, " newName:").concat(s4), (n3 = new P2("renameGroup")).setMessage(t3), this._snsM.req({ P: G2.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: a3, newName: s4 } }).then(function() {
var e4;
- return n3.end(), M2.l("".concat(i4, " ok. ").concat(t3)), o3._map.has(s4) ? ((e4 = o3._map.get(s4)).name = a3, o3._map.delete(s4), o3._map.set(a3, e4), o3._snsM.onRemovedFromFriendGroup({ name: s4, userIDList: e4.userIDList }), o3._snsM.onAddedToFriendGroup({ name: a3, userIDList: e4.userIDList }), o3._onGroupListUpdated(), T2(e4)) : T2();
+ return n3.end(), M2.l("".concat(i4, " ok. ").concat(t3)), o3._map.has(a3) ? ((e4 = o3._map.get(a3)).name = s4, o3._map.delete(a3), o3._map.set(s4, e4), o3._snsM.onRemovedFromFriendGroup({ name: a3, userIDList: e4.userIDList }), o3._snsM.onAddedToFriendGroup({ name: s4, userIDList: e4.userIDList }), o3._onGroupListUpdated(), T2(e4)) : T2();
}).catch(function(e4) {
return n3.setError(e4).end(), M2.w("".concat(i4, " failed. error:"), e4), E2(e4);
})) : this._onGroupNotExist();
} }, { key: "addToGroup", value: function(e3) {
- var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("addToGroup"), s4 = e3.name, e3 = e3.userIDList;
- return this._map.has(s4) ? (t3 = "name:".concat(s4, " userIDList:").concat(e3), (n3 = new P2("addToGroup")).setMessage(t3), this._snsM.req({ P: G2.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: s4, updateGroupItem: e3.filter(function(e4) {
+ var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("addToGroup"), a3 = e3.name, e3 = e3.userIDList;
+ return this._map.has(a3) ? (t3 = "name:".concat(a3, " userIDList:").concat(e3), (n3 = new P2("addToGroup")).setMessage(t3), this._snsM.req({ P: G2.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: a3, updateGroupItem: e3.filter(function(e4) {
return o3._snsM.isMyFriend(e4);
}).map(function(e4) {
return { to: e4, updateType: "Update_Type_Add" };
}) } }).then(function(e4) {
- return n3.end(), M2.l("".concat(i4, " ok. ").concat(t3)), o3._onGroupUpdated(s4, e4);
+ return n3.end(), M2.l("".concat(i4, " ok. ").concat(t3)), o3._onGroupUpdated(a3, e4);
}).catch(function(e4) {
return n3.setError(e4).end(), M2.w("".concat(i4, " failed. error:"), e4), E2(e4);
})) : this._onGroupNotExist();
} }, { key: "removeFromGroup", value: function(e3) {
- var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("removeFromGroup"), s4 = e3.name, e3 = e3.userIDList;
- return this._map.has(s4) ? (t3 = "name:".concat(s4, " userIDList:").concat(e3), (n3 = new P2("removeFromGroup")).setMessage(t3), this._snsM.req({ P: G2.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: s4, updateGroupItem: e3.filter(function(e4) {
+ var t3, n3, o3 = this, i4 = "".concat(this._n, ".").concat("removeFromGroup"), a3 = e3.name, e3 = e3.userIDList;
+ return this._map.has(a3) ? (t3 = "name:".concat(a3, " userIDList:").concat(e3), (n3 = new P2("removeFromGroup")).setMessage(t3), this._snsM.req({ P: G2.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: a3, updateGroupItem: e3.filter(function(e4) {
return o3._snsM.isMyFriend(e4);
}).map(function(e4) {
return { to: e4, updateType: "Update_Type_Delete" };
}) } }).then(function(e4) {
- return n3.end(), M2.l("".concat(i4, " ok. ").concat(t3)), o3._onGroupUpdated(s4, e4);
+ return n3.end(), M2.l("".concat(i4, " ok. ").concat(t3)), o3._onGroupUpdated(a3, e4);
}).catch(function(e4) {
return n3.setError(e4).end(), M2.w("".concat(i4, " failed. error:"), e4), E2(e4);
})) : this._onGroupNotExist();
} }, { key: "_onGroupUpdated", value: function(e3, t3) {
- var t3 = t3.data.resultList, s4 = this._map.get(e3), a3 = [], r4 = [], c3 = [];
+ var t3 = t3.data.resultList, a3 = this._map.get(e3), s4 = [], r4 = [], c3 = [];
return O2(t3) && t3.forEach(function(e4) {
var t4 = e4.to, n3 = e4.resultCode, o3 = e4.resultInfo, i4 = e4.type;
- 0 === n3 ? "Update_Type_Add" === i4 ? s4 && (s4.addToUserIDList(t4), r4.push(t4)) : "Update_Type_Delete" === i4 && s4 && (s4.removeFromUserIDList(t4), c3.push(t4)) : a3.push({ to: e4.to, code: n3, message: o3 });
- }), M2.l("".concat(this._n, "._onGroupUpdated name:").concat(e3, " userIDList:").concat(s4.userIDList)), 0 < r4.length && this._snsM.onAddedToFriendGroup({ name: e3, userIDList: r4 }), 0 < c3.length && this._snsM.onRemovedFromFriendGroup({ name: e3, userIDList: c3 }), T2({ friendGroup: s4, failureUserIDList: a3 });
+ 0 === n3 ? "Update_Type_Add" === i4 ? a3 && (a3.addToUserIDList(t4), r4.push(t4)) : "Update_Type_Delete" === i4 && a3 && (a3.removeFromUserIDList(t4), c3.push(t4)) : s4.push({ to: e4.to, code: n3, message: o3 });
+ }), M2.l("".concat(this._n, "._onGroupUpdated name:").concat(e3, " userIDList:").concat(a3.userIDList)), 0 < r4.length && this._snsM.onAddedToFriendGroup({ name: e3, userIDList: r4 }), 0 < c3.length && this._snsM.onRemovedFromFriendGroup({ name: e3, userIDList: c3 }), T2({ friendGroup: a3, failureUserIDList: s4 });
} }, { key: "updateWhenFriendAdded", value: function(e3) {
var t3 = this, n3 = e3.nameList, o3 = e3.userID;
M2.l("".concat(this._n, ".updateWhenFriendAdded userID:").concat(o3, " nameList:").concat(n3)), S2(n3) || n3.forEach(function(e4) {
@@ -17165,16 +17178,16 @@ var chat = { exports: {} };
return E2({ code: k2.FRIEND_GRP_NOT_EXIST });
} }, { key: "reset", value: function() {
this._map.clear();
- } }]), Bs = (t2(ha, c2), e2(ha, [{ key: "onContextUpdated", value: function(e3) {
+ } }]), za = (t2(ys, c2), e2(ys, [{ key: "onContextUpdated", value: function(e3) {
this._friendHandler.pagingGetFriendList(), this._friendGroupHandler.getGroupList(), this._friendApplicationHandler.getApplicationList();
} }, { key: "onRelationChainModified", value: function(e3) {
- var n3, o3, i4, s4, a3, r4, c3 = this, e3 = e3.dataList;
- S2(e3) || (n3 = [], o3 = [], i4 = [], a3 = !(s4 = []), r4 = "", e3.forEach(function(e4) {
+ var n3, o3, i4, a3, s4, r4, c3 = this, e3 = e3.dataList;
+ S2(e3) || (n3 = [], o3 = [], i4 = [], s4 = !(a3 = []), r4 = "", e3.forEach(function(e4) {
var t3;
- 3 !== e4.pushType && 4 !== e4.pushType || !e4.from || (r4 = e4.from), e4.friendAddAccount && (n3.push.apply(n3, d2(e4.friendAddAccount)), s4.push.apply(s4, d2(e4.friendAddAccount))), e4.friendDelAccount && o3.push.apply(o3, d2(e4.friendDelAccount)), e4.friendApplicationAdded && i4.push.apply(i4, d2(e4.friendApplicationAdded)), e4.friendApplicationDeletedUserIDList && s4.push.apply(s4, d2(e4.friendApplicationDeletedUserIDList)), e4.reportTime && 7 === e4.pushType && (a3 = true), e4.friendUpInfo && (t3 = { dataList: [] }, e4.friendUpInfo.forEach(function(e5) {
+ 3 !== e4.pushType && 4 !== e4.pushType || !e4.from || (r4 = e4.from), e4.friendAddAccount && (n3.push.apply(n3, d2(e4.friendAddAccount)), a3.push.apply(a3, d2(e4.friendAddAccount))), e4.friendDelAccount && o3.push.apply(o3, d2(e4.friendDelAccount)), e4.friendApplicationAdded && i4.push.apply(i4, d2(e4.friendApplicationAdded)), e4.friendApplicationDeletedUserIDList && a3.push.apply(a3, d2(e4.friendApplicationDeletedUserIDList)), e4.reportTime && 7 === e4.pushType && (s4 = true), e4.friendUpInfo && (t3 = { dataList: [] }, e4.friendUpInfo.forEach(function(e5) {
t3.dataList.push({ userID: e5.friendAccount, profileList: d2(e5.sns) });
}), c3.onFriendProfileModified(t3));
- }), a3 && this._friendApplicationHandler.onApplicationRead(), this._friendApplicationHandler.onApplicationAdded(i4, r4), this._friendApplicationHandler.onApplicationDeleted(s4), this._friendHandler.onFriendAdded(n3), this._friendHandler.onFriendDeleted(o3));
+ }), s4 && this._friendApplicationHandler.onApplicationRead(), this._friendApplicationHandler.onApplicationAdded(i4, r4), this._friendApplicationHandler.onApplicationDeleted(a3), this._friendHandler.onFriendAdded(n3), this._friendHandler.onFriendDeleted(o3));
} }, { key: "isMyFriend", value: function(e3) {
return this._friendHandler.isMyFriend(e3);
} }, { key: "filterProfanity", value: function(e3, t3) {
@@ -17231,29 +17244,31 @@ var chat = { exports: {} };
this._friendGroupHandler.updateWhenFriendAdded(e3);
} }, { key: "updateWhenFriendDeleted", value: function(e3) {
this._friendGroupHandler.updateWhenFriendDeleted(e3);
+ } }, { key: "updateCacheOnReconnected", value: function() {
+ M2.l("".concat(this._n, ".updateCacheOnReconnected")), this._friendHandler.updateCacheOnReconnected(), this._friendGroupHandler.updateCacheOnReconnected(), this._friendApplicationHandler.updateCacheOnReconnected();
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._friendHandler.reset(), this._friendGroupHandler.reset(), this._friendApplicationHandler.reset();
- } }])), Hs = (t2(_a, c2), e2(_a, [{ key: "isWorkerEnabled", value: function() {
- return this._isWorkerEnabled && Ae2;
+ } }])), Xa = (t2(Ms, c2), e2(Ms, [{ key: "isWorkerEnabled", value: function() {
+ return this._isWorkerEnabled && Ge2;
} }, { key: "startWorkerTimer", value: function() {
M2.l("".concat(this._n, ".startWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("start");
} }, { key: "stopWorkerTimer", value: function() {
M2.l("".concat(this._n, ".stopWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("stop");
} }, { key: "_init", value: function() {
var e3, t3;
- Ae2 && (e3 = URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'], { type: "application/javascript; charset=utf-8" })), this._workerTimer = new Worker(e3), (t3 = this)._workerTimer.onmessage = function(e4) {
+ Ge2 && (e3 = URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'], { type: "application/javascript; charset=utf-8" })), this._workerTimer = new Worker(e3), (t3 = this)._workerTimer.onmessage = function(e4) {
e4.data ? (t3._timerID = e4.data, M2.l("".concat(t3._n, "._init seed:").concat(t3._timerID))) : t3._m.onCheckTimer();
});
} }, { key: "_onCloudConfig", value: function() {
var e3 = this.getCloudConfig("enable_worker");
- M2.l("".concat(this._n, "._onCloudConfig enableWorker:").concat(e3)), N3(e3) || "1" === e3 ? !this._isWorkerEnabled && Ae2 && (this._isWorkerEnabled = true, this.startWorkerTimer(), this._m.onWorkerTimerEnabled()) : this._isWorkerEnabled && Ae2 && (this._isWorkerEnabled = false, this.stopWorkerTimer(), this._m.onWorkerTimerDisabled());
+ M2.l("".concat(this._n, "._onCloudConfig enableWorker:").concat(e3)), N3(e3) || "1" === e3 ? !this._isWorkerEnabled && Ge2 && (this._isWorkerEnabled = true, this.startWorkerTimer(), this._m.onWorkerTimerEnabled()) : this._isWorkerEnabled && Ge2 && (this._isWorkerEnabled = false, this.stopWorkerTimer(), this._m.onWorkerTimerDisabled());
} }, { key: "terminate", value: function() {
M2.l("".concat(this._n, ".terminate")), this._workerTimer && (this._workerTimer.terminate(), this._workerTimer = null, this._timerID = -1);
} }, { key: "getTimerID", value: function() {
return this._timerID;
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset"));
- } }])), Ks = e2(function e3(t3) {
+ } }])), Za = e2(function e3(t3) {
p3(this, e3), this._commercialConfigM = t3, this._n = "PurchasedFeatureHandler", this._isCSPluginReported = false, this._featureMap = /* @__PURE__ */ new Map();
}, [{ key: "isValidPurchaseBits", value: function(e3) {
return e3 && "string" == typeof e3 && 1 <= e3.length && e3.length <= 64 && /[01]{1,64}/.test(e3);
@@ -17267,8 +17282,8 @@ var chat = { exports: {} };
} }, { key: "hasPurchasedFeature", value: function(e3) {
return !!this._featureMap.get(e3);
} }, { key: "isFeatureEnabled", value: function(e3) {
- for (var t3 = parseInt(e3).toString(2), n3 = void 0, o3 = true, i4 = t3.length - 1, s4 = 0; 0 <= i4; i4--, s4++)
- if ("1" === t3.charAt(i4) && (n3 = (s4 < 32 ? new $2(0, Math.pow(2, s4)) : new $2(Math.pow(2, s4 - 32), 0)).toString(), !this._featureMap.get(n3))) {
+ for (var t3 = parseInt(e3).toString(2), n3 = void 0, o3 = true, i4 = t3.length - 1, a3 = 0; 0 <= i4; i4--, a3++)
+ if ("1" === t3.charAt(i4) && (n3 = (a3 < 32 ? new $2(0, Math.pow(2, a3)) : new $2(Math.pow(2, a3 - 32), 0)).toString(), !this._featureMap.get(n3))) {
o3 = false;
break;
}
@@ -17278,16 +17293,16 @@ var chat = { exports: {} };
if ("1" === t3.charAt(n3)) {
if (i4 = (o3 < 32 ? new $2(0, Math.pow(2, o3)) : new $2(Math.pow(2, o3 - 32), 0)).toString(), !this._featureMap.get(i4))
break;
- var i4, s4 = "", a3 = 0;
- i4 === g2.PLUGIN_TRANSLATE ? (s4 = "plugin_translate", a3 = 16) : i4 === g2.PLUGIN_VOICE_TO_TEXT ? (s4 = "plugin_voice_to_text", a3 = 17) : i4 === g2.PLUGIN_CS ? (s4 = "plugin_cs", a3 = 14) : i4 === g2.PLUGIN_PUSH ? (s4 = "plugin_push", a3 = 13) : i4 === g2.PLUGIN_BOT ? (s4 = "plugin_bot", a3 = 15) : i4 === g2.MSG_REACTION && (s4 = "plugin_emoji_reaction", a3 = 18), "" !== s4 && (i4 = this._commercialConfigM.get(12).getUIPlatform(), new P2(s4).setCode(a3).setUIPlatform(i4).end(), M2.l("".concat(this._n, ".isFeatureEnabledForStat ").concat(s4, " code:").concat(a3, " uiPlatform:").concat(i4)));
+ var i4, a3 = "", s4 = 0;
+ i4 === g2.PLUGIN_TRANSLATE ? (a3 = "plugin_translate", s4 = 16) : i4 === g2.PLUGIN_VOICE_TO_TEXT ? (a3 = "plugin_voice_to_text", s4 = 17) : i4 === g2.PLUGIN_CS ? (a3 = "plugin_cs", s4 = 14) : i4 === g2.PLUGIN_PUSH ? (a3 = "plugin_push", s4 = 13) : i4 === g2.PLUGIN_BOT ? (a3 = "plugin_bot", s4 = 15) : i4 === g2.MSG_REACTION && (a3 = "plugin_emoji_reaction", s4 = 18), "" !== a3 && (i4 = this._commercialConfigM.get(12).getUIPlatform(), new P2(a3).setCode(s4).setUIPlatform(i4).end(), M2.l("".concat(this._n, ".isFeatureEnabledForStat ").concat(a3, " code:").concat(s4, " uiPlatform:").concat(i4)));
}
} }, { key: "isCSPluginEnabled", value: function() {
var e3;
this._isCSPluginReported || (e3 = this._commercialConfigM.get(12).getUIPlatform(), new P2("plugin_search").setCode(6).setUIPlatform(e3).end(), this._isCSPluginReported = true);
} }, { key: "clear", value: function() {
this._featureMap.clear(), this._isCSPluginReported = false;
- } }]), Ws = e2(function e3(t3) {
- p3(this, e3), this._m = t3, this._n = "CommercialConfigModule", this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler = new Ks(this);
+ } }]), Qa = e2(function e3(t3) {
+ p3(this, e3), this._m = t3, this._n = "CommercialConfigModule", this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler = new Za(this);
}, [{ key: "_canFetch", value: function() {
return this.get(12).isLoggedIn() ? !this._isFetching && Date.now() >= this._expiredTime : (this._expiredTime = Date.now() + 2e3, false);
} }, { key: "onCheckTimer", value: function(e3) {
@@ -17303,8 +17318,8 @@ var chat = { exports: {} };
var t3 = "".concat(this._n, ".onPushedConfig data:").concat(JSON.stringify(e3));
M2.l("".concat(t3)), new P2("pushedCommercialConfig").setMessage("purchaseBits:".concat(e3.purchaseBits)).end(), this._parseConfig(e3);
} }, { key: "_parseConfig", value: function(e3) {
- var t3 = "".concat(this._n, "._parseConfig"), n3 = e3.errorCode, o3 = e3.errorMessage, i4 = e3.purchaseBits, s4 = e3.expiredTime;
- 0 === n3 ? (this._purchasedFeatureHandler.parsePurchaseBits(i4), this._expiredTime = Date.now() + 1e3 * s4) : N3(n3) ? (M2.l("".concat(t3, " failed. Invalid message format:"), e3), this._setExpiredTimeOnResponseError(36e5)) : (M2.e("".concat(t3, " errorCode:").concat(n3, " errorMessage:").concat(o3)), this._setExpiredTimeOnResponseError(12e4));
+ var t3 = "".concat(this._n, "._parseConfig"), n3 = e3.errorCode, o3 = e3.errorMessage, i4 = e3.purchaseBits, a3 = e3.expiredTime;
+ 0 === n3 ? (this._purchasedFeatureHandler.parsePurchaseBits(i4), this._expiredTime = Date.now() + 1e3 * a3) : N3(n3) ? (M2.l("".concat(t3, " failed. Invalid message format:"), e3), this._setExpiredTimeOnResponseError(36e5)) : (M2.e("".concat(t3, " errorCode:").concat(n3, " errorMessage:").concat(o3)), this._setExpiredTimeOnResponseError(12e4));
} }, { key: "_setExpiredTimeOnResponseError", value: function(e3) {
this._expiredTime = Date.now() + e3;
} }, { key: "canIUse", value: function(e3) {
@@ -17319,32 +17334,32 @@ var chat = { exports: {} };
return this._m.get(e3);
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler.clear();
- } }]), Ys = (t2(pa, c2), e2(pa, [{ key: "registerPlugin", value: function(e3) {
- var t3, n3, o3, i4, s4, a3, r4, c3, u3, l3, d3, p4, _3;
- fe2 ? (this._offlinePushPlugin = e3["tim-offline-push-plugin"], t3 = (_3 = e3.offlinePushConfig || {}).huaweiBusinessID, n3 = _3.xiaomiBusinessID, o3 = _3.xiaomiAppID, i4 = _3.xiaomiAppKey, s4 = _3.meizuBusinessID, a3 = _3.meizuAppID, r4 = _3.meizuAppKey, c3 = _3.vivoBusinessID, u3 = _3.oppoBusinessID, l3 = _3.oppoAppKey, d3 = _3.oppoAppSecret, p4 = _3.honorBusinessID, _3 = _3.iosBusinessID, this._androidPushConfig.huaweiPushBussinessId = t3, this._androidPushConfig.xiaomiPushBussinessId = n3, this._androidPushConfig.xiaomiPushAppId = o3, this._androidPushConfig.xiaomiPushAppKey = i4, this._androidPushConfig.meizuPushBussinessId = s4, this._androidPushConfig.meizuPushAppId = a3, this._androidPushConfig.meizuPushAppKey = r4, this._androidPushConfig.vivoPushBussinessId = c3, this._androidPushConfig.oppoPushBussinessId = u3, this._androidPushConfig.oppoPushAppKey = l3, this._androidPushConfig.oppoPushAppSecret = d3, this._androidPushConfig.honorPushBussinessId = p4, new P2("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!N3(this._offlinePushPlugin))).end(true), M2.l("".concat(this._n, ".").concat("registerPlugin", " ok. offlinePushConfig:").concat(JSON.stringify(e3.offlinePushConfig))), this._iosBusinessID = _3, this._setAppShowListener()) : this.warn("OfflinePushInUniapp");
+ } }]), $a = (t2(Is, c2), e2(Is, [{ key: "registerPlugin", value: function(e3) {
+ var t3, n3, o3, i4, a3, s4, r4, c3, u3, l3, d3, p4, _3;
+ Ie2 ? (this._offlinePushPlugin = e3["tim-offline-push-plugin"], t3 = (_3 = e3.offlinePushConfig || {}).huaweiBusinessID, n3 = _3.xiaomiBusinessID, o3 = _3.xiaomiAppID, i4 = _3.xiaomiAppKey, a3 = _3.meizuBusinessID, s4 = _3.meizuAppID, r4 = _3.meizuAppKey, c3 = _3.vivoBusinessID, u3 = _3.oppoBusinessID, l3 = _3.oppoAppKey, d3 = _3.oppoAppSecret, p4 = _3.honorBusinessID, _3 = _3.iosBusinessID, this._androidPushConfig.huaweiPushBussinessId = t3, this._androidPushConfig.xiaomiPushBussinessId = n3, this._androidPushConfig.xiaomiPushAppId = o3, this._androidPushConfig.xiaomiPushAppKey = i4, this._androidPushConfig.meizuPushBussinessId = a3, this._androidPushConfig.meizuPushAppId = s4, this._androidPushConfig.meizuPushAppKey = r4, this._androidPushConfig.vivoPushBussinessId = c3, this._androidPushConfig.oppoPushBussinessId = u3, this._androidPushConfig.oppoPushAppKey = l3, this._androidPushConfig.oppoPushAppSecret = d3, this._androidPushConfig.honorPushBussinessId = p4, new P2("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!N3(this._offlinePushPlugin))).end(true), M2.l("".concat(this._n, ".").concat("registerPlugin", " ok. offlinePushConfig:").concat(JSON.stringify(e3.offlinePushConfig))), this._iosBusinessID = _3, this._setAppShowListener()) : this.warn("OfflinePushInUniapp");
} }, { key: "init", value: function() {
this._isWebUniapp = this.getUniAppPlatform(), this._getDeviceToken();
} }, { key: "_getDeviceToken", value: function() {
var c3, u3 = this, l3 = "".concat(this._n, ".").concat("_getDeviceToken");
- ct2(this._offlinePushPlugin.getDeviceToken) ? (c3 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), ", iosBusinessID:").concat(this._iosBusinessID), M2.l("".concat(l3, " start. ").concat(c3)), new P2("_getDeviceToken").setMessage("".concat(c3)).end(true), this._offlinePushPlugin.getDeviceToken(this._androidPushConfig, function(e3) {
- var t3, n3, o3, i4, s4 = new P2("getDeviceTokenRes"), a3 = e3.code, r4 = e3.msg;
- 0 === a3 ? (t3 = (i4 = e3.data).deviceToken, n3 = i4.deviceBrand, o3 = i4.deviceType, i4 = i4.bussinessId, u3._deviceToken = t3, u3._businessID = i4 || u3._iosBusinessID, c3 = "deviceToken:".concat(t3, ", deviceBrand:").concat(n3 || o3, ", businessID:").concat(u3._businessID), M2.l("".concat(l3, " ok. ").concat(c3)), s4.setMessage(c3).end(true), u3._setToken()) : (s4.setMessage("code:".concat(a3, ", msg:").concat(r4)).end(true), M2.e("".concat(l3, " failed. error:"), e3));
+ dt2(this._offlinePushPlugin.getDeviceToken) ? (c3 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), ", iosBusinessID:").concat(this._iosBusinessID), M2.l("".concat(l3, " start. ").concat(c3)), new P2("_getDeviceToken").setMessage("".concat(c3)).end(true), this._offlinePushPlugin.getDeviceToken(this._androidPushConfig, function(e3) {
+ var t3, n3, o3, i4, a3 = new P2("getDeviceTokenRes"), s4 = e3.code, r4 = e3.msg;
+ 0 === s4 ? (t3 = (i4 = e3.data).deviceToken, n3 = i4.deviceBrand, o3 = i4.deviceType, i4 = i4.bussinessId, u3._deviceToken = t3, u3._businessID = i4 || u3._iosBusinessID, c3 = "deviceToken:".concat(t3, ", deviceBrand:").concat(n3 || o3, ", businessID:").concat(u3._businessID), M2.l("".concat(l3, " ok. ").concat(c3)), a3.setMessage(c3).end(true), u3._setToken()) : (a3.setMessage("code:".concat(s4, ", msg:").concat(r4)).end(true), M2.e("".concat(l3, " failed. error:"), e3));
})) : M2.e("".concat(l3, " getDeviceToken is not a function"));
} }, { key: "canIUseOfflinePush", value: function() {
- return fe2 && !N3(this._offlinePushPlugin);
+ return Ie2 && !N3(this._offlinePushPlugin);
} }, { key: "_setAppShowListener", value: function() {
var t3 = this, n3 = "".concat(this._n, ".").concat("_setAppShowListener");
- N3(this._offlinePushPlugin) ? M2.e("".concat(n3, " offlinePushPlugin is undefined")) : ct2(this._offlinePushPlugin.setAppShowListener) ? (new P2("_setAppShowListener").end(true), M2.l("".concat(n3, " start")), this._offlinePushPlugin.setAppShowListener(function(e3) {
+ N3(this._offlinePushPlugin) ? M2.e("".concat(n3, " offlinePushPlugin is undefined")) : dt2(this._offlinePushPlugin.setAppShowListener) ? (new P2("_setAppShowListener").end(true), M2.l("".concat(n3, " start")), this._offlinePushPlugin.setAppShowListener(function(e3) {
e3 = (e3 || {}).appShow;
new P2("setAppShowListenerRes").setMessage("appShow:".concat(e3)).end(true), M2.l("".concat(n3, " ok. appShow:").concat(e3)), t3._m.isReady() && (0 === e3 ? (t3._getConvUnreadCount(), t3._onBackground()) : 1 === e3 && t3._onForeground());
})) : M2.e("".concat(n3, " setAppShowListener is not a function"));
} }, { key: "getDeviceBrand", value: function() {
var e3;
- if (!N3(this._offlinePushPlugin) && ct2(this._offlinePushPlugin.getDeviceType))
+ if (!N3(this._offlinePushPlugin) && dt2(this._offlinePushPlugin.getDeviceType))
return e3 = (this._offlinePushPlugin.getDeviceType() || {}).deviceType, M2.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e3)), e3;
} }, { key: "_setToken", value: function() {
- var t3 = "".concat(this._n, "._setToken"), e3 = this.get(12), n3 = 1, o3 = "", i4 = "", s4 = (S2(this._deviceToken) && (n3 = 0), this.getUniAppPlatform()), a3 = this.getDeviceBrand(), r4 = (s4 === te2.IOS || s4 === te2.IPAD || s4 === te2.MAC ? i4 = this._deviceToken : s4 === te2.ANDROID && (o3 = this._deviceToken), new P2("offlinePushSetToken")), s4 = "deviceToken:".concat(i4 || o3, ", businessID:").concat(this._businessID, ", ") + "deviceBrand:".concat(a3, ", isWebUniapp:").concat(this._isWebUniapp, ", pushMsg:").concat(n3, ", platform:").concat(s4);
- return r4.setMessage("".concat(s4)), M2.l("".concat(t3, " ").concat(s4)), this.req({ P: G2.SET_TOKEN, data: { tokenID: o3, pushMsg: n3, sdkAppID: e3.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: a3, deviceToken: i4, isWebUniapp: this._isWebUniapp } }).then(function(e4) {
+ var t3 = "".concat(this._n, "._setToken"), e3 = this.get(12), n3 = 1, o3 = "", i4 = "", a3 = (S2(this._deviceToken) && (n3 = 0), this.getUniAppPlatform()), s4 = this.getDeviceBrand(), r4 = (a3 === te2.IOS || a3 === te2.IPAD || a3 === te2.MAC ? i4 = this._deviceToken : a3 === te2.ANDROID && (o3 = this._deviceToken), new P2("offlinePushSetToken")), a3 = "deviceToken:".concat(i4 || o3, ", businessID:").concat(this._businessID, ", ") + "deviceBrand:".concat(s4, ", isWebUniapp:").concat(this._isWebUniapp, ", pushMsg:").concat(n3, ", platform:").concat(a3);
+ return r4.setMessage("".concat(a3)), M2.l("".concat(t3, " ").concat(a3)), this.req({ P: G2.SET_TOKEN, data: { tokenID: o3, pushMsg: n3, sdkAppID: e3.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: s4, deviceToken: i4, isWebUniapp: this._isWebUniapp } }).then(function(e4) {
return r4.end(), M2.l("".concat(t3, " ok")), e4;
}).catch(function(e4) {
return r4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
@@ -17373,54 +17388,54 @@ var chat = { exports: {} };
return "ios" === e3 ? te2.IOS : "android" === e3 ? te2.ANDROID : 1002 === t3 ? te2.IPAD : 1001 === t3 ? te2.MAC : void 0;
} }, { key: "reset", value: function() {
this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, M2.l("".concat(this._n, ".reset"));
- } }])), js = (t2(da, c2), e2(da, [{ key: "registerPlugin", value: function(e3) {
+ } }])), es2 = (t2(vs, c2), e2(vs, [{ key: "registerPlugin", value: function(e3) {
var t3, n3, o3;
- fe2 ? (t3 = "".concat(this._n, ".").concat("registerPlugin"), this._pushPlugin = e3["tim-push"], this._getDeviceInfo(), n3 = (o3 = e3.pushConfig || {}).androidConfig, o3 = o3.iOSConfig, at2(n3) && (this._androidPushConfig = n3[this._deviceInfo.packageName]), n3 = (o3 || {}).iOSBusinessID, this._iOSBusinessID = n3, o3 = !N3(this._pushPlugin), new P2("registerPlugin").setMessage(this._pluginName).setMoreMessage("isExisted:".concat(o3)).end(true), M2.l("".concat(t3, " ok. pushConfig:").concat(JSON.stringify(e3.pushConfig))), o3 ? (this._setAppShowListener(), this._setPushEventReportListener()) : M2.e("".concat(t3, " ").concat(this._pluginName, " is undefined"))) : this.warn("TIMPushInUniapp");
+ Ie2 ? (t3 = "".concat(this._n, ".").concat("registerPlugin"), this._pushPlugin = e3["tim-push"], this._getDeviceInfo(), n3 = (o3 = e3.pushConfig || {}).androidConfig, o3 = o3.iOSConfig, ut2(n3) && (this._androidPushConfig = n3[this._deviceInfo.packageName]), n3 = (o3 || {}).iOSBusinessID, this._iOSBusinessID = n3, o3 = !N3(this._pushPlugin), new P2("registerPlugin").setMessage(this._pluginName).setMoreMessage("isExisted:".concat(o3)).end(true), M2.l("".concat(t3, " ok. pushConfig:").concat(JSON.stringify(e3.pushConfig))), o3 ? (this._setAppShowListener(), this._setPushEventReportListener()) : M2.e("".concat(t3, " ").concat(this._pluginName, " is undefined"))) : this.warn("TIMPushInUniapp");
} }, { key: "init", value: function() {
this._isWebUniapp = this.getUniAppPlatform(), this._reportEventCacheList(), this._getDeviceToken(), this.get(27).isFeatureEnabledForStat(Math.pow(2, 41));
} }, { key: "_reportEventCacheList", value: function() {
- var s4 = this, a3 = "".concat(this._n, ".").concat("_reportEventCacheList");
- ct2(this._pushPlugin.getPushEventCacheList) ? (new P2("_reportEventCacheList").end(true), this._pushPlugin.getPushEventCacheList(function(e3) {
+ var a3 = this, s4 = "".concat(this._n, ".").concat("_reportEventCacheList");
+ dt2(this._pushPlugin.getPushEventCacheList) ? (new P2("_reportEventCacheList").end(true), this._pushPlugin.getPushEventCacheList(function(e3) {
var t3 = e3.code, n3 = e3.data.eventList, o3 = new P2("getPushEventCacheListRes");
if (o3.setCode(t3), 0 !== t3)
- o3.setMessage("res:".concat(JSON.stringify(e3))).end(true), M2.e("".concat(a3, " failed. error:").concat(JSON.stringify(e3)));
+ o3.setMessage("res:".concat(JSON.stringify(e3))).end(true), M2.e("".concat(s4, " failed. error:").concat(JSON.stringify(e3)));
else {
t3 = n3.length < 10 ? "eventList:".concat(JSON.stringify(n3)) : "eventList.length:".concat(n3.length);
- M2.l("".concat(a3, " ok. ").concat(t3)), o3.setMessage(t3).end(true);
+ M2.l("".concat(s4, " ok. ").concat(t3)), o3.setMessage(t3).end(true);
for (var i4 = y2(y2({}, e3.data), {}, { eventList: [] }); 0 < n3.length; )
- i4.eventList = n3.splice(0, 40), s4._pushReport(i4);
+ i4.eventList = n3.splice(0, 40), a3._pushReport(i4);
}
})) : M2.e("".concat(this._pluginName, ".getPushEventCacheList is not a function"));
} }, { key: "_getDeviceToken", value: function() {
var r4, c3 = this, u3 = "".concat(this._n, ".").concat("_getDeviceToken");
- ct2(this._pushPlugin.getDeviceToken) ? (r4 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), " iOSBusinessID:").concat(this._iOSBusinessID), M2.l("".concat(u3, " start. ").concat(r4)), new P2("_getDeviceToken").setMessage("".concat(r4)).end(true), this._pushPlugin.getDeviceToken(this._androidPushConfig, function(e3) {
- var t3, n3, o3, i4 = e3.code, s4 = e3.msg, a3 = new P2("getDeviceTokenRes");
- a3.setCode(i4), 0 === i4 ? (t3 = (i4 = e3.data).deviceToken, n3 = i4.deviceBrand, o3 = i4.deviceType, i4 = i4.bussinessId, c3._deviceToken = t3, c3._businessID = i4 || c3._iOSBusinessID, r4 = "deviceToken:".concat(t3, " deviceBrand:").concat(n3 || o3, " businessID:").concat(c3._businessID), M2.l("".concat(u3, " ok. ").concat(r4)), a3.setMessage(r4).end(true), c3._setToken()) : (a3.setMessage(s4).end(true), M2.e("".concat(u3, " failed. error:").concat(JSON.stringify(e3))));
+ dt2(this._pushPlugin.getDeviceToken) ? (r4 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), " iOSBusinessID:").concat(this._iOSBusinessID), M2.l("".concat(u3, " start. ").concat(r4)), new P2("_getDeviceToken").setMessage("".concat(r4)).end(true), this._pushPlugin.getDeviceToken(this._androidPushConfig, function(e3) {
+ var t3, n3, o3, i4 = e3.code, a3 = e3.msg, s4 = new P2("getDeviceTokenRes");
+ s4.setCode(i4), 0 === i4 ? (t3 = (i4 = e3.data).deviceToken, n3 = i4.deviceBrand, o3 = i4.deviceType, i4 = i4.bussinessId, c3._deviceToken = t3, c3._businessID = i4 || c3._iOSBusinessID, r4 = "deviceToken:".concat(t3, " deviceBrand:").concat(n3 || o3, " businessID:").concat(c3._businessID), M2.l("".concat(u3, " ok. ").concat(r4)), s4.setMessage(r4).end(true), c3._setToken()) : (s4.setMessage(a3).end(true), M2.e("".concat(u3, " failed. error:").concat(JSON.stringify(e3))));
})) : M2.e("".concat(this._pluginName, ".getDeviceToken is not a function"));
} }, { key: "_getDeviceInfo", value: function() {
var e3, t3, n3, o3, i4 = "".concat(this._n, ".").concat("_getDeviceInfo");
- ct2(this._pushPlugin.getDeviceInfo) ? (o3 = (e3 = this._pushPlugin.getDeviceInfo()).code, t3 = e3.data, (n3 = new P2("_getDeviceInfo")).setCode(o3), 0 === o3 ? (this._deviceInfo = y2(y2({}, this._deviceInfo), t3), this._deviceInfo.pushVersion || (this._deviceInfo.pushVersion = "1.0.1"), o3 = "deviceInfo:".concat(JSON.stringify(this._deviceInfo)), M2.l("".concat(i4, " ok. ").concat(o3)), n3.setMessage(o3).end(true)) : (n3.setMessage("deviceInfoRes:".concat(JSON.stringify(e3))).end(true), M2.e("".concat(i4, " failed. error:").concat(JSON.stringify(e3))))) : M2.e("".concat(this._pluginName, ".getDeviceInfo is not a function"));
+ dt2(this._pushPlugin.getDeviceInfo) ? (o3 = (e3 = this._pushPlugin.getDeviceInfo()).code, t3 = e3.data, (n3 = new P2("_getDeviceInfo")).setCode(o3), 0 === o3 ? (this._deviceInfo = y2(y2({}, this._deviceInfo), t3), this._deviceInfo.pushVersion || (this._deviceInfo.pushVersion = "1.0.1"), o3 = "deviceInfo:".concat(JSON.stringify(this._deviceInfo)), M2.l("".concat(i4, " ok. ").concat(o3)), n3.setMessage(o3).end(true)) : (n3.setMessage("deviceInfoRes:".concat(JSON.stringify(e3))).end(true), M2.e("".concat(i4, " failed. error:").concat(JSON.stringify(e3))))) : M2.e("".concat(this._pluginName, ".getDeviceInfo is not a function"));
} }, { key: "canIUseTIMPush", value: function() {
- return fe2 && !N3(this._pushPlugin);
+ return Ie2 && !N3(this._pushPlugin);
} }, { key: "_setAppShowListener", value: function() {
var t3 = this, n3 = "".concat(this._n, ".").concat("_setAppShowListener");
- ct2(this._pushPlugin.setAppShowListener) ? (new P2("_setAppShowListener").end(true), M2.l("".concat(n3, " start")), this._pushPlugin.setAppShowListener(function(e3) {
+ dt2(this._pushPlugin.setAppShowListener) ? (new P2("_setAppShowListener").end(true), M2.l("".concat(n3, " start")), this._pushPlugin.setAppShowListener(function(e3) {
e3 = (e3 || {}).appShow;
new P2("setAppShowListenerRes").setMessage("appShow:".concat(e3)).end(true), M2.l("".concat(n3, " ok. appShow:").concat(e3)), t3._m.isReady() && (0 === e3 ? (t3._getConvUnreadCount(), t3._onBackground()) : 1 === e3 && t3._onForeground());
})) : M2.e("".concat(this._pluginName, ".setAppShowListener is not a function"));
} }, { key: "_setPushEventReportListener", value: function() {
- var s4 = this, a3 = "".concat(this._n, ".").concat("_setPushEventReportListener");
- ct2(this._pushPlugin.setPushEventReportListener) ? (new P2("_setPushEventReportListener").end(true), this._pushPlugin.setPushEventReportListener(function(e3) {
+ var a3 = this, s4 = "".concat(this._n, ".").concat("_setPushEventReportListener");
+ dt2(this._pushPlugin.setPushEventReportListener) ? (new P2("_setPushEventReportListener").end(true), this._pushPlugin.setPushEventReportListener(function(e3) {
var t3 = e3.code, n3 = e3.data, o3 = n3.eventList, i4 = new P2("setPushEventReportListenerRes");
- i4.setCode(t3), 0 === t3 ? (t3 = "eventList:".concat(JSON.stringify(o3)), M2.l("".concat(a3, " ok. ").concat(t3)), i4.setMessage(t3).end(true), s4._m.isReady() && O2(o3) && 0 < o3.length && s4._pushReport(n3)) : (i4.setMessage("res:".concat(JSON.stringify(e3))).end(true), M2.e("".concat(a3, " failed. error:").concat(JSON.stringify(e3))));
+ i4.setCode(t3), 0 === t3 ? (t3 = "eventList:".concat(JSON.stringify(o3)), M2.l("".concat(s4, " ok. ").concat(t3)), i4.setMessage(t3).end(true), a3._m.isReady() && O2(o3) && 0 < o3.length && a3._pushReport(n3)) : (i4.setMessage("res:".concat(JSON.stringify(e3))).end(true), M2.e("".concat(s4, " failed. error:").concat(JSON.stringify(e3))));
})) : M2.e("".concat(this._pluginName, ".setPushEventReportListener is not a function"));
} }, { key: "getDeviceBrand", value: function() {
var e3;
- if (!N3(this._pushPlugin) && ct2(this._pushPlugin.getDeviceType))
+ if (!N3(this._pushPlugin) && dt2(this._pushPlugin.getDeviceType))
return e3 = (this._pushPlugin.getDeviceType() || {}).deviceType, M2.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e3)), e3;
} }, { key: "_setToken", value: function() {
- var t3 = "".concat(this._n, ".").concat("_setToken"), e3 = this.get(12), n3 = 1, o3 = "", i4 = "", s4 = (S2(this._deviceToken) && (n3 = 0), this.getUniAppPlatform()), a3 = this.getDeviceBrand(), s4 = (s4 === te2.IOS || s4 === te2.IPAD || s4 === te2.MAC ? i4 = this._deviceToken : s4 === te2.ANDROID && (o3 = this._deviceToken), y2({ tokenID: o3, pushMsg: n3, sdkAppID: e3.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: a3, deviceToken: i4, isWebUniapp: this._isWebUniapp }, this._deviceInfo)), r4 = new P2("_setToken"), o3 = "data:".concat(JSON.stringify(s4));
- r4.setMessage("".concat(o3)), M2.l("".concat(t3, " ").concat(o3)), this.req({ P: G2.SET_TOKEN, data: s4 }).then(function() {
+ var t3 = "".concat(this._n, ".").concat("_setToken"), e3 = this.get(12), n3 = 1, o3 = "", i4 = "", a3 = (S2(this._deviceToken) && (n3 = 0), this.getUniAppPlatform()), s4 = this.getDeviceBrand(), a3 = (a3 === te2.IOS || a3 === te2.IPAD || a3 === te2.MAC ? i4 = this._deviceToken : a3 === te2.ANDROID && (o3 = this._deviceToken), y2({ tokenID: o3, pushMsg: n3, sdkAppID: e3.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: s4, deviceToken: i4, isWebUniapp: this._isWebUniapp }, this._deviceInfo)), r4 = new P2("_setToken"), o3 = "data:".concat(JSON.stringify(a3));
+ r4.setMessage("".concat(o3)), M2.l("".concat(t3, " ").concat(o3)), this.req({ P: G2.SET_TOKEN, data: a3 }).then(function() {
r4.end(), M2.w("".concat(t3, " ok"));
}).catch(function(e4) {
r4.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
@@ -17452,15 +17467,15 @@ var chat = { exports: {} };
o3.setError(e4).end(), M2.e("".concat(n3, " failed. error:"), e4);
});
} }, { key: "_notifyReportSuccess", value: function(e3) {
- !N3(this._pushPlugin) && ct2(this._pushPlugin.notifyReportSuccess) && (this._pushPlugin.notifyReportSuccess(e3), M2.l("".concat(this._n, "._notifyReportSuccess ok")));
+ !N3(this._pushPlugin) && dt2(this._pushPlugin.notifyReportSuccess) && (this._pushPlugin.notifyReportSuccess(e3), M2.l("".concat(this._n, "._notifyReportSuccess ok")));
} }, { key: "getUniAppPlatform", value: function() {
var e3 = index.getSystemInfoSync().platform, t3 = this.getDeviceBrand();
return "ios" === e3 ? te2.IOS : "android" === e3 ? te2.ANDROID : 1002 === t3 ? te2.IPAD : 1001 === t3 ? te2.MAC : void 0;
} }, { key: "reset", value: function() {
this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, M2.l("".concat(this._n, ".reset"));
- } }])), Js = (t2(la, c2), e2(la, [{ key: "init", value: function() {
+ } }])), ts2 = (t2(ms, c2), e2(ms, [{ key: "init", value: function() {
var e3 = this.get(18).getPlugin("tim-profanity-filter-plugin");
- e3 && (this._plugin = new e3({ logger: M2, isArray: O2, isMap: ot2, isDevMode: this.isDevMode() }), this._getLexicon());
+ e3 && (this._plugin = new e3({ logger: M2, isArray: O2, isMap: st2, isDevMode: this.isDevMode() }), this._getLexicon());
} }, { key: "onCheckTimer", value: function() {
this._plugin && this._canIUseLexicon && this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime && this._getLexicon();
} }, { key: "filterMessage", value: function(e3, t3) {
@@ -17468,19 +17483,19 @@ var chat = { exports: {} };
if (this._plugin && this._canIUseLexicon && (!t3 || !t3.messageControlInfo || true !== t3.messageControlInfo.excludedFromContentModeration)) {
var t3 = e3.type, o3 = e3.conversationType;
if (t3 === R2.MSG_TEXT || t3 === R2.MSG_CUSTOM) {
- var i4, s4 = "".concat(this._n, ".filterMessage");
- if (M2.l("".concat(s4)), t3 === R2.MSG_TEXT) {
+ var i4, a3 = "".concat(this._n, ".filterMessage");
+ if (M2.l("".concat(a3)), t3 === R2.MSG_TEXT) {
if (o3 === R2.CONV_C2C ? i4 = "c2c_text_message" : o3 === R2.CONV_GROUP && (i4 = "group_text_message"), !this._isConfigOn(i4))
return n3;
- var a3 = this._plugin.filter(e3.payload.text), r4 = a3.type, a3 = a3.modifiedText;
- 1 === r4 ? n3 = false : 2 === r4 && (e3.payload.text = a3);
+ var s4 = this._plugin.filter(e3.payload.text), r4 = s4.type, s4 = s4.modifiedText;
+ 1 === r4 ? n3 = false : 2 === r4 && (e3.payload.text = s4);
} else if (t3 === R2.MSG_CUSTOM) {
if (o3 === R2.CONV_C2C ? i4 = "c2c_custom_message" : o3 === R2.CONV_GROUP && (i4 = "group_custom_message"), !this._isConfigOn(i4))
return n3;
- r4 = this._plugin.filter(e3.payload.data), a3 = this._plugin.filter(e3.payload.description), t3 = this._plugin.filter(e3.payload.extension);
- 1 === r4.type || 1 === a3.type || 1 === t3.type ? n3 = false : (2 === r4.type && (e3.payload.data = r4.modifiedText), 2 === a3.type && (e3.payload.description = a3.modifiedText), 2 === t3.type && (e3.payload.extension = t3.modifiedText));
+ r4 = this._plugin.filter(e3.payload.data), s4 = this._plugin.filter(e3.payload.description), t3 = this._plugin.filter(e3.payload.extension);
+ 1 === r4.type || 1 === s4.type || 1 === t3.type ? n3 = false : (2 === r4.type && (e3.payload.data = r4.modifiedText), 2 === s4.type && (e3.payload.description = s4.modifiedText), 2 === t3.type && (e3.payload.extension = t3.modifiedText));
}
- M2.l("".concat(s4, " done. isAllowedToSend:").concat(n3));
+ M2.l("".concat(a3, " done. isAllowedToSend:").concat(n3));
}
}
return n3;
@@ -17490,8 +17505,8 @@ var chat = { exports: {} };
} }, { key: "_getLexicon", value: function() {
var l3 = this, d3 = new P2("profanityFilter"), p4 = "".concat(this._n, "._getLexicon");
this._isFetching = true, this.req({ P: G2.GET_PROFANITY_LIST, data: { startIndex: this._startIndex, version: this._version } }).then(function(e3) {
- var e3 = e3.data, t3 = e3.errorInfo, n3 = e3.filterConfig, o3 = e3.lexicon, i4 = e3.strToken, s4 = e3.completeFlag, a3 = e3.nextStartIndex, r4 = e3.version, e3 = e3.expiredTime, c3 = t3.errorCode, u3 = t3.errorMessage;
- return 0 !== c3 ? (l3._isFetching = false, M2.w("".concat(p4, " failed. error:"), t3), void d3.setCode(c3).setMessage(u3).end()) : (l3._onFilterConfig(n3), l3._getToken(i4), 1 === s4 ? (M2.l("".concat(p4, " done. version:").concat(r4, " expiredTime:").concat(e3)), l3._version = r4, l3._canIUseLexicon = true, l3._isFetching = false, l3._expiredTime = Date.now() + 1e3 * e3, void l3._plugin.onLexiconCompleted(o3)) : (l3._startIndex = a3, l3._plugin.onLexiconSliced(o3), void l3._getLexicon()));
+ var e3 = e3.data, t3 = e3.errorInfo, n3 = e3.filterConfig, o3 = e3.lexicon, i4 = e3.strToken, a3 = e3.completeFlag, s4 = e3.nextStartIndex, r4 = e3.version, e3 = e3.expiredTime, c3 = t3.errorCode, u3 = t3.errorMessage;
+ return 0 !== c3 ? (l3._isFetching = false, M2.w("".concat(p4, " failed. error:"), t3), void d3.setCode(c3).setMessage(u3).end()) : (l3._onFilterConfig(n3), l3._getToken(i4), 1 === a3 ? (M2.l("".concat(p4, " done. version:").concat(r4, " expiredTime:").concat(e3)), l3._version = r4, l3._canIUseLexicon = true, l3._isFetching = false, l3._expiredTime = Date.now() + 1e3 * e3, void l3._plugin.onLexiconCompleted(o3)) : (l3._startIndex = s4, l3._plugin.onLexiconSliced(o3), void l3._getLexicon()));
}).catch(function(e3) {
d3.setError(e3).end(), l3._isFetching = false, M2.l("".concat(p4, " failed. error:"), e3);
});
@@ -17517,7 +17532,7 @@ var chat = { exports: {} };
}
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._plugin && (this._plugin.reset(), this._plugin = null), this._filterConfigMap.clear(), this._startIndex = 0, this._version = 0, this._canIUseLexicon = false, this._isFetching = false, this._expiredTime = 0;
- } }])), zs = e2(function e3(t3) {
+ } }])), ns = e2(function e3(t3) {
p3(this, e3), this._m = t3, this._n = "TransCmdModule", this._TRTCCommandList = ["tui_room_svr.*", "callkit_records_svr.*", "room_engine_srv.*", "room_engine_http_srv.*", "room_engine_mic.*", "live_engine_srv.*", "live_engine_http_srv.*", "live_engine_pk.*", "trtc_ai_service.*", "call_engine_srv.*"], this._TRTCCommandMap = /* @__PURE__ */ new Map(), this._setTRTCCommandMap(), this._m.getIEmitInst().on(U2.CLOUD_CONFIG, this._onCloudConfig, this);
}, [{ key: "_onCloudConfig", value: function() {
var t3 = this, e3 = this._m.get(23).getCloudConfig("rtc_cmd");
@@ -17530,7 +17545,7 @@ var chat = { exports: {} };
} }, { key: "onRoomCustomDataReceived", value: function(e3) {
this._m.getOEmitInst().emit(h2.ROOM_CUSTOM_DATA_RECEIVED, e3);
} }, { key: "sendTRTCCustomData", value: function(e3) {
- var t3 = e3.serviceCommand, e3 = e3.data, n3 = "".concat(s3.NAME.TUIROOM_SVR, ".*");
+ var t3 = e3.serviceCommand, e3 = e3.data, n3 = "".concat(a2.NAME.TUIROOM_SVR, ".*");
return N3(t3) || (n3 = t3), this._isValidServiceCommand(n3) ? this._trans({ servcmd: n3, data: e3 }) : E2({ code: k2.INVALID_TRTC_CMD });
} }, { key: "_trans", value: function(e3) {
M2.d("".concat(this._n, "._trans. options:").concat(JSON.stringify(e3)));
@@ -17543,8 +17558,8 @@ var chat = { exports: {} };
return this._TRTCCommandMap.has(e3);
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset"));
- } }]), Xs = e2(function e3(t3) {
- p3(this, e3), this._m = t3, this._n = "ErrMsgModule", this.TIM_ERROR_ASSISTANCE = "tim_error_assistance", this.STORAGE_EXPIRES_TIME = 6048e5, this._map = /* @__PURE__ */ new Map(), this._init();
+ } }]), os = e2(function e3(t3) {
+ p3(this, e3), this._m = t3, this._n = "ErrMsgModule", this.TIM_ERROR_ASSISTANCE = "tim_error_assistance", this.STORAGE_EXPIRES_TIME = 6048e5, this.CURRENT_DOMAIN = ue2, this._map = /* @__PURE__ */ new Map(), this._init();
}, [{ key: "_init", value: function() {
var e3, t3 = this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE, false);
if (t3) {
@@ -17557,36 +17572,51 @@ var chat = { exports: {} };
} else
this._fetch();
} }, { key: "_needToUpdate", value: function(e3) {
- var t3 = e3.localSavedTime, e3 = e3.localSavedVersion, t3 = t3 && (/* @__PURE__ */ new Date()).getTime() - t3 >= this.STORAGE_EXPIRES_TIME, e3 = !e3 || "3.5.4" !== e3;
+ var t3 = e3.localSavedTime, e3 = e3.localSavedVersion, t3 = t3 && (/* @__PURE__ */ new Date()).getTime() - t3 >= this.STORAGE_EXPIRES_TIME, e3 = !e3 || "3.5.5" !== e3;
return M2.l("".concat(this._n, "._needToUpdate isTimeout:").concat(t3, " isDifferentVersion:").concat(e3)), t3 || e3;
} }, { key: "_fetch", value: function() {
- var e3, t3, n3, o3, i4, s4;
- this._m.get(12).isPrivateNetWork() || (e3 = "https://web.sdk.qcloud.com/im/download/error-message/v3/0.0.7/tim-error-message.txt", t3 = "application/x-www-form-urlencoded;charset=UTF-8", n3 = "".concat(this._n, "._fetch ok in"), o3 = this, v3 ? I2.request({ url: e3, method: "GET", timeout: 3e3, header: { "content-type": t3 }, dataType: "text", success: function(e4) {
- o3._fillAndSave(e4.data), M2.l("".concat(n3, " mini program"));
- }, fail: function() {
- } }) : (i4 = new XMLHttpRequest(), s4 = setTimeout(function() {
- i4.abort();
- }, 3e3), i4.onreadystatechange = function() {
- 4 === i4.readyState && (s4 && clearTimeout(s4), 200 !== i4.status && 304 !== i4.status || (M2.l("".concat(n3, " browser")), o3._fillAndSave(i4.responseText)));
- }, i4.open("GET", e3, true), i4.setRequestHeader("Content-type", t3), i4.send()));
+ this._m.get(12).isPrivateNetWork() || this._fetchWithRetry();
+ } }, { key: "_fetchWithRetry", value: function() {
+ var e3 = this;
+ this._fetchAdapter().catch(function() {
+ e3.CURRENT_DOMAIN !== de2 && (e3._generateCurrentDomain(), e3._fetchWithRetry());
+ });
+ } }, { key: "_generateCurrentDomain", value: function() {
+ this.CURRENT_DOMAIN === ue2 ? this.CURRENT_DOMAIN = le2 : this.CURRENT_DOMAIN === le2 && (this.CURRENT_DOMAIN = de2);
+ } }, { key: "_fetchAdapter", value: function() {
+ var i4 = "https://".concat(this.CURRENT_DOMAIN, "/im/download/error-message/v3/0.0.7/tim-error-message.txt"), a3 = "application/x-www-form-urlencoded;charset=UTF-8", s4 = "".concat(this._n, "._fetchAdapter ok in"), r4 = this;
+ return new Promise(function(t3, n3) {
+ var e3, o3;
+ v3 ? I2.request({ url: i4, method: "GET", timeout: 3e3, header: { "content-type": a3 }, dataType: "text", success: function(e4) {
+ r4._fillAndSave(e4.data), M2.l("".concat(s4, " mini program.")), t3();
+ }, fail: function(e4) {
+ n3(e4);
+ } }) : (e3 = new XMLHttpRequest(), o3 = setTimeout(function() {
+ e3.abort();
+ }, 3e3), e3.onreadystatechange = function() {
+ 4 === e3.readyState && (o3 && clearTimeout(o3), 200 === e3.status || 304 === e3.status ? (M2.l("".concat(s4, " browser.")), r4._fillAndSave(e3.responseText), t3()) : n3(e3.status));
+ }, e3.onerror = function(e4) {
+ n3(e4);
+ }, e3.open("GET", i4, true), e3.setRequestHeader("Content-type", a3), e3.send());
+ });
} }, { key: "_fillAndSave", value: function(e3) {
- this._fillMap(e3), this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE, JSON.stringify({ message: e3, localSavedTime: (/* @__PURE__ */ new Date()).getTime(), localSavedVersion: "3.5.4" }), true, false);
+ this._fillMap(e3), this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE, JSON.stringify({ message: e3, localSavedTime: (/* @__PURE__ */ new Date()).getTime(), localSavedVersion: "3.5.5" }), true, false);
} }, { key: "_getStorageModule", value: function() {
return this._m.get(13);
} }, { key: "_fillMap", value: function(e3) {
this._map.clear();
- for (var t3, n3, o3 = e3.split(";\n"), i4 = o3.length, s4 = new RegExp(/'/g), a3 = 0; a3 < i4; a3++)
- if (n3 = o3[a3].indexOf(":"), t3 = o3[a3].slice(0, n3), n3 = o3[a3].slice(n3 + 1, o3[a3].length), !t3.startsWith("//")) {
+ for (var t3, n3, o3 = e3.split(";\n"), i4 = o3.length, a3 = new RegExp(/'/g), s4 = 0; s4 < i4; s4++)
+ if (n3 = o3[s4].indexOf(":"), t3 = o3[s4].slice(0, n3), n3 = o3[s4].slice(n3 + 1, o3[s4].length), !t3.startsWith("//")) {
if (N3(n3))
continue;
- this._map.set(t3, n3.replace(s4, ""));
+ this._map.set(t3, n3.replace(a3, ""));
}
} }, { key: "get", value: function(e3) {
var t3 = e3.isIntl, n3 = e3.key, o3 = e3.replacement1, e3 = e3.replacement2, t3 = "".concat(n3, t3 ? "_en" : "_cn"), n3 = (!this._map.has(t3) && this._map.has(n3) && (t3 = n3), "");
return this._map.has(t3) && (n3 = this._map.get(t3), N3(o3) || (n3 = n3.replace("$replacement1", o3)), N3(e3) || (n3 = n3.replace("$replacement2", e3))), n3;
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset"));
- } }]), Zs = e2(function e3(t3) {
+ } }]), is = e2(function e3(t3) {
p3(this, e3), this._n = "RemoteSignalingHandler", this._sigM = t3;
}, [{ key: "onNewMessageList", value: function(e3) {
var n3 = this;
@@ -17627,27 +17657,27 @@ var chat = { exports: {} };
} }, { key: "_genBaseEmitData", value: function(e3) {
return { inviteID: e3.inviteID, inviter: e3.inviter, groupID: e3.groupID, data: e3.data || "" };
} }, { key: "_onNewInvitationReceived", value: function(e3, t3) {
- var n3 = "".concat(this._n, "._onNewInvitationReceived"), o3 = e3.inviteID, i4 = e3.inviteeList, s4 = e3.groupID, a3 = e3.inviter, r4 = this._sigM.getMyUserID(), c3 = i4.includes(r4), u3 = e3.timeout, l3 = (Fe2().getTime() - 1e3 * t3.time) / 1e3, n3 = (0 < u3 && 0 < l3 && l3 < u3 && (u3 -= l3), "".concat(n3, " myselfIncluded:").concat(c3, " groupID:").concat(s4, " signalObj:").concat(JSON.stringify(e3)));
- M2.l("".concat(n3, " timeout:").concat(u3, "s delta:").concat(l3, "s")), !(s4 && c3 || !s4) || (n3 = this._sigM.getInviteInfo(o3)) && n3 === e3 || (n3 || this._sigM.setInviteInfo(o3, y2(y2({}, e3), {}, { message: t3 })), this._sigM.emitEvent(_2.NEW_INVITATION_RECEIVED, y2(y2({}, this._genBaseEmitData(e3)), {}, { inviteeList: i4 })), a3 !== r4 && this._sigM.startTimer(y2(y2({}, e3), {}, { timeout: u3 })));
+ var n3 = "".concat(this._n, "._onNewInvitationReceived"), o3 = e3.inviteID, i4 = e3.inviteeList, a3 = e3.groupID, s4 = e3.inviter, r4 = this._sigM.getMyUserID(), c3 = i4.includes(r4), u3 = e3.timeout, l3 = (Ve2().getTime() - 1e3 * t3.time) / 1e3, n3 = (0 < u3 && 0 < l3 && l3 < u3 && (u3 -= l3), "".concat(n3, " myselfIncluded:").concat(c3, " groupID:").concat(a3, " signalObj:").concat(JSON.stringify(e3)));
+ M2.l("".concat(n3, " timeout:").concat(u3, "s delta:").concat(l3, "s")), !(a3 && c3 || !a3) || (n3 = this._sigM.getInviteInfo(o3)) && n3 === e3 || (n3 || this._sigM.setInviteInfo(o3, y2(y2({}, e3), {}, { message: t3 })), this._sigM.emitEvent(_2.NEW_INVITATION_RECEIVED, y2(y2({}, this._genBaseEmitData(e3)), {}, { inviteeList: i4 })), s4 !== r4 && this._sigM.startTimer(y2(y2({}, e3), {}, { timeout: u3 })));
} }, { key: "_onInviteeRejected", value: function(e3) {
- var t3 = "".concat(this._n, "._onInviteeRejected"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, s4 = this._sigM.hasInviteInfo(n3);
- M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(s4, " inviter:").concat(o3, " groupID:").concat(i4)), s4 && (this._sigM.updateInviteInfo(e3), this._sigM.emitEvent(_2.INVITEE_REJECTED, y2(y2({}, this._genBaseEmitData(e3)), {}, { invitee: e3.inviteeList[0] })));
+ var t3 = "".concat(this._n, "._onInviteeRejected"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, a3 = this._sigM.hasInviteInfo(n3);
+ M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(a3, " inviter:").concat(o3, " groupID:").concat(i4)), a3 && (this._sigM.updateInviteInfo(e3), this._sigM.emitEvent(_2.INVITEE_REJECTED, y2(y2({}, this._genBaseEmitData(e3)), {}, { invitee: e3.inviteeList[0] })));
} }, { key: "_onInviteeAccepted", value: function(e3) {
- var t3 = "".concat(this._n, "._onInviteeAccepted"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, s4 = this._sigM.hasInviteInfo(n3);
- M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(s4, " inviter:").concat(o3, " groupID:").concat(i4)), s4 && (this._sigM.updateInviteInfo(e3), this._sigM.emitEvent(_2.INVITEE_ACCEPTED, y2(y2({}, this._genBaseEmitData(e3)), {}, { invitee: e3.inviteeList[0] })));
+ var t3 = "".concat(this._n, "._onInviteeAccepted"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, a3 = this._sigM.hasInviteInfo(n3);
+ M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(a3, " inviter:").concat(o3, " groupID:").concat(i4)), a3 && (this._sigM.updateInviteInfo(e3), this._sigM.emitEvent(_2.INVITEE_ACCEPTED, y2(y2({}, this._genBaseEmitData(e3)), {}, { invitee: e3.inviteeList[0] })));
} }, { key: "_onInvitationCancelled", value: function(e3) {
- var t3 = "".concat(this._n, "._onInvitationCancelled"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, s4 = this._sigM.hasInviteInfo(n3);
- M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(s4, " inviter:").concat(o3, " groupID:").concat(i4)), s4 && (this._sigM.deleteInviteInfo(n3), this._sigM.emitEvent(_2.INVITATION_CANCELLED, this._genBaseEmitData(e3)));
+ var t3 = "".concat(this._n, "._onInvitationCancelled"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, a3 = this._sigM.hasInviteInfo(n3);
+ M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(a3, " inviter:").concat(o3, " groupID:").concat(i4)), a3 && (this._sigM.deleteInviteInfo(n3), this._sigM.emitEvent(_2.INVITATION_CANCELLED, this._genBaseEmitData(e3)));
} }, { key: "_onInvitationTimeout", value: function(e3) {
- var t3 = "".concat(this._n, "._onInvitationTimeout"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, s4 = e3.inviteeList, a3 = this._sigM.hasInviteInfo(n3);
- M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(a3, " inviter:").concat(o3, " groupID:").concat(i4, " data:").concat(e3.data)), a3 && (this._sigM.updateInviteInfo(e3), this._sigM.emitEvent(_2.INVITATION_TIMEOUT, y2(y2({}, this._genBaseEmitData(e3)), {}, { inviteeList: s4, isSelfTimeout: false })));
+ var t3 = "".concat(this._n, "._onInvitationTimeout"), n3 = e3.inviteID, o3 = e3.inviter, i4 = e3.groupID, a3 = e3.inviteeList, s4 = this._sigM.hasInviteInfo(n3);
+ M2.l("".concat(t3, " inviteID:").concat(n3, " hasInviteID:").concat(s4, " inviter:").concat(o3, " groupID:").concat(i4, " data:").concat(e3.data)), s4 && (this._sigM.updateInviteInfo(e3), this._sigM.emitEvent(_2.INVITATION_TIMEOUT, y2(y2({}, this._genBaseEmitData(e3)), {}, { inviteeList: a3, isSelfTimeout: false })));
} }, { key: "_onInvitationModified", value: function(e3, t3) {
- var n3 = "".concat(this._n, "._onInvitationModified"), o3 = e3.inviteID, i4 = e3.data, s4 = this._sigM.hasInviteInfo(o3);
- M2.l("".concat(n3, " inviteID:").concat(o3, " hasInviteID:").concat(s4, " data:").concat(i4)), s4 && (this._sigM.setInviteInfo(o3, y2(y2({}, e3), {}, { message: t3 })), this._sigM.emitEvent(_2.INVITATION_MODIFIED, { inviteID: o3, data: i4 }));
- } }]), Qs = e2(function e3(t3) {
+ var n3 = "".concat(this._n, "._onInvitationModified"), o3 = e3.inviteID, i4 = e3.data, a3 = this._sigM.hasInviteInfo(o3);
+ M2.l("".concat(n3, " inviteID:").concat(o3, " hasInviteID:").concat(a3, " data:").concat(i4)), a3 && (this._sigM.setInviteInfo(o3, y2(y2({}, e3), {}, { message: t3 })), this._sigM.emitEvent(_2.INVITATION_MODIFIED, { inviteID: o3, data: i4 }));
+ } }]), as = e2(function e3(t3) {
p3(this, e3), this._n = "LocalSignalingHandler", this._sigM = t3;
}, [{ key: "generateInviteID", value: function() {
- var e3, t3 = (t3 = Ss)((e3 = Ls)(32), 8) + "-" + t3(e3(16), 4) + "-" + t3(16384 | e3(12), 4) + "-" + t3(32768 | e3(14), 4) + "-" + t3(e3(48), 12);
+ var e3, t3 = (t3 = Pa)((e3 = Ga)(32), 8) + "-" + t3(e3(16), 4) + "-" + t3(16384 | e3(12), 4) + "-" + t3(32768 | e3(14), 4) + "-" + t3(e3(48), 12);
return M2.l("".concat(this._n, ".generateInviteID inviteID:").concat(t3)), t3;
} }, { key: "createInviteInfo", value: function(e3) {
var t3 = this.generateInviteID(), e3 = this.createInviteCustomData(y2(y2({}, e3), {}, { inviteID: t3 })), n3 = e3.groupID, o3 = e3.inviteeList, n3 = n3 || o3[0];
@@ -17659,18 +17689,18 @@ var chat = { exports: {} };
var t3 = e3.userID, n3 = e3.timeout, n3 = void 0 === n3 ? 0 : n3, o3 = e3.groupID, o3 = void 0 === o3 ? "" : o3, i4 = this._sigM.getMyUserID(), i4 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_INVITE, inviter: i4, inviteeList: o3 ? e3.inviteeList : [t3], timeout: n3 });
return M2.l("".concat(this._n, ".createInviteCustomData customData:"), i4), i4;
} }, { key: "createCancelCustomData", value: function(e3) {
- var t3, n3 = "".concat(this._n, ".createCancelCustomData"), o3 = e3.inviteID, i4 = this._sigM.getMyUserID(), o3 = this._sigM.getInviteInfo(o3), s4 = o3.inviteeList, a3 = o3.groupID, o3 = o3.inviter;
- return o3 === i4 ? t3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_CANCEL_INVITE, groupID: a3, inviter: i4, inviteeList: s4 }) : M2.e("".concat(n3, " unmatched inviter:").concat(o3, " and my userID:").concat(i4)), M2.l("".concat(n3, " customData:"), t3), t3;
+ var t3, n3 = "".concat(this._n, ".createCancelCustomData"), o3 = e3.inviteID, i4 = this._sigM.getMyUserID(), o3 = this._sigM.getInviteInfo(o3), a3 = o3.inviteeList, s4 = o3.groupID, o3 = o3.inviter;
+ return o3 === i4 ? t3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_CANCEL_INVITE, groupID: s4, inviter: i4, inviteeList: a3 }) : M2.e("".concat(n3, " unmatched inviter:").concat(o3, " and my userID:").concat(i4)), M2.l("".concat(n3, " customData:"), t3), t3;
} }, { key: "createAcceptCustomData", value: function(e3) {
- var t3, n3 = "".concat(this._n, ".createAcceptCustomData"), o3 = e3.inviteID, i4 = this._sigM.getMyUserID(), s4 = this._sigM.getInviteInfo(o3), a3 = s4.inviter, r4 = s4.groupID;
- return s4.inviteeList.includes(i4) ? t3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_ACCEPT_INVITE, groupID: r4, inviter: a3, inviteeList: [i4] }) : M2.e("".concat(n3, " userID:").concat(i4, " not in inviteeList. inviteID:").concat(o3, " groupID:").concat(r4)), M2.l("".concat(n3, " customData:"), t3), t3;
+ var t3, n3 = "".concat(this._n, ".createAcceptCustomData"), o3 = e3.inviteID, i4 = this._sigM.getMyUserID(), a3 = this._sigM.getInviteInfo(o3), s4 = a3.inviter, r4 = a3.groupID;
+ return a3.inviteeList.includes(i4) ? t3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_ACCEPT_INVITE, groupID: r4, inviter: s4, inviteeList: [i4] }) : M2.e("".concat(n3, " userID:").concat(i4, " not in inviteeList. inviteID:").concat(o3, " groupID:").concat(r4)), M2.l("".concat(n3, " customData:"), t3), t3;
} }, { key: "createRejectCustomData", value: function(e3) {
- var t3, n3 = "".concat(this._n, ".createRejectCustomData"), o3 = e3.inviteID, i4 = this._sigM.getMyUserID(), s4 = this._sigM.getInviteInfo(o3), a3 = s4.inviter, r4 = s4.groupID;
- return s4.inviteeList.includes(i4) ? t3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_REJECT_INVITE, groupID: r4, inviter: a3, inviteeList: [i4] }) : M2.e("".concat(n3, " userID:").concat(i4, " not in inviteeList. inviteID:").concat(o3, " groupID:").concat(r4)), M2.l("".concat(n3, " customData:"), t3), t3;
+ var t3, n3 = "".concat(this._n, ".createRejectCustomData"), o3 = e3.inviteID, i4 = this._sigM.getMyUserID(), a3 = this._sigM.getInviteInfo(o3), s4 = a3.inviter, r4 = a3.groupID;
+ return a3.inviteeList.includes(i4) ? t3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_REJECT_INVITE, groupID: r4, inviter: s4, inviteeList: [i4] }) : M2.e("".concat(n3, " userID:").concat(i4, " not in inviteeList. inviteID:").concat(o3, " groupID:").concat(r4)), M2.l("".concat(n3, " customData:"), t3), t3;
} }, { key: "createTimeoutCustomData", value: function(e3) {
- var t3 = "".concat(this._n, ".createTimeoutCustomData"), n3 = e3.inviteeList, o3 = e3.inviter, i4 = e3.isInviter, i4 = void 0 !== i4 && i4, s4 = this._sigM.getMyUserID(), e3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_INVITE_TIMEOUT, inviter: o3, inviteeList: i4 ? n3 : [s4] });
+ var t3 = "".concat(this._n, ".createTimeoutCustomData"), n3 = e3.inviteeList, o3 = e3.inviter, i4 = e3.isInviter, i4 = void 0 !== i4 && i4, a3 = this._sigM.getMyUserID(), e3 = y2(y2({}, this._genBaseCustomData(e3)), {}, { actionType: _2.ACTION_TYPE_INVITE_TIMEOUT, inviter: o3, inviteeList: i4 ? n3 : [a3] });
return M2.l("".concat(t3, " customData:"), e3), e3;
- } }]), $s = e2(function e3(t3) {
+ } }]), ss2 = e2(function e3(t3) {
p3(this, e3), this._n = "HistorySignalingHandler", this._sigM = t3, this.COUNT = 20, this.EXPIRED_TIME = 300, this._map = /* @__PURE__ */ new Map(), this._relatedToMeMap = /* @__PURE__ */ new Map();
}, [{ key: "setCloudConfig", value: function() {
var e3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 20, t3 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 300;
@@ -17696,12 +17726,12 @@ var chat = { exports: {} };
S2(e3) || this._sigM.onNewMessageList(e3);
} }, { key: "_getValidGroupConvList", value: function(e3) {
for (var t3 = [], n3 = 0, o3 = e3.length; n3 < o3; n3++) {
- var i4 = e3[n3], s4 = i4.type, a3 = i4.unreadCount, i4 = i4.lastMessage, s4 = s4 === R2.CONV_GROUP, i4 = this._isNotExpired(i4);
- s4 && a3 && i4 && t3.push(e3[n3]);
+ var i4 = e3[n3], a3 = i4.type, s4 = i4.unreadCount, i4 = i4.lastMessage, a3 = a3 === R2.CONV_GROUP, i4 = this._isNotExpired(i4);
+ a3 && s4 && i4 && t3.push(e3[n3]);
}
return t3;
} }, { key: "_isNotExpired", value: function(e3) {
- return !(!e3 || !e3.lastTime) && e3.lastTime > xe2() - this.EXPIRED_TIME;
+ return !(!e3 || !e3.lastTime) && e3.lastTime > He2() - this.EXPIRED_TIME;
} }, { key: "_createPromiseList", value: function(e3) {
for (var t3 = [], n3 = 0; n3 < e3.length; n3++) {
var o3 = e3[n3], i4 = o3.conversationID, o3 = o3.unreadCount, o3 = o3 < this.COUNT ? o3 : this.COUNT, o3 = (this._map.set(i4, { msgCount: o3, list: [] }), this._sigM.get(11).getMessageList({ conversationID: i4 }));
@@ -17709,13 +17739,13 @@ var chat = { exports: {} };
}
return t3;
} }, { key: "_concurrentGetMessageList", value: function(e3) {
- var i4 = this, s4 = [];
+ var i4 = this, a3 = [];
return Promise.all(e3).then(function(e4) {
for (var t3 = 0; t3 < e4.length; t3++) {
var n3 = e4[t3], o3 = n3.code, n3 = n3.data;
- 0 === o3 && 0 !== n3.messageList.length && (i4._handleMessageList(n3.messageList), o3 = i4._relayGetMessageList(n3)) && s4.push(o3);
+ 0 === o3 && 0 !== n3.messageList.length && (i4._handleMessageList(n3.messageList), o3 = i4._relayGetMessageList(n3)) && a3.push(o3);
}
- return 0 < s4.length ? i4._concurrentGetMessageList(s4) : i4._map;
+ return 0 < a3.length ? i4._concurrentGetMessageList(a3) : i4._map;
});
} }, { key: "_relayGetMessageList", value: function(e3) {
var t3, n3 = e3.messageList, o3 = e3.nextReqMessageID, e3 = e3.isCompleted;
@@ -17746,16 +17776,16 @@ var chat = { exports: {} };
this._updateHistoryInvite(e3);
}
} }, { key: "_setHistoryInvite", value: function(e3) {
- var t3 = this._sigM.getPayloadData(e3) || {}, n3 = t3.inviteID, n3 = void 0 === n3 ? "" : n3, o3 = t3.inviteeList, o3 = void 0 === o3 ? [] : o3, i4 = t3.timeout, i4 = void 0 === i4 ? 0 : i4, s4 = this._sigM.getMyUserID();
- o3.includes(s4) && (o3 = xe2() - e3.time, 0 < i4 && i4 < o3 && 0 !== i4 || this._relatedToMeMap.set(n3, y2(y2({}, t3), {}, { messageList: [e3] })));
+ var t3 = this._sigM.getPayloadData(e3) || {}, n3 = t3.inviteID, n3 = void 0 === n3 ? "" : n3, o3 = t3.inviteeList, o3 = void 0 === o3 ? [] : o3, i4 = t3.timeout, i4 = void 0 === i4 ? 0 : i4, a3 = this._sigM.getMyUserID();
+ o3.includes(a3) && (o3 = He2() - e3.time, 0 < i4 && i4 < o3 && 0 !== i4 || this._relatedToMeMap.set(n3, y2(y2({}, t3), {}, { messageList: [e3] })));
} }, { key: "_delHistoryInvite", value: function(e3) {
this._relatedToMeMap.has(e3) && this._relatedToMeMap.delete(e3);
} }, { key: "_updateHistoryInvite", value: function(e3) {
var t3 = this._sigM.getPayloadData(e3) || {}, n3 = t3.inviteID, n3 = void 0 === n3 ? "" : n3, t3 = t3.inviteeList, o3 = void 0 === t3 ? [] : t3;
if (this._relatedToMeMap.has(n3)) {
- for (var t3 = this._relatedToMeMap.get(n3), i4 = t3.inviteeList, t3 = t3.messageList, s4 = 0; s4 < o3.length; s4++) {
- var a3 = o3[s4];
- i4.includes(a3) && i4.splice(i4.indexOf(a3), 1);
+ for (var t3 = this._relatedToMeMap.get(n3), i4 = t3.inviteeList, t3 = t3.messageList, a3 = 0; a3 < o3.length; a3++) {
+ var s4 = o3[a3];
+ i4.includes(s4) && i4.splice(i4.indexOf(s4), 1);
}
0 === i4.length ? this._delHistoryInvite(n3) : t3.push(e3);
} else
@@ -17769,9 +17799,9 @@ var chat = { exports: {} };
});
} }, { key: "reset", value: function() {
this._map.clear(), this._relatedToMeMap.clear();
- } }]), ea = e2(function e3(t3, n3) {
+ } }]), rs = e2(function e3(t3, n3) {
p3(this, e3), this.businessID = t3.businessID || 1, this.inviteID = t3.inviteID, this.groupID = t3.groupID || "", this.inviter = t3.inviter || "", this.inviteeList = t3.inviteeList || [], this.data = t3.data || "", this.actionType = t3.actionType || _2.ACTION_TYPE_INVITE, this.timeout = t3.timeout || 0;
- }), ta = ["message"], na = ["message"], oa = (t2(ua, c2), e2(ua, [{ key: "onC2CUnreadHandleCompleted", value: function() {
+ }), cs = ["message"], us = ["message"], ls = (t2(fs, c2), e2(fs, [{ key: "onC2CUnreadHandleCompleted", value: function() {
this._isC2CUnreadHandleCompleted = true, this._isCloudConfigCompleted && this._isConvSyncCompleted && !this._isSyncCompleted && this.onReady();
} }, { key: "onConvSyncCompleted", value: function() {
this._isConvSyncCompleted = true, this._isC2CUnreadHandleCompleted && this._isCloudConfigCompleted && !this._isSyncCompleted && this.onReady();
@@ -17798,7 +17828,7 @@ var chat = { exports: {} };
} }, { key: "getInviteInfo", value: function(e3) {
return this._inviteInfoMap.get(e3);
} }, { key: "setInviteInfo", value: function(e3, t3) {
- var n3 = t3.message, t3 = W2(t3, ta);
+ var n3 = t3.message, t3 = W2(t3, cs);
M2.l("".concat(this._n, ".setInviteInfo inviteID:").concat(e3, " data:"), t3), this._inviteInfoMap.set(e3, y2(y2({}, t3), {}, { message: n3 }));
} }, { key: "deleteInviteInfo", value: function(e3) {
this.hasInviteInfo(e3) && (M2.l("".concat(this._n, ".deleteInviteInfo inviteID:").concat(e3, ".")), this._inviteInfoMap.delete(e3));
@@ -17814,17 +17844,17 @@ var chat = { exports: {} };
} }, { key: "removeSignalingListener", value: function(e3, t3, n3) {
this._m.getOEmitInst().off(e3, t3, n3), this._isListenerExisted() || (this._canIUseSignaling = false);
} }, { key: "invite", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, ".").concat("invite"), o3 = this._localSignalingHandler.createInviteInfo(e3), i4 = o3.message, s4 = o3.customData, a3 = o3.inviteID;
- return M2.l("".concat(n3, " options:").concat(JSON.stringify(e3), " inviteID:").concat(a3)), this.sendSignaling(i4, e3).then(function(e4) {
- return e4 && 0 === e4.code ? (t3.setInviteInfo(a3, y2(y2({}, s4), {}, { message: i4 })), t3.startTimer(y2(y2({}, s4), {}, { inviteID: a3 })), y2(y2({}, e4), {}, { inviteID: a3 })) : e4;
+ var t3 = this, n3 = "".concat(this._n, ".").concat("invite"), o3 = this._localSignalingHandler.createInviteInfo(e3), i4 = o3.message, a3 = o3.customData, s4 = o3.inviteID;
+ return M2.l("".concat(n3, " options:").concat(JSON.stringify(e3), " inviteID:").concat(s4)), this.sendSignaling(i4, e3).then(function(e4) {
+ return e4 && 0 === e4.code ? (t3.setInviteInfo(s4, y2(y2({}, a3), {}, { message: i4 })), t3.startTimer(y2(y2({}, a3), {}, { inviteID: s4 })), y2(y2({}, e4), {}, { inviteID: s4 })) : e4;
}).catch(function(e4) {
return E2(e4);
});
} }, { key: "inviteSync", value: function(e3, t3, n3) {
- var o3 = this, i4 = "".concat(this._n, ".").concat("inviteSync"), s4 = this._localSignalingHandler.createInviteInfo(e3), a3 = s4.message, r4 = s4.customData, c3 = s4.inviteID;
- return M2.l("".concat(i4, " options:").concat(JSON.stringify(e3), " inviteID:").concat(c3)), this.sendSignaling(a3, e3).then(function(e4) {
+ var o3 = this, i4 = "".concat(this._n, ".").concat("inviteSync"), a3 = this._localSignalingHandler.createInviteInfo(e3), s4 = a3.message, r4 = a3.customData, c3 = a3.inviteID;
+ return M2.l("".concat(i4, " options:").concat(JSON.stringify(e3), " inviteID:").concat(c3)), this.sendSignaling(s4, e3).then(function(e4) {
if (e4 && 0 === e4.code)
- return o3.setInviteInfo(c3, y2(y2({}, r4), {}, { message: a3 })), o3.startTimer(y2(y2({}, r4), {}, { inviteID: c3 })), t3 && t3({ inviteID: c3 }), { inviteID: c3 };
+ return o3.setInviteInfo(c3, y2(y2({}, r4), {}, { message: s4 })), o3.startTimer(y2(y2({}, r4), {}, { inviteID: c3 })), t3 && t3({ inviteID: c3 }), { inviteID: c3 };
n3 && n3(0 === e4.code, e4.message || "");
}).catch(function(e4) {
return n3 && n3(e4.code, e4.message), E2(e4);
@@ -17865,18 +17895,18 @@ var chat = { exports: {} };
return E2(e4);
})) : (this._isHandling = false, E2({ code: k2.SIGNALING_NO_PERMISSION }));
} }, { key: "getSignalingInfo", value: function(e3) {
- var t3 = "".concat(this._n, ".getSignalingInfo"), n3 = e3.ID, o3 = e3.from, i4 = e3.to, s4 = this._filterSignaling(e3), a3 = null, e3 = (s4 && (e3 = this.getPayloadData(e3), a3 = new ea(e3)), s4 ? "actionType:".concat(a3.actionType) : "");
- return M2.l("".concat(t3, " messageID:").concat(n3, " from:").concat(o3, " to:").concat(i4, " ") + "".concat(e3, " isSignaling:").concat(s4)), a3;
+ var t3 = "".concat(this._n, ".getSignalingInfo"), n3 = e3.ID, o3 = e3.from, i4 = e3.to, a3 = this._filterSignaling(e3), s4 = null, e3 = (a3 && (e3 = this.getPayloadData(e3), s4 = new rs(e3)), a3 ? "actionType:".concat(s4.actionType) : "");
+ return M2.l("".concat(t3, " messageID:").concat(n3, " from:").concat(o3, " to:").concat(i4, " ") + "".concat(e3, " isSignaling:").concat(a3)), s4;
} }, { key: "modifyInvitation", value: function(e3) {
- var t3, n3, o3, i4, s4 = this, a3 = e3.inviteID, e3 = e3.data;
- return this.hasInviteInfo(a3) ? (t3 = this.getInviteInfo(a3), n3 = t3.message, o3 = W2(t3, na), i4 = n3.payload.data, o3.data = e3, n3.payload.data = JSON.stringify(o3), this.get(2).modifyRemoteMessage(n3).then(function(e4) {
- return s4.hasInviteInfo(a3) && s4.setInviteInfo(a3, y2(y2({}, o3), {}, { message: n3 })), e4;
+ var t3, n3, o3, i4, a3 = this, s4 = e3.inviteID, e3 = e3.data;
+ return this.hasInviteInfo(s4) ? (t3 = this.getInviteInfo(s4), n3 = t3.message, o3 = W2(t3, us), i4 = n3.payload.data, o3.data = e3, n3.payload.data = JSON.stringify(o3), this.get(2).modifyRemoteMessage(n3).then(function(e4) {
+ return a3.hasInviteInfo(s4) && a3.setInviteInfo(s4, y2(y2({}, o3), {}, { message: n3 })), e4;
}).catch(function(e4) {
return n3.payload.data = i4, E2(e4);
})) : E2({ code: k2.SIGNALING_INVALID_INVITE_ID });
} }, { key: "_genMsgCtrlInfo", value: function() {
- var e3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t3 = e3.data, t3 = void 0 === t3 ? "" : t3, n3 = e3.onlineUserOnly, o3 = e3.inviteID, o3 = void 0 === o3 ? "" : o3, i4 = e3.offlinePushInfo, e3 = e3.actionType, s4 = { _onlineOnlyFlag: false }, o3 = { onlineUserOnly: (s4 = o3 && this.getInviteInfo(o3) ? this.getInviteInfo(o3).message : s4)._onlineOnlyFlag || n3 || false, offlinePushInfo: i4, messageControlInfo: { excludedFromContentModeration: true, excludedFromUnreadCount: false, excludedFromLastMessage: false } };
- return e3 === _2.ACTION_TYPE_INVITE_TIMEOUT ? (s4 = !!t3.match(/excludeTimeoutSignalingFromHistoryMessage/), o3.messageControlInfo.excludedFromUnreadCount = s4, o3.messageControlInfo.excludedFromLastMessage = s4) : (n3 = !!t3.match(/excludeFromHistoryMessage/), i4 = !!t3.match(/excludeOriginalSignalingFromHistoryMessage/), o3.messageControlInfo.excludedFromUnreadCount = n3 || i4, o3.messageControlInfo.excludedFromLastMessage = n3 || i4), o3;
+ var e3 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t3 = e3.data, t3 = void 0 === t3 ? "" : t3, n3 = e3.onlineUserOnly, o3 = e3.inviteID, o3 = void 0 === o3 ? "" : o3, i4 = e3.offlinePushInfo, e3 = e3.actionType, a3 = { _onlineOnlyFlag: false }, o3 = { onlineUserOnly: (a3 = o3 && this.getInviteInfo(o3) ? this.getInviteInfo(o3).message : a3)._onlineOnlyFlag || n3 || false, offlinePushInfo: i4, messageControlInfo: { excludedFromContentModeration: true, excludedFromUnreadCount: false, excludedFromLastMessage: false } };
+ return e3 === _2.ACTION_TYPE_INVITE_TIMEOUT ? (a3 = !!t3.match(/excludeTimeoutSignalingFromHistoryMessage/), o3.messageControlInfo.excludedFromUnreadCount = a3, o3.messageControlInfo.excludedFromLastMessage = a3) : (n3 = !!t3.match(/excludeFromHistoryMessage/), i4 = !!t3.match(/excludeOriginalSignalingFromHistoryMessage/), o3.messageControlInfo.excludedFromUnreadCount = n3 || i4, o3.messageControlInfo.excludedFromLastMessage = n3 || i4), o3;
} }, { key: "sendSignaling", value: function(e3, t3) {
var n3 = this;
return this.get(2).sendMessageInstance(e3, this._genMsgCtrlInfo(t3)).catch(function(e4) {
@@ -17896,10 +17926,10 @@ var chat = { exports: {} };
var t3, n3, o3 = false;
return e3.type && e3.type === R2.MSG_CUSTOM && (t3 = e3.cloudCustomData, e3 = void 0 === (e3 = e3.payload.data) ? "" : e3, t3 = (void 0 === t3 ? "" : t3).match(/"type":"tsignaling"/), n3 = e3.match(/inviteID/), e3 = e3.match(/actionType/), o3 = t3 || n3 && e3), !!o3;
} }, { key: "startTimer", value: function(t3) {
- var n3, o3, i4, s4 = this, a3 = "".concat(this._n, ".startTimer"), e3 = t3.timeout, r4 = t3.inviteID, c3 = t3.inviter, u3 = t3.groupID, l3 = c3 === this.getMyUserID();
- M2.l("".concat(a3, " timeout:").concat(e3, " isInviter:").concat(l3, " groupID:").concat(u3)), e3 <= 0 || (n3 = l3 ? e3 + 5 : e3, o3 = 1, i4 = setInterval(function() {
- var e4 = s4._hasLocalInviteInfo(t3, l3);
- o3 < n3 && e4 ? ++o3 : (e4 && s4._sendTimeoutNotice(r4, l3), M2.l("".concat(a3, " end.")), clearInterval(i4));
+ var n3, o3, i4, a3 = this, s4 = "".concat(this._n, ".startTimer"), e3 = t3.timeout, r4 = t3.inviteID, c3 = t3.inviter, u3 = t3.groupID, l3 = c3 === this.getMyUserID();
+ M2.l("".concat(s4, " timeout:").concat(e3, " isInviter:").concat(l3, " groupID:").concat(u3)), e3 <= 0 || (n3 = l3 ? e3 + 5 : e3, o3 = 1, i4 = setInterval(function() {
+ var e4 = a3._hasLocalInviteInfo(t3, l3);
+ o3 < n3 && e4 ? ++o3 : (e4 && a3._sendTimeoutNotice(r4, l3), M2.l("".concat(s4, " end.")), clearInterval(i4));
}, 1e3));
} }, { key: "_hasLocalInviteInfo", value: function(e3, t3) {
var n3, o3, i4 = e3.inviteID, e3 = e3.groupID;
@@ -17907,38 +17937,38 @@ var chat = { exports: {} };
} }, { key: "_getReceiver", value: function(e3, t3) {
var n3 = t3.groupID, o3 = t3.inviteeList, t3 = t3.inviter;
return e3 ? n3 || o3[0] : n3 || t3;
- } }, { key: "_sendTimeoutNotice", value: function(i4, s4) {
- var a3 = this, e3 = this.getInviteInfo(i4), t3 = this._getReceiver(s4, e3), r4 = (M2.l("".concat(this._n, "._sendTimeoutNotice inviteID:").concat(i4, " to:").concat(t3, " isInviter:").concat(s4)), this._localSignalingHandler.createTimeoutCustomData(y2(y2({}, e3), {}, { isInviter: s4 }))), c3 = this.createSignaling(r4, t3);
+ } }, { key: "_sendTimeoutNotice", value: function(i4, a3) {
+ var s4 = this, e3 = this.getInviteInfo(i4), t3 = this._getReceiver(a3, e3), r4 = (M2.l("".concat(this._n, "._sendTimeoutNotice inviteID:").concat(i4, " to:").concat(t3, " isInviter:").concat(a3)), this._localSignalingHandler.createTimeoutCustomData(y2(y2({}, e3), {}, { isInviter: a3 }))), c3 = this.createSignaling(r4, t3);
return this.sendSignaling(c3, r4).then(function(e4) {
var t4, n3, o3;
- e4 && 0 === e4.code && (e4 = r4.data, t4 = r4.groupID, n3 = r4.inviteeList, o3 = r4.inviter, a3.emitEvent(_2.INVITATION_TIMEOUT, { data: e4, groupID: t4, inviteID: i4, inviteeList: n3, inviter: o3, isSelfTimeout: true, message: c3 }), s4 ? a3.deleteInviteInfo(i4) : a3.updateInviteInfo(r4));
+ e4 && 0 === e4.code && (e4 = r4.data, t4 = r4.groupID, n3 = r4.inviteeList, o3 = r4.inviter, s4.emitEvent(_2.INVITATION_TIMEOUT, { data: e4, groupID: t4, inviteID: i4, inviteeList: n3, inviter: o3, isSelfTimeout: true, message: c3 }), a3 ? s4.deleteInviteInfo(i4) : s4.updateInviteInfo(r4));
});
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._inviteInfoMap.clear(), this._canIUseSignaling = false, this._isHandling = false, this._historySignalingHandler.reset(), this._isC2CUnreadHandleCompleted = false, this._isConvSyncCompleted = false, this._isSyncCompleted = false, this._isCloudConfigCompleted = false;
- } }])), ia = ["followDiffList"], sa = ["from"], aa = { NONE: 0, FOLLOWERS: 1, FOLLOWING: 2, MUTUAL: 3 }, ra = (t2(ca, c2), e2(ca, [{ key: "_onCloudConfig", value: function() {
+ } }])), ds = ["followDiffList"], ps = ["from"], _s = { NONE: 0, FOLLOWERS: 1, FOLLOWING: 2, MUTUAL: 3 }, hs = (t2(gs, c2), e2(gs, [{ key: "_onCloudConfig", value: function() {
var e3 = this.getCloudConfig("follow_req_count");
N3(e3) || (e3 = Number(e3), this.DEFAULT_COUNT = e3 > this.MAX_COUNT ? this.MAX_COUNT : e3, this._clearFollowList());
} }, { key: "clearCacheOnReconnected", value: function() {
this._clearFollowList();
} }, { key: "onFollowNotify", value: function(e3) {
- var s4 = this, e3 = e3.dataList || [];
+ var a3 = this, e3 = e3.dataList || [];
M2.l("".concat(this._n, ".onFollowNotify followChangeList:").concat(e3.length)), e3.forEach(function(e4) {
- var t3 = e4.followDiffList, t3 = void 0 === t3 ? [] : t3, e4 = W2(e4, ia), o3 = e4.from, i4 = W2(e4, sa);
+ var t3 = e4.followDiffList, t3 = void 0 === t3 ? [] : t3, e4 = W2(e4, ds), o3 = e4.from, i4 = W2(e4, ps);
t3.forEach(function(e5) {
- var t4 = e5.isAdd, e5 = e5.followType, e5 = void 0 === e5 ? 0 : e5, n3 = s4._initFollowInfo();
- 1 === t4 ? (i4.userID = o3, n3[e5].userInfoList.push(i4), n3[e5].isAdd = true) : (n3[e5].userInfoList.push(o3), n3[e5].isAdd = false), s4._emitEvent(n3);
+ var t4 = e5.isAdd, e5 = e5.followType, e5 = void 0 === e5 ? 0 : e5, n3 = a3._initFollowInfo();
+ 1 === t4 ? (i4.userID = o3, n3[e5].userInfoList.push(i4), n3[e5].isAdd = true) : (n3[e5].userInfoList.push(o3), n3[e5].isAdd = false), a3._emitEvent(n3);
});
});
} }, { key: "_initFollowInfo", value: function() {
var t3 = {};
- return Object.values(aa).forEach(function(e3) {
- e3 !== aa.NONE && (t3[e3] = { userInfoList: [], isAdd: false });
+ return Object.values(_s).forEach(function(e3) {
+ e3 !== _s.NONE && (t3[e3] = { userInfoList: [], isAdd: false });
}), t3;
} }, { key: "_emitEvent", value: function(n3) {
var o3 = this;
Object.keys(n3).forEach(function(e3) {
var e3 = Number(e3), t3 = n3[e3];
- 0 < t3.userInfoList.length && (e3 === aa.FOLLOWERS && (o3._clearFollowList(aa.FOLLOWERS), o3.emitOEvt(h2.MY_FOLLOWERS_LIST_UPDATED, t3)), e3 === aa.FOLLOWING && (o3._clearFollowList(aa.FOLLOWING), o3.emitOEvt(h2.MY_FOLLOWING_LIST_UPDATED, t3)), e3 === aa.MUTUAL) && (o3._clearFollowList(aa.MUTUAL), o3.emitOEvt(h2.MUTUAL_FOLLOWERS_LIST_UPDATED, t3));
+ 0 < t3.userInfoList.length && (e3 === _s.FOLLOWERS && (o3._clearFollowList(_s.FOLLOWERS), o3.emitOEvt(h2.MY_FOLLOWERS_LIST_UPDATED, t3)), e3 === _s.FOLLOWING && (o3._clearFollowList(_s.FOLLOWING), o3.emitOEvt(h2.MY_FOLLOWING_LIST_UPDATED, t3)), e3 === _s.MUTUAL) && (o3._clearFollowList(_s.MUTUAL), o3.emitOEvt(h2.MUTUAL_FOLLOWERS_LIST_UPDATED, t3));
});
} }, { key: "followUser", value: function(e3) {
var t3, n3, o3;
@@ -17962,11 +17992,11 @@ var chat = { exports: {} };
return this.noUse(o3);
var i4 = n3 || this.FIRST_PAGE_INDEX;
if (this._myFollowersList.has(i4)) {
- var e3 = this._myFollowersList.get(i4), s4 = e3.resultList, a3 = e3.nextCursor, e3 = e3.lastUpdateTime;
- if (Date.now() - e3 < this.MAX_CATCH_TIME && 0 < s4.length)
- return M2.l("".concat(this._n, ".").concat(o3, " nextCursor:").concat(n3, " from local.")), D2({ resultList: s4, nextCursor: a3 });
+ var e3 = this._myFollowersList.get(i4), a3 = e3.resultList, s4 = e3.nextCursor, e3 = e3.lastUpdateTime;
+ if (Date.now() - e3 < this.MAX_CATCH_TIME && 0 < a3.length)
+ return M2.l("".concat(this._n, ".").concat(o3, " nextCursor:").concat(n3, " from local.")), D2({ resultList: a3, nextCursor: s4 });
}
- return this._getFollowList(n3, aa.FOLLOWERS).then(function(e4) {
+ return this._getFollowList(n3, _s.FOLLOWERS).then(function(e4) {
return t3._myFollowersList.set(i4, y2(y2({}, e4), {}, { lastUpdateTime: Date.now() })), M2.l("".concat(t3._n, ".").concat(o3, " nextCursor:").concat(n3, " from remote.")), T2(e4);
});
} }, { key: "getMyFollowingList", value: function() {
@@ -17975,11 +18005,11 @@ var chat = { exports: {} };
return this.noUse(o3);
var i4 = n3 || this.FIRST_PAGE_INDEX;
if (this._myFollowingList.has(i4)) {
- var e3 = this._myFollowingList.get(i4), s4 = e3.resultList, a3 = e3.nextCursor, e3 = e3.lastUpdateTime;
- if (Date.now() - e3 < this.MAX_CATCH_TIME && 0 < s4.length)
- return M2.l("".concat(this._n, ".").concat(o3, " nextCursor:").concat(n3, " from local.")), D2({ resultList: s4, nextCursor: a3 });
+ var e3 = this._myFollowingList.get(i4), a3 = e3.resultList, s4 = e3.nextCursor, e3 = e3.lastUpdateTime;
+ if (Date.now() - e3 < this.MAX_CATCH_TIME && 0 < a3.length)
+ return M2.l("".concat(this._n, ".").concat(o3, " nextCursor:").concat(n3, " from local.")), D2({ resultList: a3, nextCursor: s4 });
}
- return this._getFollowList(n3, aa.FOLLOWING).then(function(e4) {
+ return this._getFollowList(n3, _s.FOLLOWING).then(function(e4) {
return t3._myFollowingList.set(i4, y2(y2({}, e4), {}, { lastUpdateTime: Date.now() })), M2.l("".concat(t3._n, ".").concat(o3, " nextCursor:").concat(n3, " from remote.")), T2(e4);
});
} }, { key: "getMutualFollowersList", value: function() {
@@ -17988,11 +18018,11 @@ var chat = { exports: {} };
return this.noUse(o3);
var i4 = n3 || this.FIRST_PAGE_INDEX;
if (this._myMutualFollowersList.has(i4)) {
- var e3 = this._myMutualFollowersList.get(i4), s4 = e3.resultList, a3 = e3.nextCursor, e3 = e3.lastUpdateTime;
- if (Date.now() - e3 < this.MAX_CATCH_TIME && 0 < s4.length)
- return M2.l("".concat(this._n, ".").concat(o3, " nextCursor:").concat(n3, " from local.")), D2({ resultList: s4, nextCursor: a3 });
+ var e3 = this._myMutualFollowersList.get(i4), a3 = e3.resultList, s4 = e3.nextCursor, e3 = e3.lastUpdateTime;
+ if (Date.now() - e3 < this.MAX_CATCH_TIME && 0 < a3.length)
+ return M2.l("".concat(this._n, ".").concat(o3, " nextCursor:").concat(n3, " from local.")), D2({ resultList: a3, nextCursor: s4 });
}
- return this._getFollowList(n3, aa.MUTUAL).then(function(e4) {
+ return this._getFollowList(n3, _s.MUTUAL).then(function(e4) {
return t3._myMutualFollowersList.set(i4, y2(y2({}, e4), {}, { lastUpdateTime: Date.now() })), M2.l("".concat(t3._n, ".").concat(o3, " nextCursor:").concat(n3, " from remote.")), T2(e4);
});
} }, { key: "_getFollowList", value: function(e3, t3) {
@@ -18066,7 +18096,7 @@ var chat = { exports: {} };
} }, { key: "checkFollowType", value: function(e3) {
if (!this.canIUse(g2.FOLLOW))
return this.noUse("checkFollowType");
- 100 < e3.length && (e3 = e3.slice(0, 100), M2.w("".concat(t3, " ").concat(Qt2(100))));
+ 100 < e3.length && (e3 = e3.slice(0, 100), M2.w("".concat(t3, " ").concat(tn(100))));
var t3 = "".concat(this._n, ".").concat("checkFollowType"), n3 = "userIDList length:".concat(e3.length, " "), o3 = new P2("checkFollowType");
return o3.setMessage(n3), M2.l("".concat(t3, " ").concat(n3)), this.req({ P: G2.CHECK_FOLLOW_TYPE, data: { fromAccount: this.getMyUserID(), userIDList: e3 } }).then(function(e4) {
o3.end(), M2.l("".concat(t3, " ok."));
@@ -18079,10 +18109,10 @@ var chat = { exports: {} };
return o3.setError(e4).end(), M2.e("".concat(t3, " failed. error:"), e4), E2(e4);
});
} }, { key: "_clearFollowList", value: function(e3) {
- N3(e3) ? (this._myFollowersList.clear(), this._myFollowingList.clear(), this._myMutualFollowersList.clear()) : e3 !== aa.FOLLOWERS ? e3 !== aa.FOLLOWING ? e3 === aa.MUTUAL && this._myMutualFollowersList.clear() : this._myFollowingList.clear() : this._myFollowersList.clear();
+ N3(e3) ? (this._myFollowersList.clear(), this._myFollowingList.clear(), this._myMutualFollowersList.clear()) : e3 !== _s.FOLLOWERS ? e3 !== _s.FOLLOWING ? e3 === _s.MUTUAL && this._myMutualFollowersList.clear() : this._myFollowingList.clear() : this._myFollowersList.clear();
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._clearFollowList();
- } }])), ie2 = Ri(function(e3, t3) {
+ } }])), ie2 = bi(function(e3, t3) {
var n3 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
t3.assign = function(e4) {
for (var t4, n4, o4 = Array.prototype.slice.call(arguments, 1); o4.length; ) {
@@ -18090,8 +18120,8 @@ var chat = { exports: {} };
if (i5) {
if ("object" !== z2(i5))
throw new TypeError(i5 + "must be non-object");
- for (var s4 in i5)
- t4 = i5, n4 = s4, Object.prototype.hasOwnProperty.call(t4, n4) && (e4[s4] = i5[s4]);
+ for (var a3 in i5)
+ t4 = i5, n4 = a3, Object.prototype.hasOwnProperty.call(t4, n4) && (e4[a3] = i5[a3]);
}
}
return e4;
@@ -18102,17 +18132,17 @@ var chat = { exports: {} };
if (t4.subarray && e4.subarray)
e4.set(t4.subarray(n4, n4 + o4), i5);
else
- for (var s4 = 0; s4 < o4; s4++)
- e4[i5 + s4] = t4[n4 + s4];
+ for (var a3 = 0; a3 < o4; a3++)
+ e4[i5 + a3] = t4[n4 + a3];
}, flattenChunks: function(e4) {
- for (var t4, n4, o4, i5 = 0, s4 = 0, a3 = e4.length; s4 < a3; s4++)
- i5 += e4[s4].length;
- for (o4 = new Uint8Array(i5), s4 = t4 = 0, a3 = e4.length; s4 < a3; s4++)
- n4 = e4[s4], o4.set(n4, t4), t4 += n4.length;
+ for (var t4, n4, o4, i5 = 0, a3 = 0, s4 = e4.length; a3 < s4; a3++)
+ i5 += e4[a3].length;
+ for (o4 = new Uint8Array(i5), a3 = t4 = 0, s4 = e4.length; a3 < s4; a3++)
+ n4 = e4[a3], o4.set(n4, t4), t4 += n4.length;
return o4;
} }, i4 = { arraySet: function(e4, t4, n4, o4, i5) {
- for (var s4 = 0; s4 < o4; s4++)
- e4[i5 + s4] = t4[n4 + s4];
+ for (var a3 = 0; a3 < o4; a3++)
+ e4[i5 + a3] = t4[n4 + a3];
}, flattenChunks: function(e4) {
return [].concat.apply([], e4);
} };
@@ -18120,62 +18150,62 @@ var chat = { exports: {} };
e4 ? (t3.Buf8 = Uint8Array, t3.Buf16 = Uint16Array, t3.Buf32 = Int32Array, t3.assign(t3, o3)) : (t3.Buf8 = Array, t3.Buf16 = Array, t3.Buf32 = Array, t3.assign(t3, i4));
}, t3.setTyped(n3);
});
- function ca(e3) {
- return p3(this, ca), (e3 = i3(this, ca, [e3]))._n = "FollowModule", e3._myFollowersList = /* @__PURE__ */ new Map(), e3._myFollowingList = /* @__PURE__ */ new Map(), e3._myMutualFollowersList = /* @__PURE__ */ new Map(), e3.MAX_CATCH_TIME = 6e5, e3.FIRST_PAGE_INDEX = gt2(), e3.DEFAULT_COUNT = 500, e3.MAX_COUNT = 1e3, e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
+ function gs(e3) {
+ return p3(this, gs), (e3 = i3(this, gs, [e3]))._n = "FollowModule", e3._myFollowersList = /* @__PURE__ */ new Map(), e3._myFollowingList = /* @__PURE__ */ new Map(), e3._myMutualFollowersList = /* @__PURE__ */ new Map(), e3.MAX_CATCH_TIME = 6e5, e3.FIRST_PAGE_INDEX = vt2(), e3.DEFAULT_COUNT = 500, e3.MAX_COUNT = 1e3, e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function ua(e3) {
- p3(this, ua), (e3 = i3(this, ua, [e3]))._n = "SignalingModule", e3._inviteInfoMap = /* @__PURE__ */ new Map(), e3._canIUseSignaling = false, e3._isHandling = false, e3._remoteSignalingHandler = new Zs(e3), e3._localSignalingHandler = new Qs(e3), e3._historySignalingHandler = new $s(e3), e3._isC2CUnreadHandleCompleted = false, e3._isConvSyncCompleted = false, e3._isSyncCompleted = false, e3._isCloudConfigCompleted = false;
+ function fs(e3) {
+ p3(this, fs), (e3 = i3(this, fs, [e3]))._n = "SignalingModule", e3._inviteInfoMap = /* @__PURE__ */ new Map(), e3._canIUseSignaling = false, e3._isHandling = false, e3._remoteSignalingHandler = new is(e3), e3._localSignalingHandler = new as(e3), e3._historySignalingHandler = new ss2(e3), e3._isC2CUnreadHandleCompleted = false, e3._isConvSyncCompleted = false, e3._isSyncCompleted = false, e3._isCloudConfigCompleted = false;
var t3 = e3.getIEmitInst();
return t3.on(U2.C2C_UNREAD_HANDLE_COMPLETED, e3.onC2CUnreadHandleCompleted, e3), t3.on(U2.CONV_SYNC_COMPLETED, e3.onConvSyncCompleted, e3), t3.on(U2.CLOUD_CONFIG, e3.onCloudConfig, e3), e3;
}
- function la(e3) {
- return p3(this, la), (e3 = i3(this, la, [e3]))._n = "ProfanityFilterModule", e3._plugin = null, e3._filterConfigMap = /* @__PURE__ */ new Map(), e3._startIndex = 0, e3._version = 0, e3._canIUseLexicon = false, e3._isFetching = false, e3._expiredTime = 0, e3;
+ function ms(e3) {
+ return p3(this, ms), (e3 = i3(this, ms, [e3]))._n = "ProfanityFilterModule", e3._plugin = null, e3._filterConfigMap = /* @__PURE__ */ new Map(), e3._startIndex = 0, e3._version = 0, e3._canIUseLexicon = false, e3._isFetching = false, e3._expiredTime = 0, e3;
}
- function da(e3) {
+ function vs(e3) {
var t3;
- return p3(this, da), (t3 = i3(this, da, [e3]))._m = e3, t3._n = "TIMPushModule", t3._pluginName = "TIMPush", t3._pushPlugin = void 0, t3._androidPushConfig = {}, t3._deviceToken = "", t3._businessID = 0, t3._iOSBusinessID = 0, t3._c2cUnreadCount = 0, t3._groupUnreadCount = 0, t3._isWebUniapp = 0, t3._deviceInfo = { notificationStatus: 0, deviceModel: "", systemVersion: "", pushVersion: "1.0.1", packageName: "" }, t3;
+ return p3(this, vs), (t3 = i3(this, vs, [e3]))._m = e3, t3._n = "TIMPushModule", t3._pluginName = "TIMPush", t3._pushPlugin = void 0, t3._androidPushConfig = {}, t3._deviceToken = "", t3._businessID = 0, t3._iOSBusinessID = 0, t3._c2cUnreadCount = 0, t3._groupUnreadCount = 0, t3._isWebUniapp = 0, t3._deviceInfo = { notificationStatus: 0, deviceModel: "", systemVersion: "", pushVersion: "1.0.1", packageName: "" }, t3;
}
- function pa(e3) {
+ function Is(e3) {
var t3;
- return p3(this, pa), (t3 = i3(this, pa, [e3]))._m = e3, t3._n = "OfflinePushModule", t3._offlinePushPlugin = void 0, t3._androidPushConfig = { huaweiPushBussinessId: "", xiaomiPushBussinessId: "", xiaomiPushAppId: "", xiaomiPushAppKey: "", meizuPushBussinessId: "", meizuPushAppId: "", meizuPushAppKey: "", vivoPushBussinessId: "", fcmPushBussinessId: "", oppoPushBussinessId: "", oppoPushAppKey: "", oppoPushAppSecret: "", honorPushBussinessId: "" }, t3._deviceToken = "", t3._businessID = 0, t3._iosBusinessID = 0, t3._c2cUnreadCount = 0, t3._groupUnreadCount = 0, t3._isWebUniapp = 0, t3;
+ return p3(this, Is), (t3 = i3(this, Is, [e3]))._m = e3, t3._n = "OfflinePushModule", t3._offlinePushPlugin = void 0, t3._androidPushConfig = { huaweiPushBussinessId: "", xiaomiPushBussinessId: "", xiaomiPushAppId: "", xiaomiPushAppKey: "", meizuPushBussinessId: "", meizuPushAppId: "", meizuPushAppKey: "", vivoPushBussinessId: "", fcmPushBussinessId: "", oppoPushBussinessId: "", oppoPushAppKey: "", oppoPushAppSecret: "", honorPushBussinessId: "" }, t3._deviceToken = "", t3._businessID = 0, t3._iosBusinessID = 0, t3._c2cUnreadCount = 0, t3._groupUnreadCount = 0, t3._isWebUniapp = 0, t3;
}
- function _a(e3) {
- return p3(this, _a), (e3 = i3(this, _a, [e3]))._n = "WorkerTimerModule", e3._isWorkerEnabled = true, e3._workerTimer = null, e3._timerID = -1, e3._init(), e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
+ function Ms(e3) {
+ return p3(this, Ms), (e3 = i3(this, Ms, [e3]))._n = "WorkerTimerModule", e3._isWorkerEnabled = true, e3._workerTimer = null, e3._timerID = -1, e3._init(), e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function ha(e3) {
- return p3(this, ha), (e3 = i3(this, ha, [e3]))._n = "SnsModule", e3._friendHandler = new qs(e3), e3._friendApplicationHandler = new ws(e3), e3._friendGroupHandler = new Vs(e3), e3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, e3.onContextUpdated, e3), e3;
+ function ys(e3) {
+ return p3(this, ys), (e3 = i3(this, ys, [e3]))._n = "SnsModule", e3._friendHandler = new Ya(e3), e3._friendApplicationHandler = new Ka(e3), e3._friendGroupHandler = new Ja(e3), e3.getIEmitInst().on(U2.A2KEY_AND_TINYID_UPDATED, e3.onContextUpdated, e3), e3;
}
- function ga(e3) {
- p3(this, ga), (e3 = i3(this, ga, [e3]))._n = "QualityStatModule", e3.TAG = "im-ssolog-quality-stat", e3.reportIndex = 0, e3.wholePeriod = false, e3._qualityItems = [Bn, Hn, Kn, Wn, Yn, jn, Jn, zn, Xn, Zn], e3._messageSentItems = [Kn, Wn, Yn, jn, Jn], e3._messageReceivedItems = [zn, Xn, Zn], e3.REPORT_INTERVAL = 120, e3.REPORT_SDKAPPID_BLACKLIST = [], e3.REPORT_TINYID_WHITELIST = [], e3._statInfoArr = [], e3._avgRTT = new Ns(), e3._avgE2EDelay = new Os(), e3._rateMessageSent = new Gs(), e3._rateMessageReceived = new Ps();
+ function Cs(e3) {
+ p3(this, Cs), (e3 = i3(this, Cs, [e3]))._n = "QualityStatModule", e3.TAG = "im-ssolog-quality-stat", e3.reportIndex = 0, e3.wholePeriod = false, e3._qualityItems = [Wn, Yn, jn, Jn, zn, Xn, Zn, Qn, $n, eo], e3._messageSentItems = [jn, Jn, zn, Xn, Zn], e3._messageReceivedItems = [Qn, $n, eo], e3.REPORT_INTERVAL = 120, e3.REPORT_SDKAPPID_BLACKLIST = [], e3.REPORT_TINYID_WHITELIST = [], e3._statInfoArr = [], e3._avgRTT = new qa2(), e3._avgE2EDelay = new Fa(), e3._rateMessageSent = new xa(), e3._rateMessageReceived = new Va();
var t3 = e3.getIEmitInst();
return t3.on(U2.A2KEY_AND_TINYID_UPDATED, e3._onLoginSuccess, e3), t3.on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
- function fa(e3) {
- return p3(this, fa), (e3 = i3(this, fa, [e3]))._n = "RecoverMsgModule", e3.PULL_LIMIT_COUNT = 15, e3;
+ function Ts(e3) {
+ return p3(this, Ts), (e3 = i3(this, Ts, [e3]))._n = "RecoverMsgModule", e3.PULL_LIMIT_COUNT = 15, e3;
}
- function ma(e3) {
- return p3(this, ma), (e3 = i3(this, ma, [e3]))._n = "CloudControlModule", e3._cloudConfig = /* @__PURE__ */ new Map(), e3._expiredTime = 0, e3._version = 0, e3._isFetching = false, e3;
+ function Ds(e3) {
+ return p3(this, Ds), (e3 = i3(this, Ds, [e3]))._n = "CloudControlModule", e3._cloudConfig = /* @__PURE__ */ new Map(), e3._expiredTime = 0, e3._version = 0, e3._isFetching = false, e3;
}
- function va(e3) {
- return p3(this, va), (e3 = i3(this, va, [e3]))._n = "SessionModule", e3._platform = e3.getPlatform(), e3._pHandler = new fs(e3), e3._msgDispatcher = new vs(e3), e3._cmdFreqLimitMap = /* @__PURE__ */ new Map(), e3._cmdReqInfoMap = /* @__PURE__ */ new Map(), e3._serverOverloadInfoMap = /* @__PURE__ */ new Map(), e3._incrementalPullContactFlag = true, e3._init(), e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
+ function Es(e3) {
+ return p3(this, Es), (e3 = i3(this, Es, [e3]))._n = "SessionModule", e3._platform = e3.getPlatform(), e3._pHandler = new Ta(e3), e3._msgDispatcher = new Ea(e3), e3._cmdFreqLimitMap = /* @__PURE__ */ new Map(), e3._cmdReqInfoMap = /* @__PURE__ */ new Map(), e3._serverOverloadInfoMap = /* @__PURE__ */ new Map(), e3._incrementalPullContactFlag = true, e3._init(), e3.getIEmitInst().on(U2.CLOUD_CONFIG, e3._onCloudConfig, e3), e3;
}
ie2.assign, ie2.shrinkBuf, ie2.setTyped, ie2.Buf8, ie2.Buf16, ie2.Buf32;
- function Ia(e3, t3, n3, o3) {
- for (var i4 = 65535 & e3 | 0, s4 = e3 >>> 16 & 65535 | 0, a3 = 0; 0 !== n3; ) {
- for (n3 -= a3 = 2e3 < n3 ? 2e3 : n3; s4 = s4 + (i4 = i4 + t3[o3++] | 0) | 0, --a3; )
+ function Ls(e3, t3, n3, o3) {
+ for (var i4 = 65535 & e3 | 0, a3 = e3 >>> 16 & 65535 | 0, s4 = 0; 0 !== n3; ) {
+ for (n3 -= s4 = 2e3 < n3 ? 2e3 : n3; a3 = a3 + (i4 = i4 + t3[o3++] | 0) | 0, --s4; )
;
- i4 %= 65521, s4 %= 65521;
+ i4 %= 65521, a3 %= 65521;
}
- return i4 | s4 << 16 | 0;
+ return i4 | a3 << 16 | 0;
}
- function Ma(e3, t3, n3, o3) {
- var i4 = Ca, s4 = o3 + n3;
+ function Ss(e3, t3, n3, o3) {
+ var i4 = Rs, a3 = o3 + n3;
e3 ^= -1;
- for (var a3 = o3; a3 < s4; a3++)
- e3 = e3 >>> 8 ^ i4[255 & (e3 ^ t3[a3])];
+ for (var s4 = o3; s4 < a3; s4++)
+ e3 = e3 >>> 8 ^ i4[255 & (e3 ^ t3[s4])];
return -1 ^ e3;
}
- function ya(e3, t3, n3, o3, i4, s4, a3, r4) {
+ function ks2(e3, t3, n3, o3, i4, a3, s4, r4) {
for (var c3, u3, l3, d3, p4, _3, h3, g3, f3, m3 = r4.bits, v4 = 0, I3 = 0, M3 = 0, y3 = 0, C3 = 0, T3 = 0, D3 = 0, E3 = 0, L3 = 0, S3 = 0, k3 = null, R3 = 0, A3 = new ie2.Buf16(16), O3 = new ie2.Buf16(16), N4 = null, G3 = 0, v4 = 0; v4 <= 15; v4++)
A3[v4] = 0;
for (I3 = 0; I3 < o3; I3++)
@@ -18183,7 +18213,7 @@ var chat = { exports: {} };
for (C3 = m3, y3 = 15; 1 <= y3 && 0 === A3[y3]; y3--)
;
if (y3 < C3 && (C3 = y3), 0 === y3)
- i4[s4++] = 20971520, i4[s4++] = 20971520, r4.bits = 1;
+ i4[a3++] = 20971520, i4[a3++] = 20971520, r4.bits = 1;
else {
for (M3 = 1; M3 < y3 && 0 === A3[M3]; M3++)
;
@@ -18195,73 +18225,73 @@ var chat = { exports: {} };
for (O3[1] = 0, v4 = 1; v4 < 15; v4++)
O3[v4 + 1] = O3[v4] + A3[v4];
for (I3 = 0; I3 < o3; I3++)
- 0 !== t3[n3 + I3] && (a3[O3[t3[n3 + I3]]++] = I3);
- if (_3 = 0 === e3 ? (k3 = N4 = a3, 19) : 1 === e3 ? (k3 = Ta, R3 -= 257, N4 = Da, G3 -= 257, 256) : (k3 = Ea, N4 = La, -1), v4 = M3, p4 = s4, D3 = I3 = S3 = 0, l3 = -1, d3 = (L3 = 1 << (T3 = C3)) - 1, 1 === e3 && 852 < L3 || 2 === e3 && 592 < L3)
+ 0 !== t3[n3 + I3] && (s4[O3[t3[n3 + I3]]++] = I3);
+ if (_3 = 0 === e3 ? (k3 = N4 = s4, 19) : 1 === e3 ? (k3 = As, R3 -= 257, N4 = Os, G3 -= 257, 256) : (k3 = Ns, N4 = Gs, -1), v4 = M3, p4 = a3, D3 = I3 = S3 = 0, l3 = -1, d3 = (L3 = 1 << (T3 = C3)) - 1, 1 === e3 && 852 < L3 || 2 === e3 && 592 < L3)
return 1;
for (; ; ) {
- for (f3 = a3[I3] < _3 ? (g3 = 0, a3[I3]) : a3[I3] > _3 ? (g3 = N4[G3 + a3[I3]], k3[R3 + a3[I3]]) : (g3 = 96, 0), c3 = 1 << (h3 = v4 - D3), M3 = u3 = 1 << T3; i4[p4 + (S3 >> D3) + (u3 -= c3)] = h3 << 24 | g3 << 16 | f3 | 0, 0 !== u3; )
+ for (f3 = s4[I3] < _3 ? (g3 = 0, s4[I3]) : s4[I3] > _3 ? (g3 = N4[G3 + s4[I3]], k3[R3 + s4[I3]]) : (g3 = 96, 0), c3 = 1 << (h3 = v4 - D3), M3 = u3 = 1 << T3; i4[p4 + (S3 >> D3) + (u3 -= c3)] = h3 << 24 | g3 << 16 | f3 | 0, 0 !== u3; )
;
for (c3 = 1 << v4 - 1; S3 & c3; )
c3 >>= 1;
if (0 !== c3 ? S3 = (S3 & c3 - 1) + c3 : S3 = 0, I3++, 0 == --A3[v4]) {
if (v4 === y3)
break;
- v4 = t3[n3 + a3[I3]];
+ v4 = t3[n3 + s4[I3]];
}
if (C3 < v4 && (S3 & d3) !== l3) {
for (p4 += M3, E3 = 1 << (T3 = v4 - (D3 = 0 === D3 ? C3 : D3)); T3 + D3 < y3 && !((E3 -= A3[T3 + D3]) <= 0); )
T3++, E3 <<= 1;
if (L3 += 1 << T3, 1 === e3 && 852 < L3 || 2 === e3 && 592 < L3)
return 1;
- i4[l3 = S3 & d3] = C3 << 24 | T3 << 16 | p4 - s4 | 0;
+ i4[l3 = S3 & d3] = C3 << 24 | T3 << 16 | p4 - a3 | 0;
}
}
0 !== S3 && (i4[p4 + S3] = v4 - D3 << 24 | 64 << 16 | 0), r4.bits = C3;
}
return 0;
}
- var Ca = function() {
+ var Rs = function() {
for (var e3 = [], t3 = 0; t3 < 256; t3++) {
for (var n3 = t3, o3 = 0; o3 < 8; o3++)
n3 = 1 & n3 ? 3988292384 ^ n3 >>> 1 : n3 >>> 1;
e3[t3] = n3;
}
return e3;
- }(), Ta = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], Da = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], Ea = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], La = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
- function Sa(e3) {
+ }(), As = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], Os = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], Ns = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], Gs = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
+ function Ps(e3) {
return (e3 >>> 24 & 255) + (e3 >>> 8 & 65280) + ((65280 & e3) << 8) + ((255 & e3) << 24);
}
- function ka() {
+ function Us() {
this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new ie2.Buf16(320), this.work = new ie2.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
}
- function Ra(e3) {
+ function bs(e3) {
var t3;
return e3 && e3.state ? (t3 = e3.state, e3.total_in = e3.total_out = t3.total = 0, e3.msg = "", t3.wrap && (e3.adler = 1 & t3.wrap), t3.mode = 1, t3.last = 0, t3.havedict = 0, t3.dmax = 32768, t3.head = null, t3.hold = 0, t3.bits = 0, t3.lencode = t3.lendyn = new ie2.Buf32(852), t3.distcode = t3.distdyn = new ie2.Buf32(592), t3.sane = 1, t3.back = -1, 0) : -2;
}
- function Aa(e3) {
+ function ws(e3) {
var t3;
- return e3 && e3.state ? ((t3 = e3.state).wsize = 0, t3.whave = 0, t3.wnext = 0, Ra(e3)) : -2;
+ return e3 && e3.state ? ((t3 = e3.state).wsize = 0, t3.whave = 0, t3.wnext = 0, bs(e3)) : -2;
}
- function Oa(e3, t3) {
+ function Fs(e3, t3) {
var n3, o3;
- return !e3 || !e3.state || (o3 = e3.state, t3 < 0 ? (n3 = 0, t3 = -t3) : (n3 = 1 + (t3 >> 4), t3 < 48 && (t3 &= 15)), t3 && (t3 < 8 || 15 < t3)) ? -2 : (null !== o3.window && o3.wbits !== t3 && (o3.window = null), o3.wrap = n3, o3.wbits = t3, Aa(e3));
+ return !e3 || !e3.state || (o3 = e3.state, t3 < 0 ? (n3 = 0, t3 = -t3) : (n3 = 1 + (t3 >> 4), t3 < 48 && (t3 &= 15)), t3 && (t3 < 8 || 15 < t3)) ? -2 : (null !== o3.window && o3.wbits !== t3 && (o3.window = null), o3.wrap = n3, o3.wbits = t3, ws(e3));
}
- function Na(e3, t3) {
+ function qs(e3, t3) {
var n3;
- return e3 ? (n3 = new ka(), (e3.state = n3).window = null, 0 !== (n3 = Oa(e3, t3)) && (e3.state = null), n3) : -2;
+ return e3 ? (n3 = new Us(), (e3.state = n3).window = null, 0 !== (n3 = Fs(e3, t3)) && (e3.state = null), n3) : -2;
}
- var Ga, Pa, Ua = true;
- function ba(e3, t3, n3, o3) {
+ var xs, Vs, Bs = true;
+ function Hs(e3, t3, n3, o3) {
var i4, e3 = e3.state;
return null === e3.window && (e3.wsize = 1 << e3.wbits, e3.wnext = 0, e3.whave = 0, e3.window = new ie2.Buf8(e3.wsize)), o3 >= e3.wsize ? (ie2.arraySet(e3.window, t3, n3 - e3.wsize, e3.wsize, 0), e3.wnext = 0, e3.whave = e3.wsize) : ((i4 = e3.wsize - e3.wnext) > o3 && (i4 = o3), ie2.arraySet(e3.window, t3, n3 - o3, i4, e3.wnext), (o3 -= i4) ? (ie2.arraySet(e3.window, t3, n3 - o3, o3, 0), e3.wnext = o3, e3.whave = e3.wsize) : (e3.wnext += i4, e3.wnext === e3.wsize && (e3.wnext = 0), e3.whave < e3.wsize && (e3.whave += i4))), 0;
}
- var wa = { inflateReset: Aa, inflateReset2: Oa, inflateResetKeep: Ra, inflateInit: function(e3) {
- return Na(e3, 15);
- }, inflateInit2: Na, inflate: function(e3, b3) {
- var t3, n3, w3, o3, i4, s4, a3, r4, c3, F3, u3, l3, q3, x3, d3, p4, _3, h3, V3, B3, g3, f3, m3, v4, I3 = 0, M3 = new ie2.Buf8(4), H3 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
+ var Ks = { inflateReset: ws, inflateReset2: Fs, inflateResetKeep: bs, inflateInit: function(e3) {
+ return qs(e3, 15);
+ }, inflateInit2: qs, inflate: function(e3, b3) {
+ var t3, n3, w3, o3, i4, a3, s4, r4, c3, F3, u3, l3, q3, x3, d3, p4, _3, h3, V3, B3, g3, f3, m3, v4, I3 = 0, M3 = new ie2.Buf8(4), H3 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
if (!e3 || !e3.state || !e3.output || !e3.input && 0 !== e3.avail_in)
return -2;
- 12 === (t3 = e3.state).mode && (t3.mode = 13), i4 = e3.next_out, w3 = e3.output, a3 = e3.avail_out, o3 = e3.next_in, n3 = e3.input, s4 = e3.avail_in, r4 = t3.hold, c3 = t3.bits, F3 = s4, u3 = a3, f3 = 0;
+ 12 === (t3 = e3.state).mode && (t3.mode = 13), i4 = e3.next_out, w3 = e3.output, s4 = e3.avail_out, o3 = e3.next_in, n3 = e3.input, a3 = e3.avail_in, r4 = t3.hold, c3 = t3.bits, F3 = a3, u3 = s4, f3 = 0;
e:
for (; ; )
switch (t3.mode) {
@@ -18270,12 +18300,12 @@ var chat = { exports: {} };
t3.mode = 13;
else {
for (; c3 < 16; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (2 & t3.wrap && 35615 === r4)
- M3[t3.check = 0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ma(t3.check, M3, 2, 0), c3 = r4 = 0, t3.mode = 2;
+ M3[t3.check = 0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ss(t3.check, M3, 2, 0), c3 = r4 = 0, t3.mode = 2;
else if (t3.flags = 0, t3.head && (t3.head.done = false), !(1 & t3.wrap) || (((255 & r4) << 8) + (r4 >> 8)) % 31)
e3.msg = "incorrect header check", t3.mode = 30;
else if (8 != (15 & r4))
@@ -18293,9 +18323,9 @@ var chat = { exports: {} };
break;
case 2:
for (; c3 < 16; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (t3.flags = r4, 8 != (255 & t3.flags)) {
e3.msg = "unknown compression method", t3.mode = 30;
@@ -18305,54 +18335,54 @@ var chat = { exports: {} };
e3.msg = "unknown header flags set", t3.mode = 30;
break;
}
- t3.head && (t3.head.text = r4 >> 8 & 1), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ma(t3.check, M3, 2, 0)), c3 = r4 = 0, t3.mode = 3;
+ t3.head && (t3.head.text = r4 >> 8 & 1), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ss(t3.check, M3, 2, 0)), c3 = r4 = 0, t3.mode = 3;
case 3:
for (; c3 < 32; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
- t3.head && (t3.head.time = r4), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, M3[2] = r4 >>> 16 & 255, M3[3] = r4 >>> 24 & 255, t3.check = Ma(t3.check, M3, 4, 0)), c3 = r4 = 0, t3.mode = 4;
+ t3.head && (t3.head.time = r4), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, M3[2] = r4 >>> 16 & 255, M3[3] = r4 >>> 24 & 255, t3.check = Ss(t3.check, M3, 4, 0)), c3 = r4 = 0, t3.mode = 4;
case 4:
for (; c3 < 16; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
- t3.head && (t3.head.xflags = 255 & r4, t3.head.os = r4 >> 8), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ma(t3.check, M3, 2, 0)), c3 = r4 = 0, t3.mode = 5;
+ t3.head && (t3.head.xflags = 255 & r4, t3.head.os = r4 >> 8), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ss(t3.check, M3, 2, 0)), c3 = r4 = 0, t3.mode = 5;
case 5:
if (1024 & t3.flags) {
for (; c3 < 16; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
- t3.length = r4, t3.head && (t3.head.extra_len = r4), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ma(t3.check, M3, 2, 0)), c3 = r4 = 0;
+ t3.length = r4, t3.head && (t3.head.extra_len = r4), 512 & t3.flags && (M3[0] = 255 & r4, M3[1] = r4 >>> 8 & 255, t3.check = Ss(t3.check, M3, 2, 0)), c3 = r4 = 0;
} else
t3.head && (t3.head.extra = null);
t3.mode = 6;
case 6:
- if (1024 & t3.flags && ((l3 = (l3 = t3.length) > s4 ? s4 : l3) && (t3.head && (g3 = t3.head.extra_len - t3.length, t3.head.extra || (t3.head.extra = new Array(t3.head.extra_len)), ie2.arraySet(t3.head.extra, n3, o3, l3, g3)), 512 & t3.flags && (t3.check = Ma(t3.check, n3, l3, o3)), s4 -= l3, o3 += l3, t3.length -= l3), t3.length))
+ if (1024 & t3.flags && ((l3 = (l3 = t3.length) > a3 ? a3 : l3) && (t3.head && (g3 = t3.head.extra_len - t3.length, t3.head.extra || (t3.head.extra = new Array(t3.head.extra_len)), ie2.arraySet(t3.head.extra, n3, o3, l3, g3)), 512 & t3.flags && (t3.check = Ss(t3.check, n3, l3, o3)), a3 -= l3, o3 += l3, t3.length -= l3), t3.length))
break e;
t3.length = 0, t3.mode = 7;
case 7:
if (2048 & t3.flags) {
- if (0 === s4)
+ if (0 === a3)
break e;
- for (l3 = 0; g3 = n3[o3 + l3++], t3.head && g3 && t3.length < 65536 && (t3.head.name += String.fromCharCode(g3)), g3 && l3 < s4; )
+ for (l3 = 0; g3 = n3[o3 + l3++], t3.head && g3 && t3.length < 65536 && (t3.head.name += String.fromCharCode(g3)), g3 && l3 < a3; )
;
- if (512 & t3.flags && (t3.check = Ma(t3.check, n3, l3, o3)), s4 -= l3, o3 += l3, g3)
+ if (512 & t3.flags && (t3.check = Ss(t3.check, n3, l3, o3)), a3 -= l3, o3 += l3, g3)
break e;
} else
t3.head && (t3.head.name = null);
t3.length = 0, t3.mode = 8;
case 8:
if (4096 & t3.flags) {
- if (0 === s4)
+ if (0 === a3)
break e;
- for (l3 = 0; g3 = n3[o3 + l3++], t3.head && g3 && t3.length < 65536 && (t3.head.comment += String.fromCharCode(g3)), g3 && l3 < s4; )
+ for (l3 = 0; g3 = n3[o3 + l3++], t3.head && g3 && t3.length < 65536 && (t3.head.comment += String.fromCharCode(g3)), g3 && l3 < a3; )
;
- if (512 & t3.flags && (t3.check = Ma(t3.check, n3, l3, o3)), s4 -= l3, o3 += l3, g3)
+ if (512 & t3.flags && (t3.check = Ss(t3.check, n3, l3, o3)), a3 -= l3, o3 += l3, g3)
break e;
} else
t3.head && (t3.head.comment = null);
@@ -18360,9 +18390,9 @@ var chat = { exports: {} };
case 9:
if (512 & t3.flags) {
for (; c3 < 16; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (r4 !== (65535 & t3.check)) {
e3.msg = "header crc mismatch", t3.mode = 30;
@@ -18374,14 +18404,14 @@ var chat = { exports: {} };
break;
case 10:
for (; c3 < 32; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
- e3.adler = t3.check = Sa(r4), c3 = r4 = 0, t3.mode = 11;
+ e3.adler = t3.check = Ps(r4), c3 = r4 = 0, t3.mode = 11;
case 11:
if (0 === t3.havedict)
- return e3.next_out = i4, e3.avail_out = a3, e3.next_in = o3, e3.avail_in = s4, t3.hold = r4, t3.bits = c3, 2;
+ return e3.next_out = i4, e3.avail_out = s4, e3.next_in = o3, e3.avail_in = a3, t3.hold = r4, t3.bits = c3, 2;
e3.adler = t3.check = 1, t3.mode = 12;
case 12:
if (5 === b3 || 6 === b3)
@@ -18391,9 +18421,9 @@ var chat = { exports: {} };
r4 >>>= 7 & c3, c3 -= 7 & c3, t3.mode = 27;
else {
for (; c3 < 3; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
switch (t3.last = 1 & r4, --c3, 3 & (r4 >>>= 1)) {
case 0:
@@ -18402,8 +18432,8 @@ var chat = { exports: {} };
case 1:
y3 = C3 = void 0;
var y3, C3 = t3;
- if (Ua) {
- for (Ga = new ie2.Buf32(512), Pa = new ie2.Buf32(32), y3 = 0; y3 < 144; )
+ if (Bs) {
+ for (xs = new ie2.Buf32(512), Vs = new ie2.Buf32(32), y3 = 0; y3 < 144; )
C3.lens[y3++] = 8;
for (; y3 < 256; )
C3.lens[y3++] = 9;
@@ -18411,11 +18441,11 @@ var chat = { exports: {} };
C3.lens[y3++] = 7;
for (; y3 < 288; )
C3.lens[y3++] = 8;
- for (ya(1, C3.lens, 0, 288, Ga, 0, C3.work, { bits: 9 }), y3 = 0; y3 < 32; )
+ for (ks2(1, C3.lens, 0, 288, xs, 0, C3.work, { bits: 9 }), y3 = 0; y3 < 32; )
C3.lens[y3++] = 5;
- ya(2, C3.lens, 0, 32, Pa, 0, C3.work, { bits: 5 }), Ua = false;
+ ks2(2, C3.lens, 0, 32, Vs, 0, C3.work, { bits: 5 }), Bs = false;
}
- if (C3.lencode = Ga, C3.lenbits = 9, C3.distcode = Pa, C3.distbits = 5, t3.mode = 20, 6 !== b3)
+ if (C3.lencode = xs, C3.lenbits = 9, C3.distcode = Vs, C3.distbits = 5, t3.mode = 20, 6 !== b3)
break;
r4 >>>= 2, c3 -= 2;
break e;
@@ -18430,9 +18460,9 @@ var chat = { exports: {} };
break;
case 14:
for (r4 >>>= 7 & c3, c3 -= 7 & c3; c3 < 32; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if ((65535 & r4) != (r4 >>> 16 ^ 65535)) {
e3.msg = "invalid stored block lengths", t3.mode = 30;
@@ -18444,17 +18474,17 @@ var chat = { exports: {} };
t3.mode = 16;
case 16:
if (l3 = t3.length) {
- if (0 === (l3 = a3 < (l3 = s4 < l3 ? s4 : l3) ? a3 : l3))
+ if (0 === (l3 = s4 < (l3 = a3 < l3 ? a3 : l3) ? s4 : l3))
break e;
- ie2.arraySet(w3, n3, o3, l3, i4), s4 -= l3, o3 += l3, a3 -= l3, i4 += l3, t3.length -= l3;
+ ie2.arraySet(w3, n3, o3, l3, i4), a3 -= l3, o3 += l3, s4 -= l3, i4 += l3, t3.length -= l3;
} else
t3.mode = 12;
break;
case 17:
for (; c3 < 14; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (t3.nlen = 257 + (31 & r4), r4 >>>= 5, c3 -= 5, t3.ndist = 1 + (31 & r4), r4 >>>= 5, c3 -= 5, t3.ncode = 4 + (15 & r4), r4 >>>= 4, c3 -= 4, 286 < t3.nlen || 30 < t3.ndist) {
e3.msg = "too many length or distance symbols", t3.mode = 30;
@@ -18464,15 +18494,15 @@ var chat = { exports: {} };
case 18:
for (; t3.have < t3.ncode; ) {
for (; c3 < 3; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
t3.lens[H3[t3.have++]] = 7 & r4, r4 >>>= 3, c3 -= 3;
}
for (; t3.have < 19; )
t3.lens[H3[t3.have++]] = 0;
- if (t3.lencode = t3.lendyn, t3.lenbits = 7, m3 = { bits: t3.lenbits }, f3 = ya(0, t3.lens, 0, 19, t3.lencode, 0, t3.work, m3), t3.lenbits = m3.bits, f3) {
+ if (t3.lencode = t3.lendyn, t3.lenbits = 7, m3 = { bits: t3.lenbits }, f3 = ks2(0, t3.lens, 0, 19, t3.lencode, 0, t3.work, m3), t3.lenbits = m3.bits, f3) {
e3.msg = "invalid code lengths set", t3.mode = 30;
break;
}
@@ -18480,18 +18510,18 @@ var chat = { exports: {} };
case 19:
for (; t3.have < t3.nlen + t3.ndist; ) {
for (; p4 = (I3 = t3.lencode[r4 & (1 << t3.lenbits) - 1]) >>> 16 & 255, _3 = 65535 & I3, !((d3 = I3 >>> 24) <= c3); ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (_3 < 16)
r4 >>>= d3, c3 -= d3, t3.lens[t3.have++] = _3;
else {
if (16 === _3) {
for (v4 = d3 + 2; c3 < v4; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (r4 >>>= d3, c3 -= d3, 0 === t3.have) {
e3.msg = "invalid bit length repeat", t3.mode = 30;
@@ -18500,16 +18530,16 @@ var chat = { exports: {} };
g3 = t3.lens[t3.have - 1], l3 = 3 + (3 & r4), r4 >>>= 2, c3 -= 2;
} else if (17 === _3) {
for (v4 = d3 + 3; c3 < v4; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
g3 = 0, l3 = 3 + (7 & (r4 >>>= d3)), r4 >>>= 3, c3 = c3 - d3 - 3;
} else {
for (v4 = d3 + 7; c3 < v4; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
g3 = 0, l3 = 11 + (127 & (r4 >>>= d3)), r4 >>>= 7, c3 = c3 - d3 - 7;
}
@@ -18527,11 +18557,11 @@ var chat = { exports: {} };
e3.msg = "invalid code -- missing end-of-block", t3.mode = 30;
break;
}
- if (t3.lenbits = 9, m3 = { bits: t3.lenbits }, f3 = ya(1, t3.lens, 0, t3.nlen, t3.lencode, 0, t3.work, m3), t3.lenbits = m3.bits, f3) {
+ if (t3.lenbits = 9, m3 = { bits: t3.lenbits }, f3 = ks2(1, t3.lens, 0, t3.nlen, t3.lencode, 0, t3.work, m3), t3.lenbits = m3.bits, f3) {
e3.msg = "invalid literal/lengths set", t3.mode = 30;
break;
}
- if (t3.distbits = 6, t3.distcode = t3.distdyn, m3 = { bits: t3.distbits }, f3 = ya(2, t3.lens, t3.nlen, t3.ndist, t3.distcode, 0, t3.work, m3), t3.distbits = m3.bits, f3) {
+ if (t3.distbits = 6, t3.distcode = t3.distdyn, m3 = { bits: t3.distbits }, f3 = ks2(2, t3.lens, t3.nlen, t3.ndist, t3.distcode, 0, t3.work, m3), t3.distbits = m3.bits, f3) {
e3.msg = "invalid distances set", t3.mode = 30;
break;
}
@@ -18540,8 +18570,8 @@ var chat = { exports: {} };
case 20:
t3.mode = 21;
case 21:
- if (6 <= s4 && 258 <= a3) {
- e3.next_out = i4, e3.avail_out = a3, e3.next_in = o3, e3.avail_in = s4, t3.hold = r4, t3.bits = c3, G3 = W3 = k3 = S3 = L3 = E3 = D3 = T3 = oe3 = ne3 = te3 = ee3 = U3 = P3 = $3 = Q3 = Z3 = X3 = z3 = J3 = j3 = N4 = Y3 = O3 = A3 = void 0;
+ if (6 <= a3 && 258 <= s4) {
+ e3.next_out = i4, e3.avail_out = s4, e3.next_in = o3, e3.avail_in = a3, t3.hold = r4, t3.bits = c3, G3 = W3 = k3 = S3 = L3 = E3 = D3 = T3 = oe3 = ne3 = te3 = ee3 = U3 = P3 = $3 = Q3 = Z3 = X3 = z3 = J3 = j3 = N4 = Y3 = O3 = A3 = void 0;
var T3, D3, E3, L3, S3, k3, R3 = e3, K3 = u3, A3 = R3.state, O3 = R3.next_in, W3 = R3.input, Y3 = O3 + (R3.avail_in - 5), N4 = R3.next_out, G3 = R3.output, j3 = N4 - (K3 - R3.avail_out), J3 = N4 + (R3.avail_out - 257), z3 = A3.dmax, X3 = A3.wsize, Z3 = A3.whave, Q3 = A3.wnext, $3 = A3.window, P3 = A3.hold, U3 = A3.bits, ee3 = A3.lencode, te3 = A3.distcode, ne3 = (1 << A3.lenbits) - 1, oe3 = (1 << A3.distbits) - 1;
t:
do {
@@ -18614,19 +18644,19 @@ var chat = { exports: {} };
break;
}
} while (O3 < Y3 && N4 < J3);
- O3 -= E3 = U3 >> 3, P3 &= (1 << (U3 -= E3 << 3)) - 1, R3.next_in = O3, R3.next_out = N4, R3.avail_in = O3 < Y3 ? Y3 - O3 + 5 : 5 - (O3 - Y3), R3.avail_out = N4 < J3 ? J3 - N4 + 257 : 257 - (N4 - J3), A3.hold = P3, A3.bits = U3, i4 = e3.next_out, w3 = e3.output, a3 = e3.avail_out, o3 = e3.next_in, n3 = e3.input, s4 = e3.avail_in, r4 = t3.hold, c3 = t3.bits, 12 === t3.mode && (t3.back = -1);
+ O3 -= E3 = U3 >> 3, P3 &= (1 << (U3 -= E3 << 3)) - 1, R3.next_in = O3, R3.next_out = N4, R3.avail_in = O3 < Y3 ? Y3 - O3 + 5 : 5 - (O3 - Y3), R3.avail_out = N4 < J3 ? J3 - N4 + 257 : 257 - (N4 - J3), A3.hold = P3, A3.bits = U3, i4 = e3.next_out, w3 = e3.output, s4 = e3.avail_out, o3 = e3.next_in, n3 = e3.input, a3 = e3.avail_in, r4 = t3.hold, c3 = t3.bits, 12 === t3.mode && (t3.back = -1);
break;
}
for (t3.back = 0; p4 = (I3 = t3.lencode[r4 & (1 << t3.lenbits) - 1]) >>> 16 & 255, _3 = 65535 & I3, !((d3 = I3 >>> 24) <= c3); ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (p4 && 0 == (240 & p4)) {
for (h3 = d3, V3 = p4, B3 = _3; p4 = (I3 = t3.lencode[B3 + ((r4 & (1 << h3 + V3) - 1) >> h3)]) >>> 16 & 255, _3 = 65535 & I3, !(h3 + (d3 = I3 >>> 24) <= c3); ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
r4 >>>= h3, c3 -= h3, t3.back += h3;
}
@@ -18646,24 +18676,24 @@ var chat = { exports: {} };
case 22:
if (t3.extra) {
for (v4 = t3.extra; c3 < v4; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
t3.length += r4 & (1 << t3.extra) - 1, r4 >>>= t3.extra, c3 -= t3.extra, t3.back += t3.extra;
}
t3.was = t3.length, t3.mode = 23;
case 23:
for (; p4 = (I3 = t3.distcode[r4 & (1 << t3.distbits) - 1]) >>> 16 & 255, _3 = 65535 & I3, !((d3 = I3 >>> 24) <= c3); ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (0 == (240 & p4)) {
for (h3 = d3, V3 = p4, B3 = _3; p4 = (I3 = t3.distcode[B3 + ((r4 & (1 << h3 + V3) - 1) >> h3)]) >>> 16 & 255, _3 = 65535 & I3, !(h3 + (d3 = I3 >>> 24) <= c3); ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
r4 >>>= h3, c3 -= h3, t3.back += h3;
}
@@ -18675,9 +18705,9 @@ var chat = { exports: {} };
case 24:
if (t3.extra) {
for (v4 = t3.extra; c3 < v4; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
t3.offset += r4 & (1 << t3.extra) - 1, r4 >>>= t3.extra, c3 -= t3.extra, t3.back += t3.extra;
}
@@ -18687,9 +18717,9 @@ var chat = { exports: {} };
}
t3.mode = 25;
case 25:
- if (0 === a3)
+ if (0 === s4)
break e;
- if (t3.offset > (l3 = u3 - a3)) {
+ if (t3.offset > (l3 = u3 - s4)) {
if ((l3 = t3.offset - l3) > t3.whave && t3.sane) {
e3.msg = "invalid distance too far back", t3.mode = 30;
break;
@@ -18697,23 +18727,23 @@ var chat = { exports: {} };
q3 = l3 > t3.wnext ? (l3 -= t3.wnext, t3.wsize - l3) : t3.wnext - l3, l3 > t3.length && (l3 = t3.length), x3 = t3.window;
} else
x3 = w3, q3 = i4 - t3.offset, l3 = t3.length;
- for (a3 -= l3 = a3 < l3 ? a3 : l3, t3.length -= l3; w3[i4++] = x3[q3++], --l3; )
+ for (s4 -= l3 = s4 < l3 ? s4 : l3, t3.length -= l3; w3[i4++] = x3[q3++], --l3; )
;
0 === t3.length && (t3.mode = 21);
break;
case 26:
- if (0 === a3)
+ if (0 === s4)
break e;
- w3[i4++] = t3.length, a3--, t3.mode = 21;
+ w3[i4++] = t3.length, s4--, t3.mode = 21;
break;
case 27:
if (t3.wrap) {
for (; c3 < 32; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 |= n3[o3++] << c3, c3 += 8;
+ a3--, r4 |= n3[o3++] << c3, c3 += 8;
}
- if (u3 -= a3, e3.total_out += u3, t3.total += u3, u3 && (e3.adler = t3.check = (t3.flags ? Ma : Ia)(t3.check, w3, u3, i4 - u3)), u3 = a3, (t3.flags ? r4 : Sa(r4)) !== t3.check) {
+ if (u3 -= s4, e3.total_out += u3, t3.total += u3, u3 && (e3.adler = t3.check = (t3.flags ? Ss : Ls)(t3.check, w3, u3, i4 - u3)), u3 = s4, (t3.flags ? r4 : Ps(r4)) !== t3.check) {
e3.msg = "incorrect data check", t3.mode = 30;
break;
}
@@ -18723,9 +18753,9 @@ var chat = { exports: {} };
case 28:
if (t3.wrap && t3.flags) {
for (; c3 < 32; ) {
- if (0 === s4)
+ if (0 === a3)
break e;
- s4--, r4 += n3[o3++] << c3, c3 += 8;
+ a3--, r4 += n3[o3++] << c3, c3 += 8;
}
if (r4 !== (4294967295 & t3.total)) {
e3.msg = "incorrect length check", t3.mode = 30;
@@ -18745,7 +18775,7 @@ var chat = { exports: {} };
default:
return -2;
}
- return e3.next_out = i4, e3.avail_out = a3, e3.next_in = o3, e3.avail_in = s4, t3.hold = r4, t3.bits = c3, (t3.wsize || u3 !== e3.avail_out && t3.mode < 30 && (t3.mode < 27 || 4 !== b3)) && ba(e3, e3.output, e3.next_out, u3 - e3.avail_out), F3 -= e3.avail_in, u3 -= e3.avail_out, e3.total_in += F3, e3.total_out += u3, t3.total += u3, t3.wrap && u3 && (e3.adler = t3.check = (t3.flags ? Ma : Ia)(t3.check, w3, u3, e3.next_out - u3)), e3.data_type = t3.bits + (t3.last ? 64 : 0) + (12 === t3.mode ? 128 : 0) + (20 === t3.mode || 15 === t3.mode ? 256 : 0), f3 = (0 == F3 && 0 === u3 || 4 === b3) && 0 === f3 ? -5 : f3;
+ return e3.next_out = i4, e3.avail_out = s4, e3.next_in = o3, e3.avail_in = a3, t3.hold = r4, t3.bits = c3, (t3.wsize || u3 !== e3.avail_out && t3.mode < 30 && (t3.mode < 27 || 4 !== b3)) && Hs(e3, e3.output, e3.next_out, u3 - e3.avail_out), F3 -= e3.avail_in, u3 -= e3.avail_out, e3.total_in += F3, e3.total_out += u3, t3.total += u3, t3.wrap && u3 && (e3.adler = t3.check = (t3.flags ? Ss : Ls)(t3.check, w3, u3, e3.next_out - u3)), e3.data_type = t3.bits + (t3.last ? 64 : 0) + (12 === t3.mode ? 128 : 0) + (20 === t3.mode || 15 === t3.mode ? 256 : 0), f3 = (0 == F3 && 0 === u3 || 4 === b3) && 0 === f3 ? -5 : f3;
}, inflateEnd: function(e3) {
var t3;
return e3 && e3.state ? ((t3 = e3.state).window && (t3.window = null), e3.state = null, 0) : -2;
@@ -18753,100 +18783,100 @@ var chat = { exports: {} };
return !e3 || !e3.state || 0 == (2 & (e3 = e3.state).wrap) ? -2 : ((e3.head = t3).done = false, 0);
}, inflateSetDictionary: function(e3, t3) {
var n3, o3 = t3.length;
- return !e3 || !e3.state || 0 !== (n3 = e3.state).wrap && 11 !== n3.mode ? -2 : 11 === n3.mode && Ia(1, t3, o3, 0) !== n3.check ? -3 : ba(e3, t3, o3, o3) ? (n3.mode = 31, -4) : (n3.havedict = 1, 0);
- }, inflateInfo: "pako inflate (from Nodeca project)" }, Fa = true, qa2 = true;
+ return !e3 || !e3.state || 0 !== (n3 = e3.state).wrap && 11 !== n3.mode ? -2 : 11 === n3.mode && Ls(1, t3, o3, 0) !== n3.check ? -3 : Hs(e3, t3, o3, o3) ? (n3.mode = 31, -4) : (n3.havedict = 1, 0);
+ }, inflateInfo: "pako inflate (from Nodeca project)" }, Ws = true, Ys = true;
try {
String.fromCharCode.apply(null, [0]);
} catch (e3) {
- Fa = false;
+ Ws = false;
}
try {
String.fromCharCode.apply(null, new Uint8Array(1));
} catch (e3) {
- qa2 = false;
+ Ys = false;
}
- for (var xa = new ie2.Buf8(256), Va = 0; Va < 256; Va++)
- xa[Va] = 252 <= Va ? 6 : 248 <= Va ? 5 : 240 <= Va ? 4 : 224 <= Va ? 3 : 192 <= Va ? 2 : 1;
- xa[254] = xa[254] = 1;
- function Ba(e3, t3) {
- for (var n3, o3, i4 = t3 || e3.length, s4 = new Array(2 * i4), a3 = 0, r4 = 0; r4 < i4; )
+ for (var js = new ie2.Buf8(256), Js = 0; Js < 256; Js++)
+ js[Js] = 252 <= Js ? 6 : 248 <= Js ? 5 : 240 <= Js ? 4 : 224 <= Js ? 3 : 192 <= Js ? 2 : 1;
+ js[254] = js[254] = 1;
+ function zs(e3, t3) {
+ for (var n3, o3, i4 = t3 || e3.length, a3 = new Array(2 * i4), s4 = 0, r4 = 0; r4 < i4; )
if ((n3 = e3[r4++]) < 128)
- s4[a3++] = n3;
- else if (4 < (o3 = xa[n3]))
- s4[a3++] = 65533, r4 += o3 - 1;
+ a3[s4++] = n3;
+ else if (4 < (o3 = js[n3]))
+ a3[s4++] = 65533, r4 += o3 - 1;
else {
for (n3 &= 2 === o3 ? 31 : 3 === o3 ? 15 : 7; 1 < o3 && r4 < i4; )
n3 = n3 << 6 | 63 & e3[r4++], o3--;
- 1 < o3 ? s4[a3++] = 65533 : n3 < 65536 ? s4[a3++] = n3 : (n3 -= 65536, s4[a3++] = 55296 | n3 >> 10 & 1023, s4[a3++] = 56320 | 1023 & n3);
+ 1 < o3 ? a3[s4++] = 65533 : n3 < 65536 ? a3[s4++] = n3 : (n3 -= 65536, a3[s4++] = 55296 | n3 >> 10 & 1023, a3[s4++] = 56320 | 1023 & n3);
}
- var c3 = s4, u3 = a3;
- if (u3 < 65534 && (c3.subarray && qa2 || !c3.subarray && Fa))
+ var c3 = a3, u3 = s4;
+ if (u3 < 65534 && (c3.subarray && Ys || !c3.subarray && Ws))
return String.fromCharCode.apply(null, ie2.shrinkBuf(c3, u3));
for (var l3 = "", d3 = 0; d3 < u3; d3++)
l3 += String.fromCharCode(c3[d3]);
return l3;
}
- function Ha() {
+ function Xs() {
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
}
- function Ka() {
+ function Zs() {
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false;
}
- var Wa = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 }, Ya = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }, ja = Object.prototype.toString;
- function Ja(e3) {
- if (!(this instanceof Ja))
- return new Ja(e3);
+ var Qs = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 }, $s = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }, er = Object.prototype.toString;
+ function tr(e3) {
+ if (!(this instanceof tr))
+ return new tr(e3);
this.options = ie2.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e3 || {});
- var t3 = this.options, e3 = (t3.raw && 0 <= t3.windowBits && t3.windowBits < 16 && (t3.windowBits = -t3.windowBits, 0 === t3.windowBits) && (t3.windowBits = -15), !(0 <= t3.windowBits && t3.windowBits < 16) || e3 && e3.windowBits || (t3.windowBits += 32), 15 < t3.windowBits && t3.windowBits < 48 && 0 == (15 & t3.windowBits) && (t3.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new Ha(), this.strm.avail_out = 0, wa.inflateInit2(this.strm, t3.windowBits));
- if (e3 !== Wa.Z_OK)
- throw new Error(Ya[e3]);
- if (this.header = new Ka(), wa.inflateGetHeader(this.strm, this.header), t3.dictionary && ("string" == typeof t3.dictionary ? t3.dictionary = function(e4) {
- for (var t4, n3, o3, i4, s4 = e4.length, a3 = 0, r4 = 0; r4 < s4; r4++)
- 55296 == (64512 & (n3 = e4.charCodeAt(r4))) && r4 + 1 < s4 && 56320 == (64512 & (o3 = e4.charCodeAt(r4 + 1))) && (n3 = 65536 + (n3 - 55296 << 10) + (o3 - 56320), r4++), a3 += n3 < 128 ? 1 : n3 < 2048 ? 2 : n3 < 65536 ? 3 : 4;
- for (t4 = new ie2.Buf8(a3), r4 = i4 = 0; i4 < a3; r4++)
- 55296 == (64512 & (n3 = e4.charCodeAt(r4))) && r4 + 1 < s4 && 56320 == (64512 & (o3 = e4.charCodeAt(r4 + 1))) && (n3 = 65536 + (n3 - 55296 << 10) + (o3 - 56320), r4++), n3 < 128 ? t4[i4++] = n3 : (n3 < 2048 ? t4[i4++] = 192 | n3 >>> 6 : (n3 < 65536 ? t4[i4++] = 224 | n3 >>> 12 : (t4[i4++] = 240 | n3 >>> 18, t4[i4++] = 128 | n3 >>> 12 & 63), t4[i4++] = 128 | n3 >>> 6 & 63), t4[i4++] = 128 | 63 & n3);
+ var t3 = this.options, e3 = (t3.raw && 0 <= t3.windowBits && t3.windowBits < 16 && (t3.windowBits = -t3.windowBits, 0 === t3.windowBits) && (t3.windowBits = -15), !(0 <= t3.windowBits && t3.windowBits < 16) || e3 && e3.windowBits || (t3.windowBits += 32), 15 < t3.windowBits && t3.windowBits < 48 && 0 == (15 & t3.windowBits) && (t3.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new Xs(), this.strm.avail_out = 0, Ks.inflateInit2(this.strm, t3.windowBits));
+ if (e3 !== Qs.Z_OK)
+ throw new Error($s[e3]);
+ if (this.header = new Zs(), Ks.inflateGetHeader(this.strm, this.header), t3.dictionary && ("string" == typeof t3.dictionary ? t3.dictionary = function(e4) {
+ for (var t4, n3, o3, i4, a3 = e4.length, s4 = 0, r4 = 0; r4 < a3; r4++)
+ 55296 == (64512 & (n3 = e4.charCodeAt(r4))) && r4 + 1 < a3 && 56320 == (64512 & (o3 = e4.charCodeAt(r4 + 1))) && (n3 = 65536 + (n3 - 55296 << 10) + (o3 - 56320), r4++), s4 += n3 < 128 ? 1 : n3 < 2048 ? 2 : n3 < 65536 ? 3 : 4;
+ for (t4 = new ie2.Buf8(s4), r4 = i4 = 0; i4 < s4; r4++)
+ 55296 == (64512 & (n3 = e4.charCodeAt(r4))) && r4 + 1 < a3 && 56320 == (64512 & (o3 = e4.charCodeAt(r4 + 1))) && (n3 = 65536 + (n3 - 55296 << 10) + (o3 - 56320), r4++), n3 < 128 ? t4[i4++] = n3 : (n3 < 2048 ? t4[i4++] = 192 | n3 >>> 6 : (n3 < 65536 ? t4[i4++] = 224 | n3 >>> 12 : (t4[i4++] = 240 | n3 >>> 18, t4[i4++] = 128 | n3 >>> 12 & 63), t4[i4++] = 128 | n3 >>> 6 & 63), t4[i4++] = 128 | 63 & n3);
return t4;
- }(t3.dictionary) : "[object ArrayBuffer]" === ja.call(t3.dictionary) && (t3.dictionary = new Uint8Array(t3.dictionary)), t3.raw) && (e3 = wa.inflateSetDictionary(this.strm, t3.dictionary)) !== Wa.Z_OK)
- throw new Error(Ya[e3]);
+ }(t3.dictionary) : "[object ArrayBuffer]" === er.call(t3.dictionary) && (t3.dictionary = new Uint8Array(t3.dictionary)), t3.raw) && (e3 = Ks.inflateSetDictionary(this.strm, t3.dictionary)) !== Qs.Z_OK)
+ throw new Error($s[e3]);
}
- function za(e3, t3) {
- t3 = new Ja(t3);
+ function nr(e3, t3) {
+ t3 = new tr(t3);
if (t3.push(e3, true), t3.err)
- throw t3.msg || Ya[t3.err];
+ throw t3.msg || $s[t3.err];
return t3.result;
}
- Ja.prototype.push = function(e3, t3) {
- var n3, o3, i4, s4, a3, r4 = this.strm, c3 = this.options.chunkSize, u3 = this.options.dictionary, l3 = false;
+ tr.prototype.push = function(e3, t3) {
+ var n3, o3, i4, a3, s4, r4 = this.strm, c3 = this.options.chunkSize, u3 = this.options.dictionary, l3 = false;
if (this.ended)
return false;
- o3 = t3 === ~~t3 ? t3 : true === t3 ? Wa.Z_FINISH : Wa.Z_NO_FLUSH, "string" == typeof e3 ? r4.input = function(e4) {
+ o3 = t3 === ~~t3 ? t3 : true === t3 ? Qs.Z_FINISH : Qs.Z_NO_FLUSH, "string" == typeof e3 ? r4.input = function(e4) {
for (var t4 = new ie2.Buf8(e4.length), n4 = 0, o4 = t4.length; n4 < o4; n4++)
t4[n4] = e4.charCodeAt(n4);
return t4;
- }(e3) : "[object ArrayBuffer]" === ja.call(e3) ? r4.input = new Uint8Array(e3) : r4.input = e3, r4.next_in = 0, r4.avail_in = r4.input.length;
+ }(e3) : "[object ArrayBuffer]" === er.call(e3) ? r4.input = new Uint8Array(e3) : r4.input = e3, r4.next_in = 0, r4.avail_in = r4.input.length;
do {
- if (0 === r4.avail_out && (r4.output = new ie2.Buf8(c3), r4.next_out = 0, r4.avail_out = c3), (n3 = (n3 = wa.inflate(r4, Wa.Z_NO_FLUSH)) === Wa.Z_NEED_DICT && u3 ? wa.inflateSetDictionary(this.strm, u3) : n3) === Wa.Z_BUF_ERROR && true === l3 && (n3 = Wa.Z_OK, l3 = false), n3 !== Wa.Z_STREAM_END && n3 !== Wa.Z_OK)
+ if (0 === r4.avail_out && (r4.output = new ie2.Buf8(c3), r4.next_out = 0, r4.avail_out = c3), (n3 = (n3 = Ks.inflate(r4, Qs.Z_NO_FLUSH)) === Qs.Z_NEED_DICT && u3 ? Ks.inflateSetDictionary(this.strm, u3) : n3) === Qs.Z_BUF_ERROR && true === l3 && (n3 = Qs.Z_OK, l3 = false), n3 !== Qs.Z_STREAM_END && n3 !== Qs.Z_OK)
return this.onEnd(n3), !(this.ended = true);
- !r4.next_out || 0 !== r4.avail_out && n3 !== Wa.Z_STREAM_END && (0 !== r4.avail_in || o3 !== Wa.Z_FINISH && o3 !== Wa.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i4 = function(e4, t4) {
+ !r4.next_out || 0 !== r4.avail_out && n3 !== Qs.Z_STREAM_END && (0 !== r4.avail_in || o3 !== Qs.Z_FINISH && o3 !== Qs.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i4 = function(e4, t4) {
for (var n4 = (t4 = (t4 = t4 || e4.length) > e4.length ? e4.length : t4) - 1; 0 <= n4 && 128 == (192 & e4[n4]); )
n4--;
- return !(n4 < 0 || 0 === n4) && n4 + xa[e4[n4]] > t4 ? n4 : t4;
- }(r4.output, r4.next_out), s4 = r4.next_out - i4, a3 = Ba(r4.output, i4), r4.next_out = s4, r4.avail_out = c3 - s4, s4 && ie2.arraySet(r4.output, r4.output, i4, s4, 0), this.onData(a3)) : this.onData(ie2.shrinkBuf(r4.output, r4.next_out))), 0 === r4.avail_in && 0 === r4.avail_out && (l3 = true);
- } while ((0 < r4.avail_in || 0 === r4.avail_out) && n3 !== Wa.Z_STREAM_END);
- return (o3 = n3 === Wa.Z_STREAM_END ? Wa.Z_FINISH : o3) === Wa.Z_FINISH ? (n3 = wa.inflateEnd(this.strm), this.onEnd(n3), this.ended = true, n3 === Wa.Z_OK) : o3 !== Wa.Z_SYNC_FLUSH || (this.onEnd(Wa.Z_OK), !(r4.avail_out = 0));
- }, Ja.prototype.onData = function(e3) {
+ return !(n4 < 0 || 0 === n4) && n4 + js[e4[n4]] > t4 ? n4 : t4;
+ }(r4.output, r4.next_out), a3 = r4.next_out - i4, s4 = zs(r4.output, i4), r4.next_out = a3, r4.avail_out = c3 - a3, a3 && ie2.arraySet(r4.output, r4.output, i4, a3, 0), this.onData(s4)) : this.onData(ie2.shrinkBuf(r4.output, r4.next_out))), 0 === r4.avail_in && 0 === r4.avail_out && (l3 = true);
+ } while ((0 < r4.avail_in || 0 === r4.avail_out) && n3 !== Qs.Z_STREAM_END);
+ return (o3 = n3 === Qs.Z_STREAM_END ? Qs.Z_FINISH : o3) === Qs.Z_FINISH ? (n3 = Ks.inflateEnd(this.strm), this.onEnd(n3), this.ended = true, n3 === Qs.Z_OK) : o3 !== Qs.Z_SYNC_FLUSH || (this.onEnd(Qs.Z_OK), !(r4.avail_out = 0));
+ }, tr.prototype.onData = function(e3) {
this.chunks.push(e3);
- }, Ja.prototype.onEnd = function(e3) {
- e3 === Wa.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = ie2.flattenChunks(this.chunks)), this.chunks = [], this.err = e3, this.msg = this.strm.msg;
+ }, tr.prototype.onEnd = function(e3) {
+ e3 === Qs.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = ie2.flattenChunks(this.chunks)), this.chunks = [], this.err = e3, this.msg = this.strm.msg;
};
- var wn = {}, Xa = ((0, ie2.assign)(wn, { Inflate: Ja, inflate: za, inflateRaw: function(e3, t3) {
- return (t3 = t3 || {}).raw = true, za(e3, t3);
- }, ungzip: za }, Wa), wn), Za = e2(function e3(t3) {
+ var xn = {}, or = ((0, ie2.assign)(xn, { Inflate: tr, inflate: nr, inflateRaw: function(e3, t3) {
+ return (t3 = t3 || {}).raw = true, nr(e3, t3);
+ }, ungzip: nr }, Qs), xn), ir = e2(function e3(t3) {
p3(this, e3), this._m = t3, this._n = "InflateModule", this._bLogForInflateOK = false, this._bLogForInflateError = false;
}, [{ key: "inflate", value: function(e3) {
var t3, e3 = new Uint8Array(e3).slice(4), n3 = Date.now();
try {
- t3 = Xa.inflate(e3, { to: "string" }), this._bLogForInflateOK || (this._bLogForInflateOK = true, new P2("inflateOK").end());
+ t3 = or.inflate(e3, { to: "string" }), this._bLogForInflateOK || (this._bLogForInflateOK = true, new P2("inflateOK").end());
} catch (e4) {
return this._bLogForInflateError ? void 0 : (this._bLogForInflateError = true, void new P2("inflateError").setMessage(e4).end());
}
@@ -18854,99 +18884,99 @@ var chat = { exports: {} };
return M2.d("inflate ok. zipped:".concat(e3, " unzipped:").concat(o3) + " compression ratio:".concat(Math.round(100 * (o3 - e3) / o3), "% cost:").concat(Date.now() - n3)), t3;
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._bLogForInflateOK = false, this._bLogForInflateError = false;
- } }]), Qa = "Message", $a = "User", er = "Group", tr = "GroupMember", nr = ["count"], or = ["conversationID", "timePosition", "timePeriod"], ir = ["miniBirthday", "maxBirthday"], sr2 = q2(q2(q2(q2({}, Qa, G2.CS), $a, G2.USER_CS), er, G2.GRP_CS), tr, G2.MBR_CS), ar = (t2(dr, c2), e2(dr, [{ key: "searchCloudMessages", value: function(e3) {
- return this.search(Qa, e3);
+ } }]), ar = "Message", sr2 = "User", rr = "Group", cr = "GroupMember", ur = ["count"], lr = ["conversationID", "timePosition", "timePeriod"], dr = ["miniBirthday", "maxBirthday"], pr = q2(q2(q2(q2({}, ar, G2.CS), sr2, G2.USER_CS), rr, G2.GRP_CS), cr, G2.MBR_CS), _r = (t2(vr, c2), e2(vr, [{ key: "searchCloudMessages", value: function(e3) {
+ return this.search(ar, e3);
} }, { key: "searchCloudUsers", value: function(e3) {
- return this.search($a, e3);
+ return this.search(sr2, e3);
} }, { key: "searchCloudGroups", value: function(e3) {
- return this.search(er, e3);
+ return this.search(rr, e3);
} }, { key: "searchCloudGroupMembers", value: function(e3) {
- return this.search(tr, e3);
- } }, { key: "search", value: function(i4, s4) {
- var a3 = this, e3 = "searchCloud".concat(i4, "s"), r4 = "".concat(this._n, ".").concat(e3);
- if (!s4)
+ return this.search(cr, e3);
+ } }, { key: "search", value: function(i4, a3) {
+ var s4 = this, e3 = "searchCloud".concat(i4, "s"), r4 = "".concat(this._n, ".").concat(e3);
+ if (!a3)
return E2({ code: k2.OPTIONS_IS_EMPTY, message: this.getErrMsg(k2.OPTIONS_IS_EMPTY, e3) });
- var t3 = s4.keywordList, n3 = rt2(t3), o3 = s4.count;
- if (s4.count && (o3 = parseInt(o3)), i4 === Qa && !n3 && !rt2(s4.senderUserIDList) && !rt2(s4.messageTypeList) || i4 !== Qa && !n3)
+ var t3 = a3.keywordList, n3 = lt2(t3), o3 = a3.count;
+ if (a3.count && (o3 = parseInt(o3)), i4 === ar && !n3 && !lt2(a3.senderUserIDList) && !lt2(a3.messageTypeList) || i4 !== ar && !n3)
throw M2.e("[".concat(e3, '] Missing required params: "keywordList".')), new Error("Params validate failed.");
- var c3 = Date.now(), u3 = new P2(e3), l3 = "keywordList:".concat(t3, " keywordListMatchType:").concat(s4.keywordListMatchType, " cursor:").concat(s4.cursor, " count:").concat(o3);
- return M2.l("".concat(r4, " ").concat(l3)), this.req({ P: sr2[i4], data: this._genParams(i4, s4) }).then(function(e4) {
+ var c3 = Date.now(), u3 = new P2(e3), l3 = "keywordList:".concat(t3, " keywordListMatchType:").concat(a3.keywordListMatchType, " cursor:").concat(a3.cursor, " count:").concat(o3);
+ return M2.l("".concat(r4, " ").concat(l3)), this.req({ P: pr[i4], data: this._genParams(i4, a3) }).then(function(e4) {
var t4 = e4.data, n4 = t4.code, t4 = t4.message;
if (0 !== n4)
- return 60020 === (o4 = n4) ? o4 = "SearchUnable" : i4 !== Qa && 27003 === n4 ? o4 = "SearchParamsError" : i4 !== Qa && 60018 === n4 && (o4 = "SearchOverLimit"), o4 = a3.getErrMsg(o4) || t4, t4 = new L2({ code: n4, message: o4 }), u3.setMessage(l3).setError(t4).end(), E2(t4);
- a3.get(27).isCSPluginEnabled();
- var n4 = e4.data, o4 = n4.cursor, t4 = void 0 === o4 ? "" : o4, o4 = n4.totalCount, n4 = "totalCount:".concat(o4, " cost:").concat(tn(c3)), n4 = (M2.l("".concat(r4, " ok. cursor:").concat(t4, " ").concat(n4)), u3.setMessage("".concat(l3, " ").concat(n4)).end(), a3._genRes(i4, s4, e4.data));
+ return 60020 === (o4 = n4) ? o4 = "SearchUnable" : i4 !== ar && 27003 === n4 ? o4 = "SearchParamsError" : i4 !== ar && 60018 === n4 && (o4 = "SearchOverLimit"), o4 = s4.getErrMsg(o4) || t4, t4 = new L2({ code: n4, message: o4 }), u3.setMessage(l3).setError(t4).end(), E2(t4);
+ s4.get(27).isCSPluginEnabled();
+ var n4 = e4.data, o4 = n4.cursor, t4 = void 0 === o4 ? "" : o4, o4 = n4.totalCount, n4 = "totalCount:".concat(o4, " cost:").concat(an(c3)), n4 = (M2.l("".concat(r4, " ok. cursor:").concat(t4, " ").concat(n4)), u3.setMessage("".concat(l3, " ").concat(n4)).end(), s4._genRes(i4, a3, e4.data));
return T2({ searchResultList: n4, cursor: t4, totalCount: o4 });
}).catch(function(e4) {
return u3.setMessage(l3).setError(e4).end(), E2(e4);
});
} }, { key: "_genParams", value: function(e3, t3) {
- var n3 = t3.count, o3 = W2(t3, nr);
- return n3 && (o3.count = parseInt(n3)), e3 === Qa ? this._genMsgParams(o3) : (n3 = t3.keywordList, t3 = t3.keywordListMatchType, o3.keywords = n3, o3.keywordMatchType = "and" === t3 ? 1 : 0, e3 === $a ? this._genUserParams(o3) : o3);
+ var n3 = t3.count, o3 = W2(t3, ur);
+ return n3 && (o3.count = parseInt(n3)), e3 === ar ? this._genMsgParams(o3) : (n3 = t3.keywordList, t3 = t3.keywordListMatchType, o3.keywords = n3, o3.keywordMatchType = "and" === t3 ? 1 : 0, e3 === sr2 ? this._genUserParams(o3) : o3);
} }, { key: "_genMsgParams", value: function(e3) {
- var t3 = e3.conversationID, n3 = e3.timePosition, o3 = e3.timePeriod, e3 = W2(e3, or);
- return N3(t3) || (Gt2(t3) && (e3.account = t3.replace(R2.CONV_C2C, "")), Pt2(t3) && (e3.groupID = t3.replace(R2.CONV_GROUP, ""))), A2(o3) && 0 < o3 && (A2(n3) && 0 < n3 ? e3.startTime = n3 - o3 : e3.startTime = xe2() - o3), e3.startTime && e3.startTime < 0 && (e3.startTime = void 0), A2(n3) && 0 < n3 && (e3.endTime = n3), e3;
+ var t3 = e3.conversationID, n3 = e3.timePosition, o3 = e3.timePeriod, e3 = W2(e3, lr);
+ return N3(t3) || (bt2(t3) && (e3.account = t3.replace(R2.CONV_C2C, "")), wt2(t3) && (e3.groupID = t3.replace(R2.CONV_GROUP, ""))), A2(o3) && 0 < o3 && (A2(n3) && 0 < n3 ? e3.startTime = n3 - o3 : e3.startTime = He2() - o3), e3.startTime && e3.startTime < 0 && (e3.startTime = void 0), A2(n3) && 0 < n3 && (e3.endTime = n3), e3;
} }, { key: "_genUserParams", value: function(e3) {
- var t3 = e3.miniBirthday, n3 = e3.maxBirthday, e3 = W2(e3, ir);
+ var t3 = e3.miniBirthday, n3 = e3.maxBirthday, e3 = W2(e3, dr);
return A2(t3) && (e3.miniBirthday = parseInt(t3), A2(n3) || (e3.maxBirthday = 4294967295)), A2(n3) && (e3.maxBirthday = parseInt(n3)), e3;
} }, { key: "_genRes", value: function(e3, t3, n3) {
switch (e3) {
- case Qa:
+ case ar:
return this._genMsgRes(n3.searchResult, !t3.conversationID);
- case $a:
+ case sr2:
return this._genUserRes(n3.userList);
- case er:
+ case rr:
return this._genGrpRes(n3.groupList);
- case tr:
+ case cr:
return this._genMemberRes(n3.groupMemberList);
default:
return [];
}
- } }, { key: "_genMsgRes", value: function(e3, s4) {
- var a3 = this.get(11);
+ } }, { key: "_genMsgRes", value: function(e3, a3) {
+ var s4 = this.get(11);
return O2(e3) && 0 !== e3.length ? e3.map(function(e4) {
var t3 = e4.groupID, n3 = e4.userID, o3 = e4.messageCount, e4 = e4.messageList, e4 = void 0 === e4 ? [] : e4, n3 = t3 ? "".concat(R2.CONV_GROUP).concat(t3) : "".concat(R2.CONV_C2C).concat(n3), i4 = { conversationID: n3, messageCount: o3, messageList: [] };
- return s4 && 1 < o3 || 0 < (o3 = e4.filter(function(e5) {
+ return a3 && 1 < o3 || 0 < (o3 = e4.filter(function(e5) {
return !!e5;
- })).length && (e4 = a3.onRoamingMessage(o3, n3, false), t3 && e4.reverse(), i4.messageList = e4, i4.messageCount = e4.length), i4;
+ })).length && (e4 = s4.onRoamingMessage(o3, n3, false), t3 && e4.reverse(), i4.messageList = e4, i4.messageCount = e4.length), i4;
}) : [];
} }, { key: "_genUserRes", value: function(e3) {
var t3 = this.get(4)._profileHandler;
if (!O2(e3))
return [];
for (var n3 = [], o3 = 0, i4 = e3.length; o3 < i4; o3++) {
- var s4 = e3[o3], a3 = s4.userID, s4 = s4.profileItems;
- "@TLS#NOT_FOUND" !== a3 && "" !== a3 && (a3 = t3._update(a3, t3._getLatestProfileFromResponse(a3, s4)).latestProfile, n3.push(a3));
+ var a3 = e3[o3], s4 = a3.userID, a3 = a3.profileItems;
+ "@TLS#NOT_FOUND" !== s4 && "" !== s4 && (s4 = t3._update(s4, t3._getLatestProfileFromResponse(s4, a3)).latestProfile, n3.push(s4));
}
return n3;
} }, { key: "_genGrpRes", value: function(e3) {
if (!O2(e3))
return [];
for (var t3 = [], n3 = 0, o3 = e3.length; n3 < o3; n3++)
- e3[n3] && e3[n3].groupID && t3.push(new qo(e3[n3]));
+ e3[n3] && e3[n3].groupID && t3.push(new Yo(e3[n3]));
return t3;
} }, { key: "_genMemberRes", value: function(e3) {
if (!O2(e3))
return [];
- for (var t3, n3, o3, i4, s4, a3, r4 = /* @__PURE__ */ new Map(), c3 = 0, u3 = e3.length; c3 < u3; c3++)
- e3[c3] && e3[c3].userID && e3[c3].groupID && (n3 = (t3 = e3[c3]).groupID, i4 = t3.name, s4 = t3.type, a3 = t3.avatar, o3 = t3.nick, i4 = { groupID: n3, name: i4, type: s4, avatar: a3 }, s4 = { userID: t3.userID, nick: o3, nameCard: t3.nameCard }, r4.has(n3) ? ((a3 = r4.get(n3)).memberList.push(s4), r4.set(n3, a3)) : r4.set(n3, { groupInfo: i4, memberList: [s4] }));
+ for (var t3, n3, o3, i4, a3, s4, r4 = /* @__PURE__ */ new Map(), c3 = 0, u3 = e3.length; c3 < u3; c3++)
+ e3[c3] && e3[c3].userID && e3[c3].groupID && (n3 = (t3 = e3[c3]).groupID, i4 = t3.name, a3 = t3.type, s4 = t3.avatar, o3 = t3.nick, i4 = { groupID: n3, name: i4, type: a3, avatar: s4 }, a3 = { userID: t3.userID, nick: o3, nameCard: t3.nameCard }, r4.has(n3) ? ((s4 = r4.get(n3)).memberList.push(a3), r4.set(n3, s4)) : r4.set(n3, { groupInfo: i4, memberList: [a3] }));
return d2(r4.values());
- } }])), rr = e2(function e3(t3) {
+ } }])), hr = e2(function e3(t3) {
var n3 = this;
p3(this, e3);
- var o3, i4 = new P2("sdkConstruct"), s4 = (this._n = "ModuleManager", this._isReady = false, this._reason = k2.USER_NOT_LOGGED_IN, this._startLoginTs = 0, this._map = /* @__PURE__ */ new Map(), this._optionalModuleMap = /* @__PURE__ */ new Map(), this._codeMsgForTUIMap = /* @__PURE__ */ new Map(), this._iEmitter = null, this._oEmitter = null, this._checkCount = 0, this._checkTimer = -1, this._map.set(12, new pi(this, t3)), this._map.set(37, new Za(this)), this._map.set(15, new Si(this)), this._map.set(27, new Ws(this)), this._map.set(23, new Rs(this)), this._map.set(24, new Hs(this)), this._map.set(26, new Us(this)), this._map.set(21, new _s(this)), this._map.set(20, new ks2(this)), this._map.set(1, new hi(this)), this._map.set(2, new xi(this)), this._map.set(3, new Vi(this)), this._map.set(34, new Bi(this)), this._map.set(31, new Hi(this)), this._map.set(4, new di(this)), this._map.set(6, new So(this)), this._map.set(11, new Ko(this)), this._map.set(7, new oi(this)), this._map.set(10, new ai(this)), this._map.set(13, new Ci(this)), this._map.set(32, new Xs(this)), this._map.set(14, new Di(this)), this._map.set(17, new Gi(this)), this._map.set(18, new Ki(this)), this._map.set(19, new Wi(this)), this._map.set(25, new As(this)), this._map.set(8, new Bs(this)), this._map.set(28, new Ys(this)), this._map.set(36, new js(this)), this._map.set(29, new Js(this)), this._map.set(30, new zs(this)), this._map.set(33, new oa(this)), this._map.set(35, new ra(this)), this._map.set(38, new ar(this)), this._eventThrottleMap = /* @__PURE__ */ new Map(), this._eventThrottling = t3.eventThrottling, this._map.get(12).isPartialUpdatedConvs() && (this._eventThrottling = false), m2(t3.modules) ? (Object.keys(t3.modules).forEach(function(e4) {
+ var o3, i4 = new P2("sdkConstruct"), a3 = (this._n = "ModuleManager", this._isReady = false, this._reason = k2.USER_NOT_LOGGED_IN, this._startLoginTs = 0, this._map = /* @__PURE__ */ new Map(), this._optionalModuleMap = /* @__PURE__ */ new Map(), this._codeMsgForTUIMap = /* @__PURE__ */ new Map(), this._iEmitter = null, this._oEmitter = null, this._checkCount = 0, this._checkTimer = -1, this._map.set(12, new Ii(this, t3)), this._map.set(37, new ir(this)), this._map.set(15, new Pi(this)), this._map.set(27, new Qa(this)), this._map.set(23, new ba(this)), this._map.set(24, new Xa(this)), this._map.set(26, new Ba(this)), this._map.set(21, new Ma(this)), this._map.set(20, new Ua(this)), this._map.set(1, new yi(this)), this._map.set(2, new ji(this)), this._map.set(3, new Ji(this)), this._map.set(34, new zi(this)), this._map.set(31, new Xi(this)), this._map.set(4, new vi(this)), this._map.set(6, new Po(this)), this._map.set(11, new Zo(this)), this._map.set(7, new li(this)), this._map.set(10, new _i(this)), this._map.set(13, new Ri(this)), this._map.set(32, new os(this)), this._map.set(14, new Oi(this)), this._map.set(17, new xi(this)), this._map.set(18, new Zi(this)), this._map.set(19, new Qi(this)), this._map.set(25, new wa(this)), this._map.set(8, new za(this)), this._map.set(28, new $a(this)), this._map.set(36, new es2(this)), this._map.set(29, new ts2(this)), this._map.set(30, new ns(this)), this._map.set(33, new ls(this)), this._map.set(35, new hs(this)), this._map.set(38, new _r(this)), this._eventThrottleMap = /* @__PURE__ */ new Map(), this._eventThrottling = t3.eventThrottling, this._map.get(12).isPartialUpdatedConvs() && (this._eventThrottling = false), m2(t3.modules) ? (Object.keys(t3.modules).forEach(function(e4) {
o3 = t3.modules[e4], "group-module" === e4 ? n3._map.set(7, new o3(n3)) : "relationship-module" === e4 ? n3._map.set(8, new o3(n3)) : "signaling-module" === e4 ? n3._map.set(33, new o3(n3)) : "follow-module" === e4 ? n3._map.set(35, new o3(n3)) : "cloud-search-module" === e4 && n3._map.set(38, new o3(n3)), n3._optionalModuleMap.set(e4, 1);
- }), this._map.get(12).setUsingChatCore(true)) : this._map.has(7) || this._map.get(12).setUsingChatCore(true), t3.instanceID), a3 = t3.SDKAppID, r4 = this._map.get(12).isIntl(), c3 = this._map.get(12).isUsingChatCore(), s4 = "instanceID:".concat(s4, " SDKAppID:").concat(a3, " isIntl:").concat(r4, " isUsingChatCore:").concat(c3, " host:").concat(qt2()) + " isIOSWebView:".concat(Ge2, " platform:").concat(ye2, " canIUseInflate:").concat(this.canIUseInflate()) + " workerAvailable:".concat(Ae2, " eventThrottling:").concat(this._eventThrottling, " UserAgent:").concat(Me2);
- P2.bindEventStatModule(this._map.get(14)), P2.bindNetMonitorModule(this._map.get(15)), i4.setMessage("".concat(s4, " ").concat(function() {
+ }), this._map.get(12).setUsingChatCore(true)) : this._map.has(7) || this._map.get(12).setUsingChatCore(true), t3.instanceID), s4 = t3.SDKAppID, r4 = this._map.get(12).isIntl(), c3 = this._map.get(12).isUsingChatCore(), a3 = "instanceID:".concat(a3, " SDKAppID:").concat(s4, " isIntl:").concat(r4, " isUsingChatCore:").concat(c3, " host:").concat(Bt2()) + " isIOSWebView:".concat(be2, " platform:").concat(De2, " canIUseInflate:").concat(this.canIUseInflate()) + " workerAvailable:".concat(Ge2, " eventThrottling:").concat(this._eventThrottling, " UserAgent:").concat(Te2);
+ P2.bindEventStatModule(this._map.get(14)), P2.bindNetMonitorModule(this._map.get(15)), i4.setMessage("".concat(a3, " ").concat(function() {
var t4 = "";
if (v3)
try {
- var e4 = I2.getSystemInfoSync(), n4 = e4.model, o4 = e4.version, i5 = e4.system, s5 = e4.platform, a4 = e4.SDKVersion, t4 = "model:".concat(n4, " version:").concat(o4, " system:").concat(i5, " platform:").concat(s5, " SDKVersion:").concat(a4);
+ var e4 = I2.getSystemInfoSync(), n4 = e4.model, o4 = e4.version, i5 = e4.system, a4 = e4.platform, s5 = e4.SDKVersion, t4 = "model:".concat(n4, " version:").concat(o4, " system:").concat(i5, " platform:").concat(a4, " SDKVersion:").concat(s5);
} catch (e5) {
t4 = "";
}
return t4;
- }())).end(), M2.i("SDK ".concat(s4)), L2.prototype._getErrMsg = this.getErrMsg.bind(this), this._readyList = void 0, this._ssoLogForReady = null, this._initReadyList();
+ }())).end(), M2.i("SDK ".concat(a3)), L2.prototype._getErrMsg = this.getErrMsg.bind(this), this._readyList = void 0, this._ssoLogForReady = null, this._initReadyList();
}, [{ key: "_startTimer", value: function() {
var e3 = this._map.get(24), t3 = e3.isWorkerEnabled();
M2.l("".concat(this._n, ".startTimer isWorkerEnabled:").concat(t3, " seed:").concat(this._checkTimer)), t3 ? e3.startWorkerTimer() : this._startMainThreadTimer();
@@ -18993,13 +19023,13 @@ var chat = { exports: {} };
var e3, t3, n3 = true;
this._readyList.forEach(function(e4) {
e4.isReady() || (n3 = false);
- }), n3 && !this._isReady && (this._isReady = true, this._oEmitter.emit(h2.SDK_READY), e3 = Date.now() - this._startLoginTs, M2.w("SDK is ready. cost ".concat(e3, " ms")), this._startLoginTs = Date.now(), t3 = this._ssoLogForReady.getStartTs() + Be2, this._ssoLogForReady.setMessage(e3).start(t3).end());
+ }), n3 && !this._isReady && (this._isReady = true, this._oEmitter.emit(h2.SDK_READY), e3 = Date.now() - this._startLoginTs, M2.w("SDK is ready. cost ".concat(e3, " ms")), this._startLoginTs = Date.now(), t3 = this._ssoLogForReady.getStartTs() + We2, this._ssoLogForReady.setMessage(e3).start(t3).end());
} }, { key: "login", value: function() {
- 0 === this._startLoginTs && (qe2(), this._startLoginTs = Date.now(), this._startTimer(), this._map.get(15).start(), this._ssoLogForReady = new P2("sdkReady"), this._reason = k2.LOGGING_IN);
+ 0 === this._startLoginTs && (Be2(), this._startLoginTs = Date.now(), this._startTimer(), this._map.get(15).start(), this._ssoLogForReady = new P2("sdkReady"), this._reason = k2.LOGGING_IN);
} }, { key: "onLoginFailed", value: function() {
this._startLoginTs = 0;
} }, { key: "getOEmitInst", value: function() {
- return null === this._oEmitter && (this._oEmitter = new Ai(), e3 = this._oEmitter, Vn = e3, this._oEmitter._emit = this._oEmitter.emit, this._oEmitter.emit = (function(e4, t3) {
+ return null === this._oEmitter && (this._oEmitter = new wi(), e3 = this._oEmitter, Kn = e3, this._oEmitter._emit = this._oEmitter.emit, this._oEmitter.emit = (function(e4, t3) {
var n3, o3, i4 = this;
this._canIUseSignaling() && (e4 === h2.MESSAGE_RECEIVED && this.get(33).onNewMessageList(t3), e4 === h2.MESSAGE_MODIFIED) && this.get(33).onMessageModified(t3), e4 === h2.CONVERSATION_LIST_UPDATED || e4 === h2.FRIEND_LIST_UPDATED || e4 === h2.GROUP_LIST_UPDATED || e4 === h2.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED ? false !== this._eventThrottling ? this._eventThrottleMap.has(e4) ? (n3 = Date.now()) - (o3 = this._eventThrottleMap.get(e4)).last <= 1e3 ? (-1 < o3.timeoutID && clearTimeout(o3.timeoutID), o3.timeoutID = setTimeout(function() {
o3.last = Date.now(), i4._oEmitter._emit.apply(i4._oEmitter, [e4, { name: e4, data: i4._getEventData(e4) }]);
@@ -19012,7 +19042,7 @@ var chat = { exports: {} };
} }, { key: "_getEventData", value: function(e3) {
return e3 === h2.CONVERSATION_LIST_UPDATED ? this._map.get(12).isPartialUpdatedConvs() ? this._map.get(11).getPartialUpdatedConvs() : this._map.get(11).getLocalConvList() : e3 === h2.FRIEND_LIST_UPDATED ? this._map.get(8).getLocalFriendList(false) : e3 === h2.GROUP_LIST_UPDATED ? this._map.get(7).getLocalGroupList() : e3 === h2.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED ? this._map.get(11).getTotalUnreadCount() : e3 === h2.CONVERSATION_ID_LIST_UPDATED ? this._map.get(11).getUpdatedConvIDList() : void 0;
} }, { key: "getIEmitInst", value: function() {
- return null === this._iEmitter && (this._iEmitter = new Ai(), this._iEmitter._emit = this._iEmitter.emit, this._iEmitter.emit = (function(e3, t3) {
+ return null === this._iEmitter && (this._iEmitter = new wi(), this._iEmitter._emit = this._iEmitter.emit, this._iEmitter.emit = (function(e3, t3) {
e3 = m2(t3) && t3.data ? [e3, { name: e3, data: t3.data }] : [e3, { name: e3, data: t3 }];
this._iEmitter._emit.apply(this._iEmitter, e3);
}).bind(this)), this._iEmitter;
@@ -19053,7 +19083,7 @@ var chat = { exports: {} };
var t3 = e3.code, e3 = e3.msg, e3 = void 0 === e3 ? "" : e3, n3 = t3 + e3;
this._codeMsgForTUIMap.has(n3) || (this._codeMsgForTUIMap.set(n3, 1), n3 = this.get(12).getUIPlatform(), new P2("tui_key_features").setCode(t3).setMessage(e3).setUIPlatform(n3).end());
} }, { key: "reset", value: function() {
- M2.l("".concat(this._n, ".reset")), qe2();
+ M2.l("".concat(this._n, ".reset")), Be2();
var e3, t3 = F2(this._map);
try {
for (t3.s(); !(e3 = t3.n()).done; ) {
@@ -19069,8 +19099,8 @@ var chat = { exports: {} };
var o3, i4 = F2(this._eventThrottleMap);
try {
for (i4.s(); !(o3 = i4.n()).done; ) {
- var s4 = j2(o3.value, 2)[1];
- -1 < s4.timeoutID && clearTimeout(s4.timeoutID);
+ var a3 = j2(o3.value, 2)[1];
+ -1 < a3.timeoutID && clearTimeout(a3.timeoutID);
}
} catch (e4) {
i4.e(e4);
@@ -19078,7 +19108,7 @@ var chat = { exports: {} };
i4.f();
}
this._eventThrottleMap.clear(), this._codeMsgForTUIMap.clear();
- } }]), cr = e2(function e3(t3) {
+ } }]), gr = e2(function e3(t3) {
p3(this, e3), this._funcMap = /* @__PURE__ */ new Map(), this._m = t3, this._n = "SafetyCallback", this._reportCount = 0;
}, [{ key: "defense", value: function(e3, t3) {
var n3 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0;
@@ -19100,23 +19130,23 @@ var chat = { exports: {} };
} }, { key: "delete", value: function(e3, t3) {
return "function" == typeof t3 && !!this._funcMap.has(e3) && !!this._funcMap.get(e3).has(t3) && (this._funcMap.get(e3).delete(t3), 0 === this._funcMap.get(e3).size && this._funcMap.delete(e3), true);
} }, { key: "_pack", value: function(o3, e3, i4) {
- var s4 = this;
+ var a3 = this;
return function() {
try {
e3.apply(i4, Array.from(arguments));
} catch (e4) {
var t3 = Object.values(h2).indexOf(o3), n3 = "CallbackError";
- -1 !== t3 && (t3 = Object.keys(h2)[t3], s4._m.warn(n3, t3, e4)), s4._reportCount < 5 && (new P2(n3).setMessage("eventName:".concat(o3)).setMoreMessage(e4.message).end(), s4._reportCount += 1);
+ -1 !== t3 && (t3 = Object.keys(h2)[t3], a3._m.warn(n3, t3, e4)), a3._reportCount < 5 && (new P2(n3).setMessage("eventName:".concat(o3)).setMoreMessage(e4.message).end(), a3._reportCount += 1);
}
};
} }, { key: "destroy", value: function() {
this._funcMap.clear();
} }, { key: "reset", value: function() {
M2.l("".concat(this._n, ".reset")), this._reportCount = 0;
- } }]), ur = e2(function e3(t3) {
+ } }]), fr = e2(function e3(t3) {
p3(this, e3);
- t3 = { SDKAppID: t3.SDKAppID, unlimitedAVChatRoom: t3.unlimitedAVChatRoom || false, scene: t3.scene || "", oversea: t3.oversea || false, instanceID: Ft2(), devMode: t3.devMode || false, testEnv: t3.testEnv || false, proxyServer: t3.proxyServer || void 0, fileUploadProxy: t3.fileUploadProxy || void 0, fileDownloadProxy: t3.fileDownloadProxy || t3.fileUploadProxy || void 0, eventThrottling: false !== t3.eventThrottling, partialUpdatedConversations: true === t3.partialUpdatedConversations, disableIndependentDomain: true === t3.disableIndependentDomain, modules: t3.modules || void 0 };
- this._m = new rr(t3), this._safetyCallbackFactory = new cr(this._m);
+ t3 = { SDKAppID: t3.SDKAppID, unlimitedAVChatRoom: t3.unlimitedAVChatRoom || false, scene: t3.scene || "", oversea: t3.oversea || false, instanceID: Vt2(), devMode: t3.devMode || false, testEnv: t3.testEnv || false, proxyServer: t3.proxyServer || void 0, fileUploadProxy: t3.fileUploadProxy || void 0, fileDownloadProxy: t3.fileDownloadProxy || t3.fileUploadProxy || void 0, eventThrottling: false !== t3.eventThrottling, partialUpdatedConversations: true === t3.partialUpdatedConversations, disableIndependentDomain: true === t3.disableIndependentDomain, modules: t3.modules || void 0 };
+ this._m = new hr(t3), this._safetyCallbackFactory = new gr(this._m);
}, [{ key: "onError", value: function(e3) {
this._m.onError(e3);
} }, { key: "login", value: function(e3) {
@@ -19129,7 +19159,7 @@ var chat = { exports: {} };
} }, { key: "getLoginUser", value: function() {
return this._get(1).getLoginUser();
} }, { key: "getServerTime", value: function() {
- return He2();
+ return Ye2();
} }, { key: "isReady", value: function() {
return this._m.isReady();
} }, { key: "isIntl", value: function() {
@@ -19157,7 +19187,7 @@ var chat = { exports: {} };
(N3(e3["tim-push"]) ? N3(e3["tim-offline-push-plugin"]) ? this._get(18) : this._get(28) : this._get(36)).registerPlugin(e3);
} }, { key: "setLogLevel", value: function(e3) {
var t3;
- e3 <= 0 && ((t3 = this.getErrMsg("TIM_ASCII_ART")) && index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", t3), (t3 = this.getErrMsg("API_REFER")) && (Zt2() ? index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", "%c ".concat("IM SDK API ->", " %c"), "background:#ff9d00; padding:1px; border-radius:3px; color: #fff", "background:transparent", t3) : index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", "IM SDK API ->", t3)), (t3 = this.getErrMsg("DOCS_GUIDE")) && index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", t3), t3 = this.getErrMsg("IOS_WEBVIEW_WARNING"), Ge2) && t3 && index.__f__("warn", "at node_modules/@tencentcloud/chat/index.js:1", t3), M2.setLevel(e3);
+ e3 <= 0 && ((t3 = this.getErrMsg("TIM_ASCII_ART")) && index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", t3), (t3 = this.getErrMsg("API_REFER")) && (en() ? index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", "%c ".concat("IM SDK API ->", " %c"), "background:#ff9d00; padding:1px; border-radius:3px; color: #fff", "background:transparent", t3) : index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", "IM SDK API ->", t3)), (t3 = this.getErrMsg("DOCS_GUIDE")) && index.__f__("log", "at node_modules/@tencentcloud/chat/index.js:1", t3), t3 = this.getErrMsg("IOS_WEBVIEW_WARNING"), be2) && t3 && index.__f__("warn", "at node_modules/@tencentcloud/chat/index.js:1", t3), M2.setLevel(e3);
} }, { key: "createTextMessage", value: function(e3) {
return this._get(2).createTextMessage(e3);
} }, { key: "createTextAtMessage", value: function(e3) {
@@ -19185,13 +19215,13 @@ var chat = { exports: {} };
} }, { key: "createForwardMessage", value: function(e3) {
return this._get(2).createForwardMessage(e3);
} }, { key: "sendMessage", value: function(e3, t3) {
- return e3 instanceof Do ? this._get(2).sendMessageInstance(e3, t3) : E2({ code: k2.MSG_INSTANCE_REQUIRED });
+ return e3 instanceof So ? this._get(2).sendMessageInstance(e3, t3) : E2({ code: k2.MSG_INSTANCE_REQUIRED });
} }, { key: "callExperimentalAPI", value: function(e3, t3) {
return "sendComboMessage" === e3 ? this._get(31).sendMessage(t3) : "handleGroupInvitation" === e3 ? this._get(7).handleGroupInvitation(t3) : "isCommercialAbilityEnabled" === e3 ? this._get(27).isFeatureEnabled(t3) : "isFeatureEnabledForStat" === e3 ? this._get(27).isFeatureEnabledForStat(t3) : "isIntl" === e3 ? this.isIntl() : "sendTRTCCustomData" === e3 || "sendRoomCustomData" === e3 ? this._get(30).sendTRTCCustomData(t3) : "getTimerID" === e3 ? this._m.getTimerID() : "getPollingTimerID" === e3 ? this._m.getPollingTimerID(t3) : "setApplicationID" === e3 ? (this._get(12).setApplicationID(t3), void this._get(20).updateProtocolConfig()) : "getServerConfig" === e3 ? this._get(23).getServerConfig(t3) : "canIUseModule" === e3 ? this._m.canIUseModule(t3) : "startMessageLongPolling" === e3 ? this._get(7).startMessageLongPolling(t3) : "stopMessageLongPolling" === e3 ? this._get(7).stopMessageLongPolling(t3) : "disableMessagePullOnInvite" === e3 ? this._get(11).disableMsgPullOnInvite(t3) : "clearLocalMessage" === e3 ? this._get(11).clearMemMsg(t3, false) : "setCustomLoginInfo" === e3 ? this._get(12).setCustomLoginInfo(t3) : "statTUIKeyFeatures" === e3 ? this._m.statTUIKeyFeatures(t3) : "getGroupReceiptsByUsers" === e3 ? this._get(7).getGroupReceiptsByUsers(t3) : E2({ code: k2.INVALID_OPERATION });
} }, { key: "revokeMessage", value: function(e3) {
return this._get(2).revokeMessage(e3);
} }, { key: "resendMessage", value: function(e3, t3) {
- return e3 instanceof Do ? this._get(2).resendMessage(e3, t3) : E2({ code: k2.MSG_INSTANCE_REQUIRED });
+ return e3 instanceof So ? this._get(2).resendMessage(e3, t3) : E2({ code: k2.MSG_INSTANCE_REQUIRED });
} }, { key: "deleteMessage", value: function(e3) {
return this._get(2).deleteMessage(e3);
} }, { key: "translateText", value: function(e3) {
@@ -19501,55 +19531,55 @@ var chat = { exports: {} };
} }, { key: "modifyInvitation", value: function(e3) {
var t3 = this._get(33);
return t3 ? t3.modifyInvitation(e3) : E2({ code: k2.NO_MODULE });
- } }]), lr = { login: 1, logout: 1, getLoginUser: 1, destroy: 1, on: 1, off: 1, ready: 1, setLogLevel: 1, joinGroup: 1, quitGroup: 1, registerPlugin: 1, getGroupOnlineMemberCount: 1, isReady: 1, addSignalingListener: 1, removeSignalingListener: 1, callExperimentalAPI: 1 };
- function dr(e3) {
- return p3(this, dr), (e3 = i3(this, dr, [e3]))._n = "CSModule", e3;
+ } }]), mr = { login: 1, logout: 1, getLoginUser: 1, destroy: 1, on: 1, off: 1, ready: 1, setLogLevel: 1, joinGroup: 1, quitGroup: 1, registerPlugin: 1, getGroupOnlineMemberCount: 1, isReady: 1, addSignalingListener: 1, removeSignalingListener: 1, callExperimentalAPI: 1 };
+ function vr(e3) {
+ return p3(this, vr), (e3 = i3(this, vr, [e3]))._n = "CSModule", e3;
}
- var pr = {}, Fn = {};
- return Fn.create = function(e3) {
+ var Ir = {}, Vn = {};
+ return Vn.create = function(e3) {
var t3 = "TencentCloudChat.create", n3 = 0, o3 = e3.SDKAppID;
if (A2(o3))
n3 = o3;
else if (n3 = parseInt(o3), isNaN(o3))
return M2.e("".concat(t3, " failed. Failed to parse the SDKAppID, please check the arguments")), null;
- if (n3 && pr[n3])
- return pr[n3];
+ if (n3 && Ir[n3])
+ return Ir[n3];
M2.l("".concat(t3));
- var a3, i4, o3 = new ur(y2(y2({}, e3), {}, { SDKAppID: n3 })), e3 = (o3.on(h2.SDK_DESTROY, function(e4) {
- pr[e4.data.SDKAppID] = null, delete pr[e4.data.SDKAppID];
- }), a3 = o3, i4 = /* @__PURE__ */ Object.create(null), Object.keys(xn).forEach(function(s4) {
+ var s4, i4, o3 = new fr(y2(y2({}, e3), {}, { SDKAppID: n3 })), e3 = (o3.on(h2.SDK_DESTROY, function(e4) {
+ Ir[e4.data.SDKAppID] = null, delete Ir[e4.data.SDKAppID];
+ }), s4 = o3, i4 = /* @__PURE__ */ Object.create(null), Object.keys(Hn).forEach(function(a3) {
var t4;
- a3[s4] && (t4 = new Q2(), i4[s4] = function() {
+ s4[a3] && (t4 = new Q2(), i4[a3] = function() {
var e4 = Array.from(arguments);
return t4.use(function(e5, t5) {
- i5 = s4;
- var n4, o4, i5 = !(!(n4 = a3).isReady() && 1 !== lr[i5]) || (o4 = { code: o4 = n4.getNotReadyReason(), message: "".concat(n4.getErrMsg(o4), " | ").concat(i5, " | ").concat(n4.getErrMsg(k2.SDK_IS_NOT_READY)) }, n4.onError(o4), o4);
+ i5 = a3;
+ var n4, o4, i5 = !(!(n4 = s4).isReady() && 1 !== mr[i5]) || (o4 = { code: o4 = n4.getNotReadyReason(), message: "".concat(n4.getErrMsg(o4), " | ").concat(i5, " | ").concat(n4.getErrMsg(k2.SDK_IS_NOT_READY)) }, n4.onError(o4), o4);
return true === i5 ? t5() : E2(i5);
}).use(function(e5, t5) {
if (true === function(n4, o4, i5) {
if (void 0 === o4)
return true;
- var s5 = true;
+ var a4 = true;
if (m2(o4))
Object.keys(o4).forEach(function(e7) {
var t6 = 1 === n4.length ? n4[0][e7] : void 0;
- s5 = !!on(t6, o4[e7], i5, e7) && s5;
+ a4 = !!rn(t6, o4[e7], i5, e7) && a4;
});
else if (O2(o4))
for (var e6 = 0; e6 < o4.length; e6++)
- s5 = !!on(n4[e6], o4[e6], i5, o4[e6].name) && s5;
- if (s5)
- return s5;
+ a4 = !!rn(n4[e6], o4[e6], i5, o4[e6].name) && a4;
+ if (a4)
+ return a4;
throw new Error("Params validate failed.");
- }(e5, qn[s4], s4))
+ }(e5, Bn[a3], a3))
return t5();
}).use(function(e5, t5) {
- return a3[s4].apply(a3, e5);
+ return s4[a3].apply(s4, e5);
}), t4.run(e4);
});
}), i4);
- return pr[n3] = e3, qn.hookGetAPITips(o3.getErrMsg.bind(o3)), M2.l("".concat(t3, " ok")), e3;
- }, Fn.TYPES = R2, Fn.EVENT = h2, Fn.TSignaling = _2, Fn.VERSION = "3.5.4", M2.l("TencentCloudChat.VERSION:".concat(Fn.VERSION)), Fn;
+ return Ir[n3] = e3, Bn.hookGetAPITips(o3.getErrMsg.bind(o3)), M2.l("".concat(t3, " ok")), e3;
+ }, Vn.TYPES = R2, Vn.EVENT = h2, Vn.TSignaling = _2, Vn.VERSION = "3.5.5", M2.l("TencentCloudChat.VERSION:".concat(Vn.VERSION)), Vn;
});
})(chat);
var chatExports = chat.exports;
diff --git a/unpackage/dist/dev/mp-weixin/components/TimeFormatting.js b/unpackage/dist/dev/mp-weixin/components/TimeFormatting.js
new file mode 100644
index 0000000..d98eeb6
--- /dev/null
+++ b/unpackage/dist/dev/mp-weixin/components/TimeFormatting.js
@@ -0,0 +1,13 @@
+"use strict";
+function TimeFormatting(timestamp) {
+ const date = new Date(timestamp * 1e3);
+ date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ const hour = String(date.getHours()).padStart(2, "0");
+ const minute = String(date.getMinutes()).padStart(2, "0");
+ String(date.getSeconds()).padStart(2, "0");
+ return `${month}-${day} ${hour}:${minute}`;
+}
+exports.TimeFormatting = TimeFormatting;
+//# sourceMappingURL=../../.sourcemap/mp-weixin/components/TimeFormatting.js.map
diff --git a/unpackage/dist/dev/mp-weixin/components/VerifyLogin.js b/unpackage/dist/dev/mp-weixin/components/VerifyLogin.js
deleted file mode 100644
index 6fe9e51..0000000
--- a/unpackage/dist/dev/mp-weixin/components/VerifyLogin.js
+++ /dev/null
@@ -1,32 +0,0 @@
-"use strict";
-const common_vendor = require("../common/vendor.js");
-function VerifyLogin() {
- return new Promise((resolve, reject) => {
- common_vendor.index.getStorage({
- key: "userinfo",
- success: (res) => {
- if (res.data) {
- if (res.data.nickName) {
- resolve(true);
- } else {
- common_vendor.index.setStorageSync("lastPage", getCurrentPages()[getCurrentPages().length - 1].route);
- common_vendor.index.reLaunch({ url: "/pages/UserInformation/UserInformation" });
- resolve(false);
- }
- } else {
- common_vendor.index.setStorageSync("lastPage", getCurrentPages()[getCurrentPages().length - 1].route);
- common_vendor.index.navigateTo({ url: "/pages/login/login" });
- resolve(false);
- }
- },
- fail: (err) => {
- common_vendor.index.__f__("error", "at components/VerifyLogin.js:22", "获取用户信息失败", err);
- common_vendor.index.setStorageSync("lastPage", getCurrentPages()[getCurrentPages().length - 1].route);
- common_vendor.index.navigateTo({ url: "/pages/login/login" });
- reject(err);
- }
- });
- });
-}
-exports.VerifyLogin = VerifyLogin;
-//# sourceMappingURL=../../.sourcemap/mp-weixin/components/VerifyLogin.js.map
diff --git a/unpackage/dist/dev/mp-weixin/components/contentList/contentList.js b/unpackage/dist/dev/mp-weixin/components/contentList/contentList.js
index 434b39b..7317bf6 100644
--- a/unpackage/dist/dev/mp-weixin/components/contentList/contentList.js
+++ b/unpackage/dist/dev/mp-weixin/components/contentList/contentList.js
@@ -11,8 +11,10 @@ const _sfc_main = {
//页码
size: 10,
//每页条数
- list: []
+ list: [],
// 列表数据
+ detailsdata: {}
+ //详情数据
};
},
mounted() {
@@ -24,15 +26,46 @@ const _sfc_main = {
this.list = [];
this.pkList();
},
- goDetail(item) {
- common_vendor.index.navigateTo({
- url: "/pages/pkDetail/pkDetail",
- success: function(res) {
- res.eventChannel.emit("itemDetail", {
- item
- });
- }
+ async goDetail(item) {
+ common_vendor.index.showLoading({
+ title: "加载中...",
+ mask: true
});
+ common_vendor.index.__f__("log", "at components/contentList/contentList.vue:75", "id", item.id);
+ const res = await components_request.request({
+ url: "pk/pkInfoDetail",
+ method: "POST",
+ data: {
+ id: item.id
+ },
+ userInfo: true
+ });
+ common_vendor.index.__f__("log", "at components/contentList/contentList.vue:84", "res", res);
+ this.detailsdata = res.data;
+ if (res.code === 200) {
+ if (res.data.length !== 0) {
+ common_vendor.index.hideLoading();
+ common_vendor.index.__f__("log", "at components/contentList/contentList.vue:89", "res.data", res.data);
+ common_vendor.index.navigateTo({
+ url: "/pages/pkDetail/pkDetail",
+ success: (res2) => {
+ res2.eventChannel.emit("itemDetail", {
+ item: this.detailsdata
+ });
+ }
+ });
+ } else {
+ common_vendor.index.hideLoading();
+ this.openPopupQuantity();
+ }
+ } else {
+ common_vendor.index.hideLoading();
+ common_vendor.index.showToast({
+ title: "加载失败",
+ icon: "none",
+ duration: 2e3
+ });
+ }
},
formatDate: components_formatDate.formatDate,
async pkList() {
@@ -46,10 +79,10 @@ const _sfc_main = {
},
userInfo: false
});
- common_vendor.index.__f__("log", "at components/contentList/contentList.vue:71", res);
+ common_vendor.index.__f__("log", "at components/contentList/contentList.vue:123", res);
if (res.code === 200) {
this.list.push(...res.data);
- common_vendor.index.__f__("log", "at components/contentList/contentList.vue:74", this.list);
+ common_vendor.index.__f__("log", "at components/contentList/contentList.vue:126", this.list);
}
},
onScrollToLower() {
diff --git a/unpackage/dist/dev/mp-weixin/components/contentList/contentList.wxss b/unpackage/dist/dev/mp-weixin/components/contentList/contentList.wxss
index b949ee2..7843837 100644
--- a/unpackage/dist/dev/mp-weixin/components/contentList/contentList.wxss
+++ b/unpackage/dist/dev/mp-weixin/components/contentList/contentList.wxss
@@ -42,18 +42,18 @@
color: #ffffff;
font-size: 14rpx;
}
-.Gendermale.data-v-4813d59a{
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAfCAYAAABZGLWTAAAAAXNSR0IArs4c6QAAAilJREFUWEftWTtPFFEU/r6ZJUuJiSQujwKRCfQkttJobJRY6Ax/ABNNKGiBAmwtTNZk9w+40BCtiDZYSmI/kxmFAmGNkIgdhFmPuUPW7C6vWVZ3ZhimnfP6zr3ncc8hQnz3PS/b5eOuAPcAGQV5EyLXSGZCsP9TEhHxQf6EyDrAz2Dlwy9df78yNHRwniKeRTC+sdHVeXA4TfApgOvnCYvw/65ACvvZjpdvBwb2TrPjVLCPbdfSyFcEuiME0ZRqAXYoMlUaMUonMR4De2d1NZPL9eYBTjalKVbEUiyXt55/HBvza82qA6uA3ujpX6LIo1jZfgFjhFz+vr35pBZwHVjLdgtgkk+00StSLA0bKt8E31+wKkZ18s0FnBhvFpGJagwHYI+yru8mKRmF9bBKWvvZjKGydADWdL7MEzIbVkDS6ETjwqJxa45Bw1DBt5jX0Vb9u7uno4+m4zwg9HetSos7v6DykKbt5Uk8i7uxrdongtcK7CcSt1sVFnt+wRpNx/txGbPwsYqrWknT8Q4JtP310u6bIIBPy/Gk3Yqj0peuk01XzKYkG0uQjVNVZ9PUQaWqNz569bgLBGeiKgn/W69AXiwOG7Ppe88qz1q2a+EyTio0baJkDAbTxvoZlOMWkj1VDDmDUmSpmi5WAedy/XlAEjw3ZrFc3jx7blx7CSz7qyX8nayNALFDalPVGG281Fe7nkaP1G/xMAoiui0exAfUFg/rAJra4v0Bqcv8upqc0XEAAAAASUVORK5CYII=) no-repeat center;
- width: 56.3rpx;
+.Gendermale.data-v-4813d59a {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAfCAYAAABZGLWTAAAAAXNSR0IArs4c6QAAAilJREFUWEftWTtPFFEU/r6ZJUuJiSQujwKRCfQkttJobJRY6Ax/ABNNKGiBAmwtTNZk9w+40BCtiDZYSmI/kxmFAmGNkIgdhFmPuUPW7C6vWVZ3ZhimnfP6zr3ncc8hQnz3PS/b5eOuAPcAGQV5EyLXSGZCsP9TEhHxQf6EyDrAz2Dlwy9df78yNHRwniKeRTC+sdHVeXA4TfApgOvnCYvw/65ACvvZjpdvBwb2TrPjVLCPbdfSyFcEuiME0ZRqAXYoMlUaMUonMR4De2d1NZPL9eYBTjalKVbEUiyXt55/HBvza82qA6uA3ujpX6LIo1jZfgFjhFz+vr35pBZwHVjLdgtgkk+00StSLA0bKt8E31+wKkZ18s0FnBhvFpGJagwHYI+yru8mKRmF9bBKWvvZjKGydADWdL7MEzIbVkDS6ETjwqJxa45Bw1DBt5jX0Vb9u7uno4+m4zwg9HetSos7v6DykKbt5Uk8i7uxrdongtcK7CcSt1sVFnt+wRpNx/txGbPwsYqrWknT8Q4JtP310u6bIIBPy/Gk3Yqj0peuk01XzKYkG0uQjVNVZ9PUQaWqNz569bgLBGeiKgn/W69AXiwOG7Ppe88qz1q2a+EyTio0baJkDAbTxvoZlOMWkj1VDDmDUmSpmi5WAedy/XlAEjw3ZrFc3jx7blx7CSz7qyX8nayNALFDalPVGG281Fe7nkaP1G/xMAoiui0exAfUFg/rAJra4v0Bqcv8upqc0XEAAAAASUVORK5CYII=) no-repeat center;
+ width: 56.3rpx;
height: 29.58rpx;
background-size: 100% 100%;
display: flex;
align-items: center;
margin-right: 10rpx;
}
-.Genderfemale.data-v-4813d59a{
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAfCAYAAABZGLWTAAAAAXNSR0IArs4c6QAAAi1JREFUWEflWU1rE1EUPaeGFGEiCShIdVXQrZuCW1e6U3BT2j9gwSYTcZVi5WFlZlVMTIXkDyhuBJe66rKCm24rdCV+NIWUZEBb41yZ0ZYk9mMyETLPN9u5575z7nv3fdxLRPg+5PPjExdw3fd5Q8ApUiYB5gCkIsD/tUkHkKYINwl5L/Dffv3MN5eq1d2TBuJxBqKKWS8t90HMATh7krMR/t+GoGbtcZmqvHMUjyPFem5+RjBWAXBuhCIGHbpB+LZVqr44DPiXWFHXUl76ygqIO4OOlBh7Qd3aW5+nWu10c+oRK0qlvHTzJYjbiSEelwjxyvqem6ZSB4J7xLYcu0adZ7QvMCKon1moBPtN+B2I/ZOjz+MGMqk4wp/dz+FQbFMVs6lx2dBsM4oa30Znl5dzqrwTim27hUcAF6Oi9bOTpUzp6UMGF4bzE2MfE36ODhvf7S+f/ItsOfM3yVOvh/WWdLzIz1tsO4UVkHeTTnZofiLP2HLsNRJXh3aWcAcE3gUzuwVSpyth3LA22HbtHyN6vcQlHRfXCcRKXLRuONNmtrAFGJKzLddeI8zZjU06Zw26QRl1Nw5fPY69BOKBbkdJZL6Cx5mFyqJ579kgQv9vpYKzVqkcVht7alBtx65pXVXsX9eCeuawGlRgZ1R18bdgQ+rG3avAc4szAtGwI0B7P0f7V/XxvZ4nxaz3TaNez2ku816MXk93VLq7eCSnBJgEMMIuHpoENkUG6+L9AlWo7Kxo5cagAAAAAElFTkSuQmCC) no-repeat center;
- width: 56.3rpx;
+.Genderfemale.data-v-4813d59a {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAfCAYAAABZGLWTAAAAAXNSR0IArs4c6QAAAi1JREFUWEflWU1rE1EUPaeGFGEiCShIdVXQrZuCW1e6U3BT2j9gwSYTcZVi5WFlZlVMTIXkDyhuBJe66rKCm24rdCV+NIWUZEBb41yZ0ZYk9mMyETLPN9u5575z7nv3fdxLRPg+5PPjExdw3fd5Q8ApUiYB5gCkIsD/tUkHkKYINwl5L/Dffv3MN5eq1d2TBuJxBqKKWS8t90HMATh7krMR/t+GoGbtcZmqvHMUjyPFem5+RjBWAXBuhCIGHbpB+LZVqr44DPiXWFHXUl76ygqIO4OOlBh7Qd3aW5+nWu10c+oRK0qlvHTzJYjbiSEelwjxyvqem6ZSB4J7xLYcu0adZ7QvMCKon1moBPtN+B2I/ZOjz+MGMqk4wp/dz+FQbFMVs6lx2dBsM4oa30Znl5dzqrwTim27hUcAF6Oi9bOTpUzp6UMGF4bzE2MfE36ODhvf7S+f/ItsOfM3yVOvh/WWdLzIz1tsO4UVkHeTTnZofiLP2HLsNRJXh3aWcAcE3gUzuwVSpyth3LA22HbtHyN6vcQlHRfXCcRKXLRuONNmtrAFGJKzLddeI8zZjU06Zw26QRl1Nw5fPY69BOKBbkdJZL6Cx5mFyqJ579kgQv9vpYKzVqkcVht7alBtx65pXVXsX9eCeuawGlRgZ1R18bdgQ+rG3avAc4szAtGwI0B7P0f7V/XxvZ4nxaz3TaNez2ku816MXk93VLq7eCSnBJgEMMIuHpoENkUG6+L9AlWo7Kxo5cagAAAAAElFTkSuQmCC) no-repeat center;
+ width: 56.3rpx;
height: 29.58rpx;
background-size: 100% 100%;
display: flex;
diff --git a/unpackage/dist/dev/mp-weixin/pages/Home/Home.js b/unpackage/dist/dev/mp-weixin/pages/Home/Home.js
index f98df7c..f9d0e62 100644
--- a/unpackage/dist/dev/mp-weixin/pages/Home/Home.js
+++ b/unpackage/dist/dev/mp-weixin/pages/Home/Home.js
@@ -1,5 +1,6 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
+const components_TUILogin = require("../../components/TUILogin.js");
const common_assets = require("../../common/assets.js");
const topNavigation = () => "../../components/topNavigation/topNavigation.js";
const Advertisement = () => "../../components/Advertisement/Advertisement.js";
@@ -8,9 +9,32 @@ const tabBar = () => "../../components/tabBar/tabBar.js";
const _sfc_main = {
inject: ["$global"],
data() {
- return {};
+ return {
+ info: {},
+ myuserSig: "",
+ chatInfo: {}
+ };
},
onLoad() {
+ common_vendor.index.getStorage({
+ key: "userinfo",
+ success: (res) => {
+ this.info = res.data;
+ common_vendor.index.getStorage({
+ key: "myuserSig",
+ success: (res2) => {
+ this.myuserSig = res2.data;
+ common_vendor.index.getStorage({
+ key: "chatInfo",
+ success: (res3) => {
+ this.chatInfo = res3.data;
+ components_TUILogin.TUIlogin(this.chatInfo.appId, this.info.id, this.myuserSig.userSig);
+ }
+ });
+ }
+ });
+ }
+ });
},
methods: {
goAdvertisement() {
diff --git a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.js b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.js
index 2cec099..f2ebd11 100644
--- a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.js
+++ b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.js
@@ -1,8 +1,10 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_formatDate = require("../../components/formatDate.js");
-const components_VerifyLogin = require("../../components/VerifyLogin.js");
+const components_TimeFormatting = require("../../components/TimeFormatting.js");
const components_request = require("../../components/request.js");
+const TUIKit_components_TUIChat_utils_utils = require("../../TUIKit/components/TUIChat/utils/utils.js");
+const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../TUIKit/components/TUIChat/offlinePushInfoManager/index.js");
const common_assets = require("../../common/assets.js");
const NewAddedPk = () => "../NewAddedPk/NewAddedPk2.js";
const _sfc_main = {
@@ -10,14 +12,19 @@ const _sfc_main = {
return {
item: {},
id: 0,
- list: []
+ InvitingPartyEventID: null,
+ list: [],
+ selectedId: null,
+ InvitingPartyEventindex: null,
+ chatInfo: {},
+ currentConversation: null
};
},
onLoad(options) {
const eventChannel = this.getOpenerEventChannel();
eventChannel.on("itemDetail", (data) => {
this.item = data.item;
- common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:79", "接收到的数据:", this.item);
+ common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:105", "接收到的数据:", this.item);
});
common_vendor.index.getStorage({
key: "userinfo",
@@ -25,9 +32,27 @@ const _sfc_main = {
this.id = res.data.id;
}
});
+ common_vendor.index.getStorage({
+ key: "chatInfo",
+ success: (res) => {
+ this.chatInfo = res.data;
+ }
+ });
},
methods: {
formatDate: components_formatDate.formatDate,
+ TimeFormatting: components_TimeFormatting.TimeFormatting,
+ Select(id, index) {
+ if (this.selectedId === id) {
+ this.selectedId = null;
+ this.InvitingPartyEventID = null;
+ this.InvitingPartyEventindex = null;
+ } else {
+ this.selectedId = this.selectedId === id ? null : id;
+ this.InvitingPartyEventID = id;
+ this.InvitingPartyEventindex = index;
+ }
+ },
Returnfunc() {
common_vendor.index.navigateBack({
delta: 1
@@ -38,16 +63,52 @@ const _sfc_main = {
this.userlist();
},
invite() {
+ var _a, _b;
+ if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
+ common_vendor.index.showToast({
+ icon: "none",
+ title: "请保持时间一致"
+ });
+ return;
+ }
+ const payload = {
+ data: JSON.stringify({
+ businessID: "pk",
+ title: "PK邀请",
+ buttonText1: "接受邀请",
+ buttonText2: "拒绝邀请"
+ }),
+ description: "邀请参加PK",
+ extension: "邀请参加PK"
+ };
+ common_vendor.Jt.watch(common_vendor.o.CONV, {
+ currentConversation: (conversation) => {
+ this.currentConversation = conversation;
+ }
+ });
+ const options = {
+ to: `C2C${this.list[this.InvitingPartyEventindex].senderId}`,
+ conversationType: (_b = (_a = this.currentConversation) == null ? void 0 : _a.value) == null ? void 0 : _b.type,
+ payload,
+ needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
+ };
+ const offlinePushInfoCreateParams = {
+ conversation: this.currentConversation,
+ payload: options.payload,
+ messageType: common_vendor.qt.TYPES.MSG_CUSTOM
+ };
+ const sendMessageOptions = {
+ offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
+ };
+ common_vendor.Qt.sendCustomMessage(options, sendMessageOptions);
},
close() {
this.$refs.popup.close();
},
openChat() {
- components_VerifyLogin.VerifyLogin().then(() => {
- const conversationID = `C2C${this.item.senderId}`;
- common_vendor.index.redirectTo({
- url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
- });
+ const conversationID = `C2C${this.item.senderId}`;
+ common_vendor.index.redirectTo({
+ url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
});
},
async userlist() {
@@ -56,7 +117,7 @@ const _sfc_main = {
mask: true
});
const res = await components_request.request({
- url: "pk/queryMyPkData",
+ url: "pk/queryMyCanUsePkData",
method: "POST",
data: {
userId: this.id
@@ -66,7 +127,7 @@ const _sfc_main = {
if (res.code === 200) {
if (res.data.length !== 0) {
common_vendor.index.hideLoading();
- common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:133", "res.data", res.data);
+ common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:214", "res.data", res.data);
this.list = res.data;
} else {
common_vendor.index.hideLoading();
@@ -112,7 +173,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
j: common_vendor.o$1(($event) => $options.openChat()),
k: common_vendor.o$1(($event) => $options.open()),
l: common_vendor.f($data.list, (item, index, i0) => {
- return {};
+ return {
+ a: item.anchorIcon,
+ b: common_vendor.t(item.anchorId),
+ c: common_vendor.t($options.TimeFormatting(item.pkTime)),
+ d: common_vendor.t(item.coin),
+ e: common_vendor.o$1(($event) => $options.Select(item.id, index)),
+ f: $data.selectedId === item.id ? "2px solid red" : "2px solid #afafaf"
+ };
}),
m: common_vendor.o$1(($event) => $options.invite()),
n: common_vendor.o$1(($event) => $options.close()),
diff --git a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.json b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.json
index a5b456c..5428b02 100644
--- a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.json
+++ b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.json
@@ -1,7 +1,7 @@
{
"navigationBarTitleText": "PK详情",
"usingComponents": {
- "new-added-pk": "../NewAddedPk/NewAddedPk",
- "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
+ "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
+ "new-added-pk": "../NewAddedPk/NewAddedPk"
}
}
\ No newline at end of file
diff --git a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxml b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxml
index 8645c14..dff5bae 100644
--- a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxml
+++ b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxml
@@ -1 +1 @@
-主播名称{{d}}主播性别{{e}} 国家{{f}}金币{{g}}PK时间{{h}}主播备注{{i}}
\ No newline at end of file
+主播名称{{d}}主播性别{{e}} 国家{{f}}金币{{g}}PK时间{{h}}主播备注{{i}}
\ No newline at end of file
diff --git a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxss b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxss
index 0a77280..2567433 100644
--- a/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxss
+++ b/unpackage/dist/dev/mp-weixin/pages/pkDetail/pkDetail.wxss
@@ -75,12 +75,8 @@
.scroll.data-v-9639f721 {
width: 470rpx;
height: 500rpx;
- border: 1px solid #afafaf;
+ border: 2px solid #afafaf;
border-radius: 10px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
}
.card.data-v-9639f721 {
margin-top: 10rpx;
@@ -88,14 +84,34 @@
}
.card-content.data-v-9639f721 {
width: 445rpx;
- height: 70rpx;
- border: 1px solid #afafaf;
+ height: 75rpx;
+ /* border: 2px solid #afafaf; */
border-radius: 10px;
+ display: flex;
+ font-size: 28rpx;
+ color: rgb(127, 127, 127);
}
-.createModule.data-v-9639f721{
- position: fixed;
- bottom: 0;
- right: 0;
- z-index: 998;
- width: 100vw;
+.createModule.data-v-9639f721 {
+ position: fixed;
+ bottom: 0;
+ right: 0;
+ z-index: 998;
+ width: 100vw;
+}
+.avatar.data-v-9639f721 {
+ width: 60rpx;
+ height: 60rpx;
+ border-radius: 50%;
+}
+.TimeMoney.data-v-9639f721 {
+ width: 300rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.NameMoney.data-v-9639f721 {
+ display: flex;
+ flex-direction: column;
+}
+.NameMoney_Name.data-v-9639f721 {
+ text-align: left;
}