diff --git a/pages/Mine/minecomponents/recompose/recompose.vue b/pages/Mine/minecomponents/recompose/recompose.vue index 994c7ef..d900b30 100644 --- a/pages/Mine/minecomponents/recompose/recompose.vue +++ b/pages/Mine/minecomponents/recompose/recompose.vue @@ -148,6 +148,7 @@ type="textarea" v-model="remarks" placeholder="备注" + :maxlength="50" > diff --git a/pages/NewAddedPk/NewAddedPk.vue b/pages/NewAddedPk/NewAddedPk.vue index 9a0b1ae..503fb67 100644 --- a/pages/NewAddedPk/NewAddedPk.vue +++ b/pages/NewAddedPk/NewAddedPk.vue @@ -133,7 +133,7 @@ type="textarea" v-model="remarks" placeholder="备注" - maxlength="-1" + :maxlength="50" > diff --git a/pages/Setting/Setting.vue b/pages/Setting/Setting.vue index ccaffea..390e84b 100644 --- a/pages/Setting/Setting.vue +++ b/pages/Setting/Setting.vue @@ -29,7 +29,7 @@ export default { name: "", id: "", info: {}, - userSig: "", + useravatar: "", }; }, onLoad(option) { @@ -38,13 +38,7 @@ export default { success: (res) => { this.id = res.data.id; this.name = res.data.nickName; - this.userinfo = res.data.headerIcon; - }, - }); - uni.getStorage({ - key: "userSig", - success: (res) => { - this.userSig = res.data; + this.userinfo = this.useravatar = res.data.headerIcon; }, }); }, @@ -70,7 +64,36 @@ export default { title: "修改中...", mask: true, }); - + if (this.useravatar == this.userinfo) { + request({ + url: "user/updateUserInfo", + method: "POST", + data: { + id: this.id, + headerIcon: this.userinfo.split("/").pop(), + nickName: this.name, + }, + userInfo: true, + }).then((ress) => { + if (ress.code === 200) { + uni.showToast({ + title: "修改成功", + icon: "success", + }); + uni.setStorageSync("userinfo", ress.data.info); + goEasylogin(this.$goeasy,String(ress.data.info.id),ress.data.info.headerIcon,ress.data.info.nickName); + uni.hideLoading(); + uni.navigateBack({ + delta: 1, + }); + } else { + uni.showToast({ + title: "修改失败", + icon: "none", + }); + } + }); + }else{ postFile({ path: this.userinfo, name: generateFileName(), @@ -83,10 +106,10 @@ export default { id: this.id, headerIcon: res.split("/").pop(), nickName: this.name, - usersig: this.userSig.userSig, }, userInfo: true, }).then((ress) => { + console.log("修改调用返回",ress); if (ress.code === 200) { uni.showToast({ title: "修改成功", @@ -109,8 +132,9 @@ export default { }); }) .catch((err) => { - console.log(err); + console.log('上传失败', err); }); + } }, }, }; diff --git a/pages/index/chat/chat.vue b/pages/index/chat/chat.vue index 862b1e9..7635d64 100644 --- a/pages/index/chat/chat.vue +++ b/pages/index/chat/chat.vue @@ -379,6 +379,9 @@ export default { onHide() { this.onPage = false; }, + onUnload() { + this.onPage = false; + }, onLoad(options) { this.recorderManager.onStop((res) => { console.log("录音结束", res); @@ -933,12 +936,14 @@ export default { top: 120rpx; width: 46rpx; height: 46rpx; - z-index: 1; + z-index: 2; } .title { position: fixed; top: 120rpx; - left: 325rpx; + left:0; + right: 0; + text-align: center; font-size: 34rpx; color: #100e0f; font-weight: bold; diff --git a/pages/pkDetail/pkDetail.vue b/pages/pkDetail/pkDetail.vue index 8d43c04..1c80e7c 100644 --- a/pages/pkDetail/pkDetail.vue +++ b/pages/pkDetail/pkDetail.vue @@ -77,20 +77,17 @@ - + + {{ item.remark }} + + + @@ -122,7 +119,7 @@ mode="scaleToFill" /> - {{ TimeFormatting(item.pkTime) }} + {{ TimeFormatting(item.pkTime*1000) }} ({genders:0,Gender:[{label:"男",value:1},{label:"女",value:2}],Country:t.optionsArray,countrys:"",nameAnchor:"",numberCoins:"",session:"",remarks:"",Display:!1,Hint:!1,datetimesingle:"",id:null,sendingTime:"",filterable:!0,AnchorProfilePicture:"",AnchorList:[],selectedId:null,selectedIddata:null}),mounted(){e.index.getStorage({key:"userinfo",success:e=>{this.id=e.data.id}})},methods:{close(){this.$refs.popup.close()},invite(){this.selectedId?(this.nameAnchor=this.selectedIddata.anchorId,this.AnchorProfilePicture=this.selectedIddata.headerIcon.split("/").pop(),this.genders=this.selectedIddata.gender,this.countrys=this.selectedIddata.country,this.close()):e.index.showToast({title:"请选择主播",icon:"none",duration:2e3})},Select(e,t){this.selectedId!==e?(this.selectedId=e,this.selectedIddata=t):(this.selectedId=null,this.selectedIddata=null)},getAnchorList(){n.request({url:"anchor/list",method:"POST",data:{id:this.id},userInfo:!0}).then((e=>{this.triggered=!1,200==e.code?this.AnchorList=e.data:console.log(e.msg)}))},chooseMyStreamer(){this.$refs.popup.open("center"),this.getAnchorList()},gender(e){this.genders=e.value},country(e){this.countrys=e.value},handleOverlayClick(e){e.target===this.$el&&(this.Display=!1,this.Hint=!1)},open(){this.Display?(this.Display=!1,this.Hint=!1,this.nameAnchor="",this.genders=0,this.numberCoins="",this.remarks="",this.datetimesingle="",this.countrys="",this.session=""):this.Display=!0},blur(t){this.nameAnchor!==t.target.value&&(this.nameAnchor=t.target.value,e.index.showLoading({title:"正在验证主播",mask:!0}),e.index.request({url:"https://python.yolojt.com/api/"+this.nameAnchor,success:t=>{200===t.data.code?(e.index.hideLoading(),e.index.showToast({title:"查询成功",icon:"none",duration:3e3}),this.AnchorProfilePicture=t.data.data):(e.index.hideLoading(),e.index.showToast({title:"未查询到该主播",icon:"none",duration:3e3}))},fail:function(t){e.index.hideLoading(),e.index.showToast({title:"网络请求失败",icon:"none",duration:3e3})}}))},async Publish(){if(""===this.nameAnchor||0===this.genders||""===this.numberCoins||""===this.countrys||""===this.datetimesingle||""===this.session||""===this.AnchorProfilePicture)return void(this.Hint=!0);if(this.remarks.includes(this.nameAnchor))return void e.index.showToast({title:"备注中不能包含主播昵称",icon:"none",duration:2e3});const t=this.datetimesingle.replace(" ","T"),i=Date.parse(t);if(isNaN(i))throw new Error(`Invalid date format: ${this.datetimesingle}`);this.sendingTime=Math.floor(i/1e3);const s=Math.floor(Date.now()/1e3);if(this.sendingTime"./uni_modules/wht-select/components/wht-select/wht-select.js")+(()=>"./uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js")+(()=>"./uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js")+(()=>"./uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"./uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const s=e._export_sfc(i,[["render",function(t,n,i,s,o,r){return e.e({a:o.Display},o.Display?e.e({b:e.o((e=>r.open())),c:e.o(((...e)=>t.NameAnchor&&t.NameAnchor(...e))),d:e.o(((...e)=>r.blur&&r.blur(...e))),e:o.nameAnchor,f:""===o.nameAnchor&&!0===o.Hint},(""===o.nameAnchor&&o.Hint,{}),{g:e.o(((...e)=>r.chooseMyStreamer&&r.chooseMyStreamer(...e))),h:e.o(r.country),i:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Country,filterable:o.filterable,placeholder:"请选择国家",value:o.countrys}),j:""===o.countrys&&!0===o.Hint},(""===o.countrys&&o.Hint,{}),{k:e.o(r.gender),l:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Gender,placeholder:"性别",value:o.genders}),m:0===o.genders},(o.genders,{}),{n:1===o.genders},(o.genders,{}),{o:2===o.genders},(o.genders,{}),{p:0===o.genders&&!0===o.Hint},(0===o.genders&&o.Hint,{}),{q:e.o((e=>o.numberCoins=e)),r:e.p({max:9999999999,background:"#03ABA8",modelValue:o.numberCoins}),s:""===o.numberCoins&&!0===o.Hint},(""===o.numberCoins&&o.Hint,{}),{t:e.o((e=>o.datetimesingle=e)),v:e.p({type:"datetime","hide-second":"true",modelValue:o.datetimesingle}),w:""===o.datetimesingle&&!0===o.Hint},(""===o.datetimesingle&&o.Hint,{}),{x:e.o((e=>o.session=e)),y:e.p({background:"#03ABA8",modelValue:o.session}),z:""===o.session&&!0===o.Hint},(""===o.session&&o.Hint,{}),{A:e.o((e=>o.remarks=e)),B:e.p({type:"textarea",placeholder:"备注",maxlength:"-1",modelValue:o.remarks}),C:e.o((e=>r.Publish())),D:e.o((()=>{})),E:e.n(o.Display?"create-module":"close-animation "),F:e.o((e=>r.open()))}):{},{G:0!==o.AnchorList.length},0!==o.AnchorList.length?{H:e.f(o.AnchorList,((t,n,i)=>({a:t.headerIcon,b:e.t(t.anchorId),c:e.t(t.country),d:e.o((e=>r.Select(t.id,t)),n),e:o.selectedId===t.id?"#b8ff8c74":"#ffffff",f:n})))}:{},{I:0===o.AnchorList.length},(o.AnchorList.length,{}),{J:e.o((e=>r.invite())),K:e.o((e=>r.close())),L:e.sr("popup","ce54c7bb-6"),M:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-ce54c7bb"]]);exports.MiniProgramPage=s; +"use strict";const e=require("./common/vendor.js"),t=require("./components/NationalDictionary.js"),n=require("./components/request.js"),i={data:()=>({genders:0,Gender:[{label:"男",value:1},{label:"女",value:2}],Country:t.optionsArray,countrys:"",nameAnchor:"",numberCoins:"",session:"",remarks:"",Display:!1,Hint:!1,datetimesingle:"",id:null,sendingTime:"",filterable:!0,AnchorProfilePicture:"",AnchorList:[],selectedId:null,selectedIddata:null}),mounted(){e.index.getStorage({key:"userinfo",success:e=>{this.id=e.data.id}})},methods:{close(){this.$refs.popup.close()},invite(){this.selectedId?(this.nameAnchor=this.selectedIddata.anchorId,this.AnchorProfilePicture=this.selectedIddata.headerIcon.split("/").pop(),this.genders=this.selectedIddata.gender,this.countrys=this.selectedIddata.country,this.close()):e.index.showToast({title:"请选择主播",icon:"none",duration:2e3})},Select(e,t){this.selectedId!==e?(this.selectedId=e,this.selectedIddata=t):(this.selectedId=null,this.selectedIddata=null)},getAnchorList(){n.request({url:"anchor/list",method:"POST",data:{id:this.id},userInfo:!0}).then((e=>{this.triggered=!1,200==e.code?this.AnchorList=e.data:console.log(e.msg)}))},chooseMyStreamer(){this.$refs.popup.open("center"),this.getAnchorList()},gender(e){this.genders=e.value},country(e){this.countrys=e.value},handleOverlayClick(e){e.target===this.$el&&(this.Display=!1,this.Hint=!1)},open(){this.Display?(this.Display=!1,this.Hint=!1,this.nameAnchor="",this.genders=0,this.numberCoins="",this.remarks="",this.datetimesingle="",this.countrys="",this.session=""):this.Display=!0},blur(t){this.nameAnchor!==t.target.value&&(this.nameAnchor=t.target.value,e.index.showLoading({title:"正在验证主播",mask:!0}),e.index.request({url:"https://python.yolojt.com/api/"+this.nameAnchor,success:t=>{200===t.data.code?(e.index.hideLoading(),e.index.showToast({title:"查询成功",icon:"none",duration:3e3}),this.AnchorProfilePicture=t.data.data):(e.index.hideLoading(),e.index.showToast({title:"未查询到该主播",icon:"none",duration:3e3}))},fail:function(t){e.index.hideLoading(),e.index.showToast({title:"网络请求失败",icon:"none",duration:3e3})}}))},async Publish(){if(""===this.nameAnchor||0===this.genders||""===this.numberCoins||""===this.countrys||""===this.datetimesingle||""===this.session||""===this.AnchorProfilePicture)return void(this.Hint=!0);if(this.remarks.includes(this.nameAnchor))return void e.index.showToast({title:"备注中不能包含主播昵称",icon:"none",duration:2e3});const t=this.datetimesingle.replace(" ","T"),i=Date.parse(t);if(isNaN(i))throw new Error(`Invalid date format: ${this.datetimesingle}`);this.sendingTime=Math.floor(i/1e3);const s=Math.floor(Date.now()/1e3);if(this.sendingTime"./uni_modules/wht-select/components/wht-select/wht-select.js")+(()=>"./uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js")+(()=>"./uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js")+(()=>"./uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"./uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const s=e._export_sfc(i,[["render",function(t,n,i,s,o,r){return e.e({a:o.Display},o.Display?e.e({b:e.o((e=>r.open())),c:e.o(((...e)=>t.NameAnchor&&t.NameAnchor(...e))),d:e.o(((...e)=>r.blur&&r.blur(...e))),e:o.nameAnchor,f:""===o.nameAnchor&&!0===o.Hint},(""===o.nameAnchor&&o.Hint,{}),{g:e.o(((...e)=>r.chooseMyStreamer&&r.chooseMyStreamer(...e))),h:e.o(r.country),i:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Country,filterable:o.filterable,placeholder:"请选择国家",value:o.countrys}),j:""===o.countrys&&!0===o.Hint},(""===o.countrys&&o.Hint,{}),{k:e.o(r.gender),l:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Gender,placeholder:"性别",value:o.genders}),m:0===o.genders},(o.genders,{}),{n:1===o.genders},(o.genders,{}),{o:2===o.genders},(o.genders,{}),{p:0===o.genders&&!0===o.Hint},(0===o.genders&&o.Hint,{}),{q:e.o((e=>o.numberCoins=e)),r:e.p({max:9999999999,background:"#03ABA8",modelValue:o.numberCoins}),s:""===o.numberCoins&&!0===o.Hint},(""===o.numberCoins&&o.Hint,{}),{t:e.o((e=>o.datetimesingle=e)),v:e.p({type:"datetime","hide-second":"true",modelValue:o.datetimesingle}),w:""===o.datetimesingle&&!0===o.Hint},(""===o.datetimesingle&&o.Hint,{}),{x:e.o((e=>o.session=e)),y:e.p({background:"#03ABA8",modelValue:o.session}),z:""===o.session&&!0===o.Hint},(""===o.session&&o.Hint,{}),{A:e.o((e=>o.remarks=e)),B:e.p({type:"textarea",placeholder:"备注",maxlength:50,modelValue:o.remarks}),C:e.o((e=>r.Publish())),D:e.o((()=>{})),E:e.n(o.Display?"create-module":"close-animation "),F:e.o((e=>r.open()))}):{},{G:0!==o.AnchorList.length},0!==o.AnchorList.length?{H:e.f(o.AnchorList,((t,n,i)=>({a:t.headerIcon,b:e.t(t.anchorId),c:e.t(t.country),d:e.o((e=>r.Select(t.id,t)),n),e:o.selectedId===t.id?"#b8ff8c74":"#ffffff",f:n})))}:{},{I:0===o.AnchorList.length},(o.AnchorList.length,{}),{J:e.o((e=>r.invite())),K:e.o((e=>r.close())),L:e.sr("popup","1cddacd5-6"),M:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-1cddacd5"]]);exports.MiniProgramPage=s; diff --git a/unpackage/dist/build/mp-weixin/common/vendor.js b/unpackage/dist/build/mp-weixin/common/vendor.js index 183ad91..6a6172a 100644 --- a/unpackage/dist/build/mp-weixin/common/vendor.js +++ b/unpackage/dist/build/mp-weixin/common/vendor.js @@ -4,30 +4,16 @@ * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ -function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],i=()=>{},o=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),a=e=>e.startsWith("onUpdate:"),r=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,l=(e,t)=>u.call(e,t),d=Array.isArray,p=e=>"[object Map]"===I(e),h=e=>"[object Set]"===I(e),g=e=>"function"==typeof e,f=e=>"string"==typeof e,m=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,v=e=>(_(e)||g(e))&&g(e.then)&&g(e.catch),y=Object.prototype.toString,I=e=>y.call(e),M=e=>"[object Object]"===I(e),C=e=>f(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,S=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),E=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},T=/-(\w)/g,k=E((e=>e.replace(T,((e,t)=>t?t.toUpperCase():"")))),D=/\B([A-Z])/g,R=E((e=>e.replace(D,"-$1").toLowerCase())),O=E((e=>e.charAt(0).toUpperCase()+e.slice(1))),b=E((e=>e?`on${O(e)}`:"")),A=(e,t)=>!Object.is(e,t),L=(e,t)=>{for(let n=0;n{const t=parseFloat(e);return isNaN(t)?e:t};function N(e){if(d(e)){const t={};for(let n=0;n{if(e){const n=e.split(U);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function F(e){let t="";if(f(e))t=e;else if(d(e))for(let n=0;nt&&t.__v_isRef?B(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],i)=>(e[q(t,i)+" =>"]=n,e)),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>q(e)))}:m(t)?q(t):!_(t)||d(t)||M(t)?t:String(t),q=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},V="onShow",j="onHide",H="onLaunch",K="onError",z="onThemeChange",W="onPageNotFound",Y="onUnhandledRejection",$="onLoad",J="onReady",X="onUnload",Q="onInit",Z="onSaveExitState",ee="onResize",te="onBackPress",ne="onPageScroll",ie="onTabItemTap",oe="onReachBottom",se="onPullDownRefresh",ae="onShareTimeline",re="onShareChat",ce="onAddToFavorites",ue="onShareAppMessage",le="onNavigationBarButtonTap",de="onNavigationBarSearchInputClicked",pe="onNavigationBarSearchInputChanged",he="onNavigationBarSearchInputConfirmed",ge="onNavigationBarSearchInputFocusChanged",fe="virtualHostId";function me(e,t=null){let n;return(...i)=>(e&&(n=e.apply(t,i),e=null),n)}function _e(e,t){if(!f(t))return;const n=(t=t.replace(/\[(\d+)\]/g,".$1")).split(".");let i=n[0];return e||(e={}),1===n.length?e[i]:_e(e[i],n.slice(1).join("."))}function ve(e){let t={};return M(e)&&Object.keys(e).sort().forEach((n=>{const i=n;t[i]=e[i]})),Object.keys(t)?t:e}const ye=/:/g;const Ie=encodeURIComponent;function Me(e,t=Ie){const n=e?Object.keys(e).map((n=>{let i=e[n];return void 0===typeof i||null===i?i="":M(i)&&(i=JSON.stringify(i)),t(n)+"="+t(i)})).filter((e=>e.length>0)).join("&"):null;return n?`?${n}`:""}const Ce=[Q,$,V,j,X,te,ne,ie,oe,se,ae,ue,re,ce,Z,le,de,pe,he,ge];const Se=[V,j,H,K,z,W,Y,"onExit",Q,$,J,X,ee,te,ne,ie,oe,se,ae,ce,ue,re,Z,le,de,pe,he,ge],Ee=(()=>({onPageScroll:1,onShareAppMessage:2,onShareTimeline:4}))();function Te(e,t,n=!0){return!(n&&!g(t))&&(Se.indexOf(e)>-1||0===e.indexOf("on"))}let ke;const De=[];const Re=me(((e,t)=>t(e))),Oe=function(){};Oe.prototype={_id:1,on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n,_id:this._id}),this._id++},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i=0;s--)if(i[s].fn===t||i[s].fn._===t||i[s]._id===t){i.splice(s,1);break}o=i}return o.length?n[e]=o:delete n[e],this}};var be=Oe;const Ae=["{","}"];const Le=/^(?:\d)+/,Pe=/^(?:\w)+/;const Ne="zh-Hans",we="zh-Hant",Ue="en",Ge=Object.prototype.hasOwnProperty,xe=(e,t)=>Ge.call(e,t),Fe=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=Ae){if(!t)return[e];let i=this._caches[e];return i||(i=function(e,[t,n]){const i=[];let o=0,s="";for(;o-1?Ne:e.indexOf("-hant")>-1?we:(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?we:Ne);var n;let i=[Ue,"fr","es"];t&&Object.keys(t).length>0&&(i=Object.keys(t));const o=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,i);return o||void 0}class qe{constructor({locale:e,fallbackLocale:t,messages:n,watcher:i,formater:o}){this.locale=Ue,this.fallbackLocale=Ue,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=o||Fe,this.messages=n||{},this.setLocale(e||Ue),i&&this.watchLocale(i)}setLocale(e){const t=this.locale;this.locale=Be(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const i=this.messages[e];i?n?Object.assign(i,t):Object.keys(t).forEach((e=>{xe(i,e)||(i[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let i=this.message;return"string"==typeof t?(t=Be(t,this.messages))&&(i=this.messages[t]):n=t,xe(i,e)?this.formater.interpolate(i[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function Ve(e){return function(){try{return e.apply(e,arguments)}catch(Yr){console.error(Yr)}}}let je=1;const He={};function Ke(e,t,n){if("number"==typeof e){const i=He[e];if(i)return i.keepAlive||delete He[e],i.callback(t,n)}return t}const ze="success",We="fail",Ye="complete";function $e(e,t={},{beforeAll:n,beforeSuccess:i}={}){M(t)||(t={});const{success:o,fail:s,complete:a}=function(e){const t={};for(const n in e){const i=e[n];g(i)&&(t[n]=Ve(i),delete e[n])}return t}(t),r=g(o),c=g(s),u=g(a),l=je++;return function(e,t,n,i=!1){He[e]={name:t,keepAlive:i,callback:n}}(l,e,(l=>{(l=l||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(l.errMsg,e),g(n)&&n(l),l.errMsg===e+":ok"?(g(i)&&i(l,t),r&&o(l)):c&&s(l),u&&a(l)})),l}const Je="success",Xe="fail",Qe="complete",Ze={},et={};function nt(e,t){return function(n){return e(n,t)||n}}function it(e,t,n){let i=!1;for(let o=0;oe(t),catch(){}}}function ot(e,t={}){return[Je,Xe,Qe].forEach((n=>{const i=e[n];if(!d(i))return;const o=t[n];t[n]=function(e){it(i,e,t).then((e=>g(o)&&o(e)||e))}})),t}function st(e,t){const n=[];d(Ze.returnValue)&&n.push(...Ze.returnValue);const i=et[e];return i&&d(i.returnValue)&&n.push(...i.returnValue),n.forEach((e=>{t=e(t)||t})),t}function at(e){const t=Object.create(null);Object.keys(Ze).forEach((e=>{"returnValue"!==e&&(t[e]=Ze[e].slice())}));const n=et[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function rt(e,t,n,i){const o=at(e);if(o&&Object.keys(o).length){if(d(o.invoke)){return it(o.invoke,n).then((n=>t(ot(at(e),n),...i)))}return t(ot(o,n),...i)}return t(n,...i)}function ct(e,t){return(n={},...i)=>function(e){return!(!M(e)||![ze,We,Ye].find((t=>g(e[t]))))}(n)?st(e,rt(e,t,r({},n),i)):st(e,new Promise(((o,s)=>{rt(e,t,r({},n,{success:o,fail:s}),i)})))}function ut(e,t,n,i={}){const o=t+":fail";let s="";return s=n?0===n.indexOf(o)?n:o+" "+n:o,delete i.errCode,Ke(e,r({errMsg:s},i))}function lt(e,t,n,i){const o=function(e){e[0]}(t);if(o)return o}function dt(e,t,n,i){return n=>{const o=$e(e,n,i),s=lt(0,[n]);return s?ut(o,e,s):t(n,{resolve:t=>function(e,t,n){return Ke(e,r(n||{},{errMsg:t+":ok"}))}(o,e,t),reject:(t,n)=>ut(o,e,function(e){return!e||f(e)?e:e.stack?("undefined"!=typeof globalThis&&globalThis.harmonyChannel||console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function pt(e,t,n,i){return function(e,t){return(...e)=>{const n=lt(0,e);if(n)throw new Error(n);return t.apply(null,e)}}(0,t)}let ht=!1,gt=0,ft=0;const mt=pt(0,((e,t)=>{if(0===gt&&function(){var e,t;let n,i,o;{const s=(null===(e=wx.getWindowInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync(),a=(null===(t=wx.getDeviceInfo)||void 0===t?void 0:t.call(wx))||wx.getSystemInfoSync();n=s.windowWidth,i=s.pixelRatio,o=a.platform}gt=n,ft=i,ht="ios"===o}(),0===(e=Number(e)))return 0;let n=e/750*(t||gt);return n<0&&(n=-n),n=Math.floor(n+1e-4),0===n&&(n=1!==ft&&ht?.5:1),e<0?-n:n}));function _t(e,t){Object.keys(t).forEach((n=>{g(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):d(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{const i=e[n],o=t[n];d(i)&&g(o)&&c(i,o)}))}const yt=pt(0,((e,t)=>{f(e)&&M(t)?_t(et[e]||(et[e]={}),t):M(e)&&_t(Ze,e)})),It=pt(0,((e,t)=>{f(e)?M(t)?vt(et[e],t):delete et[e]:M(e)&&vt(Ze,e)}));const Mt=new class{constructor(){this.$emitter=new be}on(e,t){return this.$emitter.on(e,t)}once(e,t){return this.$emitter.once(e,t)}off(e,t){e?this.$emitter.off(e,t):this.$emitter.e={}}emit(e,...t){this.$emitter.emit(e,...t)}},Ct=pt(0,((e,t)=>(Mt.on(e,t),()=>Mt.off(e,t)))),St=pt(0,((e,t)=>(Mt.once(e,t),()=>Mt.off(e,t)))),Et=pt(0,((e,t)=>{d(e)||(e=e?[e]:[]),e.forEach((e=>{Mt.off(e,t)}))})),Tt=pt(0,((e,...t)=>{Mt.emit(e,...t)}));let kt,Dt,Rt;function Ot(e){try{return JSON.parse(e)}catch(Yr){}return e}const bt=[];function At(e,t){bt.forEach((n=>{n(e,t)})),bt.length=0}const Lt=ct(Pt="getPushClientId",function(e,t,n,i){return dt(e,t,0,i)}(Pt,((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{void 0===Rt&&(Rt=!1,kt="",Dt="uniPush is not enabled"),bt.push(((e,i)=>{e?t({cid:e}):n(i)})),void 0!==kt&&At(kt,Dt)}))}),0,Nt));var Pt,Nt;const wt=[],Ut=/^\$|__f__|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|rpx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/,Gt=/^create|Manager$/,xt=["createBLEConnection"],Ft=["request","downloadFile","uploadFile","connectSocket"],Bt=["createBLEConnection"],qt=/^on|^off/;function Vt(e){return Gt.test(e)&&-1===xt.indexOf(e)}function jt(e){return Ut.test(e)&&-1===Bt.indexOf(e)}function Ht(e){return-1!==Ft.indexOf(e)}function Kt(e){return!(Vt(e)||jt(e)||function(e){return qt.test(e)&&"onPush"!==e}(e))}function zt(e,t){return Kt(e)&&g(t)?function(n={},...i){return g(n.success)||g(n.fail)||g(n.complete)?st(e,rt(e,t,r({},n),i)):st(e,new Promise(((o,s)=>{rt(e,t,r({},n,{success:o,fail:s}),i)})))}:t}Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e&&e()).then((()=>n))),(n=>t.resolve(e&&e()).then((()=>{throw n}))))});const Wt=["success","fail","cancel","complete"];const Yt=()=>{const e=g(getApp)&&getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=Be(n&&n.language?n.language:Ue)||Ue}return t}()},$t=[];"undefined"!=typeof global&&(global.getLocale=Yt);const Jt="__DC_STAT_UUID";let Xt;function Qt(e=wx){return function(t,n){Xt=Xt||e.getStorageSync(Jt),Xt||(Xt=Date.now()+""+Math.floor(1e7*Math.random()),wx.setStorage({key:Jt,data:Xt})),n.deviceId=Xt}}function Zt(e,t){if(e.safeArea){const n=e.safeArea;t.safeAreaInsets={top:n.top,left:n.left,right:e.windowWidth-n.right,bottom:e.screenHeight-n.bottom}}}function en(e,t){let n="",i="";switch(n=e.split(" ")[0]||t,i=e.split(" ")[1]||"",n=n.toLowerCase(),n){case"harmony":case"ohos":case"openharmony":n="harmonyos";break;case"iphone os":n="ios";break;case"mac":case"darwin":n="macos";break;case"windows_nt":n="windows"}return{osName:n,osVersion:i}}function tn(e,t){let n=e.deviceType||"phone";{const e={ipad:"pad",windows:"pc",mac:"pc"},i=Object.keys(e),o=t.toLowerCase();for(let t=0;t{Zt(e,t),Qt()(e,t),function(e,t){const{brand:n="",model:i="",system:o="",language:s="",theme:a,version:c,platform:u,fontSizeSetting:l,SDKVersion:d,pixelRatio:p,deviceOrientation:h}=e,{osName:g,osVersion:f}=en(o,u);let m=c,_=tn(e,i),v=nn(n),y=sn(e),I=h,M=p,C=d;const S=(s||"").replace(/_/g,"-"),E={appId:"__UNI__A6CDB98",appName:"tk-mini-program",appVersion:"1.0.0",appVersionCode:"100",appLanguage:on(S),uniCompileVersion:"4.75",uniCompilerVersion:"4.75",uniRuntimeVersion:"4.75",uniPlatform:"mp-weixin",deviceBrand:v,deviceModel:i,deviceType:_,devicePixelRatio:M,deviceOrientation:I,osName:g,osVersion:f,hostTheme:a,hostVersion:m,hostLanguage:S,hostName:y,hostSDKVersion:C,hostFontSizeSetting:l,windowTop:0,windowBottom:0,osLanguage:void 0,osTheme:void 0,ua:void 0,hostPackageName:void 0,browserName:void 0,browserVersion:void 0,isUniAppX:!1};r(t,E)}(e,t)}},rn=an,cn={args(e,t){let n=parseInt(e.current);if(isNaN(n))return;const i=e.urls;if(!d(i))return;const o=i.length;return o?(n<0?n=0:n>=o&&(n=o-1),n>0?(t.current=i[n],t.urls=i.filter(((e,t)=>!(t{const{brand:n,model:i,system:o="",platform:s=""}=e;let a=tn(e,i),c=nn(n);Qt()(e,t);const{osName:u,osVersion:l}=en(o,s);t=ve(r(t,{deviceType:a,deviceBrand:c,deviceModel:i,osName:u,osVersion:l}))}},dn={returnValue:(e,t)=>{const{version:n,language:i,SDKVersion:o,theme:s}=e;let a=sn(e),c=(i||"").replace(/_/g,"-");const u={hostVersion:n,hostLanguage:c,hostName:a,hostSDKVersion:o,hostTheme:s,appId:"__UNI__A6CDB98",appName:"tk-mini-program",appVersion:"1.0.0",appVersionCode:"100",appLanguage:on(c),isUniAppX:!1,uniPlatform:"mp-weixin",uniCompileVersion:"4.75",uniCompilerVersion:"4.75",uniRuntimeVersion:"4.75"};r(t,u)}},pn={returnValue:(e,t)=>{Zt(e,t),t=ve(r(t,{windowTop:0,windowBottom:0}))}},hn={args(e){const t=getApp({allowDefault:!0})||{};t.$vm?Zo(K,e,t.$vm.$):(wx.$onErrorHandlers||(wx.$onErrorHandlers=[]),wx.$onErrorHandlers.push(e))}},gn={args(e){const t=getApp({allowDefault:!0})||{};if(t.$vm){if(e.__weh){const n=t.$vm.$[K];if(n){const t=n.indexOf(e.__weh);t>-1&&n.splice(t,1)}}}else{if(!wx.$onErrorHandlers)return;const t=wx.$onErrorHandlers.findIndex((t=>t===e));-1!==t&&wx.$onErrorHandlers.splice(t,1)}}},fn={args(){if(wx.__uni_console__){if(wx.__uni_console_warned__)return;wx.__uni_console_warned__=!0,console.warn("开发模式下小程序日志回显会使用 socket 连接,为了避免冲突,建议使用 SocketTask 的方式去管理 WebSocket 或手动关闭日志回显功能。[详情](https://uniapp.dcloud.net.cn/tutorial/run/mp-log.html)")}}},mn=fn,_n={$on:Ct,$off:Et,$once:St,$emit:Tt,upx2px:mt,rpx2px:mt,interceptors:{},addInterceptor:yt,removeInterceptor:It,onCreateVueApp:function(e){if(ke)return e(ke);De.push(e)},invokeCreateVueAppHook:function(e){ke=e,De.forEach((t=>t(e)))},getLocale:Yt,setLocale:e=>{const t=g(getApp)&&getApp();if(!t)return!1;return t.$vm.$locale!==e&&(t.$vm.$locale=e,$t.forEach((t=>t({locale:e}))),!0)},onLocaleChange:e=>{-1===$t.indexOf(e)&&$t.push(e)},getPushClientId:Lt,onPushMessage:e=>{-1===wt.indexOf(e)&&wt.push(e)},offPushMessage:e=>{if(e){const t=wt.indexOf(e);t>-1&&wt.splice(t,1)}else wt.length=0},invokePushCallback:function(e){if("enabled"===e.type)Rt=!0;else if("clientId"===e.type)kt=e.cid,Dt=e.errMsg,At(kt,e.errMsg);else if("pushMsg"===e.type){const t={type:"receive",data:Ot(e.message)};for(let e=0;e{t({type:"click",data:Ot(e.message)})}))},__f__:function(e,t,...n){t&&n.push(t),console[e].apply(console,n)}};const vn=["qy","env","error","version","lanDebug","cloud","serviceMarket","router","worklet","__webpack_require_UNI_MP_PLUGIN__"],yn=["lanDebug","router","worklet"],In=wx.getLaunchOptionsSync?wx.getLaunchOptionsSync():null;function Mn(e){return(!In||1154!==In.scene||!yn.includes(e))&&(vn.indexOf(e)>-1||"function"==typeof wx[e])}function Cn(){const e={};for(const t in wx)Mn(t)&&(e[t]=wx[t]);return"undefined"!=typeof globalThis&&"undefined"==typeof requireMiniProgram&&(globalThis.wx=e),e}const Sn=["__route__","__wxExparserNodeId__","__wxWebviewId__"],En=(Tn={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]},function({service:e,success:t,fail:n,complete:i}){let o;Tn[e]?(o={errMsg:"getProvider:ok",service:e,provider:Tn[e]},g(t)&&t(o)):(o={errMsg:"getProvider:fail:服务["+e+"]不存在"},g(n)&&n(o)),g(i)&&i(o)});var Tn;const kn=Cn();kn.canIUse("getAppBaseInfo")||(kn.getAppBaseInfo=kn.getSystemInfoSync),kn.canIUse("getWindowInfo")||(kn.getWindowInfo=kn.getSystemInfoSync),kn.canIUse("getDeviceInfo")||(kn.getDeviceInfo=kn.getSystemInfoSync);let Dn=kn.getAppBaseInfo&&kn.getAppBaseInfo();Dn||(Dn=kn.getSystemInfoSync());const Rn=Dn?Dn.host:null,On=Rn&&"SAAASDK"===Rn.env?kn.miniapp.shareVideoMessage:kn.shareVideoMessage;var bn=Object.freeze({__proto__:null,createSelectorQuery:function(){const e=kn.createSelectorQuery(),t=e.in;return e.in=function(e){return e.$scope?t.call(this,e.$scope):t.call(this,function(e){const t=Object.create(null);return Sn.forEach((n=>{t[n]=e[n]})),t}(e))},e},getProvider:En,shareVideoMessage:On});const An={args(e,t){e.compressedHeight&&!t.compressHeight&&(t.compressHeight=e.compressedHeight),e.compressedWidth&&!t.compressWidth&&(t.compressWidth=e.compressedWidth)}};var Ln=Object.freeze({__proto__:null,compressImage:An,getAppAuthorizeSetting:{returnValue:function(e,t){const{locationReducedAccuracy:n}=e;t.locationAccuracy="unsupported",!0===n?t.locationAccuracy="reduced":!1===n&&(t.locationAccuracy="full")}},getAppBaseInfo:dn,getDeviceInfo:ln,getSystemInfo:an,getSystemInfoSync:rn,getWindowInfo:pn,offError:gn,onError:hn,onSocketMessage:mn,onSocketOpen:fn,previewImage:cn,redirectTo:{},showActionSheet:un});const Pn=Cn();var Nn=function(e,t,n=wx){const i=function(e){function t(e,t,n){return function(o){return t(i(e,o,n))}}function n(e,n,i={},o={},s=!1){if(M(n)){const a=!0===s?n:{};g(i)&&(i=i(n,a)||{});for(const r in n)if(l(i,r)){let t=i[r];g(t)&&(t=t(n[r],n,a)),t?f(t)?a[t]=n[r]:M(t)&&(a[t.name?t.name:r]=t.value):console.warn(`微信小程序 ${e} 暂不支持 ${r}`)}else if(-1!==Wt.indexOf(r)){const i=n[r];g(i)&&(a[r]=t(e,i,o))}else s||l(a,r)||(a[r]=n[r]);return a}return g(n)&&(g(i)&&i(n,{}),n=t(e,n,o)),n}function i(t,i,o,s=!1){return g(e.returnValue)&&(i=e.returnValue(t,i)),n(t,i,o,{},s||!1)}return function(t,o){const s=l(e,t);if(!s&&"function"!=typeof wx[t])return o;const a=s||g(e.returnValue)||Vt(t)||Ht(t),r=s||g(o);if(!s&&!o)return function(){console.error(`微信小程序 暂不支持${t}`)};if(!a||!r)return o;const c=e[t];return function(e,o){let s=c||{};g(c)&&(s=c(e));const a=[e=n(t,e,s.args,s.returnValue)];void 0!==o&&a.push(o);const r=wx[s.name||t].apply(wx,a);return(Vt(t)||Ht(t))&&r&&!r.__v_skip&&(r.__v_skip=!0),jt(t)?i(t,r,s.returnValue,Vt(t)):r}}}(t);return new Proxy({},{get:(t,o)=>l(t,o)?t[o]:l(e,o)?zt(o,e[o]):l(_n,o)?zt(o,_n[o]):zt(o,i(o,n[o]))})}(bn,Ln,Pn);let wn,Un;class Gn{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=wn,!e&&wn&&(this.index=(wn.scopes||(wn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=wn;try{return wn=this,e()}finally{wn=t}}}on(){wn=this}off(){wn=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Yn()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Hn,t=Un;try{return Hn=!0,Un=this,this._runnings++,qn(this),this.fn()}finally{Vn(this),this._runnings--,Un=t,Hn=e}}stop(){var e;this.active&&(qn(this),Vn(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function qn(e){e._trackId++,e._depsLength=0}function Vn(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},ti=new WeakMap,ni=Symbol(""),ii=Symbol("");function oi(e,t,n){if(Hn&&Un){let t=ti.get(e);t||ti.set(e,t=new Map);let i=t.get(n);i||t.set(n,i=ei((()=>t.delete(n)))),Xn(Un,i)}}function si(e,t,n,i,o,s){const a=ti.get(e);if(!a)return;let r=[];if("clear"===t)r=[...a.values()];else if("length"===n&&d(e)){const e=Number(i);a.forEach(((t,n)=>{("length"===n||!m(n)&&n>=e)&&r.push(t)}))}else switch(void 0!==n&&r.push(a.get(n)),t){case"add":d(e)?C(n)&&r.push(a.get("length")):(r.push(a.get(ni)),p(e)&&r.push(a.get(ii)));break;case"delete":d(e)||(r.push(a.get(ni)),p(e)&&r.push(a.get(ii)));break;case"set":p(e)&&r.push(a.get(ni))}$n();for(const c of r)c&&Zn(c,4);Jn()}const ai=e("__proto__,__v_isRef,__isVue"),ri=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m)),ci=ui();function ui(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=$i(this);for(let t=0,o=this.length;t{e[t]=function(...e){Wn(),$n();const n=$i(this)[t].apply(this,e);return Jn(),Yn(),n}})),e}function li(e){const t=$i(this);return oi(t,0,e),t.hasOwnProperty(e)}class di{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const i=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!i;if("__v_isReadonly"===t)return i;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(i?o?qi:Bi:o?Fi:xi).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=d(e);if(!i){if(s&&l(ci,t))return Reflect.get(ci,t,n);if("hasOwnProperty"===t)return li}const a=Reflect.get(e,t,n);return(m(t)?ri.has(t):ai(t))?a:(i||oi(e,0,t),o?a:no(a)?s&&C(t)?a:a.value:_(a)?i?Hi(a):ji(a):a)}}class pi extends di{constructor(e=!1){super(!1,e)}set(e,t,n,i){let o=e[t];if(!this._isShallow){const t=Wi(o);if(Yi(n)||Wi(n)||(o=$i(o),n=$i(n)),!d(e)&&no(o)&&!no(n))return!t&&(o.value=n,!0)}const s=d(e)&&C(t)?Number(t)e,vi=e=>Reflect.getPrototypeOf(e);function yi(e,t,n=!1,i=!1){const o=$i(e=e.__v_raw),s=$i(t);n||(A(t,s)&&oi(o,0,t),oi(o,0,s));const{has:a}=vi(o),r=i?_i:n?Qi:Xi;return a.call(o,t)?r(e.get(t)):a.call(o,s)?r(e.get(s)):void(e!==o&&e.get(t))}function Ii(e,t=!1){const n=this.__v_raw,i=$i(n),o=$i(e);return t||(A(e,o)&&oi(i,0,e),oi(i,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Mi(e,t=!1){return e=e.__v_raw,!t&&oi($i(e),0,ni),Reflect.get(e,"size",e)}function Ci(e){e=$i(e);const t=$i(this);return vi(t).has.call(t,e)||(t.add(e),si(t,"add",e,e)),this}function Si(e,t){t=$i(t);const n=$i(this),{has:i,get:o}=vi(n);let s=i.call(n,e);s||(e=$i(e),s=i.call(n,e));const a=o.call(n,e);return n.set(e,t),s?A(t,a)&&si(n,"set",e,t):si(n,"add",e,t),this}function Ei(e){const t=$i(this),{has:n,get:i}=vi(t);let o=n.call(t,e);o||(e=$i(e),o=n.call(t,e)),i&&i.call(t,e);const s=t.delete(e);return o&&si(t,"delete",e,void 0),s}function Ti(){const e=$i(this),t=0!==e.size,n=e.clear();return t&&si(e,"clear",void 0,void 0),n}function ki(e,t){return function(n,i){const o=this,s=o.__v_raw,a=$i(s),r=t?_i:e?Qi:Xi;return!e&&oi(a,0,ni),s.forEach(((e,t)=>n.call(i,r(e),r(t),o)))}}function Di(e,t,n){return function(...i){const o=this.__v_raw,s=$i(o),a=p(s),r="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,u=o[e](...i),l=n?_i:t?Qi:Xi;return!t&&oi(s,0,c?ii:ni),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:r?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Ri(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Oi(){const e={get(e){return yi(this,e)},get size(){return Mi(this)},has:Ii,add:Ci,set:Si,delete:Ei,clear:Ti,forEach:ki(!1,!1)},t={get(e){return yi(this,e,!1,!0)},get size(){return Mi(this)},has:Ii,add:Ci,set:Si,delete:Ei,clear:Ti,forEach:ki(!1,!0)},n={get(e){return yi(this,e,!0)},get size(){return Mi(this,!0)},has(e){return Ii.call(this,e,!0)},add:Ri("add"),set:Ri("set"),delete:Ri("delete"),clear:Ri("clear"),forEach:ki(!0,!1)},i={get(e){return yi(this,e,!0,!0)},get size(){return Mi(this,!0)},has(e){return Ii.call(this,e,!0)},add:Ri("add"),set:Ri("set"),delete:Ri("delete"),clear:Ri("clear"),forEach:ki(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=Di(o,!1,!1),n[o]=Di(o,!0,!1),t[o]=Di(o,!1,!0),i[o]=Di(o,!0,!0)})),[e,n,t,i]}const[bi,Ai,Li,Pi]=Oi();function Ni(e,t){const n=t?e?Pi:Li:e?Ai:bi;return(t,i,o)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(l(n,i)&&i in t?n:t,i,o)}const wi={get:Ni(!1,!1)},Ui={get:Ni(!1,!0)},Gi={get:Ni(!0,!1)},xi=new WeakMap,Fi=new WeakMap,Bi=new WeakMap,qi=new WeakMap;function Vi(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>I(e).slice(8,-1))(e))}function ji(e){return Wi(e)?e:Ki(e,!1,gi,wi,xi)}function Hi(e){return Ki(e,!0,fi,Gi,Bi)}function Ki(e,t,n,i,o){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const a=Vi(e);if(0===a)return e;const r=new Proxy(e,2===a?i:n);return o.set(e,r),r}function zi(e){return Wi(e)?zi(e.__v_raw):!(!e||!e.__v_isReactive)}function Wi(e){return!(!e||!e.__v_isReadonly)}function Yi(e){return!(!e||!e.__v_isShallow)}function $i(e){const t=e&&e.__v_raw;return t?$i(t):e}function Ji(e){return Object.isExtensible(e)&&((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e}const Xi=e=>_(e)?ji(e):e,Qi=e=>_(e)?Hi(e):e;class Zi{constructor(e,t,n,i){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Bn((()=>e(this._value)),(()=>to(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=$i(this);return e._cacheable&&!e.effect.dirty||!A(e._value,e._value=e.effect.run())||to(e,4),eo(e),e.effect._dirtyLevel>=2&&to(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function eo(e){var t;Hn&&Un&&(e=$i(e),Xn(Un,null!=(t=e.dep)?t:e.dep=ei((()=>e.dep=void 0),e instanceof Zi?e:void 0)))}function to(e,t=4,n){const i=(e=$i(e)).dep;i&&Zn(i,t)}function no(e){return!(!e||!0!==e.__v_isRef)}function io(e){return function(e,t){if(no(e))return e;return new oo(e,t)}(e,!1)}class oo{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:$i(e),this._value=t?e:Xi(e)}get value(){return eo(this),this._value}set value(e){const t=this.__v_isShallow||Yi(e)||Wi(e);e=t?e:$i(e),A(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Xi(e),to(this,4))}}function so(e){return no(e)?e.value:e}const ao={get:(e,t,n)=>so(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return no(o)&&!no(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function ro(e){return zi(e)?e:new Proxy(e,ao)}class co{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=$i(this._object),t=this._key,null==(n=ti.get(e))?void 0:n.get(t);var e,t,n}}function uo(e,t,n){const i=e[t];return no(i)?i:new co(e,t,n)}function lo(e,t,n,i){try{return i?e(...i):e()}catch(o){ho(o,t,n)}}function po(e,t,n,i){if(g(e)){const o=lo(e,t,n,i);return o&&v(o)&&o.catch((e=>{ho(e,t,n)})),o}const o=[];for(let s=0;s>>1,o=_o[i],s=Oo(o);snull==e.id?1/0:e.id,bo=(e,t)=>{const n=Oo(e)-Oo(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ao(e){mo=!1,fo=!0,_o.sort(bo);try{for(vo=0;vo<_o.length;vo++){const e=_o[vo];e&&!1!==e.active&&lo(e,null,14)}}finally{vo=0,_o.length=0,function(){if(yo.length){const e=[...new Set(yo)].sort(((e,t)=>Oo(e)-Oo(t)));if(yo.length=0,Io)return void Io.push(...e);for(Io=e,Mo=0;Mof(e)?e.trim():e))),n&&(s=i.map(P))}let c,u=o[c=b(n)]||o[c=b(k(n))];!u&&a&&(u=o[c=b(R(n))]),u&&po(u,e,6,s);const l=o[c+"Once"];if(l){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,po(l,e,6,s)}}function Po(e,t,n=!1){const i=t.emitsCache,o=i.get(e);if(void 0!==o)return o;const s=e.emits;let a={},c=!1;if(!g(e)){const i=e=>{const n=Po(e,t,!0);n&&(c=!0,r(a,n))};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}return s||c?(d(s)?s.forEach((e=>a[e]=null)):r(a,s),_(e)&&i.set(e,a),a):(_(e)&&i.set(e,null),null)}function No(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),l(e,t[0].toLowerCase()+t.slice(1))||l(e,R(t))||l(e,t))}let wo=null;function Uo(e){const t=wo;return wo=e,e&&e.type.__scopeId,t}const Go="components";function xo(e,t){return e&&(e[t]||e[k(t)]||e[O(k(t))])}const Fo={};function Bo(e,t,n){return qo(e,t,n)}function qo(e,n,{immediate:o,deep:s,flush:a,once:r,onTrack:u,onTrigger:l}=t){if(n&&r){const e=n;n=(...t)=>{e(...t),T()}}const p=qs,h=e=>!0===s?e:Ho(e,!1===s?1:void 0);let f,m,_=!1,v=!1;if(no(e)?(f=()=>e.value,_=Yi(e)):zi(e)?(f=()=>h(e),_=!0):d(e)?(v=!0,_=e.some((e=>zi(e)||Yi(e))),f=()=>e.map((e=>no(e)?e.value:zi(e)?h(e):g(e)?lo(e,p,2):void 0))):f=g(e)?n?()=>lo(e,p,2):()=>(m&&m(),po(e,p,3,[y])):i,n&&s){const e=f;f=()=>Ho(e())}let y=e=>{m=S.onStop=()=>{lo(e,p,4),m=S.onStop=void 0}},I=v?new Array(e.length).fill(Fo):Fo;const M=()=>{if(S.active&&S.dirty)if(n){const e=S.run();(s||_||(v?e.some(((e,t)=>A(e,I[t]))):A(e,I)))&&(m&&m(),po(n,p,3,[e,I===Fo?void 0:v&&I[0]===Fo?[]:I,y]),I=e)}else S.run()};let C;M.allowRecurse=!!n,"sync"===a?C=M:"post"===a?C=()=>Us(M,p&&p.suspense):(M.pre=!0,p&&(M.id=p.uid),C=()=>To(M));const S=new Bn(f,i,C),E=Fn(),T=()=>{S.stop(),E&&c(E.effects,S)};return n?o?M():I=S.run():"post"===a?Us(S.run.bind(S),p&&p.suspense):S.run(),T}function Vo(e,t,n){const i=this.proxy,o=f(e)?e.includes(".")?jo(i,e):()=>i[e]:e.bind(i,i);let s;g(t)?s=t:(s=t.handler,n=t);const a=Ks(this),r=qo(o,s.bind(i),n);return a(),r}function jo(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((i=i||new Set).has(e))return e;if(i.add(e),no(e))Ho(e.value,t,n,i);else if(d(e))for(let o=0;o{Ho(e,t,n,i)}));else if(M(e))for(const o in e)Ho(e[o],t,n,i);return e}function Ko(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let zo=0;let Wo=null;function Yo(e,t,n=!1){const i=qs||wo;if(i||Wo){const o=i?null==i.parent?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:Wo._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&g(t)?t.call(i&&i.proxy):t}}function $o(e,t){Xo(e,"a",t)}function Jo(e,t){Xo(e,"da",t)}function Xo(e,t,n=qs){const i=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Zo(t,i,n),n){let e=n.parent;for(;e&&e.parent;)e.parent.vnode.type.__isKeepAlive&&Qo(i,t,n,e),e=e.parent}}function Qo(e,t,n,i){const o=Zo(t,e,i,!0);as((()=>{c(i[t],o)}),n)}function Zo(e,t,n=qs,i=!1){if(n){(function(e){return Ce.indexOf(e)>-1})(e)&&(n=n.root);const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Wn();const o=Ks(n),s=po(t,n,e,i);return o(),Yn(),s});return i?o.unshift(s):o.push(s),s}}const es=e=>(t,n=qs)=>(!Ys||"sp"===e)&&Zo(e,((...e)=>t(...e)),n),ts=es("bm"),ns=es("m"),is=es("bu"),os=es("u"),ss=es("bum"),as=es("um"),rs=es("sp"),cs=es("rtg"),us=es("rtc");function ls(e,t=qs){Zo("ec",e,t)}const ds=e=>e?Ws(e)?Xs(e)||e.proxy:ds(e.parent):null;const ps=r(Object.create(null),{$:function(e){return e},$el:e=>e.__$el||(e.__$el={}),$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ds(e.parent),$root:e=>ds(e.root),$emit:e=>e.emit,$options:e=>Is(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,To(e.update)}),$watch:e=>Vo.bind(e)}),hs=(e,n)=>e!==t&&!e.__isScriptSetup&&l(e,n),gs={get({_:e},n){const{ctx:i,setupState:o,data:s,props:a,accessCache:r,type:c,appContext:u}=e;let d;if("$"!==n[0]){const c=r[n];if(void 0!==c)switch(c){case 1:return o[n];case 2:return s[n];case 4:return i[n];case 3:return a[n]}else{if(hs(o,n))return r[n]=1,o[n];if(s!==t&&l(s,n))return r[n]=2,s[n];if((d=e.propsOptions[0])&&l(d,n))return r[n]=3,a[n];if(i!==t&&l(i,n))return r[n]=4,i[n];ms&&(r[n]=0)}}const p=ps[n];let h,g;return p?("$attrs"===n&&oi(e,0,n),p(e)):(h=c.__cssModules)&&(h=h[n])?h:i!==t&&l(i,n)?(r[n]=4,i[n]):(g=u.config.globalProperties,l(g,n)?g[n]:void 0)},set({_:e},n,i){const{data:o,setupState:s,ctx:a}=e;return hs(s,n)?(s[n]=i,!0):o!==t&&l(o,n)?(o[n]=i,!0):!l(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(a[n]=i,!0))},has({_:{data:e,setupState:n,accessCache:i,ctx:o,appContext:s,propsOptions:a}},r){let c;return!!i[r]||e!==t&&l(e,r)||hs(n,r)||(c=a[0])&&l(c,r)||l(o,r)||l(ps,r)||l(s.config.globalProperties,r)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:l(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function fs(e){return d(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let ms=!0;function _s(e){const t=Is(e),n=e.proxy,o=e.ctx;ms=!1,t.beforeCreate&&vs(t.beforeCreate,e,"bc");const{data:s,computed:a,methods:r,watch:c,provide:u,inject:l,created:p,beforeMount:h,mounted:f,beforeUpdate:m,updated:v,activated:y,deactivated:I,beforeDestroy:M,beforeUnmount:C,destroyed:S,unmounted:E,render:T,renderTracked:k,renderTriggered:D,errorCaptured:R,serverPrefetch:O,expose:b,inheritAttrs:A,components:L,directives:P,filters:N}=t;if(l&&function(e,t){d(e)&&(e=Es(e));for(const n in e){const i=e[n];let o;o=_(i)?"default"in i?Yo(i.from||n,i.default,!0):Yo(i.from||n):Yo(i),no(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[n]=o}}(l,o),r)for(const i in r){const e=r[i];g(e)&&(o[i]=e.bind(n))}if(s){const t=s.call(n,n);_(t)&&(e.data=ji(t))}if(ms=!0,a)for(const d in a){const e=a[d],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):i,s=!g(e)&&g(e.set)?e.set.bind(n):i,r=Qs({get:t,set:s});Object.defineProperty(o,d,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e})}if(c)for(const i in c)ys(c[i],o,n,i);function w(e,t){d(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(function(){if(u){const e=g(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(qs){let n=qs.provides;const i=qs.parent&&qs.parent.provides;i===n&&(n=qs.provides=Object.create(i)),n[e]=t,"app"===qs.type.mpType&&qs.appContext.app.provide(e,t)}}(t,e[t])}))}}(),p&&vs(p,e,"c"),w(ts,h),w(ns,f),w(is,m),w(os,v),w($o,y),w(Jo,I),w(ls,R),w(us,k),w(cs,D),w(ss,C),w(as,E),w(rs,O),d(b))if(b.length){const t=e.exposed||(e.exposed={});b.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});T&&e.render===i&&(e.render=T),null!=A&&(e.inheritAttrs=A),L&&(e.components=L),P&&(e.directives=P),e.ctx.$onApplyOptions&&e.ctx.$onApplyOptions(t,e,n)}function vs(e,t,n){po(d(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function ys(e,t,n,i){const o=i.includes(".")?jo(n,i):()=>n[i];if(f(e)){const n=t[e];g(n)&&Bo(o,n)}else if(g(e))Bo(o,e.bind(n));else if(_(e))if(d(e))e.forEach((e=>ys(e,t,n,i)));else{const i=g(e.handler)?e.handler.bind(n):t[e.handler];g(i)&&Bo(o,i,e)}}function Is(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,r=s.get(t);let c;return r?c=r:o.length||n||i?(c={},o.length&&o.forEach((e=>Ms(c,e,a,!0))),Ms(c,t,a)):c=t,_(t)&&s.set(t,c),c}function Ms(e,t,n,i=!1){const{mixins:o,extends:s}=t;s&&Ms(e,s,n,!0),o&&o.forEach((t=>Ms(e,t,n,!0)));for(const a in t)if(i&&"expose"===a);else{const i=Cs[a]||n&&n[a];e[a]=i?i(e[a],t[a]):t[a]}return e}const Cs={data:Ss,props:Ds,emits:Ds,methods:ks,computed:ks,beforeCreate:Ts,created:Ts,beforeMount:Ts,mounted:Ts,beforeUpdate:Ts,updated:Ts,beforeDestroy:Ts,beforeUnmount:Ts,destroyed:Ts,unmounted:Ts,activated:Ts,deactivated:Ts,errorCaptured:Ts,serverPrefetch:Ts,components:ks,directives:ks,watch:function(e,t){if(!e)return t;if(!t)return e;const n=r(Object.create(null),e);for(const i in t)n[i]=Ts(e[i],t[i]);return n},provide:Ss,inject:function(e,t){return ks(Es(e),Es(t))}};function Ss(e,t){return t?e?function(){return r(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Es(e){if(d(e)){const t={};for(let n=0;n{h=!0;const[t,n]=As(e,i,!0);r(u,t),n&&p.push(...n)};!o&&i.mixins.length&&i.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!h)return _(e)&&s.set(e,n),n;if(d(c))for(let n=0;n-1,i[1]=n<0||t-1||l(i,"default"))&&p.push(e)}}}const f=[u,p];return _(e)&&s.set(e,f),f}function Ls(e){return"$"!==e[0]&&!S(e)}function Ps(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Ns(e,t){return Ps(e)===Ps(t)}function ws(e,t){return d(t)?t.findIndex((t=>Ns(t,e))):g(t)&&Ns(t,e)?0:-1}const Us=Do;function Gs(e){return e?zi(t=e)||Wi(t)||"__vInternal"in e?r({},e):e:null;var t}const xs=Ko();let Fs=0;function Bs(e,n,i){const o=e.type,s=(n?n.appContext:e.appContext)||xs,a={uid:Fs++,vnode:e,type:o,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new Gn(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:As(o,s),emitsOptions:Po(o,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:o.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null,$uniElements:new Map,$templateUniElementRefs:[],$templateUniElementStyles:{},$eS:{},$eA:{}};return a.ctx={_:a},a.root=n?n.root:a,a.emit=Lo.bind(null,a),e.ce&&e.ce(a),a}let qs=null;const Vs=()=>qs||wo;let js,Hs;js=e=>{qs=e},Hs=e=>{Ys=e};const Ks=e=>{const t=qs;return js(e),e.scope.on(),()=>{e.scope.off(),js(t)}},zs=()=>{qs&&qs.scope.off(),js(null)};function Ws(e){return 4&e.vnode.shapeFlag}let Ys=!1;function $s(e,t=!1){t&&Hs(t);const{props:n}=e.vnode,i=Ws(e);Rs(e,n,i,t);const o=i?function(e){const t=e.type;e.accessCache=Object.create(null),e.proxy=Ji(new Proxy(e.ctx,gs));const{setup:n}=t;if(n){const t=e.setupContext=n.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(oi(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,i=Ks(e);Wn();const o=lo(n,e,0,[e.props,t]);Yn(),i(),v(o)?o.then(zs,zs):function(e,t){g(t)?e.render=t:_(t)&&(e.setupState=ro(t));Js(e)}(e,o)}else Js(e)}(e):void 0;return t&&Hs(!1),o}function Js(e,t,n){const o=e.type;e.render||(e.render=o.render||i);{const t=Ks(e);Wn();try{_s(e)}finally{Yn(),t()}}}function Xs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ro(Ji(e.exposed)),{get:(t,n)=>n in t?t[n]:e.proxy[n],has:(e,t)=>t in e||t in ps}))}const Qs=(e,t)=>{const n=function(e,t,n=!1){let o,s;const a=g(e);return a?(o=e,s=i):(o=e.get,s=e.set),new Zi(o,s,a||!s,n)}(e,0,Ys);return n},Zs="3.4.21";function ea(e){return so(e)}const ta="[object Array]",na="[object Object]";function ia(e,t){const n={};return oa(e,t),sa(e,t,"",n),n}function oa(e,t){if((e=ea(e))===t)return;const n=I(e),i=I(t);if(n==na&&i==na)for(let o in t){const n=e[o];void 0===n?e[o]=null:oa(n,t[o])}else n==ta&&i==ta&&e.length>=t.length&&t.forEach(((t,n)=>{oa(e[n],t)}))}function sa(e,t,n,i){if((e=ea(e))===t)return;const o=I(e),s=I(t);if(o==na)if(s!=na||Object.keys(e).length{sa(e,s[t],(""==n?"":n+".")+a+"["+t+"]",i)}));else if(r==na)if(c!=na||Object.keys(o).length{sa(e,t[o],n+"["+o+"]",i)})):aa(i,n,e)}function aa(e,t,n){e[t]=n}function ra(e){const t=e.ctx.__next_tick_callbacks;if(t&&t.length){const e=t.slice(0);t.length=0;for(let t=0;t{t?lo(t.bind(e.proxy),e,14):i&&i(e.proxy)})),new Promise((e=>{i=e}))}function ua(e,t){const n=typeof(e=ea(e));if("object"===n&&null!==e){let n=t.get(e);if(void 0!==n)return n;if(d(e)){const i=e.length;n=new Array(i),t.set(e,n);for(let o=0;o{i[e]=n[e]})),i}(o,s));Object.keys(a).length?(i.__next_tick_pending=!0,o.setData(a,(()=>{i.__next_tick_pending=!1,ra(e)})),Ro()):ra(e)}}function pa(e,t,n){t.appContext.config.globalProperties.$applyOptions(e,t,n);const i=e.computed;if(i){const e=Object.keys(i);if(e.length){const n=t.ctx;n.$computedKeys||(n.$computedKeys=[]),n.$computedKeys.push(...e)}}delete t.ctx.$onApplyOptions}function ha(e,t=!1){const{setupState:n,$templateRefs:i,$templateUniElementRefs:o,ctx:{$scope:s,$mpPlatform:a}}=e;if("mp-alipay"===a)return;if(!s||!i&&!o)return;if(t)return i&&i.forEach((e=>ga(e,null,n))),void(o&&o.forEach((e=>ga(e,null,n))));const r="mp-baidu"===a||"mp-toutiao"===a,c=e=>{if(0===e.length)return[];const t=(s.selectAllComponents(".r")||[]).concat(s.selectAllComponents(".r-i-f")||[]);return e.filter((e=>{const i=function(e,t){const n=e.find((e=>e&&(e.properties||e.props).uI===t));if(n){const e=n.$vm;return e?Xs(e.$)||e:function(e){_(e)&&Ji(e);return e}(n)}return null}(t,e.i);return!(!r||null!==i)||(ga(e,i,n),!1)}))},u=()=>{if(i){const t=c(i);t.length&&e.proxy&&e.proxy.$scope&&e.proxy.$scope.setData({r1:1},(()=>{c(t)}))}};o&&o.length&&ca(e,(()=>{o.forEach((e=>{d(e.v)?e.v.forEach((t=>{ga(e,t,n)})):ga(e,e.v,n)}))})),s._$setRef?s._$setRef(u):ca(e,u)}function ga({r:e,f:t},n,i){if(g(e))e(n,{});else{const o=f(e),s=no(e);if(o||s)if(t){if(!s)return;d(e.value)||(e.value=[]);const t=e.value;if(-1===t.indexOf(n)){if(t.push(n),!n)return;n.$&&ss((()=>c(t,n)),n.$)}}else o?l(i,e)&&(i[e]=n):no(e)&&(e.value=n)}}const fa=Do;function ma(e,t){const n=e.component=Bs(e,t.parentComponent,null);return n.renderer=t.mpType?t.mpType:"component",n.ctx.$onApplyOptions=pa,n.ctx.$children=[],"app"===t.mpType&&(n.render=i),t.onBeforeSetup&&t.onBeforeSetup(n,t),$s(n),t.parentComponent&&n.proxy&&t.parentComponent.ctx.$children.push(Xs(n)||n.proxy),function(e){const t=Ma.bind(e);e.$updateScopedSlots=()=>Eo((()=>To(t)));const n=()=>{if(e.isMounted){const{next:t,bu:n,u:i}=e;Ca(e,!1),Ia(),n&&L(n),Ca(e,!0),da(e,va(e)),i&&fa(i)}else ss((()=>{ha(e,!0)}),e),da(e,va(e))},o=e.effect=new Bn(n,i,(()=>To(s)),e.scope),s=e.update=()=>{o.dirty&&o.run()};s.id=e.uid,Ca(e,!0),s()}(n),n.proxy}const _a=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t};function va(e){const{type:t,vnode:n,proxy:i,withProxy:o,props:s,propsOptions:[a],slots:r,attrs:c,emit:u,render:l,renderCache:d,data:p,setupState:h,ctx:g,uid:f,appContext:{app:{config:{globalProperties:{pruneComponentPropsCache:m}}}},inheritAttrs:_}=e;let v;e.$uniElementIds=new Map,e.$templateRefs=[],e.$templateUniElementRefs=[],e.$templateUniElementStyles={},e.$ei=0,m(f),e.__counter=0===e.__counter?1:0;const y=Uo(e);try{if(4&n.shapeFlag){ya(_,s,a,c);const e=o||i;v=l.call(e,e,d,s,h,p,g)}else{ya(_,s,a,t.props?c:_a(c));const e=t;v=e.length>1?e(s,{attrs:c,slots:r,emit:u}):e(s,null)}}catch(I){ho(I,e,1),v=!1}return ha(e),Uo(y),v}function ya(e,t,n,i){if(t&&i&&!1!==e){const e=Object.keys(i).filter((e=>"class"!==e&&"style"!==e));if(!e.length)return;n&&e.some(a)?e.forEach((e=>{a(e)&&e.slice(9)in n||(t[e]=i[e])})):e.forEach((e=>t[e]=i[e]))}}const Ia=e=>{Wn(),Ro(),Yn()};function Ma(){const e=this.$scopedSlotsData;if(!e||0===e.length)return;const t=this.ctx.$scope,n=t.data,i=Object.create(null);e.forEach((({path:e,index:t,data:o})=>{const s=_e(n,e),a=f(t)?`${e}.${t}`:`${e}[${t}]`;if(void 0===s||void 0===s[t])i[a]=o;else{const e=ia(o,s[t]);Object.keys(e).forEach((t=>{i[a+"."+t]=e[t]}))}})),e.length=0,Object.keys(i).length&&t.setData(i)}function Ca({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}const Sa=function(e,t=null){g(e)||(e=r({},e)),null==t||_(t)||(t=null);const n=Ko(),i=new WeakSet,o=n.app={_uid:zo++,_component:e,_props:t,_container:null,_context:n,_instance:null,version:Zs,get config(){return n.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&g(e.install)?(i.add(e),e.install(o,...t)):g(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(n.mixins.includes(e)||n.mixins.push(e),o),component:(e,t)=>t?(n.components[e]=t,o):n.components[e],directive:(e,t)=>t?(n.directives[e]=t,o):n.directives[e],mount(){},unmount(){},provide:(e,t)=>(n.provides[e]=t,o),runWithContext(e){const t=Wo;Wo=o;try{return e()}finally{Wo=t}}};return o};function Ea(e,t=null){("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof my?my:void 0).__VUE__=!0;const n=Sa(e,t),o=n._context;o.config.globalProperties.$nextTick=function(e){return ca(this.$,e)};const s=e=>(e.appContext=o,e.shapeFlag=6,e),a=function(e,t){return ma(s(e),t)},r=function(e){return e&&function(e){const{bum:t,scope:n,update:i,um:o}=e;t&&L(t);{const t=e.parent;if(t){const n=t.ctx.$children,i=Xs(e)||e.proxy,o=n.indexOf(i);o>-1&&n.splice(o,1)}}n.stop(),i&&(i.active=!1),o&&fa(o),fa((()=>{e.isUnmounted=!0}))}(e.$)};return n.mount=function(){e.render=i;const t=ma(s({type:e}),{mpType:"app",mpInstance:null,parentComponent:null,slots:[],props:null});return n._instance=t.$,t.$app=n,t.$createComponent=a,t.$destroyComponent=r,o.$appInstance=t,t},n.unmount=function(){},n}function Ta(e,t,n,i){g(t)&&Zo(e,t.bind(n),i)}function ka(e,t,n){!function(e,t,n){const i=e.mpType||n.$mpType;!i||"component"===i||"page"===i&&"component"===t.renderer||Object.keys(e).forEach((i=>{if(Te(i,e[i],!1)){const o=e[i];d(o)?o.forEach((e=>Ta(i,e,n,t))):Ta(i,o,n,t)}}))}(e,t,n)}function Da(e,t,n){return e[t]=n}function Ra(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function Oa(e){const t=e.config.errorHandler;return function(n,i,o){t&&t(n,i,o);const s=e._instance;if(!s||!s.proxy)throw n;s[K]?s.proxy.$callHook(K,n):go(n,0,i&&i.$.vnode,!1)}}function ba(e,t){return e?[...new Set([].concat(e,t))]:t}let Aa;const La="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Pa=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Na(){const e=Nn.getStorageSync("uni_id_token")||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((i=t[1],decodeURIComponent(Aa(i).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(o){throw new Error("获取当前用户信息出错,详细错误信息为:"+o.message)}var i;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}function wa(e){const t=e.config;var n;t.errorHandler=Re(e,Oa),n=t.optionMergeStrategies,Se.forEach((e=>{n[e]=ba}));const i=t.globalProperties;!function(e){e.uniIDHasRole=function(e){const{role:t}=Na();return t.indexOf(e)>-1},e.uniIDHasPermission=function(e){const{permission:t}=Na();return this.uniIDHasRole("admin")||t.indexOf(e)>-1},e.uniIDTokenValid=function(){const{tokenExpired:e}=Na();return e>Date.now()}}(i),i.$set=Da,i.$applyOptions=ka,i.$callMethod=Ra,Nn.invokeCreateVueAppHook(e)}Aa="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Pa.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,i,o="",s=0;s>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}:atob;const Ua=Object.create(null);function Ga(e){delete Ua[e]}function xa(e){if(!e)return;const[t,n]=e.split(",");return Ua[t]?Ua[t][parseInt(n)]:void 0}var Fa={install(e){wa(e),e.config.globalProperties.pruneComponentPropsCache=Ga;const t=e.mount;e.mount=function(n){const i=t.call(e,n),o=function(){const e="createApp";if("undefined"!=typeof global&&void 0!==global[e])return global[e];if("undefined"!=typeof my)return my[e]}();return o?o(i):"undefined"!=typeof createMiniProgramApp&&createMiniProgramApp(i),i}}};function Ba(e){return f(e)?e:function(e){let t="";if(!e||f(e))return t;for(const n in e)t+=`${n.startsWith("--")?n:R(n)}:${e[n]};`;return t}(N(e))}function qa(e,t){const n=Vs(),o=n.ctx,s=void 0===t||"mp-weixin"!==o.$mpPlatform&&"mp-qq"!==o.$mpPlatform&&"mp-xhs"!==o.$mpPlatform||!f(t)&&"number"!=typeof t?"":"_"+t,a="e"+n.$ei+++s,c=o.$scope;if(!e)return delete c[a],a;const u=c[a];return u?u.value=e:c[a]=function(e,t){const n=e=>{var o;(o=e).type&&o.target&&(o.preventDefault=i,o.stopPropagation=i,o.stopImmediatePropagation=i,l(o,"detail")||(o.detail={}),l(o,"markerId")&&(o.detail="object"==typeof o.detail?o.detail:{},o.detail.markerId=o.markerId),M(o.detail)&&l(o.detail,"checked")&&!l(o.detail,"value")&&(o.detail.value=o.detail.checked),M(o.detail)&&(o.target=r({},o.target,o.detail)));let s=[e];t&&t.ctx.$getTriggerEventDetail&&"number"==typeof e.detail&&(e.detail=t.ctx.$getTriggerEventDetail(e.detail)),e.detail&&e.detail.__args__&&(s=e.detail.__args__);const a=n.value,c=()=>po(function(e,t){if(d(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n&&n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,a),t,5,s),u=e.target,p=!!u&&(!!u.dataset&&"true"===String(u.dataset.eventsync));if(!Va.includes(e.type)||p){const t=c();if("input"===e.type&&(d(t)||v(t)))return;return t}setTimeout(c)};return n.value=e,n}(e,n),a}const Va=["tap","longpress","longtap","transitionend","animationstart","animationiteration","animationend","touchforcechange"];const ja=function(e,t=null){return e&&(e.mpType="app"),Ea(e,t).use(Fa)};const Ha=["externalClasses"];const Ka=/_(.*)_worklet_factory_/;function za(e,t){const n=e.$children;for(let o=n.length-1;o>=0;o--){const e=n[o];if(e.$scope._$vueId===t)return e}let i;for(let o=n.length-1;o>=0;o--)if(i=za(n[o],t),i)return i}const Wa=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Ya(e,t){const n=e.ctx;n.mpType=t.mpType,n.$mpType=t.mpType,n.$mpPlatform="mp-weixin",n.$scope=t.mpInstance,Object.defineProperties(n,{[fe]:{get(){const e=this.$scope.data[fe];return void 0===e?"":e}}}),n.$mp={},n._self={},e.slots={},d(t.slots)&&t.slots.length&&(t.slots.forEach((t=>{e.slots[t]=!0})),e.slots.d&&(e.slots.default=!0)),n.getOpenerEventChannel=function(){return t.mpInstance.getOpenerEventChannel()},n.$hasHook=$a,n.$callHook=Ja,e.emit=function(e,t){return function(n,...i){const o=t.$scope;if(o&&n){const e={__args__:i};o.triggerEvent(n,e)}return e.apply(this,[n,...i])}}(e.emit,n)}function $a(e){const t=this.$[e];return!(!t||!t.length)}function Ja(e,t){"mounted"===e&&(Ja.call(this,"bm"),this.$.isMounted=!0,e="m");const n=this.$[e];return n&&((e,t)=>{let n;for(let i=0;i{Te(n,e[n])&&t.add(n)}));{const{extends:n,mixins:i}=e;i&&i.forEach((e=>Qa(e,t))),n&&Qa(n,t)}}return t}function Za(e,t,n){-1!==n.indexOf(t)||l(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.$callHook(t,e)})}const er=[J];function tr(e,t,n=er){t.forEach((t=>Za(e,t,n)))}function nr(e,t,n=er){Qa(t).forEach((t=>Za(e,t,n)))}const ir=me((()=>{const e=[],t=g(getApp)&&getApp({allowDefault:!0});if(t&&t.$vm&&t.$vm.$){const n=t.$vm.$.appContext.mixins;if(d(n)){const t=Object.keys(Ee);n.forEach((n=>{t.forEach((t=>{l(n,t)&&!e.includes(t)&&e.push(t)}))}))}}return e}));const or=[V,j,K,z,W,Y];function sr(e,t){const n=e.$,i={globalData:e.$options&&e.$options.globalData||{},$vm:e,onLaunch(t){this.$vm=e;const i=n.ctx;this.$vm&&i.$scope&&i.$callHook||(Ya(n,{mpType:"app",mpInstance:this,slots:[]}),i.globalData=this.globalData,e.$callHook(H,t))}},o=wx.$onErrorHandlers;o&&(o.forEach((e=>{Zo(K,e,n)})),o.length=0),function(e){const t=io(function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=Be(n&&n.language?n.language:Ue)||Ue}return t}());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(e);const s=e.$.type;tr(i,or),nr(i,s);{const e=s.methods;e&&r(i,e)}return i}function ar(e,t){if(g(e.onLaunch)){const t=wx.getLaunchOptionsSync&&wx.getLaunchOptionsSync();e.onLaunch(t)}g(e.onShow)&&wx.onAppShow&&wx.onAppShow((e=>{t.$callHook("onShow",e)})),g(e.onHide)&&wx.onAppHide&&wx.onAppHide((e=>{t.$callHook("onHide",e)}))}const rr=["eO","uR","uRIF","uI","uT","uP","uS"];function cr(e){e.properties||(e.properties={}),r(e.properties,function(e,t=!1){const n={};if(!t){let e=function(e){const t=Object.create(null);e&&e.forEach((e=>{t[e]=!0})),this.setData({$slots:t})};rr.forEach((e=>{n[e]={type:null,value:""}})),n.uS={type:null,value:[]},n.uS.observer=e}return e.behaviors&&e.behaviors.includes("wx://form-field")&&(e.properties&&e.properties.name||(n.name={type:null,value:""}),e.properties&&e.properties.value||(n.value={type:null,value:""})),n}(e),function(e){const t={};return e&&e.virtualHost&&(t.virtualHostStyle={type:null,value:""},t.virtualHostClass={type:null,value:""},t.virtualHostHidden={type:null,value:""},t[fe]={type:null,value:""}),t}(e.options))}const ur=[String,Number,Boolean,Object,Array,null];function lr(e,t){const n=function(e){return d(e)&&1===e.length?e[0]:e}(e);return-1!==ur.indexOf(n)?n:null}function dr(e,t){return(t?function(e){const t={};M(e)&&Object.keys(e).forEach((n=>{-1===rr.indexOf(n)&&(t[n]=e[n])}));return t}(e):xa(e.uP))||{}}function pr(e){const t=function(){const e=this.properties.uP;e&&(this.$vm?function(e,t){const n=$i(t.props),i=xa(e)||{};hr(n,i)&&(!function(e,t,n,i){const{props:o,attrs:s,vnode:{patchFlag:a}}=e,r=$i(o),[c]=e.propsOptions;let u=!1;if(!(i||a>0)||16&a){let i;Os(e,t,o,s)&&(u=!0);for(const s in r)t&&(l(t,s)||(i=R(s))!==s&&l(t,i))||(c?!n||void 0===n[s]&&void 0===n[i]||(o[s]=bs(c,r,s,void 0,e,!0)):delete o[s]);if(s!==r)for(const e in s)t&&l(t,e)||(delete s[e],u=!0)}else if(8&a){const n=e.vnode.dynamicProps;for(let i=0;i-1&&function(e){const t=_o.indexOf(e);t>vo&&_o.splice(t,1)}(t.update),t.update());var o}(e,this.$vm.$):"m"===this.properties.uT&&function(e,t){const n=t.properties,i=xa(e)||{};hr(n,i,!1)&&t.setData(i)}(e,this))};e.observers||(e.observers={}),e.observers.uP=t}function hr(e,t,n=!0){const i=Object.keys(t);if(n&&i.length!==Object.keys(e).length)return!0;for(let o=0;o{i.push(e.replace("uni://","wx://")),"uni://form-field"===e&&(d(n)?(n.push("name"),n.push("modelValue")):(n.name={type:String,default:""},n.modelValue={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),i}(t)}function fr(e,{parse:t,mocks:n,isPage:i,isPageInProject:o,initRelation:s,handleLink:a,initLifetimes:c}){e=e.default||e;const u={multipleSlots:!0,addGlobalClass:!0,pureDataPattern:/^uP$/};d(e.mixins)&&e.mixins.forEach((e=>{_(e.options)&&r(u,e.options)})),e.options&&r(u,e.options);const p={options:u,lifetimes:c({mocks:n,isPage:i,initRelation:s,vueOptions:e}),pageLifetimes:{show(){this.$vm&&this.$vm.$callHook("onPageShow")},hide(){this.$vm&&this.$vm.$callHook("onPageHide")},resize(e){this.$vm&&this.$vm.$callHook("onPageResize",e)}},methods:{__l:a}};var h,g,f,m;return gr(p,e),cr(p),pr(p),function(e,t){Ha.forEach((n=>{l(t,n)&&(e[n]=t[n])}))}(p,e),h=p.methods,g=e.wxsCallMethods,d(g)&&g.forEach((e=>{h[e]=function(t){return this.$vm[e](t)}})),f=p.methods,(m=e.methods)&&Object.keys(m).forEach((e=>{const t=e.match(Ka);if(t){const n=t[1];f[e]=m[e],f[n]=m[n]}})),t&&t(p,{handleLink:a}),p}let mr,_r;function vr(){return getApp().$vm}function yr(e,t){const{parse:n,mocks:i,isPage:o,initRelation:s,handleLink:a,initLifetimes:r}=t,c=fr(e,{mocks:i,isPage:o,isPageInProject:!0,initRelation:s,handleLink:a,initLifetimes:r});!function({properties:e},t){d(t)?t.forEach((t=>{e[t]={type:String,value:""}})):M(t)&&Object.keys(t).forEach((n=>{const i=t[n];if(M(i)){let t=i.default;g(t)&&(t=t());const o=i.type;i.type=lr(o),e[n]={type:i.type,value:t}}else e[n]={type:lr(i)}}))}(c,(e.default||e).props);const u=c.methods;return u.onLoad=function(e){var t;return this.options=e,this.$page={fullPath:(t=this.route+Me(e),function(e){return 0===e.indexOf("/")}(t)?t:"/"+t)},this.$vm&&this.$vm.$callHook($,e)},tr(u,Xa),nr(u,e),function(e,t){if(!t)return;Object.keys(Ee).forEach((n=>{t&Ee[n]&&Za(e,n,[])}))}(u,e.__runtimeHooks),tr(u,ir()),n&&n(c,{handleLink:a}),c}const Ir=Page,Mr=Component;function Cr(e){const t=e.triggerEvent,n=function(n,...i){return t.apply(e,[(o=n,k(o.replace(ye,"-"))),...i]);var o};try{e.triggerEvent=n}catch(i){e._triggerEvent=n}}function Sr(e,t,n){const i=t[e];t[e]=i?function(...e){return Cr(this),i.apply(this,e)}:function(){Cr(this)}}Page=function(e){return Sr($,e),Ir(e)},Component=function(e){Sr("created",e);return e.properties&&e.properties.uP||(cr(e),pr(e)),Mr(e)};var Er=Object.freeze({__proto__:null,handleLink:function(e){const t=e.detail||e.value,n=t.vuePid;let i;n&&(i=za(this.$vm,n)),i||(i=this.$vm),t.parent=i},initLifetimes:function({mocks:e,isPage:t,initRelation:n,vueOptions:i}){return{attached(){let o=this.properties;!function(e,t){if(!e)return;const n=e.split(","),i=n.length;1===i?t._$vueId=n[0]:2===i&&(t._$vueId=n[0],t._$vuePid=n[1])}(o.uI,this);const s={vuePid:this._$vuePid};n(this,s);const a=this,r=t(a);let c=o;this.$vm=function(e,t){mr||(mr=vr().$createComponent);const n=mr(e,t);return Xs(n.$)||n}({type:i,props:dr(c,r)},{mpType:r?"page":"component",mpInstance:a,slots:o.uS||{},parentComponent:s.parent&&s.parent.$,onBeforeSetup(t,n){!function(e,t){Object.defineProperty(e,"refs",{get(){const e={};return function(e,t,n){e.selectAllComponents(t).forEach((e=>{const t=e.properties.uR;n[t]=e.$vm||e}))}(t,".r",e),t.selectAllComponents(".r-i-f").forEach((t=>{const n=t.properties.uR;n&&(e[n]||(e[n]=[]),e[n].push(t.$vm||t))})),e}})}(t,a),function(e,t,n){const i=e.ctx;n.forEach((n=>{l(t,n)&&(e[n]=i[n]=t[n])}))}(t,a,e),function(e,t){Ya(e,t);const n=e.ctx;Wa.forEach((e=>{n[e]=function(...t){const i=n.$scope;if(i&&i[e])return i[e].apply(i,t)}}))}(t,n)}}),r||function(e){const t=e.$options;d(t.behaviors)&&t.behaviors.includes("uni://form-field")&&e.$watch("modelValue",(()=>{e.$scope&&e.$scope.setData({name:e.name,value:e.modelValue})}),{immediate:!0})}(this.$vm)},ready(){this.$vm&&(this.$vm.$callHook("mounted"),this.$vm.$callHook(J))},detached(){var e;this.$vm&&(Ga(this.$vm.$.uid),e=this.$vm,_r||(_r=vr().$destroyComponent),_r(e))}}},initRelation:function(e,t){e.triggerEvent("__l",t)},isPage:function(e){return!!e.route},mocks:["__route__","__wxExparserNodeId__","__wxWebviewId__"]});const Tr=function(e){return App(sr(e))},kr=(Dr=Er,function(e){return Component(yr(e,Dr))});var Dr;const Rr=function(e){return function(t){return Component(fr(t,e))}}(Er),Or=function(e){ar(sr(e),e)},br=function(e){const t=sr(e),n=g(getApp)&&getApp({allowDefault:!0});if(!n)return;e.$.ctx.$scope=n;const i=n.globalData;i&&Object.keys(t.globalData).forEach((e=>{l(i,e)||(i[e]=t.globalData[e])})),Object.keys(t).forEach((e=>{l(n,e)||(n[e]=t[e])})),ar(t,e)};wx.createApp=global.createApp=Tr,wx.createPage=kr,wx.createComponent=Rr,wx.createPluginApp=global.createPluginApp=Or,wx.createSubpackageApp=global.createSubpackageApp=br; +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],i=()=>{},o=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),r=e=>e.startsWith("onUpdate:"),a=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),p=Array.isArray,d=e=>"[object Map]"===x(e),h=e=>"[object Set]"===x(e),f=e=>"function"==typeof e,m=e=>"string"==typeof e,g=e=>"symbol"==typeof e,v=e=>null!==e&&"object"==typeof e,y=e=>(v(e)||f(e))&&f(e.then)&&f(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>"[object Object]"===x(e),k=e=>m(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,C=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),w=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},E=/-(\w)/g,T=w((e=>e.replace(E,((e,t)=>t?t.toUpperCase():"")))),I=/\B([A-Z])/g,_=w((e=>e.replace(I,"-$1").toLowerCase())),O=w((e=>e.charAt(0).toUpperCase()+e.slice(1))),A=w((e=>e?`on${O(e)}`:"")),R=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;n{const t=parseFloat(e);return isNaN(t)?e:t};function N(e){if(p(e)){const t={};for(let n=0;n{if(e){const n=e.split(B);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function U(e){let t="";if(m(e))t=e;else if(p(e))for(let n=0;nt&&t.__v_isRef?F(e,t.value):d(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],i)=>(e[G(t,i)+" =>"]=n,e)),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>G(e)))}:g(t)?G(t):!v(t)||p(t)||S(t)?t:String(t),G=(e,t="")=>{var n;return g(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},q="onShow",z="onHide",H="onLaunch",$="onError",V="onThemeChange",K="onPageNotFound",W="onUnhandledRejection",X="onLoad",J="onReady",Q="onUnload",Y="onInit",Z="onSaveExitState",ee="onResize",te="onBackPress",ne="onPageScroll",ie="onTabItemTap",oe="onReachBottom",se="onPullDownRefresh",re="onShareTimeline",ae="onShareChat",ce="onAddToFavorites",le="onShareAppMessage",ue="onNavigationBarButtonTap",pe="onNavigationBarSearchInputClicked",de="onNavigationBarSearchInputChanged",he="onNavigationBarSearchInputConfirmed",fe="onNavigationBarSearchInputFocusChanged",me="virtualHostId";function ge(e,t=null){let n;return(...i)=>(e&&(n=e.apply(t,i),e=null),n)}function ve(e,t){if(!m(t))return;const n=(t=t.replace(/\[(\d+)\]/g,".$1")).split(".");let i=n[0];return e||(e={}),1===n.length?e[i]:ve(e[i],n.slice(1).join("."))}function ye(e){let t={};return S(e)&&Object.keys(e).sort().forEach((n=>{const i=n;t[i]=e[i]})),Object.keys(t)?t:e}const be=/:/g;const xe=encodeURIComponent;function Se(e,t=xe){const n=e?Object.keys(e).map((n=>{let i=e[n];return void 0===typeof i||null===i?i="":S(i)&&(i=JSON.stringify(i)),t(n)+"="+t(i)})).filter((e=>e.length>0)).join("&"):null;return n?`?${n}`:""}const ke=[Y,X,q,z,Q,te,ne,ie,oe,se,re,le,ae,ce,Z,ue,pe,de,he,fe];const Ce=[q,z,H,$,V,K,W,"onExit",Y,X,J,Q,ee,te,ne,ie,oe,se,re,ce,le,ae,Z,ue,pe,de,he,fe],we=(()=>({onPageScroll:1,onShareAppMessage:2,onShareTimeline:4}))();function Ee(e,t,n=!0){return!(n&&!f(t))&&(Ce.indexOf(e)>-1||0===e.indexOf("on"))}let Te;const Ie=[];const _e=ge(((e,t)=>t(e))),Oe=function(){};Oe.prototype={_id:1,on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n,_id:this._id}),this._id++},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i=0;s--)if(i[s].fn===t||i[s].fn._===t||i[s]._id===t){i.splice(s,1);break}o=i}return o.length?n[e]=o:delete n[e],this}};var Ae=Oe;const Re=["{","}"];const Pe=/^(?:\d)+/,Me=/^(?:\w)+/;const Ne="zh-Hans",De="zh-Hant",Be="en",Le=Object.prototype.hasOwnProperty,je=(e,t)=>Le.call(e,t),Ue=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=Re){if(!t)return[e];let i=this._caches[e];return i||(i=function(e,[t,n]){const i=[];let o=0,s="";for(;o-1?Ne:e.indexOf("-hant")>-1?De:(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?De:Ne);var n;let i=[Be,"fr","es"];t&&Object.keys(t).length>0&&(i=Object.keys(t));const o=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,i);return o||void 0}class Ge{constructor({locale:e,fallbackLocale:t,messages:n,watcher:i,formater:o}){this.locale=Be,this.fallbackLocale=Be,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=o||Ue,this.messages=n||{},this.setLocale(e||Be),i&&this.watchLocale(i)}setLocale(e){const t=this.locale;this.locale=Fe(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const i=this.messages[e];i?n?Object.assign(i,t):Object.keys(t).forEach((e=>{je(i,e)||(i[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let i=this.message;return"string"==typeof t?(t=Fe(t,this.messages))&&(i=this.messages[t]):n=t,je(i,e)?this.formater.interpolate(i[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function qe(e){return function(){try{return e.apply(e,arguments)}catch(Wa){console.error(Wa)}}}let ze=1;const He={};function $e(e,t,n){if("number"==typeof e){const i=He[e];if(i)return i.keepAlive||delete He[e],i.callback(t,n)}return t}const Ve="success",Ke="fail",We="complete";function Xe(e,t={},{beforeAll:n,beforeSuccess:i}={}){S(t)||(t={});const{success:o,fail:s,complete:r}=function(e){const t={};for(const n in e){const i=e[n];f(i)&&(t[n]=qe(i),delete e[n])}return t}(t),a=f(o),c=f(s),l=f(r),u=ze++;return function(e,t,n,i=!1){He[e]={name:t,keepAlive:i,callback:n}}(u,e,(u=>{(u=u||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(u.errMsg,e),f(n)&&n(u),u.errMsg===e+":ok"?(f(i)&&i(u,t),a&&o(u)):c&&s(u),l&&r(u)})),u}const Je="success",Qe="fail",Ye="complete",Ze={},et={};function nt(e,t){return function(n){return e(n,t)||n}}function it(e,t,n){let i=!1;for(let o=0;oe(t),catch(){}}}function ot(e,t={}){return[Je,Qe,Ye].forEach((n=>{const i=e[n];if(!p(i))return;const o=t[n];t[n]=function(e){it(i,e,t).then((e=>f(o)&&o(e)||e))}})),t}function st(e,t){const n=[];p(Ze.returnValue)&&n.push(...Ze.returnValue);const i=et[e];return i&&p(i.returnValue)&&n.push(...i.returnValue),n.forEach((e=>{t=e(t)||t})),t}function rt(e){const t=Object.create(null);Object.keys(Ze).forEach((e=>{"returnValue"!==e&&(t[e]=Ze[e].slice())}));const n=et[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function at(e,t,n,i){const o=rt(e);if(o&&Object.keys(o).length){if(p(o.invoke)){return it(o.invoke,n).then((n=>t(ot(rt(e),n),...i)))}return t(ot(o,n),...i)}return t(n,...i)}function ct(e,t){return(n={},...i)=>function(e){return!(!S(e)||![Ve,Ke,We].find((t=>f(e[t]))))}(n)?st(e,at(e,t,a({},n),i)):st(e,new Promise(((o,s)=>{at(e,t,a({},n,{success:o,fail:s}),i)})))}function lt(e,t,n,i={}){const o=t+":fail";let s="";return s=n?0===n.indexOf(o)?n:o+" "+n:o,delete i.errCode,$e(e,a({errMsg:s},i))}function ut(e,t,n,i){const o=function(e){e[0]}(t);if(o)return o}function pt(e,t,n,i){return n=>{const o=Xe(e,n,i),s=ut(0,[n]);return s?lt(o,e,s):t(n,{resolve:t=>function(e,t,n){return $e(e,a(n||{},{errMsg:t+":ok"}))}(o,e,t),reject:(t,n)=>lt(o,e,function(e){return!e||m(e)?e:e.stack?("undefined"!=typeof globalThis&&globalThis.harmonyChannel||console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function dt(e,t,n,i){return function(e,t){return(...e)=>{const n=ut(0,e);if(n)throw new Error(n);return t.apply(null,e)}}(0,t)}let ht=!1,ft=0,mt=0;const gt=dt(0,((e,t)=>{if(0===ft&&function(){var e,t;let n,i,o;{const s=(null===(e=wx.getWindowInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync(),r=(null===(t=wx.getDeviceInfo)||void 0===t?void 0:t.call(wx))||wx.getSystemInfoSync();n=s.windowWidth,i=s.pixelRatio,o=r.platform}ft=n,mt=i,ht="ios"===o}(),0===(e=Number(e)))return 0;let n=e/750*(t||ft);return n<0&&(n=-n),n=Math.floor(n+1e-4),0===n&&(n=1!==mt&&ht?.5:1),e<0?-n:n}));function vt(e,t){Object.keys(t).forEach((n=>{f(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):p(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{const i=e[n],o=t[n];p(i)&&f(o)&&c(i,o)}))}const bt=dt(0,((e,t)=>{m(e)&&S(t)?vt(et[e]||(et[e]={}),t):S(e)&&vt(Ze,e)})),xt=dt(0,((e,t)=>{m(e)?S(t)?yt(et[e],t):delete et[e]:S(e)&&yt(Ze,e)}));const St=new class{constructor(){this.$emitter=new Ae}on(e,t){return this.$emitter.on(e,t)}once(e,t){return this.$emitter.once(e,t)}off(e,t){e?this.$emitter.off(e,t):this.$emitter.e={}}emit(e,...t){this.$emitter.emit(e,...t)}},kt=dt(0,((e,t)=>(St.on(e,t),()=>St.off(e,t)))),Ct=dt(0,((e,t)=>(St.once(e,t),()=>St.off(e,t)))),wt=dt(0,((e,t)=>{p(e)||(e=e?[e]:[]),e.forEach((e=>{St.off(e,t)}))})),Et=dt(0,((e,...t)=>{St.emit(e,...t)}));let Tt,It,_t;function Ot(e){try{return JSON.parse(e)}catch(Wa){}return e}const At=[];function Rt(e,t){At.forEach((n=>{n(e,t)})),At.length=0}const Pt=ct(Mt="getPushClientId",function(e,t,n,i){return pt(e,t,0,i)}(Mt,((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{void 0===_t&&(_t=!1,Tt="",It="uniPush is not enabled"),At.push(((e,i)=>{e?t({cid:e}):n(i)})),void 0!==Tt&&Rt(Tt,It)}))}),0,Nt));var Mt,Nt;const Dt=[],Bt=/^\$|__f__|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|rpx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/,Lt=/^create|Manager$/,jt=["createBLEConnection"],Ut=["request","downloadFile","uploadFile","connectSocket"],Ft=["createBLEConnection"],Gt=/^on|^off/;function qt(e){return Lt.test(e)&&-1===jt.indexOf(e)}function zt(e){return Bt.test(e)&&-1===Ft.indexOf(e)}function Ht(e){return-1!==Ut.indexOf(e)}function $t(e){return!(qt(e)||zt(e)||function(e){return Gt.test(e)&&"onPush"!==e}(e))}function Vt(e,t){return $t(e)&&f(t)?function(n={},...i){return f(n.success)||f(n.fail)||f(n.complete)?st(e,at(e,t,a({},n),i)):st(e,new Promise(((o,s)=>{at(e,t,a({},n,{success:o,fail:s}),i)})))}:t}Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e&&e()).then((()=>n))),(n=>t.resolve(e&&e()).then((()=>{throw n}))))});const Kt=["success","fail","cancel","complete"];const Wt=()=>{const e=f(getApp)&&getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=Fe(n&&n.language?n.language:Be)||Be}return t}()},Xt=[];"undefined"!=typeof global&&(global.getLocale=Wt);const Jt="__DC_STAT_UUID";let Qt;function Yt(e=wx){return function(t,n){Qt=Qt||e.getStorageSync(Jt),Qt||(Qt=Date.now()+""+Math.floor(1e7*Math.random()),wx.setStorage({key:Jt,data:Qt})),n.deviceId=Qt}}function Zt(e,t){if(e.safeArea){const n=e.safeArea;t.safeAreaInsets={top:n.top,left:n.left,right:e.windowWidth-n.right,bottom:e.screenHeight-n.bottom}}}function en(e,t){let n="",i="";switch(n=e.split(" ")[0]||t,i=e.split(" ")[1]||"",n=n.toLowerCase(),n){case"harmony":case"ohos":case"openharmony":n="harmonyos";break;case"iphone os":n="ios";break;case"mac":case"darwin":n="macos";break;case"windows_nt":n="windows"}return{osName:n,osVersion:i}}function tn(e,t){let n=e.deviceType||"phone";{const e={ipad:"pad",windows:"pc",mac:"pc"},i=Object.keys(e),o=t.toLowerCase();for(let t=0;t{Zt(e,t),Yt()(e,t),function(e,t){const{brand:n="",model:i="",system:o="",language:s="",theme:r,version:c,platform:l,fontSizeSetting:u,SDKVersion:p,pixelRatio:d,deviceOrientation:h}=e,{osName:f,osVersion:m}=en(o,l);let g=c,v=tn(e,i),y=nn(n),b=sn(e),x=h,S=d,k=p;const C=(s||"").replace(/_/g,"-"),w={appId:"__UNI__A6CDB98",appName:"tk-mini-program",appVersion:"1.0.0",appVersionCode:"100",appLanguage:on(C),uniCompileVersion:"4.75",uniCompilerVersion:"4.75",uniRuntimeVersion:"4.75",uniPlatform:"mp-weixin",deviceBrand:y,deviceModel:i,deviceType:v,devicePixelRatio:S,deviceOrientation:x,osName:f,osVersion:m,hostTheme:r,hostVersion:g,hostLanguage:C,hostName:b,hostSDKVersion:k,hostFontSizeSetting:u,windowTop:0,windowBottom:0,osLanguage:void 0,osTheme:void 0,ua:void 0,hostPackageName:void 0,browserName:void 0,browserVersion:void 0,isUniAppX:!1};a(t,w)}(e,t)}},an=rn,cn={args(e,t){let n=parseInt(e.current);if(isNaN(n))return;const i=e.urls;if(!p(i))return;const o=i.length;return o?(n<0?n=0:n>=o&&(n=o-1),n>0?(t.current=i[n],t.urls=i.filter(((e,t)=>!(t{const{brand:n,model:i,system:o="",platform:s=""}=e;let r=tn(e,i),c=nn(n);Yt()(e,t);const{osName:l,osVersion:u}=en(o,s);t=ye(a(t,{deviceType:r,deviceBrand:c,deviceModel:i,osName:l,osVersion:u}))}},pn={returnValue:(e,t)=>{const{version:n,language:i,SDKVersion:o,theme:s}=e;let r=sn(e),c=(i||"").replace(/_/g,"-");const l={hostVersion:n,hostLanguage:c,hostName:r,hostSDKVersion:o,hostTheme:s,appId:"__UNI__A6CDB98",appName:"tk-mini-program",appVersion:"1.0.0",appVersionCode:"100",appLanguage:on(c),isUniAppX:!1,uniPlatform:"mp-weixin",uniCompileVersion:"4.75",uniCompilerVersion:"4.75",uniRuntimeVersion:"4.75"};a(t,l)}},dn={returnValue:(e,t)=>{Zt(e,t),t=ye(a(t,{windowTop:0,windowBottom:0}))}},hn={args(e){const t=getApp({allowDefault:!0})||{};t.$vm?Zo($,e,t.$vm.$):(wx.$onErrorHandlers||(wx.$onErrorHandlers=[]),wx.$onErrorHandlers.push(e))}},fn={args(e){const t=getApp({allowDefault:!0})||{};if(t.$vm){if(e.__weh){const n=t.$vm.$[$];if(n){const t=n.indexOf(e.__weh);t>-1&&n.splice(t,1)}}}else{if(!wx.$onErrorHandlers)return;const t=wx.$onErrorHandlers.findIndex((t=>t===e));-1!==t&&wx.$onErrorHandlers.splice(t,1)}}},mn={args(){if(wx.__uni_console__){if(wx.__uni_console_warned__)return;wx.__uni_console_warned__=!0,console.warn("开发模式下小程序日志回显会使用 socket 连接,为了避免冲突,建议使用 SocketTask 的方式去管理 WebSocket 或手动关闭日志回显功能。[详情](https://uniapp.dcloud.net.cn/tutorial/run/mp-log.html)")}}},gn=mn,vn={$on:kt,$off:wt,$once:Ct,$emit:Et,upx2px:gt,rpx2px:gt,interceptors:{},addInterceptor:bt,removeInterceptor:xt,onCreateVueApp:function(e){if(Te)return e(Te);Ie.push(e)},invokeCreateVueAppHook:function(e){Te=e,Ie.forEach((t=>t(e)))},getLocale:Wt,setLocale:e=>{const t=f(getApp)&&getApp();if(!t)return!1;return t.$vm.$locale!==e&&(t.$vm.$locale=e,Xt.forEach((t=>t({locale:e}))),!0)},onLocaleChange:e=>{-1===Xt.indexOf(e)&&Xt.push(e)},getPushClientId:Pt,onPushMessage:e=>{-1===Dt.indexOf(e)&&Dt.push(e)},offPushMessage:e=>{if(e){const t=Dt.indexOf(e);t>-1&&Dt.splice(t,1)}else Dt.length=0},invokePushCallback:function(e){if("enabled"===e.type)_t=!0;else if("clientId"===e.type)Tt=e.cid,It=e.errMsg,Rt(Tt,e.errMsg);else if("pushMsg"===e.type){const t={type:"receive",data:Ot(e.message)};for(let e=0;e{t({type:"click",data:Ot(e.message)})}))},__f__:function(e,t,...n){t&&n.push(t),console[e].apply(console,n)}};const yn=["qy","env","error","version","lanDebug","cloud","serviceMarket","router","worklet","__webpack_require_UNI_MP_PLUGIN__"],bn=["lanDebug","router","worklet"],xn=wx.getLaunchOptionsSync?wx.getLaunchOptionsSync():null;function Sn(e){return(!xn||1154!==xn.scene||!bn.includes(e))&&(yn.indexOf(e)>-1||"function"==typeof wx[e])}function kn(){const e={};for(const t in wx)Sn(t)&&(e[t]=wx[t]);return"undefined"!=typeof globalThis&&"undefined"==typeof requireMiniProgram&&(globalThis.wx=e),e}const Cn=["__route__","__wxExparserNodeId__","__wxWebviewId__"],wn=(En={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]},function({service:e,success:t,fail:n,complete:i}){let o;En[e]?(o={errMsg:"getProvider:ok",service:e,provider:En[e]},f(t)&&t(o)):(o={errMsg:"getProvider:fail:服务["+e+"]不存在"},f(n)&&n(o)),f(i)&&i(o)});var En;const Tn=kn();Tn.canIUse("getAppBaseInfo")||(Tn.getAppBaseInfo=Tn.getSystemInfoSync),Tn.canIUse("getWindowInfo")||(Tn.getWindowInfo=Tn.getSystemInfoSync),Tn.canIUse("getDeviceInfo")||(Tn.getDeviceInfo=Tn.getSystemInfoSync);let In=Tn.getAppBaseInfo&&Tn.getAppBaseInfo();In||(In=Tn.getSystemInfoSync());const _n=In?In.host:null,On=_n&&"SAAASDK"===_n.env?Tn.miniapp.shareVideoMessage:Tn.shareVideoMessage;var An=Object.freeze({__proto__:null,createSelectorQuery:function(){const e=Tn.createSelectorQuery(),t=e.in;return e.in=function(e){return e.$scope?t.call(this,e.$scope):t.call(this,function(e){const t=Object.create(null);return Cn.forEach((n=>{t[n]=e[n]})),t}(e))},e},getProvider:wn,shareVideoMessage:On});const Rn={args(e,t){e.compressedHeight&&!t.compressHeight&&(t.compressHeight=e.compressedHeight),e.compressedWidth&&!t.compressWidth&&(t.compressWidth=e.compressedWidth)}};var Pn=Object.freeze({__proto__:null,compressImage:Rn,getAppAuthorizeSetting:{returnValue:function(e,t){const{locationReducedAccuracy:n}=e;t.locationAccuracy="unsupported",!0===n?t.locationAccuracy="reduced":!1===n&&(t.locationAccuracy="full")}},getAppBaseInfo:pn,getDeviceInfo:un,getSystemInfo:rn,getSystemInfoSync:an,getWindowInfo:dn,offError:fn,onError:hn,onSocketMessage:gn,onSocketOpen:mn,previewImage:cn,redirectTo:{},showActionSheet:ln});const Mn=kn();var Nn=function(e,t,n=wx){const i=function(e){function t(e,t,n){return function(o){return t(i(e,o,n))}}function n(e,n,i={},o={},s=!1){if(S(n)){const r=!0===s?n:{};f(i)&&(i=i(n,r)||{});for(const a in n)if(u(i,a)){let t=i[a];f(t)&&(t=t(n[a],n,r)),t?m(t)?r[t]=n[a]:S(t)&&(r[t.name?t.name:a]=t.value):console.warn(`微信小程序 ${e} 暂不支持 ${a}`)}else if(-1!==Kt.indexOf(a)){const i=n[a];f(i)&&(r[a]=t(e,i,o))}else s||u(r,a)||(r[a]=n[a]);return r}return f(n)&&(f(i)&&i(n,{}),n=t(e,n,o)),n}function i(t,i,o,s=!1){return f(e.returnValue)&&(i=e.returnValue(t,i)),n(t,i,o,{},s||!1)}return function(t,o){const s=u(e,t);if(!s&&"function"!=typeof wx[t])return o;const r=s||f(e.returnValue)||qt(t)||Ht(t),a=s||f(o);if(!s&&!o)return function(){console.error(`微信小程序 暂不支持${t}`)};if(!r||!a)return o;const c=e[t];return function(e,o){let s=c||{};f(c)&&(s=c(e));const r=[e=n(t,e,s.args,s.returnValue)];void 0!==o&&r.push(o);const a=wx[s.name||t].apply(wx,r);return(qt(t)||Ht(t))&&a&&!a.__v_skip&&(a.__v_skip=!0),zt(t)?i(t,a,s.returnValue,qt(t)):a}}}(t);return new Proxy({},{get:(t,o)=>u(t,o)?t[o]:u(e,o)?Vt(o,e[o]):u(vn,o)?Vt(o,vn[o]):Vt(o,i(o,n[o]))})}(An,Pn,Mn);let Dn,Bn;class Ln{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Dn,!e&&Dn&&(this.index=(Dn.scopes||(Dn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Dn;try{return Dn=this,e()}finally{Dn=t}}}on(){Dn=this}off(){Dn=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Wn()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Hn,t=Bn;try{return Hn=!0,Bn=this,this._runnings++,Gn(this),this.fn()}finally{qn(this),this._runnings--,Bn=t,Hn=e}}stop(){var e;this.active&&(Gn(this),qn(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function Gn(e){e._trackId++,e._depsLength=0}function qn(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},ti=new WeakMap,ni=Symbol(""),ii=Symbol("");function oi(e,t,n){if(Hn&&Bn){let t=ti.get(e);t||ti.set(e,t=new Map);let i=t.get(n);i||t.set(n,i=ei((()=>t.delete(n)))),Qn(Bn,i)}}function si(e,t,n,i,o,s){const r=ti.get(e);if(!r)return;let a=[];if("clear"===t)a=[...r.values()];else if("length"===n&&p(e)){const e=Number(i);r.forEach(((t,n)=>{("length"===n||!g(n)&&n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(r.get(n)),t){case"add":p(e)?k(n)&&a.push(r.get("length")):(a.push(r.get(ni)),d(e)&&a.push(r.get(ii)));break;case"delete":p(e)||(a.push(r.get(ni)),d(e)&&a.push(r.get(ii)));break;case"set":d(e)&&a.push(r.get(ni))}Xn();for(const c of a)c&&Zn(c,4);Jn()}const ri=e("__proto__,__v_isRef,__isVue"),ai=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(g)),ci=li();function li(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Xi(this);for(let t=0,o=this.length;t{e[t]=function(...e){Kn(),Xn();const n=Xi(this)[t].apply(this,e);return Jn(),Wn(),n}})),e}function ui(e){const t=Xi(this);return oi(t,0,e),t.hasOwnProperty(e)}class pi{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const i=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!i;if("__v_isReadonly"===t)return i;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(i?o?Gi:Fi:o?Ui:ji).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=p(e);if(!i){if(s&&u(ci,t))return Reflect.get(ci,t,n);if("hasOwnProperty"===t)return ui}const r=Reflect.get(e,t,n);return(g(t)?ai.has(t):ri(t))?r:(i||oi(e,0,t),o?r:no(r)?s&&k(t)?r:r.value:v(r)?i?Hi(r):zi(r):r)}}class di extends pi{constructor(e=!1){super(!1,e)}set(e,t,n,i){let o=e[t];if(!this._isShallow){const t=Ki(o);if(Wi(n)||Ki(n)||(o=Xi(o),n=Xi(n)),!p(e)&&no(o)&&!no(n))return!t&&(o.value=n,!0)}const s=p(e)&&k(t)?Number(t)e,yi=e=>Reflect.getPrototypeOf(e);function bi(e,t,n=!1,i=!1){const o=Xi(e=e.__v_raw),s=Xi(t);n||(R(t,s)&&oi(o,0,t),oi(o,0,s));const{has:r}=yi(o),a=i?vi:n?Yi:Qi;return r.call(o,t)?a(e.get(t)):r.call(o,s)?a(e.get(s)):void(e!==o&&e.get(t))}function xi(e,t=!1){const n=this.__v_raw,i=Xi(n),o=Xi(e);return t||(R(e,o)&&oi(i,0,e),oi(i,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Si(e,t=!1){return e=e.__v_raw,!t&&oi(Xi(e),0,ni),Reflect.get(e,"size",e)}function ki(e){e=Xi(e);const t=Xi(this);return yi(t).has.call(t,e)||(t.add(e),si(t,"add",e,e)),this}function Ci(e,t){t=Xi(t);const n=Xi(this),{has:i,get:o}=yi(n);let s=i.call(n,e);s||(e=Xi(e),s=i.call(n,e));const r=o.call(n,e);return n.set(e,t),s?R(t,r)&&si(n,"set",e,t):si(n,"add",e,t),this}function wi(e){const t=Xi(this),{has:n,get:i}=yi(t);let o=n.call(t,e);o||(e=Xi(e),o=n.call(t,e)),i&&i.call(t,e);const s=t.delete(e);return o&&si(t,"delete",e,void 0),s}function Ei(){const e=Xi(this),t=0!==e.size,n=e.clear();return t&&si(e,"clear",void 0,void 0),n}function Ti(e,t){return function(n,i){const o=this,s=o.__v_raw,r=Xi(s),a=t?vi:e?Yi:Qi;return!e&&oi(r,0,ni),s.forEach(((e,t)=>n.call(i,a(e),a(t),o)))}}function Ii(e,t,n){return function(...i){const o=this.__v_raw,s=Xi(o),r=d(s),a="entries"===e||e===Symbol.iterator&&r,c="keys"===e&&r,l=o[e](...i),u=n?vi:t?Yi:Qi;return!t&&oi(s,0,c?ii:ni),{next(){const{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function _i(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Oi(){const e={get(e){return bi(this,e)},get size(){return Si(this)},has:xi,add:ki,set:Ci,delete:wi,clear:Ei,forEach:Ti(!1,!1)},t={get(e){return bi(this,e,!1,!0)},get size(){return Si(this)},has:xi,add:ki,set:Ci,delete:wi,clear:Ei,forEach:Ti(!1,!0)},n={get(e){return bi(this,e,!0)},get size(){return Si(this,!0)},has(e){return xi.call(this,e,!0)},add:_i("add"),set:_i("set"),delete:_i("delete"),clear:_i("clear"),forEach:Ti(!0,!1)},i={get(e){return bi(this,e,!0,!0)},get size(){return Si(this,!0)},has(e){return xi.call(this,e,!0)},add:_i("add"),set:_i("set"),delete:_i("delete"),clear:_i("clear"),forEach:Ti(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=Ii(o,!1,!1),n[o]=Ii(o,!0,!1),t[o]=Ii(o,!1,!0),i[o]=Ii(o,!0,!0)})),[e,n,t,i]}const[Ai,Ri,Pi,Mi]=Oi();function Ni(e,t){const n=t?e?Mi:Pi:e?Ri:Ai;return(t,i,o)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(u(n,i)&&i in t?n:t,i,o)}const Di={get:Ni(!1,!1)},Bi={get:Ni(!1,!0)},Li={get:Ni(!0,!1)},ji=new WeakMap,Ui=new WeakMap,Fi=new WeakMap,Gi=new WeakMap;function qi(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>x(e).slice(8,-1))(e))}function zi(e){return Ki(e)?e:$i(e,!1,fi,Di,ji)}function Hi(e){return $i(e,!0,mi,Li,Fi)}function $i(e,t,n,i,o){if(!v(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const r=qi(e);if(0===r)return e;const a=new Proxy(e,2===r?i:n);return o.set(e,a),a}function Vi(e){return Ki(e)?Vi(e.__v_raw):!(!e||!e.__v_isReactive)}function Ki(e){return!(!e||!e.__v_isReadonly)}function Wi(e){return!(!e||!e.__v_isShallow)}function Xi(e){const t=e&&e.__v_raw;return t?Xi(t):e}function Ji(e){return Object.isExtensible(e)&&((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e}const Qi=e=>v(e)?zi(e):e,Yi=e=>v(e)?Hi(e):e;class Zi{constructor(e,t,n,i){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Fn((()=>e(this._value)),(()=>to(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Xi(this);return e._cacheable&&!e.effect.dirty||!R(e._value,e._value=e.effect.run())||to(e,4),eo(e),e.effect._dirtyLevel>=2&&to(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function eo(e){var t;Hn&&Bn&&(e=Xi(e),Qn(Bn,null!=(t=e.dep)?t:e.dep=ei((()=>e.dep=void 0),e instanceof Zi?e:void 0)))}function to(e,t=4,n){const i=(e=Xi(e)).dep;i&&Zn(i,t)}function no(e){return!(!e||!0!==e.__v_isRef)}function io(e){return function(e,t){if(no(e))return e;return new oo(e,t)}(e,!1)}class oo{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Xi(e),this._value=t?e:Qi(e)}get value(){return eo(this),this._value}set value(e){const t=this.__v_isShallow||Wi(e)||Ki(e);e=t?e:Xi(e),R(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Qi(e),to(this,4))}}function so(e){return no(e)?e.value:e}const ro={get:(e,t,n)=>so(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return no(o)&&!no(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function ao(e){return Vi(e)?e:new Proxy(e,ro)}class co{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Xi(this._object),t=this._key,null==(n=ti.get(e))?void 0:n.get(t);var e,t,n}}function lo(e,t,n){const i=e[t];return no(i)?i:new co(e,t,n)}function uo(e,t,n,i){try{return i?e(...i):e()}catch(o){ho(o,t,n)}}function po(e,t,n,i){if(f(e)){const o=uo(e,t,n,i);return o&&y(o)&&o.catch((e=>{ho(e,t,n)})),o}const o=[];for(let s=0;s>>1,o=vo[i],s=Oo(o);snull==e.id?1/0:e.id,Ao=(e,t)=>{const n=Oo(e)-Oo(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ro(e){go=!1,mo=!0,vo.sort(Ao);try{for(yo=0;yoOo(e)-Oo(t)));if(bo.length=0,xo)return void xo.push(...e);for(xo=e,So=0;Som(e)?e.trim():e))),n&&(s=i.map(M))}let c,l=o[c=A(n)]||o[c=A(T(n))];!l&&r&&(l=o[c=A(_(n))]),l&&po(l,e,6,s);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,po(u,e,6,s)}}function Mo(e,t,n=!1){const i=t.emitsCache,o=i.get(e);if(void 0!==o)return o;const s=e.emits;let r={},c=!1;if(!f(e)){const i=e=>{const n=Mo(e,t,!0);n&&(c=!0,a(r,n))};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}return s||c?(p(s)?s.forEach((e=>r[e]=null)):a(r,s),v(e)&&i.set(e,r),r):(v(e)&&i.set(e,null),null)}function No(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,_(t))||u(e,t))}let Do=null;function Bo(e){const t=Do;return Do=e,e&&e.type.__scopeId,t}const Lo="components";function jo(e,t){return e&&(e[t]||e[T(t)]||e[O(T(t))])}const Uo={};function Fo(e,t,n){return Go(e,t,n)}function Go(e,n,{immediate:o,deep:s,flush:r,once:a,onTrack:l,onTrigger:u}=t){if(n&&a){const e=n;n=(...t)=>{e(...t),E()}}const d=Gs,h=e=>!0===s?e:Ho(e,!1===s?1:void 0);let m,g,v=!1,y=!1;if(no(e)?(m=()=>e.value,v=Wi(e)):Vi(e)?(m=()=>h(e),v=!0):p(e)?(y=!0,v=e.some((e=>Vi(e)||Wi(e))),m=()=>e.map((e=>no(e)?e.value:Vi(e)?h(e):f(e)?uo(e,d,2):void 0))):m=f(e)?n?()=>uo(e,d,2):()=>(g&&g(),po(e,d,3,[b])):i,n&&s){const e=m;m=()=>Ho(e())}let b=e=>{g=C.onStop=()=>{uo(e,d,4),g=C.onStop=void 0}},x=y?new Array(e.length).fill(Uo):Uo;const S=()=>{if(C.active&&C.dirty)if(n){const e=C.run();(s||v||(y?e.some(((e,t)=>R(e,x[t]))):R(e,x)))&&(g&&g(),po(n,d,3,[e,x===Uo?void 0:y&&x[0]===Uo?[]:x,b]),x=e)}else C.run()};let k;S.allowRecurse=!!n,"sync"===r?k=S:"post"===r?k=()=>Bs(S,d&&d.suspense):(S.pre=!0,d&&(S.id=d.uid),k=()=>Eo(S));const C=new Fn(m,i,k),w=Un(),E=()=>{C.stop(),w&&c(w.effects,C)};return n?o?S():x=C.run():"post"===r?Bs(C.run.bind(C),d&&d.suspense):C.run(),E}function qo(e,t,n){const i=this.proxy,o=m(e)?e.includes(".")?zo(i,e):()=>i[e]:e.bind(i,i);let s;f(t)?s=t:(s=t.handler,n=t);const r=$s(this),a=Go(o,s.bind(i),n);return r(),a}function zo(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((i=i||new Set).has(e))return e;if(i.add(e),no(e))Ho(e.value,t,n,i);else if(p(e))for(let o=0;o{Ho(e,t,n,i)}));else if(S(e))for(const o in e)Ho(e[o],t,n,i);return e}function $o(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Vo=0;let Ko=null;function Wo(e,t,n=!1){const i=Gs||Do;if(i||Ko){const o=i?null==i.parent?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:Ko._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&f(t)?t.call(i&&i.proxy):t}}function Xo(e,t){Qo(e,"a",t)}function Jo(e,t){Qo(e,"da",t)}function Qo(e,t,n=Gs){const i=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Zo(t,i,n),n){let e=n.parent;for(;e&&e.parent;)e.parent.vnode.type.__isKeepAlive&&Yo(i,t,n,e),e=e.parent}}function Yo(e,t,n,i){const o=Zo(t,e,i,!0);rs((()=>{c(i[t],o)}),n)}function Zo(e,t,n=Gs,i=!1){if(n){(function(e){return ke.indexOf(e)>-1})(e)&&(n=n.root);const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Kn();const o=$s(n),s=po(t,n,e,i);return o(),Wn(),s});return i?o.unshift(s):o.push(s),s}}const es=e=>(t,n=Gs)=>(!Ws||"sp"===e)&&Zo(e,((...e)=>t(...e)),n),ts=es("bm"),ns=es("m"),is=es("bu"),os=es("u"),ss=es("bum"),rs=es("um"),as=es("sp"),cs=es("rtg"),ls=es("rtc");function us(e,t=Gs){Zo("ec",e,t)}const ps=e=>e?Ks(e)?Qs(e)||e.proxy:ps(e.parent):null;const ds=a(Object.create(null),{$:function(e){return e},$el:e=>e.__$el||(e.__$el={}),$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ps(e.parent),$root:e=>ps(e.root),$emit:e=>e.emit,$options:e=>xs(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Eo(e.update)}),$watch:e=>qo.bind(e)}),hs=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),fs={get({_:e},n){const{ctx:i,setupState:o,data:s,props:r,accessCache:a,type:c,appContext:l}=e;let p;if("$"!==n[0]){const c=a[n];if(void 0!==c)switch(c){case 1:return o[n];case 2:return s[n];case 4:return i[n];case 3:return r[n]}else{if(hs(o,n))return a[n]=1,o[n];if(s!==t&&u(s,n))return a[n]=2,s[n];if((p=e.propsOptions[0])&&u(p,n))return a[n]=3,r[n];if(i!==t&&u(i,n))return a[n]=4,i[n];gs&&(a[n]=0)}}const d=ds[n];let h,f;return d?("$attrs"===n&&oi(e,0,n),d(e)):(h=c.__cssModules)&&(h=h[n])?h:i!==t&&u(i,n)?(a[n]=4,i[n]):(f=l.config.globalProperties,u(f,n)?f[n]:void 0)},set({_:e},n,i){const{data:o,setupState:s,ctx:r}=e;return hs(s,n)?(s[n]=i,!0):o!==t&&u(o,n)?(o[n]=i,!0):!u(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(r[n]=i,!0))},has({_:{data:e,setupState:n,accessCache:i,ctx:o,appContext:s,propsOptions:r}},a){let c;return!!i[a]||e!==t&&u(e,a)||hs(n,a)||(c=r[0])&&u(c,a)||u(o,a)||u(ds,a)||u(s.config.globalProperties,a)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ms(e){return p(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let gs=!0;function vs(e){const t=xs(e),n=e.proxy,o=e.ctx;gs=!1,t.beforeCreate&&ys(t.beforeCreate,e,"bc");const{data:s,computed:r,methods:a,watch:c,provide:l,inject:u,created:d,beforeMount:h,mounted:m,beforeUpdate:g,updated:y,activated:b,deactivated:x,beforeDestroy:S,beforeUnmount:k,destroyed:C,unmounted:w,render:E,renderTracked:T,renderTriggered:I,errorCaptured:_,serverPrefetch:O,expose:A,inheritAttrs:R,components:P,directives:M,filters:N}=t;if(u&&function(e,t){p(e)&&(e=ws(e));for(const n in e){const i=e[n];let o;o=v(i)?"default"in i?Wo(i.from||n,i.default,!0):Wo(i.from||n):Wo(i),no(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[n]=o}}(u,o),a)for(const i in a){const e=a[i];f(e)&&(o[i]=e.bind(n))}if(s){const t=s.call(n,n);v(t)&&(e.data=zi(t))}if(gs=!0,r)for(const p in r){const e=r[p],t=f(e)?e.bind(n,n):f(e.get)?e.get.bind(n,n):i,s=!f(e)&&f(e.set)?e.set.bind(n):i,a=Ys({get:t,set:s});Object.defineProperty(o,p,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(const i in c)bs(c[i],o,n,i);function D(e,t){p(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(function(){if(l){const e=f(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(Gs){let n=Gs.provides;const i=Gs.parent&&Gs.parent.provides;i===n&&(n=Gs.provides=Object.create(i)),n[e]=t,"app"===Gs.type.mpType&&Gs.appContext.app.provide(e,t)}}(t,e[t])}))}}(),d&&ys(d,e,"c"),D(ts,h),D(ns,m),D(is,g),D(os,y),D(Xo,b),D(Jo,x),D(us,_),D(ls,T),D(cs,I),D(ss,k),D(rs,w),D(as,O),p(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===i&&(e.render=E),null!=R&&(e.inheritAttrs=R),P&&(e.components=P),M&&(e.directives=M),e.ctx.$onApplyOptions&&e.ctx.$onApplyOptions(t,e,n)}function ys(e,t,n){po(p(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function bs(e,t,n,i){const o=i.includes(".")?zo(n,i):()=>n[i];if(m(e)){const n=t[e];f(n)&&Fo(o,n)}else if(f(e))Fo(o,e.bind(n));else if(v(e))if(p(e))e.forEach((e=>bs(e,t,n,i)));else{const i=f(e.handler)?e.handler.bind(n):t[e.handler];f(i)&&Fo(o,i,e)}}function xs(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,a=s.get(t);let c;return a?c=a:o.length||n||i?(c={},o.length&&o.forEach((e=>Ss(c,e,r,!0))),Ss(c,t,r)):c=t,v(t)&&s.set(t,c),c}function Ss(e,t,n,i=!1){const{mixins:o,extends:s}=t;s&&Ss(e,s,n,!0),o&&o.forEach((t=>Ss(e,t,n,!0)));for(const r in t)if(i&&"expose"===r);else{const i=ks[r]||n&&n[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const ks={data:Cs,props:Is,emits:Is,methods:Ts,computed:Ts,beforeCreate:Es,created:Es,beforeMount:Es,mounted:Es,beforeUpdate:Es,updated:Es,beforeDestroy:Es,beforeUnmount:Es,destroyed:Es,unmounted:Es,activated:Es,deactivated:Es,errorCaptured:Es,serverPrefetch:Es,components:Ts,directives:Ts,watch:function(e,t){if(!e)return t;if(!t)return e;const n=a(Object.create(null),e);for(const i in t)n[i]=Es(e[i],t[i]);return n},provide:Cs,inject:function(e,t){return Ts(ws(e),ws(t))}};function Cs(e,t){return t?e?function(){return a(f(e)?e.call(this,this):e,f(t)?t.call(this,this):t)}:t:e}function ws(e){if(p(e)){const t={};for(let n=0;n{h=!0;const[t,n]=Rs(e,i,!0);a(l,t),n&&d.push(...n)};!o&&i.mixins.length&&i.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!h)return v(e)&&s.set(e,n),n;if(p(c))for(let n=0;n-1,i[1]=n<0||t-1||u(i,"default"))&&d.push(e)}}}const m=[l,d];return v(e)&&s.set(e,m),m}function Ps(e){return"$"!==e[0]&&!C(e)}function Ms(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Ns(e,t){return Ms(e)===Ms(t)}function Ds(e,t){return p(t)?t.findIndex((t=>Ns(t,e))):f(t)&&Ns(t,e)?0:-1}const Bs=Io;function Ls(e){return e?Vi(t=e)||Ki(t)||"__vInternal"in e?a({},e):e:null;var t}const js=$o();let Us=0;function Fs(e,n,i){const o=e.type,s=(n?n.appContext:e.appContext)||js,r={uid:Us++,vnode:e,type:o,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new Ln(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Rs(o,s),emitsOptions:Mo(o,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:o.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null,$uniElements:new Map,$templateUniElementRefs:[],$templateUniElementStyles:{},$eS:{},$eA:{}};return r.ctx={_:r},r.root=n?n.root:r,r.emit=Po.bind(null,r),e.ce&&e.ce(r),r}let Gs=null;const qs=()=>Gs||Do;let zs,Hs;zs=e=>{Gs=e},Hs=e=>{Ws=e};const $s=e=>{const t=Gs;return zs(e),e.scope.on(),()=>{e.scope.off(),zs(t)}},Vs=()=>{Gs&&Gs.scope.off(),zs(null)};function Ks(e){return 4&e.vnode.shapeFlag}let Ws=!1;function Xs(e,t=!1){t&&Hs(t);const{props:n}=e.vnode,i=Ks(e);_s(e,n,i,t);const o=i?function(e){const t=e.type;e.accessCache=Object.create(null),e.proxy=Ji(new Proxy(e.ctx,fs));const{setup:n}=t;if(n){const t=e.setupContext=n.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(oi(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,i=$s(e);Kn();const o=uo(n,e,0,[e.props,t]);Wn(),i(),y(o)?o.then(Vs,Vs):function(e,t){f(t)?e.render=t:v(t)&&(e.setupState=ao(t));Js(e)}(e,o)}else Js(e)}(e):void 0;return t&&Hs(!1),o}function Js(e,t,n){const o=e.type;e.render||(e.render=o.render||i);{const t=$s(e);Kn();try{vs(e)}finally{Wn(),t()}}}function Qs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ao(Ji(e.exposed)),{get:(t,n)=>n in t?t[n]:e.proxy[n],has:(e,t)=>t in e||t in ds}))}const Ys=(e,t)=>{const n=function(e,t,n=!1){let o,s;const r=f(e);return r?(o=e,s=i):(o=e.get,s=e.set),new Zi(o,s,r||!s,n)}(e,0,Ws);return n},Zs="3.4.21";function er(e){return so(e)}const tr="[object Array]",nr="[object Object]";function ir(e,t){const n={};return or(e,t),sr(e,t,"",n),n}function or(e,t){if((e=er(e))===t)return;const n=x(e),i=x(t);if(n==nr&&i==nr)for(let o in t){const n=e[o];void 0===n?e[o]=null:or(n,t[o])}else n==tr&&i==tr&&e.length>=t.length&&t.forEach(((t,n)=>{or(e[n],t)}))}function sr(e,t,n,i){if((e=er(e))===t)return;const o=x(e),s=x(t);if(o==nr)if(s!=nr||Object.keys(e).length{sr(e,s[t],(""==n?"":n+".")+r+"["+t+"]",i)}));else if(a==nr)if(c!=nr||Object.keys(o).length{sr(e,t[o],n+"["+o+"]",i)})):rr(i,n,e)}function rr(e,t,n){e[t]=n}function ar(e){const t=e.ctx.__next_tick_callbacks;if(t&&t.length){const e=t.slice(0);t.length=0;for(let t=0;t{t?uo(t.bind(e.proxy),e,14):i&&i(e.proxy)})),new Promise((e=>{i=e}))}function lr(e,t){const n=typeof(e=er(e));if("object"===n&&null!==e){let n=t.get(e);if(void 0!==n)return n;if(p(e)){const i=e.length;n=new Array(i),t.set(e,n);for(let o=0;o{i[e]=n[e]})),i}(o,s));Object.keys(r).length?(i.__next_tick_pending=!0,o.setData(r,(()=>{i.__next_tick_pending=!1,ar(e)})),_o()):ar(e)}}function dr(e,t,n){t.appContext.config.globalProperties.$applyOptions(e,t,n);const i=e.computed;if(i){const e=Object.keys(i);if(e.length){const n=t.ctx;n.$computedKeys||(n.$computedKeys=[]),n.$computedKeys.push(...e)}}delete t.ctx.$onApplyOptions}function hr(e,t=!1){const{setupState:n,$templateRefs:i,$templateUniElementRefs:o,ctx:{$scope:s,$mpPlatform:r}}=e;if("mp-alipay"===r)return;if(!s||!i&&!o)return;if(t)return i&&i.forEach((e=>fr(e,null,n))),void(o&&o.forEach((e=>fr(e,null,n))));const a="mp-baidu"===r||"mp-toutiao"===r,c=e=>{if(0===e.length)return[];const t=(s.selectAllComponents(".r")||[]).concat(s.selectAllComponents(".r-i-f")||[]);return e.filter((e=>{const i=function(e,t){const n=e.find((e=>e&&(e.properties||e.props).uI===t));if(n){const e=n.$vm;return e?Qs(e.$)||e:function(e){v(e)&&Ji(e);return e}(n)}return null}(t,e.i);return!(!a||null!==i)||(fr(e,i,n),!1)}))},l=()=>{if(i){const t=c(i);t.length&&e.proxy&&e.proxy.$scope&&e.proxy.$scope.setData({r1:1},(()=>{c(t)}))}};o&&o.length&&cr(e,(()=>{o.forEach((e=>{p(e.v)?e.v.forEach((t=>{fr(e,t,n)})):fr(e,e.v,n)}))})),s._$setRef?s._$setRef(l):cr(e,l)}function fr({r:e,f:t},n,i){if(f(e))e(n,{});else{const o=m(e),s=no(e);if(o||s)if(t){if(!s)return;p(e.value)||(e.value=[]);const t=e.value;if(-1===t.indexOf(n)){if(t.push(n),!n)return;n.$&&ss((()=>c(t,n)),n.$)}}else o?u(i,e)&&(i[e]=n):no(e)&&(e.value=n)}}const mr=Io;function gr(e,t){const n=e.component=Fs(e,t.parentComponent,null);return n.renderer=t.mpType?t.mpType:"component",n.ctx.$onApplyOptions=dr,n.ctx.$children=[],"app"===t.mpType&&(n.render=i),t.onBeforeSetup&&t.onBeforeSetup(n,t),Xs(n),t.parentComponent&&n.proxy&&t.parentComponent.ctx.$children.push(Qs(n)||n.proxy),function(e){const t=Sr.bind(e);e.$updateScopedSlots=()=>wo((()=>Eo(t)));const n=()=>{if(e.isMounted){const{next:t,bu:n,u:i}=e;kr(e,!1),xr(),n&&P(n),kr(e,!0),pr(e,yr(e)),i&&mr(i)}else ss((()=>{hr(e,!0)}),e),pr(e,yr(e))},o=e.effect=new Fn(n,i,(()=>Eo(s)),e.scope),s=e.update=()=>{o.dirty&&o.run()};s.id=e.uid,kr(e,!0),s()}(n),n.proxy}const vr=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t};function yr(e){const{type:t,vnode:n,proxy:i,withProxy:o,props:s,propsOptions:[r],slots:a,attrs:c,emit:l,render:u,renderCache:p,data:d,setupState:h,ctx:f,uid:m,appContext:{app:{config:{globalProperties:{pruneComponentPropsCache:g}}}},inheritAttrs:v}=e;let y;e.$uniElementIds=new Map,e.$templateRefs=[],e.$templateUniElementRefs=[],e.$templateUniElementStyles={},e.$ei=0,g(m),e.__counter=0===e.__counter?1:0;const b=Bo(e);try{if(4&n.shapeFlag){br(v,s,r,c);const e=o||i;y=u.call(e,e,p,s,h,d,f)}else{br(v,s,r,t.props?c:vr(c));const e=t;y=e.length>1?e(s,{attrs:c,slots:a,emit:l}):e(s,null)}}catch(x){ho(x,e,1),y=!1}return hr(e),Bo(b),y}function br(e,t,n,i){if(t&&i&&!1!==e){const e=Object.keys(i).filter((e=>"class"!==e&&"style"!==e));if(!e.length)return;n&&e.some(r)?e.forEach((e=>{r(e)&&e.slice(9)in n||(t[e]=i[e])})):e.forEach((e=>t[e]=i[e]))}}const xr=e=>{Kn(),_o(),Wn()};function Sr(){const e=this.$scopedSlotsData;if(!e||0===e.length)return;const t=this.ctx.$scope,n=t.data,i=Object.create(null);e.forEach((({path:e,index:t,data:o})=>{const s=ve(n,e),r=m(t)?`${e}.${t}`:`${e}[${t}]`;if(void 0===s||void 0===s[t])i[r]=o;else{const e=ir(o,s[t]);Object.keys(e).forEach((t=>{i[r+"."+t]=e[t]}))}})),e.length=0,Object.keys(i).length&&t.setData(i)}function kr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}const Cr=function(e,t=null){f(e)||(e=a({},e)),null==t||v(t)||(t=null);const n=$o(),i=new WeakSet,o=n.app={_uid:Vo++,_component:e,_props:t,_container:null,_context:n,_instance:null,version:Zs,get config(){return n.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&f(e.install)?(i.add(e),e.install(o,...t)):f(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(n.mixins.includes(e)||n.mixins.push(e),o),component:(e,t)=>t?(n.components[e]=t,o):n.components[e],directive:(e,t)=>t?(n.directives[e]=t,o):n.directives[e],mount(){},unmount(){},provide:(e,t)=>(n.provides[e]=t,o),runWithContext(e){const t=Ko;Ko=o;try{return e()}finally{Ko=t}}};return o};function wr(e,t=null){("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof my?my:void 0).__VUE__=!0;const n=Cr(e,t),o=n._context;o.config.globalProperties.$nextTick=function(e){return cr(this.$,e)};const s=e=>(e.appContext=o,e.shapeFlag=6,e),r=function(e,t){return gr(s(e),t)},a=function(e){return e&&function(e){const{bum:t,scope:n,update:i,um:o}=e;t&&P(t);{const t=e.parent;if(t){const n=t.ctx.$children,i=Qs(e)||e.proxy,o=n.indexOf(i);o>-1&&n.splice(o,1)}}n.stop(),i&&(i.active=!1),o&&mr(o),mr((()=>{e.isUnmounted=!0}))}(e.$)};return n.mount=function(){e.render=i;const t=gr(s({type:e}),{mpType:"app",mpInstance:null,parentComponent:null,slots:[],props:null});return n._instance=t.$,t.$app=n,t.$createComponent=r,t.$destroyComponent=a,o.$appInstance=t,t},n.unmount=function(){},n}function Er(e,t,n,i){f(t)&&Zo(e,t.bind(n),i)}function Tr(e,t,n){!function(e,t,n){const i=e.mpType||n.$mpType;!i||"component"===i||"page"===i&&"component"===t.renderer||Object.keys(e).forEach((i=>{if(Ee(i,e[i],!1)){const o=e[i];p(o)?o.forEach((e=>Er(i,e,n,t))):Er(i,o,n,t)}}))}(e,t,n)}function Ir(e,t,n){return e[t]=n}function _r(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function Or(e){const t=e.config.errorHandler;return function(n,i,o){t&&t(n,i,o);const s=e._instance;if(!s||!s.proxy)throw n;s[$]?s.proxy.$callHook($,n):fo(n,0,i&&i.$.vnode,!1)}}function Ar(e,t){return e?[...new Set([].concat(e,t))]:t}let Rr;const Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Mr=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Nr(){const e=Nn.getStorageSync("uni_id_token")||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((i=t[1],decodeURIComponent(Rr(i).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(o){throw new Error("获取当前用户信息出错,详细错误信息为:"+o.message)}var i;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}function Dr(e){const t=e.config;var n;t.errorHandler=_e(e,Or),n=t.optionMergeStrategies,Ce.forEach((e=>{n[e]=Ar}));const i=t.globalProperties;!function(e){e.uniIDHasRole=function(e){const{role:t}=Nr();return t.indexOf(e)>-1},e.uniIDHasPermission=function(e){const{permission:t}=Nr();return this.uniIDHasRole("admin")||t.indexOf(e)>-1},e.uniIDTokenValid=function(){const{tokenExpired:e}=Nr();return e>Date.now()}}(i),i.$set=Ir,i.$applyOptions=Tr,i.$callMethod=_r,Nn.invokeCreateVueAppHook(e)}Rr="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Mr.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,i,o="",s=0;s>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}:atob;const Br=Object.create(null);function Lr(e){delete Br[e]}function jr(e){if(!e)return;const[t,n]=e.split(",");return Br[t]?Br[t][parseInt(n)]:void 0}var Ur={install(e){Dr(e),e.config.globalProperties.pruneComponentPropsCache=Lr;const t=e.mount;e.mount=function(n){const i=t.call(e,n),o=function(){const e="createApp";if("undefined"!=typeof global&&void 0!==global[e])return global[e];if("undefined"!=typeof my)return my[e]}();return o?o(i):"undefined"!=typeof createMiniProgramApp&&createMiniProgramApp(i),i}}};function Fr(e){return m(e)?e:function(e){let t="";if(!e||m(e))return t;for(const n in e)t+=`${n.startsWith("--")?n:_(n)}:${e[n]};`;return t}(N(e))}function Gr(e,t){const n=qs(),o=n.ctx,s=void 0===t||"mp-weixin"!==o.$mpPlatform&&"mp-qq"!==o.$mpPlatform&&"mp-xhs"!==o.$mpPlatform||!m(t)&&"number"!=typeof t?"":"_"+t,r="e"+n.$ei+++s,c=o.$scope;if(!e)return delete c[r],r;const l=c[r];return l?l.value=e:c[r]=function(e,t){const n=e=>{var o;(o=e).type&&o.target&&(o.preventDefault=i,o.stopPropagation=i,o.stopImmediatePropagation=i,u(o,"detail")||(o.detail={}),u(o,"markerId")&&(o.detail="object"==typeof o.detail?o.detail:{},o.detail.markerId=o.markerId),S(o.detail)&&u(o.detail,"checked")&&!u(o.detail,"value")&&(o.detail.value=o.detail.checked),S(o.detail)&&(o.target=a({},o.target,o.detail)));let s=[e];t&&t.ctx.$getTriggerEventDetail&&"number"==typeof e.detail&&(e.detail=t.ctx.$getTriggerEventDetail(e.detail)),e.detail&&e.detail.__args__&&(s=e.detail.__args__);const r=n.value,c=()=>po(function(e,t){if(p(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n&&n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,r),t,5,s),l=e.target,d=!!l&&(!!l.dataset&&"true"===String(l.dataset.eventsync));if(!qr.includes(e.type)||d){const t=c();if("input"===e.type&&(p(t)||y(t)))return;return t}setTimeout(c)};return n.value=e,n}(e,n),r}const qr=["tap","longpress","longtap","transitionend","animationstart","animationiteration","animationend","touchforcechange"];const zr=function(e,t=null){return e&&(e.mpType="app"),wr(e,t).use(Ur)};const Hr=["externalClasses"];const $r=/_(.*)_worklet_factory_/;function Vr(e,t){const n=e.$children;for(let o=n.length-1;o>=0;o--){const e=n[o];if(e.$scope._$vueId===t)return e}let i;for(let o=n.length-1;o>=0;o--)if(i=Vr(n[o],t),i)return i}const Kr=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Wr(e,t){const n=e.ctx;n.mpType=t.mpType,n.$mpType=t.mpType,n.$mpPlatform="mp-weixin",n.$scope=t.mpInstance,Object.defineProperties(n,{[me]:{get(){const e=this.$scope.data[me];return void 0===e?"":e}}}),n.$mp={},n._self={},e.slots={},p(t.slots)&&t.slots.length&&(t.slots.forEach((t=>{e.slots[t]=!0})),e.slots.d&&(e.slots.default=!0)),n.getOpenerEventChannel=function(){return t.mpInstance.getOpenerEventChannel()},n.$hasHook=Xr,n.$callHook=Jr,e.emit=function(e,t){return function(n,...i){const o=t.$scope;if(o&&n){const e={__args__:i};o.triggerEvent(n,e)}return e.apply(this,[n,...i])}}(e.emit,n)}function Xr(e){const t=this.$[e];return!(!t||!t.length)}function Jr(e,t){"mounted"===e&&(Jr.call(this,"bm"),this.$.isMounted=!0,e="m");const n=this.$[e];return n&&((e,t)=>{let n;for(let i=0;i{Ee(n,e[n])&&t.add(n)}));{const{extends:n,mixins:i}=e;i&&i.forEach((e=>Yr(e,t))),n&&Yr(n,t)}}return t}function Zr(e,t,n){-1!==n.indexOf(t)||u(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.$callHook(t,e)})}const ea=[J];function ta(e,t,n=ea){t.forEach((t=>Zr(e,t,n)))}function na(e,t,n=ea){Yr(t).forEach((t=>Zr(e,t,n)))}const ia=ge((()=>{const e=[],t=f(getApp)&&getApp({allowDefault:!0});if(t&&t.$vm&&t.$vm.$){const n=t.$vm.$.appContext.mixins;if(p(n)){const t=Object.keys(we);n.forEach((n=>{t.forEach((t=>{u(n,t)&&!e.includes(t)&&e.push(t)}))}))}}return e}));const oa=[q,z,$,V,K,W];function sa(e,t){const n=e.$,i={globalData:e.$options&&e.$options.globalData||{},$vm:e,onLaunch(t){this.$vm=e;const i=n.ctx;this.$vm&&i.$scope&&i.$callHook||(Wr(n,{mpType:"app",mpInstance:this,slots:[]}),i.globalData=this.globalData,e.$callHook(H,t))}},o=wx.$onErrorHandlers;o&&(o.forEach((e=>{Zo($,e,n)})),o.length=0),function(e){const t=io(function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=Fe(n&&n.language?n.language:Be)||Be}return t}());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(e);const s=e.$.type;ta(i,oa),na(i,s);{const e=s.methods;e&&a(i,e)}return i}function ra(e,t){if(f(e.onLaunch)){const t=wx.getLaunchOptionsSync&&wx.getLaunchOptionsSync();e.onLaunch(t)}f(e.onShow)&&wx.onAppShow&&wx.onAppShow((e=>{t.$callHook("onShow",e)})),f(e.onHide)&&wx.onAppHide&&wx.onAppHide((e=>{t.$callHook("onHide",e)}))}const aa=["eO","uR","uRIF","uI","uT","uP","uS"];function ca(e){e.properties||(e.properties={}),a(e.properties,function(e,t=!1){const n={};if(!t){let e=function(e){const t=Object.create(null);e&&e.forEach((e=>{t[e]=!0})),this.setData({$slots:t})};aa.forEach((e=>{n[e]={type:null,value:""}})),n.uS={type:null,value:[]},n.uS.observer=e}return e.behaviors&&e.behaviors.includes("wx://form-field")&&(e.properties&&e.properties.name||(n.name={type:null,value:""}),e.properties&&e.properties.value||(n.value={type:null,value:""})),n}(e),function(e){const t={};return e&&e.virtualHost&&(t.virtualHostStyle={type:null,value:""},t.virtualHostClass={type:null,value:""},t.virtualHostHidden={type:null,value:""},t[me]={type:null,value:""}),t}(e.options))}const la=[String,Number,Boolean,Object,Array,null];function ua(e,t){const n=function(e){return p(e)&&1===e.length?e[0]:e}(e);return-1!==la.indexOf(n)?n:null}function pa(e,t){return(t?function(e){const t={};S(e)&&Object.keys(e).forEach((n=>{-1===aa.indexOf(n)&&(t[n]=e[n])}));return t}(e):jr(e.uP))||{}}function da(e){const t=function(){const e=this.properties.uP;e&&(this.$vm?function(e,t){const n=Xi(t.props),i=jr(e)||{};ha(n,i)&&(!function(e,t,n,i){const{props:o,attrs:s,vnode:{patchFlag:r}}=e,a=Xi(o),[c]=e.propsOptions;let l=!1;if(!(i||r>0)||16&r){let i;Os(e,t,o,s)&&(l=!0);for(const s in a)t&&(u(t,s)||(i=_(s))!==s&&u(t,i))||(c?!n||void 0===n[s]&&void 0===n[i]||(o[s]=As(c,a,s,void 0,e,!0)):delete o[s]);if(s!==a)for(const e in s)t&&u(t,e)||(delete s[e],l=!0)}else if(8&r){const n=e.vnode.dynamicProps;for(let i=0;i-1&&function(e){const t=vo.indexOf(e);t>yo&&vo.splice(t,1)}(t.update),t.update());var o}(e,this.$vm.$):"m"===this.properties.uT&&function(e,t){const n=t.properties,i=jr(e)||{};ha(n,i,!1)&&t.setData(i)}(e,this))};e.observers||(e.observers={}),e.observers.uP=t}function ha(e,t,n=!0){const i=Object.keys(t);if(n&&i.length!==Object.keys(e).length)return!0;for(let o=0;o{i.push(e.replace("uni://","wx://")),"uni://form-field"===e&&(p(n)?(n.push("name"),n.push("modelValue")):(n.name={type:String,default:""},n.modelValue={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),i}(t)}function ma(e,{parse:t,mocks:n,isPage:i,isPageInProject:o,initRelation:s,handleLink:r,initLifetimes:c}){e=e.default||e;const l={multipleSlots:!0,addGlobalClass:!0,pureDataPattern:/^uP$/};p(e.mixins)&&e.mixins.forEach((e=>{v(e.options)&&a(l,e.options)})),e.options&&a(l,e.options);const d={options:l,lifetimes:c({mocks:n,isPage:i,initRelation:s,vueOptions:e}),pageLifetimes:{show(){this.$vm&&this.$vm.$callHook("onPageShow")},hide(){this.$vm&&this.$vm.$callHook("onPageHide")},resize(e){this.$vm&&this.$vm.$callHook("onPageResize",e)}},methods:{__l:r}};var h,f,m,g;return fa(d,e),ca(d),da(d),function(e,t){Hr.forEach((n=>{u(t,n)&&(e[n]=t[n])}))}(d,e),h=d.methods,f=e.wxsCallMethods,p(f)&&f.forEach((e=>{h[e]=function(t){return this.$vm[e](t)}})),m=d.methods,(g=e.methods)&&Object.keys(g).forEach((e=>{const t=e.match($r);if(t){const n=t[1];m[e]=g[e],m[n]=g[n]}})),t&&t(d,{handleLink:r}),d}let ga,va;function ya(){return getApp().$vm}function ba(e,t){const{parse:n,mocks:i,isPage:o,initRelation:s,handleLink:r,initLifetimes:a}=t,c=ma(e,{mocks:i,isPage:o,isPageInProject:!0,initRelation:s,handleLink:r,initLifetimes:a});!function({properties:e},t){p(t)?t.forEach((t=>{e[t]={type:String,value:""}})):S(t)&&Object.keys(t).forEach((n=>{const i=t[n];if(S(i)){let t=i.default;f(t)&&(t=t());const o=i.type;i.type=ua(o),e[n]={type:i.type,value:t}}else e[n]={type:ua(i)}}))}(c,(e.default||e).props);const l=c.methods;return l.onLoad=function(e){var t;return this.options=e,this.$page={fullPath:(t=this.route+Se(e),function(e){return 0===e.indexOf("/")}(t)?t:"/"+t)},this.$vm&&this.$vm.$callHook(X,e)},ta(l,Qr),na(l,e),function(e,t){if(!t)return;Object.keys(we).forEach((n=>{t&we[n]&&Zr(e,n,[])}))}(l,e.__runtimeHooks),ta(l,ia()),n&&n(c,{handleLink:r}),c}const xa=Page,Sa=Component;function ka(e){const t=e.triggerEvent,n=function(n,...i){return t.apply(e,[(o=n,T(o.replace(be,"-"))),...i]);var o};try{e.triggerEvent=n}catch(i){e._triggerEvent=n}}function Ca(e,t,n){const i=t[e];t[e]=i?function(...e){return ka(this),i.apply(this,e)}:function(){ka(this)}}Page=function(e){return Ca(X,e),xa(e)},Component=function(e){Ca("created",e);return e.properties&&e.properties.uP||(ca(e),da(e)),Sa(e)};var wa=Object.freeze({__proto__:null,handleLink:function(e){const t=e.detail||e.value,n=t.vuePid;let i;n&&(i=Vr(this.$vm,n)),i||(i=this.$vm),t.parent=i},initLifetimes:function({mocks:e,isPage:t,initRelation:n,vueOptions:i}){return{attached(){let o=this.properties;!function(e,t){if(!e)return;const n=e.split(","),i=n.length;1===i?t._$vueId=n[0]:2===i&&(t._$vueId=n[0],t._$vuePid=n[1])}(o.uI,this);const s={vuePid:this._$vuePid};n(this,s);const r=this,a=t(r);let c=o;this.$vm=function(e,t){ga||(ga=ya().$createComponent);const n=ga(e,t);return Qs(n.$)||n}({type:i,props:pa(c,a)},{mpType:a?"page":"component",mpInstance:r,slots:o.uS||{},parentComponent:s.parent&&s.parent.$,onBeforeSetup(t,n){!function(e,t){Object.defineProperty(e,"refs",{get(){const e={};return function(e,t,n){e.selectAllComponents(t).forEach((e=>{const t=e.properties.uR;n[t]=e.$vm||e}))}(t,".r",e),t.selectAllComponents(".r-i-f").forEach((t=>{const n=t.properties.uR;n&&(e[n]||(e[n]=[]),e[n].push(t.$vm||t))})),e}})}(t,r),function(e,t,n){const i=e.ctx;n.forEach((n=>{u(t,n)&&(e[n]=i[n]=t[n])}))}(t,r,e),function(e,t){Wr(e,t);const n=e.ctx;Kr.forEach((e=>{n[e]=function(...t){const i=n.$scope;if(i&&i[e])return i[e].apply(i,t)}}))}(t,n)}}),a||function(e){const t=e.$options;p(t.behaviors)&&t.behaviors.includes("uni://form-field")&&e.$watch("modelValue",(()=>{e.$scope&&e.$scope.setData({name:e.name,value:e.modelValue})}),{immediate:!0})}(this.$vm)},ready(){this.$vm&&(this.$vm.$callHook("mounted"),this.$vm.$callHook(J))},detached(){var e;this.$vm&&(Lr(this.$vm.$.uid),e=this.$vm,va||(va=ya().$destroyComponent),va(e))}}},initRelation:function(e,t){e.triggerEvent("__l",t)},isPage:function(e){return!!e.route},mocks:["__route__","__wxExparserNodeId__","__wxWebviewId__"]});const Ea=function(e){return App(sa(e))},Ta=(Ia=wa,function(e){return Component(ba(e,Ia))});var Ia;const _a=function(e){return function(t){return Component(ma(t,e))}}(wa),Oa=function(e){ra(sa(e),e)},Aa=function(e){const t=sa(e),n=f(getApp)&&getApp({allowDefault:!0});if(!n)return;e.$.ctx.$scope=n;const i=n.globalData;i&&Object.keys(t.globalData).forEach((e=>{u(i,e)||(i[e]=t.globalData[e])})),Object.keys(t).forEach((e=>{u(n,e)||(n[e]=t[e])})),ra(t,e)};wx.createApp=global.createApp=Ea,wx.createPage=Ta,wx.createComponent=_a,wx.createPluginApp=global.createPluginApp=Oa,wx.createSubpackageApp=global.createSubpackageApp=Aa; /*! * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT */ -let Ar;const Lr=e=>Ar=e,Pr=Symbol();function Nr(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var wr,Ur;(Ur=wr||(wr={})).direct="direct",Ur.patchObject="patch object",Ur.patchFunction="patch function";const Gr=()=>{};function xr(e,t,n,i=Gr){e.push(t);const o=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),i())};return!n&&Fn()&&function(e){wn&&wn.cleanups.push(e)}(o),o}function Fr(e,...t){e.slice().forEach((e=>{e(...t)}))}const Br=e=>e();function qr(e,t){e instanceof Map&&t instanceof Map&&t.forEach(((t,n)=>e.set(n,t))),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const i=t[n],o=e[n];Nr(o)&&Nr(i)&&e.hasOwnProperty(n)&&!no(i)&&!zi(i)?e[n]=qr(o,i):e[n]=i}return e}const Vr=Symbol();const{assign:jr}=Object;function Hr(e,t,n,i){const{state:o,actions:s,getters:a}=t,r=n.state.value[e];let c;return c=Kr(e,(function(){r||(n.state.value[e]=o?o():{});const t=function(e){const t=d(e)?new Array(e.length):{};for(const n in e)t[n]=uo(e,n);return t}(n.state.value[e]);return jr(t,s,Object.keys(a||{}).reduce(((t,i)=>(t[i]=Ji(Qs((()=>{Lr(n);const t=n._s.get(e);return a[i].call(t,t)}))),t)),{}))}),t,n,i,!0),c}function Kr(e,t,n={},i,o,s){let a;const r=jr({actions:{}},n),c={deep:!0};let u,l,d,p=[],h=[];const g=i.state.value[e];let f;function m(t){let n;u=l=!1,"function"==typeof t?(t(i.state.value[e]),n={type:wr.patchFunction,storeId:e,events:d}):(qr(i.state.value[e],t),n={type:wr.patchObject,payload:t,storeId:e,events:d});const o=f=Symbol();Eo().then((()=>{f===o&&(u=!0)})),l=!0,Fr(p,n,i.state.value[e])}s||g||(i.state.value[e]={}),io({});const _=s?function(){const{state:e}=n,t=e?e():{};this.$patch((e=>{jr(e,t)}))}:Gr;function v(t,n){return function(){Lr(i);const o=Array.from(arguments),s=[],a=[];let r;Fr(h,{args:o,name:t,store:y,after:function(e){s.push(e)},onError:function(e){a.push(e)}});try{r=n.apply(this&&this.$id===e?this:y,o)}catch(c){throw Fr(a,c),c}return r instanceof Promise?r.then((e=>(Fr(s,e),e))).catch((e=>(Fr(a,e),Promise.reject(e)))):(Fr(s,r),r)}}const y=ji({_p:i,$id:e,$onAction:xr.bind(null,h),$patch:m,$reset:_,$subscribe(t,n={}){const o=xr(p,t,n.detached,(()=>s())),s=a.run((()=>Bo((()=>i.state.value[e]),(i=>{("sync"===n.flush?l:u)&&t({storeId:e,type:wr.direct,events:d},i)}),jr({},c,n))));return o},$dispose:function(){a.stop(),p=[],h=[],i._s.delete(e)}});i._s.set(e,y);const I=(i._a&&i._a.runWithContext||Br)((()=>i._e.run((()=>(a=xn()).run(t)))));for(const S in I){const t=I[S];if(no(t)&&(!no(C=t)||!C.effect)||zi(t))s||(!g||Nr(M=t)&&M.hasOwnProperty(Vr)||(no(t)?t.value=g[S]:qr(t,g[S])),i.state.value[e][S]=t);else if("function"==typeof t){const e=v(S,t);I[S]=e,r.actions[S]=t}}var M,C;return jr(y,I),jr($i(y),I),Object.defineProperty(y,"$state",{get:()=>i.state.value[e],set:e=>{m((t=>{jr(t,e)}))}}),i._p.forEach((e=>{jr(y,a.run((()=>e({store:y,app:i._a,pinia:i,options:r}))))})),g&&s&&n.hydrate&&n.hydrate(y.$state,g),u=!0,l=!0,y}var zr,Wr,Yr;(Yr=zr||(zr={})).UNIAPP="uniapp",Yr.REACT_NATIVE="rn",Yr.COCOS="cocos",Yr.UNKNOWN="unknown";let $r=class e{constructor(){this.framework=null,this.methods={[zr.UNIAPP]:this.isUniApp,[zr.REACT_NATIVE]:this.isReactNative,[zr.COCOS]:this.isCocos};const e=this.methods,t=Object.keys(e);for(const n of t)if((0,e[n])()){this.framework=n;break}this.framework=this.framework||zr.UNKNOWN,this.framework}static currentFramework(){return this.instance||(this.instance=new e),this.instance.framework}isUniApp(){try{return"function"==typeof Nn.getSystemInfoSync}catch(Yr){return!1}}isReactNative(){try{return"object"==typeof navigator&&"ReactNative"===navigator.product}catch(Yr){return!1}}isTaro(){try{return void 0!==process.env.TARO_ENV}catch(Yr){return!1}}isCocos(){try{return void 0!==cc.sys.localStorage}catch(Yr){return!1}}},Jr=class{static init(e){$r.currentFramework()===zr.REACT_NATIVE&&(this.validate(e),this.platform=e.platform,this.asyncStorage=e.asyncStorage)}static validate(e){if(!e)throw new Error("'reactNativeOptions' is missing when calling GoEasy.getInstance()");if(!e.platform)throw new Error("'platform' is missing in GoEasy 'reactNativeOptions'");if(!e.asyncStorage)throw new Error("'asyncStorage' is missing in GoEasy 'reactNativeOptions'")}};!function(e){e.DISCONNECTED="disconnected",e.DISCONNECTING="disconnecting",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.RECONNECTED="reconnected",e.EXPIRED_RECONNECTED="reconnected",e.CONNECT_FAILED="connect_failed"}(Wr||(Wr={}));const Xr="2.13.17";var Qr,Zr;!function(e){e.PRIVATE="private",e.GROUP="group",e.SYSTEM="system",e.CS="cs"}(Qr||(Qr={})),function(e){e.NEW="new",e.SENDING="sending",e.SUCCESS="success",e.FAIL="fail"}(Zr||(Zr={}));let ec=class{},tc=class{constructor(e,t){this.id=e,this.data=t}},nc=new class{isDef(e){return!this.isUndef(e)}isUndef(e){return null==e}isPrimitive(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}isObject(e){return null!==e&&"object"==typeof e}isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}isValidArrayIndex(e){let t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}isString(e){return"string"==typeof e}isNumber(e){return"number"==typeof e}isStringOrNumber(e){return this.isString(e)||this.isNumber(e)}isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}isEmpty(e){return this.isArray(e)?0===e.length:this.isObject(e)?!this.isDef(e):!this.isNumber(e)&&(this.isString(e)?""===e.trim():!this.isDef(e))}isNative(e){return"function"==typeof e&&/native code/.test(e.toString())}isFunction(e){return"function"==typeof e}isBoolean(e){return"boolean"==typeof e}isTrue(e){return!0===e}isFalse(e){return!1===e}isNull(e){return null===e}};var ic;!function(e){e.MP_WX="mp-wx",e.MP_WGAME="mp-wgame",e.MP_BYTE="mp-byte",e.MP_BAIDU="mp-baidu",e.MP_ALI="mp-ali",e.BROWSER="browser",e.NODE="node",e.UNI_IOS="uni-ios",e.UNI_ANDROID="uni-android",e.COCOS_IOS="cocos-ios",e.COCOS_ANDROID="cocos-android",e.RN_IOS="rn-ios",e.RN_ANDROID="rn-android",e.UNKNOWN="unknown"}(ic||(ic={}));let oc=class e{constructor(){this.platform=null,this.methods={[ic.BROWSER]:this.isBrowser,[ic.MP_WX]:this.isMPWX,[ic.MP_WGAME]:this.isMPWeGame,[ic.MP_BYTE]:this.isMPByte,[ic.MP_BAIDU]:this.isMPBaidu,[ic.MP_ALI]:this.isMPAli,[ic.NODE]:this.isNode,[ic.UNI_IOS]:this.isUniAppIOS,[ic.UNI_ANDROID]:this.isUniAppAndroid,[ic.COCOS_IOS]:this.isCocosIOS,[ic.COCOS_ANDROID]:this.isCocosAndroid,[ic.RN_IOS]:this.isRNiOS,[ic.RN_ANDROID]:this.isRNAndroid};const e=this.methods,t=Object.keys(e);for(const n of t)if((0,e[n])()){this.platform=n;break}this.platform=this.platform||ic.UNKNOWN,this.platform}static currentPlatform(){return this.instance||(this.instance=new e),e.instance.platform}isBrowser(){return"undefined"!=typeof navigator&&"Taro"!==navigator.product&&"ReactNative"!==navigator.product&&"undefined"==typeof GameGlobal&&("undefined"==typeof cc||null!==cc.sys.browserType)&&"undefined"==typeof my&&"undefined"==typeof tt&&"undefined"==typeof swan}isMPWX(){return"object"==typeof Pn&&"function"==typeof Pn.getSystemInfoSync&&"undefined"==typeof WebSocket&&"undefined"==typeof XMLHttpRequest&&"undefined"==typeof plus&&"undefined"==typeof tt}isMPWeGame(){return"object"==typeof GameGlobal}isMPByte(){return"object"==typeof tt&&"function"==typeof tt.getSystemInfoSync}isMPBaidu(){return"object"==typeof swan&&"function"==typeof swan.getSystemInfoSync}isMPAli(){return"object"==typeof my&&"function"==typeof my.getSystemInfoSync}isNode(){try{return"node"===process.release.name}catch(Yr){return!1}}isUniAppIOS(){try{return"ios"===Nn.getSystemInfoSync().platform&&"app"===Nn.getSystemInfoSync().uniPlatform}catch(Yr){return!1}}isUniAppAndroid(){try{return"android"===Nn.getSystemInfoSync().platform&&"app"===Nn.getSystemInfoSync().uniPlatform}catch(Yr){return!1}}isCocosIOS(){try{return"iOS"===cc.sys.os}catch(Yr){return!1}}isCocosAndroid(){try{return"Android"===cc.sys.os}catch(Yr){return!1}}isRNiOS(){try{return"ios"===Jr.platform.OS}catch(Yr){return!1}}isRNAndroid(){try{return"android"===Jr.platform.OS}catch(Yr){return!1}}},sc=class{};sc.type=ic,sc.current=oc.currentPlatform();let ac=class{onFrontend(e){this.onFrontendCallback=e}},rc=class extends ac{constructor(){super(...arguments),this.runningBackend=!1}startCheck(){"object"==typeof plus&&(plus.globalEvent.addEventListener("resume",(()=>{this.runningBackend=!1,this.runningBackend,this.onFrontendCallback&&this.onFrontendCallback()}),!1),plus.globalEvent.addEventListener("pause",(()=>{this.runningBackend=!0,this.runningBackend}),!1))}isBackend(){return this.runningBackend}support(){const e=oc.currentPlatform();return[ic.UNI_IOS,ic.UNI_ANDROID].includes(e)}},uc=class extends ac{constructor(){super(...arguments),this.runningBackend=!1}startCheck(){Pn.onAppShow((()=>{this.runningBackend=!1})),Pn.onAppHide((()=>{this.runningBackend=!0}))}isBackend(){return this.runningBackend}support(){return oc.currentPlatform()===ic.MP_WX}};const lc=new class{constructor(){[new rc,new uc].forEach((e=>{if(e.support())return this.checker=e,void this.checker.startCheck()}))}isBackend(){return this.checker&&this.checker.isBackend()}onFrontend(e){this.checker.onFrontend(e)}};var dc,pc,hc=Object.freeze({__proto__:null,runStatus:lc});!function(e){e.authorize="authorize",e.manualDisconnect="manualDisconnect",e.subscribe="subscribe",e.unsubscribe="unsubscribe",e.publish="publish",e.ack="ack",e.historyMessages="historyMessages",e.hereNow="hereNow",e.hereNowByUserIds="hereNowByUserIds",e.PUBSUB_PRESENCE_SUBSCRIBE="PUBSUB_PRESENCE_SUBSCRIBE",e.PUBSUB_PRESENCE_UNSUBSCRIBE="PUBSUB_PRESENCE_UNSUBSCRIBE",e.PUBSUB_PRESENCE_HERENOW="PUBSUB_PRESENCE_HERENOW",e.imLastConversations="imLastConversations",e.markPrivateMessageAsRead="markPrivateMessageAsRead",e.markGroupMessageAsRead="markGroupMessageAsRead",e.imGroupOnlineCount="imGroupOnlineCount",e.imHereNow="imHereNow",e.imGroupHereNow="imGroupHereNow",e.publishIM="publishIM",e.subscribeUserPresence="subscribeUserPresence",e.unsubscribeUserPresence="unsubscribeUserPresence",e.subscribeGroupPresence="subscribeGroupPresence",e.unsubscribeGroupPresence="unsubscribeGroupPresence",e.removeConversation="removeConversation",e.topConversation="topConversation",e.imData="imData",e.subscribeGroups="subscribeGroups",e.unsubscribeGroup="unsubscribeGroup",e.IM_DELETE_MESSAGE="IM_DELETE_MESSAGE",e.IM_HISTORY="IM_HISTORY",e.IM_HISTORY_CHANGE="IM_HISTORY_CHANGE",e.IM_RECALL_MESSAGE="IM_RECALL_MESSAGE",e.IM_MARK_AS_READ="IM_MARK_AS_READ",e.CS_PENDING_CONVERSATION="CS_PENDING_CONVERSATION",e.CS_ACCEPT="CS_ACCEPT",e.CS_END="CS_END",e.CS_TRANSFER="CS_TRANSFER",e.CS_AGENTS="CS_AGENTS",e.CS_CUSTOMER_STATUS="CS_CUSTOMER_STATUS",e.CS_MY_TEAMS="CS_MY_TEAMS",e.CS_ONLINE="CS_ONLINE",e.CS_OFFLINE="CS_OFFLINE",e.CS_LIVE_SESSION="CS_LIVE_SESSION",e.CS_QUIT_LIVE="CS_QUIT_LIVE",e.SET_IOS_BADGE="SET_IOS_BADGE",e.MD_CMD="MD_CMD"}(dc||(dc={})),function(e){e[e.connect=3e3]="connect",e[e.reconnectionDelayMax=3e3]="reconnectionDelayMax",e[e.commonQuerySingle=2500]="commonQuerySingle",e[e.commonQueryTotal=12e3]="commonQueryTotal",e[e.commonRequestSingle=1700]="commonRequestSingle",e[e.commonRequestTotal=12e3]="commonRequestTotal",e[e.commonInfiniteSingle=1700]="commonInfiniteSingle",e[e.commonInfiniteTotal=864e5]="commonInfiniteTotal"}(pc||(pc={}));let gc=class{static onSuccess(e,t){nc.isFunction(e.onSuccess)&&e.onSuccess(t)}static onFailed(e,t){if(!nc.isObject(e)||!nc.isFunction(e.onFailed))throw t;e.onFailed(t)}};function fc(e,t,n,i){return new(n||(n=Promise))((function(o,s){function a(e){try{c(i.next(e))}catch(t){s(t)}}function r(e){try{c(i.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,r)}c((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var mc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _c(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),t}var vc={exports:{}};!function(){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}vc.exports=e,e.prototype.on=e.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},e.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o>>((3&t)<<3)&255;return Sc}}for(var Ec=[],Tc=0;Tc<256;++Tc)Ec[Tc]=(Tc+256).toString(16).substr(1);var kc,Dc,Rc=function(e,t){var n=t||0,i=Ec;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")},Oc=Ic.exports,bc=Rc,Ac=0,Lc=0,Pc=Ic.exports,Nc=Rc,wc=function(e,t,n){var i=t&&n||0,o=t||[],s=(e=e||{}).node||kc,a=void 0!==e.clockseq?e.clockseq:Dc;if(null==s||null==a){var r=Oc();null==s&&(s=kc=[1|r[0],r[1],r[2],r[3],r[4],r[5]]),null==a&&(a=Dc=16383&(r[6]<<8|r[7]))}var c=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:Lc+1,l=c-Ac+(u-Lc)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>Ac)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ac=c,Lc=u,Dc=a;var d=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;o[i++]=d>>>24&255,o[i++]=d>>>16&255,o[i++]=d>>>8&255,o[i++]=255&d;var p=c/4294967296*1e4&268435455;o[i++]=p>>>8&255,o[i++]=255&p,o[i++]=p>>>24&15|16,o[i++]=p>>>16&255,o[i++]=a>>>8|128,o[i++]=255&a;for(var h=0;h<6;++h)o[i+h]=s[h];return t||bc(o)},Uc=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Pc)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||Nc(o)},Gc=Uc;Gc.v1=wc,Gc.v4=Uc;var xc=Gc;let Fc=class{support(){return!0}getParams(){return this.params}setData(e){this.active=e.a,this.data=e.d}preConnect(e){}postConnect(){}},Bc=class{static initModule(e){e.support()&&this.modules.set(e.name,e)}static getParams(){return fc(this,void 0,void 0,(function*(){let e={};for(const[t,n]of this.modules)e[t]=(yield n.getParams())||null;return e}))}static setDatas(e){Object.keys(e).forEach((t=>{this.modules.get(t).setData(e[t])}))}static preConnect(e){this.modules.forEach(((t,n)=>{t.preConnect(e)}))}static postConnect(){this.modules.forEach(((e,t)=>{e.postConnect()}))}};Bc.Module=Fc,Bc.modules=new Map;const qc=yc;let Vc=class{constructor(){this.emitter=new qc}on(e,t){return this.emitter.on(e,t),this}once(e,t){return this.emitter.once(e,t),this}off(e,t){return this.emitter.off(e,t),this}fire(e,t){return this.emitter.emit(e,t),this}},jc=class{constructor(){this.eventDriver=new Vc}on(e,t){this.eventDriver.on(e,t)}off(e,t){this.eventDriver.off(e,t)}fire(e,t){this.eventDriver.fire(e,t)}},Hc=new class{isDef(e){return!this.isUndef(e)}isUndef(e){return null==e}isPrimitive(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}isObject(e){return null!==e&&"object"==typeof e}isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}isValidArrayIndex(e){let t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}isString(e){return"string"==typeof e}isNumber(e){return"number"==typeof e}isStringOrNumber(e){return this.isString(e)||this.isNumber(e)}isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}isEmpty(e){return this.isArray(e)?0===e.length:this.isObject(e)?!this.isDef(e):!this.isNumber(e)&&(this.isString(e)?""===e.trim():!this.isDef(e))}isNative(e){return"function"==typeof e&&/native code/.test(e.toString())}isFunction(e){return"function"==typeof e}isBoolean(e){return"boolean"==typeof e}isTrue(e){return!0===e}isFalse(e){return!1===e}isNull(e){return null===e}};const Kc=yc;let zc=class{constructor(){this.emitter=new Kc}on(e,t){if(!Hc.isString(e))throw Error("event require a string.");if(!Hc.isFunction(t))throw Error("callback must be a function");this.emitter.on(e,t)}fire(e,t){this.emitter.emit(e,t)}off(e,t){this.emitter.off(e,t)}},Wc=class{static init(e,t,n,i,o,s){this.Socket=e,this.N=t,this.Member=n,this.v=i,this.Platform=o,this.GModules=s}};const Yc=xc;let $c=class{static get(){return Yc.v1().replace(/-/g,"")}};var Jc,Xc;(Xc=Jc||(Jc={})).WRITE="WRITE",Xc.READ="READ",Xc.NONE="NONE";let Qc=class{constructor(e){this.permission=Jc.NONE,this.singleTimeout=0,this.totalTimeout=0,this.startTime=0,this.complete=!1,this.retried=0,this.unique=!1,this.uuid=$c.get(),this.name=e.name,this.params=e.params,this.permission=e.permission,this.totalTimeout=e.totalTimeout,this.singleTimeout=e.singleTimeout,e.unique&&(this.unique=e.unique),this.success=t=>{this.complete||(this.end(),e.success(t))},this.fail=t=>{this.complete||(this.end(),e.fail(t))}}start(){this.startTime=Date.now(),this.initAutoTimeout()}end(){this.complete=!0,clearTimeout(this.timeoutHandler)}initAutoTimeout(){this.timeoutHandler=setTimeout((()=>{this.complete||this.fail({resultCode:408,content:"Host unreachable or timeout"})}),this.totalTimeout)}},Zc=class e extends Fc{static init(){return this.module=new e,this.module.name=this.GN_MODULE_NAME,this.module}static setRegId(e,t){if(e){this.module.regIdPromise=e;let n=t;this.module.params={v:{npv:n}}}}preConnect(e){this.wxmpId=e.wxmpId}getParams(){return fc(this,void 0,void 0,(function*(){if(this.params=this.params||{},this.regIdPromise)try{const e=new Promise(((e,t)=>{setTimeout((()=>t("timeout")),1e3)}));this.params.regId=yield Promise.race([this.regIdPromise,e])}catch(Yr){console.warn("Failed to register the Manufacturers Push service:"+JSON.stringify(Yr))}return this.params.wxmpId=this.wxmpId,this.params}))}};Zc.GN_MODULE_NAME="GN";let eu=class e{static init(e){this.allowNotification=!0===e;let t=Zc.init();Bc.initModule(t),this.supportAppNotification()&&(this.uniappPlugin=Nn.requireNativePlugin("GoEasy-Uniapp"),this.uniappPlugin?(this.regIdPromise=this.askRegId(),this.v=this.uniappPlugin.v(),Zc.setRegId(this.regIdPromise,this.v)):console.warn("No GoEasy-Uniapp Native Plugin."),this.setClientBadge(0))}static addAssembler(e){this.payloadAssemblers.push(e)}static assemblePayload(e){let t=this.payloadAssemblers.find((t=>t.support(e)));return t?t.assemble(e):e}static createLocalNotification(t,n,i,o,s){lc.isBackend()&&(i.g=1,"undefined"!=typeof plus&&(o?(this.uniappPlugin&&this.uniappPlugin.playSound(o),plus.push.createMessage(n,JSON.stringify(i),{title:t,sound:"none"})):plus.push.createMessage(n,JSON.stringify(i),{title:t}),"+1"===s&&this.setClientBadge(e.badge+1)))}static setBadge(t){if(!Number.isInteger(t.badge)||t.badge<0)gc.onFailed(t,"badge must be an integer greater than or equal to 0.");else if(e.supportAppNotification())if(this.uniappPlugin&&oc.currentPlatform()===ic.UNI_IOS){let e=new Qc({name:dc.SET_IOS_BADGE,params:{badge:t.badge},unique:!0,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,permission:Jc.WRITE,success:()=>{gc.onSuccess(t),this.setClientBadge(t.badge)},fail:e=>{gc.onFailed(t,e.content)}});Wc.Socket.e(e)}else gc.onSuccess(t),this.setClientBadge(t.badge)}static setClientBadge(t){"vivo"!==plus.device.vendor&&(e.badge=t,plus.runtime.setBadgeNumber(t))}static askRegId(){let e=null,t=0;const n=()=>new Promise(((i,o)=>{this.uniappPlugin.regId((e=>{i(e)}),(i=>{if(!(1e6===i.data.code&&t<=10))return clearTimeout(e),o(i);e=setTimeout((()=>{t++,this.regIdPromise=n()}),3500)}))}));return n()}static getRegIdPromise(){return this.regIdPromise}static supportAppNotification(){const e=oc.currentPlatform();return this.allowNotification&&(e===ic.UNI_ANDROID||e===ic.UNI_IOS)}static listenPlusClickNotification(){plus.push.addEventListener("click",(e=>{try{if(e){const t="string"==typeof e.payload?JSON.parse(e.payload):e.payload;if(this.availableIntent(t)){let e=this.assemblePayload(t);plus.push.clear(),this.onClickNotificationCallback(e)}}}catch(t){}}))}static availableIntent(e){return e&&Object.keys(e).length&&e.g&&1===parseInt(e.g)}static getIntentData(){this.uniappPlugin.getIntentData((e=>{if(!this.availableIntent(e))return;let t=this.assemblePayload(e);const n=oc.currentPlatform();plus.push.clear(),n===ic.UNI_ANDROID&&this.uniappPlugin.clearAll(),this.onClickNotificationCallback(t)}))}static listenClick(){this.listenPlusClickNotification();const e=oc.currentPlatform();this.uniappPlugin&&e===ic.UNI_ANDROID&&(this.getIntentData(),lc.onFrontend((()=>{this.getIntentData()})))}static onClickNotification(t){if(e.supportAppNotification()){if(!nc.isFunction(t))throw new Error("The arguments must be a function.");null===this.onClickNotificationCallback?(this.onClickNotificationCallback=t,this.listenClick()):console.warn("The onClickNotification event has been listened on. Please do not listen to it more than once.")}else console.warn("The current environment doesn't support or allowNotification is false.")}};function tu(...e){}eu.uniappPlugin=null,eu.v=null,eu.regIdPromise=null,eu.onClickNotificationCallback=null,eu.payloadAssemblers=new Array;const nu=new class{validateId(e,t){if(nc.isEmpty(e))throw{code:400,content:` ${t} is required.`};if(!nc.isString(e))throw{code:400,content:`TypeError: ${t} require string.`}}validateIdArray(e,t){if(!Array.isArray(e)||0===e.length)throw{code:400,content:`TypeError: ${t} require array.`};if(e.length>100)throw{code:400,content:`${t} is over max length 100.`};for(let n=0;n1e4)throw{code:400,content:"Message over max length 10000."};if(e.qos&&!(e.qos in[0,1]))throw{code:400,content:"Qos must be 0 or 1."};e.wxmpTemplateMsg&&nu.validateWXMPTemplateMsg(e.wxmpTemplateMsg),nc.isDef(e.notification)&&nu.validateNotification(e.notification)}},su=class{constructor(e){if(this.options=e,this.channels=e.channels||[e.channel],!nc.isEmpty(e.channel)){let t=e.channel.toString();this.channels=[t]}nc.isEmpty(e.channels)||(this.channels=e.channels.toString().split(","))}};var au,ru,cu;!function(e){e.message="message",e.imMessage="imMessage",e.userPresence="userPresence",e.groupPresence="groupPresence",e.PS_PRESENCE_EVENT="PS_PRESENCE_EVENT",e.IM_MSG_READ="IM_MSG_READ",e.IM_MSG_DELETED="IM_MSG_DELETED",e.IM_MSG_RECALLED="IM_MSG_RECALLED",e.CS_ONLINE_CHANGED="CS_ONLINE_CHANGED"}(au||(au={})),function(e){e.CONNECTED="CONNECTED",e.RECONNECTED="RECONNECTED",e.DISCONNECTED="DISCONNECTED",e.LOST="LOST",e.EXPIRED_RECONNECTED="EXPIRED_RECONNECTED",e.NEW_MESSAGE="NEW_MESSAGE",e.CONNECTING="CONNECTING"}(ru||(ru={}));let uu=class{constructor(){this.subscriptions=[],Wc.Socket.onMessage(au.message,this.onNewMessage.bind(this)),Wc.Socket.on(ru.EXPIRED_RECONNECTED,this.expiredResubscribe.bind(this)),Wc.Socket.on(ru.RECONNECTED,this.resubscribePresenceChannel.bind(this))}expiredResubscribe(){this.subscriptions.forEach((e=>{this.doSubscribe(e,!1)}))}resubscribePresenceChannel(){this.subscriptions.forEach((e=>{let t=e.options;t.presence&&t.presence.enable&&this.doSubscribe(e,!0)}))}onNewMessage(e){if(e.n.indexOf("_presence")>-1)return;e.a&&Wc.Socket.sendAck("ack",{i:e.i,c:e.n});let t={time:e.t,channel:e.n,content:e.c};this.createNotification(e),this.findSubscriptionByChannel(t.channel).options.onMessage(t)}createNotification(e){const t=Wc.N.supportAppNotification();if(!nc.isObject(e.nt)||!t)return;const n={ch:e.n,ctt:e.c};Wc.N.createLocalNotification(e.nt.t,e.nt.c,n,e.nt.sound,e.nt.badge)}subscribe(e){if(nu.validateChannelAndChannels(e.channel,e.channels),nc.isDef(e.presence)){let t=e.presence.enable;if(!nc.isBoolean(t))throw{code:400,content:"Subscription failed. presence.enable must be a boolean"};if(t&&!Wc.Socket.user().id)throw{code:400,content:"Subscription failed. If presence is enable, the id must be specified when calling the connect method"}}let t=new su(e);this.doSubscribe(t,!1).then((()=>{this.subscriptions.push(t),gc.onSuccess(e,{code:200,content:"ok"})})).catch((t=>{gc.onFailed(e,{code:t.resultCode,content:t.content})}))}doSubscribe(e,t){let n=e.options;return new Promise(((i,o)=>{let s=new Qc({name:dc.subscribe,permission:Jc.READ,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,params:{channels:e.channels,accessToken:n.accessToken,presence:n.presence,resubscribe:t},success:()=>{i()},fail:e=>{o(e)}});Wc.Socket.e(s)}))}unsubscribe(e){nu.validateChannel(e.channel,"channel"),e.channel=e.channel.toString();const t=this.findSubscriptionByChannel(e.channel);if(!t)return void e.onFailed({code:400,content:"channel["+e.channel+"] is not subscribed"});let n=new Qc({name:dc.unsubscribe,params:{channel:e.channel,presence:t.options.presence},permission:Jc.READ,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:()=>{e.onSuccess({code:200,content:"ok"}),this.removeChannel(e.channel)},fail:function(t){e.onFailed({code:t.resultCode,content:t.content})}});Wc.Socket.e(n)}removeChannel(e){for(let t=this.subscriptions.length-1;t>=0;t--){const n=this.subscriptions[t].channels,i=n.indexOf(e);if(i>-1){n.splice(i,1),0===n.length&&this.subscriptions.splice(t,1);break}}}findSubscriptionByChannel(e){let t=!1,n=null;for(let i=this.subscriptions.length-1;i>=0;i--){let o=this.subscriptions[i].channels;for(let s=0;s{e.onSuccess({code:t.resultCode||t.code||200,content:t.content})},fail:t=>{e.onFailed({code:t.resultCode||t.code,content:t.content})}});Wc.Socket.e(t)}},du=class{constructor(){this.channelPresenceMap=new Map,this.onPresenceEvent=e=>{let t=this.channelPresenceMap.get(e.channel);null==t||t.onPresence(e)},this.expireAllChannelPresences=()=>{this.channelPresenceMap.forEach(((e,t)=>{e.expire()}))},this.resubscribe=()=>{this.channelPresenceMap.forEach(((e,t)=>{e.subscribed()&&e.doSubscribe()}))},Wc.Socket.on(ru.LOST,this.expireAllChannelPresences),Wc.Socket.on(ru.RECONNECTED,this.resubscribe),Wc.Socket.onMessage(au.PS_PRESENCE_EVENT,this.onPresenceEvent)}hereNow(e){nu.validateChannel(e.channel,"channel");let t,n=this.channelPresenceMap.get(e.channel.toString());n&&n.queryPromise?(e.limit&&e.limit>n.membersLimit&&n.doQuery(e.limit),t=n.queryPromise):t=hu(e.channel,e.limit),t.then((t=>{e.onSuccess(t)})).catch((t=>{e.onFailed(t)}))}subscribe(e){if(nu.validateChannel(e.channel,"channel"),nc.isUndef(e.onPresence)||!nc.isFunction(e.onPresence))throw{code:400,content:"Subscription Presence failed. onPresence callback function is required"};let t=e.channel.toString(),n=this.channelPresenceMap.get(t);n||(n=new pu(t),this.channelPresenceMap.set(t,n)),n.subscribe(e)}unsubscribe(e){nu.validateChannel(e.channel,"channel");let t=e.channel.toString();if(this.channelPresenceMap.get(t)){let n=new Qc({name:dc.PUBSUB_PRESENCE_UNSUBSCRIBE,permission:Jc.READ,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,params:{channel:t},success:n=>{this.channelPresenceMap.delete(t),e.onSuccess()},fail:t=>{e.onFailed(t)}});Wc.Socket.e(n)}else e.onSuccess()}},pu=class{constructor(e){this.membersLimit=10,this.queried=!1,this.channel=e}onPresence(e){return fc(this,void 0,void 0,(function*(){this.queried?this.update(e):yield this.queryPromise,this.on({channel:this.channel,action:e.action,member:e.member,time:e.time,amount:this.amount,members:this.membersByLimit()})}))}membersByLimit(){return this.members.slice(0,this.membersLimit)}subscribe(e){return fc(this,void 0,void 0,(function*(){if(e.membersLimit&&(this.membersLimit=Math.min(e.membersLimit,300)),!this.subscribed())try{yield this.doSubscribe()}catch(t){return void e.onFailed(t)}this.on=e.onPresence,e.onSuccess()}))}doSubscribe(){return this.doQuery(this.membersLimit),new Promise(((e,t)=>{let n=new Qc({name:dc.PUBSUB_PRESENCE_SUBSCRIBE,permission:Jc.READ,params:{channel:this.channel},singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:t=>{e()},fail:e=>{t(e)}});Wc.Socket.e(n)}))}doQuery(e){this.queryPromise=hu(this.channel,e),this.queryPromise.then((e=>{this.members=e.content.members,this.amount=e.content.amount,this.queried=!0})).catch((e=>{throw e}))}update(e){if(["join","back"].includes(e.action))this.members.unshift(e.member);else if(["leave","timeout"].includes(e.action)){let t=this.members.findIndex((t=>t.id===e.member.id));t>-1&&this.members.splice(t,1)}this.amount=e.amount}expire(){this.queried=!1,this.queryPromise=null}subscribed(){return void 0!==this.on}};function hu(e,t){return t||(t=10),new Promise(((n,i)=>{let o={channel:e,limit:t},s=new Qc({name:dc.PUBSUB_PRESENCE_HERENOW,permission:Jc.READ,params:o,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,success:e=>{n(e)},fail:e=>{i(e)}});Wc.Socket.e(s)}))}let gu=class e{constructor(){this.publisher=new ou,this.subscriber=new uu,this.presence2=new du,this.histories=new lu}static init(){this.instance=new e}publish(e){this.publisher.publish(e)}subscribe(e){this.subscriber.subscribe(e)}unsubscribe(e){this.subscriber.unsubscribe(e)}subscribePresence(e){this.presence2.subscribe(e)}unsubscribePresence(e){this.presence2.unsubscribe(e)}history(e){this.histories.get(e)}hereNow(e){this.presence2.hereNow(e)}},fu=class e extends Fc{static init(){return this.module=new e,this.module.name=this.GWS_MODULE_NAME,this.initGN(),this.module}static initGN(){eu.addAssembler(new class{assemble(e){return{channel:e.ch,content:e.ctt}}support(e){return!!e.ch}})}postConnect(){gu.init()}static check(){if(!this.module)throw{code:400,content:"PubSub not initialized. Please include 'PUBSUB' in the 'modules' during GoEasy initialization."}}};fu.GWS_MODULE_NAME="GWS";let mu=class{constructor(){}};!function(e){e.aliYun="ALI",e.qiNiu="QN",e.tencent="TX",e.s3="S3"}(cu||(cu={}));let _u=new class extends mu{constructor(){super()}upload(e,t){try{return e.storageLocation===cu.s3?this.uploadToS3(e,t):(delete e.parameters.fileRes,new Promise(((n,i)=>{Nn.uploadFile({url:e.host,filePath:this.getTempFilePath(e),name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))})))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file;return t.tempFilePath||t.fullPath||t.path}uploadToS3(e,t){return new Promise(((t,n)=>fc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(e);Nn.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cu.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{const i=this.getTempFilePath(e);if("undefined"!=typeof plus)plus.io.resolveLocalFileSystemURL(i,(e=>{e.file((e=>{let i=new plus.io.FileReader;i.onloadend=e=>{const n=Nn.base64ToArrayBuffer(e.target.result.split(",")[1]);t(n)},i.onerror=function(e){n(e)},i.readAsDataURL(e)}))}),(e=>{n("Resolve file URL failed: "+e.message)}));else if("undefined"!=typeof FileReader){const i=new FileReader;i.onload=()=>{t(i.result)},i.onerror=e=>{n(e)},i.readAsArrayBuffer(e.file)}else if("object"==typeof Pn&&Pn.canIUse("getFileSystemManager"))try{const e=Pn.getFileSystemManager().readFileSync(i);t(e)}catch(o){n(o)}}))}};const vu=new class extends mu{upload(e,t){try{return e.storageLocation===cu.s3?this.uploadToS3(e,t):new Promise(((n,i)=>{Pn.uploadFile({url:e.host,filePath:this.getTempFilePath(e),name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))}))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file||e.fileRes;return t.path||t.tempFilePath}uploadToS3(e,t){return new Promise(((t,n)=>fc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(this.getTempFilePath(e));Pn.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cu.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{try{t(Pn.getFileSystemManager().readFileSync(e))}catch(i){n(i)}}))}},yu=new class extends mu{constructor(){super()}upload(e,t){return new Promise(((n,i)=>{try{const o=new XMLHttpRequest,s=e.storageLocation===cu.s3,a=s?"PUT":"POST",r=s?e.url:e.host;o.open(a,r,!0);for(let t in e.headers)o.setRequestHeader(t,e.headers[t]);o.upload.onprogress=function(e){t&&t(e)},o.upload.onloadstart=function(e){t&&t(e)},o.upload.onloadend=function(e){t&&t(e)};let c=new FormData;for(let t in e.parameters)"fileRes"==t?c.append("file",e.parameters[t]):c.append(t,e.parameters[t]);const u=s?e.file:c;o.send(u),o.onreadystatechange=function(){4==o.readyState&&(o.status>=200&&o.status<300||304==o.status?(s&&(e.url=e.url.split("?")[0]),n()):i({code:o.status,content:o.responseText}))}}catch(o){i({code:500,content:o})}}))}fileToArrayBuffer(e){return new Promise(((t,n)=>{const i=new FileReader;i.onload=()=>{t(i.result)},i.onerror=e=>{n(e)},i.readAsArrayBuffer(e)}))}},Iu=new class extends mu{upload(e,t){try{return e.storageLocation===cu.s3?this.uploadToS3(e,t):(delete e.parameters.fileRes,new Promise(((n,i)=>{my.uploadFile({url:e.host,filePath:this.getTempFilePath(e),fileType:"image",name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))})))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file;return t.path||t.tempFilePath}uploadToS3(e,t){return new Promise(((t,n)=>fc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(this.getTempFilePath(e));my.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cu.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{my.getFileSystemManager().readFile({filePath:e,success:e=>{t(e.data)},fail(e){n(e)}})}))}},Mu=new class extends mu{upload(e,t){try{return e.storageLocation===cu.s3?this.uploadToS3(e,t):(delete e.parameters.fileRes,new Promise(((n,i)=>{swan.uploadFile({url:e.host,filePath:this.getTempFilePath(e),name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))})))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file;return t.path||t.tempFilePath}uploadToS3(e,t){return new Promise(((t,n)=>fc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(this.getTempFilePath(e));swan.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cu.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{swan.getFileSystemManager().readFile({filePath:e,success:e=>{t(e.data)},fail:e=>{n(e)}})}))}};let Cu=class{constructor(e,t,n){this.storageLocation=e,this.url=t,this.name=n}};const Su=new class{constructor(){this.uploader={[zr.UNIAPP]:_u,[ic.MP_WX]:vu,[ic.BROWSER]:yu,[ic.MP_ALI]:Iu,[ic.MP_BAIDU]:Mu,[zr.REACT_NATIVE]:yu,[ic.MP_BYTE]:vu}}upload(e,t){return fc(this,void 0,void 0,(function*(){const n=$r.currentFramework(),i=oc.currentPlatform(),o=n===zr.UNKNOWN?i:n;let s=this.uploader[o];return yield s.upload(e,t),new Cu(e.storageLocation,e.url,e.newFileName)}))}};let Eu=class{resolve(e){return new Promise(((t,n)=>{let i=new Qc({name:"uploadToken",params:{filename:e},permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail(e){n(e.content)},success(e){200===e.code?t(e.content):n(e.content)}});Wc.Socket.e(i)}))}},Tu=class{constructor(e,t,n,i,o,s,a){this.storageLocation=e,this.host=t,this.headers=n,this.parameters=i,this.file=o,this.newFileName=s,this.url=a}},ku=class{constructor(){}newFileName(e){return e&&e.newFilename||""}},Du=new class extends ku{constructor(){super()}url(e){return e.host+"/"+e.dir+"/"+this.newFileName(e)}build(e,t,n){let i,o=this.newFileName(e);return i={key:e.dir+"/"+o,OSSAccessKeyId:e.accessKeyId,policy:e.policy,signature:e.signature,success_action_status:"200",fileRes:t},n&&(i={key:e.dir+"/"+o,OSSAccessKeyId:e.accessKeyId,policy:e.policy,signature:e.signature,success_action_status:"200","Content-Disposition":"attachment;filename="+t.name,fileRes:t}),new Tu(cu.aliYun,e.host,null,i,t,o,this.url(e))}},Ru=new class extends ku{constructor(){super()}url(e){return e.host+"/"+e.key}build(e,t,n){let i={"q-sign-algorithm":e.qSignAlgorithm,"q-ak":e.qAk,"q-key-time":e.qKeyTime,"q-signature":e.qSignature,policy:e.policy,"x-cos-security-token":e.xCosSecurityToken,success_action_status:"200",key:e.key,fileRes:t};return n&&(i={"q-sign-algorithm":e.qSignAlgorithm,"q-ak":e.qAk,"q-key-time":e.qKeyTime,"q-signature":e.qSignature,policy:e.policy,"x-cos-security-token":e.xCosSecurityToken,success_action_status:"200",key:e.key,"Content-Disposition":`attachment;filename=${t.name}`,fileRes:t}),new Tu(cu.tencent,e.host,null,i,t,e.key,this.url(e))}},Ou=new class extends ku{constructor(){super()}url(e){return e.uploadUrl}build(e,t,n){const i={file:t};return new Tu(cu.s3,null,{"Content-Type":"application/octet-stream"},i,t,t.name,this.url(e))}},bu=class{constructor(){this.uploadTokenResolver=new Eu}builder(e){if(e===cu.aliYun)return Du;if(e===cu.tencent)return Ru;if(e===cu.s3)return Ou;throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:"+e)}build(e,t,n){return fc(this,void 0,void 0,(function*(){try{let i=yield this.uploadTokenResolver.resolve(t),o=this.builder(i.vendor).build(i,e,n);return Promise.resolve(o)}catch(i){return Promise.reject(i)}}))}},Au=class{constructor(){this.requestBuilder=new bu,this.fileUploader=Su}upload(e,t,n,i){return fc(this,void 0,void 0,(function*(){try{let o=yield this.requestBuilder.build(e,t,i);return this.fileUploader.upload(o,n)}catch(o){return Promise.reject(o)}}))}};var Lu,Pu,Nu,wu;!function(e){e.MESSAGE_SENDING="IM_INTERNAL_MESSAGE_SENDING",e.MESSAGE_SEND_SUCCESS="IM_INTERNAL_MESSAGE_SEND_SUCCESS",e.MESSAGE_SEND_FAILED="IM_INTERNAL_MESSAGE_SEND_FAILED",e.MESSAGE_RECEIVED="IM_INTERNAL_MESSAGE_RECEIVED",e.MESSAGE_RECALLED="IM_INTERNAL_MESSAGE_RECALLED",e.MAX_MESSAGE_CHANGED="IM_INTERNAL_MAX_MESSAGE_CHANGED",e.MAX_MESSAGE_DELETED="IM_INTERNAL_MAX_MESSAGE_DELETED",e.UNREAD_AMOUNT_CHANGED="IM_INTERNAL_UNREAD_MESSAGE_CHANGED",e.CS_ONLINE_SUCCESS="CS_ONLINE_SUCCESS",e.CS_OFFLINE_SUCCESS="CS_OFFLINE_SUCCESS",e.CS_ACCEPTED="CS_ACCEPTED",e.CS_ENDED="CS_ENDED",e.CS_TRANSFER="CS_TRANSFER",e.CS_AGENT_MESSAGE_RECEIVED="CS_AGENT_MESSAGE_RECEIVED"}(Lu||(Lu={}));let Uu=class{clearUseLessAttribute(){delete this.buildOptions}isOtherSent(){return this.senderId!==Wc.Socket.user().id}getToData(){return this.buildOptions.createOptions.to.data}},Gu=class{};!function(e){e.TEXT="text",e.IMAGE="image",e.FILE="file",e.VIDEO="video",e.AUDIO="audio"}(Pu||(Pu={}));let xu=class extends Gu{constructor(){super(...arguments),this.goEasyUploader=new Au}improve(e){let t=e.message;return new Promise(((e,n)=>{let i,o,s=t.buildOptions.createOptions;t.type===Pu.VIDEO?(o=t.payload,i=o.video.name):(o=t.payload,i=o.name),this.goEasyUploader.upload(s.file,i,s.onProgress,t.type===Pu.FILE).then((n=>{n.storageLocation!==cu.s3&&(n.url=encodeURI(n.url)),this.setPayload(n,t),e()})).catch((e=>{n(e)}))}))}setPayload(e,t){t.payload.url=e.url}},Fu=class extends xu{setPayload(e,t){let n,i=t.payload;switch(i.video.url=e.url,i.video.name=e.name,i.thumbnail.height>200&&(i.thumbnail.height=200,i.thumbnail.width=200*i.video.width/i.video.height),e.storageLocation){case cu.aliYun:n="?x-oss-process=video/snapshot,t_0000,f_jpg,h_"+i.thumbnail.height+",m_fast,ar_auto";break;case cu.tencent:n="?ci-process=snapshot&time=1&format=jpg&height="+i.thumbnail.height;break;case cu.s3:n="?process=video&height="+i.thumbnail.height;break;default:throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:"+e.storageLocation)}i.thumbnail.url=e.url+n}},Bu=class extends xu{setPayload(e,t){let n,i=t.payload;i.url=e.url;const o=i.height>200?200:i.height;switch(e.storageLocation){case cu.aliYun:n="?x-oss-process=image/resize,m_lfit,h_"+o;break;case cu.tencent:n=`?imageMogr2/thumbnail/x${o}`;break;case cu.s3:n=`?process=image&height=${o}`;break;default:throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:"+e.storageLocation)}i.thumbnail=e.url+n}},qu=class{constructor(){this.improvers={[Pu.FILE]:new xu,[Pu.AUDIO]:new xu,[Pu.IMAGE]:new Bu,[Pu.VIDEO]:new Fu}}improve(e){let t=this.improvers[e.message.type];if(t)try{return t.improve(e)}catch(n){return Promise.reject(n)}return Promise.resolve()}},Vu=class e extends jc{static init(){this.i=new e}},ju=class{constructor(e,t,n,i,o){this.validate(e),this.mt=e.type,this.to=t.id.toString(),this.d=JSON.stringify(t.data),this.p=JSON.stringify(e.payload),n&&(this.nt=n),o&&(this.at=o),i&&(this.wxmpTemplateMsg=iu(i),this.wxmpTemplateMsg.data=JSON.stringify(this.wxmpTemplateMsg.data));let s=t.type;if(this.t=s,s===Qr.CS){let t=e;this.tid=t.teamId}this.guid=e.messageId}validate(e){if(e.type===Pu.TEXT&&JSON.stringify(e.payload).length>3072)throw Error("message-length limit 3kb")}},Hu=class{constructor(){this.payloadImprover=new qu}send(e){this.validate(e);let t=e.message,n=e.accessToken,i=t.buildOptions,o=i.createOptions,s=o.notification,a=o.wxmpTemplateMsg,r=o.to;r.data||(r.data={}),t.status=Zr.SENDING;let c=i.complete,u=this.payloadImprover.improve(e);Promise.all([c,u]).then((()=>fc(this,void 0,void 0,(function*(){if(o.beforeSend){const e=JSON.parse(JSON.stringify(t));yield o.beforeSend(e)}this.doSend(t,r,s,a,n,e)})))).catch((n=>{t.status=Zr.FAIL,gc.onFailed(e,{code:n&&n.code||400,content:n&&n.content||n})}))}doSend(e,t,n,i,o,s){let a=new ju(e,t,n,i,o);Vu.i.fire(Lu.MESSAGE_SENDING,e);let r=new Qc({name:dc.publishIM,params:a,unique:!0,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:t=>{e.status=Zr.FAIL,Vu.i.fire(Lu.MESSAGE_SEND_FAILED,e),gc.onFailed(s,{code:t.resultCode,content:t.content})},success:t=>{if(e.status=Zr.SUCCESS,e.timestamp=t.content.timestamp,e.messageId=JSON.stringify(t.content.id),e.scene()===Qr.CS){let n=e;n.customerId()!==Wc.Socket.user().id&&(n.sessionId=t.content.sessionId)}e.clearUseLessAttribute(),Vu.i.fire(Lu.MESSAGE_SEND_SUCCESS,e),gc.onSuccess(s,e)}});Wc.Socket.e(r)}validate(e){let t=e.message;if(!(t instanceof Uu))throw new Error("it is invalid message");if(t.status!==Zr.NEW)throw new Error("Please create a new message, a message can only be sent once")}},Ku=class{insert(e,t){let n=this.binarySearch(e,t);if(n>=0)e.splice(n,1,t);else{let i=-n-1;e.splice(i,0,t)}}binarySearch(e,t){let n=0,i=e.length-1;for(;n<=i;){let o=i+n>>1,s=this.compare(t,e[o]);if(s>0)n=o+1;else{if(!(s<0))return o;i=o-1}}return-n-1}},zu=class e{constructor(e){this.messages=new Array,this.allLoaded=!1,this.target=e}all(){return this.messages}sliceOverLengthMessages(){this.messages.length>e.CACHE_MAX_LENGTH&&(this.messages=this.messages.slice(-e.CACHE_MAX_LENGTH),!0===this.allLoaded&&(this.allLoaded=!1))}getMaxMessage(){return this.messages[this.messages.length-1]}loadLocalMessages(e,t){let n=[],i=this.messages.length;if(t){if(i>0){let o=this.messages[0].timestamp,s=this.messages[i-1].timestamp;if(t>=o&&t<=s)for(let a=i-1;a>=0;a--){let i=this.messages[a];if(i.timestamp0&&i.timestamp===t.lastTimestamp)&&(n.forEach((t=>{e.sortedInserter.insert(this.messages,t)})),n.lengthe===t.timestamp))}findMessagesByTimes(e){let t=[];return e.forEach((e=>{let n=this.findMessageByTime(e);nc.isDef(n)&&t.push(n)})),t}existsMessage(e){return this.findMessageIndexById(e)>-1}findMessageIndexById(e){return this.messages.findIndex((t=>e===t.messageId))}deleteMessage(e){let t=this.findMessageIndexById(e);t>=0&&this.messages.splice(t,1)}recallMessage(e){return e.times.map((e=>this.findMessageByTime(e))).filter((e=>nc.isDef(e))).map((t=>(t.recalled=!0,t.recaller=e.recaller,t)))}isEmpty(){return 0===this.messages.length}deleteMessages(e){e.forEach((e=>{this.deleteMessage(e.messageId)}))}saveMessage(t){e.sortedInserter.insert(this.messages,t),this.deleteGroupConversationMessage(),this.sliceOverLengthMessages()}deleteGroupConversationMessage(){this.target.scene===Qr.GROUP&&this.messages.length>=2&&1===this.messages[0].x&&this.messages.shift()}maxSuccessMessageTime(){for(let e=this.messages.length-1;e>=0;e--)if(this.messages[e].status===Zr.SUCCESS)return this.messages[e].timestamp;return 0}minTime(){return this.isEmpty()?0:this.messages[0].timestamp}correctPosition(e){this.deleteMessage(e.messageId),this.saveMessage(e)}};zu.CACHE_MAX_LENGTH=200,zu.sortedInserter=new class extends Ku{compare(e,t){let n=e.timestamp-t.timestamp;return n>0?1:0===n?0:-1}};let Wu=class e{constructor(e,t,n){this.scene=e,this.id=t,nc.isDef(n)&&(this.teamId=n)}toString(){return Qr.PRIVATE===this.scene||Qr.GROUP===this.scene?this.scene+"#"+this.id:this.scene+"#"+this.id+"#"+this.teamId}customerId(){if(Qr.CS===this.scene)return this.id===this.teamId?Wc.Socket.user().id:this.id}static byScene(t,n,i){return new e(t,n,i)}static byIMMessage(t){let n,i,o=t.scene();if(o===Qr.PRIVATE){let e=t.senderId,n=t.targetId();i=Wc.Socket.user().id===e?n:e}else if(o===Qr.GROUP)i=t.targetId();else{if(o!==Qr.CS)throw{code:400,content:`scene ${o} not exists`};i=t.targetId(),n=t.teamId}return new e(o,i,n)}static byMessageReadRemoteEvent(t){let n,i=t.scene,o=t.targetId,s=t.markerId,a=t.teamId;return i===Qr.PRIVATE?n=Wc.Socket.user().id===s?o:s:i===Qr.GROUP?n=o:i===Qr.CS&&(n=o===a?s===Wc.Socket.user().id?a:s:s===Wc.Socket.user().id?o:a),new e(i,n,a)}static byIMMessageDeletedEvent(t){let n=t.scene,i=t.deleterId;if(n===Qr.PRIVATE){let o=Wc.Socket.user().id===i?t.targetId:i;return new e(n,o)}if(n===Qr.GROUP)return new e(n,t.targetId)}static byConversationDTO(e){let t=e.lastMessage;return this.byIMMessage(t)}static byConversationId(t,n){let i;if(t===Qr.PRIVATE){let e=n.split(":",2);i=e[0]===Wc.Socket.user().id?e[1]:e[0]}else i=n;return new e(t,i)}},Yu=class{constructor(e){this.times=new Array;let t=e[0],n=Wu.byIMMessage(t);this.scene=n.scene,this.targetId=n.id,e.forEach((e=>{e.status===Zr.SUCCESS&&this.times.push(e.timestamp)})),this.times.sort(((e,t)=>e{let i=new Qc({name:dc.IM_DELETE_MESSAGE,params:t,permission:Jc.WRITE,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,success:t=>{200===t.code?e(t):n(t)},fail:e=>{n(e)}});Wc.Socket.e(i)}))}static validate(e){let t=e.messages;for(let n=0;n{let n=new Qc({name:dc.IM_HISTORY_CHANGE,params:s,permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{t(e)},success:t=>{let n=t.content;e(n)}});Wc.Socket.e(n)}))}loadServerMessages(e,t){return new Promise(((n,i)=>{let o=new Qc({name:dc.IM_HISTORY,params:t,permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{i(e)},success:t=>{let i=t.content;i.messages=this.convertServerMessages(e,i.messages),n(i)}});Wc.Socket.e(o)}))}convertServerMessages(e,t){let n=[],i=e.scene,o=e.id;return t.forEach((t=>{if(t.t=i,Qr.PRIVATE===i)t.r=t.s===Wc.Socket.user().id?o:Wc.Socket.user().id;else if(Qr.GROUP===i)t.r=o;else if(Qr.CS===i){let n=e.customerId(),i=e.teamId;n===Wc.Socket.user().id?t.r=i:t.r=n}let s=this.builder.build(t);n.push(s)})),n}updateServerOffsets(e,t){return fc(this,void 0,void 0,(function*(){let n=new Xu(t.id,t.scene,e,t.teamId);return new Promise(((e,t)=>{let i=new Qc({name:dc.IM_MARK_AS_READ,params:n,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:t=>{e(t)},fail:e=>{t(e)}});Wc.Socket.e(i)}))}))}};nl.instance=new nl;let il=class{constructor(){this.offsetMap=new Map,this.markingTime=0,this.userId=Wc.Socket.user().id}updateOffset(e,t){let n=this.offsetMap.get(e);return nc.isDef(n)?t>n&&(this.offsetMap.set(e,t),!0):(this.offsetMap.set(e,t),!0)}updateUserOffsets(e){e.forEach((e=>{let t=e.userId,n=e.offset;this.updateOffset(t,n)}))}updateMyOffset(e){return this.updateOffset(this.userId,e)}myOffset(){return this.getOffset(this.userId)}getOffset(e){return this.offsetMap.get(e)||0}},ol=class{constructor(e,t,n,i,o){this.id=e,this.scene=t,this.lastTimestamp=n,this.limit=i,this.teamId=o}},sl=class{constructor(e){this.history=e}pre(){this.oldLastMessage=this.history.getMaxMessage(),this.oldUnreadAmount=this.history.unreadAmount(),this.oldLastMessage&&(this.oldLastMessageRecalled=this.oldLastMessage.recalled,this.oldLastMessageRead=this.oldLastMessage.read,this.oldLastMessageStatus=this.oldLastMessage.status)}post(){let e,t,n,i=this.history.unreadAmount(),o=this.history.getMaxMessage();o&&(n=o.status,e=o.read,t=o.recalled);let s=this.history.target;this.oldLastMessage!==o||this.oldLastMessageRead!==e||this.oldLastMessageRecalled!==t||this.oldLastMessageStatus!==n?o?Vu.i.fire(Lu.MAX_MESSAGE_CHANGED,o):Vu.i.fire(Lu.MAX_MESSAGE_DELETED,s):this.oldUnreadAmount!==i&&Vu.i.fire(Lu.UNREAD_AMOUNT_CHANGED,s)}},al=class{constructor(e,t,n,i){this.scene=e,this.conversationId=t,this.recaller=n,this.times=i}},rl=class{static init(){this.eventCenter=new zc}static on(e,t){this.eventCenter.on(e,t)}static fire(e,t){this.eventCenter.fire(e,t)}static off(e,t){this.eventCenter.off(e,t)}};!function(e){e.PRIVATE_MESSAGE_RECEIVED="PRIVATE_MESSAGE_RECEIVED",e.GROUP_MESSAGE_RECEIVED="GROUP_MESSAGE_RECEIVED",e.SYSTEM_MESSAGE_RECEIVED="SYSTEM_MESSAGE_RECEIVED",e.CONVERSATIONS_UPDATED="CONVERSATIONS_UPDATED",e.HISTORY_EXPIRED="HISTORY_EXPIRED",e.USER_PRESENCE="USER_PRESENCE",e.GROUP_PRESENCE="GROUP_PRESENCE",e.MESSAGE_DELETED="MESSAGE_DELETED",e.MESSAGE_READ="MESSAGE_READ",e.MESSAGE_RECALLED="MESSAGE_RECALLED",e.CS_MESSAGE_RECEIVED="CS_MESSAGE_RECEIVED",e.PENDING_CONVERSATIONS_UPDATED="PENDING_CONVERSATIONS_UPDATED"}(wu||(wu={}));let cl=class{constructor(e){this.expiredTime=0,this.remoteHistory=nl.instance,this.target=e,this.userOffsets=new il,this.messageCache=new zu(e)}initMaxMessageAndOffsets(e,t){this.existsMessage(e)||(this.messageCache.saveMessage(e),t.forEach((e=>{this.markLocalMessagesRead(this.messageCache.all(),e.userId,e.offset,!1)})))}existsMessage(e){return this.messageCache.existsMessage(e.messageId)}loadHistory(e,t){return fc(this,void 0,void 0,(function*(){return this.expiredTime>0&&!this.messageCache.isEmpty()&&(yield this.updateByServerChange()),nc.isUndef(t)?t=10:t>30&&(t=30),yield this.loadServerMessages(e,t)}))}loadServerMessages(e,t){return fc(this,void 0,void 0,(function*(){let n=this.messageCache.loadLocalMessages(t,e);if(!1===this.messageCache.allLoaded&&n.length!==t){let i=t-n.length,o=n[0]?n[0].timestamp:e,s=new ol(this.target.id.toString(),this.target.scene,o,i,this.target.teamId),a=yield this.remoteHistory.loadServerMessages(this.target,s),r=a.messages;n=r.concat(n),this.messageCache.cacheServerMessages(s,r),a.userOffsets.forEach((e=>{this.userOffsets.updateOffset(e.userId,e.offset)})),this.userOffsets.offsetMap.forEach(((e,t)=>{this.markLocalMessagesRead(r,t,e,!1)}))}return n}))}deleteMessages(e){return fc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>fc(this,void 0,void 0,(function*(){let t=e.messages;yield $u.deleteServerMessages(t),this.messageCache.deleteMessages(t),gc.onSuccess(e)}))))}))}syncDeletedMessage(e,t){this.aopUnreadAmountMaxMessage((()=>{this.doSyncDeletedMessage(e,t)}))}doSyncDeletedMessage(e,t){if(e===Wc.Socket.user().id){let e=this.messageCache.findMessagesByTimes(t);this.messageCache.deleteMessages(e),e.length>0&&rl.fire(wu.MESSAGE_DELETED,e)}}recallMessages(e){return fc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>fc(this,void 0,void 0,(function*(){this.doRecall(e)}))))}))}doRecall(e){let t=this.messageCache.recallMessage(e);t.length>0&&rl.fire(wu.MESSAGE_RECALLED,t)}expire(){this.messageCache.isEmpty()||(this.expiredTime=this.messageCache.maxSuccessMessageTime())}updateByServerChange(){return fc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>fc(this,void 0,void 0,(function*(){let e=yield this.remoteHistory.sync(this.target.scene,this.target.id,this.expiredTime,this.messageCache.minTime(),this.target.teamId);e.userOffsets.forEach((e=>{this.markLocalMessagesRead(this.messageCache.all(),e.userId,e.offset,!0)}));let t=e.deletedMessageTimes;t.length>0&&this.doSyncDeletedMessage(Wc.Socket.user().id,t);let n=e.recalledMessages;n.length>0&&n.forEach((e=>{let t=new al(this.target.scene,this.target.id,e.recaller,e.times);this.doRecall(t)})),this.expiredTime=0}))))}))}markRead(){return fc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>fc(this,void 0,void 0,(function*(){let e=this.messageCache.maxSuccessMessageTime();e>this.userOffsets.myOffset()&&(this.userOffsets.markingTime=e,yield this.remoteHistory.updateServerOffsets(e,this.target),e===this.userOffsets.markingTime&&this.markLocalMessagesRead(this.messageCache.all(),Wc.Socket.user().id,e,!0))}))))}))}syncMarkedMessage(e){this.aopUnreadAmountMaxMessage((()=>{this.markLocalMessagesRead(this.messageCache.all(),e.markerId,e.time,!0)}))}onMessageSending(e){this.aopUnreadAmountMaxMessage((()=>{this.messageCache.saveMessage(e)}))}onMessageSendSuccess(e){this.aopUnreadAmountMaxMessage((()=>{this.messageCache.correctPosition(e),this.markLocalMessagesRead(this.messageCache.all(),Wc.Socket.user().id,e.timestamp,!0)}))}onMessageSendFailed(e){this.getMaxMessage()===e&&Vu.i.fire(Lu.MAX_MESSAGE_CHANGED,e)}onMessageReceived(e){this.aopUnreadAmountMaxMessage((()=>{this.messageCache.saveMessage(e),this.markLocalMessagesRead(this.messageCache.all(),e.senderId,e.timestamp,!0)}))}aopUnreadAmountMaxMessage(e,t){return fc(this,void 0,void 0,(function*(){try{let t=new sl(this);t.pre(),yield e(),t.post()}catch(n){gc.onFailed(t,n)}}))}markLocalMessagesRead(e,t,n,i){if(this.userOffsets.updateOffset(t,n),this.isOtherUserId(t)){let t=this.markMySentRead(e,n);i&&t.length>0&&rl.fire(wu.MESSAGE_READ,t)}else t===Wc.Socket.user().id&&this.markOthersSentRead(e,n)}markOthersSentRead(e,t){if(this.target.scene===Qr.PRIVATE)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.isOtherSent()&&i.timestamp<=t){if(i.read)break;i.read=!0}}}markMySentRead(e,t){let n=new Array;if(this.target.scene===Qr.PRIVATE)for(let i=e.length-1;i>=0;i--){let o=e[i];if(!o.isOtherSent()&&o.timestamp<=t&&o.status===Zr.SUCCESS){if(o.read)break;o.read=!0,n.push(o)}}return n}isOtherUserId(e){if(this.target.scene===Qr.CS){let t=this.target.customerId();return Wc.Socket.user().id===t?e!==Wc.Socket.user().id:e===t}return e!==Wc.Socket.user().id}unreadAmount(e){let t=0,n=this.userOffsets.myOffset(),i=this.messageCache.all();for(const o of i)o.isOtherSent()&&!1===o.recalled&&o.timestamp>n&&(t+=1);return t}getMaxMessage(e){return this.messageCache.getMaxMessage()}maxTime(e){let t=this.getMaxMessage();return nc.isDef(t)?t.timestamp:0}},ul=class{constructor(e,t){this.teamId=e,this.customerId=t}},ll=class{},dl=class{constructor(e,t,n){this.teamId=e,this.teamData=JSON.stringify(t),this.agentData=JSON.stringify(n)}},pl=class{constructor(e){this.teamId=e}},hl=class{constructor(e){this.teamId=e}};var gl={exports:{}},fl=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ml=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],_l=function(e){var t=e,n=e.indexOf("["),i=e.indexOf("]");-1!=n&&-1!=i&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));for(var o=fl.exec(e||""),s={},a=14;a--;)s[ml[a]]=o[a]||"";return-1!=n&&-1!=i&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s},vl={exports:{}},yl={exports:{}},Il=1e3,Ml=6e4,Cl=36e5,Sl=24*Cl,El=function(e,t){t=t||{};var n,i=typeof e;if("string"===i&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*Sl;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Cl;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ml;case"seconds":case"second":case"secs":case"sec":case"s":return n*Il;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?Tl(n=e,Sl,"day")||Tl(n,Cl,"hour")||Tl(n,Ml,"minute")||Tl(n,Il,"second")||n+" ms":function(e){return e>=Sl?Math.round(e/Sl)+"d":e>=Cl?Math.round(e/Cl)+"h":e>=Ml?Math.round(e/Ml)+"m":e>=Il?Math.round(e/Il)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Tl(e,t,n){if(!(e=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(n())}(vl,vl.exports);var kl=_l,Dl=vl.exports("socket.io-client:url"),Rl=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(Dl("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),Dl("parse %s",e),n=kl(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(t&&t.port===n.port?"":":"+n.port),n},Ol={},bl={}.toString,Al=Array.isArray||function(e){return"[object Array]"==bl.call(e)};!function(e){vl.exports("socket.io-parser");var t=vc.exports,n=Al;function i(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=i,e.Decoder=s;var o=e.ERROR+'"encode error"';function s(){this.reconstructor=null}function a(t){return{type:e.ERROR,data:"parser error: "+t}}i.prototype.encode=function(t,n){n([function(t){var n=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var i=function(e){try{return JSON.stringify(e)}catch(t){return!1}}(t.data);if(!1===i)return o;n+=i}return n}(t)])},t(s.prototype),s.prototype.add=function(t){var i;if("string"!=typeof t)throw new Error("Unknown type: "+t);i=function(t){var i=0,o={type:Number(t.charAt(0))};if(null==e.types[o.type])return a("unknown packet type "+o.type);if(e.BINARY_EVENT===o.type||e.BINARY_ACK===o.type){for(var s="";"-"!==t.charAt(++i)&&(s+=t.charAt(i),i!=t.length););if(s!=Number(s)||"-"!==t.charAt(i))throw new Error("Illegal attachments");o.attachments=Number(s)}if("/"===t.charAt(i+1))for(o.nsp="";++i&&","!==(c=t.charAt(i))&&(o.nsp+=c,i!==t.length););else o.nsp="/";var r=t.charAt(i+1);if(""!==r&&Number(r)==r){for(o.id="";++i;){var c;if(null==(c=t.charAt(i))||Number(c)!=c){--i;break}if(o.id+=t.charAt(i),i===t.length)break}o.id=Number(o.id)}if(t.charAt(++i)){var u=function(e){try{return JSON.parse(e)}catch(t){return!1}}(t.substr(i));if(!1===u||o.type!==e.ERROR&&!n(u))return a("invalid payload");o.data=u}return o}(t),this.emit("decoded",i)},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}(Ol);var Ll={exports:{}},Pl={},Nl={},wl=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var i in e)n.call(e,i)&&t.push(i);return t},Ul=Al,Gl=Object.prototype.toString,xl="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Gl.call(Blob),Fl="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Gl.call(File),Bl=function e(t){if(!t||"object"!=typeof t)return!1;if(Ul(t)){for(var n=0,i=t.length;n=55296&&t<=56319&&o=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function $l(e,t){return zl(e>>t&63|128)}function Jl(e,t){if(!(4294967168&e))return zl(e);var n="";return 4294965248&e?4294901760&e?!(4292870144&e)&&(n=zl(e>>18&7|240),n+=$l(e,12),n+=$l(e,6)):(Yl(e,t)||(e=65533),n=zl(e>>12&15|224),n+=$l(e,6)):n=zl(e>>6&31|192),n+zl(63&e|128)}function Xl(){if(Kl>=Hl)throw Error("Invalid byte index");var e=255&jl[Kl];if(Kl++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function Ql(e){var t,n;if(Kl>Hl)throw Error("Invalid byte index");if(Kl==Hl)return!1;if(t=255&jl[Kl],Kl++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Xl())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Xl()<<6|Xl())>=2048)return Yl(n,e)?n:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Xl()<<12|Xl()<<6|Xl())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}var Zl={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,i=Wl(e),o=i.length,s=-1,a="";++s65535&&(o+=zl((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=zl(t);return o}(o)}},ed=void 0!==ed?ed:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,td=function(){try{return 2===new Blob(["hi"]).size}catch(Yr){return!1}}(),nd=td&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(Yr){return!1}}(),id=ed&&ed.prototype.append&&ed.prototype.getBlob;function od(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function sd(e,t){t=t||{};var n=new ed;return od(e).forEach((function(e){n.append(e)})),t.type?n.getBlob(t.type):n.getBlob()}function ad(e,t){return new Blob(od(e),t||{})}"undefined"!=typeof Blob&&(sd.prototype=Blob.prototype,ad.prototype=Blob.prototype);var rd=td?nd?Blob:ad:id?sd:void 0;!function(e){var t=wl,n=Bl,i=ql,o=Zl;e.protocol=3;var s=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},a=t(s),r={type:"error",data:"parser error"},c=rd;e.encodePacket=function(e,t,n,i){"function"==typeof t&&(i=t,t=!1),"function"==typeof n&&(i=n,n=null),void 0===e.data||e.data.buffer||e.data;var a=s[e.type];return void 0!==e.data&&(a+=n?o.encode(String(e.data),{strict:!1}):String(e.data)),i(""+a)},e.decodePacket=function(e,t,n){if(void 0===e)return r;if("string"==typeof e){if(n&&!1===(e=function(e){try{e=o.decode(e,{strict:!1})}catch(t){return!1}return e}(e)))return r;var i=e.charAt(0);return Number(i)==i&&a[i]?e.length>1?{type:a[i],data:e.substring(1)}:{type:a[i]}:r}i=new Uint8Array(e)[0];var s=sliceBuffer(e,1);return c&&"blob"===t&&(s=new c([s])),{type:a[i],data:s}},e.encodePayload=function(t,o,s){"function"==typeof o&&(s=o,o=null);var a=n(t);if(!t.length)return s("0:");!function(t){for(var n=new Array(t.length),r=i(t.length,(function(e,t){return s(t.join(""))})),c=function(t,i,s){!function(t,n){e.encodePacket(t,!!a&&o,!0,(function(e){n(null,function(e){return e.length+":"+e}(e))}))}(i,(function(e,i){n[t]=i,s(e,n)}))},u=0;u0);return t}function yd(){var e=vd(+new Date);return e!==dd?(md=0,dd=e):e+"."+vd(md++)}for(;_d<64;_d++)fd[gd[_d]]=_d;yd.encode=vd,yd.decode=function(e){var t=0;for(_d=0;_d';i=document.createElement(e)}catch(t){(i=document.createElement("iframe")).name=n.iframeId,i.src="javascript:0"}i.id=n.iframeId,n.form.appendChild(i),n.iframe=i}this.form.action=this.uri(),c(),e=e.replace(Ud,"\\\n"),this.area.value=e.replace(wd,"\\n");try{this.form.submit()}catch(u){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&r()}:this.iframe.onload=r};var Fd,Bd,qd=ud,Vd=Nl,Hd=pd,Kd=hd,zd=Id,Wd=vl.exports("engine.io-client:websocket");(void 0===Nn&&void 0===Pn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&("undefined"!=typeof WebSocket?Fd=WebSocket:"undefined"!=typeof self&&(Fd=self.WebSocket||self.MozWebSocket));var Yd=Fd||Bd;(void 0===Nn&&void 0===Pn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&"undefined"==typeof GameGlobal||(Yd=function(e){var t=this;if(t.onopen=function(){},t.onclose=function(){},t.onmessage=function(e){},t.onerror=function(e){},"object"==typeof tt&&tt.getSystemInfo){let n=tt.connectSocket({url:e});t.send=function(e){n.send({data:e})},t.close=function(){n.close()},n.onOpen((function(){t.onopen()})),n.onError((function(e){t.onerror(e)})),n.onMessage((function(e){t.onmessage(e)})),n.onClose((function(){t.onclose()}))}else if("undefined"!=typeof my)my.connectSocket({url:e}),t.send=function(e){my.sendSocketMessage({data:e})},t.close=function(e){my.closeSocket()},my.onSocketOpen((function(e){t.onopen()})),my.onSocketError((function(e){t.onerror(e)})),my.onSocketMessage((function(e){t.onmessage(e)})),my.onSocketClose((e=>{t.onclose(e)}));else if("undefined"!=typeof swan)swan.connectSocket({url:e}),t.send=function(e){swan.sendSocketMessage({data:e})},t.close=function(e){swan.closeSocket()},swan.onSocketOpen((function(e){t.onopen()})),swan.onSocketError((function(e){t.onerror(e)})),swan.onSocketMessage((function(e){t.onmessage(e)})),swan.onSocketClose((e=>{t.onclose(e)}));else if(void 0!==Nn){var n=Nn.connectSocket({url:e,complete:()=>{}});t.send=function(e){n.send({data:e})},t.close=function(){n.close()},n.onOpen((function(e){t.onopen()})),n.onError((function(e){t.onerror(e)})),n.onMessage((function(e){t.onmessage(e)})),n.onClose((function(e){t.onclose()}))}else{var i=Pn.connectSocket({url:e});t.send=function(e){i.send({data:e})},t.close=function(e){i.close({code:1e3})},i.onOpen((function(){t.onopen()})),i.onError((function(e){t.onerror(e)})),i.onMessage((function(e){t.onmessage(e)})),i.onClose((function(e){t.onclose(e)}))}});var $d=Jd;function Jd(e){e&&e.forceBase64&&(this.supportsBinary=!1),(void 0===Nn&&void 0===Pn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&(this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=Fd&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(Yd=Bd)),qd.call(this,e)}Kd(Jd,qd),Jd.prototype.name="websocket",Jd.prototype.supportsBinary=!1,Jd.prototype.doOpen=function(){if(this.check()){var e,t,n=this.uri();if((void 0===Nn&&void 0===Pn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&(e=this.protocols),(t=void 0===Nn&&void 0===Pn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket?{agent:this.agent,perMessageDeflate:this.perMessageDeflate}:{agent:this.agent}).pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,"object"==typeof navigator&&"ReactNative"===navigator.product&&(t={}),this.extraHeaders&&(t.headers=this.extraHeaders),this.localAddress&&(t.localAddress=this.localAddress),"undefined"!=typeof cc&&"Windows"===cc.sys.os)cc.resources.load("cacert",((e,t)=>{const i=t.nativeUrl;this.ws=new Yd(n,[],i),this.ws.binaryType="arraybuffer",this.addEventListeners()}));else{try{void 0===Nn&&void 0===Pn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket?this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new Yd(n,e):new Yd(n):new Yd(n,e,t):this.ws=new Yd(n)}catch(i){return this.emit("error",i)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}}},Jd.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},Jd.prototype.write=function(e){var t=this;this.writable=!1;for(var n=e.length,i=0,o=n;i0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}up.priorWebsocketSuccess=!1,np(up.prototype),up.protocol=sp.protocol,up.Socket=up,up.Transport=ud,up.transports=Pl,up.parser=Nl,up.prototype.createTransport=function(e){ip('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=sp.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new tp[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},up.prototype.open=function(){var e;if(this.rememberUpgrade&&up.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},up.prototype.setTransport=function(e){ip("setting transport %s",e.name);var t=this;this.transport&&(ip("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},up.prototype.probe=function(e){ip('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,i=this;function o(){if(i.onlyBinaryUpgrades){var o=!this.supportsBinary&&i.transport.supportsBinary;n=n||o}n||(ip('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(ip('probe transport "%s" pong',e),i.upgrading=!0,i.emit("upgrading",t),!t)return;up.priorWebsocketSuccess="websocket"===t.name,ip('pausing current transport "%s"',i.transport.name),i.transport.pause((function(){n||"closed"!==i.readyState&&(ip("changing transport and sending upgrade packet"),l(),i.setTransport(t),t.send([{type:"upgrade"}]),i.emit("upgrade",t),t=null,i.upgrading=!1,i.flush())}))}else{ip('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,i.emit("upgradeError",s)}})))}function s(){n||(n=!0,l(),t.close(),t=null)}function a(n){var o=new Error("probe error: "+n);o.transport=t.name,s(),ip('probe transport "%s" failed because of error: %s',e,n),i.emit("upgradeError",o)}function r(){a("transport closed")}function c(){a("socket closed")}function u(e){t&&e.name!==t.name&&(ip('"%s" works - aborting "%s"',e.name,t.name),s())}function l(){t.removeListener("open",o),t.removeListener("error",a),t.removeListener("close",r),i.removeListener("close",c),i.removeListener("upgrading",u)}up.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",a),t.once("close",r),this.once("close",c),this.once("upgrading",u),t.open()},up.prototype.onOpen=function(){if(ip("socket open"),this.readyState="open",up.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){ip("starting upgrade probes");for(var e=0,t=this.upgrades.length;e0&&e.jitter<=1?e.jitter:0,this.attempts=0}mp.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},mp.prototype.reset=function(){this.attempts=0},mp.prototype.setMin=function(e){this.ms=e},mp.prototype.setMax=function(e){this.max=e},mp.prototype.setJitter=function(e){this.jitter=e};class _p{static init(e,t,n){this.host=e,(void 0!==t&&!1===t||!0===n)&&(this.https=!1)}static isMP(){return[ic.MP_WX,ic.MP_ALI,ic.MP_BYTE,ic.MP_WGAME,ic.MP_BAIDU].includes(oc.currentPlatform())}static uri(){let e="http";return this.https&&(e+="s"),e+"://"+this.index()+this.host}static index(){return 0==this.i?this.i=Math.floor(Math.random()*this.max)+1:this.i=this.i%this.max+1,this.i}}_p.i=0,_p.max=5,_p.https=!0;var vp=_c(Object.freeze({__proto__:null,URIResolver:_p})),yp=_c(hc),Ip=Ll.exports,Mp=lp.exports,Cp=vc.exports,Sp=Ol,Ep=pp,Tp=gp,kp=(vl.exports("socket.io-client:manager"),ep),Dp=fp;const{URIResolver:Rp}=vp;var Op=yp.runStatus,bp=Object.prototype.hasOwnProperty,Ap=Lp;function Lp(e,t){if(!(this instanceof Lp))return new Lp(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new Dp({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||Sp;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}Lp.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)bp.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},Lp.prototype.updateSocketIds=function(){for(var e in this.nsps)bp.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},Lp.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},Cp(Lp.prototype),Lp.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},Lp.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},Lp.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},Lp.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},Lp.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},Lp.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},Lp.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},Lp.prototype.open=Lp.prototype.connect=function(e,t){if(this.readyState,~this.readyState.indexOf("open"))return this;this.uri,this.engine=Ip(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=Ep(n,"open",(function(){i.onopen(),e&&e()})),s=Ep(n,"error",(async function(t){if(i.uri=Rp.uri(),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()}));if(!1!==this._timeout){var a=this._timeout,r=setTimeout((function(){o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",a)}),a);this.subs.push({destroy:function(){clearTimeout(r)}})}return this.subs.push(o),this.subs.push(s),this},Lp.prototype.onopen=function(){this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(Ep(e,"data",Tp(this,"ondata"))),this.subs.push(Ep(e,"ping",Tp(this,"onping"))),this.subs.push(Ep(e,"pong",Tp(this,"onpong"))),this.subs.push(Ep(e,"error",Tp(this,"onerror"))),this.subs.push(Ep(e,"close",Tp(this,"onclose"))),this.subs.push(Ep(this.decoder,"decoded",Tp(this,"ondecoded")))},Lp.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},Lp.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},Lp.prototype.ondata=function(e){this.decoder.add(e)},Lp.prototype.ondecoded=function(e){this.emit("packet",e)},Lp.prototype.onerror=function(e){this.emitAll("error",e)},Lp.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new Mp(this,e,t),this.nsps[e]=n;var i=this;n.on("connecting",o),n.on("connect",(function(){n.id=i.generateId(e)})),this.autoConnect&&o()}function o(){~kp(i.connecting,n)||i.connecting.push(n)}return n},Lp.prototype.destroy=function(e){var t=kp(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},Lp.prototype.packet=function(e){var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var i=0;i0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},Lp.prototype.cleanup=function(){for(var e=this.subs.length,t=0;t=this._reconnectionAttempts)this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();this.reconnecting=!0;var n=setTimeout((function(){if(Op.isBackend())return e.reconnecting=!1,e.reconnect(),void e.emitAll("reconnect_error","Uniapp running backend, skipped reconnect...");e.skipReconnect||(e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):e.onreconnect()})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},Lp.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)},function(e,t){var n=Rl,i=Ol,o=Ap;vl.exports("socket.io-client"),e.exports=t=a;var s=t.managers={};function a(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,a=n(e),r=a.source,c=a.id,u=a.path,l=s[c]&&u in s[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?i=o(r,t):(s[c]||(s[c]=o(r,t)),i=s[c]),a.query&&!t.query&&(t.query=a.query),i.socket(a.path,t)}t.protocol=i.protocol,t.connect=a,t.Manager=Ap,t.Socket=lp.exports}(gl,gl.exports);const Pp=gl.exports;class Np{constructor(){this.io=Pp,this.status=Wr.DISCONNECTED,this.permissions=[Jc.NONE],this.connectedObservers=[],this.disconnectedObservers=[]}connect(){this.status=Wr.CONNECTING}socketio(){return this.io}on(e,t){this.io.on(e,t)}disconnect(){this.io.disconnect()}getStatus(){return this.status}addConnectedObserver(e){nc.isFunction(e)&&this.connectedObservers.push(e)}addDisconnectedObserver(e){nc.isFunction(e)&&this.disconnectedObservers.push(e)}notify(e,t){for(let n=0;n{this.status=Wr.CONNECTED,this.notify(this.connectedObservers)})),this.io.on("reconnecting",(e=>{this.status=Wr.CONNECTING,this.notify(this.reconnectingObservers,e)})),this.io.on("disconnect",(()=>{this.status=Wr.DISCONNECTED,this.notify(this.disconnectedObservers)})),this.io.on("connect_error",(function(e){}))}addReconnectingObserver(e){this.reconnectingObservers.push(e)}}class Up{static get(e){const t=encodeURIComponent(e)+"=",n=document.cookie.split("; ");for(const i of n)if(i.startsWith(t))return decodeURIComponent(i.substring(t.length));return null}static set(e,t,n,i,o="/",s=!1){let a=encodeURIComponent(e)+"="+encodeURIComponent(t);n instanceof Date&&(a+="; expires="+n.toGMTString()),o&&(a+="; path="+o),i&&(a+="; domain="+i),s&&(a+="; secure"),document.cookie=a}static remove(e,t,n="/",i=!1){Up.set(e,"",new Date(0),t,n,i)}}class Gp{asyncGet(e){let t=this.get(e);return Promise.resolve(t)}asyncPut(e,t){return this.put(e,t),Promise.resolve()}get(e){let t=this.doGet(e);return t=JSON.parse(t),t}put(e,t){this.doPut(e,JSON.stringify(t))}}class xp extends Gp{constructor(){super(),this.domain=null,this.domain="undefined"!=typeof location&&/^(?:[A-za-z0-9-]+\.)+[A-za-z]{2,4}(?:[\/\?#][\/=\?%\-&~`@[\]\':+!\.#\w]*)?$/.test(location.host)?location.host.split(".").slice(-2).join("."):null}doGet(e){return Up.get(e)||null}doPut(e,t){const n=new Date(2030,12,31,0,0,0,0),i=this.domain;Up.set(e,t,n,i)}remove(e){const t=this.domain;Up.remove(e,t)}support(){return"undefined"!=typeof navigator&&!0===navigator.cookieEnabled}}class Fp extends Gp{doGet(e){return localStorage.getItem(e)||null}doPut(e,t){localStorage.setItem(e,t)}remove(e){localStorage.removeItem(e)}support(){return!("undefined"!=typeof GameGlobal||"undefined"==typeof localStorage||!localStorage.setItem)}}class Bp extends Gp{doGet(e){return Nn.getStorageSync(e)||null}doPut(e,t){Nn.setStorageSync(e,t)}remove(e){Nn.removeStorageSync(e)}support(){return!("object"!=typeof Nn||!Nn.getStorageSync)}}class qp extends Gp{doGet(e){return cc.sys.localStorage.getItem(e)||null}doPut(e,t){cc.sys.localStorage.setItem(e,t)}remove(e){cc.sys.localStorage.removeItem(e)}support(){return"undefined"!=typeof cc&&void 0!==cc.sys.localStorage}}class Vp extends Gp{doGet(e){return Pn.getStorageSync(e)||null}doPut(e,t){Pn.setStorageSync(e,t)}remove(e){Pn.removeStorageSync(e)}support(){return!("object"!=typeof Pn||!Pn.getStorageSync||"undefined"!=typeof tt)}}class jp extends Gp{asyncGet(e){return fc(this,void 0,void 0,(function*(){const t=yield Jr.asyncStorage.getItem(e);return JSON.parse(t)}))}asyncPut(e,t){return Jr.asyncStorage.setItem(e,JSON.stringify(t))}doPut(e,t){throw new Error("Method not implemented.")}remove(e){Jr.asyncStorage.removeItem(e)}support(){return $r.currentFramework()===zr.REACT_NATIVE}doGet(e){throw new Error("Method not implemented.")}}class Hp extends Gp{doGet(e){const t=my.getStorageSync({key:e}).data||null;return"string"==typeof JSON.parse(t)?JSON.parse(t):t}doPut(e,t){my.setStorageSync({key:e,data:JSON.stringify(t)})}remove(e){my.removeStorageSync({key:e})}support(){return!("undefined"==typeof my||!my.getStorageSync)}}class Kp extends Gp{doGet(e){return tt.getStorageSync(e)||null}doPut(e,t){tt.setStorageSync(e,t)}remove(e){tt.removeStorageSync(e)}support(){return!("object"!=typeof tt||!tt.getStorageSync)}}class zp extends Gp{doGet(e){return swan.getStorageSync(e)||null}doPut(e,t){swan.setStorageSync(e,t)}remove(e){swan.removeStorageSync(e)}support(){return!("undefined"==typeof swan||!swan.getStorageSync)}}class Wp{constructor(){this.supportedStorage=null;const e=Wp.storages;e.push(new Bp),e.push(new qp),e.push(new Fp),e.push(new Vp),e.push(new jp),e.push(new Hp),e.push(new zp),e.push(new Kp),e.push(new xp),this.dispatch(),this.supportedStorage}static localStorage(){return this.instance.supportedStorage}dispatch(){for(let e of Wp.storages)if(e.support()){this.supportedStorage=e;break}}}Wp.storages=new Array,Wp.instance=new Wp;class Yp{static get(){return fc(this,void 0,void 0,(function*(){let e,t=Wp.localStorage();return null!==t&&(e=yield t.asyncGet(Yp.SM_KEY)),e}))}static put(e){return fc(this,void 0,void 0,(function*(){var t=Wp.localStorage();let n=e.sm;null!==t&&n&&t.asyncPut(Yp.SM_KEY,n)}))}}Yp.SM_KEY="GE-SM";class $p{static e(e,t){let n="";for(let s=0;s=32&&o<=126?String.fromCharCode(function(e){let n=e+t;return n>126?n-126+32:n}(i)):String.fromCharCode(i));var i,o;return n}}class Jp{static initRNUniqueId(){if($r.currentFramework()===zr.REACT_NATIVE){let e=Jr.platform,t=e.constants,n={os:e.OS};return"android"===n.os?n.f=t.Fingerprint:n.v=e.Version,JSON.stringify(n)}return null}static initPlusDeviceId(){return new Promise(((e,t)=>{"undefined"!=typeof plus?plus.device.getInfo({success:t=>{e(t.uuid)},fail:e=>{t(e)}}):e(null)}))}static getVideoCard(){var e;if(oc.currentPlatform()===ic.BROWSER&&"undefined"!=typeof document){const t=document.createElement("canvas"),n=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(n&&"getExtension"in n){let e=0,t=0;if(navigator.userAgent.indexOf("Firefox")>-1)t=n.VENDOR,e=n.RENDERER;else{let i=n.getExtension("WEBGL_debug_renderer_info");if(!i)return null;t=i.UNMASKED_VENDOR_WEBGL,e=i.UNMASKED_RENDERER_WEBGL}const i={vendor:(n.getParameter(t)||"").toString(),renderer:(n.getParameter(e)||"").toString()};return JSON.stringify(i)}}return null}static z(){return fc(this,void 0,void 0,(function*(){const e={p:oc.currentPlatform(),f:$r.currentFramework(),vc:this.getVideoCard(),rfp:this.initRNUniqueId()};return $p.e(JSON.stringify(e),5)}))}}class Xp{constructor(e){this.rocketsBuffer=new Set,this.socket=e,this.socket.addConnectedObserver(this.onSocketConnected.bind(this))}emit(e){this.socket.status!==Wr.DISCONNECTED?(e.start(),this.doEmit(e)):e.fail({resultCode:"409",content:"Please connect first"})}doEmit(e){if(!e.complete)if(this.socket.status!==Wr.CONNECT_FAILED)if(this.isConnected())if(this.hasPermission(e)){let t=setTimeout((()=>{this.doEmit(e)}),e.singleTimeout);e.unique&&(e.params.retried=e.retried),this.socket.socketio().emit(e.name,e.params,(n=>{clearTimeout(t),200===n.resultCode||200==n.code?e.success(n):e.fail(n)})),e.retried++}else e.fail({resultCode:401,content:"No permission"});else this.isConnecting()&&this.rocketsBuffer.add(e);else e.fail({resultCode:408,content:"Failed to connect GoEasy."})}hasPermission(e){return!!this.socket.permissions.find((t=>t===e.permission))}isConnected(){return[Wr.CONNECTED,Wr.RECONNECTED,Wr.EXPIRED_RECONNECTED,Wr.DISCONNECTING].includes(this.socket.status)}isConnecting(){return[Wr.CONNECTING,Wr.RECONNECTING].includes(this.socket.status)}onSocketConnected(){this.emitBuffer()}emitBuffer(){Array.from(this.rocketsBuffer).forEach((e=>{this.rocketsBuffer.delete(e),this.doEmit(e)}))}}class Qp extends jc{static init(){Qp.i=new Qp}static fire(e,t){this.i.fire(e,t)}static on(e,t){this.i.on(e,t)}static off(e,t){this.i.off(e,t)}}class Zp extends Np{constructor(e,t){super(),this.ioSocket=null,this.sid=null,this.anonymous=!1,this.userId=null,this.artifactVersion=Xr,this.vname=null,this.uri=null,this.ioOpts=null,this.reconnectingTimes=0,this.messageObservers=new Map,this.connectFailedObservers=[],this.connectingObservers=[],this.expiredReconnectedObservers=[],this.options=e,this.ioSocket=new wp({onDisconnected:this.onIoDisconnected.bind(this),onReconnecting:this.onIoReconnecting.bind(this)}),this.ioSocketEmitter=new Xp(this.ioSocket),this.ioSocket.addConnectedObserver(this.onIoReconnected.bind(this)),this.initOptions(t),this.connect()}initUserId(){let e=this.connectOptions.id;nc.isEmpty(e)?this.anonymous=!0:this.userId=e.toString()}socketio(){return this.ioSocket.socketio()}extendOptions(){let e=this.connectOptions;if(nc.isNull(e.data)||nc.isDef(e.data)&&!nc.isObject(e.data))throw{code:400,content:"TypeError: data requires an object."};if((nc.isDef(e.data)?String(e.data).length:0)>300&&nc.isObject(e)&&nc.isFunction(e.onFailed))throw{code:400,content:"user.data-length limit 300 byte."};if(nc.isObject(e.wxmpId)){if(nc.isEmpty(e.wxmpId.appid))throw{code:400,content:"wxmpId.appid is required."};if(nc.isEmpty(e.wxmpId.openid))throw{code:400,content:"wxmpId.openid is required. requires string."}}else if(nc.isPrimitive(e.wxmpId))throw{code:400,content:"TypeError: wxmpId requires an object."}}initUriAndOpts(){let e=this.options;_p.init(e.host,e.forceTLS,e.supportOldBrowser),this.uri=_p.uri();let t=["websocket"];!0===e.supportOldBrowser&&t.push("polling"),this.ioOpts={transports:t,timeout:pc.connect,reconnectionDelayMax:pc.reconnectionDelayMax}}onIoReconnected(){this.status===Wr.RECONNECTING&&this.authorize()}sendAck(e,t){this.ioSocket.io.emit(e,t)}initOptions(e){this.connectOptions=e,this.addConnectedObserver(e.onSuccess),this.addConnectFailedObserver(e.onFailed),this.addConnectingObserver(e.onProgress),this.initUserId()}connect(){this.initUriAndOpts(),this.extendOptions(),super.connect(),this.onConnecting(),this.ioSocket.connect({uri:this.uri,opts:this.ioOpts}),this.authorize()}disconnect(){return new Promise(((e,t)=>{this.status=Wr.DISCONNECTING;let n=()=>{this.ioSocket.disconnect(),this.status=Wr.DISCONNECTED,Qp.fire(ru.DISCONNECTED),e()};const i=Bc.modules.get("GN");if(i&&(i.params.regId||this.connectOptions.wxmpId)){let e=e=>{t(e)},i=new Qc({name:dc.manualDisconnect,params:{},permission:Jc.READ,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e,success:n});Wc.Socket.e(i)}else n()}))}authorize(){return fc(this,void 0,void 0,(function*(){let e=this.connectOptions,t={appkey:this.options.appkey,userId:this.userId,userData:JSON.stringify(e.data),otp:e.otp,artifactVersion:this.artifactVersion,sid:this.sid,mP:yield Bc.getParams(),a:this.anonymous,z:yield Jp.z(),sm:yield Yp.get(),c:{n:this.vname,v:this.artifactVersion}};JSON.stringify(t);let n=new Qc({name:dc.authorize,params:t,permission:Jc.NONE,singleTimeout:pc.commonInfiniteSingle,totalTimeout:pc.commonInfiniteTotal,success:e=>{this.onAuthorizeSuccess(e)},fail:e=>{this.onAuthorizeFailed(e)}});this.ioSocketEmitter.emit(n)}))}onConnecting(){Qp.fire(ru.CONNECTING,this.reconnectingTimes),this.notify(this.connectingObservers,this.reconnectingTimes)}onIoReconnecting(){this.reconnectingTimes++,this.status==Wr.CONNECTED||this.status==Wr.EXPIRED_RECONNECTED||this.status==Wr.RECONNECTING?this.status=Wr.RECONNECTING:this.status=Wr.CONNECTING,this.onConnecting()}onIoDisconnected(){this.status!==Wr.DISCONNECTING&&(this.status=Wr.RECONNECTING,Qp.fire(ru.LOST),this.notify(this.disconnectedObservers))}onAuthorizeSuccess(e){Yp.put(e),Bc.setDatas(e.mD),this.status===Wr.RECONNECTING?this.sid!==e.sid?(this.status=Wr.EXPIRED_RECONNECTED,this.sid=e.sid,Qp.fire(ru.EXPIRED_RECONNECTED),this.notify(this.expiredReconnectedObservers)):(this.status=Wr.RECONNECTED,Qp.fire(ru.RECONNECTED)):(this.status=Wr.CONNECTED,this.sid=e.sid),e.enablePublish&&(this.permissions.find((e=>e==Jc.WRITE))||this.permissions.push(Jc.WRITE)),e.enableSubscribe&&(this.permissions.find((e=>e==Jc.READ))||this.permissions.push(Jc.READ)),this.reconnectingTimes=0,Qp.fire(ru.CONNECTED),this.notify(this.connectedObservers)}onAuthorizeFailed(e){this.ioSocket.disconnect(),this.status=Wr.CONNECT_FAILED;let t={code:e.resultCode||408,content:e.content||"Host unreachable or timeout"};this.notify(this.connectFailedObservers,t)}addConnectingObserver(e){nc.isFunction(e)&&this.connectingObservers.push(e)}addConnectFailedObserver(e){nc.isFunction(e)&&this.connectFailedObservers.push(e)}addExpiredReconnectedObserver(e){nc.isFunction(e)&&this.expiredReconnectedObservers.push(e)}onMessage(e,t){this.ioSocket.io._callbacks.hasOwnProperty("$"+e)||this.ioSocket.io.on(e,t)}user(){let e=this.connectOptions;return e?{id:e.id,data:e.data}:null}}class eh{constructor(e){this.guidList=[],this.socket=e}offMessage(e,t){Qp.off(ru.NEW_MESSAGE+"_"+e,t)}onMessage(e,t){Qp.on(ru.NEW_MESSAGE+"_"+e,t),this.socket.onMessage(e,(t=>{this.fire(e,t)}))}fire(e,t){let n=this.filter(t);n&&Qp.fire(ru.NEW_MESSAGE+"_"+e,n)}filter(e){if("string"==typeof e&&(e=JSON.parse(e)),e.i){if(this.guidList.findIndex((t=>t===e.i))>-1)return;this.guidList.unshift(e.i),this.guidList.length>300&&this.guidList.pop()}return e}}class th{static init(e){this.i=new th(e)}constructor(e){this.goeasyOptions=e}static connect(e,t){if(this.status()!==Wr.DISCONNECTED&&nc.isObject(e)&&nc.isFunction(e.onFailed))return void e.onFailed({code:408,content:"It is already connected, don't try again until disconnect() is called. "});this.confirmUserIdAndData(e),Qp.init();let n=this.i;Bc.preConnect(e),n.socket=new Zp(n.goeasyOptions,e),n.socket.vname=t,n.emitter=new Xp(n.socket),n.messageListener=new eh(n.socket),Bc.postConnect()}static confirmUserIdAndData(e){if(Bc.modules.get("GIM"))nu.validateId(e.id,"id"),nu.validateObject(e.data,"data");else if("string"==typeof e.id&&e.id.length>60)throw{code:400,content:"id over max length 60"}}static e(e){this.i.emitter.emit(e)}static sendAck(e,t){this.i.socket.sendAck(e,t)}static status(){return this.i&&this.i.socket?this.i.socket.getStatus():Wr.DISCONNECTED}static on(e,t){Qp.on(e,t)}static off(e,t){Qp.off(e,t)}static offMessage(e,t){this.i.messageListener.offMessage(e,t)}static onMessage(e,t){this.i.messageListener.onMessage(e,t)}static disconnect(e){this.status()===Wr.CONNECTED||this.status()===Wr.RECONNECTED?this.i.socket.disconnect().then((()=>{gc.onSuccess(e)})).catch((t=>{gc.onFailed(e,t)})):gc.onFailed(e,{code:408,content:"Host unreachable or timeout"})}static user(){return this.i.socket.user()}}th.EVENT=ru;class nh{static getInstance(){return nh.instance||(nh.instance=new nh),nh.instance}constructor(){this.synchronized=!0,this.onlineChanged=e=>{e.online?this.teamIds.add(e.teamId):this.teamIds.delete(e.teamId)},this.onDisconnected=()=>{this.queryMyTeamPromise=null,this.teamIds=null},this.onConnected=()=>{this.synchronized&&(this.queryMyTeamPromise=this.queryTeams())},th.on(th.EVENT.LOST,this.onDisconnected),th.on(th.EVENT.RECONNECTED,this.onConnected),th.onMessage(au.CS_ONLINE_CHANGED,this.onlineChanged)}queryTeams(){return this.queryMyTeamPromise||(this.queryMyTeamPromise=new Promise(((e,t)=>{let n=new Qc({name:dc.CS_MY_TEAMS,params:{},permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{t(e)},success:t=>{this.teamIds=new Set(t.content),this.synchronized=!0,e(this.teamIds)}});Wc.Socket.e(n)}))),this.queryMyTeamPromise}myTeams(){if(this.synchronized&&this.queryMyTeamPromise)return this.teamIds;throw"please query team first."}isOnline(e,t){return fc(this,void 0,void 0,(function*(){yield this.queryTeams(),gc.onSuccess(t,this.teamIds.has(e))}))}online(e,t){if(!nc.isObject(t.agentData)||!nc.isObject(t.teamData))throw{code:400,content:"agentData and teamData require an object"};let n=new dl(e,t.teamData,t.agentData),i=new Qc({name:dc.CS_ONLINE,params:n,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{gc.onFailed(t,e)},success:n=>{this.teamIds.add(e),gc.onSuccess(t),Vu.i.fire(Lu.CS_ONLINE_SUCCESS)}});Wc.Socket.e(i)}offline(e,t){let n=new pl(e),i=new Qc({name:dc.CS_OFFLINE,params:n,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{gc.onFailed(t,e)},success:n=>{this.teamIds.delete(e),gc.onSuccess(t),Vu.i.fire(Lu.CS_OFFLINE_SUCCESS)}});Wc.Socket.e(i)}agents(e,t){let n=new hl(e),i=new Qc({name:dc.CS_AGENTS,params:n,permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{gc.onFailed(t,e)},success:e=>{e.content.forEach((e=>{e.data=JSON.parse(e.data)})),gc.onSuccess(t,e)}});Wc.Socket.e(i)}}class ih{constructor(e){this.onMessageReceived=e=>{let t=ih.session;if(e.scene()===Qr.CS&&t.liveOptions){let n=e,i=t.liveOptions.customerId;t.teamId===n.teamId&&n.customerId()===i&&(t.tryUpdateStatus(n),t.liveOptions.onNewMessage(n))}},this.teamId=e,Vu.i.on(Lu.CS_AGENT_MESSAGE_RECEIVED,this.onMessageReceived),Vu.i.on(Lu.CS_ACCEPTED,this.onMessageReceived),Vu.i.on(Lu.CS_ENDED,this.onMessageReceived),Vu.i.on(Lu.CS_TRANSFER,this.onMessageReceived),th.on(ru.DISCONNECTED,ih.destroy)}static live(e,t){return fc(this,void 0,void 0,(function*(){let n=t.customerId;nu.validateId(n,"customerId");let i=new ul(e,n);yield nh.getInstance().queryTeams();let o=new Qc({name:dc.CS_LIVE_SESSION,params:i,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{gc.onFailed(t,e)},success:n=>{ih.destroy(),this.session=new ih(e),this.session.liveOptions=t;let i=n.content.customerStatus;"ACCEPTED"===i.status&&(i.agent.data=JSON.parse(i.agent.data)),this.session.status=i,this.session.liveOptions.onStatusUpdated(this.session.status),gc.onSuccess(t)}});Wc.Socket.e(o)}))}customerId(){return this.liveOptions.customerId}static isMyCustomer(e){let t=ih.session;if(t&&t.teamId===e.teamId&&t.customerId()===e.customerId()){let n=nh.getInstance().myTeams(),i=t.status.agent;return n.has(e.teamId)&&(!i||i.id===Wc.Socket.user().id)}return!0}static isMyMessage(e){let t=Wu.byIMMessage(e);return e.type===Nu.TRANSFER&&e.payload.transferTo.id===Wc.Socket.user().id||this.isMyCustomer(t)}static quit(e){let t=ih.session;if(t){let n=t.liveOptions.customerId;nu.validateId(n,"customerId");let i=new ul(t.teamId,n),o=new Qc({name:dc.CS_QUIT_LIVE,params:i,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:t=>{gc.onFailed(e,t)},success:t=>{ih.destroy(),gc.onSuccess(e)}});Wc.Socket.e(o)}}tryUpdateStatus(e){if("FREE"!==this.status.status&&this.status.sessionId>e.sessionId)return;let t;switch(e.type){case Nu.ACCEPT:t=new ll,t.status="ACCEPTED",t.start=e.payload.sessionStart,t.sessionId=e.sessionId,t.agent=new tc(e.senderId,e.senderData);break;case Nu.END:t=new ll,t.status="FREE";break;case Nu.TRANSFER:t=new ll,t.status="ACCEPTED",t.start=e.payload.sessionStart,t.sessionId=e.sessionId,t.agent=e.payload.transferTo;break;default:"FREE"===this.status.status&&(t=new ll,t.status="PENDING",t.start=e.timestamp,t.sessionId=e.sessionId)}t&&(this.status=t,this.liveOptions.onStatusUpdated(t))}}ih.destroy=()=>{let e=ih.session;e&&(Vu.i.off(Lu.CS_AGENT_MESSAGE_RECEIVED,e.onMessageReceived),Vu.i.off(Lu.CS_ACCEPTED,e.onMessageReceived),Vu.i.off(Lu.CS_ENDED,e.onMessageReceived),Vu.i.off(Lu.CS_TRANSFER,e.onMessageReceived),th.off(ru.DISCONNECTED,ih.destroy),ih.session=null)};class oh extends cl{constructor(e){super(e),this.unread=0,this.markingAmount=0}loadHistory(e,t){return fc(this,void 0,void 0,(function*(){return nc.isUndef(t)?t=10:t>30&&(t=30),yield this.loadServerMessages(e,t)}))}loadServerMessages(e,t){return fc(this,void 0,void 0,(function*(){let n=new ol(this.target.id.toString(),this.target.scene,e,t,this.target.teamId),i=yield this.remoteHistory.loadServerMessages(this.target,n);return i.userOffsets.forEach((e=>{this.userOffsets.updateOffset(e.userId,e.offset)})),i.messages}))}deleteMessages(e){return fc(this,void 0,void 0,(function*(){gc.onFailed(e,"Delete CS message is not supported yet")}))}initMaxMessageAndOffsets(e,t){t.forEach((e=>{this.userOffsets.updateOffset(e.userId,e.offset)})),(nc.isUndef(this.acceptedMaxMessage)||this.acceptedMaxMessage.timestamp{this.userOffsets.updateOffset(e.userId,e.offset)})),this.savePendingMessage(e)}savePendingMessage(e){this.pendingMaxMessage?this.pendingMaxMessage.timestampthis.userOffsets.markingTime&&e>t&&(this.userOffsets.markingTime=e,this.markingAmount=this.unread,!0)}postMark(e){e===this.userOffsets.markingTime&&(this.unread-=this.markingAmount,this.markingAmount=0,this.userOffsets.updateOffset(Wc.Socket.user().id,e),Vu.i.fire(Lu.UNREAD_AMOUNT_CHANGED,this.target))}syncMarkedMessage(e){}getMaxMessage(e){return e?this.acceptedMaxMessage:this.pendingMaxMessage}unreadAmount(e){return e?this.unread:0}existsMessage(e){return this.acceptedMaxMessage&&this.acceptedMaxMessage.messageId===e.messageId||this.pendingMaxMessage&&this.pendingMaxMessage.messageId===e.messageId}maxAcceptedMessageTime(){return this.acceptedMaxMessage?this.acceptedMaxMessage.timestamp:0}maxTime(e){let t=this.getMaxMessage(e);return t?t.timestamp:0}}class sh extends cl{constructor(e){super(e)}deleteMessages(e){return fc(this,void 0,void 0,(function*(){gc.onFailed(e,"Delete CS message is not supported yet")}))}}class ah{static validateMessageArray(e){if(!nc.isArray(e)||nc.isEmpty(e))throw{code:400,content:"messages requires non empty array"};if(e.length>20)throw{code:400,content:"The maximum number of messages is 20"};let t=Wu.byIMMessage(e[0]);for(let n=0;n0){let e=Wu.byIMMessage(i);if(e.scene!==t.scene||e.id!==t.id)throw{code:400,content:"each message must be from the same friend or group"}}}}}class rh{static init(){return rh.instance=new rh,rh.instance}constructor(){this.map=new Map,this.onMessageSending=e=>{let t=Wu.byIMMessage(e);this.findOrCreateHistory(t).onMessageSending(e)},this.onMessageSendSuccess=e=>{let t=Wu.byIMMessage(e);this.findHistory(t).onMessageSendSuccess(e)},this.onMessageSendFailed=e=>{let t=Wu.byIMMessage(e);this.findHistory(t).onMessageSendFailed(e)},this.onMessageReceived=e=>{let t=Wu.byIMMessage(e),n=this.findOrCreateHistory(t);n.expiredTime>0&&(this.map.delete(t.toString()),n=this.findOrCreateHistory(t)),n.onMessageReceived(e)},this.onRemoteMarkRead=e=>{let t=Wu.byMessageReadRemoteEvent(e),n=this.findHistory(t);n&&n.syncMarkedMessage(e)},this.onRemoteMessageDeleted=e=>{let t=Wu.byIMMessageDeletedEvent(e),n=this.findHistory(t);n&&n.syncDeletedMessage(e.deleterId,e.times)},this.onMessageRecalled=e=>{let t=Wu.byConversationId(e.scene,e.conversationId),n=this.findHistory(t);n&&n.recallMessages(e)},this.onDisconnected=()=>{this.map.forEach(((e,t)=>{e.expire()}))},this.onReconnected=()=>{rl.fire(wu.HISTORY_EXPIRED)},this.destroy=()=>{},this.initialListeners()}initialListeners(){Vu.i.on(Lu.MESSAGE_SENDING,this.onMessageSending),Vu.i.on(Lu.MESSAGE_SEND_SUCCESS,this.onMessageSendSuccess),Vu.i.on(Lu.MESSAGE_SEND_FAILED,this.onMessageSendFailed),Vu.i.on(Lu.MESSAGE_RECEIVED,this.onMessageReceived),Vu.i.on(Lu.CS_AGENT_MESSAGE_RECEIVED,this.onMessageReceived),Vu.i.on(Lu.CS_ACCEPTED,this.onMessageReceived),Vu.i.on(Lu.CS_ENDED,this.onMessageReceived),Vu.i.on(Lu.CS_TRANSFER,this.onMessageReceived),Vu.i.on(Lu.MESSAGE_RECALLED,this.onMessageRecalled),th.onMessage(au.IM_MSG_READ,this.onRemoteMarkRead),th.onMessage(au.IM_MSG_DELETED,this.onRemoteMessageDeleted),th.on(th.EVENT.LOST,this.onDisconnected),th.on(th.EVENT.RECONNECTED,this.onReconnected)}loadHistory(e,t){return fc(this,void 0,void 0,(function*(){let n=this.queryToTarget(e,t),i=this.findOrCreateHistory(n);i.expiredTime>0&&(this.map.delete(n.toString()),i=this.findOrCreateHistory(n));let o=yield i.loadHistory(e.lastTimestamp,e.limit);gc.onSuccess(e,{code:200,content:o})}))}queryToTarget(e,t){if(nc.isDef(e.userId))return new Wu(Qr.PRIVATE,e.userId);if(nc.isDef(e.groupId))return new Wu(Qr.GROUP,e.groupId);if(nc.isDef(e.type)){if(!Object.values(Qr).includes(e.type))throw new Error("incorrect type, must be: "+Object.values(Qr));if(nc.isUndef(e.id))throw new Error("If type is not empty, id is required.");return Qr.CS==e.type&&nc.isUndef(t)&&(t=e.id),new Wu(e.type,e.id,t)}throw new Error("incorrect query options.")}privateMarkAsRead(e){return fc(this,void 0,void 0,(function*(){if(nc.isUndef(e.userId))throw new Error("userId could not be empty.");let t=Wu.byScene(Qr.PRIVATE,e.userId);yield this.markAsRead(t,e)}))}groupMarkAsRead(e){return fc(this,void 0,void 0,(function*(){if(nc.isUndef(e.groupId))throw new Error("groupId could not be empty.");let t=Wu.byScene(Qr.GROUP,e.groupId);yield this.markAsRead(t,e)}))}markMessageAsRead(e,t){return fc(this,void 0,void 0,(function*(){if(nc.isUndef(e.id))throw new Error("id could not be empty.");if(!Object.values(Qr).includes(e.type))throw new Error("incorrect type, must be: "+Object.values(Qr));Qr.CS==e.type&&nc.isUndef(t)&&(t=e.id);let n=Wu.byScene(e.type,e.id,t);yield this.markAsRead(n,e)}))}markAsRead(e,t){return fc(this,void 0,void 0,(function*(){let n=this.findHistory(e);n&&(yield n.markRead()),gc.onSuccess(t)}))}deleteMessage(e){return fc(this,void 0,void 0,(function*(){this.validateMessageArray(e.messages),$u.validate(e);let t=e.messages[0],n=Wu.byIMMessage(t),i=this.findHistory(n);if(!i)throw{code:400,content:"No message that could be deleted"};yield i.deleteMessages(e)}))}findOrCreateHistory(e){let t=this.findHistory(e);return t||(t=e.scene===Qr.CS?Wc.Socket.user().id===e.customerId()?new sh(e):new oh(e):new cl(e),this.map.set(e.toString(),t),t)}static get(e){return rh.instance.findOrCreateHistory(e)}findHistory(e){return this.map.get(e.toString())}validateMessageArray(e){ah.validateMessageArray(e)}}class ch{constructor(e){this.top=!1,this.data=null,this.dataLoaded=!1,this.target=e}toDto(){let e=this.target.scene,t=this.target.id,n=new ec;return e===Qr.PRIVATE?n.userId=t:e===Qr.GROUP?n.groupId=t:e===Qr.CS&&(n.id=this.target.teamId),n.type=e,n.lastMessage=this.getMaxMessage(),n.unread=this.getUnreadAmount(),n.top=this.top,n.data=this.data,n}getMaxMessage(){return rh.get(this.target).getMaxMessage()}getUnreadAmount(){return rh.get(this.target).unreadAmount()}maxMessageTime(){return rh.get(this.target).maxTime()}}class uh extends ch{constructor(e){super(e),this.accepted=!1}toDto(){let e=new ec,t=this.target.scene,n=this.target.id,i=this.target.teamId;return e.id=n,e.teamId=i,e.type=t,e.lastMessage=this.getMaxMessage(),e.unread=this.getUnreadAmount(),e.top=this.top,e.data=this.data,e.ended=this.isEnded(),e}isEnded(){let e=this.getMaxMessage(),t=e.type,n=e.payload;return t===Nu.END||t===Nu.TRANSFER&&n.transferTo.id!==Wc.Socket.user().id}getMaxMessage(){return rh.get(this.target).getMaxMessage(this.accepted)}getUnreadAmount(){return rh.get(this.target).unreadAmount(this.accepted)}maxMessageTime(){return rh.get(this.target).maxTime(this.accepted)}}class lh{constructor(e,t,n,i){this.type=e,this.top=t,this.targetId=n,this.teamId=i}}class dh{constructor(e,t,n){this.type=e,this.targetId=t,this.teamId=n}}class ph{constructor(e,t,n){this.type=e,this.targetId=t,this.teamId=n}}class hh{top(e,t){let n=new lh(e.scene,t,e.id,e.teamId);return new Promise(((e,t)=>{let i=new Qc({name:dc.topConversation,params:n,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:n=>{200===n.code?e(n):t(n)},fail:e=>{t(e)}});Wc.Socket.e(i)}))}remove(e){let t=new dh(e.scene,e.id,e.teamId);return new Promise(((e,n)=>{let i=new Qc({name:dc.removeConversation,params:t,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:t=>{200==t.code?e(t):n(t)},fail:e=>{n(e)}});Wc.Socket.e(i)}))}query(e){return new Promise(((t,n)=>{let i=new Qc({name:e,params:{},permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{n(e)},success:e=>fc(this,void 0,void 0,(function*(){t(e)}))});Wc.Socket.e(i)}))}loadData(e){let t=new ph(e.scene,e.id,e.teamId);return new Promise(((e,n)=>{let i=new Qc({name:dc.imData,params:t,permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,success:t=>{let n=JSON.parse(t.content);e(n)},fail:e=>{n(e)}});Wc.Socket.e(i)}))}}hh.instance=new hh;class gh{constructor(){this.list=new Array,this.builder=new tl,this.remoteConversations=hh.instance,this.synchronized=!1,Vu.i.on(Lu.MAX_MESSAGE_CHANGED,this.onMaxMessageChanged.bind(this)),Vu.i.on(Lu.UNREAD_AMOUNT_CHANGED,this.onUnreadMessageChanged.bind(this)),Vu.i.on(Lu.MAX_MESSAGE_DELETED,this.onMaxMessageDeleted.bind(this))}onUnreadMessageChanged(e){this.findConversation(e)&&this.fireUpdated()}fireUpdated(){this.debounce(this.triggerUpdate.bind(this))}triggerUpdate(){let e=this.loadLocalConversations(),t=this.getUpdatedEventName();rl.fire(t,{unreadTotal:e.content.unreadTotal,conversations:e.content.conversations})}getUpdatedEventName(){return wu.CONVERSATIONS_UPDATED}latestConversations(e){return fc(this,void 0,void 0,(function*(){this.synchronized||(yield this.loadServerConversations());let t=this.loadLocalConversations();gc.onSuccess(e,t)}))}loadServerConversations(){return fc(this,void 0,void 0,(function*(){let e=this.rocketName(),t=yield this.remoteConversations.query(e);this.convertAbbrConversation(t.content),this.synchronized=!0}))}rocketName(){return dc.imLastConversations}convertAbbrConversation(e){let t=e;for(const n of t){let e=n.t,t=n.top,i=n.d?JSON.parse(n.d):{},o=n.userOffsets;n.lmsg.t=e;let s=n.lmsg,a=this.builder.build(s),r=Wu.byIMMessage(a),c=this.findConversation(r);nc.isUndef(c)?(c=this.buildByAbbr(n,a),this.insertOne(c)):(c.top=t,c.data=i),r.scene===Qr.GROUP&&(a.x=1),rh.get(r).initMaxMessageAndOffsets(a,o),this.correctPosition(c)}}onMaxMessageDeleted(e){this.removeConversation(e)}onMaxMessageChanged(e){return fc(this,void 0,void 0,(function*(){if(e.scene()===Qr.CS){let t=e;if(Wc.Socket.user().id!=t.customerId()&&(!1===t.accepted||t.type===Nu.ACCEPT&&t.senderId!=Wc.Socket.user().id))return}yield this.saveOrUpdateConversation(e)}))}saveOrUpdateConversation(e){return fc(this,void 0,void 0,(function*(){let t=e.status,n=Wu.byIMMessage(e),i=this.findConversation(n);nc.isUndef(i)&&t!==Zr.FAIL&&(i=this.buildByMessage(e),this.insertOne(i),t===Zr.SUCCESS&&(i.data=yield this.remoteConversations.loadData(n),i.dataLoaded=!0)),t===Zr.SENDING&&(i.data=e.getToData(),i.dataLoaded=!0),i&&i.dataLoaded&&(this.correctPosition(i),this.fireUpdated())}))}debounce(e){clearTimeout(this.timer),this.timer=setTimeout((()=>{e()}),500)}loadLocalConversations(){let e=0,t=new Array;for(const n of this.list)if(n.dataLoaded&&n.getMaxMessage()){e+=n.getUnreadAmount();let i=n.toDto();t.push(i)}return{code:200,content:{unreadTotal:e,conversations:t}}}findConversationIndex(e){return this.list.findIndex((t=>e.toString()===t.target.toString()))}findConversation(e){let t=this.findConversationIndex(e);return this.list[t]}removeLocalConversation(e){let t=this.findConversationIndex(e.target);this.list.splice(t,1)}insertOne(e){gh.sortedInserter.insert(this.list,e),this.list.length>gh.CONVERSATIONS_MAX_LENGTH&&0===this.list[this.list.length-1].getUnreadAmount()&&this.list.pop()}correctPosition(e){this.removeLocalConversation(e),this.insertOne(e)}removeConversation(e){let t=this.findConversation(e);t&&(this.removeLocalConversation(t),this.fireUpdated())}top(e,t,n){return fc(this,void 0,void 0,(function*(){if(!nc.isBoolean(t))throw new Error("top must be boolean.");let i=this.findConversation(e);if(!i)throw new Error("conversation does not exist.");i.top!=t&&(yield this.remoteConversations.top(e,t),i.top=t,this.correctPosition(i)),this.fireUpdated(),gc.onSuccess(n)}))}remove(e,t){return fc(this,void 0,void 0,(function*(){let n=this.findConversation(e);if(!n)throw new Error("conversation does not exist.");if(n instanceof uh&&!n.isEnded())throw new Error("CS conversation can only be deleted after it ends");yield this.remoteConversations.remove(e),this.removeLocalConversation(n),this.fireUpdated(),gc.onSuccess(t)}))}buildByAbbr(e,t){let n,i=Wu.byIMMessage(t);if(e.t===Qr.CS){let e=t;Wc.Socket.user().id===e.customerId()?n=new ch(i):(n=new uh(i),n.accepted=e.accepted)}else n=new ch(i);return n.dataLoaded=!0,n.top=e.top,n.data=e.d?JSON.parse(e.d):{},n}buildByMessage(e){let t,n=Wu.byIMMessage(e);if(e.scene()===Qr.CS){let i=e;Wc.Socket.user().id===i.customerId()?t=new ch(n):(t=new uh(n),t.accepted=i.accepted)}else t=new ch(n);return t}}gh.CONVERSATIONS_MAX_LENGTH=200,gh.sortedInserter=new class extends Ku{compare(e,t){let n;if(e.top==t.top){let i=e.maxMessageTime();n=t.maxMessageTime()-i}else n=e.top?-1:1;return 0===n?0:n>0?1:-1}};class fh extends Fc{static init(){return this.module=new fh,this.module.name=this.GIM_MODULE_NAME,this.initGN(),this.module}static initGN(){eu.addAssembler(new class{assemble(e){let t={messageId:e.id,timestamp:e.tm,type:e.t,senderId:e.sid,toType:e.tt};return e.tt===Qr.GROUP&&(t.groupId=e.gid),t}support(e){return!!e.sid}})}postConnect(){vg.init()}static check(){if(!this.module)throw{code:400,content:"IM not initialized. Please include 'IM' in the 'modules' during GoEasy initialization."}}}fh.GIM_MODULE_NAME="GIM";class mh extends gh{constructor(){super(),this.expired=!1,Vu.i.on(Lu.CS_ONLINE_SUCCESS,this.onCSOnlineSuccess.bind(this)),Vu.i.on(Lu.CS_OFFLINE_SUCCESS,this.onCSOfflineSuccess.bind(this)),th.on(th.EVENT.LOST,this.onDisconnected.bind(this)),th.on(th.EVENT.RECONNECTED,this.onConnected.bind(this))}onMaxMessageChanged(e){return fc(this,void 0,void 0,(function*(){if(e.scene()===Qr.CS){let t=e;if(t.customerId()!=Wc.Socket.user().id&&(!1===t.accepted||t.type===Nu.ACCEPT))if(Nu.ACCEPT===e.type){let t=Wu.byIMMessage(e);this.removeConversation(t)}else yield this.saveOrUpdateConversation(e)}}))}latestConversations(e){const t=Object.create(null,{latestConversations:{get:()=>super.latestConversations}});return fc(this,void 0,void 0,(function*(){let n=this.synchronized;yield t.latestConversations.call(this,e),this.list.length>0&&!n&&this.fireUpdated()}))}onUnreadMessageChanged(e){}onCSOnlineSuccess(){return fc(this,void 0,void 0,(function*(){yield this.loadServerConversations(),this.fireUpdated()}))}onCSOfflineSuccess(){this.list=[],this.fireUpdated()}getUpdatedEventName(){return wu.PENDING_CONVERSATIONS_UPDATED}rocketName(){return dc.CS_PENDING_CONVERSATION}convertAbbrConversation(e){return fc(this,void 0,void 0,(function*(){let t=e;for(const e of t){e.lastMessage.t=Qr.CS;let t=e.customerData,n=e.lastMessage,i=e.userOffsets,o=t?JSON.parse(t):{},s=this.builder.build(n),a=Wu.byIMMessage(s),r=this.findConversation(a);nc.isUndef(r)&&(r=new uh(a),r.accepted=s.accepted,r.dataLoaded=!0,this.insertOne(r)),r.top=!1,r.data=o,rh.get(a).initPendingMaxMessageAndOffsets(s,i),this.correctPosition(r)}}))}onDisconnected(){this.expired=!0}onConnected(){return fc(this,void 0,void 0,(function*(){this.expired&&fh.module&&fh.module.active&&(this.expired=!1,this.list=[],yield this.loadServerConversations(),this.fireUpdated())}))}}class _h{constructor(){this.conversations=new gh,this.pendingConversations=new mh}latestConversations(e){this.conversations.latestConversations(e)}latestPendingConversations(e){this.pendingConversations.latestConversations(e)}topPrivateConversation(e){let t=Wu.byScene(Qr.PRIVATE,e.userId);this.conversations.top(t,e.top,e)}topGroupConversation(e){let t=Wu.byScene(Qr.GROUP,e.groupId);this.conversations.top(t,e.top,e)}topConversation(e){let t=e.conversation;this.validateConversationDTO(t);let n=Wu.byConversationDTO(t);this.conversations.top(n,e.top,e)}removePrivateConversation(e){let t=Wu.byScene(Qr.PRIVATE,e.userId);this.conversations.remove(t,e)}removeGroupConversation(e){let t=Wu.byScene(Qr.GROUP,e.groupId);this.conversations.remove(t,e)}removeConversation(e){let t=e.conversation;this.validateConversationDTO(t);let n=Wu.byConversationDTO(t);this.conversations.remove(n,e)}validateConversationDTO(e){if(!(e instanceof ec))throw new Error("Incorrect conversation object.");{let t=e.lastMessage;if(t instanceof el&&t.customerId()!==Wc.Socket.user().id&&!1===t.accepted)throw new Error("pending conversation cannot be topped or removed.")}}}class vh{constructor(){this.builder=new tl,Wc.Socket.onMessage(au.imMessage,this.onMessageReceived.bind(this))}onMessageReceived(e){if(e.t!==Qr.CS){let t=this.builder.build(e);this.sendAck(t);let n=Wu.byIMMessage(t),i=n.scene;rh.get(n).existsMessage(t)||(this.createNotification(e),Vu.i.fire(Lu.MESSAGE_RECEIVED,t),i===Qr.PRIVATE?rl.fire(wu.PRIVATE_MESSAGE_RECEIVED,t):i===Qr.GROUP&&rl.fire(wu.GROUP_MESSAGE_RECEIVED,t))}}sendAck(e){Wc.Socket.sendAck("imAck",{publishGuid:e.messageId})}createNotification(e){const t=Wc.N.supportAppNotification();if(!nc.isObject(e.nt)||e.s===Wc.Socket.user().id||!t)return;let n={id:e.i,tm:e.ts,t:e.mt,sid:e.s,tt:e.t};n.tt===Qr.GROUP&&(n.gid=e.r),Wc.N.createLocalNotification(e.nt.t,e.nt.c,n,e.nt.sound,e.nt.badge)}}class yh{constructor(){this.subscribedGroups=[],Wc.Socket.on(ru.EXPIRED_RECONNECTED,this.expiredResubscribeGroups.bind(this))}expiredResubscribeGroups(){this.subscribedGroups.forEach((e=>fc(this,void 0,void 0,(function*(){yield this.doSubscribeGroup(e)}))))}subscribe(e){let t=e.groupIds;nu.validateIdArray(t,"groupIds");let n=new Ih(t,e.accessToken);this.doSubscribeGroup(n).then((()=>{this.subscribedGroups.push(n),gc.onSuccess(e,{code:200,content:"ok"})})).catch((t=>{gc.onFailed(e,{code:t.resultCode||408,content:t.content||"Failed to subscribe group message"})}))}doSubscribeGroup(e){return new Promise(((t,n)=>{let i=e.groupIds.toString().split(","),o=new Qc({name:dc.subscribeGroups,params:{groupIds:i,at:e.accessToken},permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:()=>{t()},fail:e=>{n(e)}});Wc.Socket.e(o)}))}unsubscribe(e){nu.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t=new Qc({name:dc.unsubscribeGroup,params:{groupId:e.groupId},permission:Jc.READ,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,success:()=>{this.deleteSubscriptionByGroupId(e.groupId),gc.onSuccess(e,{code:200,content:"ok"})},fail:t=>{gc.onFailed(e,{code:t.resultCode||408,content:t.content||"Failed to unsubscribe group message"})}});Wc.Socket.e(t)}deleteSubscriptionByGroupId(e){this.subscribedGroups=this.subscribedGroups.filter((t=>{const n=t.groupIds.findIndex((t=>t==e));return n>-1&&t.groupIds.splice(n,1),t.groupIds.length>0}))}}class Ih{constructor(e,t){this.groupIds=e,this.accessToken=t}}class Mh{constructor(){this.newMessageReceived=e=>{let t=null;e.c&&(t=JSON.parse(e.c)),t&&t.events&&t.events.map((e=>{let n=e.userData?JSON.parse(e.userData):{},i={time:e.time,action:e.action,groupOnlineCount:t.userAmount,groupId:t.groupId,id:e.userId,data:n};rl.fire(wu.GROUP_PRESENCE,i)}))},th.onMessage(au.groupPresence,this.newMessageReceived)}presence(e){nu.validateIdArray(e.groupIds,"groupIds"),e.groupIds.toString().split(",");let t={groupIds:e.groupIds};this.emitRocket(dc.subscribeGroupPresence,t,(()=>{gc.onSuccess(e,{code:200,content:"ok"})}),(t=>{gc.onFailed(e,{code:t.code||408,content:t.content||"Failed to subscribe group message"})}),pc.commonRequestSingle,pc.commonRequestTotal)}unPresence(e){nu.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t={groupId:e.groupId};this.emitRocket(dc.unsubscribeGroupPresence,t,(()=>{gc.onSuccess(e,{code:200,content:"ok"})}),(t=>{gc.onFailed(e,{code:t.code||408,content:t.content||"Failed to unsubscribe presence"})}),pc.commonRequestSingle,pc.commonRequestTotal)}emitRocket(e,t,n,i,o,s){let a=new Qc({name:e,params:t,singleTimeout:o,totalTimeout:s,permission:Jc.WRITE,success:n,fail:i});Wc.Socket.e(a)}}class Ch{get(e){nu.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t=new Qc({name:dc.imGroupOnlineCount,params:{groupId:e.groupId},permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:function(t){gc.onFailed(e,t||{code:408,content:"Failed to query online group users"})},success:function(t){200==t.code?gc.onSuccess(e,t):gc.onFailed(e,t)}});Wc.Socket.e(t)}}class Sh{doHereNow(e,t,n){let i=new Qc({name:e,params:t,permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{gc.onFailed(n,e)},success:e=>{let t=e.content;e.content=t.map((e=>{let t=e.userData?JSON.parse(e.userData):{};return{id:e.userId,data:t}})),gc.onSuccess(n,e)}});Wc.Socket.e(i)}}class Eh extends Sh{hereNow(e){nu.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t={groupId:e.groupId};this.doHereNow(dc.imGroupHereNow,t,e)}}class Th{constructor(){this.newMessageReceived=e=>{let t=[];e.c&&(t=JSON.parse(e.c).events||[]),t.map((e=>{let t=e.userData?JSON.parse(e.userData):{},n={time:e.time,action:e.action,id:e.userId,data:t};rl.fire(wu.USER_PRESENCE,n)}))},th.onMessage(au.userPresence,this.newMessageReceived)}presence(e){nu.validateIdArray(e.userIds,"userIds"),e.userIds.toString().split(",");let t={userIds:e.userIds};this.emitRocket(dc.subscribeUserPresence,t,(()=>{gc.onSuccess(e,{code:200,content:"ok"})}),(t=>{gc.onFailed(e,{code:t.code||408,content:t.content||"Failed to subscribe group message"})}),pc.commonRequestSingle,pc.commonRequestTotal)}unPresence(e){nu.validateId(e.userId,"userId"),e.userId=e.userId.toString();let t={userId:e.userId};this.emitRocket(dc.unsubscribeUserPresence,t,(()=>{gc.onSuccess(e,{code:200,content:"ok"})}),(t=>{gc.onFailed(e,{code:t.code||408,content:t.content||"Failed to unsubscribe presence"})}),pc.commonRequestSingle,pc.commonRequestTotal)}emitRocket(e,t,n,i,o,s){let a=new Qc({name:e,params:t,singleTimeout:o,totalTimeout:s,permission:Jc.WRITE,success:n,fail:i});Wc.Socket.e(a)}}class kh extends Sh{hereNow(e){let t=e.userIds;nu.validateIdArray(t,"userIds"),t.toString().split(","),this.doHereNow(dc.imHereNow,e,e)}}const Dh=new class{fileExtension(e,t){if(nc.isString(e))try{let n=e.split(t);return n[n.length-1]}catch(n){throw Error(n)}}};class Rh{}class Oh extends Rh{constructor(){super(...arguments),this.contentType="",this.name="",this.size=0,this.url=""}}class bh extends Oh{constructor(){super(...arguments),this.width=0,this.height=0}}class Ah{build(e){this.validate(e.createOptions);let t=this.create();return this.setPayload(e,t),t}}class Lh extends Ah{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.name=i.name,n.size=i.size,n.contentType=i.type,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Ph extends Lh{create(){return new bh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=n.path||n.tempFilePath,s=nc.isEmpty(n.name)||void 0===n.name?o:n.name;i.name="wx-image."+Dh.fileExtension(s,"."),i.contentType="image/"+Dh.fileExtension(s,"."),i.url=o,i.size=n.size,e.complete=new Promise(((e,t)=>{Pn.getImageInfo({src:i.url,success(t){i.width=t.width,i.height=t.height,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Nh extends Oh{constructor(){super(...arguments),this.duration=0}}class wh extends Lh{create(){return new Nh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=n.tempFilePath,s=nc.isEmpty(n.name)||null==n.name?o:n.name,a=n.duration,r=n.fileSize;i.url=o,i.size=r,i.duration=a/1e3,i.name="wx-audio."+Dh.fileExtension(s,"."),i.contentType="audio/"+Dh.fileExtension(s,"."),e.complete=Promise.resolve()}validate(e){super.validate(e)}}class Uh extends Rh{constructor(){super(...arguments),this.text=""}}class Gh extends Ah{create(){return new Uh}setPayload(e,t){let n=t,i=e.createOptions;n.text=i.text,e.complete=Promise.resolve()}validate(e){if(nc.isEmpty(e.text))throw{code:400,content:"text is empty"};if(!nc.isString(e.text))throw{code:400,content:"TypeError: text requires string."};if(""===e.text.trim())throw{code:400,content:"text is empty"};if(e.text.length>2500)throw{code:400,content:"Message text over max length 2500"}}}class xh extends Rh{constructor(){super(...arguments),this.video=new Bh,this.thumbnail=new Fh}}class Fh{constructor(){this.name="",this.url="",this.width=0,this.height=0,this.contentType=""}initURL(e){oc.currentPlatform()===ic.BROWSER&&this.htmlUrl(e)}htmlUrl(e){let t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight,t.getContext("2d").drawImage(e,0,0,t.width,t.height),this.url=t.toDataURL("image/png")}}class Bh{constructor(){this.name="",this.url="",this.width=0,this.height=0,this.contentType="",this.size=0,this.duration=0}}class qh extends Ah{create(){return new xh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:a,height:r,size:c,tempFilePath:u,thumbTempFilePath:l,width:d,name:p=""}=n,h=nc.isEmpty(p)?u:p;o.contentType="video/"+Dh.fileExtension(h,"."),o.name="wx-video."+Dh.fileExtension(h,"."),o.url=u,o.width=s.width=d,o.height=s.height=r,o.size=c,o.duration=a,s.url=l,s.contentType="image/jpg",s.name="wx-thumbnail.jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Vh extends Ah{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.fullPath||i.path,n.name=i.name,n.size=i.size,n.contentType=i.type,i.type,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class jh extends Vh{create(){return new bh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.size=i.size;let o=nc.isEmpty(i.name)||void 0===i.name?i.path:i.name;n.contentType="image/"+Dh.fileExtension(o,"."),n.name="uni-image."+Dh.fileExtension(o,"."),e.complete=new Promise(((e,t)=>{Nn.getImageInfo({src:i.path,success(t){n.width=t.width,n.height=t.height,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Hh extends Vh{create(){return new Nh}setPayload(e,t){let n=e.createOptions,i=t,o=n.file,s=o.tempFilePath,a=nc.isEmpty(o.name)||null==o.name?s:o.name;i.url=s,i.name="uni-audio."+Dh.fileExtension(a,"."),i.contentType="audio/"+Dh.fileExtension(a,"."),e.complete=new Promise(((e,t)=>{Nn.getFileInfo({filePath:s,success:o=>{let a=o.size;if(i.size=a,0===a)e();else if(nc.isDef(n.file.duration))i.duration=n.file.duration/1e3,e();else{const n=Nn.createInnerAudioContext();n.src=s,n.onCanplay((function(o){o.errCode?(n.destroy(),t(o)):(i.duration=n.duration,n.destroy(),e())})),n.onError((i=>{n.destroy(),-99===i.errCode?e():t(i)}))}},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Kh extends Ah{create(){return new xh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:a,height:r,size:c,tempFilePath:u,width:l,name:d=""}=n,p=nc.isEmpty(d)?u:d;o.size=c,o.width=l,o.height=r,o.url=u,o.duration=a,o.contentType="video/"+Dh.fileExtension(p,"."),o.name="uni-video."+Dh.fileExtension(p,"."),s.url=u,s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/jpg",s.name="uni-thumbnail.jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class zh extends Ah{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file,o=window.URL||window.webkitURL;n.url=o.createObjectURL(i),n.name=i.name,n.size=i.size,n.contentType=i.type,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!(e.file instanceof File))throw Error("wrong file type.");if(0==e.file.size)throw Error("File size is 0.");if(e.file.size>524288e3)throw Error("message-length limit 30mib")}}class Wh extends zh{create(){return new bh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=window.URL||window.webkitURL,s=new Image;s.src=o.createObjectURL(n),e.complete=new Promise(((e,t)=>{s.onload=function(){i.width=s.width,i.height=s.height,o.revokeObjectURL(s.src),e()},s.onerror=function(e){o.revokeObjectURL(s.src),t(e)}}))}validate(e){super.validate(e);let t=["gif","jpg","png","jpeg"];if(!t.find((t=>t===e.file.type.split("/")[1].toLowerCase())))throw Error("Only "+t.join(",")+" is supported image.")}}class Yh extends zh{create(){return new Nh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=window.URL||window.webkitURL,s=document.createElement("audio");s.src=o.createObjectURL(n),e.complete=new Promise(((e,t)=>{s.onloadedmetadata=()=>{i.duration=s.duration,o.revokeObjectURL(s.src),e()},s.onerror=e=>{o.revokeObjectURL(s.src),t(e)}}))}validate(e){super.validate(e);let t=["mp3","ogg","wav","wma","ape","acc","mpeg"];if(!t.find((t=>t===e.file.type.split("/")[1].toLowerCase())))throw Error("Only "+t.join(",")+" is supported audio.")}}class $h extends Ah{create(){return new xh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,a=window.URL||window.webkitURL,r=document.createElement("video");r.src=a.createObjectURL(n),o.size=n.size,o.name=n.name,o.contentType=n.type,o.url=r.src,s.name=n.name,s.contentType="image/jpg",e.complete=new Promise(((e,t)=>{r.onloadedmetadata=()=>{o.duration=r.duration,o.width=r.videoWidth,o.height=r.videoHeight,s.width=r.videoWidth,s.height=r.videoHeight,s.url=this.getThumbnailUrl(r),a.revokeObjectURL(r.src),e()},r.onerror=function(e){a.revokeObjectURL(r.src),t(e)}}))}getThumbnailUrl(e){let t=document.createElement("canvas");return t.width=e.videoWidth,t.height=e.videoHeight,t.getContext("2d").drawImage(e,0,0,t.width,t.height),t.toDataURL("image/png")}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!(e.file instanceof File))throw Error("wrong file type.");if(0==e.file.size)throw Error("File size is 0.");if(e.file.size>31457280)throw Error("message-length limit 30mib");let t=["avi","mov","rmvb","rm","flv","mp4","3gp","quicktime"];if(!t.find((t=>t===e.file.type.split("/")[1].toLowerCase())))throw Error("Only "+t.join(",")+" is supported video.")}}class Jh extends Ah{create(){return new xh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:a,height:r,size:c,tempFilePath:u,tempVideoThumbPath:l,width:d}=n;o.size=c,o.width=d,o.height=r,o.url=u,o.duration=a,o.contentType="video/mp4",o.name="ali-video.mp4",s.url=l,s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/jpg",s.name="ali-thumbnail.jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Xh extends Ah{create(){return new Oh}setPayload(e,t){e.complete=Promise.reject("Alipay not support file message.")}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Qh extends Xh{create(){return new bh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.size=i.size,e.complete=new Promise(((e,t)=>{my.getImageInfo({src:i.path,success(t){n.width=t.width,n.height=t.height,n.contentType="image/"+t.type,n.name="ali-image."+t.type,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Zh extends Xh{create(){return new Nh}setPayload(e,t){let n=t,i=e.createOptions.file,o=i.tempFilePath;n.url=o,n.name="ali-audio."+Dh.fileExtension(o,"."),n.contentType="audio/"+Dh.fileExtension(o,"."),n.duration=i.duration,n.size=i.fileSize,e.complete=Promise.resolve()}validate(e){super.validate(e)}}class eg extends Ah{create(){return new xh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:a,height:r,size:c,tempFilePath:u,thumbTempFilePath:l,width:d}=n;o.size=c,o.width=d,o.height=r,o.url=u,o.duration=a,o.contentType="video/"+Dh.fileExtension(u,"."),o.name="baidu-video."+Dh.fileExtension(u,"."),s.url=l,s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/"+Dh.fileExtension(l,"."),s.name="baidu-thumbnail."+Dh.fileExtension(u,"."),e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class tg extends Ah{create(){return new Oh}setPayload(e,t){e.complete=Promise.reject("Baidu app not support file message.")}validate(e){}}class ng extends tg{create(){return new Nh}setPayload(e,t){let n=t,i=e.createOptions.file,o=i.tempFilePath;n.url=o,n.name="baidu-audio."+Dh.fileExtension(o,"."),n.contentType="audio/"+Dh.fileExtension(o,"."),n.duration=i.duration/1e3,n.size=i.fileSize,e.complete=Promise.resolve()}validate(e){super.validate(e)}}class ig extends tg{create(){return new bh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.size=i.size,e.complete=new Promise(((e,t)=>{swan.getImageInfo({src:i.path,success(t){n.width=t.width,n.height=t.height,n.contentType="image/"+t.type,n.name="baidu-image."+t.type,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class og extends Ah{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;const{uri:o,type:s,size:a,name:r}=i;n.url=decodeURIComponent(o),n.name=r,n.size=a,n.contentType=s,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class sg extends og{create(){return new bh}setPayload(e,t){let n=t,i=e.createOptions.file;const{uri:o,fileSize:s,type:a,fileName:r,width:c,height:u}=i;n.url=o,n.size=s,n.contentType=a,n.name=r,n.width=c,n.height=u,e.complete=Promise.resolve()}validate(e){super.validate(e)}}class ag extends Ah{create(){return new xh}setPayload(e,t){let n=e.createOptions.file;const i=t,{video:o,thumbnail:s}=i,{uri:a,type:r,fileSize:c,fileName:u,duration:l,height:d,width:p}=n;o.size=c,o.width=p,o.height=d,o.url=a,o.duration=l,o.contentType=r,o.name=u,s.url=a,s.name="rn-thumbnail.jpg",s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class rg extends og{create(){return new Nh}setPayload(e,t){let n=e.createOptions,i=t,o=n.file;const{uri:s,name:a,duration:r,size:c}=o;i.url=s,i.duration=Number((r/1e3).toFixed(2)),i.size=c,i.name=a||"rn-audio."+Dh.fileExtension(s,"."),i.contentType="audio/"+Dh.fileExtension(s,"."),n.file={uri:s,type:i.contentType,name:i.name},e.complete=Promise.resolve()}validate(e){super.validate(e)}}class cg extends Rh{}class ug extends Ah{create(){return new cg}setPayload(e,t){let n=e.createOptions;t.payload=n.payload,e.complete=Promise.resolve()}validate(e){let t=e.type,n=e.payload;if(nc.isEmpty(t))throw Error("type is empty.");if(!nc.isString(t))throw Error("type require a string");if(nc.isEmpty(n))throw Error("payload is empty.");if(!nc.isPlainObject(n)&&!nc.isStringOrNumber(n))throw Error("payload require object | string | number.")}}class lg{constructor(e,t){this.type=e,this.createOptions=t}}class dg{constructor(){this.framework=$r.currentFramework(),this.platform=oc.currentPlatform(),this.payloadBuilders={[zr.UNIAPP]:{image:new jh,file:new Vh,audio:new Hh,video:new Kh,text:new Gh},[ic.MP_WX]:{image:new Ph,file:new Lh,audio:new wh,video:new qh,text:new Gh},[ic.BROWSER]:{image:new Wh,file:new zh,audio:new Yh,video:new $h,text:new Gh},[ic.MP_ALI]:{image:new Qh,file:new Xh,audio:new Zh,video:new Jh,text:new Gh},[ic.MP_BAIDU]:{image:new ig,file:new tg,audio:new ng,video:new eg,text:new Gh},[zr.REACT_NATIVE]:{image:new sg,file:new og,audio:new rg,video:new ag,text:new Gh},[ic.MP_BYTE]:{image:new Ph,file:new Lh,audio:new wh,video:new qh,text:new Gh}}}buildMessage(e,t){const n=this.framework===zr.UNKNOWN?this.platform:this.framework;let i=this.payloadBuilders[n][e],o=new lg(e,t);if(i){let e=i.build(o);o.payload=e}else{let e=(new ug).build(o);o.payload=e.payload}let s=this.build(o);return o.complete.then((()=>{gc.onSuccess(t,s)})).catch((e=>{gc.onFailed(t,e)})),s}build(e){let t,n=e.type,i=e.payload,o=e.createOptions,s=o.to,a=s.type;return this.validate(o),a===Qr.GROUP?(t=new Zu,t.groupId=s.id.toString(),t.senderData=Wc.Socket.user().data):a===Qr.PRIVATE?(t=new Qu,t.read=!1,t.receiverId=s.id.toString()):a===Qr.CS&&(t=new el,t.to=s.id.toString(),t.teamId=s.id.toString(),t.senderData=Wc.Socket.user().data),t.senderId=Wc.Socket.user().id,t.messageId=$c.get(),t.payload=i,t.timestamp=Date.now(),t.type=n,t.recalled=!1,t.status=Zr.NEW,t.buildOptions=e,t}validate(e){const t=e.to;if(!t)throw new Error("message require property to.");if(!nc.isObject(t))throw new Error("TypeError: to requires an object.");if(!nc.isObject(t.data))throw new Error("TypeError: to.data requires an object.");if(!t.type||t.type!==Qr.GROUP&&t.type!==Qr.PRIVATE&&t.type!==Qr.CS)throw new Error("message require property to.type");if(nu.validateId(t.id,"to.id"),Wc.Socket.user().id===t.id)throw new Error("to.id can not be the same as your id.");nc.isDef(e.notification)&&nu.validateNotification(e.notification),e.wxmpTemplateMsg&&nu.validateWXMPTemplateMsg(e.wxmpTemplateMsg)}}class pg extends vh{onMessageReceived(e){if(e.t===Qr.CS){let t=this.builder.build(e);this.sendAck(t);let n=Wu.byIMMessage(t);rh.get(n).existsMessage(t)||(t.customerId()===Wc.Socket.user().id?(this.createNotification(e),Vu.i.fire(Lu.MESSAGE_RECEIVED,t),rl.fire(wu.CS_MESSAGE_RECEIVED,t)):nh.getInstance().queryTeams().then((()=>{ih.isMyMessage(t)&&this.createNotification(e),Vu.i.fire(Lu.CS_AGENT_MESSAGE_RECEIVED,t)})))}}}class hg{constructor(e){this.times=new Array;let t=e[0],n=Wu.byIMMessage(t);this.scene=n.scene,this.targetId=n.id,e.forEach((e=>{this.times.push(e.timestamp)})),this.times.sort(((e,t)=>e{Vu.i.fire(Lu.MESSAGE_RECALLED,e)},th.onMessage(au.IM_MSG_RECALLED,this.onRemoteRecalled)}recallMessage(e){return fc(this,void 0,void 0,(function*(){ah.validateMessageArray(e.messages),this.validate(e);let t=e.messages;yield this.recallServerMessages(t);let n=t[0],i=n.scene(),o=this.toConversationId(i,n.senderId,n.targetId()),s={id:Wc.Socket.user().id,data:Wc.Socket.user().data},a=t.map((e=>e.timestamp)),r=new al(i,o,s,a);Vu.i.fire(Lu.MESSAGE_RECALLED,r),gc.onSuccess(e)}))}toConversationId(e,t,n){if(Qr.PRIVATE===e)return o=n,(i=t).localeCompare(o)>0?`${i}:${o}`:`${o}:${i}`;var i,o;if(Qr.GROUP===e)return n;throw{code:400,content:`scene: ${e} not support`}}recallServerMessages(e){let t=new hg(e);return 0===t.times.length?Promise.resolve():new Promise(((e,n)=>{let i=new Qc({name:dc.IM_RECALL_MESSAGE,params:t,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{n(e)},success:t=>{200===t.code?e(t):n(t)}});Wc.Socket.e(i)}))}validate(e){let t=e.messages;for(let n=0;n{let i=this.dataCache.getData(e);i?n.set(e,i):t.push(e)})),0===t.length||(yield this.fetchData(...t)).forEach(((e,t)=>{this.dataCache.setData(t,e),n.set(t,e)})),Promise.resolve(n)}))}fetchData(...e){return new Promise(((t,n)=>{let i=new Qc({name:dc.MD_CMD,permission:Jc.READ,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,params:{name:"GET",data:{ids:e}},success:e=>{if(200===e.code){const n=new Map;e.content.forEach((e=>{n.set(e.id,e.data)})),t(n)}else n(e)},fail:e=>{n(e)}});Wc.Socket.e(i)}))}setData(e,t){this.dataCache.setData(e,t)}}class _g{constructor(){Vu.i.on(Lu.MESSAGE_RECEIVED,this.onMessageReceived),Vu.i.on(Lu.MESSAGE_SENDING,this.onMessageSending)}onMessageSending(e){let t=Wu.byIMMessage(e);t.scene===Qr.PRIVATE&&mg.i.setData(t.id,e.getToData())}onMessageReceived(e){if(Wu.byIMMessage(e).scene===Qr.GROUP){let t=e;mg.i.setData(t.senderId,t.senderData)}}}class vg{constructor(){this._iMReceiver=new vh,this.csMessageReceiver=new pg,this.memberDataUpdator=new _g,this._userHereNow=new kh,this.goEasyUploader=new Au,this._groupHereNow=new Eh,this._groupOnlineCount=new Ch,this.groupMessageSubscriber=new yh,this.messageBuilder=new dg,this.messageSender=new Hu,this.recaller=new gg,this._groupPresenceSubscriber=new Mh,this._userPresenceSubscriber=new Th,this.conversations=new _h,this.histories=rh.init()}static init(){Vu.init(),rl.init(),vg.instance=new vg}static i(){if(vg.instance)return vg.instance;throw Error("Please connect first.")}validateModules(){if(th.status()===Wr.DISCONNECTED)throw Error("Please call connect() first.");fh.check()}catch(e,t){return fc(this,void 0,void 0,(function*(){try{this.validateModules(),nu.validateCallbackOptions(t),yield e()}catch(n){gc.onFailed(t,n)}}))}on(e,t){rl.on(e,t)}off(e,t){rl.off(e,t)}createTextMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Pu.TEXT,e)}createImageMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Pu.IMAGE,e)}createFileMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Pu.FILE,e)}createAudioMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Pu.AUDIO,e)}createVideoMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Pu.VIDEO,e)}createCustomMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(e.type,e)}sendMessage(e){this.catch((()=>{this.messageSender.send(e)}),e)}recallMessage(e){this.catch((()=>{this.recaller.recallMessage(e)}),e)}deleteMessage(e){this.catch((()=>{this.histories.deleteMessage(e)}),e)}markGroupMessageAsRead(e){this.catch((()=>fc(this,void 0,void 0,(function*(){yield this.histories.groupMarkAsRead(e)}))),e)}markPrivateMessageAsRead(e){this.catch((()=>fc(this,void 0,void 0,(function*(){yield this.histories.privateMarkAsRead(e)}))),e)}markMessageAsRead(e,t){this.catch((()=>fc(this,void 0,void 0,(function*(){yield this.histories.markMessageAsRead(e,t)}))),e)}latestConversations(e){this.validateModules(),this.conversations.latestConversations(e)}removePrivateConversation(e){this.catch((()=>this.conversations.removePrivateConversation(e)),e)}removeGroupConversation(e){this.catch((()=>this.conversations.removeGroupConversation(e)),e)}topPrivateConversation(e){this.catch((()=>this.conversations.topPrivateConversation(e)),e)}topGroupConversation(e){this.catch((()=>this.conversations.topGroupConversation(e)),e)}history(e,t){this.catch((()=>{this.histories.loadHistory(e,t)}),e)}subscribeUserPresence(e){this.catch((()=>this._userPresenceSubscriber.presence(e)),e)}unsubscribeUserPresence(e){this.catch((()=>this._userPresenceSubscriber.unPresence(e)),e)}hereNow(e){this.catch((()=>this._userHereNow.hereNow(e)),e)}subscribeGroup(e){this.catch((()=>this.groupMessageSubscriber.subscribe(e)),e)}unsubscribeGroup(e){this.catch((()=>this.groupMessageSubscriber.unsubscribe(e)),e)}subscribeGroupPresence(e){this.catch((()=>this._groupPresenceSubscriber.presence(e)),e)}unsubscribeGroupPresence(e){this.catch((()=>this._groupPresenceSubscriber.unPresence(e)),e)}groupHereNow(e){this.catch((()=>this._groupHereNow.hereNow(e)),e)}groupOnlineCount(e){this.catch((()=>this._groupOnlineCount.get(e)),e)}latestPendingConversations(e){this.validateModules(),this.conversations.latestPendingConversations(e)}topConversation(e){this.validateModules(),this.conversations.topConversation(e)}removeConversation(e){this.validateModules(),this.conversations.removeConversation(e)}}class yg{constructor(e,t){this.customerId=e,this.teamId=t}}class Ig{constructor(e,t){this.teamId=e;let n=new tc(t.id.toString(),JSON.stringify(t.data));this.customer=n}}class Mg{constructor(e,t,n){this.customerId=e,this.teamId=t,this.agentId=n}}class Cg{constructor(e,t){this.customerId=e,this.teamId=t}}class Sg{constructor(e){this.builder=new tl,this.teamId=e}accept(e,t){let n=t.customer;if(nc.isUndef(n))throw{code:400,content:"customer is required."};nu.validateId(n.id,"customer.id");let i=n.data;if(nc.isUndef(i)||!nc.isObject(i))throw{code:400,content:"customer data must be non-empty object."};let o=new Ig(e,n),s=new Qc({name:dc.CS_ACCEPT,params:o,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{gc.onFailed(t,e)},success:e=>{let n=this.builder.build(e.content.message);Vu.i.fire(Lu.CS_ACCEPTED,n),gc.onSuccess(t)}});Wc.Socket.e(s)}end(e,t){nu.validateId(t.id,"id");let n=t.id.toString(),i=new Cg(n,e),o=new Qc({name:dc.CS_END,params:i,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{gc.onFailed(t,e)},success:e=>{let n=this.builder.build(e.content.message);Vu.i.fire(Lu.CS_ENDED,n),gc.onSuccess(t)}});Wc.Socket.e(o)}queryCustomerStatus(e,t){return fc(this,void 0,void 0,(function*(){nu.validateId(t.id,"id");let n=yield this.doCustomerStatus(e,t.id);this.activeCustomerStatus=n,this.activeCustomerStatusOptions=t,gc.onSuccess(t,n)}))}doCustomerStatus(e,t){let n=t.toString(),i=new yg(n,e);return new Promise(((e,t)=>{let n=new Qc({name:dc.CS_CUSTOMER_STATUS,params:i,permission:Jc.READ,singleTimeout:pc.commonQuerySingle,totalTimeout:pc.commonQueryTotal,fail:e=>{t(e)},success:t=>{let n=t.content;n.agent&&(n.agent.data=JSON.parse(n.agent.data)),e(n)}});Wc.Socket.e(n)}))}transfer(e,t){nu.validateId(t.customerId,"customerId"),nu.validateId(t.agentId,"agentId");let n=t.customerId.toString(),i=t.agentId.toString(),o=new Mg(n,e,i),s=new Qc({name:dc.CS_TRANSFER,params:o,permission:Jc.WRITE,singleTimeout:pc.commonRequestSingle,totalTimeout:pc.commonRequestTotal,fail:e=>{gc.onFailed(t,e)},success:e=>{let n=this.builder.build(e.content.message);Vu.i.fire(Lu.CS_TRANSFER,n),gc.onSuccess(t)}});Wc.Socket.e(s)}}class Eg{createTextMessage(e,t){let n=vg.i().createTextMessage(t);this.extendProps(e,n)}createImageMessage(e,t){let n=vg.i().createImageMessage(t);this.extendProps(e,n)}createFileMessage(e,t){let n=vg.i().createFileMessage(t);this.extendProps(e,n)}createAudioMessage(e,t){let n=vg.i().createAudioMessage(t);this.extendProps(e,n)}createVideoMessage(e,t){let n=vg.i().createVideoMessage(t);this.extendProps(e,n)}createCustomMessage(e,t){let n=vg.i().createCustomMessage(t);this.extendProps(e,n)}extendProps(e,t){if(t.scene()===Qr.CS){let n=t;n.teamId=e,n.accepted=!0}}}class Tg{constructor(e){this.teamId=e,this.agentStatus=nh.getInstance(),this.conversationHandler=new Sg(e),this.messageCreator=new Eg}catch(e,t){return fc(this,void 0,void 0,(function*(){try{nu.validateCallbackOptions(t),yield e()}catch(n){gc.onFailed(t,n)}}))}isOnline(e){this.catch((()=>{this.agentStatus.isOnline(this.teamId,e)}),e)}online(e){this.catch((()=>{this.agentStatus.online(this.teamId,e)}),e)}offline(e){this.catch((()=>{this.agentStatus.offline(this.teamId,e)}),e)}customerStatus(e){this.catch((()=>{this.conversationHandler.queryCustomerStatus(this.teamId,e)}),e)}accept(e){this.catch((()=>{this.conversationHandler.accept(this.teamId,e)}),e)}end(e){this.catch((()=>{this.conversationHandler.end(this.teamId,e)}),e)}history(e){vg.i().history(e,this.teamId)}markMessageAsRead(e){vg.i().markMessageAsRead(e,this.teamId)}createTextMessage(e){this.messageCreator.createTextMessage(this.teamId,e)}createImageMessage(e){this.messageCreator.createImageMessage(this.teamId,e)}createFileMessage(e){this.messageCreator.createFileMessage(this.teamId,e)}createAudioMessage(e){this.messageCreator.createAudioMessage(this.teamId,e)}createVideoMessage(e){this.messageCreator.createVideoMessage(this.teamId,e)}createCustomMessage(e){this.messageCreator.createCustomMessage(this.teamId,e)}transfer(e){this.catch((()=>{this.conversationHandler.transfer(this.teamId,e)}),e)}agents(e){this.catch((()=>{this.agentStatus.agents(this.teamId,e)}),e)}liveSession(e){this.catch((()=>{ih.live(this.teamId,e)}),e)}quitLiveSession(e){this.catch((()=>{ih.quit(e)}),e)}listenCustomer(e){let t={customerId:e.id,onNewMessage:e.onNewMessage,onStatusUpdated:e.onStatusUpdated,onFailed:e.onFailed,onSuccess:e.onSuccess};this.catch((()=>{ih.live(this.teamId,t)}),e)}cancelListenCustomer(e){this.catch((()=>{ih.quit(e)}),e)}}class kg{static team(e){nu.validateId(e,"teamId");let t=this.teams.get(e);return t||(t=new Tg(e.toString()),this.teams.set(e.toString(),t)),t}}kg.teams=new Map;class Dg{constructor(e){this.id=e}isOnline(e){kg.team(this.id).isOnline(e)}online(e){kg.team(this.id).online(e)}offline(e){kg.team(this.id).offline(e)}customerStatus(e){kg.team(this.id).customerStatus(e)}accept(e){kg.team(this.id).accept(e)}end(e){kg.team(this.id).end(e)}history(e){kg.team(this.id).history(e)}markMessageAsRead(e){kg.team(this.id).markMessageAsRead(e)}createTextMessage(e){kg.team(this.id).createTextMessage(e)}createImageMessage(e){kg.team(this.id).createImageMessage(e)}createFileMessage(e){kg.team(this.id).createFileMessage(e)}createAudioMessage(e){kg.team(this.id).createAudioMessage(e)}createVideoMessage(e){kg.team(this.id).createVideoMessage(e)}createCustomMessage(e){kg.team(this.id).createCustomMessage(e)}transfer(e){kg.team(this.id).transfer(e)}agents(e){kg.team(this.id).agents(e)}liveSession(e){kg.team(this.id).liveSession(e)}quitLiveSession(e){kg.team(this.id).quitLiveSession(e)}listenCustomer(e){kg.team(this.id).listenCustomer(e)}cancelListenCustomer(e){kg.team(this.id).cancelListenCustomer(e)}}class Rg{static getInstance(e){return this.init(e),Rg}static init(e){if(this.getConnectionStatus()!==Wr.DISCONNECTED)throw new Error("Initialization failed. Please disconnect and try again.");this.validateOptions(e),Jr.init(e.reactNativeOptions),this.options=e,th.init(e),e.allowNotification&&eu.init(e.allowNotification),e.modules&&(e.modules.includes("PUBSUB")&&Bc.initModule(fu.init()),e.modules.includes("IM")&&Bc.initModule(fh.init())),mg.init(),Wc.init(th,eu,mg,Xr,sc,Bc)}static setBadge(e){eu.setBadge(e)}static connect(e){th.connect(e,"JS")}static disconnect(e){th.disconnect(e)}static getConnectionStatus(){return th.status()}static validateOptions(e){let t="";if(!nc.isObject(e))throw t="options is require an object.",Error(t);if(!nc.isPrimitive(e.appkey)||0==e.appkey.length)throw t="Invalid options:'appkey' is empty.",Error(t);if(!nc.isPrimitive(e.host)||0==e.host.length)throw t="Invalid options:'host' is empty.",Error(t);if(!nc.isArray(e.modules))throw t="Invalid options: 'modules' must be nonempty array",Error(t);if(!e.modules.includes("im")&&!e.modules.includes("pubsub"))throw t="Invalid options: 'modules' must include at least one of 'im' or 'pubsub'.",Error(t);e.modules=e.modules.map((e=>e.toUpperCase()))}static onClickNotification(e){eu.onClickNotification(e)}static c(e){e.init(Wc.Socket,Wc.N,Wc.Member,Wc.v,Wc.Platform,Bc)}}Rg.version=Xr,Rg.IM_EVENT=wu,Rg.IM_SCENE=Qr,Rg.im=class{static on(e,t){vg.i().on(e,t)}static off(e,t){vg.i().off(e,t)}static createTextMessage(e){return vg.i().createTextMessage(e)}static createImageMessage(e){return vg.i().createImageMessage(e)}static createFileMessage(e){return vg.i().createFileMessage(e)}static createAudioMessage(e){return vg.i().createAudioMessage(e)}static createVideoMessage(e){return vg.i().createVideoMessage(e)}static createCustomMessage(e){return vg.i().createCustomMessage(e)}static sendMessage(e){vg.i().sendMessage(e)}static recallMessage(e){vg.i().recallMessage(e)}static deleteMessage(e){vg.i().deleteMessage(e)}static markGroupMessageAsRead(e){vg.i().markGroupMessageAsRead(e)}static markPrivateMessageAsRead(e){vg.i().markPrivateMessageAsRead(e)}static latestConversations(e){vg.i().latestConversations(e)}static removePrivateConversation(e){vg.i().removePrivateConversation(e)}static removeGroupConversation(e){vg.i().removeGroupConversation(e)}static topPrivateConversation(e){vg.i().topPrivateConversation(e)}static topGroupConversation(e){vg.i().topGroupConversation(e)}static history(e){vg.i().history(e)}static subscribeUserPresence(e){vg.i().subscribeUserPresence(e)}static unsubscribeUserPresence(e){vg.i().unsubscribeUserPresence(e)}static hereNow(e){vg.i().hereNow(e)}static subscribeGroup(e){vg.i().subscribeGroup(e)}static unsubscribeGroup(e){vg.i().unsubscribeGroup(e)}static subscribeGroupPresence(e){vg.i().subscribeGroupPresence(e)}static unsubscribeGroupPresence(e){vg.i().unsubscribeGroupPresence(e)}static groupHereNow(e){vg.i().groupHereNow(e)}static groupOnlineCount(e){vg.i().groupOnlineCount(e)}static markMessageAsRead(e){vg.i().markMessageAsRead(e)}static csteam(e){return new Dg(e)}static pendingConversations(e){vg.i().latestPendingConversations(e)}static topConversation(e){vg.i().topConversation(e)}static removeConversation(e){vg.i().removeConversation(e)}},Rg.pubsub=class{static publish(e){this.catch((()=>{gu.instance.publish(e)}),e)}static subscribe(e){this.catch((()=>{gu.instance.subscribe(e)}),e)}static unsubscribe(e){this.catch((()=>{gu.instance.unsubscribe(e)}),e)}static subscribePresence(e){this.catch((()=>{gu.instance.subscribePresence(e)}),e)}static unsubscribePresence(e){this.catch((()=>{gu.instance.unsubscribePresence(e)}),e)}static history(e){this.catch((()=>{gu.instance.history(e)}),e)}static hereNow(e){this.catch((()=>{gu.instance.hereNow(e)}),e)}static catch(e,t){try{if(fu.check(),[Wr.DISCONNECTED,Wr.DISCONNECTING,Wr.CONNECT_FAILED].includes(Wc.Socket.status()))throw new Error("Please call connect() first.");e()}catch(n){gc.onFailed(t,n)}}};var Og="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ag={exports:{}};window,Ag.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/Users/chrisftian/Documents/projects/cos-sdk/cos-wx-sdk-v5/dist",n(n.s=8)}([function(e,t,n){function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nRa=e,Ma=Symbol();function Na(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var Da,Ba;(Ba=Da||(Da={})).direct="direct",Ba.patchObject="patch object",Ba.patchFunction="patch function";const La=()=>{};function ja(e,t,n,i=La){e.push(t);const o=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),i())};return!n&&Un()&&function(e){Dn&&Dn.cleanups.push(e)}(o),o}function Ua(e,...t){e.slice().forEach((e=>{e(...t)}))}const Fa=e=>e();function Ga(e,t){e instanceof Map&&t instanceof Map&&t.forEach(((t,n)=>e.set(n,t))),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const i=t[n],o=e[n];Na(o)&&Na(i)&&e.hasOwnProperty(n)&&!no(i)&&!Vi(i)?e[n]=Ga(o,i):e[n]=i}return e}const qa=Symbol();const{assign:za}=Object;function Ha(e,t,n,i){const{state:o,actions:s,getters:r}=t,a=n.state.value[e];let c;return c=$a(e,(function(){a||(n.state.value[e]=o?o():{});const t=function(e){const t=p(e)?new Array(e.length):{};for(const n in e)t[n]=lo(e,n);return t}(n.state.value[e]);return za(t,s,Object.keys(r||{}).reduce(((t,i)=>(t[i]=Ji(Ys((()=>{Pa(n);const t=n._s.get(e);return r[i].call(t,t)}))),t)),{}))}),t,n,i,!0),c}function $a(e,t,n={},i,o,s){let r;const a=za({actions:{}},n),c={deep:!0};let l,u,p,d=[],h=[];const f=i.state.value[e];let m;function g(t){let n;l=u=!1,"function"==typeof t?(t(i.state.value[e]),n={type:Da.patchFunction,storeId:e,events:p}):(Ga(i.state.value[e],t),n={type:Da.patchObject,payload:t,storeId:e,events:p});const o=m=Symbol();wo().then((()=>{m===o&&(l=!0)})),u=!0,Ua(d,n,i.state.value[e])}s||f||(i.state.value[e]={}),io({});const v=s?function(){const{state:e}=n,t=e?e():{};this.$patch((e=>{za(e,t)}))}:La;function y(t,n){return function(){Pa(i);const o=Array.from(arguments),s=[],r=[];let a;Ua(h,{args:o,name:t,store:b,after:function(e){s.push(e)},onError:function(e){r.push(e)}});try{a=n.apply(this&&this.$id===e?this:b,o)}catch(c){throw Ua(r,c),c}return a instanceof Promise?a.then((e=>(Ua(s,e),e))).catch((e=>(Ua(r,e),Promise.reject(e)))):(Ua(s,a),a)}}const b=zi({_p:i,$id:e,$onAction:ja.bind(null,h),$patch:g,$reset:v,$subscribe(t,n={}){const o=ja(d,t,n.detached,(()=>s())),s=r.run((()=>Fo((()=>i.state.value[e]),(i=>{("sync"===n.flush?u:l)&&t({storeId:e,type:Da.direct,events:p},i)}),za({},c,n))));return o},$dispose:function(){r.stop(),d=[],h=[],i._s.delete(e)}});i._s.set(e,b);const x=(i._a&&i._a.runWithContext||Fa)((()=>i._e.run((()=>(r=jn()).run(t)))));for(const C in x){const t=x[C];if(no(t)&&(!no(k=t)||!k.effect)||Vi(t))s||(!f||Na(S=t)&&S.hasOwnProperty(qa)||(no(t)?t.value=f[C]:Ga(t,f[C])),i.state.value[e][C]=t);else if("function"==typeof t){const e=y(C,t);x[C]=e,a.actions[C]=t}}var S,k;return za(b,x),za(Xi(b),x),Object.defineProperty(b,"$state",{get:()=>i.state.value[e],set:e=>{g((t=>{za(t,e)}))}}),i._p.forEach((e=>{za(b,r.run((()=>e({store:b,app:i._a,pinia:i,options:a}))))})),f&&s&&n.hydrate&&n.hydrate(b.$state,f),l=!0,u=!0,b}var Va,Ka,Wa;(Wa=Va||(Va={})).UNIAPP="uniapp",Wa.REACT_NATIVE="rn",Wa.COCOS="cocos",Wa.UNKNOWN="unknown";class Xa{constructor(){this.framework=null,this.methods={[Va.UNIAPP]:this.isUniApp,[Va.REACT_NATIVE]:this.isReactNative,[Va.COCOS]:this.isCocos};const e=this.methods,t=Object.keys(e);for(const n of t)if((0,e[n])()){this.framework=n;break}this.framework=this.framework||Va.UNKNOWN,this.framework}static currentFramework(){return this.instance||(this.instance=new Xa),this.instance.framework}isUniApp(){try{return"function"==typeof Nn.getSystemInfoSync}catch(Wa){return!1}}isReactNative(){try{return"object"==typeof navigator&&"ReactNative"===navigator.product}catch(Wa){return!1}}isTaro(){try{return void 0!==process.env.TARO_ENV}catch(Wa){return!1}}isCocos(){try{return void 0!==cc.sys.localStorage}catch(Wa){return!1}}}class Ja{static init(e){Xa.currentFramework()===Va.REACT_NATIVE&&(this.validate(e),this.platform=e.platform,this.asyncStorage=e.asyncStorage)}static validate(e){if(!e)throw new Error("'reactNativeOptions' is missing when calling GoEasy.getInstance()");if(!e.platform)throw new Error("'platform' is missing in GoEasy 'reactNativeOptions'");if(!e.asyncStorage)throw new Error("'asyncStorage' is missing in GoEasy 'reactNativeOptions'")}}!function(e){e.DISCONNECTED="disconnected",e.DISCONNECTING="disconnecting",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.RECONNECTED="reconnected",e.EXPIRED_RECONNECTED="reconnected",e.CONNECT_FAILED="connect_failed"}(Ka||(Ka={}));const Qa="2.13.17";var Ya,Za;!function(e){e.PRIVATE="private",e.GROUP="group",e.SYSTEM="system",e.CS="cs"}(Ya||(Ya={})),function(e){e.NEW="new",e.SENDING="sending",e.SUCCESS="success",e.FAIL="fail"}(Za||(Za={}));class ec{}class tc{constructor(e,t){this.id=e,this.data=t}}let nc=new class{isDef(e){return!this.isUndef(e)}isUndef(e){return null==e}isPrimitive(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}isObject(e){return null!==e&&"object"==typeof e}isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}isValidArrayIndex(e){let t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}isString(e){return"string"==typeof e}isNumber(e){return"number"==typeof e}isStringOrNumber(e){return this.isString(e)||this.isNumber(e)}isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}isEmpty(e){return this.isArray(e)?0===e.length:this.isObject(e)?!this.isDef(e):!this.isNumber(e)&&(this.isString(e)?""===e.trim():!this.isDef(e))}isNative(e){return"function"==typeof e&&/native code/.test(e.toString())}isFunction(e){return"function"==typeof e}isBoolean(e){return"boolean"==typeof e}isTrue(e){return!0===e}isFalse(e){return!1===e}isNull(e){return null===e}};var ic;!function(e){e.MP_WX="mp-wx",e.MP_WGAME="mp-wgame",e.MP_BYTE="mp-byte",e.MP_BAIDU="mp-baidu",e.MP_ALI="mp-ali",e.BROWSER="browser",e.NODE="node",e.UNI_IOS="uni-ios",e.UNI_ANDROID="uni-android",e.COCOS_IOS="cocos-ios",e.COCOS_ANDROID="cocos-android",e.RN_IOS="rn-ios",e.RN_ANDROID="rn-android",e.UNKNOWN="unknown"}(ic||(ic={}));class oc{constructor(){this.platform=null,this.methods={[ic.BROWSER]:this.isBrowser,[ic.MP_WX]:this.isMPWX,[ic.MP_WGAME]:this.isMPWeGame,[ic.MP_BYTE]:this.isMPByte,[ic.MP_BAIDU]:this.isMPBaidu,[ic.MP_ALI]:this.isMPAli,[ic.NODE]:this.isNode,[ic.UNI_IOS]:this.isUniAppIOS,[ic.UNI_ANDROID]:this.isUniAppAndroid,[ic.COCOS_IOS]:this.isCocosIOS,[ic.COCOS_ANDROID]:this.isCocosAndroid,[ic.RN_IOS]:this.isRNiOS,[ic.RN_ANDROID]:this.isRNAndroid};const e=this.methods,t=Object.keys(e);for(const n of t)if((0,e[n])()){this.platform=n;break}this.platform=this.platform||ic.UNKNOWN,this.platform}static currentPlatform(){return this.instance||(this.instance=new oc),oc.instance.platform}isBrowser(){return"undefined"!=typeof navigator&&"Taro"!==navigator.product&&"ReactNative"!==navigator.product&&"undefined"==typeof GameGlobal&&("undefined"==typeof cc||null!==cc.sys.browserType)&&"undefined"==typeof my&&"undefined"==typeof tt&&"undefined"==typeof swan}isMPWX(){return"object"==typeof Mn&&"function"==typeof Mn.getSystemInfoSync&&"undefined"==typeof WebSocket&&"undefined"==typeof XMLHttpRequest&&"undefined"==typeof plus&&"undefined"==typeof tt}isMPWeGame(){return"object"==typeof GameGlobal}isMPByte(){return"object"==typeof tt&&"function"==typeof tt.getSystemInfoSync}isMPBaidu(){return"object"==typeof swan&&"function"==typeof swan.getSystemInfoSync}isMPAli(){return"object"==typeof my&&"function"==typeof my.getSystemInfoSync}isNode(){try{return"node"===process.release.name}catch(Wa){return!1}}isUniAppIOS(){try{return"ios"===Nn.getSystemInfoSync().platform&&"app"===Nn.getSystemInfoSync().uniPlatform}catch(Wa){return!1}}isUniAppAndroid(){try{return"android"===Nn.getSystemInfoSync().platform&&"app"===Nn.getSystemInfoSync().uniPlatform}catch(Wa){return!1}}isCocosIOS(){try{return"iOS"===cc.sys.os}catch(Wa){return!1}}isCocosAndroid(){try{return"Android"===cc.sys.os}catch(Wa){return!1}}isRNiOS(){try{return"ios"===Ja.platform.OS}catch(Wa){return!1}}isRNAndroid(){try{return"android"===Ja.platform.OS}catch(Wa){return!1}}}class sc{}sc.type=ic,sc.current=oc.currentPlatform();class rc{onFrontend(e){this.onFrontendCallback=e}}class ac extends rc{constructor(){super(...arguments),this.runningBackend=!1}startCheck(){"object"==typeof plus&&(plus.globalEvent.addEventListener("resume",(()=>{this.runningBackend=!1,this.runningBackend,this.onFrontendCallback&&this.onFrontendCallback()}),!1),plus.globalEvent.addEventListener("pause",(()=>{this.runningBackend=!0,this.runningBackend}),!1))}isBackend(){return this.runningBackend}support(){const e=oc.currentPlatform();return[ic.UNI_IOS,ic.UNI_ANDROID].includes(e)}}class lc extends rc{constructor(){super(...arguments),this.runningBackend=!1}startCheck(){Mn.onAppShow((()=>{this.runningBackend=!1})),Mn.onAppHide((()=>{this.runningBackend=!0}))}isBackend(){return this.runningBackend}support(){return oc.currentPlatform()===ic.MP_WX}}const uc=new class{constructor(){[new ac,new lc].forEach((e=>{if(e.support())return this.checker=e,void this.checker.startCheck()}))}isBackend(){return this.checker&&this.checker.isBackend()}onFrontend(e){this.checker.onFrontend(e)}};var pc,dc,hc=Object.freeze({__proto__:null,runStatus:uc});!function(e){e.authorize="authorize",e.manualDisconnect="manualDisconnect",e.subscribe="subscribe",e.unsubscribe="unsubscribe",e.publish="publish",e.ack="ack",e.historyMessages="historyMessages",e.hereNow="hereNow",e.hereNowByUserIds="hereNowByUserIds",e.PUBSUB_PRESENCE_SUBSCRIBE="PUBSUB_PRESENCE_SUBSCRIBE",e.PUBSUB_PRESENCE_UNSUBSCRIBE="PUBSUB_PRESENCE_UNSUBSCRIBE",e.PUBSUB_PRESENCE_HERENOW="PUBSUB_PRESENCE_HERENOW",e.imLastConversations="imLastConversations",e.markPrivateMessageAsRead="markPrivateMessageAsRead",e.markGroupMessageAsRead="markGroupMessageAsRead",e.imGroupOnlineCount="imGroupOnlineCount",e.imHereNow="imHereNow",e.imGroupHereNow="imGroupHereNow",e.publishIM="publishIM",e.subscribeUserPresence="subscribeUserPresence",e.unsubscribeUserPresence="unsubscribeUserPresence",e.subscribeGroupPresence="subscribeGroupPresence",e.unsubscribeGroupPresence="unsubscribeGroupPresence",e.removeConversation="removeConversation",e.topConversation="topConversation",e.imData="imData",e.subscribeGroups="subscribeGroups",e.unsubscribeGroup="unsubscribeGroup",e.IM_DELETE_MESSAGE="IM_DELETE_MESSAGE",e.IM_HISTORY="IM_HISTORY",e.IM_HISTORY_CHANGE="IM_HISTORY_CHANGE",e.IM_RECALL_MESSAGE="IM_RECALL_MESSAGE",e.IM_MARK_AS_READ="IM_MARK_AS_READ",e.CS_PENDING_CONVERSATION="CS_PENDING_CONVERSATION",e.CS_ACCEPT="CS_ACCEPT",e.CS_END="CS_END",e.CS_TRANSFER="CS_TRANSFER",e.CS_AGENTS="CS_AGENTS",e.CS_CUSTOMER_STATUS="CS_CUSTOMER_STATUS",e.CS_MY_TEAMS="CS_MY_TEAMS",e.CS_ONLINE="CS_ONLINE",e.CS_OFFLINE="CS_OFFLINE",e.CS_LIVE_SESSION="CS_LIVE_SESSION",e.CS_QUIT_LIVE="CS_QUIT_LIVE",e.SET_IOS_BADGE="SET_IOS_BADGE",e.MD_CMD="MD_CMD"}(pc||(pc={})),function(e){e[e.connect=3e3]="connect",e[e.reconnectionDelayMax=3e3]="reconnectionDelayMax",e[e.commonQuerySingle=2500]="commonQuerySingle",e[e.commonQueryTotal=12e3]="commonQueryTotal",e[e.commonRequestSingle=1700]="commonRequestSingle",e[e.commonRequestTotal=12e3]="commonRequestTotal",e[e.commonInfiniteSingle=1700]="commonInfiniteSingle",e[e.commonInfiniteTotal=864e5]="commonInfiniteTotal"}(dc||(dc={}));class fc{static onSuccess(e,t){nc.isFunction(e.onSuccess)&&e.onSuccess(t)}static onFailed(e,t){if(!nc.isObject(e)||!nc.isFunction(e.onFailed))throw t;e.onFailed(t)}}function mc(e,t,n,i){return new(n||(n=Promise))((function(o,s){function r(e){try{c(i.next(e))}catch(t){s(t)}}function a(e){try{c(i.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}c((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var gc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vc(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),t}var yc={exports:{}};!function(){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}yc.exports=e,e.prototype.on=e.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},e.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o>>((3&t)<<3)&255;return Cc}}for(var wc=[],Ec=0;Ec<256;++Ec)wc[Ec]=(Ec+256).toString(16).substr(1);var Tc,Ic,_c=function(e,t){var n=t||0,i=wc;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")},Oc=xc.exports,Ac=_c,Rc=0,Pc=0,Mc=xc.exports,Nc=_c,Dc=function(e,t,n){var i=t&&n||0,o=t||[],s=(e=e||{}).node||Tc,r=void 0!==e.clockseq?e.clockseq:Ic;if(null==s||null==r){var a=Oc();null==s&&(s=Tc=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==r&&(r=Ic=16383&(a[6]<<8|a[7]))}var c=void 0!==e.msecs?e.msecs:(new Date).getTime(),l=void 0!==e.nsecs?e.nsecs:Pc+1,u=c-Rc+(l-Pc)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),(u<0||c>Rc)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Rc=c,Pc=l,Ic=r;var p=(1e4*(268435455&(c+=122192928e5))+l)%4294967296;o[i++]=p>>>24&255,o[i++]=p>>>16&255,o[i++]=p>>>8&255,o[i++]=255&p;var d=c/4294967296*1e4&268435455;o[i++]=d>>>8&255,o[i++]=255&d,o[i++]=d>>>24&15|16,o[i++]=d>>>16&255,o[i++]=r>>>8|128,o[i++]=255&r;for(var h=0;h<6;++h)o[i+h]=s[h];return t||Ac(o)},Bc=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Mc)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||Nc(o)},Lc=Bc;Lc.v1=Dc,Lc.v4=Bc;var jc=Lc;class Uc{support(){return!0}getParams(){return this.params}setData(e){this.active=e.a,this.data=e.d}preConnect(e){}postConnect(){}}class Fc{static initModule(e){e.support()&&this.modules.set(e.name,e)}static getParams(){return mc(this,void 0,void 0,(function*(){let e={};for(const[t,n]of this.modules)e[t]=(yield n.getParams())||null;return e}))}static setDatas(e){Object.keys(e).forEach((t=>{this.modules.get(t).setData(e[t])}))}static preConnect(e){this.modules.forEach(((t,n)=>{t.preConnect(e)}))}static postConnect(){this.modules.forEach(((e,t)=>{e.postConnect()}))}}Fc.Module=Uc,Fc.modules=new Map;const Gc=bc;class qc{constructor(){this.emitter=new Gc}on(e,t){return this.emitter.on(e,t),this}once(e,t){return this.emitter.once(e,t),this}off(e,t){return this.emitter.off(e,t),this}fire(e,t){return this.emitter.emit(e,t),this}}class zc{constructor(){this.eventDriver=new qc}on(e,t){this.eventDriver.on(e,t)}off(e,t){this.eventDriver.off(e,t)}fire(e,t){this.eventDriver.fire(e,t)}}let Hc=new class{isDef(e){return!this.isUndef(e)}isUndef(e){return null==e}isPrimitive(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}isObject(e){return null!==e&&"object"==typeof e}isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}isValidArrayIndex(e){let t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}isString(e){return"string"==typeof e}isNumber(e){return"number"==typeof e}isStringOrNumber(e){return this.isString(e)||this.isNumber(e)}isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}isEmpty(e){return this.isArray(e)?0===e.length:this.isObject(e)?!this.isDef(e):!this.isNumber(e)&&(this.isString(e)?""===e.trim():!this.isDef(e))}isNative(e){return"function"==typeof e&&/native code/.test(e.toString())}isFunction(e){return"function"==typeof e}isBoolean(e){return"boolean"==typeof e}isTrue(e){return!0===e}isFalse(e){return!1===e}isNull(e){return null===e}};const $c=bc;class Vc{constructor(){this.emitter=new $c}on(e,t){if(!Hc.isString(e))throw Error("event require a string.");if(!Hc.isFunction(t))throw Error("callback must be a function");this.emitter.on(e,t)}fire(e,t){this.emitter.emit(e,t)}off(e,t){this.emitter.off(e,t)}}class Kc{static init(e,t,n,i,o,s){this.Socket=e,this.N=t,this.Member=n,this.v=i,this.Platform=o,this.GModules=s}}const Wc=jc;class Xc{static get(){return Wc.v1().replace(/-/g,"")}}var Jc,Qc;(Qc=Jc||(Jc={})).WRITE="WRITE",Qc.READ="READ",Qc.NONE="NONE";class Yc{constructor(e){this.permission=Jc.NONE,this.singleTimeout=0,this.totalTimeout=0,this.startTime=0,this.complete=!1,this.retried=0,this.unique=!1,this.uuid=Xc.get(),this.name=e.name,this.params=e.params,this.permission=e.permission,this.totalTimeout=e.totalTimeout,this.singleTimeout=e.singleTimeout,e.unique&&(this.unique=e.unique),this.success=t=>{this.complete||(this.end(),e.success(t))},this.fail=t=>{this.complete||(this.end(),e.fail(t))}}start(){this.startTime=Date.now(),this.initAutoTimeout()}end(){this.complete=!0,clearTimeout(this.timeoutHandler)}initAutoTimeout(){this.timeoutHandler=setTimeout((()=>{this.complete||this.fail({resultCode:408,content:"Host unreachable or timeout"})}),this.totalTimeout)}}class Zc extends Uc{static init(){return this.module=new Zc,this.module.name=this.GN_MODULE_NAME,this.module}static setRegId(e,t){if(e){this.module.regIdPromise=e;let n=t;this.module.params={v:{npv:n}}}}preConnect(e){this.wxmpId=e.wxmpId}getParams(){return mc(this,void 0,void 0,(function*(){if(this.params=this.params||{},this.regIdPromise)try{const e=new Promise(((e,t)=>{setTimeout((()=>t("timeout")),1e3)}));this.params.regId=yield Promise.race([this.regIdPromise,e])}catch(Wa){console.warn("Failed to register the Manufacturers Push service:"+JSON.stringify(Wa))}return this.params.wxmpId=this.wxmpId,this.params}))}}Zc.GN_MODULE_NAME="GN";class el{static init(e){this.allowNotification=!0===e;let t=Zc.init();Fc.initModule(t),this.supportAppNotification()&&(this.uniappPlugin=Nn.requireNativePlugin("GoEasy-Uniapp"),this.uniappPlugin?(this.regIdPromise=this.askRegId(),this.v=this.uniappPlugin.v(),Zc.setRegId(this.regIdPromise,this.v)):console.warn("No GoEasy-Uniapp Native Plugin."),this.setClientBadge(0))}static addAssembler(e){this.payloadAssemblers.push(e)}static assemblePayload(e){let t=this.payloadAssemblers.find((t=>t.support(e)));return t?t.assemble(e):e}static createLocalNotification(e,t,n,i,o){uc.isBackend()&&(n.g=1,"undefined"!=typeof plus&&(i?(this.uniappPlugin&&this.uniappPlugin.playSound(i),plus.push.createMessage(t,JSON.stringify(n),{title:e,sound:"none"})):plus.push.createMessage(t,JSON.stringify(n),{title:e}),"+1"===o&&this.setClientBadge(el.badge+1)))}static setBadge(e){if(!Number.isInteger(e.badge)||e.badge<0)fc.onFailed(e,"badge must be an integer greater than or equal to 0.");else if(el.supportAppNotification())if(this.uniappPlugin&&oc.currentPlatform()===ic.UNI_IOS){let t=new Yc({name:pc.SET_IOS_BADGE,params:{badge:e.badge},unique:!0,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,permission:Jc.WRITE,success:()=>{fc.onSuccess(e),this.setClientBadge(e.badge)},fail:t=>{fc.onFailed(e,t.content)}});Kc.Socket.e(t)}else fc.onSuccess(e),this.setClientBadge(e.badge)}static setClientBadge(e){"vivo"!==plus.device.vendor&&(el.badge=e,plus.runtime.setBadgeNumber(e))}static askRegId(){let e=null,t=0;const n=()=>new Promise(((i,o)=>{this.uniappPlugin.regId((e=>{i(e)}),(i=>{if(!(1e6===i.data.code&&t<=10))return clearTimeout(e),o(i);e=setTimeout((()=>{t++,this.regIdPromise=n()}),3500)}))}));return n()}static getRegIdPromise(){return this.regIdPromise}static supportAppNotification(){const e=oc.currentPlatform();return this.allowNotification&&(e===ic.UNI_ANDROID||e===ic.UNI_IOS)}static listenPlusClickNotification(){plus.push.addEventListener("click",(e=>{try{if(e){const t="string"==typeof e.payload?JSON.parse(e.payload):e.payload;if(this.availableIntent(t)){let e=this.assemblePayload(t);plus.push.clear(),this.onClickNotificationCallback(e)}}}catch(t){}}))}static availableIntent(e){return e&&Object.keys(e).length&&e.g&&1===parseInt(e.g)}static getIntentData(){this.uniappPlugin.getIntentData((e=>{if(!this.availableIntent(e))return;let t=this.assemblePayload(e);const n=oc.currentPlatform();plus.push.clear(),n===ic.UNI_ANDROID&&this.uniappPlugin.clearAll(),this.onClickNotificationCallback(t)}))}static listenClick(){this.listenPlusClickNotification();const e=oc.currentPlatform();this.uniappPlugin&&e===ic.UNI_ANDROID&&(this.getIntentData(),uc.onFrontend((()=>{this.getIntentData()})))}static onClickNotification(e){if(el.supportAppNotification()){if(!nc.isFunction(e))throw new Error("The arguments must be a function.");null===this.onClickNotificationCallback?(this.onClickNotificationCallback=e,this.listenClick()):console.warn("The onClickNotification event has been listened on. Please do not listen to it more than once.")}else console.warn("The current environment doesn't support or allowNotification is false.")}}function tl(...e){}el.uniappPlugin=null,el.v=null,el.regIdPromise=null,el.onClickNotificationCallback=null,el.payloadAssemblers=new Array;const nl=new class{validateId(e,t){if(nc.isEmpty(e))throw{code:400,content:` ${t} is required.`};if(!nc.isString(e))throw{code:400,content:`TypeError: ${t} require string.`}}validateIdArray(e,t){if(!Array.isArray(e)||0===e.length)throw{code:400,content:`TypeError: ${t} require array.`};if(e.length>100)throw{code:400,content:`${t} is over max length 100.`};for(let n=0;n1e4)throw{code:400,content:"Message over max length 10000."};if(e.qos&&!(e.qos in[0,1]))throw{code:400,content:"Qos must be 0 or 1."};e.wxmpTemplateMsg&&nl.validateWXMPTemplateMsg(e.wxmpTemplateMsg),nc.isDef(e.notification)&&nl.validateNotification(e.notification)}}class sl{constructor(e){if(this.options=e,this.channels=e.channels||[e.channel],!nc.isEmpty(e.channel)){let t=e.channel.toString();this.channels=[t]}nc.isEmpty(e.channels)||(this.channels=e.channels.toString().split(","))}}var rl,al,cl;!function(e){e.message="message",e.imMessage="imMessage",e.userPresence="userPresence",e.groupPresence="groupPresence",e.PS_PRESENCE_EVENT="PS_PRESENCE_EVENT",e.IM_MSG_READ="IM_MSG_READ",e.IM_MSG_DELETED="IM_MSG_DELETED",e.IM_MSG_RECALLED="IM_MSG_RECALLED",e.CS_ONLINE_CHANGED="CS_ONLINE_CHANGED"}(rl||(rl={})),function(e){e.CONNECTED="CONNECTED",e.RECONNECTED="RECONNECTED",e.DISCONNECTED="DISCONNECTED",e.LOST="LOST",e.EXPIRED_RECONNECTED="EXPIRED_RECONNECTED",e.NEW_MESSAGE="NEW_MESSAGE",e.CONNECTING="CONNECTING"}(al||(al={}));class ll{constructor(){this.subscriptions=[],Kc.Socket.onMessage(rl.message,this.onNewMessage.bind(this)),Kc.Socket.on(al.EXPIRED_RECONNECTED,this.expiredResubscribe.bind(this)),Kc.Socket.on(al.RECONNECTED,this.resubscribePresenceChannel.bind(this))}expiredResubscribe(){this.subscriptions.forEach((e=>{this.doSubscribe(e,!1)}))}resubscribePresenceChannel(){this.subscriptions.forEach((e=>{let t=e.options;t.presence&&t.presence.enable&&this.doSubscribe(e,!0)}))}onNewMessage(e){if(e.n.indexOf("_presence")>-1)return;e.a&&Kc.Socket.sendAck("ack",{i:e.i,c:e.n});let t={time:e.t,channel:e.n,content:e.c};this.createNotification(e),this.findSubscriptionByChannel(t.channel).options.onMessage(t)}createNotification(e){const t=Kc.N.supportAppNotification();if(!nc.isObject(e.nt)||!t)return;const n={ch:e.n,ctt:e.c};Kc.N.createLocalNotification(e.nt.t,e.nt.c,n,e.nt.sound,e.nt.badge)}subscribe(e){if(nl.validateChannelAndChannels(e.channel,e.channels),nc.isDef(e.presence)){let t=e.presence.enable;if(!nc.isBoolean(t))throw{code:400,content:"Subscription failed. presence.enable must be a boolean"};if(t&&!Kc.Socket.user().id)throw{code:400,content:"Subscription failed. If presence is enable, the id must be specified when calling the connect method"}}let t=new sl(e);this.doSubscribe(t,!1).then((()=>{this.subscriptions.push(t),fc.onSuccess(e,{code:200,content:"ok"})})).catch((t=>{fc.onFailed(e,{code:t.resultCode,content:t.content})}))}doSubscribe(e,t){let n=e.options;return new Promise(((i,o)=>{let s=new Yc({name:pc.subscribe,permission:Jc.READ,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,params:{channels:e.channels,accessToken:n.accessToken,presence:n.presence,resubscribe:t},success:()=>{i()},fail:e=>{o(e)}});Kc.Socket.e(s)}))}unsubscribe(e){nl.validateChannel(e.channel,"channel"),e.channel=e.channel.toString();const t=this.findSubscriptionByChannel(e.channel);if(!t)return void e.onFailed({code:400,content:"channel["+e.channel+"] is not subscribed"});let n=new Yc({name:pc.unsubscribe,params:{channel:e.channel,presence:t.options.presence},permission:Jc.READ,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:()=>{e.onSuccess({code:200,content:"ok"}),this.removeChannel(e.channel)},fail:function(t){e.onFailed({code:t.resultCode,content:t.content})}});Kc.Socket.e(n)}removeChannel(e){for(let t=this.subscriptions.length-1;t>=0;t--){const n=this.subscriptions[t].channels,i=n.indexOf(e);if(i>-1){n.splice(i,1),0===n.length&&this.subscriptions.splice(t,1);break}}}findSubscriptionByChannel(e){let t=!1,n=null;for(let i=this.subscriptions.length-1;i>=0;i--){let o=this.subscriptions[i].channels;for(let s=0;s{e.onSuccess({code:t.resultCode||t.code||200,content:t.content})},fail:t=>{e.onFailed({code:t.resultCode||t.code,content:t.content})}});Kc.Socket.e(t)}}class pl{constructor(){this.channelPresenceMap=new Map,this.onPresenceEvent=e=>{let t=this.channelPresenceMap.get(e.channel);null==t||t.onPresence(e)},this.expireAllChannelPresences=()=>{this.channelPresenceMap.forEach(((e,t)=>{e.expire()}))},this.resubscribe=()=>{this.channelPresenceMap.forEach(((e,t)=>{e.subscribed()&&e.doSubscribe()}))},Kc.Socket.on(al.LOST,this.expireAllChannelPresences),Kc.Socket.on(al.RECONNECTED,this.resubscribe),Kc.Socket.onMessage(rl.PS_PRESENCE_EVENT,this.onPresenceEvent)}hereNow(e){nl.validateChannel(e.channel,"channel");let t,n=this.channelPresenceMap.get(e.channel.toString());n&&n.queryPromise?(e.limit&&e.limit>n.membersLimit&&n.doQuery(e.limit),t=n.queryPromise):t=hl(e.channel,e.limit),t.then((t=>{e.onSuccess(t)})).catch((t=>{e.onFailed(t)}))}subscribe(e){if(nl.validateChannel(e.channel,"channel"),nc.isUndef(e.onPresence)||!nc.isFunction(e.onPresence))throw{code:400,content:"Subscription Presence failed. onPresence callback function is required"};let t=e.channel.toString(),n=this.channelPresenceMap.get(t);n||(n=new dl(t),this.channelPresenceMap.set(t,n)),n.subscribe(e)}unsubscribe(e){nl.validateChannel(e.channel,"channel");let t=e.channel.toString();if(this.channelPresenceMap.get(t)){let n=new Yc({name:pc.PUBSUB_PRESENCE_UNSUBSCRIBE,permission:Jc.READ,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,params:{channel:t},success:n=>{this.channelPresenceMap.delete(t),e.onSuccess()},fail:t=>{e.onFailed(t)}});Kc.Socket.e(n)}else e.onSuccess()}}class dl{constructor(e){this.membersLimit=10,this.queried=!1,this.channel=e}onPresence(e){return mc(this,void 0,void 0,(function*(){this.queried?this.update(e):yield this.queryPromise,this.on({channel:this.channel,action:e.action,member:e.member,time:e.time,amount:this.amount,members:this.membersByLimit()})}))}membersByLimit(){return this.members.slice(0,this.membersLimit)}subscribe(e){return mc(this,void 0,void 0,(function*(){if(e.membersLimit&&(this.membersLimit=Math.min(e.membersLimit,300)),!this.subscribed())try{yield this.doSubscribe()}catch(t){return void e.onFailed(t)}this.on=e.onPresence,e.onSuccess()}))}doSubscribe(){return this.doQuery(this.membersLimit),new Promise(((e,t)=>{let n=new Yc({name:pc.PUBSUB_PRESENCE_SUBSCRIBE,permission:Jc.READ,params:{channel:this.channel},singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:t=>{e()},fail:e=>{t(e)}});Kc.Socket.e(n)}))}doQuery(e){this.queryPromise=hl(this.channel,e),this.queryPromise.then((e=>{this.members=e.content.members,this.amount=e.content.amount,this.queried=!0})).catch((e=>{throw e}))}update(e){if(["join","back"].includes(e.action))this.members.unshift(e.member);else if(["leave","timeout"].includes(e.action)){let t=this.members.findIndex((t=>t.id===e.member.id));t>-1&&this.members.splice(t,1)}this.amount=e.amount}expire(){this.queried=!1,this.queryPromise=null}subscribed(){return void 0!==this.on}}function hl(e,t){return t||(t=10),new Promise(((n,i)=>{let o={channel:e,limit:t},s=new Yc({name:pc.PUBSUB_PRESENCE_HERENOW,permission:Jc.READ,params:o,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,success:e=>{n(e)},fail:e=>{i(e)}});Kc.Socket.e(s)}))}class fl{constructor(){this.publisher=new ol,this.subscriber=new ll,this.presence2=new pl,this.histories=new ul}static init(){this.instance=new fl}publish(e){this.publisher.publish(e)}subscribe(e){this.subscriber.subscribe(e)}unsubscribe(e){this.subscriber.unsubscribe(e)}subscribePresence(e){this.presence2.subscribe(e)}unsubscribePresence(e){this.presence2.unsubscribe(e)}history(e){this.histories.get(e)}hereNow(e){this.presence2.hereNow(e)}}class ml extends Uc{static init(){return this.module=new ml,this.module.name=this.GWS_MODULE_NAME,this.initGN(),this.module}static initGN(){el.addAssembler(new class{assemble(e){return{channel:e.ch,content:e.ctt}}support(e){return!!e.ch}})}postConnect(){fl.init()}static check(){if(!this.module)throw{code:400,content:"PubSub not initialized. Please include 'PUBSUB' in the 'modules' during GoEasy initialization."}}}ml.GWS_MODULE_NAME="GWS";class gl{constructor(){}}!function(e){e.aliYun="ALI",e.qiNiu="QN",e.tencent="TX",e.s3="S3"}(cl||(cl={}));let vl=new class extends gl{constructor(){super()}upload(e,t){try{return e.storageLocation===cl.s3?this.uploadToS3(e,t):(delete e.parameters.fileRes,new Promise(((n,i)=>{Nn.uploadFile({url:e.host,filePath:this.getTempFilePath(e),name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))})))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file;return t.tempFilePath||t.fullPath||t.path}uploadToS3(e,t){return new Promise(((t,n)=>mc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(e);Nn.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cl.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{const i=this.getTempFilePath(e);if("undefined"!=typeof plus)plus.io.resolveLocalFileSystemURL(i,(e=>{e.file((e=>{let i=new plus.io.FileReader;i.onloadend=e=>{const n=Nn.base64ToArrayBuffer(e.target.result.split(",")[1]);t(n)},i.onerror=function(e){n(e)},i.readAsDataURL(e)}))}),(e=>{n("Resolve file URL failed: "+e.message)}));else if("undefined"!=typeof FileReader){const i=new FileReader;i.onload=()=>{t(i.result)},i.onerror=e=>{n(e)},i.readAsArrayBuffer(e.file)}else if("object"==typeof Mn&&Mn.canIUse("getFileSystemManager"))try{const e=Mn.getFileSystemManager().readFileSync(i);t(e)}catch(o){n(o)}}))}};const yl=new class extends gl{upload(e,t){try{return e.storageLocation===cl.s3?this.uploadToS3(e,t):new Promise(((n,i)=>{Mn.uploadFile({url:e.host,filePath:this.getTempFilePath(e),name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))}))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file||e.fileRes;return t.path||t.tempFilePath}uploadToS3(e,t){return new Promise(((t,n)=>mc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(this.getTempFilePath(e));Mn.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cl.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{try{t(Mn.getFileSystemManager().readFileSync(e))}catch(i){n(i)}}))}},bl=new class extends gl{constructor(){super()}upload(e,t){return new Promise(((n,i)=>{try{const o=new XMLHttpRequest,s=e.storageLocation===cl.s3,r=s?"PUT":"POST",a=s?e.url:e.host;o.open(r,a,!0);for(let t in e.headers)o.setRequestHeader(t,e.headers[t]);o.upload.onprogress=function(e){t&&t(e)},o.upload.onloadstart=function(e){t&&t(e)},o.upload.onloadend=function(e){t&&t(e)};let c=new FormData;for(let t in e.parameters)"fileRes"==t?c.append("file",e.parameters[t]):c.append(t,e.parameters[t]);const l=s?e.file:c;o.send(l),o.onreadystatechange=function(){4==o.readyState&&(o.status>=200&&o.status<300||304==o.status?(s&&(e.url=e.url.split("?")[0]),n()):i({code:o.status,content:o.responseText}))}}catch(o){i({code:500,content:o})}}))}fileToArrayBuffer(e){return new Promise(((t,n)=>{const i=new FileReader;i.onload=()=>{t(i.result)},i.onerror=e=>{n(e)},i.readAsArrayBuffer(e)}))}},xl=new class extends gl{upload(e,t){try{return e.storageLocation===cl.s3?this.uploadToS3(e,t):(delete e.parameters.fileRes,new Promise(((n,i)=>{my.uploadFile({url:e.host,filePath:this.getTempFilePath(e),fileType:"image",name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))})))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file;return t.path||t.tempFilePath}uploadToS3(e,t){return new Promise(((t,n)=>mc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(this.getTempFilePath(e));my.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cl.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{my.getFileSystemManager().readFile({filePath:e,success:e=>{t(e.data)},fail(e){n(e)}})}))}},Sl=new class extends gl{upload(e,t){try{return e.storageLocation===cl.s3?this.uploadToS3(e,t):(delete e.parameters.fileRes,new Promise(((n,i)=>{swan.uploadFile({url:e.host,filePath:this.getTempFilePath(e),name:"file",formData:e.parameters,success(e){200===e.statusCode?n():i({code:e.statusCode,content:e.errMsg})},fail(e){i({code:500,content:e.errMsg})}}).onProgressUpdate((e=>{t&&t(e)}))})))}catch(n){return new Promise(((e,t)=>{t({code:500,content:n})}))}}getTempFilePath(e){let t=e.file;return t.path||t.tempFilePath}uploadToS3(e,t){return new Promise(((t,n)=>mc(this,void 0,void 0,(function*(){const i=yield this.fileToArrayBuffer(this.getTempFilePath(e));swan.request({url:e.url,method:"PUT",header:e.headers,data:i,success(i){200===i.statusCode?(e.storageLocation===cl.s3&&(e.url=e.url.split("?")[0]),t()):n({code:i.statusCode,content:i.errMsg})},fail(e){n({code:500,content:e.errMsg})}})}))))}fileToArrayBuffer(e){return new Promise(((t,n)=>{swan.getFileSystemManager().readFile({filePath:e,success:e=>{t(e.data)},fail:e=>{n(e)}})}))}};class kl{constructor(e,t,n){this.storageLocation=e,this.url=t,this.name=n}}const Cl=new class{constructor(){this.uploader={[Va.UNIAPP]:vl,[ic.MP_WX]:yl,[ic.BROWSER]:bl,[ic.MP_ALI]:xl,[ic.MP_BAIDU]:Sl,[Va.REACT_NATIVE]:bl,[ic.MP_BYTE]:yl}}upload(e,t){return mc(this,void 0,void 0,(function*(){const n=Xa.currentFramework(),i=oc.currentPlatform(),o=n===Va.UNKNOWN?i:n;let s=this.uploader[o];return yield s.upload(e,t),new kl(e.storageLocation,e.url,e.newFileName)}))}};class wl{resolve(e){return new Promise(((t,n)=>{let i=new Yc({name:"uploadToken",params:{filename:e},permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail(e){n(e.content)},success(e){200===e.code?t(e.content):n(e.content)}});Kc.Socket.e(i)}))}}class El{constructor(e,t,n,i,o,s,r){this.storageLocation=e,this.host=t,this.headers=n,this.parameters=i,this.file=o,this.newFileName=s,this.url=r}}class Tl{constructor(){}newFileName(e){return e&&e.newFilename||""}}let Il=new class extends Tl{constructor(){super()}url(e){return e.host+"/"+e.dir+"/"+this.newFileName(e)}build(e,t,n){let i,o=this.newFileName(e);return i={key:e.dir+"/"+o,OSSAccessKeyId:e.accessKeyId,policy:e.policy,signature:e.signature,success_action_status:"200",fileRes:t},n&&(i={key:e.dir+"/"+o,OSSAccessKeyId:e.accessKeyId,policy:e.policy,signature:e.signature,success_action_status:"200","Content-Disposition":"attachment;filename="+t.name,fileRes:t}),new El(cl.aliYun,e.host,null,i,t,o,this.url(e))}},_l=new class extends Tl{constructor(){super()}url(e){return e.host+"/"+e.key}build(e,t,n){let i={"q-sign-algorithm":e.qSignAlgorithm,"q-ak":e.qAk,"q-key-time":e.qKeyTime,"q-signature":e.qSignature,policy:e.policy,"x-cos-security-token":e.xCosSecurityToken,success_action_status:"200",key:e.key,fileRes:t};return n&&(i={"q-sign-algorithm":e.qSignAlgorithm,"q-ak":e.qAk,"q-key-time":e.qKeyTime,"q-signature":e.qSignature,policy:e.policy,"x-cos-security-token":e.xCosSecurityToken,success_action_status:"200",key:e.key,"Content-Disposition":`attachment;filename=${t.name}`,fileRes:t}),new El(cl.tencent,e.host,null,i,t,e.key,this.url(e))}},Ol=new class extends Tl{constructor(){super()}url(e){return e.uploadUrl}build(e,t,n){const i={file:t};return new El(cl.s3,null,{"Content-Type":"application/octet-stream"},i,t,t.name,this.url(e))}};class Al{constructor(){this.uploadTokenResolver=new wl}builder(e){if(e===cl.aliYun)return Il;if(e===cl.tencent)return _l;if(e===cl.s3)return Ol;throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:"+e)}build(e,t,n){return mc(this,void 0,void 0,(function*(){try{let i=yield this.uploadTokenResolver.resolve(t),o=this.builder(i.vendor).build(i,e,n);return Promise.resolve(o)}catch(i){return Promise.reject(i)}}))}}class Rl{constructor(){this.requestBuilder=new Al,this.fileUploader=Cl}upload(e,t,n,i){return mc(this,void 0,void 0,(function*(){try{let o=yield this.requestBuilder.build(e,t,i);return this.fileUploader.upload(o,n)}catch(o){return Promise.reject(o)}}))}}var Pl,Ml,Nl,Dl;!function(e){e.MESSAGE_SENDING="IM_INTERNAL_MESSAGE_SENDING",e.MESSAGE_SEND_SUCCESS="IM_INTERNAL_MESSAGE_SEND_SUCCESS",e.MESSAGE_SEND_FAILED="IM_INTERNAL_MESSAGE_SEND_FAILED",e.MESSAGE_RECEIVED="IM_INTERNAL_MESSAGE_RECEIVED",e.MESSAGE_RECALLED="IM_INTERNAL_MESSAGE_RECALLED",e.MAX_MESSAGE_CHANGED="IM_INTERNAL_MAX_MESSAGE_CHANGED",e.MAX_MESSAGE_DELETED="IM_INTERNAL_MAX_MESSAGE_DELETED",e.UNREAD_AMOUNT_CHANGED="IM_INTERNAL_UNREAD_MESSAGE_CHANGED",e.CS_ONLINE_SUCCESS="CS_ONLINE_SUCCESS",e.CS_OFFLINE_SUCCESS="CS_OFFLINE_SUCCESS",e.CS_ACCEPTED="CS_ACCEPTED",e.CS_ENDED="CS_ENDED",e.CS_TRANSFER="CS_TRANSFER",e.CS_AGENT_MESSAGE_RECEIVED="CS_AGENT_MESSAGE_RECEIVED"}(Pl||(Pl={}));class Bl{clearUseLessAttribute(){delete this.buildOptions}isOtherSent(){return this.senderId!==Kc.Socket.user().id}getToData(){return this.buildOptions.createOptions.to.data}}class Ll{}!function(e){e.TEXT="text",e.IMAGE="image",e.FILE="file",e.VIDEO="video",e.AUDIO="audio"}(Ml||(Ml={}));class jl extends Ll{constructor(){super(...arguments),this.goEasyUploader=new Rl}improve(e){let t=e.message;return new Promise(((e,n)=>{let i,o,s=t.buildOptions.createOptions;t.type===Ml.VIDEO?(o=t.payload,i=o.video.name):(o=t.payload,i=o.name),this.goEasyUploader.upload(s.file,i,s.onProgress,t.type===Ml.FILE).then((n=>{n.storageLocation!==cl.s3&&(n.url=encodeURI(n.url)),this.setPayload(n,t),e()})).catch((e=>{n(e)}))}))}setPayload(e,t){t.payload.url=e.url}}class Ul extends jl{setPayload(e,t){let n,i=t.payload;switch(i.video.url=e.url,i.video.name=e.name,i.thumbnail.height>200&&(i.thumbnail.height=200,i.thumbnail.width=200*i.video.width/i.video.height),e.storageLocation){case cl.aliYun:n="?x-oss-process=video/snapshot,t_0000,f_jpg,h_"+i.thumbnail.height+",m_fast,ar_auto";break;case cl.tencent:n="?ci-process=snapshot&time=1&format=jpg&height="+i.thumbnail.height;break;case cl.s3:n="?process=video&height="+i.thumbnail.height;break;default:throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:"+e.storageLocation)}i.thumbnail.url=e.url+n}}class Fl extends jl{setPayload(e,t){let n,i=t.payload;i.url=e.url;const o=i.height>200?200:i.height;switch(e.storageLocation){case cl.aliYun:n="?x-oss-process=image/resize,m_lfit,h_"+o;break;case cl.tencent:n=`?imageMogr2/thumbnail/x${o}`;break;case cl.s3:n=`?process=image&height=${o}`;break;default:throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:"+e.storageLocation)}i.thumbnail=e.url+n}}class Gl{constructor(){this.improvers={[Ml.FILE]:new jl,[Ml.AUDIO]:new jl,[Ml.IMAGE]:new Fl,[Ml.VIDEO]:new Ul}}improve(e){let t=this.improvers[e.message.type];if(t)try{return t.improve(e)}catch(n){return Promise.reject(n)}return Promise.resolve()}}class ql extends zc{static init(){this.i=new ql}}class zl{constructor(e,t,n,i,o){this.validate(e),this.mt=e.type,this.to=t.id.toString(),this.d=JSON.stringify(t.data),this.p=JSON.stringify(e.payload),n&&(this.nt=n),o&&(this.at=o),i&&(this.wxmpTemplateMsg=il(i),this.wxmpTemplateMsg.data=JSON.stringify(this.wxmpTemplateMsg.data));let s=t.type;if(this.t=s,s===Ya.CS){let t=e;this.tid=t.teamId}this.guid=e.messageId}validate(e){if(e.type===Ml.TEXT&&JSON.stringify(e.payload).length>3072)throw Error("message-length limit 3kb")}}class Hl{constructor(){this.payloadImprover=new Gl}send(e){this.validate(e);let t=e.message,n=e.accessToken,i=t.buildOptions,o=i.createOptions,s=o.notification,r=o.wxmpTemplateMsg,a=o.to;a.data||(a.data={}),t.status=Za.SENDING;let c=i.complete,l=this.payloadImprover.improve(e);Promise.all([c,l]).then((()=>mc(this,void 0,void 0,(function*(){if(o.beforeSend){const e=JSON.parse(JSON.stringify(t));yield o.beforeSend(e)}this.doSend(t,a,s,r,n,e)})))).catch((n=>{t.status=Za.FAIL,fc.onFailed(e,{code:n&&n.code||400,content:n&&n.content||n})}))}doSend(e,t,n,i,o,s){let r=new zl(e,t,n,i,o);ql.i.fire(Pl.MESSAGE_SENDING,e);let a=new Yc({name:pc.publishIM,params:r,unique:!0,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:t=>{e.status=Za.FAIL,ql.i.fire(Pl.MESSAGE_SEND_FAILED,e),fc.onFailed(s,{code:t.resultCode,content:t.content})},success:t=>{if(e.status=Za.SUCCESS,e.timestamp=t.content.timestamp,e.messageId=JSON.stringify(t.content.id),e.scene()===Ya.CS){let n=e;n.customerId()!==Kc.Socket.user().id&&(n.sessionId=t.content.sessionId)}e.clearUseLessAttribute(),ql.i.fire(Pl.MESSAGE_SEND_SUCCESS,e),fc.onSuccess(s,e)}});Kc.Socket.e(a)}validate(e){let t=e.message;if(!(t instanceof Bl))throw new Error("it is invalid message");if(t.status!==Za.NEW)throw new Error("Please create a new message, a message can only be sent once")}}class $l{insert(e,t){let n=this.binarySearch(e,t);if(n>=0)e.splice(n,1,t);else{let i=-n-1;e.splice(i,0,t)}}binarySearch(e,t){let n=0,i=e.length-1;for(;n<=i;){let o=i+n>>1,s=this.compare(t,e[o]);if(s>0)n=o+1;else{if(!(s<0))return o;i=o-1}}return-n-1}}class Vl{constructor(e){this.messages=new Array,this.allLoaded=!1,this.target=e}all(){return this.messages}sliceOverLengthMessages(){this.messages.length>Vl.CACHE_MAX_LENGTH&&(this.messages=this.messages.slice(-Vl.CACHE_MAX_LENGTH),!0===this.allLoaded&&(this.allLoaded=!1))}getMaxMessage(){return this.messages[this.messages.length-1]}loadLocalMessages(e,t){let n=[],i=this.messages.length;if(t){if(i>0){let o=this.messages[0].timestamp,s=this.messages[i-1].timestamp;if(t>=o&&t<=s)for(let r=i-1;r>=0;r--){let i=this.messages[r];if(i.timestamp0&&n.timestamp===e.lastTimestamp)&&(t.forEach((e=>{Vl.sortedInserter.insert(this.messages,e)})),t.lengthe===t.timestamp))}findMessagesByTimes(e){let t=[];return e.forEach((e=>{let n=this.findMessageByTime(e);nc.isDef(n)&&t.push(n)})),t}existsMessage(e){return this.findMessageIndexById(e)>-1}findMessageIndexById(e){return this.messages.findIndex((t=>e===t.messageId))}deleteMessage(e){let t=this.findMessageIndexById(e);t>=0&&this.messages.splice(t,1)}recallMessage(e){return e.times.map((e=>this.findMessageByTime(e))).filter((e=>nc.isDef(e))).map((t=>(t.recalled=!0,t.recaller=e.recaller,t)))}isEmpty(){return 0===this.messages.length}deleteMessages(e){e.forEach((e=>{this.deleteMessage(e.messageId)}))}saveMessage(e){Vl.sortedInserter.insert(this.messages,e),this.deleteGroupConversationMessage(),this.sliceOverLengthMessages()}deleteGroupConversationMessage(){this.target.scene===Ya.GROUP&&this.messages.length>=2&&1===this.messages[0].x&&this.messages.shift()}maxSuccessMessageTime(){for(let e=this.messages.length-1;e>=0;e--)if(this.messages[e].status===Za.SUCCESS)return this.messages[e].timestamp;return 0}minTime(){return this.isEmpty()?0:this.messages[0].timestamp}correctPosition(e){this.deleteMessage(e.messageId),this.saveMessage(e)}}Vl.CACHE_MAX_LENGTH=200,Vl.sortedInserter=new class extends $l{compare(e,t){let n=e.timestamp-t.timestamp;return n>0?1:0===n?0:-1}};class Kl{constructor(e,t,n){this.scene=e,this.id=t,nc.isDef(n)&&(this.teamId=n)}toString(){return Ya.PRIVATE===this.scene||Ya.GROUP===this.scene?this.scene+"#"+this.id:this.scene+"#"+this.id+"#"+this.teamId}customerId(){if(Ya.CS===this.scene)return this.id===this.teamId?Kc.Socket.user().id:this.id}static byScene(e,t,n){return new Kl(e,t,n)}static byIMMessage(e){let t,n,i=e.scene();if(i===Ya.PRIVATE){let t=e.senderId,i=e.targetId();n=Kc.Socket.user().id===t?i:t}else if(i===Ya.GROUP)n=e.targetId();else{if(i!==Ya.CS)throw{code:400,content:`scene ${i} not exists`};n=e.targetId(),t=e.teamId}return new Kl(i,n,t)}static byMessageReadRemoteEvent(e){let t,n=e.scene,i=e.targetId,o=e.markerId,s=e.teamId;return n===Ya.PRIVATE?t=Kc.Socket.user().id===o?i:o:n===Ya.GROUP?t=i:n===Ya.CS&&(t=i===s?o===Kc.Socket.user().id?s:o:o===Kc.Socket.user().id?i:s),new Kl(n,t,s)}static byIMMessageDeletedEvent(e){let t=e.scene,n=e.deleterId;if(t===Ya.PRIVATE){let i=Kc.Socket.user().id===n?e.targetId:n;return new Kl(t,i)}if(t===Ya.GROUP)return new Kl(t,e.targetId)}static byConversationDTO(e){let t=e.lastMessage;return this.byIMMessage(t)}static byConversationId(e,t){let n;if(e===Ya.PRIVATE){let e=t.split(":",2);n=e[0]===Kc.Socket.user().id?e[1]:e[0]}else n=t;return new Kl(e,n)}}class Wl{constructor(e){this.times=new Array;let t=e[0],n=Kl.byIMMessage(t);this.scene=n.scene,this.targetId=n.id,e.forEach((e=>{e.status===Za.SUCCESS&&this.times.push(e.timestamp)})),this.times.sort(((e,t)=>e{let i=new Yc({name:pc.IM_DELETE_MESSAGE,params:t,permission:Jc.WRITE,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,success:t=>{200===t.code?e(t):n(t)},fail:e=>{n(e)}});Kc.Socket.e(i)}))}static validate(e){let t=e.messages;for(let n=0;n{let n=new Yc({name:pc.IM_HISTORY_CHANGE,params:s,permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{t(e)},success:t=>{let n=t.content;e(n)}});Kc.Socket.e(n)}))}loadServerMessages(e,t){return new Promise(((n,i)=>{let o=new Yc({name:pc.IM_HISTORY,params:t,permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{i(e)},success:t=>{let i=t.content;i.messages=this.convertServerMessages(e,i.messages),n(i)}});Kc.Socket.e(o)}))}convertServerMessages(e,t){let n=[],i=e.scene,o=e.id;return t.forEach((t=>{if(t.t=i,Ya.PRIVATE===i)t.r=t.s===Kc.Socket.user().id?o:Kc.Socket.user().id;else if(Ya.GROUP===i)t.r=o;else if(Ya.CS===i){let n=e.customerId(),i=e.teamId;n===Kc.Socket.user().id?t.r=i:t.r=n}let s=this.builder.build(t);n.push(s)})),n}updateServerOffsets(e,t){return mc(this,void 0,void 0,(function*(){let n=new Ql(t.id,t.scene,e,t.teamId);return new Promise(((e,t)=>{let i=new Yc({name:pc.IM_MARK_AS_READ,params:n,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:t=>{e(t)},fail:e=>{t(e)}});Kc.Socket.e(i)}))}))}}nu.instance=new nu;class iu{constructor(){this.offsetMap=new Map,this.markingTime=0,this.userId=Kc.Socket.user().id}updateOffset(e,t){let n=this.offsetMap.get(e);return nc.isDef(n)?t>n&&(this.offsetMap.set(e,t),!0):(this.offsetMap.set(e,t),!0)}updateUserOffsets(e){e.forEach((e=>{let t=e.userId,n=e.offset;this.updateOffset(t,n)}))}updateMyOffset(e){return this.updateOffset(this.userId,e)}myOffset(){return this.getOffset(this.userId)}getOffset(e){return this.offsetMap.get(e)||0}}class ou{constructor(e,t,n,i,o){this.id=e,this.scene=t,this.lastTimestamp=n,this.limit=i,this.teamId=o}}class su{constructor(e){this.history=e}pre(){this.oldLastMessage=this.history.getMaxMessage(),this.oldUnreadAmount=this.history.unreadAmount(),this.oldLastMessage&&(this.oldLastMessageRecalled=this.oldLastMessage.recalled,this.oldLastMessageRead=this.oldLastMessage.read,this.oldLastMessageStatus=this.oldLastMessage.status)}post(){let e,t,n,i=this.history.unreadAmount(),o=this.history.getMaxMessage();o&&(n=o.status,e=o.read,t=o.recalled);let s=this.history.target;this.oldLastMessage!==o||this.oldLastMessageRead!==e||this.oldLastMessageRecalled!==t||this.oldLastMessageStatus!==n?o?ql.i.fire(Pl.MAX_MESSAGE_CHANGED,o):ql.i.fire(Pl.MAX_MESSAGE_DELETED,s):this.oldUnreadAmount!==i&&ql.i.fire(Pl.UNREAD_AMOUNT_CHANGED,s)}}class ru{constructor(e,t,n,i){this.scene=e,this.conversationId=t,this.recaller=n,this.times=i}}class au{static init(){this.eventCenter=new Vc}static on(e,t){this.eventCenter.on(e,t)}static fire(e,t){this.eventCenter.fire(e,t)}static off(e,t){this.eventCenter.off(e,t)}}!function(e){e.PRIVATE_MESSAGE_RECEIVED="PRIVATE_MESSAGE_RECEIVED",e.GROUP_MESSAGE_RECEIVED="GROUP_MESSAGE_RECEIVED",e.SYSTEM_MESSAGE_RECEIVED="SYSTEM_MESSAGE_RECEIVED",e.CONVERSATIONS_UPDATED="CONVERSATIONS_UPDATED",e.HISTORY_EXPIRED="HISTORY_EXPIRED",e.USER_PRESENCE="USER_PRESENCE",e.GROUP_PRESENCE="GROUP_PRESENCE",e.MESSAGE_DELETED="MESSAGE_DELETED",e.MESSAGE_READ="MESSAGE_READ",e.MESSAGE_RECALLED="MESSAGE_RECALLED",e.CS_MESSAGE_RECEIVED="CS_MESSAGE_RECEIVED",e.PENDING_CONVERSATIONS_UPDATED="PENDING_CONVERSATIONS_UPDATED"}(Dl||(Dl={}));class cu{constructor(e){this.expiredTime=0,this.remoteHistory=nu.instance,this.target=e,this.userOffsets=new iu,this.messageCache=new Vl(e)}initMaxMessageAndOffsets(e,t){this.existsMessage(e)||(this.messageCache.saveMessage(e),t.forEach((e=>{this.markLocalMessagesRead(this.messageCache.all(),e.userId,e.offset,!1)})))}existsMessage(e){return this.messageCache.existsMessage(e.messageId)}loadHistory(e,t){return mc(this,void 0,void 0,(function*(){return this.expiredTime>0&&!this.messageCache.isEmpty()&&(yield this.updateByServerChange()),nc.isUndef(t)?t=10:t>30&&(t=30),yield this.loadServerMessages(e,t)}))}loadServerMessages(e,t){return mc(this,void 0,void 0,(function*(){let n=this.messageCache.loadLocalMessages(t,e);if(!1===this.messageCache.allLoaded&&n.length!==t){let i=t-n.length,o=n[0]?n[0].timestamp:e,s=new ou(this.target.id.toString(),this.target.scene,o,i,this.target.teamId),r=yield this.remoteHistory.loadServerMessages(this.target,s),a=r.messages;n=a.concat(n),this.messageCache.cacheServerMessages(s,a),r.userOffsets.forEach((e=>{this.userOffsets.updateOffset(e.userId,e.offset)})),this.userOffsets.offsetMap.forEach(((e,t)=>{this.markLocalMessagesRead(a,t,e,!1)}))}return n}))}deleteMessages(e){return mc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>mc(this,void 0,void 0,(function*(){let t=e.messages;yield Xl.deleteServerMessages(t),this.messageCache.deleteMessages(t),fc.onSuccess(e)}))))}))}syncDeletedMessage(e,t){this.aopUnreadAmountMaxMessage((()=>{this.doSyncDeletedMessage(e,t)}))}doSyncDeletedMessage(e,t){if(e===Kc.Socket.user().id){let e=this.messageCache.findMessagesByTimes(t);this.messageCache.deleteMessages(e),e.length>0&&au.fire(Dl.MESSAGE_DELETED,e)}}recallMessages(e){return mc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>mc(this,void 0,void 0,(function*(){this.doRecall(e)}))))}))}doRecall(e){let t=this.messageCache.recallMessage(e);t.length>0&&au.fire(Dl.MESSAGE_RECALLED,t)}expire(){this.messageCache.isEmpty()||(this.expiredTime=this.messageCache.maxSuccessMessageTime())}updateByServerChange(){return mc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>mc(this,void 0,void 0,(function*(){let e=yield this.remoteHistory.sync(this.target.scene,this.target.id,this.expiredTime,this.messageCache.minTime(),this.target.teamId);e.userOffsets.forEach((e=>{this.markLocalMessagesRead(this.messageCache.all(),e.userId,e.offset,!0)}));let t=e.deletedMessageTimes;t.length>0&&this.doSyncDeletedMessage(Kc.Socket.user().id,t);let n=e.recalledMessages;n.length>0&&n.forEach((e=>{let t=new ru(this.target.scene,this.target.id,e.recaller,e.times);this.doRecall(t)})),this.expiredTime=0}))))}))}markRead(){return mc(this,void 0,void 0,(function*(){yield this.aopUnreadAmountMaxMessage((()=>mc(this,void 0,void 0,(function*(){let e=this.messageCache.maxSuccessMessageTime();e>this.userOffsets.myOffset()&&(this.userOffsets.markingTime=e,yield this.remoteHistory.updateServerOffsets(e,this.target),e===this.userOffsets.markingTime&&this.markLocalMessagesRead(this.messageCache.all(),Kc.Socket.user().id,e,!0))}))))}))}syncMarkedMessage(e){this.aopUnreadAmountMaxMessage((()=>{this.markLocalMessagesRead(this.messageCache.all(),e.markerId,e.time,!0)}))}onMessageSending(e){this.aopUnreadAmountMaxMessage((()=>{this.messageCache.saveMessage(e)}))}onMessageSendSuccess(e){this.aopUnreadAmountMaxMessage((()=>{this.messageCache.correctPosition(e),this.markLocalMessagesRead(this.messageCache.all(),Kc.Socket.user().id,e.timestamp,!0)}))}onMessageSendFailed(e){this.getMaxMessage()===e&&ql.i.fire(Pl.MAX_MESSAGE_CHANGED,e)}onMessageReceived(e){this.aopUnreadAmountMaxMessage((()=>{this.messageCache.saveMessage(e),this.markLocalMessagesRead(this.messageCache.all(),e.senderId,e.timestamp,!0)}))}aopUnreadAmountMaxMessage(e,t){return mc(this,void 0,void 0,(function*(){try{let t=new su(this);t.pre(),yield e(),t.post()}catch(n){fc.onFailed(t,n)}}))}markLocalMessagesRead(e,t,n,i){if(this.userOffsets.updateOffset(t,n),this.isOtherUserId(t)){let t=this.markMySentRead(e,n);i&&t.length>0&&au.fire(Dl.MESSAGE_READ,t)}else t===Kc.Socket.user().id&&this.markOthersSentRead(e,n)}markOthersSentRead(e,t){if(this.target.scene===Ya.PRIVATE)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.isOtherSent()&&i.timestamp<=t){if(i.read)break;i.read=!0}}}markMySentRead(e,t){let n=new Array;if(this.target.scene===Ya.PRIVATE)for(let i=e.length-1;i>=0;i--){let o=e[i];if(!o.isOtherSent()&&o.timestamp<=t&&o.status===Za.SUCCESS){if(o.read)break;o.read=!0,n.push(o)}}return n}isOtherUserId(e){if(this.target.scene===Ya.CS){let t=this.target.customerId();return Kc.Socket.user().id===t?e!==Kc.Socket.user().id:e===t}return e!==Kc.Socket.user().id}unreadAmount(e){let t=0,n=this.userOffsets.myOffset(),i=this.messageCache.all();for(const o of i)o.isOtherSent()&&!1===o.recalled&&o.timestamp>n&&(t+=1);return t}getMaxMessage(e){return this.messageCache.getMaxMessage()}maxTime(e){let t=this.getMaxMessage();return nc.isDef(t)?t.timestamp:0}}class lu{constructor(e,t){this.teamId=e,this.customerId=t}}class uu{}class pu{constructor(e,t,n){this.teamId=e,this.teamData=JSON.stringify(t),this.agentData=JSON.stringify(n)}}class du{constructor(e){this.teamId=e}}class hu{constructor(e){this.teamId=e}}var fu={exports:{}},mu=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gu=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],vu=function(e){var t=e,n=e.indexOf("["),i=e.indexOf("]");-1!=n&&-1!=i&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));for(var o=mu.exec(e||""),s={},r=14;r--;)s[gu[r]]=o[r]||"";return-1!=n&&-1!=i&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s},yu={exports:{}},bu={exports:{}},xu=1e3,Su=6e4,ku=60*Su,Cu=24*ku,wu=function(e,t){t=t||{};var n,i=typeof e;if("string"===i&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*Cu;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ku;case"minutes":case"minute":case"mins":case"min":case"m":return n*Su;case"seconds":case"second":case"secs":case"sec":case"s":return n*xu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?Eu(n=e,Cu,"day")||Eu(n,ku,"hour")||Eu(n,Su,"minute")||Eu(n,xu,"second")||n+" ms":function(e){return e>=Cu?Math.round(e/Cu)+"d":e>=ku?Math.round(e/ku)+"h":e>=Su?Math.round(e/Su)+"m":e>=xu?Math.round(e/xu)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Eu(e,t,n){if(!(e=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(n())}(yu,yu.exports);var Tu=vu,Iu=yu.exports("socket.io-client:url"),_u=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(Iu("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),Iu("parse %s",e),n=Tu(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(t&&t.port===n.port?"":":"+n.port),n},Ou={},Au={}.toString,Ru=Array.isArray||function(e){return"[object Array]"==Au.call(e)};!function(e){yu.exports("socket.io-parser");var t=yc.exports,n=Ru;function i(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=i,e.Decoder=s;var o=e.ERROR+'"encode error"';function s(){this.reconstructor=null}function r(t){return{type:e.ERROR,data:"parser error: "+t}}i.prototype.encode=function(t,n){n([function(t){var n=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var i=function(e){try{return JSON.stringify(e)}catch(t){return!1}}(t.data);if(!1===i)return o;n+=i}return n}(t)])},t(s.prototype),s.prototype.add=function(t){var i;if("string"!=typeof t)throw new Error("Unknown type: "+t);i=function(t){var i=0,o={type:Number(t.charAt(0))};if(null==e.types[o.type])return r("unknown packet type "+o.type);if(e.BINARY_EVENT===o.type||e.BINARY_ACK===o.type){for(var s="";"-"!==t.charAt(++i)&&(s+=t.charAt(i),i!=t.length););if(s!=Number(s)||"-"!==t.charAt(i))throw new Error("Illegal attachments");o.attachments=Number(s)}if("/"===t.charAt(i+1))for(o.nsp="";++i&&","!==(c=t.charAt(i))&&(o.nsp+=c,i!==t.length););else o.nsp="/";var a=t.charAt(i+1);if(""!==a&&Number(a)==a){for(o.id="";++i;){var c;if(null==(c=t.charAt(i))||Number(c)!=c){--i;break}if(o.id+=t.charAt(i),i===t.length)break}o.id=Number(o.id)}if(t.charAt(++i)){var l=function(e){try{return JSON.parse(e)}catch(t){return!1}}(t.substr(i));if(!1===l||o.type!==e.ERROR&&!n(l))return r("invalid payload");o.data=l}return o}(t),this.emit("decoded",i)},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}(Ou);var Pu={exports:{}},Mu={},Nu={},Du=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var i in e)n.call(e,i)&&t.push(i);return t},Bu=Ru,Lu=Object.prototype.toString,ju="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Lu.call(Blob),Uu="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Lu.call(File),Fu=function e(t){if(!t||"object"!=typeof t)return!1;if(Bu(t)){for(var n=0,i=t.length;n=55296&&t<=56319&&o=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function Xu(e,t){return Vu(e>>t&63|128)}function Ju(e,t){if(!(4294967168&e))return Vu(e);var n="";return 4294965248&e?4294901760&e?!(4292870144&e)&&(n=Vu(e>>18&7|240),n+=Xu(e,12),n+=Xu(e,6)):(Wu(e,t)||(e=65533),n=Vu(e>>12&15|224),n+=Xu(e,6)):n=Vu(e>>6&31|192),n+Vu(63&e|128)}function Qu(){if($u>=Hu)throw Error("Invalid byte index");var e=255&zu[$u];if($u++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function Yu(e){var t,n;if($u>Hu)throw Error("Invalid byte index");if($u==Hu)return!1;if(t=255&zu[$u],$u++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Qu())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Qu()<<6|Qu())>=2048)return Wu(n,e)?n:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Qu()<<12|Qu()<<6|Qu())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}var Zu={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,i=Ku(e),o=i.length,s=-1,r="";++s65535&&(o+=Vu((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=Vu(t);return o}(o)}},ep=void 0!==ep?ep:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,tp=function(){try{return 2===new Blob(["hi"]).size}catch(Wa){return!1}}(),np=tp&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(Wa){return!1}}(),ip=ep&&ep.prototype.append&&ep.prototype.getBlob;function op(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function sp(e,t){t=t||{};var n=new ep;return op(e).forEach((function(e){n.append(e)})),t.type?n.getBlob(t.type):n.getBlob()}function rp(e,t){return new Blob(op(e),t||{})}"undefined"!=typeof Blob&&(sp.prototype=Blob.prototype,rp.prototype=Blob.prototype);var ap=tp?np?Blob:rp:ip?sp:void 0;!function(e){var t=Du,n=Fu,i=Gu,o=Zu;e.protocol=3;var s=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},r=t(s),a={type:"error",data:"parser error"},c=ap;e.encodePacket=function(e,t,n,i){"function"==typeof t&&(i=t,t=!1),"function"==typeof n&&(i=n,n=null),void 0===e.data||e.data.buffer||e.data;var r=s[e.type];return void 0!==e.data&&(r+=n?o.encode(String(e.data),{strict:!1}):String(e.data)),i(""+r)},e.decodePacket=function(e,t,n){if(void 0===e)return a;if("string"==typeof e){if(n&&!1===(e=function(e){try{e=o.decode(e,{strict:!1})}catch(t){return!1}return e}(e)))return a;var i=e.charAt(0);return Number(i)==i&&r[i]?e.length>1?{type:r[i],data:e.substring(1)}:{type:r[i]}:a}i=new Uint8Array(e)[0];var s=sliceBuffer(e,1);return c&&"blob"===t&&(s=new c([s])),{type:r[i],data:s}},e.encodePayload=function(t,o,s){"function"==typeof o&&(s=o,o=null);var r=n(t);if(!t.length)return s("0:");!function(t){for(var n=new Array(t.length),a=i(t.length,(function(e,t){return s(t.join(""))})),c=function(t,i,s){!function(t,n){e.encodePacket(t,!!r&&o,!0,(function(e){n(null,function(e){return e.length+":"+e}(e))}))}(i,(function(e,i){n[t]=i,s(e,n)}))},l=0;l0);return t}function bp(){var e=yp(+new Date);return e!==pp?(gp=0,pp=e):e+"."+yp(gp++)}for(;vp<64;vp++)mp[fp[vp]]=vp;bp.encode=yp,bp.decode=function(e){var t=0;for(vp=0;vp';i=document.createElement(e)}catch(t){(i=document.createElement("iframe")).name=n.iframeId,i.src="javascript:0"}i.id=n.iframeId,n.form.appendChild(i),n.iframe=i}this.form.action=this.uri(),c(),e=e.replace(Bp,"\\\n"),this.area.value=e.replace(Dp,"\\n");try{this.form.submit()}catch(l){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&a()}:this.iframe.onload=a};var Up,Fp,Gp=lp,qp=Nu,zp=dp,Hp=hp,$p=xp,Vp=yu.exports("engine.io-client:websocket");(void 0===Nn&&void 0===Mn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&("undefined"!=typeof WebSocket?Up=WebSocket:"undefined"!=typeof self&&(Up=self.WebSocket||self.MozWebSocket));var Kp=Up||Fp;(void 0===Nn&&void 0===Mn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&"undefined"==typeof GameGlobal||(Kp=function(e){var t=this;if(t.onopen=function(){},t.onclose=function(){},t.onmessage=function(e){},t.onerror=function(e){},"object"==typeof tt&&tt.getSystemInfo){let n=tt.connectSocket({url:e});t.send=function(e){n.send({data:e})},t.close=function(){n.close()},n.onOpen((function(){t.onopen()})),n.onError((function(e){t.onerror(e)})),n.onMessage((function(e){t.onmessage(e)})),n.onClose((function(){t.onclose()}))}else if("undefined"!=typeof my)my.connectSocket({url:e}),t.send=function(e){my.sendSocketMessage({data:e})},t.close=function(e){my.closeSocket()},my.onSocketOpen((function(e){t.onopen()})),my.onSocketError((function(e){t.onerror(e)})),my.onSocketMessage((function(e){t.onmessage(e)})),my.onSocketClose((e=>{t.onclose(e)}));else if("undefined"!=typeof swan)swan.connectSocket({url:e}),t.send=function(e){swan.sendSocketMessage({data:e})},t.close=function(e){swan.closeSocket()},swan.onSocketOpen((function(e){t.onopen()})),swan.onSocketError((function(e){t.onerror(e)})),swan.onSocketMessage((function(e){t.onmessage(e)})),swan.onSocketClose((e=>{t.onclose(e)}));else if(void 0!==Nn){var n=Nn.connectSocket({url:e,complete:()=>{}});t.send=function(e){n.send({data:e})},t.close=function(){n.close()},n.onOpen((function(e){t.onopen()})),n.onError((function(e){t.onerror(e)})),n.onMessage((function(e){t.onmessage(e)})),n.onClose((function(e){t.onclose()}))}else{var i=Mn.connectSocket({url:e});t.send=function(e){i.send({data:e})},t.close=function(e){i.close({code:1e3})},i.onOpen((function(){t.onopen()})),i.onError((function(e){t.onerror(e)})),i.onMessage((function(e){t.onmessage(e)})),i.onClose((function(e){t.onclose(e)}))}});var Wp=Xp;function Xp(e){e&&e.forceBase64&&(this.supportsBinary=!1),(void 0===Nn&&void 0===Mn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&(this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=Up&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(Kp=Fp)),Gp.call(this,e)}Hp(Xp,Gp),Xp.prototype.name="websocket",Xp.prototype.supportsBinary=!1,Xp.prototype.doOpen=function(){if(this.check()){var e,t,n=this.uri();if((void 0===Nn&&void 0===Mn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket)&&(e=this.protocols),(t=void 0===Nn&&void 0===Mn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket?{agent:this.agent,perMessageDeflate:this.perMessageDeflate}:{agent:this.agent}).pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,"object"==typeof navigator&&"ReactNative"===navigator.product&&(t={}),this.extraHeaders&&(t.headers=this.extraHeaders),this.localAddress&&(t.localAddress=this.localAddress),"undefined"!=typeof cc&&"Windows"===cc.sys.os)cc.resources.load("cacert",((e,t)=>{const i=t.nativeUrl;this.ws=new Kp(n,[],i),this.ws.binaryType="arraybuffer",this.addEventListeners()}));else{try{void 0===Nn&&void 0===Mn&&"undefined"==typeof my&&"undefined"==typeof swan||"undefined"!=typeof WebSocket?this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new Kp(n,e):new Kp(n):new Kp(n,e,t):this.ws=new Kp(n)}catch(i){return this.emit("error",i)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}}},Xp.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},Xp.prototype.write=function(e){var t=this;this.writable=!1;for(var n=e.length,i=0,o=n;i0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}cd.priorWebsocketSuccess=!1,td(cd.prototype),cd.protocol=od.protocol,cd.Socket=cd,cd.Transport=lp,cd.transports=Mu,cd.parser=Nu,cd.prototype.createTransport=function(e){nd('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=od.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new ed[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},cd.prototype.open=function(){var e;if(this.rememberUpgrade&&cd.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},cd.prototype.setTransport=function(e){nd("setting transport %s",e.name);var t=this;this.transport&&(nd("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},cd.prototype.probe=function(e){nd('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,i=this;function o(){if(i.onlyBinaryUpgrades){var o=!this.supportsBinary&&i.transport.supportsBinary;n=n||o}n||(nd('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(nd('probe transport "%s" pong',e),i.upgrading=!0,i.emit("upgrading",t),!t)return;cd.priorWebsocketSuccess="websocket"===t.name,nd('pausing current transport "%s"',i.transport.name),i.transport.pause((function(){n||"closed"!==i.readyState&&(nd("changing transport and sending upgrade packet"),u(),i.setTransport(t),t.send([{type:"upgrade"}]),i.emit("upgrade",t),t=null,i.upgrading=!1,i.flush())}))}else{nd('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,i.emit("upgradeError",s)}})))}function s(){n||(n=!0,u(),t.close(),t=null)}function r(n){var o=new Error("probe error: "+n);o.transport=t.name,s(),nd('probe transport "%s" failed because of error: %s',e,n),i.emit("upgradeError",o)}function a(){r("transport closed")}function c(){r("socket closed")}function l(e){t&&e.name!==t.name&&(nd('"%s" works - aborting "%s"',e.name,t.name),s())}function u(){t.removeListener("open",o),t.removeListener("error",r),t.removeListener("close",a),i.removeListener("close",c),i.removeListener("upgrading",l)}cd.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",r),t.once("close",a),this.once("close",c),this.once("upgrading",l),t.open()},cd.prototype.onOpen=function(){if(nd("socket open"),this.readyState="open",cd.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){nd("starting upgrade probes");for(var e=0,t=this.upgrades.length;e0&&e.jitter<=1?e.jitter:0,this.attempts=0}md.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},md.prototype.reset=function(){this.attempts=0},md.prototype.setMin=function(e){this.ms=e},md.prototype.setMax=function(e){this.max=e},md.prototype.setJitter=function(e){this.jitter=e};class gd{static init(e,t,n){this.host=e,(void 0!==t&&!1===t||!0===n)&&(this.https=!1)}static isMP(){return[ic.MP_WX,ic.MP_ALI,ic.MP_BYTE,ic.MP_WGAME,ic.MP_BAIDU].includes(oc.currentPlatform())}static uri(){let e="http";return this.https&&(e+="s"),e+"://"+this.index()+this.host}static index(){return 0==this.i?this.i=Math.floor(Math.random()*this.max)+1:this.i=this.i%this.max+1,this.i}}gd.i=0,gd.max=5,gd.https=!0;var vd=vc(Object.freeze({__proto__:null,URIResolver:gd})),yd=vc(hc),bd=Pu.exports,xd=ld.exports,Sd=yc.exports,kd=Ou,Cd=pd,wd=hd,Ed=(yu.exports("socket.io-client:manager"),Zp),Td=fd;const{URIResolver:Id}=vd;var _d=yd.runStatus,Od=Object.prototype.hasOwnProperty,Ad=Rd;function Rd(e,t){if(!(this instanceof Rd))return new Rd(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new Td({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||kd;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}Rd.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)Od.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},Rd.prototype.updateSocketIds=function(){for(var e in this.nsps)Od.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},Rd.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},Sd(Rd.prototype),Rd.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},Rd.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},Rd.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},Rd.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},Rd.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},Rd.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},Rd.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},Rd.prototype.open=Rd.prototype.connect=function(e,t){if(this.readyState,~this.readyState.indexOf("open"))return this;this.uri,this.engine=bd(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=Cd(n,"open",(function(){i.onopen(),e&&e()})),s=Cd(n,"error",(async function(t){if(i.uri=Id.uri(),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()}));if(!1!==this._timeout){var r=this._timeout,a=setTimeout((function(){o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",r)}),r);this.subs.push({destroy:function(){clearTimeout(a)}})}return this.subs.push(o),this.subs.push(s),this},Rd.prototype.onopen=function(){this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(Cd(e,"data",wd(this,"ondata"))),this.subs.push(Cd(e,"ping",wd(this,"onping"))),this.subs.push(Cd(e,"pong",wd(this,"onpong"))),this.subs.push(Cd(e,"error",wd(this,"onerror"))),this.subs.push(Cd(e,"close",wd(this,"onclose"))),this.subs.push(Cd(this.decoder,"decoded",wd(this,"ondecoded")))},Rd.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},Rd.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},Rd.prototype.ondata=function(e){this.decoder.add(e)},Rd.prototype.ondecoded=function(e){this.emit("packet",e)},Rd.prototype.onerror=function(e){this.emitAll("error",e)},Rd.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new xd(this,e,t),this.nsps[e]=n;var i=this;n.on("connecting",o),n.on("connect",(function(){n.id=i.generateId(e)})),this.autoConnect&&o()}function o(){~Ed(i.connecting,n)||i.connecting.push(n)}return n},Rd.prototype.destroy=function(e){var t=Ed(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},Rd.prototype.packet=function(e){var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var i=0;i0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},Rd.prototype.cleanup=function(){for(var e=this.subs.length,t=0;t=this._reconnectionAttempts)this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();this.reconnecting=!0;var n=setTimeout((function(){if(_d.isBackend())return e.reconnecting=!1,e.reconnect(),void e.emitAll("reconnect_error","Uniapp running backend, skipped reconnect...");e.skipReconnect||(e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):e.onreconnect()})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},Rd.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)},function(e,t){var n=_u,i=Ou,o=Ad;yu.exports("socket.io-client"),e.exports=t=r;var s=t.managers={};function r(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r=n(e),a=r.source,c=r.id,l=r.path,u=s[c]&&l in s[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||u?i=o(a,t):(s[c]||(s[c]=o(a,t)),i=s[c]),r.query&&!t.query&&(t.query=r.query),i.socket(r.path,t)}t.protocol=i.protocol,t.connect=r,t.Manager=Ad,t.Socket=ld.exports}(fu,fu.exports);const Pd=fu.exports;class Md{constructor(){this.io=Pd,this.status=Ka.DISCONNECTED,this.permissions=[Jc.NONE],this.connectedObservers=[],this.disconnectedObservers=[]}connect(){this.status=Ka.CONNECTING}socketio(){return this.io}on(e,t){this.io.on(e,t)}disconnect(){this.io.disconnect()}getStatus(){return this.status}addConnectedObserver(e){nc.isFunction(e)&&this.connectedObservers.push(e)}addDisconnectedObserver(e){nc.isFunction(e)&&this.disconnectedObservers.push(e)}notify(e,t){for(let n=0;n{this.status=Ka.CONNECTED,this.notify(this.connectedObservers)})),this.io.on("reconnecting",(e=>{this.status=Ka.CONNECTING,this.notify(this.reconnectingObservers,e)})),this.io.on("disconnect",(()=>{this.status=Ka.DISCONNECTED,this.notify(this.disconnectedObservers)})),this.io.on("connect_error",(function(e){}))}addReconnectingObserver(e){this.reconnectingObservers.push(e)}}class Dd{static get(e){const t=encodeURIComponent(e)+"=",n=document.cookie.split("; ");for(const i of n)if(i.startsWith(t))return decodeURIComponent(i.substring(t.length));return null}static set(e,t,n,i,o="/",s=!1){let r=encodeURIComponent(e)+"="+encodeURIComponent(t);n instanceof Date&&(r+="; expires="+n.toGMTString()),o&&(r+="; path="+o),i&&(r+="; domain="+i),s&&(r+="; secure"),document.cookie=r}static remove(e,t,n="/",i=!1){Dd.set(e,"",new Date(0),t,n,i)}}class Bd{asyncGet(e){let t=this.get(e);return Promise.resolve(t)}asyncPut(e,t){return this.put(e,t),Promise.resolve()}get(e){let t=this.doGet(e);return t=JSON.parse(t),t}put(e,t){this.doPut(e,JSON.stringify(t))}}class Ld extends Bd{constructor(){super(),this.domain=null,this.domain="undefined"!=typeof location&&/^(?:[A-za-z0-9-]+\.)+[A-za-z]{2,4}(?:[\/\?#][\/=\?%\-&~`@[\]\':+!\.#\w]*)?$/.test(location.host)?location.host.split(".").slice(-2).join("."):null}doGet(e){return Dd.get(e)||null}doPut(e,t){const n=new Date(2030,12,31,0,0,0,0),i=this.domain;Dd.set(e,t,n,i)}remove(e){const t=this.domain;Dd.remove(e,t)}support(){return"undefined"!=typeof navigator&&!0===navigator.cookieEnabled}}class jd extends Bd{doGet(e){return localStorage.getItem(e)||null}doPut(e,t){localStorage.setItem(e,t)}remove(e){localStorage.removeItem(e)}support(){return!("undefined"!=typeof GameGlobal||"undefined"==typeof localStorage||!localStorage.setItem)}}class Ud extends Bd{doGet(e){return Nn.getStorageSync(e)||null}doPut(e,t){Nn.setStorageSync(e,t)}remove(e){Nn.removeStorageSync(e)}support(){return!("object"!=typeof Nn||!Nn.getStorageSync)}}class Fd extends Bd{doGet(e){return cc.sys.localStorage.getItem(e)||null}doPut(e,t){cc.sys.localStorage.setItem(e,t)}remove(e){cc.sys.localStorage.removeItem(e)}support(){return"undefined"!=typeof cc&&void 0!==cc.sys.localStorage}}class Gd extends Bd{doGet(e){return Mn.getStorageSync(e)||null}doPut(e,t){Mn.setStorageSync(e,t)}remove(e){Mn.removeStorageSync(e)}support(){return!("object"!=typeof Mn||!Mn.getStorageSync||"undefined"!=typeof tt)}}class qd extends Bd{asyncGet(e){return mc(this,void 0,void 0,(function*(){const t=yield Ja.asyncStorage.getItem(e);return JSON.parse(t)}))}asyncPut(e,t){return Ja.asyncStorage.setItem(e,JSON.stringify(t))}doPut(e,t){throw new Error("Method not implemented.")}remove(e){Ja.asyncStorage.removeItem(e)}support(){return Xa.currentFramework()===Va.REACT_NATIVE}doGet(e){throw new Error("Method not implemented.")}}class zd extends Bd{doGet(e){const t=my.getStorageSync({key:e}).data||null;return"string"==typeof JSON.parse(t)?JSON.parse(t):t}doPut(e,t){my.setStorageSync({key:e,data:JSON.stringify(t)})}remove(e){my.removeStorageSync({key:e})}support(){return!("undefined"==typeof my||!my.getStorageSync)}}class Hd extends Bd{doGet(e){return tt.getStorageSync(e)||null}doPut(e,t){tt.setStorageSync(e,t)}remove(e){tt.removeStorageSync(e)}support(){return!("object"!=typeof tt||!tt.getStorageSync)}}class $d extends Bd{doGet(e){return swan.getStorageSync(e)||null}doPut(e,t){swan.setStorageSync(e,t)}remove(e){swan.removeStorageSync(e)}support(){return!("undefined"==typeof swan||!swan.getStorageSync)}}class Vd{constructor(){this.supportedStorage=null;const e=Vd.storages;e.push(new Ud),e.push(new Fd),e.push(new jd),e.push(new Gd),e.push(new qd),e.push(new zd),e.push(new $d),e.push(new Hd),e.push(new Ld),this.dispatch(),this.supportedStorage}static localStorage(){return this.instance.supportedStorage}dispatch(){for(let e of Vd.storages)if(e.support()){this.supportedStorage=e;break}}}Vd.storages=new Array,Vd.instance=new Vd;class Kd{static get(){return mc(this,void 0,void 0,(function*(){let e,t=Vd.localStorage();return null!==t&&(e=yield t.asyncGet(Kd.SM_KEY)),e}))}static put(e){return mc(this,void 0,void 0,(function*(){var t=Vd.localStorage();let n=e.sm;null!==t&&n&&t.asyncPut(Kd.SM_KEY,n)}))}}Kd.SM_KEY="GE-SM";class Wd{static e(e,t){let n="";for(let s=0;s=32&&o<=126?String.fromCharCode(function(e){let n=e+t;return n>126?n-126+32:n}(i)):String.fromCharCode(i));var i,o;return n}}class Xd{static initRNUniqueId(){if(Xa.currentFramework()===Va.REACT_NATIVE){let e=Ja.platform,t=e.constants,n={os:e.OS};return"android"===n.os?n.f=t.Fingerprint:n.v=e.Version,JSON.stringify(n)}return null}static initPlusDeviceId(){return new Promise(((e,t)=>{"undefined"!=typeof plus?plus.device.getInfo({success:t=>{e(t.uuid)},fail:e=>{t(e)}}):e(null)}))}static getVideoCard(){var e;if(oc.currentPlatform()===ic.BROWSER&&"undefined"!=typeof document){const t=document.createElement("canvas"),n=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(n&&"getExtension"in n){let e=0,t=0;if(navigator.userAgent.indexOf("Firefox")>-1)t=n.VENDOR,e=n.RENDERER;else{let i=n.getExtension("WEBGL_debug_renderer_info");if(!i)return null;t=i.UNMASKED_VENDOR_WEBGL,e=i.UNMASKED_RENDERER_WEBGL}const i={vendor:(n.getParameter(t)||"").toString(),renderer:(n.getParameter(e)||"").toString()};return JSON.stringify(i)}}return null}static z(){return mc(this,void 0,void 0,(function*(){const e={p:oc.currentPlatform(),f:Xa.currentFramework(),vc:this.getVideoCard(),rfp:this.initRNUniqueId()};return Wd.e(JSON.stringify(e),5)}))}}class Jd{constructor(e){this.rocketsBuffer=new Set,this.socket=e,this.socket.addConnectedObserver(this.onSocketConnected.bind(this))}emit(e){this.socket.status!==Ka.DISCONNECTED?(e.start(),this.doEmit(e)):e.fail({resultCode:"409",content:"Please connect first"})}doEmit(e){if(!e.complete)if(this.socket.status!==Ka.CONNECT_FAILED)if(this.isConnected())if(this.hasPermission(e)){let t=setTimeout((()=>{this.doEmit(e)}),e.singleTimeout);e.unique&&(e.params.retried=e.retried),this.socket.socketio().emit(e.name,e.params,(n=>{clearTimeout(t),200===n.resultCode||200==n.code?e.success(n):e.fail(n)})),e.retried++}else e.fail({resultCode:401,content:"No permission"});else this.isConnecting()&&this.rocketsBuffer.add(e);else e.fail({resultCode:408,content:"Failed to connect GoEasy."})}hasPermission(e){return!!this.socket.permissions.find((t=>t===e.permission))}isConnected(){return[Ka.CONNECTED,Ka.RECONNECTED,Ka.EXPIRED_RECONNECTED,Ka.DISCONNECTING].includes(this.socket.status)}isConnecting(){return[Ka.CONNECTING,Ka.RECONNECTING].includes(this.socket.status)}onSocketConnected(){this.emitBuffer()}emitBuffer(){Array.from(this.rocketsBuffer).forEach((e=>{this.rocketsBuffer.delete(e),this.doEmit(e)}))}}class Qd extends zc{static init(){Qd.i=new Qd}static fire(e,t){this.i.fire(e,t)}static on(e,t){this.i.on(e,t)}static off(e,t){this.i.off(e,t)}}class Yd extends Md{constructor(e,t){super(),this.ioSocket=null,this.sid=null,this.anonymous=!1,this.userId=null,this.artifactVersion=Qa,this.vname=null,this.uri=null,this.ioOpts=null,this.reconnectingTimes=0,this.messageObservers=new Map,this.connectFailedObservers=[],this.connectingObservers=[],this.expiredReconnectedObservers=[],this.options=e,this.ioSocket=new Nd({onDisconnected:this.onIoDisconnected.bind(this),onReconnecting:this.onIoReconnecting.bind(this)}),this.ioSocketEmitter=new Jd(this.ioSocket),this.ioSocket.addConnectedObserver(this.onIoReconnected.bind(this)),this.initOptions(t),this.connect()}initUserId(){let e=this.connectOptions.id;nc.isEmpty(e)?this.anonymous=!0:this.userId=e.toString()}socketio(){return this.ioSocket.socketio()}extendOptions(){let e=this.connectOptions;if(nc.isNull(e.data)||nc.isDef(e.data)&&!nc.isObject(e.data))throw{code:400,content:"TypeError: data requires an object."};if((nc.isDef(e.data)?String(e.data).length:0)>300&&nc.isObject(e)&&nc.isFunction(e.onFailed))throw{code:400,content:"user.data-length limit 300 byte."};if(nc.isObject(e.wxmpId)){if(nc.isEmpty(e.wxmpId.appid))throw{code:400,content:"wxmpId.appid is required."};if(nc.isEmpty(e.wxmpId.openid))throw{code:400,content:"wxmpId.openid is required. requires string."}}else if(nc.isPrimitive(e.wxmpId))throw{code:400,content:"TypeError: wxmpId requires an object."}}initUriAndOpts(){let e=this.options;gd.init(e.host,e.forceTLS,e.supportOldBrowser),this.uri=gd.uri();let t=["websocket"];!0===e.supportOldBrowser&&t.push("polling"),this.ioOpts={transports:t,timeout:dc.connect,reconnectionDelayMax:dc.reconnectionDelayMax}}onIoReconnected(){this.status===Ka.RECONNECTING&&this.authorize()}sendAck(e,t){this.ioSocket.io.emit(e,t)}initOptions(e){this.connectOptions=e,this.addConnectedObserver(e.onSuccess),this.addConnectFailedObserver(e.onFailed),this.addConnectingObserver(e.onProgress),this.initUserId()}connect(){this.initUriAndOpts(),this.extendOptions(),super.connect(),this.onConnecting(),this.ioSocket.connect({uri:this.uri,opts:this.ioOpts}),this.authorize()}disconnect(){return new Promise(((e,t)=>{this.status=Ka.DISCONNECTING;let n=()=>{this.ioSocket.disconnect(),this.status=Ka.DISCONNECTED,Qd.fire(al.DISCONNECTED),e()};const i=Fc.modules.get("GN");if(i&&(i.params.regId||this.connectOptions.wxmpId)){let e=e=>{t(e)},i=new Yc({name:pc.manualDisconnect,params:{},permission:Jc.READ,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e,success:n});Kc.Socket.e(i)}else n()}))}authorize(){return mc(this,void 0,void 0,(function*(){let e=this.connectOptions,t={appkey:this.options.appkey,userId:this.userId,userData:JSON.stringify(e.data),otp:e.otp,artifactVersion:this.artifactVersion,sid:this.sid,mP:yield Fc.getParams(),a:this.anonymous,z:yield Xd.z(),sm:yield Kd.get(),c:{n:this.vname,v:this.artifactVersion}};JSON.stringify(t);let n=new Yc({name:pc.authorize,params:t,permission:Jc.NONE,singleTimeout:dc.commonInfiniteSingle,totalTimeout:dc.commonInfiniteTotal,success:e=>{this.onAuthorizeSuccess(e)},fail:e=>{this.onAuthorizeFailed(e)}});this.ioSocketEmitter.emit(n)}))}onConnecting(){Qd.fire(al.CONNECTING,this.reconnectingTimes),this.notify(this.connectingObservers,this.reconnectingTimes)}onIoReconnecting(){this.reconnectingTimes++,this.status==Ka.CONNECTED||this.status==Ka.EXPIRED_RECONNECTED||this.status==Ka.RECONNECTING?this.status=Ka.RECONNECTING:this.status=Ka.CONNECTING,this.onConnecting()}onIoDisconnected(){this.status!==Ka.DISCONNECTING&&(this.status=Ka.RECONNECTING,Qd.fire(al.LOST),this.notify(this.disconnectedObservers))}onAuthorizeSuccess(e){Kd.put(e),Fc.setDatas(e.mD),this.status===Ka.RECONNECTING?this.sid!==e.sid?(this.status=Ka.EXPIRED_RECONNECTED,this.sid=e.sid,Qd.fire(al.EXPIRED_RECONNECTED),this.notify(this.expiredReconnectedObservers)):(this.status=Ka.RECONNECTED,Qd.fire(al.RECONNECTED)):(this.status=Ka.CONNECTED,this.sid=e.sid),e.enablePublish&&(this.permissions.find((e=>e==Jc.WRITE))||this.permissions.push(Jc.WRITE)),e.enableSubscribe&&(this.permissions.find((e=>e==Jc.READ))||this.permissions.push(Jc.READ)),this.reconnectingTimes=0,Qd.fire(al.CONNECTED),this.notify(this.connectedObservers)}onAuthorizeFailed(e){this.ioSocket.disconnect(),this.status=Ka.CONNECT_FAILED;let t={code:e.resultCode||408,content:e.content||"Host unreachable or timeout"};this.notify(this.connectFailedObservers,t)}addConnectingObserver(e){nc.isFunction(e)&&this.connectingObservers.push(e)}addConnectFailedObserver(e){nc.isFunction(e)&&this.connectFailedObservers.push(e)}addExpiredReconnectedObserver(e){nc.isFunction(e)&&this.expiredReconnectedObservers.push(e)}onMessage(e,t){this.ioSocket.io._callbacks.hasOwnProperty("$"+e)||this.ioSocket.io.on(e,t)}user(){let e=this.connectOptions;return e?{id:e.id,data:e.data}:null}}class Zd{constructor(e){this.guidList=[],this.socket=e}offMessage(e,t){Qd.off(al.NEW_MESSAGE+"_"+e,t)}onMessage(e,t){Qd.on(al.NEW_MESSAGE+"_"+e,t),this.socket.onMessage(e,(t=>{this.fire(e,t)}))}fire(e,t){let n=this.filter(t);n&&Qd.fire(al.NEW_MESSAGE+"_"+e,n)}filter(e){if("string"==typeof e&&(e=JSON.parse(e)),e.i){if(this.guidList.findIndex((t=>t===e.i))>-1)return;this.guidList.unshift(e.i),this.guidList.length>300&&this.guidList.pop()}return e}}class eh{static init(e){this.i=new eh(e)}constructor(e){this.goeasyOptions=e}static connect(e,t){if(this.status()!==Ka.DISCONNECTED&&nc.isObject(e)&&nc.isFunction(e.onFailed))return void e.onFailed({code:408,content:"It is already connected, don't try again until disconnect() is called. "});this.confirmUserIdAndData(e),Qd.init();let n=this.i;Fc.preConnect(e),n.socket=new Yd(n.goeasyOptions,e),n.socket.vname=t,n.emitter=new Jd(n.socket),n.messageListener=new Zd(n.socket),Fc.postConnect()}static confirmUserIdAndData(e){if(Fc.modules.get("GIM"))nl.validateId(e.id,"id"),nl.validateObject(e.data,"data");else if("string"==typeof e.id&&e.id.length>60)throw{code:400,content:"id over max length 60"}}static e(e){this.i.emitter.emit(e)}static sendAck(e,t){this.i.socket.sendAck(e,t)}static status(){return this.i&&this.i.socket?this.i.socket.getStatus():Ka.DISCONNECTED}static on(e,t){Qd.on(e,t)}static off(e,t){Qd.off(e,t)}static offMessage(e,t){this.i.messageListener.offMessage(e,t)}static onMessage(e,t){this.i.messageListener.onMessage(e,t)}static disconnect(e){this.status()===Ka.CONNECTED||this.status()===Ka.RECONNECTED?this.i.socket.disconnect().then((()=>{fc.onSuccess(e)})).catch((t=>{fc.onFailed(e,t)})):fc.onFailed(e,{code:408,content:"Host unreachable or timeout"})}static user(){return this.i.socket.user()}}eh.EVENT=al;class th{static getInstance(){return th.instance||(th.instance=new th),th.instance}constructor(){this.synchronized=!0,this.onlineChanged=e=>{e.online?this.teamIds.add(e.teamId):this.teamIds.delete(e.teamId)},this.onDisconnected=()=>{this.queryMyTeamPromise=null,this.teamIds=null},this.onConnected=()=>{this.synchronized&&(this.queryMyTeamPromise=this.queryTeams())},eh.on(eh.EVENT.LOST,this.onDisconnected),eh.on(eh.EVENT.RECONNECTED,this.onConnected),eh.onMessage(rl.CS_ONLINE_CHANGED,this.onlineChanged)}queryTeams(){return this.queryMyTeamPromise||(this.queryMyTeamPromise=new Promise(((e,t)=>{let n=new Yc({name:pc.CS_MY_TEAMS,params:{},permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{t(e)},success:t=>{this.teamIds=new Set(t.content),this.synchronized=!0,e(this.teamIds)}});Kc.Socket.e(n)}))),this.queryMyTeamPromise}myTeams(){if(this.synchronized&&this.queryMyTeamPromise)return this.teamIds;throw"please query team first."}isOnline(e,t){return mc(this,void 0,void 0,(function*(){yield this.queryTeams(),fc.onSuccess(t,this.teamIds.has(e))}))}online(e,t){if(!nc.isObject(t.agentData)||!nc.isObject(t.teamData))throw{code:400,content:"agentData and teamData require an object"};let n=new pu(e,t.teamData,t.agentData),i=new Yc({name:pc.CS_ONLINE,params:n,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{fc.onFailed(t,e)},success:n=>{this.teamIds.add(e),fc.onSuccess(t),ql.i.fire(Pl.CS_ONLINE_SUCCESS)}});Kc.Socket.e(i)}offline(e,t){let n=new du(e),i=new Yc({name:pc.CS_OFFLINE,params:n,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{fc.onFailed(t,e)},success:n=>{this.teamIds.delete(e),fc.onSuccess(t),ql.i.fire(Pl.CS_OFFLINE_SUCCESS)}});Kc.Socket.e(i)}agents(e,t){let n=new hu(e),i=new Yc({name:pc.CS_AGENTS,params:n,permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{fc.onFailed(t,e)},success:e=>{e.content.forEach((e=>{e.data=JSON.parse(e.data)})),fc.onSuccess(t,e)}});Kc.Socket.e(i)}}class nh{constructor(e){this.onMessageReceived=e=>{let t=nh.session;if(e.scene()===Ya.CS&&t.liveOptions){let n=e,i=t.liveOptions.customerId;t.teamId===n.teamId&&n.customerId()===i&&(t.tryUpdateStatus(n),t.liveOptions.onNewMessage(n))}},this.teamId=e,ql.i.on(Pl.CS_AGENT_MESSAGE_RECEIVED,this.onMessageReceived),ql.i.on(Pl.CS_ACCEPTED,this.onMessageReceived),ql.i.on(Pl.CS_ENDED,this.onMessageReceived),ql.i.on(Pl.CS_TRANSFER,this.onMessageReceived),eh.on(al.DISCONNECTED,nh.destroy)}static live(e,t){return mc(this,void 0,void 0,(function*(){let n=t.customerId;nl.validateId(n,"customerId");let i=new lu(e,n);yield th.getInstance().queryTeams();let o=new Yc({name:pc.CS_LIVE_SESSION,params:i,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{fc.onFailed(t,e)},success:n=>{nh.destroy(),this.session=new nh(e),this.session.liveOptions=t;let i=n.content.customerStatus;"ACCEPTED"===i.status&&(i.agent.data=JSON.parse(i.agent.data)),this.session.status=i,this.session.liveOptions.onStatusUpdated(this.session.status),fc.onSuccess(t)}});Kc.Socket.e(o)}))}customerId(){return this.liveOptions.customerId}static isMyCustomer(e){let t=nh.session;if(t&&t.teamId===e.teamId&&t.customerId()===e.customerId()){let n=th.getInstance().myTeams(),i=t.status.agent;return n.has(e.teamId)&&(!i||i.id===Kc.Socket.user().id)}return!0}static isMyMessage(e){let t=Kl.byIMMessage(e);return e.type===Nl.TRANSFER&&e.payload.transferTo.id===Kc.Socket.user().id||this.isMyCustomer(t)}static quit(e){let t=nh.session;if(t){let n=t.liveOptions.customerId;nl.validateId(n,"customerId");let i=new lu(t.teamId,n),o=new Yc({name:pc.CS_QUIT_LIVE,params:i,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:t=>{fc.onFailed(e,t)},success:t=>{nh.destroy(),fc.onSuccess(e)}});Kc.Socket.e(o)}}tryUpdateStatus(e){if("FREE"!==this.status.status&&this.status.sessionId>e.sessionId)return;let t;switch(e.type){case Nl.ACCEPT:t=new uu,t.status="ACCEPTED",t.start=e.payload.sessionStart,t.sessionId=e.sessionId,t.agent=new tc(e.senderId,e.senderData);break;case Nl.END:t=new uu,t.status="FREE";break;case Nl.TRANSFER:t=new uu,t.status="ACCEPTED",t.start=e.payload.sessionStart,t.sessionId=e.sessionId,t.agent=e.payload.transferTo;break;default:"FREE"===this.status.status&&(t=new uu,t.status="PENDING",t.start=e.timestamp,t.sessionId=e.sessionId)}t&&(this.status=t,this.liveOptions.onStatusUpdated(t))}}nh.destroy=()=>{let e=nh.session;e&&(ql.i.off(Pl.CS_AGENT_MESSAGE_RECEIVED,e.onMessageReceived),ql.i.off(Pl.CS_ACCEPTED,e.onMessageReceived),ql.i.off(Pl.CS_ENDED,e.onMessageReceived),ql.i.off(Pl.CS_TRANSFER,e.onMessageReceived),eh.off(al.DISCONNECTED,nh.destroy),nh.session=null)};class ih extends cu{constructor(e){super(e),this.unread=0,this.markingAmount=0}loadHistory(e,t){return mc(this,void 0,void 0,(function*(){return nc.isUndef(t)?t=10:t>30&&(t=30),yield this.loadServerMessages(e,t)}))}loadServerMessages(e,t){return mc(this,void 0,void 0,(function*(){let n=new ou(this.target.id.toString(),this.target.scene,e,t,this.target.teamId),i=yield this.remoteHistory.loadServerMessages(this.target,n);return i.userOffsets.forEach((e=>{this.userOffsets.updateOffset(e.userId,e.offset)})),i.messages}))}deleteMessages(e){return mc(this,void 0,void 0,(function*(){fc.onFailed(e,"Delete CS message is not supported yet")}))}initMaxMessageAndOffsets(e,t){t.forEach((e=>{this.userOffsets.updateOffset(e.userId,e.offset)})),(nc.isUndef(this.acceptedMaxMessage)||this.acceptedMaxMessage.timestamp{this.userOffsets.updateOffset(e.userId,e.offset)})),this.savePendingMessage(e)}savePendingMessage(e){this.pendingMaxMessage?this.pendingMaxMessage.timestampthis.userOffsets.markingTime&&e>t&&(this.userOffsets.markingTime=e,this.markingAmount=this.unread,!0)}postMark(e){e===this.userOffsets.markingTime&&(this.unread-=this.markingAmount,this.markingAmount=0,this.userOffsets.updateOffset(Kc.Socket.user().id,e),ql.i.fire(Pl.UNREAD_AMOUNT_CHANGED,this.target))}syncMarkedMessage(e){}getMaxMessage(e){return e?this.acceptedMaxMessage:this.pendingMaxMessage}unreadAmount(e){return e?this.unread:0}existsMessage(e){return this.acceptedMaxMessage&&this.acceptedMaxMessage.messageId===e.messageId||this.pendingMaxMessage&&this.pendingMaxMessage.messageId===e.messageId}maxAcceptedMessageTime(){return this.acceptedMaxMessage?this.acceptedMaxMessage.timestamp:0}maxTime(e){let t=this.getMaxMessage(e);return t?t.timestamp:0}}class oh extends cu{constructor(e){super(e)}deleteMessages(e){return mc(this,void 0,void 0,(function*(){fc.onFailed(e,"Delete CS message is not supported yet")}))}}class sh{static validateMessageArray(e){if(!nc.isArray(e)||nc.isEmpty(e))throw{code:400,content:"messages requires non empty array"};if(e.length>20)throw{code:400,content:"The maximum number of messages is 20"};let t=Kl.byIMMessage(e[0]);for(let n=0;n0){let e=Kl.byIMMessage(i);if(e.scene!==t.scene||e.id!==t.id)throw{code:400,content:"each message must be from the same friend or group"}}}}}class rh{static init(){return rh.instance=new rh,rh.instance}constructor(){this.map=new Map,this.onMessageSending=e=>{let t=Kl.byIMMessage(e);this.findOrCreateHistory(t).onMessageSending(e)},this.onMessageSendSuccess=e=>{let t=Kl.byIMMessage(e);this.findHistory(t).onMessageSendSuccess(e)},this.onMessageSendFailed=e=>{let t=Kl.byIMMessage(e);this.findHistory(t).onMessageSendFailed(e)},this.onMessageReceived=e=>{let t=Kl.byIMMessage(e),n=this.findOrCreateHistory(t);n.expiredTime>0&&(this.map.delete(t.toString()),n=this.findOrCreateHistory(t)),n.onMessageReceived(e)},this.onRemoteMarkRead=e=>{let t=Kl.byMessageReadRemoteEvent(e),n=this.findHistory(t);n&&n.syncMarkedMessage(e)},this.onRemoteMessageDeleted=e=>{let t=Kl.byIMMessageDeletedEvent(e),n=this.findHistory(t);n&&n.syncDeletedMessage(e.deleterId,e.times)},this.onMessageRecalled=e=>{let t=Kl.byConversationId(e.scene,e.conversationId),n=this.findHistory(t);n&&n.recallMessages(e)},this.onDisconnected=()=>{this.map.forEach(((e,t)=>{e.expire()}))},this.onReconnected=()=>{au.fire(Dl.HISTORY_EXPIRED)},this.destroy=()=>{},this.initialListeners()}initialListeners(){ql.i.on(Pl.MESSAGE_SENDING,this.onMessageSending),ql.i.on(Pl.MESSAGE_SEND_SUCCESS,this.onMessageSendSuccess),ql.i.on(Pl.MESSAGE_SEND_FAILED,this.onMessageSendFailed),ql.i.on(Pl.MESSAGE_RECEIVED,this.onMessageReceived),ql.i.on(Pl.CS_AGENT_MESSAGE_RECEIVED,this.onMessageReceived),ql.i.on(Pl.CS_ACCEPTED,this.onMessageReceived),ql.i.on(Pl.CS_ENDED,this.onMessageReceived),ql.i.on(Pl.CS_TRANSFER,this.onMessageReceived),ql.i.on(Pl.MESSAGE_RECALLED,this.onMessageRecalled),eh.onMessage(rl.IM_MSG_READ,this.onRemoteMarkRead),eh.onMessage(rl.IM_MSG_DELETED,this.onRemoteMessageDeleted),eh.on(eh.EVENT.LOST,this.onDisconnected),eh.on(eh.EVENT.RECONNECTED,this.onReconnected)}loadHistory(e,t){return mc(this,void 0,void 0,(function*(){let n=this.queryToTarget(e,t),i=this.findOrCreateHistory(n);i.expiredTime>0&&(this.map.delete(n.toString()),i=this.findOrCreateHistory(n));let o=yield i.loadHistory(e.lastTimestamp,e.limit);fc.onSuccess(e,{code:200,content:o})}))}queryToTarget(e,t){if(nc.isDef(e.userId))return new Kl(Ya.PRIVATE,e.userId);if(nc.isDef(e.groupId))return new Kl(Ya.GROUP,e.groupId);if(nc.isDef(e.type)){if(!Object.values(Ya).includes(e.type))throw new Error("incorrect type, must be: "+Object.values(Ya));if(nc.isUndef(e.id))throw new Error("If type is not empty, id is required.");return Ya.CS==e.type&&nc.isUndef(t)&&(t=e.id),new Kl(e.type,e.id,t)}throw new Error("incorrect query options.")}privateMarkAsRead(e){return mc(this,void 0,void 0,(function*(){if(nc.isUndef(e.userId))throw new Error("userId could not be empty.");let t=Kl.byScene(Ya.PRIVATE,e.userId);yield this.markAsRead(t,e)}))}groupMarkAsRead(e){return mc(this,void 0,void 0,(function*(){if(nc.isUndef(e.groupId))throw new Error("groupId could not be empty.");let t=Kl.byScene(Ya.GROUP,e.groupId);yield this.markAsRead(t,e)}))}markMessageAsRead(e,t){return mc(this,void 0,void 0,(function*(){if(nc.isUndef(e.id))throw new Error("id could not be empty.");if(!Object.values(Ya).includes(e.type))throw new Error("incorrect type, must be: "+Object.values(Ya));Ya.CS==e.type&&nc.isUndef(t)&&(t=e.id);let n=Kl.byScene(e.type,e.id,t);yield this.markAsRead(n,e)}))}markAsRead(e,t){return mc(this,void 0,void 0,(function*(){let n=this.findHistory(e);n&&(yield n.markRead()),fc.onSuccess(t)}))}deleteMessage(e){return mc(this,void 0,void 0,(function*(){this.validateMessageArray(e.messages),Xl.validate(e);let t=e.messages[0],n=Kl.byIMMessage(t),i=this.findHistory(n);if(!i)throw{code:400,content:"No message that could be deleted"};yield i.deleteMessages(e)}))}findOrCreateHistory(e){let t=this.findHistory(e);return t||(t=e.scene===Ya.CS?Kc.Socket.user().id===e.customerId()?new oh(e):new ih(e):new cu(e),this.map.set(e.toString(),t),t)}static get(e){return rh.instance.findOrCreateHistory(e)}findHistory(e){return this.map.get(e.toString())}validateMessageArray(e){sh.validateMessageArray(e)}}class ah{constructor(e){this.top=!1,this.data=null,this.dataLoaded=!1,this.target=e}toDto(){let e=this.target.scene,t=this.target.id,n=new ec;return e===Ya.PRIVATE?n.userId=t:e===Ya.GROUP?n.groupId=t:e===Ya.CS&&(n.id=this.target.teamId),n.type=e,n.lastMessage=this.getMaxMessage(),n.unread=this.getUnreadAmount(),n.top=this.top,n.data=this.data,n}getMaxMessage(){return rh.get(this.target).getMaxMessage()}getUnreadAmount(){return rh.get(this.target).unreadAmount()}maxMessageTime(){return rh.get(this.target).maxTime()}}class ch extends ah{constructor(e){super(e),this.accepted=!1}toDto(){let e=new ec,t=this.target.scene,n=this.target.id,i=this.target.teamId;return e.id=n,e.teamId=i,e.type=t,e.lastMessage=this.getMaxMessage(),e.unread=this.getUnreadAmount(),e.top=this.top,e.data=this.data,e.ended=this.isEnded(),e}isEnded(){let e=this.getMaxMessage(),t=e.type,n=e.payload;return t===Nl.END||t===Nl.TRANSFER&&n.transferTo.id!==Kc.Socket.user().id}getMaxMessage(){return rh.get(this.target).getMaxMessage(this.accepted)}getUnreadAmount(){return rh.get(this.target).unreadAmount(this.accepted)}maxMessageTime(){return rh.get(this.target).maxTime(this.accepted)}}class lh{constructor(e,t,n,i){this.type=e,this.top=t,this.targetId=n,this.teamId=i}}class uh{constructor(e,t,n){this.type=e,this.targetId=t,this.teamId=n}}class ph{constructor(e,t,n){this.type=e,this.targetId=t,this.teamId=n}}class dh{top(e,t){let n=new lh(e.scene,t,e.id,e.teamId);return new Promise(((e,t)=>{let i=new Yc({name:pc.topConversation,params:n,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:n=>{200===n.code?e(n):t(n)},fail:e=>{t(e)}});Kc.Socket.e(i)}))}remove(e){let t=new uh(e.scene,e.id,e.teamId);return new Promise(((e,n)=>{let i=new Yc({name:pc.removeConversation,params:t,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:t=>{200==t.code?e(t):n(t)},fail:e=>{n(e)}});Kc.Socket.e(i)}))}query(e){return new Promise(((t,n)=>{let i=new Yc({name:e,params:{},permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{n(e)},success:e=>mc(this,void 0,void 0,(function*(){t(e)}))});Kc.Socket.e(i)}))}loadData(e){let t=new ph(e.scene,e.id,e.teamId);return new Promise(((e,n)=>{let i=new Yc({name:pc.imData,params:t,permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,success:t=>{let n=JSON.parse(t.content);e(n)},fail:e=>{n(e)}});Kc.Socket.e(i)}))}}dh.instance=new dh;class hh{constructor(){this.list=new Array,this.builder=new tu,this.remoteConversations=dh.instance,this.synchronized=!1,ql.i.on(Pl.MAX_MESSAGE_CHANGED,this.onMaxMessageChanged.bind(this)),ql.i.on(Pl.UNREAD_AMOUNT_CHANGED,this.onUnreadMessageChanged.bind(this)),ql.i.on(Pl.MAX_MESSAGE_DELETED,this.onMaxMessageDeleted.bind(this))}onUnreadMessageChanged(e){this.findConversation(e)&&this.fireUpdated()}fireUpdated(){this.debounce(this.triggerUpdate.bind(this))}triggerUpdate(){let e=this.loadLocalConversations(),t=this.getUpdatedEventName();au.fire(t,{unreadTotal:e.content.unreadTotal,conversations:e.content.conversations})}getUpdatedEventName(){return Dl.CONVERSATIONS_UPDATED}latestConversations(e){return mc(this,void 0,void 0,(function*(){this.synchronized||(yield this.loadServerConversations());let t=this.loadLocalConversations();fc.onSuccess(e,t)}))}loadServerConversations(){return mc(this,void 0,void 0,(function*(){let e=this.rocketName(),t=yield this.remoteConversations.query(e);this.convertAbbrConversation(t.content),this.synchronized=!0}))}rocketName(){return pc.imLastConversations}convertAbbrConversation(e){let t=e;for(const n of t){let e=n.t,t=n.top,i=n.d?JSON.parse(n.d):{},o=n.userOffsets;n.lmsg.t=e;let s=n.lmsg,r=this.builder.build(s),a=Kl.byIMMessage(r),c=this.findConversation(a);nc.isUndef(c)?(c=this.buildByAbbr(n,r),this.insertOne(c)):(c.top=t,c.data=i),a.scene===Ya.GROUP&&(r.x=1),rh.get(a).initMaxMessageAndOffsets(r,o),this.correctPosition(c)}}onMaxMessageDeleted(e){this.removeConversation(e)}onMaxMessageChanged(e){return mc(this,void 0,void 0,(function*(){if(e.scene()===Ya.CS){let t=e;if(Kc.Socket.user().id!=t.customerId()&&(!1===t.accepted||t.type===Nl.ACCEPT&&t.senderId!=Kc.Socket.user().id))return}yield this.saveOrUpdateConversation(e)}))}saveOrUpdateConversation(e){return mc(this,void 0,void 0,(function*(){let t=e.status,n=Kl.byIMMessage(e),i=this.findConversation(n);nc.isUndef(i)&&t!==Za.FAIL&&(i=this.buildByMessage(e),this.insertOne(i),t===Za.SUCCESS&&(i.data=yield this.remoteConversations.loadData(n),i.dataLoaded=!0)),t===Za.SENDING&&(i.data=e.getToData(),i.dataLoaded=!0),i&&i.dataLoaded&&(this.correctPosition(i),this.fireUpdated())}))}debounce(e){clearTimeout(this.timer),this.timer=setTimeout((()=>{e()}),500)}loadLocalConversations(){let e=0,t=new Array;for(const n of this.list)if(n.dataLoaded&&n.getMaxMessage()){e+=n.getUnreadAmount();let i=n.toDto();t.push(i)}return{code:200,content:{unreadTotal:e,conversations:t}}}findConversationIndex(e){return this.list.findIndex((t=>e.toString()===t.target.toString()))}findConversation(e){let t=this.findConversationIndex(e);return this.list[t]}removeLocalConversation(e){let t=this.findConversationIndex(e.target);this.list.splice(t,1)}insertOne(e){hh.sortedInserter.insert(this.list,e),this.list.length>hh.CONVERSATIONS_MAX_LENGTH&&0===this.list[this.list.length-1].getUnreadAmount()&&this.list.pop()}correctPosition(e){this.removeLocalConversation(e),this.insertOne(e)}removeConversation(e){let t=this.findConversation(e);t&&(this.removeLocalConversation(t),this.fireUpdated())}top(e,t,n){return mc(this,void 0,void 0,(function*(){if(!nc.isBoolean(t))throw new Error("top must be boolean.");let i=this.findConversation(e);if(!i)throw new Error("conversation does not exist.");i.top!=t&&(yield this.remoteConversations.top(e,t),i.top=t,this.correctPosition(i)),this.fireUpdated(),fc.onSuccess(n)}))}remove(e,t){return mc(this,void 0,void 0,(function*(){let n=this.findConversation(e);if(!n)throw new Error("conversation does not exist.");if(n instanceof ch&&!n.isEnded())throw new Error("CS conversation can only be deleted after it ends");yield this.remoteConversations.remove(e),this.removeLocalConversation(n),this.fireUpdated(),fc.onSuccess(t)}))}buildByAbbr(e,t){let n,i=Kl.byIMMessage(t);if(e.t===Ya.CS){let e=t;Kc.Socket.user().id===e.customerId()?n=new ah(i):(n=new ch(i),n.accepted=e.accepted)}else n=new ah(i);return n.dataLoaded=!0,n.top=e.top,n.data=e.d?JSON.parse(e.d):{},n}buildByMessage(e){let t,n=Kl.byIMMessage(e);if(e.scene()===Ya.CS){let i=e;Kc.Socket.user().id===i.customerId()?t=new ah(n):(t=new ch(n),t.accepted=i.accepted)}else t=new ah(n);return t}}hh.CONVERSATIONS_MAX_LENGTH=200,hh.sortedInserter=new class extends $l{compare(e,t){let n;if(e.top==t.top){let i=e.maxMessageTime();n=t.maxMessageTime()-i}else n=e.top?-1:1;return 0===n?0:n>0?1:-1}};class fh extends Uc{static init(){return this.module=new fh,this.module.name=this.GIM_MODULE_NAME,this.initGN(),this.module}static initGN(){el.addAssembler(new class{assemble(e){let t={messageId:e.id,timestamp:e.tm,type:e.t,senderId:e.sid,toType:e.tt};return e.tt===Ya.GROUP&&(t.groupId=e.gid),t}support(e){return!!e.sid}})}postConnect(){yf.init()}static check(){if(!this.module)throw{code:400,content:"IM not initialized. Please include 'IM' in the 'modules' during GoEasy initialization."}}}fh.GIM_MODULE_NAME="GIM";class mh extends hh{constructor(){super(),this.expired=!1,ql.i.on(Pl.CS_ONLINE_SUCCESS,this.onCSOnlineSuccess.bind(this)),ql.i.on(Pl.CS_OFFLINE_SUCCESS,this.onCSOfflineSuccess.bind(this)),eh.on(eh.EVENT.LOST,this.onDisconnected.bind(this)),eh.on(eh.EVENT.RECONNECTED,this.onConnected.bind(this))}onMaxMessageChanged(e){return mc(this,void 0,void 0,(function*(){if(e.scene()===Ya.CS){let t=e;if(t.customerId()!=Kc.Socket.user().id&&(!1===t.accepted||t.type===Nl.ACCEPT))if(Nl.ACCEPT===e.type){let t=Kl.byIMMessage(e);this.removeConversation(t)}else yield this.saveOrUpdateConversation(e)}}))}latestConversations(e){const t=Object.create(null,{latestConversations:{get:()=>super.latestConversations}});return mc(this,void 0,void 0,(function*(){let n=this.synchronized;yield t.latestConversations.call(this,e),this.list.length>0&&!n&&this.fireUpdated()}))}onUnreadMessageChanged(e){}onCSOnlineSuccess(){return mc(this,void 0,void 0,(function*(){yield this.loadServerConversations(),this.fireUpdated()}))}onCSOfflineSuccess(){this.list=[],this.fireUpdated()}getUpdatedEventName(){return Dl.PENDING_CONVERSATIONS_UPDATED}rocketName(){return pc.CS_PENDING_CONVERSATION}convertAbbrConversation(e){return mc(this,void 0,void 0,(function*(){let t=e;for(const e of t){e.lastMessage.t=Ya.CS;let t=e.customerData,n=e.lastMessage,i=e.userOffsets,o=t?JSON.parse(t):{},s=this.builder.build(n),r=Kl.byIMMessage(s),a=this.findConversation(r);nc.isUndef(a)&&(a=new ch(r),a.accepted=s.accepted,a.dataLoaded=!0,this.insertOne(a)),a.top=!1,a.data=o,rh.get(r).initPendingMaxMessageAndOffsets(s,i),this.correctPosition(a)}}))}onDisconnected(){this.expired=!0}onConnected(){return mc(this,void 0,void 0,(function*(){this.expired&&fh.module&&fh.module.active&&(this.expired=!1,this.list=[],yield this.loadServerConversations(),this.fireUpdated())}))}}class gh{constructor(){this.conversations=new hh,this.pendingConversations=new mh}latestConversations(e){this.conversations.latestConversations(e)}latestPendingConversations(e){this.pendingConversations.latestConversations(e)}topPrivateConversation(e){let t=Kl.byScene(Ya.PRIVATE,e.userId);this.conversations.top(t,e.top,e)}topGroupConversation(e){let t=Kl.byScene(Ya.GROUP,e.groupId);this.conversations.top(t,e.top,e)}topConversation(e){let t=e.conversation;this.validateConversationDTO(t);let n=Kl.byConversationDTO(t);this.conversations.top(n,e.top,e)}removePrivateConversation(e){let t=Kl.byScene(Ya.PRIVATE,e.userId);this.conversations.remove(t,e)}removeGroupConversation(e){let t=Kl.byScene(Ya.GROUP,e.groupId);this.conversations.remove(t,e)}removeConversation(e){let t=e.conversation;this.validateConversationDTO(t);let n=Kl.byConversationDTO(t);this.conversations.remove(n,e)}validateConversationDTO(e){if(!(e instanceof ec))throw new Error("Incorrect conversation object.");{let t=e.lastMessage;if(t instanceof eu&&t.customerId()!==Kc.Socket.user().id&&!1===t.accepted)throw new Error("pending conversation cannot be topped or removed.")}}}class vh{constructor(){this.builder=new tu,Kc.Socket.onMessage(rl.imMessage,this.onMessageReceived.bind(this))}onMessageReceived(e){if(e.t!==Ya.CS){let t=this.builder.build(e);this.sendAck(t);let n=Kl.byIMMessage(t),i=n.scene;rh.get(n).existsMessage(t)||(this.createNotification(e),ql.i.fire(Pl.MESSAGE_RECEIVED,t),i===Ya.PRIVATE?au.fire(Dl.PRIVATE_MESSAGE_RECEIVED,t):i===Ya.GROUP&&au.fire(Dl.GROUP_MESSAGE_RECEIVED,t))}}sendAck(e){Kc.Socket.sendAck("imAck",{publishGuid:e.messageId})}createNotification(e){const t=Kc.N.supportAppNotification();if(!nc.isObject(e.nt)||e.s===Kc.Socket.user().id||!t)return;let n={id:e.i,tm:e.ts,t:e.mt,sid:e.s,tt:e.t};n.tt===Ya.GROUP&&(n.gid=e.r),Kc.N.createLocalNotification(e.nt.t,e.nt.c,n,e.nt.sound,e.nt.badge)}}class yh{constructor(){this.subscribedGroups=[],Kc.Socket.on(al.EXPIRED_RECONNECTED,this.expiredResubscribeGroups.bind(this))}expiredResubscribeGroups(){this.subscribedGroups.forEach((e=>mc(this,void 0,void 0,(function*(){yield this.doSubscribeGroup(e)}))))}subscribe(e){let t=e.groupIds;nl.validateIdArray(t,"groupIds");let n=new bh(t,e.accessToken);this.doSubscribeGroup(n).then((()=>{this.subscribedGroups.push(n),fc.onSuccess(e,{code:200,content:"ok"})})).catch((t=>{fc.onFailed(e,{code:t.resultCode||408,content:t.content||"Failed to subscribe group message"})}))}doSubscribeGroup(e){return new Promise(((t,n)=>{let i=e.groupIds.toString().split(","),o=new Yc({name:pc.subscribeGroups,params:{groupIds:i,at:e.accessToken},permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:()=>{t()},fail:e=>{n(e)}});Kc.Socket.e(o)}))}unsubscribe(e){nl.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t=new Yc({name:pc.unsubscribeGroup,params:{groupId:e.groupId},permission:Jc.READ,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,success:()=>{this.deleteSubscriptionByGroupId(e.groupId),fc.onSuccess(e,{code:200,content:"ok"})},fail:t=>{fc.onFailed(e,{code:t.resultCode||408,content:t.content||"Failed to unsubscribe group message"})}});Kc.Socket.e(t)}deleteSubscriptionByGroupId(e){this.subscribedGroups=this.subscribedGroups.filter((t=>{const n=t.groupIds.findIndex((t=>t==e));return n>-1&&t.groupIds.splice(n,1),t.groupIds.length>0}))}}class bh{constructor(e,t){this.groupIds=e,this.accessToken=t}}class xh{constructor(){this.newMessageReceived=e=>{let t=null;e.c&&(t=JSON.parse(e.c)),t&&t.events&&t.events.map((e=>{let n=e.userData?JSON.parse(e.userData):{},i={time:e.time,action:e.action,groupOnlineCount:t.userAmount,groupId:t.groupId,id:e.userId,data:n};au.fire(Dl.GROUP_PRESENCE,i)}))},eh.onMessage(rl.groupPresence,this.newMessageReceived)}presence(e){nl.validateIdArray(e.groupIds,"groupIds"),e.groupIds.toString().split(",");let t={groupIds:e.groupIds};this.emitRocket(pc.subscribeGroupPresence,t,(()=>{fc.onSuccess(e,{code:200,content:"ok"})}),(t=>{fc.onFailed(e,{code:t.code||408,content:t.content||"Failed to subscribe group message"})}),dc.commonRequestSingle,dc.commonRequestTotal)}unPresence(e){nl.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t={groupId:e.groupId};this.emitRocket(pc.unsubscribeGroupPresence,t,(()=>{fc.onSuccess(e,{code:200,content:"ok"})}),(t=>{fc.onFailed(e,{code:t.code||408,content:t.content||"Failed to unsubscribe presence"})}),dc.commonRequestSingle,dc.commonRequestTotal)}emitRocket(e,t,n,i,o,s){let r=new Yc({name:e,params:t,singleTimeout:o,totalTimeout:s,permission:Jc.WRITE,success:n,fail:i});Kc.Socket.e(r)}}class Sh{get(e){nl.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t=new Yc({name:pc.imGroupOnlineCount,params:{groupId:e.groupId},permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:function(t){fc.onFailed(e,t||{code:408,content:"Failed to query online group users"})},success:function(t){200==t.code?fc.onSuccess(e,t):fc.onFailed(e,t)}});Kc.Socket.e(t)}}class kh{doHereNow(e,t,n){let i=new Yc({name:e,params:t,permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{fc.onFailed(n,e)},success:e=>{let t=e.content;e.content=t.map((e=>{let t=e.userData?JSON.parse(e.userData):{};return{id:e.userId,data:t}})),fc.onSuccess(n,e)}});Kc.Socket.e(i)}}class Ch extends kh{hereNow(e){nl.validateId(e.groupId,"groupId"),e.groupId=e.groupId.toString();let t={groupId:e.groupId};this.doHereNow(pc.imGroupHereNow,t,e)}}class wh{constructor(){this.newMessageReceived=e=>{let t=[];e.c&&(t=JSON.parse(e.c).events||[]),t.map((e=>{let t=e.userData?JSON.parse(e.userData):{},n={time:e.time,action:e.action,id:e.userId,data:t};au.fire(Dl.USER_PRESENCE,n)}))},eh.onMessage(rl.userPresence,this.newMessageReceived)}presence(e){nl.validateIdArray(e.userIds,"userIds"),e.userIds.toString().split(",");let t={userIds:e.userIds};this.emitRocket(pc.subscribeUserPresence,t,(()=>{fc.onSuccess(e,{code:200,content:"ok"})}),(t=>{fc.onFailed(e,{code:t.code||408,content:t.content||"Failed to subscribe group message"})}),dc.commonRequestSingle,dc.commonRequestTotal)}unPresence(e){nl.validateId(e.userId,"userId"),e.userId=e.userId.toString();let t={userId:e.userId};this.emitRocket(pc.unsubscribeUserPresence,t,(()=>{fc.onSuccess(e,{code:200,content:"ok"})}),(t=>{fc.onFailed(e,{code:t.code||408,content:t.content||"Failed to unsubscribe presence"})}),dc.commonRequestSingle,dc.commonRequestTotal)}emitRocket(e,t,n,i,o,s){let r=new Yc({name:e,params:t,singleTimeout:o,totalTimeout:s,permission:Jc.WRITE,success:n,fail:i});Kc.Socket.e(r)}}class Eh extends kh{hereNow(e){let t=e.userIds;nl.validateIdArray(t,"userIds"),t.toString().split(","),this.doHereNow(pc.imHereNow,e,e)}}const Th=new class{fileExtension(e,t){if(nc.isString(e))try{let n=e.split(t);return n[n.length-1]}catch(n){throw Error(n)}}};class Ih{}class _h extends Ih{constructor(){super(...arguments),this.contentType="",this.name="",this.size=0,this.url=""}}class Oh extends _h{constructor(){super(...arguments),this.width=0,this.height=0}}class Ah{build(e){this.validate(e.createOptions);let t=this.create();return this.setPayload(e,t),t}}class Rh extends Ah{create(){return new _h}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.name=i.name,n.size=i.size,n.contentType=i.type,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Ph extends Rh{create(){return new Oh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=n.path||n.tempFilePath,s=nc.isEmpty(n.name)||void 0===n.name?o:n.name;i.name="wx-image."+Th.fileExtension(s,"."),i.contentType="image/"+Th.fileExtension(s,"."),i.url=o,i.size=n.size,e.complete=new Promise(((e,t)=>{Mn.getImageInfo({src:i.url,success(t){i.width=t.width,i.height=t.height,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Mh extends _h{constructor(){super(...arguments),this.duration=0}}class Nh extends Rh{create(){return new Mh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=n.tempFilePath,s=nc.isEmpty(n.name)||null==n.name?o:n.name,r=n.duration,a=n.fileSize;i.url=o,i.size=a,i.duration=r/1e3,i.name="wx-audio."+Th.fileExtension(s,"."),i.contentType="audio/"+Th.fileExtension(s,"."),e.complete=Promise.resolve()}validate(e){super.validate(e)}}class Dh extends Ih{constructor(){super(...arguments),this.text=""}}class Bh extends Ah{create(){return new Dh}setPayload(e,t){let n=t,i=e.createOptions;n.text=i.text,e.complete=Promise.resolve()}validate(e){if(nc.isEmpty(e.text))throw{code:400,content:"text is empty"};if(!nc.isString(e.text))throw{code:400,content:"TypeError: text requires string."};if(""===e.text.trim())throw{code:400,content:"text is empty"};if(e.text.length>2500)throw{code:400,content:"Message text over max length 2500"}}}class Lh extends Ih{constructor(){super(...arguments),this.video=new Uh,this.thumbnail=new jh}}class jh{constructor(){this.name="",this.url="",this.width=0,this.height=0,this.contentType=""}initURL(e){oc.currentPlatform()===ic.BROWSER&&this.htmlUrl(e)}htmlUrl(e){let t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight,t.getContext("2d").drawImage(e,0,0,t.width,t.height),this.url=t.toDataURL("image/png")}}class Uh{constructor(){this.name="",this.url="",this.width=0,this.height=0,this.contentType="",this.size=0,this.duration=0}}class Fh extends Ah{create(){return new Lh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:r,height:a,size:c,tempFilePath:l,thumbTempFilePath:u,width:p,name:d=""}=n,h=nc.isEmpty(d)?l:d;o.contentType="video/"+Th.fileExtension(h,"."),o.name="wx-video."+Th.fileExtension(h,"."),o.url=l,o.width=s.width=p,o.height=s.height=a,o.size=c,o.duration=r,s.url=u,s.contentType="image/jpg",s.name="wx-thumbnail.jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Gh extends Ah{create(){return new _h}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.fullPath||i.path,n.name=i.name,n.size=i.size,n.contentType=i.type,i.type,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class qh extends Gh{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.size=i.size;let o=nc.isEmpty(i.name)||void 0===i.name?i.path:i.name;n.contentType="image/"+Th.fileExtension(o,"."),n.name="uni-image."+Th.fileExtension(o,"."),e.complete=new Promise(((e,t)=>{Nn.getImageInfo({src:i.path,success(t){n.width=t.width,n.height=t.height,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class zh extends Gh{create(){return new Mh}setPayload(e,t){let n=e.createOptions,i=t,o=n.file,s=o.tempFilePath,r=nc.isEmpty(o.name)||null==o.name?s:o.name;i.url=s,i.name="uni-audio."+Th.fileExtension(r,"."),i.contentType="audio/"+Th.fileExtension(r,"."),e.complete=new Promise(((e,t)=>{Nn.getFileInfo({filePath:s,success:o=>{let r=o.size;if(i.size=r,0===r)e();else if(nc.isDef(n.file.duration))i.duration=n.file.duration/1e3,e();else{const n=Nn.createInnerAudioContext();n.src=s,n.onCanplay((function(o){o.errCode?(n.destroy(),t(o)):(i.duration=n.duration,n.destroy(),e())})),n.onError((i=>{n.destroy(),-99===i.errCode?e():t(i)}))}},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Hh extends Ah{create(){return new Lh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:r,height:a,size:c,tempFilePath:l,width:u,name:p=""}=n,d=nc.isEmpty(p)?l:p;o.size=c,o.width=u,o.height=a,o.url=l,o.duration=r,o.contentType="video/"+Th.fileExtension(d,"."),o.name="uni-video."+Th.fileExtension(d,"."),s.url=l,s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/jpg",s.name="uni-thumbnail.jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class $h extends Ah{create(){return new _h}setPayload(e,t){let n=t,i=e.createOptions.file,o=window.URL||window.webkitURL;n.url=o.createObjectURL(i),n.name=i.name,n.size=i.size,n.contentType=i.type,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!(e.file instanceof File))throw Error("wrong file type.");if(0==e.file.size)throw Error("File size is 0.");if(e.file.size>524288e3)throw Error("message-length limit 30mib")}}class Vh extends $h{create(){return new Oh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=window.URL||window.webkitURL,s=new Image;s.src=o.createObjectURL(n),e.complete=new Promise(((e,t)=>{s.onload=function(){i.width=s.width,i.height=s.height,o.revokeObjectURL(s.src),e()},s.onerror=function(e){o.revokeObjectURL(s.src),t(e)}}))}validate(e){super.validate(e);let t=["gif","jpg","png","jpeg"];if(!t.find((t=>t===e.file.type.split("/")[1].toLowerCase())))throw Error("Only "+t.join(",")+" is supported image.")}}class Kh extends $h{create(){return new Mh}setPayload(e,t){super.setPayload(e,t);let n=e.createOptions.file,i=t,o=window.URL||window.webkitURL,s=document.createElement("audio");s.src=o.createObjectURL(n),e.complete=new Promise(((e,t)=>{s.onloadedmetadata=()=>{i.duration=s.duration,o.revokeObjectURL(s.src),e()},s.onerror=e=>{o.revokeObjectURL(s.src),t(e)}}))}validate(e){super.validate(e);let t=["mp3","ogg","wav","wma","ape","acc","mpeg"];if(!t.find((t=>t===e.file.type.split("/")[1].toLowerCase())))throw Error("Only "+t.join(",")+" is supported audio.")}}class Wh extends Ah{create(){return new Lh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,r=window.URL||window.webkitURL,a=document.createElement("video");a.src=r.createObjectURL(n),o.size=n.size,o.name=n.name,o.contentType=n.type,o.url=a.src,s.name=n.name,s.contentType="image/jpg",e.complete=new Promise(((e,t)=>{a.onloadedmetadata=()=>{o.duration=a.duration,o.width=a.videoWidth,o.height=a.videoHeight,s.width=a.videoWidth,s.height=a.videoHeight,s.url=this.getThumbnailUrl(a),r.revokeObjectURL(a.src),e()},a.onerror=function(e){r.revokeObjectURL(a.src),t(e)}}))}getThumbnailUrl(e){let t=document.createElement("canvas");return t.width=e.videoWidth,t.height=e.videoHeight,t.getContext("2d").drawImage(e,0,0,t.width,t.height),t.toDataURL("image/png")}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!(e.file instanceof File))throw Error("wrong file type.");if(0==e.file.size)throw Error("File size is 0.");if(e.file.size>31457280)throw Error("message-length limit 30mib");let t=["avi","mov","rmvb","rm","flv","mp4","3gp","quicktime"];if(!t.find((t=>t===e.file.type.split("/")[1].toLowerCase())))throw Error("Only "+t.join(",")+" is supported video.")}}class Xh extends Ah{create(){return new Lh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:r,height:a,size:c,tempFilePath:l,tempVideoThumbPath:u,width:p}=n;o.size=c,o.width=p,o.height=a,o.url=l,o.duration=r,o.contentType="video/mp4",o.name="ali-video.mp4",s.url=u,s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/jpg",s.name="ali-thumbnail.jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Jh extends Ah{create(){return new _h}setPayload(e,t){e.complete=Promise.reject("Alipay not support file message.")}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class Qh extends Jh{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.size=i.size,e.complete=new Promise(((e,t)=>{my.getImageInfo({src:i.path,success(t){n.width=t.width,n.height=t.height,n.contentType="image/"+t.type,n.name="ali-image."+t.type,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class Yh extends Jh{create(){return new Mh}setPayload(e,t){let n=t,i=e.createOptions.file,o=i.tempFilePath;n.url=o,n.name="ali-audio."+Th.fileExtension(o,"."),n.contentType="audio/"+Th.fileExtension(o,"."),n.duration=i.duration,n.size=i.fileSize,e.complete=Promise.resolve()}validate(e){super.validate(e)}}class Zh extends Ah{create(){return new Lh}setPayload(e,t){let n=e.createOptions.file,i=t,o=i.video,s=i.thumbnail,{duration:r,height:a,size:c,tempFilePath:l,thumbTempFilePath:u,width:p}=n;o.size=c,o.width=p,o.height=a,o.url=l,o.duration=r,o.contentType="video/"+Th.fileExtension(l,"."),o.name="baidu-video."+Th.fileExtension(l,"."),s.url=u,s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/"+Th.fileExtension(u,"."),s.name="baidu-thumbnail."+Th.fileExtension(l,"."),e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class ef extends Ah{create(){return new _h}setPayload(e,t){e.complete=Promise.reject("Baidu app not support file message.")}validate(e){}}class tf extends ef{create(){return new Mh}setPayload(e,t){let n=t,i=e.createOptions.file,o=i.tempFilePath;n.url=o,n.name="baidu-audio."+Th.fileExtension(o,"."),n.contentType="audio/"+Th.fileExtension(o,"."),n.duration=i.duration/1e3,n.size=i.fileSize,e.complete=Promise.resolve()}validate(e){super.validate(e)}}class nf extends ef{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;n.url=i.path,n.size=i.size,e.complete=new Promise(((e,t)=>{swan.getImageInfo({src:i.path,success(t){n.width=t.width,n.height=t.height,n.contentType="image/"+t.type,n.name="baidu-image."+t.type,e()},fail(e){t(e)}})}))}validate(e){super.validate(e)}}class of extends Ah{create(){return new _h}setPayload(e,t){let n=t,i=e.createOptions.file;const{uri:o,type:s,size:r,name:a}=i;n.url=decodeURIComponent(o),n.name=a,n.size=r,n.contentType=s,e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class sf extends of{create(){return new Oh}setPayload(e,t){let n=t,i=e.createOptions.file;const{uri:o,fileSize:s,type:r,fileName:a,width:c,height:l}=i;n.url=o,n.size=s,n.contentType=r,n.name=a,n.width=c,n.height=l,e.complete=Promise.resolve()}validate(e){super.validate(e)}}class rf extends Ah{create(){return new Lh}setPayload(e,t){let n=e.createOptions.file;const i=t,{video:o,thumbnail:s}=i,{uri:r,type:a,fileSize:c,fileName:l,duration:u,height:p,width:d}=n;o.size=c,o.width=d,o.height=p,o.url=r,o.duration=u,o.contentType=a,o.name=l,s.url=r,s.name="rn-thumbnail.jpg",s.height=200,s.width=Number((o.width*s.height/o.height).toFixed(0)),s.contentType="image/jpg",e.complete=Promise.resolve()}validate(e){if(!nc.isObject(e))throw Error("it is an empty message.");if(!nc.isDef(e.file))throw Error("file is empty.")}}class af extends of{create(){return new Mh}setPayload(e,t){let n=e.createOptions,i=t,o=n.file;const{uri:s,name:r,duration:a,size:c}=o;i.url=s,i.duration=Number((a/1e3).toFixed(2)),i.size=c,i.name=r||"rn-audio."+Th.fileExtension(s,"."),i.contentType="audio/"+Th.fileExtension(s,"."),n.file={uri:s,type:i.contentType,name:i.name},e.complete=Promise.resolve()}validate(e){super.validate(e)}}class cf extends Ih{}class lf extends Ah{create(){return new cf}setPayload(e,t){let n=e.createOptions;t.payload=n.payload,e.complete=Promise.resolve()}validate(e){let t=e.type,n=e.payload;if(nc.isEmpty(t))throw Error("type is empty.");if(!nc.isString(t))throw Error("type require a string");if(nc.isEmpty(n))throw Error("payload is empty.");if(!nc.isPlainObject(n)&&!nc.isStringOrNumber(n))throw Error("payload require object | string | number.")}}class uf{constructor(e,t){this.type=e,this.createOptions=t}}class pf{constructor(){this.framework=Xa.currentFramework(),this.platform=oc.currentPlatform(),this.payloadBuilders={[Va.UNIAPP]:{image:new qh,file:new Gh,audio:new zh,video:new Hh,text:new Bh},[ic.MP_WX]:{image:new Ph,file:new Rh,audio:new Nh,video:new Fh,text:new Bh},[ic.BROWSER]:{image:new Vh,file:new $h,audio:new Kh,video:new Wh,text:new Bh},[ic.MP_ALI]:{image:new Qh,file:new Jh,audio:new Yh,video:new Xh,text:new Bh},[ic.MP_BAIDU]:{image:new nf,file:new ef,audio:new tf,video:new Zh,text:new Bh},[Va.REACT_NATIVE]:{image:new sf,file:new of,audio:new af,video:new rf,text:new Bh},[ic.MP_BYTE]:{image:new Ph,file:new Rh,audio:new Nh,video:new Fh,text:new Bh}}}buildMessage(e,t){const n=this.framework===Va.UNKNOWN?this.platform:this.framework;let i=this.payloadBuilders[n][e],o=new uf(e,t);if(i){let e=i.build(o);o.payload=e}else{let e=(new lf).build(o);o.payload=e.payload}let s=this.build(o);return o.complete.then((()=>{fc.onSuccess(t,s)})).catch((e=>{fc.onFailed(t,e)})),s}build(e){let t,n=e.type,i=e.payload,o=e.createOptions,s=o.to,r=s.type;return this.validate(o),r===Ya.GROUP?(t=new Zl,t.groupId=s.id.toString(),t.senderData=Kc.Socket.user().data):r===Ya.PRIVATE?(t=new Yl,t.read=!1,t.receiverId=s.id.toString()):r===Ya.CS&&(t=new eu,t.to=s.id.toString(),t.teamId=s.id.toString(),t.senderData=Kc.Socket.user().data),t.senderId=Kc.Socket.user().id,t.messageId=Xc.get(),t.payload=i,t.timestamp=Date.now(),t.type=n,t.recalled=!1,t.status=Za.NEW,t.buildOptions=e,t}validate(e){const t=e.to;if(!t)throw new Error("message require property to.");if(!nc.isObject(t))throw new Error("TypeError: to requires an object.");if(!nc.isObject(t.data))throw new Error("TypeError: to.data requires an object.");if(!t.type||t.type!==Ya.GROUP&&t.type!==Ya.PRIVATE&&t.type!==Ya.CS)throw new Error("message require property to.type");if(nl.validateId(t.id,"to.id"),Kc.Socket.user().id===t.id)throw new Error("to.id can not be the same as your id.");nc.isDef(e.notification)&&nl.validateNotification(e.notification),e.wxmpTemplateMsg&&nl.validateWXMPTemplateMsg(e.wxmpTemplateMsg)}}class df extends vh{onMessageReceived(e){if(e.t===Ya.CS){let t=this.builder.build(e);this.sendAck(t);let n=Kl.byIMMessage(t);rh.get(n).existsMessage(t)||(t.customerId()===Kc.Socket.user().id?(this.createNotification(e),ql.i.fire(Pl.MESSAGE_RECEIVED,t),au.fire(Dl.CS_MESSAGE_RECEIVED,t)):th.getInstance().queryTeams().then((()=>{nh.isMyMessage(t)&&this.createNotification(e),ql.i.fire(Pl.CS_AGENT_MESSAGE_RECEIVED,t)})))}}}class hf{constructor(e){this.times=new Array;let t=e[0],n=Kl.byIMMessage(t);this.scene=n.scene,this.targetId=n.id,e.forEach((e=>{this.times.push(e.timestamp)})),this.times.sort(((e,t)=>e{ql.i.fire(Pl.MESSAGE_RECALLED,e)},eh.onMessage(rl.IM_MSG_RECALLED,this.onRemoteRecalled)}recallMessage(e){return mc(this,void 0,void 0,(function*(){sh.validateMessageArray(e.messages),this.validate(e);let t=e.messages;yield this.recallServerMessages(t);let n=t[0],i=n.scene(),o=this.toConversationId(i,n.senderId,n.targetId()),s={id:Kc.Socket.user().id,data:Kc.Socket.user().data},r=t.map((e=>e.timestamp)),a=new ru(i,o,s,r);ql.i.fire(Pl.MESSAGE_RECALLED,a),fc.onSuccess(e)}))}toConversationId(e,t,n){if(Ya.PRIVATE===e)return o=n,(i=t).localeCompare(o)>0?`${i}:${o}`:`${o}:${i}`;var i,o;if(Ya.GROUP===e)return n;throw{code:400,content:`scene: ${e} not support`}}recallServerMessages(e){let t=new hf(e);return 0===t.times.length?Promise.resolve():new Promise(((e,n)=>{let i=new Yc({name:pc.IM_RECALL_MESSAGE,params:t,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{n(e)},success:t=>{200===t.code?e(t):n(t)}});Kc.Socket.e(i)}))}validate(e){let t=e.messages;for(let n=0;n{let i=this.dataCache.getData(e);i?n.set(e,i):t.push(e)})),0===t.length||(yield this.fetchData(...t)).forEach(((e,t)=>{this.dataCache.setData(t,e),n.set(t,e)})),Promise.resolve(n)}))}fetchData(...e){return new Promise(((t,n)=>{let i=new Yc({name:pc.MD_CMD,permission:Jc.READ,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,params:{name:"GET",data:{ids:e}},success:e=>{if(200===e.code){const n=new Map;e.content.forEach((e=>{n.set(e.id,e.data)})),t(n)}else n(e)},fail:e=>{n(e)}});Kc.Socket.e(i)}))}setData(e,t){this.dataCache.setData(e,t)}}class vf{constructor(){ql.i.on(Pl.MESSAGE_RECEIVED,this.onMessageReceived),ql.i.on(Pl.MESSAGE_SENDING,this.onMessageSending)}onMessageSending(e){let t=Kl.byIMMessage(e);t.scene===Ya.PRIVATE&&gf.i.setData(t.id,e.getToData())}onMessageReceived(e){if(Kl.byIMMessage(e).scene===Ya.GROUP){let t=e;gf.i.setData(t.senderId,t.senderData)}}}class yf{constructor(){this._iMReceiver=new vh,this.csMessageReceiver=new df,this.memberDataUpdator=new vf,this._userHereNow=new Eh,this.goEasyUploader=new Rl,this._groupHereNow=new Ch,this._groupOnlineCount=new Sh,this.groupMessageSubscriber=new yh,this.messageBuilder=new pf,this.messageSender=new Hl,this.recaller=new ff,this._groupPresenceSubscriber=new xh,this._userPresenceSubscriber=new wh,this.conversations=new gh,this.histories=rh.init()}static init(){ql.init(),au.init(),yf.instance=new yf}static i(){if(yf.instance)return yf.instance;throw Error("Please connect first.")}validateModules(){if(eh.status()===Ka.DISCONNECTED)throw Error("Please call connect() first.");fh.check()}catch(e,t){return mc(this,void 0,void 0,(function*(){try{this.validateModules(),nl.validateCallbackOptions(t),yield e()}catch(n){fc.onFailed(t,n)}}))}on(e,t){au.on(e,t)}off(e,t){au.off(e,t)}createTextMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Ml.TEXT,e)}createImageMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Ml.IMAGE,e)}createFileMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Ml.FILE,e)}createAudioMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Ml.AUDIO,e)}createVideoMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(Ml.VIDEO,e)}createCustomMessage(e){return this.validateModules(),this.messageBuilder.buildMessage(e.type,e)}sendMessage(e){this.catch((()=>{this.messageSender.send(e)}),e)}recallMessage(e){this.catch((()=>{this.recaller.recallMessage(e)}),e)}deleteMessage(e){this.catch((()=>{this.histories.deleteMessage(e)}),e)}markGroupMessageAsRead(e){this.catch((()=>mc(this,void 0,void 0,(function*(){yield this.histories.groupMarkAsRead(e)}))),e)}markPrivateMessageAsRead(e){this.catch((()=>mc(this,void 0,void 0,(function*(){yield this.histories.privateMarkAsRead(e)}))),e)}markMessageAsRead(e,t){this.catch((()=>mc(this,void 0,void 0,(function*(){yield this.histories.markMessageAsRead(e,t)}))),e)}latestConversations(e){this.validateModules(),this.conversations.latestConversations(e)}removePrivateConversation(e){this.catch((()=>this.conversations.removePrivateConversation(e)),e)}removeGroupConversation(e){this.catch((()=>this.conversations.removeGroupConversation(e)),e)}topPrivateConversation(e){this.catch((()=>this.conversations.topPrivateConversation(e)),e)}topGroupConversation(e){this.catch((()=>this.conversations.topGroupConversation(e)),e)}history(e,t){this.catch((()=>{this.histories.loadHistory(e,t)}),e)}subscribeUserPresence(e){this.catch((()=>this._userPresenceSubscriber.presence(e)),e)}unsubscribeUserPresence(e){this.catch((()=>this._userPresenceSubscriber.unPresence(e)),e)}hereNow(e){this.catch((()=>this._userHereNow.hereNow(e)),e)}subscribeGroup(e){this.catch((()=>this.groupMessageSubscriber.subscribe(e)),e)}unsubscribeGroup(e){this.catch((()=>this.groupMessageSubscriber.unsubscribe(e)),e)}subscribeGroupPresence(e){this.catch((()=>this._groupPresenceSubscriber.presence(e)),e)}unsubscribeGroupPresence(e){this.catch((()=>this._groupPresenceSubscriber.unPresence(e)),e)}groupHereNow(e){this.catch((()=>this._groupHereNow.hereNow(e)),e)}groupOnlineCount(e){this.catch((()=>this._groupOnlineCount.get(e)),e)}latestPendingConversations(e){this.validateModules(),this.conversations.latestPendingConversations(e)}topConversation(e){this.validateModules(),this.conversations.topConversation(e)}removeConversation(e){this.validateModules(),this.conversations.removeConversation(e)}}class bf{constructor(e,t){this.customerId=e,this.teamId=t}}class xf{constructor(e,t){this.teamId=e;let n=new tc(t.id.toString(),JSON.stringify(t.data));this.customer=n}}class Sf{constructor(e,t,n){this.customerId=e,this.teamId=t,this.agentId=n}}class kf{constructor(e,t){this.customerId=e,this.teamId=t}}class Cf{constructor(e){this.builder=new tu,this.teamId=e}accept(e,t){let n=t.customer;if(nc.isUndef(n))throw{code:400,content:"customer is required."};nl.validateId(n.id,"customer.id");let i=n.data;if(nc.isUndef(i)||!nc.isObject(i))throw{code:400,content:"customer data must be non-empty object."};let o=new xf(e,n),s=new Yc({name:pc.CS_ACCEPT,params:o,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{fc.onFailed(t,e)},success:e=>{let n=this.builder.build(e.content.message);ql.i.fire(Pl.CS_ACCEPTED,n),fc.onSuccess(t)}});Kc.Socket.e(s)}end(e,t){nl.validateId(t.id,"id");let n=t.id.toString(),i=new kf(n,e),o=new Yc({name:pc.CS_END,params:i,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{fc.onFailed(t,e)},success:e=>{let n=this.builder.build(e.content.message);ql.i.fire(Pl.CS_ENDED,n),fc.onSuccess(t)}});Kc.Socket.e(o)}queryCustomerStatus(e,t){return mc(this,void 0,void 0,(function*(){nl.validateId(t.id,"id");let n=yield this.doCustomerStatus(e,t.id);this.activeCustomerStatus=n,this.activeCustomerStatusOptions=t,fc.onSuccess(t,n)}))}doCustomerStatus(e,t){let n=t.toString(),i=new bf(n,e);return new Promise(((e,t)=>{let n=new Yc({name:pc.CS_CUSTOMER_STATUS,params:i,permission:Jc.READ,singleTimeout:dc.commonQuerySingle,totalTimeout:dc.commonQueryTotal,fail:e=>{t(e)},success:t=>{let n=t.content;n.agent&&(n.agent.data=JSON.parse(n.agent.data)),e(n)}});Kc.Socket.e(n)}))}transfer(e,t){nl.validateId(t.customerId,"customerId"),nl.validateId(t.agentId,"agentId");let n=t.customerId.toString(),i=t.agentId.toString(),o=new Sf(n,e,i),s=new Yc({name:pc.CS_TRANSFER,params:o,permission:Jc.WRITE,singleTimeout:dc.commonRequestSingle,totalTimeout:dc.commonRequestTotal,fail:e=>{fc.onFailed(t,e)},success:e=>{let n=this.builder.build(e.content.message);ql.i.fire(Pl.CS_TRANSFER,n),fc.onSuccess(t)}});Kc.Socket.e(s)}}class wf{createTextMessage(e,t){let n=yf.i().createTextMessage(t);this.extendProps(e,n)}createImageMessage(e,t){let n=yf.i().createImageMessage(t);this.extendProps(e,n)}createFileMessage(e,t){let n=yf.i().createFileMessage(t);this.extendProps(e,n)}createAudioMessage(e,t){let n=yf.i().createAudioMessage(t);this.extendProps(e,n)}createVideoMessage(e,t){let n=yf.i().createVideoMessage(t);this.extendProps(e,n)}createCustomMessage(e,t){let n=yf.i().createCustomMessage(t);this.extendProps(e,n)}extendProps(e,t){if(t.scene()===Ya.CS){let n=t;n.teamId=e,n.accepted=!0}}}class Ef{constructor(e){this.teamId=e,this.agentStatus=th.getInstance(),this.conversationHandler=new Cf(e),this.messageCreator=new wf}catch(e,t){return mc(this,void 0,void 0,(function*(){try{nl.validateCallbackOptions(t),yield e()}catch(n){fc.onFailed(t,n)}}))}isOnline(e){this.catch((()=>{this.agentStatus.isOnline(this.teamId,e)}),e)}online(e){this.catch((()=>{this.agentStatus.online(this.teamId,e)}),e)}offline(e){this.catch((()=>{this.agentStatus.offline(this.teamId,e)}),e)}customerStatus(e){this.catch((()=>{this.conversationHandler.queryCustomerStatus(this.teamId,e)}),e)}accept(e){this.catch((()=>{this.conversationHandler.accept(this.teamId,e)}),e)}end(e){this.catch((()=>{this.conversationHandler.end(this.teamId,e)}),e)}history(e){yf.i().history(e,this.teamId)}markMessageAsRead(e){yf.i().markMessageAsRead(e,this.teamId)}createTextMessage(e){this.messageCreator.createTextMessage(this.teamId,e)}createImageMessage(e){this.messageCreator.createImageMessage(this.teamId,e)}createFileMessage(e){this.messageCreator.createFileMessage(this.teamId,e)}createAudioMessage(e){this.messageCreator.createAudioMessage(this.teamId,e)}createVideoMessage(e){this.messageCreator.createVideoMessage(this.teamId,e)}createCustomMessage(e){this.messageCreator.createCustomMessage(this.teamId,e)}transfer(e){this.catch((()=>{this.conversationHandler.transfer(this.teamId,e)}),e)}agents(e){this.catch((()=>{this.agentStatus.agents(this.teamId,e)}),e)}liveSession(e){this.catch((()=>{nh.live(this.teamId,e)}),e)}quitLiveSession(e){this.catch((()=>{nh.quit(e)}),e)}listenCustomer(e){let t={customerId:e.id,onNewMessage:e.onNewMessage,onStatusUpdated:e.onStatusUpdated,onFailed:e.onFailed,onSuccess:e.onSuccess};this.catch((()=>{nh.live(this.teamId,t)}),e)}cancelListenCustomer(e){this.catch((()=>{nh.quit(e)}),e)}}class Tf{static team(e){nl.validateId(e,"teamId");let t=this.teams.get(e);return t||(t=new Ef(e.toString()),this.teams.set(e.toString(),t)),t}}Tf.teams=new Map;class If{constructor(e){this.id=e}isOnline(e){Tf.team(this.id).isOnline(e)}online(e){Tf.team(this.id).online(e)}offline(e){Tf.team(this.id).offline(e)}customerStatus(e){Tf.team(this.id).customerStatus(e)}accept(e){Tf.team(this.id).accept(e)}end(e){Tf.team(this.id).end(e)}history(e){Tf.team(this.id).history(e)}markMessageAsRead(e){Tf.team(this.id).markMessageAsRead(e)}createTextMessage(e){Tf.team(this.id).createTextMessage(e)}createImageMessage(e){Tf.team(this.id).createImageMessage(e)}createFileMessage(e){Tf.team(this.id).createFileMessage(e)}createAudioMessage(e){Tf.team(this.id).createAudioMessage(e)}createVideoMessage(e){Tf.team(this.id).createVideoMessage(e)}createCustomMessage(e){Tf.team(this.id).createCustomMessage(e)}transfer(e){Tf.team(this.id).transfer(e)}agents(e){Tf.team(this.id).agents(e)}liveSession(e){Tf.team(this.id).liveSession(e)}quitLiveSession(e){Tf.team(this.id).quitLiveSession(e)}listenCustomer(e){Tf.team(this.id).listenCustomer(e)}cancelListenCustomer(e){Tf.team(this.id).cancelListenCustomer(e)}}class _f{static getInstance(e){return this.init(e),_f}static init(e){if(this.getConnectionStatus()!==Ka.DISCONNECTED)throw new Error("Initialization failed. Please disconnect and try again.");this.validateOptions(e),Ja.init(e.reactNativeOptions),this.options=e,eh.init(e),e.allowNotification&&el.init(e.allowNotification),e.modules&&(e.modules.includes("PUBSUB")&&Fc.initModule(ml.init()),e.modules.includes("IM")&&Fc.initModule(fh.init())),gf.init(),Kc.init(eh,el,gf,Qa,sc,Fc)}static setBadge(e){el.setBadge(e)}static connect(e){eh.connect(e,"JS")}static disconnect(e){eh.disconnect(e)}static getConnectionStatus(){return eh.status()}static validateOptions(e){let t="";if(!nc.isObject(e))throw t="options is require an object.",Error(t);if(!nc.isPrimitive(e.appkey)||0==e.appkey.length)throw t="Invalid options:'appkey' is empty.",Error(t);if(!nc.isPrimitive(e.host)||0==e.host.length)throw t="Invalid options:'host' is empty.",Error(t);if(!nc.isArray(e.modules))throw t="Invalid options: 'modules' must be nonempty array",Error(t);if(!e.modules.includes("im")&&!e.modules.includes("pubsub"))throw t="Invalid options: 'modules' must include at least one of 'im' or 'pubsub'.",Error(t);e.modules=e.modules.map((e=>e.toUpperCase()))}static onClickNotification(e){el.onClickNotification(e)}static c(e){e.init(Kc.Socket,Kc.N,Kc.Member,Kc.v,Kc.Platform,Fc)}}function Of(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}_f.version=Qa,_f.IM_EVENT=Dl,_f.IM_SCENE=Ya,_f.im=class{static on(e,t){yf.i().on(e,t)}static off(e,t){yf.i().off(e,t)}static createTextMessage(e){return yf.i().createTextMessage(e)}static createImageMessage(e){return yf.i().createImageMessage(e)}static createFileMessage(e){return yf.i().createFileMessage(e)}static createAudioMessage(e){return yf.i().createAudioMessage(e)}static createVideoMessage(e){return yf.i().createVideoMessage(e)}static createCustomMessage(e){return yf.i().createCustomMessage(e)}static sendMessage(e){yf.i().sendMessage(e)}static recallMessage(e){yf.i().recallMessage(e)}static deleteMessage(e){yf.i().deleteMessage(e)}static markGroupMessageAsRead(e){yf.i().markGroupMessageAsRead(e)}static markPrivateMessageAsRead(e){yf.i().markPrivateMessageAsRead(e)}static latestConversations(e){yf.i().latestConversations(e)}static removePrivateConversation(e){yf.i().removePrivateConversation(e)}static removeGroupConversation(e){yf.i().removeGroupConversation(e)}static topPrivateConversation(e){yf.i().topPrivateConversation(e)}static topGroupConversation(e){yf.i().topGroupConversation(e)}static history(e){yf.i().history(e)}static subscribeUserPresence(e){yf.i().subscribeUserPresence(e)}static unsubscribeUserPresence(e){yf.i().unsubscribeUserPresence(e)}static hereNow(e){yf.i().hereNow(e)}static subscribeGroup(e){yf.i().subscribeGroup(e)}static unsubscribeGroup(e){yf.i().unsubscribeGroup(e)}static subscribeGroupPresence(e){yf.i().subscribeGroupPresence(e)}static unsubscribeGroupPresence(e){yf.i().unsubscribeGroupPresence(e)}static groupHereNow(e){yf.i().groupHereNow(e)}static groupOnlineCount(e){yf.i().groupOnlineCount(e)}static markMessageAsRead(e){yf.i().markMessageAsRead(e)}static csteam(e){return new If(e)}static pendingConversations(e){yf.i().latestPendingConversations(e)}static topConversation(e){yf.i().topConversation(e)}static removeConversation(e){yf.i().removeConversation(e)}},_f.pubsub=class{static publish(e){this.catch((()=>{fl.instance.publish(e)}),e)}static subscribe(e){this.catch((()=>{fl.instance.subscribe(e)}),e)}static unsubscribe(e){this.catch((()=>{fl.instance.unsubscribe(e)}),e)}static subscribePresence(e){this.catch((()=>{fl.instance.subscribePresence(e)}),e)}static unsubscribePresence(e){this.catch((()=>{fl.instance.unsubscribePresence(e)}),e)}static history(e){this.catch((()=>{fl.instance.history(e)}),e)}static hereNow(e){this.catch((()=>{fl.instance.hereNow(e)}),e)}static catch(e,t){try{if(ml.check(),[Ka.DISCONNECTED,Ka.DISCONNECTING,Ka.CONNECT_FAILED].includes(Kc.Socket.status()))throw new Error("Please call connect() first.");e()}catch(n){fc.onFailed(t,n)}}};var Af={exports:{}};window,Af.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/Users/chrisftian/Documents/projects/cos-sdk/cos-wx-sdk-v5/dist",n(n.s=8)}([function(e,t,n){function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw r}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0;--s){var a=this.tryEntries[s],r=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:P(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),v}},t}function a(e,t,n,i,o,s,a){try{var r=e[s](a),c=r.value}catch(u){return void n(u)}r.done?t(c):Promise.resolve(c).then(i,o)}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=n(10),u=n(13),l=n(14),d=l.btoa,p=Pn.getFileSystemManager(),h=n(2),g=n(15),f=g.XMLParser,m=g.XMLBuilder,_=new f({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1,trimValues:!1}),v=new m,y=function e(t){if(R(t))for(var n in t){var i=t[n];"string"==typeof i?"#text"===n&&delete t[n]:Array.isArray(i)?i.forEach((function(t){e(t)})):R(i)&&e(i)}};function I(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function M(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t?I(i).toLowerCase():i);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var C=["cache-control","content-disposition","content-encoding","content-length","content-md5","content-type","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],S=function(){},E=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t};function T(e){return b(e,(function(e){return"object"===r(e)&&null!==e?T(e):e}))}function k(e,t){return O(t,(function(n,i){e[i]=t[i]})),e}function D(e){return e instanceof Array}function R(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function b(e,t){var n=D(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}var A,L,P=function(e,t){if(t=k({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};t&&"object"===r(t)&&(function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}(),F.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-forbid-overwrite":"ForbidOverwrite","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations"},(function(e,i){void 0!==t[e]&&(n[i]=t[e])})),t.Headers=E(n))}return t},N=function(e){return new Promise((function(t,n){p.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},w=(A=s().mark((function e(t,n,i){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}i(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==n.Body||!n.FilePath){e.next=17;break}return e.prev=6,e.next=9,N(n.FilePath);case 9:n.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),n.Body=void 0,i({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,i(null,n.ContentLength)):i({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?p.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var o=t.isDirectory()?0:t.size;n.ContentLength=o=o||0,i(null,o)},fail:function(e){i(e)}}):i({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),L=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=A.apply(e,t);function s(e){a(o,n,i,s,r,"next",e)}function r(e){a(o,n,i,s,r,"throw",e)}s(void 0)}))},function(e,t,n){return L.apply(this,arguments)}),U=function(e){return Date.now()+(e||0)},G=function(e,t){if(!e||!t)return-1;e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengths)return 1;if(o=0);return function(){return i}}(),F={noop:S,formatParams:P,apiWrapper:function(e,t){return function(n,i){var o,s=this;if("function"==typeof n&&(i=n,n={}),n=P(e,n),s.options.EnableReporter)if("sliceUploadFile"===n.calledBySdk||"sliceCopyFile"===n.calledBySdk)o=n.tracker&&n.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))o=null;else{var a=0;n.Body&&(a="string"==typeof n.Body?n.Body.length:n.Body.size||n.Body.byteLength||0);var r=s.options.UseAccelerate||"string"==typeof s.options.Domain&&s.options.Domain.includes("accelerate.");o=new h({Beacon:s.options.BeaconReporter,clsReporter:s.options.ClsReporter,bucket:n.Bucket,region:n.Region,apiName:e,realApi:e,accelerate:r,fileKey:n.Key,fileSize:a,deepTracker:s.options.DeepTracker,customId:s.options.CustomId,delay:s.options.TrackerDelay})}n.tracker=o;var c=function(e){return e&&e.headers&&(e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},u=function(e,t){o&&o.report(e,t),i&&i(c(e),c(t))},l=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,i=t.Region,o=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(!n)return"Bucket";if(!i)return"Region";if(!o)return"Key"}return!1}(e,n);if(t)return"missing param "+t;if(n.Region){if(n.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(n.Region))return"Region format error.";!s.options.CompatibilityMode&&-1===n.Region.indexOf("-")&&"yfb"!==n.Region&&"default"!==n.Region&&n.Region}if(n.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(n.Bucket))if(n.AppId)n.Bucket=n.Bucket+"-"+n.AppId;else{if(!s.options.AppId)return'Bucket should format as "test-1250000000".';n.Bucket=n.Bucket+"-"+s.options.AppId}n.AppId&&delete n.AppId}n.Key&&"/"===n.Key.substr(0,1)&&(n.Key=n.Key.substr(1))}}(),d=["getAuth","getObjectUrl"].includes(e);if(!d&&!i)return new Promise((function(e,o){if(i=function(t,n){t?o(t):e(n)},l)return u({error:l});t.call(s,n,u)}));if(l)return u({error:l});var p=t.call(s,n,u);return d?p:void 0}},xml2json:function(e){var t=_.parse(e);return y(t),t},json2xml:function(e){return v.build(e)},md5:c,clearKey:E,fileSlice:function(e,t,n,i){e?p.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},getBodyMd5:function(e,t,n){n=n||S,e&&t&&t instanceof ArrayBuffer?F.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=c(e);return t&&t(n),n},binaryBase64:function(e){var t,n,i,o="";for(t=0,n=e.length/2;t-1||i.indexOf("x-ci-")>-1||C.indexOf(i)>-1)&&(t[n]=e[n])}return t}(T(e.Headers||e.headers||{})),c=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+c:0!==(t=e.Pathname||e.pathname||c).indexOf("/")&&(t="/"+t);var l=!1!==e.ForceSignHost;if(!r.Host&&!r.host&&e.Bucket&&e.Region&&l&&(r.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&i){var d=Math.round(U(e.SystemClockOffset)/1e3)-1,p=d,h=e.Expires||e.expires;p+=void 0===h?900:1*h||0;var g=n,f=o||d+";"+p,m=o||d+";"+p,_=M(r,!0).join(";").toLowerCase(),v=M(a,!0).join(";").toLowerCase(),y=u.HmacSHA1(m,i).toString(),I=[s,t,F.obj2str(a,!0),F.obj2str(r,!0),""].join("\n"),S=["sha1",f,u.SHA1(I).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+f,"q-key-time="+m,"q-header-list="+_,"q-url-param-list="+v,"q-signature="+u.HmacSHA1(S,y).toString()].join("&")}},compareVersion:G,canFileSlice:x,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===r(t)&&null!==t&&(k(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=T(n)),e},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var n=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return n?{Bucket:n[1],Region:n[3],Key:n[7]}:null},encodeBase64:function(e,t){var n=l.encode(e);return t&&(n=n.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),n},simplifyPath:function(e){var t,n=[],o=i(e.split("/"));try{for(o.s();!(t=o.n()).done;){var s=t.value;".."===s?n.length&&n.pop():s.length&&"."!==s&&n.push(s)}}catch(a){o.e(a)}finally{o.f()}return"/"+n.join("/")},arrayBufferToString:function(e){return new TextDecoder("utf-8").decode(e)},parseResBody:function(e){var t;if(e&&"string"==typeof e){var n=e.trim(),i=0===n.indexOf("<"),o=0===n.indexOf("{");if(i)t=F.xml2json(e)||{};else if(o)try{var s=e.replace(/\n/g," "),a=JSON.parse(s);t="[object Object]"===Object.prototype.toString.call(a)?a:e}catch(r){t=e}else t=e}else t=e||{};return t}};e.exports=F},function(e,t,n){const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o="["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",s=new RegExp("^"+o+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const i=Object.keys(t),o=i.length;for(let s=0;s=0;--s){var r=this.tryEntries[s],a=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var c=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;R(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:M(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function r(e,t,n,i,o,s,r){try{var a=e[s](r),c=a.value}catch(l){return void n(l)}a.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=n(10),l=n(13),u=n(14),p=u.btoa,d=Mn.getFileSystemManager(),h=n(2),f=n(15),m=f.XMLParser,g=f.XMLBuilder,v=new m({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1,trimValues:!1}),y=new g,b=function e(t){if(_(t))for(var n in t){var i=t[n];"string"==typeof i?"#text"===n&&delete t[n]:Array.isArray(i)?i.forEach((function(t){e(t)})):_(i)&&e(i)}};function x(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function S(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t?x(i).toLowerCase():i);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var k=["cache-control","content-disposition","content-encoding","content-length","content-md5","content-type","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],C=function(){},w=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t};function E(e){return A(e,(function(e){return"object"===a(e)&&null!==e?E(e):e}))}function T(e,t){return O(t,(function(n,i){e[i]=t[i]})),e}function I(e){return e instanceof Array}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function A(e,t){var n=I(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}var R,P,M=function(e,t){if(t=T({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};t&&"object"===a(t)&&(function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}(),U.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-forbid-overwrite":"ForbidOverwrite","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations"},(function(e,i){void 0!==t[e]&&(n[i]=t[e])})),t.Headers=w(n))}return t},N=function(e){return new Promise((function(t,n){d.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},D=(R=s().mark((function e(t,n,i){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}i(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==n.Body||!n.FilePath){e.next=17;break}return e.prev=6,e.next=9,N(n.FilePath);case 9:n.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),n.Body=void 0,i({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,i(null,n.ContentLength)):i({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?d.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var o=t.isDirectory()?0:t.size;n.ContentLength=o=o||0,i(null,o)},fail:function(e){i(e)}}):i({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),P=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=R.apply(e,t);function s(e){r(o,n,i,s,a,"next",e)}function a(e){r(o,n,i,s,a,"throw",e)}s(void 0)}))},function(e,t,n){return P.apply(this,arguments)}),B=function(e){return Date.now()+(e||0)},L=function(e,t){if(!e||!t)return-1;e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengths)return 1;if(o=0);return function(){return i}}(),U={noop:C,formatParams:M,apiWrapper:function(e,t){return function(n,i){var o,s=this;if("function"==typeof n&&(i=n,n={}),n=M(e,n),s.options.EnableReporter)if("sliceUploadFile"===n.calledBySdk||"sliceCopyFile"===n.calledBySdk)o=n.tracker&&n.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))o=null;else{var r=0;n.Body&&(r="string"==typeof n.Body?n.Body.length:n.Body.size||n.Body.byteLength||0);var a=s.options.UseAccelerate||"string"==typeof s.options.Domain&&s.options.Domain.includes("accelerate.");o=new h({Beacon:s.options.BeaconReporter,clsReporter:s.options.ClsReporter,bucket:n.Bucket,region:n.Region,apiName:e,realApi:e,accelerate:a,fileKey:n.Key,fileSize:r,deepTracker:s.options.DeepTracker,customId:s.options.CustomId,delay:s.options.TrackerDelay})}n.tracker=o;var c=function(e){return e&&e.headers&&(e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},l=function(e,t){o&&o.report(e,t),i&&i(c(e),c(t))},u=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,i=t.Region,o=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(!n)return"Bucket";if(!i)return"Region";if(!o)return"Key"}return!1}(e,n);if(t)return"missing param "+t;if(n.Region){if(n.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(n.Region))return"Region format error.";!s.options.CompatibilityMode&&-1===n.Region.indexOf("-")&&"yfb"!==n.Region&&"default"!==n.Region&&n.Region}if(n.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(n.Bucket))if(n.AppId)n.Bucket=n.Bucket+"-"+n.AppId;else{if(!s.options.AppId)return'Bucket should format as "test-1250000000".';n.Bucket=n.Bucket+"-"+s.options.AppId}n.AppId&&delete n.AppId}n.Key&&"/"===n.Key.substr(0,1)&&(n.Key=n.Key.substr(1))}}(),p=["getAuth","getObjectUrl"].includes(e);if(!p&&!i)return new Promise((function(e,o){if(i=function(t,n){t?o(t):e(n)},u)return l({error:u});t.call(s,n,l)}));if(u)return l({error:u});var d=t.call(s,n,l);return p?d:void 0}},xml2json:function(e){var t=v.parse(e);return b(t),t},json2xml:function(e){return y.build(e)},md5:c,clearKey:w,fileSlice:function(e,t,n,i){e?d.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},getBodyMd5:function(e,t,n){n=n||C,e&&t&&t instanceof ArrayBuffer?U.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=c(e);return t&&t(n),n},binaryBase64:function(e){var t,n,i,o="";for(t=0,n=e.length/2;t-1||i.indexOf("x-ci-")>-1||k.indexOf(i)>-1)&&(t[n]=e[n])}return t}(E(e.Headers||e.headers||{})),c=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+c:0!==(t=e.Pathname||e.pathname||c).indexOf("/")&&(t="/"+t);var u=!1!==e.ForceSignHost;if(!a.Host&&!a.host&&e.Bucket&&e.Region&&u&&(a.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&i){var p=Math.round(B(e.SystemClockOffset)/1e3)-1,d=p,h=e.Expires||e.expires;d+=void 0===h?900:1*h||0;var f=n,m=o||p+";"+d,g=o||p+";"+d,v=S(a,!0).join(";").toLowerCase(),y=S(r,!0).join(";").toLowerCase(),b=l.HmacSHA1(g,i).toString(),x=[s,t,U.obj2str(r,!0),U.obj2str(a,!0),""].join("\n"),C=["sha1",m,l.SHA1(x).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+f,"q-sign-time="+m,"q-key-time="+g,"q-header-list="+v,"q-url-param-list="+y,"q-signature="+l.HmacSHA1(C,b).toString()].join("&")}},compareVersion:L,canFileSlice:j,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===a(t)&&null!==t&&(T(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=E(n)),e},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var n=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return n?{Bucket:n[1],Region:n[3],Key:n[7]}:null},encodeBase64:function(e,t){var n=u.encode(e);return t&&(n=n.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),n},simplifyPath:function(e){var t,n=[],o=i(e.split("/"));try{for(o.s();!(t=o.n()).done;){var s=t.value;".."===s?n.length&&n.pop():s.length&&"."!==s&&n.push(s)}}catch(r){o.e(r)}finally{o.f()}return"/"+n.join("/")},arrayBufferToString:function(e){return new TextDecoder("utf-8").decode(e)},parseResBody:function(e){var t;if(e&&"string"==typeof e){var n=e.trim(),i=0===n.indexOf("<"),o=0===n.indexOf("{");if(i)t=U.xml2json(e)||{};else if(o)try{var s=e.replace(/\n/g," "),r=JSON.parse(s);t="[object Object]"===Object.prototype.toString.call(r)?r:e}catch(a){t=e}else t=e}else t=e||{};return t}};e.exports=U},function(e,t,n){const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o="["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",s=new RegExp("^"+o+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const i=Object.keys(t),o=i.length;for(let s=0;s=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=s.call(a,"catchLoc"),u=s.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:P(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),v}},t}function s(e,t,n,i,o,s,a){try{var r=e[s](a),c=r.value}catch(u){return void n(u)}r.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function r(e){s(a,i,o,r,c,"next",e)}function c(e){s(a,i,o,r,c,"throw",e)}r(void 0)}))}}function r(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n5&&"xml"===i)return g("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function r(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},o,t);const n=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)v+=e[o];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),o--),d=v,!i.isName(d)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",g("InvalidTag",t,m(e,o))}const y=l(e,o);if(!1===y)return g("InvalidAttr","Attributes for '"+v+"' have open quote.",m(e,o));let I=y.value;if(o=y.index,"/"===I[I.length-1]){const n=o-I.length;I=I.substring(0,I.length-1);const i=p(I,t);if(!0!==i)return g(i.err.code,i.err.msg,m(e,n+i.err.line));c=!0}else if(_){if(!y.tagClosed)return g("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(e,o));if(I.trim().length>0)return g("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(e,f));if(0===n.length)return g("InvalidTag","Closing tag '"+v+"' has not been opened.",m(e,f));{const t=n.pop();if(v!==t.tagName){let n=m(e,t.tagStartPos);return g("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+v+"'.",m(e,f))}0==n.length&&(u=!0)}}else{const i=p(I,t);if(!0!==i)return g(i.err.code,i.err.msg,m(e,o-I.length+i.err.line));if(!0===u)return g("InvalidXml","Multiple possible root nodes found.",m(e,o));-1!==t.unpairedTags.indexOf(v)||n.push({tagName:v,tagStartPos:f}),c=!0}for(o++;o0)||g("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):g("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let n="",i="",o=!1;for(;t"===e[t]&&""===i){o=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:o}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const n=i.getAllMatches(e,d),o={};for(let i=0;i{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}},function(e,t){var n=function(e){var t={},n=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){n(e).push(t)},e.off=function(e,t){for(var i=n(e),o=i.length-1;o>=0;o--)t===i[o]&&i.splice(o,1)},e.emit=function(e,t){for(var i=n(e).map((function(e){return e})),o=0;o=0;n--){var o=i[n][2];(!o||o+2592e3=0;s--){var a=i[s];(a[0]===e&&a[1]===t||e!==a[0]&&0===a[0].indexOf(o))&&i.splice(s,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),u()}},removeUploadId:function(e){c(),delete l.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);u()}};e.exports=l},function(e,t,n){var i=n(9);e.exports=i},function(e,t,n){var i=n(0),o=n(6),s=n(25),a=n(26),r=n(32),c=n(3),u={SecretId:"",SecretKey:"",SecurityToken:"",StartTime:0,ExpiredTime:0,ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",AutoSwitchHost:!1,CopySourceParser:null,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},l=function(e){if(this.options=i.extend(i.clone(u),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");o.init(this),s.init(this)};a.init(l,s),r.init(l,s),l.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml,encodeBase64:i.encodeBase64},l.getAuthorization=i.getAuth,l.version=c.version,e.exports=l},function(e,t,n){(function(e){var t;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){var o="input is invalid type",s="object"===("undefined"==typeof window?"undefined":i(window)),a=s?window:{};a.JS_MD5_NO_WINDOW&&(s=!1),!s&&"object"===("undefined"==typeof self?"undefined":i(self))&&(a=self);var r,c=!a.JS_MD5_NO_COMMON_JS&&"object"===i(e)&&e.exports,u=n(12),l=!a.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[128,32768,8388608,-2147483648],h=[0,8,16,24],g=["hex","array","digest","buffer","arrayBuffer","base64"],f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),m=[];if(l){var _=new ArrayBuffer(68);r=new Uint8Array(_),m=new Uint32Array(_)}!a.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!a.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===i(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var v=function(e){return function(t){return new y(!0).update(t)[e]()}};function y(e){if(e)m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m,this.buffer8=r;else if(l){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}y.prototype.update=function(e){if(!this.finalized){var t,n=i(e);if("string"!==n){if("object"!==n)throw o;if(null===e)throw o;if(!l||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw o}else e=new Uint8Array(e);t=!0}for(var s,a,r=0,c=e.length,u=this.blocks,d=this.buffer8;r>2]|=e[r]<>6,d[a++]=128|63&s):s<55296||s>=57344?(d[a++]=224|s>>12,d[a++]=128|s>>6&63,d[a++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++r)),d[a++]=240|s>>18,d[a++]=128|s>>12&63,d[a++]=128|s>>6&63,d[a++]=128|63&s);else for(a=this.start;r>2]|=s<>2]|=(192|s>>6)<>2]|=(128|63&s)<=57344?(u[a>>2]|=(224|s>>12)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<>2]|=(240|s>>18)<>2]|=(128|s>>12&63)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<=64?(this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},y.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=p[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},y.prototype.hash=function(){var e,t,n,i,o,s,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879|0)^(n=((n=(-271733879^(i=((i=(-1732584194^2004318071&e)+a[1]-117830708)<<12|i>>>20)+e|0)&(-271733879^e))+a[2]-1126478375)<<17|n>>>15)+i|0)&(i^e))+a[3]-1316259209)<<22|t>>>10)+n|0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((i=this.h3)^t&(n^i))+a[0]-680876936)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+a[1]-389564586)<<12|i>>>20)+e|0)&(e^t))+a[2]+606105819)<<17|n>>>15)+i|0)&(i^e))+a[3]-1044525330)<<22|t>>>10)+n|0),t=((t+=((e=((e+=(i^t&(n^i))+a[4]-176418897)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+a[5]+1200080426)<<12|i>>>20)+e|0)&(e^t))+a[6]-1473231341)<<17|n>>>15)+i|0)&(i^e))+a[7]-45705983)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(i^t&(n^i))+a[8]+1770035416)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+a[9]-1958414417)<<12|i>>>20)+e|0)&(e^t))+a[10]-42063)<<17|n>>>15)+i|0)&(i^e))+a[11]-1990404162)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(i^t&(n^i))+a[12]+1804603682)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+a[13]-40341101)<<12|i>>>20)+e|0)&(e^t))+a[14]-1502002290)<<17|n>>>15)+i|0)&(i^e))+a[15]+1236535329)<<22|t>>>10)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+a[1]-165796510)<<5|e>>>27)+t|0)^t))+a[6]-1069501632)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+a[11]+643717713)<<14|n>>>18)+i|0)^i))+a[0]-373897302)<<20|t>>>12)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+a[5]-701558691)<<5|e>>>27)+t|0)^t))+a[10]+38016083)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+a[15]-660478335)<<14|n>>>18)+i|0)^i))+a[4]-405537848)<<20|t>>>12)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+a[9]+568446438)<<5|e>>>27)+t|0)^t))+a[14]-1019803690)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+a[3]-187363961)<<14|n>>>18)+i|0)^i))+a[8]+1163531501)<<20|t>>>12)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+a[13]-1444681467)<<5|e>>>27)+t|0)^t))+a[2]-51403784)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+a[7]+1735328473)<<14|n>>>18)+i|0)^i))+a[12]-1926607734)<<20|t>>>12)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+a[5]-378558)<<4|e>>>28)+t|0))+a[8]-2022574463)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+a[11]+1839030562)<<16|n>>>16)+i|0))+a[14]-35309556)<<23|t>>>9)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+a[1]-1530992060)<<4|e>>>28)+t|0))+a[4]+1272893353)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+a[7]-155497632)<<16|n>>>16)+i|0))+a[10]-1094730640)<<23|t>>>9)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+a[13]+681279174)<<4|e>>>28)+t|0))+a[0]-358537222)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+a[3]-722521979)<<16|n>>>16)+i|0))+a[6]+76029189)<<23|t>>>9)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+a[9]-640364487)<<4|e>>>28)+t|0))+a[12]-421815835)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+a[15]+530742520)<<16|n>>>16)+i|0))+a[2]-995338651)<<23|t>>>9)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+a[0]-198630844)<<6|e>>>26)+t|0)|~n))+a[7]+1126891415)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+a[14]-1416354905)<<15|n>>>17)+i|0)|~e))+a[5]-57434055)<<21|t>>>11)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+a[12]+1700485571)<<6|e>>>26)+t|0)|~n))+a[3]-1894986606)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+a[10]-1051523)<<15|n>>>17)+i|0)|~e))+a[1]-2054922799)<<21|t>>>11)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+a[8]+1873313359)<<6|e>>>26)+t|0)|~n))+a[15]-30611744)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+a[6]-1560198380)<<15|n>>>17)+i|0)|~e))+a[13]+1309151649)<<21|t>>>11)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+a[4]-145523070)<<6|e>>>26)+t|0)|~n))+a[11]-1120210379)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+a[2]+718787259)<<15|n>>>17)+i|0)|~e))+a[9]-343485551)<<21|t>>>11)+n|0,this.first?(this.h0=e+1732584193|0,this.h1=t-271733879|0,this.h2=n-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+e|0,this.h1=this.h1+t|0,this.h2=this.h2+n|0,this.h3=this.h3+i|0)},y.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15]+d[t>>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15]+d[n>>4&15]+d[15&n]+d[n>>12&15]+d[n>>8&15]+d[n>>20&15]+d[n>>16&15]+d[n>>28&15]+d[n>>24&15]+d[i>>4&15]+d[15&i]+d[i>>12&15]+d[i>>8&15]+d[i>>20&15]+d[i>>16&15]+d[i>>28&15]+d[i>>24&15]},y.prototype.toString=y.prototype.hex,y.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},y.prototype.array=y.prototype.digest,y.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},y.prototype.buffer=y.prototype.arrayBuffer,y.prototype.base64=function(){for(var e,t,n,i="",o=this.array(),s=0;s<15;)e=o[s++],t=o[s++],n=o[s++],i+=f[e>>>2]+f[63&(e<<4|t>>>4)]+f[63&(t<<2|n>>>6)]+f[63&n];return e=o[s],i+(f[e>>>2]+f[e<<4&63]+"==")};var I=function(){var e=v("hex");e.getCtx=e.create=function(){return new y},e.update=function(t){return e.create().update(t)};for(var t=0;t>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new s.init(n,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,r=o/(4*a);if(t=(r=t?e.ceil(r):e.max((0|r)-this._minBufferSize,0))*a,o=e.min(4*t,o),t){for(var c=0;cu;u++){if(16>u)s[u]=0|e[t+u];else{var l=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=l<<1|l>>>31}l=(i<<5|i>>>27)+c+s[u],l=20>u?l+(1518500249+(o&a|~o&r)):40>u?l+(1859775393+(o^a^r)):60>u?l+((o&a|o&r|a&r)-1894007588):l+((o^a^r)-899497514),c=r,r=a,a=o<<30|o>>>2,o=i,i=l}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+r|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(a),n.HmacSHA1=o._createHmacHelper(a),l=(u=d).enc.Utf8,u.algo.HMAC=u.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=l.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,r=s.words,c=0;c>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,r=0;r<4&&s+.75*r>>6*(3-r)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var o=e.indexOf(i);-1!=o&&(t=o)}for(var s=[],a=0,r=0;r>>6-r%4*2;s[a>>>2]|=(u|l)<<24-a%4*8,a++}return c.create(s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=d},function(e,t){var n,i,o,s,a,r,c,u,l,d,p,h,g,f,m,_,v,y,I,M=(i=(n=n||{}).Base64,s=function(e){for(var t={},n=0,i=e.length;n>>6)+a(128|63&t):a(224|t>>>12&15)+a(128|t>>>6&63)+a(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return a(240|t>>>18&7)+a(128|t>>>12&63)+a(128|t>>>6&63)+a(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,u=function(e){return e.replace(c,r)},l=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),t>=2?"=":o.charAt(n>>>6&63),t>=1?"=":o.charAt(63&n)].join("")},d=n.btoa?function(e){return n.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,l)},p=function(e){return d(u(e))},h=function(e,t){return t?p(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):p(String(e))},g=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),f=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return a(55296+(t>>>10))+a(56320+(1023&t));case 3:return a((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return a((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(g,f)},_=function(e){var t=e.length,n=t%4,i=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),o=[a(i>>>16),a(i>>>8&255),a(255&i)];return o.length-=[0,0,2,1][n],o.join("")},v=n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/[\s\S]{1,4}/g,_)},y=function(e){return m(v(e))},{VERSION:"2.1.9",atob:v,btoa:d,fromBase64:I=function(e){return y(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},toBase64:h,utob:u,encode:h,encodeURI:function(e){return h(e,!0)},btou:m,decode:I,noConflict:function(){var e=n.Base64;return n.Base64=i,e}});e.exports=M},function(e,t,n){const i=n(4),o=n(16),s=n(23);e.exports={XMLParser:o,XMLValidator:i,XMLBuilder:s}},function(e,t,n){const{buildOptions:i}=n(17),o=n(18),{prettify:s}=n(22),a=n(4);e.exports=class{constructor(e){this.externalEntities={},this.options=i(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=a.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new o(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||void 0===i?i:s(i,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},function(e,t){const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},function(e,t,n){const i=n(1),o=n(19),s=n(20),a=n(21),r=n(5);function c(e){const t=Object.keys(e);for(let n=0;n0)){a||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,o,s);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?M(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function l(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const d=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function p(e,t,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=i.getAllMatches(e,d),o=n.length,s={};for(let e=0;e",r,"Closing Tag is not closed.");let o=e.substring(r+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,a));const s=a.substring(a.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(c=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=a.lastIndexOf("."),a=a.substring(0,c),n=this.tagsNodeStack.pop(),i="",r=t}else if("?"===e[r+1]){let t=y(e,r,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,a),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new o(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,a,t.tagName)),this.addChild(n,e,a)}r=t.closeIndex+1}else if("!--"===e.substr(r+1,3)){const t=v(e,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(r+4,t-2);i=this.saveTextToParentTag(i,n,a),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=t}else if("!D"===e.substr(r+1,2)){const t=s(e,r);this.docTypeEntities=t.entities,r=t.i}else if("!["===e.substr(r+1,2)){const t=v(e,"]]>",r,"CDATA is not closed.")-2,o=e.substring(r+9,t);i=this.saveTextToParentTag(i,n,a);let s=this.parseTextData(o,n.tagname,a,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,s),r=t+2}else{let s=y(e,r,this.options.removeNSPrefix),c=s.tagName;const u=s.rawTagName;let l=s.tagExp,d=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,a,!1));const h=n;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(n=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),c!==t.tagname&&(a+=a?"."+c:c),this.isItStopNode(this.options.stopNodes,a,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),a=a.substr(0,a.length-1),l=c):l=l.substr(0,l.length-1),r=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))r=s.closeIndex;else{const n=this.readStopNodeData(e,u,p+1);if(!n)throw new Error(`Unexpected end of ${u}`);r=n.i,t=n.tagContent}const i=new o(c);c!==l&&d&&(i[":@"]=this.buildAttributesMap(l,a,c)),t&&(t=this.parseTextData(t,c,a,!0,d,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(n,i,a)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),a=a.substr(0,a.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new o(c);c!==l&&d&&(e[":@"]=this.buildAttributesMap(l,a,c)),this.addChild(n,e,a),a=a.substr(0,a.lastIndexOf("."))}else{const e=new o(c);this.tagsNodeStack.push(n),c!==l&&d&&(e[":@"]=this.buildAttributesMap(l,a,c)),this.addChild(n,e,a),n=e}i="",r=p}}else i+=e[r];return t.child};function g(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function _(e,t,n){const i="*."+n;for(const o in e){const n=e[o];if(i===n||t===n)return!0}return!1}function v(e,t,n,i){const o=e.indexOf(t,n);if(-1===o)throw new Error(i);return o+t.length-1}function y(e,t,n,i=">"){const o=function(e,t,n=">"){let i,o="";for(let s=t;s",n,`${t} is not closed`);if(e.substring(n+2,s).trim()===t&&(o--,0===o))return{tagContent:e.substring(i,n),i:s};n=s}else if("?"===e[n+1])n=v(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=v(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=v(e,"]]>",n,"StopNode is not closed.")-2;else{const i=y(e,n,">");i&&((i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&o++,n=i.closeIndex)}}function M(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&a(e,n)}return i.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=c,this.parseXml=h,this.parseTextData=u,this.resolveNameSpace=l,this.buildAttributesMap=p,this.isItStopNode=_,this.replaceEntitiesValue=f,this.readStopNodeData=I,this.saveTextToParentTag=m,this.addChild=g,this.ignoreAttributesFn=r(this.options.ignoreAttributes)}}},function(e,t,n){e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},function(e,t,n){const i=n(1);function o(e,t){let n="";for(;t"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,i--):i--,0===i)break}else"["===e[t]?d=!0:h+=e[t];else{if(d&&a(e,t))t+=7,[entityName,val,t]=o(e,t+1),-1===val.indexOf("&")&&(n[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&r(e,t))t+=8;else if(d&&c(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!s)throw new Error("Invalid DOCTYPE");p=!0}i++,h=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},function(e,t){const n=/^[-+]?0x[a-fA-F0-9]+$/,i=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const o={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,t={}){if(t=Object.assign({},o,t),!e||"string"!=typeof e)return e;let s=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(s))return e;if(t.hex&&n.test(s))return Number.parseInt(s,16);{const n=i.exec(s);if(n){const i=n[1],o=n[2];let r=(a=n[3])&&-1!==a.indexOf(".")?("."===(a=a.replace(/0+$/,""))?a="0":"."===a[0]?a="0"+a:"."===a[a.length-1]&&(a=a.substr(0,a.length-1)),a):a;const c=n[4]||n[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==s[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==s[1])return e;{const n=Number(s),a=""+n;return-1!==a.search(/[eE]/)||c?t.eNotation?n:e:-1!==s.indexOf(".")?"0"===a&&""===r||a===r||i&&a==="-"+r?n:e:o?r===a||i+r===a?n:e:s===a||s===i+a?n:e}}return e}var a}},function(e,t,n){function i(e,t,n){let r;const c={};for(let u=0;u0&&(c[t.textNodeName]=r):void 0!==r&&(c[t.textNodeName]=r),c}function o(e){const t=Object.keys(e);for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(e){this.options=Object.assign({},s,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=o(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=u),this.processTextOrObjNode=r,this.options.format?(this.indentate=c,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function r(e,t,n,i){const o=this.j2x(e,n+1,i.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,n):this.buildObjectNode(o.val,t,o.attrStr,n)}function c(e){return this.options.indentBy.repeat(e)}function u(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}a.prototype.build=function(e){return this.options.preserveOrder?i(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},a.prototype.j2x=function(e,t,n){let i="",o="";const s=n.join(".");for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(o+="");else if(null===e[a])this.isAttribute(a)?o+="":"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)o+=this.buildTextValNode(e[a],a,"",t);else if("object"!=typeof e[a]){const n=this.isAttribute(a);if(n&&!this.ignoreAttributesFn(n,s))i+=this.buildAttrPairStr(n,""+e[a]);else if(!n)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);o+=this.replaceEntitiesValue(t)}else o+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){const i=e[a].length;let s="",r="";for(let c=0;c"+e+o}},a.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+o+"0&&this.options.processEntities)for(let t=0;t`,l=!1;continue}if(h===t.commentPropName){u+=c+`\x3c!--${p[h][0][t.textNodeName]}--\x3e`,l=!0;continue}if("?"===h[0]){const e=o(p[":@"],t),n="?xml"===h?"":c;let i=p[h][0][t.textNodeName];i=0!==i.length?" "+i:"",u+=n+`<${h}${i}${e}?>`,l=!0;continue}let f=c;""!==f&&(f+=t.indentBy);const m=c+`<${h}${o(p[":@"],t)}`,_=n(p[h],t,g,f);-1!==t.unpairedTags.indexOf(h)?t.suppressUnpairedNode?u+=m+">":u+=m+"/>":_&&0!==_.length||!t.suppressEmptyNode?_&&_.endsWith(">")?u+=m+`>${_}${c}`:(u+=m+">",_&&""!==c&&(_.includes("/>")||_.includes("`):u+=m+"/>",l=!0}return u}function i(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(i="\n"),n(e,t,"",i)}},function(e,t,n){var i=n(7),o=n(0),s={};e.exports.transferToTaskMethod=function(e,t){s[t]=e[t],e[t]=function(e,n){e.SkipTask?s[t].call(this,e,n):this._addTask(t,e,n)}},e.exports.init=function(e){var t,n,a=[],r={},c=0,u=0,l=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},d=(n=function(){t=0,e.emit("task-list-update",{list:o.map(a,l)}),e.emit("list-update",{list:o.map(a,l)})},function(){t||(t=setTimeout(n))}),p=function(){if(!(a.length<=e.options.UploadQueueSize)){for(var t=0;te.options.UploadQueueSize;){var n="waiting"===a[t].state||"checking"===a[t].state||"uploading"===a[t].state;a[t]&&n?t++:(r[a[t].id]&&delete r[a[t].id],a.splice(t,1),u--)}d()}},h=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[u]&&"waiting"!==a[u].state;)u++;if(!(u>=a.length)){var n=a[u];u++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(l(n)),!n.params.UploadData&&(n.params.UploadData={});var i=o.formatParams(n.api,n.params);s[n.api].call(e,i,(function(i,o){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=i?"error":"success",i&&(n.error=i),c--,d(),t(),n.callback&&n.callback(i,o),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),p())})),d(),setTimeout(t)}}},g=function(t,n){var o=r[t];if(o){var s=o&&"waiting"===o.state,a=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===n&&"canceled"!==o.state||"paused"===n&&s||"paused"===n&&a){if("paused"===n&&o.params.Body&&"function"==typeof o.params.Body.pipe)return;o.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var u=o&&o.params&&o.params.UploadData.UploadId}catch(l){}"canceled"===n&&u&&i.removeUsing(u),d(),a&&(c--,h()),"canceled"===n&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}p()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),d()},e._addTask=function(t,n,i,s){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||o.canFileSlice()||(t=c),n=o.formatParams(t,n);var u=o.uuid();n.TaskId=u,n.onTaskReady&&n.onTaskReady(u);var l={params:n,callback:i,api:t,index:a.length,id:u,Bucket:n.Bucket,Region:n.Region,Key:n.Key,FilePath:n.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},g=n.onHashProgress;n.onHashProgress=function(t){e._isRunningTask(l.id)&&(l.hashPercent=t.percent,g&&g(t),d())};var f=n.onProgress;return n.onProgress=function(t){e._isRunningTask(l.id)&&("checking"===l.state&&(l.state="uploading"),l.loaded=t.loaded,l.size=t.total,l.speed=t.speed,l.percent=t.percent,f&&f(t),d())},o.getFileSize(t,n,(function(e,t){e?i(e):(r[u]=l,a.push(l),l.size=t,!s&&d(),h(),p())})),u},e._isRunningTask=function(e){var t=r[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(a,l)},e.cancelTask=function(e){g(e,"canceled")},e.pauseTask=function(e){g(e,"paused")},e.restartTask=function(e){var t=r[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",d(),u=Math.min(u,t.index),h())},e.isUploadRunning=function(){return c||u-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(s="{Bucket}."+s)),s=(s=s.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,a).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,a).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(s)||(s="https://"+s),"/"===s.slice(-1)&&(s=s.slice(0,-1));var c=s;return e.ForcePathStyle&&(c+="/"+t),c+="/",r&&(c+=o.camSafeUrlEncode(r).replace(/%2F/g,"/")),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}var u=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate;return(e.Url||c({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1")};function l(e,t){var n=o.clone(e.Headers),i="";o.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)}));var s=!1!==e.ForceSignHost;!i&&e.SignHost&&s&&(n.Host=e.SignHost);var a=!1,r=function(e,n){a||(a=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=o.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,u=e.Bucket||"",l=e.Region||"",d="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&u&&(d=u+"/"+d);var p="/"+d,h={},g=e.Scope;if(!g){var f=e.Action||"",m=e.ResourceKey||e.Key||"";g=e.Scope||[{action:f,bucket:u,region:l,prefix:m}]}var _=o.md5(JSON.stringify(g));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var n=Math.round(o.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===_){h=t;break}}}();var v=function(){var t="";h.StartTime&&e.Expires?t=h.StartTime+";"+(h.StartTime+1*e.Expires):h.StartTime&&h.ExpiredTime&&(t=h.StartTime+";"+h.ExpiredTime);var i={Authorization:o.getAuth({SecretId:h.TmpSecretId,SecretKey:h.TmpSecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:s}),SecurityToken:h.SecurityToken||h.XCosSecurityToken||"",Token:h.Token||"",ClientIP:h.ClientIP||"",ClientUA:h.ClientUA||"",SignFrom:"client"};r(null,i)},y=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{(n=atob(n)).indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(i){}if(!t)return o.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(h.ExpiredTime&&h.ExpiredTime-o.getSkewTime(c.options.SystemClockOffset)/1e3>60)v();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:u,Region:l,Method:e.Method,Key:d,Pathname:p,Query:e.Query,Headers:n,Scope:g,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:s},(function(e){"string"==typeof e&&(e={Authorization:e});var t=y(e);if(t)return r(t);e.Authorization?r(null,e):((h=e||{}).Scope=g,h.ScopeKey=_,c._StsCache.push(h),v())}));else{if(!c.options.getSTS)return function(){var t="";if(c.options.StartTime&&e.Expires){if(10!==c.options.StartTime.toString().length)return r(o.error(new Error('params "StartTime" should be 10 digits')));t=c.options.StartTime+";"+(c.options.StartTime+1*e.Expires)}else if(c.options.StartTime&&c.options.ExpiredTime){if(10!==c.options.StartTime.toString().length)return r(o.error(new Error('params "StartTime" should be 10 digits')));if(10!==c.options.ExpiredTime.toString().length)return r(o.error(new Error('params "ExpiredTime" should be 10 digits')));t=c.options.StartTime+";"+1*c.options.ExpiredTime}var i={Authorization:o.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:n,Expires:e.Expires,KeyTime:t,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:s}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken,SignFrom:"client"};return r(null,i),i}();c.options.getSTS.call(c,{Bucket:u,Region:l},(function(e){(h=e||{}).Scope=g,h.ScopeKey=_,h.TmpSecretId||(h.TmpSecretId=h.SecretId),h.TmpSecretKey||(h.TmpSecretKey=h.SecretKey);var t=y(h);if(t)return r(t);c._StsCache.push(h),v()}))}return""}function d(e){var t=this,n=!1,i=!1,s=!1,a=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var r=e.error.Code,c=e.error.Message;("RequestTimeTooSkewed"===r||"AccessDenied"===r&&"Request has expired"===c)&&(s=!0)}catch(p){}if(e){if(s&&a){var u=Date.parse(a);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-u)>=3e4&&(this.options.SystemClockOffset=u-Date.now(),n=!0)}else{if(5===Math.floor(e.statusCode/100))return{canRetry:!0,networkError:!1};if("timeout"===e.message)return{canRetry:!0,networkError:t.options.AutoSwitchHost}}if(e.statusCode){var l=Math.floor(e.statusCode/100),d=(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]);[3,4,5].includes(l)&&!d&&(n=t.options.AutoSwitchHost,i=!0)}else n=!0,i=t.options.AutoSwitchHost}return{canRetry:n,networkError:i}}function p(e){var t=e.requestUrl,n=e.clientCalcSign,i=e.networkError;return!!this.options.AutoSwitchHost&&!!t&&!!n&&!!i&&/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function h(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=o.clearKey(e.qs),e.headers&&(e.headers=o.clearKey(e.headers)),e.qs&&(e.qs=o.clearKey(e.qs));var i=o.clone(e.qs);e.action&&(i[e.action]="");var s=e.url||e.Url,a=e.SignHost||u.call(this,{Bucket:e.Bucket,Region:e.Region,Url:s}),r=e.tracker;!function o(s){var c=n.options.SystemClockOffset;e.SwitchHost&&(a=a.replace(/myqcloud.com/,"tencentcos.cn")),r&&r.setParams({signStartTime:(new Date).getTime(),httpRetryTimes:s-1}),l.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:a,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(i,a){i?t(i):(r&&r.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=a,g.call(n,e,(function(i,u){var l=!1,h=!1;if(i){var g=d.call(n,i);l=g.canRetry||c!==n.options.SystemClockOffset,h=g.networkError}if(r&&r.setParams({httpEndTime:(new Date).getTime()}),i&&s<4&&l){e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]);var f=p.call(n,{requestUrl:(null==i?void 0:i.url)||"",clientCalcSign:"client"===(null==a?void 0:a.SignFrom),networkError:h});e.SwitchHost=f,e.headers["x-cos-sdk-retry"]="true",o(s+1)}else t(i,u)})))}))}(1)}function g(e,t){var n=this,s=e.TaskId;if(!s||n._isRunningTask(s)){var a=e.Bucket,r=e.Region,u=e.Key,l=e.method||"GET",d=e.url||e.Url,p=e.body,h=e.json,g=e.rawBody,f=e.dataType,m=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(r="accelerate"),d=d||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:a,region:r,object:u}),e.SwitchHost&&(d=d.replace(/myqcloud.com/,"tencentcos.cn"));var _=u?d:"";e.action&&(d=d+"?"+e.action),e.qsStr&&(d=d.indexOf("?")>-1?d+"&"+e.qsStr:d+"?"+e.qsStr);var v={method:l,url:d,headers:e.headers,qs:e.qs,filePath:e.filePath,body:p,json:h,httpDNSServiceId:m,dataType:f},y="x-cos-security-token";o.isCIHost(d)&&(y="x-ci-security-token"),v.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(v.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(v.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(v.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(v.headers[y]=e.AuthData.SecurityToken),v.headers&&(v.headers=o.clearKey(v.headers)),v=o.clearKey(v),e.onProgress&&"function"==typeof e.onProgress&&(v.onProgress=function(t){if(!s||n._isRunningTask(s)){var i=t?t.loaded:0;e.onProgress({loaded:i,total:t.total})}}),this.options.Timeout&&(v.timeout=this.options.Timeout),n.options.ForcePathStyle&&(v.pathStyle=n.options.ForcePathStyle),n.emit("before-send",v);var I,M=v.url.includes("accelerate."),C=v.qs?Object.keys(v.qs).map((function(e){return"".concat(e,"=").concat(v.qs[e])})).join("&"):"",S=C?v.url+"?"+C:v.url;e.tracker&&(e.tracker.setParams({url:S,httpMethod:v.method,accelerate:M,httpSize:(null===(I=v.body)||void 0===I?void 0:I.size)||0}),e.tracker.parent&&!e.tracker.parent.params.url&&e.tracker.parent.setParams({url:_,accelerate:M}));var E=i(v,(function(e,i,a){if("abort"!==e){var r,c=function(e,a){if(s&&n.off("inner-kill-task",T),!r){r=!0;var c={};i&&i.statusCode&&(c.statusCode=i.statusCode),i&&i.headers&&(c.headers=i.headers),e?(v.url&&(c.url=v.url),v.method&&(c.method=v.method),e=o.extend(e||{},c),t(e,null)):(a=o.extend(a||{},c),t(null,a)),E=null}};if(e)c({error:e});else{var u=i.statusCode,l=2===Math.floor(u/100);if(g){if(l)return c(null,{body:a});if(a instanceof ArrayBuffer){var d=o.arrayBufferToString(a),p=o.parseResBody(d);return c({error:p.Error||p})}}var h=o.parseResBody(a);l?h.Error?c({error:h.Error}):c(null,h):c({error:h.Error||h})}}})),T=function e(t){t.TaskId===s&&(E&&E.abort&&E.abort(),n.off("inner-kill-task",e))};s&&n.on("inner-kill-task",T)}}var f={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n="https:",i=this.options.ServiceDomain,s=e.Region;i?(i=i.replace(/\{\{Region\}\}/gi,s||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(i)||(i=n+"//"+i),"/"===i.slice(-1)&&(i=i.slice(0,-1))):i=s?n+"//cos."+s+".myqcloud.com":n+"//service.cos.myqcloud.com",i.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),h.call(this,{Action:"name/cos:GetService",url:i,method:"GET",headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=o.isArray(i)?i:[i];var s=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:s,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,i="";if(e.BucketAZConfig){var s={BucketAZConfig:e.BucketAZConfig};i=o.json2xml({CreateBucketConfiguration:s})}h.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i,tracker:e.tracker},(function(i,o){if(i)return t(i);var s=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:s,statusCode:o.statusCode,headers:o.headers})}))},headBucket:function(e,t){h.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD",tracker:e.tracker},(function(e,n){t(e,n)}))},getBucket:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,h.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},s=i.Contents||[],a=i.CommonPrefixes||[];s=o.isArray(s)?s:[s],a=o.isArray(a)?a:[a];var r=o.clone(i);o.extend(r,{Contents:s,CommonPrefixes:a,statusCode:n.statusCode,headers:n.headers}),t(null,r)}))},deleteBucket:function(e,t){h.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var s=o.clone(e.AccessControlPolicy||{}),a=s.Grants||s.Grant;a=o.isArray(a)?a:[a],delete s.Grant,delete s.Grants,s.AccessControlList={Grant:a},i=o.json2xml({AccessControlPolicy:s}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=r(n[t]))})),h.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){h.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},s=i.Owner||{},r=i.AccessControlList.Grant||[];r=o.isArray(r)?r:[r];var c=a(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:s,Grants:r,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putBucketCors:function(e,t){var n=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];n=o.clone(o.isArray(n)?n:[n]),o.each(n,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=o.isArray(i)?i:[i]}))}));var i={CORSRule:n};e.ResponseVary&&(i.ResponseVary=e.ResponseVary);var s=o.json2xml({CORSConfiguration:i}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:s,action:"cors",headers:a,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){h.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=n.CORSConfiguration||{},a=s.CORSRules||s.CORSRule||[];a=o.clone(o.isArray(a)?a:[a]);var r=s.ResponseVary;o.each(a,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=o.isArray(i)?i:[i]}))})),t(null,{CORSRules:a,ResponseVary:r,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},getBucketLocation:function(e,t){h.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location",tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,n)}))},getBucketPolicy:function(e,t){h.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0,tracker:e.tracker},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t({ErrorStatus:"Access Denied"}):e.statusCode&&405===e.statusCode?t({ErrorStatus:"Method Not Allowed"}):e.statusCode&&404===e.statusCode?t({ErrorStatus:"Policy Not Found"}):t(e);var i={};try{i=JSON.parse(n.body)}catch(o){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(a){t({error:"Policy format error"})}var s=e.Headers;s["Content-Type"]="application/json",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:s,json:!0,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},deleteBucketPolicy:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},putBucketTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var s=o.json2xml({Tagging:{TagSet:{Tag:i}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:s,action:"tagging",headers:a,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketTagging:function(e,t){h.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var s=[];try{s=n.Tagging.TagSet.Tag||[]}catch(a){}s=o.clone(o.isArray(s)?s:[s]),t(null,{Tags:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLifecycle:function(e,t){var n=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];n=o.clone(n);var i=o.json2xml({LifecycleConfiguration:{Rule:n}}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"lifecycle",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLifecycle:function(e,t){h.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=[];try{s=n.LifecycleConfiguration.Rule||[]}catch(a){}s=o.clone(o.isArray(s)?s:[s]),t(null,{Rules:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var n=e.VersioningConfiguration||{},i=o.json2xml({VersioningConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){h.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning",tracker:e.tracker},(function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)}))},putBucketReplication:function(e,t){var n=o.clone(e.ReplicationConfiguration),i=o.json2xml({ReplicationConfiguration:n});i=(i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketReplication:function(e,t){h.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)}))},deleteBucketReplication:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var n=o.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=o.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var s=o.json2xml({WebsiteConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:s,action:"website",headers:a,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){h.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=n.WebsiteConfiguration||{};if(s.RoutingRules){var a=o.clone(s.RoutingRules.RoutingRule||[]);a=o.makeArray(a),s.RoutingRules=a}t(null,{WebsiteConfiguration:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var n=o.clone(e.RefererConfiguration||{}),i=n.DomainList||{},s=i.Domains||i.Domain||[];(s=o.isArray(s)?s:[s]).length&&(n.DomainList={Domain:s});var a=o.json2xml({RefererConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),h.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"referer",headers:r,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){h.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=n.RefererConfiguration||{};if(s.DomainList){var a=o.makeArray(s.DomainList.Domain||[]);s.DomainList={Domains:a}}t(null,{RefererConfiguration:s,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=o.clone(n);var i=o.json2xml({DomainConfiguration:{DomainRule:n}}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"domain",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketDomain:function(e,t){h.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(s){}i=o.clone(o.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketOrigin:function(e,t){var n=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];n=o.clone(n);var i=o.json2xml({OriginConfiguration:{OriginRule:n}}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"origin",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketOrigin:function(e,t){h.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(s){}i=o.clone(o.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLogging:function(e,t){var n=o.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=o.binaryBase64(o.md5(n)),h.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLogging:function(e,t){h.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging",tracker:e.tracker},(function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})}))},putBucketInventory:function(e,t){var n=o.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var s=n.Destination.COSBucketDestination.Encryption;Object.keys(s).indexOf("SSECOS")>-1&&(s["SSE-COS"]=s.SSECOS,delete s.SSECOS)}var a=o.json2xml({InventoryConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),h.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"inventory",qs:{id:e.Id},headers:r,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketInventory:function(e,t){h.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var s=i.OptionalFields.Field;o.isArray(s)||(s=[s]),i.OptionalFields=s}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var a=i.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSE-COS")>-1&&(a.SSECOS=a["SSE-COS"],delete a["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){h.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken},tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,s=i.InventoryConfiguration||[];s=o.isArray(s)?s:[s],delete i.InventoryConfiguration,o.each(s,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;o.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}})),i.InventoryConfigurations=s,o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))},deleteBucketInventory:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=o.json2xml(n),s={"Content-Type":"application/xml"};s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:s,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){h.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate",tracker:e.tracker},(function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)}))},getObject:function(e,t){if(this.options.ObjectKeySimplifyCheck&&"/"===o.simplifyPath(e.Key))t(o.error(new Error("The Getobject Key is illegal")));else{var n=e.Query||{},i=e.QueryString||"",s=e.tracker;s&&s.setParams({signStartTime:(new Date).getTime()}),n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,h.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0,dataType:e.DataType,tracker:s},(function(n,i){if(n){var s=n.statusCode;return e.Headers["If-Modified-Since"]&&s&&304===s?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:o.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})}))}},headObject:function(e,t){h.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},(function(n,i){if(n){var s=n.statusCode;return e.Headers["If-Modified-Since"]&&s&&304===s?t(null,{NotModified:!0,statusCode:s}):t(n)}i.ETag=o.attr(i.headers,"etag",""),t(null,i)}))},listObjectVersions:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,h.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},s=i.DeleteMarker||[];s=o.isArray(s)?s:[s];var a=i.Version||[];a=o.isArray(a)?a:[a];var r=o.clone(i);delete r.DeleteMarker,delete r.Version,o.extend(r,{DeleteMarkers:s,Versions:a,statusCode:n.statusCode,headers:n.headers}),t(null,r)}))},putObject:function(e,t){var n=this,i=e.ContentLength,a=o.throttleOnProgress.call(n,i,e.onProgress),r=e.Headers;r["Cache-Control"]||r["cache-control"]||(r["Cache-Control"]=""),r["Content-Type"]||r["content-type"]||(r["Content-Type"]=s.getType(e.Key)||"application/octet-stream");var u=e.UploadAddMetaMd5||n.options.UploadAddMetaMd5||n.options.UploadCheckContentMd5,l=e.tracker;u&&l&&l.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(u,e.Body,(function(s){s&&(l&&l.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(r["Content-MD5"]=o.binaryBase64(s)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(r["x-cos-meta-md5"]=s)),void 0!==e.ContentLength&&(r["Content-Length"]=e.ContentLength),a(null,!0),h.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:a,tracker:l},(function(s,r){if(s)return a(null,!0),t(s);a({loaded:i,total:i},!0);var u=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});u=u.substr(u.indexOf("://")+3),r.Location=u,r.ETag=o.attr(r.headers,"etag",""),t(null,r)}))}))},postObject:function(e,t){var n=this,i={},s=e.FilePath;if(s){for(var a in i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-forbid-overwrite"]=e.ForbidOverwrite,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"],e)a.indexOf("x-cos-meta-")>-1&&(i[a]=e[a]);var r=o.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);h.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:s,TaskId:e.TaskId,onProgress:r,tracker:e.tracker},(function(i,o){if(r(null,!0),i)return t(i);if(o&&o.headers){var a=o.headers,u=a.etag||a.Etag||a.ETag||"",l=s.substr(s.lastIndexOf("/")+1),d=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,l),isLocation:!0});return t(null,{Location:d,statusCode:o.statusCode,headers:a,ETag:u})}t(null,o)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){h.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,tracker:e.tracker},(function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){var n={};e.VersionId&&(n.versionId=e.VersionId),h.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:n,action:"acl",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},s=i.Owner||{},r=i.AccessControlList&&i.AccessControlList.Grant||[];r=o.isArray(r)?r:[r];var c=a(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:s,Grants:r,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var s=o.clone(e.AccessControlPolicy||{}),a=s.Grants||s.Grant;a=o.isArray(a)?a:[a],delete s.Grant,delete s.Grants,s.AccessControlList={Grant:a},i=o.json2xml({AccessControlPolicy:s}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=r(n[t]))})),h.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},optionsObject:function(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,h.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n,tracker:e.tracker},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=e.CopySource||"",s=o.getSourceParams.call(this,i);if(s){var a=s.Bucket,r=s.Region,c=decodeURIComponent(s.Key);h.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:r,prefix:c},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyObjectResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],i=e.Quiet;n=o.isArray(n)?n:[n];var s=o.json2xml({Delete:{Object:n,Quiet:i||!1}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(s));var r=o.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));h.call(this,{Scope:r,method:"POST",Bucket:e.Bucket,Region:e.Region,body:s,action:"delete",headers:a,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.DeleteResult||{},s=i.Deleted||[],a=i.Error||[];s=o.isArray(s)?s:[s],a=o.isArray(a)?a:[a];var r=o.clone(i);o.extend(r,{Error:a,Deleted:s,statusCode:n.statusCode,headers:n.headers}),t(null,r)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var i=e.RestoreRequest||{},s=o.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:s,action:"restore",headers:n,tracker:e.tracker},(function(e,n){t(e,n)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var s=o.json2xml({Tagging:{TagSet:{Tag:i}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:s,action:"tagging",headers:a,VersionId:e.VersionId,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectTagging:function(e,t){h.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId,tracker:e.tracker},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var s=[];try{s=n.Tagging.TagSet.Tag||[]}catch(a){}s=o.clone(o.isArray(s)?s:[s]),t(null,{Tags:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){h.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},appendObject:function(e,t){h.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,n)}))},uploadPartCopy:function(e,t){var n=e.CopySource||"",i=o.getSourceParams.call(this,n);if(i){var s=i.Bucket,a=i.Region,r=decodeURIComponent(i.Key);h.call(this,{Scope:[{action:"name/cos:GetObject",bucket:s,region:a,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyPartResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,i=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=s.getType(e.Key)||"application/octet-stream"),h.call(this,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:i},(function(e,n){return e?(i&&i.parent&&i.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=o.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,o.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;o.getFileSize("multipartUpload",e,(function(){var i=e.tracker,s=n.options.UploadCheckContentMd5;s&&i&&i.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(s,e.Body,(function(a){a&&(e.Headers["Content-MD5"]=o.binaryBase64(a),s&&i&&i.setParams({md5EndTime:(new Date).getTime()})),i&&i.setParams({partNumber:e.PartNumber}),h.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},(function(e,n){if(e)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:o.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,i=e.UploadId,s=e.Parts,a=e.tracker,r=0,u=s.length;r-1?(o=n.Authorization,r=o.match(/q-url-param-list.*?(?=&)/g)[0],c="q-url-param-list="+encodeURIComponent(r.replace(/q-url-param-list=/,"")).toLowerCase(),u=new RegExp(r,"g"),o.replace(u,c)):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),a&&(i+="&"+a),setTimeout((function(){t(null,{Url:i})}))}var o,r,c,u}));return p?(r+="?"+p.Authorization+(p.SecurityToken?"&x-cos-security-token="+p.SecurityToken:""),a&&(r+="&"+a)):a&&(r+="?"+a),r},getAuth:function(e){return o.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(f,"postObject"),t.transferToTaskMethod(f,"putObject"),o.each(f,(function(t,n){e.prototype[n]=o.apiWrapper(n,t)}))}},function(e,t){function n(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var i=function(e,t){var i,o,s,a=[],r=function(e,t){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(t?n(o).toLowerCase():o);return i.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(i=0;i-1||g.indexOf(f)>-1)&&(h[f]=e.headers[f]);s["x-cos-acl"]&&(h.acl=s["x-cos-acl"]),!h["Content-Type"]&&(h["Content-Type"]=""),(n=Pn.uploadFile({url:a,method:r,name:"file",header:s,filePath:o,formData:h,timeout:e.timeout,success:function(e){l(null,e)},fail:function(e){l(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var m=e.qs&&i(e.qs)||"";m&&(a+=(a.indexOf("?")>-1?"&":"?")+m),s["Content-Length"]&&delete s["Content-Length"];var _={url:a,method:r,header:s,dataType:"text",data:e.body,responseType:e.dataType||"text",timeout:e.timeout,redirect:"manual",success:function(e){l(null,e)},fail:function(e){l(e.errMsg,e)}};u&&Object.assign(_,{enableHttpDNS:!0,httpDNSServiceId:u}),n=Pn.request(_)}return n}},function(e,t,n){let i=n(29);e.exports=new i(n(30),n(31))},function(e,t,n){function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var c=s.call(r,"catchLoc"),l=s.call(r,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;R(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:M(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function s(e,t,n,i,o,s,r){try{var a=e[s](r),c=a.value}catch(l){return void n(l)}a.done?t(c):Promise.resolve(c).then(i,o)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(e){s(r,i,o,a,c,"next",e)}function c(e){s(r,i,o,a,c,"throw",e)}a(void 0)}))}}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n5&&"xml"===i)return f("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},o,t);const n=[];let c=!1,l=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)y+=e[o];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),o--),p=y,!i.isName(p)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",f("InvalidTag",t,g(e,o))}const b=u(e,o);if(!1===b)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",g(e,o));let x=b.value;if(o=b.index,"/"===x[x.length-1]){const n=o-x.length;x=x.substring(0,x.length-1);const i=d(x,t);if(!0!==i)return f(i.err.code,i.err.msg,g(e,n+i.err.line));c=!0}else if(v){if(!b.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",g(e,o));if(x.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",g(e,m));if(0===n.length)return f("InvalidTag","Closing tag '"+y+"' has not been opened.",g(e,m));{const t=n.pop();if(y!==t.tagName){let n=g(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+y+"'.",g(e,m))}0==n.length&&(l=!0)}}else{const i=d(x,t);if(!0!==i)return f(i.err.code,i.err.msg,g(e,o-x.length+i.err.line));if(!0===l)return f("InvalidXml","Multiple possible root nodes found.",g(e,o));-1!==t.unpairedTags.indexOf(y)||n.push({tagName:y,tagStartPos:m}),c=!0}for(o++;o0)||f("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const c='"',l="'";function u(e,t){let n="",i="",o=!1;for(;t"===e[t]&&""===i){o=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:o}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function d(e,t){const n=i.getAllMatches(e,p),o={};for(let i=0;i{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}},function(e,t){var n=function(e){var t={},n=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){n(e).push(t)},e.off=function(e,t){for(var i=n(e),o=i.length-1;o>=0;o--)t===i[o]&&i.splice(o,1)},e.emit=function(e,t){for(var i=n(e).map((function(e){return e})),o=0;o=0;n--){var o=i[n][2];(!o||o+2592e3=0;s--){var r=i[s];(r[0]===e&&r[1]===t||e!==r[0]&&0===r[0].indexOf(o))&&i.splice(s,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),l()}},removeUploadId:function(e){c(),delete u.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);l()}};e.exports=u},function(e,t,n){var i=n(9);e.exports=i},function(e,t,n){var i=n(0),o=n(6),s=n(25),r=n(26),a=n(32),c=n(3),l={SecretId:"",SecretKey:"",SecurityToken:"",StartTime:0,ExpiredTime:0,ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",AutoSwitchHost:!1,CopySourceParser:null,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},u=function(e){if(this.options=i.extend(i.clone(l),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");o.init(this),s.init(this)};r.init(u,s),a.init(u,s),u.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml,encodeBase64:i.encodeBase64},u.getAuthorization=i.getAuth,u.version=c.version,e.exports=u},function(e,t,n){(function(e){var t;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){var o="input is invalid type",s="object"===("undefined"==typeof window?"undefined":i(window)),r=s?window:{};r.JS_MD5_NO_WINDOW&&(s=!1),!s&&"object"===("undefined"==typeof self?"undefined":i(self))&&(r=self);var a,c=!r.JS_MD5_NO_COMMON_JS&&"object"===i(e)&&e.exports,l=n(12),u=!r.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],h=[0,8,16,24],f=["hex","array","digest","buffer","arrayBuffer","base64"],m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),g=[];if(u){var v=new ArrayBuffer(68);a=new Uint8Array(v),g=new Uint32Array(v)}!r.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!r.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===i(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t){return new b(!0).update(t)[e]()}};function b(e){if(e)g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g,this.buffer8=a;else if(u){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}b.prototype.update=function(e){if(!this.finalized){var t,n=i(e);if("string"!==n){if("object"!==n)throw o;if(null===e)throw o;if(!u||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw o}else e=new Uint8Array(e);t=!0}for(var s,r,a=0,c=e.length,l=this.blocks,p=this.buffer8;a>2]|=e[a]<>6,p[r++]=128|63&s):s<55296||s>=57344?(p[r++]=224|s>>12,p[r++]=128|s>>6&63,p[r++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),p[r++]=240|s>>18,p[r++]=128|s>>12&63,p[r++]=128|s>>6&63,p[r++]=128|63&s);else for(r=this.start;a>2]|=s<>2]|=(192|s>>6)<>2]|=(128|63&s)<=57344?(l[r>>2]|=(224|s>>12)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<>2]|=(240|s>>18)<>2]|=(128|s>>12&63)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<=64?(this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=d[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},b.prototype.hash=function(){var e,t,n,i,o,s,r=this.blocks;this.first?t=((t=((e=((e=r[0]-680876937)<<7|e>>>25)-271733879|0)^(n=((n=(-271733879^(i=((i=(-1732584194^2004318071&e)+r[1]-117830708)<<12|i>>>20)+e|0)&(-271733879^e))+r[2]-1126478375)<<17|n>>>15)+i|0)&(i^e))+r[3]-1316259209)<<22|t>>>10)+n|0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((i=this.h3)^t&(n^i))+r[0]-680876936)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[1]-389564586)<<12|i>>>20)+e|0)&(e^t))+r[2]+606105819)<<17|n>>>15)+i|0)&(i^e))+r[3]-1044525330)<<22|t>>>10)+n|0),t=((t+=((e=((e+=(i^t&(n^i))+r[4]-176418897)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[5]+1200080426)<<12|i>>>20)+e|0)&(e^t))+r[6]-1473231341)<<17|n>>>15)+i|0)&(i^e))+r[7]-45705983)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(i^t&(n^i))+r[8]+1770035416)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[9]-1958414417)<<12|i>>>20)+e|0)&(e^t))+r[10]-42063)<<17|n>>>15)+i|0)&(i^e))+r[11]-1990404162)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(i^t&(n^i))+r[12]+1804603682)<<7|e>>>25)+t|0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[13]-40341101)<<12|i>>>20)+e|0)&(e^t))+r[14]-1502002290)<<17|n>>>15)+i|0)&(i^e))+r[15]+1236535329)<<22|t>>>10)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[1]-165796510)<<5|e>>>27)+t|0)^t))+r[6]-1069501632)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+r[11]+643717713)<<14|n>>>18)+i|0)^i))+r[0]-373897302)<<20|t>>>12)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[5]-701558691)<<5|e>>>27)+t|0)^t))+r[10]+38016083)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+r[15]-660478335)<<14|n>>>18)+i|0)^i))+r[4]-405537848)<<20|t>>>12)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[9]+568446438)<<5|e>>>27)+t|0)^t))+r[14]-1019803690)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+r[3]-187363961)<<14|n>>>18)+i|0)^i))+r[8]+1163531501)<<20|t>>>12)+n|0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[13]-1444681467)<<5|e>>>27)+t|0)^t))+r[2]-51403784)<<9|i>>>23)+e|0)^e&((n=((n+=(e^t&(i^e))+r[7]+1735328473)<<14|n>>>18)+i|0)^i))+r[12]-1926607734)<<20|t>>>12)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[5]-378558)<<4|e>>>28)+t|0))+r[8]-2022574463)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+r[11]+1839030562)<<16|n>>>16)+i|0))+r[14]-35309556)<<23|t>>>9)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[1]-1530992060)<<4|e>>>28)+t|0))+r[4]+1272893353)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+r[7]-155497632)<<16|n>>>16)+i|0))+r[10]-1094730640)<<23|t>>>9)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[13]+681279174)<<4|e>>>28)+t|0))+r[0]-358537222)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+r[3]-722521979)<<16|n>>>16)+i|0))+r[6]+76029189)<<23|t>>>9)+n|0,t=((t+=((s=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[9]-640364487)<<4|e>>>28)+t|0))+r[12]-421815835)<<11|i>>>21)+e|0)^e)^(n=((n+=(s^t)+r[15]+530742520)<<16|n>>>16)+i|0))+r[2]-995338651)<<23|t>>>9)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[0]-198630844)<<6|e>>>26)+t|0)|~n))+r[7]+1126891415)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+r[14]-1416354905)<<15|n>>>17)+i|0)|~e))+r[5]-57434055)<<21|t>>>11)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[12]+1700485571)<<6|e>>>26)+t|0)|~n))+r[3]-1894986606)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+r[10]-1051523)<<15|n>>>17)+i|0)|~e))+r[1]-2054922799)<<21|t>>>11)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[8]+1873313359)<<6|e>>>26)+t|0)|~n))+r[15]-30611744)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+r[6]-1560198380)<<15|n>>>17)+i|0)|~e))+r[13]+1309151649)<<21|t>>>11)+n|0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[4]-145523070)<<6|e>>>26)+t|0)|~n))+r[11]-1120210379)<<10|i>>>22)+e|0)^((n=((n+=(e^(i|~t))+r[2]+718787259)<<15|n>>>17)+i|0)|~e))+r[9]-343485551)<<21|t>>>11)+n|0,this.first?(this.h0=e+1732584193|0,this.h1=t-271733879|0,this.h2=n-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+e|0,this.h1=this.h1+t|0,this.h2=this.h2+n|0,this.h3=this.h3+i|0)},b.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15]+p[t>>4&15]+p[15&t]+p[t>>12&15]+p[t>>8&15]+p[t>>20&15]+p[t>>16&15]+p[t>>28&15]+p[t>>24&15]+p[n>>4&15]+p[15&n]+p[n>>12&15]+p[n>>8&15]+p[n>>20&15]+p[n>>16&15]+p[n>>28&15]+p[n>>24&15]+p[i>>4&15]+p[15&i]+p[i>>12&15]+p[i>>8&15]+p[i>>20&15]+p[i>>16&15]+p[i>>28&15]+p[i>>24&15]},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},b.prototype.buffer=b.prototype.arrayBuffer,b.prototype.base64=function(){for(var e,t,n,i="",o=this.array(),s=0;s<15;)e=o[s++],t=o[s++],n=o[s++],i+=m[e>>>2]+m[63&(e<<4|t>>>4)]+m[63&(t<<2|n>>>6)]+m[63&n];return e=o[s],i+(m[e>>>2]+m[e<<4&63]+"==")};var x=function(){var e=y("hex");e.getCtx=e.create=function(){return new b},e.update=function(t){return e.create().update(t)};for(var t=0;t>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new s.init(n,t/2)}},c=r.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new s.init(n,t)}},l=r.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},u=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,r=this.blockSize,a=o/(4*r);if(t=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*r,o=e.min(4*t,o),t){for(var c=0;cl;l++){if(16>l)s[l]=0|e[t+l];else{var u=s[l-3]^s[l-8]^s[l-14]^s[l-16];s[l]=u<<1|u>>>31}u=(i<<5|i>>>27)+c+s[l],u=20>l?u+(1518500249+(o&r|~o&a)):40>l?u+(1859775393+(o^r^a)):60>l?u+((o&r|o&a|r&a)-1894007588):u+((o^r^a)-899497514),c=a,a=r,r=o<<30|o>>>2,o=i,i=u}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(r),n.HmacSHA1=o._createHmacHelper(r),u=(l=p).enc.Utf8,l.algo.HMAC=l.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=u.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),r=o.words,a=s.words,c=0;c>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a>>6*(3-a)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var o=e.indexOf(i);-1!=o&&(t=o)}for(var s=[],r=0,a=0;a>>6-a%4*2;s[r>>>2]|=(l|u)<<24-r%4*8,r++}return c.create(s,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=p},function(e,t){var n,i,o,s,r,a,c,l,u,p,d,h,f,m,g,v,y,b,x,S=(i=(n=n||{}).Base64,s=function(e){for(var t={},n=0,i=e.length;n>>6)+r(128|63&t):r(224|t>>>12&15)+r(128|t>>>6&63)+r(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return r(240|t>>>18&7)+r(128|t>>>12&63)+r(128|t>>>6&63)+r(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(e){return e.replace(c,a)},u=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),t>=2?"=":o.charAt(n>>>6&63),t>=1?"=":o.charAt(63&n)].join("")},p=n.btoa?function(e){return n.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,u)},d=function(e){return p(l(e))},h=function(e,t){return t?d(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):d(String(e))},f=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),m=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return r(55296+(t>>>10))+r(56320+(1023&t));case 3:return r((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return r((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},g=function(e){return e.replace(f,m)},v=function(e){var t=e.length,n=t%4,i=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),o=[r(i>>>16),r(i>>>8&255),r(255&i)];return o.length-=[0,0,2,1][n],o.join("")},y=n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/[\s\S]{1,4}/g,v)},b=function(e){return g(y(e))},{VERSION:"2.1.9",atob:y,btoa:p,fromBase64:x=function(e){return b(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},toBase64:h,utob:l,encode:h,encodeURI:function(e){return h(e,!0)},btou:g,decode:x,noConflict:function(){var e=n.Base64;return n.Base64=i,e}});e.exports=S},function(e,t,n){const i=n(4),o=n(16),s=n(23);e.exports={XMLParser:o,XMLValidator:i,XMLBuilder:s}},function(e,t,n){const{buildOptions:i}=n(17),o=n(18),{prettify:s}=n(22),r=n(4);e.exports=class{constructor(e){this.externalEntities={},this.options=i(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=r.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new o(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||void 0===i?i:s(i,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},function(e,t){const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},function(e,t,n){const i=n(1),o=n(19),s=n(20),r=n(21),a=n(5);function c(e){const t=Object.keys(e);for(let n=0;n0)){r||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,o,s);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?S(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const p=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=i.getAllMatches(e,p),o=n.length,s={};for(let e=0;e",a,"Closing Tag is not closed.");let o=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,r));const s=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(c=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=r.lastIndexOf("."),r=r.substring(0,c),n=this.tagsNodeStack.pop(),i="",a=t}else if("?"===e[a+1]){let t=b(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new o(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,r,t.tagName)),this.addChild(n,e,r)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=y(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(a+4,t-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}a=t}else if("!D"===e.substr(a+1,2)){const t=s(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=y(e,"]]>",a,"CDATA is not closed.")-2,o=e.substring(a+9,t);i=this.saveTextToParentTag(i,n,r);let s=this.parseTextData(o,n.tagname,r,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,s),a=t+2}else{let s=b(e,a,this.options.removeNSPrefix),c=s.tagName;const l=s.rawTagName;let u=s.tagExp,p=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const h=n;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(n=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),c!==t.tagname&&(r+=r?"."+c:c),this.isItStopNode(this.options.stopNodes,r,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),r=r.substr(0,r.length-1),u=c):u=u.substr(0,u.length-1),a=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=s.closeIndex;else{const n=this.readStopNodeData(e,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);a=n.i,t=n.tagContent}const i=new o(c);c!==u&&p&&(i[":@"]=this.buildAttributesMap(u,r,c)),t&&(t=this.parseTextData(t,c,r,!0,p,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(n,i,r)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),r=r.substr(0,r.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new o(c);c!==u&&p&&(e[":@"]=this.buildAttributesMap(u,r,c)),this.addChild(n,e,r),r=r.substr(0,r.lastIndexOf("."))}else{const e=new o(c);this.tagsNodeStack.push(n),c!==u&&p&&(e[":@"]=this.buildAttributesMap(u,r,c)),this.addChild(n,e,r),n=e}i="",a=d}}else i+=e[a];return t.child};function f(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const m=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function g(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function v(e,t,n){const i="*."+n;for(const o in e){const n=e[o];if(i===n||t===n)return!0}return!1}function y(e,t,n,i){const o=e.indexOf(t,n);if(-1===o)throw new Error(i);return o+t.length-1}function b(e,t,n,i=">"){const o=function(e,t,n=">"){let i,o="";for(let s=t;s",n,`${t} is not closed`);if(e.substring(n+2,s).trim()===t&&(o--,0===o))return{tagContent:e.substring(i,n),i:s};n=s}else if("?"===e[n+1])n=y(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=y(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=y(e,"]]>",n,"StopNode is not closed.")-2;else{const i=b(e,n,">");i&&((i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&o++,n=i.closeIndex)}}function S(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&r(e,n)}return i.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=c,this.parseXml=h,this.parseTextData=l,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=v,this.replaceEntitiesValue=m,this.readStopNodeData=x,this.saveTextToParentTag=g,this.addChild=f,this.ignoreAttributesFn=a(this.options.ignoreAttributes)}}},function(e,t,n){e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},function(e,t,n){const i=n(1);function o(e,t){let n="";for(;t"===e[t]){if(d?"-"===e[t-1]&&"-"===e[t-2]&&(d=!1,i--):i--,0===i)break}else"["===e[t]?p=!0:h+=e[t];else{if(p&&r(e,t))t+=7,[entityName,val,t]=o(e,t+1),-1===val.indexOf("&")&&(n[u(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(p&&a(e,t))t+=8;else if(p&&c(e,t))t+=8;else if(p&&l(e,t))t+=9;else{if(!s)throw new Error("Invalid DOCTYPE");d=!0}i++,h=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},function(e,t){const n=/^[-+]?0x[a-fA-F0-9]+$/,i=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const o={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,t={}){if(t=Object.assign({},o,t),!e||"string"!=typeof e)return e;let s=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(s))return e;if(t.hex&&n.test(s))return Number.parseInt(s,16);{const n=i.exec(s);if(n){const i=n[1],o=n[2];let a=(r=n[3])&&-1!==r.indexOf(".")?("."===(r=r.replace(/0+$/,""))?r="0":"."===r[0]?r="0"+r:"."===r[r.length-1]&&(r=r.substr(0,r.length-1)),r):r;const c=n[4]||n[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==s[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==s[1])return e;{const n=Number(s),r=""+n;return-1!==r.search(/[eE]/)||c?t.eNotation?n:e:-1!==s.indexOf(".")?"0"===r&&""===a||r===a||i&&r==="-"+a?n:e:o?a===r||i+a===r?n:e:s===r||s===i+r?n:e}}return e}var r}},function(e,t,n){function i(e,t,n){let a;const c={};for(let l=0;l0&&(c[t.textNodeName]=a):void 0!==a&&(c[t.textNodeName]=a),c}function o(e){const t=Object.keys(e);for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(e){this.options=Object.assign({},s,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=o(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=a,this.options.format?(this.indentate=c,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(e,t,n,i){const o=this.j2x(e,n+1,i.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,n):this.buildObjectNode(o.val,t,o.attrStr,n)}function c(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}r.prototype.build=function(e){return this.options.preserveOrder?i(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},r.prototype.j2x=function(e,t,n){let i="",o="";const s=n.join(".");for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(void 0===e[r])this.isAttribute(r)&&(o+="");else if(null===e[r])this.isAttribute(r)?o+="":"?"===r[0]?o+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)o+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const n=this.isAttribute(r);if(n&&!this.ignoreAttributesFn(n,s))i+=this.buildAttrPairStr(n,""+e[r]);else if(!n)if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);o+=this.replaceEntitiesValue(t)}else o+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const i=e[r].length;let s="",a="";for(let c=0;c"+e+o}},r.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+o+"0&&this.options.processEntities)for(let t=0;t`,u=!1;continue}if(h===t.commentPropName){l+=c+`\x3c!--${d[h][0][t.textNodeName]}--\x3e`,u=!0;continue}if("?"===h[0]){const e=o(d[":@"],t),n="?xml"===h?"":c;let i=d[h][0][t.textNodeName];i=0!==i.length?" "+i:"",l+=n+`<${h}${i}${e}?>`,u=!0;continue}let m=c;""!==m&&(m+=t.indentBy);const g=c+`<${h}${o(d[":@"],t)}`,v=n(d[h],t,f,m);-1!==t.unpairedTags.indexOf(h)?t.suppressUnpairedNode?l+=g+">":l+=g+"/>":v&&0!==v.length||!t.suppressEmptyNode?v&&v.endsWith(">")?l+=g+`>${v}${c}`:(l+=g+">",v&&""!==c&&(v.includes("/>")||v.includes("`):l+=g+"/>",u=!0}return l}function i(e){const t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n0&&(i="\n"),n(e,t,"",i)}},function(e,t,n){var i=n(7),o=n(0),s={};e.exports.transferToTaskMethod=function(e,t){s[t]=e[t],e[t]=function(e,n){e.SkipTask?s[t].call(this,e,n):this._addTask(t,e,n)}},e.exports.init=function(e){var t,n,r=[],a={},c=0,l=0,u=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},p=(n=function(){t=0,e.emit("task-list-update",{list:o.map(r,u)}),e.emit("list-update",{list:o.map(r,u)})},function(){t||(t=setTimeout(n))}),d=function(){if(!(r.length<=e.options.UploadQueueSize)){for(var t=0;te.options.UploadQueueSize;){var n="waiting"===r[t].state||"checking"===r[t].state||"uploading"===r[t].state;r[t]&&n?t++:(a[r[t].id]&&delete a[r[t].id],r.splice(t,1),l--)}p()}},h=function t(){if(!(c>=e.options.FileParallelLimit)){for(;r[l]&&"waiting"!==r[l].state;)l++;if(!(l>=r.length)){var n=r[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(u(n)),!n.params.UploadData&&(n.params.UploadData={});var i=o.formatParams(n.api,n.params);s[n.api].call(e,i,(function(i,o){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=i?"error":"success",i&&(n.error=i),c--,p(),t(),n.callback&&n.callback(i,o),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),p(),setTimeout(t)}}},f=function(t,n){var o=a[t];if(o){var s=o&&"waiting"===o.state,r=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===n&&"canceled"!==o.state||"paused"===n&&s||"paused"===n&&r){if("paused"===n&&o.params.Body&&"function"==typeof o.params.Body.pipe)return;o.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=o&&o.params&&o.params.UploadData.UploadId}catch(u){}"canceled"===n&&l&&i.removeUsing(l),p(),r&&(c--,h()),"canceled"===n&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}d()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),p()},e._addTask=function(t,n,i,s){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||o.canFileSlice()||(t=c),n=o.formatParams(t,n);var l=o.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var u={params:n,callback:i,api:t,index:r.length,id:l,Bucket:n.Bucket,Region:n.Region,Key:n.Key,FilePath:n.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},f=n.onHashProgress;n.onHashProgress=function(t){e._isRunningTask(u.id)&&(u.hashPercent=t.percent,f&&f(t),p())};var m=n.onProgress;return n.onProgress=function(t){e._isRunningTask(u.id)&&("checking"===u.state&&(u.state="uploading"),u.loaded=t.loaded,u.size=t.total,u.speed=t.speed,u.percent=t.percent,m&&m(t),p())},o.getFileSize(t,n,(function(e,t){e?i(e):(a[l]=u,r.push(u),u.size=t,!s&&p(),h(),d())})),l},e._isRunningTask=function(e){var t=a[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(r,u)},e.cancelTask=function(e){f(e,"canceled")},e.pauseTask=function(e){f(e,"paused")},e.restartTask=function(e){var t=a[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",p(),l=Math.min(l,t.index),h())},e.isUploadRunning=function(){return c||l-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(s="{Bucket}."+s)),s=(s=s.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,r).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,r).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(s)||(s="https://"+s),"/"===s.slice(-1)&&(s=s.slice(0,-1));var c=s;return e.ForcePathStyle&&(c+="/"+t),c+="/",a&&(c+=o.camSafeUrlEncode(a).replace(/%2F/g,"/")),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}var l=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate;return(e.Url||c({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1")};function u(e,t){var n=o.clone(e.Headers),i="";o.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)}));var s=!1!==e.ForceSignHost;!i&&e.SignHost&&s&&(n.Host=e.SignHost);var r=!1,a=function(e,n){r||(r=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=o.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",u=e.Region||"",p="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(p=l+"/"+p);var d="/"+p,h={},f=e.Scope;if(!f){var m=e.Action||"",g=e.ResourceKey||e.Key||"";f=e.Scope||[{action:m,bucket:l,region:u,prefix:g}]}var v=o.md5(JSON.stringify(f));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var n=Math.round(o.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===v){h=t;break}}}();var y=function(){var t="";h.StartTime&&e.Expires?t=h.StartTime+";"+(h.StartTime+1*e.Expires):h.StartTime&&h.ExpiredTime&&(t=h.StartTime+";"+h.ExpiredTime);var i={Authorization:o.getAuth({SecretId:h.TmpSecretId,SecretKey:h.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:s}),SecurityToken:h.SecurityToken||h.XCosSecurityToken||"",Token:h.Token||"",ClientIP:h.ClientIP||"",ClientUA:h.ClientUA||"",SignFrom:"client"};a(null,i)},b=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{(n=atob(n)).indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(i){}if(!t)return o.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(h.ExpiredTime&&h.ExpiredTime-o.getSkewTime(c.options.SystemClockOffset)/1e3>60)y();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:u,Method:e.Method,Key:p,Pathname:d,Query:e.Query,Headers:n,Scope:f,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:s},(function(e){"string"==typeof e&&(e={Authorization:e});var t=b(e);if(t)return a(t);e.Authorization?a(null,e):((h=e||{}).Scope=f,h.ScopeKey=v,c._StsCache.push(h),y())}));else{if(!c.options.getSTS)return function(){var t="";if(c.options.StartTime&&e.Expires){if(10!==c.options.StartTime.toString().length)return a(o.error(new Error('params "StartTime" should be 10 digits')));t=c.options.StartTime+";"+(c.options.StartTime+1*e.Expires)}else if(c.options.StartTime&&c.options.ExpiredTime){if(10!==c.options.StartTime.toString().length)return a(o.error(new Error('params "StartTime" should be 10 digits')));if(10!==c.options.ExpiredTime.toString().length)return a(o.error(new Error('params "ExpiredTime" should be 10 digits')));t=c.options.StartTime+";"+1*c.options.ExpiredTime}var i={Authorization:o.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,KeyTime:t,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:s}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken,SignFrom:"client"};return a(null,i),i}();c.options.getSTS.call(c,{Bucket:l,Region:u},(function(e){(h=e||{}).Scope=f,h.ScopeKey=v,h.TmpSecretId||(h.TmpSecretId=h.SecretId),h.TmpSecretKey||(h.TmpSecretKey=h.SecretKey);var t=b(h);if(t)return a(t);c._StsCache.push(h),y()}))}return""}function p(e){var t=this,n=!1,i=!1,s=!1,r=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,c=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===c)&&(s=!0)}catch(d){}if(e){if(s&&r){var l=Date.parse(r);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-l)>=3e4&&(this.options.SystemClockOffset=l-Date.now(),n=!0)}else{if(5===Math.floor(e.statusCode/100))return{canRetry:!0,networkError:!1};if("timeout"===e.message)return{canRetry:!0,networkError:t.options.AutoSwitchHost}}if(e.statusCode){var u=Math.floor(e.statusCode/100),p=(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]);[3,4,5].includes(u)&&!p&&(n=t.options.AutoSwitchHost,i=!0)}else n=!0,i=t.options.AutoSwitchHost}return{canRetry:n,networkError:i}}function d(e){var t=e.requestUrl,n=e.clientCalcSign,i=e.networkError;return!!this.options.AutoSwitchHost&&!!t&&!!n&&!!i&&/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function h(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=o.clearKey(e.qs),e.headers&&(e.headers=o.clearKey(e.headers)),e.qs&&(e.qs=o.clearKey(e.qs));var i=o.clone(e.qs);e.action&&(i[e.action]="");var s=e.url||e.Url,r=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:s}),a=e.tracker;!function o(s){var c=n.options.SystemClockOffset;e.SwitchHost&&(r=r.replace(/myqcloud.com/,"tencentcos.cn")),a&&a.setParams({signStartTime:(new Date).getTime(),httpRetryTimes:s-1}),u.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:r,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(i,r){i?t(i):(a&&a.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=r,f.call(n,e,(function(i,l){var u=!1,h=!1;if(i){var f=p.call(n,i);u=f.canRetry||c!==n.options.SystemClockOffset,h=f.networkError}if(a&&a.setParams({httpEndTime:(new Date).getTime()}),i&&s<4&&u){e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]);var m=d.call(n,{requestUrl:(null==i?void 0:i.url)||"",clientCalcSign:"client"===(null==r?void 0:r.SignFrom),networkError:h});e.SwitchHost=m,e.headers["x-cos-sdk-retry"]="true",o(s+1)}else t(i,l)})))}))}(1)}function f(e,t){var n=this,s=e.TaskId;if(!s||n._isRunningTask(s)){var r=e.Bucket,a=e.Region,l=e.Key,u=e.method||"GET",p=e.url||e.Url,d=e.body,h=e.json,f=e.rawBody,m=e.dataType,g=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(a="accelerate"),p=p||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:r,region:a,object:l}),e.SwitchHost&&(p=p.replace(/myqcloud.com/,"tencentcos.cn"));var v=l?p:"";e.action&&(p=p+"?"+e.action),e.qsStr&&(p=p.indexOf("?")>-1?p+"&"+e.qsStr:p+"?"+e.qsStr);var y={method:u,url:p,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:h,httpDNSServiceId:g,dataType:m},b="x-cos-security-token";o.isCIHost(p)&&(b="x-ci-security-token"),y.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(y.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(y.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(y.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(y.headers[b]=e.AuthData.SecurityToken),y.headers&&(y.headers=o.clearKey(y.headers)),y=o.clearKey(y),e.onProgress&&"function"==typeof e.onProgress&&(y.onProgress=function(t){if(!s||n._isRunningTask(s)){var i=t?t.loaded:0;e.onProgress({loaded:i,total:t.total})}}),this.options.Timeout&&(y.timeout=this.options.Timeout),n.options.ForcePathStyle&&(y.pathStyle=n.options.ForcePathStyle),n.emit("before-send",y);var x,S=y.url.includes("accelerate."),k=y.qs?Object.keys(y.qs).map((function(e){return"".concat(e,"=").concat(y.qs[e])})).join("&"):"",C=k?y.url+"?"+k:y.url;e.tracker&&(e.tracker.setParams({url:C,httpMethod:y.method,accelerate:S,httpSize:(null===(x=y.body)||void 0===x?void 0:x.size)||0}),e.tracker.parent&&!e.tracker.parent.params.url&&e.tracker.parent.setParams({url:v,accelerate:S}));var w=i(y,(function(e,i,r){if("abort"!==e){var a,c=function(e,r){if(s&&n.off("inner-kill-task",E),!a){a=!0;var c={};i&&i.statusCode&&(c.statusCode=i.statusCode),i&&i.headers&&(c.headers=i.headers),e?(y.url&&(c.url=y.url),y.method&&(c.method=y.method),e=o.extend(e||{},c),t(e,null)):(r=o.extend(r||{},c),t(null,r)),w=null}};if(e)c({error:e});else{var l=i.statusCode,u=2===Math.floor(l/100);if(f){if(u)return c(null,{body:r});if(r instanceof ArrayBuffer){var p=o.arrayBufferToString(r),d=o.parseResBody(p);return c({error:d.Error||d})}}var h=o.parseResBody(r);u?h.Error?c({error:h.Error}):c(null,h):c({error:h.Error||h})}}})),E=function e(t){t.TaskId===s&&(w&&w.abort&&w.abort(),n.off("inner-kill-task",e))};s&&n.on("inner-kill-task",E)}}var m={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n="https:",i=this.options.ServiceDomain,s=e.Region;i?(i=i.replace(/\{\{Region\}\}/gi,s||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(i)||(i=n+"//"+i),"/"===i.slice(-1)&&(i=i.slice(0,-1))):i=s?n+"//cos."+s+".myqcloud.com":n+"//service.cos.myqcloud.com",i.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),h.call(this,{Action:"name/cos:GetService",url:i,method:"GET",headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=o.isArray(i)?i:[i];var s=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:s,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,i="";if(e.BucketAZConfig){var s={BucketAZConfig:e.BucketAZConfig};i=o.json2xml({CreateBucketConfiguration:s})}h.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i,tracker:e.tracker},(function(i,o){if(i)return t(i);var s=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:s,statusCode:o.statusCode,headers:o.headers})}))},headBucket:function(e,t){h.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD",tracker:e.tracker},(function(e,n){t(e,n)}))},getBucket:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,h.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},s=i.Contents||[],r=i.CommonPrefixes||[];s=o.isArray(s)?s:[s],r=o.isArray(r)?r:[r];var a=o.clone(i);o.extend(a,{Contents:s,CommonPrefixes:r,statusCode:n.statusCode,headers:n.headers}),t(null,a)}))},deleteBucket:function(e,t){h.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var s=o.clone(e.AccessControlPolicy||{}),r=s.Grants||s.Grant;r=o.isArray(r)?r:[r],delete s.Grant,delete s.Grants,s.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:s}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=a(n[t]))})),h.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){h.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},s=i.Owner||{},a=i.AccessControlList.Grant||[];a=o.isArray(a)?a:[a];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:s,Grants:a,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putBucketCors:function(e,t){var n=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];n=o.clone(o.isArray(n)?n:[n]),o.each(n,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=o.isArray(i)?i:[i]}))}));var i={CORSRule:n};e.ResponseVary&&(i.ResponseVary=e.ResponseVary);var s=o.json2xml({CORSConfiguration:i}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:s,action:"cors",headers:r,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){h.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=n.CORSConfiguration||{},r=s.CORSRules||s.CORSRule||[];r=o.clone(o.isArray(r)?r:[r]);var a=s.ResponseVary;o.each(r,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=o.isArray(i)?i:[i]}))})),t(null,{CORSRules:r,ResponseVary:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},getBucketLocation:function(e,t){h.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location",tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,n)}))},getBucketPolicy:function(e,t){h.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0,tracker:e.tracker},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t({ErrorStatus:"Access Denied"}):e.statusCode&&405===e.statusCode?t({ErrorStatus:"Method Not Allowed"}):e.statusCode&&404===e.statusCode?t({ErrorStatus:"Policy Not Found"}):t(e);var i={};try{i=JSON.parse(n.body)}catch(o){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(r){t({error:"Policy format error"})}var s=e.Headers;s["Content-Type"]="application/json",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:s,json:!0,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},deleteBucketPolicy:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},putBucketTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var s=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:s,action:"tagging",headers:r,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketTagging:function(e,t){h.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var s=[];try{s=n.Tagging.TagSet.Tag||[]}catch(r){}s=o.clone(o.isArray(s)?s:[s]),t(null,{Tags:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLifecycle:function(e,t){var n=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];n=o.clone(n);var i=o.json2xml({LifecycleConfiguration:{Rule:n}}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"lifecycle",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLifecycle:function(e,t){h.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=[];try{s=n.LifecycleConfiguration.Rule||[]}catch(r){}s=o.clone(o.isArray(s)?s:[s]),t(null,{Rules:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var n=e.VersioningConfiguration||{},i=o.json2xml({VersioningConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){h.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning",tracker:e.tracker},(function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)}))},putBucketReplication:function(e,t){var n=o.clone(e.ReplicationConfiguration),i=o.json2xml({ReplicationConfiguration:n});i=(i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketReplication:function(e,t){h.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)}))},deleteBucketReplication:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var n=o.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=o.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var s=o.json2xml({WebsiteConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:s,action:"website",headers:r,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){h.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=n.WebsiteConfiguration||{};if(s.RoutingRules){var r=o.clone(s.RoutingRules.RoutingRule||[]);r=o.makeArray(r),s.RoutingRules=r}t(null,{WebsiteConfiguration:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var n=o.clone(e.RefererConfiguration||{}),i=n.DomainList||{},s=i.Domains||i.Domain||[];(s=o.isArray(s)?s:[s]).length&&(n.DomainList={Domain:s});var r=o.json2xml({RefererConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(r)),h.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"referer",headers:a,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){h.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer",tracker:e.tracker},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var s=n.RefererConfiguration||{};if(s.DomainList){var r=o.makeArray(s.DomainList.Domain||[]);s.DomainList={Domains:r}}t(null,{RefererConfiguration:s,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=o.clone(n);var i=o.json2xml({DomainConfiguration:{DomainRule:n}}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"domain",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketDomain:function(e,t){h.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(s){}i=o.clone(o.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketOrigin:function(e,t){var n=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];n=o.clone(n);var i=o.json2xml({OriginConfiguration:{OriginRule:n}}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"origin",headers:s,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketOrigin:function(e,t){h.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(s){}i=o.clone(o.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLogging:function(e,t){var n=o.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=o.binaryBase64(o.md5(n)),h.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLogging:function(e,t){h.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging",tracker:e.tracker},(function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})}))},putBucketInventory:function(e,t){var n=o.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var s=n.Destination.COSBucketDestination.Encryption;Object.keys(s).indexOf("SSECOS")>-1&&(s["SSE-COS"]=s.SSECOS,delete s.SSECOS)}var r=o.json2xml({InventoryConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(r)),h.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"inventory",qs:{id:e.Id},headers:a,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketInventory:function(e,t){h.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var s=i.OptionalFields.Field;o.isArray(s)||(s=[s]),i.OptionalFields=s}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var r=i.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){h.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken},tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,s=i.InventoryConfiguration||[];s=o.isArray(s)?s:[s],delete i.InventoryConfiguration,o.each(s,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;o.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}})),i.InventoryConfigurations=s,o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))},deleteBucketInventory:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=o.json2xml(n),s={"Content-Type":"application/xml"};s["Content-MD5"]=o.binaryBase64(o.md5(i)),h.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:s,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){h.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate",tracker:e.tracker},(function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)}))},getObject:function(e,t){if(this.options.ObjectKeySimplifyCheck&&"/"===o.simplifyPath(e.Key))t(o.error(new Error("The Getobject Key is illegal")));else{var n=e.Query||{},i=e.QueryString||"",s=e.tracker;s&&s.setParams({signStartTime:(new Date).getTime()}),n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,h.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0,dataType:e.DataType,tracker:s},(function(n,i){if(n){var s=n.statusCode;return e.Headers["If-Modified-Since"]&&s&&304===s?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:o.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})}))}},headObject:function(e,t){h.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},(function(n,i){if(n){var s=n.statusCode;return e.Headers["If-Modified-Since"]&&s&&304===s?t(null,{NotModified:!0,statusCode:s}):t(n)}i.ETag=o.attr(i.headers,"etag",""),t(null,i)}))},listObjectVersions:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,h.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},s=i.DeleteMarker||[];s=o.isArray(s)?s:[s];var r=i.Version||[];r=o.isArray(r)?r:[r];var a=o.clone(i);delete a.DeleteMarker,delete a.Version,o.extend(a,{DeleteMarkers:s,Versions:r,statusCode:n.statusCode,headers:n.headers}),t(null,a)}))},putObject:function(e,t){var n=this,i=e.ContentLength,r=o.throttleOnProgress.call(n,i,e.onProgress),a=e.Headers;a["Cache-Control"]||a["cache-control"]||(a["Cache-Control"]=""),a["Content-Type"]||a["content-type"]||(a["Content-Type"]=s.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||n.options.UploadAddMetaMd5||n.options.UploadCheckContentMd5,u=e.tracker;l&&u&&u.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(l,e.Body,(function(s){s&&(u&&u.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(a["Content-MD5"]=o.binaryBase64(s)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(a["x-cos-meta-md5"]=s)),void 0!==e.ContentLength&&(a["Content-Length"]=e.ContentLength),r(null,!0),h.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:r,tracker:u},(function(s,a){if(s)return r(null,!0),t(s);r({loaded:i,total:i},!0);var l=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),a.Location=l,a.ETag=o.attr(a.headers,"etag",""),t(null,a)}))}))},postObject:function(e,t){var n=this,i={},s=e.FilePath;if(s){for(var r in i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-forbid-overwrite"]=e.ForbidOverwrite,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"],e)r.indexOf("x-cos-meta-")>-1&&(i[r]=e[r]);var a=o.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);h.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:s,TaskId:e.TaskId,onProgress:a,tracker:e.tracker},(function(i,o){if(a(null,!0),i)return t(i);if(o&&o.headers){var r=o.headers,l=r.etag||r.Etag||r.ETag||"",u=s.substr(s.lastIndexOf("/")+1),p=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,u),isLocation:!0});return t(null,{Location:p,statusCode:o.statusCode,headers:r,ETag:l})}t(null,o)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){h.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,tracker:e.tracker},(function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){var n={};e.VersionId&&(n.versionId=e.VersionId),h.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:n,action:"acl",tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},s=i.Owner||{},a=i.AccessControlList&&i.AccessControlList.Grant||[];a=o.isArray(a)?a:[a];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:s,Grants:a,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var s=o.clone(e.AccessControlPolicy||{}),r=s.Grants||s.Grant;r=o.isArray(r)?r:[r],delete s.Grant,delete s.Grants,s.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:s}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=a(n[t]))})),h.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},optionsObject:function(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,h.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n,tracker:e.tracker},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=e.CopySource||"",s=o.getSourceParams.call(this,i);if(s){var r=s.Bucket,a=s.Region,c=decodeURIComponent(s.Key);h.call(this,{Scope:[{action:"name/cos:GetObject",bucket:r,region:a,prefix:c},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyObjectResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],i=e.Quiet;n=o.isArray(n)?n:[n];var s=o.json2xml({Delete:{Object:n,Quiet:i||!1}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(s));var a=o.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));h.call(this,{Scope:a,method:"POST",Bucket:e.Bucket,Region:e.Region,body:s,action:"delete",headers:r,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=n.DeleteResult||{},s=i.Deleted||[],r=i.Error||[];s=o.isArray(s)?s:[s],r=o.isArray(r)?r:[r];var a=o.clone(i);o.extend(a,{Error:r,Deleted:s,statusCode:n.statusCode,headers:n.headers}),t(null,a)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var i=e.RestoreRequest||{},s=o.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:s,action:"restore",headers:n,tracker:e.tracker},(function(e,n){t(e,n)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var s=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(s)),h.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:s,action:"tagging",headers:r,VersionId:e.VersionId,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectTagging:function(e,t){h.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId,tracker:e.tracker},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var s=[];try{s=n.Tagging.TagSet.Tag||[]}catch(r){}s=o.clone(o.isArray(s)?s:[s]),t(null,{Tags:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){h.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId,tracker:e.tracker},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},appendObject:function(e,t){h.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);t(null,n)}))},uploadPartCopy:function(e,t){var n=e.CopySource||"",i=o.getSourceParams.call(this,n);if(i){var s=i.Bucket,r=i.Region,a=decodeURIComponent(i.Key);h.call(this,{Scope:[{action:"name/cos:GetObject",bucket:s,region:r,prefix:a},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,tracker:e.tracker},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyPartResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,i=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=s.getType(e.Key)||"application/octet-stream"),h.call(this,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:i},(function(e,n){return e?(i&&i.parent&&i.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=o.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,o.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;o.getFileSize("multipartUpload",e,(function(){var i=e.tracker,s=n.options.UploadCheckContentMd5;s&&i&&i.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(s,e.Body,(function(r){r&&(e.Headers["Content-MD5"]=o.binaryBase64(r),s&&i&&i.setParams({md5EndTime:(new Date).getTime()})),i&&i.setParams({partNumber:e.PartNumber}),h.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},(function(e,n){if(e)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:o.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,i=e.UploadId,s=e.Parts,r=e.tracker,a=0,l=s.length;a-1?(o=n.Authorization,a=o.match(/q-url-param-list.*?(?=&)/g)[0],c="q-url-param-list="+encodeURIComponent(a.replace(/q-url-param-list=/,"")).toLowerCase(),l=new RegExp(a,"g"),o.replace(l,c)):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),r&&(i+="&"+r),setTimeout((function(){t(null,{Url:i})}))}var o,a,c,l}));return d?(a+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),r&&(a+="&"+r)):r&&(a+="?"+r),a},getAuth:function(e){return o.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(m,"postObject"),t.transferToTaskMethod(m,"putObject"),o.each(m,(function(t,n){e.prototype[n]=o.apiWrapper(n,t)}))}},function(e,t){function n(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var i=function(e,t){var i,o,s,r=[],a=function(e,t){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(t?n(o).toLowerCase():o);return i.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(i=0;i-1||f.indexOf(m)>-1)&&(h[m]=e.headers[m]);s["x-cos-acl"]&&(h.acl=s["x-cos-acl"]),!h["Content-Type"]&&(h["Content-Type"]=""),(n=Mn.uploadFile({url:r,method:a,name:"file",header:s,filePath:o,formData:h,timeout:e.timeout,success:function(e){u(null,e)},fail:function(e){u(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&i(e.qs)||"";g&&(r+=(r.indexOf("?")>-1?"&":"?")+g),s["Content-Length"]&&delete s["Content-Length"];var v={url:r,method:a,header:s,dataType:"text",data:e.body,responseType:e.dataType||"text",timeout:e.timeout,redirect:"manual",success:function(e){u(null,e)},fail:function(e){u(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=Mn.request(v)}return n}},function(e,t,n){let i=n(29);e.exports=new i(n(30),n(31))},function(e,t,n){function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=s.call(a,"catchLoc"),u=s.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:P(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),v}},t}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n,i,o,s,a){try{var r=e[s](a),c=r.value}catch(u){return void n(u)}r.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function r(e){s(a,i,o,r,c,"next",e)}function c(e){s(a,i,o,r,c,"throw",e)}r(void 0)}))}}var r=n(7),c=n(33),u=n(6).EventProxy,l=n(0),d=n(2);function p(e,t){var n=e.TaskId,i=e.Bucket,o=e.Region,s=e.Key,a=e.StorageClass,d=this,p={},f=e.FileSize,m=e.SliceSize,_=Math.ceil(f/m),v=0,y=l.throttleOnProgress.call(d,f,e.onHashProgress),I=function(t,n){var i=t.length;return 0===i?n(null,!0):i>_||i>1&&Math.max(t[0].Size,t[1].Size)!==m?n(null,!1):void function o(s){if(s=c.length)M.emit("has_and_check_upload_id",t);else{var p=c[u];if(!l.isInArray(t,p))return r.removeUploadId(p),void a(u+1);r.using[p]?a(u+1):g.call(d,{Bucket:i,Region:o,Key:s,UploadId:p,tracker:e.tracker},(function(e,t){d._isRunningTask(n)&&(e?(r.removeUploadId(p),a(u+1)):M.emit("upload_id_available",{UploadId:p,PartList:t.PartList}))}))}}(0):M.emit("has_and_check_upload_id",t)})),M.on("get_remote_upload_id_list",(function(){h.call(d,{Bucket:i,Region:o,Key:s,tracker:e.tracker},(function(t,o){if(d._isRunningTask(n)){if(t)return M.emit("error",t);var c=l.filter(o.UploadList,(function(e){return e.Key===s&&(!a||e.StorageClass.toUpperCase()===a.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(c.length)M.emit("seek_local_avail_upload_id",c);else{var u,p=r.getFileId(e.FileStat,e.ChunkSize,i,s);p&&(u=r.getUploadIdList(p))&&l.each(u,(function(e){r.removeUploadId(e)})),M.emit("no_available_upload_id")}}}))})),M.emit("get_remote_upload_id_list")}function h(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(o,(function(n,s){if(n)return t(n);i.push.apply(i,s.Upload||[]),"true"===s.IsTruncated?(o.KeyMarker=s.NextKeyMarker,o.UploadIdMarker=s.NextUploadIdMarker,e()):t(null,{UploadList:i})}))}()}function g(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(o,(function(n,s){if(n)return t(n);i.push.apply(i,s.Part||[]),"true"===s.IsTruncated?(o.PartNumberMarker=s.NextPartNumberMarker,e()):t(null,{PartList:i})}))}()}function f(e,t){var n=this,i=e.TaskId,o=e.Bucket,s=e.Region,a=e.Key,r=e.UploadData,u=e.FileSize,d=e.SliceSize,p=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),h=e.FilePath,g=Math.ceil(u/d),f=0,_=e.ServerSideEncryption,v=l.filter(r.PartList,(function(e){return e.Uploaded&&(f+=e.PartNumber>=g&&u%d||d),!e.Uploaded})),y=e.onProgress;c.eachLimit(v,p,(function(t,c){if(n._isRunningTask(i)){var l=t.PartNumber,p=Math.min(u,t.PartNumber*d)-(t.PartNumber-1)*d,g=0;m.call(n,{TaskId:i,Bucket:o,Region:s,Key:a,SliceSize:d,FileSize:u,PartNumber:l,ServerSideEncryption:_,FilePath:h,UploadData:r,onProgress:function(e){f+=e.loaded-g,g=e.loaded,y({loaded:f,total:u})},tracker:e.tracker},(function(e,o){n._isRunningTask(i)&&(e?f-=g:(f+=p-g,t.ETag=o.ETag),y({loaded:f,total:u}),c(e||null,o))}))}}),(function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:r.UploadId,SliceList:r.PartList})}))}function m(e,t){var n=this,i=e.TaskId,o=e.Bucket,s=e.Region,a=e.Key,r=e.FileSize,u=e.FilePath,d=1*e.PartNumber,p=e.SliceSize,h=e.ServerSideEncryption,g=e.UploadData,f=n.options.ChunkRetryTimes+1,m=e.Headers||{},_=p*(d-1),v=p,y=_+p;y>r&&(v=(y=r)-_);var I=["x-cos-traffic-limit","x-cos-mime-limit"],M={};l.each(m,(function(e,t){I.indexOf(t)>-1&&(M[t]=e)})),l.fileSlice(u,_,y,(function(r){var u=l.getFileMd5(r),p=u?l.binaryBase64(u):null,m=g.PartList[d-1];c.retry(f,(function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:o,Region:s,Key:a,ContentLength:v,PartNumber:d,UploadId:g.UploadId,ServerSideEncryption:h,Body:r,Headers:M,onProgress:e.onProgress,ContentMD5:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,o){if(n._isRunningTask(i))return e?t(e):(m.Uploaded=!0,t(null,o))}))}),(function(e,o){if(n._isRunningTask(i))return t(e,o)}))}))}function _(e,t){var n=e.Bucket,i=e.Region,o=e.Key,s=e.UploadId,a=e.SliceList,r=this,u=this.options.ChunkRetryTimes+1,l=a.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(u,(function(t){r.multipartComplete({Bucket:n,Region:i,Key:o,UploadId:s,Parts:l,calledBySdk:"sliceUploadFile",Headers:e.Headers||{},tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function v(e,t){var n=e.Bucket,i=e.Region,o=e.Key,s=e.AbortArray,a=e.AsyncLimit||1,r=this,u=0,l=new Array(s.length);c.eachLimit(s,a,(function(t,s){var a=u;if(o&&o!==t.Key)return l[a]={error:{KeyNotMatch:!0}},void s(null);var c=t.UploadId||t.UploadID;r.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:c},(function(e){var o={Bucket:n,Region:i,Key:t.Key,UploadId:c};l[a]={error:e,task:o},s(null)})),u++}),(function(e){if(e)return t(e);for(var n=[],i=[],o=0,s=l.length;oa?"sliceUploadFile":"putObject",t.tracker=new d({Beacon:s.options.BeaconReporter,clsReporter:s.options.ClsReporter,bucket:t.Bucket,region:t.Region,apiName:"uploadFile",realApi:h,fileKey:t.Key,fileSize:c,accelerate:p,deepTracker:s.options.DeepTracker,customId:s.options.CustomId,delay:s.options.TrackerDelay})),l.each(t,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(u[t]=e)})),g=t.onTaskReady,t.onTaskReady=function(e){u.TaskId=e,g&&g(e)},f=t.onFileFinish,m=function(e,i){t.tracker&&t.tracker.report(e,i),f&&f(e,i,u),n&&n(e,i)},_="postObject"===s.options.SimpleUploadMethod?"postObject":"putObject",v=c>a?"sliceUploadFile":_,r.push({api:v,params:t,callback:m}),s._addTasks(r);case 24:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function I(){return I=a(i().mark((function e(t,n){var s,r,c,u,p,h,g,f,m,_,v;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this,r=void 0===t.SliceSize?s.options.SliceSize:t.SliceSize,c=0,u=0,p=l.throttleOnProgress.call(s,u,t.onProgress),h=t.files.length,g=t.onFileFinish,f=Array(h),m=function(e,t,i){p(null,!0),g&&g(e,t,i),f[i.Index]={options:i,error:e,data:t},--h<=0&&n&&n(null,{files:f})},_=[],v=function(){return t.files.map((function(e,t){return new Promise((n=a(i().mark((function n(a){var h,g,f,v,y,I,M,C,S,E,T;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return h=0,n.prev=1,n.next=4,l.getFileSizeByPath(e.FilePath);case 4:h=n.sent,n.next=9;break;case 7:n.prev=7,n.t0=n.catch(1);case 9:g={Index:t,TaskId:""},c+=h,s.options.EnableReporter&&(f=s.options.UseAccelerate||"string"==typeof s.options.Domain&&s.options.Domain.includes("accelerate."),v=h>r?"sliceUploadFile":"putObject",e.tracker=new d({Beacon:s.options.BeaconReporter,clsReporter:s.options.ClsReporter,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",realApi:v,fileKey:e.Key,fileSize:h,accelerate:f,deepTracker:s.options.DeepTracker,customId:s.options.CustomId,delay:s.options.TrackerDelay})),l.each(e,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(g[t]=e)})),y=e.onTaskReady,e.onTaskReady=function(e){g.TaskId=e,y&&y(e)},I=0,M=e.onProgress,e.onProgress=function(e){u=u-I+e.loaded,I=e.loaded,M&&M(e),p({loaded:u,total:c})},C=e.onFileFinish,S=function(t,n){e.tracker&&e.tracker.report(t,n),C&&C(t,n),m&&m(t,n,g)},E="postObject"===s.options.SimpleUploadMethod?"postObject":"putObject",T=h>r?"sliceUploadFile":E,_.push({api:T,params:e,callback:S}),a(!0);case 24:case"end":return n.stop()}}),n,null,[[1,7]])}))),function(e){return n.apply(this,arguments)}));var n}))},e.next=13,Promise.all(v());case 13:s._addTasks(_);case 14:case"end":return e.stop()}}),e,this)}))),I.apply(this,arguments)}function M(e,t){var n=e.TaskId,i=e.Bucket,o=e.Region,s=e.Key,a=e.CopySource,r=e.UploadId,u=1*e.PartNumber,l=e.CopySourceRange,d=this.options.ChunkRetryTimes+1,p=this;c.retry(d,(function(t){p.uploadPartCopy({TaskId:n,Bucket:i,Region:o,Key:s,CopySource:a,UploadId:r,PartNumber:u,CopySourceRange:l,onProgress:e.onProgress,tracker:e.tracker,calledBySdk:e.calledBySdk},(function(e,n){t(e||null,n)}))}),(function(e,n){return t(e,n)}))}var C={sliceUploadFile:function(e,t){var n=this;if(!l.canFileSlice())return e.SkipTask=!0,void("postObject"===n.options.SimpleUploadMethod?n.postObject(e,t):n.putObject(e,t));var i,o,s=new u,a=e.TaskId,c=e.Bucket,d=e.Region,h=e.Key,g=e.FilePath,m=e.ChunkSize||e.SliceSize||n.options.ChunkSize,v=e.AsyncLimit,y=e.StorageClass,I=e.ServerSideEncryption,M=e.onHashProgress,C=e.tracker;C&&C.setParams({chunkSize:m}),s.on("error",(function(i){if(n._isRunningTask(a)){var o={UploadId:e.UploadData.UploadId||"",err:i,error:i};return t(o)}})),s.on("upload_complete",(function(n){var i=l.extend({UploadId:e.UploadData.UploadId||""},n);t(null,i)})),s.on("upload_slice_complete",(function(t){var u={};l.each(e.Headers,(function(e,t){var n=t.toLowerCase();0!==n.indexOf("x-cos-meta-")&&"pic-operations"!==n||(u[t]=e)})),_.call(n,{Bucket:c,Region:d,Key:h,UploadId:t.UploadId,SliceList:t.SliceList,Headers:u,tracker:C},(function(e,c){if(n._isRunningTask(a)){if(r.removeUsing(t.UploadId),e)return o(null,!0),s.emit("error",e);r.removeUploadId(t.UploadId),o({loaded:i,total:i},!0),s.emit("upload_complete",c)}}))})),s.on("get_upload_data_finish",(function(t){var u=r.getFileId(e.FileStat,e.ChunkSize,c,h);u&&r.saveUploadId(u,t.UploadId,n.options.UploadIdCacheLimit),r.setUsing(t.UploadId),o(null,!0),f.call(n,{TaskId:a,Bucket:c,Region:d,Key:h,FilePath:g,FileSize:i,SliceSize:m,AsyncLimit:v,ServerSideEncryption:I,UploadData:t,onProgress:o,tracker:C},(function(e,t){if(n._isRunningTask(a))return e?(o(null,!0),s.emit("error",e)):void s.emit("upload_slice_complete",t)}))})),s.on("get_file_size_finish",(function(){if(o=l.throttleOnProgress.call(n,i,e.onProgress),e.UploadData.UploadId)s.emit("get_upload_data_finish",e.UploadData);else{var t=l.extend({TaskId:a,Bucket:c,Region:d,Key:h,Headers:e.Headers,StorageClass:y,FilePath:g,FileSize:i,SliceSize:m,onHashProgress:M,tracker:C},e);t.FileSize=i,p.call(n,t,(function(t,i){if(n._isRunningTask(a)){if(t)return s.emit("error",t);e.UploadData.UploadId=i.UploadId,e.UploadData.PartList=i.PartList,s.emit("get_upload_data_finish",e.UploadData)}}))}})),i=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),l.each(e.Headers,(function(t,n){"content-length"===n.toLowerCase()&&delete e.Headers[n]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],o=1048576,s=0;s=E&&v%I||I),!e.Uploaded}));c.eachLimit(h,C,(function(t,n){var r=t.PartNumber,l=t.CopySourceRange,p=t.end-t.start,h=0;c.retry(S,(function(t){M.call(i,{Bucket:o,Region:s,Key:a,CopySource:d,UploadId:u.UploadId,PartNumber:r,CopySourceRange:l,tracker:e.tracker,calledBySdk:"sliceCopyFile",onProgress:function(e){T+=e.loaded-h,h=e.loaded,y({loaded:T,total:v})}},t)}),(function(e,i){if(e)return n(e);y({loaded:T,total:v}),T+=p-h,t.ETag=i.ETag,n(e||null,i)}))}),(function(e){if(e)return r.removeUsing(u.UploadId),y(null,!0),t(e);n.emit("copy_slice_complete",u)}))})),n.on("get_chunk_size_finish",(function(){var c=function(){i.multipartInit({Bucket:o,Region:s,Key:a,Headers:R,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(i,o){if(i)return t(i);e.UploadId=o.UploadId,n.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},u=r.getCopyFileId(d,k,I,o,a),p=r.getUploadIdList(u);if(!u||!p)return c();!function t(u){if(u>=p.length)return c();var d=p[u];if(r.using[d])return t(u+1);g.call(i,{Bucket:o,Region:s,Key:a,UploadId:d,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(i,o){if(i)r.removeUploadId(d),t(u+1);else{if(r.using[d])return t(u+1);var s={},a=0;l.each(o.PartList,(function(e){var t=parseInt(e.Size),n=a+t-1;s[e.PartNumber+"|"+a+"|"+n]=e.ETag,a+=t})),l.each(e.PartList,(function(e){var t=s[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),n.emit("get_copy_data_finish",{UploadId:d,PartList:e.PartList})}}))}(0)})),n.on("get_file_size_finish",(function(){var o;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;o11&&(D[t]=e)})),n.emit("get_file_size_finish")}else t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'})}))}else t({error:"CopySource format error"})}};e.exports.init=function(e,t){t.transferToTaskMethod(C,"sliceUploadFile"),l.each(C,(function(t,n){e.prototype[n]=l.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var o=0,s=0,a=0;!function r(){if(o>=e.length)return i();for(;a=e.length?i():r())}))}()},retry:function(e,t,n){e<1?n():function i(o){t((function(t,s){t&&oe.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!e})()}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)),i}function g(e){for(var t=1;ti&&(Jt({api:t,paramName:n,desc:Gn("MaximumArrayLengthLog",n,i)}),1)):(Jt({api:t,paramName:n,desc:on()}),!1)}function Mn(e,t,n,i){var o=i.allowUndefined,s=i.min;return i=i.max,lt(e)?!!o||(Jt({api:t,paramName:n,desc:en()}),!1):Ke(e)?Ke(s)&&e=Math.pow(2,64)&&(Jt({api:t,paramName:n,desc:Gn("NumberLessThanLog",n,"Math.pow(2,64)")}),1)):(Jt({api:t,paramName:n,desc:Zt()}),!1)}},enableMark:g({},Ln)},createConversationGroup:{conversationIDList:g({},Z),groupName:g(g({},Y),{},{validator:function(e,t,n){return!(!e||32=this.TOPIC_MSG_LIMIT&&this._convM.clearMemMsg(o,!0)}}catch(r){n.e(r)}finally{n.f()}}}},{key:"pushIn",value:function(e){var t=1>(-2*s&6))))o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);try{return decodeURIComponent(escape(n))}catch(r){return""}}Gi.mixin=function(e){(e=e.prototype||e)._isReady=!1,e.ready=function(e){if(e)return this._isReady?void(1=this.MAX_LENGTH&&(t=this.map.entries().next().value[0],this.map.delete(t)),this.map.set(e,1)}},{key:"has",value:function(e){return this.map.has(e)}},{key:"delete",value:function(e){this.has(e)&&this.map.delete(e)}},{key:"reset",value:function(){this.map.clear()}}]),Ki=["groupID","name","avatar","type","introduction","notification","ownerID","selfInfo","createTime","infoSequence","lastInfoTime","lastMessage","nextMessageSeq","memberNum","maxMemberNum","memberList","joinOption","groupCustomField","muteAllMembers","isSupportTopic","inviteOption","_lastRevokedTime"],zi=s((function e(t){i(this,e),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=!1,this.isSupportTopic=!1,this._lastRevokedTime=0,this._initGroup(t)}),[{key:"memberNum",get:function(){return this.memberCount},set:function(e){}},{key:"maxMemberNum",get:function(){return this.maxMemberCount},set:function(e){}},{key:"_initGroup",value:function(e){for(var t in e)Ki.indexOf(t)<0||("selfInfo"!==t?("memberNum"===t&&(this.memberCount=e[t]),"maxMemberNum"===t&&(this.maxMemberCount=e[t]),"isSupportTopic"!==t?this[t]=e[t]:this.isSupportTopic=1===e[t]):this.updateSelfInfo(e[t]))}},{key:"updateGroup",value:function(e){var t=this;(e.appid=void 0,e.grossTopicNextMsgSeq=void 0,e.selfInfo&&(e.selfInfo.grossTopicReadSeq=void 0),e=JSON.parse(JSON.stringify(e))).lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),lt(e.muteAllMembers)||("On"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&_t(this.groupCustomField,e.groupCustomField),lt(e.memberNum)||(this.memberCount=e.memberNum),lt(e.maxMemberNum)||(this.maxMemberCount=e.maxMemberNum),lt(e.isSupportTopic)||(this.isSupportTopic=Ke(e.isSupportTopic)?1===e.isSupportTopic:e.isSupportTopic),Ze(this,e,["members","errorCode","lastMsgTime","groupCustomField","memberNum","maxMemberNum","isSupportTopic"]),Ye(e.members)&&0e?(c.messageList=o.slice(r-e,r),c.nextReqMessageID=a?o[r-e].ID:o[r-e].sequence+""):(c.messageList=o.slice(0,r),c.isCompleted=!0):ei||n&&s.sequence>n)){if("in"===s.flow&&s.isRead)break;s.setIsRead(!0)}}},{key:"updateUnreadCount",value:function(e){var t,n=!(1o&&e.sequence<=i:e.sequence>o&&e.sequenceo&&e.length<60?a._recursiveGetMsgList(e,t,n,i,o,s):a._emitMsgReceived(t,e)}))}},{key:"_emitMsgReceived",value:function(e,t){var n,i,o=this;0=e.MAX_CHECK_COUNT?(e._deleteCachedGroupTips(n),e._checkCountMap.delete(n)):e._checkCountMap.set(n,++i)}))}},{key:"onNewGroupTips",value:function(e){be.l("".concat(this._n,".onNewGroupTips options:").concat(JSON.stringify(e.dataList)));var t=(e=this._assembly(e)).eventDataList,n=e.result;0<(e=e.AVChatRoomMessageList).length&&this._grpM.onAVChatRoomMessage(e),0=e.MAX_CHECK_COUNT?(e._deleteCachedGroupMessage(n),e._checkCountMap.delete(n)):e._checkCountMap.set(n,++i)}))}},{key:"updateLastMsg",value:function(e){var t="".concat(this._n,".updateLastMsg");if(0!==this._grpM.getGroupMap().size){for(var n,i,o,s,a=!1,r=e.length,c=0;c=this.CACHE_EXPIRE_TIME||a=this.EXPIRE_TIME?this._getRemoteGroupCounters({groupID:i,avChatRoomKey:s}).then((function(e){return a.setMoreMessage("from remote. count:".concat(e.length)).end(),be.l("".concat(n," from remote. groupID:").concat(i)),Cn({counters:e=t._getLocalCounters(i,o)})})).catch((function(e){return a.setError(e).end(),En(e)})):(a.setMoreMessage("from cache").end(),be.l("".concat(n," from cache. groupID:").concat(i)),Sn({counters:e=this._getLocalCounters(i,o)}))}},{key:"_getRemoteGroupCounters",value:function(e){var t=this;return this._grpM.req({P:jn.GET_GRP_COUNTER,data:g({},e)}).then((function(n){var i=void 0===(i=(n=n.data).counterList)?[]:i;return n=n.groupCounterSeq,t._updateLocalGroupCounters({groupID:e.groupID,counterList:i,groupCounterSeq:n}),be.l("".concat(t._n,"._getRemoteGroupCounters ok. groupID:").concat(e.groupID)),i})).catch((function(e){return En(e)}))}},{key:"_convertObjectToList",value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push({key:n,value:e[n]})})),t}},{key:"_updateGroupCounters",value:function(e){var t="".concat(this._n,"._updateGroupCounters"),n=e.groupID,i=e.avChatRoomKey,o=e.mode;return be.l("".concat(t,". groupID:").concat(n," avChatRoomKey:").concat(i," mode:").concat(o)),this._grpM.req({P:jn.UPDATE_GRP_COUNTER,data:g({},e)}).then((function(e){be.l("".concat(t," ok.")),e=e.data.counterList;var n={};return(void 0===e?[]:e).forEach((function(e){var t=e.key;e=e.value,n[t]=e})),n})).catch((function(e){return En(e)}))}},{key:"_hasLocalGroupCounters",value:function(e){return this._groupCountersMap.has(e)}},{key:"_getLocalGroupCounters",value:function(e){return this._hasLocalGroupCounters(e)||this.initGroupCountersCache({groupID:e}),this._groupCountersMap.get(e)}},{key:"_updateLocalGroupCounters",value:function(e){var t,n,i,o=e.groupID,s=void 0===(s=e.counterList)?[]:s;e=e.groupCounterSeq,this._hasLocalGroupCounters(o)&&(i=this._getLocalGroupCounters(o),t=i.counters,n=i.avChatRoomKey,i=i.groupCounterSeq,0this._startBroadcastSeq&&(this._startBroadcastSeq=r),Ye(s)&&01e3*t.expireTime&&1e4=o&&t.messageList.push(e)})),(Ct({groupID:n})||St(n))&&0===t.messageList.length&&s[0].sequenceo.nextMessageSeq&&(o.updateNextMessageSeq(n),o.updateLastMessage(e),o.updateSelfInfo({readedSequence:t}),o.updateUnreadCount(0),this.emitOEvt(S.TOPIC_UPDATED,{groupID:i,topic:o}))}},{key:"onMessageModified",value:function(e){var t,n=e.to,i=e.time,o=e.sequence,s=e.elements,a=e.cloudCustomData,r=e.messageVersion,c=xt(n),u=this.getLocalTopic(c,n);u&&(t=u.lastMessage,be.d("".concat(this._n,".onMessageModified topicID:").concat(n," lastMessage:"),JSON.stringify(t),"options:",JSON.stringify(e)),t)&&(null===t.payload||t.lastTime===i&&t.lastSequence===o&&t.version!==r)&&(t.type=s[0].type,t.payload=s[0].content,t.messageForShow=Ft(t.type,t.payload,this.isIntl()),t.cloudCustomData=a,t.version=r,t.lastSequence=o,t.lastTime=i,this.emitOEvt(S.TOPIC_UPDATED,{groupID:c,topic:u}))}},{key:"onMessageRevoked",value:function(e){var t,n,i,o=this;0!==e.length&&(n=t=null,i=!1,e.forEach((function(e){var s=e.to;n=xt(s),(t=o.getLocalTopic(n,s))&&(t.reduceUnreadCount()&&(i=!0),t.isLastMessageRevoked(e)&&(t.setLastMessageRevoked(!0),t.setLastMessageRevoker(e.revoker),i=!0),(s=t.selfInfo.excludedUnreadSequenceList||[]).push(e.sequence),t.updateSelfInfo({excludedUnreadSequenceList:s}))})),i)&&this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:t})}},{key:"isLastMessageRevoked",value:function(e){var t=e.topicID,n=(e=e.sequence,xt(t));return n=this.getLocalTopic(n,t),t=!1,n?n.isLastMessageRevoked({sequence:e}):t}},{key:"updateUnreadCountAndLastMsg",value:function(e,t,n){var i,o=xt(e),s=this.getLocalTopic(o,e);s&&(i=s.selfInfo.excludedUnreadSequenceList||[],lt(n)||(i=n),t._isExcludedFromUnreadCount&&i.push(t.sequence),s.updateSelfInfo({excludedUnreadSequenceList:i}),be.l("".concat(this._n,".updateUnreadCountAndLastMsg seq:").concat(t.sequence," lastSeq:").concat(s.lastMessage.lastSequence)),t.sequence>s.lastMessage.lastSequence)&&(s.updateLastMessage(t),n=t.sequence+1,s.updateNextMessageSeq(n),i=this._computeUnreadCount(s),s.updateUnreadCount(i),(t=this.get(11).getLocalConversation("".concat(E.CONV_GROUP).concat(e)))&&t.updateUnreadCount({nextUnreadCount:i,isFromGetConversations:!0}),this.emitOEvt(S.TOPIC_UPDATED,{groupID:o,topic:s}))}},{key:"getJoinedCommunityList",value:function(){return this.get(7).syncCommunityWithTopic()}},{key:"createTopicInCommunity",value:function(e){var t,n=this,i="".concat(this._n,".").concat("createTopicInCommunity"),o=e.topicID;return lt(o)||St(o)?e.topicName&&!1===this._filterProfanity("topicName",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?En({code:qn.PROFANITY_FOUND}):(t=new oi("createTopicInCommunity"),this.req({P:jn.CREATE_TOPIC,data:g({},e)}).then((function(o){return o=o.data.topicID,t.setMessage("topicID:".concat(o)).end(),be.l("".concat(i," ok. topicID:").concat(o)),n._updateTopicMap([g(g({},e),{},{topicID:o})]),Cn({topicID:o})})).catch((function(e){return t.setError(e).end(),be.e("".concat(i," failed. error:"),e),En(e)}))):En({code:qn.ILLEGAL_TOPIC_ID})}},{key:"deleteTopicFromCommunity",value:function(e){var t=this,n="".concat(this._n,".").concat("deleteTopicFromCommunity"),i=e.groupID,o=(e=void 0===(e=e.topicIDList)?[]:e,new oi("deleteTopicFromCommunity"));return o.setMessage("groupID:".concat(i," topicIDList:").concat(e)),this.req({P:jn.DEL_TOPIC,data:{groupID:i,topicIDList:e}}).then((function(e){e=e.data.resultList;var s=[],a=[];return(void 0===e?[]:e).forEach((function(e){var t=e.topicID,n=e.errorCode;e=e.errorInfo,0===n?s.push({topicID:t}):a.push({topicID:t,code:n,message:e})})),e="success count:".concat(s.length,", fail count:").concat(a.length),o.setMoreMessage(e).end(),be.l("".concat(n," ok. ").concat(e)),s.forEach((function(e){t._deleteLocalTopic(i,e.topicID)})),Cn({successTopicList:s,failureTopicList:a})})).catch((function(e){return o.setError(e).end(),be.e("".concat(n," failed. error:"),e),En(e)}))}},{key:"updateTopicProfile",value:function(e){var t,n=this,i="".concat(this._n,".").concat("updateTopicProfile");return be.l("".concat(i," options:"),e),e.topicName&&!1===this._filterProfanity("topicName",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?En({code:qn.PROFANITY_FOUND}):((t=new oi("updateTopicProfile")).setMessage("groupID:".concat(e.groupID," topicID:").concat(e.topicID)),lt(e.muteAllMembers)||(e.muteAllMembers=!0===e.muteAllMembers?"On":"Off"),this.req({P:jn.UPDATE_TOPIC_PROFILE,data:g({},e)}).then((function(){return t.end(),be.l("".concat(i," ok")),n._updateTopicMap([e]),Cn({topic:n.getLocalTopic(e.groupID,e.topicID)})})).catch((function(e){return t.setError(e).end(),be.e("".concat(i," failed. error:"),e),En(e)})))}},{key:"getTopicList",value:function(e){var t=this,n="".concat(this._n,".").concat("getTopicList"),i=e.groupID,o=0===(e=void 0===(e=e.topicIDList)?[]:e).length,s=new oi("getTopicList");if(s.setMessage("groupID:".concat(i)),this._getTopicTimeMap.has(i)){var a=(r=this._getTopicTimeMap.get(i)).isGetAll,r=r.time;if((a||!a&&!o)&&Date.now()-r<1e3*this.TOPIC_CACHE_TIME&&(a=this._getLocalTopicList(i,e),o||a.length===e.length))return s.setMoreMessage("from cache, topic count:".concat(a.length)).end(),be.l("".concat(n," groupID:").concat(i," from cache, topic count:").concat(a.length)),Sn({successTopicList:a,failureTopicList:[]})}return this.req({P:jn.GET_TOPIC_LIST,data:{groupID:i,topicIDList:e}}).then((function(e){e=e.data.topicInfoList;var a=[],r=[],c=[];return(void 0===e?[]:e).forEach((function(e){var t=e.topic,n=e.selfInfo,i=e.errorCode,o=(e=e.errorInfo,t.topicID);0===i?(a.push(g(g({},t),{},{selfInfo:n})),r.push(o)):c.push({topicID:o,code:i,message:e})})),t._updateTopicMap(a),t._handleTopicAtInfo(a),e="success count:".concat(r.length,", fail count:").concat(c.length),s.setMoreMessage(e).end(),be.l("".concat(n," groupID:").concat(i," from remote, ").concat(e)),e=[],qe(r)||(t._getTopicTimeMap.set(i,{time:Date.now(),isGetAll:o}),e=t._getLocalTopicList(i,r)),Cn({successTopicList:e,failureTopicList:c})})).catch((function(e){return s.setError(e).end(),be.e("".concat(n," failed. error:"),e),En(e)}))}},{key:"hasLocalTopic",value:function(e,t){return!!this._topicMap.has(e)&&this._topicMap.get(e).has(t)}},{key:"getLocalTopic",value:function(e,t){var n=null;return this._topicMap.has(e)?this._topicMap.get(e).get(t):n}},{key:"_getLocalTopicList",value:function(e){var t=1this.MAX_QUERY_USER_COUNT&&(be.w("".concat(t," ").concat(jt(this.MAX_QUERY_USER_COUNT))),i=n.slice(0,this.MAX_QUERY_USER_COUNT));var a=new oi("getUserStatus");return this._userM.req({P:jn.GET_USER_STATUS,data:{userIDList:i}}).then((function(e){var i=void 0===(i=(e=e.data).successUserList)?[]:i,s=(e=void 0===(e=e.failureUserList)?[]:e,i=i.map((function(e){return{userID:e.userID,statusType:e.statusType,customStatus:Bi(e=e.customStatus)}})),e=e.map((function(e){var t=e.userID,n=e.invalidUserID,i=e.errorCode;return e=e.errorInfo,{userID:qe(n)?t:n,code:i,message:e}})),lt(o)||i.unshift(o),"userID count:".concat(n.length,", success count:").concat(i.length,", fail count:").concat(e.length));return a.setMessage("".concat(s)).end(),be.l("".concat(t," ok. ").concat(s,".")),Cn({successUserList:i,failureUserList:e})})).catch((function(e){return a.setMessage("userID count:".concat(n.length)).setError(e).end(),be.e("".concat(t," failed. error:"),e),En(e)}))}},{key:"subscribeUserStatus",value:function(e){var t,n,i,o,s="subscribeUserStatus";return this._userM.canIUse(N.USER_STATUS)?(t="".concat(this._n,".").concat(s),(n=v(e=void 0===(e=e.userIDList)?[]:e)).length>this.MAX_SUBSCRIBE_USER_COUNT&&(be.w("".concat(t," ").concat(jt(this.MAX_SUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_SUBSCRIBE_USER_COUNT)),i=new oi(s),o="userID count:".concat(e.length),be.l("".concat(t," ").concat(o)),this._userM.req({P:jn.SUB_USER_STATUS,data:{userIDList:n}}).then((function(e){return e=(void 0===(e=e.data.failureUserList)?[]:e).map((function(e){var t=e.userID,n=e.invalidUserID,i=e.errorCode;return e=e.errorInfo,{userID:qe(n)?t:n,code:i,message:e}})),i.setMessage("".concat(o," fail count:").concat(e.length)).end(),be.l("".concat(t," ok. fail count:").concat(e.length,".")),Cn({failureUserList:e})})).catch((function(e){return i.setMessage(o).setError(e).end(),be.e("".concat(t," failed. error:"),e),En(e)}))):this._userM.noUse(s)}},{key:"unsubscribeUserStatus",value:function(e){var t,n,i,o,s="unsubscribeUserStatus";return this._userM.canIUse(N.USER_STATUS)?(t="".concat(this._n,".").concat(s),n=v(e=void 0===(e=(e||{}).userIDList)?[]:e),e.length>this.MAX_UNSUBSCRIBE_USER_COUNT&&(be.w("".concat(t," ").concat(jt(this.MAX_UNSUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_UNSUBSCRIBE_USER_COUNT)),i=new oi(s),o="userID count:".concat(e.length),be.l("".concat(t," ").concat(o)),e={userIDList:n},0===n.length&&(e.userIDList=void 0,e.unsubscribeAll=1),this._userM.req({P:jn.UNSUB_USER_STATUS,data:e}).then((function(e){return e=(void 0===(e=e.data.failureUserList)?[]:e).map((function(e){var t=e.userID,n=e.invalidUserID,i=e.errorCode;return e=e.errorInfo,{userID:qe(n)?t:n,code:i,message:e}})),i.setMessage("".concat(o," fail count:").concat(e.length)).end(),be.l("".concat(t," ok. fail count:").concat(e.length,".")),Cn({failureUserList:e})})).catch((function(e){return i.setMessage("".concat(o)).setError(e).end(),be.e("".concat(t," failed. error:"),e),En(e)}))):this._userM.noUse(s)}},{key:"reset",value:function(){this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100}}]),yo=(u(Eo,wn),s(Eo,[{key:"onContextUpdated",value:function(e){this._profileHandler.getMyProfile(),this._blacklistHandler.getBlacklist()}},{key:"mockOnNickAvatarModified",value:function(e,t){be.l("".concat(this._n,"._mockOnNickAvatarModified nick:").concat(e," avatar:").concat(t)),this.onProfileModified({dataList:[{pushType:1,userID:this.getMyUserID(),profileList:[{tag:Le.NICK,value:e},{tag:Le.AVATAR,value:t}]}]})}},{key:"onProfileModified",value:function(e){this._profileHandler.onProfileModified(e)}},{key:"onRelationChainModified",value:function(e){var t,n;qe(e=e.dataList)||(t=[],e.forEach((function(e){e.blackListDelAccount&&t.push.apply(t,v(e.blackListDelAccount))})),0=this.MIN_THRESHOLD)&&this._report()}},{key:"onCheckTimer",value:function(){Date.now()n.MAX_THRESHOLD&&n._flushAtOnce()}))):this._lastReportTime=Date.now())}},{key:"_flushAtOnce",value:function(){var e=this.get(13),t=e.getItem(this.TAG,!1),n=this._reportBody.getLogsInMemory(),i="".concat(this._n,"._flushAtOnce");qe(t)?(be.l("".concat(i," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1)):((n=n.concat(t)).length>this.MAX_THRESHOLD&&(n=n.slice(0,this.MAX_THRESHOLD)),be.l("".concat(i," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1))}},{key:"reset",value:function(){be.l("".concat(this._n,".reset")),this._lastReportTime=0,this._report(),this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[]}}])),Po="none",No="online",wo=s((function e(t){i(this,e),this._m=t,this._networkType=No,this._n="NetMonitorModule",this._mpNetworkStatusCallback=null,this._webOnlineCallback=null,this._webOfflineCallback=null,this._removeListener=null,this._m.getIEmitInst().on(Ni.A2KEY_AND_TINYID_UPDATED,this._startRN,this)}),[{key:"_startRN",value:function(){var e,t=this;ee&&(e=this._m.get(18).getPlugin("chat-network-monitor"))&&(this._removeListener=e.addEventListener((function(e){var n=e.isConnected;e=e.type,t._networkType!==e&&t._onNetworkStatusChange({isConnected:void 0!==n&&n,networkType:e})})))}},{key:"start",value:function(){var e=this,t="".concat(this._n,".start");Q?(ne.getNetworkType({success:function(n){e._networkType=n.networkType||n.subtype||"",n.networkType===Po?be.w("".concat(t," no network, please check!")):be.i("".concat(t," networkType:").concat(n.networkType))}}),this._mpNetworkStatusCallback=this._onNetworkStatusChange.bind(this),ne.onNetworkStatusChange(this._mpNetworkStatusCallback)):te&&(this._networkType=No,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:!0,networkType:No})}},{key:"_onWebOffline",value:function(){this._onNetworkStatusChange({isConnected:!1,networkType:Po})}},{key:"_onNetworkStatusChange",value:function(e){var t=e.isConnected,n=(e=e.networkType,"".concat(this._n,"._onNetworkStatusChange")),i=!1,o="previous:".concat(this._networkType," current:").concat(e);t?(be.i("".concat(n," ").concat(o)),this._networkType!==e&&(i=!0,this._networkType=e,this._m.get(21).reConnect(!0))):this._networkType!==e&&(i=!0,this._networkType=e,be.w("".concat(n," no network, please check!")),this._m.get(21).offline()),i&&new oi("networkChange").setMessage("isConnected:".concat(t," ").concat(o)).end()}},{key:"isOnline",value:function(){return this._networkType!==Po}},{key:"getNetworkType",value:function(){return this._networkType}},{key:"reset",value:function(){be.l("".concat(this._n,".reset")),Q?null!==this._mpNetworkStatusCallback&&(ne.offNetworkStatusChange&&ne.offNetworkStatusChange(this._mpNetworkStatusCallback),this._mpNetworkStatusCallback=null):te?(null!==this._webOnlineCallback&&(window.removeEventListener("online",this._webOnlineCallback),this._webOnlineCallback=null),null!==this._onWebOffline&&(window.removeEventListener("offline",this._webOfflineCallback),this._webOfflineCallback=null)):ee&&this._removeListener&&(this._removeListener(),this._removeListener=null)}}]);function Uo(e){i(this,Uo),(e=n(this,Uo,[e]))._n="EventStatModule",e.TAG="im-ssolog-event",e._reportBody=new Ao,e.MIN_THRESHOLD=20,e.MAX_THRESHOLD=100,e.WAITING_TIME=6e4,e.REPORT_LEVEL=[4,5,6],e.REPORT_SDKAPPID_BLACKLIST=[],e.REPORT_TINYID_WHITELIST=[],e._lastReportTime=Date.now();var t=e.getIEmitInst();return t.on(Ni.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,e),t.on(Ni.CLOUD_CONFIG,e._onCloudConfig,e),e}function Go(e,t){return e(t={exports:{}},t.exports),t.exports}var xo=Go((function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,i,s,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");return i=new o(i,s||e,a),s=n?n+t:t,e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function r(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),r.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)t.call(e,i)&&o.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},r.prototype.listeners=function(e){e=n?n+e:e;var t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var i=0,o=t.length,s=new Array(o);i=this.cosOptions.expiredTime-120&&this._getAuthorizationKey()}},{key:"getFileDNList",value:function(){return this._fileDNList}},{key:"_getAuthorization",value:function(e,t){t({TmpSecretId:this.cosOptions.secretId,TmpSecretKey:this.cosOptions.secretKey,XCosSecurityToken:this.cosOptions.sessionToken,ExpiredTime:this.cosOptions.expiredTime})}},{key:"upload",value:function(e){if(!0===e._relayFlag)return Promise.resolve();var t=this.get(26);switch(e.type){case E.MSG_IMAGE:return t.addTotalCount(Jn),this._uploadImage(e);case E.MSG_FILE:return t.addTotalCount(Jn),this._uploadFile(e);case E.MSG_AUDIO:return t.addTotalCount(Jn),this._uploadAudio(e);case E.MSG_VIDEO:return t.addTotalCount(Jn),this._uploadVideo(e);default:return Promise.resolve()}}},{key:"_uploadImage",value:function(e){var t=this,n=this.get(2),i=e.getElements()[0],o=n.getMessageOption(e.clientSequence);return this.doUploadImage({file:o.payload.file,to:o.to,message:e,onProgress:function(e){if(i.updatePercent(e),Je(o.onProgress))try{o.onProgress(e)}catch(t){return En({code:qn.MSG_ONPROGRESS_ERR})}}}).then((function(n){var o=n.location,s=n.fileType,a=n.fileSize,r=n.width,c=n.height,u=n.smallImageUrl,l=n.smallImageWidth,d=n.smallImageHeight,p=n.largeImageUrl,h=n.largeImageWidth,f=n.largeImageHeight,m=n.imageInfoArray;n=t.isPrivateNetWork()?o:at(o),i.updateImageFormat(s);var _,v,y={size:a,url:n,width:r,height:c};if(m&&0this.UPLOAD_SIZE_LIMIT.F?this._checkSizeError("F"):0===e.file.files[0].size?En({code:qn.MSG_F_IS_EMPTY}):(this._setUploadFileType(255),this.uploadByCOS(e))}},{key:"doUploadVideo",value:function(e){return e.file.videoFile.size>this.UPLOAD_SIZE_LIMIT.V?this._checkSizeError("V"):0===e.file.videoFile.size?En({code:qn.MSG_F_IS_EMPTY}):-1===Vi.indexOf(e.file.videoFile.type)?En({code:qn.MSG_V_TYPES_LIMIT}):(this._setUploadFileType(2),Q||ee?this.handleVideoUpload(g(g({},e),{},{file:e.file.videoFile})):te?this.handleVideoUpload(e):void 0)}},{key:"handleVideoUpload",value:function(e){var t=this;return new Promise((function(n,i){t.uploadByCOS(e).then((function(e){n(e)})).catch((function(){t.uploadByCOS(e).then((function(e){n(e)})).catch((function(){i(new Bn({code:qn.MSG_V_UPLOAD_FAIL}))}))}))}))}},{key:"doUploadAudio",value:function(e){return e.file?e.file.size>this.UPLOAD_SIZE_LIMIT.A?this._checkSizeError("A"):0===e.file.size?En({code:qn.MSG_F_IS_EMPTY}):(this._setUploadFileType(3),this.uploadByCOS(e)):En({code:qn.MSG_A_UPLOAD_FAIL})}},{key:"uploadByCOS",value:function(e){var t,n,i,o,s=this;return Je(this._cosUploadMethod)?this.timUploadPlugin?this._uploadWithPreSigUrl(e):(t=new oi("upload"),n="".concat(this._n,".uploadByCOS"),i=Date.now(),o=this._getFile(e),new Promise((function(a,r){var c=Q?s._createCosOptionsWXMiniApp(e):s._createCosOptionsWeb(e),u=s;s._cosUploadMethod(c,(function(e,c){var l,d,p=Object.create(null);c?e||Ye(c.files)&&c.files[0].error?(l=new Bn({code:qn.MSG_F_UPLOAD_FAIL}),t.setError(l).end(),be.l("".concat(n," failed. error:"),c.files[0].error),403===c.files[0].error.statusCode&&s._getAuthorizationKey(),r(l)):(p.fileName=o.name,p.fileSize=o.size,p.fileType=o.type.slice(o.type.indexOf("/")+1).toLowerCase(),p.location=(Q?c:c.files[0].data).Location,l=Date.now()-i,c=u._formatFileSize(o.size),d=u._formatSpeed(1e3*o.size/l),c="size:".concat(c," time:").concat(l,"ms speed:").concat(d),be.l("".concat(n," success. name:").concat(o.name," ").concat(c)),a(p),(d=s.get(26)).addCost(Jn,l),d.addFileSize(Jn,o.size),t.setMessage(c).end()):(p=new Bn({code:qn.MSG_F_UPLOAD_FAIL}),t.setError(p).end(),be.w("".concat(n," failed. error:"),e),403===e.statusCode&&s._getAuthorizationKey(),r(p))}))}))):(this.warn("PluginUndetected"),En({code:qn.COS_UNDETECTED}))}},{key:"_uploadWithPreSigUrl",value:function(e){var t=this,n="".concat(this._n,"._uploadWithPreSigUrl"),i=this._getFile(e);return this._createCosOptionsPreSigUrl(e).then((function(e){return new Promise((function(o,s){var a=new oi("upload"),r=e.requestSnapshotUrl,c=void 0===r?void 0:r,u=f(e,Bo),l=Date.now();t._cosUploadMethod(u,(function(r,d){if(r||403===d.statusCode)a.setError(new Bn(r)).end(),h={HttpStatusCode:9999,CostTime:zt(l,!1),error:r,url:e.url},d.data&&d.data.uploadIP&&(h.uploadIP=d.data.uploadIP),t._uploadSSOLog(h),be.l("".concat(n," failed, error:"),r),s(new Bn({code:qn.MSG_F_UPLOAD_FAIL}));else{var p=Object.create(null),h=d.data.location||"",g=(t.isPrivateNetWork()||0!==h.indexOf("https://")&&0!==h.indexOf("http://")||(h=h.split("//")[1]),p.fileName=i.name,p.fileSize=i.size,p.fileType=i.type.slice(i.type.indexOf("/")+1).toLowerCase(),p.location=h,r=zt(l,!1),h=t._formatFileSize(i.size),t._formatSpeed(1e3*i.size/r));if(h="size:".concat(h," time:").concat(r,"ms speed:").concat(g," res:").concat(JSON.stringify(d.data)),be.l("".concat(n," ok. name:").concat(i.name," ").concat(h)),a.setMessage(h).end(),g={HttpStatusCode:d.statusCode,FileSize:i.size,CostTime:r,url:e.url},(d.data&&d.data.uploadIP&&(g.uploadIP=d.data.uploadIP),t._uploadSSOLog(g),h=t.get(26)).addCost(Jn,r),h.addFileSize(Jn,i.size),g=[],u.thumbUrl&&u.largeUrl&&g.push.apply(g,[t._getSmallImageInfoByUrl(u.thumbUrl,p),t._getLargeImageInfoByUrl(u.largeUrl,p)]),1===t.uploadFileType&&t.isSimpleCos&&!t.isPrivateNetWork()&&(g.push(t._getImageInfoArray(u.downloadUrl,p)),d.data.uploadIP)&&g.push(t._getDownloadIP(u.downloadUrl.split("//")[1].split("/")[0],p)),c&&g.push(t._getSnapshotInfoByUrl(c,p)),0>>18,128|t>>>12&63,128|t>>>6&63,128|63&t)}else t=65533;else t<=57343&&(t=65533);return t<=2047?ls(192|t>>>6,128|63&t):ls(224|t>>>12,128|t>>>6&63,128|63&t)},ps=function(e){for(var t=void 0===e?"":(""+e).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,ds),n=0|t.length,i=new Uint8Array(n),o=0;o=s&&(be.l("".concat(e._n,"._checkPromiseMap request timeout, delete requestID:").concat(n)),e._promiseMap.delete(n),i(new Bn({code:qn.NETWORK_TIMEOUT,data:{headSeq:t}})),e._chM.onRequestTimeout())}))}},{key:"_checkNativeAppWS",value:function(){$&&!this.isConnected()&&this._reConnect()}},{key:"onOpen",value:function(e){var t,n;this._readyState!==vs&&(this._onOpenTs=Date.now(),n=e.id,e=e.res,this._socketID=n,t=zt(this._startTs,!1),n="socketID:".concat(n," res:").concat(e),be.l("".concat(this._n,"._onOpen cost:").concat(t," ms. ").concat(n)),new oi("wsOnOpen").setMessage(t).setCostTime(t).setMoreMessage(n).end(),this._readyState=ms,this._reConnectCount=0,this._resend(),!0===this._reConnectFlag&&(this._chM.onReconnected(),this._reConnectFlag=!1),this._chM.onOpen())}},{key:"onClose",value:function(e){var t=new oi("wsOnClose"),n=e.id,i=(e=e.e,"sourceSocketID:".concat(n," currentSocketID:").concat(this._socketID," code:").concat(e.code," reason:").concat(e.reason)),o=0;0!==this._onOpenTs&&(o=Date.now()-this._onOpenTs),t.setMessage(o).setCostTime(o).setMoreMessage(i).setCode(e.code).end(!0),be.l("".concat(this._n,"._onClose ").concat(i," onlineTime:").concat(o)),n===this._socketID&&(this._readyState=vs,o<1e3?this._chM.onReconnectFailed():this._chM.onClose())}},{key:"onError",value:function(e){var t=e.id,n=(e=e.e,"sourceSocketID:".concat(t," currentSocketID:").concat(this._socketID));new oi("wsOnError").setMessage(e.errMsg||JSON.stringify(e,["message","code"])).setMoreMessage(n).setLevel("error").end(!0),be.w("".concat(this._n,"._onError"),e,n),t===this._socketID&&(this._readyState=vs,this._chM.onError())}},{key:"onMessage",value:function(e){var t,n,i,o,s,a;try{t=JSON.parse(e.data)}catch(r){new oi("jsonParseError").setMessage(e.data).end()}t&&t.head&&(e=this._getRequestIDFromHead(t.head),n=t.body,this._chM.get(30).isTRTCCommand(e)||(a=Nt(t.head),n=function e(t,n){var i,o,s;return Ye(t)?t.map((function(t){return ze(t)?e(t,n):t})):ze(t)?(i=t,o=function(e,t){return lt(n[t])?rs(t):n[t]},s={},Object.keys(i).forEach((function(e){s[o(i[e],e)]=i[e]})),Dt(s,(function(t){return Ye(t)||ze(t)?e(t,n):t}))):void 0}(t.body,this._getResKeyMap(a))),be.d("".concat(this._n,".onMessage ret:").concat(JSON.stringify(n)," requestID:").concat(e," has:").concat(this._promiseMap.has(e))),this._setNextPingTs(),this._promiseMap.has(e)?(i=(a=this._promiseMap.get(e)).resolve,o=a.reject,s=a.timestamp,a=a.headSeq,this._promiseMap.delete(e),this._calcRTT(s),n.errorCode&&0!==n.errorCode?(this._chM.onErrorCodeNotZero(n),o(new Bn({code:n.errorCode,message:n.errorInfo||"",data:e.includes(jn.MODIFY_C2C_MSG)||e.includes(jn.MODIFY_GRP_MSG)?{elements:n.elements,messageVersion:n.messageVersion,cloudCustomData:n.cloudCustomData,headSeq:a}:{headSeq:a}}))):i(Cn(n))):this._chM.onMessage({head:t.head,body:n}))}},{key:"_calcRTT",value:function(e){e=Date.now()-e,this._chM.get(26).addRTT(e)}},{key:"_connect",value:function(){this._readyState!==_s&&this._readyState!==ms&&(this._startTs=Date.now(),this._onOpenTs=0,this._readyState=_s,this._socket=new hs(this),this._socketID=this._socket.getID(),be.l("".concat(this._n,"._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled()," socketID:").concat(this._socketID," url:").concat(this.getURL())),new oi("wsConnect").setMessage("socketID:".concat(this._socketID," url:").concat(this.getURL())).end())}},{key:"getURL",value:function(){this._chM.isDevMode()&&(this._canIUseBinaryFrame=!1);var e=bt(),t=((W||V&&"windows"===e||$)&&(this._canIUseBinaryFrame=!1),-1),n=("ios"===e?t=ae||-1:"android"===e&&(t=ce||-1),this._chM.get(12)),i=this._chM.getPlatform(),o=n.getSDKAppID();return n=n.getInstanceID(),o="sdkappid=".concat(o,"&instanceid=").concat(n,"&random=").concat(this._getRandom(),"&platform=").concat(i,"&host=").concat(e)+"&version=".concat(t,"&sdkversion=").concat("3.5.5"),j&&(o+="&isminigame=1"),this._chM.canIUseInflate()&&(o+="&compress=gzip"),(this._canIUseBinaryFrame?"".concat(this._url,"/binfo?"):"".concat(this._url,"/info?")).concat(o)}},{key:"_closeConnection",value:function(e){be.l("".concat(this._n,"._closeConnection socketID:").concat(this._socketID)),this._socket&&(this._socket.close(e),this._socketID=-1,this._socket=null,this._readyState=vs)}},{key:"_resend",value:function(){var e=this;if(be.l("".concat(this._n,"._resend reConnectFlag:").concat(this._reConnectFlag),"promiseMap.size:".concat(this._promiseMap.size," simpleRequestMap.size:").concat(this._simpleRequestMap.size)),0>>=1:i=i>>>1^3988292384}return(4294967295^i)>>>0}},{key:"close",value:function(){be.l("".concat(this._n,".close")),this._closeConnection(4e3),this._promiseMap.clear(),this._startSequence=it(),this._readyState=vs,this._simpleRequestMap.clear(),this._reConnectFlag=!1,this._reConnectCount=0,this._onOpenTs=0,this._url="",this._random=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0}}]),Is=function(e,t,n){return new Promise((function(i,o){var s,a,r="application/x-www-form-urlencoded;charset=UTF-8";Q?ne.request({url:t,data:n,method:e,timeout:3e3,header:{"content-type":r},success:function(e){e&&e.data&&e.data.NetCheckInfo&&be.l("".concat("getconninfo ok in"," miniapp. ret:"),e.data),i()},fail:function(){o(new Bn({code:qn.NETWORK_ERROR}))}}):(s=new XMLHttpRequest,a=setTimeout((function(){s.abort(),o(new Bn({code:qn.NETWORK_TIMEOUT}))}),3e3),s.onreadystatechange=function(){4===s.readyState&&(a&&clearTimeout(a),200===s.status||304===s.status?(s.responseText&&-1=this._socketHandler.getNextPingTs()&&this._ping()}},{key:"dealloc",value:function(){this._socketHandler&&(this._socketHandler.close(),this._socketHandler=null),-1>>30-e)}function ws(e,t){for(var n=e.toString(16),i=t-n.length,o="0";0>>=1,o+=o)1&i&&(n=o+n);return n}u(Da,wn);var Us=s(Da,[{key:"_init",value:function(){this._updateCmdFreqLimitMap(Ds)}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("cmd_frequency_limit");lt(e)||(e=JSON.parse(e),this._updateCmdFreqLimitMap(e))}},{key:"_updateCmdFreqLimitMap",value:function(e){var t=this;e.forEach((function(e){t._cmdFreqLimitMap.set(e.cmd,{interval:e.interval,count:e.count})}))}},{key:"updateProtocolConfig",value:function(){this._pHandler.update()}},{key:"req",value:function(e){be.d("".concat(this._n,".req options:"),e);var t,n,i=e.P;return this._pHandler.has(i)?(t=(e=this.getProtocolData(e)).head.servcmd,this._isFreqOverLimit(t)?En({code:n=qn.OVER_FREQUENCY_LIMIT,message:this.getErrMsg(n,this._getCmd(t))}):this._isServerOverload(t)?En({code:n=qn.OPEN_SERVICE_OVERLOAD_ERROR,message:this.getErrMsg(n,this._getCmd(t))}):(n=this.get(21),Ts.includes(i)?n.simplySend(e):n.send(e))):(be.w("".concat(this._n,".req unknown P:").concat(i)),En({code:qn.NO_PROTOCOL}))}},{key:"getKeyMap",value:function(e){return this._pHandler.getKeyMap(e)}},{key:"genCommonHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:A,websdkversion:b,a2:e.getA2Key()||void 0,tinyid:e.getTinyID()||void 0,status_instid:e.getStatusInstanceID(),sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getA2Key()?void 0:e.getUserID(),usersig:e.getA2Key()?void 0:e.getUserSig(),sdkability:75689843,sdkability_ext:Ps(""),cappid:e.getApplicationID(),cs:0}}},{key:"genCosSpecifiedHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:A,websdkversion:b,sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getUserID(),usersig:e.getUserSig(),status_instid:e.getStatusInstanceID(),sdkability:75689843,sdkability_ext:Ps(""),cappid:e.getApplicationID(),cs:0}}},{key:"genSSOReportHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:A,websdkversion:b,sdkappid:e.getSDKAppID(),contenttype:"",reqtime:0,identifier:"",usersig:"",status_instid:e.getStatusInstanceID(),sdkability:75689843,sdkability_ext:Ps(""),cappid:e.getApplicationID(),cs:0}}},{key:"getProtocolData",value:function(e){return this._pHandler.getProtocolData(e)}},{key:"trans",value:function(e){var t=e.servcmd;return e=e.data,t={head:g(g({},this.genCommonHead()),{},{servcmd:t}),body:e},this.get(21).send(t)}},{key:"sendComboMessage",value:function(e){var t=e.servcmd;return e=e.data,t={head:g(g({},this.genCommonHead()),{},{servcmd:t}),body:e},this.get(21).send(t)}},{key:"onErrorCodeNotZero",value:function(e){var t,n=e.errorCode;n===qn.HELLO_ANSWER_KICKED_OUT&&(t=e.kickType,e=void 0===(e=e.newInstanceInfo)?{}:e,1===t?this.onMultipleAccountKickedOut(e):2===t?this.onMultipleDeviceKickedOut(e):3===t&&this.onRestApiKickedOut(e)),n!==qn.MSG_A2KEY_EXPIRED&&n!==qn.ACCOUNT_A2KEY_EXPIRED||(this._onUserSigExpired(),this.get(21).reConnect())}},{key:"onMessage",value:function(e){var t=(n=e.body).needAck,n=n.sessionData;1===(void 0===t?0:t)&&this._sendACK(n),this._msgDispatcher.onMessage(e)}},{key:"onReconnected",value:function(e){this._incrementalPullContactFlag=e<=300,this._reLoginOnReconnected()}},{key:"reLoginOnKickOther",value:function(){be.l("".concat(this._n,".reLoginOnKickOther")),this._reLogin()}},{key:"_reLoginOnReconnected",value:function(){be.l("".concat(this._n,"._reLoginOnReconnected")),this._reLogin()}},{key:"_reLogin",value:function(){var e,t,n,i=this,o="".concat(this._n,"._reLogin");this.isLoggedIn()&&(e=0,(t=this.get(1).getPushModule())&&(e=t.getUniAppPlatform()),n=new oi("reLogin"),this.req({P:jn.LOGIN,data:{isWebUniapp:e,customInfo:this.get(12).getCustomLoginInfo()}}).then((function(e){var t=(e=e.data).instanceID,s=(e=e.customStatus,i.get(12)),a=Bi(e),r=(s.setStatusInstanceID(t),i.get(21)),c=r.getSocketID();c="socketID:".concat(c," instanceID:").concat(t," customStatus:").concat(a),n.setMessage(c).end(!0),be.l("".concat(o," ok. ").concat(c)),s.getCustomStatus()!==a&&i.get(4).onUserStatusUpdated({dataList:[{to:i.getMyUserID(),statusType:E.USER_STATUS_ONLINE,customStatus:e}]}),r.diagnose(),i.get(11).syncConvList(i._incrementalPullContactFlag).then((function(){be.l("".concat(o,", sync conv list ok.")),i.get(25).start()})),((t=i.get(7))&&t.updateLocalMainSequenceOnReconnected(),c=i.get(10)).resetGetTopicTime(),c.getTopicListOnReconnected(),(s=i.get(35))&&s.clearCacheOnReconnected(),(a=i.get(8))&&a.updateCacheOnReconnected()})))}},{key:"onMultipleAccountKickedOut",value:function(e){this.get(1).onMultipleAccountKickedOut(e)}},{key:"onMultipleDeviceKickedOut",value:function(e){this.get(1).onMultipleDeviceKickedOut(e)}},{key:"_onUserSigExpired",value:function(){this.get(1).onUserSigExpired()}},{key:"onRestApiKickedOut",value:function(e){this.get(1).onRestApiKickedOut(e)}},{key:"_sendACK",value:function(e){this.req({P:jn.MSG_PUSH_ACK,data:{sessionData:e}})}},{key:"_isFreqOverLimit",value:function(e){var t,n,i,o;return e=e.split(".")[1],!!this._cmdFreqLimitMap.has(e)&&(!this._cmdReqInfoMap.has(e)||(t=(n=this._cmdFreqLimitMap.get(e)).count,n=n.interval,i=(o=this._cmdReqInfoMap.get(e)).startTime,o=o.requestCount,Date.now()-i>1e3*n)?(this._cmdReqInfoMap.set(e,{startTime:Date.now(),requestCount:1}),!1):(this._cmdReqInfoMap.set(e,{startTime:i,requestCount:o+=1}),t=this._expiredTime}},{key:"fetchConfig",value:function(){var e,t=this,n="".concat(this._n,".fetchConfig"),i=this._canFetch();be.l("".concat(n," canFetch:").concat(i)),i&&(e=new oi("fetchCloudCtrlConfig"),i=this.get(12).getSDKAppID(),this._isFetching=!0,this.req({P:jn.FETCH_CLOUD_CTRL_CONFIG,data:{SDKAppID:i,version:this._version}}).then((function(i){t._isFetching=!1;var o=(s=i.data).version,s=s.cloudControlConfig;e.setMessage("version:".concat(t._version," newVersion:").concat(o," config:").concat(s)).end(),be.l("".concat(n," ok")),t._parse(i.data)})).catch((function(i){t._isFetching=!1,e.setError(i).end(),be.l("".concat(n," failed. error:"),i),t._setExpiredTime(12e4)})))}},{key:"onPushedConfig",value:function(e){be.l("".concat(this._n,".onPushedConfig config:"),e),new oi("pushedCloudCtrlConfig").setMessage("newVersion:".concat(e.version," config:").concat(e.cloudControlConfig)).end(),this._parse(e)}},{key:"onCheckTimer",value:function(e){this._canFetch()&&this.fetchConfig()}},{key:"_parse",value:function(e){var t=this,n="".concat(this._n,"._parse"),i=e.errorCode,o=e.errorMessage,s=e.cloudControlConfig,a=e.version,r=e.expiredTime;if(0===i){if(this._version!==a){var c=null;try{c=JSON.parse(s)}catch(u){this.isPrivateNetWork()||be.e("".concat(n," failed. config:"),s)}c&&(this._cloudConfig.clear(),Object.keys(c).forEach((function(e){t._cloudConfig.set(e,c[e])})),this._version=a,this.emitIEvt(Ni.CLOUD_CONFIG),this.emitOEvt(S.SERVER_CONFIG_UPDATED,{config:c}))}this._setExpiredTime(1e3*r)}else lt(i)?(be.l("".concat(n," failed. Invalid message format:"),e),this._setExpiredTime(36e5)):(be.e("".concat(n," errorCode:").concat(i," errorMessage:").concat(o)),this._setExpiredTime(12e4))}},{key:"_setExpiredTime",value:function(e){this._expiredTime=Date.now()+e}},{key:"reset",value:function(){be.l("".concat(this._n,".reset")),this._cloudConfig.clear(),this._expiredTime=0,this._version=0,this._isFetching=!1}}])),xs=(u(Ta,wn),s(Ta,[{key:"start",value:function(){this._recoverGroupChat(),this._recoverC2CChat()}},{key:"_recoverGroupChat",value:function(){var e,t,n,i,o=this,s=this._getLocalConvList().filter((function(e){return e.type===E.CONV_GROUP&&e.groupProfile.type!==E.GRP_AVCHATROOM})),a=this.get(11),r=[];s.forEach((function(s){var c=s.conversationID;s=s.lastMessage,e=c.replace(E.CONV_GROUP,""),t=a.getLocalLastMessage(c),s&&0!==s.lastSequence&&t&&(n=s.lastSequence,t=t.sequence,i=n-t,0n[0])&&s",n[c].tag)}this.profile=new ji(g(g({},o),{},{profileCustomField:s}))}),[{key:"validate",value:function(e){var t,n=!0,i="";if(qe(e))return{valid:!1,tips:"empty options"};if(e.profileCustomField)for(var o=e.profileCustomField.length,s=null,a=0;a",e[s].tag)}}();this.timestamp=Date.now(),o.length=0}},{key:"updateProfile",value:function(e){this.profile=JSON.parse(JSON.stringify(e)),this.timestamp=Date.now()}},{key:"addToGroupList",value:function(e){-1===this.groupList.indexOf(e)&&(this.groupList.push(e),this.count=this.groupList.length)}},{key:"removeFromGroupList",value:function(e){-1<(e=this.groupList.indexOf(e))&&(this.groupList.splice(e,1),this.count=this.groupList.length)}}]),Ws=s((function e(t){i(this,e),this._snsM=t,this._n="FriendHandler",this._map=new Map,this._startIdx=0,this._standardSeq=0,this._customSeq=0,this._expirationTime=18e4}),[{key:"updateCacheOnReconnected",value:function(){this._startIdx=0,this._standardSeq=0,this._customSeq=0,this.pagingGetFriendList()}},{key:"getLocalFriendList",value:function(){return v(this._map.values())}},{key:"getFriendRemark",value:function(e){return this._map.has(e)?this._map.get(e).remark:""}},{key:"onFriendProfileModified",value:function(e){var t,n=this;qe(e=e.dataList)||(t=this._snsM.get(11),e.forEach((function(e){var i,o=e.userID;e=e.profileList,n.isMyFriend(o)&&(be.l("".concat(n._n,".onFriendProfileModified. friend account:").concat(o,", profileList:").concat(JSON.stringify(e))),(i=n._map.get(o)).update(e),t.modifyMessageSentByPeer({conversationID:"".concat(E.CONV_C2C).concat(o),latestNick:i.profile.nick,latestAvatar:i.profile.avatar}))})),this._onFriendListUpdated())}},{key:"onFriendAdded",value:function(e){var t=this;0!==e.length&&(be.l("".concat(this._n,".onFriendAdded userIDList:").concat(e)),e.forEach((function(e){t._map.set(e,new zs(e))})),this.getFriendProfile({userIDList:e}).then((function(n){e.forEach((function(e){var n=t._map.get(e);0 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(e),(t=this)._workerTimer.onmessage=function(e){e.data?(t._timerID=e.data,be.l("".concat(t._n,"._init seed:").concat(t._timerID))):t._m.onCheckTimer()})}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("enable_worker");be.l("".concat(this._n,"._onCloudConfig enableWorker:").concat(e)),lt(e)||"1"===e?!this._isWorkerEnabled&&he&&(this._isWorkerEnabled=!0,this.startWorkerTimer(),this._m.onWorkerTimerEnabled()):this._isWorkerEnabled&&he&&(this._isWorkerEnabled=!1,this.stopWorkerTimer(),this._m.onWorkerTimerDisabled())}},{key:"terminate",value:function(){be.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(){be.l("".concat(this._n,".reset"))}}])),Qs=s((function e(t){i(this,e),this._commercialConfigM=t,this._n="PurchasedFeatureHandler",this._isCSPluginReported=!1,this._featureMap=new Map}),[{key:"isValidPurchaseBits",value:function(e){return e&&"string"==typeof e&&1<=e.length&&e.length<=64&&/[01]{1,64}/.test(e)}},{key:"parsePurchaseBits",value:function(e){if(this.isValidPurchaseBits(e)){this._featureMap.clear();for(var t,n=e.length-1,i=0;0<=n;n--,i++)t=(i<32?new D(0,Math.pow(2,i)):new D(Math.pow(2,i-32),0)).toString(),"1"===e[n]?this._featureMap.set(t,!0):this._featureMap.set(t,!1)}else be.w("".concat(this._n,".parsePurchaseBits invalid purchasebits:").concat(e))}},{key:"hasPurchasedFeature",value:function(e){return!!this._featureMap.get(e)}},{key:"isFeatureEnabled",value:function(e){for(var t=parseInt(e).toString(2),n=void 0,i=!0,o=t.length-1,s=0;0<=o;o--,s++)if("1"===t.charAt(o)&&(n=(s<32?new D(0,Math.pow(2,s)):new D(Math.pow(2,s-32),0)).toString(),!this._featureMap.get(n))){i=!1;break}return be.l("".concat(this._n,".isFeatureEnabled decimalNumber:").concat(e," key:").concat(n," ret:").concat(i)),Sn({enabled:i})}},{key:"isFeatureEnabledForStat",value:function(e){for(var t=parseInt(e).toString(2),n=t.length-1,i=0;0<=n;n--,i++)if("1"===t.charAt(n)){if(o=(i<32?new D(0,Math.pow(2,i)):new D(Math.pow(2,i-32),0)).toString(),!this._featureMap.get(o))break;var o,s="",a=0;o===N.PLUGIN_TRANSLATE?(s="plugin_translate",a=16):o===N.PLUGIN_VOICE_TO_TEXT?(s="plugin_voice_to_text",a=17):o===N.PLUGIN_CS?(s="plugin_cs",a=14):o===N.PLUGIN_PUSH?(s="plugin_push",a=13):o===N.PLUGIN_BOT?(s="plugin_bot",a=15):o===N.MSG_REACTION&&(s="plugin_emoji_reaction",a=18),""!==s&&(o=this._commercialConfigM.get(12).getUIPlatform(),new oi(s).setCode(a).setUIPlatform(o).end(),be.l("".concat(this._n,".isFeatureEnabledForStat ").concat(s," code:").concat(a," uiPlatform:").concat(o)))}}},{key:"isCSPluginEnabled",value:function(){var e;this._isCSPluginReported||(e=this._commercialConfigM.get(12).getUIPlatform(),new oi("plugin_search").setCode(6).setUIPlatform(e).end(),this._isCSPluginReported=!0)}},{key:"clear",value:function(){this._featureMap.clear(),this._isCSPluginReported=!1}}]),Zs=s((function e(t){i(this,e),this._m=t,this._n="CommercialConfigModule",this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler=new Qs(this)}),[{key:"_canFetch",value:function(){return this.get(12).isLoggedIn()?!this._isFetching&&Date.now()>=this._expiredTime:(this._expiredTime=Date.now()+2e3,!1)}},{key:"onCheckTimer",value:function(e){this._canFetch()&&this.fetchConfig()}},{key:"fetchConfig",value:function(){var e,t,n=this,i=this._canFetch(),o="".concat(this._n,".fetchConfig");be.l("".concat(o," canFetch:").concat(i)),i&&(e=new oi("fetchCommercialConfig"),i=this.get(12).getSDKAppID(),t=this.get(20),this._isFetching=!0,t.req({P:jn.FETCH_COMMERCIAL_CONFIG,data:{SDKAppID:i}}).then((function(t){e.setMessage("purchaseBits:".concat(t.data.purchaseBits)).end(),be.l("".concat(o," ok.")),n._parseConfig(t.data),n._isFetching=!1})).catch((function(t){e.setError(t).end(),n._isFetching=!1})))}},{key:"onPushedConfig",value:function(e){var t="".concat(this._n,".onPushedConfig data:").concat(JSON.stringify(e));be.l("".concat(t)),new oi("pushedCommercialConfig").setMessage("purchaseBits:".concat(e.purchaseBits)).end(),this._parseConfig(e)}},{key:"_parseConfig",value:function(e){var t="".concat(this._n,"._parseConfig"),n=e.errorCode,i=e.errorMessage,o=e.purchaseBits,s=e.expiredTime;0===n?(this._purchasedFeatureHandler.parsePurchaseBits(o),this._expiredTime=Date.now()+1e3*s):lt(n)?(be.l("".concat(t," failed. Invalid message format:"),e),this._setExpiredTimeOnResponseError(36e5)):(be.e("".concat(t," errorCode:").concat(n," errorMessage:").concat(i)),this._setExpiredTimeOnResponseError(12e4))}},{key:"_setExpiredTimeOnResponseError",value:function(e){this._expiredTime=Date.now()+e}},{key:"canIUse",value:function(e){return this._purchasedFeatureHandler.hasPurchasedFeature(e)}},{key:"isFeatureEnabled",value:function(e){return this._purchasedFeatureHandler.isFeatureEnabled(e)}},{key:"isFeatureEnabledForStat",value:function(e){this._purchasedFeatureHandler.isFeatureEnabledForStat(e)}},{key:"isCSPluginEnabled",value:function(){this._purchasedFeatureHandler.isCSPluginEnabled()}},{key:"get",value:function(e){return this._m.get(e)}},{key:"reset",value:function(){be.l("".concat(this._n,".reset")),this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler.clear()}}]),ea=(u(Ma,wn),s(Ma,[{key:"registerPlugin",value:function(e){var t,n,i,o,s,a,r,c,u,l,d,p,h;$?(this._offlinePushPlugin=e["tim-offline-push-plugin"],t=(h=e.offlinePushConfig||{}).huaweiBusinessID,n=h.xiaomiBusinessID,i=h.xiaomiAppID,o=h.xiaomiAppKey,s=h.meizuBusinessID,a=h.meizuAppID,r=h.meizuAppKey,c=h.vivoBusinessID,u=h.oppoBusinessID,l=h.oppoAppKey,d=h.oppoAppSecret,p=h.honorBusinessID,h=h.iosBusinessID,this._androidPushConfig.huaweiPushBussinessId=t,this._androidPushConfig.xiaomiPushBussinessId=n,this._androidPushConfig.xiaomiPushAppId=i,this._androidPushConfig.xiaomiPushAppKey=o,this._androidPushConfig.meizuPushBussinessId=s,this._androidPushConfig.meizuPushAppId=a,this._androidPushConfig.meizuPushAppKey=r,this._androidPushConfig.vivoPushBussinessId=c,this._androidPushConfig.oppoPushBussinessId=u,this._androidPushConfig.oppoPushAppKey=l,this._androidPushConfig.oppoPushAppSecret=d,this._androidPushConfig.honorPushBussinessId=p,new oi("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!lt(this._offlinePushPlugin))).end(!0),be.l("".concat(this._n,".").concat("registerPlugin"," ok. offlinePushConfig:").concat(JSON.stringify(e.offlinePushConfig))),this._iosBusinessID=h,this._setAppShowListener()):this.warn("OfflinePushInUniapp")}},{key:"init",value:function(){this._isWebUniapp=this.getUniAppPlatform(),this._getDeviceToken()}},{key:"_getDeviceToken",value:function(){var e,t=this,n="".concat(this._n,".").concat("_getDeviceToken");Je(this._offlinePushPlugin.getDeviceToken)?(e="androidPushConfig:".concat(JSON.stringify(this._androidPushConfig),", iosBusinessID:").concat(this._iosBusinessID),be.l("".concat(n," start. ").concat(e)),new oi("_getDeviceToken").setMessage("".concat(e)).end(!0),this._offlinePushPlugin.getDeviceToken(this._androidPushConfig,(function(i){var o,s,a,r,c=new oi("getDeviceTokenRes"),u=i.code,l=i.msg;0===u?(o=(r=i.data).deviceToken,s=r.deviceBrand,a=r.deviceType,r=r.bussinessId,t._deviceToken=o,t._businessID=r||t._iosBusinessID,e="deviceToken:".concat(o,", deviceBrand:").concat(s||a,", businessID:").concat(t._businessID),be.l("".concat(n," ok. ").concat(e)),c.setMessage(e).end(!0),t._setToken()):(c.setMessage("code:".concat(u,", msg:").concat(l)).end(!0),be.e("".concat(n," failed. error:"),i))}))):be.e("".concat(n," getDeviceToken is not a function"))}},{key:"canIUseOfflinePush",value:function(){return $&&!lt(this._offlinePushPlugin)}},{key:"_setAppShowListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setAppShowListener");lt(this._offlinePushPlugin)?be.e("".concat(t," offlinePushPlugin is undefined")):Je(this._offlinePushPlugin.setAppShowListener)?(new oi("_setAppShowListener").end(!0),be.l("".concat(t," start")),this._offlinePushPlugin.setAppShowListener((function(n){n=(n||{}).appShow,new oi("setAppShowListenerRes").setMessage("appShow:".concat(n)).end(!0),be.l("".concat(t," ok. appShow:").concat(n)),e._m.isReady()&&(0===n?(e._getConvUnreadCount(),e._onBackground()):1===n&&e._onForeground())}))):be.e("".concat(t," setAppShowListener is not a function"))}},{key:"getDeviceBrand",value:function(){var e;if(!lt(this._offlinePushPlugin)&&Je(this._offlinePushPlugin.getDeviceType))return e=(this._offlinePushPlugin.getDeviceType()||{}).deviceType,be.l("".concat(this._n,".getDeviceBrand ok. deviceType:").concat(e)),e}},{key:"_setToken",value:function(){var e="".concat(this._n,"._setToken"),t=this.get(12),n=1,i="",o="",s=(qe(this._deviceToken)&&(n=0),this.getUniAppPlatform()),a=this.getDeviceBrand(),r=(s===O.IOS||s===O.IPAD||s===O.MAC?o=this._deviceToken:s===O.ANDROID&&(i=this._deviceToken),new oi("offlinePushSetToken"));return s="deviceToken:".concat(o||i,", businessID:").concat(this._businessID,", ")+"deviceBrand:".concat(a,", isWebUniapp:").concat(this._isWebUniapp,", pushMsg:").concat(n,", platform:").concat(s),r.setMessage("".concat(s)),be.l("".concat(e," ").concat(s)),this.req({P:jn.SET_TOKEN,data:{tokenID:i,pushMsg:n,sdkAppID:t.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:a,deviceToken:o,isWebUniapp:this._isWebUniapp}}).then((function(t){return r.end(),be.l("".concat(e," ok")),t})).catch((function(t){return r.setError(t).end(),be.e("".concat(e," failed. error:"),t),En(t)}))}},{key:"_getConvUnreadCount",value:function(){var e=this;this._c2cUnreadCount=0,this._groupUnreadCount=0,this.get(11).getLocalConvList().forEach((function(t){t.type===E.CONV_C2C&&(e._c2cUnreadCount+=t.unreadCount),t.type===E.CONV_GROUP&&(e._groupUnreadCount+=t.unreadCount)}))}},{key:"_onBackground",value:function(){var e=this,t="".concat(this._n,".").concat("_onBackground"),n=new oi("_onBackground");this.req({P:jn.STAT_BACKGROUND,data:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then((function(i){return n.setMessage("c2cUnreadCount: ".concat(e._c2cUnreadCount,", groupUnreadCount: ").concat(e._groupUnreadCount)).end(),be.l("".concat(t," ok")),i})).catch((function(e){n.setError(e).end(),be.e("".concat(t," failed. error:"),e)}))}},{key:"_onForeground",value:function(){var e="".concat(this._n,".").concat("_onForeground"),t=new oi("_onForeground");this.req({P:jn.STAT_FOREGROUND,data:{isWebUniapp:this._isWebUniapp}}).then((function(n){return t.end(),be.l("".concat(e," ok")),n})).catch((function(n){t.setError(n).end(),be.e("".concat(e," failed. error:"),n)}))}},{key:"getUniAppPlatform",value:function(){var e=Nn.getSystemInfoSync().platform,t=this.getDeviceBrand();return"ios"===e?O.IOS:"android"===e?O.ANDROID:1002===t?O.IPAD:1001===t?O.MAC:void 0}},{key:"reset",value:function(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,be.l("".concat(this._n,".reset"))}}])),ta=(u(Ia,wn),s(Ia,[{key:"registerPlugin",value:function(e){var t,n,i;$?(t="".concat(this._n,".").concat("registerPlugin"),this._pushPlugin=e["tim-push"],this._getDeviceInfo(),n=(i=e.pushConfig||{}).androidConfig,i=i.iOSConfig,ze(n)&&(this._androidPushConfig=n[this._deviceInfo.packageName]),n=(i||{}).iOSBusinessID,this._iOSBusinessID=n,i=!lt(this._pushPlugin),new oi("registerPlugin").setMessage(this._pluginName).setMoreMessage("isExisted:".concat(i)).end(!0),be.l("".concat(t," ok. pushConfig:").concat(JSON.stringify(e.pushConfig))),i?(this._setAppShowListener(),this._setPushEventReportListener()):be.e("".concat(t," ").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 e=this,t="".concat(this._n,".").concat("_reportEventCacheList");Je(this._pushPlugin.getPushEventCacheList)?(new oi("_reportEventCacheList").end(!0),this._pushPlugin.getPushEventCacheList((function(n){var i=n.code,o=n.data.eventList,s=new oi("getPushEventCacheListRes");if(s.setCode(i),0!==i)s.setMessage("res:".concat(JSON.stringify(n))).end(!0),be.e("".concat(t," failed. error:").concat(JSON.stringify(n)));else{i=o.length<10?"eventList:".concat(JSON.stringify(o)):"eventList.length:".concat(o.length),be.l("".concat(t," ok. ").concat(i)),s.setMessage(i).end(!0);for(var a=g(g({},n.data),{},{eventList:[]});0=this._expiredTime&&this._getLexicon()}},{key:"filterMessage",value:function(e,t){var n=!0;if(this._plugin&&this._canIUseLexicon&&(!t||!t.messageControlInfo||!0!==t.messageControlInfo.excludedFromContentModeration)){t=e.type;var i=e.conversationType;if(t===E.MSG_TEXT||t===E.MSG_CUSTOM){var o,s="".concat(this._n,".filterMessage");if(be.l("".concat(s)),t===E.MSG_TEXT){if(i===E.CONV_C2C?o="c2c_text_message":i===E.CONV_GROUP&&(o="group_text_message"),!this._isConfigOn(o))return n;var a=(r=this._plugin.filter(e.payload.text)).type,r=r.modifiedText;1===a?n=!1:2===a&&(e.payload.text=r)}else if(t===E.MSG_CUSTOM){if(i===E.CONV_C2C?o="c2c_custom_message":i===E.CONV_GROUP&&(o="group_custom_message"),!this._isConfigOn(o))return n;a=this._plugin.filter(e.payload.data),r=this._plugin.filter(e.payload.description),t=this._plugin.filter(e.payload.extension),1===a.type||1===r.type||1===t.type?n=!1:(2===a.type&&(e.payload.data=a.modifiedText),2===r.type&&(e.payload.description=r.modifiedText),2===t.type&&(e.payload.extension=t.modifiedText))}be.l("".concat(s," done. isAllowedToSend:").concat(n))}}return n}},{key:"filterText",value:function(e,t){var n="".concat(this._n,".filterText"),i={isAllowedToSend:!0,modifiedText:e};return this._plugin&&this._canIUseLexicon&&this._isConfigOn(t)&&(be.l("".concat(n)),e=(t=this._plugin.filter(e)).type,t=t.modifiedText,1===e?i.isAllowedToSend=!1:2===e&&(i.modifiedText=t),be.l("".concat(n," done. ret:"),i)),i}},{key:"_getLexicon",value:function(){var e=this,t=new oi("profanityFilter"),n="".concat(this._n,"._getLexicon");this._isFetching=!0,this.req({P:jn.GET_PROFANITY_LIST,data:{startIndex:this._startIndex,version:this._version}}).then((function(i){var o=(i=i.data).errorInfo,s=i.filterConfig,a=i.lexicon,r=i.strToken,c=i.completeFlag,u=i.nextStartIndex,l=i.version,d=(i=i.expiredTime,o.errorCode),p=o.errorMessage;return 0!==d?(e._isFetching=!1,be.w("".concat(n," failed. error:"),o),void t.setCode(d).setMessage(p).end()):(e._onFilterConfig(s),e._getToken(r),1===c?(be.l("".concat(n," done. version:").concat(l," expiredTime:").concat(i)),e._version=l,e._canIUseLexicon=!0,e._isFetching=!1,e._expiredTime=Date.now()+1e3*i,void e._plugin.onLexiconCompleted(a)):(e._startIndex=u,e._plugin.onLexiconSliced(a),void e._getLexicon()))})).catch((function(i){t.setError(i).end(),e._isFetching=!1,be.l("".concat(n," failed. error:"),i)}))}},{key:"_onFilterConfig",value:function(e){var t=this;qe(e)||(this._filterConfigMap.clear(),Object.keys(e).forEach((function(n){t._filterConfigMap.set(n,e[n])})),be.l("".concat(this._n,"._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys())," values:").concat(Array.from(this._filterConfigMap.values()))))}},{key:"_isConfigOn",value:function(e){return 1===this._filterConfigMap.get(e)}},{key:"_getToken",value:function(e){if(ut(e)){var t=e.length,n="";if(t%2==0)for(var i=0;i<=t-1;i+=2)n=(n+=e[i+1])+e[i];else{for(var o=0;o=this.STORAGE_EXPIRES_TIME,e=!e||"3.5.5"!==e,be.l("".concat(this._n,"._needToUpdate isTimeout:").concat(t," isDifferentVersion:").concat(e)),t||e}},{key:"_fetch",value:function(){this._m.get(12).isPrivateNetWork()||this._fetchWithRetry()}},{key:"_fetchWithRetry",value:function(){var e=this;this._fetchAdapter().catch((function(){e.CURRENT_DOMAIN!==B&&(e._generateCurrentDomain(),e._fetchWithRetry())}))}},{key:"_generateCurrentDomain",value:function(){this.CURRENT_DOMAIN===x?this.CURRENT_DOMAIN=F:this.CURRENT_DOMAIN===F&&(this.CURRENT_DOMAIN=B)}},{key:"_fetchAdapter",value:function(){var e="https://".concat(this.CURRENT_DOMAIN,"/im/download/error-message/v3/0.0.7/tim-error-message.txt"),t="application/x-www-form-urlencoded;charset=UTF-8",n="".concat(this._n,"._fetchAdapter ok in"),i=this;return new Promise((function(o,s){var a,r;Q?ne.request({url:e,method:"GET",timeout:3e3,header:{"content-type":t},dataType:"text",success:function(e){i._fillAndSave(e.data),be.l("".concat(n," mini program.")),o()},fail:function(e){s(e)}}):(a=new XMLHttpRequest,r=setTimeout((function(){a.abort()}),3e3),a.onreadystatechange=function(){4===a.readyState&&(r&&clearTimeout(r),200===a.status||304===a.status?(be.l("".concat(n," browser.")),i._fillAndSave(a.responseText),o()):s(a.status))},a.onerror=function(e){s(e)},a.open("GET",e,!0),a.setRequestHeader("Content-type",t),a.send())}))}},{key:"_fillAndSave",value:function(e){this._fillMap(e),this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE,JSON.stringify({message:e,localSavedTime:(new Date).getTime(),localSavedVersion:"3.5.5"}),!0,!1)}},{key:"_getStorageModule",value:function(){return this._m.get(13)}},{key:"_fillMap",value:function(e){this._map.clear();for(var t,n,i=e.split(";\n"),o=i.length,s=new RegExp(/'/g),a=0;aSe()-this.EXPIRED_TIME}},{key:"_createPromiseList",value:function(e){for(var t=[],n=0;nthis.MAX_COUNT?this.MAX_COUNT:e,this._clearFollowList())}},{key:"clearCacheOnReconnected",value:function(){this._clearFollowList()}},{key:"onFollowNotify",value:function(e){var t=this;e=e.dataList||[],be.l("".concat(this._n,".onFollowNotify followChangeList:").concat(e.length)),e.forEach((function(e){var n=void 0===(n=e.followDiffList)?[]:n,i=(e=f(e,pa)).from,o=f(e,ha);n.forEach((function(e){var n=e.isAdd,s=(e=void 0===(e=e.followType)?0:e,t._initFollowInfo());1===n?(o.userID=i,s[e].userInfoList.push(o),s[e].isAdd=!0):(s[e].userInfoList.push(i),s[e].isAdd=!1),t._emitEvent(s)}))}))}},{key:"_initFollowInfo",value:function(){var e={};return Object.values(ga).forEach((function(t){t!==ga.NONE&&(e[t]={userInfoList:[],isAdd:!1})})),e}},{key:"_emitEvent",value:function(e){var t=this;Object.keys(e).forEach((function(n){n=Number(n);var i=e[n];0>>16&65535,a=0;0!==n;){for(n-=a=2e3>>8^o[255&(e^t[a])];return~e}function ba(e,t,n,i,o,s,a,r){var c,u,l,d,p,h,g,f,m,_=r.bits,v=0,y=0,I=0,M=0,C=0,S=0,E=0,T=0,k=0,D=0,R=null,O=0,b=new ma.Buf16(16),A=new ma.Buf16(16),L=null,P=0;for(v=0;v<=15;v++)b[v]=0;for(y=0;yh?(f=L[P+a[y]],R[O+a[y]]):(f=96,0),c=1<<(g=v-E),I=u=1<>E)+(u-=c)]=g<<24|f<<16|m,0!==u;);for(c=1<>=1;if(D=0!==c?(D&c-1)+c:0,y++,0==--b[v]){if(v===M)break;v=t[n+a[y]]}if(C>>1:n>>>1;e[t]=n}return e}(),La=[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],Pa=[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],Na=[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],wa=[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 Ua(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,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 ma.Buf16(320),this.work=new ma.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function xa(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ma.Buf32(852),t.distcode=t.distdyn=new ma.Buf32(592),t.sane=1,t.back=-1,0):-2}function Fa(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,xa(e)):-2}function Ba(e,t){var n,i;return!e||!e.state||(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=e.wsize?(ma.arraySet(e.window,t,n-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((o=e.wsize-e.wnext)>i&&(o=i),ma.arraySet(e.window,t,n-i,o,e.wnext),(i-=o)?(ma.arraySet(e.window,t,n-i,i,0),e.wnext=i,e.whave=e.wsize):(e.wnext+=o,e.wnext===e.wsize&&(e.wnext=0),e.whave>>8&255,n.check=Oa(n.check,D,2,0),l=u=0,n.mode=2;else if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31)e.msg="incorrect header check",n.mode=30;else if(8!=(15&u))e.msg="unknown compression method",n.mode=30;else{if(l-=4,C=8+(15&(u>>>=4)),0===n.wbits)n.wbits=C;else if(C>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(D[0]=255&u,D[1]=u>>>8&255,n.check=Oa(n.check,D,2,0)),l=u=0,n.mode=3;case 3:for(;l<32;){if(0===r)break e;r--,u+=i[s++]<>>8&255,D[2]=u>>>16&255,D[3]=u>>>24&255,n.check=Oa(n.check,D,4,0)),l=u=0,n.mode=4;case 4:for(;l<16;){if(0===r)break e;r--,u+=i[s++]<>8),512&n.flags&&(D[0]=255&u,D[1]=u>>>8&255,n.check=Oa(n.check,D,2,0)),l=u=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===r)break e;r--,u+=i[s++]<>>8&255,n.check=Oa(n.check,D,2,0)),l=u=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((h=(h=n.length)>r?r:h)&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),ma.arraySet(n.head.extra,i,s,h,C)),512&n.flags&&(n.check=Oa(n.check,i,h,s)),r-=h,s+=h,n.length-=h),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===r)break e;for(h=0;C=i[s+h++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C)),C&&h>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;l<32;){if(0===r)break e;r--,u+=i[s++]<>>=7&l,l-=7&l,n.mode=27;else{for(;l<3;){if(0===r)break e;r--,u+=i[s++]<>>=1)){case 0:n.mode=14;break;case 1:O=b=void 0;var O,b=n;if(Ha){for(Va=new ma.Buf32(512),ja=new ma.Buf32(32),O=0;O<144;)b.lens[O++]=8;for(;O<256;)b.lens[O++]=9;for(;O<280;)b.lens[O++]=7;for(;O<288;)b.lens[O++]=8;for(ba(1,b.lens,0,288,Va,0,b.work,{bits:9}),O=0;O<32;)b.lens[O++]=5;ba(2,b.lens,0,32,ja,0,b.work,{bits:5}),Ha=!1}if(b.lencode=Va,b.lenbits=9,b.distcode=ja,b.distbits=5,n.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}u>>>=2,l-=2}break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===r)break e;r--,u+=i[s++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&u,l=u=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(h=n.length){if(0===(h=c<(h=r>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},S=ba(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,S){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,v=65535&k,!((m=k>>>24)<=l);){if(0===r)break e;r--,u+=i[s++]<>>=m,l-=m,n.lens[n.have++]=v;else{if(16===v){for(T=m+2;l>>=m,l-=m,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}C=n.lens[n.have-1],h=3+(3&u),u>>>=2,l-=2}else if(17===v){for(T=m+3;l>>=m)),u>>>=3,l=l-m-3}else{for(T=m+7;l>>=m)),u>>>=7,l=l-m-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;h--;)n.lens[n.have++]=C}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,E={bits:n.lenbits},S=ba(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,S){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},S=ba(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,S){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=r&&258<=c){e.next_out=a,e.avail_out=c,e.next_in=s,e.avail_in=r,n.hold=u,n.bits=l,H=q=U=w=N=P=L=A=ie=ne=te=ee=Z=Q=X=J=$=Y=W=z=K=j=V=B=F=void 0;var A,L,P,N,w,U,G=e,x=p,F=G.state,B=G.next_in,q=G.input,V=B+(G.avail_in-5),j=G.next_out,H=G.output,K=j-(x-G.avail_out),z=j+(G.avail_out-257),W=F.dmax,Y=F.wsize,$=F.whave,J=F.wnext,X=F.window,Q=F.hold,Z=F.bits,ee=F.lencode,te=F.distcode,ne=(1<>>=L=A>>>24,Z-=L,0==(L=A>>>16&255))H[j++]=65535&A;else{if(!(16&L)){if(!(64&L)){A=ee[(65535&A)+(Q&(1<>>=L,Z-=L),Z<15&&(Q+=q[B++]<>>=L=A>>>24,Z-=L,!(16&(L=A>>>16&255))){if(!(64&L)){A=te[(65535&A)+(Q&(1<W){G.msg="invalid distance too far back",F.mode=30;break t}if(Q>>>=L,Z-=L,N>(L=j-K)){if((L=N-L)>$&&F.sane){G.msg="invalid distance too far back",F.mode=30;break t}if(U=X,(w=0)===J){if(w+=Y-L,L>3,Q&=(1<<(Z-=P<<3))-1,G.next_in=B,G.next_out=j,G.avail_in=B>>16&255,v=65535&k,!((m=k>>>24)<=l);){if(0===r)break e;r--,u+=i[s++]<>y)])>>>16&255,v=65535&k,!(y+(m=k>>>24)<=l);){if(0===r)break e;r--,u+=i[s++]<>>=y,l-=y,n.back+=y}if(u>>>=m,l-=m,n.back+=m,n.length=v,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=12;break}if(64&_){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(T=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(k=n.distcode[u&(1<>>16&255,v=65535&k,!((m=k>>>24)<=l);){if(0===r)break e;r--,u+=i[s++]<>y)])>>>16&255,v=65535&k,!(y+(m=k>>>24)<=l);){if(0===r)break e;r--,u+=i[s++]<>>=y,l-=y,n.back+=y}if(u>>>=m,l-=m,n.back+=m,64&_){e.msg="invalid distance code",n.mode=30;break}n.offset=v,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(T=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===c)break e;if(n.offset>(h=p-c)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}g=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),f=n.window}else f=o,g=a-n.offset,h=n.length;for(c-=h=c>10&1023,s[a++]=56320|1023&n)}var c=s,u=a;if(u<65534&&(c.subarray&&Ya||!c.subarray&&Wa))return String.fromCharCode.apply(null,ma.shrinkBuf(c,u));for(var l="",d=0;d>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(t.dictionary):"[object ArrayBuffer]"===nr.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=za.inflateSetDictionary(this.strm,t.dictionary))!==er.Z_OK)throw new Error(tr[e])}function or(e,t){if((t=new ir(t)).push(e,!0),t.err)throw t.msg||tr[t.err];return t.result}ir.prototype.push=function(e,t){var n,i,o,s,a,r=this.strm,c=this.options.chunkSize,u=this.options.dictionary,l=!1;if(this.ended)return!1;i=t===~~t?t:!0===t?er.Z_FINISH:er.Z_NO_FLUSH,"string"==typeof e?r.input=function(e){for(var t=new ma.Buf8(e.length),n=0,i=t.length;ne.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+$a[e[n]]>t?n:t}(r.output,r.next_out),s=r.next_out-o,a=Xa(r.output,o),r.next_out=s,r.avail_out=c-s,s&&ma.arraySet(r.output,r.output,o,s,0),this.onData(a)):this.onData(ma.shrinkBuf(r.output,r.next_out))),0===r.avail_in&&0===r.avail_out&&(l=!0)}while((0"," %c"),"background:#ff9d00; padding:1px; border-radius:3px; color: #fff","background:transparent",t):console.log("IM SDK API ->",t)),(t=this.getErrMsg("DOCS_GUIDE"))&&console.log(t),t=this.getErrMsg("IOS_WEBVIEW_WARNING"),me)&&t&&console.warn(t),be.setLevel(e)}},{key:"createTextMessage",value:function(e){return this._get(2).createTextMessage(e)}},{key:"createTextAtMessage",value:function(e){return this._get(2).createTextMessage(e)}},{key:"createImageMessage",value:function(e){return this._get(2).createImageMessage(e)}},{key:"createAudioMessage",value:function(e){return this._get(2).createAudioMessage(e)}},{key:"createVideoMessage",value:function(e){return this._get(2).createVideoMessage(e)}},{key:"createCustomMessage",value:function(e){return this._get(2).createCustomMessage(e)}},{key:"createFaceMessage",value:function(e){return this._get(2).createFaceMessage(e)}},{key:"createFileMessage",value:function(e){return this._get(2).createFileMessage(e)}},{key:"createLocationMessage",value:function(e){return this._get(2).createLocationMessage(e)}},{key:"createMergerMessage",value:function(e){return this._get(2).createMergerMessage(e)}},{key:"downloadMergerMessage",value:function(e){return e.type!==E.MSG_MERGER?En({code:qn.MSG_MERGER_TYPE_INVALID}):qe(e.payload.downloadKey)?En({code:qn.MSG_MERGER_KEY_INVALID}):this._get(2).downloadMergerMessage(e).catch((function(e){return En({code:qn.MSG_MERGER_DOWNLOAD_FAIL})}))}},{key:"createForwardMessage",value:function(e){return this._get(2).createForwardMessage(e)}},{key:"sendMessage",value:function(e,t){return e instanceof ki?this._get(2).sendMessageInstance(e,t):En({code:qn.MSG_INSTANCE_REQUIRED})}},{key:"callExperimentalAPI",value:function(e,t){return"sendComboMessage"===e?this._get(31).sendMessage(t):"handleGroupInvitation"===e?this._get(7).handleGroupInvitation(t):"isCommercialAbilityEnabled"===e?this._get(27).isFeatureEnabled(t):"isFeatureEnabledForStat"===e?this._get(27).isFeatureEnabledForStat(t):"isIntl"===e?this.isIntl():"sendTRTCCustomData"===e||"sendRoomCustomData"===e?this._get(30).sendTRTCCustomData(t):"getTimerID"===e?this._m.getTimerID():"getPollingTimerID"===e?this._m.getPollingTimerID(t):"setApplicationID"===e?(this._get(12).setApplicationID(t),void this._get(20).updateProtocolConfig()):"getServerConfig"===e?this._get(23).getServerConfig(t):"canIUseModule"===e?this._m.canIUseModule(t):"startMessageLongPolling"===e?this._get(7).startMessageLongPolling(t):"stopMessageLongPolling"===e?this._get(7).stopMessageLongPolling(t):"disableMessagePullOnInvite"===e?this._get(11).disableMsgPullOnInvite(t):"clearLocalMessage"===e?this._get(11).clearMemMsg(t,!1):"setCustomLoginInfo"===e?this._get(12).setCustomLoginInfo(t):"statTUIKeyFeatures"===e?this._m.statTUIKeyFeatures(t):"getGroupReceiptsByUsers"===e?this._get(7).getGroupReceiptsByUsers(t):En({code:qn.INVALID_OPERATION})}},{key:"revokeMessage",value:function(e){return this._get(2).revokeMessage(e)}},{key:"resendMessage",value:function(e,t){return e instanceof ki?this._get(2).resendMessage(e,t):En({code:qn.MSG_INSTANCE_REQUIRED})}},{key:"deleteMessage",value:function(e){return this._get(2).deleteMessage(e)}},{key:"translateText",value:function(e){return this._get(2).translateText(e)}},{key:"convertVoiceToText",value:function(e){return this._get(2).convertVoiceToText(e)}},{key:"setMessageExtensions",value:function(e,t){return this._get(3).setMessageExtensions(e,t)}},{key:"getMessageExtensions",value:function(e){return this._get(3).getMessageExtensions(e)}},{key:"deleteMessageExtensions",value:function(e,t){return this._get(3).deleteMessageExtensions(e,t)}},{key:"addMessageReaction",value:function(e,t){return this._get(34).addMessageReaction(e,t)}},{key:"removeMessageReaction",value:function(e,t){return this._get(34).removeMessageReaction(e,t)}},{key:"getMessageReactions",value:function(e){return this._get(34).getMessageReactions(e)}},{key:"getAllUserListOfMessageReaction",value:function(e){return this._get(34).getAllUserListOfMessageReaction(e)}},{key:"modifyMessage",value:function(e){return this._get(2).modifyRemoteMessage(e)}},{key:"getMessageList",value:function(e){return this._get(11).getMessageList(e)}},{key:"getMessageListHopping",value:function(e){return this._get(11).getMessageListHopping(e)}},{key:"sendMessageReadReceipt",value:function(e){return this._get(11).sendReadReceipt(e)}},{key:"getMessageReadReceiptList",value:function(e){return this._get(11).getReadReceiptList(e)}},{key:"getGroupMessageReadMemberList",value:function(e){var t=this._get(7);return t?t.getReadReceiptDetail(e):En({code:qn.NO_MODULE})}},{key:"findMessage",value:function(e){return this._get(11).findMessage(e)}},{key:"setMessageRead",value:function(e){return this._get(11).setMessageRead(e)}},{key:"getConversationList",value:function(e){return this._get(11).getConvList(e)}},{key:"getConversationProfile",value:function(e){return this._get(11).getConversationProfile(e)}},{key:"deleteConversation",value:function(e){return this._get(11).deleteConversation(e)}},{key:"setConversationDraft",value:function(e){return this._get(11).setConvDraft(e)}},{key:"clearHistoryMessage",value:function(e){return this._get(11).clearHistoryMessage(e)}},{key:"pinConversation",value:function(e){return this._get(11).pinConversation(e)}},{key:"setAllMessageRead",value:function(e){return this._get(11).setAllMessageRead(e)}},{key:"setMessageRemindType",value:function(e){return this._get(11).setMessageRemindType(e)}},{key:"setAllReceiveMessageOpt",value:function(e){return this._get(11).setAllRcvMsgOpt(e)}},{key:"getAllReceiveMessageOpt",value:function(){return this._get(11).getAllRcvMsgOpt()}},{key:"getTotalUnreadMessageCount",value:function(){return this._get(11).getTotalUnreadCount()}},{key:"setConversationCustomData",value:function(e){return this._get(11).setConvCustomData(e)}},{key:"markConversation",value:function(e){return this._get(11).markConv(e)}},{key:"getConversationGroupList",value:function(){return this._get(11).getConvGroupList()}},{key:"createConversationGroup",value:function(e){return this._get(11).createConvGroup(e)}},{key:"deleteConversationGroup",value:function(e){return this._get(11).deleteConvGroup(e)}},{key:"renameConversationGroup",value:function(e){return this._get(11).renameConvGroup(e)}},{key:"addConversationsToGroup",value:function(e){return this._get(11).addConvsToGroup(e)}},{key:"deleteConversationsFromGroup",value:function(e){return this._get(11).deleteConvsFromGroup(e)}},{key:"searchCloudMessages",value:function(e){var t=this._get(38);return t?t.searchCloudMessages(e):En({code:qn.NO_MODULE})}},{key:"searchCloudUsers",value:function(e){var t=this._get(38);return t?t.searchCloudUsers(e):En({code:qn.NO_MODULE})}},{key:"searchCloudGroups",value:function(e){var t=this._get(38);return t?t.searchCloudGroups(e):En({code:qn.NO_MODULE})}},{key:"searchCloudGroupMembers",value:function(e){var t=this._get(38);return t?t.searchCloudGroupMembers(e):En({code:qn.NO_MODULE})}},{key:"getMyProfile",value:function(){return this._get(4).getMyProfile()}},{key:"getUserProfile",value:function(e){return this._get(4).getUserProfile(e)}},{key:"updateMyProfile",value:function(e){return this._get(4).updateMyProfile(e)}},{key:"getBlacklist",value:function(){return this._get(4).getLocalBlacklist()}},{key:"addToBlacklist",value:function(e){return this._get(4).addBlacklist(e)}},{key:"removeFromBlacklist",value:function(e){return this._get(4).deleteBlacklist(e)}},{key:"setSelfStatus",value:function(e){return this._get(4).setSelfStatus(e)}},{key:"getUserStatus",value:function(e){return this._get(4).getUserStatus(e)}},{key:"subscribeUserStatus",value:function(e){return this._get(4).subscribeUserStatus(e)}},{key:"unsubscribeUserStatus",value:function(e){return this._get(4).unsubscribeUserStatus(e)}},{key:"getFriendList",value:function(){var e=this._get(8);return e?e.getLocalFriendList():En({code:qn.NO_MODULE})}},{key:"addFriend",value:function(e){var t=this._get(8);return t?t.addFriend(e):En({code:qn.NO_MODULE})}},{key:"deleteFriend",value:function(e){var t=this._get(8);return t?t.deleteFriend(e):En({code:qn.NO_MODULE})}},{key:"checkFriend",value:function(e){var t=this._get(8);return t?t.checkFriend(e):En({code:qn.NO_MODULE})}},{key:"getFriendProfile",value:function(e){var t=this._get(8);return t?t.getFriendProfile(e):En({code:qn.NO_MODULE})}},{key:"updateFriend",value:function(e){var t=this._get(8);return t?t.updateFriend(e):En({code:qn.NO_MODULE})}},{key:"getFriendApplicationList",value:function(){var e=this._get(8);return e?e.getLocalFriendApplicationList():En({code:qn.NO_MODULE})}},{key:"acceptFriendApplication",value:function(e){var t=this._get(8);return t?t.acceptFriendApplication(e):En({code:qn.NO_MODULE})}},{key:"refuseFriendApplication",value:function(e){var t=this._get(8);return t?t.refuseFriendApplication(e):En({code:qn.NO_MODULE})}},{key:"deleteFriendApplication",value:function(e){var t=this._get(8);return t?t.deleteFriendApplication(e):En({code:qn.NO_MODULE})}},{key:"setFriendApplicationRead",value:function(){var e=this._get(8);return e?e.setFriendApplicationRead():En({code:qn.NO_MODULE})}},{key:"getFriendGroupList",value:function(){var e=this._get(8);return e?e.getLocalFriendGroupList():En({code:qn.NO_MODULE})}},{key:"createFriendGroup",value:function(e){var t=this._get(8);return t?t.createFriendGroup(e):En({code:qn.NO_MODULE})}},{key:"deleteFriendGroup",value:function(e){var t=this._get(8);return t?t.deleteFriendGroup(e):En({code:qn.NO_MODULE})}},{key:"addToFriendGroup",value:function(e){var t=this._get(8);return t?t.addToFriendGroup(e):En({code:qn.NO_MODULE})}},{key:"removeFromFriendGroup",value:function(e){var t=this._get(8);return t?t.removeFromFriendGroup(e):En({code:qn.NO_MODULE})}},{key:"renameFriendGroup",value:function(e){var t=this._get(8);return t?t.renameFriendGroup(e):En({code:qn.NO_MODULE})}},{key:"followUser",value:function(e){var t=this._get(35);return t?t.followUser(e):En({code:qn.NO_MODULE})}},{key:"unfollowUser",value:function(e){var t=this._get(35);return t?t.unfollowUser(e):En({code:qn.NO_MODULE})}},{key:"getMyFollowersList",value:function(e){var t=this._get(35);return t?t.getMyFollowersList(e):En({code:qn.NO_MODULE})}},{key:"getMyFollowingList",value:function(e){var t=this._get(35);return t?t.getMyFollowingList(e):En({code:qn.NO_MODULE})}},{key:"getMutualFollowersList",value:function(e){var t=this._get(35);return t?t.getMutualFollowersList(e):En({code:qn.NO_MODULE})}},{key:"getUserFollowInfo",value:function(e){var t=this._get(35);return t?t.getUserFollowInfo(e):En({code:qn.NO_MODULE})}},{key:"checkFollowType",value:function(e){var t=this._get(35);return t?t.checkFollowType(e):En({code:qn.NO_MODULE})}},{key:"getGroupList",value:function(){var e=this._get(7);return e?e.getGroupList():En({code:qn.NO_MODULE})}},{key:"getGroupProfile",value:function(e){var t=this._get(7);return t?t.getGroupProfile(e):En({code:qn.NO_MODULE})}},{key:"createGroup",value:function(e){var t=this._get(7);return t?t.createGroup(e):En({code:qn.NO_MODULE})}},{key:"dismissGroup",value:function(e){var t=this._get(7);return t?t.dismissGroup(e):En({code:qn.NO_MODULE})}},{key:"updateGroupProfile",value:function(e){var t=this._get(7);return t?t.updateGroupProfile(e):En({code:qn.NO_MODULE})}},{key:"joinGroup",value:function(e){var t=this._get(7);return t?t.joinGroup(e):En({code:qn.NO_MODULE})}},{key:"quitGroup",value:function(e){var t=this._get(7);return t?t.quitGroup(e):En({code:qn.NO_MODULE})}},{key:"searchGroupByID",value:function(e){var t=this._get(7);return t?t.searchGroupByID(e):En({code:qn.NO_MODULE})}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this._get(7);return t?t.getGroupOnlineMemberCount(e):En({code:qn.NO_MODULE})}},{key:"changeGroupOwner",value:function(e){var t=this._get(7);return t?t.changeGroupOwner(e):En({code:qn.NO_MODULE})}},{key:"getGroupApplicationList",value:function(){var e=this._get(7);return e?e.getGroupApplicationList():En({code:qn.NO_MODULE})}},{key:"handleGroupApplication",value:function(e){var t=this._get(7);return t?t.handleGroupApplication(e):En({code:qn.NO_MODULE})}},{key:"initGroupAttributes",value:function(e){var t=this._get(7);return t?t.initGroupAttributes(e):En({code:qn.NO_MODULE})}},{key:"setGroupAttributes",value:function(e){var t=this._get(7);return t?t.setGroupAttributes(e):En({code:qn.NO_MODULE})}},{key:"deleteGroupAttributes",value:function(e){var t=this._get(7);return t?t.deleteGroupAttributes(e):En({code:qn.NO_MODULE})}},{key:"getGroupAttributes",value:function(e){var t=this._get(7);return t?t.getGroupAttributes(e):En({code:qn.NO_MODULE})}},{key:"setGroupCounters",value:function(e){var t=this._get(7);return t?t.setGroupCounters(e):En({code:qn.NO_MODULE})}},{key:"increaseGroupCounter",value:function(e){var t=this._get(7);return t?t.increaseGroupCounter(e):En({code:qn.NO_MODULE})}},{key:"decreaseGroupCounter",value:function(e){var t=this._get(7);return t?t.decreaseGroupCounter(e):En({code:qn.NO_MODULE})}},{key:"getGroupCounters",value:function(e){var t=this._get(7);return t?t.getGroupCounters(e):En({code:qn.NO_MODULE})}},{key:"getGroupMemberList",value:function(e){var t=this._get(7);return t?t.getGroupMemberList(e):En({code:qn.NO_MODULE})}},{key:"getGroupMemberProfile",value:function(e){var t=this._get(7);return t?t.getGroupMemberProfile(e):En({code:qn.NO_MODULE})}},{key:"addGroupMember",value:function(e){var t=this._get(7);return t?t.addGroupMember(e):En({code:qn.NO_MODULE})}},{key:"deleteGroupMember",value:function(e){var t=this._get(7);return t?t.deleteGroupMember(e):En({code:qn.NO_MODULE})}},{key:"setGroupMemberMuteTime",value:function(e){var t=this._get(7);return t?t.setGroupMemberMuteTime(e):En({code:qn.NO_MODULE})}},{key:"setGroupMemberRole",value:function(e){var t=this._get(7);return t?t.setGroupMemberRole(e):En({code:qn.NO_MODULE})}},{key:"setGroupMemberNameCard",value:function(e){var t=this._get(7);return t?t.setGroupMemberNameCard(e):En({code:qn.NO_MODULE})}},{key:"setGroupMemberCustomField",value:function(e){var t=this._get(7);return t?t.setGroupMemberCustomField(e):En({code:qn.NO_MODULE})}},{key:"markGroupMemberList",value:function(e){var t=this._get(7);return t?t.markGroupMemberList(e):En({code:qn.NO_MODULE})}},{key:"getJoinedCommunityList",value:function(){return this._get(10).getJoinedCommunityList()}},{key:"createTopicInCommunity",value:function(e){return this._get(10).createTopicInCommunity(e)}},{key:"deleteTopicFromCommunity",value:function(e){return this._get(10).deleteTopicFromCommunity(e)}},{key:"updateTopicProfile",value:function(e){return this._get(10).updateTopicProfile(e)}},{key:"getTopicList",value:function(e){return this._get(10).getTopicList(e)}},{key:"addSignalingListener",value:function(e,t,n){var i=this._get(33);i&&i.addSignalingListener(e,this._safetyCallbackFactory.defense(e,t,n),n)}},{key:"removeSignalingListener",value:function(e,t,n){var i,o=this._safetyCallbackFactory.find(e,t);null!==o&&(i=this._get(33))&&(i.removeSignalingListener(e,o,n),this._safetyCallbackFactory.delete(e,t))}},{key:"invite",value:function(e){var t=this._get(33);return t?t.invite(e):En({code:qn.NO_MODULE})}},{key:"inviteSync",value:function(e,t,n){var i=this._get(33);return i?i.inviteSync(e,t,n):""}},{key:"inviteInGroup",value:function(e){var t=this._get(33);return t?t.invite(e):En({code:qn.NO_MODULE})}},{key:"inviteInGroupSync",value:function(e,t,n){var i=this._get(33);return i?i.inviteSync(e,t,n):""}},{key:"cancel",value:function(e){var t=this._get(33);return t?t.cancel(e):En({code:qn.NO_MODULE})}},{key:"accept",value:function(e){var t=this._get(33);return t?t.accept(e):En({code:qn.NO_MODULE})}},{key:"reject",value:function(e){var t=this._get(33);return t?t.reject(e):En({code:qn.NO_MODULE})}},{key:"getSignalingInfo",value:function(e){var t=this._get(33);return t?t.getSignalingInfo(e):null}},{key:"modifyInvitation",value:function(e){var t=this._get(33);return t?t.modifyInvitation(e):En({code:qn.NO_MODULE})}}]),yr={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 Ir(e){return i(this,Ir),(e=n(this,Ir,[e]))._n="CSModule",e}var Mr={};return(Un={}).create=function(e){var t,n,i,o="TencentCloudChat.create",s=0;if(Ke(i=e.SDKAppID))s=i;else if(s=parseInt(i),isNaN(i))return be.e("".concat(o," failed. Failed to parse the SDKAppID, please check the arguments")),null;return s&&Mr[s]?Mr[s]:(be.l("".concat(o)),(i=new vr(g(g({},e),{},{SDKAppID:s}))).on(S.SDK_DESTROY,(function(e){Mr[e.data.SDKAppID]=null,delete Mr[e.data.SDKAppID]})),t=i,n=Object.create(null),Object.keys(Fn).forEach((function(e){var i;t[e]&&(i=new k,n[e]=function(){var n=Array.from(arguments);return i.use((function(n,i){a=e;var o,s,a=!(!(o=t).isReady()&&1!==yr[a])||(s={code:s=o.getNotReadyReason(),message:"".concat(o.getErrMsg(s)," | ").concat(a," | ").concat(o.getErrMsg(qn.SDK_IS_NOT_READY))},o.onError(s),s);return!0===a?i():En(a)})).use((function(t,n){if(!0===function(e,t,n){if(void 0===t)return!0;var i=!0;if(We(t))Object.keys(t).forEach((function(o){var s=1===e.length?e[0][o]:void 0;i=!!Yt(s,t[o],n,o)&&i}));else if(Ye(t))for(var o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=void 0!==Og?Og:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u=void 0!==Pn&&"function"==typeof Pn.getSystemInfoSync&&Boolean(Pn.getSystemInfoSync().fontSizeSetting),l="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),d="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),p="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),h="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),g=void 0!==Nn&&"undefined"==typeof window&&"function"==typeof Nn.requireNativePlugin,f=g&&"ios"===Nn.getDeviceInfo().platform.toLocaleLowerCase(),m=(g&&Nn.getDeviceInfo().platform.toLocaleLowerCase(),u||l||d||p||h||g),_=void 0!==c&&(void 0!==c.nativeModuleProxy||void 0!==c.ReactNative),v=l?qq:d?tt:p?swan:h?my:u?Pn:g?Nn:{},y=function(e){if("object"!==n(e)||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return t===i};function I(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(y(e)){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}return!1}var M=function(){function e(){i(this,e),this._n="WebRequest"}return s(e,[{key:"request",value:function(e,n){var i=this,o="".concat(this._n,".request"),s=e.downloadUrl||"",a=(e.method||"PUT").toUpperCase(),r=e.url;if(console.log("%c tim-upload-plugin %c","background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent","".concat(o," URL:").concat(r)),e.qs){var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"=";return I(e)?"":y(e)?Object.keys(e).map((function(i){var o=encodeURIComponent(i)+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(e)})).join(t):o+encodeURIComponent(e[i])})).filter(Boolean).join(t):void 0}(e.qs);c&&(r+="".concat(-1===r.indexOf("?")?"?":"&").concat(c))}var u=new XMLHttpRequest;u.open(a,r,!0),u.responseType=e.dataType||"text";var l=e.headers||{};if(e.uploadByIP&&(l=t(t({},l),{},{host:e.uploadIP})),!I(l))for(var d in l)l.hasOwnProperty(d)&&"content-length"!==d.toLowerCase()&&"user-agent"!==d.toLowerCase()&&"origin"!==d.toLowerCase()&&"host"!==d.toLowerCase()&&u.setRequestHeader(d,l[d]);return u.onload=function(){if(200===u.status)n(null,i._xhrRes(u,i._xhrBody(u,s,e.uploadByIP&&e.uploadIP),l));else{if(e.uploadIP&&-1===e.url.indexOf(e.uploadIP))return e.url=(o=e.url,a=e.uploadIP,o.replace(/^http(s)?:\/\/(.*?)\//,"https://".concat(a,"/"))),e.uploadByIP=!0,i.request(e,n);var t={code:u.status,message:JSON.stringify(u.responseText)};n(t,i._xhrRes(u,i._xhrBody(u,s,e.uploadByIP&&e.uploadIP),l))}var o,a},u.onerror=function(t){var o=i._xhrBody(u,s,e.uploadByIP&&e.uploadIP),a={code:u.status,message:JSON.stringify(u.responseText)};o||u.statusText||0!==u.status||(t.message="CORS blocked or network error"),n(a,i._xhrRes(u,o)),a=null},e.onProgress&&u.upload&&(u.upload.onprogress=function(t){var n=t.total,i=t.loaded,o=Math.floor(100*i/n);e.onProgress({total:n,loaded:i,percent:(o>=100?100:o)/100})}),u.send(e.resources),u}},{key:"_xhrRes",value:function(e,t){var n={};return e.getAllResponseHeaders().trim().split("\n").forEach((function(e){if(e){var t=e.indexOf(":"),i=e.substr(0,t).trim().toLowerCase(),o=e.substr(t+1).trim();n[i]=o}})),{statusCode:e.status,statusMessage:e.statusText,headers:n,data:t}}},{key:"_xhrBody",value:function(e,t,n){return 200===e.status&&t?{location:t,uploadIP:n}:{response:e.responseText,uploadIP:n}}}]),e}(),C=["unknown","image","video","audio","log"],S=["name"],E=function(){function e(){i(this,e)}return s(e,[{key:"request",value:function(e,n){var i=this,o=e.resources,s=void 0===o?"":o,a=e.headers,c=void 0===a?{}:a,u=e.url,l=e.downloadUrl,d=void 0===l?"":l,p=u,g=null,m=d.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/),_=decodeURIComponent(m[3]),y=_.indexOf("?")>-1?_.split("?")[0]:_,I={key:e.fileKey?e.fileKey:y,success_action_status:200,"Content-Type":""},M={};if(f){var E=u.split("?sign=");if(E.length>1){var T=E[1];p="".concat(E[0],"?sign=").concat(encodeURIComponent("".concat(T))),M.sign=decodeURIComponent(T),M.signature=decodeURIComponent(T)}}var k={url:p,header:c,name:"file",filePath:s,formData:t(t({},I),M),timeout:e.timeout||3e5};if(h){var D=k;D.name,k=t(t({},r(D,S)),{},{fileName:"file",fileType:C[e.fileType]})}return(g=v.uploadFile(t(t({},k),{},{success:function(e){i._handleResponse({response:e,downloadUrl:d,callback:n})},fail:function(e){i._handleResponse({response:e,downloadUrl:d,callback:n})}}))).onProgressUpdate&&g.onProgressUpdate((function(t){e.onProgress&&e.onProgress({total:t.totalBytesExpectedToSend,loaded:t.totalBytesSent,percent:Math.floor(t.progress)/100})})),g}},{key:"_handleResponse",value:function(e){var n=e.downloadUrl,i=e.response,o=e.callback,s=i.header,a={};if(s)for(var r in s)s.hasOwnProperty(r)&&(a[r.toLowerCase()]=s[r]);var c=+i.statusCode;200===c?o(null,{statusCode:c,headers:a,data:t(t({},i.data),{},{location:n})}):o({code:c,message:JSON.stringify(i.data)},{statusCode:c,headers:a,data:void 0})}}]),e}(),T=function(){function e(){i(this,e)}return s(e,[{key:"request",value:function(e,t){var n=this,i=e.resources,o=void 0===i?"":i,s=e.fileKey,a=void 0===s?"":s,r=e.url,c=e.downloadUrl,u=void 0===c?"":c,l=new FormData;l.append("key",a),l.append("success_action_status",200),l.append("file",{uri:o,type:"application/octet-stream",name:"uploaded_file"}),fetch(r,{method:"POST",headers:{"Content-Type":"multipart/form-data"},body:l}).then((function(e){n._handleResponse({response:e,downloadUrl:u,callback:t})})).catch((function(e){n._handleResponse({response:e,downloadUrl:u,callback:t})}))}},{key:"_handleResponse",value:function(e){var t=e.downloadUrl,n=e.response,i=e.callback,o=n.headers,s=n.status,a=o&&o.map||{};200===s?i(null,{statusCode:200,headers:a,data:{location:t}}):i({code:s,message:JSON.stringify(n)},{statusCode:s,headers:a,data:void 0})}}]),e}();return function(){function e(){i(this,e),this.retry=1,this.tryCount=0,this.systemClockOffset=0,this.httpRequest=m?new E:_?new T:new M,console.log("TIMUploadPlugin.VERSION: ".concat("1.4.2"))}return s(e,[{key:"uploadFile",value:function(e,t){var n=this;return this.httpRequest.request(e,(function(i,o){i&&n.tryCount=3e4&&(this.systemClockOffset=r-a,t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0)}return t}}],[{key:"getVersion",value:function(){return"1.4.2"}}]),e}()}();const Ug=bg(wg.exports);var Gg={exports:{}};Gg.exports=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(c)throw a}}}}var c,u,l=function(){for(var e=" \t\r\n~!@#$%^&*()_+-=【】、{}|;':\",。、《》?αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩①②③④⑤⑥⑦⑧⑨⑩⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇≈≡≠=≤≥<>≮≯∷±+-×÷/∫∮∝∞∧∨∑∏∪∩∈∵∴⊥∥∠⌒⊙≌∽√§№☆★○●◎◇◆□℃‰€■△▲※→←↑↓〓¤°#&@\︿_ ̄―♂♀┌┍┎┐┑┒┓─┄┈├┝┞┟┠┡┢┣│┆┊┬┭┮┯┰┱┲┳┼┽┾┿╀╁╂╃└┕┖┗┘┙┚┛━┅┉┤┥┦┧┨┩┪┫┃┇┋┴┵┶┷┸┹┺┻╋╊╉╈╇╆╅╄",t=new Map,n=0,i=e.length;n1&&(c+=u),p){if(a=!0,!n)break;var g=this._map.get(d)||"*";s=t.replace(new RegExp(d,"gi"),g)}}return{isMatched:a,modifiedText:s}}},{key:"reset",value:function(){this._trieTree={},this._map=null}}]),t}(),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Og?Og:"undefined"!=typeof self?self:{},h={},g=(c=function(e,t){var n,i,o,s,a,r,c,u,l,d,g,f,m;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==p&&p.crypto&&(t=p.crypto),!t)try{t=h}catch(m){}var n=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(m){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(m){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},r=s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes,o=e.sigBytes;if(this.clamp(),i%4)for(var s=0;s>>2]>>>24-s%4*8&255;t[i+s>>>2]|=a<<24-(i+s)%4*8}else for(s=0;s>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i>>2]>>>24-o%4*8&255;i.push((s>>>4).toString(16)),i.push((15&s).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new r.init(n,t/2)}},l=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],o=0;o>>2]>>>24-o%4*8&255;i.push(String.fromCharCode(s))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new r.init(n,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},g=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,i=this._data,o=i.words,s=i.sigBytes,a=this.blockSize,c=s/(4*a),u=(c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0))*a,l=e.min(4*u,s);if(u){for(var d=0;d>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,r=0;r<4&&s+.75*r>>6*(3-r)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-s%4*2;i[o>>>2]|=r<<24-o%4*8,o++}return a.create(i,o)}(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,o=e[i];e[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var s=this._hash.words,r=e[t+0],c=e[t+1],h=e[t+2],g=e[t+3],f=e[t+4],m=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],I=e[t+9],M=e[t+10],C=e[t+11],S=e[t+12],E=e[t+13],T=e[t+14],k=e[t+15],D=s[0],R=s[1],O=s[2],b=s[3];D=u(D,R,O,b,r,7,a[0]),b=u(b,D,R,O,c,12,a[1]),O=u(O,b,D,R,h,17,a[2]),R=u(R,O,b,D,g,22,a[3]),D=u(D,R,O,b,f,7,a[4]),b=u(b,D,R,O,m,12,a[5]),O=u(O,b,D,R,_,17,a[6]),R=u(R,O,b,D,v,22,a[7]),D=u(D,R,O,b,y,7,a[8]),b=u(b,D,R,O,I,12,a[9]),O=u(O,b,D,R,M,17,a[10]),R=u(R,O,b,D,C,22,a[11]),D=u(D,R,O,b,S,7,a[12]),b=u(b,D,R,O,E,12,a[13]),O=u(O,b,D,R,T,17,a[14]),D=l(D,R=u(R,O,b,D,k,22,a[15]),O,b,c,5,a[16]),b=l(b,D,R,O,_,9,a[17]),O=l(O,b,D,R,C,14,a[18]),R=l(R,O,b,D,r,20,a[19]),D=l(D,R,O,b,m,5,a[20]),b=l(b,D,R,O,M,9,a[21]),O=l(O,b,D,R,k,14,a[22]),R=l(R,O,b,D,f,20,a[23]),D=l(D,R,O,b,I,5,a[24]),b=l(b,D,R,O,T,9,a[25]),O=l(O,b,D,R,g,14,a[26]),R=l(R,O,b,D,y,20,a[27]),D=l(D,R,O,b,E,5,a[28]),b=l(b,D,R,O,h,9,a[29]),O=l(O,b,D,R,v,14,a[30]),D=d(D,R=l(R,O,b,D,S,20,a[31]),O,b,m,4,a[32]),b=d(b,D,R,O,y,11,a[33]),O=d(O,b,D,R,C,16,a[34]),R=d(R,O,b,D,T,23,a[35]),D=d(D,R,O,b,c,4,a[36]),b=d(b,D,R,O,f,11,a[37]),O=d(O,b,D,R,v,16,a[38]),R=d(R,O,b,D,M,23,a[39]),D=d(D,R,O,b,E,4,a[40]),b=d(b,D,R,O,r,11,a[41]),O=d(O,b,D,R,g,16,a[42]),R=d(R,O,b,D,_,23,a[43]),D=d(D,R,O,b,I,4,a[44]),b=d(b,D,R,O,S,11,a[45]),O=d(O,b,D,R,k,16,a[46]),D=p(D,R=d(R,O,b,D,h,23,a[47]),O,b,r,6,a[48]),b=p(b,D,R,O,v,10,a[49]),O=p(O,b,D,R,T,15,a[50]),R=p(R,O,b,D,m,21,a[51]),D=p(D,R,O,b,S,6,a[52]),b=p(b,D,R,O,g,10,a[53]),O=p(O,b,D,R,M,15,a[54]),R=p(R,O,b,D,c,21,a[55]),D=p(D,R,O,b,y,6,a[56]),b=p(b,D,R,O,k,10,a[57]),O=p(O,b,D,R,_,15,a[58]),R=p(R,O,b,D,E,21,a[59]),D=p(D,R,O,b,f,6,a[60]),b=p(b,D,R,O,C,10,a[61]),O=p(O,b,D,R,h,15,a[62]),R=p(R,O,b,D,I,21,a[63]),s[0]=s[0]+D|0,s[1]=s[1]+R|0,s[2]=s[2]+O|0,s[3]=s[3]+b|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var s=e.floor(i/4294967296),a=i;n[15+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var r=this._hash,c=r.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return r},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,i,o,s,a){var r=e+(t&n|~t&i)+o+a;return(r<>>32-s)+t}function l(e,t,n,i,o,s,a){var r=e+(t&i|n&~i)+o+a;return(r<>>32-s)+t}function d(e,t,n,i,o,s,a){var r=e+(t^n^i)+o+a;return(r<>>32-s)+t}function p(e,t,n,i,o,s,a){var r=e+(n^(t|~i))+o+a;return(r<>>32-s)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),u=(c=r).lib,l=u.WordArray,d=u.Hasher,g=c.algo,f=[],m=g.SHA1=d.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],s=n[2],a=n[3],r=n[4],c=0;c<80;c++){if(c<16)f[c]=0|e[t+c];else{var u=f[c-3]^f[c-8]^f[c-14]^f[c-16];f[c]=u<<1|u>>>31}var l=(i<<5|i>>>27)+r+f[c];l+=c<20?1518500249+(o&s|~o&a):c<40?1859775393+(o^s^a):c<60?(o&s|o&a|s&a)-1894007588:(o^s^a)-899497514,r=a,a=s,s=o<<30|o>>>2,o=i,i=l}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+r|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=d.clone.call(this);return e._hash=this._hash.clone(),e}}),c.SHA1=d._createHelper(m),c.HmacSHA1=d._createHmacHelper(m),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),i=2;i<=n;i++)if(!(t%i))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var i=2,o=0;o<64;)t(i)&&(o<8&&(a[o]=n(e.pow(i,.5))),c[o]=n(e.pow(i,1/3)),o++),i++}();var u=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],s=n[2],a=n[3],r=n[4],l=n[5],d=n[6],p=n[7],h=0;h<64;h++){if(h<16)u[h]=0|e[t+h];else{var g=u[h-15],f=(g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3,m=u[h-2],_=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[h]=f+u[h-7]+_+u[h-16]}var v=i&o^i&s^o&s,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),I=p+((r<<26|r>>>6)^(r<<21|r>>>11)^(r<<7|r>>>25))+(r&l^~r&d)+c[h]+u[h];p=d,d=l,l=r,r=a+I|0,a=s,s=o,o=i,i=I+(y+v)|0}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+r|0,n[5]=n[5]+l|0,n[6]=n[6]+d|0,n[7]=n[7]+p|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(i/4294967296),n[15+(o+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],o=0;o>>2]>>>16-o%4*8&65535;i.push(String.fromCharCode(s))}return i.join("")},parse:function(e){for(var n=e.length,i=[],o=0;o>>1]|=e.charCodeAt(o)<<16-o%2*16;return t.create(i,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],s=0;s>>2]>>>16-s%4*8&65535);o.push(String.fromCharCode(a))}return o.join("")},parse:function(e){for(var n=e.length,o=[],s=0;s>>1]|=i(e.charCodeAt(s)<<16-s%2*16);return t.create(o,2*n)}}}(),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,i=[],o=0;o>>2]|=e[o]<<24-o%4*8;t.call(this,i,n)}else t.apply(this,arguments)}).prototype=e}}(), -/** @preserve - (c) 2012 by C��dric Mesnil. All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,s=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),a=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,o=e[i];e[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r,p,y,I,M,C,S,E,T,k,D,R=this._hash.words,O=l.words,b=d.words,A=s.words,L=a.words,P=c.words,N=u.words;for(C=r=R[0],S=p=R[1],E=y=R[2],T=I=R[3],k=M=R[4],n=0;n<80;n+=1)D=r+e[t+A[n]]|0,D+=n<16?h(p,y,I)+O[0]:n<32?g(p,y,I)+O[1]:n<48?f(p,y,I)+O[2]:n<64?m(p,y,I)+O[3]:_(p,y,I)+O[4],D=(D=v(D|=0,P[n]))+M|0,r=M,M=I,I=v(y,10),y=p,p=D,D=C+e[t+L[n]]|0,D+=n<16?_(S,E,T)+b[0]:n<32?m(S,E,T)+b[1]:n<48?f(S,E,T)+b[2]:n<64?g(S,E,T)+b[3]:h(S,E,T)+b[4],D=(D=v(D|=0,N[n]))+k|0,C=k,k=T,T=v(E,10),E=S,S=D;D=R[1]+y+T|0,R[1]=R[2]+I+k|0,R[2]=R[3]+M+C|0,R[3]=R[4]+r+S|0,R[4]=R[0]+p+E|0,R[0]=D},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,s=o.words,a=0;a<5;a++){var r=s[a];s[a]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}return o},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,n){return e^t^n}function g(e,t,n){return e&t|~e&n}function f(e,t,n){return(e|~t)^n}function m(e,t,n){return e&n|t&~n}function _(e,t,n){return e^(t|~n)}function v(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(p),e.HmacRIPEMD160=i._createHmacHelper(p)}(),function(){var e=r,t=e.lib.Base,n=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var i=e.blockSize,o=4*i;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var s=this._oKey=t.clone(),a=this._iKey=t.clone(),r=s.words,c=a.words,u=0;u>>24)|4278255360&(s<<24|s>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(R=n[o]).high^=a,R.low^=s}for(var r=0;r<24;r++){for(var p=0;p<5;p++){for(var h=0,g=0,f=0;f<5;f++)h^=(R=n[p+5*f]).high,g^=R.low;var m=d[p];m.high=h,m.low=g}for(p=0;p<5;p++){var _=d[(p+4)%5],v=d[(p+1)%5],y=v.high,I=v.low;for(h=_.high^(y<<1|I>>>31),g=_.low^(I<<1|y>>>31),f=0;f<5;f++)(R=n[p+5*f]).high^=h,R.low^=g}for(var M=1;M<25;M++){var C=(R=n[M]).high,S=R.low,E=c[M];E<32?(h=C<>>32-E,g=S<>>32-E):(h=S<>>64-E,g=C<>>64-E);var T=d[u[M]];T.high=h,T.low=g}var k=d[0],D=n[0];for(k.high=D.high,k.low=D.low,p=0;p<5;p++)for(f=0;f<5;f++){var R=n[M=p+5*f],O=d[M],b=d[(p+1)%5+5*f],A=d[(p+2)%5+5*f];R.high=O.high^~b.high&A.high,R.low=O.low^~b.low&A.low}R=n[0];var L=l[r];R.high^=L.high,R.low^=L.low}},_doFinalize:function(){var t=this._data,n=t.words,o=(this._nDataBytes,8*t.sigBytes),s=32*this.blockSize;n[o>>>5]|=1<<24-o%32,n[(e.ceil((o+1)/s)*s>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,r=this.cfg.outputLength/8,c=r/8,u=[],l=0;l>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),u.push(h),u.push(p)}return new i.init(u,r)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,s=e.algo;function a(){return i.create.apply(i,arguments)}var c=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=a()}();var l=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],s=n[2],a=n[3],r=n[4],l=n[5],d=n[6],p=n[7],h=i.high,g=i.low,f=o.high,m=o.low,_=s.high,v=s.low,y=a.high,I=a.low,M=r.high,C=r.low,S=l.high,E=l.low,T=d.high,k=d.low,D=p.high,R=p.low,O=h,b=g,A=f,L=m,P=_,N=v,w=y,U=I,G=M,x=C,F=S,B=E,q=T,V=k,j=D,H=R,K=0;K<80;K++){var z,W,Y=u[K];if(K<16)W=Y.high=0|e[t+2*K],z=Y.low=0|e[t+2*K+1];else{var $=u[K-15],J=$.high,X=$.low,Q=(J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7,Z=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),ee=u[K-2],te=ee.high,ne=ee.low,ie=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,oe=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),se=u[K-7],ae=se.high,re=se.low,ce=u[K-16],ue=ce.high,le=ce.low;W=(W=(W=Q+ae+((z=Z+re)>>>0>>0?1:0))+ie+((z+=oe)>>>0>>0?1:0))+ue+((z+=le)>>>0>>0?1:0),Y.high=W,Y.low=z}var de,pe=G&F^~G&q,he=x&B^~x&V,ge=O&A^O&P^A&P,fe=b&L^b&N^L&N,me=(O>>>28|b<<4)^(O<<30|b>>>2)^(O<<25|b>>>7),_e=(b>>>28|O<<4)^(b<<30|O>>>2)^(b<<25|O>>>7),ve=(G>>>14|x<<18)^(G>>>18|x<<14)^(G<<23|x>>>9),ye=(x>>>14|G<<18)^(x>>>18|G<<14)^(x<<23|G>>>9),Ie=c[K],Me=Ie.high,Ce=Ie.low,Se=j+ve+((de=H+ye)>>>0>>0?1:0),Ee=_e+fe;j=q,H=V,q=F,V=B,F=G,B=x,G=w+(Se=(Se=(Se=Se+pe+((de+=he)>>>0>>0?1:0))+Me+((de+=Ce)>>>0>>0?1:0))+W+((de+=z)>>>0>>0?1:0))+((x=U+de|0)>>>0>>0?1:0)|0,w=P,U=N,P=A,N=L,A=O,L=b,O=Se+(me+ge+(Ee>>>0<_e>>>0?1:0))+((b=de+Ee|0)>>>0>>0?1:0)|0}g=i.low=g+b,i.high=h+O+(g>>>0>>0?1:0),m=o.low=m+L,o.high=f+A+(m>>>0>>0?1:0),v=s.low=v+N,s.high=_+P+(v>>>0>>0?1:0),I=a.low=I+U,a.high=y+w+(I>>>0>>0?1:0),C=r.low=C+x,r.high=M+G+(C>>>0>>0?1:0),E=l.low=E+B,l.high=S+F+(E>>>0>>0?1:0),k=d.low=k+V,d.high=T+q+(k>>>0>>0?1:0),R=p.low=R+H,p.high=D+j+(R>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(i+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),function(){var e=r,t=e.x64,n=t.Word,i=t.WordArray,o=e.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=s._createHelper(a),e.HmacSHA384=s._createHmacHelper(a)}(),r.lib.Cipher||function(){var e=r,t=e.lib,n=t.Base,i=t.WordArray,o=t.BufferedBlockAlgorithm,s=e.enc,a=(s.Utf8,s.Base64),c=e.algo.EvpKDF,u=t.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?v:m}return function(t){return{encrypt:function(n,i,o){return e(i).encrypt(t,n,i,o)},decrypt:function(n,i,o){return e(i).decrypt(t,n,i,o)}}}}()}),l=(t.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),e.mode={}),d=t.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=l.CBC=function(){var e=d.extend();function t(e,t,n){var i,o=this._iv;o?(i=o,this._iv=void 0):i=this._prevBlock;for(var s=0;s>>2];e.sigBytes-=t}},g=(t.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:h}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(i,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),t.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),f=(e.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),o=n.words;return 1398893684==o[0]&&1701076831==o[1]&&(t=i.create(o.slice(2,4)),o.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},m=t.SerializableCipher=n.extend({cfg:n.extend({format:f}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var o=e.createEncryptor(n,i),s=o.finalize(t),a=o.cfg;return g.create({ciphertext:s,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(e.kdf={}).OpenSSL={execute:function(e,t,n,o){o||(o=i.random(8));var s=c.create({keySize:t+n}).compute(e,o),a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,g.create({key:s,iv:a,salt:o})}},v=t.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:_}),encrypt:function(e,t,n,i){var o=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize);i.iv=o.iv;var s=m.encrypt.call(this,e,t,o.key,i);return s.mixIn(o),s},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var o=i.kdf.execute(n,e.keySize,e.ivSize,t.salt);return i.iv=o.iv,m.decrypt.call(this,e,t,o.key,i)}})}(),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,i){var o,s=this._iv;s?(o=s.slice(0),this._iv=void 0):o=this._prevBlock,i.encryptBlock(o,0);for(var a=0;a>>2]|=o<<24-s%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.mode.OFB=(i=(n=r.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._keystream;o&&(s=this._keystream=o.slice(0),this._iv=void 0),n.encryptBlock(s,0);for(var a=0;a>>8^255&g^99,i[n]=g,o[g]=n;var f=e[n],m=e[f],_=e[m],v=257*e[g]^16843008*g;s[n]=v<<24|v>>>8,a[n]=v<<16|v>>>16,c[n]=v<<8|v>>>24,u[n]=v,v=16843009*_^65537*m^257*f^16843008*n,l[g]=v<<24|v>>>8,d[g]=v<<16|v>>>16,p[g]=v<<8|v>>>24,h[g]=v,n?(n=f^e[e[e[_^f]]],r^=e[e[r]]):n=r=1}}();var g=[0,1,2,4,8,16,32,64,128,27,54],f=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),s=this._keySchedule=[],a=0;a6&&a%n==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=g[a/n|0]<<24),s[a]=s[a-n]^u);for(var r=this._invKeySchedule=[],c=0;c>>24]]^d[i[u>>>16&255]]^p[i[u>>>8&255]]^h[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,u,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,d,p,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,o,s,a,r){for(var c=this._nRounds,u=e[t]^n[0],l=e[t+1]^n[1],d=e[t+2]^n[2],p=e[t+3]^n[3],h=4,g=1;g>>24]^o[l>>>16&255]^s[d>>>8&255]^a[255&p]^n[h++],m=i[l>>>24]^o[d>>>16&255]^s[p>>>8&255]^a[255&u]^n[h++],_=i[d>>>24]^o[p>>>16&255]^s[u>>>8&255]^a[255&l]^n[h++],v=i[p>>>24]^o[u>>>16&255]^s[l>>>8&255]^a[255&d]^n[h++];u=f,l=m,d=_,p=v}f=(r[u>>>24]<<24|r[l>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^n[h++],m=(r[l>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&u])^n[h++],_=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[u>>>8&255]<<8|r[255&l])^n[h++],v=(r[p>>>24]<<24|r[u>>>16&255]<<16|r[l>>>8&255]<<8|r[255&d])^n[h++],e[t]=f,e[t+1]=m,e[t+2]=_,e[t+3]=v},keySize:8});e.AES=t._createHelper(f)}(),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var i=s[n]-1;t[n]=e[i>>>5]>>>31-i%32&1}for(var o=this._subKeys=[],r=0;r<16;r++){var u=o[r]=[],l=c[r];for(n=0;n<24;n++)u[n/6|0]|=t[(a[n]-1+l)%28]<<31-n%6,u[4+(n/6|0)]|=t[28+(a[n+24]-1+l)%28]<<31-n%6;for(u[0]=u[0]<<1|u[0]>>>31,n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var d=this._invSubKeys=[];for(n=0;n<16;n++)d[n]=o[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),p.call(this,1,1431655765);for(var i=0;i<16;i++){for(var o=n[i],s=this._lBlock,a=this._rBlock,r=0,c=0;c<8;c++)r|=u[c][((a^o[c])&l[c])>>>0];this._lBlock=a,this._rBlock=s^r}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,p.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),o=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(t)),this._des2=d.createEncryptor(n.create(i)),this._des3=d.createEncryptor(n.create(o))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(g)}(),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],o=0;o<256;o++)i[o]=o;o=0;for(var s=0;o<256;o++){var a=o%n,r=t[a>>>2]>>>24-a%4*8&255;s=(s+i[o]+r)%256;var c=i[o];i[o]=i[s],i[s]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,i=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[n],e[n]=s,i|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,i}e.RC4=t._createHelper(i);var s=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(s)}(), -/** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ -r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var i,o=this._cipher,s=o.blockSize,a=this._iv,r=this._counter;a&&(r=this._counter=a.slice(0),this._iv=void 0),0===((i=r)[0]=t(i[0]))&&(i[1]=t(i[1]));var c=r.slice(0);o.encryptBlock(c,0);for(var u=0;u>>24)|4278255360&(e[n]<<24|e[n]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)o[n]^=i[n+4&7];if(t){var s=t.words,a=s[0],r=s[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),d=u>>>16|4294901760&l,p=l<<16|65535&u;for(o[0]^=u,o[1]^=d,o[2]^=l,o[3]^=p,o[4]^=u,o[5]^=d,o[6]^=l,o[7]^=p,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)i[o]=16711935&(i[o]<<8|i[o]>>>24)|4278255360&(i[o]<<24|i[o]>>>8),e[t+o]^=i[o]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],a=65535&i,r=i>>>16,c=((a*a>>>17)+a*r>>>15)+r*r,u=((4294901760&i)*i|0)+((65535&i)*i|0);s[n]=c^u}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=t._createHelper(a)}(),r.mode.CTR=function(){var e=r.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0);var a=s.slice(0);n.encryptBlock(a,0),s[i-1]=s[i-1]+1|0;for(var r=0;r>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)i[o]^=n[o+4&7];if(t){var s=t.words,a=s[0],r=s[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),d=u>>>16|4294901760&l,p=l<<16|65535&u;for(i[0]^=u,i[1]^=d,i[2]^=l,i[3]^=p,i[4]^=u,i[5]^=d,i[6]^=l,i[7]^=p,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)i[o]=16711935&(i[o]<<8|i[o]>>>24)|4278255360&(i[o]<<24|i[o]>>>8),e[t+o]^=i[o]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],a=65535&i,r=i>>>16,c=((a*a>>>17)+a*r>>>15)+r*r,u=((4294901760&i)*i|0)+((65535&i)*i|0);s[n]=c^u}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=t._createHelper(a)}(),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r)},c(u={exports:{}},u.exports),u.exports);return function(){function t(n){e(this,t);var i=n.isArray,o=n.isMap,s=n.isDevMode;this._isArray=i,this._isMap=o,this._isDevMode=s,this._interceptProfanityList=[],this._interceptFilter=null,this._interceptRegExpList=[],this._replacingProfanityMap=new Map,this._replacingFilter=null,this._replacingRegExpMap=new Map,this._key="",this._iv="",this._decryptOptions=void 0,this._n="TIMProfanityFilterPlugin",!0===s&&console.log("".concat(this._n,".VERSION:").concat("1.1.0"))}return n(t,[{key:"onToken",value:function(e){this._key=g.enc.Utf8.parse(e.slice(0,32)),this._iv=this._key,this._decryptOptions={iv:this._iv,mode:g.mode.CBC,padding:g.pad.Pkcs7}}},{key:"onLexiconSliced",value:function(e){if(this._isArray(e)&&0!==e.length){var t,n,i,o=r(e);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=s.filterType,c=s.profanityType,u=s.profanity,l=s.replacement;t=this._getDecryptedString(u),n=this._getDecryptedString(l),1===a?1===c?this._interceptProfanityList.push(t):2===c&&this._interceptRegExpList.push(t):2===a&&(1===c?this._replacingProfanityMap.set(t,n):2===c&&this._replacingRegExpMap.set(t,n))}}catch(d){o.e(d)}finally{o.f()}}}},{key:"_getDecryptedString",value:function(e){var t=g.AES.decrypt(e,this._key,this._decryptOptions);return g.enc.Utf8.stringify(t).toLowerCase()}},{key:"onLexiconCompleted",value:function(e){this.onLexiconSliced(e),this._interceptFilter=new d({input:this._interceptProfanityList,isArray:this._isArray,isMap:this._isMap}),this._replacingFilter=new d({input:this._replacingProfanityMap,isArray:this._isArray,isMap:this._isMap}),!0===this._isDevMode&&(console.log("".concat(this._n," _interceptProfanityList ->"),this._interceptProfanityList),console.log("".concat(this._n," _interceptRegExpList ->"),this._interceptRegExpList),console.log("".concat(this._n," _replacingProfanityMap ->"),this._replacingProfanityMap),console.log("".concat(this._n," _replacingRegExpMap ->"),this._replacingRegExpMap))}},{key:"filter",value:function(e){var t={type:0,modifiedText:e};if("string"!=typeof e)return!0===this._isDevMode&&console.warn("".concat(this._n,".filter invalid params, string required!")),t;if(!0===this._interceptFilter.filter({text:e,replacingEnabled:!1}).isMatched)return t.type=1,t;for(var n=!1,o=0,s=this._interceptRegExpList.length;o{this.events[e].clear()})),this.events={}}dispatch(e,t){if(this.events[e])for(const n of this.events[e].keys())n.call(this,t)}bindIMEvents(){this.engine.chat.on(this.engine.EVENT.SDK_READY,this.onSDKReady,this),this.engine.chat.on(this.engine.EVENT.SDK_NOT_READY,this.onSDKNotReady,this),this.engine.chat.on(this.engine.EVENT.KICKED_OUT,this.onKickedOut,this),this.engine.chat.on(this.engine.EVENT.NET_STATE_CHANGE,this.onNetStateChange,this),this.engine.chat.on(this.engine.EVENT.MESSAGE_RECEIVED,this.onReceiveMessage,this),this.engine.chat.on(this.engine.EVENT.MESSAGE_MODIFIED,this.onMessageModified,this),this.engine.chat.on(this.engine.EVENT.MESSAGE_REVOKED,this.onMessageRevoked,this),this.engine.chat.on(this.engine.EVENT.MESSAGE_READ_BY_PEER,this.onMessageReadByPeer,this),this.engine.chat.on(this.engine.EVENT.MESSAGE_READ_RECEIPT_RECEIVED,this.onMessageReadReceiptReceived,this),this.engine.chat.on(this.engine.EVENT.MESSAGE_REACTIONS_UPDATED,this.onMessageReactionsUpdated,this),this.engine.chat.on(this.engine.EVENT.CONVERSATION_LIST_UPDATED,this.onConversationListUpdated,this),this.engine.chat.on(this.engine.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED,this.onTotalMessageCountUpdated,this),this.engine.chat.on(this.engine.EVENT.PROFILE_UPDATED,this.onProfileUpdated,this),this.engine.chat.on(this.engine.EVENT.BLACKLIST_UPDATED,this.onBlacklistUpdated,this),this.engine.chat.on(this.engine.EVENT.USER_STATUS_UPDATED,this.onUserStatusUpdated,this),this.engine.chat.on(this.engine.EVENT.GROUP_LIST_UPDATED,this.onGroupListUpdated,this),this.engine.chat.on(this.engine.EVENT.GROUP_ATTRIBUTES_UPDATED,this.onGroupAttributesUpdated,this),this.engine.chat.on(this.engine.EVENT.GROUP_COUNTER_UPDATED,this.onGroupCounterUpdated,this),this.engine.chat.on(this.engine.EVENT.FRIEND_LIST_UPDATED,this.onFriendListUpdated,this),this.engine.chat.on(this.engine.EVENT.FRIEND_APPLICATION_LIST_UPDATED,this.onFriendApplicationListUpdated,this)}unbindIMEvents(){this.engine.chat.off(this.engine.EVENT.SDK_READY,this.onSDKReady,this),this.engine.chat.off(this.engine.EVENT.SDK_NOT_READY,this.onSDKNotReady,this),this.engine.chat.off(this.engine.EVENT.KICKED_OUT,this.onKickedOut,this),this.engine.chat.off(this.engine.EVENT.NET_STATE_CHANGE,this.onNetStateChange,this),this.engine.chat.off(this.engine.EVENT.MESSAGE_RECEIVED,this.onReceiveMessage,this),this.engine.chat.off(this.engine.EVENT.MESSAGE_MODIFIED,this.onMessageModified,this),this.engine.chat.off(this.engine.EVENT.MESSAGE_REVOKED,this.onMessageRevoked,this),this.engine.chat.off(this.engine.EVENT.MESSAGE_READ_BY_PEER,this.onMessageReadByPeer,this),this.engine.chat.off(this.engine.EVENT.MESSAGE_READ_RECEIPT_RECEIVED,this.onMessageReadReceiptReceived,this),this.engine.chat.off(this.engine.EVENT.MESSAGE_REACTIONS_UPDATED,this.onMessageReactionsUpdated,this),this.engine.chat.off(this.engine.EVENT.CONVERSATION_LIST_UPDATED,this.onConversationListUpdated,this),this.engine.chat.off(this.engine.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED,this.onTotalMessageCountUpdated,this),this.engine.chat.off(this.engine.EVENT.PROFILE_UPDATED,this.onProfileUpdated,this),this.engine.chat.off(this.engine.EVENT.BLACKLIST_UPDATED,this.onBlacklistUpdated,this),this.engine.chat.off(this.engine.EVENT.USER_STATUS_UPDATED,this.onUserStatusUpdated,this),this.engine.chat.off(this.engine.EVENT.GROUP_LIST_UPDATED,this.onGroupListUpdated,this),this.engine.chat.off(this.engine.EVENT.GROUP_ATTRIBUTES_UPDATED,this.onGroupAttributesUpdated,this),this.engine.chat.off(this.engine.EVENT.GROUP_COUNTER_UPDATED,this.onGroupCounterUpdated,this),this.engine.chat.off(this.engine.EVENT.FRIEND_LIST_UPDATED,this.onFriendListUpdated,this),this.engine.chat.off(this.engine.EVENT.FRIEND_APPLICATION_LIST_UPDATED,this.onFriendApplicationListUpdated,this),qg.instance=null}onSDKReady(e){this.dispatch(this.engine.EVENT.SDK_READY,e.data)}onSDKNotReady(e){this.dispatch(this.engine.EVENT.SDK_NOT_READY,e.data)}onKickedOut(e){this.dispatch(this.engine.EVENT.KICKED_OUT,e.data)}onNetStateChange(e){this.dispatch(this.engine.EVENT.NET_STATE_CHANGE,e.data)}onReceiveMessage(e){this.dispatch(this.engine.EVENT.MESSAGE_RECEIVED,e.data)}onMessageModified(e){this.dispatch(this.engine.EVENT.MESSAGE_MODIFIED,e.data)}onMessageRevoked(e){this.dispatch(this.engine.EVENT.MESSAGE_REVOKED,e.data)}onMessageReadByPeer(e){this.dispatch(this.engine.EVENT.MESSAGE_READ_BY_PEER,e.data)}onMessageReadReceiptReceived(e){this.dispatch(this.engine.EVENT.MESSAGE_READ_RECEIPT_RECEIVED,e.data)}onMessageReactionsUpdated(e){this.dispatch(this.engine.EVENT.MESSAGE_REACTIONS_UPDATED,e.data)}onConversationListUpdated(e){this.dispatch(this.engine.EVENT.CONVERSATION_LIST_UPDATED,e.data)}onTotalMessageCountUpdated(e){this.dispatch(this.engine.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED,e.data)}onProfileUpdated(e){this.dispatch(this.engine.EVENT.PROFILE_UPDATED,e.data)}onBlacklistUpdated(e){this.dispatch(this.engine.EVENT.BLACKLIST_UPDATED,e.data)}onUserStatusUpdated(e){this.dispatch(this.engine.EVENT.USER_STATUS_UPDATED,e.data)}onGroupListUpdated(e){this.dispatch(this.engine.EVENT.GROUP_LIST_UPDATED,e.data)}onGroupAttributesUpdated(e){this.dispatch(this.engine.EVENT.GROUP_ATTRIBUTES_UPDATED,e.data)}onGroupCounterUpdated(e){this.dispatch(this.engine.EVENT.GROUP_COUNTER_UPDATED,e.data)}onFriendListUpdated(e){this.dispatch(this.engine.EVENT.FRIEND_LIST_UPDATED,e.data)}onFriendApplicationListUpdated(e){this.dispatch(this.engine.EVENT.FRIEND_APPLICATION_LIST_UPDATED,e.data)}}var Vg,jg,Hg,Kg,zg,Wg,Yg,$g,Jg;!function(e){e.TUIStore="TUIStore",e.TUITranslate="TUITranslate",e.TUIConversation="TUIConversation",e.TUIChat="TUIChat",e.TUIGroup="TUIGroup",e.TUIUser="TUIUser",e.TUIFriend="TUIFriend",e.TUIReport="TUIReport"}(Vg||(Vg={})),function(e){e.APP="application",e.CONV="conversation",e.CHAT="chat",e.GRP="group",e.USER="user",e.FRIEND="friend",e.SEARCH="search",e.CUSTOM="custom"}(jg||(jg={})),function(e){e[e.UNSUB_USER=-1]="UNSUB_USER"}(Hg||(Hg={})),function(e){e.BUSINESS_ID="user_typing_status",e[e.STATUS_START=1]="STATUS_START",e[e.STATUS_END=0]="STATUS_END",e[e.VERSION=1]="VERSION",e[e.ACTION_START_ID=14]="ACTION_START_ID",e[e.ACTION_END_ID=0]="ACTION_END_ID",e.ACTION_START="EIMAMSG_InputStatus_Ing",e.ACTION_END="EIMAMSG_InputStatus_End",e[e.NEED_TYPING=1]="NEED_TYPING"}(Kg||(Kg={})),function(e){e.ADD="add",e.REMOVE="remove"}(zg||(zg={})),function(e){e[e.MSG_MODIFY_CONFLICT=2480]="MSG_MODIFY_CONFLICT",e[e.MSG_MODIFY_DISABLED_IN_AVCHATROOM=2481]="MSG_MODIFY_DISABLED_IN_AVCHATROOM",e[e.MODIFY_MESSAGE_NOT_EXIST=20026]="MODIFY_MESSAGE_NOT_EXIST"}(Wg||(Wg={})),function(e){e[e.NOT_INIT=-1e5]="NOT_INIT",e[e.INVALID_CONV_ID=-100001]="INVALID_CONV_ID",e[e.CONV_ID_SAME=-100002]="CONV_ID_SAME",e[e.CONV_NOT_EXIST=-100003]="CONV_NOT_EXIST",e[e.GET_MSG_LIST_ERROR=-100004]="GET_MSG_LIST_ERROR",e[e.MISMATCH_TYPE_AND_PAYLOAD=-100005]="MISMATCH_TYPE_AND_PAYLOAD"}(Yg||(Yg={})),function(e){e.MSG_MODIFY_CONFLICT="MODIFY_MESSAGE_ERROR,修改消息发生冲突, data.message 是最新的消息",e.MSG_MODIFY_DISABLED_IN_AVCHATROOM="MODIFY_MESSAGE_ERROR,不支持修改直播群消息.",e.MODIFY_MESSAGE_NOT_EXIST="MODIFY_MESSAGE_ERROR,消息不存在."}($g||($g={})),function(e){e.NOT_INIT="TUIChatEngine 初始化未完成,请确认 TUIChatEngine.login 接口调用是否正常。",e.INVALID_CONV_ID="会话 ID 无效",e.CONV_ID_SAME="您切换的是同一个会话 ID",e.CONV_NOT_EXIST="会话不存在",e.GET_MSG_LIST_ERROR="Chat SDK is not ready.",e.MISMATCH_TYPE_AND_PAYLOAD="type 与 payload 不匹配."}(Jg||(Jg={}));const Xg={logout:1,destroy:1},Qg=function(e){return void 0===e},Zg=function(e){return e.startsWith("_")},ef=function(e){return/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)},tf=function(e){return e&&function(e){if("string"==typeof e)try{return!!JSON.parse(e)}catch(t){return!1}return!1}(e)?JSON.parse(e):e},nf=function(e){let t="";return t=e>=1048576?`${(e/1048576).toFixed(2)} Mb`:e>=1024?`${(e/1024).toFixed(2)} Kb`:`${e.toFixed(2)}B`,t},of={"[TUIEmoji_Expect]":"emoji_0@2x.png","[TUIEmoji_Blink]":"emoji_1@2x.png","[TUIEmoji_Guffaw]":"emoji_2@2x.png","[TUIEmoji_KindSmile]":"emoji_3@2x.png","[TUIEmoji_Haha]":"emoji_4@2x.png","[TUIEmoji_Cheerful]":"emoji_5@2x.png","[TUIEmoji_Smile]":"emoji_6@2x.png","[TUIEmoji_Sorrow]":"emoji_7@2x.png","[TUIEmoji_Speechless]":"emoji_8@2x.png","[TUIEmoji_Amazed]":"emoji_9@2x.png","[TUIEmoji_Complacent]":"emoji_10@2x.png","[TUIEmoji_Lustful]":"emoji_11@2x.png","[TUIEmoji_Stareyes]":"emoji_12@2x.png","[TUIEmoji_Giggle]":"emoji_13@2x.png","[TUIEmoji_Daemon]":"emoji_14@2x.png","[TUIEmoji_Rage]":"emoji_15@2x.png","[TUIEmoji_Yawn]":"emoji_16@2x.png","[TUIEmoji_TearsLaugh]":"emoji_17@2x.png","[TUIEmoji_Silly]":"emoji_18@2x.png","[TUIEmoji_Wail]":"emoji_19@2x.png","[TUIEmoji_Kiss]":"emoji_20@2x.png","[TUIEmoji_Trapped]":"emoji_21@2x.png","[TUIEmoji_Fear]":"emoji_22@2x.png","[TUIEmoji_BareTeeth]":"emoji_23@2x.png","[TUIEmoji_FlareUp]":"emoji_24@2x.png","[TUIEmoji_Tact]":"emoji_25@2x.png","[TUIEmoji_Shit]":"emoji_26@2x.png","[TUIEmoji_ShutUp]":"emoji_27@2x.png","[TUIEmoji_Sigh]":"emoji_28@2x.png","[TUIEmoji_Hehe]":"emoji_29@2x.png","[TUIEmoji_Silent]":"emoji_30@2x.png","[TUIEmoji_Skull]":"emoji_31@2x.png","[TUIEmoji_Mask]":"emoji_32@2x.png","[TUIEmoji_Beer]":"emoji_33@2x.png","[TUIEmoji_Cake]":"emoji_34@2x.png","[TUIEmoji_RedPacket]":"emoji_35@2x.png","[TUIEmoji_Bombs]":"emoji_36@2x.png","[TUIEmoji_Ai]":"emoji_37@2x.png","[TUIEmoji_Celebrate]":"emoji_38@2x.png","[TUIEmoji_Bless]":"emoji_39@2x.png","[TUIEmoji_Flower]":"emoji_40@2x.png","[TUIEmoji_Watermelon]":"emoji_41@2x.png","[TUIEmoji_Cow]":"emoji_42@2x.png","[TUIEmoji_Fool]":"emoji_43@2x.png","[TUIEmoji_Surprised]":"emoji_44@2x.png","[TUIEmoji_Askance]":"emoji_45@2x.png","[TUIEmoji_Monster]":"emoji_46@2x.png","[TUIEmoji_Pig]":"emoji_47@2x.png","[TUIEmoji_Coffee]":"emoji_48@2x.png","[TUIEmoji_Ok]":"emoji_49@2x.png","[TUIEmoji_Heart]":"emoji_50@2x.png","[TUIEmoji_Sun]":"emoji_51@2x.png","[TUIEmoji_Moon]":"emoji_52@2x.png","[TUIEmoji_Star]":"emoji_53@2x.png","[TUIEmoji_Rich]":"emoji_54@2x.png","[TUIEmoji_Fortune]":"emoji_55@2x.png","[TUIEmoji_857]":"emoji_56@2x.png","[TUIEmoji_666]":"emoji_57@2x.png","[TUIEmoji_Prohibit]":"emoji_58@2x.png","[TUIEmoji_Convinced]":"emoji_59@2x.png","[TUIEmoji_Knife]":"emoji_60@2x.png","[TUIEmoji_Like]":"emoji_61@2x.png"},sf={"[TUIEmoji_Smile]":"[微笑]","[TUIEmoji_Expect]":"[期待]","[TUIEmoji_Blink]":"[眨眼]","[TUIEmoji_Guffaw]":"[大笑]","[TUIEmoji_KindSmile]":"[姨母笑]","[TUIEmoji_Haha]":"[哈哈哈]","[TUIEmoji_Cheerful]":"[愉快]","[TUIEmoji_Speechless]":"[无语]","[TUIEmoji_Amazed]":"[惊讶]","[TUIEmoji_Sorrow]":"[悲伤]","[TUIEmoji_Complacent]":"[得意]","[TUIEmoji_Silly]":"[傻了]","[TUIEmoji_Lustful]":"[色]","[TUIEmoji_Giggle]":"[憨笑]","[TUIEmoji_Kiss]":"[亲亲]","[TUIEmoji_Wail]":"[大哭]","[TUIEmoji_TearsLaugh]":"[哭笑]","[TUIEmoji_Trapped]":"[困]","[TUIEmoji_Mask]":"[口罩]","[TUIEmoji_Fear]":"[恐惧]","[TUIEmoji_BareTeeth]":"[龇牙]","[TUIEmoji_FlareUp]":"[发怒]","[TUIEmoji_Yawn]":"[打哈欠]","[TUIEmoji_Tact]":"[机智]","[TUIEmoji_Stareyes]":"[星星眼]","[TUIEmoji_ShutUp]":"[闭嘴]","[TUIEmoji_Sigh]":"[叹气]","[TUIEmoji_Hehe]":"[呵呵]","[TUIEmoji_Silent]":"[收声]","[TUIEmoji_Surprised]":"[惊喜]","[TUIEmoji_Askance]":"[白眼]","[TUIEmoji_Ok]":"[OK]","[TUIEmoji_Shit]":"[便便]","[TUIEmoji_Monster]":"[怪兽]","[TUIEmoji_Daemon]":"[恶魔]","[TUIEmoji_Rage]":"[恶魔怒]","[TUIEmoji_Fool]":"[衰]","[TUIEmoji_Pig]":"[猪]","[TUIEmoji_Cow]":"[牛]","[TUIEmoji_Ai]":"[AI]","[TUIEmoji_Skull]":"[骷髅]","[TUIEmoji_Bombs]":"[炸弹]","[TUIEmoji_Coffee]":"[咖啡]","[TUIEmoji_Cake]":"[蛋糕]","[TUIEmoji_Beer]":"[啤酒]","[TUIEmoji_Flower]":"[花]","[TUIEmoji_Watermelon]":"[瓜]","[TUIEmoji_Rich]":"[壕]","[TUIEmoji_Heart]":"[爱心]","[TUIEmoji_Moon]":"[月亮]","[TUIEmoji_Sun]":"[太阳]","[TUIEmoji_Star]":"[星星]","[TUIEmoji_RedPacket]":"[红包]","[TUIEmoji_Celebrate]":"[庆祝]","[TUIEmoji_Bless]":"[福]","[TUIEmoji_Fortune]":"[发]","[TUIEmoji_Convinced]":"[服]","[TUIEmoji_Prohibit]":"[禁]","[TUIEmoji_666]":"[666]","[TUIEmoji_857]":"[857]","[TUIEmoji_Knife]":"[刀]","[TUIEmoji_Like]":"[赞]"},af={enabledMessageReadReceipt:Math.pow(2,5),enabledEmojiPlugin:Math.pow(2,48),enabledOnlineStatus:Math.pow(2,7),enabledCustomerServicePlugin:Math.pow(2,40),enabledTranslationPlugin:Math.pow(2,38),enabledVoiceToText:Math.pow(2,39)},rf=["messageList","conversationList","newMessageList"],cf=["translateTextInfo","voiceToTextInfo"],uf=void 0!==Pn&&"function"==typeof Pn.getSystemInfoSync&&Boolean(Pn.getSystemInfoSync().fontSizeSetting),lf=void 0!==Nn&&"undefined"==typeof window,df=uf||lf,pf=(void 0!==Nn||"undefined"!=typeof window)&&!df,hf=uf?Pn:void 0!==Nn?Nn:window,gf=pf&&window&&window.navigator&&window.navigator.userAgent||"",ff=/Android/i.test(gf),mf=/(?:Windows Phone)/.test(gf),_f=/(?:SymbianOS)/.test(gf),vf=/iPad/i.test(gf)||/iPhone/i.test(gf)||/iPod/i.test(gf),yf=ff||mf||_f||vf,If=pf&&!yf;class Mf{constructor(){this.global=hf,this.isOfficial=!1}static getInstance(){return Mf.instance||(Mf.instance=new Mf),Mf.instance}initOfficial(e){this.isOfficial=e}getPlatform(){let e="";return If?e="pc":yf?e="h5":uf?e="wechat":lf&&!uf&&(e="app"),e}}class Cf{constructor(){this.EVENT=Ng.EVENT,this.TYPES=Ng.TYPES,this.loginStatusPromise=new Map,this.userID="",this.isInited=!1}static getInstance(){return Cf.instance||(Cf.instance=new Cf),Cf.instance}mount(e,t){this[e]=t}login(e){const{chat:t,SDKAppID:n,userID:i}=e,o=1400187352===n||1400188366===n;return this.createChat(e),this.userID=i,Mf.getInstance().initOfficial(o),this.TUIStore.update(jg.APP,"isOfficial",o),this.TUIStore.update(jg.APP,"SDKVersion",Ng.VERSION),this.eventCenter=new qg(this),this.eventCenter.removeEvents(),this.resetStore(),this.initService(),t&&t.isReady()?(console.log("TUIChatEngine.login ok, from TUICore."),this.TUIUser.getUserProfile(),this.checkCommercialAbility(),Promise.resolve({})):(this.registerPlugin(e),this.eventCenter.addEvent(this.EVENT.SDK_READY,(()=>{this.onSDKReady()})),this.eventCenter.addEvent(this.EVENT.SDK_NOT_READY,(()=>{this.onSDKNotReady()})),this.loginChat(e))}logout(){return this.userID="",this.isInited=!1,this.resetStore(),this.chat.logout()}isReady(){var e;return(null===(e=this.chat)||void 0===e?void 0:e.isReady())||!1}setLogLevel(e){this.chat?this.chat.setLogLevel(e):console.warn("TUIChatEngine 初始化未完成,请确认 TUIChatEngine.login 接口调用是否正常。")}destroy(){return this.eventCenter.unbindIMEvents(),this.isInited=!1,this.resetStore(),this.chat.destroy()}getMyUserID(){return this.userID}resetStore(){this.TUIStore.reset(jg.CHAT),this.TUIStore.reset(jg.CONV),this.TUIStore.reset(jg.GRP),this.TUIStore.reset(jg.USER),this.TUIStore.reset(jg.SEARCH),this.TUIStore.reset(jg.FRIEND),this.TUIStore.reset(jg.CUSTOM),console.log("TUIChatEngine.resetStore ok.")}initService(){this.TUIChat.init(),this.TUIConversation.init(),this.TUIUser.init(),this.initOptionalServices(),this.isInited=!0,console.log("TUIChatEngine.initService ok.")}initOptionalServices(){const e=Ng.VERSION.split(".");e[0]>3||3===e[0]&&e[1]>=3&&e[2]>0?(!0===this.chat.callExperimentalAPI("canIUseModule",["group-module"])&&this.TUIGroup.init(),!0===this.chat.callExperimentalAPI("canIUseModule",["relationship-module"])&&this.TUIFriend.init()):(this.TUIGroup.init(),this.TUIFriend.init())}createChat(e){const{chat:t}=e,n=Fg(e,["chat"]);Qg(t)?this.chat=Ng.create(Object.assign(Object.assign({},n),{scene:"chat-uikit-engine"})):this.chat=t}loginChat(e){const{userID:t,userSig:n}=e;return new Promise(((e,i)=>{this.chat.login({userID:t,userSig:n}).then((t=>{console.log("TUIChatEngine.loginChat ok."),this.checkCommercialAbility(),t.data.repeatLogin&&this.chat.isReady()&&e(t),this.loginStatusPromise.set("login",{resolve:e,reject:i,imResponse:t})})).catch((e=>{i(e)}))}))}registerPlugin(e){const{useUploadPlugin:t=!1,useProfanityFilterPlugin:n=!1,TIMPush:i,pushConfig:o,TUIOfflinePush:s,offlinePushConfig:a}=e;!0===t&&this.chat.registerPlugin({"tim-upload-plugin":Ug}),!0===n&&this.chat.registerPlugin({"tim-profanity-filter-plugin":xg}),!lf||uf||Qg(i)||Qg(o)||this.chat.registerPlugin({"tim-push":i,pushConfig:o}),!lf||uf||Qg(s)||Qg(a)||this.chat.registerPlugin({"tim-offline-push-plugin":s,offlinePushConfig:a})}onSDKReady(){if(this.loginStatusPromise.has("login")){const e=this.loginStatusPromise.get("login");e.resolve(e.imResponse),this.TUIUser.getUserProfile()}this.loginStatusPromise.delete("login")}onSDKNotReady(){this.loginStatusPromise.has("login")&&this.loginStatusPromise.get("login").reject(new Error("sdk not ready")),this.loginStatusPromise.delete("login"),this.resetStore()}checkCommercialAbility(){Object.keys(af).forEach((e=>{const t=af[e];this.chat.callExperimentalAPI("isCommercialAbilityEnabled",t).then((t=>{const{enabled:n=!1}=t.data;this.TUIStore.update(jg.APP,e,n)}))}))}}class Sf{constructor(){this.defaultStore={enabledMessageReadReceipt:!1,enabledEmojiPlugin:!1,enabledOnlineStatus:!1,enabledCustomerServicePlugin:!1,enabledTranslationPlugin:!1,enabledVoiceToText:!1,enableTyping:!0,enableConversationDraft:!0,isOfficial:!1,SDKVersion:"3.0.0",tasks:{sendMessage:!1,revokeMessage:!1,modifyNickName:!1,groupChat:!1,muteGroup:!1,dismissGroup:!1,call:!1,searchCloudMessage:!1,customerService:!1,translateTextMessage:!1}},this.store={enabledEmojiPlugin:!1,enabledMessageReadReceipt:!1,enabledOnlineStatus:!1,enabledCustomerServicePlugin:!1,enabledTranslationPlugin:!1,enabledVoiceToText:!1,enableTyping:!0,enableConversationDraft:!0,isOfficial:!1,SDKVersion:"3.0.0",tasks:{sendMessage:!1,revokeMessage:!1,modifyNickName:!1,groupChat:!1,muteGroup:!1,dismissGroup:!1,call:!1,searchCloudMessage:!1,customerService:!1,translateTextMessage:!1}}}update(e,t){this.store[e]=t}getData(e){return this.store[e]}reset(e=[]){this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}}class Ef{constructor(){this.defaultStore={userProfile:{},displayOnlineStatus:!1,displayMessageReadReceipt:!0,userStatusList:new Map,kickedOut:"",netStateChange:"",userBlacklist:[],targetLanguage:"zh"},this.store={userProfile:{},displayOnlineStatus:!1,displayMessageReadReceipt:!0,userStatusList:new Map,kickedOut:"",netStateChange:"",userBlacklist:[],targetLanguage:"zh"}}update(e,t){"userStatusList"===e?this.updateUserStatusList(t):this.store[e]=t}getData(e){return this.store[e]}reset(e=[]){this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}updateUserStatusList(e){0!==e.length?e.forEach((e=>{const{userID:t,statusType:n=0,customStatus:i=""}=e;n===Hg.UNSUB_USER?this.store.userStatusList.delete(t):this.store.userStatusList.set(t,{statusType:n,customStatus:i})})):this.store.userStatusList.clear()}}class Tf{getEngine(){return Cf.getInstance()}}const kf=function(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(function(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}(e)){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}return!1},Df=["[图片]","[语音]","[视频]","[文件]","[位置]","[地理位置]","[动画表情]","[自定义消息]","[群提示消息]","[聊天记录]"];class Rf extends Tf{constructor(e){super(),this.initProxy(e),this.isMuted=this.messageRemindType===this.getEngine().TYPES.MSG_REMIND_ACPT_NOT_NOTE||this.messageRemindType===this.getEngine().TYPES.MSG_REMIND_DISCARD,this.operationType=0,this._conversation=e}initProxy(e){Object.keys(e).forEach((t=>{Zg(t)||(this[t]=e[t])}))}updateProperties(e){Object.keys(e).forEach((t=>{Zg(t)||(this[t]=e[t])}))}updateOperationType(e){this.operationType=e}getConversation(){return this._conversation}deleteConversation(){return this.getEngine().TUIConversation.deleteConversation(this.conversationID)}pinConversation(){return this.getEngine().TUIConversation.pinConversation({conversationID:this.conversationID,isPinned:!this.isPinned})}muteConversation(){const e=this.getEngine(),t={messageRemindType:!0===this.isMuted?e.TYPES.MSG_REMIND_ACPT_AND_NOTE:e.TYPES.MSG_REMIND_ACPT_NOT_NOTE};if(this.type===e.TYPES.CONV_C2C){const n=this.conversationID.replace(e.TYPES.CONV_C2C,"");t.userIDList=[n]}else if(this.type===e.TYPES.CONV_GROUP){const n=this.conversationID.replace(e.TYPES.CONV_GROUP,"");t.groupID=n}return e.TUIConversation.muteConversation(t)}getAvatar(){var e,t,n,i,o,s;const a=this.getEngine();let r="";switch(this.type){case a.TYPES.CONV_C2C:r=ef(null===(e=this.userProfile)||void 0===e?void 0:e.avatar)?null===(t=this.userProfile)||void 0===t?void 0:t.avatar:"https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_16.png";break;case a.TYPES.CONV_GROUP:r=ef(null===(n=this.groupProfile)||void 0===n?void 0:n.avatar)?null===(i=this.groupProfile)||void 0===i?void 0:i.avatar:"https://web.sdk.qcloud.com/im/demo/TUIkit/web/img/constomer.png";break;case a.TYPES.CONV_SYSTEM:r=ef(null===(o=this.groupProfile)||void 0===o?void 0:o.avatar)?null===(s=this.groupProfile)||void 0===s?void 0:s.avatar:"https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png"}return r}getShowName(){var e,t,n,i;const o=this.getEngine();let s="";switch(this.type){case o.TYPES.CONV_C2C:s=this.remark||(null===(e=this.userProfile)||void 0===e?void 0:e.nick)||(null===(t=this.userProfile)||void 0===t?void 0:t.userID)||"";break;case o.TYPES.CONV_GROUP:s=(null===(n=this.groupProfile)||void 0===n?void 0:n.name)||(null===(i=this.groupProfile)||void 0===i?void 0:i.groupID)||"";break;case o.TYPES.CONV_SYSTEM:s=o.TUITranslate.t("系统通知")}return s}getGroupAtInfo(){const e=this.getEngine(),t=e.TUITranslate.t.bind(e.TUITranslate),n=[`[${t("TUIConversation.有人@我")}]`,`[${t("TUIConversation.@所有人")}]`,`[${t("TUIConversation.@所有人")}][${t("TUIConversation.有人@我")}]`];let i="";for(let o=0;o0&&(i=n[this.groupAtInfoList[o].atTypeArray[0]-1]);return i}getLastMessage(e){return"time"===e?this.getLastMessageTime():"text"===e?this.getLastMessageText():(console.warn(`ConversationModel.getLastMessage key:${e} is invalid.`),null)}getLastMessageTime(){var e;const t=this.getEngine();let n="";return(null===(e=this.lastMessage)||void 0===e?void 0:e.lastTime)>0&&(n=function(e,t){const n=36e5,i=24*n,o=7*i,s=(new Date).getTime()-e;let a="";if(s<0)return a;const r=s/6e4,c=s/n,u=s/i,l=s/o;if(l>=1&&l<=4)a=` ${parseInt(`${l}`,10)} ${t("time.周")}${t("time.前")}`;else if(u>=1&&u<=6)a=` ${parseInt(`${u}`,10)} ${t("time.天")}${t("time.前")}`;else if(c>=1&&c<=23)a=` ${parseInt(`${c}`,10)} ${t("time.小时")}${t("time.前")}`;else if(r>=1&&r<=59)a=` ${parseInt(`${r}`,10)} ${t("time.分钟")}${t("time.前")}`;else if(s>=0&&s<=6e4)a=`${t("time.刚刚")}`;else{const t=new Date;t.setTime(e),a=`${t.getFullYear()}-${t.getMonth()+1<10?`0${t.getMonth()+1}`:t.getMonth()+1}-${t.getDate()<10?`0${t.getDate()}`:t.getDate()}`}return a}(1e3*this.lastMessage.lastTime,t.TUITranslate.t.bind(t.TUITranslate))),n}getLastMessageText(){var e;if(this.draftText)return tf(this.draftText).abstract;const t=this.getEngine(),n=t.TUITranslate.t.bind(t.TUITranslate);if(4===this.operationType)return n("TUIConversation.您已被群管理员移出群聊");if(5===this.operationType)return n("TUIConversation.该群聊已被解散");if(8===this.operationType)return n("TUIConversation.您已退出该群聊");const i=this._conversation,{lastMessage:o}=this;let s="",a="";const r=i.unreadCount>0&&i.messageRemindType===t.TYPES.MSG_REMIND_ACPT_NOT_NOTE?`[${i.unreadCount>99?"99+":i.unreadCount}${n("TUIConversation.条")}]`:"";if(i.type===t.TYPES.CONV_GROUP)if(o.fromAccount===t.getMyUserID())s=n("TUIConversation.我");else{const e=o.fromAccount;s=t.TUIFriend.getFriendRemark([e])[e]||o.nameCard||o.nick||e}if(o.type===t.TYPES.MSG_TEXT)a=this.decodeTextMessage(o.payload.text);else if(o.type===t.TYPES.MSG_CUSTOM){const i=tf(null===(e=null==o?void 0:o.payload)||void 0===e?void 0:e.data);if(1===(null==i?void 0:i.businessID))return a=t.TUIChat.messageHandler.handleCallKitSignaling(o),a;a=Df.includes(o.messageForShow)?n(`TUIChat.${o.messageForShow}`):o.messageForShow}else a=Df.includes(o.messageForShow)?n(`TUIChat.${o.messageForShow}`):o.messageForShow;return o.isRevoked&&(a=n("TUIChat.撤回了一条消息")),i.type===t.TYPES.CONV_GROUP&&o.type===t.TYPES.MSG_GRP_TIP?a:`${r}${s?`${s}:`:""}${a}`}decodeTextMessage(e){if(kf(e))return e;const t=/(\[.+?\])/g;let n=e;if(t.test(e)){const i=this.getEngine(),o=i.TUITranslate.t.bind(i.TUITranslate);n=e.replace(t,(e=>{const t=o(`Emoji.${e}`);return uf||!t||t.startsWith("Emoji.")?sf[e]||e:t}))}return n}}class Of{constructor(){this.defaultStore={currentConversationID:"",totalUnreadCount:0,conversationList:[],currentConversation:null,operationTypeMap:new Map},this.store={currentConversationID:"",totalUnreadCount:0,conversationList:[],currentConversation:null,operationTypeMap:new Map}}update(e,t){switch(e){case"conversationList":this.updateConversationList(t);break;case"operationTypeMap":this.updateOperationTypeMap(t);break;default:this.store[e]=t}}getData(e){return this.store[e]}getModel(e){return this.store.conversationList.find((t=>t.conversationID===e))}reset(e=[]){this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}updateConversationList(e){const t=[];e.forEach((e=>{let n=e;e instanceof Rf?n.updateProperties(e):n=new Rf(e);const i=this.getOperationType(e);n.updateOperationType(i),t.push(n)})),this.store.conversationList=t}updateOperationTypeMap(e){const{conversationID:t,operationType:n=0}=e;this.store.operationTypeMap.set(t,n)}getOperationType(e){const{conversationID:t}=e;return this.store.operationTypeMap.get(t)||0}}class bf extends Tf{constructor(e){super(),this.messageHandlers={[this.getEngine().TYPES.MSG_TEXT]:e=>this.getEngine().TUIChat.messageHandler.handleTextMessage(e),[this.getEngine().TYPES.MSG_FACE]:e=>this.getEngine().TUIChat.messageHandler.handleFaceMessage(e),[this.getEngine().TYPES.MSG_LOCATION]:e=>this.getEngine().TUIChat.messageHandler.handleLocationMessage(e),[this.getEngine().TYPES.MSG_IMAGE]:e=>this.getEngine().TUIChat.messageHandler.handleImageMessage(e),[this.getEngine().TYPES.MSG_AUDIO]:e=>this.getEngine().TUIChat.messageHandler.handleAudioMessage(e),[this.getEngine().TYPES.MSG_VIDEO]:e=>this.getEngine().TUIChat.messageHandler.handleVideoMessage(e),[this.getEngine().TYPES.MSG_FILE]:e=>this.getEngine().TUIChat.messageHandler.handleFileMessage(e),[this.getEngine().TYPES.MSG_CUSTOM]:e=>this.getEngine().TUIChat.messageHandler.handleCustomMessage(e),[this.getEngine().TYPES.MSG_MERGER]:e=>this.getEngine().TUIChat.messageHandler.handleMergeMessage(e),[this.getEngine().TYPES.MSG_GRP_TIP]:e=>this.getEngine().TUIChat.messageHandler.handleGroupTipsMessage(e)},this._message=e,this._signalingInfo=void 0,this.progress=0,this.reactionList=[],this.initProperties(e)}initProperties(e){Object.keys(e).forEach((t=>{Zg(t)||(this[t]=e[t])}))}updateProperties(e){this._message=e,Object.keys(e).forEach((t=>{Zg(t)||(this[t]=e[t])}))}getMessage(){return this._message}modifyMessage(e){return e.type&&this._message.type!==e.type&&!e.payload?Promise.reject({code:Yg.MISMATCH_TYPE_AND_PAYLOAD,message:Jg.MISMATCH_TYPE_AND_PAYLOAD}):(this._message.type=e.type||this._message.type,this._message.payload=e.payload||this._message.payload,this._message.cloudCustomData=e.cloudCustomData||this._message.cloudCustomData,this.getEngine().TUIChat.modifyMessage(this._message))}revokeMessage(){return this.getEngine().TUIChat.revokeMessage(this._message)}resendMessage(){return this.getEngine().TUIChat.resendMessage(this._message)}deleteMessage(){return this.getEngine().TUIChat.deleteMessage([this._message])}quoteMessage(){return this.getEngine().TUIChat.quoteMessage(this._message)}replyMessage(){return this.getEngine().TUIChat.replyMessage(this._message)}setMessageExtensions(e){return this.getEngine().TUIChat.setMessageExtensions(this._message,e)}getMessageExtensions(){return this.getEngine().TUIChat.getMessageExtensions(this._message)}deleteMessageExtensions(e){return this.getEngine().TUIChat.deleteMessageExtensions(this._message,e)}getSignalingInfo(){return this.type!==this.getEngine().TYPES.MSG_CUSTOM?null:Qg(this._signalingInfo)?(this._signalingInfo=this.getEngine().chat.getSignalingInfo(this._message),this._signalingInfo):this._signalingInfo}getMessageContent(){const e=this.messageHandlers[this.type];if(Qg(e))return{};if(this.type===this.getEngine().TYPES.MSG_GRP_TIP)return e(this._message);const t=this.getEngine().TUIFriend.getFriendRemark([this.from]);return Object.assign(Object.assign({},e(this._message)),{showName:t[this.from]||this.nameCard||this.nick||this.from})}sendForwardMessage(e){return this.getEngine().TUIChat.sendForwardMessage(e,[this._message])}}class Af{constructor(){this.defaultStore={messageList:[],isCompleted:!1,nextReqMessageID:"",quoteMessage:{},newMessageList:[],typingStatus:!1,messageSource:void 0,translateTextInfo:void 0,voiceToTextInfo:void 0,userInfo:{}},this.store={messageList:[],isCompleted:!1,nextReqMessageID:"",quoteMessage:{},newMessageList:[],typingStatus:!1,messageSource:void 0,translateTextInfo:void 0,voiceToTextInfo:void 0,userInfo:{}}}update(e,t){switch(e){case"messageList":this.updateMessageList(t);break;case"translateTextInfo":this.updateTranslateTextInfo(t);break;case"voiceToTextInfo":this.updateVoiceToTextInfo(t);break;default:this.store[e]=t}}getData(e){return this.store[e]}getModel(e){return this.store.messageList.find((t=>t.ID===e))}reset(e=[]){const t=e.filter((e=>!cf.includes(e)));this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),null==t?void 0:t.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}updateMessageList(e){const t=[];e.forEach((e=>{let n=e;e instanceof bf||(n=this.getModel(e.ID),n?n.updateProperties(e):n=new bf(e)),t.push(n)})),this.store.messageList=t}updateTranslateTextInfo(e){this.updateBykey("translateTextInfo",e)}updateVoiceToTextInfo(e){this.updateBykey("voiceToTextInfo",e)}updateBykey(e,t){const{conversationID:n,messageID:i,visible:o=!1}=t;this.store[e]||(this.store[e]=new Map),this.store[e].has(n)||this.store[e].set(n,[]);const s=this.store[e].get(n)||[];let a=!0;for(let r=0;r{Zg(t)||(this[t]=e[t])}))}}class Pf{constructor(){this.defaultStore={currentGroupID:"",currentGroup:{},currentGroupAttributes:{},currentGroupCounters:{},currentGroupMemberList:[],groupList:[],groupSystemNoticeList:[],isCompleted:!1,offset:0},this.store={currentGroupID:"",currentGroup:void 0,currentGroupAttributes:{},currentGroupCounters:{},currentGroupMemberList:[],groupList:[],groupSystemNoticeList:[],isCompleted:!1,offset:0}}update(e,t){switch(e){case"groupList":this.updateGroupList(t);break;case"currentGroup":this.store.currentGroup=t instanceof Lf?t:new Lf(t);break;default:this.store[e]=t}}getData(e){if("groupSystemNoticeList"===e){const e=[...this.store.groupSystemNoticeList];return this.store.groupSystemNoticeList.length=0,e}return this.store[e]}reset(e=[]){this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}updateGroupList(e){this.store.groupList=e.map((e=>e instanceof Lf?e:new Lf(e)))}}class Nf{constructor(){this.store={}}update(e,t){this.store[e]=t}getData(e){return this.store[e]}reset(e=[]){0===e.length&&(this.store={}),this.store=Object.assign(Object.assign({},this.store),e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:void 0})),{}))}}class wf{constructor(){this.defaultStore={friendList:[],friendApplicationList:[],friendApplicationUnreadCount:0},this.store={friendList:[],friendApplicationList:[],friendApplicationUnreadCount:0}}update(e,t){this.store[e]=t}getData(e){return this.store[e]}reset(e=[]){this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}}class Uf{constructor(){this.defaultStore={currentSearchInputValue:{value:"",searchType:"global"},currentSearchMessageType:{value:{key:"",label:"",value:""},searchType:"global"},currentSearchMessageTime:{value:{key:"",label:"",value:{timePosition:0,timePeriod:0}},searchType:"global"},currentSearchingStatus:{isSearching:!1,searchType:"global"},isShowInConversationSearch:!1},this.store={currentSearchInputValue:{value:"",searchType:"global"},currentSearchMessageType:{value:{key:"",label:"",value:""},searchType:"global"},currentSearchMessageTime:{value:{key:"",label:"",value:{timePosition:0,timePeriod:0}},searchType:"global"},currentSearchingStatus:{isSearching:!1,searchType:"global"},isShowInConversationSearch:!1}}update(e,t){this.store[e]=t}getData(e){return this.store[e]}reset(e=[]){this.store=Object.assign(Object.assign(Object.assign({},this.defaultStore),this.store),null==e?void 0:e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.defaultStore[t]})),{}))}}class Gf{constructor(){this.storeMap={[jg.APP]:new Sf,[jg.USER]:new Ef,[jg.CONV]:new Of,[jg.CHAT]:new Af,[jg.GRP]:new Pf,[jg.FRIEND]:new wf,[jg.SEARCH]:new Uf},this.task={}}static getInstance(){return Gf.instance||(Gf.instance=new Gf),Gf.instance}watch(e,t){this.task[e]||(this.task[e]={});const n=this.task[e];Object.keys(t).forEach((i=>{const o=t[i];n[i]||(n[i]=new Map),n[i].set(o,1),this.notifyOnWatch(e,i,o)}))}unwatch(e,t){if(!this.task[e])return;const n=this.task[e];Object.keys(t).forEach((e=>{var i;null===(i=n[e])||void 0===i||i.delete(t[e])}))}update(e,t,n){var i;e!==jg.CUSTOM||this.storeMap[e]||(this.storeMap[e]=new Nf),null===(i=this.storeMap[e])||void 0===i||i.update(t,n),this.notify(e,t)}getData(e,t){var n;return e!==jg.CUSTOM||this.storeMap[e]||(this.storeMap[e]=new Nf),null===(n=this.storeMap[e])||void 0===n?void 0:n.getData(t)}getConversationModel(e){var t;return null===(t=this.storeMap[jg.CONV])||void 0===t?void 0:t.getModel(e)}getMessageModel(e){var t;return null===(t=this.storeMap[jg.CHAT])||void 0===t?void 0:t.getModel(e)}reset(e,t=[],n=!1){if(e in this.storeMap){const i=this.storeMap[e];0===t.length&&(t=Object.keys(null==i?void 0:i.store)),i.reset(t),n&&t.forEach((t=>{this.notify(e,t)}))}}notifyOnWatch(e,t,n){const i=this.getData(e,t);rf.indexOf(t)>-1&&0===i.length||n&&n.call(this,i)}notify(e,t){if(!this.task[e])return;const n=this.task[e];if(n[t]){const i=n[t],o=this.getData(e,t);for(const[e]of i.entries())e.call(this,o)}}}function xf(e){return(xf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ff(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bf(e){var t=function(e){if("object"!=xf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xf(t)?t:t+""}function qf(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};Ff(this,e),this.init(t,n)}return Vf(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Qf,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var s="string"!=typeof t?[].concat(t):t.split(".");s.length>1;){if(o())return{};var a=i(s.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:i(s.shift())}}function om(e,t,n){var i=im(e,t,Object);i.obj[i.k]=n}function sm(e,t){var n=im(e,t),i=n.obj,o=n.k;if(i)return i[o]}function am(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):am(e[i],t[i],n):e[i]=t[i]);return e}function rm(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var cm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function um(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return cm[e]})):e}var lm="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,dm=[" ",",","?","!",";"];function pm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var i=t.split(n),o=e,s=0;ss+a;)a++,c=o[r=i.slice(s,s+a).join(n)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(r)){if("string"==typeof c)return c;if(r&&"string"==typeof c[r])return c[r]}var u=i.slice(s+a).join(n);return u?pm(c,u,n):void 0}o=o[i[s]]}return o}}function hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function gm(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Ff(this,t),i=e.call(this),lm&&em.call(jf(i)),i.data=n||{},i.options=o,void 0===i.options.keySeparator&&(i.options.keySeparator="."),void 0===i.options.ignoreJSONStructure&&(i.options.ignoreJSONStructure=!0),i}return Vf(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var r=sm(this.data,a);return r||!s||"string"!=typeof n?r:pm(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(i=t,t=(a=e.split("."))[1]),this.addNamespaces(t),om(this.data,a,i),o.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var r=sm(this.data,a)||{};i?am(r,n,o):r=gm(gm({},r),n),om(this.data,a,r),s.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?gm(gm({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),t}(),mm={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,o){var s=this;return e.forEach((function(e){s.processors[e]&&(t=s.processors[e].process(t,n,i,o))})),t}};function _m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function vm(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return Ff(this,t),i=e.call(this),lm&&em.call(jf(i)),o=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s=n,a=jf(i),o.forEach((function(e){s[e]&&(a[e]=s[e])})),i.options=r,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=Zf.create("translator"),i}return Vf(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],s=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var i=dm.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===i.length)return!0;var o=new RegExp("(".concat(i.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),s=!o.test(e);if(!s){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(s=!0)}return s}(e,n,i));if(s&&!a){var r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:o};var c=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(i)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,i){var o=this;if("object"!==xf(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"===xf(n)&&(n=vm({},n)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=this.extractFromKey(e[e.length-1],n),c=r.key,u=r.namespaces,l=u[u.length-1],d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var h=n.nsSeparator||this.options.nsSeparator;return s?{res:"".concat(l).concat(h).concat(c),usedKey:c,exactUsedKey:c,usedLng:d,usedNS:l}:"".concat(l).concat(h).concat(c)}return s?{res:c,usedKey:c,exactUsedKey:c,usedLng:d,usedNS:l}:c}var g=this.resolve(e,n),f=g&&g.res,m=g&&g.usedKey||c,_=g&&g.exactUsedKey||c,v=Object.prototype.toString.apply(f),y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject;if(I&&f&&"string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f&&["[object Number]","[object Function]","[object RegExp]"].indexOf(v)<0&&("string"!=typeof y||"[object Array]"!==v)){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,vm(vm({},n),{},{ns:u})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return s?(g.res=M,g):M}if(a){var C="[object Array]"===v,S=C?[]:{},E=C?_:m;for(var T in f)if(Object.prototype.hasOwnProperty.call(f,T)){var k="".concat(E).concat(a).concat(T);S[T]=this.translate(k,vm(vm({},n),{joinArrays:!1,ns:u})),S[T]===k&&(S[T]=f[T])}f=S}}else if(I&&"string"==typeof y&&"[object Array]"===v)(f=f.join(y))&&(f=this.extendTranslation(f,e,n,i));else{var D=!1,R=!1,O=void 0!==n.count&&"string"!=typeof n.count,b=t.hasDefaultValue(n),A=O?this.pluralResolver.getSuffix(d,n.count,n):"",L=n["defaultValue".concat(A)]||n.defaultValue;!this.isValidLookup(f)&&b&&(D=!0,f=L),this.isValidLookup(f)||(R=!0,f=c);var P=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:f,N=b&&L!==f&&this.options.updateMissing;if(R||D||N){if(this.logger.log(N?"updateKey":"missingKey",d,l,c,N?L:f),a){var w=this.resolve(c,vm(vm({},n),{},{keySeparator:!1}));w&&w.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var U=[],G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&G&&G[0])for(var x=0;x1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,r),u=c.key;n=u;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var d=void 0!==r.count&&"string"!=typeof r.count,p=d&&!r.ordinal&&0===r.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==r.context&&("string"==typeof r.context||"number"==typeof r.context)&&""!==r.context,g=r.lngs?r.lngs:a.languageUtils.toResolveHierarchy(r.lng||a.language,r.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(s=e,!ym["".concat(g[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(s)&&(ym["".concat(g[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(g.join(", "),'" won\'t get resolved as namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach((function(n){if(!a.isValidLookup(t)){o=n;var s,c=[u];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,u,n,e,r);else{var l;d&&(l=a.pluralResolver.getSuffix(n,r.count,r));var g="".concat(a.options.pluralSeparator,"zero");if(d&&(c.push(u+l),p&&c.push(u+g)),h){var f="".concat(u).concat(a.options.contextSeparator).concat(r.context);c.push(f),d&&(c.push(f+l),p&&c.push(f+g))}}for(;s=c.pop();)a.isValidLookup(t)||(i=s,t=a.getResource(n,e,s,r))}})))}))}})),{res:t,usedKey:n,exactUsedKey:i,usedLng:o,usedNS:s}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),t}();function Mm(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Cm=function(){function e(t){Ff(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zf.create("languageUtils")}return Vf(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Mm(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Mm(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Mm(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find((function(e){return e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:0===e.indexOf(i)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],s=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):"string"==typeof e&&s(this.formatLanguageCode(e)),i.forEach((function(e){o.indexOf(e)<0&&s(n.formatLanguageCode(e))})),o}}]),e}(),Sm=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Em={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Tm=["v1","v2","v3"],km={zero:0,one:1,two:2,few:3,many:4,other:5},Dm=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ff(this,e),this.languageUtils=t,this.options=i,this.logger=Zf.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},Sm.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:Em[e.fc]}}))})),n)}return Vf(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((function(e,t){return km[e]-km[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):i.numbers.map((function(i){return t.getSuffix(e,i,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(t)):this.getSuffixRetroCompatible(i,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[i];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var s=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!Tm.includes(this.options.compatibilityJSON)}}]),e}();function Rm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Om(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=(i=t,void 0!==(s=sm(e,o=n))?s:sm(i,o));return!c&&r&&"string"==typeof n&&void 0===(c=pm(e,n,a))&&(c=pm(t,n,a)),c}var Am=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ff(this,e),this.logger=Zf.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Vf(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:um,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?rm(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?rm(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?rm(t.nestingPrefix):t.nestingPrefixEscaped||rm("$t("),this.nestingSuffix=t.nestingSuffix?rm(t.nestingSuffix):t.nestingSuffixEscaped||rm(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var o,s,a,r=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(r.formatSeparator)<0){var o=bm(t,c,e,r.options.keySeparator,r.options.ignoreJSONStructure);return r.alwaysFormat?r.format(o,void 0,n,Om(Om(Om({},i),t),{},{interpolationkey:e})):o}var s=e.split(r.formatSeparator),a=s.shift().trim(),u=s.join(r.formatSeparator).trim();return r.format(bm(t,c,a,r.options.keySeparator,r.options.ignoreJSONStructure),u,n,Om(Om(Om({},i),t),{},{interpolationkey:a}))};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return r.escapeValue?u(r.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(s=l(n)))if("function"==typeof d){var c=d(e,o,i);s="string"==typeof c?c:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))s="";else{if(p){s=o[0];continue}r.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),s=""}else"string"==typeof s||r.useRawValueToEscape||(s=nm(s));var u=t.safeValue(s);if(e=e.replace(o[0],u),p?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=r.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,i,o,s=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function r(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),s="{".concat(i[1]);e=i[0];var a=(s=this.interpolate(s,o)).match(/'/g),r=s.match(/"/g);(a&&a.length%2==0&&!r||r.length%2!=0)&&(s=s.replace(/'/g,'"'));try{o=JSON.parse(s),t&&(o=Om(Om({},t),o))}catch(c){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),c),"".concat(e).concat(n).concat(s)}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var c=[];(o=(o=Om({},a)).replace&&"string"!=typeof o.replace?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;var u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),c=l,u=!0}if((i=t(r.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=nm(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),u&&(i=c.reduce((function(e,t){return s.format(e,t,a.lng,Om(Om({},a),{},{interpolationkey:n[1].trim()}))}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}();function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Pm(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};Ff(this,e),this.logger=Zf.create("formatter"),this.options=t,this.formats={number:Nm((function(e,t){var n=new Intl.NumberFormat(e,Pm({},t));return function(e){return n.format(e)}})),currency:Nm((function(e,t){var n=new Intl.NumberFormat(e,Pm(Pm({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:Nm((function(e,t){var n=new Intl.DateTimeFormat(e,Pm({},t));return function(e){return n.format(e)}})),relativetime:Nm((function(e,t){var n=new Intl.RelativeTimeFormat(e,Pm({},t));return function(e){return n.format(e,t.range||"day")}})),list:Nm((function(e,t){var n=new Intl.ListFormat(e,Pm({},t));return function(e){return n.format(e)}}))},this.init(t)}return Vf(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=Nm(t)}},{key:"format",value:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce((function(e,t){var s=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var i=e.split("(");t=i[0].toLowerCase().trim();var o=i[1].substring(0,i[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return $f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split(":")),i=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[i.trim()]||(n[i.trim()]=o),"false"===o&&(n[i.trim()]=!1),"true"===o&&(n[i.trim()]=!0),isNaN(o)||(n[i.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),a=s.formatName,r=s.formatOptions;if(i.formats[a]){var c=e;try{var u=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},l=u.locale||u.lng||o.locale||o.lng||n;c=i.formats[a](e,l,Pm(Pm(Pm({},r),o),u))}catch(d){i.logger.warn(d)}return c}return i.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function Um(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Gm(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};return Ff(this,t),s=e.call(this),lm&&em.call(jf(s)),s.backend=n,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=Zf.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return Vf(t,[{key:"queueLoad",value:function(e,t,n,i){var o=this,s={},a={},r={},c={};return e.forEach((function(e){var i=!0;t.forEach((function(t){var r="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[r]=2:o.state[r]<0||(1===o.state[r]?void 0===a[r]&&(a[r]=!0):(o.state[r]=1,i=!1,void 0===a[r]&&(a[r]=!0),void 0===s[r]&&(s[r]=!0),void 0===c[t]&&(c[t]=!0)))})),i||(r[e]=!0)})),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),o=i[0],s=i[1];t&&this.emit("failedLoading",o,s,t),n&&this.store.addResourceBundle(o,s,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var i,r,c,u,l,d,p;i=n.loaded,r=s,(u=(c=im(i,[o],Object)).obj)[l=c.k]=u[l]||[],u[l].push(r),p=e,void 0!==(d=n).pending[p]&&(delete d.pending[p],d.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:s,callback:a});else{this.readingCalls++;var r=function(r,c){if(i.readingCalls--,i.waitingReads.length>0){var u=i.waitingReads.shift();i.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}r&&c&&o2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var s=this.queueLoad(e,t,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(i,a){i&&t.logger.warn("".concat(n,"loading namespace ").concat(s," for language ").concat(o," failed"),i),!i&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(s," for language ").concat(o),a),t.loaded(e,i,a)}))}},{key:"saveMissing",value:function(e,t,n,i,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var r=Gm(Gm({},s),{},{isUpdate:o}),c=this.backend.create.bind(this.backend);if(c.length<6)try{var u;(u=5===c.length?c(e,t,n,i,r):c(e,t,n,i))&&"function"==typeof u.then?u.then((function(e){return a(null,e)})).catch(a):a(null,u)}catch(l){a(l)}else c(e,t,n,i,a,r)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}}]),t}();function Fm(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===xf(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===xf(e[2])||"object"===xf(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Bm(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function qm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Vm(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(Ff(this,t),n=e.call(this),lm&&em.call(jf(n)),n.options=Bm(o),n.services={},n.logger=Zf,n.modules={external:[]},i=jf(n),Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((function(e){"function"==typeof i[e]&&(i[e]=i[e].bind(i))})),s&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,s),zf(n,jf(n));setTimeout((function(){n.init(o,s)}),0)}return n}return Vf(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var i=Fm();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=Vm(Vm(Vm({},i),this.options),Bm(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=Vm(Vm({},i.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var s;this.modules.logger?Zf.init(o(this.modules.logger),this.options):Zf.init(null,this.options),this.modules.formatter?s=this.modules.formatter:"undefined"!=typeof Intl&&(s=wm);var a=new Cm(this.options);this.store=new fm(this.options.resources,this.options);var r=this.services;r.logger=Zf,r.resourceStore=this.store,r.languageUtils=a,r.pluralResolver=new Dm(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!s||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(r.formatter=o(s),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Am(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new xm(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=tm(),l=function(){var t=function(t,i){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jm,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return s(e)})),this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var i=tm();return e||(e=this.languages),t||(t=this.options.ns),n||(n=jm),this.services.backendConnector.reload(e,t,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&mm.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=tm();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},s=function(s){e||s||!n.services.languageDetector||(s=[]);var a="string"==typeof s?s:n.services.languageUtils.getBestMatchFromCodes(s);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){var s,r;s=e,(r=a)?(o(r),n.translator.changeLanguage(r),n.isLanguageChangingTo=void 0,n.emit("languageChanged",r),n.logger.log("languageChanged",r)):n.isLanguageChangingTo=void 0,i.resolve((function(){return n.t.apply(n,arguments)})),t&&t(s,(function(){return n.t.apply(n,arguments)}))}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t,n){var i=this,o=function e(t,o){var s;if("object"!==xf(o)){for(var a=arguments.length,r=new Array(a>2?a-2:0),c=2;c1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=n.lng||this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||2===i};if(n.precheck){var r=n.precheck(this,a);if(void 0!==r)return r}return!(!this.hasResourceBundle(i,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(i,e)||o&&!a(s,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=tm();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=tm();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],o=e.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new Cm(Fm());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jm,o=Vm(Vm(Vm({},this.options),n),{isClone:!0}),s=new t(o);return void 0===n.debug&&void 0===n.prefix||(s.logger=s.logger.clone(n)),["store","services","language"].forEach((function(t){s[t]=e[t]})),s.services=Vm({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s.translator=new Im(s.services,s.options),s.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var Km=Hm.createInstance();Km.createInstance=Hm.createInstance,Km.createInstance,Km.dir,Km.init,Km.loadResources,Km.reloadResources,Km.use,Km.changeLanguage,Km.getFixedT,Km.t,Km.exists,Km.setDefaultNamespace,Km.hasLoadedNamespace,Km.loadNamespaces,Km.loadLanguages;class zm extends Tf{constructor(){super(),this.languages=null,this.keyMap={}}static getInstance(){return zm.instance||(zm.instance=new zm),zm.instance}provideLanguages(e){var t;uf||(this.languages=e,(null===(t=e["zh-CN"])||void 0===t?void 0:t.Chat)&&this.setKeyMap(e["zh-CN"]),console.log("TUITranslateService.provideLanguages ok."))}useI18n(e){var t;if(uf)return;if(!this.languages)return void console.warn("TUITranslateService.useI18next not have messages.");const n={};for(const[o,s]of Object.entries(this.languages))n["zh_cn"===o?"zh":o]={translation:s};Km.init({compatibilityJSON:"v3",lng:e||"zh",fallbackLng:"zh",detection:{order:["querystring","navigator"],caches:["localStorage","cookie"]},resources:n});let i=this.normalizeLanguageKey(e||"zh");null===(t=this.getEngine().TUIReport)||void 0===t||t.reportFeature(201,i)}changeLanguage(e){let t=this.normalizeLanguageKey(e);return this.getEngine().TUIReport.reportFeature(201,t),Km.changeLanguage(e)}normalizeLanguageKey(e){return e.includes("en")?"en-us":e.includes("tw")?"zh-tw":e.includes("zh")||e.includes("cn")?"zh-cn":e.includes("ko")||e.includes("kr")?"ko-kr":e.includes("ja")||e.includes("jp")?"ja-jp":"other-"+e}t(e){if(!this.languages){let t=e;return!Qg(e)&&e.indexOf(".")>-1&&(t=e.split(".").pop()||""),t}const t=this.keyMap[e];return t?Km.t(t):Km.t(e)}setKeyMap(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=t?`${t}.${n}`:n;if(e[n]&&"object"==typeof e[n]&&!Array.isArray(e[n])&&null!==e[n])this.setKeyMap(e[n],i);else{let i=t?`${t}.${e[n]}`:e[n];i=this.replaceKey(i),this.keyMap[i]=`${t}.${n}`}}}replaceKey(e){return e.startsWith("Chat")?e.replace("Chat","TUIChat"):e.startsWith("Conversation")?e.replace("Conversation","TUIConversation"):e.startsWith("Message")?e.replace("Message","message.tip"):e.startsWith("Call")?e.replace("Call","message.custom"):e}}class Wm extends Tf{constructor(){super(),this.serv="TUIConversationService"}static getInstance(){return Wm.instance||(Wm.instance=new Wm),Wm.instance}init(){const e=this.getEngine();e.eventCenter.addEvent(e.EVENT.CONVERSATION_LIST_UPDATED,this.onConversationListUpdated.bind(this)),e.eventCenter.addEvent(e.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED,this.onTotalUnreadCountUpdated.bind(this)),e.eventCenter.addEvent(e.EVENT.MESSAGE_RECEIVED,this.onMessageReceived.bind(this)),this.getConversationInitData()}onConversationListUpdated(e){const t=this.filterSystemConversation(e);this.getEngine().TUIStore.update(jg.CONV,"conversationList",t),this.updateCurrentConversation()}onTotalUnreadCountUpdated(e){this.getEngine().TUIStore.update(jg.CONV,"totalUnreadCount",e)}onMessageReceived(e){const t=this.getEngine(),n=this.getEngine().TUIStore.getData(jg.CONV,"conversationList");let i=!1;for(let o=0;o0){this.getEngine().TUIStore.update(jg.CONV,"operationTypeMap",{conversationID:a,operationType:0}),i=!0;break}}}if(i){this.getEngine().TUIStore.update(jg.CONV,"conversationList",n);const e=this.getEngine().TUIStore.getData(jg.CONV,"currentConversationID")||"",t=this.findConversation(e);t&&this.getEngine().TUIStore.update(jg.CONV,"currentConversation",t)}}getConversationInitData(){const e=this.getEngine();e.chat.isReady()&&e.chat.getConversationList().then((t=>{const{conversationList:n,isSyncCompleted:i}=t.data;if(console.log(`${this.serv}.init, getConversationList count:${n.length} isSyncCompleted:${i}`),n.length>0){this.onConversationListUpdated(n);const t=e.chat.getTotalUnreadMessageCount();this.onTotalUnreadCountUpdated(t)}}))}switchConversation(e){return Bg(this,void 0,void 0,(function*(){const t=`${this.serv}.switchConversation`,n=this.getEngine();if(!e)return n.TUIStore.reset(jg.CHAT,["messageList","isCompleted","nextReqMessageID"]),n.TUIStore.update(jg.CONV,"currentConversationID",""),n.TUIStore.update(jg.CONV,"currentConversation",null),console.log(`${t} conversationID is empty, conversationID:${e}`),Promise.resolve({});if(!e.startsWith(n.TYPES.CONV_C2C)&&!e.startsWith(n.TYPES.CONV_GROUP))return console.warn(`${t} conversationID is invalid, conversationID:${e}`),Promise.reject({code:Yg.INVALID_CONV_ID,message:Jg.INVALID_CONV_ID});const i=n.TUIStore.getData(jg.CONV,"currentConversationID");if(i&&i===e)return this.setMessageRead(i),console.warn(`${t} please check conversationID, conversationID:${e}`),Promise.resolve({code:Yg.CONV_ID_SAME,message:Jg.CONV_ID_SAME});const o=yield this.getConversationModel(e);return Qg(o)?(console.warn(`${t} target conversation is not exist, conversationID:${e}`),Promise.reject({code:Yg.CONV_NOT_EXIST,message:Jg.CONV_NOT_EXIST})):(i&&this.setMessageRead(i),e&&this.setMessageRead(e),n.TUIStore.reset(jg.CHAT,["messageList","isCompleted","nextReqMessageID"]),n.TUIStore.update(jg.CONV,"currentConversationID",e),n.TUIStore.update(jg.CONV,"currentConversation",o),Promise.resolve(o))}))}getConversationModel(e){return Bg(this,void 0,void 0,(function*(){let t=this.findConversation(e);if(Qg(t))try{const n=yield this.getConversationProfile(e);n.data&&n.data.conversation&&(t=new Rf(n.data.conversation))}catch(n){t=void 0}return t}))}findConversation(e){let t;const n=this.getEngine().TUIStore.getData(jg.CONV,"conversationList");for(let i=0;i{const n=this.getEngine().TUIStore.getData(jg.CONV,"currentConversationID");return console.log(`${this.serv}.deleteConversation conversationID:${e} currentConversationID:${n}`),e===n&&(this.getEngine().TUIStore.update(jg.CONV,"currentConversationID",""),this.getEngine().TUIStore.update(jg.CONV,"currentConversation",null)),t}))}pinConversation(e){return this.getEngine().chat.pinConversation(e)}muteConversation(e){return this.getEngine().chat.setMessageRemindType(e)}clearHistoryMessage(e){return this.getEngine().chat.clearHistoryMessage(e).then((e=>(this.getEngine().TUIStore.update(jg.CHAT,"messageList",[]),this.getEngine().TUIStore.update(jg.CHAT,"nextReqMessageID",""),this.getEngine().TUIStore.update(jg.CHAT,"isCompleted",!0),e)))}setMessageRead(e){return this.getEngine().chat.setMessageRead({conversationID:e})}setConversationDraft(e){const{conversationID:t,draftInfo:n}=e;let i="";return n&&(i=JSON.stringify(n)),this.getEngine().chat.setConversationDraft({conversationID:t,draftText:i}).then((e=>{const{conversation:t}=e.data;this.updateConversation(t)}))}updateConversation(e){let t=!1;const n=this.getEngine().TUIStore.getData(jg.CONV,"conversationList");for(let i=0;ie.type!==this.getEngine().TYPES.CONV_SYSTEM))}}class Ym{constructor(e){this.TUIUserService=e}getEngine(){return this.TUIUserService.getEngine()}init(){this.getEngine().eventCenter.addEvent(this.getEngine().EVENT.PROFILE_UPDATED,this.onProfileUpdated.bind(this)),this.getEngine().eventCenter.addEvent(this.getEngine().EVENT.BLACKLIST_UPDATED,this.onBlacklistUpdated.bind(this)),this.getUserProfileInitData()}onProfileUpdated(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.USER,"userProfile");e.forEach((e=>{e.userID===n.userID&&t.TUIStore.update(jg.USER,"userProfile",e)}))}onBlacklistUpdated(e){const t=this.getEngine();this.getBlacklistProfile(e).then((e=>{t.TUIStore.update(jg.USER,"userBlacklist",e)}))}getUserProfileInitData(){const e=this.getEngine();e.chat.isReady()&&e.chat.getBlacklist().then((e=>{const t=e.data||[];console.log(`TUIUserProfileHandler.init, getBlacklist count:${t.length}`),t.length>0&&this.onBlacklistUpdated(t)}))}getBlacklistProfile(e){const t=[];let n=0;for(;n{i.push(this.TUIUserService.getUserProfile({userIDList:e}))}));const o=[];return Promise.all(i).then((e=>(e.forEach((e=>{const t=e.data.map((e=>{const{userID:t,nick:n,avatar:i}=e;return{userID:t,nick:n,avatar:i}}));o.push(...t)})),o)))}getUserProfile(e){const t=this.getEngine();return Qg(e)?t.chat.getMyProfile().then((e=>(t.TUIStore.update(jg.USER,"userProfile",e.data),e))).catch((e=>Promise.reject(e))):t.chat.getUserProfile(e)}updateMyProfile(e){return this.getEngine().chat.updateMyProfile(e)}addToBlacklist(e){return this.getEngine().chat.addToBlacklist(e)}removeFromBlacklist(e){return this.getEngine().chat.removeFromBlacklist(e)}}function $m(e,t,n=!0){var i,o;i=n?Xm(e):e,o=t,df?hf.setStorageSync(i,o):Qm()&&localStorage.setItem(i,JSON.stringify(o))}function Jm(e,t=!0){try{return function(e){if(df)return hf.getStorageSync(e);if(Qm()){const t=localStorage.getItem(e);if("undefined"!==t)return JSON.parse(t)}}(t?Xm(e):e)}catch(n){return void console.warn("Storage.getStorageItem error:",n)}}function Xm(e){return`chat_engine_${e}`}function Qm(){return navigator&&navigator.cookieEnabled&&localStorage}class Zm{constructor(e){this.TUIUserService=e}getEngine(){return this.TUIUserService.getEngine()}init(){const e=this.getEngine(),t=Jm("displayOnlineStatus")||!1;e.TUIStore.update(jg.USER,"displayOnlineStatus",t),e.eventCenter.addEvent(e.EVENT.USER_STATUS_UPDATED,this.onUserStatusUpdated.bind(this)),this.onConversationListUpdated()}onConversationListUpdated(){const e=this.getEngine();e.TUIStore.watch(jg.CONV,{conversationList:()=>{const t=e.TUIStore.getData(jg.APP,"enabledOnlineStatus"),n=e.TUIStore.getData(jg.USER,"displayOnlineStatus");t&&n&&this.startToSubscribe()}})}onUserStatusUpdated(e){this.getEngine().TUIStore.update(jg.USER,"userStatusList",e)}switchUserStatus(e){const t=this.getEngine(),{displayOnlineStatus:n=!1}=e;t.TUIStore.update(jg.USER,"displayOnlineStatus",n),$m("displayOnlineStatus",n);const i=t.TUIStore.getData(jg.APP,"enabledOnlineStatus");i?!0===n?this.startToSubscribe():this.unsubscribeUserStatus():console.warn(`UserStatusHandler.switchUserStatus enabledOnlineStatus:${i} displayOnlineStatus:${n}`)}getUserStatus(e){const t=this.getEngine();return t.chat.getUserStatus(e).then((e=>{const{successUserList:n}=e.data;return n.length>0&&t.TUIStore.update(jg.USER,"userStatusList",n),e})).catch((e=>Promise.reject(e)))}subscribeUserStatus(e){var t;const n=(null===(t=null==e?void 0:e.userIDList)||void 0===t?void 0:t.length)||0;return 0===n?(console.warn(`UserStatusHandler.subscribeUserStatus userID count:${n}`),Promise.resolve()):this.getEngine().chat.subscribeUserStatus(e)}unsubscribeUserStatus(e){const t=this.getEngine(),{userIDList:n=[]}=e||{};return t.chat.unsubscribeUserStatus({userIDList:n}).then((e=>{const{failureUserList:i}=e.data,o=[];return n.forEach((e=>{i.includes(e)||o.push({userID:e,statusType:Hg.UNSUB_USER})})),t.TUIStore.update(jg.USER,"userStatusList",o),e})).catch((e=>Promise.reject(e)))}startToSubscribe(){const e=this.getEngine(),t=e.TUIStore.getData(jg.CONV,"conversationList"),n=e.TUIStore.getData(jg.USER,"userStatusList"),i=[];t.forEach((t=>{if(t.type===e.TYPES.CONV_C2C){const o=t.conversationID.replace(e.TYPES.CONV_C2C,"");n.has(o)||i.push(o)}})),0!==i.length&&e.chat.isReady()&&(this.subscribeUserStatus({userIDList:i}),this.getUserStatus({userIDList:i}))}}class e_ extends Tf{constructor(){super(),this.userProfileHandler=new Ym(this),this.userStatusHandler=new Zm(this)}static getInstance(){return e_.instance||(e_.instance=new e_),e_.instance}init(){const e=this.getEngine();e.eventCenter.addEvent(e.EVENT.KICKED_OUT,this.onKickedOut.bind(this)),e.eventCenter.addEvent(e.EVENT.NET_STATE_CHANGE,this.onNetStateChange.bind(this)),this.userProfileHandler.init(),this.userStatusHandler.init(),this.initMessageReadReceipt()}onKickedOut(e){this.getEngine().TUIStore.update(jg.USER,"kickedOut",e.type)}onNetStateChange(e){this.getEngine().TUIStore.update(jg.USER,"netStateChange",e.state)}initMessageReadReceipt(){const e=Jm("displayMessageReadReceipt")||!0;this.getEngine().TUIStore.update(jg.USER,"displayMessageReadReceipt",e)}switchUserStatus(e){return this.userStatusHandler.switchUserStatus(e)}switchMessageReadStatus(e){this.getEngine().TUIStore.update(jg.USER,"displayMessageReadReceipt",e),$m("displayMessageReadReceipt",e)}getUserProfile(e){return this.userProfileHandler.getUserProfile(e)}updateMyProfile(e){return this.userProfileHandler.updateMyProfile(e)}addToBlacklist(e){return this.userProfileHandler.addToBlacklist(e)}removeFromBlacklist(e){return this.userProfileHandler.removeFromBlacklist(e)}getUserStatus(e){return this.userStatusHandler.getUserStatus(e)}subscribeUserStatus(e){return this.userStatusHandler.subscribeUserStatus(e)}unsubscribeUserStatus(e){return this.userStatusHandler.unsubscribeUserStatus(e)}}class t_{constructor(e){this.TUIChatService=e,this.userShowNameMap=new Map,this.requestedUserMap=new Map}getEngine(){return this.TUIChatService.getEngine()}t(e){return this.getEngine().TUITranslate.t(e)}handleTextMessage(e){return{text:this.decodeText(e.payload)}}handleFaceMessage(e){const t={name:"",url:"",type:""};return e.payload.data.indexOf("@custom")>-1?(t.name=e.payload.data,t.type="custom",t):(t.name=e.payload.data.indexOf("@2x")<0?`${e.payload.data}@2x`:e.payload.data,t.url=`https://web.sdk.qcloud.com/im/assets/face-elem/${t.name}.png`,t)}handleLocationMessage(e){const t={lon:"",lat:"",href:"",url:"",description:""};return t.lon=e.payload.longitude.toFixed(6),t.lat=e.payload.latitude.toFixed(6),t.href=`https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&pointx=${t.lon}&pointy=${t.lat}&name=${e.payload.description}`,t.url=`https://apis.map.qq.com/ws/staticmap/v2/?center=${t.lat},${t.lon}&zoom=10&size=300*150&maptype=roadmap&markers=size:large|color:0xFFCCFF|label:k|${t.lat},${t.lon}&key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD`,t.description=e.payload.description,t}handleImageMessage(e){return{url:e.payload.imageInfoArray[0].url,width:e.payload.imageInfoArray[0].width,height:e.payload.imageInfoArray[0].height}}handleAudioMessage(e){return{url:e.payload.url,second:e.payload.second}}handleVideoMessage(e){return{url:e.payload.videoUrl,snapshotUrl:e.payload.snapshotUrl,snapshotWidth:e.payload.snapshotWidth,snapshotHeight:e.payload.snapshotHeight}}handleFileMessage(e){return{url:e.payload.fileUrl,name:e.payload.fileName,size:nf(e.payload.fileSize)}}handleCustomMessage(e){var t;const n=this.handleCreateGroupCustomMessage(e);return{custom:this.handleCallKitSignaling(e)||n||(null===(t=null==e?void 0:e.payload)||void 0===t?void 0:t.extension)||`${this.t("TUIChat.[自定义消息]")}`,businessID:n?"group_create":""}}handleMergeMessage(e){return Object.assign({},e.payload)}handleGroupTipsMessage(e){var t,n,i,o,s,a;const r=this.getEngine(),c={text:""};let u=(null==e?void 0:e.nick)||(null===(n=null===(t=null==e?void 0:e.payload)||void 0===t?void 0:t.userIDList)||void 0===n?void 0:n.join(","));switch((null===(o=null===(i=null==e?void 0:e.payload)||void 0===i?void 0:i.memberList)||void 0===o?void 0:o.length)>0&&(u="",null===(a=null===(s=null==e?void 0:e.payload)||void 0===s?void 0:s.memberList)||void 0===a||a.map((e=>{const t=(null==e?void 0:e.nick)||(null==e?void 0:e.userID);return u+=`${this.substringByLength(t)},`,e})),u=null==u?void 0:u.slice(0,-1)),e.payload.operationType){case r.TYPES.GRP_TIP_MBR_JOIN:c.text=`${u} ${this.t("message.tip.加入群组")}`;break;case r.TYPES.GRP_TIP_MBR_QUIT:c.text=`${this.t("message.tip.群成员")}:${u} ${this.t("message.tip.退出群组")}`;break;case r.TYPES.GRP_TIP_MBR_KICKED_OUT:c.text=`${this.t("message.tip.群成员")}:${u} ${this.t("message.tip.被")}${this.t("message.tip.踢出群组")}`;break;case r.TYPES.GRP_TIP_MBR_SET_ADMIN:c.text=`${this.t("message.tip.群成员")}:${u} ${this.t("message.tip.成为管理员")}`;break;case r.TYPES.GRP_TIP_MBR_CANCELED_ADMIN:c.text=`${this.t("message.tip.群成员")}:${u} ${this.t("message.tip.被撤销管理员")}`;break;case r.TYPES.GRP_TIP_GRP_PROFILE_UPDATED:c.text=this.handleGroupProfileUpdated(e);break;case r.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:for(const t of e.payload.memberList)t.muteTime>0?c.text=`${this.t("message.tip.群成员")}:${u} ${this.t("message.tip.被禁言")}`:c.text=`${this.t("message.tip.群成员")}:${u} ${this.t("message.tip.被取消禁言")}`;break;default:c.text=`[${this.t("message.tip.群提示消息")}]`}return c}handleGroupSystemMessage(e){const t=e.payload.groupProfile.name||e.payload.groupProfile.groupID,n={text:""};switch(e.payload.operationType){case 1:n.text=`${e.payload.operatorID} ${this.t("message.tip.申请加入群组")}:${t}`;break;case 2:n.text=`${this.t("message.tip.成功加入群组")}:${t}`;break;case 3:n.text=`${this.t("message.tip.申请加入群组")}:${t} ${this.t("message.tip.被拒绝")}`;break;case 4:n.text=`${this.t("message.tip.你被管理员")}${e.payload.operatorID} ${this.t("message.tip.踢出群组")}:${t}`;break;case 5:n.text=`${this.t("message.tip.群")}:${t} ${this.t("message.tip.被")} ${e.payload.operatorID} ${this.t("message.tip.解散")}`;break;case 6:n.text=`${e.payload.operatorID} ${this.t("message.tip.创建群")}:${t}`;break;case 7:case 12:n.text=`${e.payload.operatorID} ${this.t("message.tip.邀请你加群")}:${t}`;break;case 8:n.text=`${this.t("message.tip.你退出群组")}:${t}`;break;case 9:n.text=`${this.t("message.tip.你被")}${e.payload.operatorID} ${this.t("message.tip.设置为群")}:${t} ${this.t("message.tip.的管理员")}`;break;case 10:n.text=`${this.t("message.tip.你被")}${e.payload.operatorID} ${this.t("message.tip.撤销群")}:${t} ${this.t("message.tip.的管理员身份")}`;break;case 13:n.text=`${e.payload.operatorID} ${this.t("message.tip.同意加群")}:${t}`;break;case 14:n.text=`${e.payload.operatorID} ${this.t("message.tip.拒接加群")}:${t}`;break;case 255:n.text=`${this.t("message.tip.自定义群系统通知")}: ${e.payload.userDefinedField}`;break;default:n.text="未解析的群系统通知"}return n}handleCallKitSignaling(e){var t,n,i,o,s,a,r,c,u,l;const d=tf(e.payload.data);if(1!==(null==d?void 0:d.businessID))return"";const p=tf(null==d?void 0:d.data),h=e.fromAccount||e.from,g=this.getEngine().TUIFriend.getFriendRemark([h]),f=this.getEngine().getMyUserID();let m=g[h]||e.nameCard||e.nick||h;switch(m=this.substringByLength(m),null==d?void 0:d.actionType){case 1:return"audioCall"!==(null===(t=null==p?void 0:p.data)||void 0===t?void 0:t.cmd)&&"videoCall"!==(null===(n=null==p?void 0:p.data)||void 0===n?void 0:n.cmd)||!(null==d?void 0:d.groupID)?"hangup"===(null===(i=null==p?void 0:p.data)||void 0===i?void 0:i.cmd)?(null==d?void 0:d.groupID)?`${this.t("message.custom.通话结束")}`:`${this.t("message.custom.通话时长")}:${function(e){const t=e;let n,i,o,s="";return t>=3600?(n=parseInt(""+t/3600,10)<10?`0${parseInt(""+t/3600,10)}`:parseInt(""+t/3600,10),i=parseInt(""+t%60/60,10)<10?`0${parseInt(""+t%60/60,10)}`:parseInt(""+t%60/60,10),o=t%3600<10?"0"+t%3600:t%3600,o>60&&(i=parseInt(""+o/60,10)<10?`0${parseInt(""+o/60,10)}`:parseInt(""+o/60,10),o=o%60<10?"0"+o%60:o%60),s=`${n}:${i}:${o}`):t>=60&&t<3600?(i=parseInt(""+t/60,10)<10?`0${parseInt(""+t/60,10)}`:parseInt(""+t/60,10),o=t%60<10?"0"+t%60:t%60,s=`00:${i}:${o}`):t<60&&(o=t<10?`0${t}`:t,s=`00:00:${o}`),s}(null==p?void 0:p.call_end)}`:"switchToAudio"===(null===(o=null==p?void 0:p.data)||void 0===o?void 0:o.cmd)?`${this.t("message.custom.切换语音通话")}`:"switchToVideo"===(null===(s=null==p?void 0:p.data)||void 0===s?void 0:s.cmd)?`${this.t("message.custom.切换视频通话")}`:`${this.t("message.custom.发起通话")}`:`${m} ${this.t("message.custom.发起通话")}`;case 2:return(null==d?void 0:d.groupID)?`${m} ${this.t("message.custom.取消通话")}`:this.isOldUIKit("message.custom.已取消")?this.t("message.custom.取消通话"):(null==d?void 0:d.inviter)===f?this.t("message.custom.已取消"):this.t("message.custom.对方已取消");case 3:return"switchToAudio"===(null===(a=null==p?void 0:p.data)||void 0===a?void 0:a.cmd)?`${this.t("message.custom.切换语音通话")}`:"switchToVideo"===(null===(r=null==p?void 0:p.data)||void 0===r?void 0:r.cmd)?`${this.t("message.custom.切换视频通话")}`:(null==d?void 0:d.groupID)?`${m} ${this.t("message.custom.已接听")}`:this.t("message.custom.已接听");case 4:return(null==d?void 0:d.groupID)?`${m} ${this.t("message.custom.拒绝通话")}`:this.isOldUIKit("message.custom.已拒绝")?this.t("message.custom.拒绝通话"):"line_busy"===(null==p?void 0:p.line_busy)||"lineBusy"===(null==p?void 0:p.data.message)?(null==d?void 0:d.inviter)===f?this.t("message.custom.对方忙线中"):this.t("message.custom.忙线未接听"):(null==d?void 0:d.inviter)===f?this.t("message.custom.对方已拒绝"):this.t("message.custom.已拒绝");case 5:if("switchToAudio"===(null===(c=null==p?void 0:p.data)||void 0===c?void 0:c.cmd))return`${this.t("message.custom.切换语音通话")}`;if("switchToVideo"===(null===(u=null==p?void 0:p.data)||void 0===u?void 0:u.cmd))return`${this.t("message.custom.切换视频通话")}`;if(null==d?void 0:d.groupID){if(h===(null==d?void 0:d.inviter)){this.handleCallkitTimeoutSignaling(d.inviteeList);let e="";return null===(l=d.inviteeList)||void 0===l||l.forEach((t=>{const n=this.userShowNameMap.get(t)||t;e+=`${this.substringByLength(n)}、`})),e=e.substring(0,e.lastIndexOf("、")),`${e} ${this.t("message.custom.无应答")}`}return`${m} ${this.t("message.custom.无应答")}`}return this.isOldUIKit("message.custom.对方无应答")?this.t("message.custom.无应答"):(null==d?void 0:d.inviter)===f?this.t("message.custom.对方无应答"):this.t("message.custom.超时无应答");default:return""}}handleCreateGroupCustomMessage(e){let t;const n=tf(e.payload.data);return"group_create"===(null==n?void 0:n.businessID)&&(t=`${n.opUser} ${n.content}`),t}decodeText(e){const t=[];let n=e.text,i=-1,o=-1;for(;""!==n;)switch(i=n.indexOf("["),o=n.indexOf("]"),i){case 0:if(-1===o)t.push({name:"text",text:n}),n="";else{const e=n.slice(0,o+1);e.indexOf("@custom")>-1?(t.push({name:"img",src:"",type:"custom",emojiKey:e}),n=n.substring(o+1)):of[e]?(t.push({name:"img",src:"https://web.sdk.qcloud.com/im/assets/emoji-plugin/"+of[e],emojiKey:e}),n=n.substring(o+1)):(t.push({name:"text",text:"["}),n=n.slice(1))}break;case-1:t.push({name:"text",text:n}),n="";break;default:t.push({name:"text",text:n.slice(0,i)}),n=n.substring(i)}return t}handleGroupProfileUpdated(e){const{nick:t,payload:n}=e,{newGroupProfile:i,memberList:o,operatorID:s}=n;let a="";const r=t||s,c=Object.keys(i)[0];switch(c){case"muteAllMembers":a=i[c]?`${this.t("message.tip.管理员")} ${r} ${this.t("message.tip.开启全员禁言")}`:`${this.t("message.tip.管理员")} ${r} ${this.t("message.tip.取消全员禁言")}`;break;case"ownerID":a=`${o[0].nick||o[0].userID} ${this.t("message.tip.成为新的群主")}`;break;case"groupName":a=`${r} ${this.t("message.tip.修改群名为")} ${i[c]}`;break;case"notification":a=this.isOldUIKit("message.tip.把群公告修改为")?`${r} ${this.t("message.tip.发布新公告")}`:`${r} ${this.t("message.tip.把群公告修改为")} "${i[c]}"`}return a}handleCallkitTimeoutSignaling(e=[]){if(0===e.length)return;const t=this.getEngine().TUIFriend.getFriendRemark(e),n=[];e.forEach((e=>{const i=t[e];i?this.userShowNameMap.set(e,i):this.requestedUserMap.has(e)||(n.push(e),this.requestedUserMap.set(e,1))})),n.length>0&&this.getEngine().TUIUser.getUserProfile({userIDList:n}).then((e=>{(e.data||[]).forEach((e=>{const{userID:t,nick:n}=e,i=n||t;this.userShowNameMap.set(t,i)}))})).catch((()=>{}))}substringByLength(e,t=12){return e.length>t?`${e.slice(0,t)}...`:e}isOldUIKit(e){var t;const n=e.lastIndexOf("."),i=e.slice(0,n+1);return null===(t=this.t(e))||void 0===t?void 0:t.startsWith(i)}}class n_{constructor(e){this.TUIChatService=e,this.typingTo="",this.timer=null}getEngine(){return this.TUIChatService.getEngine()}clearTypingStatus(){this.getEngine().TUIStore.getData(jg.CHAT,"typingStatus")&&this.getEngine().TUIStore.update(jg.CHAT,"typingStatus",!1),this.timer&&clearTimeout(this.timer),this.timer=null}handleLastMessage(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.CHAT,"typingStatus");if(e.type===this.getEngine().TYPES.MSG_CUSTOM&&"in"===e.flow){const i=tf(e.payload.data);if(i.businessID===Kg.BUSINESS_ID){const{typingStatus:e,userAction:o}=i;if(e===Kg.STATUS_START||o===Kg.ACTION_START_ID)return n?(this.timer&&clearTimeout(this.timer),this.timer=null):t.TUIStore.update(jg.CHAT,"typingStatus",!0),this.timer=setTimeout((()=>{this.clearTypingStatus()}),3e4),t.TUIStore.getData(jg.CHAT,"typingStatus");e!==Kg.STATUS_END&&o!==Kg.ACTION_END_ID||this.clearTypingStatus()}}}filterTypingMessage(e=[]){return 0===e.length?[]:(this.getEngine().TUIStore.getData(jg.APP,"enableTyping")&&this.handleLastMessage(e[e.length-1]),e.filter((e=>e.type!==this.getEngine().TYPES.MSG_CUSTOM||tf(e.payload.data).businessID!==Kg.BUSINESS_ID)))}createTypingMessage(e=Kg.STATUS_END,t=""){const{BUSINESS_ID:n,STATUS_START:i,VERSION:o,ACTION_START_ID:s,ACTION_END_ID:a,ACTION_START:r,ACTION_END:c,NEED_TYPING:u}=Kg;return{to:t,conversationType:this.getEngine().TYPES.CONV_C2C,payload:{data:JSON.stringify({businessID:n,typingStatus:e,version:o,userAction:e===i?s:a,actionParam:e===i?r:c}),description:"",extension:""},cloudCustomData:JSON.stringify({messageFeature:{needTyping:u,version:o}})}}sendTyping(e=!1,t=""){if(e){this.typingTo=t;const e=this.createTypingMessage(Kg.STATUS_START,t);this.getEngine().TUIChat.sendCustomMessage(e,{onlineUserOnly:!0})}else this.sendTypingEnd()}sendTypingEnd(){if(this.typingTo){const e=this.createTypingMessage(Kg.STATUS_END,this.typingTo);this.getEngine().TUIChat.sendCustomMessage(e,{onlineUserOnly:!0})}this.typingTo=""}}class i_{constructor(e){this.TUIChatService=e}getEngine(){return this.TUIChatService.getEngine()}init(){const e=this.getEngine();e.eventCenter.addEvent(e.EVENT.MESSAGE_READ_RECEIPT_RECEIVED,this.onMessageReadReceiptReceived.bind(this))}onMessageReadReceiptReceived(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.CONV,"currentConversationID"),i=[];e.forEach((e=>{const{messageID:o}=e,s=t.chat.findMessage(o);s&&n===s.conversationID&&i.push(s)})),i.length>0&&t.TUIChat.updateMessageList(i,"edit")}sendMessageReadReceipt(e){const t=[];return e.forEach((e=>{const n=e.getMessage();t.push(n)})),this.getEngine().chat.sendMessageReadReceipt(t)}getGroupMessageReadMemberList(e){const t=e.message.getMessage(),n=Object.assign(Object.assign({},e),{message:t});return this.getEngine().chat.getGroupMessageReadMemberList(n)}getMessageReadReceiptList(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.APP,"enabledMessageReadReceipt"),i=t.TUIStore.getData(jg.USER,"displayMessageReadReceipt");!n||!i||0===e.length||e[0].conversationType!==t.TYPES.CONV_GROUP||t.chat.getMessageReadReceiptList(e).then((e=>{const{messageList:t}=e.data;this.TUIChatService.updateMessageList(t,"edit")})).catch((e=>{console.warn(`ReadReceiptHandler.getMessageReadReceiptList error:${e.message}`)}))}}class o_ extends Tf{constructor(){super(),this.serv="TUIChatService",this.messageHandler=new t_(this),this.typingHandler=new n_(this),this.readReceiptHandler=new i_(this),this.isSwitching=!0,this.delayGetHoppingFunction=void 0,this.hoppingConfigMap=new Map}static getInstance(){return o_.instance||(o_.instance=new o_),o_.instance}init(){const e=this.getEngine();e.eventCenter.addEvent(e.EVENT.MESSAGE_RECEIVED,this.onMessageReceived.bind(this)),e.eventCenter.addEvent(e.EVENT.MESSAGE_MODIFIED,this.onMessageModified.bind(this)),e.eventCenter.addEvent(e.EVENT.MESSAGE_REVOKED,this.onMessageRevoked.bind(this)),e.eventCenter.addEvent(e.EVENT.MESSAGE_READ_BY_PEER,this.onMessageReadByPeer.bind(this)),e.eventCenter.addEvent(e.EVENT.MESSAGE_REACTIONS_UPDATED,this.onMessageReactionsUpdated.bind(this)),this.onCurrentConversationIDUpdated(),this.onMessageSource(),this.readReceiptHandler.init()}onMessageReceived(e){this.updateMessageList(e,"received"),this.getEngine().TUIStore.update(jg.CHAT,"newMessageList",e)}onMessageModified(e){this.updateMessageList(e,"edit")}onMessageRevoked(e){this.updateMessageList(e,"edit")}onMessageReadByPeer(e){this.updateMessageList(e,"edit")}onMessageReactionsUpdated(e){this.updateMessageReactionList([e])}onCurrentConversationIDUpdated(){const e=this.getEngine();e.TUIStore.watch(jg.CONV,{currentConversationID:t=>{this.isSwitching=!0,this.delayGetHoppingFunction=void 0,this.hoppingConfigMap.clear(),e.TUIStore.reset(jg.CHAT),this.typingHandler.clearTypingStatus(),this.typingHandler.sendTypingEnd(),kf(t)||this.getMessageList().finally((()=>{this.isSwitching=!1,this.delayGetHoppingFunction&&this.delayGetHoppingFunction()}))}})}onMessageSource(){const e=this.getEngine();e.TUIStore.watch(jg.CHAT,{messageSource:t=>{const n=this.getStoreData(jg.CONV,"currentConversationID");if(!n||t&&t.conversationID!==n)return;if(Qg(t))return this.hoppingConfigMap.clear(),e.TUIStore.update(jg.CHAT,"messageList",[]),e.TUIStore.update(jg.CHAT,"nextReqMessageID",""),e.TUIStore.update(jg.CHAT,"isCompleted",!1),void this.getMessageList();const i=this.getStoreData(jg.CHAT,"messageList");i&&i.find((e=>t&&e.ID===t.ID))||(this.isSwitching?this.delayGetHoppingFunction=this.getMessageListHoppingForDown:this.getMessageListHoppingForDown())}})}getMessageListHoppingForDown(){const e=this.getStoreData(jg.CHAT,"messageList"),{conversationID:t,sequence:n,time:i,ID:o}=this.getStoreData(jg.CHAT,"messageSource");if(e&&e.find((e=>o&&e.ID===o)))return;const s=this.getEngine();s.TUIStore.update(jg.CHAT,"messageList",[]),s.TUIStore.update(jg.CHAT,"nextReqMessageID",""),s.TUIStore.update(jg.CHAT,"isCompleted",!1),this.getMessageListHopping({conversationID:t,sequence:n,time:i,direction:1})}getStoreData(e,t){return this.getEngine().TUIStore.getData(e,t)}sendMessage(e,t){this.updateMessageList([e],"send");const n=this.getEngine().chat.sendMessage(e,t);return this.getResponse(n)}getResponse(e,t=!0,n=!0){return e.then((e=>{const n=e.data.messageList?e.data.messageList:[e.data.message];return t&&this.updateMessageList(n,"edit"),e})).catch((e=>{var t;return n&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.message)&&this.updateMessageList([e.data.message],"edit"),Promise.reject(e)}))}updateMessageList(e,t=""){if(this.getStoreData(jg.CHAT,"messageSource")&&"unshift"!==t&&"edit"!==t)return;const n=this.getStoreData(jg.CHAT,"messageList"),i=this.updateTargetMessageList(e,n,t);this.getEngine().TUIStore.update(jg.CHAT,"messageList",i)}updateTargetMessageList(e,t,n=""){const i=this.getStoreData(jg.CONV,"currentConversationID");let o=e.filter((e=>e.conversationID===i));if(o=this.handleC2CCallSignaling(o),!n||0===o.length)return t;const s=t||[];let a=[];if("send"===n||"push"===n){const e=this.getStoreData(jg.CHAT,"userInfo");Object.keys(e).length>0&&this.updateLocalMessage(o,e)}switch(n){case"edit":for(const e of t){const t=o.find((t=>t.ID===e.ID));a.push(t||e)}break;case"resend":a=s.filter((e=>e.ID!==o[0].ID)).concat(o);break;case"send":a=s.concat(this.typingHandler.filterTypingMessage(o));break;case"push":a=s.concat(this.typingHandler.filterTypingMessage(o)),this.getEngine().chat.setMessageRead({conversationID:i});break;case"received":a=s.concat(this.typingHandler.filterTypingMessage(o)),a=this.sortMessageList(a),this.getEngine().chat.setMessageRead({conversationID:i});break;case"unshift":a=o.filter((e=>0===s.length||!s.find((t=>t.ID===e.ID)))),a.push(...s),a=this.sortMessageList(a)}return a}enterTypingState(){this.getStoreData(jg.APP,"enableTyping")&&this.sendTyping(!0)}leaveTypingState(){this.getStoreData(jg.APP,"enableTyping")&&this.sendTyping(!1)}sendTyping(e){const t=this.getEngine(),n=this.getStoreData(jg.CONV,"currentConversationID");if(!n.startsWith(t.TYPES.CONV_C2C))return;const i=n.replace(t.TYPES.CONV_C2C,"");if(e){const e=this.getStoreData(jg.CHAT,"messageList").filter((e=>"in"===e.flow));if(0===e.length)return;const t=1e3*e[e.length-1].time;if((new Date).getTime()-t>3e4)return}this.typingHandler.sendTyping(e,i)}quoteMessage(e){var t;return this.getEngine().TUIStore.update(jg.CHAT,"quoteMessage",{message:e,type:"quote"}),null===(t=this.getEngine().TUIReport)||void 0===t||t.reportFeature(205),e}replyMessage(e){return this.getEngine().TUIStore.update(jg.CHAT,"quoteMessage",{message:e,type:"reply"}),e}getCurrentConvInfo(){const{conversationID:e="",type:t}=this.getStoreData(jg.CONV,"currentConversation")||{};return{to:e.replace(t,""),conversationType:t}}t(e){return this.getEngine().TUITranslate.t(e)||e}getMessageAbstractAndType(e){var t,n;const i=this.getEngine(),o={abstract:"",type:0};switch(e.type){case i.TYPES.MSG_TEXT:o.abstract=null===(t=null==e?void 0:e.payload)||void 0===t?void 0:t.text,o.type=1;break;case i.TYPES.MSG_CUSTOM:o.abstract="[自定义消息]",o.type=2;break;case i.TYPES.MSG_IMAGE:o.abstract="[图片]",o.type=3;break;case i.TYPES.MSG_AUDIO:o.abstract="[语音]",o.type=4;break;case i.TYPES.MSG_VIDEO:o.abstract="[视频]",o.type=5;break;case i.TYPES.MSG_FILE:o.abstract="[文件]",o.type=6;break;case i.TYPES.MSG_LOCATION:o.type=7;break;case i.TYPES.MSG_FACE:o.abstract="[表情]",o.type=8;break;case i.TYPES.MSG_GRP_TIP:o.type=9;break;case i.TYPES.MSG_MERGER:o.abstract=null===(n=null==e?void 0:e.payload)||void 0===n?void 0:n.title,o.type=10}return o}genMessageReply(e,t){if("reply"!==t&&"quote"!==t)return{};const{abstract:n,type:i}=this.getMessageAbstractAndType(e),o={messageAbstract:n,messageSender:e.nick||e.from,messageID:e.ID},s=Object.assign(Object.assign({},o),{messageType:i,messageTime:null==e?void 0:e.time,messageSequence:null==e?void 0:e.sequence,version:1});if("reply"===t&&(s.messageRootID=e.ID,e.cloudCustomData)){const t=tf(e.cloudCustomData);t.messageReply&&t.messageReply.messageRootID&&(s.messageRootID=t.messageReply.messageRootID)}return{messageReply:s,messageReplyRoot:o}}getMessageInfo(e,t,n){const{messageReply:i,messageReplyRoot:o}=this.genMessageReply(t,n),s=e.cloudCustomData?tf(e.cloudCustomData):{};let a;if(s.messageReply?s.messageReply=Object.assign(Object.assign({},i),s.messageReply):s.messageReply=i,"reply"===n){const{messageRootID:e}=i;a=this.getEngine().chat.findMessage(e);const t=(null==a?void 0:a.cloudCustomData)?tf(a.cloudCustomData):{};t.messageReplies||(t.messageReplies={}),r=t.messageReplies.replies,("function"==typeof Array.isArray?Array.isArray(r):"array"===Object.prototype.toString.call(r).match(/^\[object (.*)\]$/)[1].toLowerCase())||(t.messageReplies.replies=[]),t.messageReplies.replies.push(o),a.cloudCustomData=JSON.stringify(t)}var r;return{cloudCustomData:JSON.stringify(s),rootMessage:a}}sendTextMessage(e,t){const n=this.getEngine(),{message:i,type:o}=this.getStoreData(jg.CHAT,"quoteMessage");let s={cloudCustomData:e.cloudCustomData||"",rootMessage:void 0};i&&(s=this.getMessageInfo(e,i,o));const a=n.chat.createTextMessage(Object.assign(Object.assign(Object.assign({},this.getCurrentConvInfo()),e),{cloudCustomData:s.cloudCustomData}));return this.sendMessage(a,t).then((e=>(s.rootMessage&&this.modifyMessage(s.rootMessage),n.TUIStore.reset(jg.CHAT,["quoteMessage"],!0),e)))}sendTextAtMessage(e,t){const n=this.getEngine(),{message:i,type:o}=this.getStoreData(jg.CHAT,"quoteMessage");let s={cloudCustomData:e.cloudCustomData||"",rootMessage:void 0};i&&(s=this.getMessageInfo(e,i,o));const a=n.chat.createTextAtMessage(Object.assign(Object.assign(Object.assign({},this.getCurrentConvInfo()),e),{cloudCustomData:s.cloudCustomData}));return this.sendMessage(a,t).then((e=>(s.rootMessage&&this.modifyMessage(s.rootMessage),n.TUIStore.reset(jg.CHAT,["quoteMessage"],!0),e)))}sendImageMessage(e,t){const n=this.getEngine().chat.createImageMessage(Object.assign(Object.assign(Object.assign({},this.getCurrentConvInfo()),e),{onProgress:e=>{this.onProgress(n.ID,e)}}));return this.sendMessage(n,t)}sendAudioMessage(e,t){const n=this.getEngine().chat.createAudioMessage(Object.assign(Object.assign(Object.assign({},this.getCurrentConvInfo()),e),{onProgress:e=>{this.onProgress(n.ID,e)}}));return this.sendMessage(n,t)}sendVideoMessage(e,t){const n=this.getEngine().chat.createVideoMessage(Object.assign(Object.assign(Object.assign({},this.getCurrentConvInfo()),e),{onProgress:e=>{this.onProgress(n.ID,e)}}));return this.sendMessage(n,t)}sendCustomMessage(e,t){const n=this.getEngine().chat.createCustomMessage(Object.assign(Object.assign({},this.getCurrentConvInfo()),e));return this.sendMessage(n,t)}sendFaceMessage(e,t){const n=this.getEngine().chat.createFaceMessage(Object.assign(Object.assign({},this.getCurrentConvInfo()),e));return this.sendMessage(n,t)}sendFileMessage(e,t){const n=this.getEngine().chat.createFileMessage(Object.assign(Object.assign(Object.assign({},this.getCurrentConvInfo()),e),{onProgress:e=>{this.onProgress(n.ID,e)}}));return this.sendMessage(n,t)}sendLocationMessage(e,t){const n=this.getEngine().chat.createLocationMessage(Object.assign(Object.assign({},this.getCurrentConvInfo()),e));return this.sendMessage(n,t)}onProgress(e,t){const n=this.getEngine().TUIStore.getMessageModel(e);n&&(t-n.progress>=.1||1===t)&&(n.progress=t,this.updateMessageList([n],"edit"))}setAbstractList(e){const t=this.getEngine(),n=e.nick||e.from;let i="";switch(e.type){case t.TYPES.MSG_TEXT:i=e.payload.text||"",i.length>20&&(i=i.slice(0,20));break;case t.TYPES.MSG_MERGER:i=`${this.t("TUIChat.[聊天记录]")}`;break;case t.TYPES.MSG_IMAGE:i=`${this.t("TUIChat.[图片]")}`;break;case t.TYPES.MSG_AUDIO:i=`${this.t("TUIChat.[音频]")}`;break;case t.TYPES.MSG_VIDEO:i=`${this.t("TUIChat.[视频]")}`;break;case t.TYPES.MSG_CUSTOM:i=`${this.t("TUIChat.[自定义消息]")}`;break;case t.TYPES.MSG_FILE:i=`${this.t("TUIChat.[文件]")}`;break;case t.TYPES.MSG_FACE:i=`${this.t("TUIChat.[动画表情]")}`}return`${n}: ${i}`}genMergerForwardPayload(e,t){const{abstractList:n=[],compatibleText:i="",title:o}=t;return 0===n.length&&e.forEach((e=>{n.push(this.setAbstractList(e))})),{messageList:e,title:o,abstractList:n,compatibleText:i||this.t("TUIChat.请升级IMSDK到v2.10.1或更高版本查看此消息")}}genSendMergerForwardMessage(e){const{conversationList:t,messageList:n,params:i,mergeInfo:o,sendMessageOptions:s}=e,a=[];for(let r=0;re instanceof bf?e.getMessage():e))}sendForwardMessage(e,t,n){t=this.getOriginMessageList(t);const i=n||{},{needMerge:o=!1,params:s={},mergeInfo:a={}}=i,r=Fg(i,["needMerge","params","mergeInfo"]);if(o)return this.sendMergerForwardMessage({conversationList:e,messageList:t,params:s,mergeInfo:a,sendMessageOptions:r});const c=[];for(let u=0;u{const{code:t=0,data:n={}}=e.code;throw t===Wg.MSG_MODIFY_CONFLICT?console.warn(`${$g.MSG_MODIFY_CONFLICT} data.message: ${null==n?void 0:n.message}`):t===Wg.MSG_MODIFY_DISABLED_IN_AVCHATROOM?console.warn($g.MSG_MODIFY_DISABLED_IN_AVCHATROOM):t===Wg.MODIFY_MESSAGE_NOT_EXIST&&console.warn($g.MODIFY_MESSAGE_NOT_EXIST),e}))}getMessageList(e={conversationID:this.getStoreData(jg.CONV,"currentConversationID"),nextReqMessageID:this.getStoreData(jg.CHAT,"nextReqMessageID")}){const t=this.getEngine();if(!t.chat.isReady())return Promise.reject({code:Yg.GET_MSG_LIST_ERROR,message:Jg.GET_MSG_LIST_ERROR});if(this.getStoreData(jg.CHAT,"isCompleted"))return Promise.resolve({data:{messageList:[],nextReqMessageID:"",isCompleted:!0}});const n=this.getStoreData(jg.CHAT,"messageSource"),i=this.hoppingConfigMap.get("nextMessageSeq"),o=this.hoppingConfigMap.get("nextMessageTime"),s=i||o;return n&&n.conversationID===(null==e?void 0:e.conversationID)&&s?this.getMessageListHopping():t.chat.getMessageList(e).then((e=>{var n;const{messageList:i,nextReqMessageID:o,isCompleted:s}=e.data,a=this.getStoreData(jg.CHAT,"userInfo");Object.keys(a).length>0&&this.updateLocalMessage(i,a),this.updateMessageList(i,"unshift"),t.TUIStore.update(jg.CHAT,"nextReqMessageID",o),t.TUIStore.update(jg.CHAT,"isCompleted",s);const r=null===(n=i[0])||void 0===n?void 0:n.conversationID,{operationType:c=0}=this.getEngine().TUIStore.getConversationModel(r)||{};return 0===c&&(this.getMessageReactions({messageList:i}),this.readReceiptHandler.getMessageReadReceiptList(i)),e})).catch((e=>Promise.reject(e)))}getMessageListHopping(e){var t;void 0===e&&(e={conversationID:null===(t=this.getStoreData(jg.CHAT,"messageSource"))||void 0===t?void 0:t.conversationID,sequence:this.hoppingConfigMap.get("nextMessageSeq"),time:this.hoppingConfigMap.get("nextMessageTime")});const n=this.getEngine();return n.chat.getMessageListHopping(e).then((t=>{const{messageList:i,nextMessageSeq:o,nextMessageTime:s,isCompleted:a}=t.data,r=1===e.direction?e.sequence:o,c=1===e.direction?e.time:s;return this.updateMessageList(i,"unshift"),this.delayGetHoppingFunction=void 0,this.hoppingConfigMap.set("nextMessageSeq",r),this.hoppingConfigMap.set("nextMessageTime",c),n.TUIStore.update(jg.CHAT,"isCompleted",a),t})).catch((e=>Promise.reject(e)))}sendMessageReadReceipt(e){return this.readReceiptHandler.sendMessageReadReceipt(e)}getGroupMessageReadMemberList(e){return this.readReceiptHandler.getGroupMessageReadMemberList(e).then((e=>{const{isCompleted:t,cursor:n,messageID:i,unreadUserIDList:o,readUserIDList:s}=e.data,a={code:0,data:{cursor:n,isCompleted:t,messageID:i,unreadUserInfoList:[],readUserInfoList:[]}},r=[...o,...s];return 0===r.length?a:this.getEngine().TUIUser.getUserProfile({userIDList:r}).then((e=>(o.length>0?e.data.forEach((e=>{const{userID:t,nick:n="",avatar:i=""}=e;a.data.unreadUserInfoList.push({userID:t,nick:n,avatar:i})})):e.data.forEach((e=>{const{userID:t,nick:n="",avatar:i=""}=e;a.data.readUserInfoList.push({userID:t,nick:n,avatar:i})})),a)))}))}downloadMergedMessages(e){return this.getEngine().chat.downloadMergerMessage(e)}setTranslationLanguage(e){this.getEngine().TUIStore.update(jg.USER,"targetLanguage",e)}translateText(e){const t=this.getStoreData(jg.USER,"targetLanguage"),n=Object.assign({targetLanguage:t,sourceLanguage:"auto"},e);return this.getEngine().chat.translateText(n)}searchCloudMessages(e){const t=this.getStoreData(jg.CONV,"conversationList");return this.getEngine().chat.searchCloudMessages(e).then((e=>{const{searchResultList:n}=e.data;return e.data.searchResultList=n.map((e=>{const{messageList:n,conversationID:i}=e,o=Fg(e,["messageList","conversationID"]),s=n.map((e=>new bf(e))),a=t.find((e=>e.conversationID===i));return Object.assign(Object.assign({},o),{messageList:s.sort(((e,t)=>t.time-e.time)),conversation:a})})),e}))}addMessageReaction(e,t){return this.getEngine().chat.addMessageReaction(e.getMessage(),t)}removeMessageReaction(e,t){return this.getEngine().chat.removeMessageReaction(e.getMessage(),t)}getMessageReactions(e){const{messageList:t=[]}=e,n=this.getStoreData(jg.APP,"enabledEmojiPlugin");console.log(`TUIChatService.getMessageReactions enabledEmojiPlugin:${n} messageList length:${t.length}`),n&&t.length>0&&this.getEngine().chat.getMessageReactions(e).then((e=>{const t=e.data.resultList||e.data;this.updateMessageReactionList(t)})).catch((()=>{}))}getAllUserListOfMessageReaction(e){var t;return this.getEngine().chat.getAllUserListOfMessageReaction(Object.assign(Object.assign({},e),{message:null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.getMessage()}))}updateMessageReactionList(e){const t=[];e.forEach((e=>{const{messageID:n,reactionList:i}=e,o=this.getEngine().TUIStore.getMessageModel(n);if(o){const e=[];for(let t=0;t0&&this.updateMessageList(t,"edit")}convertVoiceToText(e){const{message:t,language:n="zh"}=e,i=t.getMessage();return this.getEngine().chat.convertVoiceToText({message:i,language:n})}clearHistoryMessage(e){const t=this.getEngine();return t.chat.clearHistoryMessage(e).then((e=>(t.TUIStore.update(jg.CHAT,"messageList",[]),t.TUIStore.update(jg.CHAT,"nextReqMessageID",""),t.TUIStore.update(jg.CHAT,"isCompleted",!1),e)))}updateMessageInfo(e){const t=this.getStoreData(jg.CHAT,"userInfo");this.getEngine().TUIStore.update(jg.CHAT,"userInfo",Object.assign(t,e));const n=this.getStoreData(jg.CHAT,"messageList");n.length>0&&this.updateLocalMessage(n,e)&&this.getEngine().TUIStore.update(jg.CHAT,"messageList",n)}updateLocalMessage(e,t){let n=!1;return e.forEach((e=>{if(t[e.from]){const{nick:i,nameCard:o,avatar:s}=t[e.from];i&&(e.nick=i,n=!0),o&&(e.nameCard=o,n=!0),s&&(e.avatar=s,n=!0)}})),n}handleC2CCallSignaling(e){const t=this.getEngine(),n=t.getMyUserID();return e.filter((e=>{var i,o,s,a,r;const{conversationType:c,type:u,payload:l}=e;let d=!0;if(c===t.TYPES.CONV_C2C&&u===t.TYPES.MSG_CUSTOM&&t.chat.getSignalingInfo(e)){const t=tf(l.data);if(1===(null==t?void 0:t.businessID)){const c=tf(t.data);if(d=!(e._isExcludedFromUnreadCount&&e._isExcludedFromLastMessage),d&&!0!==(null===(i=null==c?void 0:c.data)||void 0===i?void 0:i.consumed)){let i=null===(o=null==c?void 0:c.data)||void 0===o?void 0:o.inviter;"line_busy"!==(null==c?void 0:c.line_busy)&&"lineBusy"!==(null===(s=null==c?void 0:c.data)||void 0===s?void 0:s.message)||(i=t.inviter);const{from:u,to:l}=e;if(i!==n&&e.from===n){const t=this.getStoreData(jg.CONV,"currentConversation");e.from=l,e.to=u,e.flow="in",e.avatar=(null===(a=null==t?void 0:t.userProfile)||void 0===a?void 0:a.avatar)||""}if(i===n&&e.from!==n){const t=this.getStoreData(jg.USER,"userProfile");e.from=l,e.to=u,e.flow="out",e.avatar=null==t?void 0:t.avatar}console.log(`${this.serv}.handleC2CCallSignaling myUserID:${n} callSignaling.inviter:${t.inviter} customData.data.inviter:${null===(r=null==c?void 0:c.data)||void 0===r?void 0:r.inviter}`)}}}return d}))}sortMessageList(e){const{conversationType:t}=e[0];if(t===this.getEngine().TYPES.CONV_C2C)return e.sort(((e,t)=>e.time-t.time));const n=e.filter((e=>"success"===e.status)).sort(((e,t)=>e.sequence-t.sequence));for(let i=0;i{e.groupID===n&&t.TUIStore.update(jg.GRP,"currentGroup",e)}))}onGroupAttributesUpdated(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.GRP,"currentGroupID");let i=t.TUIStore.getData(jg.GRP,"groupList");const{groupID:o,groupAttributes:s}=e;n===o&&t.TUIStore.update(jg.GRP,"currentGroupAttributes",s),i=i.map((e=>(e.groupID===o&&(e.groupAttributes=s),e))),t.TUIStore.update(jg.GRP,"groupList",i)}onGroupCounterUpdated(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.GRP,"currentGroupID"),i=t.TUIStore.getData(jg.GRP,"currentGroupCounters")||{};let o=t.TUIStore.getData(jg.GRP,"groupList");const{groupID:s,key:a,value:r}=e;n===s&&(i[a]=r,t.TUIStore.update(jg.GRP,"currentGroupCounters",i)),o=o.map((e=>(e.groupID===s&&(e.groupCounters=Object.assign(Object.assign({},e.groupCounters),{[a]:r})),e))),t.TUIStore.update(jg.GRP,"groupList",o)}onMessageReceived(e){const t=this.getEngine(),n=[];e.forEach((e=>{if(e.type===t.TYPES.MSG_GRP_TIP){const{payload:n}=e,{operationType:i,userIDList:o}=n;switch(i){case t.TYPES.GRP_TIP_MBR_JOIN:this.addMemberList(o);break;case t.TYPES.GRP_TIP_MBR_QUIT:case t.TYPES.GRP_TIP_MBR_KICKED_OUT:this.removeMemberList(o);break;case t.TYPES.GRP_TIP_MBR_SET_ADMIN:case t.TYPES.GRP_TIP_MBR_CANCELED_ADMIN:this.updateGroupMember(o);break;case t.TYPES.GRP_TIP_GRP_PROFILE_UPDATED:break;case t.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:case t.TYPES.GRP_TIP_BAN_AVCHATROOM_MEMBER:case t.TYPES.GRP_TIP_UNBAN_AVCHATROOM_MEMBER:this.updateGroupMember(o)}}e.type===t.TYPES.MSG_GRP_SYS_NOTICE&&n.push(e)})),n.length>0&&t.TUIStore.update(jg.GRP,"groupSystemNoticeList",n)}getGroupInitData(){const e=this.getEngine();e.chat.isReady()&&e.chat.getGroupList().then((e=>{const{groupList:t=[]}=e.data;console.log(`TUIGroupService.init, getGroupList count:${t.length}`),t.length>0&&this.onGroupListUpdated(t)}))}updateGroupMember(e){return Bg(this,void 0,void 0,(function*(){const t=this.getEngine().TUIStore.getData(jg.GRP,"currentGroupID");if(t){const n=yield this.getGroupMemberProfile({groupID:t,userIDList:e}),{memberList:i}=n.data;this.updateMemberList(i)}}))}resetCurrentStore(){this.getEngine().TUIStore.reset(jg.GRP,["currentGroupID","currentGroup","currentGroupAttributes","currentGroupCounters","currentGroupMemberList"],!0)}switchGroup(e){return Bg(this,void 0,void 0,(function*(){const t=this.getEngine();t.TUIStore.update(jg.GRP,"offset",0),t.TUIStore.update(jg.GRP,"isCompleted",!1);const n=t.TUIStore.getConversationModel(`GROUP${e}`);if((null==n?void 0:n.operationType)>0){const e=t.TUIStore.getData(jg.GRP,"currentGroup");return Promise.resolve(e)}const i=t.TUIStore.getData(jg.GRP,"currentGroupID");if(!e)return this.resetCurrentStore(),Promise.resolve({});if(i===e){const e=t.TUIStore.getData(jg.GRP,"currentGroup");return Promise.resolve(e)}this.resetCurrentStore(),t.TUIStore.update(jg.GRP,"currentGroupID",e);try{yield this.getGroupInfo(e)}catch(a){Promise.reject(a)}const o=setTimeout((()=>{this.groupMap.delete(e),clearTimeout(o)}),5e3),s=t.TUIStore.getData(jg.GRP,"currentGroup");return Promise.resolve(s)}))}getGroupInfo(e){return Bg(this,void 0,void 0,(function*(){const t=this.getEngine(),n=this.groupMap.get(e);if(n)return this.updateMemberList((null==n?void 0:n.memberList)||[]),t.TUIStore.update(jg.GRP,"currentGroup",n.group),t.TUIStore.update(jg.GRP,"currentGroupAttributes",n.groupAttributes||{}),void t.TUIStore.update(jg.GRP,"currentGroupCounters",n.counters||{});const i={group:{},memberList:[],groupAttributes:void 0,counters:void 0},{data:{group:o}}=yield this.getGroupProfile({groupID:e});i.group=o;const{data:{memberList:s}}=yield this.getGroupMemberList({groupID:e});i.memberList=s;const a=yield this.getGroupAttributes({groupID:e,keyList:[]}),{groupAttributes:r}=a.data;i.groupAttributes=r,t.TUIStore.update(jg.GRP,"currentGroupAttributes",r);try{const n=yield this.getGroupCounters({groupID:e,keyList:[]}),{counters:o}=n.data;i.counters=o,t.TUIStore.update(jg.GRP,"currentGroupCounters",o)}catch(c){console.warn(null==c?void 0:c.message)}this.groupMap.set(e,i)}))}getGroupProfile(e){const t=this.getEngine();return t.chat.getGroupProfile(e).then((n=>Bg(this,void 0,void 0,(function*(){if(t.TUIStore.getData(jg.GRP,"currentGroupID")===e.groupID){const{group:e}=n.data;t.TUIStore.update(jg.GRP,"currentGroup",e)}return n}))))}updateGroupProfile(e){return this.getEngine().chat.updateGroupProfile(e)}createGroup(e){return this.getEngine().chat.createGroup(e)}dismissGroup(e){return this.getEngine().chat.dismissGroup(e)}searchGroupByID(e){const t=this.getEngine();return t.chat.searchGroupByID(e).then((e=>{const{group:n}=e.data,i=t.TUIStore.getData(jg.GRP,"groupList");return e.data.group.isJoinedGroup=i.some((e=>e.groupID===n.groupID)),e}))}joinGroup(e){return this.getEngine().chat.joinGroup(e)}quitGroup(e){return this.getEngine().chat.quitGroup(e)}getGroupApplicationList(){return this.getEngine().chat.getGroupApplicationList()}handleGroupApplication(e){return this.getEngine().chat.handleGroupApplication(e)}getGroupOnlineMemberCount(e){return this.getEngine().chat.getGroupOnlineMemberCount(e)}changeGroupOwner(e){return this.getEngine().chat.changeGroupOwner(e)}initGroupAttributes(e){return this.getEngine().chat.initGroupAttributes(e)}setGroupAttributes(e){return this.getEngine().chat.setGroupAttributes(e)}deleteGroupAttributes(e){return this.getEngine().chat.deleteGroupAttributes(e)}getGroupAttributes(e){return this.getEngine().chat.getGroupAttributes(e)}setGroupCounters(e){return this.getEngine().chat.setGroupCounters(e)}increaseGroupCounter(e){return this.getEngine().chat.increaseGroupCounter(e)}decreaseGroupCounter(e){return this.getEngine().chat.decreaseGroupCounter(e)}getGroupCounters(e){return this.getEngine().chat.getGroupCounters(e)}updateMemberList(e){const t=this.getEngine(),n=[...(t.TUIStore.getData(jg.GRP,"currentGroupMemberList")||[]).filter((t=>!e.find((e=>e.userID===t.userID)))),...e];t.TUIStore.update(jg.GRP,"currentGroupMemberList",n)}addMemberList(e){return Bg(this,void 0,void 0,(function*(){const t=this.getEngine().TUIStore.getData(jg.GRP,"currentGroupID");if(t)try{const n=yield this.getGroupMemberProfile({groupID:t,userIDList:e}),{memberList:i}=n.data;this.updateMemberList(i)}catch(n){const t=e.map((e=>({userID:e,avatar:"",nick:"",role:"",joinTime:0,nameCard:"",muteUntil:0,memberCustomField:[]})));this.updateMemberList(t)}}))}removeMemberList(e){const t=this.getEngine(),n=t.TUIStore.getData(jg.GRP,"currentGroupMemberList").filter((t=>-1===e.indexOf(t.userID)));t.TUIStore.update(jg.GRP,"currentGroupMemberList",n)}getGroupMemberList(e){const t=this.getEngine();if(Qg(e.offset)){const n=t.TUIStore.getData(jg.GRP,"offset");e.offset=n}return t.chat.getGroupMemberList(e).then((n=>{if(t.TUIStore.getData(jg.GRP,"currentGroupID")===e.groupID){const{memberList:e,offset:i=0}=n.data;this.updateMemberList(e),t.TUIStore.update(jg.GRP,"offset",i),0===i&&t.TUIStore.update(jg.GRP,"isCompleted",!0)}return n}))}getGroupMemberProfile(e){return this.getEngine().chat.getGroupMemberProfile(e)}addGroupMember(e){const t=this.getEngine();return t.chat.addGroupMember(e).then((n=>Bg(this,void 0,void 0,(function*(){if(t.TUIStore.getData(jg.GRP,"currentGroupID")===e.groupID){const{successUserIDList:e,group:i}=n.data;t.TUIStore.update(jg.GRP,"currentGroup",i),this.addMemberList(e)}return n}))))}deleteGroupMember(e){const t=this.getEngine();return t.chat.deleteGroupMember(e).then((n=>{if(t.TUIStore.getData(jg.GRP,"currentGroupID")===e.groupID){const{userIDList:e,group:i}=n.data;this.removeMemberList(e),t.TUIStore.update(jg.GRP,"currentGroup",i)}return n}))}setGroupMemberMuteTime(e){return this.getEngine().chat.setGroupMemberMuteTime(e)}setGroupMemberRole(e){return this.getEngine().chat.setGroupMemberRole(e)}setGroupMemberNameCard(e){return this.getEngine().chat.setGroupMemberNameCard(e)}setGroupMemberCustomField(e){return this.getEngine().chat.setGroupMemberCustomField(e)}markGroupMemberList(e){return this.getEngine().chat.markGroupMemberList(e)}}class a_ extends Tf{constructor(){super()}static getInstance(){return a_.instance||(a_.instance=new a_),a_.instance}init(){const e=this.getEngine();e.eventCenter.addEvent(e.EVENT.FRIEND_LIST_UPDATED,this.onFriendListUpdated.bind(this)),e.eventCenter.addEvent(e.EVENT.FRIEND_APPLICATION_LIST_UPDATED,this.onFriendApplicationListUpdated.bind(this)),this.getFriendInitData()}onFriendListUpdated(e){this.getEngine().TUIStore.update(jg.FRIEND,"friendList",e)}onFriendApplicationListUpdated(e){const{friendApplicationList:t,unreadCount:n=0}=e,i=this.getEngine();i.TUIStore.update(jg.FRIEND,"friendApplicationList",t),i.TUIStore.update(jg.FRIEND,"friendApplicationUnreadCount",n)}getFriendInitData(){const e=this.getEngine();e.chat.isReady()&&(e.chat.getFriendList().then((e=>{const t=e.data||[];console.log(`TUIFriendService.init, getFriendList count:${t.length}`),t.length>0&&this.onFriendListUpdated(t)})),e.chat.getFriendApplicationList().then((e=>{this.onFriendApplicationListUpdated(e.data)})))}getFriendList(){return this.getEngine().chat.getFriendList()}getFriendRemark(e){const t=this.getEngine().TUIStore.getData(jg.FRIEND,"friendList"),n={};return e.forEach((e=>{for(let i=0;i0)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}run(e){return this.middlewares=this.cache.map((e=>e)),this.options=e,this.next()}}function u_(e,t,n){const i=Object.create(null);Object.keys(n).forEach((n=>{if(!t[n])return;i[n]=t[n];const o=new c_;t[n]=function(){const s=Array.from(arguments);return o.use(((t,i)=>e.isInited?i():Promise.reject({code:Yg.NOT_INIT,message:`${n} | ${Jg.NOT_INIT}`}))).use((e=>i[n].apply(t,e))),o.run(s)}}))}console.log("TUIChatEngine.VERSION:2.4.4");const l_=Cf.getInstance();Mf.getInstance();const d_=Gf.getInstance(),p_=zm.getInstance(),h_=Wm.getInstance(),g_=e_.getInstance(),f_=o_.getInstance(),m_=s_.getInstance(),__=a_.getInstance(),v_=r_.getInstance();l_.mount(Vg.TUIStore,d_),l_.mount(Vg.TUITranslate,p_),l_.mount(Vg.TUIConversation,h_),l_.mount(Vg.TUIUser,g_),l_.mount(Vg.TUIChat,f_),l_.mount(Vg.TUIGroup,m_),l_.mount(Vg.TUIFriend,__),l_.mount(Vg.TUIReport,v_),u_(l_,l_,Xg),u_(l_,h_,{deleteConversation:1,pinConversation:1,muteConversation:1,switchConversation:1,getConversationProfile:1,clearHistoryMessage:1}),u_(l_,f_,{modifyMessage:1,revokeMessage:1,resendMessage:1,deleteMessage:1,quoteMessage:1,replyMessage:1,setMessageExtensions:1,deleteMessageExtensions:1,getMessageExtensions:1,sendTextMessage:1,sendTextAtMessage:1,sendImageMessage:1,sendAudioMessage:1,sendVideoMessage:1,sendFileMessage:1,sendCustomMessage:1,sendFaceMessage:1,sendLocationMessage:1,sendForwardMessage:1,enterTypingState:1,leaveTypingState:1,sendMessageReadReceipt:1,getGroupMessageReadMemberList:1,getMessageList:1,downloadMergedMessages:1,setTranslationLanguage:1,translateText:1,searchCloudMessages:1,addMessageReaction:1,removeMessageReaction:1,getMessageReactions:1,getAllUserListOfMessageReaction:1}),u_(l_,m_,{switchGroup:1,getGroupProfile:1,updateGroupProfile:1,createGroup:1,dismissGroup:1,searchGroupByID:1,joinGroup:1,quitGroup:1,getGroupApplicationList:1,handleGroupApplication:1,getGroupOnlineMemberCount:1,changeGroupOwner:1,initGroupAttributes:1,setGroupAttributes:1,deleteGroupAttributes:1,getGroupAttributes:1,setGroupCounters:1,increaseGroupCounter:1,decreaseGroupCounter:1,getGroupCounters:1,getGroupMemberList:1,getGroupMemberProfile:1,addGroupMember:1,deleteGroupMember:1,setGroupMemberMuteTime:1,setGroupMemberRole:1,setGroupMemberNameCard:1,setGroupMemberCustomField:1,markGroupMemberList:1}),u_(l_,g_,{switchUserStatus:1,switchMessageReadStatus:1,getUserProfile:1,updateMyProfile:1,addToBlacklist:1,removeFromBlacklist:1}),u_(l_,__,{getFriendList:1,addFriend:1,deleteFriend:1,checkFriend:1,getFriendProfile:1,updateFriend:1,acceptFriendApplication:1,refuseFriendApplication:1,deleteFriendApplication:1,setFriendApplicationRead:1}),u_(l_,v_,Xg),exports.COS=Lg,exports._export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},exports.createPinia=function(){const e=xn(!0),t=e.run((()=>io({})));let n=[],i=[];const o=Ji({install(e){Lr(o),o._a=e,e.provide(Pr,o),e.config.globalProperties.$pinia=o,i.forEach((e=>n.push(e))),i=[]},use(e){return this._a?n.push(e):i.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o},exports.createSSRApp=ja,exports.defineStore=function(e,t,n){let i,o;const s="function"==typeof t;function a(e,n){(e=e||(!!(qs||wo||Wo)?Yo(Pr,null):null))&&Lr(e),(e=Ar)._s.has(i)||(s?Kr(i,t,o,e):Hr(i,o,e));return e._s.get(i)}return"string"==typeof e?(i=e,o=s?n:t):(o=e,i=e.id),a.$id=i,a},exports.e=(e,...t)=>r(e,...t),exports.f=(e,t)=>function(e,t){let n;if(d(e)||f(e)){n=new Array(e.length);for(let i=0,o=e.length;it(e,n,n)));else{const i=Object.keys(e);n=new Array(i.length);for(let o=0,s=i.length;o{if("function"!=typeof getApp)s=function(e,t){return o.t(e,t)};else{let e=!1;s=function(t,n){const i=getApp().$vm;return i&&(i.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(i,o))),o.t(t,n)}}return s(e,t)};return{i18n:o,f:(e,t,n)=>o.f(e,t,n),t:(e,t)=>s(e,t),add:(e,t,n=!0)=>o.add(e,t,n),watch:e=>o.watchLocale(e),getLocale:()=>o.getLocale(),setLocale:e=>o.setLocale(e)}},exports.jo=Rg,exports.n=e=>F(e),exports.o=(e,t)=>qa(e,t),exports.onMounted=ns,exports.p=e=>function(e){const{uid:t,__counter:n}=Vs();return t+","+((Ua[t]||(Ua[t]=[])).push(Gs(e))-1)+","+n}(e),exports.reactive=ji,exports.ref=io,exports.resolveComponent=function(e,t){return function(e,t,n=!0,i=!1){const o=wo||qs;if(o){const n=o.type;if(e===Go){const e=function(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===k(t)||e===O(k(t))))return n}const s=xo(o[e]||n[e],t)||xo(o.appContext[e],t);return!s&&i?n:s}}(Go,e,!0,t)||e},exports.s=e=>Ba(e),exports.sr=(e,t,n)=>function(e,t,n={}){const{$templateRefs:i}=Vs();i.push({i:t,r:e,k:n.k,f:n.f})}(e,t,n),exports.t=e=>(e=>f(e)?e:null==e?"":d(e)||_(e)&&(e.toString===y||!g(e.toString))?JSON.stringify(e,B,2):String(e))(e),exports.unref=so,exports.wx$1=Pn; +i=function(){return t};var e,t={},n=Object.prototype,s=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(N){p=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var o=t&&t.prototype instanceof b?t:b,s=Object.create(o.prototype),a=new P(i||[]);return r(s,"_invoke",{value:_(e,n,a)}),s}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(i){return{type:"throw",arg:i}}}t.wrap=d;var f="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function b(){}function x(){}function S(){}var k={};p(k,c,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(M([])));w&&w!==n&&s.call(w,c)&&(k=w);var E=S.prototype=b.prototype=Object.create(k);function T(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(i,r,a,c){var l=h(e[i],e,r);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==o(p)&&s.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(p).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function s(){return new t((function(t,i){n(e,o,t,i)}))}return i=i?i.then(s,s):s()}})}function _(t,n,i){var o=f;return function(s,r){if(o===g)throw Error("Generator is already running");if(o===v){if("throw"===s)throw r;return{value:e,done:!0}}for(i.method=s,i.arg=r;;){var a=i.delegate;if(a){var c=O(a,i);if(c){if(c===y)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===f)throw o=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=g;var l=h(t,n,i);if("normal"===l.type){if(o=i.done?v:m,l.arg===y)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(o=v,i.method="throw",i.arg=l.arg)}}}function O(t,n){var i=n.method,o=t.iterator[i];if(o===e)return n.delegate=null,"throw"===i&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),y;var s=h(o,t.iterator,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,y;var r=s.arg;return r?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function n(){for(;++i=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var c=s.call(r,"catchLoc"),l=s.call(r,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;R(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:M(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n,i,o,s,r){try{var a=e[s](r),c=a.value}catch(l){return void n(l)}a.done?t(c):Promise.resolve(c).then(i,o)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(e){s(r,i,o,a,c,"next",e)}function c(e){s(r,i,o,a,c,"throw",e)}a(void 0)}))}}var a=n(7),c=n(33),l=n(6).EventProxy,u=n(0),p=n(2);function d(e,t){var n=e.TaskId,i=e.Bucket,o=e.Region,s=e.Key,r=e.StorageClass,p=this,d={},m=e.FileSize,g=e.SliceSize,v=Math.ceil(m/g),y=0,b=u.throttleOnProgress.call(p,m,e.onHashProgress),x=function(t,n){var i=t.length;return 0===i?n(null,!0):i>v||i>1&&Math.max(t[0].Size,t[1].Size)!==g?n(null,!1):void function o(s){if(s=c.length)S.emit("has_and_check_upload_id",t);else{var d=c[l];if(!u.isInArray(t,d))return a.removeUploadId(d),void r(l+1);a.using[d]?r(l+1):f.call(p,{Bucket:i,Region:o,Key:s,UploadId:d,tracker:e.tracker},(function(e,t){p._isRunningTask(n)&&(e?(a.removeUploadId(d),r(l+1)):S.emit("upload_id_available",{UploadId:d,PartList:t.PartList}))}))}}(0):S.emit("has_and_check_upload_id",t)})),S.on("get_remote_upload_id_list",(function(){h.call(p,{Bucket:i,Region:o,Key:s,tracker:e.tracker},(function(t,o){if(p._isRunningTask(n)){if(t)return S.emit("error",t);var c=u.filter(o.UploadList,(function(e){return e.Key===s&&(!r||e.StorageClass.toUpperCase()===r.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(c.length)S.emit("seek_local_avail_upload_id",c);else{var l,d=a.getFileId(e.FileStat,e.ChunkSize,i,s);d&&(l=a.getUploadIdList(d))&&u.each(l,(function(e){a.removeUploadId(e)})),S.emit("no_available_upload_id")}}}))})),S.emit("get_remote_upload_id_list")}function h(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(o,(function(n,s){if(n)return t(n);i.push.apply(i,s.Upload||[]),"true"===s.IsTruncated?(o.KeyMarker=s.NextKeyMarker,o.UploadIdMarker=s.NextUploadIdMarker,e()):t(null,{UploadList:i})}))}()}function f(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(o,(function(n,s){if(n)return t(n);i.push.apply(i,s.Part||[]),"true"===s.IsTruncated?(o.PartNumberMarker=s.NextPartNumberMarker,e()):t(null,{PartList:i})}))}()}function m(e,t){var n=this,i=e.TaskId,o=e.Bucket,s=e.Region,r=e.Key,a=e.UploadData,l=e.FileSize,p=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),h=e.FilePath,f=Math.ceil(l/p),m=0,v=e.ServerSideEncryption,y=u.filter(a.PartList,(function(e){return e.Uploaded&&(m+=e.PartNumber>=f&&l%p||p),!e.Uploaded})),b=e.onProgress;c.eachLimit(y,d,(function(t,c){if(n._isRunningTask(i)){var u=t.PartNumber,d=Math.min(l,t.PartNumber*p)-(t.PartNumber-1)*p,f=0;g.call(n,{TaskId:i,Bucket:o,Region:s,Key:r,SliceSize:p,FileSize:l,PartNumber:u,ServerSideEncryption:v,FilePath:h,UploadData:a,onProgress:function(e){m+=e.loaded-f,f=e.loaded,b({loaded:m,total:l})},tracker:e.tracker},(function(e,o){n._isRunningTask(i)&&(e?m-=f:(m+=d-f,t.ETag=o.ETag),b({loaded:m,total:l}),c(e||null,o))}))}}),(function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:a.UploadId,SliceList:a.PartList})}))}function g(e,t){var n=this,i=e.TaskId,o=e.Bucket,s=e.Region,r=e.Key,a=e.FileSize,l=e.FilePath,p=1*e.PartNumber,d=e.SliceSize,h=e.ServerSideEncryption,f=e.UploadData,m=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(p-1),y=d,b=v+d;b>a&&(y=(b=a)-v);var x=["x-cos-traffic-limit","x-cos-mime-limit"],S={};u.each(g,(function(e,t){x.indexOf(t)>-1&&(S[t]=e)})),u.fileSlice(l,v,b,(function(a){var l=u.getFileMd5(a),d=l?u.binaryBase64(l):null,g=f.PartList[p-1];c.retry(m,(function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:o,Region:s,Key:r,ContentLength:y,PartNumber:p,UploadId:f.UploadId,ServerSideEncryption:h,Body:a,Headers:S,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,o){if(n._isRunningTask(i))return e?t(e):(g.Uploaded=!0,t(null,o))}))}),(function(e,o){if(n._isRunningTask(i))return t(e,o)}))}))}function v(e,t){var n=e.Bucket,i=e.Region,o=e.Key,s=e.UploadId,r=e.SliceList,a=this,l=this.options.ChunkRetryTimes+1,u=r.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){a.multipartComplete({Bucket:n,Region:i,Key:o,UploadId:s,Parts:u,calledBySdk:"sliceUploadFile",Headers:e.Headers||{},tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function y(e,t){var n=e.Bucket,i=e.Region,o=e.Key,s=e.AbortArray,r=e.AsyncLimit||1,a=this,l=0,u=new Array(s.length);c.eachLimit(s,r,(function(t,s){var r=l;if(o&&o!==t.Key)return u[r]={error:{KeyNotMatch:!0}},void s(null);var c=t.UploadId||t.UploadID;a.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:c},(function(e){var o={Bucket:n,Region:i,Key:t.Key,UploadId:c};u[r]={error:e,task:o},s(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],i=[],o=0,s=u.length;or?"sliceUploadFile":"putObject",t.tracker=new p({Beacon:s.options.BeaconReporter,clsReporter:s.options.ClsReporter,bucket:t.Bucket,region:t.Region,apiName:"uploadFile",realApi:h,fileKey:t.Key,fileSize:c,accelerate:d,deepTracker:s.options.DeepTracker,customId:s.options.CustomId,delay:s.options.TrackerDelay})),u.each(t,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(l[t]=e)})),f=t.onTaskReady,t.onTaskReady=function(e){l.TaskId=e,f&&f(e)},m=t.onFileFinish,g=function(e,i){t.tracker&&t.tracker.report(e,i),m&&m(e,i,l),n&&n(e,i)},v="postObject"===s.options.SimpleUploadMethod?"postObject":"putObject",y=c>r?"sliceUploadFile":v,a.push({api:y,params:t,callback:g}),s._addTasks(a);case 24:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function x(){return x=r(i().mark((function e(t,n){var s,a,c,l,d,h,f,m,g,v,y;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this,a=void 0===t.SliceSize?s.options.SliceSize:t.SliceSize,c=0,l=0,d=u.throttleOnProgress.call(s,l,t.onProgress),h=t.files.length,f=t.onFileFinish,m=Array(h),g=function(e,t,i){d(null,!0),f&&f(e,t,i),m[i.Index]={options:i,error:e,data:t},--h<=0&&n&&n(null,{files:m})},v=[],y=function(){return t.files.map((function(e,t){return new Promise((n=r(i().mark((function n(r){var h,f,m,y,b,x,S,k,C,w,E;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return h=0,n.prev=1,n.next=4,u.getFileSizeByPath(e.FilePath);case 4:h=n.sent,n.next=9;break;case 7:n.prev=7,n.t0=n.catch(1);case 9:f={Index:t,TaskId:""},c+=h,s.options.EnableReporter&&(m=s.options.UseAccelerate||"string"==typeof s.options.Domain&&s.options.Domain.includes("accelerate."),y=h>a?"sliceUploadFile":"putObject",e.tracker=new p({Beacon:s.options.BeaconReporter,clsReporter:s.options.ClsReporter,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",realApi:y,fileKey:e.Key,fileSize:h,accelerate:m,deepTracker:s.options.DeepTracker,customId:s.options.CustomId,delay:s.options.TrackerDelay})),u.each(e,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(f[t]=e)})),b=e.onTaskReady,e.onTaskReady=function(e){f.TaskId=e,b&&b(e)},x=0,S=e.onProgress,e.onProgress=function(e){l=l-x+e.loaded,x=e.loaded,S&&S(e),d({loaded:l,total:c})},k=e.onFileFinish,C=function(t,n){e.tracker&&e.tracker.report(t,n),k&&k(t,n),g&&g(t,n,f)},w="postObject"===s.options.SimpleUploadMethod?"postObject":"putObject",E=h>a?"sliceUploadFile":w,v.push({api:E,params:e,callback:C}),r(!0);case 24:case"end":return n.stop()}}),n,null,[[1,7]])}))),function(e){return n.apply(this,arguments)}));var n}))},e.next=13,Promise.all(y());case 13:s._addTasks(v);case 14:case"end":return e.stop()}}),e,this)}))),x.apply(this,arguments)}function S(e,t){var n=e.TaskId,i=e.Bucket,o=e.Region,s=e.Key,r=e.CopySource,a=e.UploadId,l=1*e.PartNumber,u=e.CopySourceRange,p=this.options.ChunkRetryTimes+1,d=this;c.retry(p,(function(t){d.uploadPartCopy({TaskId:n,Bucket:i,Region:o,Key:s,CopySource:r,UploadId:a,PartNumber:l,CopySourceRange:u,onProgress:e.onProgress,tracker:e.tracker,calledBySdk:e.calledBySdk},(function(e,n){t(e||null,n)}))}),(function(e,n){return t(e,n)}))}var k={sliceUploadFile:function(e,t){var n=this;if(!u.canFileSlice())return e.SkipTask=!0,void("postObject"===n.options.SimpleUploadMethod?n.postObject(e,t):n.putObject(e,t));var i,o,s=new l,r=e.TaskId,c=e.Bucket,p=e.Region,h=e.Key,f=e.FilePath,g=e.ChunkSize||e.SliceSize||n.options.ChunkSize,y=e.AsyncLimit,b=e.StorageClass,x=e.ServerSideEncryption,S=e.onHashProgress,k=e.tracker;k&&k.setParams({chunkSize:g}),s.on("error",(function(i){if(n._isRunningTask(r)){var o={UploadId:e.UploadData.UploadId||"",err:i,error:i};return t(o)}})),s.on("upload_complete",(function(n){var i=u.extend({UploadId:e.UploadData.UploadId||""},n);t(null,i)})),s.on("upload_slice_complete",(function(t){var l={};u.each(e.Headers,(function(e,t){var n=t.toLowerCase();0!==n.indexOf("x-cos-meta-")&&"pic-operations"!==n||(l[t]=e)})),v.call(n,{Bucket:c,Region:p,Key:h,UploadId:t.UploadId,SliceList:t.SliceList,Headers:l,tracker:k},(function(e,c){if(n._isRunningTask(r)){if(a.removeUsing(t.UploadId),e)return o(null,!0),s.emit("error",e);a.removeUploadId(t.UploadId),o({loaded:i,total:i},!0),s.emit("upload_complete",c)}}))})),s.on("get_upload_data_finish",(function(t){var l=a.getFileId(e.FileStat,e.ChunkSize,c,h);l&&a.saveUploadId(l,t.UploadId,n.options.UploadIdCacheLimit),a.setUsing(t.UploadId),o(null,!0),m.call(n,{TaskId:r,Bucket:c,Region:p,Key:h,FilePath:f,FileSize:i,SliceSize:g,AsyncLimit:y,ServerSideEncryption:x,UploadData:t,onProgress:o,tracker:k},(function(e,t){if(n._isRunningTask(r))return e?(o(null,!0),s.emit("error",e)):void s.emit("upload_slice_complete",t)}))})),s.on("get_file_size_finish",(function(){if(o=u.throttleOnProgress.call(n,i,e.onProgress),e.UploadData.UploadId)s.emit("get_upload_data_finish",e.UploadData);else{var t=u.extend({TaskId:r,Bucket:c,Region:p,Key:h,Headers:e.Headers,StorageClass:b,FilePath:f,FileSize:i,SliceSize:g,onHashProgress:S,tracker:k},e);t.FileSize=i,d.call(n,t,(function(t,i){if(n._isRunningTask(r)){if(t)return s.emit("error",t);e.UploadData.UploadId=i.UploadId,e.UploadData.PartList=i.PartList,s.emit("get_upload_data_finish",e.UploadData)}}))}})),i=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),u.each(e.Headers,(function(t,n){"content-length"===n.toLowerCase()&&delete e.Headers[n]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],o=1048576,s=0;s=w&&y%x||x),!e.Uploaded}));c.eachLimit(h,k,(function(t,n){var a=t.PartNumber,u=t.CopySourceRange,d=t.end-t.start,h=0;c.retry(C,(function(t){S.call(i,{Bucket:o,Region:s,Key:r,CopySource:p,UploadId:l.UploadId,PartNumber:a,CopySourceRange:u,tracker:e.tracker,calledBySdk:"sliceCopyFile",onProgress:function(e){E+=e.loaded-h,h=e.loaded,b({loaded:E,total:y})}},t)}),(function(e,i){if(e)return n(e);b({loaded:E,total:y}),E+=d-h,t.ETag=i.ETag,n(e||null,i)}))}),(function(e){if(e)return a.removeUsing(l.UploadId),b(null,!0),t(e);n.emit("copy_slice_complete",l)}))})),n.on("get_chunk_size_finish",(function(){var c=function(){i.multipartInit({Bucket:o,Region:s,Key:r,Headers:_,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(i,o){if(i)return t(i);e.UploadId=o.UploadId,n.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},l=a.getCopyFileId(p,T,x,o,r),d=a.getUploadIdList(l);if(!l||!d)return c();!function t(l){if(l>=d.length)return c();var p=d[l];if(a.using[p])return t(l+1);f.call(i,{Bucket:o,Region:s,Key:r,UploadId:p,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(i,o){if(i)a.removeUploadId(p),t(l+1);else{if(a.using[p])return t(l+1);var s={},r=0;u.each(o.PartList,(function(e){var t=parseInt(e.Size),n=r+t-1;s[e.PartNumber+"|"+r+"|"+n]=e.ETag,r+=t})),u.each(e.PartList,(function(e){var t=s[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),n.emit("get_copy_data_finish",{UploadId:p,PartList:e.PartList})}}))}(0)})),n.on("get_file_size_finish",(function(){var o;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;o11&&(I[t]=e)})),n.emit("get_file_size_finish")}else t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'})}))}else t({error:"CopySource format error"})}};e.exports.init=function(e,t){t.transferToTaskMethod(k,"sliceUploadFile"),u.each(k,(function(t,n){e.prototype[n]=u.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var o=0,s=0,r=0;!function a(){if(o>=e.length)return i();for(;r=e.length?i():a())}))}()},retry:function(e,t,n){e<1?n():function i(o){t((function(t,s){t&&o{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},exports.createPinia=function(){const e=jn(!0),t=e.run((()=>io({})));let n=[],i=[];const o=Ji({install(e){Pa(o),o._a=e,e.provide(Ma,o),e.config.globalProperties.$pinia=o,i.forEach((e=>n.push(e))),i=[]},use(e){return this._a?n.push(e):i.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o},exports.createSSRApp=zr,exports.defineStore=function(e,t,n){let i,o;const s="function"==typeof t;function r(e,n){(e=e||(!!(Gs||Do||Ko)?Wo(Ma,null):null))&&Pa(e),(e=Ra)._s.has(i)||(s?$a(i,t,o,e):Ha(i,o,e));return e._s.get(i)}return"string"==typeof e?(i=e,o=s?n:t):(o=e,i=e.id),r.$id=i,r},exports.e=(e,...t)=>a(e,...t),exports.f=(e,t)=>function(e,t){let n;if(p(e)||m(e)){n=new Array(e.length);for(let i=0,o=e.length;it(e,n,n)));else{const i=Object.keys(e);n=new Array(i.length);for(let o=0,s=i.length;o{if("function"!=typeof getApp)s=function(e,t){return o.t(e,t)};else{let e=!1;s=function(t,n){const i=getApp().$vm;return i&&(i.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(i,o))),o.t(t,n)}}return s(e,t)};return{i18n:o,f:(e,t,n)=>o.f(e,t,n),t:(e,t)=>s(e,t),add:(e,t,n=!0)=>o.add(e,t,n),watch:e=>o.watchLocale(e),getLocale:()=>o.getLocale(),setLocale:e=>o.setLocale(e)}},exports.jo=_f,exports.n=e=>U(e),exports.o=(e,t)=>Gr(e,t),exports.onMounted=ns,exports.p=e=>function(e){const{uid:t,__counter:n}=qs();return t+","+((Br[t]||(Br[t]=[])).push(Ls(e))-1)+","+n}(e),exports.reactive=zi,exports.ref=io,exports.resolveComponent=function(e,t){return function(e,t,n=!0,i=!1){const o=Do||Gs;if(o){const n=o.type;if(e===Lo){const e=function(e,t=!0){return f(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===T(t)||e===O(T(t))))return n}const s=jo(o[e]||n[e],t)||jo(o.appContext[e],t);return!s&&i?n:s}}(Lo,e,!0,t)||e},exports.s=e=>Fr(e),exports.sr=(e,t,n)=>function(e,t,n={}){const{$templateRefs:i}=qs();i.push({i:t,r:e,k:n.k,f:n.f})}(e,t,n),exports.t=e=>(e=>m(e)?e:null==e?"":p(e)||v(e)&&(e.toString===b||!f(e.toString))?JSON.stringify(e,F,2):String(e))(e),exports.unref=so,exports.wx$1=Mn; diff --git a/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxml b/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxml index dc7af67..7cddb33 100644 --- a/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxml +++ b/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxml @@ -1 +1 @@ -请检查主播名称是否正确选择我的主播请选择国家请选择性别金币数量:单位:K请填写金币数量请选择日期选择场数:请填写场数点击选择我的主播{{item.b}}{{item.c}}暂无数据 \ No newline at end of file +请检查主播名称是否正确选择我的主播请选择国家请选择性别金币数量:单位:K请填写金币数量请选择日期选择场数:请填写场数点击选择我的主播{{item.b}}{{item.c}}暂无数据 \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxss b/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxss index faf865f..8518b53 100644 --- a/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxss +++ b/unpackage/dist/build/mp-weixin/pages/Mine/minecomponents/recompose/recompose.wxss @@ -1 +1 @@ -@keyframes slide-in-a01de091{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slide-out-a01de091{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}.create-module.data-v-a01de091{animation:slide-in-a01de091 .3s ease-in-out}.close-animation.data-v-a01de091{animation:slide-out-a01de091 .3s ease-in-out forwards}.Mask.data-v-a01de091{width:100vw;height:100vh;background:rgba(0,0,0,.463);display:flex;flex-direction:column-reverse}.Hint.data-v-a01de091{color:red;font-size:20rpx;margin-left:30rpx;margin-top:10rpx}.Hintcss.data-v-a01de091{color:red;font-size:20rpx;margin-left:30rpx;margin-top:20rpx}.containers.data-v-a01de091{background-color:#fff;border-radius:50rpx}.container.data-v-a01de091{display:flex;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/bgv.png);background-size:100% 100%;flex-direction:column;width:100%;height:1300rpx;border-radius:50rpx;box-shadow:0 0 10rpx #ccc}.Fork.data-v-a01de091{width:46rpx;height:46rpx;margin-top:20rpx;margin-left:90%}.Titlecss.data-v-a01de091{width:100%;height:70rpx;display:flex;justify-content:center;align-items:center}.Star.data-v-a01de091{width:50rpx;height:50rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/star.png);background-size:100% 100%}.Title.data-v-a01de091{width:430rpx;height:70rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Publishpk.png);background-size:100% 200%;background-position:30% 0%;margin-left:26rpx;margin-right:-65rpx}.Individual.data-v-a01de091{display:flex}.NameAnchor.data-v-a01de091{width:90%;margin:40rpx}.AnchorSelection.data-v-a01de091{display:flex;align-items:center}.time.data-v-a01de091{width:90%;margin-left:5%;margin-top:50rpx}.NameAnchorcss.data-v-a01de091{width:99%;height:85rpx;background-color:#fff;border:1rpx solid #bfbfbf;border-radius:10rpx;text-align:center}.AnchorSelectioncss.data-v-a01de091{width:30%;height:60rpx;margin:40rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;font-size:18rpx;text-align:center;line-height:60rpx;border-radius:20rpx}.Gender.data-v-a01de091{width:310rpx;display:flex;flex-direction:column;justify-content:center}.Gendercs.data-v-a01de091{display:flex;justify-content:center}.Gendercss.data-v-a01de091{width:200rpx;height:60rpx}.Gendericoncss.data-v-a01de091{display:flex;justify-content:center;align-items:center;width:60rpx;height:60rpx;border-radius:50%;border:1rpx solid #ff9d0067;margin-left:20rpx;margin-top:10rpx}.Gendericon.data-v-a01de091{width:40rpx;height:40rpx}.Accountnumber.data-v-a01de091{display:flex;justify-content:center;margin-bottom:60rpx;margin-top:50rpx}.Coins.data-v-a01de091{width:400rpx;height:65rpx;margin-right:10rpx}.country.data-v-a01de091{margin-left:10rpx}.goldCoin.data-v-a01de091{width:100%;height:100rpx;display:flex;justify-content:center;align-items:center}.number-box.data-v-a01de091{display:flex;justify-content:center;text-align:center}.number-box-title.data-v-a01de091{color:#191919;font-size:30rpx;margin-right:22rpx;margin-left:17rpx}.number-box-unit.data-v-a01de091{color:#03aba8;width:48rpx;height:48rpx;border:1rpx solid #03aba8;border-radius:50%;line-height:48rpx;text-align:center}.Remarkscss.data-v-a01de091{width:90%;margin-top:30rpx;margin-left:5%;margin-right:5%;margin-bottom:50rpx;border-radius:10rpx}.Publish.data-v-a01de091{margin-bottom:40rpx;width:90%;margin-left:5%}.Publishcss.data-v-a01de091{background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;border-radius:50rpx}.popup-container.data-v-a01de091{width:600rpx;height:800rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center;border-radius:10px;background-repeat:no-repeat;display:flex;flex-direction:column;align-items:center}.popup-title.data-v-a01de091{color:#161616;font-size:36.26rpx;font-weight:700;margin-bottom:30rpx;margin-top:30rpx}.scroll.data-v-a01de091{width:90%;height:500rpx}.scroll.data-v-a01de091 ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.card.data-v-a01de091{margin-top:15rpx}.card-content.data-v-a01de091{width:100%;height:100rpx;background-color:#fff;border-radius:10rpx;display:flex;align-items:center;font-size:28rpx;color:#7f7f7f}.Avatarimg.data-v-a01de091{width:90rpx;height:90rpx;border-radius:50%;background-color:#ddd;margin-right:20rpx;margin-left:20rpx}.avatar.data-v-a01de091{width:100%;height:100%;border-radius:50%}.NameMoney.data-v-a01de091{display:flex;flex-direction:column}.TimeMoney.data-v-a01de091{width:300rpx;display:flex;font-weight:700;font-size:27rpx;color:#161616}.NameMoney_Name.data-v-a01de091{width:400rpx;text-align:left;font-weight:700;font-size:27rpx;color:#161616;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TimeMoney_country.data-v-a01de091{margin-top:10rpx;width:400rpx;text-align:left;font-size:20rpx;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.popup-btn.data-v-a01de091{display:flex;justify-content:space-around;margin-top:50rpx}.invite.data-v-a01de091{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde)}.cancel.data-v-a01de091{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;margin-left:30rpx;color:#03aba8;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;border:1rpx solid #03aba8}.no-data.data-v-a01de091{width:90%;height:500rpx;display:flex;justify-content:center;align-items:center}.no-data-text.data-v-a01de091{color:#999;font-size:28rpx;font-weight:700} +@keyframes slide-in-0aab313b{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slide-out-0aab313b{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}.create-module.data-v-0aab313b{animation:slide-in-0aab313b .3s ease-in-out}.close-animation.data-v-0aab313b{animation:slide-out-0aab313b .3s ease-in-out forwards}.Mask.data-v-0aab313b{width:100vw;height:100vh;background:rgba(0,0,0,.463);display:flex;flex-direction:column-reverse}.Hint.data-v-0aab313b{color:red;font-size:20rpx;margin-left:30rpx;margin-top:10rpx}.Hintcss.data-v-0aab313b{color:red;font-size:20rpx;margin-left:30rpx;margin-top:20rpx}.containers.data-v-0aab313b{background-color:#fff;border-radius:50rpx}.container.data-v-0aab313b{display:flex;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/bgv.png);background-size:100% 100%;flex-direction:column;width:100%;height:1300rpx;border-radius:50rpx;box-shadow:0 0 10rpx #ccc}.Fork.data-v-0aab313b{width:46rpx;height:46rpx;margin-top:20rpx;margin-left:90%}.Titlecss.data-v-0aab313b{width:100%;height:70rpx;display:flex;justify-content:center;align-items:center}.Star.data-v-0aab313b{width:50rpx;height:50rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/star.png);background-size:100% 100%}.Title.data-v-0aab313b{width:430rpx;height:70rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Publishpk.png);background-size:100% 200%;background-position:30% 0%;margin-left:26rpx;margin-right:-65rpx}.Individual.data-v-0aab313b{display:flex}.NameAnchor.data-v-0aab313b{width:90%;margin:40rpx}.AnchorSelection.data-v-0aab313b{display:flex;align-items:center}.time.data-v-0aab313b{width:90%;margin-left:5%;margin-top:50rpx}.NameAnchorcss.data-v-0aab313b{width:99%;height:85rpx;background-color:#fff;border:1rpx solid #bfbfbf;border-radius:10rpx;text-align:center}.AnchorSelectioncss.data-v-0aab313b{width:30%;height:60rpx;margin:40rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;font-size:18rpx;text-align:center;line-height:60rpx;border-radius:20rpx}.Gender.data-v-0aab313b{width:310rpx;display:flex;flex-direction:column;justify-content:center}.Gendercs.data-v-0aab313b{display:flex;justify-content:center}.Gendercss.data-v-0aab313b{width:200rpx;height:60rpx}.Gendericoncss.data-v-0aab313b{display:flex;justify-content:center;align-items:center;width:60rpx;height:60rpx;border-radius:50%;border:1rpx solid #ff9d0067;margin-left:20rpx;margin-top:10rpx}.Gendericon.data-v-0aab313b{width:40rpx;height:40rpx}.Accountnumber.data-v-0aab313b{display:flex;justify-content:center;margin-bottom:60rpx;margin-top:50rpx}.Coins.data-v-0aab313b{width:400rpx;height:65rpx;margin-right:10rpx}.country.data-v-0aab313b{margin-left:10rpx}.goldCoin.data-v-0aab313b{width:100%;height:100rpx;display:flex;justify-content:center;align-items:center}.number-box.data-v-0aab313b{display:flex;justify-content:center;text-align:center}.number-box-title.data-v-0aab313b{color:#191919;font-size:30rpx;margin-right:22rpx;margin-left:17rpx}.number-box-unit.data-v-0aab313b{color:#03aba8;width:48rpx;height:48rpx;border:1rpx solid #03aba8;border-radius:50%;line-height:48rpx;text-align:center}.Remarkscss.data-v-0aab313b{width:90%;margin-top:30rpx;margin-left:5%;margin-right:5%;margin-bottom:50rpx;border-radius:10rpx}.Publish.data-v-0aab313b{margin-bottom:40rpx;width:90%;margin-left:5%}.Publishcss.data-v-0aab313b{background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;border-radius:50rpx}.popup-container.data-v-0aab313b{width:600rpx;height:800rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center;border-radius:10px;background-repeat:no-repeat;display:flex;flex-direction:column;align-items:center}.popup-title.data-v-0aab313b{color:#161616;font-size:36.26rpx;font-weight:700;margin-bottom:30rpx;margin-top:30rpx}.scroll.data-v-0aab313b{width:90%;height:500rpx}.scroll.data-v-0aab313b ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.card.data-v-0aab313b{margin-top:15rpx}.card-content.data-v-0aab313b{width:100%;height:100rpx;background-color:#fff;border-radius:10rpx;display:flex;align-items:center;font-size:28rpx;color:#7f7f7f}.Avatarimg.data-v-0aab313b{width:90rpx;height:90rpx;border-radius:50%;background-color:#ddd;margin-right:20rpx;margin-left:20rpx}.avatar.data-v-0aab313b{width:100%;height:100%;border-radius:50%}.NameMoney.data-v-0aab313b{display:flex;flex-direction:column}.TimeMoney.data-v-0aab313b{width:300rpx;display:flex;font-weight:700;font-size:27rpx;color:#161616}.NameMoney_Name.data-v-0aab313b{width:400rpx;text-align:left;font-weight:700;font-size:27rpx;color:#161616;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TimeMoney_country.data-v-0aab313b{margin-top:10rpx;width:400rpx;text-align:left;font-size:20rpx;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.popup-btn.data-v-0aab313b{display:flex;justify-content:space-around;margin-top:50rpx}.invite.data-v-0aab313b{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde)}.cancel.data-v-0aab313b{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;margin-left:30rpx;color:#03aba8;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;border:1rpx solid #03aba8}.no-data.data-v-0aab313b{width:90%;height:500rpx;display:flex;justify-content:center;align-items:center}.no-data-text.data-v-0aab313b{color:#999;font-size:28rpx;font-weight:700} diff --git a/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxml b/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxml index 388ee06..90b1340 100644 --- a/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxml +++ b/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxml @@ -1 +1 @@ -请检查主播名称是否正确选择我的主播请选择国家请选择性别金币数量:单位:K请填写金币数量请选择日期选择场数:请填写场数点击选择我的主播{{item.b}}{{item.c}}暂无数据 \ No newline at end of file +请检查主播名称是否正确选择我的主播请选择国家请选择性别金币数量:单位:K请填写金币数量请选择日期选择场数:请填写场数点击选择我的主播{{item.b}}{{item.c}}暂无数据 \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxss b/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxss index 4494b99..2852723 100644 --- a/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxss +++ b/unpackage/dist/build/mp-weixin/pages/NewAddedPk/NewAddedPk.wxss @@ -1 +1 @@ -@keyframes slide-in-ce54c7bb{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slide-out-ce54c7bb{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}.create-module.data-v-ce54c7bb{animation:slide-in-ce54c7bb .3s ease-in-out}.close-animation.data-v-ce54c7bb{animation:slide-out-ce54c7bb .3s ease-in-out forwards}.Mask.data-v-ce54c7bb{width:100vw;height:100vh;background:rgba(0,0,0,.463);display:flex;flex-direction:column-reverse}.Hint.data-v-ce54c7bb{color:red;font-size:20rpx;margin-left:30rpx;margin-top:10rpx}.Hintcss.data-v-ce54c7bb{color:red;font-size:20rpx;margin-left:30rpx;margin-top:20rpx}.containers.data-v-ce54c7bb{background-color:#fff;border-radius:50rpx}.container.data-v-ce54c7bb{display:flex;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/bgv.png);background-size:100% 100%;flex-direction:column;width:100%;height:1300rpx;border-radius:50rpx;box-shadow:0 0 10rpx #ccc}.Fork.data-v-ce54c7bb{width:46rpx;height:46rpx;margin-top:20rpx;margin-left:90%}.Titlecss.data-v-ce54c7bb{width:100%;height:70rpx;display:flex;justify-content:center;align-items:center}.Star.data-v-ce54c7bb{width:50rpx;height:50rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/star.png);background-size:100% 100%}.Title.data-v-ce54c7bb{width:430rpx;height:70rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Publishpk.png);background-size:100% 200%;background-position:0 100%;margin-left:26rpx;margin-right:26rpx}.Individual.data-v-ce54c7bb{display:flex}.NameAnchor.data-v-ce54c7bb{width:90%;margin:40rpx}.time.data-v-ce54c7bb{width:90%;margin-left:5%;margin-top:50rpx}.AnchorSelection.data-v-ce54c7bb{display:flex;align-items:center}.NameAnchorcss.data-v-ce54c7bb{width:99%;height:85rpx;background-color:#fff;border:1rpx solid #bfbfbf;border-radius:10rpx;text-align:center}.AnchorSelectioncss.data-v-ce54c7bb{width:30%;height:60rpx;margin:40rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;font-size:18rpx;text-align:center;line-height:60rpx;border-radius:20rpx}.Gender.data-v-ce54c7bb{width:310rpx;display:flex;flex-direction:column;justify-content:center}.Gendercs.data-v-ce54c7bb{display:flex;justify-content:center}.Gendercss.data-v-ce54c7bb{width:200rpx;height:60rpx}.Gendericoncss.data-v-ce54c7bb{display:flex;justify-content:center;align-items:center;width:60rpx;height:60rpx;border-radius:50%;border:1rpx solid #ff9d0067;margin-left:20rpx;margin-top:10rpx}.Gendericon.data-v-ce54c7bb{width:40rpx;height:40rpx}.Accountnumber.data-v-ce54c7bb{display:flex;justify-content:center;margin-bottom:60rpx;margin-top:50rpx}.Coins.data-v-ce54c7bb{width:400rpx;height:65rpx;margin-right:10rpx}.country.data-v-ce54c7bb{margin-left:10rpx}.goldCoin.data-v-ce54c7bb{width:100%;height:100rpx;display:flex;justify-content:center;align-items:center}.number-box.data-v-ce54c7bb{display:flex;justify-content:center;text-align:center}.number-box-title.data-v-ce54c7bb{color:#191919;font-size:30rpx;margin-right:22rpx;margin-left:17rpx}.number-box-unit.data-v-ce54c7bb{color:#03aba8;width:48rpx;height:48rpx;border:1rpx solid #03aba8;border-radius:50%;line-height:48rpx;text-align:center}.Remarkscss.data-v-ce54c7bb{width:90%;margin-top:30rpx;margin-left:5%;margin-right:5%;margin-bottom:50rpx;border-radius:10rpx}.Publish.data-v-ce54c7bb{margin-bottom:40rpx;width:90%;margin-left:5%}.Publishcss.data-v-ce54c7bb{background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;border-radius:50rpx}.popup-container.data-v-ce54c7bb{width:600rpx;height:800rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center;border-radius:10px;background-repeat:no-repeat;display:flex;flex-direction:column;align-items:center}.popup-title.data-v-ce54c7bb{color:#161616;font-size:36.26rpx;font-weight:700;margin-bottom:30rpx;margin-top:30rpx}.scroll.data-v-ce54c7bb{width:90%;height:500rpx}.scroll.data-v-ce54c7bb ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.card.data-v-ce54c7bb{margin-top:15rpx}.card-content.data-v-ce54c7bb{width:100%;height:100rpx;background-color:#fff;border-radius:10rpx;display:flex;align-items:center;font-size:28rpx;color:#7f7f7f}.Avatarimg.data-v-ce54c7bb{width:90rpx;height:90rpx;border-radius:50%;background-color:#ddd;margin-right:20rpx;margin-left:20rpx}.avatar.data-v-ce54c7bb{width:100%;height:100%;border-radius:50%}.NameMoney.data-v-ce54c7bb{display:flex;flex-direction:column}.TimeMoney.data-v-ce54c7bb{width:300rpx;display:flex;font-weight:700;font-size:27rpx;color:#161616}.NameMoney_Name.data-v-ce54c7bb{width:400rpx;text-align:left;font-weight:700;font-size:27rpx;color:#161616;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TimeMoney_country.data-v-ce54c7bb{margin-top:10rpx;width:400rpx;text-align:left;font-size:20rpx;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.popup-btn.data-v-ce54c7bb{display:flex;justify-content:space-around;margin-top:50rpx}.invite.data-v-ce54c7bb{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde)}.cancel.data-v-ce54c7bb{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;margin-left:30rpx;color:#03aba8;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;border:1rpx solid #03aba8}.no-data.data-v-ce54c7bb{width:90%;height:500rpx;display:flex;justify-content:center;align-items:center}.no-data-text.data-v-ce54c7bb{color:#999;font-size:28rpx;font-weight:700} +@keyframes slide-in-1cddacd5{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slide-out-1cddacd5{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}.create-module.data-v-1cddacd5{animation:slide-in-1cddacd5 .3s ease-in-out}.close-animation.data-v-1cddacd5{animation:slide-out-1cddacd5 .3s ease-in-out forwards}.Mask.data-v-1cddacd5{width:100vw;height:100vh;background:rgba(0,0,0,.463);display:flex;flex-direction:column-reverse}.Hint.data-v-1cddacd5{color:red;font-size:20rpx;margin-left:30rpx;margin-top:10rpx}.Hintcss.data-v-1cddacd5{color:red;font-size:20rpx;margin-left:30rpx;margin-top:20rpx}.containers.data-v-1cddacd5{background-color:#fff;border-radius:50rpx}.container.data-v-1cddacd5{display:flex;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/bgv.png);background-size:100% 100%;flex-direction:column;width:100%;height:1300rpx;border-radius:50rpx;box-shadow:0 0 10rpx #ccc}.Fork.data-v-1cddacd5{width:46rpx;height:46rpx;margin-top:20rpx;margin-left:90%}.Titlecss.data-v-1cddacd5{width:100%;height:70rpx;display:flex;justify-content:center;align-items:center}.Star.data-v-1cddacd5{width:50rpx;height:50rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/star.png);background-size:100% 100%}.Title.data-v-1cddacd5{width:430rpx;height:70rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Publishpk.png);background-size:100% 200%;background-position:0 100%;margin-left:26rpx;margin-right:26rpx}.Individual.data-v-1cddacd5{display:flex}.NameAnchor.data-v-1cddacd5{width:90%;margin:40rpx}.time.data-v-1cddacd5{width:90%;margin-left:5%;margin-top:50rpx}.AnchorSelection.data-v-1cddacd5{display:flex;align-items:center}.NameAnchorcss.data-v-1cddacd5{width:99%;height:85rpx;background-color:#fff;border:1rpx solid #bfbfbf;border-radius:10rpx;text-align:center}.AnchorSelectioncss.data-v-1cddacd5{width:30%;height:60rpx;margin:40rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;font-size:18rpx;text-align:center;line-height:60rpx;border-radius:20rpx}.Gender.data-v-1cddacd5{width:310rpx;display:flex;flex-direction:column;justify-content:center}.Gendercs.data-v-1cddacd5{display:flex;justify-content:center}.Gendercss.data-v-1cddacd5{width:200rpx;height:60rpx}.Gendericoncss.data-v-1cddacd5{display:flex;justify-content:center;align-items:center;width:60rpx;height:60rpx;border-radius:50%;border:1rpx solid #ff9d0067;margin-left:20rpx;margin-top:10rpx}.Gendericon.data-v-1cddacd5{width:40rpx;height:40rpx}.Accountnumber.data-v-1cddacd5{display:flex;justify-content:center;margin-bottom:60rpx;margin-top:50rpx}.Coins.data-v-1cddacd5{width:400rpx;height:65rpx;margin-right:10rpx}.country.data-v-1cddacd5{margin-left:10rpx}.goldCoin.data-v-1cddacd5{width:100%;height:100rpx;display:flex;justify-content:center;align-items:center}.number-box.data-v-1cddacd5{display:flex;justify-content:center;text-align:center}.number-box-title.data-v-1cddacd5{color:#191919;font-size:30rpx;margin-right:22rpx;margin-left:17rpx}.number-box-unit.data-v-1cddacd5{color:#03aba8;width:48rpx;height:48rpx;border:1rpx solid #03aba8;border-radius:50%;line-height:48rpx;text-align:center}.Remarkscss.data-v-1cddacd5{width:90%;margin-top:30rpx;margin-left:5%;margin-right:5%;margin-bottom:50rpx;border-radius:10rpx}.Publish.data-v-1cddacd5{margin-bottom:40rpx;width:90%;margin-left:5%}.Publishcss.data-v-1cddacd5{background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;border-radius:50rpx}.popup-container.data-v-1cddacd5{width:600rpx;height:800rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center;border-radius:10px;background-repeat:no-repeat;display:flex;flex-direction:column;align-items:center}.popup-title.data-v-1cddacd5{color:#161616;font-size:36.26rpx;font-weight:700;margin-bottom:30rpx;margin-top:30rpx}.scroll.data-v-1cddacd5{width:90%;height:500rpx}.scroll.data-v-1cddacd5 ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.card.data-v-1cddacd5{margin-top:15rpx}.card-content.data-v-1cddacd5{width:100%;height:100rpx;background-color:#fff;border-radius:10rpx;display:flex;align-items:center;font-size:28rpx;color:#7f7f7f}.Avatarimg.data-v-1cddacd5{width:90rpx;height:90rpx;border-radius:50%;background-color:#ddd;margin-right:20rpx;margin-left:20rpx}.avatar.data-v-1cddacd5{width:100%;height:100%;border-radius:50%}.NameMoney.data-v-1cddacd5{display:flex;flex-direction:column}.TimeMoney.data-v-1cddacd5{width:300rpx;display:flex;font-weight:700;font-size:27rpx;color:#161616}.NameMoney_Name.data-v-1cddacd5{width:400rpx;text-align:left;font-weight:700;font-size:27rpx;color:#161616;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TimeMoney_country.data-v-1cddacd5{margin-top:10rpx;width:400rpx;text-align:left;font-size:20rpx;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.popup-btn.data-v-1cddacd5{display:flex;justify-content:space-around;margin-top:50rpx}.invite.data-v-1cddacd5{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde)}.cancel.data-v-1cddacd5{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;margin-left:30rpx;color:#03aba8;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;border:1rpx solid #03aba8}.no-data.data-v-1cddacd5{width:90%;height:500rpx;display:flex;justify-content:center;align-items:center}.no-data-text.data-v-1cddacd5{color:#999;font-size:28rpx;font-weight:700} diff --git a/unpackage/dist/build/mp-weixin/pages/Setting/Setting.js b/unpackage/dist/build/mp-weixin/pages/Setting/Setting.js index ccfe8a9..2ad84d8 100644 --- a/unpackage/dist/build/mp-weixin/pages/Setting/Setting.js +++ b/unpackage/dist/build/mp-weixin/pages/Setting/Setting.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),a=require("../../components/request.js"),i=require("../../components/postFile.js"),n=require("../../components/generateFileName.js"),o=require("../../components/goEasyTool/tool.js"),t={inject:["$global"],data:()=>({userinfo:"",name:"",id:"",info:{},userSig:""}),onLoad(a){e.index.getStorage({key:"userinfo",success:e=>{this.id=e.data.id,this.name=e.data.nickName,this.userinfo=e.data.headerIcon}}),e.index.getStorage({key:"userSig",success:e=>{this.userSig=e.data}})},methods:{cancel(){e.index.navigateBack({delta:1})},inputName(e){this.name=e.detail.value},async Userinfo(e){const{avatarUrl:a}=e.detail;this.userinfo=a},wxLogin(t){o.goEasylogout(this.$goeasy),e.index.showLoading({title:"修改中...",mask:!0}),i.uploadFile({path:this.userinfo,name:n.generateFileName()}).then((i=>{a.request({url:"user/updateUserInfo",method:"POST",data:{id:this.id,headerIcon:i.split("/").pop(),nickName:this.name,usersig:this.userSig.userSig},userInfo:!0}).then((a=>{200===a.code?(e.index.showToast({title:"修改成功",icon:"success"}),e.index.setStorageSync("userinfo",a.data.info),o.goEasylogin(this.$goeasy,String(a.data.info.id),a.data.info.headerIcon,a.data.info.nickName),e.index.hideLoading(),e.index.navigateBack({delta:1})):e.index.showToast({title:"修改失败",icon:"none"})}))})).catch((e=>{console.log(e)}))}}};const s=e._export_sfc(t,[["render",function(a,i,n,o,t,s){return{a:t.userinfo,b:e.o(((...e)=>s.Userinfo&&s.Userinfo(...e))),c:e.o(((...e)=>s.inputName&&s.inputName(...e))),d:t.name,e:e.o((e=>t.name=e.detail.value)),f:e.o(((...e)=>s.wxLogin&&s.wxLogin(...e))),g:e.o(((...e)=>s.cancel&&s.cancel(...e)))}}],["__scopeId","data-v-76be1a10"]]);wx.createPage(s); +"use strict";const e=require("../../common/vendor.js"),a=require("../../components/request.js"),n=require("../../components/postFile.js"),i=require("../../components/generateFileName.js"),o=require("../../components/goEasyTool/tool.js"),t={inject:["$global"],data:()=>({userinfo:"",name:"",id:"",info:{},useravatar:""}),onLoad(a){e.index.getStorage({key:"userinfo",success:e=>{this.id=e.data.id,this.name=e.data.nickName,this.userinfo=this.useravatar=e.data.headerIcon}})},methods:{cancel(){e.index.navigateBack({delta:1})},inputName(e){this.name=e.detail.value},async Userinfo(e){const{avatarUrl:a}=e.detail;this.userinfo=a},wxLogin(t){o.goEasylogout(this.$goeasy),e.index.showLoading({title:"修改中...",mask:!0}),this.useravatar==this.userinfo?a.request({url:"user/updateUserInfo",method:"POST",data:{id:this.id,headerIcon:this.userinfo.split("/").pop(),nickName:this.name},userInfo:!0}).then((a=>{200===a.code?(e.index.showToast({title:"修改成功",icon:"success"}),e.index.setStorageSync("userinfo",a.data.info),o.goEasylogin(this.$goeasy,String(a.data.info.id),a.data.info.headerIcon,a.data.info.nickName),e.index.hideLoading(),e.index.navigateBack({delta:1})):e.index.showToast({title:"修改失败",icon:"none"})})):n.uploadFile({path:this.userinfo,name:i.generateFileName()}).then((n=>{a.request({url:"user/updateUserInfo",method:"POST",data:{id:this.id,headerIcon:n.split("/").pop(),nickName:this.name},userInfo:!0}).then((a=>{console.log("修改调用返回",a),200===a.code?(e.index.showToast({title:"修改成功",icon:"success"}),e.index.setStorageSync("userinfo",a.data.info),o.goEasylogin(this.$goeasy,String(a.data.info.id),a.data.info.headerIcon,a.data.info.nickName),e.index.hideLoading(),e.index.navigateBack({delta:1})):e.index.showToast({title:"修改失败",icon:"none"})}))})).catch((e=>{console.log("上传失败",e)}))}}};const s=e._export_sfc(t,[["render",function(a,n,i,o,t,s){return{a:t.userinfo,b:e.o(((...e)=>s.Userinfo&&s.Userinfo(...e))),c:e.o(((...e)=>s.inputName&&s.inputName(...e))),d:t.name,e:e.o((e=>t.name=e.detail.value)),f:e.o(((...e)=>s.wxLogin&&s.wxLogin(...e))),g:e.o(((...e)=>s.cancel&&s.cancel(...e)))}}],["__scopeId","data-v-4a0e99e4"]]);wx.createPage(s); diff --git a/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxml b/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxml index 25aaf15..dbf960c 100644 --- a/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxml +++ b/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxss b/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxss index 9597e45..2a4758b 100644 --- a/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxss +++ b/unpackage/dist/build/mp-weixin/pages/Setting/Setting.wxss @@ -1 +1 @@ -.container.data-v-76be1a10{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:linear-gradient(to bottom,rgba(17,203,42,.43),rgba(37,116,252,.427))}.login-btn.data-v-76be1a10{width:200rpx;height:200rpx;border-radius:50%;padding:0;margin-bottom:60rpx}.avatar.data-v-76be1a10{width:100%;height:100%;border-radius:50%}.weui-input.data-v-76be1a10{width:80%;text-align:center;margin-bottom:40rpx}.weui-btn.data-v-76be1a10{width:40%;margin-top:20rpx;background-color:rgba(17,203,42,0);color:#fff} +.container.data-v-4a0e99e4{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:linear-gradient(to bottom,rgba(17,203,42,.43),rgba(37,116,252,.427))}.login-btn.data-v-4a0e99e4{width:200rpx;height:200rpx;border-radius:50%;padding:0;margin-bottom:60rpx}.avatar.data-v-4a0e99e4{width:100%;height:100%;border-radius:50%}.weui-input.data-v-4a0e99e4{width:80%;text-align:center;margin-bottom:40rpx}.weui-btn.data-v-4a0e99e4{width:40%;margin-top:20rpx;background-color:rgba(17,203,42,0);color:#fff} diff --git a/unpackage/dist/build/mp-weixin/pages/index/chat/chat.js b/unpackage/dist/build/mp-weixin/pages/index/chat/chat.js index 76a6245..58adc2a 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/chat/chat.js +++ b/unpackage/dist/build/mp-weixin/pages/index/chat/chat.js @@ -1 +1 @@ -"use strict";const e=require("../../../common/vendor.js"),t=require("../../../components/ChatId.js"),s=require("../../../components/TimeFormatting.js"),i=require("../../../components/request.js"),o=require("../../../components/goEasyTool/tool.js"),n={data:()=>({userId:"",nickname:"",avatar:"",chatList:[],userinfo:{},ButtonStatus:!1,MoreStatus:!1,KeyboardHeight:0,content:"",MoreItemStatus:null,ioshide:0,ElementPositioning:null,scrollviewheight:0,Elementheight:0,Scrolling:!1,scrollTop:0,judgescrollTop:!1,onPage:!1,timer:null,lastTimestamp:null,LastTime:null,MoreMessageList:[],Record:null,myitem:null,youritem:null,type:null,voiceStatus:!1,inputfocus:!1,voicepopUpstart:!1,voiceCancelOrSend:!1,recorderManager:e.index.getRecorderManager(),playbackStatus:!0,popUpList:[{name:"图片",icon:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Album.png",type:"Album"},{name:"视频",icon:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Video.png",type:"Video"},{name:"邀请",icon:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chat_invite.png",type:"Invitation"}]}),onShow(){this.onPage=!0,e.index.onKeyboardHeightChange((e=>{this.KeyboardHeight=2*e.height-this.ioshide}))},onHide(){this.onPage=!1},onLoad(s){this.recorderManager.onStop((t=>{console.log("录音结束",t),0!=this.ioshide?t.fileSize<20480?e.index.showToast({title:"您说话太短",icon:"none",duration:2e3}):(this.voiceCancelOrSend||this.sendVoice(t),this.voiceCancelOrSend=!1):t.fileSize<2048?e.index.showToast({title:"您说话太短",icon:"none",duration:2e3}):(this.voiceCancelOrSend||this.sendVoice(t),this.voiceCancelOrSend=!1)})),e.index.getStorage({key:"userinfo",success:e=>{this.userinfo=e.data}}),this.userId=s.userId,this.nickname=s.nickname,this.avatar=s.avatar,this.type=s.type;try{this.myitem=JSON.parse(s.myitem),this.youritem=JSON.parse(s.youritem)}catch(n){}"pk"==this.type&&setTimeout((()=>{this.sendCustomMessage()}),500),o.getConversationMessages(this.$goeasy,this.userId,null).then((s=>{this.chatList=s.map((e=>(e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),e))),setTimeout((()=>{this.chatList.length>0?(this.ElementPositioning=this.chatList[this.chatList.length-1].id,this.LastTime=this.chatList[0].timestamp):e.index.showToast({title:"您和对方暂无聊天记录,快去聊天吧",icon:"none",duration:2e3})}),300);e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec()})),o.messageRead(this.$goeasy,this.userId).then((e=>{console.log("已读对方的消息")})),this.getIOSDeviceType();var i=this.$goeasy.im;i.on(e.jo.IM_EVENT.PRIVATE_MESSAGE_RECEIVED,this.onPrivateMessageReceived),i.on(e.jo.IM_EVENT.MESSAGE_READ,this.onMessageRead),this.getscrollviewheight()},methods:{notplayVoice(e){this.playbackStatus=e},sendVoice(s){var i=this.$goeasy.im.createAudioMessage({file:s,to:{type:e.jo.IM_SCENE.PRIVATE,id:this.userId,data:{avatar:this.avatar,nickname:this.nickname}},onProgress:function(e){console.log("file uploading:",e)}});o.sendGroupMessage(this.$goeasy,i).then((e=>{this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1}))},voiceTouchstart(){console.log("长按语音"),this.voicepopUpstart=!0,this.recorderManager.start(),this.notplayVoice(!1)},voiceTouchend(){setTimeout((()=>{this.recorderManager.stop()}),100),console.log("松开语音"),this.voicepopUpstart=!1},voiceTouchmove(t){const s=.86*e.index.getSystemInfoSync().windowHeight;try{t.touches[0].clientY>s?this.voiceCancelOrSend=!1:this.voiceCancelOrSend=!0}catch(i){}},voiceTouchcancel(){console.log("中断语音"),this.voicepopUpstart=!1,this.voiceCancelOrSend=!1},onVoice(e){this.checkRecordPermission(),e?(this.inputfocus=!1,this.MoreStatus=!1):this.inputfocus=!0,this.voiceStatus=e},checkRecordPermission(){e.index.getSetting({success:t=>{const s=t.authSetting["scope.record"];void 0===s?this.requestPermission():s||(this.voiceStatus=!1,e.index.showModal({title:"权限提示",content:"需要录音权限才能正常使用功能,请在设置中开启",confirmText:"去开启",success:t=>{t.confirm&&e.index.openSetting({success:e=>{!0===e.authSetting["scope.record"]&&this.checkRecordPermission()}})}}))}})},requestPermission(){e.index.authorize({scope:"scope.record",fail:t=>{this.voiceStatus=!1,e.index.showToast({title:"请授予麦克风权限,否则可能导致语音功能异常",icon:"none"})}})},sendCustomMessage(){i.request({url:"pk/createPkRecord",method:"POST",data:{pkIdA:this.youritem.id,pkIdB:this.myitem.id,userIdA:this.userId,userIdB:this.userinfo.id,pkTime:this.youritem.pkTime,pkNumber:this.youritem.pkNumber,anchorIdA:this.youritem.anchorId,anchorIdB:this.myitem.anchorId,anchorIconA:this.youritem.anchorIcon,anchorIconB:this.myitem.anchorIcon,piIdA:this.youritem.id,piIdB:this.myitem.id},userInfo:!0}).then((s=>{if(200==s.code){let i={customData:{id:s.data.id,pkIdA:this.youritem.id,pkIdB:this.myitem.id},link:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/pk.png",text:"PK邀请消息"};o.sendCustomMessage(this.$goeasy,this.type,this.userId,i,this.avatar,this.nickname).then((s=>{this.ElementPositioning=s.id=t.generateId(),s.timestampStatus=this.checkInterval(s.timestamp),this.chatList.push(s),e.index.showToast({title:"发送成功",icon:"none"})}))}else e.index.showToast({title:s.msg,icon:"none"})}))},checkInterval(e){if(!this.lastTimestamp)return this.lastTimestamp=e,!0;return e-this.lastTimestamp>=3e5&&(this.lastTimestamp=e,!0)},TimeFormatting:s.TimeFormatting,getscrollviewheight(){e.index.createSelectorQuery().in(this).select(".scroll").boundingClientRect((e=>{this.scrollviewheight=e.height})).exec()},onScroll(e){this.judgescrollTop?this.scrollTop-e.detail.scrollTop>this.scrollviewheight?this.Scrolling=!0:this.scrollTop-e.detail.scrollTop{this.Record=this.chatList[0].id,this.MoreMessageList=e.map((e=>(e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),e)))})),setTimeout((()=>{this.chatList=[...this.MoreMessageList,...this.chatList],console.log("获取更多聊天记录",this.chatList),this.LastTime=this.chatList[0].timestamp,this.ElementPositioning=this.Record}),300)},onMessageRead(e){console.log("1已读消息",e)},onPrivateMessageReceived(e){this.Scrolling?(e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp)):(this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.judgescrollTop=!1),this.chatList.push(e),this.onPage&&o.messageRead(this.$goeasy,this.userId).then((e=>{console.log("已读对方的消息")}))},onSend(){""!=this.content&&(o.sendMessage(this.$goeasy,this.userId,this.content,this.avatar,this.nickname).then((e=>{console.log("发送成功",e),this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1})),this.content="",this.ButtonStatus=!1)},refreshMessage(e){this.MoreItemStatus=null,this.ElementPositioning=e.message.id=t.generateId(),e.timestampStatus=this.checkInterval(e.message.timestamp),this.chatList.push(e.message),this.judgescrollTop=!1,this.MoreStatus=!1},getIOSDeviceType(){const t=e.index.getSystemInfoSync().model;/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14/i.test(t)&&(/iPhone X|iPhone XS|iPhone 11 Pro/i.test(t)?this.ioshide=88:/iPhone 12|iPhone 13|iPhone 14/i.test(t)&&(this.ioshide=94))},onMore(t){this.Scrolling||(this.ElementPositioning=null,setTimeout((()=>{this.ElementPositioning=this.chatList[this.chatList.length-1].id}),100),this.judgescrollTop=!1),this.getscrollviewheight(),t?(this.MoreStatus=t,this.voiceStatus=!1):this.MoreStatus=t;e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec()},onMoreItem(e){"Album"==e?this.onSendMedia():"Video"==e?this.onSendVideo():this.MoreItemStatus=e},onSendVideo(){var s=this.$goeasy.im;e.index.chooseVideo({sourceType:["album","camera"],success:i=>{var n=s.createVideoMessage({file:i,to:{type:e.jo.IM_SCENE.PRIVATE,id:this.userId,data:{avatar:this.avatar,nickname:this.nickname}},onProgress:function(e){console.log("file uploading:",e)}});o.sendGroupMessage(this.$goeasy,n).then((e=>{this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1}))}})},onSendMedia(){var s=this.$goeasy.im;e.index.chooseImage({count:9,sizeType:["original","compressed"],sourceType:["album","camera"],success:i=>{i.tempFiles.forEach(((i,n)=>{var a=s.createImageMessage({file:i,to:{type:e.jo.IM_SCENE.PRIVATE,id:this.userId,data:{avatar:this.avatar,nickname:this.nickname}},onProgress:function(e){console.log("上传进度",e)}});o.sendGroupMessage(this.$goeasy,a).then((e=>{this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1}))}))}})},onFocus(t){this.Scrolling||(this.ElementPositioning=null,setTimeout((()=>{this.ElementPositioning=this.chatList[this.chatList.length-1].id}),100),this.judgescrollTop=!1),this.getscrollviewheight();e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec()},onBlur(t){e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec(),this.getscrollviewheight()},SendInput(t){e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec(),""!=t.target.value?this.ButtonStatus=!0:this.ButtonStatus=!1},onBack(){this.onPage=!1,e.wx$1.navigateBack({delta:1})}},components:{textmessage:()=>"./messageComponent/textmessage.js",InvitationComponents:()=>"./moreMessageComponents/InvitationComponents.js",customPKMessage:()=>"./messageComponent/customPKMessage.js",imageMessage:()=>"./messageComponent/imageMessage.js",videoMessage:()=>"./messageComponent/videoMessage.js",voiceMessage:()=>"./messageComponent/voiceMessage.js"}};if(!Array){(e.resolveComponent("textmessage")+e.resolveComponent("customPKMessage")+e.resolveComponent("imageMessage")+e.resolveComponent("videoMessage")+e.resolveComponent("voiceMessage")+e.resolveComponent("InvitationComponents"))()}const a=e._export_sfc(n,[["render",function(t,s,i,o,n,a){return e.e({a:e.o((e=>a.onMore(!1))),b:e.o(((...e)=>a.onBack&&a.onBack(...e))),c:e.t(n.nickname),d:e.o((e=>a.onMore(!1))),e:e.f(n.chatList,((t,s,i)=>e.e({a:t.timestampStatus},t.timestampStatus?{b:e.t(a.TimeFormatting(t.timestamp))}:{},{c:t.senderId==n.userId},t.senderId==n.userId?e.e({d:n.avatar,e:"text"==t.type||"audio"==t.type},("text"==t.type||t.type,{}),{f:"text"==t.type},"text"==t.type?{g:"9aced7d5-0-"+i,h:e.p({messagetext:t.payload.text})}:{},{i:"pk"==t.type},"pk"==t.type?{j:"9aced7d5-1-"+i,k:e.p({message:t.payload})}:{},{l:"image"==t.type},"image"==t.type?{m:"9aced7d5-2-"+i,n:e.p({message:t.payload})}:{},{o:"video"==t.type},"video"==t.type?{p:"9aced7d5-3-"+i,q:e.p({message:t.payload})}:{},{r:"audio"==t.type},"audio"==t.type?{s:"9aced7d5-4-"+i,t:e.p({message:t.payload,senderId:t.senderId,userId:n.userinfo.id})}:{},{v:"text"==t.type||"audio"==t.type?"#7bbd0093":"#ffffff"}):{},{w:t.senderId==n.userinfo.id},t.senderId==n.userinfo.id?e.e({x:n.userinfo.headerIcon,y:"text"==t.type||"audio"==t.type},("text"==t.type||t.type,{}),{z:"text"==t.type},"text"==t.type?{A:"9aced7d5-5-"+i,B:e.p({messagetext:t.payload.text})}:{},{C:"pk"==t.type},"pk"==t.type?{D:"9aced7d5-6-"+i,E:e.p({message:t.payload})}:{},{F:"image"==t.type},"image"==t.type?{G:"9aced7d5-7-"+i,H:e.p({message:t.payload})}:{},{I:"video"==t.type},"video"==t.type?{J:"9aced7d5-8-"+i,K:e.p({message:t.payload})}:{},{L:"audio"==t.type},"audio"==t.type?{M:e.o(a.notplayVoice,t.id),N:"9aced7d5-9-"+i,O:e.p({message:t.payload,senderId:t.senderId,userId:n.userinfo.id,playbackStatus:n.playbackStatus})}:{},{P:"text"==t.type||"audio"==t.type?"#7bbd0093":"#ffffff"}):{},{Q:t.id,R:t.id}))),f:e.o(((...e)=>a.onScrollToUpper&&a.onScrollToUpper(...e))),g:n.ElementPositioning,h:e.o(((...e)=>a.onScroll&&a.onScroll(...e))),i:e.o((e=>a.onMore(!1))),j:n.MoreStatus||0!=n.KeyboardHeight?n.MoreStatus?650+n.Elementheight+"rpx":0!=n.KeyboardHeight?n.KeyboardHeight+n.Elementheight+"rpx":"10vh":"10vh",k:!n.voiceStatus},n.voiceStatus?{}:{l:e.o((e=>a.onVoice(!n.voiceStatus)))},{m:n.voiceStatus},n.voiceStatus?{n:e.o((e=>a.onVoice(!n.voiceStatus)))}:{},{o:n.voiceStatus},n.voiceStatus?{p:e.o(((...e)=>a.voiceTouchstart&&a.voiceTouchstart(...e))),q:e.o(((...e)=>a.voiceTouchend&&a.voiceTouchend(...e))),r:e.o(((...e)=>a.voiceTouchmove&&a.voiceTouchmove(...e))),s:e.o(((...e)=>a.voiceTouchcancel&&a.voiceTouchcancel(...e)))}:{},{t:!n.voiceStatus},n.voiceStatus?{}:{v:e.o([e=>n.content=e.detail.value,(...e)=>a.SendInput&&a.SendInput(...e)]),w:e.o(((...e)=>a.onFocus&&a.onFocus(...e))),x:n.inputfocus,y:e.o(((...e)=>a.onBlur&&a.onBlur(...e))),z:n.content},{A:!n.ButtonStatus},n.ButtonStatus?{}:{B:e.o((e=>a.onMore(!n.MoreStatus)))},{C:n.ButtonStatus},n.ButtonStatus?{D:e.o(((...e)=>a.onSend&&a.onSend(...e)))}:{},{E:n.MoreStatus||n.KeyboardHeight>300?n.MoreStatus?"650rpx":n.KeyboardHeight>300?n.KeyboardHeight+"rpx":"0":"0",F:e.f(n.popUpList,((t,s,i)=>({a:t.icon,b:e.t(t.name),c:e.o((e=>a.onMoreItem(t.type)),s),d:s}))),G:n.MoreStatus||n.KeyboardHeight>300?n.MoreStatus||n.KeyboardHeight>300?"0":n.KeyboardHeight+"rpx":"-650rpx",H:"Invitation"==n.MoreItemStatus},"Invitation"==n.MoreItemStatus?{I:e.o(a.refreshMessage),J:e.p({oppositeId:n.userId,myId:n.userinfo.id,avatar:n.avatar,nickname:n.nickname})}:{},{K:e.o((()=>{})),L:null==n.MoreItemStatus?"-1000rpx":"0",M:e.o((e=>a.onMoreItem(null))),N:null==n.MoreItemStatus?"100vh":"0",O:n.voiceCancelOrSend?"#ebebeb":"#000000a9",P:e.t(n.voiceCancelOrSend?"取消":"松手发送"),Q:n.voiceCancelOrSend?"#000000a9":"#ebebeb",R:0==n.voicepopUpstart?"-1000rpx":"0",S:0==n.voicepopUpstart?"100vh":"0"})}],["__scopeId","data-v-9aced7d5"]]);wx.createPage(a); +"use strict";const e=require("../../../common/vendor.js"),t=require("../../../components/ChatId.js"),s=require("../../../components/TimeFormatting.js"),i=require("../../../components/request.js"),o=require("../../../components/goEasyTool/tool.js"),n={data:()=>({userId:"",nickname:"",avatar:"",chatList:[],userinfo:{},ButtonStatus:!1,MoreStatus:!1,KeyboardHeight:0,content:"",MoreItemStatus:null,ioshide:0,ElementPositioning:null,scrollviewheight:0,Elementheight:0,Scrolling:!1,scrollTop:0,judgescrollTop:!1,onPage:!1,timer:null,lastTimestamp:null,LastTime:null,MoreMessageList:[],Record:null,myitem:null,youritem:null,type:null,voiceStatus:!1,inputfocus:!1,voicepopUpstart:!1,voiceCancelOrSend:!1,recorderManager:e.index.getRecorderManager(),playbackStatus:!0,popUpList:[{name:"图片",icon:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Album.png",type:"Album"},{name:"视频",icon:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Video.png",type:"Video"},{name:"邀请",icon:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chat_invite.png",type:"Invitation"}]}),onShow(){this.onPage=!0,e.index.onKeyboardHeightChange((e=>{this.KeyboardHeight=2*e.height-this.ioshide}))},onHide(){this.onPage=!1},onUnload(){this.onPage=!1},onLoad(s){this.recorderManager.onStop((t=>{console.log("录音结束",t),0!=this.ioshide?t.fileSize<20480?e.index.showToast({title:"您说话太短",icon:"none",duration:2e3}):(this.voiceCancelOrSend||this.sendVoice(t),this.voiceCancelOrSend=!1):t.fileSize<2048?e.index.showToast({title:"您说话太短",icon:"none",duration:2e3}):(this.voiceCancelOrSend||this.sendVoice(t),this.voiceCancelOrSend=!1)})),e.index.getStorage({key:"userinfo",success:e=>{this.userinfo=e.data}}),this.userId=s.userId,this.nickname=s.nickname,this.avatar=s.avatar,this.type=s.type;try{this.myitem=JSON.parse(s.myitem),this.youritem=JSON.parse(s.youritem)}catch(n){}"pk"==this.type&&setTimeout((()=>{this.sendCustomMessage()}),500),o.getConversationMessages(this.$goeasy,this.userId,null).then((s=>{this.chatList=s.map((e=>(e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),e))),setTimeout((()=>{this.chatList.length>0?(this.ElementPositioning=this.chatList[this.chatList.length-1].id,this.LastTime=this.chatList[0].timestamp):e.index.showToast({title:"您和对方暂无聊天记录,快去聊天吧",icon:"none",duration:2e3})}),300);e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec()})),o.messageRead(this.$goeasy,this.userId).then((e=>{console.log("已读对方的消息")})),this.getIOSDeviceType();var i=this.$goeasy.im;i.on(e.jo.IM_EVENT.PRIVATE_MESSAGE_RECEIVED,this.onPrivateMessageReceived),i.on(e.jo.IM_EVENT.MESSAGE_READ,this.onMessageRead),this.getscrollviewheight()},methods:{notplayVoice(e){this.playbackStatus=e},sendVoice(s){var i=this.$goeasy.im.createAudioMessage({file:s,to:{type:e.jo.IM_SCENE.PRIVATE,id:this.userId,data:{avatar:this.avatar,nickname:this.nickname}},onProgress:function(e){console.log("file uploading:",e)}});o.sendGroupMessage(this.$goeasy,i).then((e=>{this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1}))},voiceTouchstart(){console.log("长按语音"),this.voicepopUpstart=!0,this.recorderManager.start(),this.notplayVoice(!1)},voiceTouchend(){setTimeout((()=>{this.recorderManager.stop()}),100),console.log("松开语音"),this.voicepopUpstart=!1},voiceTouchmove(t){const s=.86*e.index.getSystemInfoSync().windowHeight;try{t.touches[0].clientY>s?this.voiceCancelOrSend=!1:this.voiceCancelOrSend=!0}catch(i){}},voiceTouchcancel(){console.log("中断语音"),this.voicepopUpstart=!1,this.voiceCancelOrSend=!1},onVoice(e){this.checkRecordPermission(),e?(this.inputfocus=!1,this.MoreStatus=!1):this.inputfocus=!0,this.voiceStatus=e},checkRecordPermission(){e.index.getSetting({success:t=>{const s=t.authSetting["scope.record"];void 0===s?this.requestPermission():s||(this.voiceStatus=!1,e.index.showModal({title:"权限提示",content:"需要录音权限才能正常使用功能,请在设置中开启",confirmText:"去开启",success:t=>{t.confirm&&e.index.openSetting({success:e=>{!0===e.authSetting["scope.record"]&&this.checkRecordPermission()}})}}))}})},requestPermission(){e.index.authorize({scope:"scope.record",fail:t=>{this.voiceStatus=!1,e.index.showToast({title:"请授予麦克风权限,否则可能导致语音功能异常",icon:"none"})}})},sendCustomMessage(){i.request({url:"pk/createPkRecord",method:"POST",data:{pkIdA:this.youritem.id,pkIdB:this.myitem.id,userIdA:this.userId,userIdB:this.userinfo.id,pkTime:this.youritem.pkTime,pkNumber:this.youritem.pkNumber,anchorIdA:this.youritem.anchorId,anchorIdB:this.myitem.anchorId,anchorIconA:this.youritem.anchorIcon,anchorIconB:this.myitem.anchorIcon,piIdA:this.youritem.id,piIdB:this.myitem.id},userInfo:!0}).then((s=>{if(200==s.code){let i={customData:{id:s.data.id,pkIdA:this.youritem.id,pkIdB:this.myitem.id},link:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/pk.png",text:"PK邀请消息"};o.sendCustomMessage(this.$goeasy,this.type,this.userId,i,this.avatar,this.nickname).then((s=>{this.ElementPositioning=s.id=t.generateId(),s.timestampStatus=this.checkInterval(s.timestamp),this.chatList.push(s),e.index.showToast({title:"发送成功",icon:"none"})}))}else e.index.showToast({title:s.msg,icon:"none"})}))},checkInterval(e){if(!this.lastTimestamp)return this.lastTimestamp=e,!0;return e-this.lastTimestamp>=3e5&&(this.lastTimestamp=e,!0)},TimeFormatting:s.TimeFormatting,getscrollviewheight(){e.index.createSelectorQuery().in(this).select(".scroll").boundingClientRect((e=>{this.scrollviewheight=e.height})).exec()},onScroll(e){this.judgescrollTop?this.scrollTop-e.detail.scrollTop>this.scrollviewheight?this.Scrolling=!0:this.scrollTop-e.detail.scrollTop{this.Record=this.chatList[0].id,this.MoreMessageList=e.map((e=>(e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),e)))})),setTimeout((()=>{this.chatList=[...this.MoreMessageList,...this.chatList],console.log("获取更多聊天记录",this.chatList),this.LastTime=this.chatList[0].timestamp,this.ElementPositioning=this.Record}),300)},onMessageRead(e){console.log("1已读消息",e)},onPrivateMessageReceived(e){this.Scrolling?(e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp)):(this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.judgescrollTop=!1),this.chatList.push(e),this.onPage&&o.messageRead(this.$goeasy,this.userId).then((e=>{console.log("已读对方的消息")}))},onSend(){""!=this.content&&(o.sendMessage(this.$goeasy,this.userId,this.content,this.avatar,this.nickname).then((e=>{console.log("发送成功",e),this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1})),this.content="",this.ButtonStatus=!1)},refreshMessage(e){this.MoreItemStatus=null,this.ElementPositioning=e.message.id=t.generateId(),e.timestampStatus=this.checkInterval(e.message.timestamp),this.chatList.push(e.message),this.judgescrollTop=!1,this.MoreStatus=!1},getIOSDeviceType(){const t=e.index.getSystemInfoSync().model;/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14/i.test(t)&&(/iPhone X|iPhone XS|iPhone 11 Pro/i.test(t)?this.ioshide=88:/iPhone 12|iPhone 13|iPhone 14/i.test(t)&&(this.ioshide=94))},onMore(t){this.Scrolling||(this.ElementPositioning=null,setTimeout((()=>{this.ElementPositioning=this.chatList[this.chatList.length-1].id}),100),this.judgescrollTop=!1),this.getscrollviewheight(),t?(this.MoreStatus=t,this.voiceStatus=!1):this.MoreStatus=t;e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec()},onMoreItem(e){"Album"==e?this.onSendMedia():"Video"==e?this.onSendVideo():this.MoreItemStatus=e},onSendVideo(){var s=this.$goeasy.im;e.index.chooseVideo({sourceType:["album","camera"],success:i=>{var n=s.createVideoMessage({file:i,to:{type:e.jo.IM_SCENE.PRIVATE,id:this.userId,data:{avatar:this.avatar,nickname:this.nickname}},onProgress:function(e){console.log("file uploading:",e)}});o.sendGroupMessage(this.$goeasy,n).then((e=>{this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1}))}})},onSendMedia(){var s=this.$goeasy.im;e.index.chooseImage({count:9,sizeType:["original","compressed"],sourceType:["album","camera"],success:i=>{i.tempFiles.forEach(((i,n)=>{var a=s.createImageMessage({file:i,to:{type:e.jo.IM_SCENE.PRIVATE,id:this.userId,data:{avatar:this.avatar,nickname:this.nickname}},onProgress:function(e){console.log("上传进度",e)}});o.sendGroupMessage(this.$goeasy,a).then((e=>{this.ElementPositioning=e.id=t.generateId(),e.timestampStatus=this.checkInterval(e.timestamp),this.chatList.push(e),this.judgescrollTop=!1}))}))}})},onFocus(t){this.Scrolling||(this.ElementPositioning=null,setTimeout((()=>{this.ElementPositioning=this.chatList[this.chatList.length-1].id}),100),this.judgescrollTop=!1),this.getscrollviewheight();e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec()},onBlur(t){e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec(),this.getscrollviewheight()},SendInput(t){e.index.createSelectorQuery().in(this).select(".inputComponent").boundingClientRect((e=>{this.Elementheight=2*e.height})).exec(),""!=t.target.value?this.ButtonStatus=!0:this.ButtonStatus=!1},onBack(){this.onPage=!1,e.wx$1.navigateBack({delta:1})}},components:{textmessage:()=>"./messageComponent/textmessage.js",InvitationComponents:()=>"./moreMessageComponents/InvitationComponents.js",customPKMessage:()=>"./messageComponent/customPKMessage.js",imageMessage:()=>"./messageComponent/imageMessage.js",videoMessage:()=>"./messageComponent/videoMessage.js",voiceMessage:()=>"./messageComponent/voiceMessage.js"}};if(!Array){(e.resolveComponent("textmessage")+e.resolveComponent("customPKMessage")+e.resolveComponent("imageMessage")+e.resolveComponent("videoMessage")+e.resolveComponent("voiceMessage")+e.resolveComponent("InvitationComponents"))()}const a=e._export_sfc(n,[["render",function(t,s,i,o,n,a){return e.e({a:e.o((e=>a.onMore(!1))),b:e.o(((...e)=>a.onBack&&a.onBack(...e))),c:e.t(n.nickname),d:e.o((e=>a.onMore(!1))),e:e.f(n.chatList,((t,s,i)=>e.e({a:t.timestampStatus},t.timestampStatus?{b:e.t(a.TimeFormatting(t.timestamp))}:{},{c:t.senderId==n.userId},t.senderId==n.userId?e.e({d:n.avatar,e:"text"==t.type||"audio"==t.type},("text"==t.type||t.type,{}),{f:"text"==t.type},"text"==t.type?{g:"10964899-0-"+i,h:e.p({messagetext:t.payload.text})}:{},{i:"pk"==t.type},"pk"==t.type?{j:"10964899-1-"+i,k:e.p({message:t.payload})}:{},{l:"image"==t.type},"image"==t.type?{m:"10964899-2-"+i,n:e.p({message:t.payload})}:{},{o:"video"==t.type},"video"==t.type?{p:"10964899-3-"+i,q:e.p({message:t.payload})}:{},{r:"audio"==t.type},"audio"==t.type?{s:"10964899-4-"+i,t:e.p({message:t.payload,senderId:t.senderId,userId:n.userinfo.id})}:{},{v:"text"==t.type||"audio"==t.type?"#7bbd0093":"#ffffff"}):{},{w:t.senderId==n.userinfo.id},t.senderId==n.userinfo.id?e.e({x:n.userinfo.headerIcon,y:"text"==t.type||"audio"==t.type},("text"==t.type||t.type,{}),{z:"text"==t.type},"text"==t.type?{A:"10964899-5-"+i,B:e.p({messagetext:t.payload.text})}:{},{C:"pk"==t.type},"pk"==t.type?{D:"10964899-6-"+i,E:e.p({message:t.payload})}:{},{F:"image"==t.type},"image"==t.type?{G:"10964899-7-"+i,H:e.p({message:t.payload})}:{},{I:"video"==t.type},"video"==t.type?{J:"10964899-8-"+i,K:e.p({message:t.payload})}:{},{L:"audio"==t.type},"audio"==t.type?{M:e.o(a.notplayVoice,t.id),N:"10964899-9-"+i,O:e.p({message:t.payload,senderId:t.senderId,userId:n.userinfo.id,playbackStatus:n.playbackStatus})}:{},{P:"text"==t.type||"audio"==t.type?"#7bbd0093":"#ffffff"}):{},{Q:t.id,R:t.id}))),f:e.o(((...e)=>a.onScrollToUpper&&a.onScrollToUpper(...e))),g:n.ElementPositioning,h:e.o(((...e)=>a.onScroll&&a.onScroll(...e))),i:e.o((e=>a.onMore(!1))),j:n.MoreStatus||0!=n.KeyboardHeight?n.MoreStatus?650+n.Elementheight+"rpx":0!=n.KeyboardHeight?n.KeyboardHeight+n.Elementheight+"rpx":"10vh":"10vh",k:!n.voiceStatus},n.voiceStatus?{}:{l:e.o((e=>a.onVoice(!n.voiceStatus)))},{m:n.voiceStatus},n.voiceStatus?{n:e.o((e=>a.onVoice(!n.voiceStatus)))}:{},{o:n.voiceStatus},n.voiceStatus?{p:e.o(((...e)=>a.voiceTouchstart&&a.voiceTouchstart(...e))),q:e.o(((...e)=>a.voiceTouchend&&a.voiceTouchend(...e))),r:e.o(((...e)=>a.voiceTouchmove&&a.voiceTouchmove(...e))),s:e.o(((...e)=>a.voiceTouchcancel&&a.voiceTouchcancel(...e)))}:{},{t:!n.voiceStatus},n.voiceStatus?{}:{v:e.o([e=>n.content=e.detail.value,(...e)=>a.SendInput&&a.SendInput(...e)]),w:e.o(((...e)=>a.onFocus&&a.onFocus(...e))),x:n.inputfocus,y:e.o(((...e)=>a.onBlur&&a.onBlur(...e))),z:n.content},{A:!n.ButtonStatus},n.ButtonStatus?{}:{B:e.o((e=>a.onMore(!n.MoreStatus)))},{C:n.ButtonStatus},n.ButtonStatus?{D:e.o(((...e)=>a.onSend&&a.onSend(...e)))}:{},{E:n.MoreStatus||n.KeyboardHeight>300?n.MoreStatus?"650rpx":n.KeyboardHeight>300?n.KeyboardHeight+"rpx":"0":"0",F:e.f(n.popUpList,((t,s,i)=>({a:t.icon,b:e.t(t.name),c:e.o((e=>a.onMoreItem(t.type)),s),d:s}))),G:n.MoreStatus||n.KeyboardHeight>300?n.MoreStatus||n.KeyboardHeight>300?"0":n.KeyboardHeight+"rpx":"-650rpx",H:"Invitation"==n.MoreItemStatus},"Invitation"==n.MoreItemStatus?{I:e.o(a.refreshMessage),J:e.p({oppositeId:n.userId,myId:n.userinfo.id,avatar:n.avatar,nickname:n.nickname})}:{},{K:e.o((()=>{})),L:null==n.MoreItemStatus?"-1000rpx":"0",M:e.o((e=>a.onMoreItem(null))),N:null==n.MoreItemStatus?"100vh":"0",O:n.voiceCancelOrSend?"#ebebeb":"#000000a9",P:e.t(n.voiceCancelOrSend?"取消":"松手发送"),Q:n.voiceCancelOrSend?"#000000a9":"#ebebeb",R:0==n.voicepopUpstart?"-1000rpx":"0",S:0==n.voicepopUpstart?"100vh":"0"})}],["__scopeId","data-v-10964899"]]);wx.createPage(a); diff --git a/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxml b/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxml index 6cd6835..eb42c3a 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxml +++ b/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxml @@ -1 +1 @@ -{{c}}{{item.b}}按住 说话{{item.b}} 取消 {{P}} \ No newline at end of file +{{c}}{{item.b}}按住 说话{{item.b}} 取消 {{P}} \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxss b/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxss index e467aef..50ad775 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxss +++ b/unpackage/dist/build/mp-weixin/pages/index/chat/chat.wxss @@ -1 +1 @@ -.bg.data-v-9aced7d5{position:fixed;left:0;right:0;bottom:0;top:0;z-index:-1}.bgImg.data-v-9aced7d5{width:100%;height:100%}.Return.data-v-9aced7d5{position:fixed;left:35rpx;top:120rpx;width:46rpx;height:46rpx;z-index:1}.title.data-v-9aced7d5{position:fixed;top:120rpx;left:325rpx;font-size:34rpx;color:#100e0f;font-weight:700;z-index:1}.ReturnImg.data-v-9aced7d5{width:100%;height:100%}.content.data-v-9aced7d5{position:absolute;top:200rpx;left:0rpx;right:0rpx}.scroll.data-v-9aced7d5{width:96%;height:100%;padding:0% 2%}.scroll.data-v-9aced7d5 ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.inputComponent.data-v-9aced7d5{position:absolute;left:0;right:0;height:auto;background-color:#f0f0f0;padding:15rpx 15rpx 37.5rpx;display:flex;align-items:flex-end;transition:bottom .25s ease}.chat-card.data-v-9aced7d5{width:100%;height:auto;margin-bottom:10rpx;margin-top:10rpx;padding:10rpx}.chat-time.data-v-9aced7d5{width:100%;height:50rpx;text-align:center;font-size:24rpx;color:#999;line-height:50rpx;margin-top:20rpx;margin-bottom:20rpx;background-color:rgba(0,0,0,0)}.chat-avatar.data-v-9aced7d5{width:100%;height:auto;display:flex;align-items:flex-start}.oppositeChatNews.data-v-9aced7d5{width:100%;display:flex;align-items:flex-start}.oppositesharpCorner.data-v-9aced7d5{width:20rpx;height:80rpx;display:flex;flex-direction:row-reverse;align-items:center}.oppositeSharpCornercion.data-v-9aced7d5{width:0;height:0;border-top:13rpx solid transparent;border-right:13rpx solid #ffffff;border-bottom:13rpx solid transparent}.oppositeChatNewsContent.data-v-9aced7d5{width:auto;height:auto;background-color:#fff;border-radius:10rpx;max-width:450rpx}.myChatNews.data-v-9aced7d5{width:100%;display:flex;flex-direction:row-reverse;align-items:flex-start;margin-right:15rpx}.mysharpCorner.data-v-9aced7d5{width:20rpx;height:80rpx;display:flex;align-items:center}.mySharpCornercion.data-v-9aced7d5{width:0;height:0;border-top:13rpx solid transparent;border-left:13rpx solid #7bbd0093;border-bottom:13rpx solid transparent}.myChatNewsContent.data-v-9aced7d5{width:auto;height:auto;border-radius:20rpx;max-width:450rpx}.chat-avatarImg.data-v-9aced7d5{width:80rpx;height:80rpx;border-radius:10rpx}.Voice.data-v-9aced7d5{width:80rpx;height:80rpx;border-radius:50rpx;margin-left:10rpx;display:flex;justify-content:center;align-items:center}.KeyboardImg.data-v-9aced7d5{width:70rpx;height:70rpx;border-radius:50rpx;display:flex;justify-content:center;align-items:center}.Keyboardpng.data-v-9aced7d5{width:100%;height:100%;border-radius:50rpx}.MicrophoneImg.data-v-9aced7d5{margin-top:5rpx;width:53rpx;height:53rpx;border:4rpx solid #424242;border-radius:50rpx;display:flex;justify-content:center;align-items:center}.Microphonepng.data-v-9aced7d5{width:80%;height:80%;border-radius:50rpx}.textareacomponent.data-v-9aced7d5{width:570rpx;height:auto}.input.data-v-9aced7d5{width:95%;background-color:#fff;min-height:60rpx;max-height:200rpx;border-radius:10rpx;padding:10rpx;overflow-wrap:break-word;margin-left:30rpx}.VoiceInput.data-v-9aced7d5{width:95%;background-color:#fff;height:60rpx;border-radius:10rpx;padding:10rpx;overflow-wrap:break-word;margin-left:30rpx;line-height:60rpx;text-align:center;color:#000}.sendComponent.data-v-9aced7d5{margin-left:40rpx}.send.data-v-9aced7d5{width:100rpx;height:75rpx;background-color:#539c00;border-radius:10rpx;color:#fff;font-size:20rpx;text-align:center;line-height:75rpx}.MoreImg.data-v-9aced7d5{margin-left:20rpx;height:80rpx;width:80rpx;margin-bottom:-10rpx;border-radius:50rpx}.MoreComponent.data-v-9aced7d5{position:fixed;left:0;right:0;height:650rpx;transition:bottom .25s ease;background-color:#fff}.Morecontent.data-v-9aced7d5{width:100%;height:100%;display:flex;align-content:baseline;flex-wrap:wrap}.MoreList.data-v-9aced7d5{width:150rpx;height:150rpx;background-color:#f1f1f1;border-radius:20rpx;margin:18.75rpx}.MoreItem.data-v-9aced7d5{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.Moreicon.data-v-9aced7d5{width:80rpx;height:80rpx}.popUpInvitation.data-v-9aced7d5{position:fixed;left:0;right:0;bottom:0;transition:top .25s ease;z-index:1000}.popUpVoice.data-v-9aced7d5{position:fixed;left:0;right:0;bottom:0;z-index:1000;background-color:rgba(139,139,139,.843)}.popUpInvitationContent.data-v-9aced7d5{position:absolute;left:0;right:0;height:1000rpx;transition:bottom .25s ease;background-color:#fff;border-top-left-radius:40rpx;border-top-right-radius:40rpx}.popUpvoiceContent.data-v-9aced7d5{position:absolute;left:0;right:0;height:1000rpx}.gifModule.data-v-9aced7d5{padding:20rpx;border-radius:20rpx;overflow:hidden;height:120rpx;background-color:#232123}.voiceCenter.data-v-9aced7d5{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}.video-player.data-v-9aced7d5{width:300rpx;height:300rpx;border-radius:20rpx;margin-top:-94rpx}.CancelModule.data-v-9aced7d5{width:95%;height:100rpx;text-align:center;line-height:100rpx;background-color:rgba(0,0,0,.663);font-size:30rpx;color:#999;border-radius:50rpx;margin-top:500rpx}.btnModule.data-v-9aced7d5{width:100%;height:200rpx;background-color:#000;color:#999;font-size:30rpx;text-align:center;line-height:200rpx;border-top-left-radius:50%;border-top-right-radius:50%} +.bg.data-v-10964899{position:fixed;left:0;right:0;bottom:0;top:0;z-index:-1}.bgImg.data-v-10964899{width:100%;height:100%}.Return.data-v-10964899{position:fixed;left:35rpx;top:120rpx;width:46rpx;height:46rpx;z-index:2}.title.data-v-10964899{position:fixed;top:120rpx;left:0;right:0;text-align:center;font-size:34rpx;color:#100e0f;font-weight:700;z-index:1}.ReturnImg.data-v-10964899{width:100%;height:100%}.content.data-v-10964899{position:absolute;top:200rpx;left:0rpx;right:0rpx}.scroll.data-v-10964899{width:96%;height:100%;padding:0% 2%}.scroll.data-v-10964899 ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.inputComponent.data-v-10964899{position:absolute;left:0;right:0;height:auto;background-color:#f0f0f0;padding:15rpx 15rpx 37.5rpx;display:flex;align-items:flex-end;transition:bottom .25s ease}.chat-card.data-v-10964899{width:100%;height:auto;margin-bottom:10rpx;margin-top:10rpx;padding:10rpx}.chat-time.data-v-10964899{width:100%;height:50rpx;text-align:center;font-size:24rpx;color:#999;line-height:50rpx;margin-top:20rpx;margin-bottom:20rpx;background-color:rgba(0,0,0,0)}.chat-avatar.data-v-10964899{width:100%;height:auto;display:flex;align-items:flex-start}.oppositeChatNews.data-v-10964899{width:100%;display:flex;align-items:flex-start}.oppositesharpCorner.data-v-10964899{width:20rpx;height:80rpx;display:flex;flex-direction:row-reverse;align-items:center}.oppositeSharpCornercion.data-v-10964899{width:0;height:0;border-top:13rpx solid transparent;border-right:13rpx solid #ffffff;border-bottom:13rpx solid transparent}.oppositeChatNewsContent.data-v-10964899{width:auto;height:auto;background-color:#fff;border-radius:10rpx;max-width:450rpx}.myChatNews.data-v-10964899{width:100%;display:flex;flex-direction:row-reverse;align-items:flex-start;margin-right:15rpx}.mysharpCorner.data-v-10964899{width:20rpx;height:80rpx;display:flex;align-items:center}.mySharpCornercion.data-v-10964899{width:0;height:0;border-top:13rpx solid transparent;border-left:13rpx solid #7bbd0093;border-bottom:13rpx solid transparent}.myChatNewsContent.data-v-10964899{width:auto;height:auto;border-radius:20rpx;max-width:450rpx}.chat-avatarImg.data-v-10964899{width:80rpx;height:80rpx;border-radius:10rpx}.Voice.data-v-10964899{width:80rpx;height:80rpx;border-radius:50rpx;margin-left:10rpx;display:flex;justify-content:center;align-items:center}.KeyboardImg.data-v-10964899{width:70rpx;height:70rpx;border-radius:50rpx;display:flex;justify-content:center;align-items:center}.Keyboardpng.data-v-10964899{width:100%;height:100%;border-radius:50rpx}.MicrophoneImg.data-v-10964899{margin-top:5rpx;width:53rpx;height:53rpx;border:4rpx solid #424242;border-radius:50rpx;display:flex;justify-content:center;align-items:center}.Microphonepng.data-v-10964899{width:80%;height:80%;border-radius:50rpx}.textareacomponent.data-v-10964899{width:570rpx;height:auto}.input.data-v-10964899{width:95%;background-color:#fff;min-height:60rpx;max-height:200rpx;border-radius:10rpx;padding:10rpx;overflow-wrap:break-word;margin-left:30rpx}.VoiceInput.data-v-10964899{width:95%;background-color:#fff;height:60rpx;border-radius:10rpx;padding:10rpx;overflow-wrap:break-word;margin-left:30rpx;line-height:60rpx;text-align:center;color:#000}.sendComponent.data-v-10964899{margin-left:40rpx}.send.data-v-10964899{width:100rpx;height:75rpx;background-color:#539c00;border-radius:10rpx;color:#fff;font-size:20rpx;text-align:center;line-height:75rpx}.MoreImg.data-v-10964899{margin-left:20rpx;height:80rpx;width:80rpx;margin-bottom:-10rpx;border-radius:50rpx}.MoreComponent.data-v-10964899{position:fixed;left:0;right:0;height:650rpx;transition:bottom .25s ease;background-color:#fff}.Morecontent.data-v-10964899{width:100%;height:100%;display:flex;align-content:baseline;flex-wrap:wrap}.MoreList.data-v-10964899{width:150rpx;height:150rpx;background-color:#f1f1f1;border-radius:20rpx;margin:18.75rpx}.MoreItem.data-v-10964899{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.Moreicon.data-v-10964899{width:80rpx;height:80rpx}.popUpInvitation.data-v-10964899{position:fixed;left:0;right:0;bottom:0;transition:top .25s ease;z-index:1000}.popUpVoice.data-v-10964899{position:fixed;left:0;right:0;bottom:0;z-index:1000;background-color:rgba(139,139,139,.843)}.popUpInvitationContent.data-v-10964899{position:absolute;left:0;right:0;height:1000rpx;transition:bottom .25s ease;background-color:#fff;border-top-left-radius:40rpx;border-top-right-radius:40rpx}.popUpvoiceContent.data-v-10964899{position:absolute;left:0;right:0;height:1000rpx}.gifModule.data-v-10964899{padding:20rpx;border-radius:20rpx;overflow:hidden;height:120rpx;background-color:#232123}.voiceCenter.data-v-10964899{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}.video-player.data-v-10964899{width:300rpx;height:300rpx;border-radius:20rpx;margin-top:-94rpx}.CancelModule.data-v-10964899{width:95%;height:100rpx;text-align:center;line-height:100rpx;background-color:rgba(0,0,0,.663);font-size:30rpx;color:#999;border-radius:50rpx;margin-top:500rpx}.btnModule.data-v-10964899{width:100%;height:200rpx;background-color:#000;color:#999;font-size:30rpx;text-align:center;line-height:200rpx;border-top-left-radius:50%;border-top-right-radius:50%} diff --git a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.js b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.js index 5177dd4..fd13272 100644 --- a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.js +++ b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),t=require("../../components/formatDate.js"),i=require("../../components/TimeFormatting.js"),n=require("../../components/request.js"),s={data:()=>({item:{},id:0,InvitingPartyEventID:null,list:[],selectedId:null,InvitingPartyEventindex:null,chatInfo:{},currentConversation:null,inid:null,chatPartnerinfo:{},style:{backgroundColor:"#ffffff"}}),onShareAppMessage(e){if("menu"===e.from)return{title:"分享",path:`${getCurrentPages()[getCurrentPages().length-1].route}?inid=${this.item.id}`}},onLoad(t){this.inid=t.inid,this.inid&&this.GetonShareAppMessagedata();this.getOpenerEventChannel().on("itemDetail",(e=>{this.item=e.item,n.request({url:"user/getUserInfo",method:"POST",data:{id:e.item.senderId},userInfo:!0}).then((e=>{200===e.code&&(this.chatPartnerinfo=e.data)}))})),e.index.getStorage({key:"userinfo",success:e=>{this.id=e.data.id}}),e.index.getStorage({key:"chatInfo",success:e=>{this.chatInfo=e.data}})},methods:{GetonShareAppMessagedata(){n.request({url:"pk/pkInfoDetail",method:"POST",data:{id:this.inid,userId:this.id,from:1},userInfo:!0}).then((t=>{200===t.code?this.item=t.data:e.index.showToast({title:t.msg,icon:"none",duration:2e3})}))},formatDate:t.formatDate,TimeFormatting:i.TimeFormatting,Select(e,t){this.selectedId===e?(this.selectedId=null,this.InvitingPartyEventID=null,this.InvitingPartyEventindex=null):(this.selectedId=this.selectedId===e?null:e,this.InvitingPartyEventID=e,this.InvitingPartyEventindex=t)},Returnfunc(){e.index.navigateBack({delta:1,fail:()=>{e.index.reLaunch({url:"/pages/Home/Home"})}})},open(){this.$refs.popup.open("center"),this.userlist()},invite(){null!==this.InvitingPartyEventindex?this.$refs.popups.open("center"):e.index.showToast({title:"请选择您要参与的PK信息",icon:"none",duration:2e3})},closeHint(){this.$refs.popups.close()},inviteHint(){this.$refs.popups.close();const t=JSON.stringify(this.list[this.InvitingPartyEventindex]),i=JSON.stringify(this.item);e.index.redirectTo({url:`/pages/index/chat/chat?userId=${this.chatPartnerinfo.id}&nickname=${this.chatPartnerinfo.nickName}&avatar=${this.chatPartnerinfo.headerIcon}&myitem=${t}&youritem=${i}&type=pk`})},close(){this.$refs.popup.close()},openChat(){e.wx$1.navigateTo({url:`/pages/index/chat/chat?userId=${this.chatPartnerinfo.id}&nickname=${this.chatPartnerinfo.nickName}&avatar=${this.chatPartnerinfo.headerIcon}`})},async userlist(){e.index.showLoading({title:"加载中...",mask:!0});const t=await n.request({url:"pk/queryMyCanUsePkData",method:"POST",data:{userId:this.id},userInfo:!0});200===t.code?0!==t.data.length?(e.index.hideLoading(),this.list=t.data):(e.index.hideLoading(),setTimeout((()=>{this.openPopupQuantity(),this.$refs.popup.close()}),2e3)):(e.index.hideLoading(),e.index.showToast({title:"加载失败",icon:"none",duration:2e3}))},openPopupQuantity(){this.$refs.createModule.open()}},components:{NewAddedPk:()=>"../NewAddedPk/NewAddedPk2.js"}};if(!Array){(e.resolveComponent("uni-easyinput")+e.resolveComponent("uni-popup")+e.resolveComponent("NewAddedPk"))()}Math||((()=>"../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"../../uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const o=e._export_sfc(s,[["render",function(t,i,n,s,o,a){return e.e({a:e.o(((...e)=>a.Returnfunc&&a.Returnfunc(...e))),b:o.item.anchorIcon,c:e.t(o.item.disPlayId),d:"1"===o.item.sex},(o.item.sex,{}),{e:e.t(o.item.country),f:e.t(a.formatDate(o.item.pkTime)),g:e.t(o.item.coin),h:e.t(o.item.pkNumber),i:e.s(o.style),j:e.o((e=>o.item.remark=e)),k:e.p({type:"textarea",placeholder:"备注",maxlength:"-1",disabled:"true",modelValue:o.item.remark}),l:o.item.senderId!==o.id},o.item.senderId!==o.id?{m:e.o((e=>a.openChat())),n:e.o((e=>a.open()))}:{},{o:0!==o.list.length},0!==o.list.length?{p:e.f(o.list,((t,i,n)=>({a:t.anchorIcon,b:e.t(t.anchorId),c:e.t(a.TimeFormatting(t.pkTime)),d:e.t(t.coin),e:e.o((e=>a.Select(t.id,i)),i),f:o.selectedId===t.id?"#b8ff8c74":"#ffffff",g:i})))}:{},{q:0===o.list.length},(o.list.length,{}),{r:e.o((e=>a.invite())),s:e.o((e=>a.close())),t:e.sr("popup","f4d8645a-1"),v:e.p({type:"center","border-radius":"10px 10px 0 0"}),w:e.sr("createModule","f4d8645a-2"),x:e.o((e=>a.inviteHint())),y:e.o((e=>a.closeHint())),z:e.sr("popups","f4d8645a-3"),A:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-f4d8645a"]]);s.__runtimeHooks=2,wx.createPage(o); +"use strict";const e=require("../../common/vendor.js"),t=require("../../components/formatDate.js"),i=require("../../components/TimeFormatting.js"),n=require("../../components/request.js"),s={data:()=>({item:{},id:0,InvitingPartyEventID:null,list:[],selectedId:null,InvitingPartyEventindex:null,chatInfo:{},currentConversation:null,inid:null,chatPartnerinfo:{}}),onShareAppMessage(e){if("menu"===e.from)return{title:"分享",path:`${getCurrentPages()[getCurrentPages().length-1].route}?inid=${this.item.id}`}},onLoad(t){this.inid=t.inid,this.inid&&this.GetonShareAppMessagedata();this.getOpenerEventChannel().on("itemDetail",(e=>{this.item=e.item,n.request({url:"user/getUserInfo",method:"POST",data:{id:e.item.senderId},userInfo:!0}).then((e=>{200===e.code&&(this.chatPartnerinfo=e.data)}))})),e.index.getStorage({key:"userinfo",success:e=>{this.id=e.data.id}}),e.index.getStorage({key:"chatInfo",success:e=>{this.chatInfo=e.data}})},methods:{GetonShareAppMessagedata(){n.request({url:"pk/pkInfoDetail",method:"POST",data:{id:this.inid,userId:this.id,from:1},userInfo:!0}).then((t=>{200===t.code?this.item=t.data:e.index.showToast({title:t.msg,icon:"none",duration:2e3})}))},formatDate:t.formatDate,TimeFormatting:i.TimeFormatting,Select(e,t){this.selectedId===e?(this.selectedId=null,this.InvitingPartyEventID=null,this.InvitingPartyEventindex=null):(this.selectedId=this.selectedId===e?null:e,this.InvitingPartyEventID=e,this.InvitingPartyEventindex=t)},Returnfunc(){e.index.navigateBack({delta:1,fail:()=>{e.index.reLaunch({url:"/pages/Home/Home"})}})},open(){this.$refs.popup.open("center"),this.userlist()},invite(){null!==this.InvitingPartyEventindex?this.$refs.popups.open("center"):e.index.showToast({title:"请选择您要参与的PK信息",icon:"none",duration:2e3})},closeHint(){this.$refs.popups.close()},inviteHint(){this.$refs.popups.close();const t=JSON.stringify(this.list[this.InvitingPartyEventindex]),i=JSON.stringify(this.item);e.index.redirectTo({url:`/pages/index/chat/chat?userId=${this.chatPartnerinfo.id}&nickname=${this.chatPartnerinfo.nickName}&avatar=${this.chatPartnerinfo.headerIcon}&myitem=${t}&youritem=${i}&type=pk`})},close(){this.$refs.popup.close()},openChat(){e.wx$1.navigateTo({url:`/pages/index/chat/chat?userId=${this.chatPartnerinfo.id}&nickname=${this.chatPartnerinfo.nickName}&avatar=${this.chatPartnerinfo.headerIcon}`})},async userlist(){e.index.showLoading({title:"加载中...",mask:!0});const t=await n.request({url:"pk/queryMyCanUsePkData",method:"POST",data:{userId:this.id},userInfo:!0});200===t.code?0!==t.data.length?(e.index.hideLoading(),this.list=t.data):(e.index.hideLoading(),setTimeout((()=>{this.openPopupQuantity(),this.$refs.popup.close()}),2e3)):(e.index.hideLoading(),e.index.showToast({title:"加载失败",icon:"none",duration:2e3}))},openPopupQuantity(){this.$refs.createModule.open()}},components:{NewAddedPk:()=>"../NewAddedPk/NewAddedPk2.js"}};if(!Array){(e.resolveComponent("uni-popup")+e.resolveComponent("NewAddedPk"))()}Math;const o=e._export_sfc(s,[["render",function(t,i,n,s,o,a){return e.e({a:e.o(((...e)=>a.Returnfunc&&a.Returnfunc(...e))),b:o.item.anchorIcon,c:e.t(o.item.disPlayId),d:"1"===o.item.sex},(o.item.sex,{}),{e:e.t(o.item.country),f:e.t(a.formatDate(o.item.pkTime)),g:e.t(o.item.coin),h:e.t(o.item.pkNumber),i:e.t(o.item.remark),j:o.item.senderId!==o.id},o.item.senderId!==o.id?{k:e.o((e=>a.openChat())),l:e.o((e=>a.open()))}:{},{m:0!==o.list.length},0!==o.list.length?{n:e.f(o.list,((t,i,n)=>({a:t.anchorIcon,b:e.t(t.anchorId),c:e.t(a.TimeFormatting(1e3*t.pkTime)),d:e.t(t.coin),e:e.o((e=>a.Select(t.id,i)),i),f:o.selectedId===t.id?"#b8ff8c74":"#ffffff",g:i})))}:{},{o:0===o.list.length},(o.list.length,{}),{p:e.o((e=>a.invite())),q:e.o((e=>a.close())),r:e.sr("popup","1ffdb2fe-0"),s:e.p({type:"center","border-radius":"10px 10px 0 0"}),t:e.sr("createModule","1ffdb2fe-1"),v:e.o((e=>a.inviteHint())),w:e.o((e=>a.closeHint())),x:e.sr("popups","1ffdb2fe-2"),y:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-1ffdb2fe"]]);s.__runtimeHooks=2,wx.createPage(o); diff --git a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.json b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.json index 0f25382..a5b456c 100644 --- a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.json +++ b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.json @@ -2,7 +2,6 @@ "navigationBarTitleText": "PK详情", "usingComponents": { "new-added-pk": "../NewAddedPk/NewAddedPk", - "uni-easyinput": "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput", "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup" } } \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxml b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxml index 28b8219..a5deaa0 100644 --- a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxml +++ b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxml @@ -1 +1 @@ -{{c}}{{e}}PK时间:{{f}}{{g}}K金币{{h}}PK场数点击选择您要参与的主播{{item.b}}{{item.c}}{{item.d}}K您还没有可参与的主播PK,快去新建一个吧!提示邀请成功后的pk不可修改,不可删除,请谨慎操作! \ No newline at end of file +{{c}}{{e}}PK时间:{{f}}{{g}}K金币{{h}}PK场数{{i}}点击选择您要参与的主播{{item.b}}{{item.c}}{{item.d}}K您还没有可参与的主播PK,快去新建一个吧!提示邀请成功后的pk不可修改,不可删除,请谨慎操作! \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxss b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxss index 5461622..fd9a329 100644 --- a/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxss +++ b/unpackage/dist/build/mp-weixin/pages/pkDetail/pkDetail.wxss @@ -1 +1 @@ -.popup-content.data-v-f4d8645a{width:600rpx;height:700rpx;background-repeat:no-repeat;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center}.popup-Hintcontent.data-v-f4d8645a{width:600rpx;height:500rpx;background-repeat:no-repeat;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center}.popup-title.data-v-f4d8645a{font-size:30rpx;margin-top:50rpx;text-align:center}.popup-btn.data-v-f4d8645a{display:flex;justify-content:space-around;margin-top:50rpx}.invite.data-v-f4d8645a{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde)}.cancel.data-v-f4d8645a{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;margin-left:30rpx;color:#03aba8;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;border:1rpx solid #03aba8}.scroll.data-v-f4d8645a{width:500rpx;height:400rpx;border-radius:10px}.scroll.data-v-f4d8645a ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.popup-text.data-v-f4d8645a{color:#161616;font-size:36.26rpx;font-weight:700;margin-bottom:30rpx}.popup-texts.data-v-f4d8645a{margin:70rpx 50rpx;color:#7e7e7e;font-size:26rpx}.card-content.data-v-f4d8645a{width:100%;height:100rpx;background-color:#fff;border-radius:10rpx;display:flex;align-items:center;font-size:28rpx;color:#7f7f7f;margin-top:20rpx}.createModule.data-v-f4d8645a{position:fixed;bottom:0;right:0;z-index:998;width:100vw}.Avatarimg.data-v-f4d8645a{width:90rpx;height:90rpx;border-radius:50%;background-color:#ddd;margin-right:20rpx;margin-left:20rpx}.avatar.data-v-f4d8645a{width:100%;height:100%;border-radius:50%}.TimeMoney.data-v-f4d8645a{width:300rpx;display:flex;font-weight:700;font-size:27rpx;color:#161616}.goldnb.data-v-f4d8645a{display:flex;margin-left:5rpx}.TimeMoney_Time.data-v-f4d8645a{display:flex;align-items:center;margin-top:10rpx}.pkTimeimg.data-v-f4d8645a{width:31.49rpx;height:31.49rpx;margin-right:10rpx}.goldimg.data-v-f4d8645a{width:31.49rpx;height:35rpx;margin-left:40rpx}.NameMoney.data-v-f4d8645a{display:flex;flex-direction:column}.NameMoney_Name.data-v-f4d8645a{width:400rpx;text-align:left;font-weight:700;font-size:27rpx;color:#161616;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.background.data-v-f4d8645a{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.Navigation.data-v-f4d8645a{position:fixed;top:0;left:0;right:0;height:200rpx;display:flex;align-items:center;padding:0 60rpx;z-index:1}.Return.data-v-f4d8645a{width:60rpx;height:60rpx;margin-top:20rpx}.Content.data-v-f4d8645a{position:absolute;top:200rpx;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center}.sender.data-v-f4d8645a{width:100%;display:flex;flex-direction:column;align-items:center;margin-top:80rpx}.sengderIcon.data-v-f4d8645a{width:150rpx;height:150rpx;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center}.Icon.data-v-f4d8645a{width:100%;height:100%;border-radius:50%}.Individual.data-v-f4d8645a{display:flex;justify-content:center;align-items:center;margin-top:34.35rpx}.name.data-v-f4d8645a{font-size:30.53rpx;color:#161616;margin-right:16.22rpx}.nation.data-v-f4d8645a{height:29.58rpx;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:17.18rpx;color:#666;text-align:center;line-height:29.58rpx;background-color:#fff;border-radius:50rpx;padding:6rpx 12rpx;display:flex;justify-content:center;align-items:center}.male.data-v-f4d8645a{width:56.3rpx;height:29.58rpx;background-color:#5bced1;border-radius:50rpx;display:flex;justify-content:center;align-items:center;padding:6rpx 12rpx;margin-right:12rpx}.female.data-v-f4d8645a{width:56.3rpx;height:29.58rpx;background-color:#f3876f;border-radius:50rpx;display:flex;justify-content:center;align-items:center;padding:6rpx 12rpx;margin-right:12rpx}.age.data-v-f4d8645a{font-size:17.18rpx;color:#fff;margin-left:4rpx}.Time.data-v-f4d8645a{color:#666;font-size:26.72rpx;margin-top:48.7rpx}.goldCoin.data-v-f4d8645a{background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Backgroundofgoldcoins.png);width:334.83rpx;height:124.05rpx;margin-right:21rpx;display:flex;align-items:center}.Session.data-v-f4d8645a{background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Fieldnumberbackground.png);width:334.83rpx;height:124.05rpx;display:flex;align-items:center}.SessionAndGoldCoin.data-v-f4d8645a{align-items:center;margin-top:60rpx;display:flex;justify-content:center}.goldtext.data-v-f4d8645a{font-size:28.63rpx;color:#929292}.goldnumber.data-v-f4d8645a{font-size:34.35rpx;color:#161616;font-weight:700}.goldcard.data-v-f4d8645a{display:flex;flex-direction:column;align-items:center}.remark.data-v-f4d8645a{margin-top:60rpx;width:90%}.button.data-v-f4d8645a{display:flex;justify-content:center;align-items:center;margin-top:500rpx}.accept.data-v-f4d8645a{width:325.38rpx;height:77.29rpx;margin-right:35.5rpx;border-radius:50rpx;background-color:#fff;border:1rpx solid #03aba8;color:#03aba8;font-size:28.63rpx;line-height:77.29rpx}.reject.data-v-f4d8645a{width:325.38rpx;height:77.29rpx;border-radius:50rpx;background-color:#03aba8;border:1rpx solid #03aba8;color:#fff;font-size:28.63rpx;line-height:77.29rpx}.noData.data-v-f4d8645a{width:500rpx;height:400rpx;border-radius:10px;font-size:30rpx;color:#999} +.popup-content.data-v-1ffdb2fe{width:600rpx;height:700rpx;background-repeat:no-repeat;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center}.popup-Hintcontent.data-v-1ffdb2fe{width:600rpx;height:500rpx;background-repeat:no-repeat;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);background-position:center}.popup-title.data-v-1ffdb2fe{font-size:30rpx;margin-top:50rpx;text-align:center}.popup-btn.data-v-1ffdb2fe{display:flex;justify-content:space-around;margin-top:50rpx}.invite.data-v-1ffdb2fe{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;background-image:linear-gradient(135deg,#4fcacd,#5fdbde)}.cancel.data-v-1ffdb2fe{width:225.19rpx;height:78.24rpx;font-size:28.63rpx;line-height:80rpx;margin-left:30rpx;color:#03aba8;border-top-left-radius:50rpx;border-bottom-left-radius:50rpx;border-bottom-right-radius:50rpx;border:1rpx solid #03aba8}.scroll.data-v-1ffdb2fe{width:500rpx;height:400rpx;border-radius:10px}.scroll.data-v-1ffdb2fe ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.popup-text.data-v-1ffdb2fe{color:#161616;font-size:36.26rpx;font-weight:700;margin-bottom:30rpx}.popup-texts.data-v-1ffdb2fe{margin:70rpx 50rpx;color:#7e7e7e;font-size:26rpx}.card-content.data-v-1ffdb2fe{width:100%;height:100rpx;background-color:#fff;border-radius:10rpx;display:flex;align-items:center;font-size:28rpx;color:#7f7f7f;margin-top:20rpx}.createModule.data-v-1ffdb2fe{position:fixed;bottom:0;right:0;z-index:998;width:100vw}.Avatarimg.data-v-1ffdb2fe{width:90rpx;height:90rpx;border-radius:50%;background-color:#ddd;margin-right:20rpx;margin-left:20rpx}.avatar.data-v-1ffdb2fe{width:100%;height:100%;border-radius:50%}.TimeMoney.data-v-1ffdb2fe{width:300rpx;display:flex;font-weight:700;font-size:27rpx;color:#161616}.goldnb.data-v-1ffdb2fe{display:flex;margin-left:5rpx}.TimeMoney_Time.data-v-1ffdb2fe{display:flex;align-items:center;margin-top:10rpx}.pkTimeimg.data-v-1ffdb2fe{width:31.49rpx;height:31.49rpx;margin-right:10rpx}.goldimg.data-v-1ffdb2fe{width:31.49rpx;height:35rpx;margin-left:40rpx}.NameMoney.data-v-1ffdb2fe{display:flex;flex-direction:column}.NameMoney_Name.data-v-1ffdb2fe{width:400rpx;text-align:left;font-weight:700;font-size:27rpx;color:#161616;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.background.data-v-1ffdb2fe{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.Navigation.data-v-1ffdb2fe{position:fixed;top:0;left:0;right:0;height:200rpx;display:flex;align-items:center;padding:0 60rpx;z-index:1}.Return.data-v-1ffdb2fe{width:60rpx;height:60rpx;margin-top:20rpx}.Content.data-v-1ffdb2fe{position:absolute;top:200rpx;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center}.sender.data-v-1ffdb2fe{width:100%;display:flex;flex-direction:column;align-items:center;margin-top:80rpx}.sengderIcon.data-v-1ffdb2fe{width:150rpx;height:150rpx;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center}.Icon.data-v-1ffdb2fe{width:100%;height:100%;border-radius:50%}.Individual.data-v-1ffdb2fe{display:flex;justify-content:center;align-items:center;margin-top:34.35rpx}.name.data-v-1ffdb2fe{font-size:30.53rpx;color:#161616;margin-right:16.22rpx}.nation.data-v-1ffdb2fe{height:29.58rpx;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:17.18rpx;color:#666;text-align:center;line-height:29.58rpx;background-color:#fff;border-radius:50rpx;padding:6rpx 12rpx;display:flex;justify-content:center;align-items:center}.male.data-v-1ffdb2fe{width:56.3rpx;height:29.58rpx;background-color:#5bced1;border-radius:50rpx;display:flex;justify-content:center;align-items:center;padding:6rpx 12rpx;margin-right:12rpx}.female.data-v-1ffdb2fe{width:56.3rpx;height:29.58rpx;background-color:#f3876f;border-radius:50rpx;display:flex;justify-content:center;align-items:center;padding:6rpx 12rpx;margin-right:12rpx}.age.data-v-1ffdb2fe{font-size:17.18rpx;color:#fff;margin-left:4rpx}.Time.data-v-1ffdb2fe{color:#666;font-size:26.72rpx;margin-top:48.7rpx}.goldCoin.data-v-1ffdb2fe{background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Backgroundofgoldcoins.png);width:334.83rpx;height:124.05rpx;margin-right:21rpx;display:flex;align-items:center}.Session.data-v-1ffdb2fe{background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Fieldnumberbackground.png);width:334.83rpx;height:124.05rpx;display:flex;align-items:center}.SessionAndGoldCoin.data-v-1ffdb2fe{align-items:center;margin-top:60rpx;display:flex;justify-content:center}.goldtext.data-v-1ffdb2fe{font-size:28.63rpx;color:#929292}.goldnumber.data-v-1ffdb2fe{font-size:34.35rpx;color:#161616;font-weight:700}.goldcard.data-v-1ffdb2fe{display:flex;flex-direction:column;align-items:center}.remark.data-v-1ffdb2fe{margin-top:60rpx;width:90%}.Remarkscroll.data-v-1ffdb2fe{width:100%;height:300rpx}.Remarkscroll.data-v-1ffdb2fe ::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.Remarkscss.data-v-1ffdb2fe{padding:20rpx;word-break:break-all;white-space:pre-line;width:100%;font-size:28rpx}.buttonflex.data-v-1ffdb2fe{position:fixed;left:0;right:0;bottom:40rpx}.button.data-v-1ffdb2fe{display:flex;justify-content:center;align-items:center}.accept.data-v-1ffdb2fe{width:325.38rpx;height:77.29rpx;margin-right:35.5rpx;border-radius:50rpx;background-color:#fff;border:1rpx solid #03aba8;color:#03aba8;font-size:28.63rpx;line-height:77.29rpx}.reject.data-v-1ffdb2fe{width:325.38rpx;height:77.29rpx;border-radius:50rpx;background-color:#03aba8;border:1rpx solid #03aba8;color:#fff;font-size:28.63rpx;line-height:77.29rpx}.noData.data-v-1ffdb2fe{width:500rpx;height:400rpx;border-radius:10px;font-size:30rpx;color:#999} diff --git a/unpackage/dist/build/mp-weixin/recompose.js b/unpackage/dist/build/mp-weixin/recompose.js index 5e3577f..9f2d8c4 100644 --- a/unpackage/dist/build/mp-weixin/recompose.js +++ b/unpackage/dist/build/mp-weixin/recompose.js @@ -1 +1 @@ -"use strict";const e=require("./common/vendor.js"),n=require("./components/NationalDictionary.js"),t=require("./components/request.js"),i=require("./components/formatDate.js"),s={data:()=>({genders:"",Gender:[{label:"男",value:1},{label:"女",value:2}],Country:n.optionsArray,countrys:"",nameAnchor:"",numberCoins:"",session:"",remarks:"",Display:!1,Hint:!1,datetimesingle:"",id:"",sendingTime:"",filterable:!0,AnchorList:[],selectedId:null,selectedIddata:null,AnchorProfilePicture:"",senderId:""}),props:{message:{type:Object}},watch:{message(e,n){this.numberCoins=e.coin,this.session=e.pkNumber,this.remarks=e.remark,this.datetimesingle=i.formatDate(e.pkTime),this.id=e.id,this.nameAnchor=e.anchorId,this.countrys=e.country,this.genders="1"===e.sex?1:2,this.AnchorProfilePicture=e.anchorIcon.split("/").pop(),this.senderId=e.senderId}},methods:{close(){this.$refs.popup.close()},invite(){this.selectedId?(this.nameAnchor=this.selectedIddata.anchorId,this.AnchorProfilePicture=this.selectedIddata.headerIcon,this.genders=this.selectedIddata.gender,this.countrys=this.selectedIddata.country,this.close()):e.index.showToast({title:"请选择主播",icon:"none",duration:2e3})},Select(e,n){this.selectedId!==e?(this.selectedId=e,this.selectedIddata=n):(this.selectedId=null,this.selectedIddata=null)},getAnchorList(){t.request({url:"anchor/list",method:"POST",data:{id:this.id},userInfo:!0}).then((e=>{this.triggered=!1,200==e.code?this.AnchorList=e.data:console.log(e.msg)}))},chooseMyStreamer(){this.$refs.popup.open("center"),this.getAnchorList()},gender(e){this.genders=e.value},country(e){this.countrys=e.value},open(){this.Display?(this.Display=!1,this.Hint=!1):this.Display=!0},blur(n){this.nameAnchor!==n.target.value&&(this.nameAnchor=n.target.value,e.index.showLoading({title:"正在验证主播",mask:!0}),e.index.request({url:"https://python.yolojt.com/api/"+this.nameAnchor,success:n=>{200===n.data.code?(e.index.hideLoading(),e.index.showToast({title:"查询成功",icon:"none",duration:3e3}),this.AnchorProfilePicture=n.data.data):(e.index.hideLoading(),e.index.showToast({title:"未查询到该主播",icon:"none",duration:3e3}))},fail:function(n){e.index.hideLoading(),e.index.showToast({title:"网络请求失败",icon:"none",duration:3e3})}}))},async Publish(){if(""==this.nameAnchor&&null==this.nameAnchor||0==this.genders&&null==this.genders||""==this.numberCoins&&null==this.numberCoins||""==this.datetimesingle&&null==this.datetimesingle||""==this.countrys&&null==his.countrys||""==this.datetimesingle&&null==this.datetimesingle||""==this.session&&null==this.session)return void(this.Hint=!0);if(this.remarks.includes(this.nameAnchor))return void e.index.showToast({title:"备注中不能包含主播昵称",icon:"none",duration:2e3});const n=this.datetimesingle.replace(" ","T"),i=Date.parse(n);if(isNaN(i))throw new Error(`Invalid date format: ${this.datetimesingle}`);this.sendingTime=Math.floor(i/1e3);const s=Math.floor(Date.now()/1e3);if(this.sendingTime"./uni_modules/wht-select/components/wht-select/wht-select.js")+(()=>"./uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js")+(()=>"./uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js")+(()=>"./uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"./uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const o=e._export_sfc(s,[["render",function(n,t,i,s,o,r){return e.e({a:o.Display},o.Display?e.e({b:e.o((e=>r.open())),c:e.o(((...e)=>n.NameAnchor&&n.NameAnchor(...e))),d:e.o(((...e)=>r.blur&&r.blur(...e))),e:o.nameAnchor,f:""===o.nameAnchor&&!0===o.Hint},(""===o.nameAnchor&&o.Hint,{}),{g:e.o(((...e)=>r.chooseMyStreamer&&r.chooseMyStreamer(...e))),h:e.o(r.country),i:e.o(r.blur),j:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Country,filterable:o.filterable,placeholder:"请选择国家",value:o.countrys}),k:""===o.countrys||null===o.countrys&&!0===o.Hint},(""===o.countrys||null===o.countrys&&o.Hint,{}),{l:e.o(r.gender),m:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Gender,placeholder:"性别",value:o.genders}),n:0===o.genders},(o.genders,{}),{o:1===o.genders},(o.genders,{}),{p:2===o.genders},(o.genders,{}),{q:0===o.genders||null===o.genders&&!0===o.Hint},(0===o.genders||null===o.genders&&o.Hint,{}),{r:e.o((e=>o.numberCoins=e)),s:e.p({max:9999999999,background:"#03ABA8",modelValue:o.numberCoins}),t:""===o.numberCoins||null===o.numberCoins&&!0===o.Hint},(""===o.numberCoins||null===o.numberCoins&&o.Hint,{}),{v:e.o((e=>o.datetimesingle=e)),w:e.p({type:"datetime","hide-second":"true",modelValue:o.datetimesingle}),x:""===o.datetimesingle||null===o.datetimesingle&&!0===o.Hint},(""===o.datetimesingle||null===o.datetimesingle&&o.Hint,{}),{y:e.o((e=>o.session=e)),z:e.p({background:"#03ABA8",modelValue:o.session}),A:""===o.session||null===o.session&&!0===o.Hint},(""===o.session||null===o.session&&o.Hint,{}),{B:e.o((e=>o.remarks=e)),C:e.p({type:"textarea",placeholder:"备注",modelValue:o.remarks}),D:e.o((e=>r.Publish())),E:e.o((()=>{})),F:e.n(o.Display?"create-module":"close-animation "),G:e.o((e=>r.open()))}):{},{H:0!==o.AnchorList.length},0!==o.AnchorList.length?{I:e.f(o.AnchorList,((n,t,i)=>({a:n.headerIcon,b:e.t(n.anchorId),c:e.t(n.country),d:e.o((e=>r.Select(n.id,n)),t),e:o.selectedId===n.id?"#b8ff8c74":"#ffffff",f:t})))}:{},{J:0===o.AnchorList.length},(o.AnchorList.length,{}),{K:e.o((e=>r.invite())),L:e.o((e=>r.close())),M:e.sr("popup","a01de091-6"),N:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-a01de091"]]);exports.MiniProgramPage=o; +"use strict";const e=require("./common/vendor.js"),n=require("./components/NationalDictionary.js"),t=require("./components/request.js"),i=require("./components/formatDate.js"),s={data:()=>({genders:"",Gender:[{label:"男",value:1},{label:"女",value:2}],Country:n.optionsArray,countrys:"",nameAnchor:"",numberCoins:"",session:"",remarks:"",Display:!1,Hint:!1,datetimesingle:"",id:"",sendingTime:"",filterable:!0,AnchorList:[],selectedId:null,selectedIddata:null,AnchorProfilePicture:"",senderId:""}),props:{message:{type:Object}},watch:{message(e,n){this.numberCoins=e.coin,this.session=e.pkNumber,this.remarks=e.remark,this.datetimesingle=i.formatDate(e.pkTime),this.id=e.id,this.nameAnchor=e.anchorId,this.countrys=e.country,this.genders="1"===e.sex?1:2,this.AnchorProfilePicture=e.anchorIcon.split("/").pop(),this.senderId=e.senderId}},methods:{close(){this.$refs.popup.close()},invite(){this.selectedId?(this.nameAnchor=this.selectedIddata.anchorId,this.AnchorProfilePicture=this.selectedIddata.headerIcon,this.genders=this.selectedIddata.gender,this.countrys=this.selectedIddata.country,this.close()):e.index.showToast({title:"请选择主播",icon:"none",duration:2e3})},Select(e,n){this.selectedId!==e?(this.selectedId=e,this.selectedIddata=n):(this.selectedId=null,this.selectedIddata=null)},getAnchorList(){t.request({url:"anchor/list",method:"POST",data:{id:this.id},userInfo:!0}).then((e=>{this.triggered=!1,200==e.code?this.AnchorList=e.data:console.log(e.msg)}))},chooseMyStreamer(){this.$refs.popup.open("center"),this.getAnchorList()},gender(e){this.genders=e.value},country(e){this.countrys=e.value},open(){this.Display?(this.Display=!1,this.Hint=!1):this.Display=!0},blur(n){this.nameAnchor!==n.target.value&&(this.nameAnchor=n.target.value,e.index.showLoading({title:"正在验证主播",mask:!0}),e.index.request({url:"https://python.yolojt.com/api/"+this.nameAnchor,success:n=>{200===n.data.code?(e.index.hideLoading(),e.index.showToast({title:"查询成功",icon:"none",duration:3e3}),this.AnchorProfilePicture=n.data.data):(e.index.hideLoading(),e.index.showToast({title:"未查询到该主播",icon:"none",duration:3e3}))},fail:function(n){e.index.hideLoading(),e.index.showToast({title:"网络请求失败",icon:"none",duration:3e3})}}))},async Publish(){if(""==this.nameAnchor&&null==this.nameAnchor||0==this.genders&&null==this.genders||""==this.numberCoins&&null==this.numberCoins||""==this.datetimesingle&&null==this.datetimesingle||""==this.countrys&&null==his.countrys||""==this.datetimesingle&&null==this.datetimesingle||""==this.session&&null==this.session)return void(this.Hint=!0);if(this.remarks.includes(this.nameAnchor))return void e.index.showToast({title:"备注中不能包含主播昵称",icon:"none",duration:2e3});const n=this.datetimesingle.replace(" ","T"),i=Date.parse(n);if(isNaN(i))throw new Error(`Invalid date format: ${this.datetimesingle}`);this.sendingTime=Math.floor(i/1e3);const s=Math.floor(Date.now()/1e3);if(this.sendingTime"./uni_modules/wht-select/components/wht-select/wht-select.js")+(()=>"./uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js")+(()=>"./uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js")+(()=>"./uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"./uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const o=e._export_sfc(s,[["render",function(n,t,i,s,o,r){return e.e({a:o.Display},o.Display?e.e({b:e.o((e=>r.open())),c:e.o(((...e)=>n.NameAnchor&&n.NameAnchor(...e))),d:e.o(((...e)=>r.blur&&r.blur(...e))),e:o.nameAnchor,f:""===o.nameAnchor&&!0===o.Hint},(""===o.nameAnchor&&o.Hint,{}),{g:e.o(((...e)=>r.chooseMyStreamer&&r.chooseMyStreamer(...e))),h:e.o(r.country),i:e.o(r.blur),j:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Country,filterable:o.filterable,placeholder:"请选择国家",value:o.countrys}),k:""===o.countrys||null===o.countrys&&!0===o.Hint},(""===o.countrys||null===o.countrys&&o.Hint,{}),{l:e.o(r.gender),m:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:o.Gender,placeholder:"性别",value:o.genders}),n:0===o.genders},(o.genders,{}),{o:1===o.genders},(o.genders,{}),{p:2===o.genders},(o.genders,{}),{q:0===o.genders||null===o.genders&&!0===o.Hint},(0===o.genders||null===o.genders&&o.Hint,{}),{r:e.o((e=>o.numberCoins=e)),s:e.p({max:9999999999,background:"#03ABA8",modelValue:o.numberCoins}),t:""===o.numberCoins||null===o.numberCoins&&!0===o.Hint},(""===o.numberCoins||null===o.numberCoins&&o.Hint,{}),{v:e.o((e=>o.datetimesingle=e)),w:e.p({type:"datetime","hide-second":"true",modelValue:o.datetimesingle}),x:""===o.datetimesingle||null===o.datetimesingle&&!0===o.Hint},(""===o.datetimesingle||null===o.datetimesingle&&o.Hint,{}),{y:e.o((e=>o.session=e)),z:e.p({background:"#03ABA8",modelValue:o.session}),A:""===o.session||null===o.session&&!0===o.Hint},(""===o.session||null===o.session&&o.Hint,{}),{B:e.o((e=>o.remarks=e)),C:e.p({type:"textarea",placeholder:"备注",maxlength:50,modelValue:o.remarks}),D:e.o((e=>r.Publish())),E:e.o((()=>{})),F:e.n(o.Display?"create-module":"close-animation "),G:e.o((e=>r.open()))}):{},{H:0!==o.AnchorList.length},0!==o.AnchorList.length?{I:e.f(o.AnchorList,((n,t,i)=>({a:n.headerIcon,b:e.t(n.anchorId),c:e.t(n.country),d:e.o((e=>r.Select(n.id,n)),t),e:o.selectedId===n.id?"#b8ff8c74":"#ffffff",f:t})))}:{},{J:0===o.AnchorList.length},(o.AnchorList.length,{}),{K:e.o((e=>r.invite())),L:e.o((e=>r.close())),M:e.sr("popup","0aab313b-6"),N:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-0aab313b"]]);exports.MiniProgramPage=o; diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/NewAddedPk.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/NewAddedPk.js.map index 0d790c8..283cc29 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"],"names":["optionsArray","uni","request"],"mappings":";;;;AA2LA,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;AAAA,MACT,SAAS;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA;AAAA,MAChB,IAAI;AAAA;AAAA,MACJ,aAAa;AAAA;AAAA,MACb,YAAY;AAAA;AAAA,MACZ,sBAAsB;AAAA;AAAA,MACtB,YAAY,CAAE;AAAA;AAAA,MACd,YAAY;AAAA;AAAA,MACZ,gBAAgB;AAAA;AAAA;EAEnB;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;AAAA,IAEP,QAAQ;AACN,WAAK,MAAM,MAAM;IAClB;AAAA;AAAA,IAED,SAAQ;AACN,UAAI,KAAK,YAAY;AACnB,aAAK,aAAa,KAAK,eAAe;AACtC,aAAK,uBAAuB,KAAK,eAAe,WAAW,MAAM,GAAG,EAAE;AACtE,aAAK,UAAU,KAAK,eAAe;AACnC,aAAK,WAAW,KAAK,eAAe;AACpC,aAAK,MAAK;AAAA,aACL;AACLA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA;AAAA,IAED,OAAO,IAAI,MAAM;AACf,UAAI,KAAK,eAAe,IAAI;AAC5B,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,aACf;AACL,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,MACxB;AAAA,IACD;AAAA;AAAA,IAED,gBAAgB;AACFC,iCAAQ;AAAA,QAClB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,QACV;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,EAAE,KAAK,CAAC,QAAQ;AACf,aAAK,YAAY;AACjB,YAAI,IAAI,QAAQ,KAAK;AACnB,eAAK,aAAa,IAAI;AAAA,eACjB;AACLD,qFAAY,IAAI,GAAG;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACF;AAAA;AAAA,IAED,mBAAkB;AAChB,WAAK,MAAM,MAAM,KAAK,QAAQ;AAC9B,WAAK,cAAc;AAAA,IACpB;AAAA;AAAA,IAED,OAAO,MAAM;AACX,WAAK,UAAU,KAAK;AAAA,IACrB;AAAA;AAAA,IAED,QAAQ,MAAM;AACZ,WAAK,WAAW,KAAK;AAAA,IACtB;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;AAChB,aAAK,UAAU;AAAA,aACV;AACL,aAAK,UAAU;AAAA,MACjB;AAAA,IACD;AAAA;AAAA,IAED,KAAK,OAAO;AACV,UAAI,KAAK,eAAe,MAAM,OAAO,OAAO;AAC1C,aAAK,aAAa,MAAM,OAAO;AAC/BA,sBAAAA,MAAI,YAAY;AAAA,UACd,OAAO;AAAA,UACP,MAAM;AAAA,QACR,CAAC;AACDA,sBAAAA,MAAI,QAAQ;AAAA,UACV,KAAK,mCAAmC,KAAK;AAAA,UAC7C,SAAS,CAAC,QAAQ;AAChB,gBAAI,IAAI,KAAK,SAAS,KAAK;AACzBA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AACD,mBAAK,uBAAuB,IAAI,KAAK;AAAA,mBAChC;AACLA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AAAA,YACH;AAAA,UACD;AAAA,UACD,MAAM,SAAU,KAAK;AACnBA,0BAAG,MAAC,YAAW;AACfA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,cACN,UAAU;AAAA,YACZ,CAAC;AAAA,UACF;AAAA,QACH,CAAC;AAAA,aACI;AACL;AAAA,MACF;AAAA,IACD;AAAA,IACD,MAAM,UAAU;AAEd,UACE,KAAK,eAAe,MACpB,KAAK,YAAY,KACjB,KAAK,gBAAgB,MACrB,KAAK,aAAa,MAClB,KAAK,mBAAmB,MACxB,KAAK,YAAY,MACjB,KAAK,yBAAyB,IAC9B;AACA,aAAK,OAAO;AACZ;AAAA,MACF;AAEA,UAAI,KAAK,QAAQ,SAAS,KAAK,UAAU,GAAG;AAC1CA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD;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,UAAU,KAAK;AAAA,UACf,YAAY,KAAK;AAAA,UACjB,UAAU,KAAK;AAAA,QAChB;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;AACtB,aAAK,UAAU;AACf,aAAK,uBAAuB;AAC5BD,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD,aAAK,MAAM,gBAAgB;AAAA,aACtB;AACLA,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO,IAAI;AAAA,UACX,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"],"names":["optionsArray","uni","request"],"mappings":";;;;AA2LA,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;AAAA,MACT,SAAS;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA;AAAA,MAChB,IAAI;AAAA;AAAA,MACJ,aAAa;AAAA;AAAA,MACb,YAAY;AAAA;AAAA,MACZ,sBAAsB;AAAA;AAAA,MACtB,YAAY,CAAE;AAAA;AAAA,MACd,YAAY;AAAA;AAAA,MACZ,gBAAgB;AAAA;AAAA;EAEnB;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;AAAA,IAEP,QAAQ;AACN,WAAK,MAAM,MAAM;IAClB;AAAA;AAAA,IAED,SAAQ;AACN,UAAI,KAAK,YAAY;AACnB,aAAK,aAAa,KAAK,eAAe;AACtC,aAAK,uBAAuB,KAAK,eAAe,WAAW,MAAM,GAAG,EAAE;AACtE,aAAK,UAAU,KAAK,eAAe;AACnC,aAAK,WAAW,KAAK,eAAe;AACpC,aAAK,MAAK;AAAA,aACL;AACLA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA;AAAA,IAED,OAAO,IAAI,MAAM;AACf,UAAI,KAAK,eAAe,IAAI;AAC5B,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,aACf;AACL,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,MACxB;AAAA,IACD;AAAA;AAAA,IAED,gBAAgB;AACFC,iCAAQ;AAAA,QAClB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,QACV;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,EAAE,KAAK,CAAC,QAAQ;AACf,aAAK,YAAY;AACjB,YAAI,IAAI,QAAQ,KAAK;AACnB,eAAK,aAAa,IAAI;AAAA,eACjB;AACLD,qFAAY,IAAI,GAAG;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACF;AAAA;AAAA,IAED,mBAAkB;AAChB,WAAK,MAAM,MAAM,KAAK,QAAQ;AAC9B,WAAK,cAAc;AAAA,IACpB;AAAA;AAAA,IAED,OAAO,MAAM;AACX,WAAK,UAAU,KAAK;AAAA,IACrB;AAAA;AAAA,IAED,QAAQ,MAAM;AACZ,WAAK,WAAW,KAAK;AAAA,IACtB;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;AAChB,aAAK,UAAU;AAAA,aACV;AACL,aAAK,UAAU;AAAA,MACjB;AAAA,IACD;AAAA;AAAA,IAED,KAAK,OAAO;AACV,UAAI,KAAK,eAAe,MAAM,OAAO,OAAO;AAC1C,aAAK,aAAa,MAAM,OAAO;AAC/BA,sBAAAA,MAAI,YAAY;AAAA,UACd,OAAO;AAAA,UACP,MAAM;AAAA,QACR,CAAC;AACDA,sBAAAA,MAAI,QAAQ;AAAA,UACV,KAAK,mCAAmC,KAAK;AAAA,UAC7C,SAAS,CAAC,QAAQ;AAChB,gBAAI,IAAI,KAAK,SAAS,KAAK;AACzBA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AACD,mBAAK,uBAAuB,IAAI,KAAK;AAAA,mBAChC;AACLA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AAAA,YACH;AAAA,UACD;AAAA,UACD,MAAM,SAAU,KAAK;AACnBA,0BAAG,MAAC,YAAW;AACfA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,cACN,UAAU;AAAA,YACZ,CAAC;AAAA,UACF;AAAA,QACH,CAAC;AAAA,aACI;AACL;AAAA,MACF;AAAA,IACD;AAAA,IACD,MAAM,UAAU;AAEd,UACE,KAAK,eAAe,MACpB,KAAK,YAAY,KACjB,KAAK,gBAAgB,MACrB,KAAK,aAAa,MAClB,KAAK,mBAAmB,MACxB,KAAK,YAAY,MACjB,KAAK,yBAAyB,IAC9B;AACA,aAAK,OAAO;AACZ;AAAA,MACF;AAEA,UAAI,KAAK,QAAQ,SAAS,KAAK,UAAU,GAAG;AAC1CA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD;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,UAAU,KAAK;AAAA,UACf,YAAY,KAAK;AAAA,UACjB,UAAU,KAAK;AAAA,QAChB;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;AACtB,aAAK,UAAU;AACf,aAAK,uBAAuB;AAC5BD,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD,aAAK,MAAM,gBAAgB;AAAA,aACtB;AACLA,sBAAG,MAAC,YAAW;AACfA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO,IAAI;AAAA,UACX,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/common/vendor.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map index b2ec4cb..de55707 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","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/vue-demi/lib/index.mjs","../../HBuilderX/plugins/uniapp-cli-vite/node_modules/pinia/dist/pinia.mjs","node_modules/goeasy/goeasy.esm.min.js","node_modules/cos-wx-sdk-v5/dist/cos-wx-sdk-v5.min.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/chat-uikit-engine/index.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, makeMap } 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 // custom element\n 'match-media',\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 UVUE_WEB_BUILT_IN_CUSTOM_ELEMENTS = ['match-media'];\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 = [\n 'map',\n 'camera',\n 'live-player',\n 'live-pusher',\n];\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_LAST_PAGE_BACK_PRESS = 'onLastPageBackPress';\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\nconst GLOBALS_ALLOWED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +\n 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +\n 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,' +\n 'uni';\nconst isGloballyAllowed = /*#__PURE__*/ makeMap(GLOBALS_ALLOWED);\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_LAST_PAGE_BACK_PRESS, 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_CUSTOM_ELEMENTS, 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, isGloballyAllowed, 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};\nfunction getComponentInternalInstance(i) {\n return i;\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 // fixed by xxxxxx\n $: getComponentInternalInstance,\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 MiniProgramPage from 'D:/项目/tk-mini-program/pages/Setting/Setting.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","goEasylogout","postFile","generateFileName","request","goEasylogin"],"mappings":";;;;;;AAuBA,MAAK,YAAU;AAAA,EACb,QAAQ,CAAC,SAAS;AAAA,EAClB,OAAO;AACL,WAAO;AAAA,MACL,UAAU;AAAA,MACV,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,MAAM,CAAE;AAAA,MACR,SAAS;AAAA;EAEZ;AAAA,EACD,OAAO,QAAQ;AACbA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,KAAK,IAAI,KAAK;AACnB,aAAK,OAAO,IAAI,KAAK;AACrB,aAAK,WAAW,IAAI,KAAK;AAAA,MAC1B;AAAA,IACH,CAAC;AACDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,UAAU,IAAI;AAAA,MACpB;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,SAAS;AACPA,oBAAAA,MAAI,aAAa;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,IACF;AAAA;AAAA,IAED,UAAU,GAAG;AACX,WAAK,OAAO,EAAE,OAAO;AAAA,IACtB;AAAA;AAAA,IAED,MAAM,SAAS,GAAG;AAChB,YAAM,EAAE,UAAQ,IAAM,EAAE;AACxB,WAAK,WAAW;AAAA,IACjB;AAAA;AAAA,IAED,QAAQ,GAAG;AACTC,8CAAa,KAAK,OAAO;AACzBD,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MACR,CAAC;AAEDE,qCAAS;AAAA,QACP,MAAM,KAAK;AAAA,QACX,MAAMC,4BAAAA,iBAAkB;AAAA,OACzB,EACE,KAAK,CAAC,QAAQ;AACbC,mCAAQ;AAAA,UACN,KAAK;AAAA,UACL,QAAQ;AAAA,UACR,MAAM;AAAA,YACJ,IAAI,KAAK;AAAA,YACT,YAAY,IAAI,MAAM,GAAG,EAAE,IAAK;AAAA,YAChC,UAAU,KAAK;AAAA,YACf,SAAS,KAAK,QAAQ;AAAA,UACvB;AAAA,UACD,UAAU;AAAA,QACZ,CAAC,EAAE,KAAK,CAAC,SAAS;AAChB,cAAI,KAAK,SAAS,KAAK;AACrBJ,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,YACR,CAAC;AACDA,0BAAG,MAAC,eAAe,YAAY,KAAK,KAAK,IAAI;AAC7CK,uCAAW,YAAC,KAAK,SAAQ,OAAO,KAAK,KAAK,KAAK,EAAE,GAAE,KAAK,KAAK,KAAK,YAAW,KAAK,KAAK,KAAK,QAAQ;AACpGL,0BAAG,MAAC,YAAW;AAEfA,0BAAAA,MAAI,aAAa;AAAA,cACf,OAAO;AAAA,YACT,CAAC;AAAA,iBAEI;AACLA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,YACR,CAAC;AAAA,UACH;AAAA,QACF,CAAC;AAAA,OACF,EACA,MAAM,CAAC,QAAQ;AACdA,sBAAAA,uDAAY,GAAG;AAAA,MACjB,CAAC;AAAA,IACJ;AAAA,EACF;AACH;;;;;;;;;;;;;AClHA,GAAG,WAAW,eAAe;"} \ No newline at end of file +{"version":3,"file":"Setting.js","sources":["pages/Setting/Setting.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvU2V0dGluZy9TZXR0aW5nLnZ1ZQ"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Setting/Setting.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","goEasylogout","request","goEasylogin","postFile","generateFileName"],"mappings":";;;;;;AAuBA,MAAK,YAAU;AAAA,EACb,QAAQ,CAAC,SAAS;AAAA,EAClB,OAAO;AACL,WAAO;AAAA,MACL,UAAU;AAAA,MACV,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,MAAM,CAAE;AAAA,MACR,YAAY;AAAA;EAEf;AAAA,EACD,OAAO,QAAQ;AACbA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,KAAK,IAAI,KAAK;AACnB,aAAK,OAAO,IAAI,KAAK;AACrB,aAAK,WAAW,KAAK,aAAa,IAAI,KAAK;AAAA,MAC5C;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,SAAS;AACPA,oBAAAA,MAAI,aAAa;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,IACF;AAAA;AAAA,IAED,UAAU,GAAG;AACX,WAAK,OAAO,EAAE,OAAO;AAAA,IACtB;AAAA;AAAA,IAED,MAAM,SAAS,GAAG;AAChB,YAAM,EAAE,UAAQ,IAAM,EAAE;AACxB,WAAK,WAAW;AAAA,IACjB;AAAA;AAAA,IAED,QAAQ,GAAG;AACTC,8CAAa,KAAK,OAAO;AACzBD,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA,QACP,MAAM;AAAA,MACR,CAAC;AACD,UAAI,KAAK,cAAc,KAAK,UAAU;AACpCE,mCAAQ;AAAA,UACJ,KAAK;AAAA,UACL,QAAQ;AAAA,UACR,MAAM;AAAA,YACJ,IAAI,KAAK;AAAA,YACT,YAAY,KAAK,SAAS,MAAM,GAAG,EAAE,IAAK;AAAA,YAC1C,UAAU,KAAK;AAAA,UAChB;AAAA,UACD,UAAU;AAAA,QACZ,CAAC,EAAE,KAAK,CAAC,SAAS;AAChB,cAAI,KAAK,SAAS,KAAK;AACrBF,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,YACR,CAAC;AACDA,0BAAG,MAAC,eAAe,YAAY,KAAK,KAAK,IAAI;AAC7CG,uCAAW,YAAC,KAAK,SAAQ,OAAO,KAAK,KAAK,KAAK,EAAE,GAAE,KAAK,KAAK,KAAK,YAAW,KAAK,KAAK,KAAK,QAAQ;AACpGH,0BAAG,MAAC,YAAW;AACfA,0BAAAA,MAAI,aAAa;AAAA,cACf,OAAO;AAAA,YACT,CAAC;AAAA,iBACI;AACLA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,YACR,CAAC;AAAA,UACH;AAAA,QACF,CAAC;AAAA,aACA;AACLI,uCAAS;AAAA,UACP,MAAM,KAAK;AAAA,UACX,MAAMC,4BAAAA,iBAAkB;AAAA,SACzB,EACE,KAAK,CAAC,QAAQ;AACbH,qCAAQ;AAAA,YACN,KAAK;AAAA,YACL,QAAQ;AAAA,YACR,MAAM;AAAA,cACJ,IAAI,KAAK;AAAA,cACT,YAAY,IAAI,MAAM,GAAG,EAAE,IAAK;AAAA,cAChC,UAAU,KAAK;AAAA,YAChB;AAAA,YACD,UAAU;AAAA,UACZ,CAAC,EAAE,KAAK,CAAC,SAAS;AAChBF,0BAAY,MAAA,MAAA,OAAA,oCAAA,UAAS,IAAI;AACzB,gBAAI,KAAK,SAAS,KAAK;AACrBA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,cACR,CAAC;AACDA,4BAAG,MAAC,eAAe,YAAY,KAAK,KAAK,IAAI;AAC7CG,yCAAW,YAAC,KAAK,SAAQ,OAAO,KAAK,KAAK,KAAK,EAAE,GAAE,KAAK,KAAK,KAAK,YAAW,KAAK,KAAK,KAAK,QAAQ;AACpGH,4BAAG,MAAC,YAAW;AAEfA,4BAAAA,MAAI,aAAa;AAAA,gBACf,OAAO;AAAA,cACT,CAAC;AAAA,mBAEI;AACLA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,cACR,CAAC;AAAA,YACH;AAAA,UACF,CAAC;AAAA,SACF,EACA,MAAM,CAAC,QAAQ;AACdA,wBAAY,MAAA,MAAA,OAAA,oCAAA,QAAQ,GAAG;AAAA,QACzB,CAAC;AAAA,MACH;AAAA,IACD;AAAA,EACF;AACH;;;;;;;;;;;;;AC1IA,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/chat/chat.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/chat/chat.js.map index a21cb40..66e0c73 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/chat/chat.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/chat/chat.js.map @@ -1 +1 @@ -{"version":3,"file":"chat.js","sources":["pages/index/chat/chat.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvY2hhdC9jaGF0LnZ1ZQ"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/index/chat/chat.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","getConversationMessages","generateId","res","messageRead","GoEasy","sendGroupMessage","request","sendCustomMessage","TimeFormatting","sendMessage","wx"],"mappings":";;;;;;AA6SA,oBAAoB,MAAW;AAC/B,MAAK,kBAAmB,MAAW;AACnC,MAAK,eAAgB,MAAW;AAChC,MAAK,eAAgB,MAAW;AAChC,MAAK,eAAgB,MAAW;AAChC,6BAA6B,MAAW;AAYxC,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,QAAQ;AAAA;AAAA,MACR,UAAU;AAAA;AAAA,MACV,QAAQ;AAAA;AAAA,MACR,UAAU,CAAE;AAAA;AAAA,MACZ,UAAU,CAAE;AAAA;AAAA,MACZ,cAAc;AAAA;AAAA,MACd,YAAY;AAAA;AAAA,MACZ,gBAAgB;AAAA;AAAA,MAChB,SAAS;AAAA;AAAA,MACT,gBAAgB;AAAA;AAAA,MAChB,SAAS;AAAA;AAAA,MACT,oBAAoB;AAAA;AAAA,MACpB,kBAAkB;AAAA;AAAA,MAClB,eAAe;AAAA;AAAA,MACf,WAAW;AAAA;AAAA,MACX,WAAW;AAAA;AAAA,MACX,gBAAgB;AAAA;AAAA,MAChB,QAAQ;AAAA;AAAA,MACR,OAAO;AAAA;AAAA,MACP,eAAe;AAAA;AAAA,MACf,UAAU;AAAA;AAAA,MACV,iBAAiB,CAAE;AAAA,MACnB,QAAQ;AAAA;AAAA,MACR,QAAQ;AAAA;AAAA,MACR,UAAU;AAAA;AAAA,MACV,MAAM;AAAA;AAAA,MACN,aAAa;AAAA;AAAA,MACb,YAAY;AAAA;AAAA,MACZ,iBAAiB;AAAA;AAAA,MACjB,mBAAmB;AAAA;AAAA,MACnB,iBAAiBA,cAAG,MAAC,mBAAoB;AAAA,MACzC,gBAAgB;AAAA;AAAA,MAChB,WAAW;AAAA,QACT;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,QACP;AAAA,QACD;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,QACP;AAAA,QACD;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,QACP;AAAA,MACF;AAAA;AAAA;EAEJ;AAAA,EACD,SAAS;AACP,SAAK,SAAS;AACdA,wBAAI,uBAAuB,CAAC,QAAQ;AAClC,WAAK,iBAAiB,IAAI,SAAS,IAAI,KAAK;AAAA,IAC9C,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AACP,SAAK,SAAS;AAAA,EACf;AAAA,EACD,OAAO,SAAS;AACd,SAAK,gBAAgB,OAAO,CAAC,QAAQ;AACnCA,oBAAA,MAAA,MAAA,OAAA,oCAAY,QAAQ,GAAG;AACvB,UAAG,KAAK,WAAW,GAAE;AACnB,YAAG,IAAI,WAAS,KAAG,MAAK;AACxBA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAM;AAAA,YACN,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,CAAC;AAAA,eACE;AACH,cAAI,KAAK,mBAAmB;AAC1B,iBAAK,oBAAoB;AAAA,iBACtB;AACL,iBAAK,UAAU,GAAG;AAClB,iBAAK,oBAAoB;AAAA,UAC3B;AAAA,QACA;AAAA,aACK;AACL,YAAG,IAAI,WAAS,IAAE,MAAK;AACrBA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAM;AAAA,YACN,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,CAAC;AAAA,eACE;AACH,cAAI,KAAK,mBAAmB;AAC1B,iBAAK,oBAAoB;AAAA,iBACtB;AACL,iBAAK,UAAU,GAAG;AAClB,iBAAK,oBAAoB;AAAA,UAC3B;AAAA,QACA;AAAA,MACF;AAAA,IACA,CAAC;AAEDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,WAAW,IAAI;AAAA,MACrB;AAAA,IACH,CAAC;AACD,SAAK,SAAS,QAAQ;AACtB,SAAK,WAAW,QAAQ;AACxB,SAAK,SAAS,QAAQ;AACtB,SAAK,OAAO,QAAQ;AACpB,QAAI;AACF,WAAK,SAAS,KAAK,MAAM,QAAQ,MAAM;AACvC,WAAK,WAAW,KAAK,MAAM,QAAQ,QAAQ;AAAA,aACpC,GAAG;AAAA,IAAC;AACb,QAAI,KAAK,QAAQ,MAAM;AACrB,iBAAW,MAAM;AACf,aAAK,kBAAiB;AAAA,MACvB,GAAE,GAAG;AAAA,IACR;AAEAC,uDAAwB,KAAK,SAAS,KAAK,QAAQ,IAAI,EAAE,KAAK,CAAC,QAAQ;AACrE,WAAK,WAAW,IAAI,IAAI,CAAC,SAAS;AAChC,aAAK,KAAKC,kBAAAA;AACV,aAAK,kBAAkB,KAAK,cAAc,KAAK,SAAS;AACxD,eAAO;AAAA,MACT,CAAC;AACD,iBAAW,MAAM;AACf,YAAI,KAAK,SAAS,SAAS,GAAG;AAC5B,eAAK,qBAAqB,KAAK,SAAS,KAAK,SAAS,SAAS,CAAC,EAAE;AAClE,eAAK,WAAW,KAAK,SAAS,CAAC,EAAE;AAAA,eAC5B;AACLF,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAO;AAAA,YACP,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,CAAC;AAAA,QACH;AAAA,MACD,GAAE,GAAG;AACN,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAACG,SAAQ;AAC3B,aAAK,gBAAgBA,KAAI,SAAS;AAAA,OACnC,EACA;IACL,CAAC;AAEDC,+BAAW,YAAC,KAAK,SAAS,KAAK,MAAM,EAAE,KAAK,CAAC,QAAQ;AACnDJ,oBAAAA,uDAAY,SAAS;AAAA,IACvB,CAAC;AACD,SAAK,iBAAgB;AACrB,QAAI,KAAK,KAAK,QAAQ;AACtB,OAAG,GAAGK,iBAAO,SAAS,0BAA0B,KAAK,wBAAwB;AAC7E,OAAG,GAAGA,iBAAO,SAAS,cAAc,KAAK,aAAa;AAEtD,SAAK,oBAAmB;AAAA,EACzB;AAAA,EACD,SAAS;AAAA;AAAA,IAEP,aAAa,MAAM;AACjB,WAAK,iBAAiB;AAAA,IACvB;AAAA;AAAA,IAED,UAAU,KAAK;AACb,YAAM,KAAK,KAAK,QAAQ;AACxB,UAAI,UAAU,GAAG,mBAAmB;AAAA,QAClC,MAAM;AAAA,QACN,IAAI;AAAA,UACF,MAAMA,cAAAA,GAAO,SAAS;AAAA,UACtB,IAAI,KAAK;AAAA;AAAA,UACT,MAAM,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAU;AAAA,QACvD;AAAA,QACD,YAAY,SAAU,OAAO;AAC3BL,wBAAA,MAAA,MAAA,OAAA,oCAAY,mBAAmB,KAAK;AAAA,QACrC;AAAA;AAAA,MACH,CAAC;AACDM,iCAAgB,iBAAC,KAAK,SAAS,OAAO,EAAE,KAAK,CAAC,SAAS;AACrD,aAAK,qBAAqB,KAAK,KAAKJ,kBAAU,WAAA;AAC9C,aAAK,kBAAkB,KAAK,cAAc,KAAK,SAAS;AACxD,aAAK,SAAS,KAAK,IAAI;AACvB,aAAK,iBAAiB;AAAA,MACxB,CAAC;AAAA,IACF;AAAA;AAAA,IAED,kBAAkB;AAChBF,oBAAAA,MAAY,MAAA,OAAA,oCAAA,MAAM;AAClB,WAAK,kBAAkB;AACvB,WAAK,gBAAgB;AACrB,WAAK,aAAa,KAAK;AAAA,IACxB;AAAA;AAAA,IAED,gBAAgB;AACd,iBAAW,MAAM;AACf,aAAK,gBAAgB;MACtB,GAAE,GAAG;AACNA,oBAAAA,MAAY,MAAA,OAAA,oCAAA,MAAM;AAClB,WAAK,kBAAkB;AAAA,IACxB;AAAA;AAAA,IAED,eAAe,OAAO;AACpB,YAAM,YAAYA,cAAG,MAAC,kBAAiB,EAAG,eAAe;AACzD,UAAI;AACF,YAAI,MAAM,QAAQ,CAAC,EAAE,UAAU,WAAW;AACxC,eAAK,oBAAoB;AAAA,eACpB;AACL,eAAK,oBAAoB;AAAA,QAC3B;AAAA,eACO,GAAG;AAAA,MAAC;AAAA,IACd;AAAA;AAAA,IAED,mBAAmB;AACjBA,oBAAAA,MAAY,MAAA,OAAA,oCAAA,MAAM;AAClB,WAAK,kBAAkB;AACvB,WAAK,oBAAoB;AAAA,IAC1B;AAAA;AAAA,IAED,QAAQ,QAAQ;AACd,WAAK,sBAAqB;AAC1B,UAAI,QAAQ;AACV,aAAK,aAAa;AAClB,aAAK,aAAa;AAAA,aACb;AACL,aAAK,aAAa;AAAA,MACpB;AACA,WAAK,cAAc;AAAA,IACpB;AAAA;AAAA,IAED,wBAAwB;AAEtBA,oBAAAA,MAAI,WAAW;AAAA,QACb,SAAS,CAAC,QAAQ;AAChB,gBAAM,gBAAgB,IAAI,YAAY,cAAc;AACpD,cAAI,kBAAkB,QAAW;AAC/B,iBAAK,kBAAiB;AAAA,qBACb,CAAC,eAAe;AACzB,iBAAK,cAAc;AACnBA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,SAAS;AAAA,cACT,aAAa;AAAA,cACb,SAAS,CAAC,aAAa;AACrB,oBAAI,SAAS,SAAS;AACpBA,gCAAAA,MAAI,YAAY;AAAA,oBACd,SAAS,CAAC,eAAe;AACvB,0BAAI,WAAW,YAAY,cAAc,MAAM,MAAM;AACnD,6BAAK,sBAAqB;AAAA,sBAC5B;AAAA,oBACD;AAAA,kBACH,CAAC;AAAA,gBACH;AAAA,cACD;AAAA,YACH,CAAC;AAAA,UACH;AAAA,QACD;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,oBAAoB;AAClBA,oBAAAA,MAAI,UAAU;AAAA,QACZ,OAAO;AAAA,QACP,MAAM,CAAC,QAAQ;AACb,eAAK,cAAc;AACnBA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAO;AAAA,YACP,MAAM;AAAA,UACR,CAAC;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,oBAAoB;AAClBO,iCAAQ;AAAA,QACN,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,OAAO,KAAK,SAAS;AAAA,UACrB,OAAO,KAAK,OAAO;AAAA,UACnB,SAAS,KAAK;AAAA,UACd,SAAS,KAAK,SAAS;AAAA,UACvB,QAAQ,KAAK,SAAS;AAAA,UACtB,UAAU,KAAK,SAAS;AAAA,UACxB,WAAW,KAAK,SAAS;AAAA,UACzB,WAAW,KAAK,OAAO;AAAA,UACvB,aAAa,KAAK,SAAS;AAAA,UAC3B,aAAa,KAAK,OAAO;AAAA,UACzB,OAAO,KAAK,SAAS;AAAA,UACrB,OAAO,KAAK,OAAO;AAAA,QACpB;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,EAAE,KAAK,CAAC,QAAQ;AACf,YAAI,IAAI,QAAQ,KAAK;AACnB,gBAAM,aAAa;AAAA,YACjB,IAAI,IAAI,KAAK;AAAA,YACb,OAAO,KAAK,SAAS;AAAA,YACrB,OAAO,KAAK,OAAO;AAAA;AAErB,cAAI,QAAQ;AAAA,YACV;AAAA,YACA,MAAM;AAAA,YACN,MAAM;AAAA;AAERC,qCAAiB;AAAA,YACf,KAAK;AAAA,YACL,KAAK;AAAA,YACL,KAAK;AAAA,YACL;AAAA,YACA,KAAK;AAAA,YACL,KAAK;AAAA,UACP,EAAE,KAAK,CAACL,SAAQ;AACd,iBAAK,qBAAqBA,KAAI,KAAKD,kBAAU,WAAA;AAC7C,YAAAC,KAAI,kBAAkB,KAAK,cAAcA,KAAI,SAAS;AACtD,iBAAK,SAAS,KAAKA,IAAG;AACtBH,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,YACR,CAAC;AAAA,UACH,CAAC;AAAA,eACI;AACLA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAO,IAAI;AAAA,YACX,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACF;AAAA;AAAA,IAED,cAAc,WAAW;AACvB,UAAI,CAAC,KAAK,eAAe;AACvB,aAAK,gBAAgB;AACrB,eAAO;AAAA,MACT;AAEA,YAAM,WAAW,YAAY,KAAK;AAClC,UAAI,YAAY,KAAQ;AAEtB,aAAK,gBAAgB;AACrB,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACR;AAAA;AAAA,IAGD,gBAAgBS,0BAAc;AAAA;AAAA,IAE9B,sBAAsB;AACpB,YAAM,cAAcT,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AACrD,kBACG,OAAO,SAAS,EAChB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,mBAAmB,IAAI;AAAA,OAC7B,EACA;IACJ;AAAA;AAAA,IAED,SAAS,OAAO;AACd,UAAI,CAAC,KAAK,gBAAgB;AACxB,aAAK,YAAY,MAAM,OAAO;AAC9B,aAAK,iBAAiB;AAAA,MACxB,WAAW,KAAK,YAAY,MAAM,OAAO,YAAY,KAAK,kBAAkB;AAC1E,aAAK,YAAY;AAAA,MACnB,WAAW,KAAK,YAAY,MAAM,OAAO,YAAY,KAAK,kBAAkB;AAC1E,aAAK,YAAY;AAAA,MACnB;AAAA,IACD;AAAA;AAAA,IAED,kBAAkB;AAChB,WAAK,gBAAgB;AACrBC,yDAAwB,KAAK,SAAS,KAAK,QAAQ,KAAK,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAC9E,aAAK,SAAS,KAAK,SAAS,CAAC,EAAE;AAC/B,aAAK,kBAAkB,IAAI,IAAI,CAAC,SAAS;AACvC,eAAK,KAAKC,kBAAAA;AACV,eAAK,kBAAkB,KAAK,cAAc,KAAK,SAAS;AACxD,iBAAO;AAAA,QACT,CAAC;AAAA,MACH,CAAC;AACD,iBAAW,MAAM;AACf,aAAK,WAAW,CAAC,GAAG,KAAK,iBAAiB,GAAG,KAAK,QAAQ;AAC1DF,sBAAY,MAAA,MAAA,OAAA,oCAAA,YAAY,KAAK,QAAQ;AACrC,aAAK,WAAW,KAAK,SAAS,CAAC,EAAE;AACjC,aAAK,qBAAqB,KAAK;AAAA,MAChC,GAAE,GAAG;AAAA,IACP;AAAA;AAAA,IAED,cAAc,SAAS;AACrBA,2EAAY,SAAS,OAAO;AAAA,IAC7B;AAAA;AAAA,IAED,yBAAyB,SAAS;AAChC,UAAI,CAAC,KAAK,WAAW;AACnB,aAAK,qBAAqB,QAAQ,KAAKE,kBAAU,WAAA;AACjD,gBAAQ,kBAAkB,KAAK,cAAc,QAAQ,SAAS;AAC9D,aAAK,iBAAiB;AAAA,aACjB;AACL,gBAAQ,KAAKA,kBAAAA;AACb,gBAAQ,kBAAkB,KAAK,cAAc,QAAQ,SAAS;AAAA,MAChE;AACA,WAAK,SAAS,KAAK,OAAO;AAC1B,UAAI,KAAK,QAAQ;AACfE,mCAAW,YAAC,KAAK,SAAS,KAAK,MAAM,EAAE,KAAK,CAAC,QAAQ;AACnDJ,wBAAAA,MAAA,MAAA,OAAA,oCAAY,SAAS;AAAA,QACvB,CAAC;AAAA,MACH;AAAA,IACD;AAAA;AAAA,IAED,SAAS;AACP,UAAI,KAAK,WAAW,IAAI;AACtBU,mCAAW;AAAA,UACT,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,QACP,EAAE,KAAK,CAAC,QAAQ;AACdV,wBAAY,MAAA,MAAA,OAAA,oCAAA,QAAQ,GAAG;AACvB,eAAK,qBAAqB,IAAI,KAAKE,kBAAU,WAAA;AAC7C,cAAI,kBAAkB,KAAK,cAAc,IAAI,SAAS;AACtD,eAAK,SAAS,KAAK,GAAG;AACtB,eAAK,iBAAiB;AAAA,QACxB,CAAC;AACD,aAAK,UAAU;AACf,aAAK,eAAe;AAAA,MACtB;AAAA,IACD;AAAA;AAAA,IAED,eAAe,SAAS;AACtB,WAAK,iBAAiB;AACtB,WAAK,qBAAqB,QAAQ,QAAQ,KAAKA,kBAAU,WAAA;AACzD,cAAQ,kBAAkB,KAAK,cAAc,QAAQ,QAAQ,SAAS;AACtE,WAAK,SAAS,KAAK,QAAQ,OAAO;AAClC,WAAK,iBAAiB;AACtB,WAAK,aAAa;AAAA,IACnB;AAAA;AAAA,IAED,mBAAmB;AACjB,YAAM,aAAaF,oBAAI;AACvB,YAAM,QAAQ,WAAW;AACzB,UAAI,gDAAgD,KAAK,KAAK,GAAG;AAC/D,YAAI,oCAAoC,KAAK,KAAK,GAAG;AACnD,eAAK,UAAU;AAAA,QACf,WAAS,iCAAiC,KAAK,KAAK,GAAG;AACvD,eAAK,UAAU;AAAA,QACjB;AAAA,MACF;AAAA,IACD;AAAA;AAAA,IAGD,OAAO,QAAQ;AACb,UAAI,CAAC,KAAK,WAAW;AACnB,aAAK,qBAAqB;AAC1B,mBAAW,MAAM;AACf,eAAK,qBAAqB,KAAK,SAAS,KAAK,SAAS,SAAS,CAAC,EAAE;AAAA,QACnE,GAAE,GAAG;AACN,aAAK,iBAAiB;AAAA,MACxB;AACA,WAAK,oBAAmB;AACxB,UAAI,QAAQ;AACV,aAAK,aAAa;AAClB,aAAK,cAAc;AAAA,aACd;AACL,aAAK,aAAa;AAAA,MACpB;AACA,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;IACJ;AAAA;AAAA,IAED,WAAW,MAAM;AACf,UAAI,QAAQ,SAAS;AACnB,aAAK,YAAW;AAAA,iBACP,QAAQ,SAAS;AAC1B,aAAK,YAAW;AAAA,aACX;AACL,aAAK,iBAAiB;AAAA,MACxB;AAAA,IACD;AAAA;AAAA,IAED,cAAc;AACZ,UAAI,KAAK,KAAK,QAAQ;AACtBA,oBAAAA,MAAI,YAAY;AAAA,QACd,YAAY,CAAC,SAAS,QAAQ;AAAA,QAC9B,SAAS,CAAC,QAAQ;AAChB,cAAI,UAAU,GAAG,mBAAmB;AAAA,YAClC,MAAM;AAAA;AAAA,YACN,IAAI;AAAA,cACF,MAAMK,cAAAA,GAAO,SAAS;AAAA,cACtB,IAAI,KAAK;AAAA;AAAA,cACT,MAAM,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAU;AAAA,YACvD;AAAA,YACD,YAAY,SAAU,OAAO;AAC3BL,4BAAA,MAAA,MAAA,OAAA,oCAAY,mBAAmB,KAAK;AAAA,YACrC;AAAA;AAAA,UACH,CAAC;AACDM,qCAAgB,iBAAC,KAAK,SAAS,OAAO,EAAE,KAAK,CAACH,SAAQ;AACpD,iBAAK,qBAAqBA,KAAI,KAAKD,kBAAU,WAAA;AAC7C,YAAAC,KAAI,kBAAkB,KAAK,cAAcA,KAAI,SAAS;AACtD,iBAAK,SAAS,KAAKA,IAAG;AACtB,iBAAK,iBAAiB;AAAA,UACxB,CAAC;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,cAAc;AACZ,UAAI,KAAK,KAAK,QAAQ;AACtBH,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA;AAAA,QACP,UAAU,CAAC,YAAY,YAAY;AAAA;AAAA,QACnC,YAAY,CAAC,SAAS,QAAQ;AAAA;AAAA,QAC9B,SAAS,CAAC,QAAQ;AAChB,gBAAM,YAAY,IAAI;AACtB,oBAAU,QAAQ,CAAC,MAAM,UAAU;AACjC,gBAAI,UAAU,GAAG,mBAAmB;AAAA,cAClC,MAAM;AAAA,cACN,IAAI;AAAA,gBACF,MAAMK,cAAAA,GAAO,SAAS;AAAA,gBACtB,IAAI,KAAK;AAAA,gBACT,MAAM,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAU;AAAA,cACvD;AAAA,cACD,YAAY,SAAU,OAAO;AAC3BL,8BAAY,MAAA,MAAA,OAAA,oCAAA,QAAQ,KAAK;AAAA,cAC1B;AAAA;AAAA,YACH,CAAC;AACDM,uCAAgB,iBAAC,KAAK,SAAS,OAAO,EAAE,KAAK,CAACH,SAAQ;AACpD,mBAAK,qBAAqBA,KAAI,KAAKD,kBAAU,WAAA;AAC7C,cAAAC,KAAI,kBAAkB,KAAK,cAAcA,KAAI,SAAS;AACtD,mBAAK,SAAS,KAAKA,IAAG;AACtB,mBAAK,iBAAiB;AAAA,YACxB,CAAC;AAAA,UACH,CAAC;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,QAAQ,OAAO;AACb,UAAI,CAAC,KAAK,WAAW;AACnB,aAAK,qBAAqB;AAC1B,mBAAW,MAAM;AACf,eAAK,qBAAqB,KAAK,SAAS,KAAK,SAAS,SAAS,CAAC,EAAE;AAAA,QACnE,GAAE,GAAG;AACN,aAAK,iBAAiB;AAAA,MACxB;AACA,WAAK,oBAAmB;AACxB,YAAM,QAAQH,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;IACJ;AAAA;AAAA,IAED,OAAO,OAAO;AACZ,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;AACH,WAAK,oBAAmB;AAAA,IACzB;AAAA;AAAA,IAED,UAAU,OAAO;AACf,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;AACH,UAAI,MAAM,OAAO,SAAS,IAAI;AAC5B,aAAK,eAAe;AAAA,aACf;AACL,aAAK,eAAe;AAAA,MACtB;AAAA,IACD;AAAA;AAAA,IAED,SAAS;AACP,WAAK,SAAS;AACdW,oBAAAA,KAAG,aAAa;AAAA,QACd,OAAO;AAAA,MACT,CAAC;AAAA,IACF;AAAA,EACF;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACh5BA,GAAG,WAAW,eAAe;"} \ No newline at end of file +{"version":3,"file":"chat.js","sources":["pages/index/chat/chat.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvY2hhdC9jaGF0LnZ1ZQ"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/index/chat/chat.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","getConversationMessages","generateId","res","messageRead","GoEasy","sendGroupMessage","request","sendCustomMessage","TimeFormatting","sendMessage","wx"],"mappings":";;;;;;AA6SA,oBAAoB,MAAW;AAC/B,MAAK,kBAAmB,MAAW;AACnC,MAAK,eAAgB,MAAW;AAChC,MAAK,eAAgB,MAAW;AAChC,MAAK,eAAgB,MAAW;AAChC,6BAA6B,MAAW;AAYxC,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,QAAQ;AAAA;AAAA,MACR,UAAU;AAAA;AAAA,MACV,QAAQ;AAAA;AAAA,MACR,UAAU,CAAE;AAAA;AAAA,MACZ,UAAU,CAAE;AAAA;AAAA,MACZ,cAAc;AAAA;AAAA,MACd,YAAY;AAAA;AAAA,MACZ,gBAAgB;AAAA;AAAA,MAChB,SAAS;AAAA;AAAA,MACT,gBAAgB;AAAA;AAAA,MAChB,SAAS;AAAA;AAAA,MACT,oBAAoB;AAAA;AAAA,MACpB,kBAAkB;AAAA;AAAA,MAClB,eAAe;AAAA;AAAA,MACf,WAAW;AAAA;AAAA,MACX,WAAW;AAAA;AAAA,MACX,gBAAgB;AAAA;AAAA,MAChB,QAAQ;AAAA;AAAA,MACR,OAAO;AAAA;AAAA,MACP,eAAe;AAAA;AAAA,MACf,UAAU;AAAA;AAAA,MACV,iBAAiB,CAAE;AAAA,MACnB,QAAQ;AAAA;AAAA,MACR,QAAQ;AAAA;AAAA,MACR,UAAU;AAAA;AAAA,MACV,MAAM;AAAA;AAAA,MACN,aAAa;AAAA;AAAA,MACb,YAAY;AAAA;AAAA,MACZ,iBAAiB;AAAA;AAAA,MACjB,mBAAmB;AAAA;AAAA,MACnB,iBAAiBA,cAAG,MAAC,mBAAoB;AAAA,MACzC,gBAAgB;AAAA;AAAA,MAChB,WAAW;AAAA,QACT;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,QACP;AAAA,QACD;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,QACP;AAAA,QACD;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,QACP;AAAA,MACF;AAAA;AAAA;EAEJ;AAAA,EACD,SAAS;AACP,SAAK,SAAS;AACdA,wBAAI,uBAAuB,CAAC,QAAQ;AAClC,WAAK,iBAAiB,IAAI,SAAS,IAAI,KAAK;AAAA,IAC9C,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AACP,SAAK,SAAS;AAAA,EACf;AAAA,EACD,WAAW;AACT,SAAK,SAAS;AAAA,EACf;AAAA,EACD,OAAO,SAAS;AACd,SAAK,gBAAgB,OAAO,CAAC,QAAQ;AACnCA,oBAAA,MAAA,MAAA,OAAA,oCAAY,QAAQ,GAAG;AACvB,UAAG,KAAK,WAAW,GAAE;AACnB,YAAG,IAAI,WAAS,KAAG,MAAK;AACxBA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAM;AAAA,YACN,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,CAAC;AAAA,eACE;AACH,cAAI,KAAK,mBAAmB;AAC1B,iBAAK,oBAAoB;AAAA,iBACtB;AACL,iBAAK,UAAU,GAAG;AAClB,iBAAK,oBAAoB;AAAA,UAC3B;AAAA,QACA;AAAA,aACK;AACL,YAAG,IAAI,WAAS,IAAE,MAAK;AACrBA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAM;AAAA,YACN,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,CAAC;AAAA,eACE;AACH,cAAI,KAAK,mBAAmB;AAC1B,iBAAK,oBAAoB;AAAA,iBACtB;AACL,iBAAK,UAAU,GAAG;AAClB,iBAAK,oBAAoB;AAAA,UAC3B;AAAA,QACA;AAAA,MACF;AAAA,IACA,CAAC;AAEDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,WAAW,IAAI;AAAA,MACrB;AAAA,IACH,CAAC;AACD,SAAK,SAAS,QAAQ;AACtB,SAAK,WAAW,QAAQ;AACxB,SAAK,SAAS,QAAQ;AACtB,SAAK,OAAO,QAAQ;AACpB,QAAI;AACF,WAAK,SAAS,KAAK,MAAM,QAAQ,MAAM;AACvC,WAAK,WAAW,KAAK,MAAM,QAAQ,QAAQ;AAAA,aACpC,GAAG;AAAA,IAAC;AACb,QAAI,KAAK,QAAQ,MAAM;AACrB,iBAAW,MAAM;AACf,aAAK,kBAAiB;AAAA,MACvB,GAAE,GAAG;AAAA,IACR;AAEAC,uDAAwB,KAAK,SAAS,KAAK,QAAQ,IAAI,EAAE,KAAK,CAAC,QAAQ;AACrE,WAAK,WAAW,IAAI,IAAI,CAAC,SAAS;AAChC,aAAK,KAAKC,kBAAAA;AACV,aAAK,kBAAkB,KAAK,cAAc,KAAK,SAAS;AACxD,eAAO;AAAA,MACT,CAAC;AACD,iBAAW,MAAM;AACf,YAAI,KAAK,SAAS,SAAS,GAAG;AAC5B,eAAK,qBAAqB,KAAK,SAAS,KAAK,SAAS,SAAS,CAAC,EAAE;AAClE,eAAK,WAAW,KAAK,SAAS,CAAC,EAAE;AAAA,eAC5B;AACLF,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAO;AAAA,YACP,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,CAAC;AAAA,QACH;AAAA,MACD,GAAE,GAAG;AACN,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAACG,SAAQ;AAC3B,aAAK,gBAAgBA,KAAI,SAAS;AAAA,OACnC,EACA;IACL,CAAC;AAEDC,+BAAW,YAAC,KAAK,SAAS,KAAK,MAAM,EAAE,KAAK,CAAC,QAAQ;AACnDJ,oBAAAA,uDAAY,SAAS;AAAA,IACvB,CAAC;AACD,SAAK,iBAAgB;AACrB,QAAI,KAAK,KAAK,QAAQ;AACtB,OAAG,GAAGK,iBAAO,SAAS,0BAA0B,KAAK,wBAAwB;AAC7E,OAAG,GAAGA,iBAAO,SAAS,cAAc,KAAK,aAAa;AAEtD,SAAK,oBAAmB;AAAA,EACzB;AAAA,EACD,SAAS;AAAA;AAAA,IAEP,aAAa,MAAM;AACjB,WAAK,iBAAiB;AAAA,IACvB;AAAA;AAAA,IAED,UAAU,KAAK;AACb,YAAM,KAAK,KAAK,QAAQ;AACxB,UAAI,UAAU,GAAG,mBAAmB;AAAA,QAClC,MAAM;AAAA,QACN,IAAI;AAAA,UACF,MAAMA,cAAAA,GAAO,SAAS;AAAA,UACtB,IAAI,KAAK;AAAA;AAAA,UACT,MAAM,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAU;AAAA,QACvD;AAAA,QACD,YAAY,SAAU,OAAO;AAC3BL,wBAAA,MAAA,MAAA,OAAA,oCAAY,mBAAmB,KAAK;AAAA,QACrC;AAAA;AAAA,MACH,CAAC;AACDM,iCAAgB,iBAAC,KAAK,SAAS,OAAO,EAAE,KAAK,CAAC,SAAS;AACrD,aAAK,qBAAqB,KAAK,KAAKJ,kBAAU,WAAA;AAC9C,aAAK,kBAAkB,KAAK,cAAc,KAAK,SAAS;AACxD,aAAK,SAAS,KAAK,IAAI;AACvB,aAAK,iBAAiB;AAAA,MACxB,CAAC;AAAA,IACF;AAAA;AAAA,IAED,kBAAkB;AAChBF,oBAAAA,MAAY,MAAA,OAAA,oCAAA,MAAM;AAClB,WAAK,kBAAkB;AACvB,WAAK,gBAAgB;AACrB,WAAK,aAAa,KAAK;AAAA,IACxB;AAAA;AAAA,IAED,gBAAgB;AACd,iBAAW,MAAM;AACf,aAAK,gBAAgB;MACtB,GAAE,GAAG;AACNA,oBAAAA,MAAY,MAAA,OAAA,oCAAA,MAAM;AAClB,WAAK,kBAAkB;AAAA,IACxB;AAAA;AAAA,IAED,eAAe,OAAO;AACpB,YAAM,YAAYA,cAAG,MAAC,kBAAiB,EAAG,eAAe;AACzD,UAAI;AACF,YAAI,MAAM,QAAQ,CAAC,EAAE,UAAU,WAAW;AACxC,eAAK,oBAAoB;AAAA,eACpB;AACL,eAAK,oBAAoB;AAAA,QAC3B;AAAA,eACO,GAAG;AAAA,MAAC;AAAA,IACd;AAAA;AAAA,IAED,mBAAmB;AACjBA,oBAAAA,MAAY,MAAA,OAAA,oCAAA,MAAM;AAClB,WAAK,kBAAkB;AACvB,WAAK,oBAAoB;AAAA,IAC1B;AAAA;AAAA,IAED,QAAQ,QAAQ;AACd,WAAK,sBAAqB;AAC1B,UAAI,QAAQ;AACV,aAAK,aAAa;AAClB,aAAK,aAAa;AAAA,aACb;AACL,aAAK,aAAa;AAAA,MACpB;AACA,WAAK,cAAc;AAAA,IACpB;AAAA;AAAA,IAED,wBAAwB;AAEtBA,oBAAAA,MAAI,WAAW;AAAA,QACb,SAAS,CAAC,QAAQ;AAChB,gBAAM,gBAAgB,IAAI,YAAY,cAAc;AACpD,cAAI,kBAAkB,QAAW;AAC/B,iBAAK,kBAAiB;AAAA,qBACb,CAAC,eAAe;AACzB,iBAAK,cAAc;AACnBA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,SAAS;AAAA,cACT,aAAa;AAAA,cACb,SAAS,CAAC,aAAa;AACrB,oBAAI,SAAS,SAAS;AACpBA,gCAAAA,MAAI,YAAY;AAAA,oBACd,SAAS,CAAC,eAAe;AACvB,0BAAI,WAAW,YAAY,cAAc,MAAM,MAAM;AACnD,6BAAK,sBAAqB;AAAA,sBAC5B;AAAA,oBACD;AAAA,kBACH,CAAC;AAAA,gBACH;AAAA,cACD;AAAA,YACH,CAAC;AAAA,UACH;AAAA,QACD;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,oBAAoB;AAClBA,oBAAAA,MAAI,UAAU;AAAA,QACZ,OAAO;AAAA,QACP,MAAM,CAAC,QAAQ;AACb,eAAK,cAAc;AACnBA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAO;AAAA,YACP,MAAM;AAAA,UACR,CAAC;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,oBAAoB;AAClBO,iCAAQ;AAAA,QACN,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,OAAO,KAAK,SAAS;AAAA,UACrB,OAAO,KAAK,OAAO;AAAA,UACnB,SAAS,KAAK;AAAA,UACd,SAAS,KAAK,SAAS;AAAA,UACvB,QAAQ,KAAK,SAAS;AAAA,UACtB,UAAU,KAAK,SAAS;AAAA,UACxB,WAAW,KAAK,SAAS;AAAA,UACzB,WAAW,KAAK,OAAO;AAAA,UACvB,aAAa,KAAK,SAAS;AAAA,UAC3B,aAAa,KAAK,OAAO;AAAA,UACzB,OAAO,KAAK,SAAS;AAAA,UACrB,OAAO,KAAK,OAAO;AAAA,QACpB;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,EAAE,KAAK,CAAC,QAAQ;AACf,YAAI,IAAI,QAAQ,KAAK;AACnB,gBAAM,aAAa;AAAA,YACjB,IAAI,IAAI,KAAK;AAAA,YACb,OAAO,KAAK,SAAS;AAAA,YACrB,OAAO,KAAK,OAAO;AAAA;AAErB,cAAI,QAAQ;AAAA,YACV;AAAA,YACA,MAAM;AAAA,YACN,MAAM;AAAA;AAERC,qCAAiB;AAAA,YACf,KAAK;AAAA,YACL,KAAK;AAAA,YACL,KAAK;AAAA,YACL;AAAA,YACA,KAAK;AAAA,YACL,KAAK;AAAA,UACP,EAAE,KAAK,CAACL,SAAQ;AACd,iBAAK,qBAAqBA,KAAI,KAAKD,kBAAU,WAAA;AAC7C,YAAAC,KAAI,kBAAkB,KAAK,cAAcA,KAAI,SAAS;AACtD,iBAAK,SAAS,KAAKA,IAAG;AACtBH,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,YACR,CAAC;AAAA,UACH,CAAC;AAAA,eACI;AACLA,wBAAAA,MAAI,UAAU;AAAA,YACZ,OAAO,IAAI;AAAA,YACX,MAAM;AAAA,UACR,CAAC;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACF;AAAA;AAAA,IAED,cAAc,WAAW;AACvB,UAAI,CAAC,KAAK,eAAe;AACvB,aAAK,gBAAgB;AACrB,eAAO;AAAA,MACT;AAEA,YAAM,WAAW,YAAY,KAAK;AAClC,UAAI,YAAY,KAAQ;AAEtB,aAAK,gBAAgB;AACrB,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACR;AAAA;AAAA,IAGD,gBAAgBS,0BAAc;AAAA;AAAA,IAE9B,sBAAsB;AACpB,YAAM,cAAcT,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AACrD,kBACG,OAAO,SAAS,EAChB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,mBAAmB,IAAI;AAAA,OAC7B,EACA;IACJ;AAAA;AAAA,IAED,SAAS,OAAO;AACd,UAAI,CAAC,KAAK,gBAAgB;AACxB,aAAK,YAAY,MAAM,OAAO;AAC9B,aAAK,iBAAiB;AAAA,MACxB,WAAW,KAAK,YAAY,MAAM,OAAO,YAAY,KAAK,kBAAkB;AAC1E,aAAK,YAAY;AAAA,MACnB,WAAW,KAAK,YAAY,MAAM,OAAO,YAAY,KAAK,kBAAkB;AAC1E,aAAK,YAAY;AAAA,MACnB;AAAA,IACD;AAAA;AAAA,IAED,kBAAkB;AAChB,WAAK,gBAAgB;AACrBC,yDAAwB,KAAK,SAAS,KAAK,QAAQ,KAAK,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAC9E,aAAK,SAAS,KAAK,SAAS,CAAC,EAAE;AAC/B,aAAK,kBAAkB,IAAI,IAAI,CAAC,SAAS;AACvC,eAAK,KAAKC,kBAAAA;AACV,eAAK,kBAAkB,KAAK,cAAc,KAAK,SAAS;AACxD,iBAAO;AAAA,QACT,CAAC;AAAA,MACH,CAAC;AACD,iBAAW,MAAM;AACf,aAAK,WAAW,CAAC,GAAG,KAAK,iBAAiB,GAAG,KAAK,QAAQ;AAC1DF,sBAAY,MAAA,MAAA,OAAA,oCAAA,YAAY,KAAK,QAAQ;AACrC,aAAK,WAAW,KAAK,SAAS,CAAC,EAAE;AACjC,aAAK,qBAAqB,KAAK;AAAA,MAChC,GAAE,GAAG;AAAA,IACP;AAAA;AAAA,IAED,cAAc,SAAS;AACrBA,2EAAY,SAAS,OAAO;AAAA,IAC7B;AAAA;AAAA,IAED,yBAAyB,SAAS;AAChC,UAAI,CAAC,KAAK,WAAW;AACnB,aAAK,qBAAqB,QAAQ,KAAKE,kBAAU,WAAA;AACjD,gBAAQ,kBAAkB,KAAK,cAAc,QAAQ,SAAS;AAC9D,aAAK,iBAAiB;AAAA,aACjB;AACL,gBAAQ,KAAKA,kBAAAA;AACb,gBAAQ,kBAAkB,KAAK,cAAc,QAAQ,SAAS;AAAA,MAChE;AACA,WAAK,SAAS,KAAK,OAAO;AAC1B,UAAI,KAAK,QAAQ;AACfE,mCAAW,YAAC,KAAK,SAAS,KAAK,MAAM,EAAE,KAAK,CAAC,QAAQ;AACnDJ,wBAAAA,MAAA,MAAA,OAAA,oCAAY,SAAS;AAAA,QACvB,CAAC;AAAA,MACH;AAAA,IACD;AAAA;AAAA,IAED,SAAS;AACP,UAAI,KAAK,WAAW,IAAI;AACtBU,mCAAW;AAAA,UACT,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AAAA,QACP,EAAE,KAAK,CAAC,QAAQ;AACdV,wBAAY,MAAA,MAAA,OAAA,oCAAA,QAAQ,GAAG;AACvB,eAAK,qBAAqB,IAAI,KAAKE,kBAAU,WAAA;AAC7C,cAAI,kBAAkB,KAAK,cAAc,IAAI,SAAS;AACtD,eAAK,SAAS,KAAK,GAAG;AACtB,eAAK,iBAAiB;AAAA,QACxB,CAAC;AACD,aAAK,UAAU;AACf,aAAK,eAAe;AAAA,MACtB;AAAA,IACD;AAAA;AAAA,IAED,eAAe,SAAS;AACtB,WAAK,iBAAiB;AACtB,WAAK,qBAAqB,QAAQ,QAAQ,KAAKA,kBAAU,WAAA;AACzD,cAAQ,kBAAkB,KAAK,cAAc,QAAQ,QAAQ,SAAS;AACtE,WAAK,SAAS,KAAK,QAAQ,OAAO;AAClC,WAAK,iBAAiB;AACtB,WAAK,aAAa;AAAA,IACnB;AAAA;AAAA,IAED,mBAAmB;AACjB,YAAM,aAAaF,oBAAI;AACvB,YAAM,QAAQ,WAAW;AACzB,UAAI,gDAAgD,KAAK,KAAK,GAAG;AAC/D,YAAI,oCAAoC,KAAK,KAAK,GAAG;AACnD,eAAK,UAAU;AAAA,QACf,WAAS,iCAAiC,KAAK,KAAK,GAAG;AACvD,eAAK,UAAU;AAAA,QACjB;AAAA,MACF;AAAA,IACD;AAAA;AAAA,IAGD,OAAO,QAAQ;AACb,UAAI,CAAC,KAAK,WAAW;AACnB,aAAK,qBAAqB;AAC1B,mBAAW,MAAM;AACf,eAAK,qBAAqB,KAAK,SAAS,KAAK,SAAS,SAAS,CAAC,EAAE;AAAA,QACnE,GAAE,GAAG;AACN,aAAK,iBAAiB;AAAA,MACxB;AACA,WAAK,oBAAmB;AACxB,UAAI,QAAQ;AACV,aAAK,aAAa;AAClB,aAAK,cAAc;AAAA,aACd;AACL,aAAK,aAAa;AAAA,MACpB;AACA,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;IACJ;AAAA;AAAA,IAED,WAAW,MAAM;AACf,UAAI,QAAQ,SAAS;AACnB,aAAK,YAAW;AAAA,iBACP,QAAQ,SAAS;AAC1B,aAAK,YAAW;AAAA,aACX;AACL,aAAK,iBAAiB;AAAA,MACxB;AAAA,IACD;AAAA;AAAA,IAED,cAAc;AACZ,UAAI,KAAK,KAAK,QAAQ;AACtBA,oBAAAA,MAAI,YAAY;AAAA,QACd,YAAY,CAAC,SAAS,QAAQ;AAAA,QAC9B,SAAS,CAAC,QAAQ;AAChB,cAAI,UAAU,GAAG,mBAAmB;AAAA,YAClC,MAAM;AAAA;AAAA,YACN,IAAI;AAAA,cACF,MAAMK,cAAAA,GAAO,SAAS;AAAA,cACtB,IAAI,KAAK;AAAA;AAAA,cACT,MAAM,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAU;AAAA,YACvD;AAAA,YACD,YAAY,SAAU,OAAO;AAC3BL,4BAAA,MAAA,MAAA,OAAA,oCAAY,mBAAmB,KAAK;AAAA,YACrC;AAAA;AAAA,UACH,CAAC;AACDM,qCAAgB,iBAAC,KAAK,SAAS,OAAO,EAAE,KAAK,CAACH,SAAQ;AACpD,iBAAK,qBAAqBA,KAAI,KAAKD,kBAAU,WAAA;AAC7C,YAAAC,KAAI,kBAAkB,KAAK,cAAcA,KAAI,SAAS;AACtD,iBAAK,SAAS,KAAKA,IAAG;AACtB,iBAAK,iBAAiB;AAAA,UACxB,CAAC;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,cAAc;AACZ,UAAI,KAAK,KAAK,QAAQ;AACtBH,oBAAAA,MAAI,YAAY;AAAA,QACd,OAAO;AAAA;AAAA,QACP,UAAU,CAAC,YAAY,YAAY;AAAA;AAAA,QACnC,YAAY,CAAC,SAAS,QAAQ;AAAA;AAAA,QAC9B,SAAS,CAAC,QAAQ;AAChB,gBAAM,YAAY,IAAI;AACtB,oBAAU,QAAQ,CAAC,MAAM,UAAU;AACjC,gBAAI,UAAU,GAAG,mBAAmB;AAAA,cAClC,MAAM;AAAA,cACN,IAAI;AAAA,gBACF,MAAMK,cAAAA,GAAO,SAAS;AAAA,gBACtB,IAAI,KAAK;AAAA,gBACT,MAAM,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAU;AAAA,cACvD;AAAA,cACD,YAAY,SAAU,OAAO;AAC3BL,8BAAY,MAAA,MAAA,OAAA,oCAAA,QAAQ,KAAK;AAAA,cAC1B;AAAA;AAAA,YACH,CAAC;AACDM,uCAAgB,iBAAC,KAAK,SAAS,OAAO,EAAE,KAAK,CAACH,SAAQ;AACpD,mBAAK,qBAAqBA,KAAI,KAAKD,kBAAU,WAAA;AAC7C,cAAAC,KAAI,kBAAkB,KAAK,cAAcA,KAAI,SAAS;AACtD,mBAAK,SAAS,KAAKA,IAAG;AACtB,mBAAK,iBAAiB;AAAA,YACxB,CAAC;AAAA,UACH,CAAC;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA;AAAA,IAED,QAAQ,OAAO;AACb,UAAI,CAAC,KAAK,WAAW;AACnB,aAAK,qBAAqB;AAC1B,mBAAW,MAAM;AACf,eAAK,qBAAqB,KAAK,SAAS,KAAK,SAAS,SAAS,CAAC,EAAE;AAAA,QACnE,GAAE,GAAG;AACN,aAAK,iBAAiB;AAAA,MACxB;AACA,WAAK,oBAAmB;AACxB,YAAM,QAAQH,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;IACJ;AAAA;AAAA,IAED,OAAO,OAAO;AACZ,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;AACH,WAAK,oBAAmB;AAAA,IACzB;AAAA;AAAA,IAED,UAAU,OAAO;AACf,YAAM,QAAQA,cAAAA,MAAI,oBAAqB,EAAC,GAAG,IAAI;AAC/C,YACG,OAAO,iBAAiB,EACxB,mBAAmB,CAAC,QAAQ;AAC3B,aAAK,gBAAgB,IAAI,SAAS;AAAA,OACnC,EACA;AACH,UAAI,MAAM,OAAO,SAAS,IAAI;AAC5B,aAAK,eAAe;AAAA,aACf;AACL,aAAK,eAAe;AAAA,MACtB;AAAA,IACD;AAAA;AAAA,IAED,SAAS;AACP,WAAK,SAAS;AACdW,oBAAAA,KAAG,aAAa;AAAA,QACd,OAAO;AAAA,MACT,CAAC;AAAA,IACF;AAAA,EACF;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACn5BA,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 343c8df..f235fe6 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","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/pkDetail/pkDetail.vue'\nwx.createPage(MiniProgramPage)"],"names":["request","uni","formatDate","wx"],"mappings":";;;;;AAsKA,MAAA,aAAA,MAAA;AAQA,MAAA,YAAA;AAAA,EACE,OAAA;AACE,WAAA;AAAA,MACE,MAAA,CAAA;AAAA;;MAGA,MAAA,CAAA;AAAA,MACA,YAAA;AAAA;;;MAIA,MAAA;AAAA,MACA,iBAAA,CAAA;AAAA;AAAA,MAEA,OAAA;AAAA;;;;;AAMF,QAAA,IAAA,SAAA,QAAA;AACE,aAAA;AAAA;QAEE,MAAA,GAAA,kBAAA,gBAAA,EAAA,SAAA,CAAA,EAAA,KAAA,SAAA,KAAA,KAAA,EAAA;AAAA,MACF;AAAA,IACF;AAAA;EAEF,OAAA,SAAA;;;AAGI,WAAA,yBAAA;AAAA,IACF;;AAIA,iBAAA,GAAA,cAAA,CAAA,SAAA;AACE,WAAA,OAAA,KAAA;AAEAA,iCAAA;AAAA;;;UAII,IAAA,KAAA,KAAA;AAAA;;MAGJ,CAAA,EAAA,KAAA,CAAA,QAAA;AACE,YAAA,IAAA,SAAA,KAAA;;QAEA;AAAA,MACF,CAAA;AAAA,IACF,CAAA;AAEAC,kBAAAA,MAAA,WAAA;AAAA,MACE,KAAA;AAAA,MACA,SAAA,CAAA,QAAA;AACE,aAAA,KAAA,IAAA,KAAA;AAAA;IAEJ,CAAA;AACAA,kBAAAA,MAAA,WAAA;AAAA,MACE,KAAA;AAAA,MACA,SAAA,CAAA,QAAA;;;IAGF,CAAA;AAAA;EAEF,SAAA;AAAA;AAAA;AAGMD,iCAAA;AAAA,QACA,KAAA;AAAA;;;UAIE,QAAA,KAAA;AAAA,UACA,MAAA;AAAA;;MAGJ,CAAA,EAAA,KAAA,CAAA,QAAA;AACE,YAAA,IAAA,SAAA,KAAA;AACE,eAAA,OAAA,IAAA;AAAA;AAEAC,wBAAAA,MAAA,UAAA;AAAA;;;UAIA,CAAA;AAAA,QACF;AAAA,MACF,CAAA;AAAA;;;;;;IAQF,YAAAC,sBAAA;AAAA;IAEA,OAAA,IAAA,OAAA;;AAEI,aAAA,aAAA;AACA,aAAA,uBAAA;AACA,aAAA,0BAAA;AAAA;AAEA,aAAA,aAAA,KAAA,eAAA,KAAA,OAAA;;AAEA,aAAA,0BAAA;AAAA,MACF;AAAA;;AAGAD,oBAAAA,MAAA,aAAA;AAAA,QACE,OAAA;AAAA,QACA,MAAA,MAAA;;;UAGE,CAAA;AAAA,QACF;AAAA,MACF,CAAA;AAAA;IAEF,OAAA;AACE,WAAA,MAAA,MAAA,KAAA,QAAA;AACA,WAAA,SAAA;AAAA;IAEF,SAAA;AACE,UAAA,KAAA,4BAAA,MAAA;AACEA,sBAAAA,MAAA,UAAA;AAAA,UACE,OAAA;AAAA;;QAGF,CAAA;AACA;AAAA,MACF;AACA,WAAA,MAAA,OAAA,KAAA,QAAA;AAAA;;;;;;AAQA,YAAA,SAAA,KAAA,UAAA,KAAA,KAAA,KAAA,uBAAA,CAAA;AACA,YAAA,WAAA,KAAA,UAAA,KAAA,IAAA;AACAA,oBAAAA,MAAA,WAAA;AAAA;MAEA,CAAA;AAAA;;IAGF,QAAA;;;;AAIEE,oBAAAA,KAAA,WAAA;AAAA,QACE,KAAA,iCAAA,KAAA,gBAAA,EAAA,aAAA,KAAA,gBAAA,QAAA,WAAA,KAAA,gBAAA,UAAA;AAAA,MACF,CAAA;AAAA;IAGF,MAAA,WAAA;AACEF,oBAAAA,MAAA,YAAA;AAAA,QACE,OAAA;AAAA,QACA,MAAA;AAAA,MACF,CAAA;;;;;UAKI,QAAA,KAAA;AAAA;;MAGJ,CAAA;AACA,UAAA,IAAA,SAAA,KAAA;;AAEIA,wBAAA,MAAA,YAAA;AACA,eAAA,OAAA,IAAA;AAAA;AAEAA,wBAAA,MAAA,YAAA;AACA,qBAAA,MAAA;;;UAGA,GAAA,GAAA;AAAA,QACF;AAAA;AAEAA,sBAAA,MAAA,YAAA;AACAA,sBAAAA,MAAA,UAAA;AAAA;;;QAIA,CAAA;AAAA,MACF;AAAA;IAGF,oBAAA;AACE,WAAA,MAAA,aAAA;;;;;;AAMN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjXA,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","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/pkDetail/pkDetail.vue'\nwx.createPage(MiniProgramPage)"],"names":["request","uni","formatDate","wx"],"mappings":";;;;;AAmKA,MAAA,aAAA,MAAA;AAEA,MAAA,YAAA;AAAA,EACE,OAAA;AACE,WAAA;AAAA,MACE,MAAA,CAAA;AAAA;;MAGA,MAAA,CAAA;AAAA,MACA,YAAA;AAAA;;;MAIA,MAAA;AAAA,MACA,iBAAA,CAAA;AAAA;;;AAIF,QAAA,IAAA,SAAA,QAAA;AACE,aAAA;AAAA;QAEE,MAAA,GAAA,kBAAA,gBAAA,EAAA,SAAA,CAAA,EAAA,KAAA,SAAA,KAAA,KAAA,EAAA;AAAA,MACF;AAAA,IACF;AAAA;EAEF,OAAA,SAAA;;;AAGI,WAAA,yBAAA;AAAA,IACF;;AAIA,iBAAA,GAAA,cAAA,CAAA,SAAA;AACE,WAAA,OAAA,KAAA;AAEAA,iCAAA;AAAA;;;UAII,IAAA,KAAA,KAAA;AAAA;;MAGJ,CAAA,EAAA,KAAA,CAAA,QAAA;AACE,YAAA,IAAA,SAAA,KAAA;;QAEA;AAAA,MACF,CAAA;AAAA,IACF,CAAA;AAEAC,kBAAAA,MAAA,WAAA;AAAA,MACE,KAAA;AAAA,MACA,SAAA,CAAA,QAAA;AACE,aAAA,KAAA,IAAA,KAAA;AAAA;IAEJ,CAAA;AACAA,kBAAAA,MAAA,WAAA;AAAA,MACE,KAAA;AAAA,MACA,SAAA,CAAA,QAAA;;;IAGF,CAAA;AAAA;EAEF,SAAA;AAAA;AAAA;AAGMD,iCAAA;AAAA,QACA,KAAA;AAAA;;;UAIE,QAAA,KAAA;AAAA,UACA,MAAA;AAAA;;MAGJ,CAAA,EAAA,KAAA,CAAA,QAAA;AACE,YAAA,IAAA,SAAA,KAAA;AACE,eAAA,OAAA,IAAA;AAAA;AAEAC,wBAAAA,MAAA,UAAA;AAAA;;;UAIA,CAAA;AAAA,QACF;AAAA,MACF,CAAA;AAAA;;;;;;IAQF,YAAAC,sBAAA;AAAA;IAEA,OAAA,IAAA,OAAA;;AAEI,aAAA,aAAA;AACA,aAAA,uBAAA;AACA,aAAA,0BAAA;AAAA;AAEA,aAAA,aAAA,KAAA,eAAA,KAAA,OAAA;;AAEA,aAAA,0BAAA;AAAA,MACF;AAAA;;AAGAD,oBAAAA,MAAA,aAAA;AAAA,QACE,OAAA;AAAA,QACA,MAAA,MAAA;;;UAGE,CAAA;AAAA,QACF;AAAA,MACF,CAAA;AAAA;IAEF,OAAA;AACE,WAAA,MAAA,MAAA,KAAA,QAAA;AACA,WAAA,SAAA;AAAA;IAEF,SAAA;AACE,UAAA,KAAA,4BAAA,MAAA;AACEA,sBAAAA,MAAA,UAAA;AAAA,UACE,OAAA;AAAA;;QAGF,CAAA;AACA;AAAA,MACF;AACA,WAAA,MAAA,OAAA,KAAA,QAAA;AAAA;;;;;;AAQA,YAAA,SAAA,KAAA,UAAA,KAAA,KAAA,KAAA,uBAAA,CAAA;AACA,YAAA,WAAA,KAAA,UAAA,KAAA,IAAA;AACAA,oBAAAA,MAAA,WAAA;AAAA;MAEA,CAAA;AAAA;;IAGF,QAAA;;;;AAIEE,oBAAAA,KAAA,WAAA;AAAA,QACE,KAAA,iCAAA,KAAA,gBAAA,EAAA,aAAA,KAAA,gBAAA,QAAA,WAAA,KAAA,gBAAA,UAAA;AAAA,MACF,CAAA;AAAA;IAGF,MAAA,WAAA;AACEF,oBAAAA,MAAA,YAAA;AAAA,QACE,OAAA;AAAA,QACA,MAAA;AAAA,MACF,CAAA;;;;;UAKI,QAAA,KAAA;AAAA;;MAGJ,CAAA;AACA,UAAA,IAAA,SAAA,KAAA;;AAEIA,wBAAA,MAAA,YAAA;AACA,eAAA,OAAA,IAAA;AAAA;AAEAA,wBAAA,MAAA,YAAA;AACA,qBAAA,MAAA;;;UAGA,GAAA,GAAA;AAAA,QACF;AAAA;AAEAA,sBAAA,MAAA,YAAA;AACAA,sBAAAA,MAAA,UAAA;AAAA;;;QAIA,CAAA;AAAA,MACF;AAAA;IAGF,oBAAA;AACE,WAAA,MAAA,aAAA;;;;;;AAMN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpWA,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/recompose.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/recompose.js.map index b154e07..bdd913d 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/recompose.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/recompose.js.map @@ -1 +1 @@ -{"version":3,"file":"recompose.js","sources":["pages/Mine/minecomponents/recompose/recompose.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n"],"names":["optionsArray","formatDate","uni","request"],"mappings":";;;;;AAgNA,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;AAAA,MACT,SAAS;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA;AAAA,MAChB,IAAI;AAAA;AAAA,MACJ,aAAa;AAAA;AAAA,MACb,YAAY;AAAA;AAAA,MACZ,YAAY,CAAE;AAAA;AAAA,MACd,YAAY;AAAA;AAAA,MACZ,gBAAgB;AAAA;AAAA,MAChB,sBAAsB;AAAA;AAAA,MACtB,UAAU;AAAA;AAAA;EAEb;AAAA,EACD,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,IACP;AAAA,EACF;AAAA,EACD,OAAO;AAAA,IACL,QAAQ,aAAa,aAAa;AAChC,WAAK,cAAc,YAAY;AAC/B,WAAK,UAAU,YAAY;AAC3B,WAAK,UAAU,YAAY;AAC3B,WAAK,iBAAiBC,sBAAAA,WAAW,YAAY,MAAM;AACnD,WAAK,KAAK,YAAY;AACtB,WAAK,aAAa,YAAY;AAC9B,WAAK,WAAW,YAAY;AAC5B,WAAK,UAAU,YAAY,QAAQ,MAAM,IAAI;AAC7C,WAAK,uBAAuB,YAAY,WAAW,MAAM,GAAG,EAAE;AAC9D,WAAK,WAAW,YAAY;AAAA,IAC7B;AAAA,EACF;AAAA,EACD,SAAS;AAAA;AAAA,IAEP,QAAQ;AACN,WAAK,MAAM,MAAM;IAClB;AAAA;AAAA,IAED,SAAS;AACP,UAAI,KAAK,YAAY;AACnB,aAAK,aAAa,KAAK,eAAe;AACtC,aAAK,uBAAuB,KAAK,eAAe;AAChD,aAAK,UAAU,KAAK,eAAe;AACnC,aAAK,WAAW,KAAK,eAAe;AACpC,aAAK,MAAK;AAAA,aACL;AACLC,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA;AAAA,IAED,OAAO,IAAI,MAAM;AACf,UAAI,KAAK,eAAe,IAAI;AAC1B,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,aACjB;AACL,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,MACxB;AAAA,IACD;AAAA;AAAA,IAED,gBAAgB;AACFC,iCAAQ;AAAA,QAClB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,QACV;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,EAAE,KAAK,CAAC,QAAQ;AACf,aAAK,YAAY;AACjB,YAAI,IAAI,QAAQ,KAAK;AACnB,eAAK,aAAa,IAAI;AAAA,eACjB;AACLD,uGAAY,IAAI,GAAG;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACF;AAAA;AAAA,IAED,mBAAmB;AACjB,WAAK,MAAM,MAAM,KAAK,QAAQ;AAC9B,WAAK,cAAa;AAAA,IACnB;AAAA;AAAA,IAED,OAAO,MAAM;AACX,WAAK,UAAU,KAAK;AAAA,IACrB;AAAA;AAAA,IAED,QAAQ,MAAM;AACZ,WAAK,WAAW,KAAK;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQD,OAAO;AACL,UAAI,KAAK,SAAS;AAChB,aAAK,UAAU;AACf,aAAK,OAAO;AAAA,aACP;AACL,aAAK,UAAU;AAAA,MACjB;AAAA,IACD;AAAA;AAAA,IAED,KAAK,OAAO;AACV,UAAI,KAAK,eAAe,MAAM,OAAO,OAAO;AAC1C,aAAK,aAAa,MAAM,OAAO;AAC/BA,sBAAAA,MAAI,YAAY;AAAA,UACd,OAAO;AAAA,UACP,MAAM;AAAA,QACR,CAAC;AACDA,sBAAAA,MAAI,QAAQ;AAAA,UACV,KAAK,mCAAmC,KAAK;AAAA,UAC7C,SAAS,CAAC,QAAQ;AAChB,gBAAI,IAAI,KAAK,SAAS,KAAK;AACzBA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AACD,mBAAK,uBAAuB,IAAI,KAAK;AAAA,mBAChC;AACLA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AAAA,YACH;AAAA,UACD;AAAA,UACD,MAAM,SAAU,KAAK;AACnBA,0BAAG,MAAC,YAAW;AACfA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,cACN,UAAU;AAAA,YACZ,CAAC;AAAA,UACF;AAAA,QACH,CAAC;AAAA,aACI;AACL;AAAA,MACF;AAAA,IACD;AAAA,IACD,MAAM,UAAU;AAEd,UACG,KAAK,cAAc,MAAM,KAAK,cAAc,QAC5C,KAAK,WAAW,KAAK,KAAK,WAAW,QACrC,KAAK,eAAe,MAAM,KAAK,eAAe,QAC9C,KAAK,kBAAkB,MAAM,KAAK,kBAAkB,QACpD,KAAK,YAAY,MAAM,IAAI,YAAY,QACvC,KAAK,kBAAkB,MAAM,KAAK,kBAAkB,QACpD,KAAK,WAAW,MAAM,KAAK,WAAW,MACvC;AACA,aAAK,OAAO;AACZ;AAAA,MACF;AAEA,UAAI,KAAK,QAAQ,SAAS,KAAK,UAAU,GAAG;AAC1CA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD;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;AAED,YAAM,MAAM,MAAMC,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,UACT,UAAU,KAAK;AAAA,UACf,QAAQ,KAAK;AAAA,UACb,KAAK,KAAK;AAAA,UACV,SAAS,KAAK;AAAA,UACd,MAAM,KAAK;AAAA,UACX,QAAQ,KAAK;AAAA,UACb,UAAU,KAAK;AAAA,UACf,YAAY,KAAK;AAAA,UACjB,UAAU,KAAK;AAAA,QAChB;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;AACtB,aAAK,UAAU;AACfD,sBAAG,MAAC,YAAW;AACf,aAAK,MAAM,SAAS;AACpBA,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":"recompose.js","sources":["pages/Mine/minecomponents/recompose/recompose.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n"],"names":["optionsArray","formatDate","uni","request"],"mappings":";;;;;AAiNA,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;AAAA,MACT,SAAS;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA;AAAA,MAChB,IAAI;AAAA;AAAA,MACJ,aAAa;AAAA;AAAA,MACb,YAAY;AAAA;AAAA,MACZ,YAAY,CAAE;AAAA;AAAA,MACd,YAAY;AAAA;AAAA,MACZ,gBAAgB;AAAA;AAAA,MAChB,sBAAsB;AAAA;AAAA,MACtB,UAAU;AAAA;AAAA;EAEb;AAAA,EACD,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,IACP;AAAA,EACF;AAAA,EACD,OAAO;AAAA,IACL,QAAQ,aAAa,aAAa;AAChC,WAAK,cAAc,YAAY;AAC/B,WAAK,UAAU,YAAY;AAC3B,WAAK,UAAU,YAAY;AAC3B,WAAK,iBAAiBC,sBAAAA,WAAW,YAAY,MAAM;AACnD,WAAK,KAAK,YAAY;AACtB,WAAK,aAAa,YAAY;AAC9B,WAAK,WAAW,YAAY;AAC5B,WAAK,UAAU,YAAY,QAAQ,MAAM,IAAI;AAC7C,WAAK,uBAAuB,YAAY,WAAW,MAAM,GAAG,EAAE;AAC9D,WAAK,WAAW,YAAY;AAAA,IAC7B;AAAA,EACF;AAAA,EACD,SAAS;AAAA;AAAA,IAEP,QAAQ;AACN,WAAK,MAAM,MAAM;IAClB;AAAA;AAAA,IAED,SAAS;AACP,UAAI,KAAK,YAAY;AACnB,aAAK,aAAa,KAAK,eAAe;AACtC,aAAK,uBAAuB,KAAK,eAAe;AAChD,aAAK,UAAU,KAAK,eAAe;AACnC,aAAK,WAAW,KAAK,eAAe;AACpC,aAAK,MAAK;AAAA,aACL;AACLC,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACD;AAAA;AAAA,IAED,OAAO,IAAI,MAAM;AACf,UAAI,KAAK,eAAe,IAAI;AAC1B,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,aACjB;AACL,aAAK,aAAa;AAClB,aAAK,iBAAiB;AAAA,MACxB;AAAA,IACD;AAAA;AAAA,IAED,gBAAgB;AACFC,iCAAQ;AAAA,QAClB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,QACV;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,EAAE,KAAK,CAAC,QAAQ;AACf,aAAK,YAAY;AACjB,YAAI,IAAI,QAAQ,KAAK;AACnB,eAAK,aAAa,IAAI;AAAA,eACjB;AACLD,uGAAY,IAAI,GAAG;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACF;AAAA;AAAA,IAED,mBAAmB;AACjB,WAAK,MAAM,MAAM,KAAK,QAAQ;AAC9B,WAAK,cAAa;AAAA,IACnB;AAAA;AAAA,IAED,OAAO,MAAM;AACX,WAAK,UAAU,KAAK;AAAA,IACrB;AAAA;AAAA,IAED,QAAQ,MAAM;AACZ,WAAK,WAAW,KAAK;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQD,OAAO;AACL,UAAI,KAAK,SAAS;AAChB,aAAK,UAAU;AACf,aAAK,OAAO;AAAA,aACP;AACL,aAAK,UAAU;AAAA,MACjB;AAAA,IACD;AAAA;AAAA,IAED,KAAK,OAAO;AACV,UAAI,KAAK,eAAe,MAAM,OAAO,OAAO;AAC1C,aAAK,aAAa,MAAM,OAAO;AAC/BA,sBAAAA,MAAI,YAAY;AAAA,UACd,OAAO;AAAA,UACP,MAAM;AAAA,QACR,CAAC;AACDA,sBAAAA,MAAI,QAAQ;AAAA,UACV,KAAK,mCAAmC,KAAK;AAAA,UAC7C,SAAS,CAAC,QAAQ;AAChB,gBAAI,IAAI,KAAK,SAAS,KAAK;AACzBA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AACD,mBAAK,uBAAuB,IAAI,KAAK;AAAA,mBAChC;AACLA,4BAAG,MAAC,YAAW;AACfA,4BAAAA,MAAI,UAAU;AAAA,gBACZ,OAAO;AAAA,gBACP,MAAM;AAAA,gBACN,UAAU;AAAA,cACZ,CAAC;AAAA,YACH;AAAA,UACD;AAAA,UACD,MAAM,SAAU,KAAK;AACnBA,0BAAG,MAAC,YAAW;AACfA,0BAAAA,MAAI,UAAU;AAAA,cACZ,OAAO;AAAA,cACP,MAAM;AAAA,cACN,UAAU;AAAA,YACZ,CAAC;AAAA,UACF;AAAA,QACH,CAAC;AAAA,aACI;AACL;AAAA,MACF;AAAA,IACD;AAAA,IACD,MAAM,UAAU;AAEd,UACG,KAAK,cAAc,MAAM,KAAK,cAAc,QAC5C,KAAK,WAAW,KAAK,KAAK,WAAW,QACrC,KAAK,eAAe,MAAM,KAAK,eAAe,QAC9C,KAAK,kBAAkB,MAAM,KAAK,kBAAkB,QACpD,KAAK,YAAY,MAAM,IAAI,YAAY,QACvC,KAAK,kBAAkB,MAAM,KAAK,kBAAkB,QACpD,KAAK,WAAW,MAAM,KAAK,WAAW,MACvC;AACA,aAAK,OAAO;AACZ;AAAA,MACF;AAEA,UAAI,KAAK,QAAQ,SAAS,KAAK,UAAU,GAAG;AAC1CA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AACD;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;AAED,YAAM,MAAM,MAAMC,2BAAQ;AAAA,QACxB,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACJ,IAAI,KAAK;AAAA,UACT,UAAU,KAAK;AAAA,UACf,QAAQ,KAAK;AAAA,UACb,KAAK,KAAK;AAAA,UACV,SAAS,KAAK;AAAA,UACd,MAAM,KAAK;AAAA,UACX,QAAQ,KAAK;AAAA,UACb,UAAU,KAAK;AAAA,UACf,YAAY,KAAK;AAAA,UACjB,UAAU,KAAK;AAAA,QAChB;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;AACtB,aAAK,UAAU;AACfD,sBAAG,MAAC,YAAW;AACf,aAAK,MAAM,SAAS;AACpBA,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/mp-weixin/NewAddedPk.js b/unpackage/dist/dev/mp-weixin/NewAddedPk.js index 10b9032..0ab141f 100644 --- a/unpackage/dist/dev/mp-weixin/NewAddedPk.js +++ b/unpackage/dist/dev/mp-weixin/NewAddedPk.js @@ -335,7 +335,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { B: common_vendor.p({ type: "textarea", placeholder: "备注", - maxlength: "-1", + maxlength: 50, modelValue: $data.remarks }), C: common_vendor.o(($event) => $options.Publish()), diff --git a/unpackage/dist/dev/mp-weixin/common/vendor.js b/unpackage/dist/dev/mp-weixin/common/vendor.js index 9066003..55fc2d4 100644 --- a/unpackage/dist/dev/mp-weixin/common/vendor.js +++ b/unpackage/dist/dev/mp-weixin/common/vendor.js @@ -18,9 +18,9 @@ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i3 = arr.indexOf(el); - if (i3 > -1) { - arr.splice(i3, 1); + const i2 = arr.indexOf(el); + if (i2 > -1) { + arr.splice(i2, 1); } }; const hasOwnProperty$2 = Object.prototype.hasOwnProperty; @@ -58,7 +58,7 @@ const cacheStringFunction = (fn2) => { }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_2, c3) => c3 ? c3.toUpperCase() : ""); + return str.replace(camelizeRE, (_2, c2) => c2 ? c2.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction( @@ -68,13 +68,13 @@ const capitalize = cacheStringFunction((str) => { return str.charAt(0).toUpperCase() + str.slice(1); }); const toHandlerKey = cacheStringFunction((str) => { - const s3 = str ? `on${capitalize(str)}` : ``; - return s3; + const s2 = str ? `on${capitalize(str)}` : ``; + return s2; }); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns$1 = (fns, arg) => { - for (let i3 = 0; i3 < fns.length; i3++) { - fns[i3](arg); + for (let i2 = 0; i2 < fns.length; i2++) { + fns[i2](arg); } }; const def = (obj, key, value) => { @@ -91,8 +91,8 @@ const looseToNumber = (val2) => { function normalizeStyle(value) { if (isArray(value)) { const res = {}; - for (let i3 = 0; i3 < value.length; i3++) { - const item = value[i3]; + for (let i2 = 0; i2 < value.length; i2++) { + const item = value[i2]; const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); if (normalized) { for (const key in normalized) { @@ -123,8 +123,8 @@ function normalizeClass(value) { if (isString(value)) { res = value; } else if (isArray(value)) { - for (let i3 = 0; i3 < value.length; i3++) { - const normalized = normalizeClass(value[i3]); + for (let i2 = 0; i2 < value.length; i2++) { + const normalized = normalizeClass(value[i2]); if (normalized) { res += normalized + " "; } @@ -147,8 +147,8 @@ const replacer = (_key, val2) => { } else if (isMap(val2)) { return { [`Map(${val2.size})`]: [...val2.entries()].reduce( - (entries, [key, val22], i3) => { - entries[stringifySymbol(key, i3) + " =>"] = val22; + (entries, [key, val22], i2) => { + entries[stringifySymbol(key, i2) + " =>"] = val22; return entries; }, {} @@ -156,7 +156,7 @@ const replacer = (_key, val2) => { }; } else if (isSet(val2)) { return { - [`Set(${val2.size})`]: [...val2.values()].map((v3) => stringifySymbol(v3)) + [`Set(${val2.size})`]: [...val2.values()].map((v2) => stringifySymbol(v2)) }; } else if (isSymbol(val2)) { return stringifySymbol(val2); @@ -165,9 +165,9 @@ const replacer = (_key, val2) => { } return val2; }; -const stringifySymbol = (v3, i3 = "") => { +const stringifySymbol = (v2, i2 = "") => { var _a; - return isSymbol(v3) ? `Symbol(${(_a = v3.description) != null ? _a : i3})` : v3; + return isSymbol(v2) ? `Symbol(${(_a = v2.description) != null ? _a : i2})` : v2; }; const isObject = (val2) => val2 !== null && typeof val2 === "object"; const defaultDelimiters = ["{", "}"]; @@ -496,8 +496,8 @@ function addLeadingSlash(str) { } const invokeArrayFns = (fns, arg) => { let ret; - for (let i3 = 0; i3 < fns.length; i3++) { - ret = fns[i3](arg); + for (let i2 = 0; i2 < fns.length; i2++) { + ret = fns[i2](arg); } return ret; }; @@ -641,9 +641,9 @@ function invokeCreateVueAppHook(app) { const invokeCreateErrorHandler = once((app, createErrorHandler2) => { return createErrorHandler2(app); }); -const E$2 = function() { +const E$1 = function() { }; -E$2.prototype = { +E$1.prototype = { _id: 1, on: function(name, callback, ctx) { var e3 = this.e || (this.e = {}); @@ -666,10 +666,10 @@ E$2.prototype = { emit: function(name) { var data = [].slice.call(arguments, 1); var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); - var i3 = 0; + var i2 = 0; var len = evtArr.length; - for (i3; i3 < len; i3++) { - evtArr[i3].fn.apply(evtArr[i3].ctx, data); + for (i2; i2 < len; i2++) { + evtArr[i2].fn.apply(evtArr[i2].ctx, data); } return this; }, @@ -678,9 +678,9 @@ E$2.prototype = { var evts = e3[name]; var liveEvents = []; if (evts && event) { - for (var i3 = evts.length - 1; i3 >= 0; i3--) { - if (evts[i3].fn === event || evts[i3].fn._ === event || evts[i3]._id === event) { - evts.splice(i3, 1); + for (var i2 = evts.length - 1; i2 >= 0; i2--) { + if (evts[i2].fn === event || evts[i2].fn._ === event || evts[i2]._id === event) { + evts.splice(i2, 1); break; } } @@ -690,7 +690,7 @@ E$2.prototype = { return this; } }; -var E$1$1 = E$2; +var E$1$1 = E$1; /** * @dcloudio/uni-mp-vue v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -745,16 +745,16 @@ class EffectScope { } stop(fromParent) { if (this._active) { - let i3, l2; - for (i3 = 0, l2 = this.effects.length; i3 < l2; i3++) { - this.effects[i3].stop(); + let i2, l2; + for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) { + this.effects[i2].stop(); } - for (i3 = 0, l2 = this.cleanups.length; i3 < l2; i3++) { - this.cleanups[i3](); + for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) { + this.cleanups[i2](); } if (this.scopes) { - for (i3 = 0, l2 = this.scopes.length; i3 < l2; i3++) { - this.scopes[i3].stop(true); + for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) { + this.scopes[i2].stop(true); } } if (!this.detached && this.parent && !fromParent) { @@ -808,8 +808,8 @@ class ReactiveEffect { if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { this._dirtyLevel = 1; pauseTracking(); - for (let i3 = 0; i3 < this._depsLength; i3++) { - const dep = this.deps[i3]; + for (let i2 = 0; i2 < this._depsLength; i2++) { + const dep = this.deps[i2]; if (dep.computed) { triggerComputed(dep.computed); if (this._dirtyLevel >= 4) { @@ -824,8 +824,8 @@ class ReactiveEffect { } return this._dirtyLevel >= 4; } - set dirty(v3) { - this._dirtyLevel = v3 ? 4 : 0; + set dirty(v2) { + this._dirtyLevel = v2 ? 4 : 0; } run() { this._dirtyLevel = 0; @@ -866,8 +866,8 @@ function preCleanupEffect(effect2) { } function postCleanupEffect(effect2) { if (effect2.deps.length > effect2._depsLength) { - for (let i3 = effect2._depsLength; i3 < effect2.deps.length; i3++) { - cleanupDepEffect(effect2.deps[i3], effect2); + for (let i2 = effect2._depsLength; i2 < effect2.deps.length; i2++) { + cleanupDepEffect(effect2.deps[i2], effect2); } effect2.deps.length = effect2._depsLength; } @@ -1052,8 +1052,8 @@ function createArrayInstrumentations() { ["includes", "indexOf", "lastIndexOf"].forEach((key) => { instrumentations[key] = function(...args) { const arr = toRaw(this); - for (let i3 = 0, l2 = this.length; i3 < l2; i3++) { - track(arr, "get", i3 + ""); + for (let i2 = 0, l2 = this.length; i2 < l2; i2++) { + track(arr, "get", i2 + ""); } const res = arr[key](...args); if (res === -1 || res === false) { @@ -1216,7 +1216,7 @@ const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( ); const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; -const getProto = (v3) => Reflect.getPrototypeOf(v3); +const getProto = (v2) => Reflect.getPrototypeOf(v2); function get(target, key, isReadonly2 = false, isShallow2 = false) { target = target["__v_raw"]; const rawTarget = toRaw(target); @@ -1648,8 +1648,8 @@ getter: `, this.getter); get _dirty() { return this.effect.dirty; } - set _dirty(v3) { - this.effect.dirty = v3; + set _dirty(v2) { + this.effect.dirty = v2; } // #endregion } @@ -1830,9 +1830,9 @@ function warn$1(msg, ...args) { instance, 11, [ - msg + args.map((a3) => { + msg + args.map((a2) => { var _a, _b; - return (_b = (_a = a3.toString) == null ? void 0 : _a.call(a3)) != null ? _b : JSON.stringify(a3); + return (_b = (_a = a2.toString) == null ? void 0 : _a.call(a2)) != null ? _b : JSON.stringify(a2); }).join(""), instance && instance.proxy, trace.map( @@ -1875,8 +1875,8 @@ function getComponentTrace() { } function formatTrace(trace) { const logs = []; - trace.forEach((entry, i3) => { - logs.push(...i3 === 0 ? [] : [` + trace.forEach((entry, i2) => { + logs.push(...i2 === 0 ? [] : [` `], ...formatTraceEntry(entry)); }); return logs; @@ -1968,8 +1968,8 @@ function callWithAsyncErrorHandling(fn2, instance, type, args) { return res; } const values = []; - for (let i3 = 0; i3 < fn2.length; i3++) { - values.push(callWithAsyncErrorHandling(fn2[i3], instance, type, args)); + for (let i2 = 0; i2 < fn2.length; i2++) { + values.push(callWithAsyncErrorHandling(fn2[i2], instance, type, args)); } return values; } @@ -1982,8 +1982,8 @@ function handleError(err, instance, type, throwInDev = true) { while (cur) { const errorCapturedHooks = cur.ec; if (errorCapturedHooks) { - for (let i3 = 0; i3 < errorCapturedHooks.length; i3++) { - if (errorCapturedHooks[i3](err, exposedInstance, errorInfo) === false) { + for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) { + if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) { return; } } @@ -2031,8 +2031,8 @@ const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; const RECURSION_LIMIT = 100; function nextTick$1(fn2) { - const p22 = currentFlushPromise || resolvedPromise; - return fn2 ? p22.then(this ? fn2.bind(this) : fn2) : p22; + const p2 = currentFlushPromise || resolvedPromise; + return fn2 ? p2.then(this ? fn2.bind(this) : fn2) : p2; } function findInsertionIndex(id) { let start = flushIndex + 1; @@ -2072,9 +2072,9 @@ function hasQueueJob(job) { return queue$1.indexOf(job) > -1; } function invalidateJob(job) { - const i3 = queue$1.indexOf(job); - if (i3 > flushIndex) { - queue$1.splice(i3, 1); + const i2 = queue$1.indexOf(job); + if (i2 > flushIndex) { + queue$1.splice(i2, 1); } } function queuePostFlushCb(cb) { @@ -2090,18 +2090,18 @@ function queuePostFlushCb(cb) { } queueFlush(); } -function flushPreFlushCbs(instance, seen, i3 = isFlushing ? flushIndex + 1 : 0) { +function flushPreFlushCbs(instance, seen, i2 = isFlushing ? flushIndex + 1 : 0) { { seen = seen || /* @__PURE__ */ new Map(); } - for (; i3 < queue$1.length; i3++) { - const cb = queue$1[i3]; + for (; i2 < queue$1.length; i2++) { + const cb = queue$1[i2]; if (cb && cb.pre) { if (checkRecursiveUpdates(seen, cb)) { continue; } - queue$1.splice(i3, 1); - i3--; + queue$1.splice(i2, 1); + i2--; cb(); } } @@ -2109,7 +2109,7 @@ function flushPreFlushCbs(instance, seen, i3 = isFlushing ? flushIndex + 1 : 0) function flushPostFlushCbs(seen) { if (pendingPostFlushCbs.length) { const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a3, b2) => getId(a3) - getId(b2) + (a2, b2) => getId(a2) - getId(b2) ); pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { @@ -2131,12 +2131,12 @@ function flushPostFlushCbs(seen) { } } const getId = (job) => job.id == null ? Infinity : job.id; -const comparator = (a3, b2) => { - const diff2 = getId(a3) - getId(b2); +const comparator = (a2, b2) => { + const diff2 = getId(a2) - getId(b2); if (diff2 === 0) { - if (a3.pre && !b2.pre) + if (a2.pre && !b2.pre) return -1; - if (b2.pre && !a3.pre) + if (b2.pre && !a2.pre) return 1; } return diff2; @@ -2329,7 +2329,7 @@ function emit(instance, event, ...rawArgs) { const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; const { number, trim } = props[modifiersKey] || EMPTY_OBJ; if (trim) { - args = rawArgs.map((a3) => isString(a3) ? a3.trim() : a3); + args = rawArgs.map((a2) => isString(a2) ? a2.trim() : a2); } if (number) { args = rawArgs.map(looseToNumber); @@ -2525,10 +2525,10 @@ function doWatch(source, cb, { ); } } - const warnInvalidSource = (s22) => { + const warnInvalidSource = (s2) => { warn$1( `Invalid watch source: `, - s22, + s2, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` ); }; @@ -2548,16 +2548,16 @@ function doWatch(source, cb, { forceTrigger = true; } else if (isArray(source)) { isMultiSource = true; - forceTrigger = source.some((s22) => isReactive(s22) || isShallow(s22)); - getter = () => source.map((s22) => { - if (isRef(s22)) { - return s22.value; - } else if (isReactive(s22)) { - return reactiveGetter(s22); - } else if (isFunction(s22)) { - return callWithErrorHandling(s22, instance, 2); + forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2)); + getter = () => source.map((s2) => { + if (isRef(s2)) { + return s2.value; + } else if (isReactive(s2)) { + return reactiveGetter(s2); + } else if (isFunction(s2)) { + return callWithErrorHandling(s2, instance, 2); } else { - warnInvalidSource(s22); + warnInvalidSource(s2); } }); } else if (isFunction(source)) { @@ -2598,7 +2598,7 @@ function doWatch(source, cb, { } if (cb) { const newValue = effect2.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v3, i3) => hasChanged(v3, oldValue[i3])) : hasChanged(newValue, oldValue)) || false) { + if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i2) => hasChanged(v2, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) { if (cleanup) { cleanup(); } @@ -2673,8 +2673,8 @@ function createPathGetter(ctx, path) { const segments = path.split("."); return () => { let cur = ctx; - for (let i3 = 0; i3 < segments.length && cur; i3++) { - cur = cur[segments[i3]]; + for (let i2 = 0; i2 < segments.length && cur; i2++) { + cur = cur[segments[i2]]; } return cur; }; @@ -2697,12 +2697,12 @@ function traverse(value, depth, currentDepth = 0, seen) { if (isRef(value)) { traverse(value.value, depth, currentDepth, seen); } else if (isArray(value)) { - for (let i3 = 0; i3 < value.length; i3++) { - traverse(value[i3], depth, currentDepth, seen); + for (let i2 = 0; i2 < value.length; i2++) { + traverse(value[i2], depth, currentDepth, seen); } } else if (isSet(value) || isMap(value)) { - value.forEach((v3) => { - traverse(v3, depth, currentDepth, seen); + value.forEach((v2) => { + traverse(v2, depth, currentDepth, seen); }); } else if (isPlainObject$1(value)) { for (const key in value) { @@ -2760,7 +2760,7 @@ function createAppAPI(render, hydrate) { get config() { return context.config; }, - set config(v3) { + set config(v2) { { warn$1( `app.config cannot be replaced. Modify individual options instead.` @@ -2978,15 +2978,15 @@ const onRenderTracked = createHook( function onErrorCaptured(hook, target = currentInstance) { injectHook("ec", hook, target); } -const getPublicInstance = (i3) => { - if (!i3) +const getPublicInstance = (i2) => { + if (!i2) return null; - if (isStatefulComponent(i3)) - return getExposeProxy(i3) || i3.proxy; - return getPublicInstance(i3.parent); + if (isStatefulComponent(i2)) + return getExposeProxy(i2) || i2.proxy; + return getPublicInstance(i2.parent); }; -function getComponentInternalInstance(i3) { - return i3; +function getComponentInternalInstance(i2) { + return i2; } const publicPropertiesMap = ( // Move PURE marker to new line to workaround compiler discarding it @@ -2996,22 +2996,22 @@ const publicPropertiesMap = ( $: getComponentInternalInstance, // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的 // $el: i => i.vnode.el, - $el: (i3) => i3.__$el || (i3.__$el = {}), - $data: (i3) => i3.data, - $props: (i3) => shallowReadonly(i3.props), - $attrs: (i3) => shallowReadonly(i3.attrs), - $slots: (i3) => shallowReadonly(i3.slots), - $refs: (i3) => shallowReadonly(i3.refs), - $parent: (i3) => getPublicInstance(i3.parent), - $root: (i3) => getPublicInstance(i3.root), - $emit: (i3) => i3.emit, - $options: (i3) => resolveMergedOptions(i3), - $forceUpdate: (i3) => i3.f || (i3.f = () => { - i3.effect.dirty = true; - queueJob(i3.update); + $el: (i2) => i2.__$el || (i2.__$el = {}), + $data: (i2) => i2.data, + $props: (i2) => shallowReadonly(i2.props), + $attrs: (i2) => shallowReadonly(i2.attrs), + $slots: (i2) => shallowReadonly(i2.slots), + $refs: (i2) => shallowReadonly(i2.refs), + $parent: (i2) => getPublicInstance(i2.parent), + $root: (i2) => getPublicInstance(i2.root), + $emit: (i2) => i2.emit, + $options: (i2) => resolveMergedOptions(i2), + $forceUpdate: (i2) => i2.f || (i2.f = () => { + i2.effect.dirty = true; + queueJob(i2.update); }), // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx - $watch: (i3) => instanceWatch.bind(i3) + $watch: (i2) => instanceWatch.bind(i2) }) ); const isReservedPrefix = (key) => key === "_" || key === "$"; @@ -3210,7 +3210,7 @@ function exposeSetupStateOnRenderContext(instance) { } function normalizePropsOrEmits(props) { return isArray(props) ? props.reduce( - (normalized, p22) => (normalized[p22] = null, normalized), + (normalized, p2) => (normalized[p2] = null, normalized), {} ) : props; } @@ -3349,15 +3349,15 @@ function applyOptions$1(instance) { `Write operation failed: computed property "${key}" is readonly.` ); }; - const c22 = computed({ + const c2 = computed({ get: get2, set: set2 }); Object.defineProperty(ctx, key, { enumerable: true, configurable: true, - get: () => c22.value, - set: (v3) => c22.value = v3 + get: () => c2.value, + set: (v2) => c2.value = v2 }); { checkDuplicateProperties("Computed", key); @@ -3456,7 +3456,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) enumerable: true, configurable: true, get: () => injected.value, - set: (v3) => injected.value = v3 + set: (v2) => injected.value = v2 }); } else { ctx[key] = injected; @@ -3468,7 +3468,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) } function callHook$1(hook, instance, type) { callWithAsyncErrorHandling( - isArray(hook) ? hook.map((h22) => h22.bind(instance.proxy)) : hook.bind(instance.proxy), + isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type ); @@ -3519,7 +3519,7 @@ function resolveMergedOptions(instance) { resolved = {}; if (globalMixins.length) { globalMixins.forEach( - (m22) => mergeOptions(resolved, m22, optionMergeStrategies, true) + (m2) => mergeOptions(resolved, m2, optionMergeStrategies, true) ); } mergeOptions(resolved, base, optionMergeStrategies); @@ -3536,7 +3536,7 @@ function mergeOptions(to2, from, strats, asMixin = false) { } if (mixins) { mixins.forEach( - (m22) => mergeOptions(to2, m22, strats, true) + (m2) => mergeOptions(to2, m2, strats, true) ); } for (const key in from) { @@ -3602,8 +3602,8 @@ function mergeInject(to2, from) { function normalizeInject(raw) { if (isArray(raw)) { const res = {}; - for (let i3 = 0; i3 < raw.length; i3++) { - res[raw[i3]] = raw[i3]; + for (let i2 = 0; i2 < raw.length; i2++) { + res[raw[i2]] = raw[i2]; } return res; } @@ -3683,8 +3683,8 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) { ) { if (patchFlag & 8) { const propsToUpdate = instance.vnode.dynamicProps; - for (let i3 = 0; i3 < propsToUpdate.length; i3++) { - let key = propsToUpdate[i3]; + for (let i2 = 0; i2 < propsToUpdate.length; i2++) { + let key = propsToUpdate[i2]; if (isEmitListener(instance.emitsOptions, key)) { continue; } @@ -3786,8 +3786,8 @@ function setFullProps(instance, rawProps, props, attrs) { if (needCastKeys) { const rawCurrentProps = toRaw(props); const castValues = rawCastValues || EMPTY_OBJ; - for (let i3 = 0; i3 < needCastKeys.length; i3++) { - const key = needCastKeys[i3]; + for (let i2 = 0; i2 < needCastKeys.length; i2++) { + const key = needCastKeys[i2]; props[key] = resolvePropValue$1( options, rawCurrentProps, @@ -3873,11 +3873,11 @@ function normalizePropsOptions(comp, appContext, asMixin = false) { return EMPTY_ARR; } if (isArray(raw)) { - for (let i3 = 0; i3 < raw.length; i3++) { - if (!isString(raw[i3])) { - warn$1(`props must be strings when using array syntax.`, raw[i3]); + for (let i2 = 0; i2 < raw.length; i2++) { + if (!isString(raw[i2])) { + warn$1(`props must be strings when using array syntax.`, raw[i2]); } - const normalizedKey = camelize(raw[i3]); + const normalizedKey = camelize(raw[i2]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } @@ -3935,8 +3935,8 @@ function getType$1(ctor) { } return ""; } -function isSameType(a3, b2) { - return getType$1(a3) === getType$1(b2); +function isSameType(a2, b2) { + return getType$1(a2) === getType$1(b2); } function getTypeIndex(type, expectedTypes) { if (isArray(expectedTypes)) { @@ -3975,8 +3975,8 @@ function validateProp$1(name, value, prop, props, isAbsent) { let isValid = false; const types = isArray(type) ? type : [type]; const expectedTypes = []; - for (let i3 = 0; i3 < types.length && !isValid; i3++) { - const { valid, expectedType } = assertType$1(value, types[i3]); + for (let i2 = 0; i2 < types.length && !isValid; i2++) { + const { valid, expectedType } = assertType$1(value, types[i2]); expectedTypes.push(expectedType || ""); isValid = valid; } @@ -4204,11 +4204,11 @@ const getCurrentInstance = () => currentInstance || currentRenderingInstance; let internalSetCurrentInstance; let setInSSRSetupState; { - internalSetCurrentInstance = (i3) => { - currentInstance = i3; + internalSetCurrentInstance = (i2) => { + currentInstance = i2; }; - setInSSRSetupState = (v3) => { - isInSSRComponentSetup = v3; + setInSSRSetupState = (v2) => { + isInSSRComponentSetup = v2; }; } const setCurrentInstance = (instance) => { @@ -4256,14 +4256,14 @@ function setupStatefulComponent(instance, isSSR) { } if (Component2.components) { const names = Object.keys(Component2.components); - for (let i3 = 0; i3 < names.length; i3++) { - validateComponentName(names[i3], instance.appContext.config); + for (let i2 = 0; i2 < names.length; i2++) { + validateComponentName(names[i2], instance.appContext.config); } } if (Component2.directives) { const names = Object.keys(Component2.directives); - for (let i3 = 0; i3 < names.length; i3++) { - validateDirectiveName(names[i3]); + for (let i2 = 0; i2 < names.length; i2++) { + validateDirectiveName(names[i2]); } } if (Component2.compilerOptions && isRuntimeOnly()) { @@ -4441,7 +4441,7 @@ function getExposeProxy(instance) { } } const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, (c22) => c22.toUpperCase()).replace(/[-_]/g, ""); +const classify = (str) => str.replace(classifyRE, (c2) => c2.toUpperCase()).replace(/[-_]/g, ""); function getComponentName(Component2, includeInferred = true) { return isFunction(Component2) ? Component2.displayName || Component2.name : Component2.name || includeInferred && Component2.__name; } @@ -4468,14 +4468,14 @@ function formatComponentName(instance, Component2, isRoot = false) { return name ? classify(name) : isRoot ? `App` : `Anonymous`; } const computed = (getterOrOptions, debugOptions) => { - const c22 = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + const c2 = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); { - const i3 = getCurrentInstance(); - if (i3 && i3.appContext.config.warnRecursiveComputed) { - c22._warnRecursive = true; + const i2 = getCurrentInstance(); + if (i2 && i2.appContext.config.warnRecursiveComputed) { + c2._warnRecursive = true; } } - return c22; + return c2; }; const version = "3.4.21"; const warn = warn$1; @@ -4597,8 +4597,8 @@ function _diff(current, pre, path, result) { setResult(result, path, current); } } -function setResult(result, k2, v3) { - result[k2] = v3; +function setResult(result, k2, v2) { + result[k2] = v2; } function hasComponentEffect(instance) { return queue$1.includes(instance.update); @@ -4609,8 +4609,8 @@ function flushCallbacks(instance) { if (callbacks && callbacks.length) { const copies = callbacks.slice(0); callbacks.length = 0; - for (let i3 = 0; i3 < copies.length; i3++) { - copies[i3](); + for (let i2 = 0; i2 < copies.length; i2++) { + copies[i2](); } } } @@ -4650,8 +4650,8 @@ function clone(src, seen) { const len = src.length; copy = new Array(len); seen.set(src, copy); - for (let i3 = 0; i3 < len; i3++) { - copy[i3] = clone(src[i3], seen); + for (let i2 = 0; i2 < len; i2++) { + copy[i2] = clone(src[i2], seen); } } else { copy = {}; @@ -4786,8 +4786,8 @@ function setRef$1(instance, isUnmount = false) { nextTick(instance, () => { $templateUniElementRefs.forEach((templateRef) => { if (isArray(templateRef.v)) { - templateRef.v.forEach((v3) => { - setTemplateRef(templateRef, v3, setupState); + templateRef.v.forEach((v2) => { + setTemplateRef(templateRef, v2, setupState); }); } else { setTemplateRef(templateRef, templateRef.v, setupState); @@ -4820,14 +4820,14 @@ function findComponentPublicInstance(mpComponents, id) { } return null; } -function setTemplateRef({ r: r2, f: f22 }, refValue, setupState) { +function setTemplateRef({ r: r2, f: f2 }, refValue, setupState) { if (isFunction(r2)) { r2(refValue, {}); } else { const _isString = isString(r2); const _isRef = isRef(r2); if (_isString || _isRef) { - if (f22) { + if (f2) { if (!_isRef) { return; } @@ -5273,9 +5273,9 @@ if (typeof atob !== "function") { var result = ""; var r1; var r2; - var i3 = 0; - for (; i3 < str.length; ) { - bitmap = b64.indexOf(str.charAt(i3++)) << 18 | b64.indexOf(str.charAt(i3++)) << 12 | (r1 = b64.indexOf(str.charAt(i3++))) << 6 | (r2 = b64.indexOf(str.charAt(i3++))); + var i2 = 0; + for (; i2 < str.length; ) { + bitmap = b64.indexOf(str.charAt(i2++)) << 18 | b64.indexOf(str.charAt(i2++)) << 12 | (r1 = b64.indexOf(str.charAt(i2++))) << 6 | (r2 = b64.indexOf(str.charAt(i2++))); result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255); } return result; @@ -5284,8 +5284,8 @@ if (typeof atob !== "function") { realAtob = atob; } function b64DecodeUnicode(str) { - return decodeURIComponent(realAtob(str).split("").map(function(c22) { - return "%" + ("00" + c22.charCodeAt(0).toString(16)).slice(-2); + return decodeURIComponent(realAtob(str).split("").map(function(c2) { + return "%" + ("00" + c2.charCodeAt(0).toString(16)).slice(-2); }).join("")); } function getCurrentUserInfo() { @@ -5501,8 +5501,8 @@ function vFor(source, renderItem) { let ret; if (isArray(source) || isString(source)) { ret = new Array(source.length); - for (let i3 = 0, l2 = source.length; i3 < l2; i3++) { - ret[i3] = renderItem(source[i3], i3, i3); + for (let i2 = 0, l2 = source.length; i2 < l2; i2++) { + ret[i2] = renderItem(source[i2], i2, i2); } } else if (typeof source === "number") { if (!Number.isInteger(source)) { @@ -5510,18 +5510,18 @@ function vFor(source, renderItem) { return []; } ret = new Array(source); - for (let i3 = 0; i3 < source; i3++) { - ret[i3] = renderItem(i3 + 1, i3, i3); + for (let i2 = 0; i2 < source; i2++) { + ret[i2] = renderItem(i2 + 1, i2, i2); } } else if (isObject$1(source)) { if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i3) => renderItem(item, i3, i3)); + ret = Array.from(source, (item, i2) => renderItem(item, i2, i2)); } else { const keys = Object.keys(source); ret = new Array(keys.length); - for (let i3 = 0, l2 = keys.length; i3 < l2; i3++) { - const key = keys[i3]; - ret[i3] = renderItem(source[key], key, i3); + for (let i2 = 0, l2 = keys.length; i2 < l2; i2++) { + const key = keys[i2]; + ret[i2] = renderItem(source[key], key, i2); } } } else { @@ -5533,13 +5533,13 @@ function setRef(ref2, id, opts = {}) { const { $templateRefs } = getCurrentInstance(); $templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f }); } -const o$2 = (value, key) => vOn(value, key); -const f$2 = (source, renderItem) => vFor(source, renderItem); -const s$2 = (value) => stringifyStyle(value); -const e$2 = (target, ...sources) => extend(target, ...sources); -const n$2 = (value) => normalizeClass(value); -const t$2 = (val2) => toDisplayString(val2); -const p$2 = (props) => renderProps(props); +const o$1 = (value, key) => vOn(value, key); +const f$1 = (source, renderItem) => vFor(source, renderItem); +const s$1 = (value) => stringifyStyle(value); +const e$1 = (target, ...sources) => extend(target, ...sources); +const n$1 = (value) => normalizeClass(value); +const t$1 = (val2) => toDisplayString(val2); +const p$1 = (props) => renderProps(props); const sr = (ref2, id, opts) => setRef(ref2, id, opts); function createApp$1(rootComponent, rootProps = null) { rootComponent && (rootComponent.mpType = "app"); @@ -5579,11 +5579,11 @@ function validateProtocols(name, args, protocol, onFail) { } const len = protocol.length; const argsLen = args.length; - for (let i3 = 0; i3 < len; i3++) { - const opts = protocol[i3]; + for (let i2 = 0; i2 < len; i2++) { + const opts = protocol[i2]; const data = /* @__PURE__ */ Object.create(null); - if (argsLen > i3) { - data[opts.name] = args[i3]; + if (argsLen > i2) { + data[opts.name] = args[i2]; } validateProtocol(name, data, { [opts.name]: opts }, onFail); } @@ -5603,8 +5603,8 @@ function validateProp(name, value, prop, isAbsent) { let isValid = false; const types = isArray(type) ? type : [type]; const expectedTypes = []; - for (let i3 = 0; i3 < types.length && !isValid; i3++) { - const { valid, expectedType } = assertType(value, types[i3]); + for (let i2 = 0; i2 < types.length && !isValid; i2++) { + const { valid, expectedType } = assertType(value, types[i2]); expectedTypes.push(expectedType || ""); isValid = valid; } @@ -5761,8 +5761,8 @@ function wrapperHook(hook, params) { } function queue(hooks, data, params) { let promise = false; - for (let i3 = 0; i3 < hooks.length; i3++) { - const hook = hooks[i3]; + for (let i2 = 0; i2 < hooks.length; i2++) { + const hook = hooks[i2]; if (promise) { promise = Promise.resolve(wrapperHook(hook, params)); } else { @@ -6038,9 +6038,9 @@ function mergeHook(parentVal, childVal) { } function dedupeHooks(hooks) { const res = []; - for (let i3 = 0; i3 < hooks.length; i3++) { - if (res.indexOf(hooks[i3]) === -1) { - res.push(hooks[i3]); + for (let i2 = 0; i2 < hooks.length; i2++) { + if (res.indexOf(hooks[i2]) === -1) { + res.push(hooks[i2]); } } return res; @@ -6160,8 +6160,8 @@ function invokePushCallback(args) { type: "receive", data: normalizePushMessage(args.message) }; - for (let i3 = 0; i3 < onPushMessageCallbacks.length; i3++) { - const callback = onPushMessageCallbacks[i3]; + for (let i2 = 0; i2 < onPushMessageCallbacks.length; i2++) { + const callback = onPushMessageCallbacks[i2]; callback(message); if (message.stopped) { break; @@ -7105,7 +7105,7 @@ function formatObject(value, depth) { type: "object", subType: "array", value: { - properties: value.map((v3, i3) => formatArrayElement(v3, i3, depth + 1)) + properties: value.map((v2, i2) => formatArrayElement(v2, i2, depth + 1)) } }; } @@ -7116,7 +7116,7 @@ function formatObject(value, depth) { className: "Set", description: `Set(${value.size})`, value: { - entries: Array.from(value).map((v3) => formatSetEntry(v3, depth + 1)) + entries: Array.from(value).map((v2) => formatSetEntry(v2, depth + 1)) } }; } @@ -7127,7 +7127,7 @@ function formatObject(value, depth) { className: "Map", description: `Map(${value.size})`, value: { - entries: Array.from(value.entries()).map((v3) => formatMapEntry(v3, depth + 1)) + entries: Array.from(value.entries()).map((v2) => formatMapEntry(v2, depth + 1)) } }; } @@ -7362,7 +7362,7 @@ function isConsoleWritable() { function initRuntimeSocketService() { const hosts = "192.168.1.112,127.0.0.1"; const port = "8090"; - const id = "mp-weixin_Ck4vXb"; + const id = "mp-weixin_NXA5Md"; const lazy = typeof swan !== "undefined"; let restoreError = lazy ? () => { } : initOnError(); @@ -7516,15 +7516,15 @@ function initRefs(instance, mpInstance) { } function findVmByVueId(instance, vuePid) { const $children = instance.$children; - for (let i3 = $children.length - 1; i3 >= 0; i3--) { - const childVm = $children[i3]; + for (let i2 = $children.length - 1; i2 >= 0; i2--) { + const childVm = $children[i2]; if (childVm.$scope._$vueId === vuePid) { return childVm; } } let parentVm; - for (let i3 = $children.length - 1; i3 >= 0; i3--) { - parentVm = findVmByVueId($children[i3], vuePid); + for (let i2 = $children.length - 1; i2 >= 0; i2--) { + parentVm = findVmByVueId($children[i2], vuePid); if (parentVm) { return parentVm; } @@ -7811,8 +7811,8 @@ function initLocale(appVm) { get() { return locale.value; }, - set(v3) { - locale.value = v3; + set(v2) { + locale.value = v2; } }); } @@ -8025,8 +8025,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) { if (checkLen && nextKeys.length !== Object.keys(prevProps).length) { return true; } - for (let i3 = 0; i3 < nextKeys.length; i3++) { - const key = nextKeys[i3]; + for (let i2 = 0; i2 < nextKeys.length; i2++) { + const key = nextKeys[i2]; if (nextProps[key] !== prevProps[key]) { return true; } @@ -8808,8 +8808,8 @@ function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) // avoid warning on devtools trying to display this property enumerable: false }; - ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p3) => { - Object.defineProperty(store, p3, assign({ value: store[p3] }, nonEnumerable)); + ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p2) => { + Object.defineProperty(store, p2, assign({ value: store[p2] }, nonEnumerable)); }); } pinia._p.forEach((extender) => { @@ -8902,21 +8902,21 @@ This will fail in production.`); useStore.$id = id; return useStore; } -var e$1, t$1; +var e, t; !function(e3) { e3.UNIAPP = "uniapp", e3.REACT_NATIVE = "rn", e3.COCOS = "cocos", e3.UNKNOWN = "unknown"; -}(e$1 || (e$1 = {})); -let s$1 = class s { +}(e || (e = {})); +class s { constructor() { - this.framework = null, this.methods = { [e$1.UNIAPP]: this.isUniApp, [e$1.REACT_NATIVE]: this.isReactNative, [e$1.COCOS]: this.isCocos }; - const t2 = this.methods, s3 = Object.keys(t2); - for (const e3 of s3) { + this.framework = null, this.methods = { [e.UNIAPP]: this.isUniApp, [e.REACT_NATIVE]: this.isReactNative, [e.COCOS]: this.isCocos }; + const t2 = this.methods, s2 = Object.keys(t2); + for (const e3 of s2) { if ((0, t2[e3])()) { this.framework = e3; break; } } - this.framework = this.framework || e$1.UNKNOWN, this.framework; + this.framework = this.framework || e.UNKNOWN, this.framework; } static currentFramework() { return this.instance || (this.instance = new s()), this.instance.framework; @@ -8949,10 +8949,10 @@ let s$1 = class s { return false; } } -}; -let i$1 = class i { +} +class i { static init(t2) { - s$1.currentFramework() === e$1.REACT_NATIVE && (this.validate(t2), this.platform = t2.platform, this.asyncStorage = t2.asyncStorage); + s.currentFramework() === e.REACT_NATIVE && (this.validate(t2), this.platform = t2.platform, this.asyncStorage = t2.asyncStorage); } static validate(e3) { if (!e3) @@ -8962,25 +8962,25 @@ let i$1 = class i { if (!e3.asyncStorage) throw new Error("'asyncStorage' is missing in GoEasy 'reactNativeOptions'"); } -}; +} !function(e3) { e3.DISCONNECTED = "disconnected", e3.DISCONNECTING = "disconnecting", e3.CONNECTING = "connecting", e3.CONNECTED = "connected", e3.RECONNECTING = "reconnecting", e3.RECONNECTED = "reconnected", e3.EXPIRED_RECONNECTED = "reconnected", e3.CONNECT_FAILED = "connect_failed"; -}(t$1 || (t$1 = {})); -const n$1 = "2.13.17"; -var o$1, r$1; +}(t || (t = {})); +const n = "2.13.17"; +var o, r; !function(e3) { e3.PRIVATE = "private", e3.GROUP = "group", e3.SYSTEM = "system", e3.CS = "cs"; -}(o$1 || (o$1 = {})), function(e3) { +}(o || (o = {})), function(e3) { e3.NEW = "new", e3.SENDING = "sending", e3.SUCCESS = "success", e3.FAIL = "fail"; -}(r$1 || (r$1 = {})); -let a$1 = class a { -}; -let c$1 = class c { +}(r || (r = {})); +class a { +} +class c { constructor(e3, t2) { this.id = e3, this.data = t2; } -}; -let u$1 = new class { +} +let u = new class { isDef(e3) { return !this.isUndef(e3); } @@ -9037,21 +9037,21 @@ let u$1 = new class { return null === e3; } }(); -var l$1; +var l; !function(e3) { e3.MP_WX = "mp-wx", e3.MP_WGAME = "mp-wgame", e3.MP_BYTE = "mp-byte", e3.MP_BAIDU = "mp-baidu", e3.MP_ALI = "mp-ali", e3.BROWSER = "browser", e3.NODE = "node", e3.UNI_IOS = "uni-ios", e3.UNI_ANDROID = "uni-android", e3.COCOS_IOS = "cocos-ios", e3.COCOS_ANDROID = "cocos-android", e3.RN_IOS = "rn-ios", e3.RN_ANDROID = "rn-android", e3.UNKNOWN = "unknown"; -}(l$1 || (l$1 = {})); -let d$1 = class d { +}(l || (l = {})); +class d { constructor() { - this.platform = null, this.methods = { [l$1.BROWSER]: this.isBrowser, [l$1.MP_WX]: this.isMPWX, [l$1.MP_WGAME]: this.isMPWeGame, [l$1.MP_BYTE]: this.isMPByte, [l$1.MP_BAIDU]: this.isMPBaidu, [l$1.MP_ALI]: this.isMPAli, [l$1.NODE]: this.isNode, [l$1.UNI_IOS]: this.isUniAppIOS, [l$1.UNI_ANDROID]: this.isUniAppAndroid, [l$1.COCOS_IOS]: this.isCocosIOS, [l$1.COCOS_ANDROID]: this.isCocosAndroid, [l$1.RN_IOS]: this.isRNiOS, [l$1.RN_ANDROID]: this.isRNAndroid }; + this.platform = null, this.methods = { [l.BROWSER]: this.isBrowser, [l.MP_WX]: this.isMPWX, [l.MP_WGAME]: this.isMPWeGame, [l.MP_BYTE]: this.isMPByte, [l.MP_BAIDU]: this.isMPBaidu, [l.MP_ALI]: this.isMPAli, [l.NODE]: this.isNode, [l.UNI_IOS]: this.isUniAppIOS, [l.UNI_ANDROID]: this.isUniAppAndroid, [l.COCOS_IOS]: this.isCocosIOS, [l.COCOS_ANDROID]: this.isCocosAndroid, [l.RN_IOS]: this.isRNiOS, [l.RN_ANDROID]: this.isRNAndroid }; const e3 = this.methods, t2 = Object.keys(e3); - for (const s3 of t2) { - if ((0, e3[s3])()) { - this.platform = s3; + for (const s2 of t2) { + if ((0, e3[s2])()) { + this.platform = s2; break; } } - this.platform = this.platform || l$1.UNKNOWN, this.platform; + this.platform = this.platform || l.UNKNOWN, this.platform; } static currentPlatform() { return this.instance || (this.instance = new d()), d.instance.platform; @@ -9111,28 +9111,28 @@ let d$1 = class d { } isRNiOS() { try { - return "ios" === i$1.platform.OS; + return "ios" === i.platform.OS; } catch (e3) { return false; } } isRNAndroid() { try { - return "android" === i$1.platform.OS; + return "android" === i.platform.OS; } catch (e3) { return false; } } -}; -let h$1 = class h { -}; -h$1.type = l$1, h$1.current = d$1.currentPlatform(); -let p$1 = class p { +} +class h { +} +h.type = l, h.current = d.currentPlatform(); +class p { onFrontend(e3) { this.onFrontendCallback = e3; } -}; -let m$1 = class m extends p$1 { +} +class m extends p { constructor() { super(...arguments), this.runningBackend = false; } @@ -9147,11 +9147,11 @@ let m$1 = class m extends p$1 { return this.runningBackend; } support() { - const e3 = d$1.currentPlatform(); - return [l$1.UNI_IOS, l$1.UNI_ANDROID].includes(e3); + const e3 = d.currentPlatform(); + return [l.UNI_IOS, l.UNI_ANDROID].includes(e3); } -}; -let f$1 = class f extends p$1 { +} +class f extends p { constructor() { super(...arguments), this.runningBackend = false; } @@ -9166,12 +9166,12 @@ let f$1 = class f extends p$1 { return this.runningBackend; } support() { - return d$1.currentPlatform() === l$1.MP_WX; + return d.currentPlatform() === l.MP_WX; } -}; -const g$1 = new class { +} +const g = new class { constructor() { - [new m$1(), new f$1()].forEach((e3) => { + [new m(), new f()].forEach((e3) => { if (e3.support()) return this.checker = e3, void this.checker.startCheck(); }); @@ -9183,97 +9183,97 @@ const g$1 = new class { this.checker.onFrontend(e3); } }(); -var y$1, S$1, E$1 = Object.freeze({ __proto__: null, runStatus: g$1 }); +var y, S, E = Object.freeze({ __proto__: null, runStatus: g }); !function(e3) { e3.authorize = "authorize", e3.manualDisconnect = "manualDisconnect", e3.subscribe = "subscribe", e3.unsubscribe = "unsubscribe", e3.publish = "publish", e3.ack = "ack", e3.historyMessages = "historyMessages", e3.hereNow = "hereNow", e3.hereNowByUserIds = "hereNowByUserIds", e3.PUBSUB_PRESENCE_SUBSCRIBE = "PUBSUB_PRESENCE_SUBSCRIBE", e3.PUBSUB_PRESENCE_UNSUBSCRIBE = "PUBSUB_PRESENCE_UNSUBSCRIBE", e3.PUBSUB_PRESENCE_HERENOW = "PUBSUB_PRESENCE_HERENOW", e3.imLastConversations = "imLastConversations", e3.markPrivateMessageAsRead = "markPrivateMessageAsRead", e3.markGroupMessageAsRead = "markGroupMessageAsRead", e3.imGroupOnlineCount = "imGroupOnlineCount", e3.imHereNow = "imHereNow", e3.imGroupHereNow = "imGroupHereNow", e3.publishIM = "publishIM", e3.subscribeUserPresence = "subscribeUserPresence", e3.unsubscribeUserPresence = "unsubscribeUserPresence", e3.subscribeGroupPresence = "subscribeGroupPresence", e3.unsubscribeGroupPresence = "unsubscribeGroupPresence", e3.removeConversation = "removeConversation", e3.topConversation = "topConversation", e3.imData = "imData", e3.subscribeGroups = "subscribeGroups", e3.unsubscribeGroup = "unsubscribeGroup", e3.IM_DELETE_MESSAGE = "IM_DELETE_MESSAGE", e3.IM_HISTORY = "IM_HISTORY", e3.IM_HISTORY_CHANGE = "IM_HISTORY_CHANGE", e3.IM_RECALL_MESSAGE = "IM_RECALL_MESSAGE", e3.IM_MARK_AS_READ = "IM_MARK_AS_READ", e3.CS_PENDING_CONVERSATION = "CS_PENDING_CONVERSATION", e3.CS_ACCEPT = "CS_ACCEPT", e3.CS_END = "CS_END", e3.CS_TRANSFER = "CS_TRANSFER", e3.CS_AGENTS = "CS_AGENTS", e3.CS_CUSTOMER_STATUS = "CS_CUSTOMER_STATUS", e3.CS_MY_TEAMS = "CS_MY_TEAMS", e3.CS_ONLINE = "CS_ONLINE", e3.CS_OFFLINE = "CS_OFFLINE", e3.CS_LIVE_SESSION = "CS_LIVE_SESSION", e3.CS_QUIT_LIVE = "CS_QUIT_LIVE", e3.SET_IOS_BADGE = "SET_IOS_BADGE", e3.MD_CMD = "MD_CMD"; -}(y$1 || (y$1 = {})), function(e3) { +}(y || (y = {})), function(e3) { e3[e3.connect = 3e3] = "connect", e3[e3.reconnectionDelayMax = 3e3] = "reconnectionDelayMax", e3[e3.commonQuerySingle = 2500] = "commonQuerySingle", e3[e3.commonQueryTotal = 12e3] = "commonQueryTotal", e3[e3.commonRequestSingle = 1700] = "commonRequestSingle", e3[e3.commonRequestTotal = 12e3] = "commonRequestTotal", e3[e3.commonInfiniteSingle = 1700] = "commonInfiniteSingle", e3[e3.commonInfiniteTotal = 864e5] = "commonInfiniteTotal"; -}(S$1 || (S$1 = {})); -let v$1 = class v { +}(S || (S = {})); +class v { static onSuccess(e3, t2) { - u$1.isFunction(e3.onSuccess) && e3.onSuccess(t2); + u.isFunction(e3.onSuccess) && e3.onSuccess(t2); } static onFailed(e3, t2) { - if (!u$1.isObject(e3) || !u$1.isFunction(e3.onFailed)) + if (!u.isObject(e3) || !u.isFunction(e3.onFailed)) throw t2; e3.onFailed(t2); } -}; -function b$1(e3, t2, s3, i3) { - return new (s3 || (s3 = Promise))(function(n2, o2) { +} +function b(e3, t2, s2, i2) { + return new (s2 || (s2 = Promise))(function(n2, o2) { function r2(e4) { try { - c3(i3.next(e4)); + c2(i2.next(e4)); } catch (e5) { o2(e5); } } - function a3(e4) { + function a2(e4) { try { - c3(i3.throw(e4)); + c2(i2.throw(e4)); } catch (e5) { o2(e5); } } - function c3(e4) { + function c2(e4) { var t3; - e4.done ? n2(e4.value) : (t3 = e4.value, t3 instanceof s3 ? t3 : new s3(function(e5) { + e4.done ? n2(e4.value) : (t3 = e4.value, t3 instanceof s2 ? t3 : new s2(function(e5) { e5(t3); - })).then(r2, a3); + })).then(r2, a2); } - c3((i3 = i3.apply(e3, t2 || [])).next()); + c2((i2 = i2.apply(e3, t2 || [])).next()); }); } "function" == typeof SuppressedError && SuppressedError; -var C$1 = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; -function w$1(e3) { +var C = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; +function w(e3) { if (e3.__esModule) return e3; var t2 = Object.defineProperty({}, "__esModule", { value: true }); - return Object.keys(e3).forEach(function(s3) { - var i3 = Object.getOwnPropertyDescriptor(e3, s3); - Object.defineProperty(t2, s3, i3.get ? i3 : { enumerable: true, get: function() { - return e3[s3]; + return Object.keys(e3).forEach(function(s2) { + var i2 = Object.getOwnPropertyDescriptor(e3, s2); + Object.defineProperty(t2, s2, i2.get ? i2 : { enumerable: true, get: function() { + return e3[s2]; } }); }), t2; } -var M$1 = { exports: {} }; +var M = { exports: {} }; !function(e3) { function t2(e4) { if (e4) return function(e5) { - for (var s3 in t2.prototype) - e5[s3] = t2.prototype[s3]; + for (var s2 in t2.prototype) + e5[s2] = t2.prototype[s2]; return e5; }(e4); } - M$1.exports = t2, t2.prototype.on = t2.prototype.addEventListener = function(e4, t3) { + M.exports = t2, t2.prototype.on = t2.prototype.addEventListener = function(e4, t3) { return this._callbacks = this._callbacks || {}, (this._callbacks["$" + e4] = this._callbacks["$" + e4] || []).push(t3), this; }, t2.prototype.once = function(e4, t3) { - function s3() { - this.off(e4, s3), t3.apply(this, arguments); + function s2() { + this.off(e4, s2), t3.apply(this, arguments); } - return s3.fn = t3, this.on(e4, s3), this; + return s2.fn = t3, this.on(e4, s2), this; }, t2.prototype.off = t2.prototype.removeListener = t2.prototype.removeAllListeners = t2.prototype.removeEventListener = function(e4, t3) { if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this; - var s3, i3 = this._callbacks["$" + e4]; - if (!i3) + var s2, i2 = this._callbacks["$" + e4]; + if (!i2) return this; if (1 == arguments.length) return delete this._callbacks["$" + e4], this; - for (var n2 = 0; n2 < i3.length; n2++) - if ((s3 = i3[n2]) === t3 || s3.fn === t3) { - i3.splice(n2, 1); + for (var n2 = 0; n2 < i2.length; n2++) + if ((s2 = i2[n2]) === t3 || s2.fn === t3) { + i2.splice(n2, 1); break; } return this; }, t2.prototype.emit = function(e4) { this._callbacks = this._callbacks || {}; - var t3 = [].slice.call(arguments, 1), s3 = this._callbacks["$" + e4]; - if (s3) - for (var i3 = 0, n2 = (s3 = s3.slice(0)).length; i3 < n2; ++i3) - s3[i3].apply(this, t3); + var t3 = [].slice.call(arguments, 1), s2 = this._callbacks["$" + e4]; + if (s2) + for (var i2 = 0, n2 = (s2 = s2.slice(0)).length; i2 < n2; ++i2) + s2[i2].apply(this, t3); return this; }, t2.prototype.listeners = function(e4) { return this._callbacks = this._callbacks || {}, this._callbacks["$" + e4] || []; @@ -9281,56 +9281,56 @@ var M$1 = { exports: {} }; return !!this.listeners(e4).length; }; }(); -var I$1 = M$1.exports, N$1 = { exports: {} }, T$1 = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof window.msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto); -if (T$1) { - var O$1 = new Uint8Array(16); - N$1.exports = function() { - return T$1(O$1), O$1; +var I = M.exports, N = { exports: {} }, T = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof window.msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto); +if (T) { + var O = new Uint8Array(16); + N.exports = function() { + return T(O), O; }; } else { - var R$1 = new Array(16); - N$1.exports = function() { + var R = new Array(16); + N.exports = function() { for (var e3, t2 = 0; t2 < 16; t2++) - 0 == (3 & t2) && (e3 = 4294967296 * Math.random()), R$1[t2] = e3 >>> ((3 & t2) << 3) & 255; - return R$1; + 0 == (3 & t2) && (e3 = 4294967296 * Math.random()), R[t2] = e3 >>> ((3 & t2) << 3) & 255; + return R; }; } -for (var A$1 = [], P$1 = 0; P$1 < 256; ++P$1) - A$1[P$1] = (P$1 + 256).toString(16).substr(1); -var k$1, _$1, D$1 = function(e3, t2) { - var s3 = t2 || 0, i3 = A$1; - return [i3[e3[s3++]], i3[e3[s3++]], i3[e3[s3++]], i3[e3[s3++]], "-", i3[e3[s3++]], i3[e3[s3++]], "-", i3[e3[s3++]], i3[e3[s3++]], "-", i3[e3[s3++]], i3[e3[s3++]], "-", i3[e3[s3++]], i3[e3[s3++]], i3[e3[s3++]], i3[e3[s3++]], i3[e3[s3++]], i3[e3[s3++]]].join(""); -}, x$1 = N$1.exports, U$1 = D$1, F$1 = 0, G$1 = 0; -var L$1 = function(e3, t2, s3) { - var i3 = t2 && s3 || 0, n2 = t2 || [], o2 = (e3 = e3 || {}).node || k$1, r2 = void 0 !== e3.clockseq ? e3.clockseq : _$1; +for (var A = [], P = 0; P < 256; ++P) + A[P] = (P + 256).toString(16).substr(1); +var k, _, D = function(e3, t2) { + var s2 = t2 || 0, i2 = A; + return [i2[e3[s2++]], i2[e3[s2++]], i2[e3[s2++]], i2[e3[s2++]], "-", i2[e3[s2++]], i2[e3[s2++]], "-", i2[e3[s2++]], i2[e3[s2++]], "-", i2[e3[s2++]], i2[e3[s2++]], "-", i2[e3[s2++]], i2[e3[s2++]], i2[e3[s2++]], i2[e3[s2++]], i2[e3[s2++]], i2[e3[s2++]]].join(""); +}, x = N.exports, U = D, F = 0, G = 0; +var L = function(e3, t2, s2) { + var i2 = t2 && s2 || 0, n2 = t2 || [], o2 = (e3 = e3 || {}).node || k, r2 = void 0 !== e3.clockseq ? e3.clockseq : _; if (null == o2 || null == r2) { - var a3 = x$1(); - null == o2 && (o2 = k$1 = [1 | a3[0], a3[1], a3[2], a3[3], a3[4], a3[5]]), null == r2 && (r2 = _$1 = 16383 & (a3[6] << 8 | a3[7])); + var a2 = x(); + null == o2 && (o2 = k = [1 | a2[0], a2[1], a2[2], a2[3], a2[4], a2[5]]), null == r2 && (r2 = _ = 16383 & (a2[6] << 8 | a2[7])); } - var c3 = void 0 !== e3.msecs ? e3.msecs : (/* @__PURE__ */ new Date()).getTime(), u2 = void 0 !== e3.nsecs ? e3.nsecs : G$1 + 1, l2 = c3 - F$1 + (u2 - G$1) / 1e4; - if (l2 < 0 && void 0 === e3.clockseq && (r2 = r2 + 1 & 16383), (l2 < 0 || c3 > F$1) && void 0 === e3.nsecs && (u2 = 0), u2 >= 1e4) + var c2 = void 0 !== e3.msecs ? e3.msecs : (/* @__PURE__ */ new Date()).getTime(), u2 = void 0 !== e3.nsecs ? e3.nsecs : G + 1, l2 = c2 - F + (u2 - G) / 1e4; + if (l2 < 0 && void 0 === e3.clockseq && (r2 = r2 + 1 & 16383), (l2 < 0 || c2 > F) && void 0 === e3.nsecs && (u2 = 0), u2 >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - F$1 = c3, G$1 = u2, _$1 = r2; - var d3 = (1e4 * (268435455 & (c3 += 122192928e5)) + u2) % 4294967296; - n2[i3++] = d3 >>> 24 & 255, n2[i3++] = d3 >>> 16 & 255, n2[i3++] = d3 >>> 8 & 255, n2[i3++] = 255 & d3; - var h3 = c3 / 4294967296 * 1e4 & 268435455; - n2[i3++] = h3 >>> 8 & 255, n2[i3++] = 255 & h3, n2[i3++] = h3 >>> 24 & 15 | 16, n2[i3++] = h3 >>> 16 & 255, n2[i3++] = r2 >>> 8 | 128, n2[i3++] = 255 & r2; - for (var p3 = 0; p3 < 6; ++p3) - n2[i3 + p3] = o2[p3]; - return t2 || U$1(n2); -}, B$1 = N$1.exports, q$1 = D$1; -var j$1 = function(e3, t2, s3) { - var i3 = t2 && s3 || 0; + F = c2, G = u2, _ = r2; + var d2 = (1e4 * (268435455 & (c2 += 122192928e5)) + u2) % 4294967296; + n2[i2++] = d2 >>> 24 & 255, n2[i2++] = d2 >>> 16 & 255, n2[i2++] = d2 >>> 8 & 255, n2[i2++] = 255 & d2; + var h2 = c2 / 4294967296 * 1e4 & 268435455; + n2[i2++] = h2 >>> 8 & 255, n2[i2++] = 255 & h2, n2[i2++] = h2 >>> 24 & 15 | 16, n2[i2++] = h2 >>> 16 & 255, n2[i2++] = r2 >>> 8 | 128, n2[i2++] = 255 & r2; + for (var p2 = 0; p2 < 6; ++p2) + n2[i2 + p2] = o2[p2]; + return t2 || U(n2); +}, B = N.exports, q = D; +var j = function(e3, t2, s2) { + var i2 = t2 && s2 || 0; "string" == typeof e3 && (t2 = "binary" === e3 ? new Array(16) : null, e3 = null); - var n2 = (e3 = e3 || {}).random || (e3.rng || B$1)(); + var n2 = (e3 = e3 || {}).random || (e3.rng || B)(); if (n2[6] = 15 & n2[6] | 64, n2[8] = 63 & n2[8] | 128, t2) for (var o2 = 0; o2 < 16; ++o2) - t2[i3 + o2] = n2[o2]; - return t2 || q$1(n2); -}, H$1 = L$1, V$1 = j$1, z$1 = V$1; -z$1.v1 = H$1, z$1.v4 = V$1; -var W$1 = z$1; -let X$1 = class X { + t2[i2 + o2] = n2[o2]; + return t2 || q(n2); +}, H = L, V = j, z = V; +z.v1 = H, z.v4 = V; +var W = z; +class X { support() { return true; } @@ -9344,16 +9344,16 @@ let X$1 = class X { } postConnect() { } -}; -let J$1 = class J { +} +class J { static initModule(e3) { e3.support() && this.modules.set(e3.name, e3); } static getParams() { - return b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { let e3 = {}; - for (const [t2, s3] of this.modules) - e3[t2] = (yield s3.getParams()) || null; + for (const [t2, s2] of this.modules) + e3[t2] = (yield s2.getParams()) || null; return e3; }); } @@ -9363,7 +9363,7 @@ let J$1 = class J { }); } static preConnect(e3) { - this.modules.forEach((t2, s3) => { + this.modules.forEach((t2, s2) => { t2.preConnect(e3); }); } @@ -9372,12 +9372,12 @@ let J$1 = class J { e3.postConnect(); }); } -}; -J$1.Module = X$1, J$1.modules = /* @__PURE__ */ new Map(); -const Y$1 = I$1; -let $$1 = class $ { +} +J.Module = X, J.modules = /* @__PURE__ */ new Map(); +const Y = I; +class $ { constructor() { - this.emitter = new Y$1(); + this.emitter = new Y(); } on(e3, t2) { return this.emitter.on(e3, t2), this; @@ -9391,10 +9391,10 @@ let $$1 = class $ { fire(e3, t2) { return this.emitter.emit(e3, t2), this; } -}; -let Q$1 = class Q { +} +class Q { constructor() { - this.eventDriver = new $$1(); + this.eventDriver = new $(); } on(e3, t2) { this.eventDriver.on(e3, t2); @@ -9405,8 +9405,8 @@ let Q$1 = class Q { fire(e3, t2) { this.eventDriver.fire(e3, t2); } -}; -let K$1 = new class { +} +let K = new class { isDef(e3) { return !this.isUndef(e3); } @@ -9463,15 +9463,15 @@ let K$1 = new class { return null === e3; } }(); -const Z$1 = I$1; -let ee$1 = class ee { +const Z = I; +class ee { constructor() { - this.emitter = new Z$1(); + this.emitter = new Z(); } on(e3, t2) { - if (!K$1.isString(e3)) + if (!K.isString(e3)) throw Error("event require a string."); - if (!K$1.isFunction(t2)) + if (!K.isFunction(t2)) throw Error("callback must be a function"); this.emitter.on(e3, t2); } @@ -9481,23 +9481,23 @@ let ee$1 = class ee { off(e3, t2) { this.emitter.off(e3, t2); } -}; -let te$1 = class te { - static init(e3, t2, s3, i3, n2, o2) { - this.Socket = e3, this.N = t2, this.Member = s3, this.v = i3, this.Platform = n2, this.GModules = o2; +} +class te { + static init(e3, t2, s2, i2, n2, o2) { + this.Socket = e3, this.N = t2, this.Member = s2, this.v = i2, this.Platform = n2, this.GModules = o2; } -}; -const se$1 = W$1; -let ie$1 = class ie { +} +const se = W; +class ie { static get() { - return se$1.v1().replace(/-/g, ""); + return se.v1().replace(/-/g, ""); } -}; -var ne$1, oe$1; -(oe$1 = ne$1 || (ne$1 = {})).WRITE = "WRITE", oe$1.READ = "READ", oe$1.NONE = "NONE"; -let re$1 = class re { +} +var ne, oe; +(oe = ne || (ne = {})).WRITE = "WRITE", oe.READ = "READ", oe.NONE = "NONE"; +class re { constructor(e3) { - this.permission = ne$1.NONE, this.singleTimeout = 0, this.totalTimeout = 0, this.startTime = 0, this.complete = false, this.retried = 0, this.unique = false, this.uuid = ie$1.get(), this.name = e3.name, this.params = e3.params, this.permission = e3.permission, this.totalTimeout = e3.totalTimeout, this.singleTimeout = e3.singleTimeout, e3.unique && (this.unique = e3.unique), this.success = (t2) => { + this.permission = ne.NONE, this.singleTimeout = 0, this.totalTimeout = 0, this.startTime = 0, this.complete = false, this.retried = 0, this.unique = false, this.uuid = ie.get(), this.name = e3.name, this.params = e3.params, this.permission = e3.permission, this.totalTimeout = e3.totalTimeout, this.singleTimeout = e3.singleTimeout, e3.unique && (this.unique = e3.unique), this.success = (t2) => { this.complete || (this.end(), e3.success(t2)); }, this.fail = (t2) => { this.complete || (this.end(), e3.fail(t2)); @@ -9514,23 +9514,23 @@ let re$1 = class re { this.complete || this.fail({ resultCode: 408, content: "Host unreachable or timeout" }); }, this.totalTimeout); } -}; -let ae$1 = class ae extends X$1 { +} +class ae extends X { static init() { return this.module = new ae(), this.module.name = this.GN_MODULE_NAME, this.module; } static setRegId(e3, t2) { if (e3) { this.module.regIdPromise = e3; - let s3 = t2; - this.module.params = { v: { npv: s3 } }; + let s2 = t2; + this.module.params = { v: { npv: s2 } }; } } preConnect(e3) { this.wxmpId = e3.wxmpId; } getParams() { - return b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { if (this.params = this.params || {}, this.regIdPromise) try { const e3 = new Promise((e4, t2) => { @@ -9543,13 +9543,13 @@ let ae$1 = class ae extends X$1 { return this.params.wxmpId = this.wxmpId, this.params; }); } -}; -ae$1.GN_MODULE_NAME = "GN"; -let ce$1 = class ce { +} +ae.GN_MODULE_NAME = "GN"; +class ce { static init(e3) { this.allowNotification = true === e3; - let t2 = ae$1.init(); - J$1.initModule(t2), this.supportAppNotification() && (this.uniappPlugin = index.requireNativePlugin("GoEasy-Uniapp"), this.uniappPlugin ? (this.regIdPromise = this.askRegId(), this.v = this.uniappPlugin.v(), ae$1.setRegId(this.regIdPromise, this.v)) : index.__f__("warn", "at node_modules/goeasy/goeasy.esm.min.js:1", "No GoEasy-Uniapp Native Plugin."), this.setClientBadge(0)); + let t2 = ae.init(); + J.initModule(t2), this.supportAppNotification() && (this.uniappPlugin = index.requireNativePlugin("GoEasy-Uniapp"), this.uniappPlugin ? (this.regIdPromise = this.askRegId(), this.v = this.uniappPlugin.v(), ae.setRegId(this.regIdPromise, this.v)) : index.__f__("warn", "at node_modules/goeasy/goeasy.esm.min.js:1", "No GoEasy-Uniapp Native Plugin."), this.setClientBadge(0)); } static addAssembler(e3) { this.payloadAssemblers.push(e3); @@ -9558,47 +9558,47 @@ let ce$1 = class ce { let t2 = this.payloadAssemblers.find((t3) => t3.support(e3)); return t2 ? t2.assemble(e3) : e3; } - static createLocalNotification(e3, t2, s3, i3, n2) { - g$1.isBackend() && (s3.g = 1, "undefined" != typeof plus && (i3 ? (this.uniappPlugin && this.uniappPlugin.playSound(i3), plus.push.createMessage(t2, JSON.stringify(s3), { title: e3, sound: "none" })) : plus.push.createMessage(t2, JSON.stringify(s3), { title: e3 }), "+1" === n2 && this.setClientBadge(ce.badge + 1))); + static createLocalNotification(e3, t2, s2, i2, n2) { + g.isBackend() && (s2.g = 1, "undefined" != typeof plus && (i2 ? (this.uniappPlugin && this.uniappPlugin.playSound(i2), plus.push.createMessage(t2, JSON.stringify(s2), { title: e3, sound: "none" })) : plus.push.createMessage(t2, JSON.stringify(s2), { title: e3 }), "+1" === n2 && this.setClientBadge(ce.badge + 1))); } static setBadge(e3) { if (!Number.isInteger(e3.badge) || e3.badge < 0) - v$1.onFailed(e3, "badge must be an integer greater than or equal to 0."); + v.onFailed(e3, "badge must be an integer greater than or equal to 0."); else if (ce.supportAppNotification()) - if (this.uniappPlugin && d$1.currentPlatform() === l$1.UNI_IOS) { - let t2 = new re$1({ name: y$1.SET_IOS_BADGE, params: { badge: e3.badge }, unique: true, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, permission: ne$1.WRITE, success: () => { - v$1.onSuccess(e3), this.setClientBadge(e3.badge); + if (this.uniappPlugin && d.currentPlatform() === l.UNI_IOS) { + let t2 = new re({ name: y.SET_IOS_BADGE, params: { badge: e3.badge }, unique: true, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, permission: ne.WRITE, success: () => { + v.onSuccess(e3), this.setClientBadge(e3.badge); }, fail: (t3) => { - v$1.onFailed(e3, t3.content); + v.onFailed(e3, t3.content); } }); - te$1.Socket.e(t2); + te.Socket.e(t2); } else - v$1.onSuccess(e3), this.setClientBadge(e3.badge); + v.onSuccess(e3), this.setClientBadge(e3.badge); } static setClientBadge(e3) { "vivo" !== plus.device.vendor && (ce.badge = e3, plus.runtime.setBadgeNumber(e3)); } static askRegId() { let e3 = null, t2 = 0; - const s3 = () => new Promise((i3, n2) => { + const s2 = () => new Promise((i2, n2) => { this.uniappPlugin.regId((e4) => { - i3(e4); - }, (i4) => { - if (!(1e6 === i4.data.code && t2 <= 10)) - return clearTimeout(e3), n2(i4); + i2(e4); + }, (i3) => { + if (!(1e6 === i3.data.code && t2 <= 10)) + return clearTimeout(e3), n2(i3); e3 = setTimeout(() => { - t2++, this.regIdPromise = s3(); + t2++, this.regIdPromise = s2(); }, 3500); }); }); - return s3(); + return s2(); } static getRegIdPromise() { return this.regIdPromise; } static supportAppNotification() { - const e3 = d$1.currentPlatform(); - return this.allowNotification && (e3 === l$1.UNI_ANDROID || e3 === l$1.UNI_IOS); + const e3 = d.currentPlatform(); + return this.allowNotification && (e3 === l.UNI_ANDROID || e3 === l.UNI_IOS); } static listenPlusClickNotification() { plus.push.addEventListener("click", (e3) => { @@ -9622,34 +9622,34 @@ let ce$1 = class ce { if (!this.availableIntent(e3)) return; let t2 = this.assemblePayload(e3); - const s3 = d$1.currentPlatform(); - plus.push.clear(), s3 === l$1.UNI_ANDROID && this.uniappPlugin.clearAll(), this.onClickNotificationCallback(t2); + const s2 = d.currentPlatform(); + plus.push.clear(), s2 === l.UNI_ANDROID && this.uniappPlugin.clearAll(), this.onClickNotificationCallback(t2); }); } static listenClick() { this.listenPlusClickNotification(); - const e3 = d$1.currentPlatform(); - this.uniappPlugin && e3 === l$1.UNI_ANDROID && (this.getIntentData(), g$1.onFrontend(() => { + const e3 = d.currentPlatform(); + this.uniappPlugin && e3 === l.UNI_ANDROID && (this.getIntentData(), g.onFrontend(() => { this.getIntentData(); })); } static onClickNotification(e3) { if (ce.supportAppNotification()) { - if (!u$1.isFunction(e3)) + if (!u.isFunction(e3)) throw new Error("The arguments must be a function."); null === this.onClickNotificationCallback ? (this.onClickNotificationCallback = e3, this.listenClick()) : index.__f__("warn", "at node_modules/goeasy/goeasy.esm.min.js:1", "The onClickNotification event has been listened on. Please do not listen to it more than once."); } else index.__f__("warn", "at node_modules/goeasy/goeasy.esm.min.js:1", "The current environment doesn't support or allowNotification is false."); } -}; -function ue$1(...e3) { } -ce$1.uniappPlugin = null, ce$1.v = null, ce$1.regIdPromise = null, ce$1.onClickNotificationCallback = null, ce$1.payloadAssemblers = new Array(); -const le$1 = new class { +function ue(...e3) { +} +ce.uniappPlugin = null, ce.v = null, ce.regIdPromise = null, ce.onClickNotificationCallback = null, ce.payloadAssemblers = new Array(); +const le = new class { validateId(e3, t2) { - if (u$1.isEmpty(e3)) + if (u.isEmpty(e3)) throw { code: 400, content: ` ${t2} is required.` }; - if (!u$1.isString(e3)) + if (!u.isString(e3)) throw { code: 400, content: `TypeError: ${t2} require string.` }; } validateIdArray(e3, t2) { @@ -9657,139 +9657,139 @@ const le$1 = new class { throw { code: 400, content: `TypeError: ${t2} require array.` }; if (e3.length > 100) throw { code: 400, content: `${t2} is over max length 100.` }; - for (let s3 = 0; s3 < e3.length; s3++) { - if (!u$1.isStringOrNumber(e3[s3])) + for (let s2 = 0; s2 < e3.length; s2++) { + if (!u.isStringOrNumber(e3[s2])) throw { code: 400, content: `TypeError: ${t2} item require string or number.` }; - if (u$1.isNumber(e3[s3]) && (e3[s3] = e3[s3].toString()), 0 == e3[s3].length) + if (u.isNumber(e3[s2]) && (e3[s2] = e3[s2].toString()), 0 == e3[s2].length) throw { code: 400, content: `${t2} has empty item.` }; } if (Array.from(new Set(e3)).length < e3.length) throw { code: 400, content: `Duplicate element in ${t2}` }; } validateChannel(e3, t2) { - if (u$1.isEmpty(e3)) + if (u.isEmpty(e3)) throw { code: 400, content: ` ${t2} is required.` }; - if (!u$1.isStringOrNumber(e3)) + if (!u.isStringOrNumber(e3)) throw { code: 400, content: `TypeError: ${t2} require string or number.` }; } validateChannelArray(e3, t2) { this.validateIdArray(e3, t2); } validateChannelAndChannels(e3, t2) { - let s3 = !u$1.isEmpty(e3), i3 = !u$1.isEmpty(t2); - if (!s3 && !i3) + let s2 = !u.isEmpty(e3), i2 = !u.isEmpty(t2); + if (!s2 && !i2) throw { code: 400, content: "channel is required." }; - if (s3 && i3) + if (s2 && i2) throw { code: 400, content: "subscribe to either channel or channels, not both." }; - s3 && this.validateChannel(e3, "channel"), i3 && this.validateChannelArray(t2, "channels"); + s2 && this.validateChannel(e3, "channel"), i2 && this.validateChannelArray(t2, "channels"); } validateCallbackOptions(e3) { - if (!u$1.isObject(e3)) + if (!u.isObject(e3)) throw { code: 400, content: "bad parameters" }; } validateNotification(e3) { - function t2(e4, t3, s4) { - if (!(u$1.isString(e4[t3]) && e4[t3].length <= s4)) - throw { code: 400, content: `notification.${t3} must be a string of no more than ${s4} characters` }; + function t2(e4, t3, s3) { + if (!(u.isString(e4[t3]) && e4[t3].length <= s3)) + throw { code: 400, content: `notification.${t3} must be a string of no more than ${s3} characters` }; } - function s3(e4, t3, s4, i3) { + function s2(e4, t3, s3, i2) { let n2 = e4[t3]; - if (u$1.isObject(n2) && u$1.isDef(n2[s4])) { - let e5 = { code: 400, content: `notification.vendorOptions.${t3}.${s4} require a ${i3}}` }, o2 = n2[s4]; - if ("string" === i3 && !u$1.isString(o2)) + if (u.isObject(n2) && u.isDef(n2[s3])) { + let e5 = { code: 400, content: `notification.vendorOptions.${t3}.${s3} require a ${i2}}` }, o2 = n2[s3]; + if ("string" === i2 && !u.isString(o2)) throw e5; - if ("number" === i3 && !u$1.isNumber(o2)) + if ("number" === i2 && !u.isNumber(o2)) throw e5; } } - if (!u$1.isObject(e3)) + if (!u.isObject(e3)) throw { code: 400, content: "TypeError: notification requires an object." }; { - if (t2(e3, "title", 32), t2(e3, "body", 50), u$1.isDef(e3.sound) && !u$1.isString(e3.sound)) + if (t2(e3, "title", 32), t2(e3, "body", 50), u.isDef(e3.sound) && !u.isString(e3.sound)) throw { code: 400, content: "notification.sound must be a string" }; - if (u$1.isDef(e3.badge) && !u$1.isString(e3.badge)) + if (u.isDef(e3.badge) && !u.isString(e3.badge)) throw { code: 400, content: "notification.badge must be a string" }; e3.badge = e3.badge || "0"; - let i3 = e3.vendorOptions; - u$1.isObject(i3) && (s3(i3, "huawei", "category", "string"), s3(i3, "xiaomi", "channel_id", "string"), s3(i3, "oppo", "channel_id", "string"), s3(i3, "vivo", "classification", "number"), s3(i3, "vivo", "category", "string")); + let i2 = e3.vendorOptions; + u.isObject(i2) && (s2(i2, "huawei", "category", "string"), s2(i2, "xiaomi", "channel_id", "string"), s2(i2, "oppo", "channel_id", "string"), s2(i2, "vivo", "classification", "number"), s2(i2, "vivo", "category", "string")); } } validateValIsEmpty(e3, t2) { - if (u$1.isUndef(e3) || u$1.isEmpty(e3)) + if (u.isUndef(e3) || u.isEmpty(e3)) throw { code: 400, content: `${t2} is empty` }; } validateWXMPTemplateMsg(e3) { - if (u$1.isObject(e3)) { - if (!u$1.isString(e3.template_id)) + if (u.isObject(e3)) { + if (!u.isString(e3.template_id)) throw { code: 400, content: "template_id must be string." }; - if (!u$1.isEmpty(e3.url) && !u$1.isString(e3.url)) + if (!u.isEmpty(e3.url) && !u.isString(e3.url)) throw { code: 400, content: "url must be string" }; - if (!(u$1.isEmpty(e3.miniprogram) || u$1.isString(e3.miniprogram.appid) && u$1.isString(e3.miniprogram.pagepath))) + if (!(u.isEmpty(e3.miniprogram) || u.isString(e3.miniprogram.appid) && u.isString(e3.miniprogram.pagepath))) throw { code: 400, content: "miniprogram.appid and miniprogram.pagepath must be strings." }; - if (!u$1.isObject(e3.data)) + if (!u.isObject(e3.data)) throw { code: 400, content: "data requires an object." }; - } else if (u$1.isPrimitive(e3)) + } else if (u.isPrimitive(e3)) throw { code: 400, content: "wxmpTemplateMsg must be an object." }; } validateObject(e3, t2) { - if (u$1.isUndef(e3) || !u$1.isObject(e3)) + if (u.isUndef(e3) || !u.isObject(e3)) throw { code: 400, content: t2 + " must be an object." }; } validateString(e3, t2) { - if (u$1.isUndef(e3) || !u$1.isString(e3)) + if (u.isUndef(e3) || !u.isString(e3)) throw { code: 400, content: t2 + " must be a string." }; } }(); -function de$1(e3) { +function de(e3) { if (null === e3 || "object" != typeof e3 || "isActiveClone" in e3) return e3; let t2 = e3 instanceof Array ? [] : {}; - for (let s3 in e3) - "object" == typeof e3[s3] ? t2[s3] = de$1(e3[s3]) : t2[s3] = e3[s3]; + for (let s2 in e3) + "object" == typeof e3[s2] ? t2[s2] = de(e3[s2]) : t2[s2] = e3[s2]; return t2; } -let he$1 = class he { +class he { publish(e3) { - u$1.isFunction(e3.onFailed) || (e3.onFailed = ue$1), u$1.isFunction(e3.onSuccess) || (e3.onSuccess = ue$1), this.validate(e3), e3.channel = e3.channel.toString(); - let t2 = { channel: e3.channel, content: e3.message, nt: e3.notification, at: e3.accessToken, guid: ie$1.get(), q: e3.qos }; - e3.wxmpTemplateMsg && (t2.wxmpTemplateMsg = de$1(e3.wxmpTemplateMsg), t2.wxmpTemplateMsg.data = JSON.stringify(t2.wxmpTemplateMsg.data)); - let s3 = new re$1({ name: y$1.publish, params: t2, unique: true, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, permission: ne$1.WRITE, success: function(t3) { + u.isFunction(e3.onFailed) || (e3.onFailed = ue), u.isFunction(e3.onSuccess) || (e3.onSuccess = ue), this.validate(e3), e3.channel = e3.channel.toString(); + let t2 = { channel: e3.channel, content: e3.message, nt: e3.notification, at: e3.accessToken, guid: ie.get(), q: e3.qos }; + e3.wxmpTemplateMsg && (t2.wxmpTemplateMsg = de(e3.wxmpTemplateMsg), t2.wxmpTemplateMsg.data = JSON.stringify(t2.wxmpTemplateMsg.data)); + let s2 = new re({ name: y.publish, params: t2, unique: true, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, permission: ne.WRITE, success: function(t3) { e3.onSuccess({ code: 200, content: "ok" }); }, fail: function(t3) { e3.onFailed({ code: t3.resultCode, content: t3.content }); } }); - te$1.Socket.e(s3); + te.Socket.e(s2); } validate(e3) { - if (le$1.validateChannel(e3.channel, "channel"), u$1.isEmpty(e3.message)) + if (le.validateChannel(e3.channel, "channel"), u.isEmpty(e3.message)) throw { code: 400, content: "message is required." }; - if (!u$1.isString(e3.message)) + if (!u.isString(e3.message)) throw { code: 400, content: "TypeError: message requires string." }; if (e3.message.length > 1e4) throw { code: 400, content: "Message over max length 10000." }; if (e3.qos && !(e3.qos in [0, 1])) throw { code: 400, content: "Qos must be 0 or 1." }; - e3.wxmpTemplateMsg && le$1.validateWXMPTemplateMsg(e3.wxmpTemplateMsg), u$1.isDef(e3.notification) && le$1.validateNotification(e3.notification); + e3.wxmpTemplateMsg && le.validateWXMPTemplateMsg(e3.wxmpTemplateMsg), u.isDef(e3.notification) && le.validateNotification(e3.notification); } -}; -let pe$1 = class pe { +} +class pe { constructor(e3) { - if (this.options = e3, this.channels = e3.channels || [e3.channel], !u$1.isEmpty(e3.channel)) { + if (this.options = e3, this.channels = e3.channels || [e3.channel], !u.isEmpty(e3.channel)) { let t2 = e3.channel.toString(); this.channels = [t2]; } - u$1.isEmpty(e3.channels) || (this.channels = e3.channels.toString().split(",")); + u.isEmpty(e3.channels) || (this.channels = e3.channels.toString().split(",")); } -}; -var me$1, fe$1, ge$1; +} +var me, fe, ge; !function(e3) { e3.message = "message", e3.imMessage = "imMessage", e3.userPresence = "userPresence", e3.groupPresence = "groupPresence", e3.PS_PRESENCE_EVENT = "PS_PRESENCE_EVENT", e3.IM_MSG_READ = "IM_MSG_READ", e3.IM_MSG_DELETED = "IM_MSG_DELETED", e3.IM_MSG_RECALLED = "IM_MSG_RECALLED", e3.CS_ONLINE_CHANGED = "CS_ONLINE_CHANGED"; -}(me$1 || (me$1 = {})), function(e3) { +}(me || (me = {})), function(e3) { e3.CONNECTED = "CONNECTED", e3.RECONNECTED = "RECONNECTED", e3.DISCONNECTED = "DISCONNECTED", e3.LOST = "LOST", e3.EXPIRED_RECONNECTED = "EXPIRED_RECONNECTED", e3.NEW_MESSAGE = "NEW_MESSAGE", e3.CONNECTING = "CONNECTING"; -}(fe$1 || (fe$1 = {})); -let ye$1 = class ye { +}(fe || (fe = {})); +class ye { constructor() { - this.subscriptions = [], te$1.Socket.onMessage(me$1.message, this.onNewMessage.bind(this)), te$1.Socket.on(fe$1.EXPIRED_RECONNECTED, this.expiredResubscribe.bind(this)), te$1.Socket.on(fe$1.RECONNECTED, this.resubscribePresenceChannel.bind(this)); + this.subscriptions = [], te.Socket.onMessage(me.message, this.onNewMessage.bind(this)), te.Socket.on(fe.EXPIRED_RECONNECTED, this.expiredResubscribe.bind(this)), te.Socket.on(fe.RECONNECTED, this.resubscribePresenceChannel.bind(this)); } expiredResubscribe() { this.subscriptions.forEach((e3) => { @@ -9805,91 +9805,91 @@ let ye$1 = class ye { onNewMessage(e3) { if (e3.n.indexOf("_presence") > -1) return; - e3.a && te$1.Socket.sendAck("ack", { i: e3.i, c: e3.n }); + e3.a && te.Socket.sendAck("ack", { i: e3.i, c: e3.n }); let t2 = { time: e3.t, channel: e3.n, content: e3.c }; this.createNotification(e3), this.findSubscriptionByChannel(t2.channel).options.onMessage(t2); } createNotification(e3) { - const t2 = te$1.N.supportAppNotification(); - if (!u$1.isObject(e3.nt) || !t2) + const t2 = te.N.supportAppNotification(); + if (!u.isObject(e3.nt) || !t2) return; - const s3 = { ch: e3.n, ctt: e3.c }; - te$1.N.createLocalNotification(e3.nt.t, e3.nt.c, s3, e3.nt.sound, e3.nt.badge); + const s2 = { ch: e3.n, ctt: e3.c }; + te.N.createLocalNotification(e3.nt.t, e3.nt.c, s2, e3.nt.sound, e3.nt.badge); } subscribe(e3) { - if (le$1.validateChannelAndChannels(e3.channel, e3.channels), u$1.isDef(e3.presence)) { + if (le.validateChannelAndChannels(e3.channel, e3.channels), u.isDef(e3.presence)) { let t3 = e3.presence.enable; - if (!u$1.isBoolean(t3)) + if (!u.isBoolean(t3)) throw { code: 400, content: "Subscription failed. presence.enable must be a boolean" }; - if (t3 && !te$1.Socket.user().id) + if (t3 && !te.Socket.user().id) throw { code: 400, content: "Subscription failed. If presence is enable, the id must be specified when calling the connect method" }; } - let t2 = new pe$1(e3); + let t2 = new pe(e3); this.doSubscribe(t2, false).then(() => { - this.subscriptions.push(t2), v$1.onSuccess(e3, { code: 200, content: "ok" }); + this.subscriptions.push(t2), v.onSuccess(e3, { code: 200, content: "ok" }); }).catch((t3) => { - v$1.onFailed(e3, { code: t3.resultCode, content: t3.content }); + v.onFailed(e3, { code: t3.resultCode, content: t3.content }); }); } doSubscribe(e3, t2) { - let s3 = e3.options; - return new Promise((i3, n2) => { - let o2 = new re$1({ name: y$1.subscribe, permission: ne$1.READ, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, params: { channels: e3.channels, accessToken: s3.accessToken, presence: s3.presence, resubscribe: t2 }, success: () => { - i3(); + let s2 = e3.options; + return new Promise((i2, n2) => { + let o2 = new re({ name: y.subscribe, permission: ne.READ, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, params: { channels: e3.channels, accessToken: s2.accessToken, presence: s2.presence, resubscribe: t2 }, success: () => { + i2(); }, fail: (e4) => { n2(e4); } }); - te$1.Socket.e(o2); + te.Socket.e(o2); }); } unsubscribe(e3) { - le$1.validateChannel(e3.channel, "channel"), e3.channel = e3.channel.toString(); + le.validateChannel(e3.channel, "channel"), e3.channel = e3.channel.toString(); const t2 = this.findSubscriptionByChannel(e3.channel); if (!t2) return void e3.onFailed({ code: 400, content: "channel[" + e3.channel + "] is not subscribed" }); - let s3 = new re$1({ name: y$1.unsubscribe, params: { channel: e3.channel, presence: t2.options.presence }, permission: ne$1.READ, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, success: () => { + let s2 = new re({ name: y.unsubscribe, params: { channel: e3.channel, presence: t2.options.presence }, permission: ne.READ, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, success: () => { e3.onSuccess({ code: 200, content: "ok" }), this.removeChannel(e3.channel); }, fail: function(t3) { e3.onFailed({ code: t3.resultCode, content: t3.content }); } }); - te$1.Socket.e(s3); + te.Socket.e(s2); } removeChannel(e3) { for (let t2 = this.subscriptions.length - 1; t2 >= 0; t2--) { - const s3 = this.subscriptions[t2].channels, i3 = s3.indexOf(e3); - if (i3 > -1) { - s3.splice(i3, 1), 0 === s3.length && this.subscriptions.splice(t2, 1); + const s2 = this.subscriptions[t2].channels, i2 = s2.indexOf(e3); + if (i2 > -1) { + s2.splice(i2, 1), 0 === s2.length && this.subscriptions.splice(t2, 1); break; } } } findSubscriptionByChannel(e3) { - let t2 = false, s3 = null; - for (let i3 = this.subscriptions.length - 1; i3 >= 0; i3--) { - let n2 = this.subscriptions[i3].channels; + let t2 = false, s2 = null; + for (let i2 = this.subscriptions.length - 1; i2 >= 0; i2--) { + let n2 = this.subscriptions[i2].channels; for (let o2 = 0; o2 < n2.length; o2++) if (n2[o2] == e3) { - t2 = true, s3 = this.subscriptions[i3]; + t2 = true, s2 = this.subscriptions[i2]; break; } if (t2) break; } - return s3; + return s2; } -}; -let Se$1 = class Se { +} +class Se { get(e3) { - u$1.isFunction(e3.onSuccess) || (e3.onSuccess = ue$1), u$1.isFunction(e3.onFailed) || (e3.onFailed = ue$1), le$1.validateChannel(e3.channel, "channel"), e3.channel = e3.channel.toString(); - let t2 = new re$1({ name: y$1.historyMessages, permission: ne$1.READ, params: e3, singleTimeout: S$1.commonQuerySingle, totalTimeout: S$1.commonQueryTotal, success: (t3) => { + u.isFunction(e3.onSuccess) || (e3.onSuccess = ue), u.isFunction(e3.onFailed) || (e3.onFailed = ue), le.validateChannel(e3.channel, "channel"), e3.channel = e3.channel.toString(); + let t2 = new re({ name: y.historyMessages, permission: ne.READ, params: e3, singleTimeout: S.commonQuerySingle, totalTimeout: S.commonQueryTotal, success: (t3) => { e3.onSuccess({ code: t3.resultCode || t3.code || 200, content: t3.content }); }, fail: (t3) => { e3.onFailed({ code: t3.resultCode || t3.code, content: t3.content }); } }); - te$1.Socket.e(t2); + te.Socket.e(t2); } -}; -let Ee$1 = class Ee { +} +class Ee { constructor() { this.channelPresenceMap = /* @__PURE__ */ new Map(), this.onPresenceEvent = (e3) => { let t2 = this.channelPresenceMap.get(e3.channel); @@ -9902,43 +9902,43 @@ let Ee$1 = class Ee { this.channelPresenceMap.forEach((e3, t2) => { e3.subscribed() && e3.doSubscribe(); }); - }, te$1.Socket.on(fe$1.LOST, this.expireAllChannelPresences), te$1.Socket.on(fe$1.RECONNECTED, this.resubscribe), te$1.Socket.onMessage(me$1.PS_PRESENCE_EVENT, this.onPresenceEvent); + }, te.Socket.on(fe.LOST, this.expireAllChannelPresences), te.Socket.on(fe.RECONNECTED, this.resubscribe), te.Socket.onMessage(me.PS_PRESENCE_EVENT, this.onPresenceEvent); } hereNow(e3) { - le$1.validateChannel(e3.channel, "channel"); - let t2, s3 = this.channelPresenceMap.get(e3.channel.toString()); - s3 && s3.queryPromise ? (e3.limit && e3.limit > s3.membersLimit && s3.doQuery(e3.limit), t2 = s3.queryPromise) : t2 = be$1(e3.channel, e3.limit), t2.then((t3) => { + le.validateChannel(e3.channel, "channel"); + let t2, s2 = this.channelPresenceMap.get(e3.channel.toString()); + s2 && s2.queryPromise ? (e3.limit && e3.limit > s2.membersLimit && s2.doQuery(e3.limit), t2 = s2.queryPromise) : t2 = be(e3.channel, e3.limit), t2.then((t3) => { e3.onSuccess(t3); }).catch((t3) => { e3.onFailed(t3); }); } subscribe(e3) { - if (le$1.validateChannel(e3.channel, "channel"), u$1.isUndef(e3.onPresence) || !u$1.isFunction(e3.onPresence)) + if (le.validateChannel(e3.channel, "channel"), u.isUndef(e3.onPresence) || !u.isFunction(e3.onPresence)) throw { code: 400, content: "Subscription Presence failed. onPresence callback function is required" }; - let t2 = e3.channel.toString(), s3 = this.channelPresenceMap.get(t2); - s3 || (s3 = new ve$1(t2), this.channelPresenceMap.set(t2, s3)), s3.subscribe(e3); + let t2 = e3.channel.toString(), s2 = this.channelPresenceMap.get(t2); + s2 || (s2 = new ve(t2), this.channelPresenceMap.set(t2, s2)), s2.subscribe(e3); } unsubscribe(e3) { - le$1.validateChannel(e3.channel, "channel"); + le.validateChannel(e3.channel, "channel"); let t2 = e3.channel.toString(); if (this.channelPresenceMap.get(t2)) { - let s3 = new re$1({ name: y$1.PUBSUB_PRESENCE_UNSUBSCRIBE, permission: ne$1.READ, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, params: { channel: t2 }, success: (s4) => { + let s2 = new re({ name: y.PUBSUB_PRESENCE_UNSUBSCRIBE, permission: ne.READ, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, params: { channel: t2 }, success: (s3) => { this.channelPresenceMap.delete(t2), e3.onSuccess(); }, fail: (t3) => { e3.onFailed(t3); } }); - te$1.Socket.e(s3); + te.Socket.e(s2); } else e3.onSuccess(); } -}; -let ve$1 = class ve { +} +class ve { constructor(e3) { this.membersLimit = 10, this.queried = false, this.channel = e3; } onPresence(e3) { - return b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { this.queried ? this.update(e3) : yield this.queryPromise, this.on({ channel: this.channel, action: e3.action, member: e3.member, time: e3.time, amount: this.amount, members: this.membersByLimit() }); }); } @@ -9946,7 +9946,7 @@ let ve$1 = class ve { return this.members.slice(0, this.membersLimit); } subscribe(e3) { - return b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { if (e3.membersLimit && (this.membersLimit = Math.min(e3.membersLimit, 300)), !this.subscribed()) try { yield this.doSubscribe(); @@ -9958,16 +9958,16 @@ let ve$1 = class ve { } doSubscribe() { return this.doQuery(this.membersLimit), new Promise((e3, t2) => { - let s3 = new re$1({ name: y$1.PUBSUB_PRESENCE_SUBSCRIBE, permission: ne$1.READ, params: { channel: this.channel }, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, success: (t3) => { + let s2 = new re({ name: y.PUBSUB_PRESENCE_SUBSCRIBE, permission: ne.READ, params: { channel: this.channel }, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, success: (t3) => { e3(); }, fail: (e4) => { t2(e4); } }); - te$1.Socket.e(s3); + te.Socket.e(s2); }); } doQuery(e3) { - this.queryPromise = be$1(this.channel, e3), this.queryPromise.then((e4) => { + this.queryPromise = be(this.channel, e3), this.queryPromise.then((e4) => { this.members = e4.content.members, this.amount = e4.content.amount, this.queried = true; }).catch((e4) => { throw e4; @@ -9988,20 +9988,20 @@ let ve$1 = class ve { subscribed() { return void 0 !== this.on; } -}; -function be$1(e3, t2) { - return t2 || (t2 = 10), new Promise((s3, i3) => { - let n2 = { channel: e3, limit: t2 }, o2 = new re$1({ name: y$1.PUBSUB_PRESENCE_HERENOW, permission: ne$1.READ, params: n2, singleTimeout: S$1.commonQuerySingle, totalTimeout: S$1.commonQueryTotal, success: (e4) => { - s3(e4); +} +function be(e3, t2) { + return t2 || (t2 = 10), new Promise((s2, i2) => { + let n2 = { channel: e3, limit: t2 }, o2 = new re({ name: y.PUBSUB_PRESENCE_HERENOW, permission: ne.READ, params: n2, singleTimeout: S.commonQuerySingle, totalTimeout: S.commonQueryTotal, success: (e4) => { + s2(e4); }, fail: (e4) => { - i3(e4); + i2(e4); } }); - te$1.Socket.e(o2); + te.Socket.e(o2); }); } -let Ce$1 = class Ce { +class Ce { constructor() { - this.publisher = new he$1(), this.subscriber = new ye$1(), this.presence2 = new Ee$1(), this.histories = new Se$1(); + this.publisher = new he(), this.subscriber = new ye(), this.presence2 = new Ee(), this.histories = new Se(); } static init() { this.instance = new Ce(); @@ -10027,13 +10027,13 @@ let Ce$1 = class Ce { hereNow(e3) { this.presence2.hereNow(e3); } -}; -let we$1 = class we extends X$1 { +} +class we extends X { static init() { return this.module = new we(), this.module.name = this.GWS_MODULE_NAME, this.initGN(), this.module; } static initGN() { - ce$1.addAssembler(new class { + ce.addAssembler(new class { assemble(e3) { return { channel: e3.ch, content: e3.ctt }; } @@ -10043,39 +10043,39 @@ let we$1 = class we extends X$1 { }()); } postConnect() { - Ce$1.init(); + Ce.init(); } static check() { if (!this.module) throw { code: 400, content: "PubSub not initialized. Please include 'PUBSUB' in the 'modules' during GoEasy initialization." }; } -}; -we$1.GWS_MODULE_NAME = "GWS"; -let Me$1 = class Me { +} +we.GWS_MODULE_NAME = "GWS"; +class Me { constructor() { } -}; +} !function(e3) { e3.aliYun = "ALI", e3.qiNiu = "QN", e3.tencent = "TX", e3.s3 = "S3"; -}(ge$1 || (ge$1 = {})); -let Ie$1 = new class extends Me$1 { +}(ge || (ge = {})); +let Ie = new class extends Me { constructor() { super(); } upload(e3, t2) { try { - return e3.storageLocation === ge$1.s3 ? this.uploadToS3(e3, t2) : (delete e3.parameters.fileRes, new Promise((s3, i3) => { + return e3.storageLocation === ge.s3 ? this.uploadToS3(e3, t2) : (delete e3.parameters.fileRes, new Promise((s2, i2) => { index.uploadFile({ url: e3.host, filePath: this.getTempFilePath(e3), name: "file", formData: e3.parameters, success(e4) { - 200 === e4.statusCode ? s3() : i3({ code: e4.statusCode, content: e4.errMsg }); + 200 === e4.statusCode ? s2() : i2({ code: e4.statusCode, content: e4.errMsg }); }, fail(e4) { - i3({ code: 500, content: e4.errMsg }); + i2({ code: 500, content: e4.errMsg }); } }).onProgressUpdate((e4) => { t2 && t2(e4); }); })); } catch (e4) { - return new Promise((t3, s3) => { - s3({ code: 500, content: e4 }); + return new Promise((t3, s2) => { + s2({ code: 500, content: e4 }); }); } } @@ -10084,64 +10084,64 @@ let Ie$1 = new class extends Me$1 { return t2.tempFilePath || t2.fullPath || t2.path; } uploadToS3(e3, t2) { - return new Promise((t3, s3) => b$1(this, void 0, void 0, function* () { - const i3 = yield this.fileToArrayBuffer(e3); - index.request({ url: e3.url, method: "PUT", header: e3.headers, data: i3, success(i4) { - 200 === i4.statusCode ? (e3.storageLocation === ge$1.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s3({ code: i4.statusCode, content: i4.errMsg }); + return new Promise((t3, s2) => b(this, void 0, void 0, function* () { + const i2 = yield this.fileToArrayBuffer(e3); + index.request({ url: e3.url, method: "PUT", header: e3.headers, data: i2, success(i3) { + 200 === i3.statusCode ? (e3.storageLocation === ge.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s2({ code: i3.statusCode, content: i3.errMsg }); }, fail(e4) { - s3({ code: 500, content: e4.errMsg }); + s2({ code: 500, content: e4.errMsg }); } }); })); } fileToArrayBuffer(e3) { - return new Promise((t2, s3) => { - const i3 = this.getTempFilePath(e3); + return new Promise((t2, s2) => { + const i2 = this.getTempFilePath(e3); if ("undefined" != typeof plus) - plus.io.resolveLocalFileSystemURL(i3, (e4) => { + plus.io.resolveLocalFileSystemURL(i2, (e4) => { e4.file((e5) => { - let i4 = new plus.io.FileReader(); - i4.onloadend = (e6) => { - const s4 = index.base64ToArrayBuffer(e6.target.result.split(",")[1]); - t2(s4); - }, i4.onerror = function(e6) { - s3(e6); - }, i4.readAsDataURL(e5); + let i3 = new plus.io.FileReader(); + i3.onloadend = (e6) => { + const s3 = index.base64ToArrayBuffer(e6.target.result.split(",")[1]); + t2(s3); + }, i3.onerror = function(e6) { + s2(e6); + }, i3.readAsDataURL(e5); }); }, (e4) => { - s3("Resolve file URL failed: " + e4.message); + s2("Resolve file URL failed: " + e4.message); }); else if ("undefined" != typeof FileReader) { - const i4 = new FileReader(); - i4.onload = () => { - t2(i4.result); - }, i4.onerror = (e4) => { - s3(e4); - }, i4.readAsArrayBuffer(e3.file); + const i3 = new FileReader(); + i3.onload = () => { + t2(i3.result); + }, i3.onerror = (e4) => { + s2(e4); + }, i3.readAsArrayBuffer(e3.file); } else if ("object" == typeof wx$1 && wx$1.canIUse("getFileSystemManager")) try { - const e4 = wx$1.getFileSystemManager().readFileSync(i3); + const e4 = wx$1.getFileSystemManager().readFileSync(i2); t2(e4); } catch (e4) { - s3(e4); + s2(e4); } }); } }(); -const Ne$1 = new class extends Me$1 { +const Ne = new class extends Me { upload(e3, t2) { try { - return e3.storageLocation === ge$1.s3 ? this.uploadToS3(e3, t2) : new Promise((s3, i3) => { + return e3.storageLocation === ge.s3 ? this.uploadToS3(e3, t2) : new Promise((s2, i2) => { wx$1.uploadFile({ url: e3.host, filePath: this.getTempFilePath(e3), name: "file", formData: e3.parameters, success(e4) { - 200 === e4.statusCode ? s3() : i3({ code: e4.statusCode, content: e4.errMsg }); + 200 === e4.statusCode ? s2() : i2({ code: e4.statusCode, content: e4.errMsg }); }, fail(e4) { - i3({ code: 500, content: e4.errMsg }); + i2({ code: 500, content: e4.errMsg }); } }).onProgressUpdate((e4) => { t2 && t2(e4); }); }); } catch (e4) { - return new Promise((t3, s3) => { - s3({ code: 500, content: e4 }); + return new Promise((t3, s2) => { + s2({ code: 500, content: e4 }); }); } } @@ -10150,35 +10150,35 @@ const Ne$1 = new class extends Me$1 { return t2.path || t2.tempFilePath; } uploadToS3(e3, t2) { - return new Promise((t3, s3) => b$1(this, void 0, void 0, function* () { - const i3 = yield this.fileToArrayBuffer(this.getTempFilePath(e3)); - wx$1.request({ url: e3.url, method: "PUT", header: e3.headers, data: i3, success(i4) { - 200 === i4.statusCode ? (e3.storageLocation === ge$1.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s3({ code: i4.statusCode, content: i4.errMsg }); + return new Promise((t3, s2) => b(this, void 0, void 0, function* () { + const i2 = yield this.fileToArrayBuffer(this.getTempFilePath(e3)); + wx$1.request({ url: e3.url, method: "PUT", header: e3.headers, data: i2, success(i3) { + 200 === i3.statusCode ? (e3.storageLocation === ge.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s2({ code: i3.statusCode, content: i3.errMsg }); }, fail(e4) { - s3({ code: 500, content: e4.errMsg }); + s2({ code: 500, content: e4.errMsg }); } }); })); } fileToArrayBuffer(e3) { - return new Promise((t2, s3) => { + return new Promise((t2, s2) => { try { - const s4 = wx$1.getFileSystemManager(); - t2(s4.readFileSync(e3)); + const s3 = wx$1.getFileSystemManager(); + t2(s3.readFileSync(e3)); } catch (e4) { - s3(e4); + s2(e4); } }); } }(); -const Te$1 = new class extends Me$1 { +const Te = new class extends Me { constructor() { super(); } upload(e3, t2) { - return new Promise((s3, i3) => { + return new Promise((s2, i2) => { try { - const n2 = new XMLHttpRequest(), o2 = e3.storageLocation === ge$1.s3, r2 = o2 ? "PUT" : "POST", a3 = o2 ? e3.url : e3.host; - n2.open(r2, a3, true); + const n2 = new XMLHttpRequest(), o2 = e3.storageLocation === ge.s3, r2 = o2 ? "PUT" : "POST", a2 = o2 ? e3.url : e3.host; + n2.open(r2, a2, true); for (let t3 in e3.headers) n2.setRequestHeader(t3, e3.headers[t3]); n2.upload.onprogress = function(e4) { @@ -10188,44 +10188,44 @@ const Te$1 = new class extends Me$1 { }, n2.upload.onloadend = function(e4) { t2 && t2(e4); }; - let c3 = new FormData(); + let c2 = new FormData(); for (let t3 in e3.parameters) - "fileRes" == t3 ? c3.append("file", e3.parameters[t3]) : c3.append(t3, e3.parameters[t3]); - const u2 = o2 ? e3.file : c3; + "fileRes" == t3 ? c2.append("file", e3.parameters[t3]) : c2.append(t3, e3.parameters[t3]); + const u2 = o2 ? e3.file : c2; n2.send(u2), n2.onreadystatechange = function() { - 4 == n2.readyState && (n2.status >= 200 && n2.status < 300 || 304 == n2.status ? (o2 && (e3.url = e3.url.split("?")[0]), s3()) : i3({ code: n2.status, content: n2.responseText })); + 4 == n2.readyState && (n2.status >= 200 && n2.status < 300 || 304 == n2.status ? (o2 && (e3.url = e3.url.split("?")[0]), s2()) : i2({ code: n2.status, content: n2.responseText })); }; } catch (e4) { - i3({ code: 500, content: e4 }); + i2({ code: 500, content: e4 }); } }); } fileToArrayBuffer(e3) { - return new Promise((t2, s3) => { - const i3 = new FileReader(); - i3.onload = () => { - t2(i3.result); - }, i3.onerror = (e4) => { - s3(e4); - }, i3.readAsArrayBuffer(e3); + return new Promise((t2, s2) => { + const i2 = new FileReader(); + i2.onload = () => { + t2(i2.result); + }, i2.onerror = (e4) => { + s2(e4); + }, i2.readAsArrayBuffer(e3); }); } }(); -const Oe$1 = new class extends Me$1 { +const Oe = new class extends Me { upload(e3, t2) { try { - return e3.storageLocation === ge$1.s3 ? this.uploadToS3(e3, t2) : (delete e3.parameters.fileRes, new Promise((s3, i3) => { + return e3.storageLocation === ge.s3 ? this.uploadToS3(e3, t2) : (delete e3.parameters.fileRes, new Promise((s2, i2) => { my.uploadFile({ url: e3.host, filePath: this.getTempFilePath(e3), fileType: "image", name: "file", formData: e3.parameters, success(e4) { - 200 === e4.statusCode ? s3() : i3({ code: e4.statusCode, content: e4.errMsg }); + 200 === e4.statusCode ? s2() : i2({ code: e4.statusCode, content: e4.errMsg }); }, fail(e4) { - i3({ code: 500, content: e4.errMsg }); + i2({ code: 500, content: e4.errMsg }); } }).onProgressUpdate((e4) => { t2 && t2(e4); }); })); } catch (e4) { - return new Promise((t3, s3) => { - s3({ code: 500, content: e4 }); + return new Promise((t3, s2) => { + s2({ code: 500, content: e4 }); }); } } @@ -10234,40 +10234,40 @@ const Oe$1 = new class extends Me$1 { return t2.path || t2.tempFilePath; } uploadToS3(e3, t2) { - return new Promise((t3, s3) => b$1(this, void 0, void 0, function* () { - const i3 = yield this.fileToArrayBuffer(this.getTempFilePath(e3)); - my.request({ url: e3.url, method: "PUT", header: e3.headers, data: i3, success(i4) { - 200 === i4.statusCode ? (e3.storageLocation === ge$1.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s3({ code: i4.statusCode, content: i4.errMsg }); + return new Promise((t3, s2) => b(this, void 0, void 0, function* () { + const i2 = yield this.fileToArrayBuffer(this.getTempFilePath(e3)); + my.request({ url: e3.url, method: "PUT", header: e3.headers, data: i2, success(i3) { + 200 === i3.statusCode ? (e3.storageLocation === ge.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s2({ code: i3.statusCode, content: i3.errMsg }); }, fail(e4) { - s3({ code: 500, content: e4.errMsg }); + s2({ code: 500, content: e4.errMsg }); } }); })); } fileToArrayBuffer(e3) { - return new Promise((t2, s3) => { + return new Promise((t2, s2) => { my.getFileSystemManager().readFile({ filePath: e3, success: (e4) => { t2(e4.data); }, fail(e4) { - s3(e4); + s2(e4); } }); }); } }(); -const Re$1 = new class extends Me$1 { +const Re = new class extends Me { upload(e3, t2) { try { - return e3.storageLocation === ge$1.s3 ? this.uploadToS3(e3, t2) : (delete e3.parameters.fileRes, new Promise((s3, i3) => { + return e3.storageLocation === ge.s3 ? this.uploadToS3(e3, t2) : (delete e3.parameters.fileRes, new Promise((s2, i2) => { swan.uploadFile({ url: e3.host, filePath: this.getTempFilePath(e3), name: "file", formData: e3.parameters, success(e4) { - 200 === e4.statusCode ? s3() : i3({ code: e4.statusCode, content: e4.errMsg }); + 200 === e4.statusCode ? s2() : i2({ code: e4.statusCode, content: e4.errMsg }); }, fail(e4) { - i3({ code: 500, content: e4.errMsg }); + i2({ code: 500, content: e4.errMsg }); } }).onProgressUpdate((e4) => { t2 && t2(e4); }); })); } catch (e4) { - return new Promise((t3, s3) => { - s3({ code: 500, content: e4 }); + return new Promise((t3, s2) => { + s2({ code: 500, content: e4 }); }); } } @@ -10276,223 +10276,223 @@ const Re$1 = new class extends Me$1 { return t2.path || t2.tempFilePath; } uploadToS3(e3, t2) { - return new Promise((t3, s3) => b$1(this, void 0, void 0, function* () { - const i3 = yield this.fileToArrayBuffer(this.getTempFilePath(e3)); - swan.request({ url: e3.url, method: "PUT", header: e3.headers, data: i3, success(i4) { - 200 === i4.statusCode ? (e3.storageLocation === ge$1.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s3({ code: i4.statusCode, content: i4.errMsg }); + return new Promise((t3, s2) => b(this, void 0, void 0, function* () { + const i2 = yield this.fileToArrayBuffer(this.getTempFilePath(e3)); + swan.request({ url: e3.url, method: "PUT", header: e3.headers, data: i2, success(i3) { + 200 === i3.statusCode ? (e3.storageLocation === ge.s3 && (e3.url = e3.url.split("?")[0]), t3()) : s2({ code: i3.statusCode, content: i3.errMsg }); }, fail(e4) { - s3({ code: 500, content: e4.errMsg }); + s2({ code: 500, content: e4.errMsg }); } }); })); } fileToArrayBuffer(e3) { - return new Promise((t2, s3) => { + return new Promise((t2, s2) => { swan.getFileSystemManager().readFile({ filePath: e3, success: (e4) => { t2(e4.data); }, fail: (e4) => { - s3(e4); + s2(e4); } }); }); } }(); -let Ae$1 = class Ae { - constructor(e3, t2, s3) { - this.storageLocation = e3, this.url = t2, this.name = s3; +class Ae { + constructor(e3, t2, s2) { + this.storageLocation = e3, this.url = t2, this.name = s2; } -}; -const Pe$1 = new class { +} +const Pe = new class { constructor() { - this.uploader = { [e$1.UNIAPP]: Ie$1, [l$1.MP_WX]: Ne$1, [l$1.BROWSER]: Te$1, [l$1.MP_ALI]: Oe$1, [l$1.MP_BAIDU]: Re$1, [e$1.REACT_NATIVE]: Te$1, [l$1.MP_BYTE]: Ne$1 }; + this.uploader = { [e.UNIAPP]: Ie, [l.MP_WX]: Ne, [l.BROWSER]: Te, [l.MP_ALI]: Oe, [l.MP_BAIDU]: Re, [e.REACT_NATIVE]: Te, [l.MP_BYTE]: Ne }; } - upload(t2, i3) { - return b$1(this, void 0, void 0, function* () { - const n2 = s$1.currentFramework(), o2 = d$1.currentPlatform(), r2 = n2 === e$1.UNKNOWN ? o2 : n2; - let a3 = this.uploader[r2]; - return yield a3.upload(t2, i3), new Ae$1(t2.storageLocation, t2.url, t2.newFileName); + upload(t2, i2) { + return b(this, void 0, void 0, function* () { + const n2 = s.currentFramework(), o2 = d.currentPlatform(), r2 = n2 === e.UNKNOWN ? o2 : n2; + let a2 = this.uploader[r2]; + return yield a2.upload(t2, i2), new Ae(t2.storageLocation, t2.url, t2.newFileName); }); } }(); -let ke$1 = class ke { +class ke { resolve(e3) { - return new Promise((t2, s3) => { - let i3 = new re$1({ name: "uploadToken", params: { filename: e3 }, permission: ne$1.WRITE, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, fail(e4) { - s3(e4.content); + return new Promise((t2, s2) => { + let i2 = new re({ name: "uploadToken", params: { filename: e3 }, permission: ne.WRITE, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, fail(e4) { + s2(e4.content); }, success(e4) { - 200 === e4.code ? t2(e4.content) : s3(e4.content); + 200 === e4.code ? t2(e4.content) : s2(e4.content); } }); - te$1.Socket.e(i3); + te.Socket.e(i2); }); } -}; -let _e$1 = class _e { - constructor(e3, t2, s3, i3, n2, o2, r2) { - this.storageLocation = e3, this.host = t2, this.headers = s3, this.parameters = i3, this.file = n2, this.newFileName = o2, this.url = r2; +} +class _e { + constructor(e3, t2, s2, i2, n2, o2, r2) { + this.storageLocation = e3, this.host = t2, this.headers = s2, this.parameters = i2, this.file = n2, this.newFileName = o2, this.url = r2; } -}; -let De$1 = class De { +} +class De { constructor() { } newFileName(e3) { return e3 && e3.newFilename || ""; } -}; -let xe$1 = new class extends De$1 { +} +let xe = new class extends De { constructor() { super(); } url(e3) { return e3.host + "/" + e3.dir + "/" + this.newFileName(e3); } - build(e3, t2, s3) { - let i3, n2 = this.newFileName(e3); - return i3 = { key: e3.dir + "/" + n2, OSSAccessKeyId: e3.accessKeyId, policy: e3.policy, signature: e3.signature, success_action_status: "200", fileRes: t2 }, s3 && (i3 = { key: e3.dir + "/" + n2, OSSAccessKeyId: e3.accessKeyId, policy: e3.policy, signature: e3.signature, success_action_status: "200", "Content-Disposition": "attachment;filename=" + t2.name, fileRes: t2 }), new _e$1(ge$1.aliYun, e3.host, null, i3, t2, n2, this.url(e3)); + build(e3, t2, s2) { + let i2, n2 = this.newFileName(e3); + return i2 = { key: e3.dir + "/" + n2, OSSAccessKeyId: e3.accessKeyId, policy: e3.policy, signature: e3.signature, success_action_status: "200", fileRes: t2 }, s2 && (i2 = { key: e3.dir + "/" + n2, OSSAccessKeyId: e3.accessKeyId, policy: e3.policy, signature: e3.signature, success_action_status: "200", "Content-Disposition": "attachment;filename=" + t2.name, fileRes: t2 }), new _e(ge.aliYun, e3.host, null, i2, t2, n2, this.url(e3)); } }(); -let Ue$1 = new class extends De$1 { +let Ue = new class extends De { constructor() { super(); } url(e3) { return e3.host + "/" + e3.key; } - build(e3, t2, s3) { - let i3 = { "q-sign-algorithm": e3.qSignAlgorithm, "q-ak": e3.qAk, "q-key-time": e3.qKeyTime, "q-signature": e3.qSignature, policy: e3.policy, "x-cos-security-token": e3.xCosSecurityToken, success_action_status: "200", key: e3.key, fileRes: t2 }; - return s3 && (i3 = { "q-sign-algorithm": e3.qSignAlgorithm, "q-ak": e3.qAk, "q-key-time": e3.qKeyTime, "q-signature": e3.qSignature, policy: e3.policy, "x-cos-security-token": e3.xCosSecurityToken, success_action_status: "200", key: e3.key, "Content-Disposition": `attachment;filename=${t2.name}`, fileRes: t2 }), new _e$1(ge$1.tencent, e3.host, null, i3, t2, e3.key, this.url(e3)); + build(e3, t2, s2) { + let i2 = { "q-sign-algorithm": e3.qSignAlgorithm, "q-ak": e3.qAk, "q-key-time": e3.qKeyTime, "q-signature": e3.qSignature, policy: e3.policy, "x-cos-security-token": e3.xCosSecurityToken, success_action_status: "200", key: e3.key, fileRes: t2 }; + return s2 && (i2 = { "q-sign-algorithm": e3.qSignAlgorithm, "q-ak": e3.qAk, "q-key-time": e3.qKeyTime, "q-signature": e3.qSignature, policy: e3.policy, "x-cos-security-token": e3.xCosSecurityToken, success_action_status: "200", key: e3.key, "Content-Disposition": `attachment;filename=${t2.name}`, fileRes: t2 }), new _e(ge.tencent, e3.host, null, i2, t2, e3.key, this.url(e3)); } }(); -let Fe$1 = new class extends De$1 { +let Fe = new class extends De { constructor() { super(); } url(e3) { return e3.uploadUrl; } - build(e3, t2, s3) { - const i3 = { file: t2 }; - return new _e$1(ge$1.s3, null, { "Content-Type": "application/octet-stream" }, i3, t2, t2.name, this.url(e3)); + build(e3, t2, s2) { + const i2 = { file: t2 }; + return new _e(ge.s3, null, { "Content-Type": "application/octet-stream" }, i2, t2, t2.name, this.url(e3)); } }(); -let Ge$1 = class Ge { +class Ge { constructor() { - this.uploadTokenResolver = new ke$1(); + this.uploadTokenResolver = new ke(); } builder(e3) { - if (e3 === ge$1.aliYun) - return xe$1; - if (e3 === ge$1.tencent) - return Ue$1; - if (e3 === ge$1.s3) - return Fe$1; + if (e3 === ge.aliYun) + return xe; + if (e3 === ge.tencent) + return Ue; + if (e3 === ge.s3) + return Fe; throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:" + e3); } - build(e3, t2, s3) { - return b$1(this, void 0, void 0, function* () { + build(e3, t2, s2) { + return b(this, void 0, void 0, function* () { try { - let i3 = yield this.uploadTokenResolver.resolve(t2), n2 = this.builder(i3.vendor).build(i3, e3, s3); + let i2 = yield this.uploadTokenResolver.resolve(t2), n2 = this.builder(i2.vendor).build(i2, e3, s2); return Promise.resolve(n2); } catch (e4) { return Promise.reject(e4); } }); } -}; -let Le$1 = class Le { +} +class Le { constructor() { - this.requestBuilder = new Ge$1(), this.fileUploader = Pe$1; + this.requestBuilder = new Ge(), this.fileUploader = Pe; } - upload(e3, t2, s3, i3) { - return b$1(this, void 0, void 0, function* () { + upload(e3, t2, s2, i2) { + return b(this, void 0, void 0, function* () { try { - let n2 = yield this.requestBuilder.build(e3, t2, i3); - return this.fileUploader.upload(n2, s3); + let n2 = yield this.requestBuilder.build(e3, t2, i2); + return this.fileUploader.upload(n2, s2); } catch (e4) { return Promise.reject(e4); } }); } -}; -var Be$1, qe$1, je$1, He$1; +} +var Be, qe, je, He; !function(e3) { e3.MESSAGE_SENDING = "IM_INTERNAL_MESSAGE_SENDING", e3.MESSAGE_SEND_SUCCESS = "IM_INTERNAL_MESSAGE_SEND_SUCCESS", e3.MESSAGE_SEND_FAILED = "IM_INTERNAL_MESSAGE_SEND_FAILED", e3.MESSAGE_RECEIVED = "IM_INTERNAL_MESSAGE_RECEIVED", e3.MESSAGE_RECALLED = "IM_INTERNAL_MESSAGE_RECALLED", e3.MAX_MESSAGE_CHANGED = "IM_INTERNAL_MAX_MESSAGE_CHANGED", e3.MAX_MESSAGE_DELETED = "IM_INTERNAL_MAX_MESSAGE_DELETED", e3.UNREAD_AMOUNT_CHANGED = "IM_INTERNAL_UNREAD_MESSAGE_CHANGED", e3.CS_ONLINE_SUCCESS = "CS_ONLINE_SUCCESS", e3.CS_OFFLINE_SUCCESS = "CS_OFFLINE_SUCCESS", e3.CS_ACCEPTED = "CS_ACCEPTED", e3.CS_ENDED = "CS_ENDED", e3.CS_TRANSFER = "CS_TRANSFER", e3.CS_AGENT_MESSAGE_RECEIVED = "CS_AGENT_MESSAGE_RECEIVED"; -}(Be$1 || (Be$1 = {})); -let Ve$1 = class Ve { +}(Be || (Be = {})); +class Ve { clearUseLessAttribute() { delete this.buildOptions; } isOtherSent() { - return this.senderId !== te$1.Socket.user().id; + return this.senderId !== te.Socket.user().id; } getToData() { return this.buildOptions.createOptions.to.data; } -}; -let ze$1 = class ze { -}; +} +class ze { +} !function(e3) { e3.TEXT = "text", e3.IMAGE = "image", e3.FILE = "file", e3.VIDEO = "video", e3.AUDIO = "audio"; -}(qe$1 || (qe$1 = {})); -let We$1 = class We extends ze$1 { +}(qe || (qe = {})); +class We extends ze { constructor() { - super(...arguments), this.goEasyUploader = new Le$1(); + super(...arguments), this.goEasyUploader = new Le(); } improve(e3) { let t2 = e3.message; - return new Promise((e4, s3) => { - let i3, n2, o2 = t2.buildOptions.createOptions; - t2.type === qe$1.VIDEO ? (n2 = t2.payload, i3 = n2.video.name) : (n2 = t2.payload, i3 = n2.name), this.goEasyUploader.upload(o2.file, i3, o2.onProgress, t2.type === qe$1.FILE).then((s4) => { - s4.storageLocation !== ge$1.s3 && (s4.url = encodeURI(s4.url)), this.setPayload(s4, t2), e4(); + return new Promise((e4, s2) => { + let i2, n2, o2 = t2.buildOptions.createOptions; + t2.type === qe.VIDEO ? (n2 = t2.payload, i2 = n2.video.name) : (n2 = t2.payload, i2 = n2.name), this.goEasyUploader.upload(o2.file, i2, o2.onProgress, t2.type === qe.FILE).then((s3) => { + s3.storageLocation !== ge.s3 && (s3.url = encodeURI(s3.url)), this.setPayload(s3, t2), e4(); }).catch((e5) => { - s3(e5); + s2(e5); }); }); } setPayload(e3, t2) { t2.payload.url = e3.url; } -}; -let Xe$1 = class Xe extends We$1 { +} +class Xe extends We { setPayload(e3, t2) { - let s3, i3 = t2.payload; - switch (i3.video.url = e3.url, i3.video.name = e3.name, i3.thumbnail.height > 200 && (i3.thumbnail.height = 200, i3.thumbnail.width = 200 * i3.video.width / i3.video.height), e3.storageLocation) { - case ge$1.aliYun: - s3 = "?x-oss-process=video/snapshot,t_0000,f_jpg,h_" + i3.thumbnail.height + ",m_fast,ar_auto"; + let s2, i2 = t2.payload; + switch (i2.video.url = e3.url, i2.video.name = e3.name, i2.thumbnail.height > 200 && (i2.thumbnail.height = 200, i2.thumbnail.width = 200 * i2.video.width / i2.video.height), e3.storageLocation) { + case ge.aliYun: + s2 = "?x-oss-process=video/snapshot,t_0000,f_jpg,h_" + i2.thumbnail.height + ",m_fast,ar_auto"; break; - case ge$1.tencent: - s3 = "?ci-process=snapshot&time=1&format=jpg&height=" + i3.thumbnail.height; + case ge.tencent: + s2 = "?ci-process=snapshot&time=1&format=jpg&height=" + i2.thumbnail.height; break; - case ge$1.s3: - s3 = "?process=video&height=" + i3.thumbnail.height; + case ge.s3: + s2 = "?process=video&height=" + i2.thumbnail.height; break; default: throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:" + e3.storageLocation); } - i3.thumbnail.url = e3.url + s3; + i2.thumbnail.url = e3.url + s2; } -}; -let Je$1 = class Je extends We$1 { +} +class Je extends We { setPayload(e3, t2) { - let s3, i3 = t2.payload; - i3.url = e3.url; - const n2 = i3.height > 200 ? 200 : i3.height; + let s2, i2 = t2.payload; + i2.url = e3.url; + const n2 = i2.height > 200 ? 200 : i2.height; switch (e3.storageLocation) { - case ge$1.aliYun: - s3 = "?x-oss-process=image/resize,m_lfit,h_" + n2; + case ge.aliYun: + s2 = "?x-oss-process=image/resize,m_lfit,h_" + n2; break; - case ge$1.tencent: - s3 = `?imageMogr2/thumbnail/x${n2}`; + case ge.tencent: + s2 = `?imageMogr2/thumbnail/x${n2}`; break; - case ge$1.s3: - s3 = `?process=image&height=${n2}`; + case ge.s3: + s2 = `?process=image&height=${n2}`; break; default: throw new Error("Only Ali OSS and Tencent COS are supported, unknown storage location:" + e3.storageLocation); } - i3.thumbnail = e3.url + s3; + i2.thumbnail = e3.url + s2; } -}; -let Ye$1 = class Ye { +} +class Ye { constructor() { - this.improvers = { [qe$1.FILE]: new We$1(), [qe$1.AUDIO]: new We$1(), [qe$1.IMAGE]: new Je$1(), [qe$1.VIDEO]: new Xe$1() }; + this.improvers = { [qe.FILE]: new We(), [qe.AUDIO]: new We(), [qe.IMAGE]: new Je(), [qe.VIDEO]: new Xe() }; } improve(e3) { let t2 = this.improvers[e3.message.type]; @@ -10504,96 +10504,96 @@ let Ye$1 = class Ye { } return Promise.resolve(); } -}; -let $e$1 = class $e extends Q$1 { +} +class $e extends Q { static init() { this.i = new $e(); } -}; -let Qe$1 = class Qe { - constructor(e3, t2, s3, i3, n2) { - this.validate(e3), this.mt = e3.type, this.to = t2.id.toString(), this.d = JSON.stringify(t2.data), this.p = JSON.stringify(e3.payload), s3 && (this.nt = s3), n2 && (this.at = n2), i3 && (this.wxmpTemplateMsg = de$1(i3), this.wxmpTemplateMsg.data = JSON.stringify(this.wxmpTemplateMsg.data)); +} +class Qe { + constructor(e3, t2, s2, i2, n2) { + this.validate(e3), this.mt = e3.type, this.to = t2.id.toString(), this.d = JSON.stringify(t2.data), this.p = JSON.stringify(e3.payload), s2 && (this.nt = s2), n2 && (this.at = n2), i2 && (this.wxmpTemplateMsg = de(i2), this.wxmpTemplateMsg.data = JSON.stringify(this.wxmpTemplateMsg.data)); let r2 = t2.type; - if (this.t = r2, r2 === o$1.CS) { + if (this.t = r2, r2 === o.CS) { let t3 = e3; this.tid = t3.teamId; } this.guid = e3.messageId; } validate(e3) { - if (e3.type === qe$1.TEXT) { + if (e3.type === qe.TEXT) { if (JSON.stringify(e3.payload).length > 3072) throw Error("message-length limit 3kb"); } } -}; -let Ke$1 = class Ke { +} +class Ke { constructor() { - this.payloadImprover = new Ye$1(); + this.payloadImprover = new Ye(); } send(e3) { this.validate(e3); - let t2 = e3.message, s3 = e3.accessToken, i3 = t2.buildOptions, n2 = i3.createOptions, o2 = n2.notification, a3 = n2.wxmpTemplateMsg, c3 = n2.to; - c3.data || (c3.data = {}), t2.status = r$1.SENDING; - let u2 = i3.complete, l2 = this.payloadImprover.improve(e3); - Promise.all([u2, l2]).then(() => b$1(this, void 0, void 0, function* () { + let t2 = e3.message, s2 = e3.accessToken, i2 = t2.buildOptions, n2 = i2.createOptions, o2 = n2.notification, a2 = n2.wxmpTemplateMsg, c2 = n2.to; + c2.data || (c2.data = {}), t2.status = r.SENDING; + let u2 = i2.complete, l2 = this.payloadImprover.improve(e3); + Promise.all([u2, l2]).then(() => b(this, void 0, void 0, function* () { if (n2.beforeSend) { const e4 = JSON.parse(JSON.stringify(t2)); yield n2.beforeSend(e4); } - this.doSend(t2, c3, o2, a3, s3, e3); - })).catch((s4) => { - t2.status = r$1.FAIL, v$1.onFailed(e3, { code: s4 && s4.code || 400, content: s4 && s4.content || s4 }); + this.doSend(t2, c2, o2, a2, s2, e3); + })).catch((s3) => { + t2.status = r.FAIL, v.onFailed(e3, { code: s3 && s3.code || 400, content: s3 && s3.content || s3 }); }); } - doSend(e3, t2, s3, i3, n2, a3) { - let c3 = new Qe$1(e3, t2, s3, i3, n2); - $e$1.i.fire(Be$1.MESSAGE_SENDING, e3); - let u2 = new re$1({ name: y$1.publishIM, params: c3, unique: true, permission: ne$1.WRITE, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, fail: (t3) => { - e3.status = r$1.FAIL, $e$1.i.fire(Be$1.MESSAGE_SEND_FAILED, e3), v$1.onFailed(a3, { code: t3.resultCode, content: t3.content }); + doSend(e3, t2, s2, i2, n2, a2) { + let c2 = new Qe(e3, t2, s2, i2, n2); + $e.i.fire(Be.MESSAGE_SENDING, e3); + let u2 = new re({ name: y.publishIM, params: c2, unique: true, permission: ne.WRITE, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, fail: (t3) => { + e3.status = r.FAIL, $e.i.fire(Be.MESSAGE_SEND_FAILED, e3), v.onFailed(a2, { code: t3.resultCode, content: t3.content }); }, success: (t3) => { - if (e3.status = r$1.SUCCESS, e3.timestamp = t3.content.timestamp, e3.messageId = JSON.stringify(t3.content.id), e3.scene() === o$1.CS) { - let s4 = e3; - s4.customerId() !== te$1.Socket.user().id && (s4.sessionId = t3.content.sessionId); + if (e3.status = r.SUCCESS, e3.timestamp = t3.content.timestamp, e3.messageId = JSON.stringify(t3.content.id), e3.scene() === o.CS) { + let s3 = e3; + s3.customerId() !== te.Socket.user().id && (s3.sessionId = t3.content.sessionId); } - e3.clearUseLessAttribute(), $e$1.i.fire(Be$1.MESSAGE_SEND_SUCCESS, e3), v$1.onSuccess(a3, e3); + e3.clearUseLessAttribute(), $e.i.fire(Be.MESSAGE_SEND_SUCCESS, e3), v.onSuccess(a2, e3); } }); - te$1.Socket.e(u2); + te.Socket.e(u2); } validate(e3) { let t2 = e3.message; - if (!(t2 instanceof Ve$1)) + if (!(t2 instanceof Ve)) throw new Error("it is invalid message"); - if (t2.status !== r$1.NEW) + if (t2.status !== r.NEW) throw new Error("Please create a new message, a message can only be sent once"); } -}; -let Ze$1 = class Ze { +} +class Ze { insert(e3, t2) { - let s3 = this.binarySearch(e3, t2); - if (s3 >= 0) - e3.splice(s3, 1, t2); + let s2 = this.binarySearch(e3, t2); + if (s2 >= 0) + e3.splice(s2, 1, t2); else { - let i3 = -s3 - 1; - e3.splice(i3, 0, t2); + let i2 = -s2 - 1; + e3.splice(i2, 0, t2); } } binarySearch(e3, t2) { - let s3 = 0, i3 = e3.length - 1; - for (; s3 <= i3; ) { - let n2 = i3 + s3 >> 1, o2 = this.compare(t2, e3[n2]); + let s2 = 0, i2 = e3.length - 1; + for (; s2 <= i2; ) { + let n2 = i2 + s2 >> 1, o2 = this.compare(t2, e3[n2]); if (o2 > 0) - s3 = n2 + 1; + s2 = n2 + 1; else { if (!(o2 < 0)) return n2; - i3 = n2 - 1; + i2 = n2 - 1; } } - return -s3 - 1; + return -s2 - 1; } -}; -let et$1 = class et { +} +class et { constructor(e3) { this.messages = new Array(), this.allLoaded = false, this.target = e3; } @@ -10607,27 +10607,27 @@ let et$1 = class et { return this.messages[this.messages.length - 1]; } loadLocalMessages(e3, t2) { - let s3 = [], i3 = this.messages.length; + let s2 = [], i2 = this.messages.length; if (t2) { - if (i3 > 0) { - let n2 = this.messages[0].timestamp, o2 = this.messages[i3 - 1].timestamp; + if (i2 > 0) { + let n2 = this.messages[0].timestamp, o2 = this.messages[i2 - 1].timestamp; if (t2 >= n2 && t2 <= o2) - for (let n3 = i3 - 1; n3 >= 0; n3--) { - let i4 = this.messages[n3]; - if (i4.timestamp < t2) { - if (!(s3.length < e3)) + for (let n3 = i2 - 1; n3 >= 0; n3--) { + let i3 = this.messages[n3]; + if (i3.timestamp < t2) { + if (!(s2.length < e3)) break; - s3.unshift(i4); + s2.unshift(i3); } } } } else - s3 = this.messages.slice(-e3); - return s3; + s2 = this.messages.slice(-e3); + return s2; } cacheServerMessages(e3, t2) { - let s3 = this.messages[0]; - this.messages.length < et.CACHE_MAX_LENGTH && (!e3.lastTimestamp || this.messages.length > 0 && s3.timestamp === e3.lastTimestamp) && (t2.forEach((e4) => { + let s2 = this.messages[0]; + this.messages.length < et.CACHE_MAX_LENGTH && (!e3.lastTimestamp || this.messages.length > 0 && s2.timestamp === e3.lastTimestamp) && (t2.forEach((e4) => { et.sortedInserter.insert(this.messages, e4); }), t2.length < e3.limit && (this.allLoaded = true)); } @@ -10637,8 +10637,8 @@ let et$1 = class et { findMessagesByTimes(e3) { let t2 = []; return e3.forEach((e4) => { - let s3 = this.findMessageByTime(e4); - u$1.isDef(s3) && t2.push(s3); + let s2 = this.findMessageByTime(e4); + u.isDef(s2) && t2.push(s2); }), t2; } existsMessage(e3) { @@ -10652,7 +10652,7 @@ let et$1 = class et { t2 >= 0 && this.messages.splice(t2, 1); } recallMessage(e3) { - return e3.times.map((e4) => this.findMessageByTime(e4)).filter((e4) => u$1.isDef(e4)).map((t2) => (t2.recalled = true, t2.recaller = e3.recaller, t2)); + return e3.times.map((e4) => this.findMessageByTime(e4)).filter((e4) => u.isDef(e4)).map((t2) => (t2.recalled = true, t2.recaller = e3.recaller, t2)); } isEmpty() { return 0 === this.messages.length; @@ -10666,11 +10666,11 @@ let et$1 = class et { et.sortedInserter.insert(this.messages, e3), this.deleteGroupConversationMessage(), this.sliceOverLengthMessages(); } deleteGroupConversationMessage() { - this.target.scene === o$1.GROUP && this.messages.length >= 2 && 1 === this.messages[0].x && this.messages.shift(); + this.target.scene === o.GROUP && this.messages.length >= 2 && 1 === this.messages[0].x && this.messages.shift(); } maxSuccessMessageTime() { for (let e3 = this.messages.length - 1; e3 >= 0; e3--) - if (this.messages[e3].status === r$1.SUCCESS) + if (this.messages[e3].status === r.SUCCESS) return this.messages[e3].timestamp; return 0; } @@ -10680,52 +10680,52 @@ let et$1 = class et { correctPosition(e3) { this.deleteMessage(e3.messageId), this.saveMessage(e3); } -}; -et$1.CACHE_MAX_LENGTH = 200, et$1.sortedInserter = new class extends Ze$1 { +} +et.CACHE_MAX_LENGTH = 200, et.sortedInserter = new class extends Ze { compare(e3, t2) { - let s3 = e3.timestamp - t2.timestamp; - return s3 > 0 ? 1 : 0 === s3 ? 0 : -1; + let s2 = e3.timestamp - t2.timestamp; + return s2 > 0 ? 1 : 0 === s2 ? 0 : -1; } }(); -let st$1 = class st { - constructor(e3, t2, s3) { - this.scene = e3, this.id = t2, u$1.isDef(s3) && (this.teamId = s3); +class st { + constructor(e3, t2, s2) { + this.scene = e3, this.id = t2, u.isDef(s2) && (this.teamId = s2); } toString() { - return o$1.PRIVATE === this.scene || o$1.GROUP === this.scene ? this.scene + "#" + this.id : this.scene + "#" + this.id + "#" + this.teamId; + return o.PRIVATE === this.scene || o.GROUP === this.scene ? this.scene + "#" + this.id : this.scene + "#" + this.id + "#" + this.teamId; } customerId() { - if (o$1.CS === this.scene) - return this.id === this.teamId ? te$1.Socket.user().id : this.id; + if (o.CS === this.scene) + return this.id === this.teamId ? te.Socket.user().id : this.id; } - static byScene(e3, t2, s3) { - return new st(e3, t2, s3); + static byScene(e3, t2, s2) { + return new st(e3, t2, s2); } static byIMMessage(e3) { - let t2, s3, i3 = e3.scene(); - if (i3 === o$1.PRIVATE) { - let t3 = e3.senderId, i4 = e3.targetId(); - s3 = te$1.Socket.user().id === t3 ? i4 : t3; - } else if (i3 === o$1.GROUP) - s3 = e3.targetId(); + let t2, s2, i2 = e3.scene(); + if (i2 === o.PRIVATE) { + let t3 = e3.senderId, i3 = e3.targetId(); + s2 = te.Socket.user().id === t3 ? i3 : t3; + } else if (i2 === o.GROUP) + s2 = e3.targetId(); else { - if (i3 !== o$1.CS) - throw { code: 400, content: `scene ${i3} not exists` }; - s3 = e3.targetId(), t2 = e3.teamId; + if (i2 !== o.CS) + throw { code: 400, content: `scene ${i2} not exists` }; + s2 = e3.targetId(), t2 = e3.teamId; } - return new st(i3, s3, t2); + return new st(i2, s2, t2); } static byMessageReadRemoteEvent(e3) { - let t2, s3 = e3.scene, i3 = e3.targetId, n2 = e3.markerId, r2 = e3.teamId; - return s3 === o$1.PRIVATE ? t2 = te$1.Socket.user().id === n2 ? i3 : n2 : s3 === o$1.GROUP ? t2 = i3 : s3 === o$1.CS && (t2 = i3 === r2 ? n2 === te$1.Socket.user().id ? r2 : n2 : n2 === te$1.Socket.user().id ? i3 : r2), new st(s3, t2, r2); + let t2, s2 = e3.scene, i2 = e3.targetId, n2 = e3.markerId, r2 = e3.teamId; + return s2 === o.PRIVATE ? t2 = te.Socket.user().id === n2 ? i2 : n2 : s2 === o.GROUP ? t2 = i2 : s2 === o.CS && (t2 = i2 === r2 ? n2 === te.Socket.user().id ? r2 : n2 : n2 === te.Socket.user().id ? i2 : r2), new st(s2, t2, r2); } static byIMMessageDeletedEvent(e3) { - let t2 = e3.scene, s3 = e3.deleterId; - if (t2 === o$1.PRIVATE) { - let i3 = te$1.Socket.user().id === s3 ? e3.targetId : s3; - return new st(t2, i3); + let t2 = e3.scene, s2 = e3.deleterId; + if (t2 === o.PRIVATE) { + let i2 = te.Socket.user().id === s2 ? e3.targetId : s2; + return new st(t2, i2); } - if (t2 === o$1.GROUP) + if (t2 === o.GROUP) return new st(t2, e3.targetId); } static byConversationDTO(e3) { @@ -10733,83 +10733,83 @@ let st$1 = class st { return this.byIMMessage(t2); } static byConversationId(e3, t2) { - let s3; - if (e3 === o$1.PRIVATE) { + let s2; + if (e3 === o.PRIVATE) { let e4 = t2.split(":", 2); - s3 = e4[0] === te$1.Socket.user().id ? e4[1] : e4[0]; + s2 = e4[0] === te.Socket.user().id ? e4[1] : e4[0]; } else - s3 = t2; - return new st(e3, s3); + s2 = t2; + return new st(e3, s2); } -}; -let it$1 = class it { +} +class it { constructor(e3) { this.times = new Array(); - let t2 = e3[0], s3 = st$1.byIMMessage(t2); - this.scene = s3.scene, this.targetId = s3.id, e3.forEach((e4) => { - e4.status === r$1.SUCCESS && this.times.push(e4.timestamp); + let t2 = e3[0], s2 = st.byIMMessage(t2); + this.scene = s2.scene, this.targetId = s2.id, e3.forEach((e4) => { + e4.status === r.SUCCESS && this.times.push(e4.timestamp); }), this.times.sort((e4, t3) => e4 < t3 ? -1 : e4 == t3 ? 0 : 1); } -}; -let nt$1 = class nt { +} +class nt { static deleteServerMessages(e3) { - let t2 = new it$1(e3); - return t2.times.length < 0 ? Promise.resolve() : new Promise((e4, s3) => { - let i3 = new re$1({ name: y$1.IM_DELETE_MESSAGE, params: t2, permission: ne$1.WRITE, singleTimeout: S$1.commonQuerySingle, totalTimeout: S$1.commonQueryTotal, success: (t3) => { - 200 === t3.code ? e4(t3) : s3(t3); + let t2 = new it(e3); + return t2.times.length < 0 ? Promise.resolve() : new Promise((e4, s2) => { + let i2 = new re({ name: y.IM_DELETE_MESSAGE, params: t2, permission: ne.WRITE, singleTimeout: S.commonQuerySingle, totalTimeout: S.commonQueryTotal, success: (t3) => { + 200 === t3.code ? e4(t3) : s2(t3); }, fail: (e5) => { - s3(e5); + s2(e5); } }); - te$1.Socket.e(i3); + te.Socket.e(i2); }); } static validate(e3) { let t2 = e3.messages; for (let e4 = 0; e4 < t2.length; e4++) { - let s3 = t2[e4]; - if (s3.status === r$1.SENDING) - throw { code: 400, content: "message[" + e4 + "] is '" + s3.status + "' and cannot be deleted" }; + let s2 = t2[e4]; + if (s2.status === r.SENDING) + throw { code: 400, content: "message[" + e4 + "] is '" + s2.status + "' and cannot be deleted" }; } } -}; -let ot$1 = class ot { - constructor(e3, t2, s3, i3, n2) { - this.scene = e3, this.id = t2, this.after = s3, this.min = i3, this.teamId = n2; +} +class ot { + constructor(e3, t2, s2, i2, n2) { + this.scene = e3, this.id = t2, this.after = s2, this.min = i2, this.teamId = n2; } -}; -let rt$1 = class rt { - constructor(e3, t2, s3, i3) { - this.id = e3, this.scene = t2, this.lastTimestamp = s3, this.teamId = i3; +} +class rt { + constructor(e3, t2, s2, i2) { + this.id = e3, this.scene = t2, this.lastTimestamp = s2, this.teamId = i2; } -}; -let at$1 = class at extends Ve$1 { +} +class at extends Ve { constructor() { super(...arguments), this.read = false; } scene() { - return o$1.PRIVATE; + return o.PRIVATE; } targetId() { return this.receiverId; } -}; -let ct$1 = class ct extends Ve$1 { +} +class ct extends Ve { scene() { - return o$1.GROUP; + return o.GROUP; } targetId() { return this.groupId; } -}; -let ut$1 = class ut extends Ve$1 { +} +class ut extends Ve { constructor() { super(...arguments), this.accepted = false; } scene() { - return o$1.CS; + return o.CS; } targetId() { - return te$1.Socket.user().id === this.customerId() ? this.teamId : this.customerId(); + return te.Socket.user().id === this.customerId() ? this.teamId : this.customerId(); } sendByCustomer() { return this.to === this.teamId; @@ -10818,96 +10818,96 @@ let ut$1 = class ut extends Ve$1 { return this.sendByCustomer() ? this.senderId : this.to; } isOtherSent() { - return te$1.Socket.user().id === this.customerId() ? this.senderId !== te$1.Socket.user().id : this.senderId === this.customerId(); + return te.Socket.user().id === this.customerId() ? this.senderId !== te.Socket.user().id : this.senderId === this.customerId(); } -}; +} !function(e3) { e3.ACCEPT = "CS_ACCEPT", e3.END = "CS_END", e3.TRANSFER = "CS_TRANSFER"; -}(je$1 || (je$1 = {})); -let lt$1 = class lt { +}(je || (je = {})); +class lt { build(e3) { - let t2, s3 = e3.t; - s3 === o$1.PRIVATE ? (t2 = new at$1(), t2.read = false, t2.receiverId = e3.r) : s3 === o$1.GROUP ? (t2 = new ct$1(), t2.groupId = e3.r, t2.senderData = e3.d ? JSON.parse(e3.d) : {}) : s3 === o$1.CS && (t2 = new ut$1(), t2.to = e3.r, t2.teamId = e3.tid, t2.senderData = e3.d ? JSON.parse(e3.d) : {}, t2.accepted = e3.accepted, t2.customerId() !== te$1.Socket.user().id && (t2.sessionId = e3.sessionId)), t2.senderId = e3.s, t2.messageId = e3.i, t2.timestamp = e3.ts, t2.type = e3.mt; - let i3 = e3.p; - if (u$1.isDef(i3)) - if (s3 === o$1.CS && t2.type === je$1.TRANSFER) { - let e4 = JSON.parse(i3); + let t2, s2 = e3.t; + s2 === o.PRIVATE ? (t2 = new at(), t2.read = false, t2.receiverId = e3.r) : s2 === o.GROUP ? (t2 = new ct(), t2.groupId = e3.r, t2.senderData = e3.d ? JSON.parse(e3.d) : {}) : s2 === o.CS && (t2 = new ut(), t2.to = e3.r, t2.teamId = e3.tid, t2.senderData = e3.d ? JSON.parse(e3.d) : {}, t2.accepted = e3.accepted, t2.customerId() !== te.Socket.user().id && (t2.sessionId = e3.sessionId)), t2.senderId = e3.s, t2.messageId = e3.i, t2.timestamp = e3.ts, t2.type = e3.mt; + let i2 = e3.p; + if (u.isDef(i2)) + if (s2 === o.CS && t2.type === je.TRANSFER) { + let e4 = JSON.parse(i2); e4.transferTo.data = JSON.parse(e4.transferTo.data), t2.payload = e4; } else - t2.payload = JSON.parse(i3); + t2.payload = JSON.parse(i2); let n2 = e3.rc; - return u$1.isDef(n2) && true === n2 ? (t2.recalled = n2, t2.recaller = e3.recaller) : t2.recalled = false, t2.status = r$1.SUCCESS, t2; + return u.isDef(n2) && true === n2 ? (t2.recalled = n2, t2.recaller = e3.recaller) : t2.recalled = false, t2.status = r.SUCCESS, t2; } -}; -let dt$1 = class dt { +} +class dt { constructor() { - this.builder = new lt$1(); + this.builder = new lt(); } - sync(e3, t2, s3, i3, n2) { - let o2 = new ot$1(e3, t2, s3, i3, n2); + sync(e3, t2, s2, i2, n2) { + let o2 = new ot(e3, t2, s2, i2, n2); return new Promise((e4, t3) => { - let s4 = new re$1({ name: y$1.IM_HISTORY_CHANGE, params: o2, permission: ne$1.READ, singleTimeout: S$1.commonQuerySingle, totalTimeout: S$1.commonQueryTotal, fail: (e5) => { + let s3 = new re({ name: y.IM_HISTORY_CHANGE, params: o2, permission: ne.READ, singleTimeout: S.commonQuerySingle, totalTimeout: S.commonQueryTotal, fail: (e5) => { t3(e5); }, success: (t4) => { - let s5 = t4.content; - e4(s5); + let s4 = t4.content; + e4(s4); } }); - te$1.Socket.e(s4); + te.Socket.e(s3); }); } loadServerMessages(e3, t2) { - return new Promise((s3, i3) => { - let n2 = new re$1({ name: y$1.IM_HISTORY, params: t2, permission: ne$1.READ, singleTimeout: S$1.commonQuerySingle, totalTimeout: S$1.commonQueryTotal, fail: (e4) => { - i3(e4); + return new Promise((s2, i2) => { + let n2 = new re({ name: y.IM_HISTORY, params: t2, permission: ne.READ, singleTimeout: S.commonQuerySingle, totalTimeout: S.commonQueryTotal, fail: (e4) => { + i2(e4); }, success: (t3) => { - let i4 = t3.content; - i4.messages = this.convertServerMessages(e3, i4.messages), s3(i4); + let i3 = t3.content; + i3.messages = this.convertServerMessages(e3, i3.messages), s2(i3); } }); - te$1.Socket.e(n2); + te.Socket.e(n2); }); } convertServerMessages(e3, t2) { - let s3 = [], i3 = e3.scene, n2 = e3.id; + let s2 = [], i2 = e3.scene, n2 = e3.id; return t2.forEach((t3) => { - if (t3.t = i3, o$1.PRIVATE === i3) - t3.r = t3.s === te$1.Socket.user().id ? n2 : te$1.Socket.user().id; - else if (o$1.GROUP === i3) + if (t3.t = i2, o.PRIVATE === i2) + t3.r = t3.s === te.Socket.user().id ? n2 : te.Socket.user().id; + else if (o.GROUP === i2) t3.r = n2; - else if (o$1.CS === i3) { - let s4 = e3.customerId(), i4 = e3.teamId; - s4 === te$1.Socket.user().id ? t3.r = i4 : t3.r = s4; + else if (o.CS === i2) { + let s3 = e3.customerId(), i3 = e3.teamId; + s3 === te.Socket.user().id ? t3.r = i3 : t3.r = s3; } let r2 = this.builder.build(t3); - s3.push(r2); - }), s3; + s2.push(r2); + }), s2; } updateServerOffsets(e3, t2) { - return b$1(this, void 0, void 0, function* () { - let s3 = new rt$1(t2.id, t2.scene, e3, t2.teamId); + return b(this, void 0, void 0, function* () { + let s2 = new rt(t2.id, t2.scene, e3, t2.teamId); return new Promise((e4, t3) => { - let i3 = new re$1({ name: y$1.IM_MARK_AS_READ, params: s3, permission: ne$1.WRITE, singleTimeout: S$1.commonRequestSingle, totalTimeout: S$1.commonRequestTotal, success: (t4) => { + let i2 = new re({ name: y.IM_MARK_AS_READ, params: s2, permission: ne.WRITE, singleTimeout: S.commonRequestSingle, totalTimeout: S.commonRequestTotal, success: (t4) => { e4(t4); }, fail: (e5) => { t3(e5); } }); - te$1.Socket.e(i3); + te.Socket.e(i2); }); }); } -}; -dt$1.instance = new dt$1(); -let ht$1 = class ht { +} +dt.instance = new dt(); +class ht { constructor() { - this.offsetMap = /* @__PURE__ */ new Map(), this.markingTime = 0, this.userId = te$1.Socket.user().id; + this.offsetMap = /* @__PURE__ */ new Map(), this.markingTime = 0, this.userId = te.Socket.user().id; } updateOffset(e3, t2) { - let s3 = this.offsetMap.get(e3); - return u$1.isDef(s3) ? t2 > s3 && (this.offsetMap.set(e3, t2), true) : (this.offsetMap.set(e3, t2), true); + let s2 = this.offsetMap.get(e3); + return u.isDef(s2) ? t2 > s2 && (this.offsetMap.set(e3, t2), true) : (this.offsetMap.set(e3, t2), true); } updateUserOffsets(e3) { e3.forEach((e4) => { - let t2 = e4.userId, s3 = e4.offset; - this.updateOffset(t2, s3); + let t2 = e4.userId, s2 = e4.offset; + this.updateOffset(t2, s2); }); } updateMyOffset(e3) { @@ -10920,13 +10920,13 @@ let ht$1 = class ht { let t2 = this.offsetMap.get(e3); return t2 || 0; } -}; -let pt$1 = class pt { - constructor(e3, t2, s3, i3, n2) { - this.id = e3, this.scene = t2, this.lastTimestamp = s3, this.limit = i3, this.teamId = n2; +} +class pt { + constructor(e3, t2, s2, i2, n2) { + this.id = e3, this.scene = t2, this.lastTimestamp = s2, this.limit = i2, this.teamId = n2; } -}; -let mt$1 = class mt { +} +class mt { constructor(e3) { this.history = e3; } @@ -10934,20 +10934,20 @@ let mt$1 = class mt { this.oldLastMessage = this.history.getMaxMessage(), this.oldUnreadAmount = this.history.unreadAmount(), this.oldLastMessage && (this.oldLastMessageRecalled = this.oldLastMessage.recalled, this.oldLastMessageRead = this.oldLastMessage.read, this.oldLastMessageStatus = this.oldLastMessage.status); } post() { - let e3, t2, s3, i3 = this.history.unreadAmount(), n2 = this.history.getMaxMessage(); - n2 && (s3 = n2.status, e3 = n2.read, t2 = n2.recalled); + let e3, t2, s2, i2 = this.history.unreadAmount(), n2 = this.history.getMaxMessage(); + n2 && (s2 = n2.status, e3 = n2.read, t2 = n2.recalled); let o2 = this.history.target; - this.oldLastMessage !== n2 || this.oldLastMessageRead !== e3 || this.oldLastMessageRecalled !== t2 || this.oldLastMessageStatus !== s3 ? n2 ? $e$1.i.fire(Be$1.MAX_MESSAGE_CHANGED, n2) : $e$1.i.fire(Be$1.MAX_MESSAGE_DELETED, o2) : this.oldUnreadAmount !== i3 && $e$1.i.fire(Be$1.UNREAD_AMOUNT_CHANGED, o2); + this.oldLastMessage !== n2 || this.oldLastMessageRead !== e3 || this.oldLastMessageRecalled !== t2 || this.oldLastMessageStatus !== s2 ? n2 ? $e.i.fire(Be.MAX_MESSAGE_CHANGED, n2) : $e.i.fire(Be.MAX_MESSAGE_DELETED, o2) : this.oldUnreadAmount !== i2 && $e.i.fire(Be.UNREAD_AMOUNT_CHANGED, o2); } -}; -let ft$1 = class ft { - constructor(e3, t2, s3, i3) { - this.scene = e3, this.conversationId = t2, this.recaller = s3, this.times = i3; +} +class ft { + constructor(e3, t2, s2, i2) { + this.scene = e3, this.conversationId = t2, this.recaller = s2, this.times = i2; } -}; -let gt$1 = class gt { +} +class gt { static init() { - this.eventCenter = new ee$1(); + this.eventCenter = new ee(); } static on(e3, t2) { this.eventCenter.on(e3, t2); @@ -10958,13 +10958,13 @@ let gt$1 = class gt { static off(e3, t2) { this.eventCenter.off(e3, t2); } -}; +} !function(e3) { e3.PRIVATE_MESSAGE_RECEIVED = "PRIVATE_MESSAGE_RECEIVED", e3.GROUP_MESSAGE_RECEIVED = "GROUP_MESSAGE_RECEIVED", e3.SYSTEM_MESSAGE_RECEIVED = "SYSTEM_MESSAGE_RECEIVED", e3.CONVERSATIONS_UPDATED = "CONVERSATIONS_UPDATED", e3.HISTORY_EXPIRED = "HISTORY_EXPIRED", e3.USER_PRESENCE = "USER_PRESENCE", e3.GROUP_PRESENCE = "GROUP_PRESENCE", e3.MESSAGE_DELETED = "MESSAGE_DELETED", e3.MESSAGE_READ = "MESSAGE_READ", e3.MESSAGE_RECALLED = "MESSAGE_RECALLED", e3.CS_MESSAGE_RECEIVED = "CS_MESSAGE_RECEIVED", e3.PENDING_CONVERSATIONS_UPDATED = "PENDING_CONVERSATIONS_UPDATED"; -}(He$1 || (He$1 = {})); -let yt$1 = class yt { +}(He || (He = {})); +class yt { constructor(e3) { - this.expiredTime = 0, this.remoteHistory = dt$1.instance, this.target = e3, this.userOffsets = new ht$1(), this.messageCache = new et$1(e3); + this.expiredTime = 0, this.remoteHistory = dt.instance, this.target = e3, this.userOffsets = new ht(), this.messageCache = new et(e3); } initMaxMessageAndOffsets(e3, t2) { this.existsMessage(e3) || (this.messageCache.saveMessage(e3), t2.forEach((e4) => { @@ -10975,29 +10975,29 @@ let yt$1 = class yt { return this.messageCache.existsMessage(e3.messageId); } loadHistory(e3, t2) { - return b$1(this, void 0, void 0, function* () { - return this.expiredTime > 0 && !this.messageCache.isEmpty() && (yield this.updateByServerChange()), u$1.isUndef(t2) ? t2 = 10 : t2 > 30 && (t2 = 30), yield this.loadServerMessages(e3, t2); + return b(this, void 0, void 0, function* () { + return this.expiredTime > 0 && !this.messageCache.isEmpty() && (yield this.updateByServerChange()), u.isUndef(t2) ? t2 = 10 : t2 > 30 && (t2 = 30), yield this.loadServerMessages(e3, t2); }); } loadServerMessages(e3, t2) { - return b$1(this, void 0, void 0, function* () { - let s3 = this.messageCache.loadLocalMessages(t2, e3); - if (false === this.messageCache.allLoaded && s3.length !== t2) { - let i3 = t2 - s3.length, n2 = s3[0] ? s3[0].timestamp : e3, o2 = new pt$1(this.target.id.toString(), this.target.scene, n2, i3, this.target.teamId), r2 = yield this.remoteHistory.loadServerMessages(this.target, o2), a3 = r2.messages; - s3 = a3.concat(s3), this.messageCache.cacheServerMessages(o2, a3), r2.userOffsets.forEach((e4) => { + return b(this, void 0, void 0, function* () { + let s2 = this.messageCache.loadLocalMessages(t2, e3); + if (false === this.messageCache.allLoaded && s2.length !== t2) { + let i2 = t2 - s2.length, n2 = s2[0] ? s2[0].timestamp : e3, o2 = new pt(this.target.id.toString(), this.target.scene, n2, i2, this.target.teamId), r2 = yield this.remoteHistory.loadServerMessages(this.target, o2), a2 = r2.messages; + s2 = a2.concat(s2), this.messageCache.cacheServerMessages(o2, a2), r2.userOffsets.forEach((e4) => { this.userOffsets.updateOffset(e4.userId, e4.offset); }), this.userOffsets.offsetMap.forEach((e4, t3) => { - this.markLocalMessagesRead(a3, t3, e4, false); + this.markLocalMessagesRead(a2, t3, e4, false); }); } - return s3; + return s2; }); } deleteMessages(e3) { - return b$1(this, void 0, void 0, function* () { - yield this.aopUnreadAmountMaxMessage(() => b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { + yield this.aopUnreadAmountMaxMessage(() => b(this, void 0, void 0, function* () { let t2 = e3.messages; - yield nt$1.deleteServerMessages(t2), this.messageCache.deleteMessages(t2), v$1.onSuccess(e3); + yield nt.deleteServerMessages(t2), this.messageCache.deleteMessages(t2), v.onSuccess(e3); })); }); } @@ -11007,47 +11007,47 @@ let yt$1 = class yt { }); } doSyncDeletedMessage(e3, t2) { - if (e3 === te$1.Socket.user().id) { + if (e3 === te.Socket.user().id) { let e4 = this.messageCache.findMessagesByTimes(t2); - this.messageCache.deleteMessages(e4), e4.length > 0 && gt$1.fire(He$1.MESSAGE_DELETED, e4); + this.messageCache.deleteMessages(e4), e4.length > 0 && gt.fire(He.MESSAGE_DELETED, e4); } } recallMessages(e3) { - return b$1(this, void 0, void 0, function* () { - yield this.aopUnreadAmountMaxMessage(() => b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { + yield this.aopUnreadAmountMaxMessage(() => b(this, void 0, void 0, function* () { this.doRecall(e3); })); }); } doRecall(e3) { let t2 = this.messageCache.recallMessage(e3); - t2.length > 0 && gt$1.fire(He$1.MESSAGE_RECALLED, t2); + t2.length > 0 && gt.fire(He.MESSAGE_RECALLED, t2); } expire() { this.messageCache.isEmpty() || (this.expiredTime = this.messageCache.maxSuccessMessageTime()); } updateByServerChange() { - return b$1(this, void 0, void 0, function* () { - yield this.aopUnreadAmountMaxMessage(() => b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { + yield this.aopUnreadAmountMaxMessage(() => b(this, void 0, void 0, function* () { let e3 = yield this.remoteHistory.sync(this.target.scene, this.target.id, this.expiredTime, this.messageCache.minTime(), this.target.teamId); e3.userOffsets.forEach((e4) => { this.markLocalMessagesRead(this.messageCache.all(), e4.userId, e4.offset, true); }); let t2 = e3.deletedMessageTimes; - t2.length > 0 && this.doSyncDeletedMessage(te$1.Socket.user().id, t2); - let s3 = e3.recalledMessages; - s3.length > 0 && s3.forEach((e4) => { - let t3 = new ft$1(this.target.scene, this.target.id, e4.recaller, e4.times); + t2.length > 0 && this.doSyncDeletedMessage(te.Socket.user().id, t2); + let s2 = e3.recalledMessages; + s2.length > 0 && s2.forEach((e4) => { + let t3 = new ft(this.target.scene, this.target.id, e4.recaller, e4.times); this.doRecall(t3); }), this.expiredTime = 0; })); }); } markRead() { - return b$1(this, void 0, void 0, function* () { - yield this.aopUnreadAmountMaxMessage(() => b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { + yield this.aopUnreadAmountMaxMessage(() => b(this, void 0, void 0, function* () { let e3 = this.messageCache.maxSuccessMessageTime(); - e3 > this.userOffsets.myOffset() && (this.userOffsets.markingTime = e3, yield this.remoteHistory.updateServerOffsets(e3, this.target), e3 === this.userOffsets.markingTime && this.markLocalMessagesRead(this.messageCache.all(), te$1.Socket.user().id, e3, true)); + e3 > this.userOffsets.myOffset() && (this.userOffsets.markingTime = e3, yield this.remoteHistory.updateServerOffsets(e3, this.target), e3 === this.userOffsets.markingTime && this.markLocalMessagesRead(this.messageCache.all(), te.Socket.user().id, e3, true)); })); }); } @@ -11063,11 +11063,11 @@ let yt$1 = class yt { } onMessageSendSuccess(e3) { this.aopUnreadAmountMaxMessage(() => { - this.messageCache.correctPosition(e3), this.markLocalMessagesRead(this.messageCache.all(), te$1.Socket.user().id, e3.timestamp, true); + this.messageCache.correctPosition(e3), this.markLocalMessagesRead(this.messageCache.all(), te.Socket.user().id, e3.timestamp, true); }); } onMessageSendFailed(e3) { - this.getMaxMessage() === e3 && $e$1.i.fire(Be$1.MAX_MESSAGE_CHANGED, e3); + this.getMaxMessage() === e3 && $e.i.fire(Be.MAX_MESSAGE_CHANGED, e3); } onMessageReceived(e3) { this.aopUnreadAmountMaxMessage(() => { @@ -11075,57 +11075,57 @@ let yt$1 = class yt { }); } aopUnreadAmountMaxMessage(e3, t2) { - return b$1(this, void 0, void 0, function* () { + return b(this, void 0, void 0, function* () { try { - let t3 = new mt$1(this); + let t3 = new mt(this); t3.pre(), yield e3(), t3.post(); } catch (e4) { - v$1.onFailed(t2, e4); + v.onFailed(t2, e4); } }); } - markLocalMessagesRead(e3, t2, s3, i3) { - if (this.userOffsets.updateOffset(t2, s3), this.isOtherUserId(t2)) { - let t3 = this.markMySentRead(e3, s3); - i3 && t3.length > 0 && gt$1.fire(He$1.MESSAGE_READ, t3); + markLocalMessagesRead(e3, t2, s2, i2) { + if (this.userOffsets.updateOffset(t2, s2), this.isOtherUserId(t2)) { + let t3 = this.markMySentRead(e3, s2); + i2 && t3.length > 0 && gt.fire(He.MESSAGE_READ, t3); } else - t2 === te$1.Socket.user().id && this.markOthersSentRead(e3, s3); + t2 === te.Socket.user().id && this.markOthersSentRead(e3, s2); } markOthersSentRead(e3, t2) { - if (this.target.scene === o$1.PRIVATE) - for (let s3 = e3.length - 1; s3 >= 0; s3--) { - let i3 = e3[s3]; - if (i3.isOtherSent() && i3.timestamp <= t2) { - if (i3.read) + if (this.target.scene === o.PRIVATE) + for (let s2 = e3.length - 1; s2 >= 0; s2--) { + let i2 = e3[s2]; + if (i2.isOtherSent() && i2.timestamp <= t2) { + if (i2.read) break; - i3.read = true; + i2.read = true; } } } markMySentRead(e3, t2) { - let s3 = new Array(); - if (this.target.scene === o$1.PRIVATE) - for (let i3 = e3.length - 1; i3 >= 0; i3--) { - let n2 = e3[i3]; - if (!n2.isOtherSent() && n2.timestamp <= t2 && n2.status === r$1.SUCCESS) { + let s2 = new Array(); + if (this.target.scene === o.PRIVATE) + for (let i2 = e3.length - 1; i2 >= 0; i2--) { + let n2 = e3[i2]; + if (!n2.isOtherSent() && n2.timestamp <= t2 && n2.status === r.SUCCESS) { if (n2.read) break; - n2.read = true, s3.push(n2); + n2.read = true, s2.push(n2); } } - return s3; + return s2; } isOtherUserId(e3) { - if (this.target.scene === o$1.CS) { + if (this.target.scene === o.CS) { let t2 = this.target.customerId(); - return te$1.Socket.user().id === t2 ? e3 !== te$1.Socket.user().id : e3 === t2; + return te.Socket.user().id === t2 ? e3 !== te.Socket.user().id : e3 === t2; } - return e3 !== te$1.Socket.user().id; + return e3 !== te.Socket.user().id; } unreadAmount(e3) { - let t2 = 0, s3 = this.userOffsets.myOffset(), i3 = this.messageCache.all(); - for (const e4 of i3) - e4.isOtherSent() && false === e4.recalled && e4.timestamp > s3 && (t2 += 1); + let t2 = 0, s2 = this.userOffsets.myOffset(), i2 = this.messageCache.all(); + for (const e4 of i2) + e4.isOtherSent() && false === e4.recalled && e4.timestamp > s2 && (t2 += 1); return t2; } getMaxMessage(e3) { @@ -11133,170 +11133,170 @@ let yt$1 = class yt { } maxTime(e3) { let t2 = this.getMaxMessage(); - return u$1.isDef(t2) ? t2.timestamp : 0; + return u.isDef(t2) ? t2.timestamp : 0; } -}; -let St$1 = class St { +} +class St { constructor(e3, t2) { this.teamId = e3, this.customerId = t2; } -}; -let Et$1 = class Et { -}; -let vt$1 = class vt { - constructor(e3, t2, s3) { - this.teamId = e3, this.teamData = JSON.stringify(t2), this.agentData = JSON.stringify(s3); +} +class Et { +} +class vt { + constructor(e3, t2, s2) { + this.teamId = e3, this.teamData = JSON.stringify(t2), this.agentData = JSON.stringify(s2); } -}; -let bt$1 = class bt { +} +class bt { constructor(e3) { this.teamId = e3; } -}; -let Ct$1 = class Ct { +} +class Ct { constructor(e3) { this.teamId = e3; } -}; -var wt$1 = { exports: {} }, Mt$1 = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, It$1 = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], Nt$1 = function(e3) { - var t2 = e3, s3 = e3.indexOf("["), i3 = e3.indexOf("]"); - -1 != s3 && -1 != i3 && (e3 = e3.substring(0, s3) + e3.substring(s3, i3).replace(/:/g, ";") + e3.substring(i3, e3.length)); - for (var n2 = Mt$1.exec(e3 || ""), o2 = {}, r2 = 14; r2--; ) - o2[It$1[r2]] = n2[r2] || ""; - return -1 != s3 && -1 != i3 && (o2.source = t2, o2.host = o2.host.substring(1, o2.host.length - 1).replace(/;/g, ":"), o2.authority = o2.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), o2.ipv6uri = true), o2; -}, Tt$1 = { exports: {} }, Ot$1 = { exports: {} }, Rt$1 = 1e3, At$1 = 60 * Rt$1, Pt$1 = 60 * At$1, kt$1 = 24 * Pt$1, _t$1 = 365.25 * kt$1, Dt$1 = function(e3, t2) { +} +var wt = { exports: {} }, Mt = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, It = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], Nt = function(e3) { + var t2 = e3, s2 = e3.indexOf("["), i2 = e3.indexOf("]"); + -1 != s2 && -1 != i2 && (e3 = e3.substring(0, s2) + e3.substring(s2, i2).replace(/:/g, ";") + e3.substring(i2, e3.length)); + for (var n2 = Mt.exec(e3 || ""), o2 = {}, r2 = 14; r2--; ) + o2[It[r2]] = n2[r2] || ""; + return -1 != s2 && -1 != i2 && (o2.source = t2, o2.host = o2.host.substring(1, o2.host.length - 1).replace(/;/g, ":"), o2.authority = o2.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), o2.ipv6uri = true), o2; +}, Tt = { exports: {} }, Ot = { exports: {} }, Rt = 1e3, At = 60 * Rt, Pt = 60 * At, kt = 24 * Pt, _t = 365.25 * kt, Dt = function(e3, t2) { t2 = t2 || {}; - var s3 = typeof e3; - if ("string" === s3 && e3.length > 0) + var s2 = typeof e3; + if ("string" === s2 && e3.length > 0) return function(e4) { if (e4 = String(e4), e4.length > 100) return; var t3 = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e4); if (!t3) return; - var s4 = parseFloat(t3[1]); + var s3 = parseFloat(t3[1]); switch ((t3[2] || "ms").toLowerCase()) { case "years": case "year": case "yrs": case "yr": case "y": - return s4 * _t$1; + return s3 * _t; case "days": case "day": case "d": - return s4 * kt$1; + return s3 * kt; case "hours": case "hour": case "hrs": case "hr": case "h": - return s4 * Pt$1; + return s3 * Pt; case "minutes": case "minute": case "mins": case "min": case "m": - return s4 * At$1; + return s3 * At; case "seconds": case "second": case "secs": case "sec": case "s": - return s4 * Rt$1; + return s3 * Rt; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": - return s4; + return s3; default: return; } }(e3); - if ("number" === s3 && false === isNaN(e3)) + if ("number" === s2 && false === isNaN(e3)) return t2.long ? function(e4) { - return xt$1(e4, kt$1, "day") || xt$1(e4, Pt$1, "hour") || xt$1(e4, At$1, "minute") || xt$1(e4, Rt$1, "second") || e4 + " ms"; + return xt(e4, kt, "day") || xt(e4, Pt, "hour") || xt(e4, At, "minute") || xt(e4, Rt, "second") || e4 + " ms"; }(e3) : function(e4) { - if (e4 >= kt$1) - return Math.round(e4 / kt$1) + "d"; - if (e4 >= Pt$1) - return Math.round(e4 / Pt$1) + "h"; - if (e4 >= At$1) - return Math.round(e4 / At$1) + "m"; - if (e4 >= Rt$1) - return Math.round(e4 / Rt$1) + "s"; + if (e4 >= kt) + return Math.round(e4 / kt) + "d"; + if (e4 >= Pt) + return Math.round(e4 / Pt) + "h"; + if (e4 >= At) + return Math.round(e4 / At) + "m"; + if (e4 >= Rt) + return Math.round(e4 / Rt) + "s"; return e4 + "ms"; }(e3); throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e3)); }; -function xt$1(e3, t2, s3) { +function xt(e3, t2, s2) { if (!(e3 < t2)) - return e3 < 1.5 * t2 ? Math.floor(e3 / t2) + " " + s3 : Math.ceil(e3 / t2) + " " + s3 + "s"; + return e3 < 1.5 * t2 ? Math.floor(e3 / t2) + " " + s2 : Math.ceil(e3 / t2) + " " + s2 + "s"; } !function(e3, t2) { - function s3(e4) { - var s4; + function s2(e4) { + var s3; function n2() { if (n2.enabled) { - var e5 = n2, i4 = +/* @__PURE__ */ new Date(), o2 = i4 - (s4 || i4); - e5.diff = o2, e5.prev = s4, e5.curr = i4, s4 = i4; - for (var r2 = new Array(arguments.length), a3 = 0; a3 < r2.length; a3++) - r2[a3] = arguments[a3]; + var e5 = n2, i3 = +/* @__PURE__ */ new Date(), o2 = i3 - (s3 || i3); + e5.diff = o2, e5.prev = s3, e5.curr = i3, s3 = i3; + for (var r2 = new Array(arguments.length), a2 = 0; a2 < r2.length; a2++) + r2[a2] = arguments[a2]; r2[0] = t2.coerce(r2[0]), "string" != typeof r2[0] && r2.unshift("%O"); - var c3 = 0; - r2[0] = r2[0].replace(/%([a-zA-Z%])/g, function(s5, i5) { - if ("%%" === s5) - return s5; - c3++; - var n3 = t2.formatters[i5]; + var c2 = 0; + r2[0] = r2[0].replace(/%([a-zA-Z%])/g, function(s4, i4) { + if ("%%" === s4) + return s4; + c2++; + var n3 = t2.formatters[i4]; if ("function" == typeof n3) { - var o3 = r2[c3]; - s5 = n3.call(e5, o3), r2.splice(c3, 1), c3--; + var o3 = r2[c2]; + s4 = n3.call(e5, o3), r2.splice(c2, 1), c2--; } - return s5; + return s4; }), t2.formatArgs.call(e5, r2), (n2.log || t2.log || console.log.bind(console)).apply(e5, r2); } } return n2.namespace = e4, n2.enabled = t2.enabled(e4), n2.useColors = t2.useColors(), n2.color = function(e5) { - var s5, i4 = 0; - for (s5 in e5) - i4 = (i4 << 5) - i4 + e5.charCodeAt(s5), i4 |= 0; - return t2.colors[Math.abs(i4) % t2.colors.length]; - }(e4), n2.destroy = i3, "function" == typeof t2.init && t2.init(n2), t2.instances.push(n2), n2; + var s4, i3 = 0; + for (s4 in e5) + i3 = (i3 << 5) - i3 + e5.charCodeAt(s4), i3 |= 0; + return t2.colors[Math.abs(i3) % t2.colors.length]; + }(e4), n2.destroy = i2, "function" == typeof t2.init && t2.init(n2), t2.instances.push(n2), n2; } - function i3() { + function i2() { var e4 = t2.instances.indexOf(this); return -1 !== e4 && (t2.instances.splice(e4, 1), true); } - (t2 = Ot$1.exports = s3.debug = s3.default = s3).coerce = function(e4) { + (t2 = Ot.exports = s2.debug = s2.default = s2).coerce = function(e4) { return e4 instanceof Error ? e4.stack || e4.message : e4; }, t2.disable = function() { t2.enable(""); }, t2.enable = function(e4) { - var s4; + var s3; t2.save(e4), t2.names = [], t2.skips = []; - var i4 = ("string" == typeof e4 ? e4 : "").split(/[\s,]+/), n2 = i4.length; - for (s4 = 0; s4 < n2; s4++) - i4[s4] && ("-" === (e4 = i4[s4].replace(/\*/g, ".*?"))[0] ? t2.skips.push(new RegExp("^" + e4.substr(1) + "$")) : t2.names.push(new RegExp("^" + e4 + "$"))); - for (s4 = 0; s4 < t2.instances.length; s4++) { - var o2 = t2.instances[s4]; + var i3 = ("string" == typeof e4 ? e4 : "").split(/[\s,]+/), n2 = i3.length; + for (s3 = 0; s3 < n2; s3++) + i3[s3] && ("-" === (e4 = i3[s3].replace(/\*/g, ".*?"))[0] ? t2.skips.push(new RegExp("^" + e4.substr(1) + "$")) : t2.names.push(new RegExp("^" + e4 + "$"))); + for (s3 = 0; s3 < t2.instances.length; s3++) { + var o2 = t2.instances[s3]; o2.enabled = t2.enabled(o2.namespace); } }, t2.enabled = function(e4) { if ("*" === e4[e4.length - 1]) return true; - var s4, i4; - for (s4 = 0, i4 = t2.skips.length; s4 < i4; s4++) - if (t2.skips[s4].test(e4)) + var s3, i3; + for (s3 = 0, i3 = t2.skips.length; s3 < i3; s3++) + if (t2.skips[s3].test(e4)) return false; - for (s4 = 0, i4 = t2.names.length; s4 < i4; s4++) - if (t2.names[s4].test(e4)) + for (s3 = 0, i3 = t2.names.length; s3 < i3; s3++) + if (t2.names[s3].test(e4)) return true; return false; - }, t2.humanize = Dt$1, t2.instances = [], t2.names = [], t2.skips = [], t2.formatters = {}; -}(0, Ot$1.exports), function(e3, t2) { - function s3() { + }, t2.humanize = Dt, t2.instances = [], t2.names = [], t2.skips = [], t2.formatters = {}; +}(0, Ot.exports), function(e3, t2) { + function s2() { var e4; try { e4 = t2.storage.debug; @@ -11304,24 +11304,24 @@ function xt$1(e3, t2, s3) { } return !e4 && "undefined" != typeof process && "env" in process && (e4 = process.env.DEBUG), e4; } - (t2 = e3.exports = Ot$1.exports).log = function() { + (t2 = e3.exports = Ot.exports).log = function() { return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); }, t2.formatArgs = function(e4) { - var s4 = this.useColors; - if (e4[0] = (s4 ? "%c" : "") + this.namespace + (s4 ? " %c" : " ") + e4[0] + (s4 ? "%c " : " ") + "+" + t2.humanize(this.diff), !s4) + var s3 = this.useColors; + if (e4[0] = (s3 ? "%c" : "") + this.namespace + (s3 ? " %c" : " ") + e4[0] + (s3 ? "%c " : " ") + "+" + t2.humanize(this.diff), !s3) return; - var i3 = "color: " + this.color; - e4.splice(1, 0, i3, "color: inherit"); + var i2 = "color: " + this.color; + e4.splice(1, 0, i2, "color: inherit"); var n2 = 0, o2 = 0; e4[0].replace(/%[a-zA-Z%]/g, function(e5) { "%%" !== e5 && (n2++, "%c" === e5 && (o2 = n2)); - }), e4.splice(o2, 0, i3); + }), e4.splice(o2, 0, i2); }, t2.save = function(e4) { try { null == e4 ? t2.storage.removeItem("debug") : t2.storage.debug = e4; } catch (e5) { } - }, t2.load = s3, t2.useColors = function() { + }, t2.load = s2, t2.useColors = function() { if ("undefined" != typeof window && window.process && "renderer" === window.process.type) return true; if ("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) @@ -11338,26 +11338,26 @@ function xt$1(e3, t2, s3) { } catch (e5) { return "[UnexpectedJSONParseError]: " + e5.message; } - }, t2.enable(s3()); -}(Tt$1, Tt$1.exports); -var Ut$1 = Nt$1, Ft$1 = Tt$1.exports("socket.io-client:url"), Gt$1 = function(e3, t2) { - var s3 = e3; + }, t2.enable(s2()); +}(Tt, Tt.exports); +var Ut = Nt, Ft = Tt.exports("socket.io-client:url"), Gt = function(e3, t2) { + var s2 = e3; t2 = t2 || "undefined" != typeof location && location, null == e3 && (e3 = t2.protocol + "//" + t2.host); - "string" == typeof e3 && ("/" === e3.charAt(0) && (e3 = "/" === e3.charAt(1) ? t2.protocol + e3 : t2.host + e3), /^(https?|wss?):\/\//.test(e3) || (Ft$1("protocol-less url %s", e3), e3 = void 0 !== t2 ? t2.protocol + "//" + e3 : "https://" + e3), Ft$1("parse %s", e3), s3 = Ut$1(e3)); - s3.port || (/^(http|ws)$/.test(s3.protocol) ? s3.port = "80" : /^(http|ws)s$/.test(s3.protocol) && (s3.port = "443")); - s3.path = s3.path || "/"; - var i3 = -1 !== s3.host.indexOf(":") ? "[" + s3.host + "]" : s3.host; - return s3.id = s3.protocol + "://" + i3 + ":" + s3.port, s3.href = s3.protocol + "://" + i3 + (t2 && t2.port === s3.port ? "" : ":" + s3.port), s3; + "string" == typeof e3 && ("/" === e3.charAt(0) && (e3 = "/" === e3.charAt(1) ? t2.protocol + e3 : t2.host + e3), /^(https?|wss?):\/\//.test(e3) || (Ft("protocol-less url %s", e3), e3 = void 0 !== t2 ? t2.protocol + "//" + e3 : "https://" + e3), Ft("parse %s", e3), s2 = Ut(e3)); + s2.port || (/^(http|ws)$/.test(s2.protocol) ? s2.port = "80" : /^(http|ws)s$/.test(s2.protocol) && (s2.port = "443")); + s2.path = s2.path || "/"; + var i2 = -1 !== s2.host.indexOf(":") ? "[" + s2.host + "]" : s2.host; + return s2.id = s2.protocol + "://" + i2 + ":" + s2.port, s2.href = s2.protocol + "://" + i2 + (t2 && t2.port === s2.port ? "" : ":" + s2.port), s2; }; -var Lt$1 = {}, Bt$1 = {}.toString, qt$1 = Array.isArray || function(e3) { - return "[object Array]" == Bt$1.call(e3); +var Lt = {}, Bt = {}.toString, qt = Array.isArray || function(e3) { + return "[object Array]" == Bt.call(e3); }; !function(e3) { - Tt$1.exports("socket.io-parser"); - var t2 = M$1.exports, s3 = qt$1; - function i3() { + Tt.exports("socket.io-parser"); + var t2 = M.exports, s2 = qt; + function i2() { } - e3.protocol = 4, e3.types = ["CONNECT", "DISCONNECT", "EVENT", "ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK"], e3.CONNECT = 0, e3.DISCONNECT = 1, e3.EVENT = 2, e3.ACK = 3, e3.ERROR = 4, e3.BINARY_EVENT = 5, e3.BINARY_ACK = 6, e3.Encoder = i3, e3.Decoder = o2; + e3.protocol = 4, e3.types = ["CONNECT", "DISCONNECT", "EVENT", "ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK"], e3.CONNECT = 0, e3.DISCONNECT = 1, e3.EVENT = 2, e3.ACK = 3, e3.ERROR = 4, e3.BINARY_EVENT = 5, e3.BINARY_ACK = 6, e3.Encoder = i2, e3.Decoder = o2; var n2 = e3.ERROR + '"encode error"'; function o2() { this.reconstructor = null; @@ -11365,121 +11365,121 @@ var Lt$1 = {}, Bt$1 = {}.toString, qt$1 = Array.isArray || function(e3) { function r2(t3) { return { type: e3.ERROR, data: "parser error: " + t3 }; } - i3.prototype.encode = function(t3, s4) { - var i4 = function(t4) { - var s5 = "" + t4.type; - e3.BINARY_EVENT !== t4.type && e3.BINARY_ACK !== t4.type || (s5 += t4.attachments + "-"); - t4.nsp && "/" !== t4.nsp && (s5 += t4.nsp + ","); - null != t4.id && (s5 += t4.id); + i2.prototype.encode = function(t3, s3) { + var i3 = function(t4) { + var s4 = "" + t4.type; + e3.BINARY_EVENT !== t4.type && e3.BINARY_ACK !== t4.type || (s4 += t4.attachments + "-"); + t4.nsp && "/" !== t4.nsp && (s4 += t4.nsp + ","); + null != t4.id && (s4 += t4.id); if (null != t4.data) { - var i5 = function(e4) { + var i4 = function(e4) { try { return JSON.stringify(e4); } catch (e5) { return false; } }(t4.data); - if (false === i5) + if (false === i4) return n2; - s5 += i5; + s4 += i4; } - return s5; + return s4; }(t3); - s4([i4]); + s3([i3]); }, t2(o2.prototype), o2.prototype.add = function(t3) { - var i4; + var i3; if ("string" != typeof t3) throw new Error("Unknown type: " + t3); - i4 = function(t4) { - var i5 = 0, n3 = { type: Number(t4.charAt(0)) }; + i3 = function(t4) { + var i4 = 0, n3 = { type: Number(t4.charAt(0)) }; if (null == e3.types[n3.type]) return r2("unknown packet type " + n3.type); if (e3.BINARY_EVENT === n3.type || e3.BINARY_ACK === n3.type) { - for (var o3 = ""; "-" !== t4.charAt(++i5) && (o3 += t4.charAt(i5), i5 != t4.length); ) + for (var o3 = ""; "-" !== t4.charAt(++i4) && (o3 += t4.charAt(i4), i4 != t4.length); ) ; - if (o3 != Number(o3) || "-" !== t4.charAt(i5)) + if (o3 != Number(o3) || "-" !== t4.charAt(i4)) throw new Error("Illegal attachments"); n3.attachments = Number(o3); } - if ("/" === t4.charAt(i5 + 1)) - for (n3.nsp = ""; ++i5; ) { - if ("," === (c3 = t4.charAt(i5))) + if ("/" === t4.charAt(i4 + 1)) + for (n3.nsp = ""; ++i4; ) { + if ("," === (c2 = t4.charAt(i4))) break; - if (n3.nsp += c3, i5 === t4.length) + if (n3.nsp += c2, i4 === t4.length) break; } else n3.nsp = "/"; - var a3 = t4.charAt(i5 + 1); - if ("" !== a3 && Number(a3) == a3) { - for (n3.id = ""; ++i5; ) { - var c3; - if (null == (c3 = t4.charAt(i5)) || Number(c3) != c3) { - --i5; + var a2 = t4.charAt(i4 + 1); + if ("" !== a2 && Number(a2) == a2) { + for (n3.id = ""; ++i4; ) { + var c2; + if (null == (c2 = t4.charAt(i4)) || Number(c2) != c2) { + --i4; break; } - if (n3.id += t4.charAt(i5), i5 === t4.length) + if (n3.id += t4.charAt(i4), i4 === t4.length) break; } n3.id = Number(n3.id); } - if (t4.charAt(++i5)) { + if (t4.charAt(++i4)) { var u2 = function(e4) { try { return JSON.parse(e4); } catch (e5) { return false; } - }(t4.substr(i5)); - if (!(false !== u2 && (n3.type === e3.ERROR || s3(u2)))) + }(t4.substr(i4)); + if (!(false !== u2 && (n3.type === e3.ERROR || s2(u2)))) return r2("invalid payload"); n3.data = u2; } return n3; - }(t3), this.emit("decoded", i4); + }(t3), this.emit("decoded", i3); }, o2.prototype.destroy = function() { this.reconstructor && this.reconstructor.finishedReconstruction(); }; -}(Lt$1); -var jt$1 = { exports: {} }, Ht$1 = {}, Vt$1 = {}, zt = Object.keys || function(e3) { - var t2 = [], s3 = Object.prototype.hasOwnProperty; - for (var i3 in e3) - s3.call(e3, i3) && t2.push(i3); +}(Lt); +var jt = { exports: {} }, Ht = {}, Vt = {}, zt = Object.keys || function(e3) { + var t2 = [], s2 = Object.prototype.hasOwnProperty; + for (var i2 in e3) + s2.call(e3, i2) && t2.push(i2); return t2; -}, Wt$1 = qt$1, Xt$1 = Object.prototype.toString, Jt$1 = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === Xt$1.call(Blob), Yt$1 = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === Xt$1.call(File), $t$1 = function e(t2) { +}, Wt = qt, Xt = Object.prototype.toString, Jt = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === Xt.call(Blob), Yt = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === Xt.call(File), $t = function e2(t2) { if (!t2 || "object" != typeof t2) return false; - if (Wt$1(t2)) { - for (var s3 = 0, i3 = t2.length; s3 < i3; s3++) - if (e(t2[s3])) + if (Wt(t2)) { + for (var s2 = 0, i2 = t2.length; s2 < i2; s2++) + if (e2(t2[s2])) return true; return false; } - if ("function" == typeof Buffer && Buffer.isBuffer && Buffer.isBuffer(t2) || "function" == typeof ArrayBuffer && t2 instanceof ArrayBuffer || Jt$1 && t2 instanceof Blob || Yt$1 && t2 instanceof File) + if ("function" == typeof Buffer && Buffer.isBuffer && Buffer.isBuffer(t2) || "function" == typeof ArrayBuffer && t2 instanceof ArrayBuffer || Jt && t2 instanceof Blob || Yt && t2 instanceof File) return true; if (t2.toJSON && "function" == typeof t2.toJSON && 1 === arguments.length) - return e(t2.toJSON(), true); + return e2(t2.toJSON(), true); for (var n2 in t2) - if (Object.prototype.hasOwnProperty.call(t2, n2) && e(t2[n2])) + if (Object.prototype.hasOwnProperty.call(t2, n2) && e2(t2[n2])) return true; return false; }; -var Qt$1 = function(e3, t2, s3) { - var i3 = false; - return s3 = s3 || Kt$1, n2.count = e3, 0 === e3 ? t2() : n2; +var Qt = function(e3, t2, s2) { + var i2 = false; + return s2 = s2 || Kt, n2.count = e3, 0 === e3 ? t2() : n2; function n2(e4, o2) { if (n2.count <= 0) throw new Error("after called too many times"); - --n2.count, e4 ? (i3 = true, t2(e4), t2 = s3) : 0 !== n2.count || i3 || t2(null, o2); + --n2.count, e4 ? (i2 = true, t2(e4), t2 = s2) : 0 !== n2.count || i2 || t2(null, o2); } }; -function Kt$1() { +function Kt() { } -var Zt$1, es$1, ts$1, ss$1 = String.fromCharCode; +var Zt, es, ts, ss = String.fromCharCode; function is(e3) { - for (var t2, s3, i3 = [], n2 = 0, o2 = e3.length; n2 < o2; ) - (t2 = e3.charCodeAt(n2++)) >= 55296 && t2 <= 56319 && n2 < o2 ? 56320 == (64512 & (s3 = e3.charCodeAt(n2++))) ? i3.push(((1023 & t2) << 10) + (1023 & s3) + 65536) : (i3.push(t2), n2--) : i3.push(t2); - return i3; + for (var t2, s2, i2 = [], n2 = 0, o2 = e3.length; n2 < o2; ) + (t2 = e3.charCodeAt(n2++)) >= 55296 && t2 <= 56319 && n2 < o2 ? 56320 == (64512 & (s2 = e3.charCodeAt(n2++))) ? i2.push(((1023 & t2) << 10) + (1023 & s2) + 65536) : (i2.push(t2), n2--) : i2.push(t2); + return i2; } function ns(e3, t2) { if (e3 >= 55296 && e3 <= 57343) { @@ -11490,56 +11490,56 @@ function ns(e3, t2) { return true; } function os(e3, t2) { - return ss$1(e3 >> t2 & 63 | 128); + return ss(e3 >> t2 & 63 | 128); } function rs(e3, t2) { if (0 == (4294967168 & e3)) - return ss$1(e3); - var s3 = ""; - return 0 == (4294965248 & e3) ? s3 = ss$1(e3 >> 6 & 31 | 192) : 0 == (4294901760 & e3) ? (ns(e3, t2) || (e3 = 65533), s3 = ss$1(e3 >> 12 & 15 | 224), s3 += os(e3, 6)) : 0 == (4292870144 & e3) && (s3 = ss$1(e3 >> 18 & 7 | 240), s3 += os(e3, 12), s3 += os(e3, 6)), s3 += ss$1(63 & e3 | 128); + return ss(e3); + var s2 = ""; + return 0 == (4294965248 & e3) ? s2 = ss(e3 >> 6 & 31 | 192) : 0 == (4294901760 & e3) ? (ns(e3, t2) || (e3 = 65533), s2 = ss(e3 >> 12 & 15 | 224), s2 += os(e3, 6)) : 0 == (4292870144 & e3) && (s2 = ss(e3 >> 18 & 7 | 240), s2 += os(e3, 12), s2 += os(e3, 6)), s2 += ss(63 & e3 | 128); } function as() { - if (ts$1 >= es$1) + if (ts >= es) throw Error("Invalid byte index"); - var e3 = 255 & Zt$1[ts$1]; - if (ts$1++, 128 == (192 & e3)) + var e3 = 255 & Zt[ts]; + if (ts++, 128 == (192 & e3)) return 63 & e3; throw Error("Invalid continuation byte"); } function cs(e3) { - var t2, s3; - if (ts$1 > es$1) + var t2, s2; + if (ts > es) throw Error("Invalid byte index"); - if (ts$1 == es$1) + if (ts == es) return false; - if (t2 = 255 & Zt$1[ts$1], ts$1++, 0 == (128 & t2)) + if (t2 = 255 & Zt[ts], ts++, 0 == (128 & t2)) return t2; if (192 == (224 & t2)) { - if ((s3 = (31 & t2) << 6 | as()) >= 128) - return s3; + if ((s2 = (31 & t2) << 6 | as()) >= 128) + return s2; throw Error("Invalid continuation byte"); } if (224 == (240 & t2)) { - if ((s3 = (15 & t2) << 12 | as() << 6 | as()) >= 2048) - return ns(s3, e3) ? s3 : 65533; + if ((s2 = (15 & t2) << 12 | as() << 6 | as()) >= 2048) + return ns(s2, e3) ? s2 : 65533; throw Error("Invalid continuation byte"); } - if (240 == (248 & t2) && (s3 = (7 & t2) << 18 | as() << 12 | as() << 6 | as()) >= 65536 && s3 <= 1114111) - return s3; + if (240 == (248 & t2) && (s2 = (7 & t2) << 18 | as() << 12 | as() << 6 | as()) >= 65536 && s2 <= 1114111) + return s2; throw Error("Invalid UTF-8 detected"); } var us = { version: "2.1.2", encode: function(e3, t2) { - for (var s3 = false !== (t2 = t2 || {}).strict, i3 = is(e3), n2 = i3.length, o2 = -1, r2 = ""; ++o2 < n2; ) - r2 += rs(i3[o2], s3); + for (var s2 = false !== (t2 = t2 || {}).strict, i2 = is(e3), n2 = i2.length, o2 = -1, r2 = ""; ++o2 < n2; ) + r2 += rs(i2[o2], s2); return r2; }, decode: function(e3, t2) { - var s3 = false !== (t2 = t2 || {}).strict; - Zt$1 = is(e3), es$1 = Zt$1.length, ts$1 = 0; - for (var i3, n2 = []; false !== (i3 = cs(s3)); ) - n2.push(i3); + var s2 = false !== (t2 = t2 || {}).strict; + Zt = is(e3), es = Zt.length, ts = 0; + for (var i2, n2 = []; false !== (i2 = cs(s2)); ) + n2.push(i2); return function(e4) { - for (var t3, s4 = e4.length, i4 = -1, n3 = ""; ++i4 < s4; ) - (t3 = e4[i4]) > 65535 && (n3 += ss$1((t3 -= 65536) >>> 10 & 1023 | 55296), t3 = 56320 | 1023 & t3), n3 += ss$1(t3); + for (var t3, s3 = e4.length, i3 = -1, n3 = ""; ++i3 < s3; ) + (t3 = e4[i3]) > 65535 && (n3 += ss((t3 -= 65536) >>> 10 & 1023 | 55296), t3 = 56320 | 1023 & t3), n3 += ss(t3); return n3; }(n2); } }, ls = void 0 !== ls ? ls : "undefined" != typeof WebKitBlobBuilder ? WebKitBlobBuilder : "undefined" != typeof MSBlobBuilder ? MSBlobBuilder : "undefined" != typeof MozBlobBuilder && MozBlobBuilder, ds = function() { @@ -11560,8 +11560,8 @@ function ms(e3) { if (e4.buffer instanceof ArrayBuffer) { var t2 = e4.buffer; if (e4.byteLength !== t2.byteLength) { - var s3 = new Uint8Array(e4.byteLength); - s3.set(new Uint8Array(t2, e4.byteOffset, e4.byteLength)), t2 = s3.buffer; + var s2 = new Uint8Array(e4.byteLength); + s2.set(new Uint8Array(t2, e4.byteOffset, e4.byteLength)), t2 = s2.buffer; } return t2; } @@ -11570,10 +11570,10 @@ function ms(e3) { } function fs(e3, t2) { t2 = t2 || {}; - var s3 = new ls(); + var s2 = new ls(); return ms(e3).forEach(function(e4) { - s3.append(e4); - }), t2.type ? s3.getBlob(t2.type) : s3.getBlob(); + s2.append(e4); + }), t2.type ? s2.getBlob(t2.type) : s2.getBlob(); } function gs(e3, t2) { return new Blob(ms(e3), t2 || {}); @@ -11581,18 +11581,18 @@ function gs(e3, t2) { "undefined" != typeof Blob && (fs.prototype = Blob.prototype, gs.prototype = Blob.prototype); var ys = ds ? hs ? Blob : gs : ps ? fs : void 0; !function(e3) { - var t2 = zt, s3 = $t$1, i3 = Qt$1, n2 = us; + var t2 = zt, s2 = $t, i2 = Qt, n2 = us; e3.protocol = 3; - var o2 = e3.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, r2 = t2(o2), a3 = { type: "error", data: "parser error" }, c3 = ys; - e3.encodePacket = function(e4, t3, s4, i4) { - "function" == typeof t3 && (i4 = t3, t3 = false), "function" == typeof s4 && (i4 = s4, s4 = null), void 0 === e4.data || e4.data.buffer || e4.data; + var o2 = e3.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, r2 = t2(o2), a2 = { type: "error", data: "parser error" }, c2 = ys; + e3.encodePacket = function(e4, t3, s3, i3) { + "function" == typeof t3 && (i3 = t3, t3 = false), "function" == typeof s3 && (i3 = s3, s3 = null), void 0 === e4.data || e4.data.buffer || e4.data; var r3 = o2[e4.type]; - return void 0 !== e4.data && (r3 += s4 ? n2.encode(String(e4.data), { strict: false }) : String(e4.data)), i4("" + r3); - }, e3.decodePacket = function(e4, t3, s4) { + return void 0 !== e4.data && (r3 += s3 ? n2.encode(String(e4.data), { strict: false }) : String(e4.data)), i3("" + r3); + }, e3.decodePacket = function(e4, t3, s3) { if (void 0 === e4) - return a3; + return a2; if ("string" == typeof e4) { - if (s4 && false === (e4 = function(e5) { + if (s3 && false === (e4 = function(e5) { try { e5 = n2.decode(e5, { strict: false }); } catch (e6) { @@ -11600,65 +11600,65 @@ var ys = ds ? hs ? Blob : gs : ps ? fs : void 0; } return e5; }(e4))) - return a3; - var i4 = e4.charAt(0); - return Number(i4) == i4 && r2[i4] ? e4.length > 1 ? { type: r2[i4], data: e4.substring(1) } : { type: r2[i4] } : a3; + return a2; + var i3 = e4.charAt(0); + return Number(i3) == i3 && r2[i3] ? e4.length > 1 ? { type: r2[i3], data: e4.substring(1) } : { type: r2[i3] } : a2; } - i4 = new Uint8Array(e4)[0]; + i3 = new Uint8Array(e4)[0]; var o3 = sliceBuffer(e4, 1); - return c3 && "blob" === t3 && (o3 = new c3([o3])), { type: r2[i4], data: o3 }; + return c2 && "blob" === t3 && (o3 = new c2([o3])), { type: r2[i3], data: o3 }; }, e3.encodePayload = function(t3, n3, o3) { "function" == typeof n3 && (o3 = n3, n3 = null); - var r3 = s3(t3); + var r3 = s2(t3); if (!t3.length) return o3("0:"); - !function(e4, t4, s4) { - for (var n4 = new Array(e4.length), o4 = i3(e4.length, s4), r4 = function(e5, s5, i4) { - t4(s5, function(t5, s6) { - n4[e5] = s6, i4(t5, n4); + !function(e4, t4, s3) { + for (var n4 = new Array(e4.length), o4 = i2(e4.length, s3), r4 = function(e5, s4, i3) { + t4(s4, function(t5, s5) { + n4[e5] = s5, i3(t5, n4); }); - }, a4 = 0; a4 < e4.length; a4++) - r4(a4, e4[a4], o4); - }(t3, function(t4, s4) { + }, a3 = 0; a3 < e4.length; a3++) + r4(a3, e4[a3], o4); + }(t3, function(t4, s3) { e3.encodePacket(t4, !!r3 && n3, true, function(e4) { - s4(null, function(e5) { + s3(null, function(e5) { return e5.length + ":" + e5; }(e4)); }); }, function(e4, t4) { return o3(t4.join("")); }); - }, e3.decodePayload = function(t3, s4, i4) { + }, e3.decodePayload = function(t3, s3, i3) { var n3; - if ("function" == typeof s4 && (i4 = s4, s4 = null), "" === t3) - return i4(a3, 0, 1); - for (var o3, r3, c4 = "", u2 = 0, l2 = t3.length; u2 < l2; u2++) { - var d3 = t3.charAt(u2); - if (":" === d3) { - if ("" === c4 || c4 != (o3 = Number(c4))) - return i4(a3, 0, 1); - if (c4 != (r3 = t3.substr(u2 + 1, o3)).length) - return i4(a3, 0, 1); + if ("function" == typeof s3 && (i3 = s3, s3 = null), "" === t3) + return i3(a2, 0, 1); + for (var o3, r3, c3 = "", u2 = 0, l2 = t3.length; u2 < l2; u2++) { + var d2 = t3.charAt(u2); + if (":" === d2) { + if ("" === c3 || c3 != (o3 = Number(c3))) + return i3(a2, 0, 1); + if (c3 != (r3 = t3.substr(u2 + 1, o3)).length) + return i3(a2, 0, 1); if (r3.length) { - if (n3 = e3.decodePacket(r3, s4, true), a3.type === n3.type && a3.data === n3.data) - return i4(a3, 0, 1); - if (false === i4(n3, u2 + o3, l2)) + if (n3 = e3.decodePacket(r3, s3, true), a2.type === n3.type && a2.data === n3.data) + return i3(a2, 0, 1); + if (false === i3(n3, u2 + o3, l2)) return; } - u2 += o3, c4 = ""; + u2 += o3, c3 = ""; } else - c4 += d3; + c3 += d2; } - return "" !== c4 ? i4(a3, 0, 1) : void 0; + return "" !== c3 ? i3(a2, 0, 1) : void 0; }; -}(Vt$1); -var Ss = Vt$1, Es = vs; +}(Vt); +var Ss = Vt, Es = vs; function vs(e3) { this.path = e3.path, this.hostname = e3.hostname, this.port = e3.port, this.secure = e3.secure, this.query = e3.query, this.timestampParam = e3.timestampParam, this.timestampRequests = e3.timestampRequests, this.readyState = "", this.agent = e3.agent || false, this.socket = e3.socket, this.enablesXDR = e3.enablesXDR, this.pfx = e3.pfx, this.key = e3.key, this.passphrase = e3.passphrase, this.cert = e3.cert, this.ca = e3.ca, this.ciphers = e3.ciphers, this.rejectUnauthorized = e3.rejectUnauthorized, this.forceNode = e3.forceNode, this.isReactNative = e3.isReactNative, this.extraHeaders = e3.extraHeaders, this.localAddress = e3.localAddress; } -(0, M$1.exports)(vs.prototype), vs.prototype.onError = function(e3, t2) { - var s3 = new Error(e3); - return s3.type = "TransportError", s3.description = t2, this.emit("error", s3), this; +(0, M.exports)(vs.prototype), vs.prototype.onError = function(e3, t2) { + var s2 = new Error(e3); + return s2.type = "TransportError", s2.description = t2, this.emit("error", s2), this; }, vs.prototype.open = function() { return "closed" !== this.readyState && "" !== this.readyState || (this.readyState = "opening", this.doOpen()), this; }, vs.prototype.close = function() { @@ -11679,19 +11679,19 @@ function vs(e3) { }; var bs, Cs = { encode: function(e3) { var t2 = ""; - for (var s3 in e3) - e3.hasOwnProperty(s3) && (t2.length && (t2 += "&"), t2 += encodeURIComponent(s3) + "=" + encodeURIComponent(e3[s3])); + for (var s2 in e3) + e3.hasOwnProperty(s2) && (t2.length && (t2 += "&"), t2 += encodeURIComponent(s2) + "=" + encodeURIComponent(e3[s2])); return t2; }, decode: function(e3) { - for (var t2 = {}, s3 = e3.split("&"), i3 = 0, n2 = s3.length; i3 < n2; i3++) { - var o2 = s3[i3].split("="); + for (var t2 = {}, s2 = e3.split("&"), i2 = 0, n2 = s2.length; i2 < n2; i2++) { + var o2 = s2[i2].split("="); t2[decodeURIComponent(o2[0])] = decodeURIComponent(o2[1]); } return t2; } }, ws = function(e3, t2) { - var s3 = function() { + var s2 = function() { }; - s3.prototype = t2.prototype, e3.prototype = new s3(), e3.prototype.constructor = e3; + s2.prototype = t2.prototype, e3.prototype = new s2(), e3.prototype.constructor = e3; }, Ms = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Is = 64, Ns = {}, Ts = 0, Os = 0; function Rs(e3) { var t2 = ""; @@ -11719,14 +11719,14 @@ try { ks$1.exports = false; } var _s = ks$1.exports, Ds = function(e3) { - var t2 = e3.xdomain, s3 = e3.xscheme, i3 = e3.enablesXDR; + var t2 = e3.xdomain, s2 = e3.xscheme, i2 = e3.enablesXDR; try { if ("undefined" != typeof XMLHttpRequest && (!t2 || _s)) return new XMLHttpRequest(); } catch (e4) { } try { - if ("undefined" != typeof XDomainRequest && !s3 && i3) + if ("undefined" != typeof XDomainRequest && !s2 && i2) return new XDomainRequest(); } catch (e4) { } @@ -11735,7 +11735,7 @@ var _s = ks$1.exports, Ds = function(e3) { return new self[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP"); } catch (e4) { } -}, xs = Es, Us = Cs, Fs = Vt$1, Gs = ws, Ls = Ps, Bs = Tt$1.exports("engine.io-client:polling"), qs = Hs, js = null != new Ds({ xdomain: false }).responseType; +}, xs = Es, Us = Cs, Fs = Vt, Gs = ws, Ls = Ps, Bs = Tt.exports("engine.io-client:polling"), qs = Hs, js = null != new Ds({ xdomain: false }).responseType; function Hs(e3) { var t2 = e3 && e3.forceBase64; js && !t2 || (this.supportsBinary = false), xs.call(this, e3); @@ -11744,24 +11744,24 @@ Gs(Hs, xs), Hs.prototype.name = "polling", Hs.prototype.doOpen = function() { this.poll(); }, Hs.prototype.pause = function(e3) { var t2 = this; - function s3() { + function s2() { Bs("paused"), t2.readyState = "paused", e3(); } if (this.readyState = "pausing", this.polling || !this.writable) { - var i3 = 0; - this.polling && (Bs("we are currently polling - waiting to pause"), i3++, this.once("pollComplete", function() { - Bs("pre-pause polling complete"), --i3 || s3(); - })), this.writable || (Bs("we are currently writing - waiting to pause"), i3++, this.once("drain", function() { - Bs("pre-pause writing complete"), --i3 || s3(); + var i2 = 0; + this.polling && (Bs("we are currently polling - waiting to pause"), i2++, this.once("pollComplete", function() { + Bs("pre-pause polling complete"), --i2 || s2(); + })), this.writable || (Bs("we are currently writing - waiting to pause"), i2++, this.once("drain", function() { + Bs("pre-pause writing complete"), --i2 || s2(); })); } else - s3(); + s2(); }, Hs.prototype.poll = function() { Bs("polling"), this.polling = true, this.doPoll(), this.emit("poll"); }, Hs.prototype.onData = function(e3) { var t2 = this; Bs("polling got data %s", e3); - Fs.decodePayload(e3, this.socket.binaryType, function(e4, s3, i3) { + Fs.decodePayload(e3, this.socket.binaryType, function(e4, s2, i2) { if ("opening" === t2.readyState && t2.onOpen(), "close" === e4.type) return t2.onClose(), false; t2.onPacket(e4); @@ -11775,21 +11775,21 @@ Gs(Hs, xs), Hs.prototype.name = "polling", Hs.prototype.doOpen = function() { }, Hs.prototype.write = function(e3) { var t2 = this; this.writable = false; - var s3 = function() { + var s2 = function() { t2.writable = true, t2.emit("drain"); }; Fs.encodePayload(e3, this.supportsBinary, function(e4) { - t2.doWrite(e4, s3); + t2.doWrite(e4, s2); }); }, Hs.prototype.uri = function() { - var e3 = this.query || {}, t2 = this.secure ? "https" : "http", s3 = ""; - return false !== this.timestampRequests && (e3[this.timestampParam] = Ls()), this.supportsBinary || e3.sid || (e3.b64 = 1), e3 = Us.encode(e3), this.port && ("https" === t2 && 443 !== Number(this.port) || "http" === t2 && 80 !== Number(this.port)) && (s3 = ":" + this.port), e3.length && (e3 = "?" + e3), t2 + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + s3 + this.path + e3; + var e3 = this.query || {}, t2 = this.secure ? "https" : "http", s2 = ""; + return false !== this.timestampRequests && (e3[this.timestampParam] = Ls()), this.supportsBinary || e3.sid || (e3.b64 = 1), e3 = Us.encode(e3), this.port && ("https" === t2 && 443 !== Number(this.port) || "http" === t2 && 80 !== Number(this.port)) && (s2 = ":" + this.port), e3.length && (e3 = "?" + e3), t2 + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + s2 + this.path + e3; }; var Vs, zs = qs, Ws = Qs, Xs = /\n/g, Js = /\\n/g; function Ys() { } function $s() { - return "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== C$1 ? C$1 : {}; + return "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== C ? C : {}; } function Qs(e3) { if (zs.call(this, e3), this.query = this.query || {}, !Vs) { @@ -11797,11 +11797,11 @@ function Qs(e3) { Vs = t2.___eio = t2.___eio || []; } this.index = Vs.length; - var s3 = this; + var s2 = this; Vs.push(function(e4) { - s3.onData(e4); + s2.onData(e4); }), this.query.j = this.index, "function" == typeof addEventListener && addEventListener("beforeunload", function() { - s3.script && (s3.script.onerror = Ys); + s2.script && (s2.script.onerror = Ys); }, false); } ws(Qs, zs), Qs.prototype.supportsBinary = false, Qs.prototype.doClose = function() { @@ -11811,45 +11811,45 @@ ws(Qs, zs), Qs.prototype.supportsBinary = false, Qs.prototype.doClose = function this.script && (this.script.parentNode.removeChild(this.script), this.script = null), t2.async = true, t2.src = this.uri(), t2.onerror = function(t3) { e3.onError("jsonp poll error", t3); }; - var s3 = document.getElementsByTagName("script")[0]; - s3 ? s3.parentNode.insertBefore(t2, s3) : (document.head || document.body).appendChild(t2), this.script = t2, "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function() { + var s2 = document.getElementsByTagName("script")[0]; + s2 ? s2.parentNode.insertBefore(t2, s2) : (document.head || document.body).appendChild(t2), this.script = t2, "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function() { var e4 = document.createElement("iframe"); document.body.appendChild(e4), document.body.removeChild(e4); }, 100); }, Qs.prototype.doWrite = function(e3, t2) { - var s3 = this; + var s2 = this; if (!this.form) { - var i3, n2 = document.createElement("form"), o2 = document.createElement("textarea"), r2 = this.iframeId = "eio_iframe_" + this.index; + var i2, n2 = document.createElement("form"), o2 = document.createElement("textarea"), r2 = this.iframeId = "eio_iframe_" + this.index; n2.className = "socketio", n2.style.position = "absolute", n2.style.top = "-1000px", n2.style.left = "-1000px", n2.target = r2, n2.method = "POST", n2.setAttribute("accept-charset", "utf-8"), o2.name = "d", n2.appendChild(o2), document.body.appendChild(n2), this.form = n2, this.area = o2; } - function a3() { - c3(), t2(); + function a2() { + c2(), t2(); } - function c3() { - if (s3.iframe) + function c2() { + if (s2.iframe) try { - s3.form.removeChild(s3.iframe); + s2.form.removeChild(s2.iframe); } catch (e5) { - s3.onError("jsonp polling iframe removal error", e5); + s2.onError("jsonp polling iframe removal error", e5); } try { - var e4 = '