29 lines
1.1 MiB
29 lines
1.1 MiB
function __vite__mapDeps(indexes) {
|
||
if (!__vite__mapDeps.viteFileDeps) {
|
||
__vite__mapDeps.viteFileDeps = ["assets/pages-index-index.Cz1MWaFA.js","assets/_plugin-vue_export-helper.BCo6x5W8.js","assets/pages-news-ce.CCSXQBWS.js","assets/pages-login-open.Ceqt9LSI.js","assets/openPage.BSRlUAts.js","assets/open-tZRm7_lB.css","assets/uni-icons-pnNqpnb9.css","assets/notice-jRS_RjMr.css","assets/pages-login-loginPhone.D5C1kIqH.js","assets/Jiu Yi.CzP6u72b.js","assets/notice.BdRl5KCP.js","assets/uni-icons.DST64Pwo.js","assets/uni-app.es.DPi2kvld.js","assets/index.P_8jhw1Z.js","assets/loginPhone-syI9Fc8c.css","assets/getCode-B_NUGwLu.css","assets/pages-shop-shop.C5RtAyTc.js","assets/footerMenu.4E4ne5MG.js","assets/uni-popup.ICCw_VFK.js","assets/uni-popup-Btn5kTzj.css","assets/footerMenu-BQNyOFGe.css","assets/index.CwfRxvl_.js","assets/Mixins.BkpbMfyX.js","assets/index-BgAqq0vj.css","assets/index.CzCaMRAD.js","assets/search.D-MFDsCZ.js","assets/index-C7KAdkhc.css","assets/index.DF_zszAm.js","assets/index-Dg9TEF5U.css","assets/index.7KVvTpOT.js","assets/uni-load-more.5u-s_3KI.js","assets/uni-load-more-CZjV53zS.css","assets/shop.D3oH6Imh.js","assets/index-DNO-9vkk.css","assets/shop-B0Ou9guN.css","assets/pages-merchant-business-operator-index.CBATpPXw.js","assets/index.BOTqeFEy.js","assets/uni-section.BzH4ItED.js","assets/uni-section-bBtTvJlT.css","assets/uni-countdown.CetV0Ang.js","assets/uni-countdown-FqwAf4xp.css","assets/index.BI4RdXcX.js","assets/uni-tag.B4eR5K8E.js","assets/uni-tag-KneJsG_C.css","assets/index-C1yjjK9r.css","assets/index.nqhQEiPx.js","assets/index-C5R0E48_.css","assets/index.BqvoXY6m.js","assets/index-BQq-B4KX.css","assets/index.CIKTv9SN.js","assets/index-Bzyl4ED5.css","assets/uni-easyinput.B6l2xxOz.js","assets/uni-easyinput-tEToKo6I.css","assets/uni-forms.wy1AHh3E.js","assets/uni-forms-c4Jx8y51.css","assets/index.BmkZRDj0.js","assets/index-B2e0HMlf.css","assets/index-YG5iKEzf.css","assets/pages-merchant-order-index.Crl4Qf4M.js","assets/index-B4Aoycoi.css","assets/pages-merchant-commodity-release-index.DpK8lbMK.js","assets/uni-file-picker.DTxWzIcG.js","assets/uni-cloud.es.DXthrROh.js","assets/uni-file-picker-CoNejpjl.css","assets/shop-upload-image.DViqpwvt.js","assets/index.Dd48ZM-n.js","assets/index-D-ZC_R6J.css","assets/event-bus.DsryRu_A.js","assets/index-klzll8nq.css","assets/pages-merchant-specifications-index.BJnEo0z4.js","assets/index-Duq3x0CJ.css","assets/pages-shop-search-index.BWXa04zY.js","assets/index.D9qh8YtV.js","assets/index-BqYxxA-m.css","assets/index-B4haVHK_.css","assets/pages-shop-commodity-index.AHXL0zxb.js","assets/index.CMsB8dSI.js","assets/index-CT9nyJSI.css","assets/qq.D0WNrmhi.js","assets/index.vtN5q6w7.js","assets/index-BmbSY_TT.css","assets/index-CZGHNIHD.css","assets/pages-shop-continue-pay-index.BxWiA9RP.js","assets/shop-alipay-payment.BgLOaPw2.js","assets/index-PKOpVps0.css","assets/pages-shop-store-index.Be7mMK6U.js","assets/index-D2upCqyx.css","assets/pages-shop-order-index.BXP0itVA.js","assets/apiMixins.DqbqQ_6G.js","assets/index-BTlKj-sZ.css","assets/pages-shop-sales-index.uSAzbsuc.js","assets/index-BP_DuoMf.css","assets/pages-shop-refund-index.CM2xDrPk.js","assets/index-BeuK9vsa.css","assets/pages-shop-money-whereabouts-index.D1GGQQko.js","assets/index.DJhDHibs.js","assets/index.ExMM9MjP.js","assets/index-BwG3e3jY.css","assets/index-DVMlkN_D.css","assets/index-CBKtafex.css","assets/pages-shop-after-sales-index.BAI2hYQi.js","assets/uni-steps.BQmmDvJp.js","assets/uni-steps-Bm0CW5GU.css","assets/index-BahlzIlk.css","assets/pages-shop-transaction-completed-index.fAeApCxU.js","assets/pages-shop-waiting-delivery-index.AlSm3FKc.js","assets/pages-shop-logistics-state-index.BAspZgEp.js","assets/index-DkblgCKK.css","assets/pages-news-news.Cu6b6Bq2.js","assets/apex.Dr-edeq9.js","assets/statusBar.N83grA_6.js","assets/statusBar-B_SY1GJM.css","assets/apex-BPcGCfjZ.css","assets/noLogin._4tFGbsD.js","assets/noLogin-BguQrLS4.css","assets/uni-swipe-action.9Z8FtlTp.js","assets/uni-swipe-action-RLPa5okc.css","assets/news-CPAUZ9bE.css","assets/pages-news-group-chat-index.CB0JxUKb.js","assets/index-CSmBkIYB.css","assets/pages-news-question-answer-index.BxnVeVTv.js","assets/pause.BChT5pq5.js","assets/index-BcTw7NcF.css","assets/pages-news-red-envelope-index.2G34gMAp.js","assets/index-rleiDoXc.css","assets/pages-mine-mine.BGof91S8.js","assets/mine-GksqO3Ht.css","assets/pages-mine-set-up-index.BNKY79WP.js","assets/index-BfWzKW0Z.css","assets/pages-mine-userinfo.CwlO_wcb.js","assets/userinfo-DvplCAzZ.css","assets/pages-mine-switch-accounts-index.BHEKEsgD.js","assets/index-C5t3wcEf.css","assets/pages-mine-pay-use-index.AL4UOHTi.js","assets/index-h4cwtTFw.css","assets/pages-mine-real-name-authentication-index.BIotYnT8.js","assets/index-DttGGMR-.css","assets/pages-mine-delivery-address-index.DSkNs1PF.js","assets/index-XRrQ-se5.css","assets/pages-mine-balance-index.CTM9mN3A.js","assets/index.Bh-NoLyu.js","assets/index-C8mnazyT.css","assets/index-BCd5TzHr.css","assets/pages-mine-balance-details-index.b3H6WdCj.js","assets/index-DQJPEUOk.css","assets/pages-mine-historical-browsing-index.Dy-OeNeD.js","assets/index-ChqrEUx0.css","assets/pages-mine-browsed-index.BA4GMjNY.js","assets/index-B4MtUk-W.css","assets/pages-mine-collection-index.Ci4OepAn.js","assets/index-CLu6ayyN.css","assets/pages-mine-target-store-index.DeIyJLO4.js","assets/pages-mine-coupon-index.sTRTt4D7.js","assets/index-mn0qgEHm.css","assets/pages-mine-homepage.KRdm9VIZ.js","assets/videoMenu.CdZt6U9v.js","assets/videoMenu-Def42LRJ.css","assets/collectList.BwuiCbuk.js","assets/collectList-Bi0M3eke.css","assets/homepage-WS49fhsK.css","assets/pages-release-video.CWyPIMaG.js","assets/video-Fp2BDejq.css","assets/pages-index-wallet.Cggr0JM2.js","assets/wallet-XmydWOqs.css","assets/pages-index-myTeam.BmF2_V5Z.js","assets/intergral.GxVVZwW0.js","assets/myTeam-BpE7oY5Z.css","assets/pages-index-search.24dCpZZF.js","assets/indexShare.BHhcFR3i.js","assets/search-CwO3nlGq.css","assets/pages-index-videoHome.0J4YEipz.js","assets/copy.CU8_m4gR.js","assets/videoHome-C6ERj99Y.css","assets/pages-index-report.Bkf2T_5b.js","assets/report-D-rqFtqx.css","assets/pages-mine-collectsVideo.fWAotXoZ.js","assets/collectsVideo-CG8GdyRe.css","assets/pages-index-promotion.Bd32afsy.js","assets/promotion-B9plNpg_.css","assets/pages-index-myQrCode.Cv0mrINv.js","assets/myQrCode-CLJPthsL.css","assets/pages-index-deal.DbnIWoHH.js","assets/durian.vibXmwr-.js","assets/deal-BtA8NHPb.css","assets/pages-index-durian.CGE_W2m7.js","assets/sapling.CU-9wLV7.js","assets/tree.Ck-xGDT5.js","assets/fruit.Dgsn80ag.js","assets/task.D9E-JXG_.js","assets/task-DfxSa6eI.css","assets/durian-FmMZc2Qz.css","assets/pages-index-durainActivation.CEGKWbYt.js","assets/durainActivation-gUQ4XDYB.css","assets/pages-index-trade.CWvpPCgL.js","assets/trade-DcLCBYc7.css","assets/pages-index-orchard.5huHtivT.js","assets/orchard-BV4Y5oQv.css","assets/pages-index-durianLog.UdFN9TWn.js","assets/pages-index-extend.Dv9r9kbq.js","assets/extend-LceTLrn4.css","assets/pages-login-register.dkbe3_iA.js","assets/getCode.GsTGZqBD.js","assets/register-CbOAZOW8.css","assets/pages-login-invite.CWHyjLNp.js","assets/invite-DRsB25mE.css","assets/pages-login-forget.BwVWU2nC.js","assets/forget-CAEfHb53.css","assets/pages-login-retrieve.BvW3wyiq.js","assets/retrieve-gURtxQtm.css","assets/pages-shop-settle.CHuKx2xo.js","assets/settle-zlk0eaVt.css","assets/pages-index-integral.CeyhHVcE.js","assets/integral.6rN3MfCO.js","assets/integral-Ckk_ENaX.css","assets/pages-index-integralLog.Cpli-vrX.js","assets/pages-index-integralMall.BJz1yg7M.js","assets/integralMall-CN1hK8eT.css","assets/pages-index-appeal.CSACfTN7.js","assets/appeal-CvYcHRY1.css","assets/pages-index-beInvited.0yk_2_z8.js","assets/beInvited-CFubm-Z8.css","assets/pages-index-videoDetail.Q58Gx9Uh.js","assets/videoDetail-C1sKGr0T.css","assets/pages-news-newFriend.4pKhThhf.js","assets/newFriend-DHpDCZvY.css","assets/pages-news-newAttention.D6wUc9Sv.js","assets/newAttention-DM1ql9pC.css","assets/pages-news-newFans.D8dRFBB1.js","assets/newFans-CB3KW1XO.css","assets/pages-news-message.BjSh5cv0.js","assets/message-CwAvwNv-.css","assets/pages-index-article.DSuWHom_.js","assets/pages-index-topUp.DCY71K1p.js","assets/topUp-CYioGOQL.css","assets/pages-news-addFriend.CgkNGrzk.js","assets/addFriend-DSmCKzjQ.css","assets/pages-news-redPacket.BxJobKBp.js","assets/redPacket-BCUYb4wG.css","assets/pages-news-audio-video-video.BqZ2rU3T.js","assets/pages-news-applyFriend.-STHOPQ6.js","assets/applyFriend-D4Pl6ZE_.css","assets/TUIKit-components-TUIConversation-index.xIELV9qi.js","assets/index.C_XD_DK3.js","assets/adapter-vue.FAvEd_HK.js","assets/index.DzsMB11z.js","assets/index-CaFwFdDx.css","assets/TUIKit-components-TUISearch-index.DuoOvP9h.js","assets/down-icon.DejhYoTd.js","assets/video-play.DNCOEYvb.js","assets/constant.BaYkq7sJ.js","assets/right-icon.-uAfiCH7.js","assets/enableSampleTaskStatus.DI0Y9wcO.js","assets/index-CvO_fE_k.css","assets/index.DHwyKTWe.js","assets/index-CI7Biaph.css","assets/index.DmqBuDyZ.js","assets/index-D3-qZFye.css","assets/index-MZIn3EoW.css","assets/TUIKit-components-TUIChat-index.DwECrWtn.js","assets/index.BcNTMUDJ.js","assets/index-D5zA6JPA.css","assets/lodash.CBwPAxVQ.js","assets/documentLink.EyPR0R2v.js","assets/index-CqmDVw73.css","assets/TUIKit-components-TUIChat-video-play.DOWVYERb.js","assets/video-play-DsWtHhb8.css","assets/TUIKit-components-TUIChat-web-view.DfgHbxt0.js","assets/TUIKit-components-TUIContact-index.DtCgyXd8.js","assets/edit.B9Urilbg.js","assets/index-CSgY9m-I.css","assets/TUIKit-components-TUIGroup-index.BCkNIvPL.js","assets/index-CIXb8bwX.css"]
|
||
}
|
||
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
||
}
|
||
!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const e={},t=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(null==s?void 0:s.nonce)||(null==s?void 0:s.getAttribute("nonce"));i=Promise.all(n.map((n=>{if((n=function(e){return"/"+e}(n))in e)return;e[n]=!0;const i=n.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(!!o)for(let e=t.length-1;e>=0;e--){const o=t[e];if(o.href===n&&(!i||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${n}"]${s}`))return;const r=document.createElement("link");return r.rel=i?"stylesheet":"modulepreload",i||(r.as="script",r.crossOrigin=""),r.href=n,a&&r.setAttribute("nonce",a),document.head.appendChild(r),i?new Promise(((e,t)=>{r.addEventListener("load",e),r.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${n}`))))})):void 0})))}return i.then((()=>t())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))};
|
||
/**
|
||
* @vue/shared v3.4.21
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/
|
||
function n(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const o={},i=[],s=()=>{},a=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),u=Object.assign,l=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,p=(e,t)=>d.call(e,t),h=Array.isArray,f=e=>"[object Map]"===T(e),g=e=>"[object Set]"===T(e),_=e=>"[object Date]"===T(e),m=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,I=e=>null!==e&&"object"==typeof e,M=e=>(I(e)||m(e))&&m(e.then)&&m(e.catch),C=Object.prototype.toString,T=e=>C.call(e),S=e=>"[object Object]"===T(e),E=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,D=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},L=/-(\w)/g,b=k((e=>e.replace(L,((e,t)=>t?t.toUpperCase():"")))),A=/\B([A-Z])/g,R=k((e=>e.replace(A,"-$1").toLowerCase())),O=k((e=>e.charAt(0).toUpperCase()+e.slice(1))),N=k((e=>e?`on${O(e)}`:"")),P=(e,t)=>!Object.is(e,t),w=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},G=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},U=e=>{const t=parseFloat(e);return isNaN(t)?e:t},x=e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t};let F;const q=()=>F||(F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),V=n("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");function B(e){if(h(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=v(o)?$(o):B(o);if(i)for(const e in i)t[e]=i[e]}return t}if(v(e)||I(e))return e}const H=/;(?![^(]*\))/g,K=/:([^]+)/,j=/\/\*[^]*?\*\//g;function $(e){const t={};return e.replace(j,"").split(H).forEach((e=>{if(e){const n=e.split(K);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function W(e){let t="";if(v(e))t=e;else if(h(e))for(let n=0;n<e.length;n++){const o=W(e[n]);o&&(t+=o+" ")}else if(I(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Y=n("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function z(e){return!!e||""===e}function X(e,t){if(e===t)return!0;let n=_(e),o=_(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=y(e),o=y(t),n||o)return e===t;if(n=h(e),o=h(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=X(e[o],t[o]);return n}(e,t);if(n=I(e),o=I(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(o&&!i||!o&&i||!X(e[n],t[n]))return!1}}return String(e)===String(t)}function J(e,t){return e.findIndex((e=>X(e,t)))}const Z=e=>v(e)?e:null==e?"":h(e)||I(e)&&(e.toString===C||!m(e.toString))?JSON.stringify(e,Q,2):String(e),Q=(e,t)=>t&&t.__v_isRef?Q(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ee(t,o)+" =>"]=n,e)),{})}:g(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ee(e)))}:y(t)?ee(t):!I(t)||h(t)||S(t)?t:String(t),ee=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},te=["ad","ad-content-page","ad-draw","audio","button","camera","canvas","checkbox","checkbox-group","cover-image","cover-view","editor","form","functional-page-navigator","icon","image","input","label","live-player","live-pusher","map","movable-area","movable-view","navigator","official-account","open-data","picker","picker-view","picker-view-column","progress","radio","radio-group","rich-text","scroll-view","slider","swiper","swiper-item","switch","text","textarea","video","view","web-view","location-picker","location-view"].map((e=>"uni-"+e)),ne=["list-view","list-item","sticky-section","sticky-header","cloud-db-element"].map((e=>"uni-"+e)),oe=["list-item"].map((e=>"uni-"+e));function ie(e){if(-1!==oe.indexOf(e))return!1;const t="uni-"+e.replace("v-uni-","");return-1!==te.indexOf(t)||-1!==ne.indexOf(t)}const se="\n",ae=["%","%"],re="#007aff",ce=/^([a-z-]+:)?\/\//i,ue=/^data:.*,.*/,le="onShow",de="onHide",pe="onError",he="onThemeChange",fe="onPageNotFound",ge="onUnhandledRejection",_e="onLoad",me="onReady",ve="onUnload",ye="onInit",Ie="onSaveExitState",Me="onResize",Ce="onBackPress",Te="onPageScroll",Se="onTabItemTap",Ee="onReachBottom",De="onPullDownRefresh",ke="onShareTimeline",Le="onAddToFavorites",be="onShareAppMessage",Ae="onNavigationBarButtonTap",Re="onNavigationBarSearchInputClicked",Oe="onNavigationBarSearchInputChanged",Ne="onNavigationBarSearchInputConfirmed",Pe="onNavigationBarSearchInputFocusChanged",we="onAppEnterForeground",Ge="onAppEnterBackground",Ue="onWebInvokeAppService";function xe(e){return e&&(e.appContext?e.proxy:e)}function Fe(e){if(!e)return;let t=e.type.name;for(;t&&ie(R(t));)t=(e=e.parent).type.name;return e.proxy}function qe(e){return 1===e.nodeType}function Ve(e){if(e instanceof Map){const t={};return e.forEach(((e,n)=>{t[n]=e})),B(t)}if(v(e))return $(e);if(h(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=v(o)?$(o):Ve(o);if(i)for(const e in i)t[e]=i[e]}return t}return B(e)}function Be(e){let t="";if(e instanceof Map)e.forEach(((e,n)=>{e&&(t+=n+" ")}));else if(h(e))for(let n=0;n<e.length;n++){const o=Be(e[n]);o&&(t+=o+" ")}else t=W(e);return t.trim()}function He(e){if(!e)return null;let{class:t,style:n}=e;return t&&!v(t)&&(e.class=Be(t)),n&&(e.style=Ve(n)),e}function Ke(e){return 0===e.indexOf("/")}function je(e){return Ke(e)?e:"/"+e}function $e(e){return Ke(e)?e.slice(1):e}function We(e,t){for(const n in t)e.style[n]=t[n]}function Ye(e,t=null){let n;return(...o)=>(e&&(n=e.apply(t,o),e=null),n)}const ze=e=>e>9?e:"0"+e;function Xe({date:e=new Date,mode:t="date"}){return"time"===t?ze(e.getHours())+":"+ze(e.getMinutes()):e.getFullYear()+"-"+ze(e.getMonth()+1)+"-"+ze(e.getDate())}function Je(e,t){e=e||{},v(t)&&(t={errMsg:t}),/:ok$/.test(t.errMsg)?m(e.success)&&e.success(t):m(e.fail)&&e.fail(t),m(e.complete)&&e.complete(t)}function Ze(e){return b(e.substring(5))}const Qe=Ye((()=>{const e=HTMLElement.prototype,t=e.setAttribute;e.setAttribute=function(e,n){if(e.startsWith("data-")&&this.tagName.startsWith("UNI-")){(this.__uniDataset||(this.__uniDataset={}))[Ze(e)]=n}t.call(this,e,n)};const n=e.removeAttribute;e.removeAttribute=function(e){this.__uniDataset&&e.startsWith("data-")&&this.tagName.startsWith("UNI-")&&delete this.__uniDataset[Ze(e)],n.call(this,e)}}));function et(e){return u({},e.dataset,e.__uniDataset)}const nt=new RegExp("\"[^\"]+\"|'[^']+'|url\\([^)]+\\)|(\\d*\\.?\\d+)[r|u]px","g");function ot(e){return{passive:e}}function it(e){const{id:t,offsetTop:n,offsetLeft:o}=e;return{id:t,dataset:et(e),offsetTop:n,offsetLeft:o}}function st(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function at(e={}){const t={};return Object.keys(e).forEach((n=>{try{t[n]=st(e[n])}catch(aL){t[n]=e[n]}})),t}const rt=/\+/g;function ct(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const e=n[o].replace(rt," ");let i=e.indexOf("="),s=st(i<0?e:e.slice(0,i)),a=i<0?null:st(e.slice(i+1));if(s in t){let e=t[s];h(e)||(e=t[s]=[e]),e.push(a)}else t[s]=a}return t}function ut(e,t,{clearTimeout:n,setTimeout:o}){let i;const s=function(){n(i);i=o((()=>e.apply(this,arguments)),t)};return s.cancel=function(){n(i)},s}class lt{constructor(e,t){this.id=e,this.listener={},this.emitCache=[],t&&Object.keys(t).forEach((e=>{this.on(e,t[e])}))}emit(e,...t){const n=this.listener[e];if(!n)return this.emitCache.push({eventName:e,args:t});n.forEach((e=>{e.fn.apply(e.fn,t)})),this.listener[e]=n.filter((e=>"once"!==e.type))}on(e,t){this._addListener(e,"on",t),this._clearCache(e)}once(e,t){this._addListener(e,"once",t),this._clearCache(e)}off(e,t){const n=this.listener[e];if(n)if(t)for(let o=0;o<n.length;)n[o].fn===t&&(n.splice(o,1),o--),o++;else delete this.listener[e]}_clearCache(e){for(let t=0;t<this.emitCache.length;t++){const n=this.emitCache[t],o=e?n.eventName===e?e:null:n.eventName;if(!o)continue;"number"!=typeof this.emit.apply(this,[o,...n.args])?(this.emitCache.splice(t,1),t--):this.emitCache.pop()}}_addListener(e,t,n){(this.listener[e]||(this.listener[e]=[])).push({fn:n,type:t})}}const dt=[ye,_e,le,de,ve,Ce,Te,Se,Ee,De,ke,be,Le,Ie,Ae,Re,Oe,Ne,Pe];const pt=[le,de,"onLaunch",pe,he,fe,ge,"onExit",ye,_e,me,ve,Me,Ce,Te,Se,Ee,De,ke,Le,be,Ie,Ae,Re,Oe,Ne,Pe];const ht=[];const ft=Ye(((e,t)=>{if(m(e._component.onError))return t(e)})),gt=function(){};gt.prototype={on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var o=this;function i(){o.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),o=n[e],i=[];if(o&&t){for(var s=o.length-1;s>=0;s--)if(o[s].fn===t||o[s].fn._===t){o.splice(s,1);break}i=o}return i.length?n[e]=i:delete n[e],this}};var _t=gt;const mt={black:"rgba(0,0,0,0.4)",white:"rgba(255,255,255,0.4)"};function vt(e,t,n){if(v(t)&&t.startsWith("@")){let i=e[t.replace("@","")]||t;switch(n){case"titleColor":i="black"===i?"#000000":"#ffffff";break;case"borderStyle":i=(o=i)&&o in mt?mt[o]:o}return i}var o;return t}function yt(e,t={},n="light"){const o=t[n],i={};return void 0!==o&&e?(Object.keys(e).forEach((s=>{const a=e[s];i[s]=S(a)?yt(a,t,n):h(a)?a.map((e=>"object"==typeof e?yt(e,t,n):vt(o,e))):vt(o,a,s)})),i):e}
|
||
/**
|
||
* @dcloudio/uni-h5-vue v3.4.21
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let It,Mt;class Ct{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=It,!e&&It&&(this.index=(It.scopes||(It.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=It;try{return It=this,e()}finally{It=t}}}on(){It=this}off(){It=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function Tt(e){return new Ct(e)}function St(e,t=It){t&&t.active&&t.effects.push(e)}function Et(){return It}function Dt(e){It&&It.cleanups.push(e)}class kt{constructor(e,t,n,o){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,St(this,o)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,Gt();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(t.computed.value,this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Ut()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Nt,t=Mt;try{return Nt=!0,Mt=this,this._runnings++,Lt(this),this.fn()}finally{bt(this),this._runnings--,Mt=t,Nt=e}}stop(){var e;this.active&&(Lt(this),bt(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function Lt(e){e._trackId++,e._depsLength=0}function bt(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)At(e.deps[t],e);e.deps.length=e._depsLength}}function At(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function Rt(e,t){e.effect instanceof kt&&(e=e.effect.fn);const n=new kt(e,s,(()=>{n.dirty&&n.run()}));t&&(u(n,t),t.scope&&St(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o}function Ot(e){e.effect.stop()}let Nt=!0,Pt=0;const wt=[];function Gt(){wt.push(Nt),Nt=!1}function Ut(){const e=wt.pop();Nt=void 0===e||e}function xt(){Pt++}function Ft(){for(Pt--;!Pt&&Vt.length;)Vt.shift()()}function qt(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&At(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Vt=[];function Bt(e,t,n){xt();for(const o of e.keys()){let n;o._dirtyLevel<t&&(null!=n?n:n=e.get(o)===o._trackId)&&(o._shouldSchedule||(o._shouldSchedule=0===o._dirtyLevel),o._dirtyLevel=t),o._shouldSchedule&&(null!=n?n:n=e.get(o)===o._trackId)&&(o.trigger(),o._runnings&&!o.allowRecurse||2===o._dirtyLevel||(o._shouldSchedule=!1,o.scheduler&&Vt.push(o.scheduler)))}Ft()}const Ht=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Kt=new WeakMap,jt=Symbol(""),$t=Symbol("");function Wt(e,t,n){if(Nt&&Mt){let t=Kt.get(e);t||Kt.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Ht((()=>t.delete(n)))),qt(Mt,o)}}function Yt(e,t,n,o,i,s){const a=Kt.get(e);if(!a)return;let r=[];if("clear"===t)r=[...a.values()];else if("length"===n&&h(e)){const e=Number(o);a.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&r.push(t)}))}else switch(void 0!==n&&r.push(a.get(n)),t){case"add":h(e)?E(n)&&r.push(a.get("length")):(r.push(a.get(jt)),f(e)&&r.push(a.get($t)));break;case"delete":h(e)||(r.push(a.get(jt)),f(e)&&r.push(a.get($t)));break;case"set":f(e)&&r.push(a.get(jt))}xt();for(const c of r)c&&Bt(c,4);Ft()}const zt=n("__proto__,__v_isRef,__isVue"),Xt=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Jt=Zt();function Zt(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Kn(this);for(let t=0,i=this.length;t<i;t++)Wt(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(Kn)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){Gt(),xt();const n=Kn(this)[t].apply(this,e);return Ft(),Ut(),n}})),e}function Qt(e){const t=Kn(this);return Wt(t,0,e),t.hasOwnProperty(e)}class en{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(o?i?Nn:On:i?Rn:An).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=h(e);if(!o){if(s&&p(Jt,t))return Reflect.get(Jt,t,n);if("hasOwnProperty"===t)return Qt}const a=Reflect.get(e,t,n);return(y(t)?Xt.has(t):zt(t))?a:(o||Wt(e,0,t),i?a:Jn(a)?s&&E(t)?a:a.value:I(a)?o?Un(a):wn(a):a)}}class tn extends en{constructor(e=!1){super(!1,e)}set(e,t,n,o){let i=e[t];if(!this._isShallow){const t=Vn(i);if(Bn(n)||Vn(n)||(i=Kn(i),n=Kn(n)),!h(e)&&Jn(i)&&!Jn(n))return!t&&(i.value=n,!0)}const s=h(e)&&E(t)?Number(t)<e.length:p(e,t),a=Reflect.set(e,t,n,o);return e===Kn(o)&&(s?P(n,i)&&Yt(e,"set",t,n):Yt(e,"add",t,n)),a}deleteProperty(e,t){const n=p(e,t);e[t];const o=Reflect.deleteProperty(e,t);return o&&n&&Yt(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return y(t)&&Xt.has(t)||Wt(e,0,t),n}ownKeys(e){return Wt(e,0,h(e)?"length":jt),Reflect.ownKeys(e)}}class nn extends en{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const on=new tn,sn=new nn,an=new tn(!0),rn=new nn(!0),cn=e=>e,un=e=>Reflect.getPrototypeOf(e);function ln(e,t,n=!1,o=!1){const i=Kn(e=e.__v_raw),s=Kn(t);n||(P(t,s)&&Wt(i,0,t),Wt(i,0,s));const{has:a}=un(i),r=o?cn:n?Wn:$n;return a.call(i,t)?r(e.get(t)):a.call(i,s)?r(e.get(s)):void(e!==i&&e.get(t))}function dn(e,t=!1){const n=this.__v_raw,o=Kn(n),i=Kn(e);return t||(P(e,i)&&Wt(o,0,e),Wt(o,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function pn(e,t=!1){return e=e.__v_raw,!t&&Wt(Kn(e),0,jt),Reflect.get(e,"size",e)}function hn(e){e=Kn(e);const t=Kn(this);return un(t).has.call(t,e)||(t.add(e),Yt(t,"add",e,e)),this}function fn(e,t){t=Kn(t);const n=Kn(this),{has:o,get:i}=un(n);let s=o.call(n,e);s||(e=Kn(e),s=o.call(n,e));const a=i.call(n,e);return n.set(e,t),s?P(t,a)&&Yt(n,"set",e,t):Yt(n,"add",e,t),this}function gn(e){const t=Kn(this),{has:n,get:o}=un(t);let i=n.call(t,e);i||(e=Kn(e),i=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return i&&Yt(t,"delete",e,void 0),s}function _n(){const e=Kn(this),t=0!==e.size,n=e.clear();return t&&Yt(e,"clear",void 0,void 0),n}function mn(e,t){return function(n,o){const i=this,s=i.__v_raw,a=Kn(s),r=t?cn:e?Wn:$n;return!e&&Wt(a,0,jt),s.forEach(((e,t)=>n.call(o,r(e),r(t),i)))}}function vn(e,t,n){return function(...o){const i=this.__v_raw,s=Kn(i),a=f(s),r="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,u=i[e](...o),l=n?cn:t?Wn:$n;return!t&&Wt(s,0,c?$t:jt),{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 yn(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function In(){const e={get(e){return ln(this,e)},get size(){return pn(this)},has:dn,add:hn,set:fn,delete:gn,clear:_n,forEach:mn(!1,!1)},t={get(e){return ln(this,e,!1,!0)},get size(){return pn(this)},has:dn,add:hn,set:fn,delete:gn,clear:_n,forEach:mn(!1,!0)},n={get(e){return ln(this,e,!0)},get size(){return pn(this,!0)},has(e){return dn.call(this,e,!0)},add:yn("add"),set:yn("set"),delete:yn("delete"),clear:yn("clear"),forEach:mn(!0,!1)},o={get(e){return ln(this,e,!0,!0)},get size(){return pn(this,!0)},has(e){return dn.call(this,e,!0)},add:yn("add"),set:yn("set"),delete:yn("delete"),clear:yn("clear"),forEach:mn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=vn(i,!1,!1),n[i]=vn(i,!0,!1),t[i]=vn(i,!1,!0),o[i]=vn(i,!0,!0)})),[e,n,t,o]}const[Mn,Cn,Tn,Sn]=In();function En(e,t){const n=t?e?Sn:Tn:e?Cn:Mn;return(t,o,i)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,i)}const Dn={get:En(!1,!1)},kn={get:En(!1,!0)},Ln={get:En(!0,!1)},bn={get:En(!0,!0)},An=new WeakMap,Rn=new WeakMap,On=new WeakMap,Nn=new WeakMap;function Pn(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=>T(e).slice(8,-1))(e))}function wn(e){return Vn(e)?e:Fn(e,!1,on,Dn,An)}function Gn(e){return Fn(e,!1,an,kn,Rn)}function Un(e){return Fn(e,!0,sn,Ln,On)}function xn(e){return Fn(e,!0,rn,bn,Nn)}function Fn(e,t,n,o,i){if(!I(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const a=Pn(e);if(0===a)return e;const r=new Proxy(e,2===a?o:n);return i.set(e,r),r}function qn(e){return Vn(e)?qn(e.__v_raw):!(!e||!e.__v_isReactive)}function Vn(e){return!(!e||!e.__v_isReadonly)}function Bn(e){return!(!e||!e.__v_isShallow)}function Hn(e){return qn(e)||Vn(e)}function Kn(e){const t=e&&e.__v_raw;return t?Kn(t):e}function jn(e){return Object.isExtensible(e)&&G(e,"__v_skip",!0),e}const $n=e=>I(e)?wn(e):e,Wn=e=>I(e)?Un(e):e;class Yn{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new kt((()=>e(this._value)),(()=>Xn(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Kn(this);return e._cacheable&&!e.effect.dirty||!P(e._value,e._value=e.effect.run())||Xn(e,4),zn(e),e.effect._dirtyLevel>=2&&Xn(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function zn(e){var t;Nt&&Mt&&(e=Kn(e),qt(Mt,null!=(t=e.dep)?t:e.dep=Ht((()=>e.dep=void 0),e instanceof Yn?e:void 0)))}function Xn(e,t=4,n){const o=(e=Kn(e)).dep;o&&Bt(o,t)}function Jn(e){return!(!e||!0!==e.__v_isRef)}function Zn(e){return eo(e,!1)}function Qn(e){return eo(e,!0)}function eo(e,t){return Jn(e)?e:new to(e,t)}class to{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Kn(e),this._value=t?e:$n(e)}get value(){return zn(this),this._value}set value(e){const t=this.__v_isShallow||Bn(e)||Vn(e);e=t?e:Kn(e),P(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:$n(e),Xn(this,4))}}function no(e){Xn(e,4)}function oo(e){return Jn(e)?e.value:e}function io(e){return m(e)?e():oo(e)}const so={get:(e,t,n)=>oo(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return Jn(i)&&!Jn(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function ao(e){return qn(e)?e:new Proxy(e,so)}class ro{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>zn(this)),(()=>Xn(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function co(e){return new ro(e)}function uo(e){const t=h(e)?new Array(e.length):{};for(const n in e)t[n]=fo(e,n);return t}class lo{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=Kn(this._object),t=this._key,null==(n=Kt.get(e))?void 0:n.get(t);var e,t,n}}class po{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ho(e,t,n){return Jn(e)?e:m(e)?new po(e):I(e)&&arguments.length>1?fo(e,t,n):Zn(e)}function fo(e,t,n){const o=e[t];return Jn(o)?o:new lo(e,t,n)}const go={GET:"get",HAS:"has",ITERATE:"iterate"},_o={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function mo(e,t){}const vo={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},yo={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",ba:"beforeActivate hook",a:"activated hook",bda:"beforeDeactivate hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Io(e,t,n,o){try{return o?e(...o):e()}catch(i){Co(i,t,n)}}function Mo(e,t,n,o){if(m(e)){const i=Io(e,t,n,o);return i&&M(i)&&i.catch((e=>{Co(e,t,n)})),i}const i=[];for(let s=0;s<e.length;s++)i.push(Mo(e[s],t,n,o));return i}function Co(e,t,n,o=!0){t&&t.vnode;if(t){let o=t.parent;const i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return;o=o.parent}const a=t.appContext.config.errorHandler;if(a)return void Io(a,null,10,[e,i,s])}!function(e){console.error(e)}(e,0,0,o)}let To=!1,So=!1;const Eo=[];let Do=0;const ko=[];let Lo=null,bo=0;const Ao=Promise.resolve();let Ro=null;function Oo(e){const t=Ro||Ao;return e?t.then(this?e.bind(this):e):t}function No(e){Eo.length&&Eo.includes(e,To&&e.allowRecurse?Do+1:Do)||(null==e.id?Eo.push(e):Eo.splice(function(e){let t=Do+1,n=Eo.length;for(;t<n;){const o=t+n>>>1,i=Eo[o],s=xo(i);s<e||s===e&&i.pre?t=o+1:n=o}return t}(e.id),0,e),Po())}function Po(){To||So||(So=!0,Ro=Ao.then(qo))}function wo(e){h(e)?ko.push(...e):Lo&&Lo.includes(e,e.allowRecurse?bo+1:bo)||ko.push(e),Po()}function Go(e,t,n=(To?Do+1:0)){for(;n<Eo.length;n++){const t=Eo[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;Eo.splice(n,1),n--,t()}}}function Uo(e){if(ko.length){const e=[...new Set(ko)].sort(((e,t)=>xo(e)-xo(t)));if(ko.length=0,Lo)return void Lo.push(...e);for(Lo=e,bo=0;bo<Lo.length;bo++)Lo[bo]();Lo=null,bo=0}}const xo=e=>null==e.id?1/0:e.id,Fo=(e,t)=>{const n=xo(e)-xo(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function qo(e){So=!1,To=!0,Eo.sort(Fo);try{for(Do=0;Do<Eo.length;Do++){const e=Eo[Do];e&&!1!==e.active&&Io(e,null,14)}}finally{Do=0,Eo.length=0,Uo(),To=!1,Ro=null,(Eo.length||ko.length)&&qo()}}let Vo,Bo=[];function Ho(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||o;let s=n;const a=t.startsWith("update:"),r=a&&t.slice(7);if(r&&r in i){const e=`${"modelValue"===r?"model":r}Modifiers`,{number:t,trim:a}=i[e]||o;a&&(s=n.map((e=>v(e)?e.trim():e))),t&&(s=n.map(U))}let c,u=i[c=N(t)]||i[c=N(b(t))];!u&&a&&(u=i[c=N(R(t))]),u&&Mo(u,e,6,Ko(e,u,s));const l=i[c+"Once"];if(l){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Mo(l,e,6,Ko(e,l,s))}}function Ko(e,t,n){if(1!==n.length)return n;if(m(t)){if(t.length<2)return n}else if(!t.find((e=>e.length>=2)))return n;const o=n[0];if(o&&p(o,"type")&&p(o,"timeStamp")&&p(o,"target")&&p(o,"currentTarget")&&p(o,"detail")){const t=e.proxy,o=t.$gcd(t,!0);o&&n.push(o)}return n}function jo(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(void 0!==i)return i;const s=e.emits;let a={},r=!1;if(!m(e)){const o=e=>{const n=jo(e,t,!0);n&&(r=!0,u(a,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||r?(h(s)?s.forEach((e=>a[e]=null)):u(a,s),I(e)&&o.set(e,a),a):(I(e)&&o.set(e,null),null)}function $o(e,t){return!(!e||!r(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,R(t))||p(e,t))}let Wo=null,Yo=null;function zo(e){const t=Wo;return Wo=e,Yo=e&&e.type.__scopeId||null,t}function Xo(e){Yo=e}function Jo(){Yo=null}const Zo=e=>Qo;function Qo(e,t=Wo,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&er(-1);const i=zo(t);let s;try{s=e(...n)}finally{zo(i),o._d&&er(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function ei(e){const{type:t,vnode:n,proxy:o,withProxy:i,props:s,propsOptions:[a],slots:r,attrs:u,emit:l,render:d,renderCache:p,data:h,setupState:f,ctx:g,inheritAttrs:_}=e;let m,v;const y=zo(e);try{if(4&n.shapeFlag){const e=i||o,t=e;m=mr(d.call(t,e,p,s,f,h,g)),v=u}else{const e=t;0,m=mr(e.length>1?e(s,{attrs:u,slots:r,emit:l}):e(s,null)),v=t.props?u:ti(u)}}catch(M){za.length=0,Co(M,e,1),m=dr(Wa)}let I=m;if(v&&!1!==_){const e=Object.keys(v),{shapeFlag:t}=I;e.length&&7&t&&(a&&e.some(c)&&(v=ni(v,a)),I=hr(I,v))}return n.dirs&&(I=hr(I),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&(I.transition=n.transition),m=I,zo(y),m}const ti=e=>{let t;for(const n in e)("class"===n||"style"===n||r(n))&&((t||(t={}))[n]=e[n]);return t},ni=(e,t)=>{const n={};for(const o in e)c(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function oi(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const s=o[i];if(t[s]!==e[s]&&!$o(n,s))return!0}return!1}function ii({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}const si="components";function ai(e,t){return li(si,e,!0,t)||e}const ri=Symbol.for("v-ndc");function ci(e){return v(e)?li(si,e,!1)||e:e||ri}function ui(e){return li("directives",e)}function li(e,t,n=!0,o=!1){const i=Wo||Er;if(i){const n=i.type;if(e===si){const e=Br(n,!1);if(e&&(e===t||e===b(t)||e===O(b(t))))return n}const s=di(i[e]||n[e],t)||di(i.appContext[e],t);return!s&&o?n:s}}function di(e,t){return e&&(e[t]||e[b(t)]||e[O(b(t))])}const pi=e=>e.__isSuspense;let hi=0;const fi={name:"Suspense",__isSuspense:!0,process(e,t,n,o,i,s,a,r,c,u){if(null==e)!function(e,t,n,o,i,s,a,r,c){const{p:u,o:{createElement:l}}=c,d=l("div"),p=e.suspense=_i(e,i,o,t,d,n,s,a,r,c);u(null,p.pendingBranch=e.ssContent,d,null,o,p,s,a),p.deps>0?(gi(e,"onPending"),gi(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,s,a),yi(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,i,s,a,r,c,u);else{if(s&&s.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,o,i,s,a,r,{p:c,um:u,o:{createElement:l}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:g,isInFallback:_,isHydrating:m}=d;if(g)d.pendingBranch=p,sr(p,g)?(c(g,p,d.hiddenContainer,null,i,d,s,a,r),d.deps<=0?d.resolve():_&&(m||(c(f,h,n,o,i,null,s,a,r),yi(d,h)))):(d.pendingId=hi++,m?(d.isHydrating=!1,d.activeBranch=g):u(g,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=l("div"),_?(c(null,p,d.hiddenContainer,null,i,d,s,a,r),d.deps<=0?d.resolve():(c(f,h,n,o,i,null,s,a,r),yi(d,h))):f&&sr(p,f)?(c(f,p,n,o,i,d,s,a,r),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,i,d,s,a,r),d.deps<=0&&d.resolve()));else if(f&&sr(p,f))c(f,p,n,o,i,d,s,a,r),yi(d,p);else if(gi(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=hi++,c(null,p,d.hiddenContainer,null,i,d,s,a,r),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,o,i,a,r,c,u)}},hydrate:function(e,t,n,o,i,s,a,r,c){const u=t.suspense=_i(t,o,n,e.parentNode,document.createElement("div"),null,i,s,a,r,!0),l=c(e,u.pendingBranch=t.ssContent,n,u,s,a);0===u.deps&&u.resolve(!1,!0);return l},create:_i,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=mi(o?n.default:n),e.ssFallback=o?mi(n.fallback):dr(Wa)}};function gi(e,t){const n=e.props&&e.props[t];m(n)&&n()}function _i(e,t,n,o,i,s,a,r,c,u,l=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:g,remove:_}}=u;let m;const v=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);v&&(null==t?void 0:t.pendingBranch)&&(m=t.pendingId,t.deps++);const y=e.props?x(e.props.timeout):void 0,I=s,M={vnode:e,parent:t,parentComponent:n,namespace:a,container:o,hiddenContainer:i,deps:0,pendingId:hi++,timeout:"number"==typeof y?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!l,isHydrating:l,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:i,pendingBranch:a,pendingId:r,effects:c,parentComponent:u,container:l}=M;let d=!1;M.isHydrating?M.isHydrating=!1:e||(d=i&&a.transition&&"out-in"===a.transition.mode,d&&(i.transition.afterLeave=()=>{r===M.pendingId&&(p(a,l,s===I?f(i):s,0),wo(c))}),i&&(g(i.el)!==M.hiddenContainer&&(s=f(i)),h(i,u,M,!0)),d||p(a,l,s,0)),yi(M,a),M.pendingBranch=null,M.isInFallback=!1;let _=M.parent,y=!1;for(;_;){if(_.pendingBranch){_.effects.push(...c),y=!0;break}_=_.parent}y||d||wo(c),M.effects=[],v&&t&&t.pendingBranch&&m===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),gi(o,"onResolve")},fallback(e){if(!M.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:i,namespace:s}=M;gi(t,"onFallback");const a=f(n),u=()=>{M.isInFallback&&(d(null,e,i,a,o,null,s,r,c),yi(M,e))},l=e.transition&&"out-in"===e.transition.mode;l&&(n.transition.afterLeave=u),M.isInFallback=!0,h(n,o,null,!0),l||u()},move(e,t,n){M.activeBranch&&p(M.activeBranch,e,t,n),M.container=e},next:()=>M.activeBranch&&f(M.activeBranch),registerDep(e,t){const n=!!M.pendingBranch;n&&M.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{Co(t,e,0)})).then((i=>{if(e.isUnmounted||M.isUnmounted||M.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Gr(e,i,!1),o&&(s.el=o);const r=!o&&e.subTree.el;t(e,s,g(o||e.subTree.el),o?null:f(e.subTree),M,a,c),r&&_(r),ii(e,s.el),n&&0==--M.deps&&M.resolve()}))},unmount(e,t){M.isUnmounted=!0,M.activeBranch&&h(M.activeBranch,n,e,t),M.pendingBranch&&h(M.pendingBranch,n,e,t)}};return M}function mi(e){let t;if(m(e)){const n=Qa&&e._c;n&&(e._d=!1,Ja()),e=e(),n&&(e._d=!0,t=Xa,Za())}if(h(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!ir(o))return;if(o.type!==Wa||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=mr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function vi(e,t){t&&t.pendingBranch?h(e)?t.effects.push(...e):t.effects.push(e):wo(e)}function yi(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,o&&o.subTree===n&&(o.vnode.el=i,ii(o,i))}const Ii=Symbol.for("v-scx"),Mi=()=>la(Ii);function Ci(e,t){return ki(e,null,t)}function Ti(e,t){return ki(e,null,{flush:"post"})}function Si(e,t){return ki(e,null,{flush:"sync"})}const Ei={};function Di(e,t,n){return ki(e,t,n)}function ki(e,t,{immediate:n,deep:i,flush:a,once:r,onTrack:c,onTrigger:u}=o){if(t&&r){const e=t;t=(...t)=>{e(...t),D()}}const d=Er,p=e=>!0===i?e:Ai(e,!1===i?1:void 0);let f,g,_=!1,v=!1;if(Jn(e)?(f=()=>e.value,_=Bn(e)):qn(e)?(f=()=>p(e),_=!0):h(e)?(v=!0,_=e.some((e=>qn(e)||Bn(e))),f=()=>e.map((e=>Jn(e)?e.value:qn(e)?p(e):m(e)?Io(e,d,2):void 0))):f=m(e)?t?()=>Io(e,d,2):()=>(g&&g(),Mo(e,d,3,[I])):s,t&&i){const e=f;f=()=>Ai(e())}let y,I=e=>{g=S.onStop=()=>{Io(e,d,4),g=S.onStop=void 0}};if(Pr){if(I=s,t?n&&Mo(t,d,3,[f(),v?[]:void 0,I]):f(),"sync"!==a)return s;{const e=Mi();y=e.__watcherHandles||(e.__watcherHandles=[])}}let M=v?new Array(e.length).fill(Ei):Ei;const C=()=>{if(S.active&&S.dirty)if(t){const e=S.run();(i||_||(v?e.some(((e,t)=>P(e,M[t]))):P(e,M)))&&(g&&g(),Mo(t,d,3,[e,M===Ei?void 0:v&&M[0]===Ei?[]:M,I]),M=e)}else S.run()};let T;C.allowRecurse=!!t,"sync"===a?T=C:"post"===a?T=()=>ba(C,d&&d.suspense):(C.pre=!0,d&&(C.id=d.uid),T=()=>No(C));const S=new kt(f,s,T),E=Et(),D=()=>{S.stop(),E&&l(E.effects,S)};return t?n?C():M=S.run():"post"===a?ba(S.run.bind(S),d&&d.suspense):S.run(),y&&y.push(D),D}function Li(e,t,n){const o=this.proxy,i=v(e)?e.includes(".")?bi(o,e):()=>o[e]:e.bind(o,o);let s;m(t)?s=t:(s=t.handler,n=t);const a=br(this),r=ki(i,s.bind(o),n);return a(),r}function bi(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Ai(e,t,n=0,o){if(!I(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),Jn(e))Ai(e.value,t,n,o);else if(h(e))for(let i=0;i<e.length;i++)Ai(e[i],t,n,o);else if(g(e)||f(e))e.forEach((e=>{Ai(e,t,n,o)}));else if(S(e))for(const i in e)Ai(e[i],t,n,o);return e}function Ri(e,t){if(null===Wo)return e;const n=Vr(Wo)||Wo.proxy,i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,a,r,c=o]=t[s];e&&(m(e)&&(e={mounted:e,updated:e}),e.deep&&Ai(a),i.push({dir:e,instance:n,value:a,oldValue:void 0,arg:r,modifiers:c}))}return e}function Oi(e,t,n,o){const i=e.dirs,s=t&&t.dirs;for(let a=0;a<i.length;a++){const r=i[a];s&&(r.oldValue=s[a].value);let c=r.dir[o];c&&(Gt(),Mo(c,n,8,[e.el,r,e,t]),Ut())}}const Ni=Symbol("_leaveCb"),Pi=Symbol("_enterCb");function wi(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return hs((()=>{e.isMounted=!0})),_s((()=>{e.isUnmounting=!0})),e}const Gi=[Function,Array],Ui={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gi,onEnter:Gi,onAfterEnter:Gi,onEnterCancelled:Gi,onBeforeLeave:Gi,onLeave:Gi,onAfterLeave:Gi,onLeaveCancelled:Gi,onBeforeAppear:Gi,onAppear:Gi,onAfterAppear:Gi,onAppearCancelled:Gi},xi={name:"BaseTransition",props:Ui,setup(e,{slots:t}){const n=Dr(),o=wi();return()=>{const i=t.default&&Ki(t.default(),!0);if(!i||!i.length)return;let s=i[0];if(i.length>1)for(const e of i)if(e.type!==Wa){s=e;break}const a=Kn(e),{mode:r}=a;if(o.isLeaving)return Vi(s);const c=Bi(s);if(!c)return Vi(s);const u=qi(c,a,o,n);Hi(c,u);const l=n.subTree,d=l&&Bi(l);if(d&&d.type!==Wa&&!sr(c,d)){const e=qi(d,a,o,n);if(Hi(d,e),"out-in"===r)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},Vi(s);"in-out"===r&&c.type!==Wa&&(e.delayLeave=(e,t,n)=>{Fi(o,d)[String(d.key)]=d,e[Ni]=()=>{t(),e[Ni]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return s}}};function Fi(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function qi(e,t,n,o){const{appear:i,mode:s,persisted:a=!1,onBeforeEnter:r,onEnter:c,onAfterEnter:u,onEnterCancelled:l,onBeforeLeave:d,onLeave:p,onAfterLeave:f,onLeaveCancelled:g,onBeforeAppear:_,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=t,I=String(e.key),M=Fi(n,e),C=(e,t)=>{e&&Mo(e,o,9,t)},T=(e,t)=>{const n=t[1];C(e,t),h(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},S={mode:s,persisted:a,beforeEnter(t){let o=r;if(!n.isMounted){if(!i)return;o=_||r}t[Ni]&&t[Ni](!0);const s=M[I];s&&sr(e,s)&&s.el[Ni]&&s.el[Ni](),C(o,[t])},enter(e){let t=c,o=u,s=l;if(!n.isMounted){if(!i)return;t=m||c,o=v||u,s=y||l}let a=!1;const r=e[Pi]=t=>{a||(a=!0,C(t?s:o,[e]),S.delayedLeave&&S.delayedLeave(),e[Pi]=void 0)};t?T(t,[e,r]):r()},leave(t,o){const i=String(e.key);if(t[Pi]&&t[Pi](!0),n.isUnmounting)return o();C(d,[t]);let s=!1;const a=t[Ni]=n=>{s||(s=!0,o(),C(n?g:f,[t]),t[Ni]=void 0,M[i]===e&&delete M[i])};M[i]=e,p?T(p,[t,a]):a()},clone:e=>qi(e,t,n,o)};return S}function Vi(e){if(zi(e))return(e=hr(e)).children=null,e}function Bi(e){return zi(e)?e.children?e.children[0]:void 0:e}function Hi(e,t){6&e.shapeFlag&&e.component?Hi(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ki(e,t=!1,n){let o=[],i=0;for(let s=0;s<e.length;s++){let a=e[s];const r=null==n?a.key:String(n)+String(null!=a.key?a.key:s);a.type===ja?(128&a.patchFlag&&i++,o=o.concat(Ki(a.children,t,r))):(t||a.type!==Wa)&&o.push(null!=r?hr(a,{key:r}):a)}if(i>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}
|
||
/*! #__NO_SIDE_EFFECTS__ */function ji(e,t){return m(e)?(()=>u({name:e.name},t,{setup:e}))():e}const $i=e=>!!e.type.__asyncLoader
|
||
/*! #__NO_SIDE_EFFECTS__ */;function Wi(e){m(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:i=200,timeout:s,suspensible:a=!0,onError:r}=e;let c,u=null,l=0;const d=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),r)return new Promise(((t,n)=>{r(e,(()=>t((l++,u=null,d()))),(()=>n(e)),l+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return ji({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const e=Er;if(c)return()=>Yi(c,e);const t=t=>{u=null,Co(t,e,13,!o)};if(a&&e.suspense||Pr)return d().then((t=>()=>Yi(t,e))).catch((e=>(t(e),()=>o?dr(o,{error:e}):null)));const r=Zn(!1),l=Zn(),p=Zn(!!i);return i&&setTimeout((()=>{p.value=!1}),i),null!=s&&setTimeout((()=>{if(!r.value&&!l.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),l.value=e}}),s),d().then((()=>{r.value=!0,e.parent&&zi(e.parent.vnode)&&(e.parent.effect.dirty=!0,No(e.parent.update))})).catch((e=>{t(e),l.value=e})),()=>r.value&&c?Yi(c,e):l.value&&o?dr(o,{error:l.value}):n&&!p.value?dr(n):void 0}})}function Yi(e,t){const{ref:n,props:o,children:i,ce:s}=t.vnode,a=dr(e,o,i);return a.ref=n,a.ce=s,delete t.vnode.ce,a}const zi=e=>e.type.__isKeepAlive;class Xi{constructor(e){this.max=e,this._cache=new Map,this._keys=new Set,this._max=parseInt(e,10)}get(e){const{_cache:t,_keys:n,_max:o}=this,i=t.get(e);if(i)n.delete(e),n.add(e);else if(n.add(e),o&&n.size>o){const e=n.values().next().value;this.pruneCacheEntry(t.get(e)),this.delete(e)}return i}set(e,t){this._cache.set(e,t)}delete(e){this._cache.delete(e),this._keys.delete(e)}forEach(e,t){this._cache.forEach(e.bind(t))}}const Ji={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number],matchBy:{type:String,default:"name"},cache:Object},setup(e,{slots:t}){const n=Dr(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const i=e.cache||new Xi(e.max);i.pruneCacheEntry=a;let s=null;function a(t){var o;!s||!sr(t,s)||"key"===e.matchBy&&t.key!==s.key?(as(o=t),l(o,n,r,!0)):s&&as(s)}const r=n.suspense,{renderer:{p:c,m:u,um:l,o:{createElement:d}}}=o,p=d("div");function h(t){i.forEach(((n,o)=>{const s=cs(n,e.matchBy);!s||t&&t(s)||(i.delete(o),a(n))}))}o.activate=(e,t,n,o,i)=>{const s=e.component;if(s.ba){const e=s.isDeactivated;s.isDeactivated=!1,w(s.ba),s.isDeactivated=e}u(e,t,n,0,r),c(s.vnode,e,t,n,s,r,o,e.slotScopeIds,i),ba((()=>{s.isDeactivated=!1,s.a&&w(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Mr(t,s.parent,e)}),r)},o.deactivate=e=>{const t=e.component;t.bda&&us(t.bda),u(e,p,null,1,r),ba((()=>{t.bda&&t.bda.forEach((e=>e.__called=!1)),t.da&&w(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Mr(n,t.parent,e),t.isDeactivated=!0}),r)},Di((()=>[e.include,e.exclude,e.matchBy]),(([e,t])=>{e&&h((t=>Qi(e,t))),t&&h((e=>!Qi(t,e)))}),{flush:"post",deep:!0});let f=null;const g=()=>{null!=f&&i.set(f,rs(n.subTree))};return hs(g),gs(g),_s((()=>{i.forEach(((t,o)=>{i.delete(o),a(t);const{subTree:s,suspense:r}=n,c=rs(s);if(t.type!==c.type||"key"===e.matchBy&&t.key!==c.key);else{c.component.bda&&w(c.component.bda),as(c);const e=c.component.da;e&&ba(e,r)}}))})),()=>{if(f=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return s=null,n;if(!ir(o)||!(4&o.shapeFlag)&&!pi(o.type))return s=null,o;let a=rs(o);const r=a.type,c=cs(a,e.matchBy),{include:u,exclude:l}=e;if(u&&(!c||!Qi(u,c))||l&&c&&Qi(l,c))return s=a,o;const d=null==a.key?r:a.key,p=i.get(d);return a.el&&(a=hr(a),pi(o.type)&&(o.ssContent=a)),f=d,p&&(a.el=p.el,a.component=p.component,a.transition&&Hi(a,a.transition),a.shapeFlag|=512),a.shapeFlag|=256,s=a,pi(o.type)?o:a}}},Zi=Ji;function Qi(e,t){return h(e)?e.some((e=>Qi(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===T(e)&&e.test(t)}function es(e,t){is(e,"ba",t)}function ts(e,t){is(e,"a",t)}function ns(e,t){is(e,"bda",t)}function os(e,t){is(e,"da",t)}function is(e,t,n=Er){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(o.__called=!1,ls(t,o,n),n){let e=n.parent;for(;e&&e.parent;)zi(e.parent.vnode)&&ss(o,t,n,e),e=e.parent}}function ss(e,t,n,o){const i=ls(t,e,o,!0);ms((()=>{l(o[t],i)}),n)}function as(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rs(e){return pi(e.type)?e.ssContent:e}function cs(e,t){if("name"===t){const t=e.type;return Br($i(e)?t.__asyncResolved||{}:t)}return String(e.key)}function us(e){for(let t=0;t<e.length;t++){const n=e[t];n.__called||(n(),n.__called=!0)}}function ls(e,t,n=Er,o=!1){if(n){if(i=e,dt.indexOf(i)>-1&&n.$pageInstance){if(n.type.__reserved)return;if(n!==n.$pageInstance&&(n=n.$pageInstance,function(e){return[_e,le].indexOf(e)>-1}(e))){const o=n.proxy;Mo(t.bind(o),n,e,_e===e?[o.$page.options]:[])}}const s=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Gt();const i=br(n),s=Mo(t,n,e,o);return i(),Ut(),s});return o?s.unshift(a):s.push(a),a}var i}const ds=e=>(t,n=Er)=>(!Pr||"sp"===e)&&ls(e,((...e)=>t(...e)),n),ps=ds("bm"),hs=ds("m"),fs=ds("bu"),gs=ds("u"),_s=ds("bum"),ms=ds("um"),vs=ds("sp"),ys=ds("rtg"),Is=ds("rtc");function Ms(e,t=Er){ls("ec",e,t)}function Cs(e,t,n,o){let i;const s=n&&n[o];if(h(e)||v(e)){i=new Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){i=new Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,s&&s[n])}else if(I(e))if(e[Symbol.iterator])i=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);i=new Array(n.length);for(let o=0,a=n.length;o<a;o++){const a=n[o];i[o]=t(e[a],a,o,s&&s[o])}}else i=[];return n&&(n[o]=i),i}function Ts(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(h(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.key?(...e)=>{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function Ss(e,t,n={},o,i){if(Wo.isCE||Wo.parent&&$i(Wo.parent)&&Wo.parent.isCE)return"default"!==t&&(n.name=t),dr("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),Ja();const a=s&&Es(s(n)),r=or(ja,{key:n.key||a&&a.key||`_${t}`},a||(o?o():[]),a&&1===e._?64:-2);return!i&&r.scopeId&&(r.slotScopeIds=[r.scopeId+"-s"]),s&&s._c&&(s._d=!0),r}function Es(e){return e.some((e=>!ir(e)||e.type!==Wa&&!(e.type===ja&&!Es(e.children))))?e:null}function Ds(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:N(o)]=e[o];return n}const ks=e=>{if(!e)return null;if(Rr(e)){return Vr(e)||e.proxy}return ks(e.parent)},Ls=u(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ks(e.parent),$root:e=>ks(e.root),$emit:e=>e.emit,$options:e=>Js(e),$forceUpdate:e=>e.f||(e.f=(e=>function(){e.effect.dirty=!0,No(e.update)})(e)),$nextTick:e=>e.n||(e.n=Oo.bind(e.proxy)),$watch:e=>Li.bind(e)}),bs=(e,t)=>e!==o&&!e.__isScriptSetup&&p(e,t),As={get({_:e},t){const{ctx:n,setupState:i,data:s,props:a,accessCache:r,type:c,appContext:u}=e;let l;if("$"!==t[0]){const c=r[t];if(void 0!==c)switch(c){case 1:return i[t];case 2:return s[t];case 4:return n[t];case 3:return a[t]}else{if(bs(i,t))return r[t]=1,i[t];if(s!==o&&p(s,t))return r[t]=2,s[t];if((l=e.propsOptions[0])&&p(l,t))return r[t]=3,a[t];if(n!==o&&p(n,t))return r[t]=4,n[t];Ws&&(r[t]=0)}}const d=Ls[t];let h,f;return d?("$attrs"===t&&Wt(e,0,t),d(e)):(h=c.__cssModules)&&(h=h[t])?h:n!==o&&p(n,t)?(r[t]=4,n[t]):(f=u.config.globalProperties,p(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:i,setupState:s,ctx:a}=e;return bs(s,t)?(s[t]=n,!0):i!==o&&p(i,t)?(i[t]=n,!0):!p(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(a[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:s,propsOptions:a}},r){let c;return!!n[r]||e!==o&&p(e,r)||bs(t,r)||(c=a[0])&&p(c,r)||p(i,r)||p(Ls,r)||p(s.config.globalProperties,r)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Rs=u({},As,{get(e,t){if(t!==Symbol.unscopables)return As.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!V(t)});function Os(){return null}function Ns(){return null}function Ps(e){}function ws(e){}function Gs(){return null}function Us(){}function xs(e,t){return null}function Fs(){return Vs().slots}function qs(){return Vs().attrs}function Vs(){const e=Dr();return e.setupContext||(e.setupContext=qr(e))}function Bs(e){return h(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Hs(e,t){const n=Bs(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?h(e)||m(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n}function Ks(e,t){return e&&t?h(e)&&h(t)?e.concat(t):u({},Bs(e),Bs(t)):e||t}function js(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function $s(e){const t=Dr();let n=e();return Ar(),M(n)&&(n=n.catch((e=>{throw br(t),e}))),[n,()=>br(t)]}let Ws=!0;function Ys(e){const t=Js(e),n=e.proxy,o=e.ctx;Ws=!1,t.beforeCreate&&zs(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:r,watch:c,provide:u,inject:l,created:d,beforeMount:p,mounted:f,beforeUpdate:g,updated:_,activated:v,deactivated:y,beforeDestroy:M,beforeUnmount:C,destroyed:T,unmounted:S,render:E,renderTracked:D,renderTriggered:k,errorCaptured:L,serverPrefetch:b,expose:A,inheritAttrs:R,components:O,directives:N,filters:P}=t;if(l&&function(e,t){h(e)&&(e=ta(e));for(const n in e){const o=e[n];let i;i=I(o)?"default"in o?la(o.from||n,o.default,!0):la(o.from||n):la(o),Jn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(l,o,null),r)for(const s in r){const e=r[s];m(e)&&(o[s]=e.bind(n))}if(i){const t=i.call(n,n);I(t)&&(e.data=wn(t))}if(Ws=!0,a)for(const h in a){const e=a[h],t=m(e)?e.bind(n,n):m(e.get)?e.get.bind(n,n):s,i=!m(e)&&m(e.set)?e.set.bind(n):s,r=Hr({get:t,set:i});Object.defineProperty(o,h,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e})}if(c)for(const s in c)Xs(c[s],o,n,s);if(u){const e=m(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{ua(t,e[t])}))}function w(e,t){h(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&zs(d,e,"c"),w(ps,p),w(hs,f),w(fs,g),w(gs,_),w(ts,v),w(os,y),w(Ms,L),w(Is,D),w(ys,k),w(_s,C),w(ms,S),w(vs,b),h(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===s&&(e.render=E),null!=R&&(e.inheritAttrs=R),O&&(e.components=O),N&&(e.directives=N);const G=e.appContext.config.globalProperties.$applyOptions;G&&G(t,e,n)}function zs(e,t,n){Mo(h(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Xs(e,t,n,o){const i=o.includes(".")?bi(n,o):()=>n[o];if(v(e)){const n=t[e];m(n)&&Di(i,n)}else if(m(e))Di(i,e.bind(n));else if(I(e))if(h(e))e.forEach((e=>Xs(e,t,n,o)));else{const o=m(e.handler)?e.handler.bind(n):t[e.handler];m(o)&&Di(i,o,e)}}function Js(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,r=s.get(t);let c;return r?c=r:i.length||n||o?(c={},i.length&&i.forEach((e=>Zs(c,e,a,!0))),Zs(c,t,a)):c=t,I(t)&&s.set(t,c),c}function Zs(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&Zs(e,s,n,!0),i&&i.forEach((t=>Zs(e,t,n,!0)));for(const a in t)if(o&&"expose"===a);else{const o=Qs[a]||n&&n[a];e[a]=o?o(e[a],t[a]):t[a]}return e}const Qs={data:ea,props:ia,emits:ia,methods:oa,computed:oa,beforeCreate:na,created:na,beforeMount:na,mounted:na,beforeUpdate:na,updated:na,beforeDestroy:na,beforeUnmount:na,destroyed:na,unmounted:na,activated:na,deactivated:na,errorCaptured:na,serverPrefetch:na,components:oa,directives:oa,watch:function(e,t){if(!e)return t;if(!t)return e;const n=u(Object.create(null),e);for(const o in t)n[o]=na(e[o],t[o]);return n},provide:ea,inject:function(e,t){return oa(ta(e),ta(t))}};function ea(e,t){return t?e?function(){return u(m(e)?e.call(this,this):e,m(t)?t.call(this,this):t)}:t:e}function ta(e){if(h(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function na(e,t){return e?[...new Set([].concat(e,t))]:t}function oa(e,t){return e?u(Object.create(null),e,t):t}function ia(e,t){return e?h(e)&&h(t)?[...new Set([...e,...t])]:u(Object.create(null),Bs(e),Bs(null!=t?t:{})):t}function sa(){return{app:null,config:{isNativeTag:a,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 aa=0;function ra(e,t){return function(n,o=null){m(n)||(n=u({},n)),null==o||I(o)||(o=null);const i=sa(),s=new WeakSet;let a=!1;const r=i.app={_uid:aa++,_component:n,_props:o,_container:null,_context:i,_instance:null,version:zr,get config(){return i.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&m(e.install)?(s.add(e),e.install(r,...t)):m(e)&&(s.add(e),e(r,...t))),r),mixin:e=>(i.mixins.includes(e)||i.mixins.push(e),r),component:(e,t)=>t?(i.components[e]=t,r):i.components[e],directive:(e,t)=>t?(i.directives[e]=t,r):i.directives[e],mount(s,c,u){if(!a){const l=dr(n,o);return l.appContext=i,!0===u?u="svg":!1===u&&(u=void 0),c&&t?t(l,s):e(l,s,u),a=!0,r._container=s,s.__vue_app__=r,r._instance=l.component,Vr(l.component)||l.component.proxy}},unmount(){a&&(e(null,r._container),delete r._container.__vue_app__)},provide:(e,t)=>(i.provides[e]=t,r),runWithContext(e){const t=ca;ca=r;try{return e()}finally{ca=t}}};return r}}let ca=null;function ua(e,t){if(Er){let n=Er.provides;const o=Er.parent&&Er.parent.provides;o===n&&(n=Er.provides=Object.create(o)),n[e]=t,"app"===Er.type.mpType&&Er.appContext.app.provide(e,t)}else;}function la(e,t,n=!1){const o=Er||Wo;if(o||ca){const i=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:ca._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&m(t)?t.call(o&&o.proxy):t}}function da(){return!!(Er||Wo||ca)}function pa(e,t,n,i){const[s,a]=e.propsOptions;let r,c=!1;if(t)for(let o in t){if(D(o))continue;const u=t[o];let l;s&&p(s,l=b(o))?a&&a.includes(l)?(r||(r={}))[l]=u:n[l]=u:$o(e.emitsOptions,o)||o in i&&u===i[o]||(i[o]=u,c=!0)}if(a){const t=Kn(n),i=r||o;for(let o=0;o<a.length;o++){const r=a[o];n[r]=ha(s,t,r,i[r],e,!p(i,r))}}return c}function ha(e,t,n,o,i,s){const a=e[n];if(null!=a){const e=p(a,"default");if(e&&void 0===o){const e=a.default;if(a.type!==Function&&!a.skipFactory&&m(e)){const{propsDefaults:s}=i;if(n in s)o=s[n];else{const a=br(i);o=s[n]=e.call(null,t),a()}}else o=e}a[0]&&(s&&!e?o=!1:!a[1]||""!==o&&o!==R(n)||(o=!0))}return o}function fa(e,t,n=!1){const s=t.propsCache,a=s.get(e);if(a)return a;const r=e.props,c={},l=[];let d=!1;if(!m(e)){const o=e=>{d=!0;const[n,o]=fa(e,t,!0);u(c,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!r&&!d)return I(e)&&s.set(e,i),i;if(h(r))for(let i=0;i<r.length;i++){const e=b(r[i]);ga(e)&&(c[e]=o)}else if(r)for(const o in r){const e=b(o);if(ga(e)){const t=r[o],n=c[e]=h(t)||m(t)?{type:t}:u({},t);if(n){const t=va(Boolean,n.type),o=va(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||p(n,"default"))&&l.push(e)}}}const f=[c,l];return I(e)&&s.set(e,f),f}function ga(e){return"$"!==e[0]&&!D(e)}function _a(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 ma(e,t){return _a(e)===_a(t)}function va(e,t){return h(t)?t.findIndex((t=>ma(t,e))):m(t)&&ma(t,e)?0:-1}const ya=e=>"_"===e[0]||"$stable"===e,Ia=e=>h(e)?e.map(mr):[mr(e)],Ma=(e,t,n)=>{if(t._n)return t;const o=Qo(((...e)=>Ia(t(...e))),n);return o._c=!1,o},Ca=(e,t,n)=>{const o=e._ctx;for(const i in e){if(ya(i))continue;const n=e[i];if(m(n))t[i]=Ma(0,n,o);else if(null!=n){const e=Ia(n);t[i]=()=>e}}},Ta=(e,t)=>{const n=Ia(t);e.slots.default=()=>n};function Sa(e,t,n,i,s=!1){if(h(e))return void e.forEach(((e,o)=>Sa(e,t&&(h(t)?t[o]:t),n,i,s)));if($i(i)&&!s)return;const a=4&i.shapeFlag?Vr(i.component)||i.component.proxy:i.el,r=s?null:a,{i:c,r:u}=e,d=t&&t.r,f=c.refs===o?c.refs={}:c.refs,g=c.setupState;if(null!=d&&d!==u&&(v(d)?(f[d]=null,p(g,d)&&(g[d]=null)):Jn(d)&&(d.value=null)),m(u))Io(u,c,12,[r,f]);else{const t=v(u),o=Jn(u);if(t||o){const i=()=>{if(e.f){const n=t?p(g,u)?g[u]:f[u]:u.value;s?h(n)&&l(n,a):h(n)?n.includes(a)||n.push(a):t?(f[u]=[a],p(g,u)&&(g[u]=f[u])):(u.value=[a],e.k&&(f[e.k]=u.value))}else t?(f[u]=r,p(g,u)&&(g[u]=r)):o&&(u.value=r,e.k&&(f[e.k]=r))};r?(i.id=-1,ba(i,n)):i()}}}let Ea=!1;const Da=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,ka=e=>8===e.nodeType;function La(e){const{mt:t,p:n,o:{patchProp:o,createText:i,nextSibling:s,parentNode:a,remove:c,insert:u,createComment:l}}=e,d=(n,o,r,c,l,y=!1)=>{const I=ka(n)&&"["===n.data,M=()=>g(n,o,r,c,l,I),{type:C,ref:T,shapeFlag:S,patchFlag:E}=o;let D=n.nodeType;o.el=n,-2===E&&(y=!1,o.dynamicChildren=null);let k=null;switch(C){case $a:3!==D?""===o.children?(u(o.el=i(""),a(n),n),k=n):k=M():(n.data!==o.children&&(Ea=!0,n.data=o.children),k=s(n));break;case Wa:v(n)?(k=s(n),m(o.el=n.content.firstChild,n,r)):k=8!==D||I?M():s(n);break;case Ya:if(I&&(D=(n=s(n)).nodeType),1===D||3===D){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===k.nodeType?k.outerHTML:k.data),t===o.staticCount-1&&(o.anchor=k),k=s(k);return I?s(k):k}M();break;case ja:k=I?f(n,o,r,c,l,y):M();break;default:if(1&S)k=1===D&&o.type.toLowerCase()===n.tagName.toLowerCase()||v(n)?p(n,o,r,c,l,y):M();else if(6&S){o.slotScopeIds=l;const e=a(n);if(k=I?_(n):ka(n)&&"teleport start"===n.data?_(n,n.data,"teleport end"):s(n),t(o,e,null,r,c,Da(e),y),$i(o)){let t;I?(t=dr(ja),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?fr(""):dr("div"),t.el=n,o.component.subTree=t}}else 64&S?k=8!==D?M():o.type.hydrate(n,o,r,c,l,y,e,h):128&S&&(k=o.type.hydrate(n,o,r,c,Da(a(n)),l,y,e,d))}return null!=T&&Sa(T,null,c,o),k},p=(e,t,n,i,s,a)=>{a=a||!!t.dynamicChildren;const{type:u,props:l,patchFlag:d,shapeFlag:p,dirs:f,transition:g}=t,_="input"===u||"option"===u;if(_||-1!==d){f&&Oi(t,null,n,"created");let u,y=!1;if(v(e)){y=wa(i,g)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;y&&g.beforeEnter(o),m(o,e,n),t.el=e=o}if(16&p&&(!l||!l.innerHTML&&!l.textContent)){let o=h(e.firstChild,t,e,n,i,s,a);for(;o;){Ea=!0;const e=o;o=o.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(Ea=!0,e.textContent=t.children);if(l)if(_||!a||48&d)for(const t in l)(_&&(t.endsWith("value")||"indeterminate"===t)||r(t)&&!D(t)||"."===t[0])&&o(e,t,null,l[t],void 0,void 0,n);else l.onClick&&o(e,"onClick",null,l.onClick,void 0,void 0,n);(u=l&&l.onVnodeBeforeMount)&&Mr(u,n,t),f&&Oi(t,null,n,"beforeMount"),((u=l&&l.onVnodeMounted)||f||y)&&vi((()=>{u&&Mr(u,n,t),y&&g.enter(e),f&&Oi(t,null,n,"mounted")}),i)}return e.nextSibling},h=(e,t,o,i,s,a,r)=>{r=r||!!t.dynamicChildren;const c=t.children,u=c.length;for(let l=0;l<u;l++){const t=r?c[l]:c[l]=mr(c[l]);if(e)e=d(e,t,i,s,a,r);else{if(t.type===$a&&!t.children)continue;Ea=!0,n(null,t,o,null,i,s,Da(o),a)}}return e},f=(e,t,n,o,i,r)=>{const{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);const d=a(e),p=h(s(e),t,d,n,o,i,r);return p&&ka(p)&&"]"===p.data?s(t.anchor=p):(Ea=!0,u(t.anchor=l("]"),d,p),p)},g=(e,t,o,i,r,u)=>{if(Ea=!0,t.el=null,u){const t=_(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const l=s(e),d=a(e);return c(e),n(null,t,d,l,o,i,Da(d),r),l},_=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&ka(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},m=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},v=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),Uo(),void(t._vnode=e);Ea=!1,d(t.firstChild,e,null,null,null),Uo(),t._vnode=e,Ea&&console.error("Hydration completed but contains mismatches.")},d]}const ba=vi;function Aa(e){return Oa(e)}function Ra(e){return Oa(e,La)}function Oa(e,t){q().__VUE__=!0;const{insert:n,remove:a,patchProp:r,forcePatchProp:c,createElement:l,createText:d,createComment:h,setText:f,setElementText:g,parentNode:_,nextSibling:m,setScopeId:v=s,insertStaticContent:y}=e,I=(e,t,n,o=null,i=null,s=null,a=void 0,r=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!sr(e,t)&&(o=J(e),$(e,i,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:u,ref:l,shapeFlag:d}=t;switch(u){case $a:M(e,t,n,o);break;case Wa:C(e,t,n,o);break;case Ya:null==e&&T(t,n,o,a);break;case ja:P(e,t,n,o,i,s,a,r,c);break;default:1&d?S(e,t,n,o,i,s,a,r,c):6&d?G(e,t,n,o,i,s,a,r,c):(64&d||128&d)&&u.process(e,t,n,o,i,s,a,r,c,ee)}null!=l&&i&&Sa(l,e&&e.ref,s,t||e,!t)},M=(e,t,o,i)=>{if(null==e)n(t.el=d(t.children),o,i);else{const n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},C=(e,t,o,i)=>{null==e?n(t.el=h(t.children||""),o,i):t.el=e.el},T=(e,t,n,o)=>{[e.el,e.anchor]=y(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o,i,s,a,r,c)=>{"svg"===t.type?a="svg":"math"===t.type&&(a="mathml"),null==e?E(t,n,o,i,s,a,r,c):A(e,t,i,s,a,r,c)},E=(e,t,o,i,s,a,c,u)=>{let d,p;const{props:h,shapeFlag:f,transition:_,dirs:m}=e;if(d=e.el=l(e.type,a,h&&h.is,h),8&f?g(d,e.children):16&f&&L(e.children,d,null,i,s,Na(e,a),c,u),m&&Oi(e,null,i,"created"),k(d,e,e.scopeId,c,i),h){for(const t in h)"value"===t||D(t)||r(d,t,null,h[t],a,e.children,i,s,X);"value"in h&&r(d,"value",null,h.value,a),(p=h.onVnodeBeforeMount)&&Mr(p,i,e)}Object.defineProperty(d,"__vueParentComponent",{value:i,enumerable:!1}),m&&Oi(e,null,i,"beforeMount");const v=wa(s,_);v&&_.beforeEnter(d),n(d,t,o),((p=h&&h.onVnodeMounted)||v||m)&&ba((()=>{p&&Mr(p,i,e),v&&_.enter(d),m&&Oi(e,null,i,"mounted")}),s)},k=(e,t,n,o,i)=>{if(n&&v(e,n),o)for(let s=0;s<o.length;s++)v(e,o[s]);if(i){if(t===i.subTree){const t=i.vnode;k(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},L=(e,t,n,o,i,s,a,r,c=0)=>{for(let u=c;u<e.length;u++){const c=e[u]=r?vr(e[u]):mr(e[u]);I(null,c,t,n,o,i,s,a,r)}},A=(e,t,n,i,s,a,u)=>{const l=t.el=e.el;let{patchFlag:d,dynamicChildren:p,dirs:h}=t;d|=16&e.patchFlag;const f=e.props||o,_=t.props||o;let m;if(n&&Pa(n,!1),(m=_.onVnodeBeforeUpdate)&&Mr(m,n,t,e),h&&Oi(t,e,n,"beforeUpdate"),n&&Pa(n,!0),p?O(e.dynamicChildren,p,l,n,i,Na(t,s),a):u||B(e,t,l,null,n,i,Na(t,s),a,!1),d>0){if(16&d)N(l,t,f,_,n,i,s);else if(2&d&&f.class!==_.class&&r(l,"class",null,_.class,s),4&d&&r(l,"style",f.style,_.style,s),8&d){const o=t.dynamicProps;for(let t=0;t<o.length;t++){const a=o[t],u=f[a],d=_[a];(d!==u||"value"===a||c&&c(l,a))&&r(l,a,u,d,s,e.children,n,i,X)}}1&d&&e.children!==t.children&&g(l,t.children)}else u||null!=p||N(l,t,f,_,n,i,s);((m=_.onVnodeUpdated)||h)&&ba((()=>{m&&Mr(m,n,t,e),h&&Oi(t,e,n,"updated")}),i)},O=(e,t,n,o,i,s,a)=>{for(let r=0;r<t.length;r++){const c=e[r],u=t[r],l=c.el&&(c.type===ja||!sr(c,u)||70&c.shapeFlag)?_(c.el):n;I(c,u,l,null,o,i,s,a,!0)}},N=(e,t,n,i,s,a,u)=>{if(n!==i){if(n!==o)for(const o in n)D(o)||o in i||r(e,o,n[o],null,u,t.children,s,a,X);for(const o in i){if(D(o))continue;const l=i[o],d=n[o];(l!==d&&"value"!==o||c&&c(e,o))&&r(e,o,d,l,u,t.children,s,a,X)}"value"in i&&r(e,"value",n.value,i.value,u)}},P=(e,t,o,i,s,a,r,c,u)=>{const l=t.el=e?e.el:d(""),p=t.anchor=e?e.anchor:d("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:g}=t;g&&(c=c?c.concat(g):g),null==e?(n(l,o,i),n(p,o,i),L(t.children||[],o,p,s,a,r,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(O(e.dynamicChildren,f,o,s,a,r,c),(null!=t.key||s&&t===s.subTree)&&Ga(e,t,!0)):B(e,t,o,p,s,a,r,c,u)},G=(e,t,n,o,i,s,a,r,c)=>{t.slotScopeIds=r,null==e?512&t.shapeFlag?i.ctx.activate(t,n,o,a,c):U(t,n,o,i,s,a,c):x(e,t,c)},U=(e,t,n,o,i,s,a)=>{const r=e.component=Sr(e,o,i);if(zi(e)&&(r.ctx.renderer=ee),wr(r),r.asyncDep){if(i&&i.registerDep(r,F),!e.el){const e=r.subTree=dr(Wa);C(null,e,t,n)}}else F(r,e,t,n,i,s,a)},x=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:i,component:s}=e,{props:a,children:r,patchFlag:c}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!i&&!r||r&&r.$stable)||o!==a&&(o?!a||oi(o,a,u):!!a);if(1024&c)return!0;if(16&c)return o?oi(o,a,u):!!a;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(a[n]!==o[n]&&!$o(u,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void V(o,t,n);o.next=t,function(e){const t=Eo.indexOf(e);t>Do&&Eo.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},F=(e,t,n,o,i,a,r)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:s,vnode:u}=e;{const n=Ua(e);if(n)return t&&(t.el=u.el,V(e,t,r)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let l,d=t;Pa(e,!1),t?(t.el=u.el,V(e,t,r)):t=u,n&&w(n),(l=t.props&&t.props.onVnodeBeforeUpdate)&&Mr(l,s,t,u),Pa(e,!0);const p=ei(e),h=e.subTree;e.subTree=p,I(h,p,_(h.el),J(h),e,i,a),t.el=p.el,null===d&&ii(e,p.el),o&&ba(o,i),(l=t.props&&t.props.onVnodeUpdated)&&ba((()=>Mr(l,s,t,u)),i)}else{let s;const{el:r,props:c}=t,{bm:u,m:l,parent:d}=e,p=$i(t);if(Pa(e,!1),u&&w(u),!p&&(s=c&&c.onVnodeBeforeMount)&&Mr(s,d,t),Pa(e,!0),r&&ne){const n=()=>{e.subTree=ei(e),ne(r,e.subTree,e,i,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=ei(e);I(null,s,n,o,e,i,a),t.el=s.el}if(l&&ba(l,i),!p&&(s=c&&c.onVnodeMounted)){const e=t;ba((()=>Mr(s,d,e)),i)}(256&t.shapeFlag||d&&$i(d.vnode)&&256&d.vnode.shapeFlag)&&(e.ba&&us(e.ba),e.a&&ba(e.a,i)),e.isMounted=!0,t=n=o=null}},u=e.effect=new kt(c,s,(()=>No(l)),e.scope),l=e.update=()=>{u.dirty&&u.run()};l.id=e.uid,Pa(e,!0),l()},V=(e,t,n)=>{t.component=e;const i=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:a}}=e,r=Kn(i),[c]=e.propsOptions;let u=!1;if(!(o||a>0)||16&a){let o;pa(e,t,i,s)&&(u=!0);for(const s in r)t&&(p(t,s)||(o=R(s))!==s&&p(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(i[s]=ha(c,r,s,void 0,e,!0)):delete i[s]);if(s!==r)for(const e in s)t&&p(t,e)||(delete s[e],u=!0)}else if(8&a){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let a=n[o];if($o(e.emitsOptions,a))continue;const l=t[a];if(c)if(p(s,a))l!==s[a]&&(s[a]=l,u=!0);else{const t=b(a);i[t]=ha(c,r,t,l,e,!1)}else l!==s[a]&&(s[a]=l,u=!0)}}u&&Yt(e,"set","$attrs")}(e,t.props,i,n),((e,t,n)=>{const{vnode:i,slots:s}=e;let a=!0,r=o;if(32&i.shapeFlag){const e=t._;e?n&&1===e?a=!1:(u(s,t),n||1!==e||delete s._):(a=!t.$stable,Ca(t,s)),r=t}else t&&(Ta(e,t),r={default:1});if(a)for(const o in s)ya(o)||null!=r[o]||delete s[o]})(e,t.children,n),Gt(),Go(e),Ut()},B=(e,t,n,o,i,s,a,r,c=!1)=>{const u=e&&e.children,l=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void K(u,d,n,o,i,s,a,r,c);if(256&p)return void H(u,d,n,o,i,s,a,r,c)}8&h?(16&l&&X(u,i,s),d!==u&&g(n,d)):16&l?16&h?K(u,d,n,o,i,s,a,r,c):X(u,i,s,!0):(8&l&&g(n,""),16&h&&L(d,n,o,i,s,a,r,c))},H=(e,t,n,o,s,a,r,c,u)=>{t=t||i;const l=(e=e||i).length,d=t.length,p=Math.min(l,d);let h;for(h=0;h<p;h++){const o=t[h]=u?vr(t[h]):mr(t[h]);I(e[h],o,n,null,s,a,r,c,u)}l>d?X(e,s,a,!0,!1,p):L(t,n,o,s,a,r,c,u,p)},K=(e,t,n,o,s,a,r,c,u)=>{let l=0;const d=t.length;let p=e.length-1,h=d-1;for(;l<=p&&l<=h;){const o=e[l],i=t[l]=u?vr(t[l]):mr(t[l]);if(!sr(o,i))break;I(o,i,n,null,s,a,r,c,u),l++}for(;l<=p&&l<=h;){const o=e[p],i=t[h]=u?vr(t[h]):mr(t[h]);if(!sr(o,i))break;I(o,i,n,null,s,a,r,c,u),p--,h--}if(l>p){if(l<=h){const e=h+1,i=e<d?t[e].el:o;for(;l<=h;)I(null,t[l]=u?vr(t[l]):mr(t[l]),n,i,s,a,r,c,u),l++}}else if(l>h)for(;l<=p;)$(e[l],s,a,!0),l++;else{const f=l,g=l,_=new Map;for(l=g;l<=h;l++){const e=t[l]=u?vr(t[l]):mr(t[l]);null!=e.key&&_.set(e.key,l)}let m,v=0;const y=h-g+1;let M=!1,C=0;const T=new Array(y);for(l=0;l<y;l++)T[l]=0;for(l=f;l<=p;l++){const o=e[l];if(v>=y){$(o,s,a,!0);continue}let i;if(null!=o.key)i=_.get(o.key);else for(m=g;m<=h;m++)if(0===T[m-g]&&sr(o,t[m])){i=m;break}void 0===i?$(o,s,a,!0):(T[i-g]=l+1,i>=C?C=i:M=!0,I(o,t[i],n,null,s,a,r,c,u),v++)}const S=M?function(e){const t=e.slice(),n=[0];let o,i,s,a,r;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(i=n[n.length-1],e[i]<c){t[o]=i,n.push(o);continue}for(s=0,a=n.length-1;s<a;)r=s+a>>1,e[n[r]]<c?s=r+1:a=r;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,a=n[s-1];for(;s-- >0;)n[s]=a,a=t[a];return n}(T):i;for(m=S.length-1,l=y-1;l>=0;l--){const e=g+l,i=t[e],p=e+1<d?t[e+1].el:o;0===T[l]?I(null,i,n,p,s,a,r,c,u):M&&(m<0||l!==S[m]?j(i,n,p,2):m--)}}},j=(e,t,o,i,s=null)=>{const{el:a,type:r,transition:c,children:u,shapeFlag:l}=e;if(6&l)return void j(e.component.subTree,t,o,i);if(128&l)return void e.suspense.move(t,o,i);if(64&l)return void r.move(e,t,o,ee);if(r===ja){n(a,t,o);for(let e=0;e<u.length;e++)j(u[e],t,o,i);return void n(e.anchor,t,o)}if(r===Ya)return void(({el:e,anchor:t},o,i)=>{let s;for(;e&&e!==t;)s=m(e),n(e,o,i),e=s;n(t,o,i)})(e,t,o);if(2!==i&&1&l&&c)if(0===i)c.beforeEnter(a),n(a,t,o),ba((()=>c.enter(a)),s);else{const{leave:e,delayLeave:i,afterLeave:s}=c,r=()=>n(a,t,o),u=()=>{e(a,(()=>{r(),s&&s()}))};i?i(a,r,u):u()}else n(a,t,o)},$=(e,t,n,o=!1,i=!1)=>{const{type:s,props:a,ref:r,children:c,dynamicChildren:u,shapeFlag:l,patchFlag:d,dirs:p}=e;if(null!=r&&Sa(r,null,n,e,!0),256&l)return void t.ctx.deactivate(e);const h=1&l&&p,f=!$i(e);let g;if(f&&(g=a&&a.onVnodeBeforeUnmount)&&Mr(g,t,e),6&l)z(e.component,n,o);else{if(128&l)return void e.suspense.unmount(n,o);h&&Oi(e,null,t,"beforeUnmount"),64&l?e.type.remove(e,t,n,i,ee,o):u&&(s!==ja||d>0&&64&d)?X(u,t,n,!1,!0):(s===ja&&384&d||!i&&16&l)&&X(c,t,n),o&&W(e)}(f&&(g=a&&a.onVnodeUnmounted)||h)&&ba((()=>{g&&Mr(g,t,e),h&&Oi(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===ja)return void Y(n,o);if(t===Ya)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),a(e),e=n;a(t)})(e);const s=()=>{a(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:o}=i,a=()=>t(n,s);o?o(e.el,s,a):a()}else s()},Y=(e,t)=>{let n;for(;e!==t;)n=m(e),a(e),e=n;a(t)},z=(e,t,n)=>{const{bum:o,scope:i,update:s,subTree:a,um:r}=e;o&&w(o),i.stop(),s&&(s.active=!1,$(a,e,t,n)),r&&ba(r,t),ba((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,o=!1,i=!1,s=0)=>{for(let a=s;a<e.length;a++)$(e[a],t,n,o,i)},J=e=>6&e.shapeFlag?J(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Q=(e,t,n)=>{null==e?t._vnode&&$(t._vnode,null,null,!0):I(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,Go(),Uo(),Z=!1),t._vnode=e},ee={p:I,um:$,m:j,r:W,mt:U,mc:L,pc:B,pbc:O,n:J,o:e};let te,ne;return t&&([te,ne]=t(ee)),{render:Q,hydrate:te,createApp:ra(Q,te)}}function Na({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Pa({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function wa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ga(e,t,n=!1){const o=e.children,i=t.children;if(h(o)&&h(i))for(let s=0;s<o.length;s++){const e=o[s];let t=i[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=i[s]=vr(i[s]),t.el=e.el),n||Ga(e,t)),t.type===$a&&(t.el=e.el)}}function Ua(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ua(t)}const xa=e=>e&&(e.disabled||""===e.disabled),Fa=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,qa=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Va=(e,t)=>{const n=e&&e.to;if(v(n)){if(t){return t(n)}return null}return n};function Ba(e,t,n,{o:{insert:o},m:i},s=2){0===s&&o(e.targetAnchor,t,n);const{el:a,anchor:r,shapeFlag:c,children:u,props:l}=e,d=2===s;if(d&&o(a,t,n),(!d||xa(l))&&16&c)for(let p=0;p<u.length;p++)i(u[p],t,n,2);d&&o(r,t,n)}const Ha={name:"Teleport",__isTeleport:!0,process(e,t,n,o,i,s,a,r,c,u){const{mc:l,pc:d,pbc:p,o:{insert:h,querySelector:f,createText:g,createComment:_}}=u,m=xa(t.props);let{shapeFlag:v,children:y,dynamicChildren:I}=t;if(null==e){const e=t.el=g(""),u=t.anchor=g("");h(e,n,o),h(u,n,o);const d=t.target=Va(t.props,f),p=t.targetAnchor=g("");d&&(h(p,d),"svg"===a||Fa(d)?a="svg":("mathml"===a||qa(d))&&(a="mathml"));const _=(e,t)=>{16&v&&l(y,e,t,i,s,a,r,c)};m?_(n,u):d&&_(d,p)}else{t.el=e.el;const o=t.anchor=e.anchor,l=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=xa(e.props),_=g?n:l,v=g?o:h;if("svg"===a||Fa(l)?a="svg":("mathml"===a||qa(l))&&(a="mathml"),I?(p(e.dynamicChildren,I,_,i,s,a,r),Ga(e,t,!0)):c||d(e,t,_,v,i,s,a,r,!1),m)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ba(t,n,o,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Va(t.props,f);e&&Ba(t,e,null,u,0)}else g&&Ba(t,l,h,u,1)}Ka(t)},remove(e,t,n,o,{um:i,o:{remove:s}},a){const{shapeFlag:r,children:c,anchor:u,targetAnchor:l,target:d,props:p}=e;if(d&&s(l),a&&s(u),16&r){const e=a||!xa(p);for(let o=0;o<c.length;o++){const s=c[o];i(s,t,n,e,!!s.dynamicChildren)}}},move:Ba,hydrate:function(e,t,n,o,i,s,{o:{nextSibling:a,parentNode:r,querySelector:c}},u){const l=t.target=Va(t.props,c);if(l){const c=l._lpa||l.firstChild;if(16&t.shapeFlag)if(xa(t.props))t.anchor=u(a(e),t,r(e),n,o,i,s),t.targetAnchor=c;else{t.anchor=a(e);let r=c;for(;r;)if(r=a(r),r&&8===r.nodeType&&"teleport anchor"===r.data){t.targetAnchor=r,l._lpa=t.targetAnchor&&a(t.targetAnchor);break}u(c,t,l,n,o,i,s)}Ka(t)}return t.anchor&&a(t.anchor)}};function Ka(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const ja=Symbol.for("v-fgt"),$a=Symbol.for("v-txt"),Wa=Symbol.for("v-cmt"),Ya=Symbol.for("v-stc"),za=[];let Xa=null;function Ja(e=!1){za.push(Xa=e?null:[])}function Za(){za.pop(),Xa=za[za.length-1]||null}let Qa=1;function er(e){Qa+=e}function tr(e){return e.dynamicChildren=Qa>0?Xa||i:null,Za(),Qa>0&&Xa&&Xa.push(e),e}function nr(e,t,n,o,i,s){return tr(lr(e,t,n,o,i,s,!0))}function or(e,t,n,o,i){return tr(dr(e,t,n,o,i,!0))}function ir(e){return!!e&&!0===e.__v_isVNode}function sr(e,t){return e.type===t.type&&e.key===t.key}function ar(e){}const rr="__vInternal",cr=({key:e})=>null!=e?e:null,ur=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||Jn(e)||m(e)?{i:Wo,r:e,k:t,f:!!n}:e:null);function lr(e,t=null,n=null,o=0,i=null,s=(e===ja?0:1),a=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&cr(t),ref:t&&ur(t),scopeId:Yo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Wo};return r?(yr(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),Qa>0&&!a&&Xa&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Xa.push(c),c}const dr=function(e,t=null,n=null,o=0,i=null,s=!1){e&&e!==ri||(e=Wa);if(ir(e)){const o=hr(e,t,!0);return n&&yr(o,n),Qa>0&&!s&&Xa&&(6&o.shapeFlag?Xa[Xa.indexOf(e)]=o:Xa.push(o)),o.patchFlag|=-2,o}a=e,m(a)&&"__vccOpts"in a&&(e=e.__vccOpts);var a;if(t){t=pr(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=Be(e)),I(n)&&(Hn(n)&&!h(n)&&(n=u({},n)),t.style=Ve(n))}const r=v(e)?1:pi(e)?128:(e=>e.__isTeleport)(e)?64:I(e)?4:m(e)?2:0;return lr(e,t,n,o,i,r,s,!0)};function pr(e){return e?Hn(e)||rr in e?u({},e):e:null}function hr(e,t,n=!1){const{props:o,ref:i,patchFlag:s,children:a}=e,r=t?Ir(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:r,key:r&&cr(r),ref:t&&t.ref?n&&i?h(i)?i.concat(ur(t)):[i,ur(t)]:ur(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ja?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&hr(e.ssContent),ssFallback:e.ssFallback&&hr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function fr(e=" ",t=0){return dr($a,null,e,t)}function gr(e,t){const n=dr(Ya,null,e);return n.staticCount=t,n}function _r(e="",t=!1){return t?(Ja(),or(Wa,null,e)):dr(Wa,null,e)}function mr(e){return null==e||"boolean"==typeof e?dr(Wa):h(e)?dr(ja,null,e.slice()):"object"==typeof e?vr(e):dr($a,null,String(e))}function vr(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:hr(e)}function yr(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(h(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),yr(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||rr in t?3===o&&Wo&&(1===Wo.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Wo}}else m(t)?(t={default:t,_ctx:Wo},n=32):(t=String(t),64&o?(n=16,t=[fr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ir(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=Be([t.class,o.class]));else if("style"===e)t.style=Ve([t.style,o.style]);else if(r(e)){const n=t[e],i=o[e];!i||n===i||h(n)&&n.includes(i)||(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=o[e])}return t}function Mr(e,t,n,o=null){Mo(e,t,7,[n,o])}const Cr=sa();let Tr=0;function Sr(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||Cr,a={uid:Tr++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new Ct(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:fa(i,s),emitsOptions:jo(i,s),emit:null,emitted:null,propsDefaults:o,inheritAttrs:i.inheritAttrs,ctx:o,data:o,props:o,attrs:o,slots:o,refs:o,setupState:o,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.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,bda:null,da:null,ba:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Ho.bind(null,a),a.$pageInstance=t&&t.$pageInstance,e.ce&&e.ce(a),a}let Er=null;const Dr=()=>Er||Wo;let kr,Lr;{const e=q(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};kr=t("__VUE_INSTANCE_SETTERS__",(e=>Er=e)),Lr=t("__VUE_SSR_SETTERS__",(e=>Pr=e))}const br=e=>{const t=Er;return kr(e),e.scope.on(),()=>{e.scope.off(),kr(t)}},Ar=()=>{Er&&Er.scope.off(),kr(null)};function Rr(e){return 4&e.vnode.shapeFlag}let Or,Nr,Pr=!1;function wr(e,t=!1){t&&Lr(t);const{props:n,children:o}=e.vnode,i=Rr(e);!function(e,t,n,o=!1){const i={},s={};G(s,rr,1),e.propsDefaults=Object.create(null),pa(e,t,i,s);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=o?i:Gn(i):e.type.props?e.props=i:e.props=s,e.attrs=s}(e,n,i,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Kn(t),G(t,"_",n)):Ca(t,e.slots={})}else e.slots={},t&&Ta(e,t);G(e.slots,rr,1)})(e,o);const s=i?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=jn(new Proxy(e.ctx,As));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?qr(e):null,i=br(e);Gt();const s=Io(o,e,0,[e.props,n]);if(Ut(),i(),M(s)){if(s.then(Ar,Ar),t)return s.then((n=>{Gr(e,n,t)})).catch((t=>{Co(t,e,0)}));e.asyncDep=s}else Gr(e,s,t)}else Fr(e,t)}(e,t):void 0;return t&&Lr(!1),s}function Gr(e,t,n){m(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:I(t)&&(e.setupState=ao(t)),Fr(e,n)}function Ur(e){Or=e,Nr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Rs))}}const xr=()=>!Or;function Fr(e,t,n){const o=e.type;if(!e.render){if(!t&&Or&&!o.render){const t=o.template||Js(e).template;if(t){const{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:s,compilerOptions:a}=o,r=u(u({isCustomElement:n,delimiters:s},i),a);o.render=Or(t,r)}}e.render=o.render||s,Nr&&Nr(e)}{const t=br(e);Gt();try{Ys(e)}finally{Ut(),t()}}}function qr(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)=>(Wt(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function Vr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ao(jn(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Ls?Ls[n](e):void 0,has:(e,t)=>t in e||t in Ls}))}function Br(e,t=!0){return m(e)?e.displayName||e.name:e.name||t&&e.__name}const Hr=(e,t)=>{const n=function(e,t,n=!1){let o,i;const a=m(e);return a?(o=e,i=s):(o=e.get,i=e.set),new Yn(o,i,a||!i,n)}(e,0,Pr);return n};function Kr(e,t,n=o){const i=Dr(),s=b(t),a=R(t),r=co(((o,r)=>{let c;return Si((()=>{const n=e[t];P(c,n)&&(c=n,r())})),{get:()=>(o(),n.get?n.get(c):c),set(e){const o=i.vnode.props;o&&(t in o||s in o||a in o)&&(`onUpdate:${t}`in o||`onUpdate:${s}`in o||`onUpdate:${a}`in o)||!P(e,c)||(c=e,r()),i.emit(`update:${t}`,n.set?n.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return r[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:r,done:!1}:{done:!0}}},r}function jr(e,t,n){const o=arguments.length;return 2===o?I(t)&&!h(t)?ir(t)?dr(e,null,[t]):dr(e,t):dr(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&ir(n)&&(n=[n]),dr(e,t,n))}function $r(){}function Wr(e,t,n,o){const i=n[o];if(i&&Yr(i,e))return i;const s=t();return s.memo=e.slice(),n[o]=s}function Yr(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(P(n[o],t[o]))return!1;return Qa>0&&Xa&&Xa.push(e),!0}const zr="3.4.21",Xr=s,Jr=yo,Zr=Vo,Qr=function e(t,n){var o,i;if(Vo=t,Vo)Vo.enabled=!0,Bo.forEach((({event:e,args:t})=>Vo.emit(e,...t))),Bo=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null==(i=null==(o=window.navigator)?void 0:o.userAgent)?void 0:i.includes("jsdom"))){(n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((t=>{e(t,n)})),setTimeout((()=>{Vo||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Bo=[])}),3e3)}else Bo=[]},ec={createComponentInstance:Sr,setupComponent:wr,renderComponentRoot:ei,setCurrentRenderingInstance:zo,isVNode:ir,normalizeVNode:mr},tc=null,nc=null,oc=null,ic="undefined"!=typeof document?document:null,sc=ic&&ic.createElement("template"),ac={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i="svg"===t?ic.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ic.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?ic.createElement(e,{is:n}):ic.createElement(e);return"select"===e&&o&&null!=o.multiple&&i.setAttribute("multiple",o.multiple),i},createText:e=>ic.createTextNode(e),createComment:e=>ic.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ic.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const a=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==s&&(i=i.nextSibling););else{sc.innerHTML="svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e;const i=sc.content;if("svg"===o||"mathml"===o){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},rc="transition",cc="animation",uc=Symbol("_vtc"),lc=(e,{slots:t})=>jr(xi,gc(e),t);lc.displayName="Transition";const dc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},pc=lc.props=u({},Ui,dc),hc=(e,t=[])=>{h(e)?e.forEach((e=>e(...t))):e&&e(...t)},fc=e=>!!e&&(h(e)?e.some((e=>e.length>1)):e.length>1);function gc(e){const t={};for(const u in e)u in dc||(t[u]=e[u]);if(!1===e.css)return t;const{name:n="v",type:o,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:l=a,appearToClass:d=r,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,g=function(e){if(null==e)return null;if(I(e))return[_c(e.enter),_c(e.leave)];{const t=_c(e);return[t,t]}}(i),_=g&&g[0],m=g&&g[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:M,onLeave:C,onLeaveCancelled:T,onBeforeAppear:S=v,onAppear:E=y,onAppearCancelled:D=M}=t,k=(e,t,n)=>{vc(e,t?d:r),vc(e,t?l:a),n&&n()},L=(e,t)=>{e._isLeaving=!1,vc(e,p),vc(e,f),vc(e,h),t&&t()},b=e=>(t,n)=>{const i=e?E:y,a=()=>k(t,e,n);hc(i,[t,a]),yc((()=>{vc(t,e?c:s),mc(t,e?d:r),fc(i)||Mc(t,o,_,a)}))};return u(t,{onBeforeEnter(e){hc(v,[e]),mc(e,s),mc(e,a)},onBeforeAppear(e){hc(S,[e]),mc(e,c),mc(e,l)},onEnter:b(!1),onAppear:b(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>L(e,t);mc(e,p),Ec(),mc(e,h),yc((()=>{e._isLeaving&&(vc(e,p),mc(e,f),fc(C)||Mc(e,o,m,n))})),hc(C,[e,n])},onEnterCancelled(e){k(e,!1),hc(M,[e])},onAppearCancelled(e){k(e,!0),hc(D,[e])},onLeaveCancelled(e){L(e),hc(T,[e])}})}function _c(e){return x(e)}function mc(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[uc]||(e[uc]=new Set)).add(t)}function vc(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[uc];n&&(n.delete(t),n.size||(e[uc]=void 0))}function yc(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Ic=0;function Mc(e,t,n,o){const i=e._endId=++Ic,s=()=>{i===e._endId&&o()};if(n)return setTimeout(s,n);const{type:a,timeout:r,propCount:c}=Cc(e,t);if(!a)return o();const u=a+"end";let l=0;const d=()=>{e.removeEventListener(u,p),s()},p=t=>{t.target===e&&++l>=c&&d()};setTimeout((()=>{l<c&&d()}),r+1),e.addEventListener(u,p)}function Cc(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),i=o(`${rc}Delay`),s=o(`${rc}Duration`),a=Tc(i,s),r=o(`${cc}Delay`),c=o(`${cc}Duration`),u=Tc(r,c);let l=null,d=0,p=0;t===rc?a>0&&(l=rc,d=a,p=s.length):t===cc?u>0&&(l=cc,d=u,p=c.length):(d=Math.max(a,u),l=d>0?a>u?rc:cc:null,p=l?l===rc?s.length:c.length:0);return{type:l,timeout:d,propCount:p,hasTransform:l===rc&&/\b(transform|all)(,|$)/.test(o(`${rc}Property`).toString())}}function Tc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Sc(t)+Sc(e[n]))))}function Sc(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Ec(){return document.body.offsetHeight}const Dc=Symbol("_vod"),kc=Symbol("_vsh"),Lc={beforeMount(e,{value:t},{transition:n}){e[Dc]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):bc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),bc(e,!0),o.enter(e)):o.leave(e,(()=>{bc(e,!1)})):bc(e,t))},beforeUnmount(e,{value:t}){bc(e,t)}};function bc(e,t){e.style.display=t?e[Dc]:"none",e[kc]=!t}const Ac=Symbol("");function Rc(e){const t=Dr();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Nc(e,n)))},o=()=>{const o=e(t.proxy);Oc(t.subTree,o),n(o)};Ti(o),hs((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),ms((()=>e.disconnect()))}))}function Oc(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Oc(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Nc(e.el,t);else if(e.type===ja)e.children.forEach((e=>Oc(e,t)));else if(e.type===Ya){let{el:n,anchor:o}=e;for(;n&&(Nc(n,t),n!==o);)n=n.nextSibling}}function Nc(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t){const i=$c(t[e]);n.setProperty(`--${e}`,i),o+=`--${e}: ${i};`}n[Ac]=o}}const Pc=/(^|;)\s*display\s*:/;const wc=/\s*!important$/;function Gc(e,t,n){if(h(n))n.forEach((n=>Gc(e,t,n)));else if(null==n&&(n=""),n=$c(n),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=xc[t];if(n)return n;let o=b(t);if("filter"!==o&&o in e)return xc[t]=o;o=O(o);for(let i=0;i<Uc.length;i++){const n=Uc[i]+o;if(n in e)return xc[t]=n}return t}(e,t);wc.test(n)?e.setProperty(R(o),n.replace(wc,""),"important"):e[o]=n}}const Uc=["Webkit","Moz","ms"],xc={};const{unit:Fc,unitRatio:qc,unitPrecision:Vc}={unit:"rem",unitRatio:10/320,unitPrecision:5},Bc=(Hc=Fc,Kc=qc,jc=Vc,e=>e.replace(nt,((e,t)=>{if(!t)return e;if(1===Kc)return`${t}${Hc}`;const n=function(e,t){const n=Math.pow(10,t+1),o=Math.floor(e*n);return 10*Math.round(o/10)/n}(parseFloat(t)*Kc,jc);return 0===n?"0":`${n}${Hc}`})));var Hc,Kc,jc;const $c=e=>v(e)?Bc(e):e,Wc="http://www.w3.org/1999/xlink";function Yc(e,t,n,o){e.addEventListener(t,n,o)}const zc=Symbol("_vei");function Xc(e,t,n,o,i=null){const s=e[zc]||(e[zc]={}),a=s[t];if(o&&a)a.value=o;else{const[n,r]=function(e){let t;if(Jc.test(e)){let n;for(t={};n=e.match(Jc);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):R(e.slice(2));return[n,t]}(t);if(o){const a=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();const o=t&&t.proxy,i=o&&o.$nne,{value:s}=n;if(i&&h(s)){const n=tu(e,s);for(let o=0;o<n.length;o++){const s=n[o];Mo(s,t,5,s.__wwe?[e]:i(e))}}else Mo(tu(e,n.value),t,5,i&&!s.__wwe?i(e,s,t):[e])};return n.value=e,n.attached=eu(),n}(o,i);Yc(e,n,a,r)}else a&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,a,r),s[t]=void 0)}}const Jc=/(?:Once|Passive|Capture)$/;let Zc=0;const Qc=Promise.resolve(),eu=()=>Zc||(Qc.then((()=>Zc=0)),Zc=Date.now());function tu(e,t){if(h(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>{const t=t=>!t._stopped&&e&&e(t);return t.__wwe=e.__wwe,t}))}return t}const nu=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;
|
||
/*! #__NO_SIDE_EFFECTS__ */
|
||
function ou(e,t){const n=ji(e);class o extends au{constructor(e){super(n,e,t)}}return o.def=n,o}
|
||
/*! #__NO_SIDE_EFFECTS__ */const iu=e=>ou(e,Hu),su="undefined"!=typeof HTMLElement?HTMLElement:class{};class au extends su{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),Oo((()=>{this._connected||(Bu(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let i;if(n&&!h(n))for(const s in n){const e=n[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=x(this._props[s])),(i||(i=Object.create(null)))[b(s)]=!0)}this._numberProps=i,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=h(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(b))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.hasAttribute(e)?this.getAttribute(e):void 0;const n=b(e);this._numberProps&&this._numberProps[n]&&(t=x(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(R(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(R(e),t+""):t||this.removeAttribute(R(e))))}_update(){Bu(this._createVNode(),this.shadowRoot)}_createVNode(){const e=dr(this._def,u({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),R(e)!==e&&t(R(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof au){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function ru(e="$style"){{const t=Dr();if(!t)return o;const n=t.type.__cssModules;if(!n)return o;const i=n[e];return i||o}}const cu=new WeakMap,uu=new WeakMap,lu=Symbol("_moveCb"),du=Symbol("_enterCb"),pu={name:"TransitionGroup",props:u({},pc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Dr(),o=wi();let i,s;return gs((()=>{if(!i.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),i=e[uc];i&&i.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:a}=Cc(o);return s.removeChild(o),a}(i[0].el,n.vnode.el,t))return;i.forEach(fu),i.forEach(gu);const o=i.filter(_u);Ec(),o.forEach((e=>{const n=e.el,o=n.style;mc(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const i=n[lu]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",i),n[lu]=null,vc(n,t))};n.addEventListener("transitionend",i)}))})),()=>{const a=Kn(e),r=gc(a);let c=a.tag||ja;i=s,s=t.default?Ki(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Hi(t,qi(t,r,o,n))}if(i)for(let e=0;e<i.length;e++){const t=i[e];Hi(t,qi(t,r,o,n)),cu.set(t,t.el.getBoundingClientRect())}return dr(c,null,s)}}},hu=pu;function fu(e){const t=e.el;t[lu]&&t[lu](),t[du]&&t[du]()}function gu(e){uu.set(e,e.el.getBoundingClientRect())}function _u(e){const t=cu.get(e),n=uu.get(e),o=t.left-n.left,i=t.top-n.top;if(o||i){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${i}px)`,t.transitionDuration="0s",e}}const mu=e=>{const t=e.props["onUpdate:modelValue"]||!1;return h(t)?e=>w(t,e):t};function vu(e){e.target.composing=!0}function yu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Iu=Symbol("_assign"),Mu={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Iu]=mu(i);const s=o||i.props&&"number"===i.props.type;Yc(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=U(o)),e[Iu](o)})),n&&Yc(e,"change",(()=>{e.value=e.value.trim()})),t||(Yc(e,"compositionstart",vu),Yc(e,"compositionend",yu),Yc(e,"change",yu))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:i}},s){if(e[Iu]=mu(s),e.composing)return;const a=null==t?"":t;if((i||"number"===e.type?U(e.value):e.value)!==a){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===a)return}e.value=a}}},Cu={deep:!0,created(e,t,n){e[Iu]=mu(n),Yc(e,"change",(()=>{const t=e._modelValue,n=ku(e),o=e.checked,i=e[Iu];if(h(t)){const e=J(t,n),s=-1!==e;if(o&&!s)i(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),i(n)}}else if(g(t)){const e=new Set(t);o?e.add(n):e.delete(n),i(e)}else i(Lu(e,o))}))},mounted:Tu,beforeUpdate(e,t,n){e[Iu]=mu(n),Tu(e,t,n)}};function Tu(e,{value:t,oldValue:n},o){e._modelValue=t,h(t)?e.checked=J(t,o.props.value)>-1:g(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,Lu(e,!0)))}const Su={created(e,{value:t},n){e.checked=X(t,n.props.value),e[Iu]=mu(n),Yc(e,"change",(()=>{e[Iu](ku(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Iu]=mu(o),t!==n&&(e.checked=X(t,o.props.value))}},Eu={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const i=g(t);Yc(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?U(ku(e)):ku(e)));e[Iu](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,Oo((()=>{e._assigning=!1}))})),e[Iu]=mu(o)},mounted(e,{value:t,modifiers:{number:n}}){Du(e,t,n)},beforeUpdate(e,t,n){e[Iu]=mu(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Du(e,t,n)}};function Du(e,t,n){const o=e.multiple,i=h(t);if(!o||i||g(t)){for(let s=0,a=e.options.length;s<a;s++){const a=e.options[s],r=ku(a);if(o)if(i){const e=typeof r;a.selected="string"===e||"number"===e?t.includes(n?U(r):r):J(t,r)>-1}else a.selected=t.has(r);else if(X(ku(a),t))return void(e.selectedIndex!==s&&(e.selectedIndex=s))}o||-1===e.selectedIndex||(e.selectedIndex=-1)}}function ku(e){return"_value"in e?e._value:e.value}function Lu(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const bu={created(e,t,n){Ru(e,t,n,null,"created")},mounted(e,t,n){Ru(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Ru(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Ru(e,t,n,o,"updated")}};function Au(e,t){switch(e){case"SELECT":return Eu;case"TEXTAREA":return Mu;default:switch(t){case"checkbox":return Cu;case"radio":return Su;default:return Mu}}}function Ru(e,t,n,o,i){const s=Au(e.tagName,n.props&&n.props.type)[i];s&&s(e,t,n,o)}const Ou=["ctrl","shift","alt","meta"],Nu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ou.some((n=>e[`${n}Key`]&&!t.includes(n)))},Pu=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e<t.length;e++){const o=Nu[t[e]];if(o&&o(n,t))return}return e(n,...o)})},wu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Gu=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=R(n.key);return t.some((e=>e===o||wu[e]===o))?e(n):void 0})},Uu=u({patchProp:(e,t,n,o,i,s,a,u,l)=>{if(0===t.indexOf("change:"))return function(e,t,n,o=null){if(!n||!o)return;const i=t.replace("change:",""),{attrs:s}=o,a=s[i],r=(e.__wxsProps||(e.__wxsProps={}))[i];if(r===a)return;e.__wxsProps[i]=a;const c=o.proxy;Oo((()=>{n(a,r,c.$gcd(c,!0),c.$gcd(c,!1))}))}(e,t,o,a);const d="svg"===i;"class"===t?function(e,t,n){const{__wxsAddClass:o,__wxsRemoveClass:i}=e;i&&i.length&&(t=(t||"").split(/\s+/).filter((e=>-1===i.indexOf(e))).join(" "),i.length=0),o&&o.length&&(t=(t||"")+" "+o.join(" "));const s=e[uc];s&&(t=(t?[t,...s]:[...s]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,d):"style"===t?function(e,t,n){const o=e.style,i=v(n);let s=!1;if(n&&!i){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Gc(o,t,"")}else for(const e in t)null==n[e]&&Gc(o,e,"");for(const e in n)"display"===e&&(s=!0),Gc(o,e,n[e])}else if(i){if(t!==n){const e=o[Ac];e&&(n+=";"+e),o.cssText=n,s=Pc.test(n)}}else t&&e.removeAttribute("style");Dc in e&&(e[Dc]=s?o.display:"",e[kc]&&(o.display="none"));const{__wxsStyle:a}=e;if(a)for(const r in a)Gc(o,r,a[r])}(e,n,o):r(t)?c(t)||Xc(e,t,0,o,a):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&nu(t)&&m(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(nu(t)&&v(n))return!1;return t in e}(e,t,o,d))?function(e,t,n,o,i,s,a){if("innerHTML"===t||"textContent"===t)return o&&a(o,i,s),void(e[t]=null==n?"":n);const r=e.tagName;if("value"===t&&"PROGRESS"!==r&&!r.includes("-")){const o=null==n?"":n;return("OPTION"===r?e.getAttribute("value")||"":e.value)===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=z(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(aL){}c&&e.removeAttribute(t)}(e,t,o,s,a,u,l):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Wc,t.slice(6,t.length)):e.setAttributeNS(Wc,t,n);else{const o=Y(t);null==n||o&&!z(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,d))},forcePatchProp:(e,t)=>0===t.indexOf("change:")||("class"===t&&e.__wxsClassChanged?(e.__wxsClassChanged=!1,!0):!("style"!==t||!e.__wxsStyleChanged)&&(e.__wxsStyleChanged=!1,!0))},ac);let xu,Fu=!1;function qu(){return xu||(xu=Aa(Uu))}function Vu(){return xu=Fu?xu:Ra(Uu),Fu=!0,xu}const Bu=(...e)=>{qu().render(...e)},Hu=(...e)=>{Vu().hydrate(...e)},Ku=(...e)=>{const t=qu().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Wu(e);if(!o)return;const i=t._component;m(i)||i.render||i.template||(i.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,$u(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},ju=(...e)=>{const t=Vu().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Wu(e);if(t)return n(t,!0,$u(t))},t};function $u(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Wu(e){if(v(e)){return document.querySelector(e)}return e}let Yu=!1;const zu=()=>{Yu||(Yu=!0,Mu.getSSRProps=({value:e})=>({value:e}),Su.getSSRProps=({value:e},t)=>{if(t.props&&X(t.props.value,e))return{checked:!0}},Cu.getSSRProps=({value:e},t)=>{if(h(e)){if(t.props&&J(e,t.props.value)>-1)return{checked:!0}}else if(g(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},bu.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Au(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Lc.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},Xu=()=>{},Ju=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:xi,BaseTransitionPropsValidators:Ui,Comment:Wa,DeprecationTypes:null,EffectScope:Ct,ErrorCodes:vo,ErrorTypeStrings:Jr,Fragment:ja,KeepAlive:Zi,ReactiveEffect:kt,Static:Ya,Suspense:fi,Teleport:Ha,Text:$a,TrackOpTypes:go,Transition:lc,TransitionGroup:hu,TriggerOpTypes:_o,VueElement:au,assertNumber:mo,callWithAsyncErrorHandling:Mo,callWithErrorHandling:Io,camelize:b,capitalize:O,cloneVNode:hr,compatUtils:null,compile:Xu,computed:Hr,createApp:Ku,createBlock:or,createCommentVNode:_r,createElementBlock:nr,createElementVNode:lr,createHydrationRenderer:Ra,createPropsRestProxy:js,createRenderer:Aa,createSSRApp:ju,createSlots:Ts,createStaticVNode:gr,createTextVNode:fr,createVNode:dr,createVueApp:Ku,customRef:co,defineAsyncComponent:Wi,defineComponent:ji,defineCustomElement:ou,defineEmits:Ns,defineExpose:Ps,defineModel:Us,defineOptions:ws,defineProps:Os,defineSSRCustomElement:iu,defineSlots:Gs,devtools:Zr,effect:Rt,effectScope:Tt,getCurrentInstance:Dr,getCurrentScope:Et,getTransitionRawChildren:Ki,guardReactiveProps:pr,h:jr,handleError:Co,hasInjectionContext:da,hydrate:Hu,initCustomFormatter:$r,initDirectivesForSSR:zu,inject:la,injectHook:ls,get isInSSRComponentSetup(){return Pr},isMemoSame:Yr,isProxy:Hn,isReactive:qn,isReadonly:Vn,isRef:Jn,isRuntimeOnly:xr,isShallow:Bn,isVNode:ir,markRaw:jn,mergeDefaults:Hs,mergeModels:Ks,mergeProps:Ir,nextTick:Oo,normalizeClass:Be,normalizeProps:He,normalizeStyle:Ve,onActivated:ts,onBeforeActivate:es,onBeforeDeactivate:ns,onBeforeMount:ps,onBeforeUnmount:_s,onBeforeUpdate:fs,onDeactivated:os,onErrorCaptured:Ms,onMounted:hs,onRenderTracked:Is,onRenderTriggered:ys,onScopeDispose:Dt,onServerPrefetch:vs,onUnmounted:ms,onUpdated:gs,openBlock:Ja,popScopeId:Jo,provide:ua,proxyRefs:ao,pushScopeId:Xo,queuePostFlushCb:wo,reactive:wn,readonly:Un,ref:Zn,registerRuntimeCompiler:Ur,render:Bu,renderList:Cs,renderSlot:Ss,resolveComponent:ai,resolveDirective:ui,resolveDynamicComponent:ci,resolveFilter:null,resolveTransitionHooks:qi,setBlockTracking:er,setDevtoolsHook:Qr,setTransitionHooks:Hi,shallowReactive:Gn,shallowReadonly:xn,shallowRef:Qn,ssrContextKey:Ii,ssrUtils:ec,stop:Ot,toDisplayString:Z,toHandlerKey:N,toHandlers:Ds,toRaw:Kn,toRef:ho,toRefs:uo,toValue:io,transformVNodeArgs:ar,triggerRef:no,unref:oo,useAttrs:qs,useCssModule:ru,useCssVars:Rc,useModel:Kr,useSSRContext:Mi,useSlots:Fs,useTransitionState:wi,vModelCheckbox:Cu,vModelDynamic:bu,vModelRadio:Su,vModelSelect:Eu,vModelText:Mu,vShow:Lc,version:zr,warn:Xr,watch:Di,watchEffect:Ci,watchPostEffect:Ti,watchSyncEffect:Si,withAsyncContext:$s,withCtx:Qo,withDefaults:xs,withDirectives:Ri,withKeys:Gu,withMemo:Wr,withModifiers:Pu,withScopeId:Zo},Symbol.toStringTag,{value:"Module"})),Zu="undefined"!=typeof document;const Qu=Object.assign;function el(e,t){const n={};for(const o in t){const i=t[o];n[o]=nl(i)?i.map(e):e(i)}return n}const tl=()=>{},nl=Array.isArray,ol=/#/g,il=/&/g,sl=/\//g,al=/=/g,rl=/\?/g,cl=/\+/g,ul=/%5B/g,ll=/%5D/g,dl=/%5E/g,pl=/%60/g,hl=/%7B/g,fl=/%7C/g,gl=/%7D/g,_l=/%20/g;function ml(e){return encodeURI(""+e).replace(fl,"|").replace(ul,"[").replace(ll,"]")}function vl(e){return ml(e).replace(cl,"%2B").replace(_l,"+").replace(ol,"%23").replace(il,"%26").replace(pl,"`").replace(hl,"{").replace(gl,"}").replace(dl,"^")}function yl(e){return null==e?"":function(e){return ml(e).replace(ol,"%23").replace(rl,"%3F")}(e).replace(sl,"%2F")}function Il(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const Ml=/\/$/;function Cl(e,t,n="/"){let o,i={},s="",a="";const r=t.indexOf("#");let c=t.indexOf("?");return r<c&&r>=0&&(c=-1),c>-1&&(o=t.slice(0,c),s=t.slice(c+1,r>-1?r:t.length),i=e(s)),r>-1&&(o=o||t.slice(0,r),a=t.slice(r,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),i=o[o.length-1];".."!==i&&"."!==i||o.push("");let s,a,r=n.length-1;for(s=0;s<o.length;s++)if(a=o[s],"."!==a){if(".."!==a)break;r>1&&r--}return n.slice(0,r).join("/")+"/"+o.slice(s).join("/")}(null!=o?o:t,n),{fullPath:o+(s&&"?")+s+a,path:o,query:i,hash:Il(a)}}function Tl(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function Sl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function El(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Dl(e[n],t[n]))return!1;return!0}function Dl(e,t){return nl(e)?kl(e,t):nl(t)?kl(t,e):e===t}function kl(e,t){return nl(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}var Ll,bl,Al,Rl;function Ol(e){if(!e)if(Zu){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(Ml,"")}(bl=Ll||(Ll={})).pop="pop",bl.push="push",(Rl=Al||(Al={})).back="back",Rl.forward="forward",Rl.unknown="";const Nl=/^[^#]+#/;function Pl(e,t){return e.replace(Nl,"#")+t}const wl=()=>({left:window.scrollX,top:window.scrollY});function Gl(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),i="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}function Ul(e,t){return(history.state?history.state.position-t:-1)+e}const xl=new Map;function Fl(e,t){const{pathname:n,search:o,hash:i}=t,s=e.indexOf("#");if(s>-1){let t=i.includes(e.slice(s))?e.slice(s).length:1,n=i.slice(t);return"/"!==n[0]&&(n="/"+n),Tl(n,"")}return Tl(n,e)+o+i}function ql(e,t,n,o=!1,i=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:i?wl():null}}function Vl(e){const{history:t,location:n}=window,o={value:Fl(e,n)},i={value:t.state};function s(o,s,a){const r=e.indexOf("#"),c=r>-1?(n.host&&document.querySelector("base")?e:e.slice(r))+o:location.protocol+"//"+location.host+e+o;try{t[a?"replaceState":"pushState"](s,"",c),i.value=s}catch(u){console.error(u),n[a?"replace":"assign"](c)}}return i.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:i,push:function(e,n){const a=Qu({},i.value,t.state,{forward:e,scroll:wl()});s(a.current,a,!0),s(e,Qu({},ql(o.value,e,null),{position:a.position+1},n),!1),o.value=e},replace:function(e,n){s(e,Qu({},t.state,ql(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),o.value=e}}}function Bl(e){const t=Vl(e=Ol(e)),n=function(e,t,n,o){let i=[],s=[],a=null;const r=({state:s})=>{const r=Fl(e,location),c=n.value,u=t.value;let l=0;if(s){if(n.value=r,t.value=s,a&&a===c)return void(a=null);l=u?s.position-u.position:0}else o(r);i.forEach((e=>{e(n.value,c,{delta:l,type:Ll.pop,direction:l?l>0?Al.forward:Al.back:Al.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(Qu({},e.state,{scroll:wl()}),"")}return window.addEventListener("popstate",r),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:function(){a=n.value},listen:function(e){i.push(e);const t=()=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)};return s.push(t),t},destroy:function(){for(const e of s)e();s=[],window.removeEventListener("popstate",r),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace);const o=Qu({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:Pl.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Hl(e){return"string"==typeof e||"symbol"==typeof e}const Kl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},jl=Symbol("");var $l,Wl;function Yl(e,t){return Qu(new Error,{type:e,[jl]:!0},t)}function zl(e,t){return e instanceof Error&&jl in e&&(null==t||!!(e.type&t))}(Wl=$l||($l={}))[Wl.aborted=4]="aborted",Wl[Wl.cancelled=8]="cancelled",Wl[Wl.duplicated=16]="duplicated";const Xl="[^/]+?",Jl={sensitive:!1,strict:!1,start:!0,end:!0},Zl=/[.+*?^${}()[\]/\\]/g;function Ql(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}function ed(e,t){let n=0;const o=e.score,i=t.score;for(;n<o.length&&n<i.length;){const e=Ql(o[n],i[n]);if(e)return e;n++}if(1===Math.abs(i.length-o.length)){if(td(o))return 1;if(td(i))return-1}return i.length-o.length}function td(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const nd={type:0,value:""},od=/[a-zA-Z0-9_]/;function id(e,t,n){const o=function(e,t){const n=Qu({},Jl,t),o=[];let i=n.start?"^":"";const s=[];for(const c of e){const e=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let t=0;t<c.length;t++){const o=c[t];let a=40+(n.sensitive?.25:0);if(0===o.type)t||(i+="/"),i+=o.value.replace(Zl,"\\$&"),a+=40;else if(1===o.type){const{value:e,repeatable:n,optional:u,regexp:l}=o;s.push({name:e,repeatable:n,optional:u});const d=l||Xl;if(d!==Xl){a+=10;try{new RegExp(`(${d})`)}catch(r){throw new Error(`Invalid custom RegExp for param "${e}" (${d}): `+r.message)}}let p=n?`((?:${d})(?:/(?:${d}))*)`:`(${d})`;t||(p=u&&c.length<2?`(?:/${p})`:"/"+p),u&&(p+="?"),i+=p,a+=20,u&&(a+=-8),n&&(a+=-20),".*"===d&&(a+=-50)}e.push(a)}o.push(e)}if(n.strict&&n.end){const e=o.length-1;o[e][o[e].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const a=new RegExp(i,n.sensitive?"":"i");return{re:a,score:o,keys:s,parse:function(e){const t=e.match(a),n={};if(!t)return null;for(let o=1;o<t.length;o++){const e=t[o]||"",i=s[o-1];n[i.name]=e&&i.repeatable?e.split("/"):e}return n},stringify:function(t){let n="",o=!1;for(const i of e){o&&n.endsWith("/")||(n+="/"),o=!1;for(const e of i)if(0===e.type)n+=e.value;else if(1===e.type){const{value:s,repeatable:a,optional:r}=e,c=s in t?t[s]:"";if(nl(c)&&!a)throw new Error(`Provided param "${s}" is an array but it is not repeatable (* or + modifiers)`);const u=nl(c)?c.join("/"):c;if(!u){if(!r)throw new Error(`Missing required param "${s}"`);i.length<2&&(n.endsWith("/")?n=n.slice(0,-1):o=!0)}n+=u}}return n||"/"}}}(function(e){if(!e)return[[]];if("/"===e)return[[nd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${n})/"${u}": ${e}`)}let n=0,o=n;const i=[];let s;function a(){s&&i.push(s),s=[]}let r,c=0,u="",l="";function d(){u&&(0===n?s.push({type:0,value:u}):1===n||2===n||3===n?(s.length>1&&("*"===r||"+"===r)&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:l,repeatable:"*"===r||"+"===r,optional:"*"===r||"?"===r})):t("Invalid state to consume buffer"),u="")}function p(){u+=r}for(;c<e.length;)if(r=e[c++],"\\"!==r||2===n)switch(n){case 0:"/"===r?(u&&d(),a()):":"===r?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:"("===r?n=2:od.test(r)?p():(d(),n=0,"*"!==r&&"?"!==r&&"+"!==r&&c--);break;case 2:")"===r?"\\"==l[l.length-1]?l=l.slice(0,-1)+r:n=3:l+=r;break;case 3:d(),n=0,"*"!==r&&"?"!==r&&"+"!==r&&c--,l="";break;default:t("Unknown state")}else o=n,n=4;return 2===n&&t(`Unfinished custom RegExp for param "${u}"`),d(),a(),i}(e.path),n),i=Qu(o,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function sd(e,t){const n=[],o=new Map;function i(e,n,o){const r=!o,c=function(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:rd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}(e);c.aliasOf=o&&o.record;const u=ld(t,e),l=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)l.push(Qu({},c,{components:o?o.record.components:c.components,path:e,aliasOf:o?o.record:c}))}let d,p;for(const t of l){const{path:l}=t;if(n&&"/"!==l[0]){const e=n.record.path,o="/"===e[e.length-1]?"":"/";t.path=n.record.path+(l&&o+l)}if(d=id(t,n,u),o?o.alias.push(d):(p=p||d,p!==d&&p.alias.push(d),r&&e.name&&!cd(d)&&s(e.name)),c.children){const e=c.children;for(let t=0;t<e.length;t++)i(e[t],d,o&&o.children[t])}o=o||d,(d.record.components&&Object.keys(d.record.components).length||d.record.name||d.record.redirect)&&a(d)}return p?()=>{s(p)}:tl}function s(e){if(Hl(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(s),t.alias.forEach(s))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(s),e.alias.forEach(s))}}function a(e){let t=0;for(;t<n.length&&ed(e,n[t])>=0&&(e.record.path!==n[t].record.path||!dd(e,n[t]));)t++;n.splice(t,0,e),e.record.name&&!cd(e)&&o.set(e.record.name,e)}return t=ld({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>i(e))),{addRoute:i,resolve:function(e,t){let i,s,a,r={};if("name"in e&&e.name){if(i=o.get(e.name),!i)throw Yl(1,{location:e});a=i.record.name,r=Qu(ad(t.params,i.keys.filter((e=>!e.optional)).concat(i.parent?i.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&ad(e.params,i.keys.map((e=>e.name)))),s=i.stringify(r)}else if(null!=e.path)s=e.path,i=n.find((e=>e.re.test(s))),i&&(r=i.parse(s),a=i.record.name);else{if(i=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!i)throw Yl(1,{location:e,currentLocation:t});a=i.record.name,r=Qu({},t.params,e.params),s=i.stringify(r)}const c=[];let u=i;for(;u;)c.unshift(u.record),u=u.parent;return{name:a,path:s,params:r,matched:c,meta:ud(c)}},removeRoute:s,getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}function ad(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function rd(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]="object"==typeof n?n[o]:n;return t}function cd(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ud(e){return e.reduce(((e,t)=>Qu(e,t.meta)),{})}function ld(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function dd(e,t){return t.children.some((t=>t===e||dd(e,t)))}function pd(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const e=n[o].replace(cl," "),i=e.indexOf("="),s=Il(i<0?e:e.slice(0,i)),a=i<0?null:Il(e.slice(i+1));if(s in t){let e=t[s];nl(e)||(e=t[s]=[e]),e.push(a)}else t[s]=a}return t}function hd(e){let t="";for(let n in e){const o=e[n];if(n=vl(n).replace(al,"%3D"),null==o){void 0!==o&&(t+=(t.length?"&":"")+n);continue}(nl(o)?o.map((e=>e&&vl(e))):[o&&vl(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}))}return t}function fd(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=nl(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const gd=Symbol(""),_d=Symbol(""),md=Symbol(""),vd=Symbol(""),yd=Symbol("");function Id(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function Md(e,t,n,o,i,s=e=>e()){const a=o&&(o.enterCallbacks[i]=o.enterCallbacks[i]||[]);return()=>new Promise(((r,c)=>{const u=e=>{var s;!1===e?c(Yl(4,{from:n,to:t})):e instanceof Error?c(e):"string"==typeof(s=e)||s&&"object"==typeof s?c(Yl(2,{from:t,to:e})):(a&&o.enterCallbacks[i]===a&&"function"==typeof e&&a.push(e),r())},l=s((()=>e.call(o&&o.instances[i],t,n,u)));let d=Promise.resolve(l);e.length<3&&(d=d.then(u)),d.catch((e=>c(e)))}))}function Cd(e,t,n,o,i=e=>e()){const s=[];for(const r of e)for(const e in r.components){let c=r.components[e];if("beforeRouteEnter"===t||r.instances[e])if("object"==typeof(a=c)||"displayName"in a||"props"in a||"__vccOpts"in a){const a=(c.__vccOpts||c)[t];a&&s.push(Md(a,n,o,r,e,i))}else{let a=c();s.push((()=>a.then((s=>{if(!s)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${r.path}"`));const a=(c=s).__esModule||"Module"===c[Symbol.toStringTag]?s.default:s;var c;r.components[e]=a;const u=(a.__vccOpts||a)[t];return u&&Md(u,n,o,r,e,i)()}))))}}var a;return s}function Td(e){const t=la(md),n=la(vd),o=Hr((()=>t.resolve(oo(e.to)))),i=Hr((()=>{const{matched:e}=o.value,{length:t}=e,i=e[t-1],s=n.matched;if(!i||!s.length)return-1;const a=s.findIndex(Sl.bind(null,i));if(a>-1)return a;const r=Ed(e[t-2]);return t>1&&Ed(i)===r&&s[s.length-1].path!==r?s.findIndex(Sl.bind(null,e[t-2])):a})),s=Hr((()=>i.value>-1&&function(e,t){for(const n in t){const o=t[n],i=e[n];if("string"==typeof o){if(o!==i)return!1}else if(!nl(i)||i.length!==o.length||o.some(((e,t)=>e!==i[t])))return!1}return!0}(n.params,o.value.params))),a=Hr((()=>i.value>-1&&i.value===n.matched.length-1&&El(n.params,o.value.params)));return{route:o,href:Hr((()=>o.value.href)),isActive:s,isExactActive:a,navigate:function(n={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(n)?t[oo(e.replace)?"replace":"push"](oo(e.to)).catch(tl):Promise.resolve()}}}const Sd=ji({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Td,setup(e,{slots:t}){const n=wn(Td(e)),{options:o}=la(md),i=Hr((()=>({[Dd(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Dd(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:jr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}});function Ed(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Dd=(e,t,n)=>null!=e?e:null!=t?t:n;function kd(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const Ld=ji({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=la(yd),i=Hr((()=>e.route||o.value)),s=la(_d,0),a=Hr((()=>{let e=oo(s);const{matched:t}=i.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),r=Hr((()=>i.value.matched[a.value]));ua(_d,Hr((()=>a.value+1))),ua(gd,r),ua(yd,i);const c=Zn();return Di((()=>[c.value,r.value,e.name]),(([e,t,n],[o,i,s])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),!e||!t||i&&Sl(t,i)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=i.value,s=e.name,a=r.value,u=a&&a.components[s];if(!u)return kd(n.default,{Component:u,route:o});const l=a.props[s],d=l?!0===l?o.params:"function"==typeof l?l(o):l:null,p=jr(u,Qu({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[s]=null)},ref:c}));return kd(n.default,{Component:p,route:o})||p}}});function bd(e){const t=sd(e.routes,e),n=e.parseQuery||pd,o=e.stringifyQuery||hd,i=e.history,s=Id(),a=Id(),r=Id(),c=Qn(Kl);let u=Kl;Zu&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=el.bind(null,(e=>""+e)),d=el.bind(null,yl),p=el.bind(null,Il);function h(e,s){if(s=Qu({},s||c.value),"string"==typeof e){const o=Cl(n,e,s.path),a=t.resolve({path:o.path},s),r=i.createHref(o.fullPath);return Qu(o,a,{params:p(a.params),hash:Il(o.hash),redirectedFrom:void 0,href:r})}let a;if(null!=e.path)a=Qu({},e,{path:Cl(n,e.path,s.path).path});else{const t=Qu({},e.params);for(const e in t)null==t[e]&&delete t[e];a=Qu({},e,{params:d(t)}),s.params=d(s.params)}const r=t.resolve(a,s),u=e.hash||"";r.params=l(p(r.params));const h=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,Qu({},e,{hash:(f=u,ml(f).replace(hl,"{").replace(gl,"}").replace(dl,"^")),path:r.path}));var f;const g=i.createHref(h);return Qu({fullPath:h,hash:u,query:o===hd?fd(e.query):e.query||{}},r,{redirectedFrom:void 0,href:g})}function f(e){return"string"==typeof e?Cl(n,e,c.value.path):Qu({},e)}function g(e,t){if(u!==e)return Yl(8,{from:t,to:e})}function _(e){return v(e)}function m(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=f(o):{path:o},o.params={}),Qu({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function v(e,t){const n=u=h(e),i=c.value,s=e.state,a=e.force,r=!0===e.replace,l=m(n);if(l)return v(Qu(f(l),{state:"object"==typeof l?Qu({},s,l.state):s,force:a,replace:r}),t||n);const d=n;let p;return d.redirectedFrom=t,!a&&function(e,t,n){const o=t.matched.length-1,i=n.matched.length-1;return o>-1&&o===i&&Sl(t.matched[o],n.matched[i])&&El(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,i,n)&&(p=Yl(16,{to:d,from:i}),R(i,i,!0,!1)),(p?Promise.resolve(p):M(d,i)).catch((e=>zl(e)?zl(e,2)?e:A(e):b(e,d,i))).then((e=>{if(e){if(zl(e,2))return v(Qu({replace:r},f(e.to),{state:"object"==typeof e.to?Qu({},s,e.to.state):s,force:a}),t||d)}else e=T(d,i,!0,r,s);return C(d,i,e),e}))}function y(e,t){const n=g(e,t);return n?Promise.reject(n):Promise.resolve()}function I(e){const t=P.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function M(e,t){let n;const[o,i,r]=function(e,t){const n=[],o=[],i=[],s=Math.max(t.matched.length,e.matched.length);for(let a=0;a<s;a++){const s=t.matched[a];s&&(e.matched.find((e=>Sl(e,s)))?o.push(s):n.push(s));const r=e.matched[a];r&&(t.matched.find((e=>Sl(e,r)))||i.push(r))}return[n,o,i]}(e,t);n=Cd(o.reverse(),"beforeRouteLeave",e,t);for(const s of o)s.leaveGuards.forEach((o=>{n.push(Md(o,e,t))}));const c=y.bind(null,e,t);return n.push(c),G(n).then((()=>{n=[];for(const o of s.list())n.push(Md(o,e,t));return n.push(c),G(n)})).then((()=>{n=Cd(i,"beforeRouteUpdate",e,t);for(const o of i)o.updateGuards.forEach((o=>{n.push(Md(o,e,t))}));return n.push(c),G(n)})).then((()=>{n=[];for(const o of r)if(o.beforeEnter)if(nl(o.beforeEnter))for(const i of o.beforeEnter)n.push(Md(i,e,t));else n.push(Md(o.beforeEnter,e,t));return n.push(c),G(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Cd(r,"beforeRouteEnter",e,t,I),n.push(c),G(n)))).then((()=>{n=[];for(const o of a.list())n.push(Md(o,e,t));return n.push(c),G(n)})).catch((e=>zl(e,8)?e:Promise.reject(e)))}function C(e,t,n){r.list().forEach((o=>I((()=>o(e,t,n)))))}function T(e,t,n,o,s){const a=g(e,t);if(a)return a;const r=t===Kl,u=Zu?history.state:{};n&&(o||r?i.replace(e.fullPath,Qu({scroll:r&&u&&u.scroll},s)):i.push(e.fullPath,s)),c.value=e,R(e,t,n,r),A()}let S;function E(){S||(S=i.listen(((e,t,n)=>{if(!w.listening)return;const o=h(e),s=m(o);if(s)return void v(Qu(s,{replace:!0}),o).catch(tl);u=o;const a=c.value;var r,l;Zu&&(r=Ul(a.fullPath,n.delta),l=wl(),xl.set(r,l)),M(o,a).catch((e=>zl(e,12)?e:zl(e,2)?(v(e.to,o).then((e=>{zl(e,20)&&!n.delta&&n.type===Ll.pop&&i.go(-1,!1)})).catch(tl),Promise.reject()):(n.delta&&i.go(-n.delta,!1),b(e,o,a)))).then((e=>{(e=e||T(o,a,!1))&&(n.delta&&!zl(e,8)?i.go(-n.delta,!1):n.type===Ll.pop&&zl(e,20)&&i.go(-1,!1)),C(o,a,e)})).catch(tl)})))}let D,k=Id(),L=Id();function b(e,t,n){A(e);const o=L.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function A(e){return D||(D=!e,E(),k.list().forEach((([t,n])=>e?n(e):t())),k.reset()),e}function R(t,n,o,i){const{scrollBehavior:s}=e;if(!Zu||!s)return Promise.resolve();const a=!o&&function(e){const t=xl.get(e);return xl.delete(e),t}(Ul(t.fullPath,0))||(i||!o)&&history.state&&history.state.scroll||null;return Oo().then((()=>s(t,n,a))).then((e=>e&&Gl(e))).catch((e=>b(e,t,n)))}const O=e=>i.go(e);let N;const P=new Set,w={currentRoute:c,listening:!0,addRoute:function(e,n){let o,i;return Hl(e)?(o=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:h,options:e,push:_,replace:function(e){return _(Qu(f(e),{replace:!0}))},go:O,back:()=>O(-1),forward:()=>O(1),beforeEach:s.add,beforeResolve:a.add,afterEach:r.add,onError:L.add,isReady:function(){return D&&c.value!==Kl?Promise.resolve():new Promise(((e,t)=>{k.add([e,t])}))},install(e){e.component("RouterLink",Sd),e.component("RouterView",Ld),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>oo(c)}),Zu&&!N&&c.value===Kl&&(N=!0,_(i.location).catch((e=>{})));const t={};for(const o in Kl)Object.defineProperty(t,o,{get:()=>c.value[o],enumerable:!0});e.provide(md,this),e.provide(vd,Gn(t)),e.provide(yd,c);const n=e.unmount;P.add(e),e.unmount=function(){P.delete(e),P.size<1&&(u=Kl,S&&S(),S=null,c.value=Kl,N=!1,D=!1),n()}}};function G(e){return e.reduce(((e,t)=>e.then((()=>I(t)))),Promise.resolve())}return w}function Ad(){return la(vd)}const Rd=["{","}"];const Od=/^(?:\d)+/,Nd=/^(?:\w)+/;const Pd="zh-Hans",wd="zh-Hant",Gd="en",Ud="fr",xd="es",Fd=Object.prototype.hasOwnProperty,qd=(e,t)=>Fd.call(e,t),Vd=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=Rd){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,n]){const o=[];let i=0,s="";for(;i<e.length;){let a=e[i++];if(a===t){s&&o.push({type:"text",value:s}),s="";let t="";for(a=e[i++];void 0!==a&&a!==n;)t+=a,a=e[i++];const r=a===n,c=Od.test(t)?"list":r&&Nd.test(t)?"named":"unknown";o.push({value:t,type:c})}else s+=a}return s&&o.push({type:"text",value:s}),o}(e,n),this._caches[e]=o),function(e,t){const n=[];let o=0;const i=Array.isArray(t)?"list":(s=t,null!==s&&"object"==typeof s?"named":"unknown");var s;if("unknown"===i)return n;for(;o<e.length;){const s=e[o];switch(s.type){case"text":n.push(s.value);break;case"list":n.push(t[parseInt(s.value,10)]);break;case"named":"named"===i&&n.push(t[s.value])}o++}return n}(o,t)}};function Bd(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return Pd;if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?Pd:e.indexOf("-hant")>-1?wd:(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?wd:Pd);var n;let o=[Gd,Ud,xd];t&&Object.keys(t).length>0&&(o=Object.keys(t));const i=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return i||void 0}class Hd{constructor({locale:e,fallbackLocale:t,messages:n,watcher:o,formater:i}){this.locale=Gd,this.fallbackLocale=Gd,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=i||Vd,this.messages=n||{},this.setLocale(e||Gd),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=Bd(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 o=this.messages[e];o?n?Object.assign(o,t):Object.keys(t).forEach((e=>{qd(o,e)||(o[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let o=this.message;return"string"==typeof t?(t=Bd(t,this.messages))&&(o=this.messages[t]):n=t,qd(o,e)?this.formater.interpolate(o[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function Kd(e,t={},n,o){if("string"!=typeof e){const n=[t,e];e=n[0],t=n[1]}"string"!=typeof e&&(e="undefined"!=typeof uni&&Bg?Bg():"undefined"!=typeof global&&global.getLocale?global.getLocale():Gd),"string"!=typeof n&&(n="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||Gd);const i=new Hd({locale:e,fallbackLocale:n,messages:t,watcher:o});let s=(e,t)=>{{let e=!1;s=function(t,n){const o=lI().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(o,i))),i.t(t,n)}}return s(e,t)};return{i18n:i,f:(e,t,n)=>i.f(e,t,n),t:(e,t)=>s(e,t),add:(e,t,n=!0)=>i.add(e,t,n),watch:e=>i.watchLocale(e),getLocale:()=>i.getLocale(),setLocale:e=>i.setLocale(e)}}function $d(e,t){return e.indexOf(t[0])>-1}const Wd=Ye((()=>"undefined"!=typeof __uniConfig&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length));let Yd;function zd(e){return $d(e,ae)?Zd().f(e,function(){const e=Bg(),t=__uniConfig.locales;return t[e]||t[__uniConfig.fallbackLocale]||t.en||{}}(),ae):e}function Xd(e,t){if(1===t.length){if(e){const n=e=>v(e)&&$d(e,ae),o=t[0];let i=[];if(h(e)&&(i=e.filter((e=>n(e[o])))).length)return i;const s=e[t[0]];if(n(s))return e}return}const n=t.shift();return Xd(e&&e[n],t)}function Jd(e,t){const n=Xd(e,t);if(!n)return!1;const o=t[t.length-1];if(h(n))n.forEach((e=>Jd(e,[o])));else{let e=n[o];Object.defineProperty(n,o,{get:()=>zd(e),set(t){e=t}})}return!0}function Zd(){if(!Yd){let e;if(e=navigator.cookieEnabled&&window.localStorage&&localStorage.UNI_LOCALE||__uniConfig.locale||navigator.language,Yd=Kd(e),Wd()){const t=Object.keys(__uniConfig.locales||{});t.length&&t.forEach((e=>Yd.add(e,__uniConfig.locales[e]))),Yd.setLocale(e)}}return Yd}function Qd(e,t,n){return t.reduce(((t,o,i)=>(t[e+o]=n[i],t)),{})}const ep=Ye((()=>{const e="uni.async.",t=["error"];Zd().add(Gd,Qd(e,t,["The connection timed out, click the screen to try again."]),!1),Zd().add(xd,Qd(e,t,["Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo."]),!1),Zd().add(Ud,Qd(e,t,["La connexion a expiré, cliquez sur l'écran pour réessayer."]),!1),Zd().add(Pd,Qd(e,t,["连接服务器超时,点击屏幕重试"]),!1),Zd().add(wd,Qd(e,t,["連接服務器超時,點擊屏幕重試"]),!1)})),tp=Ye((()=>{const e="uni.showActionSheet.",t=["cancel"];Zd().add(Gd,Qd(e,t,["Cancel"]),!1),Zd().add(xd,Qd(e,t,["Cancelar"]),!1),Zd().add(Ud,Qd(e,t,["Annuler"]),!1),Zd().add(Pd,Qd(e,t,["取消"]),!1),Zd().add(wd,Qd(e,t,["取消"]),!1)})),np=Ye((()=>{const e="uni.showToast.",t=["unpaired"];Zd().add(Gd,Qd(e,t,["Please note showToast must be paired with hideToast"]),!1),Zd().add(xd,Qd(e,t,["Tenga en cuenta que showToast debe estar emparejado con hideToast"]),!1),Zd().add(Ud,Qd(e,t,["Veuillez noter que showToast doit être associé à hideToast"]),!1),Zd().add(Pd,Qd(e,t,["请注意 showToast 与 hideToast 必须配对使用"]),!1),Zd().add(wd,Qd(e,t,["請注意 showToast 與 hideToast 必須配對使用"]),!1)})),op=Ye((()=>{const e="uni.showLoading.",t=["unpaired"];Zd().add(Gd,Qd(e,t,["Please note showLoading must be paired with hideLoading"]),!1),Zd().add(xd,Qd(e,t,["Tenga en cuenta que showLoading debe estar emparejado con hideLoading"]),!1),Zd().add(Ud,Qd(e,t,["Veuillez noter que showLoading doit être associé à hideLoading"]),!1),Zd().add(Pd,Qd(e,t,["请注意 showLoading 与 hideLoading 必须配对使用"]),!1),Zd().add(wd,Qd(e,t,["請注意 showLoading 與 hideLoading 必須配對使用"]),!1)})),ip=Ye((()=>{const e="uni.showModal.",t=["cancel","confirm"];Zd().add(Gd,Qd(e,t,["Cancel","OK"]),!1),Zd().add(xd,Qd(e,t,["Cancelar","OK"]),!1),Zd().add(Ud,Qd(e,t,["Annuler","OK"]),!1),Zd().add(Pd,Qd(e,t,["取消","确定"]),!1),Zd().add(wd,Qd(e,t,["取消","確定"]),!1)})),sp=Ye((()=>{const e="uni.chooseFile.",t=["notUserActivation"];Zd().add(Gd,Qd(e,t,["File chooser dialog can only be shown with a user activation"]),!1),Zd().add(xd,Qd(e,t,["El cuadro de diálogo del selector de archivos solo se puede mostrar con la activación del usuario"]),!1),Zd().add(Ud,Qd(e,t,["La boîte de dialogue du sélecteur de fichier ne peut être affichée qu'avec une activation par l'utilisateur"]),!1),Zd().add(Pd,Qd(e,t,["文件选择器对话框只能在由用户激活时显示"]),!1),Zd().add(wd,Qd(e,t,["文件選擇器對話框只能在由用戶激活時顯示"]),!1)})),ap=Ye((()=>{const e="uni.setClipboardData.",t=["success","fail"];Zd().add(Gd,Qd(e,t,["Content copied","Copy failed, please copy manually"]),!1),Zd().add(xd,Qd(e,t,["Contenido copiado","Error al copiar, copie manualmente"]),!1),Zd().add(Ud,Qd(e,t,["Contenu copié","Échec de la copie, copiez manuellement"]),!1),Zd().add(Pd,Qd(e,t,["内容已复制","复制失败,请手动复制"]),!1),Zd().add(wd,Qd(e,t,["內容已復制","復制失敗,請手動復製"]),!1)})),rp=Ye((()=>{const e="uni.picker.",t=["done","cancel"];Zd().add(Gd,Qd(e,t,["Done","Cancel"]),!1),Zd().add(xd,Qd(e,t,["OK","Cancelar"]),!1),Zd().add(Ud,Qd(e,t,["OK","Annuler"]),!1),Zd().add(Pd,Qd(e,t,["完成","取消"]),!1),Zd().add(wd,Qd(e,t,["完成","取消"]),!1)})),cp=Ye((()=>{const e="uni.video.",t=["danmu","volume"];Zd().add(Gd,Qd(e,t,["Danmu","Volume"]),!1),Zd().add(xd,Qd(e,t,["Danmu","Volumen"]),!1),Zd().add(Ud,Qd(e,t,["Danmu","Le Volume"]),!1),Zd().add(Pd,Qd(e,t,["弹幕","音量"]),!1),Zd().add(wd,Qd(e,t,["彈幕","音量"]),!1)}));function up(e){const t=new _t;return{on:(e,n)=>t.on(e,n),once:(e,n)=>t.once(e,n),off:(e,n)=>t.off(e,n),emit:(e,...n)=>t.emit(e,...n),subscribe(n,o,i=!1){t[i?"once":"on"](`${e}.${n}`,o)},unsubscribe(n,o){t.off(`${e}.${n}`,o)},subscribeHandler(n,o,i){t.emit(`${e}.${n}`,o,i)}}}const lp="invokeViewApi",dp="invokeServiceApi";let pp=1;const hp=Object.create(null);function fp(e,t){return e+"."+t}function gp(e,t,n){t=fp(e,t),hp[t]||(hp[t]=n)}function _p({id:e,name:t,args:n},o){t=fp(o,t);const i=t=>{e&&sT.publishHandler(lp+"."+e,t)},s=hp[t];s?s(n,i):i({})}const mp=u(up("service"),{invokeServiceMethod:(e,t,n)=>{const{subscribe:o,publishHandler:i}=sT,s=n?pp++:0;n&&o(dp+"."+s,n,!0),i(dp,{id:s,name:e,args:t})}}),vp=ot(!0);let yp;function Ip(){yp&&(clearTimeout(yp),yp=null)}let Mp=0,Cp=0;function Tp(e){if(Ip(),1!==e.touches.length)return;const{pageX:t,pageY:n}=e.touches[0];Mp=t,Cp=n,yp=setTimeout((function(){const t=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget});t.touches=e.touches,t.changedTouches=e.changedTouches,e.target.dispatchEvent(t)}),350)}function Sp(e){if(!yp)return;if(1!==e.touches.length)return Ip();const{pageX:t,pageY:n}=e.touches[0];return Math.abs(t-Mp)>10||Math.abs(n-Cp)>10?Ip():void 0}function Ep(e,t){const n=Number(e);return isNaN(n)?t:n}function Dp(){const e=__uniConfig.globalStyle||{},t=Ep(e.rpxCalcMaxDeviceWidth,960),n=Ep(e.rpxCalcBaseDeviceWidth,375);function o(){let e=function(){const e=/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation,t=e&&90===Math.abs(window.orientation);var n=e?Math[t?"max":"min"](screen.width,screen.height):screen.width;return Math.min(window.innerWidth,document.documentElement.clientWidth,n)||n}();e=e<=t?e:n,document.documentElement.style.fontSize=e/23.4375+"px"}o(),document.addEventListener("DOMContentLoaded",o),window.addEventListener("load",o),window.addEventListener("resize",o)}function kp(){Dp(),Qe(),window.addEventListener("touchstart",Tp,vp),window.addEventListener("touchmove",Sp,vp),window.addEventListener("touchend",Ip,vp),window.addEventListener("touchcancel",Ip,vp)}function Lp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bp,Ap,Rp=["top","left","right","bottom"],Op={};function Np(){return Ap="CSS"in window&&"function"==typeof CSS.supports?CSS.supports("top: env(safe-area-inset-top)")?"env":CSS.supports("top: constant(safe-area-inset-top)")?"constant":"":""}function Pp(){if(Ap="string"==typeof Ap?Ap:Np()){var e=[],t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t={passive:!0}}});window.addEventListener("test",null,n)}catch(aL){}var o=document.createElement("div");i(o,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),Rp.forEach((function(e){a(o,e)})),document.body.appendChild(o),s(),bp=!0}else Rp.forEach((function(e){Op[e]=0}));function i(e,t){var n=e.style;Object.keys(t).forEach((function(e){var o=t[e];n[e]=o}))}function s(t){t?e.push(t):e.forEach((function(e){e()}))}function a(e,n){var o=document.createElement("div"),a=document.createElement("div"),r=document.createElement("div"),c=document.createElement("div"),u={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:Ap+"(safe-area-inset-"+n+")"};i(o,u),i(a,u),i(r,{transition:"0s",animation:"none",width:"400px",height:"400px"}),i(c,{transition:"0s",animation:"none",width:"250%",height:"250%"}),o.appendChild(r),a.appendChild(c),e.appendChild(o),e.appendChild(a),s((function(){o.scrollTop=a.scrollTop=1e4;var e=o.scrollTop,i=a.scrollTop;function s(){this.scrollTop!==(this===o?e:i)&&(o.scrollTop=a.scrollTop=1e4,e=o.scrollTop,i=a.scrollTop,function(e){Gp.length||setTimeout((function(){var e={};Gp.forEach((function(t){e[t]=Op[t]})),Gp.length=0,Up.forEach((function(t){t(e)}))}),0);Gp.push(e)}(n))}o.addEventListener("scroll",s,t),a.addEventListener("scroll",s,t)}));var l=getComputedStyle(o);Object.defineProperty(Op,n,{configurable:!0,get:function(){return parseFloat(l.paddingBottom)}})}}function wp(e){return bp||Pp(),Op[e]}var Gp=[];var Up=[];const xp=Lp({get support(){return 0!=("string"==typeof Ap?Ap:Np()).length},get top(){return wp("top")},get left(){return wp("left")},get right(){return wp("right")},get bottom(){return wp("bottom")},onChange:function(e){Np()&&(bp||Pp(),"function"==typeof e&&Up.push(e))},offChange:function(e){var t=Up.indexOf(e);t>=0&&Up.splice(t,1)}}),Fp=Pu((()=>{}),["prevent"]),qp=Pu((e=>{}),["stop"]);function Vp(e,t){return parseInt((e.getPropertyValue(t).match(/\d+/)||["0"])[0])}function Bp(){const e=Vp(document.documentElement.style,"--window-top");return e?e+xp.top:0}function Hp(){const e=document.documentElement.style,t=Bp(),n=Vp(e,"--window-bottom"),o=Vp(e,"--window-left"),i=Vp(e,"--window-right"),s=Vp(e,"--top-window-height");return{top:t,bottom:n?n+xp.bottom:0,left:o?o+xp.left:0,right:i?i+xp.right:0,topWindowHeight:s||0}}function Kp(e){const t=document.documentElement.style;Object.keys(e).forEach((n=>{t.setProperty(n,e[n])}))}function jp(e){return Kp(e)}function $p(e){return Symbol(e)}function Wp(e){return-1!==(e+="").indexOf("rpx")||-1!==e.indexOf("upx")}function Yp(e,t=!1){if(t)return function(e){if(!Wp(e))return e;return e.replace(/(\d+(\.\d+)?)[ru]px/g,((e,t)=>ag(parseFloat(t))+"px"))}(e);if(v(e)){const t=parseInt(e)||0;return Wp(e)?ag(t):t}return e}const zp="M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z",Xp="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z",Jp="M21.781 7.844l-9.063 8.594 9.063 8.594q0.25 0.25 0.25 0.609t-0.25 0.578q-0.25 0.25-0.578 0.25t-0.578-0.25l-9.625-9.125q-0.156-0.125-0.203-0.297t-0.047-0.359q0-0.156 0.047-0.328t0.203-0.297l9.625-9.125q0.25-0.25 0.578-0.25t0.578 0.25q0.25 0.219 0.25 0.578t-0.25 0.578z";function Zp(e,t="#000",n=27){return dr("svg",{width:n,height:n,viewBox:"0 0 32 32"},[dr("path",{d:e,fill:t},null,8,["d","fill"])],8,["width","height"])}function Qp(){{const{$pageInstance:e}=Dr();return e&&e.proxy.$page.id}}function eh(e){const t=xe(e);if(t.$page)return t.$page.id;if(t.$){const{$pageInstance:e}=t.$;return e&&e.proxy.$page.id}}function th(){const e=xy(),t=e.length;if(t)return e[t-1]}function nh(){const e=th();if(e)return e.$page.meta}function oh(){const e=nh();return e?e.id:-1}function ih(){const e=th();if(e)return e.$vm}const sh=["navigationBar","pullToRefresh"];function ah(e,t){const n=JSON.parse(JSON.stringify(__uniConfig.globalStyle||{})),o=u({id:t},n,e);sh.forEach((t=>{o[t]=u({},n[t],e[t])}));const{navigationBar:i}=o;return i.titleText&&i.titleImage&&(i.titleText=""),o}function rh(e,t,n){if(v(e))n=t,t=e,e=ih();else if("number"==typeof e){const t=xy().find((t=>t.$page.id===e));e=t?t.$vm:ih()}if(!e)return;const o=e.$[t];return o&&((e,t)=>{let n;for(let o=0;o<e.length;o++)n=e[o](t);return n})(o,n)}function ch(e){e.preventDefault()}let uh,lh=0;function dh({onPageScroll:e,onReachBottom:t,onReachBottomDistance:n}){let o=!1,i=!1,s=!0;const a=()=>{function a(){if((()=>{const{scrollHeight:e}=document.documentElement,t=window.innerHeight,o=window.scrollY,s=o>0&&e>t&&o+t+n>=e,a=Math.abs(e-lh)>n;return!s||i&&!a?(!s&&i&&(i=!1),!1):(lh=e,i=!0,!0)})())return t&&t(),s=!1,setTimeout((function(){s=!0}),350),!0}e&&e(window.pageYOffset),t&&s&&(a()||(uh=setTimeout(a,300))),o=!1};return function(){clearTimeout(uh),o||requestAnimationFrame(a),o=!0}}function ph(e,t){if(0===t.indexOf("/"))return t;if(0===t.indexOf("./"))return ph(e,t.slice(2));const n=t.split("/"),o=n.length;let i=0;for(;i<o&&".."===n[i];i++);n.splice(0,i),t=n.join("/");const s=e.length>0?e.split("/"):[];return s.splice(s.length-i-1,i+1),je(s.concat(n).join("/"))}function hh(e,t=!1){return t?__uniRoutes.find((t=>t.path===e||t.alias===e)):__uniRoutes.find((t=>t.path===e))}class fh{constructor(e){this.$bindClass=!1,this.$bindStyle=!1,this.$vm=e,this.$el=function(e,t=!1){const{vnode:n}=e;if(qe(n.el))return t?n.el?[n.el]:[]:n.el;const{subTree:o}=e;if(16&o.shapeFlag){const e=o.children.filter((e=>e.el&&qe(e.el)));if(e.length>0)return t?e.map((e=>e.el)):e[0].el}return t?n.el?[n.el]:[]:n.el}(e.$),this.$el.getAttribute&&(this.$bindClass=!!this.$el.getAttribute("class"),this.$bindStyle=!!this.$el.getAttribute("style"))}selectComponent(e){if(!this.$el||!e)return;const t=vh(this.$el.querySelector(e));return t?gh(t,!1):void 0}selectAllComponents(e){if(!this.$el||!e)return[];const t=[],n=this.$el.querySelectorAll(e);for(let o=0;o<n.length;o++){const e=vh(n[o]);e&&t.push(gh(e,!1))}return t}forceUpdate(e){"class"===e?this.$bindClass?(this.$el.__wxsClassChanged=!0,this.$vm.$forceUpdate()):this.updateWxsClass():"style"===e&&(this.$bindStyle?(this.$el.__wxsStyleChanged=!0,this.$vm.$forceUpdate()):this.updateWxsStyle())}updateWxsClass(){const{__wxsAddClass:e}=this.$el;e.length&&(this.$el.className=e.join(" "))}updateWxsStyle(){const{__wxsStyle:e}=this.$el;e&&this.$el.setAttribute("style",function(e){let t="";if(!e||v(e))return t;for(const n in e){const o=e[n],i=n.startsWith("--")?n:R(n);(v(o)||"number"==typeof o)&&(t+=`${i}:${o};`)}return t}(e))}setStyle(e){return this.$el&&e?(v(e)&&(e=$(e)),S(e)&&(this.$el.__wxsStyle=e,this.forceUpdate("style")),this):this}addClass(e){if(!this.$el||!e)return this;const t=this.$el.__wxsAddClass||(this.$el.__wxsAddClass=[]);return-1===t.indexOf(e)&&(t.push(e),this.forceUpdate("class")),this}removeClass(e){if(!this.$el||!e)return this;const{__wxsAddClass:t}=this.$el;if(t){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const n=this.$el.__wxsRemoveClass||(this.$el.__wxsRemoveClass=[]);return-1===n.indexOf(e)&&(n.push(e),this.forceUpdate("class")),this}hasClass(e){return this.$el&&this.$el.classList.contains(e)}getDataset(){return this.$el&&this.$el.dataset}callMethod(e,t={}){const n=this.$vm[e];m(n)?n(JSON.parse(JSON.stringify(t))):this.$vm.ownerId&&sT.publishHandler("onWxsInvokeCallMethod",{nodeId:this.$el.__id,ownerId:this.$vm.ownerId,method:e,args:t})}requestAnimationFrame(e){return window.requestAnimationFrame(e)}getState(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}triggerEvent(e,t={}){return this.$vm.$emit(e,t),this}getComputedStyle(e){if(this.$el){const t=window.getComputedStyle(this.$el);return e&&e.length?e.reduce(((e,n)=>(e[n]=t[n],e)),{}):t}return{}}setTimeout(e,t){return window.setTimeout(e,t)}clearTimeout(e){return window.clearTimeout(e)}getBoundingClientRect(){return this.$el.getBoundingClientRect()}}function gh(e,t=!0){if(t&&e&&(e=Fe(e.$)),e&&e.$el)return e.$el.__wxsComponentDescriptor||(e.$el.__wxsComponentDescriptor=new fh(e)),e.$el.__wxsComponentDescriptor}function _h(e,t){return gh(e,t)}function mh(e,t,n,o=!0){if(t){e.__instance||(e.__instance=!0,Object.defineProperty(e,"instance",{get:()=>_h(n.proxy,!1)}));const i=function(e,t,n=!0){if(!t)return!1;if(n&&e.length<2)return!1;const o=Fe(t);if(!o)return!1;const i=o.$.type;return!(!i.$wxs&&!i.$renderjs)&&o}(t,n,o);if(i)return[e,_h(i,!1)]}}function vh(e){if(e)return e.__vueParentComponent&&e.__vueParentComponent.proxy}function yh(e,t=!1){const{type:n,timeStamp:o,target:i,currentTarget:s}=e;let a,r;a=it(t?i:function(e){for(;e&&0!==e.tagName.indexOf("UNI-");)e=e.parentElement;return e}(i)),r=it(s);const c={type:n,timeStamp:o,target:a,detail:{},currentTarget:r};return e._stopped&&(c._stopped=!0),e.type.startsWith("touch")&&(c.touches=e.touches,c.changedTouches=e.changedTouches),function(e,t){u(e,{preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()})}(c,e),c}function Ih(e,t){return{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY-t,pageX:e.pageX,pageY:e.pageY-t}}function Mh(e,t){const n=[];for(let o=0;o<e.length;o++){const{identifier:i,pageX:s,pageY:a,clientX:r,clientY:c,force:u}=e[o];n.push({identifier:i,pageX:s,pageY:a-t,clientX:r,clientY:c-t,force:u||0})}return n}const Ch=Object.defineProperty({__proto__:null,$nne:function(e,t,n){const{currentTarget:o}=e;if(!(e instanceof Event&&o instanceof HTMLElement))return[e];const i=0!==o.tagName.indexOf("UNI-");if(i)return mh(e,t,n,!1)||[e];const s=yh(e,i);if("click"===e.type)!function(e,t){const{x:n,y:o}=t,i=Bp();e.detail={x:n,y:o-i},e.touches=e.changedTouches=[Ih(t,i)]}(s,e);else if((e=>0===e.type.indexOf("mouse")||["contextmenu"].includes(e.type))(e))!function(e,t){const n=Bp();e.pageX=t.pageX,e.pageY=t.pageY-n,e.clientX=t.clientX,e.clientY=t.clientY-n,e.touches=e.changedTouches=[Ih(t,n)]}(s,e);else if((e=>"undefined"!=typeof TouchEvent&&e instanceof TouchEvent||0===e.type.indexOf("touch")||["longpress"].indexOf(e.type)>=0)(e)){const t=Bp();s.touches=Mh(e.touches,t),s.changedTouches=Mh(e.changedTouches,t)}else if((e=>!e.type.indexOf("key")&&e instanceof KeyboardEvent)(e)){["key","code"].forEach((t=>{Object.defineProperty(s,t,{get:()=>e[t]})}))}return mh(s,t,n)||[s]},createNativeEvent:yh},Symbol.toStringTag,{value:"Module"});function Th(e){!function(e){const t=e.globalProperties;u(t,Ch),t.$gcd=_h}(e._context.config)}let Sh=1;function Eh(e){return(e||oh())+"."+lp}const Dh=u(up("view"),{invokeOnCallback:(e,t)=>aT.emit("api."+e,t),invokeViewMethod:(e,t,n,o)=>{const{subscribe:i,publishHandler:s}=aT,a=o?Sh++:0;o&&i(lp+"."+a,o,!0),s(Eh(n),{id:a,name:e,args:t},n)},invokeViewMethodKeepAlive:(e,t,n,o)=>{const{subscribe:i,unsubscribe:s,publishHandler:a}=aT,r=Sh++,c=lp+"."+r;return i(c,n),a(Eh(o),{id:r,name:e,args:t},o),()=>{s(c)}}});function kh(e){rh(th(),Me,e),aT.invokeOnCallback("onWindowResize",e)}function Lh(e){const t=th();rh(lI(),le,e),rh(t,le)}function bh(){rh(lI(),de),rh(th(),de)}const Ah=[Te,Ee];function Rh(){Ah.forEach((e=>aT.subscribe(e,function(e){return(t,n)=>{rh(parseInt(n),e,t)}}(e))))}function Oh(){!function(){const{on:e}=aT;e(Me,kh),e(we,Lh),e(Ge,bh)}(),Rh()}function Nh(){if(this.$route){const e=this.$route.meta;return e.eventChannel||(e.eventChannel=new lt(this.$page.id)),e.eventChannel}}function Ph(e){e._context.config.globalProperties.getOpenerEventChannel=Nh}function wh(){return{path:"",query:{},scene:1001,referrerInfo:{appId:"",extraData:{}}}}function Gh(e){return/^-?\d+[ur]px$/i.test(e)?e.replace(/(^-?\d+)[ur]px$/i,((e,t)=>`${ag(parseFloat(t))}px`)):/^-?[\d\.]+$/.test(e)?`${e}px`:e||""}function Uh(e){const t=e.animation;if(!t||!t.actions||!t.actions.length)return;let n=0;const o=t.actions,i=t.actions.length;function s(){const t=o[n],a=t.option.transition,r=function(e){const t=["matrix","matrix3d","scale","scale3d","rotate3d","skew","translate","translate3d"],n=["scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","translateX","translateY","translateZ"],o=["opacity","background-color"],i=["width","height","left","right","top","bottom"],s=e.animates,a=e.option,r=a.transition,c={},u=[];return s.forEach((e=>{let s=e.type,a=[...e.args];if(t.concat(n).includes(s))s.startsWith("rotate")||s.startsWith("skew")?a=a.map((e=>parseFloat(e)+"deg")):s.startsWith("translate")&&(a=a.map(Gh)),n.indexOf(s)>=0&&(a.length=1),u.push(`${s}(${a.join(",")})`);else if(o.concat(i).includes(a[0])){s=a[0];const e=a[1];c[s]=i.includes(s)?Gh(e):e}})),c.transform=c.webkitTransform=u.join(" "),c.transition=c.webkitTransition=Object.keys(c).map((e=>`${function(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)).replace("webkit","-webkit")}(e)} ${r.duration}ms ${r.timingFunction} ${r.delay}ms`)).join(","),c.transformOrigin=c.webkitTransformOrigin=a.transformOrigin,c}(t);Object.keys(r).forEach((t=>{e.$el.style[t]=r[t]})),n+=1,n<i&&setTimeout(s,a.duration+a.delay)}setTimeout((()=>{s()}),0)}const xh={props:["animation"],watch:{animation:{deep:!0,handler(){Uh(this)}}},mounted(){Uh(this)}},Fh=e=>{e.__reserved=!0;const{props:t,mixins:n}=e;return t&&t.animation||(n||(e.mixins=[])).push(xh),qh(e)},qh=e=>(e.__reserved=!0,e.compatConfig={MODE:3},ji(e));function Vh(e){return e.__wwe=!0,e}function Bh(e,t){return(n,o,i)=>{e.value&&t(n,function(e,t,n,o){let i;return i=it(n),{type:o.type||e,timeStamp:t.timeStamp||0,target:i,currentTarget:i,detail:o}}(n,o,e.value,i||{}))}}const Hh={hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}};function Kh(e){const t=Zn(!1);let n,o,i=!1;function s(){requestAnimationFrame((()=>{clearTimeout(o),o=setTimeout((()=>{t.value=!1}),parseInt(e.hoverStayTime))}))}function a(o){o._hoverPropagationStopped||e.hoverClass&&"none"!==e.hoverClass&&!e.disabled&&(e.hoverStopPropagation&&(o._hoverPropagationStopped=!0),i=!0,n=setTimeout((()=>{t.value=!0,i||s()}),parseInt(e.hoverStartTime)))}function r(){i=!1,t.value&&s()}function c(){r(),window.removeEventListener("mouseup",c)}return{hovering:t,binding:{onTouchstartPassive:Vh((function(e){e.touches.length>1||a(e)})),onMousedown:Vh((function(e){i||(a(e),window.addEventListener("mouseup",c))})),onTouchend:Vh((function(){r()})),onMouseup:Vh((function(){i&&c()})),onTouchcancel:Vh((function(){i=!1,t.value=!1,clearTimeout(n)}))}}}function jh(e,t){return v(t)&&(t=[t]),t.reduce(((t,n)=>(e[n]&&(t[n]=!0),t)),Object.create(null))}const $h=$p("uf"),Wh=Fh({name:"Form",emits:["submit","reset"],setup(e,{slots:t,emit:n}){const o=Zn(null);return function(e){const t=[];ua($h,{addField(e){t.push(e)},removeField(e){t.splice(t.indexOf(e),1)},submit(n){e("submit",n,{value:t.reduce(((e,t)=>{if(t.submit){const[n,o]=t.submit();n&&(e[n]=o)}return e}),Object.create(null))})},reset(n){t.forEach((e=>e.reset&&e.reset())),e("reset",n)}})}(Bh(o,n)),()=>dr("uni-form",{ref:o},[dr("span",null,[t.default&&t.default()])],512)}});const Yh={for:{type:String,default:""}},zh=$p("ul");const Xh=Fh({name:"Label",props:Yh,setup(e,{slots:t}){const n=Zn(null),o=Qp(),i=function(){const e=[];return ua(zh,{addHandler(t){e.push(t)},removeHandler(t){e.splice(e.indexOf(t),1)}}),e}(),s=Hr((()=>e.for||t.default&&t.default.length)),a=Vh((t=>{const n=t.target;let s=/^uni-(checkbox|radio|switch)-/.test(n.className);s||(s=/^uni-(checkbox|radio|switch|button)$|^(svg|path)$/i.test(n.tagName)),s||(e.for?sT.emit("uni-label-click-"+o+"-"+e.for,t,!0):i.length&&i[0](t,!0))}));return()=>dr("uni-label",{ref:n,class:{"uni-label-pointer":s},onClick:a},[t.default&&t.default()],10,["onClick"])}});function Jh(e,t){Zh(e.id,t),Di((()=>e.id),((e,n)=>{Qh(n,t,!0),Zh(e,t,!0)})),ms((()=>{Qh(e.id,t)}))}function Zh(e,t,n){const o=Qp();n&&!e||S(t)&&Object.keys(t).forEach((i=>{n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&sT.on(`uni-${i}-${o}-${e}`,t[i]):0===i.indexOf("uni-")?sT.on(i,t[i]):e&&sT.on(`uni-${i}-${o}-${e}`,t[i])}))}function Qh(e,t,n){const o=Qp();n&&!e||S(t)&&Object.keys(t).forEach((i=>{n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&sT.off(`uni-${i}-${o}-${e}`,t[i]):0===i.indexOf("uni-")?sT.off(i,t[i]):e&&sT.off(`uni-${i}-${o}-${e}`,t[i])}))}const ef=Fh({name:"Button",props:{id:{type:String,default:""},hoverClass:{type:String,default:"button-hover"},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},hoverStopPropagation:{type:Boolean,default:!1},disabled:{type:[Boolean,String],default:!1},formType:{type:String,default:""},openType:{type:String,default:""},loading:{type:[Boolean,String],default:!1},plain:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=Zn(null),o=la($h,!1),{hovering:i,binding:s}=Kh(e),a=Vh(((t,i)=>{if(e.disabled)return t.stopImmediatePropagation();i&&n.value.click();const s=e.formType;if(s){if(!o)return;"submit"===s?o.submit(t):"reset"===s&&o.reset(t)}else;})),r=la(zh,!1);return r&&(r.addHandler(a),_s((()=>{r.removeHandler(a)}))),Jh(e,{"label-click":a}),()=>{const o=e.hoverClass,r=jh(e,"disabled"),c=jh(e,"loading"),u=jh(e,"plain"),l=o&&"none"!==o;return dr("uni-button",Ir({ref:n,onClick:a,id:e.id,class:l&&i.value?o:""},l&&s,r,c,u),[t.default&&t.default()],16,["onClick","id"])}}});function tf(e){return e.$el}function nf(e){const{base:t}=__uniConfig.router;return 0===je(e).indexOf(t)?je(e):t+e}function of(e){const{base:t,assets:n}=__uniConfig.router;if("./"===t&&(0!==e.indexOf("./")||!e.includes("/static/")&&0!==e.indexOf("./"+(n||"assets")+"/")||(e=e.slice(1))),0===e.indexOf("/")){if(0!==e.indexOf("//"))return nf(e.slice(1));e="https:"+e}if(ce.test(e)||ue.test(e)||0===e.indexOf("blob:"))return e;const o=xy();return o.length?nf(ph(o[o.length-1].$page.route,e).slice(1)):e}const sf=navigator.userAgent,af=/android/i.test(sf),rf=/iphone|ipad|ipod/i.test(sf),cf=sf.match(/Windows NT ([\d|\d.\d]*)/i),uf=/Macintosh|Mac/i.test(sf),lf=/Linux|X11/i.test(sf),df=uf&&navigator.maxTouchPoints>0;function pf(){return/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation}function hf(e){return e&&90===Math.abs(window.orientation)}function ff(e,t){return e?Math[t?"max":"min"](screen.width,screen.height):screen.width}function gf(e){return Math.min(window.innerWidth,document.documentElement.clientWidth,e)||e}function _f(e,t,n,o){aT.invokeViewMethod("video."+e,{videoId:e,type:n,data:o},t)}function mf(e,t){const n={},{top:o,topWindowHeight:i}=Hp();if(t.node){const t=e.tagName.replace("uni-","");t&&(n.node=e.querySelector(t))}if(t.id&&(n.id=e.id),t.dataset&&(n.dataset=et(e)),t.rect||t.size){const s=e.getBoundingClientRect();t.rect&&(n.left=s.left,n.right=s.right,n.top=s.top-o-i,n.bottom=s.bottom-o-i),t.size&&(n.width=s.width,n.height=s.height)}if(h(t.properties)&&t.properties.forEach((e=>{e=e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))})),t.scrollOffset)if("UNI-SCROLL-VIEW"===e.tagName){const t=e.children[0].children[0];n.scrollLeft=t.scrollLeft,n.scrollTop=t.scrollTop,n.scrollHeight=t.scrollHeight,n.scrollWidth=t.scrollWidth}else n.scrollLeft=0,n.scrollTop=0,n.scrollHeight=0,n.scrollWidth=0;if(h(t.computedStyle)){const o=getComputedStyle(e);t.computedStyle.forEach((e=>{n[e]=o[e]}))}return t.context&&(n.contextInfo=function(e){return e.__uniContextInfo}(e)),n}function vf(e,t){return(e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){const t=this.parentElement.querySelectorAll(e);let n=t.length;for(;--n>=0&&t.item(n)!==this;);return n>-1}).call(e,t)}function yf(e,t,n){const o=[];t.forEach((({component:t,selector:n,single:i,fields:s})=>{null===t?o.push(function(e){const t={};if(e.id&&(t.id=""),e.dataset&&(t.dataset={}),e.rect&&(t.left=0,t.right=0,t.top=0,t.bottom=0),e.size&&(t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight),e.scrollOffset){const e=document.documentElement,n=document.body;t.scrollLeft=e.scrollLeft||n.scrollLeft||0,t.scrollTop=e.scrollTop||n.scrollTop||0,t.scrollHeight=e.scrollHeight||n.scrollHeight||0,t.scrollWidth=e.scrollWidth||n.scrollWidth||0}return t}(s)):o.push(function(e,t,n,o,i){const s=function(e,t){return e?e.$el:t.$el}(t,e),a=s.parentElement;if(!a)return o?null:[];const{nodeType:r}=s,c=3===r||8===r;if(o){const e=c?a.querySelector(n):vf(s,n)?s:s.querySelector(n);return e?mf(e,i):null}{let e=[];const t=(c?a:s).querySelectorAll(n);return t&&t.length&&[].forEach.call(t,(t=>{e.push(mf(t,i))})),!c&&vf(s,n)&&e.unshift(mf(s,i)),e}}(e,t,n,i,s))})),n(o)}const If=["original","compressed"],Mf=["album","camera"],Cf=["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"];function Tf(e,t){return e&&-1!==t.indexOf(e)?e:t[0]}function Sf(e,t){return!h(e)||0===e.length||e.find((e=>-1===t.indexOf(e)))?t:e}function Ef(e){return function(){try{return e.apply(e,arguments)}catch(aL){console.error(aL)}}}let Df=1;const kf={};function Lf(e,t,n){if("number"==typeof e){const o=kf[e];if(o)return o.keepAlive||delete kf[e],o.callback(t,n)}return t}const bf="success",Af="fail",Rf="complete";function Of(e,t={},{beforeAll:n,beforeSuccess:o}={}){S(t)||(t={});const{success:i,fail:s,complete:a}=function(e){const t={};for(const n in e){const o=e[n];m(o)&&(t[n]=Ef(o),delete e[n])}return t}(t),r=m(i),c=m(s),u=m(a),l=Df++;return function(e,t,n,o=!1){kf[e]={name:t,keepAlive:o,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),m(n)&&n(l),l.errMsg===e+":ok"?(m(o)&&o(l,t),r&&i(l)):c&&s(l),u&&a(l)})),l}const Nf="success",Pf="fail",wf="complete",Gf={},Uf={};function xf(e,t){return function(n){return e(n,t)||n}}function Ff(e,t,n){let o=!1;for(let i=0;i<e.length;i++){const s=e[i];if(o)o=Promise.resolve(xf(s,n));else{const e=s(t,n);if(M(e)&&(o=Promise.resolve(e)),!1===e)return{then(){},catch(){}}}}return o||{then:e=>e(t),catch(){}}}function qf(e,t={}){return[Nf,Pf,wf].forEach((n=>{const o=e[n];if(!h(o))return;const i=t[n];t[n]=function(e){Ff(o,e,t).then((e=>m(i)&&i(e)||e))}})),t}function Vf(e,t){const n=[];h(Gf.returnValue)&&n.push(...Gf.returnValue);const o=Uf[e];return o&&h(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function Bf(e){const t=Object.create(null);Object.keys(Gf).forEach((e=>{"returnValue"!==e&&(t[e]=Gf[e].slice())}));const n=Uf[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Hf(e,t,n,o){const i=Bf(e);if(i&&Object.keys(i).length){if(h(i.invoke)){return Ff(i.invoke,n).then((n=>t(qf(Bf(e),n),...o)))}return t(qf(i,n),...o)}return t(n,...o)}function Kf(e,t){return(n={},...o)=>function(e){return!(!S(e)||![bf,Af,Rf].find((t=>m(e[t]))))}(n)?Vf(e,Hf(e,t,n,o)):Vf(e,new Promise(((i,s)=>{Hf(e,t,u(n,{success:i,fail:s}),o)})))}function jf(e,t,n,o={}){const i=t+":fail"+(n?" "+n:"");return delete o.errCode,Lf(e,u({errMsg:i},o))}function $f(e,t,n,o){if(o&&o.beforeInvoke){const e=o.beforeInvoke(t);if(v(e))return e}const i=function(e,t){const n=e[0];if(!t||!t.formatArgs||!S(t.formatArgs)&&S(n))return;const o=t.formatArgs,i=Object.keys(o);for(let s=0;s<i.length;s++){const t=i[s],a=o[t];if(m(a)){const o=a(e[0][t],n);if(v(o))return o}else p(n,t)||(n[t]=a)}}(t,o);if(i)return i}function Wf(e,t,n,o){return n=>{const i=Of(e,n,o),s=$f(0,[n],0,o);return s?jf(i,e,s):t(n,{resolve:t=>function(e,t,n){return Lf(e,u(n||{},{errMsg:t+":ok"}))}(i,e,t),reject:(t,n)=>jf(i,e,function(e){return!e||v(e)?e:e.stack?(console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function Yf(e,t,n,o){return Kf(e,Wf(e,t,0,o))}function zf(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=$f(0,e,0,o);if(n)throw new Error(n);return t.apply(null,e)}}(0,t,0,o)}function Xf(e,t,n,o){return Kf(e,function(e,t,n,o){return Wf(e,t,0,o)}(e,t,0,o))}function Jf(e){return(t,{reject:n})=>n(function(e){return`method 'uni.${e}' not supported`}(e))}let Zf=!1,Qf=0,eg=0,tg=960,ng=375,og=750;function ig(){const{platform:e,pixelRatio:t,windowWidth:n}=function(){const e=pf(),t=gf(ff(e,hf(e)));return{platform:rf?"ios":"other",pixelRatio:window.devicePixelRatio,windowWidth:t}}();Qf=n,eg=t,Zf="ios"===e}function sg(e,t){const n=Number(e);return isNaN(n)?t:n}const ag=zf(0,((e,t)=>{if(0===Qf&&(ig(),function(){const e=__uniConfig.globalStyle||{};tg=sg(e.rpxCalcMaxDeviceWidth,960),ng=sg(e.rpxCalcBaseDeviceWidth,375),og=sg(e.rpxCalcBaseDeviceWidth,750)}()),0===(e=Number(e)))return 0;let n=t||Qf;n=e===og||n<=tg?n:ng;let o=e/750*n;return o<0&&(o=-o),o=Math.floor(o+1e-4),0===o&&(o=1!==eg&&Zf?.5:1),e<0?-o:o}));function rg(e,t){Object.keys(t).forEach((n=>{m(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):h(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}(e[n],t[n]))}))}const cg=zf(0,((e,t)=>{v(e)&&S(t)?rg(Uf[e]||(Uf[e]={}),t):S(e)&&rg(Gf,e)})),ug=new _t,lg=zf(0,((e,t)=>(ug.on(e,t),()=>ug.off(e,t)))),dg=zf(0,((e,t)=>{e?(h(e)||(e=[e]),e.forEach((e=>ug.off(e,t)))):ug.e={}})),pg=zf(0,((e,...t)=>{ug.emit(e,...t)})),hg=[.5,.8,1,1.25,1.5,2];class fg{constructor(e,t){this.id=e,this.pageId=t}play(){_f(this.id,this.pageId,"play")}pause(){_f(this.id,this.pageId,"pause")}stop(){_f(this.id,this.pageId,"stop")}seek(e){_f(this.id,this.pageId,"seek",{position:e})}sendDanmu(e){_f(this.id,this.pageId,"sendDanmu",e)}playbackRate(e){~hg.indexOf(e)||(e=1),_f(this.id,this.pageId,"playbackRate",{rate:e})}requestFullScreen(e={}){_f(this.id,this.pageId,"requestFullScreen",e)}exitFullScreen(){_f(this.id,this.pageId,"exitFullScreen")}showStatusBar(){_f(this.id,this.pageId,"showStatusBar")}hideStatusBar(){_f(this.id,this.pageId,"hideStatusBar")}}const gg=zf(0,((e,t)=>new fg(e,eh(t||ih())))),_g=(e,t,n,o)=>{!function(e,t,n,o,i){aT.invokeViewMethod("map."+e,{type:n,data:o},t,i)}(e,t,n,o,(e=>{o&&((e,t)=>{const n=t.errMsg||"";new RegExp("\\:\\s*fail").test(n)?e.fail&&e.fail(t):e.success&&e.success(t),e.complete&&e.complete(t)})(o,e)}))};const mg={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"#00000000"};function vg(e){let t=null;if(null!=(t=/^#([0-9|A-F|a-f]{6})$/.exec(e=e||"#000000"))){return[parseInt(t[1].slice(0,2),16),parseInt(t[1].slice(2,4),16),parseInt(t[1].slice(4),16),255]}if(null!=(t=/^#([0-9|A-F|a-f]{3})$/.exec(e))){let e=t[1].slice(0,1),n=t[1].slice(1,2),o=t[1].slice(2,3);return e=parseInt(e+e,16),n=parseInt(n+n,16),o=parseInt(o+o,16),[e,n,o,255]}if(null!=(t=/^rgb\((.+)\)$/.exec(e)))return t[1].split(",").map((function(e){return Math.min(255,parseInt(e.trim()))})).concat(255);if(null!=(t=/^rgba\((.+)\)$/.exec(e)))return t[1].split(",").map((function(e,t){return 3===t?Math.floor(255*parseFloat(e.trim())):Math.min(255,parseInt(e.trim()))}));var n=e.toLowerCase();if(p(mg,n)){t=/^#([0-9|A-F|a-f]{6,8})$/.exec(mg[n]);const e=parseInt(t[1].slice(0,2),16),o=parseInt(t[1].slice(2,4),16),i=parseInt(t[1].slice(4,6),16);let s=parseInt(t[1].slice(6,8),16);return s=s>=0?s:255,[e,o,i,s]}return console.error("unsupported color:"+e),[0,0,0,255]}class yg{constructor(e,t){this.type=e,this.data=t,this.colorStop=[]}addColorStop(e,t){this.colorStop.push([e,vg(t)])}}class Ig{constructor(e,t){this.type="pattern",this.data=e,this.colorStop=t}}class Mg{constructor(e){this.width=e}}const Cg=["onCanplay","onPlay","onPause","onStop","onEnded","onTimeUpdate","onError","onWaiting","onSeeking","onSeeked"],Tg=["offCanplay","offPlay","offPause","offStop","offEnded","offTimeUpdate","offError","offWaiting","offSeeking","offSeeked"],Sg={thresholds:[0],initialRatio:0,observeAll:!1},Eg=["top","right","bottom","left"];let Dg=1;function kg(e={}){return Eg.map((t=>`${Number(e[t])||0}px`)).join(" ")}class Lg{constructor(e,t){this._pageId=eh(e),this._component=e,this._options=u({},Sg,t)}relativeTo(e,t){return this._options.relativeToSelector=e,this._options.rootMargin=kg(t),this}relativeToViewport(e){return this._options.relativeToSelector=void 0,this._options.rootMargin=kg(e),this}observe(e,t){m(t)&&(this._options.selector=e,this._reqId=Dg++,function({reqId:e,component:t,options:n,callback:o}){const i=tf(t);(i.__io||(i.__io={}))[e]=function(e,t,n){x_();const o=t.relativeToSelector?e.querySelector(t.relativeToSelector):null,i=new IntersectionObserver((e=>{e.forEach((e=>{n({intersectionRatio:q_(e),intersectionRect:F_(e.intersectionRect),boundingClientRect:F_(e.boundingClientRect),relativeRect:F_(e.rootBounds),time:Date.now(),dataset:et(e.target),id:e.target.id})}))}),{root:o,rootMargin:t.rootMargin,threshold:t.thresholds});if(t.observeAll){i.USE_MUTATION_OBSERVER=!0;const n=e.querySelectorAll(t.selector);for(let e=0;e<n.length;e++)i.observe(n[e])}else{i.USE_MUTATION_OBSERVER=!1;const n=e.querySelector(t.selector);n?i.observe(n):console.warn(`Node ${t.selector} is not found. Intersection observer will not trigger.`)}return i}(i,n,o)}({reqId:this._reqId,component:this._component,options:this._options,callback:t},this._pageId))}disconnect(){this._reqId&&function({reqId:e,component:t}){const n=tf(t),o=n.__io&&n.__io[e];o&&(o.disconnect(),delete n.__io[e])}({reqId:this._reqId,component:this._component},this._pageId)}}const bg=zf(0,((e,t)=>((e=xe(e))&&!eh(e)&&(t=e,e=null),new Lg(e||ih(),t))));let Ag=0,Rg={};const Og={canvas:class{constructor(e,t){this.id=e,this.pageId=t,this.actions=[],this.path=[],this.subpath=[],this.drawingState=[],this.state={lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}setFillStyle(e){console.log("initCanvasContextProperty implemented.")}setStrokeStyle(e){console.log("initCanvasContextProperty implemented.")}setShadow(e,t,n,o){console.log("initCanvasContextProperty implemented.")}addColorStop(e,t){console.log("initCanvasContextProperty implemented.")}setLineWidth(e){console.log("initCanvasContextProperty implemented.")}setLineCap(e){console.log("initCanvasContextProperty implemented.")}setLineJoin(e){console.log("initCanvasContextProperty implemented.")}setLineDash(e,t){console.log("initCanvasContextProperty implemented.")}setMiterLimit(e){console.log("initCanvasContextProperty implemented.")}fillRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}strokeRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}clearRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}fill(){console.log("initCanvasContextProperty implemented.")}stroke(){console.log("initCanvasContextProperty implemented.")}scale(e,t){console.log("initCanvasContextProperty implemented.")}rotate(e){console.log("initCanvasContextProperty implemented.")}translate(e,t){console.log("initCanvasContextProperty implemented.")}setFontSize(e){console.log("initCanvasContextProperty implemented.")}fillText(e,t,n,o){console.log("initCanvasContextProperty implemented.")}setTextAlign(e){console.log("initCanvasContextProperty implemented.")}setTextBaseline(e){console.log("initCanvasContextProperty implemented.")}drawImage(e,t,n,o,i,s,a,r,c){console.log("initCanvasContextProperty implemented.")}setGlobalAlpha(e){console.log("initCanvasContextProperty implemented.")}strokeText(e,t,n,o){console.log("initCanvasContextProperty implemented.")}setTransform(e,t,n,o,i,s){console.log("initCanvasContextProperty implemented.")}draw(e=!1,t){var n=[...this.actions];this.actions=[],this.path=[],function(e,t,n,o,i){aT.invokeViewMethod(`canvas.${e}`,{type:n,data:o},t,(e=>{i&&i(e)}))}(this.id,this.pageId,"actionsChanged",{actions:n,reserve:e},t)}createLinearGradient(e,t,n,o){return new yg("linear",[e,t,n,o])}createCircularGradient(e,t,n){return new yg("radial",[e,t,n])}createPattern(e,t){if(void 0===t)console.error("Failed to execute 'createPattern' on 'CanvasContext': 2 arguments required, but only 1 present.");else{if(!(["repeat","repeat-x","repeat-y","no-repeat"].indexOf(t)<0))return new Ig(e,t);console.error("Failed to execute 'createPattern' on 'CanvasContext': The provided type ('"+t+"') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.")}}measureText(e,t){let n=0;return n=function(e,t){const n=document.createElement("canvas").getContext("2d");return n.font=t,n.measureText(e).width||0}(e,this.state.font),new Mg(n)}save(){this.actions.push({method:"save",data:[]}),this.drawingState.push(this.state)}restore(){this.actions.push({method:"restore",data:[]}),this.state=this.drawingState.pop()||{lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}beginPath(){this.path=[],this.subpath=[],this.path.push({method:"beginPath",data:[]})}moveTo(e,t){this.path.push({method:"moveTo",data:[e,t]}),this.subpath=[[e,t]]}lineTo(e,t){0===this.path.length&&0===this.subpath.length?this.path.push({method:"moveTo",data:[e,t]}):this.path.push({method:"lineTo",data:[e,t]}),this.subpath.push([e,t])}quadraticCurveTo(e,t,n,o){this.path.push({method:"quadraticCurveTo",data:[e,t,n,o]}),this.subpath.push([n,o])}bezierCurveTo(e,t,n,o,i,s){this.path.push({method:"bezierCurveTo",data:[e,t,n,o,i,s]}),this.subpath.push([i,s])}arc(e,t,n,o,i,s=!1){this.path.push({method:"arc",data:[e,t,n,o,i,s]}),this.subpath.push([e,t])}rect(e,t,n,o){this.path.push({method:"rect",data:[e,t,n,o]}),this.subpath=[[e,t]]}arcTo(e,t,n,o,i){this.path.push({method:"arcTo",data:[e,t,n,o,i]}),this.subpath.push([n,o])}clip(){this.actions.push({method:"clip",data:[...this.path]})}closePath(){this.path.push({method:"closePath",data:[]}),this.subpath.length&&(this.subpath=[this.subpath.shift()])}clearActions(){this.actions=[],this.path=[],this.subpath=[]}getActions(){var e=[...this.actions];return this.clearActions(),e}set lineDashOffset(e){this.actions.push({method:"setLineDashOffset",data:[e]})}set globalCompositeOperation(e){this.actions.push({method:"setGlobalCompositeOperation",data:[e]})}set shadowBlur(e){this.actions.push({method:"setShadowBlur",data:[e]})}set shadowColor(e){this.actions.push({method:"setShadowColor",data:[e]})}set shadowOffsetX(e){this.actions.push({method:"setShadowOffsetX",data:[e]})}set shadowOffsetY(e){this.actions.push({method:"setShadowOffsetY",data:[e]})}set font(e){var t=this;this.state.font=e;var n=e.match(/^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/);if(n){var o=n[1].trim().split(/\s/),i=parseFloat(n[3]),s=n[7],a=[];o.forEach((function(e,n){["italic","oblique","normal"].indexOf(e)>-1?(a.push({method:"setFontStyle",data:[e]}),t.state.fontStyle=e):["bold","normal"].indexOf(e)>-1?(a.push({method:"setFontWeight",data:[e]}),t.state.fontWeight=e):0===n?(a.push({method:"setFontStyle",data:["normal"]}),t.state.fontStyle="normal"):1===n&&r()})),1===o.length&&r(),o=a.map((function(e){return e.data[0]})).join(" "),this.state.fontSize=i,this.state.fontFamily=s,this.actions.push({method:"setFont",data:[`${o} ${i}px ${s}`]})}else console.warn("Failed to set 'font' on 'CanvasContext': invalid format.");function r(){a.push({method:"setFontWeight",data:["normal"]}),t.state.fontWeight="normal"}}get font(){return this.state.font}set fillStyle(e){this.setFillStyle(e)}set strokeStyle(e){this.setStrokeStyle(e)}set globalAlpha(e){e=Math.floor(255*parseFloat(e)),this.actions.push({method:"setGlobalAlpha",data:[e]})}set textAlign(e){this.actions.push({method:"setTextAlign",data:[e]})}set lineCap(e){this.actions.push({method:"setLineCap",data:[e]})}set lineJoin(e){this.actions.push({method:"setLineJoin",data:[e]})}set lineWidth(e){this.actions.push({method:"setLineWidth",data:[e]})}set miterLimit(e){this.actions.push({method:"setMiterLimit",data:[e]})}set textBaseline(e){this.actions.push({method:"setTextBaseline",data:[e]})}},map:class{constructor(e,t){this.id=e,this.pageId=t}getCenterLocation(e){_g(this.id,this.pageId,"getCenterLocation",e)}moveToLocation(e){_g(this.id,this.pageId,"moveToLocation",e)}getScale(e){_g(this.id,this.pageId,"getScale",e)}getRegion(e){_g(this.id,this.pageId,"getRegion",e)}includePoints(e){_g(this.id,this.pageId,"includePoints",e)}translateMarker(e){_g(this.id,this.pageId,"translateMarker",e)}$getAppMap(){}addCustomLayer(e){_g(this.id,this.pageId,"addCustomLayer",e)}removeCustomLayer(e){_g(this.id,this.pageId,"removeCustomLayer",e)}addGroundOverlay(e){_g(this.id,this.pageId,"addGroundOverlay",e)}removeGroundOverlay(e){_g(this.id,this.pageId,"removeGroundOverlay",e)}updateGroundOverlay(e){_g(this.id,this.pageId,"updateGroundOverlay",e)}initMarkerCluster(e){_g(this.id,this.pageId,"initMarkerCluster",e)}addMarkers(e){_g(this.id,this.pageId,"addMarkers",e)}removeMarkers(e){_g(this.id,this.pageId,"removeMarkers",e)}moveAlong(e){_g(this.id,this.pageId,"moveAlong",e)}setLocMarkerIcon(e){_g(this.id,this.pageId,"setLocMarkerIcon",e)}openMapApp(e){_g(this.id,this.pageId,"openMapApp",e)}on(e,t){_g(this.id,this.pageId,"on",{name:e,callback:t})}},video:fg,editor:class{constructor(e,t){this.id=e,this.pageId=t}format(e,t){this._exec("format",{name:e,value:t})}insertDivider(){this._exec("insertDivider")}insertImage(e){this._exec("insertImage",e)}insertText(e){this._exec("insertText",e)}setContents(e){this._exec("setContents",e)}getContents(e){this._exec("getContents",e)}clear(e){this._exec("clear",e)}removeFormat(e){this._exec("removeFormat",e)}undo(e){this._exec("undo",e)}redo(e){this._exec("redo",e)}blur(e){this._exec("blur",e)}getSelectionText(e){this._exec("getSelectionText",e)}scrollIntoView(e){this._exec("scrollIntoView",e)}_exec(e,t){!function(e,t,n,o){const i={options:o},s=o&&("success"in o||"fail"in o||"complete"in o);if(s){const e=String(Ag++);i.callbackId=e,Rg[e]=o}aT.invokeViewMethod(`editor.${e}`,{type:n,data:i},t,(({callbackId:e,data:t})=>{s&&(Je(Rg[e],t),delete Rg[e])}))}(this.id,this.pageId,e,t)}}};function Ng(e){if(e&&e.contextInfo){const{id:t,type:n,page:o}=e.contextInfo,i=Og[n];e.context=new i(t,o),delete e.contextInfo}}class Pg{constructor(e,t,n,o){this._selectorQuery=e,this._component=t,this._selector=n,this._single=o}boundingClientRect(e){return this._selectorQuery._push(this._selector,this._component,this._single,{id:!0,dataset:!0,rect:!0,size:!0},e),this._selectorQuery}fields(e,t){return this._selectorQuery._push(this._selector,this._component,this._single,e,t),this._selectorQuery}scrollOffset(e){return this._selectorQuery._push(this._selector,this._component,this._single,{id:!0,dataset:!0,scrollOffset:!0},e),this._selectorQuery}context(e){return this._selectorQuery._push(this._selector,this._component,this._single,{context:!0},e),this._selectorQuery}node(e){return this._selectorQuery._push(this._selector,this._component,this._single,{node:!0},e),this._selectorQuery}}class wg{constructor(e){this._component=void 0,this._page=e,this._queue=[],this._queueCb=[]}exec(e){return yf(this._page,this._queue,(t=>{const n=this._queueCb;t.forEach(((e,t)=>{h(e)?e.forEach(Ng):Ng(e);const o=n[t];m(o)&&o.call(this,e)})),m(e)&&e.call(this,t)})),this._nodesRef}in(e){return this._component=xe(e),this}select(e){return this._nodesRef=new Pg(this,this._component,e,!0)}selectAll(e){return this._nodesRef=new Pg(this,this._component,e,!1)}selectViewport(){return this._nodesRef=new Pg(this,null,"",!0)}_push(e,t,n,o,i){this._queue.push({component:t,selector:e,single:n,fields:o}),this._queueCb.push(i)}}const Gg=zf(0,(e=>((e=xe(e))&&!eh(e)&&(e=null),new wg(e||ih())))),Ug={formatArgs:{}},xg={duration:400,timingFunction:"linear",delay:0,transformOrigin:"50% 50% 0"};class Fg{constructor(e){this.actions=[],this.currentTransform={},this.currentStepAnimates=[],this.option=u({},xg,e)}_getOption(e){const t={transition:u({},this.option,e),transformOrigin:""};return t.transformOrigin=t.transition.transformOrigin,delete t.transition.transformOrigin,t}_pushAnimates(e,t){this.currentStepAnimates.push({type:e,args:t})}_converType(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}_getValue(e){return"number"==typeof e?`${e}px`:e}export(){const e=this.actions;return this.actions=[],{actions:e}}step(e){return this.currentStepAnimates.forEach((e=>{"style"!==e.type?this.currentTransform[e.type]=e:this.currentTransform[`${e.type}.${e.args[0]}`]=e})),this.actions.push({animates:Object.values(this.currentTransform),option:this._getOption(e)}),this.currentStepAnimates=[],this}}const qg=Ye((()=>{const e=["opacity","backgroundColor"],t=["width","height","left","right","top","bottom"];["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"].concat(e,t).forEach((n=>{Fg.prototype[n]=function(...o){return e.concat(t).includes(n)?this._pushAnimates("style",[this._converType(n),t.includes(n)?this._getValue(o[0]):o[0]]):this._pushAnimates(n,o),this}}))})),Vg=zf(0,(e=>(qg(),new Fg(e))),0,Ug),Bg=zf(0,(()=>{const e=lI();return e&&e.$vm?e.$vm.$locale:Zd().getLocale()})),Hg={[ge]:[],[fe]:[],[pe]:[],[le]:[],[de]:[]};const Kg=zf(0,(()=>u({},$_)));let jg,$g,Wg;const Yg=[];const zg=Xf("getPushClientId",((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{var e,o;void 0===Wg&&(Wg=!1,jg="",$g="uniPush is not enabled"),Yg.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==jg&&(e=jg,o=$g,Yg.forEach((t=>{t(e,o)})),Yg.length=0)}))})),Xg=e=>{},Jg=e=>{},Zg={formatArgs:{showToast:!0},beforeInvoke(){ap()},beforeSuccess(e,t){if(!t.showToast)return;const{t:n}=Zd(),o=n("uni.setClipboardData.success");o&&iC({title:o,icon:"success",mask:!1})}},Qg=(Boolean,{formatArgs:{filePath(e,t){t.filePath=of(e)}}}),e_={formatArgs:{count(e,t){(!e||e<=0)&&(t.count=9)},sizeType(e,t){t.sizeType=Sf(e,If)},sourceType(e,t){t.sourceType=Sf(e,Mf)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}},t_={formatArgs:{sourceType(e,t){t.sourceType=Sf(e,Mf)},compressed:!0,maxDuration:60,camera:"back",extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}},n_=(Boolean,["all","image","video"]),o_={formatArgs:{count(e,t){(!e||e<=0)&&(t.count=100)},sourceType(e,t){t.sourceType=Sf(e,Mf)},type(e,t){t.type=Tf(e,n_)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=[""])}}},i_={formatArgs:{src(e,t){t.src=of(e)}}},s_={formatArgs:{urls(e,t){t.urls=e.map((e=>v(e)&&e?of(e):""))},current(e,t){"number"==typeof e?t.current=e>0&&e<t.urls.length?e:0:v(e)&&e&&(t.current=of(e))}}},a_="json",r_=["text","arraybuffer"],c_=encodeURIComponent;ArrayBuffer,Boolean;const u_={formatArgs:{method(e,t){t.method=Tf((e||"").toUpperCase(),Cf)},data(e,t){t.data=e||""},url(e,t){t.method===Cf[0]&&S(t.data)&&Object.keys(t.data).length&&(t.url=function(e,t){let n=e.split("#");const o=n[1]||"";n=n[0].split("?");let i=n[1]||"";e=n[0];const s=i.split("&").filter((e=>e)),a={};s.forEach((e=>{const t=e.split("=");a[t[0]]=t[1]}));for(const r in t)if(p(t,r)){let e=t[r];null==e?e="":S(e)&&(e=JSON.stringify(e)),a[c_(r)]=c_(e)}return i=Object.keys(a).map((e=>`${e}=${a[e]}`)).join("&"),e+(i?"?"+i:"")+(o?"#"+o:"")}(e,t.data))},header(e,t){const n=t.header=e||{};t.method!==Cf[0]&&(Object.keys(n).find((e=>"content-type"===e.toLowerCase()))||(n["Content-Type"]="application/json"))},dataType(e,t){t.dataType=(e||a_).toLowerCase()},responseType(e,t){t.responseType=(e||"").toLowerCase(),-1===r_.indexOf(t.responseType)&&(t.responseType="text")}}},l_={formatArgs:{header(e,t){t.header=e||{}}}},d_={formatArgs:{filePath(e,t){e&&(t.filePath=of(e))},header(e,t){t.header=e||{}},formData(e,t){t.formData=e||{}}}},p_={formatArgs:{header(e,t){t.header=e||{}},method(e,t){t.method=Tf((e||"").toUpperCase(),Cf)},protocols(e,t){v(e)&&(t.protocols=[e])}}};const h_={url:{type:String,required:!0}},f_="navigateTo",g_="redirectTo",__="reLaunch",m_="switchTab",v_="preloadPage",y_=(S_(["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"]),S_(["slide-out-right","slide-out-left","slide-out-top","slide-out-bottom","fade-out","zoom-in","zoom-fade-in","pop-out","none"]),k_(f_)),I_=k_(g_),M_=k_(__),C_=k_(m_),T_={formatArgs:{delta(e,t){e=parseInt(e+"")||1,t.delta=Math.min(xy().length-1,e)}}};function S_(e){return{animationType:{type:String,validator(t){if(t&&-1===e.indexOf(t))return"`"+t+"` is not supported for `animationType` (supported values are: `"+e.join("`|`")+"`)"}},animationDuration:{type:Number}}}let E_;function D_(){E_=""}function k_(e){return{formatArgs:{url:L_(e)},beforeAll:D_}}function L_(e){return function(t,n){if(!t)return'Missing required args: "url"';const o=(t=function(e){if(0===e.indexOf("/"))return e;let t="";const n=xy();return n.length&&(t=n[n.length-1].$page.route),ph(t,e)}(t)).split("?")[0],i=hh(o,!0);if(!i)return"page `"+t+"` is not found";if(e===f_||e===g_){if(i.meta.isTabBar)return`can not ${e} a tabbar page`}else if(e===m_&&!i.meta.isTabBar)return"can not switch to no-tabBar page";if(e!==m_&&e!==v_||!i.meta.isTabBar||"appLaunch"===n.openType||(t=o),i.meta.isEntry&&(t=t.replace(i.alias,"/")),n.url=function(e){if(!v(e))return e;const t=e.indexOf("?");if(-1===t)return e;const n=e.slice(t+1).trim().replace(/^(\?|#|&)/,"");if(!n)return e;e=e.slice(0,t);const o=[];return n.split("&").forEach((e=>{const t=e.replace(/\+/g," ").split("="),n=t.shift(),i=t.length>0?t.join("="):"";o.push(n+"="+encodeURIComponent(i))})),o.length?e+"?"+o.join("&"):e}(t),"unPreloadPage"!==e)if(e!==v_){if(E_===t&&"appLaunch"!==n.openType)return`${E_} locked`;__uniConfig.ready&&(E_=t)}else if(i.meta.isTabBar){const e=xy(),t=i.path.slice(1);if(e.find((e=>e.route===t)))return"tabBar page `"+t+"` already exists"}}}const b_="setNavigationBarTitle",A_={formatArgs:{duration:300}},R_={formatArgs:{itemColor:"#000"}},O_=(Boolean,{formatArgs:{title:"",mask:!1}}),N_=(Boolean,{beforeInvoke(){ip()},formatArgs:{title:"",content:"",placeholderText:"",showCancel:!0,editable:!1,cancelText(e,t){if(!p(t,"cancelText")){const{t:e}=Zd();t.cancelText=e("uni.showModal.cancel")}},cancelColor:"#000",confirmText(e,t){if(!p(t,"confirmText")){const{t:e}=Zd();t.confirmText=e("uni.showModal.confirm")}},confirmColor:re}}),P_=["success","loading","none","error"],w_=(Boolean,{formatArgs:{title:"",icon(e,t){t.icon=Tf(e,P_)},image(e,t){t.image=e?of(e):""},duration:1500,mask:!1}}),G_="stopPullDownRefresh",U_="hideTabBar",x_=function(){if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(){for(var e=window.document,t=i(e);t;)t=i(e=t.ownerDocument);return e}(),t=[],n=null,o=null;a.prototype.THROTTLE_TIMEOUT=100,a.prototype.POLL_INTERVAL=null,a.prototype.USE_MUTATION_OBSERVER=!0,a._setupCrossOriginUpdater=function(){return n||(n=function(e,n){o=e&&n?d(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach((function(e){e._checkForIntersections()}))}),n},a._resetCrossOriginUpdater=function(){n=null,o=null},a.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},a.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},a.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},a.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},a.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},a.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},a.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var o=this._checkForIntersections,s=null,a=null;this.POLL_INTERVAL?s=n.setInterval(o,this.POLL_INTERVAL):(r(n,"resize",o,!0),r(t,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(a=new n.MutationObserver(o)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var e=t.defaultView;e&&(s&&e.clearInterval(s),c(e,"resize",o,!0)),c(t,"scroll",o,!0),a&&a.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||e;if(t!=u){var l=i(t);l&&this._monitorIntersections(l.ownerDocument)}}},a.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var o=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some((function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=o;){var s=i(n);if((n=s&&s.ownerDocument)==t)return!0}return!1}))){var s=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),s(),t!=o){var a=i(t);a&&this._unmonitorIntersections(a.ownerDocument)}}}},a.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},a.prototype._checkForIntersections=function(){if(this.root||!n||o){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(o){var i=o.element,a=u(i),r=this._rootContainsTarget(i),c=o.entry,l=e&&r&&this._computeTargetAndRootIntersection(i,a,t),d=null;this._rootContainsTarget(i)?n&&!this.root||(d=t):d={top:0,bottom:0,left:0,right:0,width:0,height:0};var p=o.entry=new s({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:a,rootBounds:d,intersectionRect:l});c?e&&r?this._hasCrossedThreshold(c,p)&&this._queuedEntries.push(p):c&&c.isIntersecting&&this._queuedEntries.push(p):this._queuedEntries.push(p)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},a.prototype._computeTargetAndRootIntersection=function(t,i,s){if("none"!=window.getComputedStyle(t).display){for(var a,r,c,l,p,f,g,_,m=i,v=h(t),y=!1;!y&&v;){var I=null,M=1==v.nodeType?window.getComputedStyle(v):{};if("none"==M.display)return null;if(v==this.root||9==v.nodeType)if(y=!0,v==this.root||v==e)n&&!this.root?!o||0==o.width&&0==o.height?(v=null,I=null,m=null):I=o:I=s;else{var C=h(v),T=C&&u(C),S=C&&this._computeTargetAndRootIntersection(C,T,s);T&&S?(v=C,I=d(T,S)):(v=null,m=null)}else{var E=v.ownerDocument;v!=E.body&&v!=E.documentElement&&"visible"!=M.overflow&&(I=u(v))}if(I&&(a=I,r=m,c=void 0,l=void 0,p=void 0,f=void 0,g=void 0,_=void 0,c=Math.max(a.top,r.top),l=Math.min(a.bottom,r.bottom),p=Math.max(a.left,r.left),f=Math.min(a.right,r.right),_=l-c,m=(g=f-p)>=0&&_>=0&&{top:c,bottom:l,left:p,right:f,width:g,height:_}||null),!m)break;v=v&&h(v)}return m}},a.prototype._getRootRect=function(){var t;if(this.root&&!f(this.root))t=u(this.root);else{var n=f(this.root)?this.root:e,o=n.documentElement,i=n.body;t={top:0,left:0,right:o.clientWidth||i.clientWidth,width:o.clientWidth||i.clientWidth,bottom:o.clientHeight||i.clientHeight,height:o.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},a.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},a.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,o=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var s=this.thresholds[i];if(s==n||s==o||s<n!=s<o)return!0}},a.prototype._rootIsInDom=function(){return!this.root||p(e,this.root)},a.prototype._rootContainsTarget=function(t){var n=this.root&&(this.root.ownerDocument||this.root)||e;return p(n,t)&&(!this.root||n==t.ownerDocument)},a.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},a.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=a,window.IntersectionObserverEntry=s}function i(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(aL){return null}}function s(e){this.time=e.time,this.target=e.target,this.rootBounds=l(e.rootBounds),this.boundingClientRect=l(e.boundingClientRect),this.intersectionRect=l(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,o=this.intersectionRect,i=o.width*o.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function a(e,t){var n,o,i,s=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(s.root&&1!=s.root.nodeType&&9!=s.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),o))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(s.rootMargin),this.thresholds=this._initThresholds(s.threshold),this.root=s.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function r(e,t,n,o){"function"==typeof e.addEventListener?e.addEventListener(t,n,o||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function c(e,t,n,o){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,o||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function u(e){var t;try{t=e.getBoundingClientRect()}catch(n){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function d(e,t){var n=t.top-e.top,o=t.left-e.left;return{top:n,left:o,height:t.height,width:t.width,bottom:n+t.height,right:o+t.width}}function p(e,t){for(var n=t;n;){if(n==e)return!0;n=h(n)}return!1}function h(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?i(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function f(e){return e&&9===e.nodeType}};function F_(e){const{bottom:t,height:n,left:o,right:i,top:s,width:a}=e||{};return{bottom:t,height:n,left:o,right:i,top:s,width:a}}function q_(e){const{intersectionRatio:t,boundingClientRect:{height:n,width:o},intersectionRect:{height:i,width:s}}=e;return 0!==t?t:i===n?s/o:i/n}const V_={};function B_(e,t){const n=V_[e];return n?Promise.resolve(n):/^data:[a-z-]+\/[a-z-]+;base64,/.test(e)?Promise.resolve(function(e){const t=e.split(","),n=t[0].match(/:(.*?);/),o=n?n[1]:"",i=atob(t[1]);let s=i.length;const a=new Uint8Array(s);for(;s--;)a[s]=i.charCodeAt(s);return H_(a,o)}(e)):t?Promise.reject(new Error("not find")):new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){t(this.response)},o.onerror=n,o.send()}))}function H_(e,t){let n;if(e instanceof File)n=e;else{t=t||e.type||"";const i=`${Date.now()}${function(e){const t=e.split("/")[1];return t?`.${t}`:""}(t)}`;try{n=new File([e],i,{type:t})}catch(o){n=e=e instanceof Blob?e:new Blob([e],{type:t}),n.name=n.name||i}}return n}function K_(e){for(const n in V_)if(p(V_,n)){if(V_[n]===e)return n}var t=(window.URL||window.webkitURL).createObjectURL(e);return V_[t]=e,t}function j_(e){(window.URL||window.webkitURL).revokeObjectURL(e),delete V_[e]}const $_=wh(),W_=wh();const Y_=Fh({name:"ResizeSensor",props:{initial:{type:Boolean,default:!1}},emits:["resize"],setup(e,{emit:t}){const n=Zn(null),o=function(e){return()=>{const{firstElementChild:t,lastElementChild:n}=e.value;t.scrollLeft=1e5,t.scrollTop=1e5,n.scrollLeft=1e5,n.scrollTop=1e5}}(n),i=function(e,t,n){const o=wn({width:-1,height:-1});return Di((()=>u({},o)),(e=>t("resize",e))),()=>{const t=e.value;t&&(o.width=t.offsetWidth,o.height=t.offsetHeight,n())}}(n,t,o);return function(e,t,n,o){ts(o),hs((()=>{t.initial&&Oo(n);const i=e.value;i.offsetParent!==i.parentElement&&(i.parentElement.style.position="relative"),"AnimationEvent"in window||o()}))}(n,e,i,o),()=>dr("uni-resize-sensor",{ref:n,onAnimationstartOnce:i},[dr("div",{onScroll:i},[dr("div",null,null)],40,["onScroll"]),dr("div",{onScroll:i},[dr("div",null,null)],40,["onScroll"])],40,["onAnimationstartOnce"])}});const z_=$p("ucg"),X_=Fh({name:"CheckboxGroup",props:{name:{type:String,default:""}},emits:["change"],setup(e,{emit:t,slots:n}){const o=Zn(null);return function(e,t){const n=[],o=()=>n.reduce(((e,t)=>(t.value.checkboxChecked&&e.push(t.value.value),e)),new Array);ua(z_,{addField(e){n.push(e)},removeField(e){n.splice(n.indexOf(e),1)},checkboxChange(e){t("change",e,{value:o()})}});const i=la($h,!1);i&&i.addField({submit:()=>{let t=["",null];return""!==e.name&&(t[0]=e.name,t[1]=o()),t}})}(e,Bh(o,t)),()=>dr("uni-checkbox-group",{ref:o},[n.default&&n.default()],512)}});const J_=Fh({name:"Checkbox",props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},value:{type:String,default:""},color:{type:String,default:"#007aff"},backgroundColor:{type:String,default:""},borderColor:{type:String,default:""},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},iconColor:{type:String,default:""},foreColor:{type:String,default:""}},setup(e,{slots:t}){const n=Zn(null),o=Zn(e.checked),i=Hr((()=>"true"===o.value||!0===o.value)),s=Zn(e.value);const a=Hr((()=>function(t){if(e.disabled)return{backgroundColor:"#E1E1E1",borderColor:"#D1D1D1"};const n={};return t?(e.activeBorderColor&&(n.borderColor=e.activeBorderColor),e.activeBackgroundColor&&(n.backgroundColor=e.activeBackgroundColor)):(e.borderColor&&(n.borderColor=e.borderColor),e.backgroundColor&&(n.backgroundColor=e.backgroundColor)),n}(i.value)));Di([()=>e.checked,()=>e.value],(([e,t])=>{o.value=e,s.value=t}));const{uniCheckGroup:r,uniLabel:c}=function(e,t,n){const o=Hr((()=>({checkboxChecked:Boolean(e.value),value:t.value}))),i={reset:n},s=la(z_,!1);s&&s.addField(o);const a=la($h,!1);a&&a.addField(i);const r=la(zh,!1);return _s((()=>{s&&s.removeField(o),a&&a.removeField(i)})),{uniCheckGroup:s,uniForm:a,uniLabel:r}}(o,s,(()=>{o.value=!1})),u=t=>{e.disabled||(o.value=!o.value,r&&r.checkboxChange(t),t.stopPropagation())};return c&&(c.addHandler(u),_s((()=>{c.removeHandler(u)}))),Jh(e,{"label-click":u}),()=>{const i=jh(e,"disabled");let s;return s=o.value,dr("uni-checkbox",Ir(i,{id:e.id,onClick:u,ref:n}),[dr("div",{class:"uni-checkbox-wrapper",style:{"--HOVER-BD-COLOR":e.activeBorderColor}},[dr("div",{class:["uni-checkbox-input",{"uni-checkbox-input-disabled":e.disabled}],style:a.value},[s?Zp(zp,e.disabled?"#ADADAD":e.foreColor||e.iconColor||e.color,22):""],6),t.default&&t.default()],4)],16,["id","onClick"])}}});function Z_(){}const Q_={cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:[Boolean,String],default:!0},autoBlur:{type:[Boolean,String],default:!1}};function em(e,t,n){function o(e){const t=Hr((()=>0===String(navigator.vendor).indexOf("Apple")));e.addEventListener("focus",(()=>{clearTimeout(undefined),document.addEventListener("click",Z_,!1)}));e.addEventListener("blur",(()=>{t.value&&e.blur(),document.removeEventListener("click",Z_,!1),t.value&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)}))}Di((()=>t.value),(e=>e&&o(e)))}var tm=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,nm=/^<\/([-A-Za-z0-9_]+)[^>]*>/,om=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,im=lm("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),sm=lm("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),am=lm("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),rm=lm("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),cm=lm("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),um=lm("script,style");function lm(e){for(var t={},n=e.split(","),o=0;o<n.length;o++)t[n[o]]=!0;return t}const dm={src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1},draggable:{type:Boolean,default:!1}},pm={widthFix:["offsetWidth","height",(e,t)=>e/t],heightFix:["offsetHeight","width",(e,t)=>e*t]},hm={aspectFit:["center center","contain"],aspectFill:["center center","cover"],widthFix:[,"100% 100%"],heightFix:[,"100% 100%"],top:["center top"],bottom:["center bottom"],center:["center center"],left:["left center"],right:["right center"],"top left":["left top"],"top right":["right top"],"bottom left":["left bottom"],"bottom right":["right bottom"]},fm=Fh({name:"Image",props:dm,setup(e,{emit:t}){const n=Zn(null),o=function(e,t){const n=Zn(""),o=Hr((()=>{let e="auto",o="";const i=hm[t.mode];return i?(i[0]&&(o=i[0]),i[1]&&(e=i[1])):(o="0% 0%",e="100% 100%"),`background-image:${n.value?'url("'+n.value+'")':"none"};background-position:${o};background-size:${e};`})),i=wn({rootEl:e,src:Hr((()=>t.src?of(t.src):"")),origWidth:0,origHeight:0,origStyle:{width:"",height:""},modeStyle:o,imgSrc:n});return hs((()=>{const t=e.value;i.origWidth=t.clientWidth||0,i.origHeight=t.clientHeight||0})),i}(n,e),i=Bh(n,t),{fixSize:s}=function(e,t,n){const o=()=>{const{mode:o}=t,i=pm[o];if(!i)return;const{origWidth:s,origHeight:a}=n,r=s&&a?s/a:0;if(!r)return;const c=e.value,u=c[i[0]];u&&(c.style[i[1]]=function(e){gm&&e>10&&(e=2*Math.round(e/2));return e}(i[2](u,r))+"px")},i=()=>{const{style:t}=e.value,{origStyle:{width:o,height:i}}=n;t.width=o,t.height=i};return Di((()=>t.mode),((e,t)=>{pm[t]&&i(),pm[e]&&o()})),{fixSize:o,resetSize:i}}(n,e,o);return function(e,t,n,o,i){let s,a;const r=(t=0,n=0,o="")=>{e.origWidth=t,e.origHeight=n,e.imgSrc=o},c=c=>{if(!c)return u(),void r();s=s||new Image,s.onload=e=>{const{width:l,height:d}=s;r(l,d,c),Oo((()=>{o()})),s.draggable=t.draggable,a&&a.remove(),a=s,n.value.appendChild(s),u(),i("load",e,{width:l,height:d})},s.onerror=t=>{r(),u(),i("error",t,{errMsg:`GET ${e.src} 404 (Not Found)`})},s.src=c},u=()=>{s&&(s.onload=null,s.onerror=null,s=null)};Di((()=>e.src),(e=>c(e))),Di((()=>e.imgSrc),(e=>{!e&&a&&(a.remove(),a=null)})),hs((()=>c(e.src))),_s((()=>u()))}(o,e,n,s,i),()=>dr("uni-image",{ref:n},[dr("div",{style:o.modeStyle},null,4),pm[e.mode]?dr(Y_,{onResize:s},null,8,["onResize"]):dr("span",null,null)],512)}});const gm="Google Inc."===navigator.vendor;const _m=ot(!0),mm=[];let vm=0,ym=!1;const Im=e=>mm.forEach((t=>t.userAction=e));function Mm(e={userAction:!1}){if(!ym){["touchstart","touchmove","touchend","mousedown","mouseup"].forEach((e=>{document.addEventListener(e,(function(){!vm&&Im(!0),vm++,setTimeout((()=>{! --vm&&Im(!1)}),0)}),_m)})),ym=!0}mm.push(e)}const Cm=()=>!!vm;function Tm(){const e=wn({userAction:!1});return hs((()=>{Mm(e)})),_s((()=>{!function(e){const t=mm.indexOf(e);t>=0&&mm.splice(t,1)}(e)})),{state:e}}function Sm(){const e=wn({attrs:{}});return hs((()=>{let t=Dr();for(;t;){const n=t.type.__scopeId;n&&(e.attrs[n]=""),t=t.proxy&&"page"===t.proxy.$mpType?null:t.parent}})),{state:e}}function Em(e,t){const n=document.activeElement;if(!n)return t({});const o={};["input","textarea"].includes(n.tagName.toLowerCase())&&(o.start=n.selectionStart,o.end=n.selectionEnd),t(o)}function Dm(e,t,n){"number"===t&&isNaN(Number(e))&&(e="");const o=null==e?"":String(e);return null==n?o:o.slice(0,n)}const km=["none","text","decimal","numeric","tel","search","email","url"],Lm=u({},{name:{type:String,default:""},modelValue:{type:[String,Number]},value:{type:[String,Number]},disabled:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:""},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},confirmHold:{type:Boolean,default:!1},ignoreCompositionEvent:{type:Boolean,default:!0},step:{type:String,default:"0.000000000000000001"},inputmode:{type:String,default:void 0,validator:e=>!!~km.indexOf(e)},cursorColor:{type:String,default:""}},Q_),bm=["input","focus","blur","update:value","update:modelValue","update:focus","compositionstart","compositionupdate","compositionend","keyboardheightchange"];function Am(e,t,n,o){let i=null;i=ut((n=>{t.value=Dm(n,e.type)}),100,{setTimeout:setTimeout,clearTimeout:clearTimeout}),Di((()=>e.modelValue),i),Di((()=>e.value),i);const s=function(e,t){let n,o,i=0;const s=function(...s){const a=Date.now();clearTimeout(n),o=()=>{o=null,i=a,e.apply(this,s)},a-i<t?n=setTimeout(o,t-(a-i)):o()};return s.cancel=function(){clearTimeout(n),o=null},s.flush=function(){clearTimeout(n),o&&o()},s}(((e,t)=>{i.cancel(),n("update:modelValue",t.value),n("update:value",t.value),o("input",e,t)}),100);return ps((()=>{i.cancel(),s.cancel()})),{trigger:o,triggerInput:(e,t,n)=>{i.cancel(),s(e,t),n&&s.flush()}}}function Rm(e,t){Tm();const n=Hr((()=>e.autoFocus||e.focus));function o(){if(!n.value)return;const e=t.value;e?e.focus():setTimeout(o,100)}Di((()=>e.focus),(e=>{e?o():function(){const e=t.value;e&&e.blur()}()})),hs((()=>{n.value&&Oo(o)}))}function Om(e,t,n,o){gp(oh(),"getSelectedTextRange",Em);const{fieldRef:i,state:s,trigger:a}=function(e,t,n){const o=Zn(null),i=Bh(t,n),s=Hr((()=>{const t=Number(e.selectionStart);return isNaN(t)?-1:t})),a=Hr((()=>{const t=Number(e.selectionEnd);return isNaN(t)?-1:t})),r=Hr((()=>{const t=Number(e.cursor);return isNaN(t)?-1:t})),c=Hr((()=>{var t=Number(e.maxlength);return isNaN(t)?140:t}));let u="";u=Dm(e.modelValue,e.type)||Dm(e.value,e.type);const l=wn({value:u,valueOrigin:u,maxlength:c,focus:e.focus,composing:!1,selectionStart:s,selectionEnd:a,cursor:r});return Di((()=>l.focus),(e=>n("update:focus",e))),Di((()=>l.maxlength),(e=>l.value=l.value.slice(0,e)),{immediate:!1}),{fieldRef:o,state:l,trigger:i}}(e,t,n),{triggerInput:r}=Am(e,s,n,a);Rm(e,i),em(0,i);const{state:c}=Sm();!function(e,t){const n=la($h,!1);if(!n)return;const o=Dr(),i={submit(){const n=o.proxy;return[n[e],v(t)?n[t]:t.value]},reset(){v(t)?o.proxy[t]="":t.value=""}};n.addField(i),_s((()=>{n.removeField(i)}))}("name",s),function(e,t,n,o,i,s){function a(){const n=e.value;n&&t.focus&&t.selectionStart>-1&&t.selectionEnd>-1&&"number"!==n.type&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd)}function r(){const n=e.value;n&&t.focus&&t.selectionStart<0&&t.selectionEnd<0&&t.cursor>-1&&"number"!==n.type&&(n.selectionEnd=n.selectionStart=t.cursor)}function c(e){return"number"===e.type?null:e.selectionEnd}Di([()=>t.selectionStart,()=>t.selectionEnd],a),Di((()=>t.cursor),r),Di((()=>e.value),(function(){const u=e.value;if(!u)return;const l=function(e,o){e.stopPropagation(),m(s)&&!1===s(e,t)||(t.value=u.value,t.composing&&n.ignoreCompositionEvent||i(e,{value:u.value,cursor:c(u)},o))};function d(e){n.ignoreCompositionEvent||o(e.type,e,{value:e.data})}u.addEventListener("change",(e=>e.stopPropagation())),u.addEventListener("focus",(function(e){t.focus=!0,o("focus",e,{value:t.value}),a(),r()})),u.addEventListener("blur",(function(e){t.composing&&(t.composing=!1,l(e,!0)),t.focus=!1,o("blur",e,{value:t.value,cursor:c(e.target)})})),u.addEventListener("input",l),u.addEventListener("compositionstart",(e=>{e.stopPropagation(),t.composing=!0,d(e)})),u.addEventListener("compositionend",(e=>{e.stopPropagation(),t.composing&&(t.composing=!1,l(e)),d(e)})),u.addEventListener("compositionupdate",d)}))}(i,s,e,a,r,o);return{fieldRef:i,state:s,scopedAttrsState:c,fixDisabledColor:0===String(navigator.vendor).indexOf("Apple")&&CSS.supports("image-orientation:from-image"),trigger:a}}function Nm(e,t,n,o,i){if(t.value)if("."===e.data){if("."===t.value.slice(-1))return n.value=o.value=t.value=t.value.slice(0,-1),!1;if(t.value&&!t.value.includes("."))return t.value+=".",i&&(i.fn=()=>{n.value=o.value=t.value=t.value.slice(0,-1),o.removeEventListener("blur",i.fn)},o.addEventListener("blur",i.fn)),!1}else if("deleteContentBackward"===e.inputType&&navigator.userAgent.includes("iPhone OS 16")&&"."===t.value.slice(-2,-1))return t.value=n.value=o.value=t.value.slice(0,-2),!0}const Pm=Fh({name:"Input",props:u({},Lm,{placeholderClass:{type:String,default:"input-placeholder"},textContentType:{type:String,default:""}}),emits:["confirm",...bm],setup(e,{emit:t,expose:n}){const o=["text","number","idcard","digit","password","tel"],i=["off","one-time-code"],s=Hr((()=>{let t="";switch(e.type){case"text":t="text","search"===e.confirmType&&(t="search");break;case"idcard":t="text";break;case"digit":t="number";break;default:t=~o.includes(e.type)?e.type:"text"}return e.password?"password":t})),a=Hr((()=>{const t=i.indexOf(e.textContentType),n=i.indexOf(R(e.textContentType));return i[-1!==t?t:-1!==n?n:0]}));let r=function(e,t){if("number"===t.value){const t=void 0===e.modelValue?e.value:e.modelValue,n=Zn(null!=t?t.toLocaleString():"");return Di((()=>e.modelValue),(e=>{n.value=null!=e?e.toLocaleString():""})),Di((()=>e.value),(e=>{n.value=null!=e?e.toLocaleString():""})),n}return Zn("")}(e,s),c={fn:null};const u=Zn(null),{fieldRef:l,state:d,scopedAttrsState:p,fixDisabledColor:h,trigger:f}=Om(e,u,t,((e,t)=>{const n=e.target;if("number"===s.value){if(c.fn&&(n.removeEventListener("blur",c.fn),c.fn=null),n.validity&&!n.validity.valid){if((!r.value||!n.value)&&"-"===e.data||"-"===r.value[0]&&"deleteContentBackward"===e.inputType)return r.value="-",t.value="",c.fn=()=>{r.value=n.value=""},n.addEventListener("blur",c.fn),!1;const o=Nm(e,r,t,n,c);return"boolean"==typeof o?o:(r.value=t.value=n.value="-"===r.value?"":r.value,!1)}{const o=Nm(e,r,t,n,c);if("boolean"==typeof o)return o;r.value=n.value}const o=t.maxlength;if(o>0&&n.value.length>o)return n.value=n.value.slice(0,o),t.value=n.value,!1}}));Di((()=>d.value),(t=>{"number"!==e.type||"-"===r.value&&""===t||(r.value=t.toString())}));const g=["number","digit"],_=Hr((()=>g.includes(e.type)?e.step:""));function m(t){if("Enter"!==t.key)return;const n=t.target;t.stopPropagation(),f("confirm",t,{value:n.value}),!e.confirmHold&&n.blur()}return n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),d.value=e.value}}),()=>{let t=e.disabled&&h?dr("input",{key:"disabled-input",ref:l,value:d.value,tabindex:"-1",readonly:!!e.disabled,type:s.value,maxlength:d.maxlength,step:_.value,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},onFocus:e=>e.target.blur()},null,44,["value","readonly","type","maxlength","step","onFocus"]):dr("input",{key:"input",ref:l,value:d.value,onInput:e=>{d.value=e.target.value.toString()},disabled:!!e.disabled,type:s.value,maxlength:d.maxlength,step:_.value,enterkeyhint:e.confirmType,pattern:"number"===e.type?"[0-9]*":void 0,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},autocomplete:a.value,onKeyup:m,inputmode:e.inputmode},null,44,["value","onInput","disabled","type","maxlength","step","enterkeyhint","pattern","autocomplete","onKeyup","inputmode"]);return dr("uni-input",{ref:u},[dr("div",{class:"uni-input-wrapper"},[Ri(dr("div",Ir(p.attrs,{style:e.placeholderStyle,class:["uni-input-placeholder",e.placeholderClass]}),[e.placeholder],16),[[Lc,!(d.value.length||"-"===r.value||r.value.includes("."))]]),"search"===e.confirmType?dr("form",{action:"",onSubmit:e=>e.preventDefault(),class:"uni-input-form"},[t],40,["onSubmit"]):t])],512)}}});const wm=["class","style"],Gm=/^on[A-Z]+/,Um=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n=[]}=e,o=Dr(),i=Qn({}),s=Qn({}),a=Qn({}),r=n.concat(wm);return o.attrs=wn(o.attrs),Ci((()=>{const e=(n=o.attrs,Object.keys(n).map((e=>[e,n[e]]))).reduce(((e,[n,o])=>(r.includes(n)?e.exclude[n]=o:Gm.test(n)?(t||(e.attrs[n]=o),e.listeners[n]=o):e.attrs[n]=o,e)),{exclude:{},attrs:{},listeners:{}});var n;i.value=e.attrs,s.value=e.listeners,a.value=e.exclude})),{$attrs:i,$listeners:s,$excludeAttrs:a}};function xm(e){const t=[];return h(e)&&e.forEach((e=>{ir(e)?e.type===ja?t.push(...xm(e.children)):t.push(e):h(e)&&t.push(...xm(e))})),t}const Fm=Fh({inheritAttrs:!1,name:"MovableArea",props:{scaleArea:{type:Boolean,default:!1}},setup(e,{slots:t}){const n=Zn(null),o=Zn(!1);let{setContexts:i,events:s}=function(e,t){const n=Zn(0),o=Zn(0),i=wn({x:null,y:null}),s=Zn(null);let a=null,r=[];function c(t){t&&1!==t&&(e.scaleArea?r.forEach((function(e){e._setScale(t)})):a&&a._setScale(t))}function u(e,n=r){let o=t.value;function i(e){for(let t=0;t<n.length;t++){const o=n[t];if(e===o.rootRef.value)return o}return e===o||e===document.body||e===document?null:i(e.parentNode)}return i(e)}const l=Vh((t=>{let n=t.touches;if(n&&n.length>1){let t={x:n[1].pageX-n[0].pageX,y:n[1].pageY-n[0].pageY};if(s.value=qm(t),i.x=t.x,i.y=t.y,!e.scaleArea){let e=u(n[0].target),t=u(n[1].target);a=e&&e===t?e:null}}})),d=Vh((e=>{let t=e.touches;if(t&&t.length>1){e.preventDefault();let n={x:t[1].pageX-t[0].pageX,y:t[1].pageY-t[0].pageY};if(null!==i.x&&s.value&&s.value>0){c(qm(n)/s.value)}i.x=n.x,i.y=n.y}})),p=Vh((t=>{let n=t.touches;n&&n.length||t.changedTouches&&(i.x=0,i.y=0,s.value=null,e.scaleArea?r.forEach((function(e){e._endScale()})):a&&a._endScale())}));function h(){f(),r.forEach((function(e,t){e.setParent()}))}function f(){let e=window.getComputedStyle(t.value),i=t.value.getBoundingClientRect();n.value=i.width-["Left","Right"].reduce((function(t,n){const o="padding"+n;return t+parseFloat(e["border"+n+"Width"])+parseFloat(e[o])}),0),o.value=i.height-["Top","Bottom"].reduce((function(t,n){const o="padding"+n;return t+parseFloat(e["border"+n+"Width"])+parseFloat(e[o])}),0)}return ua("movableAreaWidth",n),ua("movableAreaHeight",o),{setContexts(e){r=e},events:{_onTouchstart:l,_onTouchmove:d,_onTouchend:p,_resize:h}}}(e,n);const{$listeners:a,$attrs:r,$excludeAttrs:c}=Um(),u=a.value;["onTouchstart","onTouchmove","onTouchend"].forEach((e=>{let t=u[e],n=s[`_${e}`];u[e]=t?[].concat(t,n):n})),hs((()=>{s._resize(),o.value=!0}));let l=[];const d=[];function p(){const e=[];for(let t=0;t<l.length;t++){let n=l[t];n=n.el;const o=d.find((e=>n===e.rootRef.value));o&&e.push(jn(o))}i(e)}return ua("_isMounted",o),ua("movableAreaRootRef",n),ua("addMovableViewContext",(e=>{d.push(e),p()})),ua("removeMovableViewContext",(e=>{const t=d.indexOf(e);t>=0&&(d.splice(t,1),p())})),()=>{const e=t.default&&t.default();return l=xm(e),dr("uni-movable-area",Ir({ref:n},r.value,c.value,u),[dr(Y_,{onResize:s._resize},null,8,["onResize"]),l],16)}}});function qm(e){return Math.sqrt(e.x*e.x+e.y*e.y)}const Vm=function(e,t,n,o){e.addEventListener(t,(e=>{m(n)&&!1===n(e)&&((void 0===e.cancelable||e.cancelable)&&e.preventDefault(),e.stopPropagation())}),{passive:!1})};let Bm,Hm;function Km(e,t,n){_s((()=>{document.removeEventListener("mousemove",Bm),document.removeEventListener("mouseup",Hm)}));let o=0,i=0,s=0,a=0;const r=function(e,n,r,c){if(!1===t({cancelable:e.cancelable,target:e.target,currentTarget:e.currentTarget,preventDefault:e.preventDefault.bind(e),stopPropagation:e.stopPropagation.bind(e),touches:e.touches,changedTouches:e.changedTouches,detail:{state:n,x:r,y:c,dx:r-o,dy:c-i,ddx:r-s,ddy:c-a,timeStamp:e.timeStamp}}))return!1};let c,u,l=null;Vm(e,"touchstart",(function(e){if(c=!0,1===e.touches.length&&!l)return l=e,o=s=e.touches[0].pageX,i=a=e.touches[0].pageY,r(e,"start",o,i)})),Vm(e,"mousedown",(function(e){if(u=!0,!c&&!l)return l=e,o=s=e.pageX,i=a=e.pageY,r(e,"start",o,i)})),Vm(e,"touchmove",(function(e){if(1===e.touches.length&&l){const t=r(e,"move",e.touches[0].pageX,e.touches[0].pageY);return s=e.touches[0].pageX,a=e.touches[0].pageY,t}}));const d=Bm=function(e){if(!c&&u&&l){const t=r(e,"move",e.pageX,e.pageY);return s=e.pageX,a=e.pageY,t}};document.addEventListener("mousemove",d),Vm(e,"touchend",(function(e){if(0===e.touches.length&&l)return c=!1,l=null,r(e,"end",e.changedTouches[0].pageX,e.changedTouches[0].pageY)}));const p=Hm=function(e){if(u=!1,!c&&l)return l=null,r(e,"end",e.pageX,e.pageY)};document.addEventListener("mouseup",p),Vm(e,"touchcancel",(function(e){if(l){c=!1;const t=l;return l=null,r(e,n?"cancel":"end",t.touches[0].pageX,t.touches[0].pageY)}}))}function jm(e,t,n){return e>t-n&&e<t+n}function $m(e,t){return jm(e,0,t)}function Wm(){}function Ym(e,t){this._m=e,this._f=1e3*t,this._startTime=0,this._v=0}function zm(e,t,n){this._m=e,this._k=t,this._c=n,this._solution=null,this._endPosition=0,this._startTime=0}function Xm(e,t,n){this._springX=new zm(e,t,n),this._springY=new zm(e,t,n),this._springScale=new zm(e,t,n),this._startTime=0}Wm.prototype.x=function(e){return Math.sqrt(e)},Ym.prototype.setV=function(e,t){const n=Math.pow(Math.pow(e,2)+Math.pow(t,2),.5);this._x_v=e,this._y_v=t,this._x_a=-this._f*this._x_v/n,this._y_a=-this._f*this._y_v/n,this._t=Math.abs(e/this._x_a)||Math.abs(t/this._y_a),this._lastDt=null,this._startTime=(new Date).getTime()},Ym.prototype.setS=function(e,t){this._x_s=e,this._y_s=t},Ym.prototype.s=function(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),e>this._t&&(e=this._t,this._lastDt=e);let t=this._x_v*e+.5*this._x_a*Math.pow(e,2)+this._x_s,n=this._y_v*e+.5*this._y_a*Math.pow(e,2)+this._y_s;return(this._x_a>0&&t<this._endPositionX||this._x_a<0&&t>this._endPositionX)&&(t=this._endPositionX),(this._y_a>0&&n<this._endPositionY||this._y_a<0&&n>this._endPositionY)&&(n=this._endPositionY),{x:t,y:n}},Ym.prototype.ds=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),e>this._t&&(e=this._t),{dx:this._x_v+this._x_a*e,dy:this._y_v+this._y_a*e}},Ym.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},Ym.prototype.dt=function(){return-this._x_v/this._x_a},Ym.prototype.done=function(){const e=jm(this.s().x,this._endPositionX)||jm(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,e},Ym.prototype.setEnd=function(e,t){this._endPositionX=e,this._endPositionY=t},Ym.prototype.reconfigure=function(e,t){this._m=e,this._f=1e3*t},zm.prototype._solve=function(e,t){const n=this._c,o=this._m,i=this._k,s=n*n-4*o*i;if(0===s){const i=-n/(2*o),s=e,a=t/(i*e);return{x:function(e){return(s+a*e)*Math.pow(Math.E,i*e)},dx:function(e){const t=Math.pow(Math.E,i*e);return i*(s+a*e)*t+a*t}}}if(s>0){const i=(-n-Math.sqrt(s))/(2*o),a=(-n+Math.sqrt(s))/(2*o),r=(t-i*e)/(a-i),c=e-r;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,a*e)),c*t+r*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,a*e)),c*i*t+r*a*n}}}const a=Math.sqrt(4*o*i-n*n)/(2*o),r=-n/2*o,c=e,u=(t-r*e)/a;return{x:function(e){return Math.pow(Math.E,r*e)*(c*Math.cos(a*e)+u*Math.sin(a*e))},dx:function(e){const t=Math.pow(Math.E,r*e),n=Math.cos(a*e),o=Math.sin(a*e);return t*(u*a*n-c*a*o)+r*t*(u*o+c*n)}}},zm.prototype.x=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0},zm.prototype.dx=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0},zm.prototype.setEnd=function(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!$m(t,.1)){t=t||0;let o=this._endPosition;this._solution&&($m(t,.1)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),$m(t,.1)&&(t=0),$m(o,.1)&&(o=0),o+=this._endPosition),this._solution&&$m(o-e,.1)&&$m(t,.1)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}},zm.prototype.snap=function(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}},zm.prototype.done=function(e){return e||(e=(new Date).getTime()),jm(this.x(),this._endPosition,.1)&&$m(this.dx(),.1)},zm.prototype.reconfigure=function(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},zm.prototype.springConstant=function(){return this._k},zm.prototype.damping=function(){return this._c},zm.prototype.configuration=function(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]},Xm.prototype.setEnd=function(e,t,n,o){const i=(new Date).getTime();this._springX.setEnd(e,o,i),this._springY.setEnd(t,o,i),this._springScale.setEnd(n,o,i),this._startTime=i},Xm.prototype.x=function(){const e=((new Date).getTime()-this._startTime)/1e3;return{x:this._springX.x(e),y:this._springY.x(e),scale:this._springScale.x(e)}},Xm.prototype.done=function(){const e=(new Date).getTime();return this._springX.done(e)&&this._springY.done(e)&&this._springScale.done(e)},Xm.prototype.reconfigure=function(e,t,n){this._springX.reconfigure(e,t,n),this._springY.reconfigure(e,t,n),this._springScale.reconfigure(e,t,n)};function Jm(e,t){return+((1e3*e-1e3*t)/1e3).toFixed(1)}const Zm=Fh({name:"MovableView",props:{direction:{type:String,default:"none"},inertia:{type:[Boolean,String],default:!1},outOfBounds:{type:[Boolean,String],default:!1},x:{type:[Number,String],default:0},y:{type:[Number,String],default:0},damping:{type:[Number,String],default:20},friction:{type:[Number,String],default:2},disabled:{type:[Boolean,String],default:!1},scale:{type:[Boolean,String],default:!1},scaleMin:{type:[Number,String],default:.5},scaleMax:{type:[Number,String],default:10},scaleValue:{type:[Number,String],default:1},animation:{type:[Boolean,String],default:!0}},emits:["change","scale"],setup(e,{slots:t,emit:n}){const o=Zn(null),i=Bh(o,n),{setParent:s}=function(e,t,n){const o=la("_isMounted",Zn(!1)),i=la("addMovableViewContext",(()=>{})),s=la("removeMovableViewContext",(()=>{}));let a,r,c=Zn(1),u=Zn(1),l=Zn(!1),d=Zn(0),p=Zn(0),h=null,f=null,g=!1,_=null,m=null;const v=new Wm,y=new Wm,I={historyX:[0,0],historyY:[0,0],historyT:[0,0]},M=Hr((()=>{let t=Number(e.friction);return isNaN(t)||t<=0?2:t})),C=new Ym(1,M.value);Di((()=>e.disabled),(()=>{j()}));const{_updateOldScale:T,_endScale:S,_setScale:E,scaleValueSync:D,_updateBoundary:k,_updateOffset:L,_updateWH:b,_scaleOffset:A,minX:R,minY:O,maxX:N,maxY:P,FAandSFACancel:w,_getLimitXY:G,_setTransform:U,_revise:x,dampingNumber:F,xMove:q,yMove:V,xSync:B,ySync:H,_STD:K}=function(e,t,n,o,i,s,a,r,c,u){const l=Hr((()=>{let t=Number(e.scaleMin);return isNaN(t)?.5:t})),d=Hr((()=>{let t=Number(e.scaleMax);return isNaN(t)?10:t})),p=Zn(Number(e.scaleValue)||1);Di(p,(e=>{U(e)})),Di(l,(()=>{G()})),Di(d,(()=>{G()})),Di((()=>e.scaleValue),(e=>{p.value=Number(e)||0}));const{_updateBoundary:h,_updateOffset:f,_updateWH:g,_scaleOffset:_,minX:m,minY:v,maxX:y,maxY:I}=function(e,t,n){const o=la("movableAreaWidth",Zn(0)),i=la("movableAreaHeight",Zn(0)),s=la("movableAreaRootRef"),a={x:0,y:0},r={x:0,y:0},c=Zn(0),u=Zn(0),l=Zn(0),d=Zn(0),p=Zn(0),h=Zn(0);function f(){let e=0-a.x+r.x,t=o.value-c.value-a.x-r.x;l.value=Math.min(e,t),p.value=Math.max(e,t);let n=0-a.y+r.y,s=i.value-u.value-a.y-r.y;d.value=Math.min(n,s),h.value=Math.max(n,s)}function g(){a.x=tv(e.value,s.value),a.y=nv(e.value,s.value)}function _(o){o=o||t.value,o=n(o);let i=e.value.getBoundingClientRect();u.value=i.height/t.value,c.value=i.width/t.value;let s=u.value*o,a=c.value*o;r.x=(a-c.value)/2,r.y=(s-u.value)/2}return{_updateBoundary:f,_updateOffset:g,_updateWH:_,_scaleOffset:r,minX:l,minY:d,maxX:p,maxY:h}}(t,o,w),{FAandSFACancel:M,_getLimitXY:C,_animationTo:T,_setTransform:S,_revise:E,dampingNumber:D,xMove:k,yMove:L,xSync:b,ySync:A,_STD:R}=function(e,t,n,o,i,s,a,r,c,u,l,d,p,h){const f=Hr((()=>{let e=Number(t.damping);return isNaN(e)?20:e})),g=Hr((()=>"all"===t.direction||"horizontal"===t.direction)),_=Hr((()=>"all"===t.direction||"vertical"===t.direction)),m=Zn(iv(t.x)),v=Zn(iv(t.y));Di((()=>t.x),(e=>{m.value=iv(e)})),Di((()=>t.y),(e=>{v.value=iv(e)})),Di(m,(e=>{E(e)})),Di(v,(e=>{D(e)}));const y=new Xm(1,9*Math.pow(f.value,2)/40,f.value);function I(e,t){let n=!1;return e>i.value?(e=i.value,n=!0):e<a.value&&(e=a.value,n=!0),t>s.value?(t=s.value,n=!0):t<r.value&&(t=r.value,n=!0),{x:e,y:t,outOfBounds:n}}function M(){d&&d.cancel(),l&&l.cancel()}function C(e,n,i,s,a,r){M(),g.value||(e=c.value),_.value||(n=u.value),t.scale||(i=o.value);let d=I(e,n);e=d.x,n=d.y,t.animation?(y._springX._solution=null,y._springY._solution=null,y._springScale._solution=null,y._springX._endPosition=c.value,y._springY._endPosition=u.value,y._springScale._endPosition=o.value,y.setEnd(e,n,i,1),l=ov(y,(function(){let e=y.x();T(e.x,e.y,e.scale,s,a,r)}),(function(){l.cancel()}))):T(e,n,i,s,a,r)}function T(i,s,a,r="",l,d){null!==i&&"NaN"!==i.toString()&&"number"==typeof i||(i=c.value||0),null!==s&&"NaN"!==s.toString()&&"number"==typeof s||(s=u.value||0),i=Number(i.toFixed(1)),s=Number(s.toFixed(1)),a=Number(a.toFixed(1)),c.value===i&&u.value===s||l||h("change",{},{x:Jm(i,n.x),y:Jm(s,n.y),source:r}),t.scale||(a=o.value),a=+(a=p(a)).toFixed(3),d&&a!==o.value&&h("scale",{},{x:i,y:s,scale:a});let f="translateX("+i+"px) translateY("+s+"px) translateZ(0px) scale("+a+")";e.value&&(e.value.style.transform=f,e.value.style.webkitTransform=f,c.value=i,u.value=s,o.value=a)}function S(e){let t=I(c.value,u.value),n=t.x,i=t.y,s=t.outOfBounds;return s&&C(n,i,o.value,e),s}function E(e){if(g.value){if(e+n.x===c.value)return c;l&&l.cancel(),C(e+n.x,v.value+n.y,o.value)}return e}function D(e){if(_.value){if(e+n.y===u.value)return u;l&&l.cancel(),C(m.value+n.x,e+n.y,o.value)}return e}return{FAandSFACancel:M,_getLimitXY:I,_animationTo:C,_setTransform:T,_revise:S,dampingNumber:f,xMove:g,yMove:_,xSync:m,ySync:v,_STD:y}}(t,e,_,o,y,I,m,v,a,r,c,u,w,n);function O(t,n){if(e.scale){t=w(t),g(t),h();const e=C(a.value,r.value),o=e.x,i=e.y;n?T(o,i,t,"",!0,!0):ev((function(){S(o,i,t,"",!0,!0)}))}}function N(){s.value=!0}function P(e){i.value=e}function w(e){return e=Math.max(.5,l.value,e),e=Math.min(10,d.value,e)}function G(){if(!e.scale)return!1;O(o.value,!0),P(o.value)}function U(t){return!!e.scale&&(O(t=w(t),!0),P(t),t)}function x(){s.value=!1,P(o.value)}function F(e){e&&(e=i.value*e,N(),O(e))}return{_updateOldScale:P,_endScale:x,_setScale:F,scaleValueSync:p,_updateBoundary:h,_updateOffset:f,_updateWH:g,_scaleOffset:_,minX:m,minY:v,maxX:y,maxY:I,FAandSFACancel:M,_getLimitXY:C,_animationTo:T,_setTransform:S,_revise:E,dampingNumber:D,xMove:k,yMove:L,xSync:b,ySync:A,_STD:R}}(e,n,t,c,u,l,d,p,h,f);function j(){l.value||e.disabled||(w(),I.historyX=[0,0],I.historyY=[0,0],I.historyT=[0,0],q.value&&(a=d.value),V.value&&(r=p.value),n.value.style.willChange="transform",_=null,m=null,g=!0)}function $(t){if(!l.value&&!e.disabled&&g){let n=d.value,o=p.value;if(null===m&&(m=Math.abs(t.detail.dx/t.detail.dy)>1?"htouchmove":"vtouchmove"),q.value&&(n=t.detail.dx+a,I.historyX.shift(),I.historyX.push(n),V.value||null!==_||(_=Math.abs(t.detail.dx/t.detail.dy)<1)),V.value&&(o=t.detail.dy+r,I.historyY.shift(),I.historyY.push(o),q.value||null!==_||(_=Math.abs(t.detail.dy/t.detail.dx)<1)),I.historyT.shift(),I.historyT.push(t.detail.timeStamp),!_){t.preventDefault();let i="touch";n<R.value?e.outOfBounds?(i="touch-out-of-bounds",n=R.value-v.x(R.value-n)):n=R.value:n>N.value&&(e.outOfBounds?(i="touch-out-of-bounds",n=N.value+v.x(n-N.value)):n=N.value),o<O.value?e.outOfBounds?(i="touch-out-of-bounds",o=O.value-y.x(O.value-o)):o=O.value:o>P.value&&(e.outOfBounds?(i="touch-out-of-bounds",o=P.value+y.x(o-P.value)):o=P.value),ev((function(){U(n,o,c.value,i)}))}}}function W(){if(!l.value&&!e.disabled&&g&&(n.value.style.willChange="auto",g=!1,!_&&!x("out-of-bounds")&&e.inertia)){const e=1e3*(I.historyX[1]-I.historyX[0])/(I.historyT[1]-I.historyT[0]),t=1e3*(I.historyY[1]-I.historyY[0])/(I.historyT[1]-I.historyT[0]),n=d.value,o=p.value;C.setV(e,t),C.setS(n,o);const i=C.delta().x,s=C.delta().y;let a=i+n,r=s+o;a<R.value?(a=R.value,r=o+(R.value-n)*s/i):a>N.value&&(a=N.value,r=o+(N.value-n)*s/i),r<O.value?(r=O.value,a=n+(O.value-o)*i/s):r>P.value&&(r=P.value,a=n+(P.value-o)*i/s),C.setEnd(a,r),f=ov(C,(function(){let e=C.s(),t=e.x,n=e.y;U(t,n,c.value,"friction")}),(function(){f.cancel()}))}e.outOfBounds||e.inertia||w()}function Y(){if(!o.value)return;w();let t=e.scale?D.value:1;L(),b(t),k();let n=G(B.value+A.x,H.value+A.y),i=n.x,s=n.y;U(i,s,t,"",!0),T(t)}return hs((()=>{Km(n.value,(e=>{switch(e.detail.state){case"start":j();break;case"move":$(e);break;case"end":W()}})),Y(),C.reconfigure(1,M.value),K.reconfigure(1,9*Math.pow(F.value,2)/40,F.value),n.value.style.transformOrigin="center";const e={rootRef:n,setParent:Y,_endScale:S,_setScale:E};i(e),ms((()=>{s(e)}))})),ms((()=>{w()})),{setParent:Y}}(e,i,o);return()=>dr("uni-movable-view",{ref:o},[dr(Y_,{onResize:s},null,8,["onResize"]),t.default&&t.default()],512)}});let Qm=!1;function ev(e){Qm||(Qm=!0,requestAnimationFrame((function(){e(),Qm=!1})))}function tv(e,t){if(e===t)return 0;let n=e.offsetLeft;return e.offsetParent?n+=tv(e.offsetParent,t):0}function nv(e,t){if(e===t)return 0;let n=e.offsetTop;return e.offsetParent?n+=nv(e.offsetParent,t):0}function ov(e,t,n){let o={id:0,cancelled:!1};return function e(t,n,o,i){if(!t||!t.cancelled){o(n);let s=n.done();s||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,i))),s&&i&&i(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}function iv(e){return/\d+[ur]px$/i.test(e)?ag(parseFloat(e)):Number(e)||0}const sv=["navigate","redirect","switchTab","reLaunch","navigateBack"],av=["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"],rv=["slide-out-right","slide-out-left","slide-out-top","slide-out-bottom","fade-out","zoom-in","zoom-fade-in","pop-out","none"],cv={hoverClass:{type:String,default:"navigator-hover"},url:{type:String,default:""},openType:{type:String,default:"navigate",validator:e=>Boolean(~sv.indexOf(e))},delta:{type:Number,default:1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:600},exists:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1},animationType:{type:String,default:"",validator:e=>!e||av.concat(rv).includes(e)},animationDuration:{type:[String,Number],default:300}};const uv=Fh({name:"Navigator",inheritAttrs:!1,compatConfig:{MODE:3},props:u({},cv,{renderLink:{type:Boolean,default:!0}}),setup(e,{slots:t}){const n=Zn(null),o=Dr(),i=o&&o.vnode.scopeId||"",{hovering:s,binding:a}=Kh(e),r=function(e){return()=>{if("navigateBack"!==e.openType&&!e.url)return void console.error("<navigator/> should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab");const t=parseInt(e.animationDuration);switch(e.openType){case"navigate":GM({url:e.url,animationType:e.animationType||"pop-in",animationDuration:t});break;case"redirect":_y({url:e.url,exists:e.exists});break;case"switchTab":fy({url:e.url});break;case"reLaunch":yy({url:e.url});break;case"navigateBack":wM({delta:e.delta,animationType:e.animationType||"pop-out",animationDuration:t})}}}(e);return()=>{const{hoverClass:c,url:u}=e,l=e.hoverClass&&"none"!==e.hoverClass,d=e.renderLink?dr("a",{class:"navigator-wrap",href:u,onClick:Fp,onMousedown:Fp},[t.default&&t.default()],40,["href","onClick","onMousedown"]):t.default&&t.default();return dr("uni-navigator",Ir({class:l&&s.value?c:"",ref:n},l&&a,o?o.attrs:{},{[i]:""},{onClick:r}),[d],16,["onClick"])}}});const lv=Fh({name:"PickerView",props:{value:{type:Array,default:()=>[],validator:function(e){return h(e)&&e.filter((e=>"number"==typeof e)).length===e.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}},emits:["change","pickstart","pickend","update:value"],setup(e,{slots:t,emit:n}){const o=Zn(null),i=Zn(null),s=Bh(o,n),a=function(e){const t=wn([...e.value]),n=wn({value:t,height:34});return Di((()=>e.value),((e,t)=>{n.value.length=e.length,e.forEach(((e,t)=>{e!==n.value[t]&&n.value.splice(t,1,e)}))})),n}(e),r=Zn(null);hs((()=>{const e=r.value;e&&(a.height=e.$el.offsetHeight)}));let c=Zn([]),u=Zn([]);function l(e){let t=u.value;t=t.filter((e=>e.type!==Wa));let n=t.indexOf(e);return-1!==n?n:c.value.indexOf(e)}return ua("getPickerViewColumn",(function(e){return Hr({get(){const t=l(e.vnode);return a.value[t]||0},set(t){const o=l(e.vnode);if(o<0)return;if(a.value[o]!==t){a.value[o]=t;const e=a.value.map((e=>e));n("update:value",e),s("change",{},{value:e})}}})})),ua("pickerViewProps",e),ua("pickerViewState",a),()=>{const e=t.default&&t.default();{const t=xm(e);c.value=t,Oo((()=>{u.value=t}))}return dr("uni-picker-view",{ref:o},[dr(Y_,{ref:r,onResize:({height:e})=>a.height=e},null,8,["onResize"]),dr("div",{ref:i,class:"uni-picker-view-wrapper"},[e],512)],512)}}});class dv{constructor(e){this._drag=e,this._dragLog=Math.log(e),this._x=0,this._v=0,this._startTime=0}set(e,t){this._x=e,this._v=t,this._startTime=(new Date).getTime()}setVelocityByEnd(e){this._v=(e-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)}x(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._x+this._v*t/this._dragLog-this._v/this._dragLog}dx(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._v*t}done(){return Math.abs(this.dx())<3}reconfigure(e){const t=this.x(),n=this.dx();this._drag=e,this._dragLog=Math.log(e),this.set(t,n)}configuration(){const e=this;return[{label:"Friction",read:function(){return e._drag},write:function(t){e.reconfigure(t)},min:.001,max:.1,step:.001}]}}function pv(e,t,n){return e>t-n&&e<t+n}function hv(e,t){return pv(e,0,t)}class fv{constructor(e,t,n){this._m=e,this._k=t,this._c=n,this._solution=null,this._endPosition=0,this._startTime=0}_solve(e,t){const n=this._c,o=this._m,i=this._k,s=n*n-4*o*i;if(0===s){const i=-n/(2*o),s=e,a=t/(i*e);return{x:function(e){return(s+a*e)*Math.pow(Math.E,i*e)},dx:function(e){const t=Math.pow(Math.E,i*e);return i*(s+a*e)*t+a*t}}}if(s>0){const i=(-n-Math.sqrt(s))/(2*o),a=(-n+Math.sqrt(s))/(2*o),r=(t-i*e)/(a-i),c=e-r;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,a*e)),c*t+r*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,a*e)),c*i*t+r*a*n}}}const a=Math.sqrt(4*o*i-n*n)/(2*o),r=-n/2*o,c=e,u=(t-r*e)/a;return{x:function(e){return Math.pow(Math.E,r*e)*(c*Math.cos(a*e)+u*Math.sin(a*e))},dx:function(e){const t=Math.pow(Math.E,r*e),n=Math.cos(a*e),o=Math.sin(a*e);return t*(u*a*n-c*a*o)+r*t*(u*o+c*n)}}}x(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0}dx(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0}setEnd(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!hv(t,.4)){t=t||0;let o=this._endPosition;this._solution&&(hv(t,.4)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),hv(t,.4)&&(t=0),hv(o,.4)&&(o=0),o+=this._endPosition),this._solution&&hv(o-e,.4)&&hv(t,.4)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}}snap(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}}done(e){return e||(e=(new Date).getTime()),pv(this.x(),this._endPosition,.4)&&hv(this.dx(),.4)}reconfigure(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())}springConstant(){return this._k}damping(){return this._c}configuration(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]}}class gv{constructor(e,t,n){this._extent=e,this._friction=t||new dv(.01),this._spring=n||new fv(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}snap(e,t){this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(t)}set(e,t){this._friction.set(e,t),e>0&&t>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(0)):e<-this._extent&&t<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()}x(e){if(!this._startTime)return 0;if(e||(e=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;let t=this._friction.x(e),n=this.dx(e);return(t>0&&n>=0||t<-this._extent&&n<=0)&&(this._springing=!0,this._spring.setEnd(0,n),t<-this._extent?this._springOffset=-this._extent:this._springOffset=0,t=this._spring.x()+this._springOffset),t}dx(e){let t;return t=this._lastTime===e?this._lastDx:this._springing?this._spring.dx(e):this._friction.dx(e),this._lastTime=e,this._lastDx=t,t}done(){return this._springing?this._spring.done():this._friction.done()}setVelocityByEnd(e){this._friction.setVelocityByEnd(e)}configuration(){const e=this._friction.configuration();return e.push.apply(e,this._spring.configuration()),e}}class _v{constructor(e,t){t=t||{},this._element=e,this._options=t,this._enableSnap=t.enableSnap||!1,this._itemSize=t.itemSize||0,this._enableX=t.enableX||!1,this._enableY=t.enableY||!1,this._shouldDispatchScrollEvent=!!t.onScroll,this._enableX?(this._extent=(t.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=t.scrollWidth):(this._extent=(t.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=t.scrollHeight),this._position=0,this._scroll=new gv(this._extent,t.friction,t.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}onTouchStart(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()}onTouchMove(e,t){let n=this._startPosition;this._enableX?n+=e:this._enableY&&(n+=t),n>0?n*=.5:n<-this._extent&&(n=.5*(n+this._extent)-this._extent),this._position=n,this.updatePosition(),this.dispatchScroll()}onTouchEnd(e,t,n){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(t)<this._itemSize&&Math.abs(n.y)<300||Math.abs(n.y)<150))return void this.snap();if(this._enableX&&(Math.abs(e)<this._itemSize&&Math.abs(n.x)<300||Math.abs(n.x)<150))return void this.snap()}let o;if(this._enableX?this._scroll.set(this._position,n.x):this._enableY&&this._scroll.set(this._position,n.y),this._enableSnap){const e=this._scroll._friction.x(100),t=e%this._itemSize;o=Math.abs(t)>this._itemSize/2?e-(this._itemSize-Math.abs(t)):e-t,o<=0&&o>=-this._extent&&this._scroll.setVelocityByEnd(o)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=function(e,t,n){const o={id:0,cancelled:!1};return function e(t,n,o,i){if(!t||!t.cancelled){o(n);const s=n.done();s||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,i))),s&&i&&i(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}(this._scroll,(()=>{const e=Date.now(),t=(e-this._scroll._startTime)/1e3,n=this._scroll.x(t);this._position=n,this.updatePosition();const o=this._scroll.dx(t);this._shouldDispatchScrollEvent&&e-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/o),this._lastTime=e)}),(()=>{this._enableSnap&&(o<=0&&o>=-this._extent&&(this._position=o,this.updatePosition()),m(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1}))}onTransitionEnd(){this._element.style.webkitTransition="",this._element.style.transition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()}snap(){const e=this._itemSize,t=this._position%e,n=Math.abs(t)>this._itemSize/2?this._position-(e-Math.abs(t)):this._position-t;this._position!==n&&(this._snapping=!0,this.scrollTo(-n),m(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))}scrollTo(e,t){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"==typeof e&&(this._position=-e),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0);const n="transform "+(t||.2)+"s ease-out";this._element.style.webkitTransition="-webkit-"+n,this._element.style.transition=n,this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd)}dispatchScroll(){if(m(this._options.onScroll)&&Math.round(Number(this._lastPos))!==Math.round(this._position)){this._lastPos=this._position;const e={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(e)}}update(e,t,n){let o=0;const i=this._position;this._enableX?(o=this._element.childNodes.length?(t||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=t):(o=this._element.childNodes.length?(t||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=t),"number"==typeof e&&(this._position=-e),this._position<-o?this._position=-o:this._position>0&&(this._position=0),this._itemSize=n||this._itemSize,this.updatePosition(),i!==this._position&&(this.dispatchScroll(),m(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=o,this._scroll._extent=o}updatePosition(){let e="";this._enableX?e="translateX("+this._position+"px) translateZ(0)":this._enableY&&(e="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=e,this._element.style.transform=e}isScrolling(){return this._scrolling||this._snapping}}function mv(e,t){const n={trackingID:-1,maxDy:0,maxDx:0},o=new _v(e,t);function i(e){const t=e,o=e;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:o.screenX-n.x,y:o.screenY-n.y}}return{scroller:o,handleTouchStart:function(e){const t=e,i=e;"start"===t.detail.state?(n.trackingID="touch",n.x=t.detail.x,n.y=t.detail.y):(n.trackingID="mouse",n.x=i.screenX,n.y=i.screenY),n.maxDx=0,n.maxDy=0,n.historyX=[0],n.historyY=[0],n.historyTime=[t.detail.timeStamp||i.timeStamp],n.listener=o,o.onTouchStart&&o.onTouchStart(),("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault()},handleTouchMove:function(e){const t=e,o=e;if(-1!==n.trackingID){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault();const s=i(e);if(s){for(n.maxDy=Math.max(n.maxDy,Math.abs(s.y)),n.maxDx=Math.max(n.maxDx,Math.abs(s.x)),n.historyX.push(s.x),n.historyY.push(s.y),n.historyTime.push(t.detail.timeStamp||o.timeStamp);n.historyTime.length>10;)n.historyTime.shift(),n.historyX.shift(),n.historyY.shift();n.listener&&n.listener.onTouchMove&&n.listener.onTouchMove(s.x,s.y)}}},handleTouchEnd:function(e){if(-1!==n.trackingID){e.preventDefault();const t=i(e);if(t){const e=n.listener;n.trackingID=-1,n.listener=null;const o={x:0,y:0};if(n.historyTime.length>2)for(let t=n.historyTime.length-1,i=n.historyTime[t],s=n.historyX[t],a=n.historyY[t];t>0;){t--;const e=i-n.historyTime[t];if(e>30&&e<50){o.x=(s-n.historyX[t])/(e/1e3),o.y=(a-n.historyY[t])/(e/1e3);break}}n.historyTime=[],n.historyX=[],n.historyY=[],e&&e.onTouchEnd&&e.onTouchEnd(t.x,t.y,o)}}}}}const vv=Fh({name:"PickerViewColumn",setup(e,{slots:t,emit:n}){const o=Zn(null),i=Zn(null),s=la("getPickerViewColumn"),a=Dr(),r=s?s(a):Zn(0),c=la("pickerViewProps"),u=la("pickerViewState"),l=Zn(34),d=Zn(null);hs((()=>{const e=d.value;l.value=e.$el.offsetHeight}));const p=Hr((()=>(u.height-l.value)/2)),{state:h}=Sm();let f;const g=wn({current:r.value,length:0});let _;function m(){f&&!_&&(_=!0,Oo((()=>{_=!1;let e=Math.min(g.current,g.length-1);e=Math.max(e,0),f.update(e*l.value,void 0,l.value)})))}Di((()=>r.value),(e=>{e!==g.current&&(g.current=e,m())})),Di((()=>g.current),(e=>r.value=e)),Di([()=>l.value,()=>g.length,()=>u.height],m);let v=0;function y(e){const t=v+e.deltaY;if(Math.abs(t)>10){v=0;let e=Math.min(g.current+(t<0?-1:1),g.length-1);g.current=e=Math.max(e,0),f.scrollTo(e*l.value)}else v=t;e.preventDefault()}function I({clientY:e}){const t=o.value;if(!f.isScrolling()){const n=e-t.getBoundingClientRect().top-u.height/2,o=l.value/2;if(!(Math.abs(n)<=o)){const e=Math.ceil((Math.abs(n)-o)/l.value),t=n<0?-e:e;let i=Math.min(g.current+t,g.length-1);g.current=i=Math.max(i,0),f.scrollTo(i*l.value)}}}return hs((()=>{const e=o.value,t=i.value,{scroller:n,handleTouchStart:s,handleTouchMove:a,handleTouchEnd:r}=mv(t,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:l.value,friction:new dv(1e-4),spring:new fv(2,90,20),onSnap:e=>{isNaN(e)||e===g.current||(g.current=e)}});f=n,Km(e,(e=>{switch(e.detail.state){case"start":s(e);break;case"move":a(e),e.stopPropagation();break;case"end":case"cancel":r(e)}}),!0),function(e){let t=0,n=0;e.addEventListener("touchstart",(e=>{const o=e.changedTouches[0];t=o.clientX,n=o.clientY})),e.addEventListener("touchend",(e=>{const o=e.changedTouches[0];if(Math.abs(o.clientX-t)<20&&Math.abs(o.clientY-n)<20){const t={bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget},n=new CustomEvent("click",t);["screenX","screenY","clientX","clientY","pageX","pageY"].forEach((e=>{n[e]=o[e]})),e.target.dispatchEvent(n)}}))}(e),m()})),()=>{const e=t.default&&t.default();g.length=xm(e).length;const n=`${p.value}px 0`;return dr("uni-picker-view-column",{ref:o},[dr("div",{onWheel:y,onClick:I,class:"uni-picker-view-group"},[dr("div",Ir(h.attrs,{class:["uni-picker-view-mask",c.maskClass],style:`background-size: 100% ${p.value}px;${c.maskStyle}`}),null,16),dr("div",Ir(h.attrs,{class:["uni-picker-view-indicator",c.indicatorClass],style:c.indicatorStyle}),[dr(Y_,{ref:d,onResize:({height:e})=>l.value=e},null,8,["onResize"])],16),dr("div",{ref:i,class:["uni-picker-view-content"],style:{padding:n,"--picker-view-column-indicator-height":`${l.value}px`}},[e],4)],40,["onWheel","onClick"])],512)}}}),yv=re,Iv="backwards",Mv=Fh({name:"Progress",props:{percent:{type:[Number,String],default:0,validator:e=>!isNaN(parseFloat(e))},fontSize:{type:[String,Number],default:16},showInfo:{type:[Boolean,String],default:!1},strokeWidth:{type:[Number,String],default:6,validator:e=>!isNaN(parseFloat(e))},color:{type:String,default:yv},activeColor:{type:String,default:yv},backgroundColor:{type:String,default:"#EBEBEB"},active:{type:[Boolean,String],default:!1},activeMode:{type:String,default:Iv},duration:{type:[Number,String],default:30,validator:e=>!isNaN(parseFloat(e))},borderRadius:{type:[Number,String],default:0}},setup(e){const t=Zn(null),n=function(e){const t=Zn(0),n=Hr((()=>`background-color: ${e.backgroundColor}; height: ${e.strokeWidth}px;`)),o=Hr((()=>{const n=e.color!==yv&&e.activeColor===yv?e.color:e.activeColor;return`width: ${t.value}%;background-color: ${n}`})),i=Hr((()=>{if("string"==typeof e.percent&&!/^-?\d*\.?\d*$/.test(e.percent))return 0;let t=parseFloat(e.percent);return Number.isNaN(t)||t<0?t=0:t>100&&(t=100),t})),s=wn({outerBarStyle:n,innerBarStyle:o,realPercent:i,currentPercent:t,strokeTimer:0,lastPercent:0});return s}(e);return Cv(n,e),Di((()=>n.realPercent),((t,o)=>{n.strokeTimer&&clearInterval(n.strokeTimer),n.lastPercent=o||0,Cv(n,e)})),()=>{const{showInfo:o}=e,{outerBarStyle:i,innerBarStyle:s,currentPercent:a}=n;return dr("uni-progress",{class:"uni-progress",ref:t},[dr("div",{style:i,class:"uni-progress-bar"},[dr("div",{style:s,class:"uni-progress-inner-bar"},null,4)],4),o?dr("p",{class:"uni-progress-info"},[a+"%"]):""],512)}}});function Cv(e,t){t.active?(e.currentPercent=t.activeMode===Iv?0:e.lastPercent,e.strokeTimer=setInterval((()=>{e.currentPercent+1>e.realPercent?(e.currentPercent=e.realPercent,e.strokeTimer&&clearInterval(e.strokeTimer)):e.currentPercent+=1}),parseFloat(t.duration))):e.currentPercent=e.realPercent}const Tv=$p("ucg"),Sv=Fh({name:"RadioGroup",props:{name:{type:String,default:""}},setup(e,{emit:t,slots:n}){const o=Zn(null);return function(e,t){const n=[];hs((()=>{r(n.length-1)}));const o=()=>{var e;return null==(e=n.find((e=>e.value.radioChecked)))?void 0:e.value.value};ua(Tv,{addField(e){n.push(e)},removeField(e){n.splice(n.indexOf(e),1)},radioChange(e,i){r(n.indexOf(i),!0),t("change",e,{value:o()})}});const i=la($h,!1),s={submit:()=>{let t=["",null];return""!==e.name&&(t[0]=e.name,t[1]=o()),t}};i&&(i.addField(s),_s((()=>{i.removeField(s)})));function a(e,t){e.value={radioChecked:t,value:e.value.value}}function r(e,t){n.forEach(((o,i)=>{i!==e&&(t?a(n[i],!1):n.forEach(((e,t)=>{i>=t||n[t].value.radioChecked&&a(n[i],!1)})))}))}}(e,Bh(o,t)),()=>dr("uni-radio-group",{ref:o},[n.default&&n.default()],512)}});const Ev=Fh({name:"Radio",props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},value:{type:String,default:""},color:{type:String,default:"#007aff"},backgroundColor:{type:String,default:""},borderColor:{type:String,default:""},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},iconColor:{type:String,default:"#ffffff"}},setup(e,{slots:t}){const n=Zn(null),o=Zn(e.checked),i=Zn(e.value);const s=Hr((()=>function(){if(e.disabled)return{backgroundColor:"#E1E1E1",borderColor:"#D1D1D1"};const t={};return o.value?(t.backgroundColor=e.activeBackgroundColor||e.color,t.borderColor=e.activeBorderColor||t.backgroundColor):(e.borderColor&&(t.borderColor=e.borderColor),e.backgroundColor&&(t.backgroundColor=e.backgroundColor)),t}(o.value)));Di([()=>e.checked,()=>e.value],(([e,t])=>{o.value=e,i.value=t}));const{uniCheckGroup:a,uniLabel:r,field:c}=function(e,t,n){const o=Hr({get:()=>({radioChecked:Boolean(e.value),value:t.value}),set:({radioChecked:t})=>{e.value=t}}),i={reset:n},s=la(Tv,!1);s&&s.addField(o);const a=la($h,!1);a&&a.addField(i);const r=la(zh,!1);return _s((()=>{s&&s.removeField(o),a&&a.removeField(i)})),{uniCheckGroup:s,uniForm:a,uniLabel:r,field:o}}(o,i,(()=>{o.value=!1})),u=t=>{e.disabled||o.value||(o.value=!0,a&&a.radioChange(t,c),t.stopPropagation())};return r&&(r.addHandler(u),_s((()=>{r.removeHandler(u)}))),Jh(e,{"label-click":u}),()=>{const i=jh(e,"disabled");let a;return a=o.value,dr("uni-radio",Ir(i,{id:e.id,onClick:u,ref:n}),[dr("div",{class:"uni-radio-wrapper",style:{"--HOVER-BD-COLOR":o.value?s.value.borderColor:e.activeBorderColor}},[dr("div",{class:["uni-radio-input",{"uni-radio-input-disabled":e.disabled}],style:s.value},[a?Zp(zp,e.disabled?"#ADADAD":e.iconColor,18):""],6),t.default&&t.default()],4)],16,["id","onClick"])}}});const Dv={a:"",abbr:"",address:"",article:"",aside:"",b:"",bdi:"",bdo:["dir"],big:"",blockquote:"",br:"",caption:"",center:"",cite:"",code:"",col:["span","width"],colgroup:["span","width"],dd:"",del:"",div:"",dl:"",dt:"",em:"",fieldset:"",font:"",footer:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",header:"",hr:"",i:"",img:["alt","src","height","width"],ins:"",label:"",legend:"",li:"",mark:"",nav:"",ol:["start","type"],p:"",pre:"",q:"",rt:"",ruby:"",s:"",section:"",small:"",span:"",strong:"",sub:"",sup:"",table:["width"],tbody:"",td:["colspan","height","rowspan","width"],tfoot:"",th:["colspan","height","rowspan","width"],thead:"",tr:["colspan","height","rowspan","width"],tt:"",u:"",ul:""},kv={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"',apos:"'",ldquo:"“",rdquo:"”",yen:"¥",radic:"√",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",hellip:"…"};const Lv=(e,t,n)=>!n||h(n)&&!n.length?[]:n.map((n=>{var o;if(S(n)){if(!p(n,"type")||"node"===n.type){let i={[e]:""};const s=null==(o=n.name)?void 0:o.toLowerCase();if(!p(Dv,s))return;return function(e,t){if(S(t))for(const n in t)if(p(t,n)){const o=t[n];"img"===e&&"src"===n&&(t[n]=of(o))}}(s,n.attrs),i=u(i,function(e,t){if(["a","img"].includes(e.name)&&t)return{onClick:n=>{t(n,{node:e}),n.stopPropagation(),n.preventDefault(),n.returnValue=!1}}}(n,t),n.attrs),jr(n.name,i,Lv(e,t,n.children))}return"text"===n.type&&v(n.text)&&""!==n.text?fr((n.text||"").replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi,(function(e,t){return p(kv,t)&&kv[t]?kv[t]:/^#[0-9]{1,4}$/.test(t)?String.fromCharCode(t.slice(1)):/^#x[0-9a-f]{1,4}$/i.test(t)?String.fromCharCode(0+t.slice(1)):e}))):void 0}}));function bv(e){e=function(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/<!doctype.*>\n/,"").replace(/<!DOCTYPE.*>\n/,"")}(e);const t=[],n={node:"root",children:[]};return function(e,t){var n,o,i,s=[],a=e;for(s.last=function(){return this[this.length-1]};e;){if(o=!0,s.last()&&um[s.last()])e=e.replace(new RegExp("([\\s\\S]*?)</"+s.last()+"[^>]*>"),(function(e,n){return n=n.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),t.chars&&t.chars(n),""})),u("",s.last());else if(0==e.indexOf("\x3c!--")?(n=e.indexOf("--\x3e"))>=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),o=!1):0==e.indexOf("</")?(i=e.match(nm))&&(e=e.substring(i[0].length),i[0].replace(nm,u),o=!1):0==e.indexOf("<")&&(i=e.match(tm))&&(e=e.substring(i[0].length),i[0].replace(tm,c),o=!1),o){var r=(n=e.indexOf("<"))<0?e:e.substring(0,n);e=n<0?"":e.substring(n),t.chars&&t.chars(r)}if(e==a)throw"Parse Error: "+e;a=e}function c(e,n,o,i){if(n=n.toLowerCase(),sm[n])for(;s.last()&&am[s.last()];)u("",s.last());if(rm[n]&&s.last()==n&&u("",n),(i=im[n]||!!i)||s.push(n),t.start){var a=[];o.replace(om,(function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:cm[t]?t:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})})),t.start&&t.start(n,a,i)}}function u(e,n){if(n)for(o=s.length-1;o>=0&&s[o]!=n;o--);else var o=0;if(o>=0){for(var i=s.length-1;i>=o;i--)t.end&&t.end(s[i]);s.length=o}}u()}(e,{start:function(e,o,i){const s={name:e};if(0!==o.length&&(s.attrs=function(e){return e.reduce((function(e,t){let n=t.value;const o=t.name;return n.match(/ /)&&-1===["style","src"].indexOf(o)&&(n=n.split(" ")),e[o]?Array.isArray(e[o])?e[o].push(n):e[o]=[e[o],n]:e[o]=n,e}),{})}(o)),i){const e=t[0]||n;e.children||(e.children=[]),e.children.push(s)}else t.unshift(s)},end:function(e){const o=t.shift();if(o.name!==e&&console.error("invalid state: mismatch end tag"),0===t.length)n.children.push(o);else{const e=t[0];e.children||(e.children=[]),e.children.push(o)}},chars:function(e){const o={type:"text",text:e};if(0===t.length)n.children.push(o);else{const e=t[0];e.children||(e.children=[]),e.children.push(o)}},comment:function(e){const n={node:"comment",text:e},o=t[0];o&&(o.children||(o.children=[]),o.children.push(n))}}),n.children}const Av=Fh({name:"RichText",compatConfig:{MODE:3},props:{nodes:{type:[Array,String],default:function(){return[]}}},emits:["click","touchstart","touchmove","touchcancel","touchend","longpress","itemclick"],setup(e,{emit:t}){const n=Dr(),o=n&&n.vnode.scopeId||"",i=Zn(null),s=Zn([]),a=Bh(i,t);function r(e,t={}){a("itemclick",e,t)}return Di((()=>e.nodes),(function(){let t=e.nodes;v(t)&&(t=bv(e.nodes)),s.value=Lv(o,r,t)}),{immediate:!0}),()=>jr("uni-rich-text",{ref:i},jr("div",{},s.value))}}),Rv=Fh({name:"Refresher",props:{refreshState:{type:String,default:""},refresherHeight:{type:Number,default:0},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"}},setup(e,{slots:t}){const n=Zn(null),o=Hr((()=>{const t={backgroundColor:e.refresherBackground};switch(e.refreshState){case"pulling":t.height=e.refresherHeight+"px";break;case"refreshing":t.height=e.refresherThreshold+"px",t.transition="height 0.3s";break;case"":case"refresherabort":case"restore":t.height="0px",t.transition="height 0.3s"}return t})),i=Hr((()=>{const t=e.refresherHeight/e.refresherThreshold;return 360*(t>1?1:t)}));return()=>{const{refreshState:s,refresherDefaultStyle:a,refresherThreshold:r}=e;return dr("div",{ref:n,style:o.value,class:"uni-scroll-view-refresher"},["none"!==a?dr("div",{class:"uni-scroll-view-refresh"},[dr("div",{class:"uni-scroll-view-refresh-inner"},["pulling"==s?dr("svg",{key:"refresh__icon",style:{transform:"rotate("+i.value+"deg)"},fill:"#2BD009",class:"uni-scroll-view-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},[dr("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null),dr("path",{d:"M0 0h24v24H0z",fill:"none"},null)],4):null,"refreshing"==s?dr("svg",{key:"refresh__spinner",class:"uni-scroll-view-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},[dr("circle",{cx:"50",cy:"50",r:"20",fill:"none",style:"color: #2bd009","stroke-width":"3"},null)]):null])]):null,"none"===a?dr("div",{class:"uni-scroll-view-refresher-container",style:{height:`${r}px`}},[t.default&&t.default()]):null],4)}}}),Ov=ot(!0),Nv=Fh({name:"ScrollView",compatConfig:{MODE:3},props:{direction:{type:[String],default:"vertical"},scrollX:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},showScrollbar:{type:[Boolean,String],default:!0},upperThreshold:{type:[Number,String],default:50},lowerThreshold:{type:[Number,String],default:50},scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},scrollIntoView:{type:String,default:""},scrollWithAnimation:{type:[Boolean,String],default:!1},enableBackToTop:{type:[Boolean,String],default:!1},refresherEnabled:{type:[Boolean,String],default:!1},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"},refresherTriggered:{type:[Boolean,String],default:!1}},emits:["scroll","scrolltoupper","scrolltolower","refresherrefresh","refresherrestore","refresherpulling","refresherabort","update:refresherTriggered"],setup(e,{emit:t,slots:n,expose:o}){const i=Zn(null),s=Zn(null),a=Zn(null),r=Zn(null),c=Bh(i,t),{state:u,scrollTopNumber:l,scrollLeftNumber:d}=function(e){const t=Hr((()=>Number(e.scrollTop)||0)),n=Hr((()=>Number(e.scrollLeft)||0)),o=wn({lastScrollTop:t.value,lastScrollLeft:n.value,lastScrollToUpperTime:0,lastScrollToLowerTime:0,refresherHeight:0,refreshState:""});return{state:o,scrollTopNumber:t,scrollLeftNumber:n}}(e),{realScrollX:p,realScrollY:h,_scrollLeftChanged:f,_scrollTopChanged:g}=function(e,t,n,o,i,s,a,r,c){let u=!1,l=0,d=!1,p=()=>{};const h=Hr((()=>e.scrollX)),f=Hr((()=>e.scrollY)),g=Hr((()=>{let t=Number(e.upperThreshold);return isNaN(t)?50:t})),_=Hr((()=>{let t=Number(e.lowerThreshold);return isNaN(t)?50:t}));function m(e,t){const n=a.value;let o=0,i="";if(e<0?e=0:"x"===t&&e>n.scrollWidth-n.offsetWidth?e=n.scrollWidth-n.offsetWidth:"y"===t&&e>n.scrollHeight-n.offsetHeight&&(e=n.scrollHeight-n.offsetHeight),"x"===t?o=n.scrollLeft-e:"y"===t&&(o=n.scrollTop-e),0===o)return;let s=r.value;s.style.transition="transform .3s ease-out",s.style.webkitTransition="-webkit-transform .3s ease-out","x"===t?i="translateX("+o+"px) translateZ(0)":"y"===t&&(i="translateY("+o+"px) translateZ(0)"),s.removeEventListener("transitionend",p),s.removeEventListener("webkitTransitionEnd",p),p=()=>C(e,t),s.addEventListener("transitionend",p),s.addEventListener("webkitTransitionEnd",p),"x"===t?n.style.overflowX="hidden":"y"===t&&(n.style.overflowY="hidden"),s.style.transform=i,s.style.webkitTransform=i}function v(e){const n=e.target;i("scroll",e,{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,scrollWidth:n.scrollWidth,deltaX:t.lastScrollLeft-n.scrollLeft,deltaY:t.lastScrollTop-n.scrollTop}),f.value&&(n.scrollTop<=g.value&&t.lastScrollTop-n.scrollTop>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(i("scrolltoupper",e,{direction:"top"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollTop+n.offsetHeight+_.value>=n.scrollHeight&&t.lastScrollTop-n.scrollTop<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(i("scrolltolower",e,{direction:"bottom"}),t.lastScrollToLowerTime=e.timeStamp)),h.value&&(n.scrollLeft<=g.value&&t.lastScrollLeft-n.scrollLeft>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(i("scrolltoupper",e,{direction:"left"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollLeft+n.offsetWidth+_.value>=n.scrollWidth&&t.lastScrollLeft-n.scrollLeft<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(i("scrolltolower",e,{direction:"right"}),t.lastScrollToLowerTime=e.timeStamp)),t.lastScrollTop=n.scrollTop,t.lastScrollLeft=n.scrollLeft}function y(t){f.value&&(e.scrollWithAnimation?m(t,"y"):a.value.scrollTop=t)}function I(t){h.value&&(e.scrollWithAnimation?m(t,"x"):a.value.scrollLeft=t)}function M(t){if(t){if(!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(t))return void console.error(`id error: scroll-into-view=${t}`);let n=s.value.querySelector("#"+t);if(n){let t=a.value.getBoundingClientRect(),o=n.getBoundingClientRect();if(h.value){let n=o.left-t.left,i=a.value.scrollLeft+n;e.scrollWithAnimation?m(i,"x"):a.value.scrollLeft=i}if(f.value){let n=o.top-t.top,i=a.value.scrollTop+n;e.scrollWithAnimation?m(i,"y"):a.value.scrollTop=i}}}}function C(e,t){r.value.style.transition="",r.value.style.webkitTransition="",r.value.style.transform="",r.value.style.webkitTransform="";let n=a.value;"x"===t?(n.style.overflowX=h.value?"auto":"hidden",n.scrollLeft=e):"y"===t&&(n.style.overflowY=f.value?"auto":"hidden",n.scrollTop=e),r.value.removeEventListener("transitionend",p),r.value.removeEventListener("webkitTransitionEnd",p)}function T(n){if(e.refresherEnabled){switch(n){case"refreshing":t.refresherHeight=e.refresherThreshold,u||(u=!0,i("refresherpulling",{},{deltaY:t.refresherHeight,dy:t.refresherHeight}),i("refresherrefresh",{},{dy:E.y-S.y}),c("update:refresherTriggered",!0));break;case"restore":case"refresherabort":u=!1,t.refresherHeight=l=0,"restore"===n&&(d=!1,i("refresherrestore",{},{dy:E.y-S.y})),"refresherabort"===n&&d&&(d=!1,i("refresherabort",{},{dy:E.y-S.y}))}t.refreshState=n}}let S={x:0,y:0},E={x:0,y:e.refresherThreshold};return hs((()=>{Oo((()=>{y(n.value),I(o.value)})),M(e.scrollIntoView);let s=function(e){e.preventDefault(),e.stopPropagation(),v(e)},r=null,c=function(n){if(null===S)return;let o=n.touches[0].pageX,s=n.touches[0].pageY,c=a.value;if(Math.abs(o-S.x)>Math.abs(s-S.y))if(h.value){if(0===c.scrollLeft&&o>S.x)return void(r=!1);if(c.scrollWidth===c.offsetWidth+c.scrollLeft&&o<S.x)return void(r=!1);r=!0}else r=!1;else if(f.value)if(0===c.scrollTop&&s>S.y)r=!1,e.refresherEnabled&&!1!==n.cancelable&&n.preventDefault();else{if(c.scrollHeight===c.offsetHeight+c.scrollTop&&s<S.y)return void(r=!1);r=!0}else r=!1;if(r&&n.stopPropagation(),0===c.scrollTop&&1===n.touches.length&&T("pulling"),e.refresherEnabled&&"pulling"===t.refreshState){const o=s-S.y;0===l&&(l=s),u?(t.refresherHeight=o+e.refresherThreshold,d=!1):(t.refresherHeight=s-l,t.refresherHeight>0&&(d=!0,i("refresherpulling",n,{deltaY:o,dy:o})))}},p=function(e){1===e.touches.length&&(S={x:e.touches[0].pageX,y:e.touches[0].pageY})},g=function(n){E={x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY},t.refresherHeight>=e.refresherThreshold?T("refreshing"):T("refresherabort"),S={x:0,y:0},E={x:0,y:e.refresherThreshold}};a.value.addEventListener("touchstart",p,Ov),a.value.addEventListener("touchmove",c,ot(!1)),a.value.addEventListener("scroll",s,ot(!1)),a.value.addEventListener("touchend",g,Ov),_s((()=>{a.value.removeEventListener("touchstart",p),a.value.removeEventListener("touchmove",c),a.value.removeEventListener("scroll",s),a.value.removeEventListener("touchend",g)}))})),ts((()=>{f.value&&(a.value.scrollTop=t.lastScrollTop),h.value&&(a.value.scrollLeft=t.lastScrollLeft)})),Di(n,(e=>{y(e)})),Di(o,(e=>{I(e)})),Di((()=>e.scrollIntoView),(e=>{M(e)})),Di((()=>e.refresherTriggered),(e=>{!0===e?T("refreshing"):!1===e&&T("restore")})),{realScrollX:h,realScrollY:f,_scrollTopChanged:y,_scrollLeftChanged:I}}(e,u,l,d,c,i,s,r,t),_=Hr((()=>{let e="";return p.value?e+="overflow-x:auto;":e+="overflow-x:hidden;",h.value?e+="overflow-y:auto;":e+="overflow-y:hidden;",e})),m=Hr((()=>{let t="uni-scroll-view";return!1===e.showScrollbar&&(t+=" uni-scroll-view-scrollbar-hidden"),t}));return o({$getMain:()=>s.value}),()=>{const{refresherEnabled:t,refresherBackground:o,refresherDefaultStyle:c,refresherThreshold:l}=e,{refresherHeight:d,refreshState:p}=u;return dr("uni-scroll-view",{ref:i},[dr("div",{ref:a,class:"uni-scroll-view"},[dr("div",{ref:s,style:_.value,class:m.value},[t?dr(Rv,{refreshState:p,refresherHeight:d,refresherThreshold:l,refresherDefaultStyle:c,refresherBackground:o},{default:()=>["none"==c?n.refresher&&n.refresher():null]},8,["refreshState","refresherHeight","refresherThreshold","refresherDefaultStyle","refresherBackground"]):null,dr("div",{ref:r,class:"uni-scroll-view-content"},[n.default&&n.default()],512)],6)],512)],512)}}});function Pv(e,t,n,o,i,s){function a(){u&&(clearTimeout(u),u=null)}let r,c,u=null,l=!0,d=0,p=1,h=null,f=!1,g=0,_="";const m=Hr((()=>n.value.length>t.displayMultipleItems)),v=Hr((()=>e.circular&&m.value));function y(i){Math.floor(2*d)===Math.floor(2*i)&&Math.ceil(2*d)===Math.ceil(2*i)||v.value&&function(o){if(!l)for(let i=n.value,s=i.length,a=o+t.displayMultipleItems,r=0;r<s;r++){const t=i[r],n=Math.floor(o/s)*s+r,c=n+s,u=n-s,l=Math.max(o-(n+1),n-a,0),d=Math.max(o-(c+1),c-a,0),p=Math.max(o-(u+1),u-a,0),h=Math.min(l,d,p),f=[n,c,u][[l,d,p].indexOf(h)];t.updatePosition(f,e.vertical)}}(i);const a="translate("+(e.vertical?"0":100*-i*p+"%")+", "+(e.vertical?100*-i*p+"%":"0")+") translateZ(0)",c=o.value;if(c&&(c.style.webkitTransform=a,c.style.transform=a),d=i,!r){if(i%1==0)return;r=i}i-=Math.floor(r);const u=n.value;i<=-(u.length-1)?i+=u.length:i>=u.length&&(i-=u.length),i=r%1>.5||r<0?i-1:i,s("transition",{},{dx:e.vertical?0:i*c.offsetWidth,dy:e.vertical?i*c.offsetHeight:0})}function I(e){const o=n.value.length;if(!o)return-1;const i=(Math.round(e)%o+o)%o;if(v.value){if(o<=t.displayMultipleItems)return 0}else if(i>o-t.displayMultipleItems)return o-t.displayMultipleItems;return i}function M(){h=null}function C(){if(!h)return void(f=!1);const e=h,o=e.toPos,i=e.acc,a=e.endTime,u=e.source,l=a-Date.now();if(l<=0){y(o),h=null,f=!1,r=null;const e=n.value[t.current];if(e){const n=e.getItemId();s("animationfinish",{},{current:t.current,currentItemId:n,source:u})}return}y(o+i*l*l/2),c=requestAnimationFrame(C)}function T(e,o,i){M();const s=t.duration,a=n.value.length;let r=d;if(v.value)if(i<0){for(;r<e;)r+=a;for(;r-a>e;)r-=a}else if(i>0){for(;r>e;)r-=a;for(;r+a<e;)r+=a;r+a-e<e-r&&(r+=a)}else{for(;r+a<e;)r+=a;for(;r-a>e;)r-=a;r+a-e<e-r&&(r+=a)}else"click"===o&&(e=e+t.displayMultipleItems-1<a?e:0);h={toPos:e,acc:2*(r-e)/(s*s),endTime:Date.now()+s,source:o},f||(f=!0,c=requestAnimationFrame(C))}function S(){a();const e=n.value,o=function(){u=null,_="autoplay",v.value?t.current=I(t.current+1):t.current=t.current+t.displayMultipleItems<e.length?t.current+1:0,T(t.current,"autoplay",v.value?1:0),u=setTimeout(o,t.interval)};l||e.length<=t.displayMultipleItems||(u=setTimeout(o,t.interval))}function E(e){e?S():a()}return Di([()=>e.current,()=>e.currentItemId,()=>[...n.value]],(()=>{let o=-1;if(e.currentItemId)for(let t=0,i=n.value;t<i.length;t++){if(i[t].getItemId()===e.currentItemId){o=t;break}}o<0&&(o=Math.round(e.current)||0),o=o<0?0:o,t.current!==o&&(_="",t.current=o)})),Di([()=>e.vertical,()=>v.value,()=>t.displayMultipleItems,()=>[...n.value]],(function(){a(),h&&(y(h.toPos),h=null);const i=n.value;for(let t=0;t<i.length;t++)i[t].updatePosition(t,e.vertical);p=1;const s=o.value;if(1===t.displayMultipleItems&&i.length){const e=i[0].getBoundingClientRect(),t=s.getBoundingClientRect();p=e.width/t.width,p>0&&p<1||(p=1)}const r=d;d=-2;const c=t.current;c>=0?(l=!1,t.userTracking?(y(r+c-g),g=c):(y(c),e.autoplay&&S())):(l=!0,y(-t.displayMultipleItems-1))})),Di((()=>t.interval),(()=>{u&&(a(),S())})),Di((()=>t.current),((e,o)=>{!function(e,o){const i=_;_="";const a=n.value;if(!i){const t=a.length;T(e,"",v.value&&o+(t-e)%t>t/2?1:0)}const r=a[e];if(r){const e=t.currentItemId=r.getItemId();s("change",{},{current:t.current,currentItemId:e,source:i})}}(e,o),i("update:current",e)})),Di((()=>t.currentItemId),(e=>{i("update:currentItemId",e)})),Di((()=>e.autoplay&&!t.userTracking),E),E(e.autoplay&&!t.userTracking),hs((()=>{let i=!1,s=0,r=0;function c(e){t.userTracking=!1;const n=s/Math.abs(s);let o=0;!e&&Math.abs(s)>.2&&(o=.5*n);const i=I(d+o);e?y(g):(_="touch",t.current=i,T(i,"touch",0!==o?o:0===i&&v.value&&d>=1?1:0))}Km(o.value,(u=>{if(!e.disableTouch&&!l){if("start"===u.detail.state)return t.userTracking=!0,i=!1,a(),g=d,s=0,r=Date.now(),void M();if("end"===u.detail.state)return c(!1);if("cancel"===u.detail.state)return c(!0);if(t.userTracking){if(!i){i=!0;const n=Math.abs(u.detail.dx),o=Math.abs(u.detail.dy);if((n>=o&&e.vertical||n<=o&&!e.vertical)&&(t.userTracking=!1),!t.userTracking)return void(e.autoplay&&S())}return function(i){const a=r;r=Date.now();const c=n.value.length-t.displayMultipleItems;function u(e){return.5-.25/(e+.5)}function l(e,t){let n=g+e;s=.6*s+.4*t,v.value||(n<0||n>c)&&(n<0?n=-u(-n):n>c&&(n=c+u(n-c)),s=0),y(n)}const d=r-a||1,p=o.value;e.vertical?l(-i.dy/p.offsetHeight,-i.ddy/d):l(-i.dx/p.offsetWidth,-i.ddx/d)}(u.detail),!1}}}))})),ms((()=>{a(),cancelAnimationFrame(c)})),{onSwiperDotClick:function(e){T(t.current=e,_="click",v.value?1:0)},circularEnabled:v,swiperEnabled:m}}const wv=Fh({name:"Swiper",props:{indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:""},indicatorActiveColor:{type:String,default:""},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1},navigation:{type:[Boolean,String],default:!1},navigationColor:{type:String,default:"#fff"},navigationActiveColor:{type:String,default:"rgba(53, 53, 53, 0.6)"}},emits:["change","transition","animationfinish","update:current","update:currentItemId"],setup(e,{slots:t,emit:n}){const o=Zn(null),i=Bh(o,n),s=Zn(null),a=Zn(null),r=function(e){return wn({interval:Hr((()=>{const t=Number(e.interval);return isNaN(t)?5e3:t})),duration:Hr((()=>{const t=Number(e.duration);return isNaN(t)?500:t})),displayMultipleItems:Hr((()=>{const t=Math.round(e.displayMultipleItems);return isNaN(t)?1:t})),current:Math.round(e.current)||0,currentItemId:e.currentItemId,userTracking:!1})}(e),c=Hr((()=>{let t={};return(e.nextMargin||e.previousMargin)&&(t=e.vertical?{left:0,right:0,top:Yp(e.previousMargin,!0),bottom:Yp(e.nextMargin,!0)}:{top:0,bottom:0,left:Yp(e.previousMargin,!0),right:Yp(e.nextMargin,!0)}),t})),u=Hr((()=>{const t=Math.abs(100/r.displayMultipleItems)+"%";return{width:e.vertical?"100%":t,height:e.vertical?t:"100%"}}));let l=[];const d=[],p=Zn([]);function h(){const e=[];for(let t=0;t<l.length;t++){let n=l[t];n instanceof Element||(n=n.el);const o=d.find((e=>n===e.rootRef.value));o&&e.push(jn(o))}p.value=e}ua("addSwiperContext",(function(e){d.push(e),h()}));ua("removeSwiperContext",(function(e){const t=d.indexOf(e);t>=0&&(d.splice(t,1),h())}));const{onSwiperDotClick:f,circularEnabled:g,swiperEnabled:_}=Pv(e,r,p,a,n,i);let m=()=>null;return m=Gv(o,e,r,f,p,g,_),()=>{const n=t.default&&t.default();return l=xm(n),dr("uni-swiper",{ref:o},[dr("div",{ref:s,class:"uni-swiper-wrapper"},[dr("div",{class:"uni-swiper-slides",style:c.value},[dr("div",{ref:a,class:"uni-swiper-slide-frame",style:u.value},[n],4)],4),e.indicatorDots&&dr("div",{class:["uni-swiper-dots",e.vertical?"uni-swiper-dots-vertical":"uni-swiper-dots-horizontal"]},[p.value.map(((t,n,o)=>dr("div",{onClick:()=>f(n),class:{"uni-swiper-dot":!0,"uni-swiper-dot-active":n<r.current+r.displayMultipleItems&&n>=r.current||n<r.current+r.displayMultipleItems-o.length},style:{background:n===r.current?e.indicatorActiveColor:e.indicatorColor}},null,14,["onClick"])))],2),m()],512)],512)}}}),Gv=(e,t,n,o,i,s,a)=>{let r=!1,c=!1,l=!1,d=Zn(!1);function p(e,n){const o=e.currentTarget;o&&(o.style.backgroundColor="over"===n?t.navigationActiveColor:"")}Ci((()=>{r="auto"===t.navigation,d.value=!0!==t.navigation||r,y()})),Ci((()=>{const e=i.value.length,t=!s.value;c=0===n.current&&t,l=n.current===e-1&&t||t&&n.current+n.displayMultipleItems>=e,a.value||(c=!0,l=!0,r&&(d.value=!0))}));const h={onMouseover:e=>p(e,"over"),onMouseout:e=>p(e,"out")};function f(e,t,a){if(e.stopPropagation(),a)return;const r=i.value.length;let c=n.current;switch(t){case"prev":c--,c<0&&s.value&&(c=r-1);break;case"next":c++,c>=r&&s.value&&(c=0)}o(c)}const g=()=>Zp(Jp,t.navigationColor,26);let _;const m=n=>{clearTimeout(_);const{clientX:o,clientY:i}=n,{left:s,right:a,top:r,bottom:c,width:u,height:l}=e.value.getBoundingClientRect();let p=!1;if(p=t.vertical?!(i-r<l/3||c-i<l/3):!(o-s<u/3||a-o<u/3),p)return _=setTimeout((()=>{d.value=p}),300);d.value=p},v=()=>{d.value=!0};function y(){e.value&&(e.value.removeEventListener("mousemove",m),e.value.removeEventListener("mouseleave",v),r&&(e.value.addEventListener("mousemove",m),e.value.addEventListener("mouseleave",v)))}return hs(y),function(){const e={"uni-swiper-navigation-hide":d.value,"uni-swiper-navigation-vertical":t.vertical};return t.navigation?dr(ja,null,[dr("div",Ir({class:["uni-swiper-navigation uni-swiper-navigation-prev",u({"uni-swiper-navigation-disabled":c},e)],onClick:e=>f(e,"prev",c)},h),[g()],16,["onClick"]),dr("div",Ir({class:["uni-swiper-navigation uni-swiper-navigation-next",u({"uni-swiper-navigation-disabled":l},e)],onClick:e=>f(e,"next",l)},h),[g()],16,["onClick"])]):null}},Uv=Fh({name:"SwiperItem",props:{itemId:{type:String,default:""}},setup(e,{slots:t}){const n=Zn(null),o={rootRef:n,getItemId:()=>e.itemId,getBoundingClientRect:()=>n.value.getBoundingClientRect(),updatePosition(e,t){const o=t?"0":100*e+"%",i=t?100*e+"%":"0",s=n.value,a=`translate(${o},${i}) translateZ(0)`;s&&(s.style.webkitTransform=a,s.style.transform=a)}};return hs((()=>{const e=la("addSwiperContext");e&&e(o)})),ms((()=>{const e=la("removeSwiperContext");e&&e(o)})),()=>dr("uni-swiper-item",{ref:n,style:{position:"absolute",width:"100%",height:"100%"}},[t.default&&t.default()],512)}}),xv=Fh({name:"Switch",props:{name:{type:String,default:""},checked:{type:[Boolean,String],default:!1},type:{type:String,default:"switch"},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:""}},emits:["change"],setup(e,{emit:t}){const n=Zn(null),o=Zn(e.checked),i=function(e,t){const n=la($h,!1),o=la(zh,!1),i={submit:()=>{const n=["",null];return e.name&&(n[0]=e.name,n[1]=t.value),n},reset:()=>{t.value=!1}};n&&(n.addField(i),ms((()=>{n.removeField(i)})));return o}(e,o),s=Bh(n,t);Di((()=>e.checked),(e=>{o.value=e}));const a=t=>{e.disabled||(o.value=!o.value,s("change",t,{value:o.value}))};return i&&(i.addHandler(a),_s((()=>{i.removeHandler(a)}))),Jh(e,{"label-click":a}),()=>{const{color:t,type:i}=e,s=jh(e,"disabled"),r={};let c;return t&&o.value&&(r.backgroundColor=t,r.borderColor=t),c=o.value,dr("uni-switch",Ir({id:e.id,ref:n},s,{onClick:a}),[dr("div",{class:"uni-switch-wrapper"},[Ri(dr("div",{class:["uni-switch-input",[o.value?"uni-switch-input-checked":""]],style:r},null,6),[[Lc,"switch"===i]]),Ri(dr("div",{class:"uni-checkbox-input"},[c?Zp(zp,e.color,22):""],512),[[Lc,"checkbox"===i]])])],16,["id","onClick"])}}});const Fv={ensp:" ",emsp:" ",nbsp:" "};function qv(e,t){return function(e,{space:t,decode:n}){let o="",i=!1;for(let s of e)t&&Fv[t]&&" "===s&&(s=Fv[t]),i?(o+="n"===s?se:"\\"===s?"\\":"\\"+s,i=!1):"\\"===s?i=!0:o+=s;return n?o.replace(/ /g,Fv.nbsp).replace(/ /g,Fv.ensp).replace(/ /g,Fv.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"):o}(e,t).split(se)}const Vv=Fh({name:"Text",props:{selectable:{type:[Boolean,String],default:!1},space:{type:String,default:""},decode:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=Zn(null);return()=>{const o=[];return t.default&&t.default().forEach((t=>{if(8&t.shapeFlag&&t.type!==Wa){const n=qv(t.children,{space:e.space,decode:e.decode}),i=n.length-1;n.forEach(((e,t)=>{(0!==t||e)&&o.push(fr(e)),t!==i&&o.push(dr("br"))}))}else o.push(t)})),dr("uni-text",{ref:n,selectable:!!e.selectable||null},[dr("span",null,o)],8,["selectable"])}}}),Bv=u({},Lm,{placeholderClass:{type:String,default:"input-placeholder"},autoHeight:{type:[Boolean,String],default:!1},confirmType:{type:String,default:"return",validator:e=>Kv.concat("return").includes(e)}});let Hv=!1;const Kv=["done","go","next","search","send"];const jv=Fh({name:"Textarea",props:Bv,emits:["confirm","linechange",...bm],setup(e,{emit:t,expose:n}){const o=Zn(null),i=Zn(null),{fieldRef:s,state:a,scopedAttrsState:r,fixDisabledColor:c,trigger:u}=Om(e,o,t),l=Hr((()=>a.value.split(se))),d=Hr((()=>Kv.includes(e.confirmType))),p=Zn(0),h=Zn(null);function f({height:e}){p.value=e}function g(e){"Enter"===e.key&&d.value&&e.preventDefault()}function _(t){if("Enter"===t.key&&d.value){!function(e){u("confirm",e,{value:a.value})}(t);const n=t.target;!e.confirmHold&&n.blur()}}return Di((()=>p.value),(t=>{const n=o.value,s=h.value,a=i.value;let r=parseFloat(getComputedStyle(n).lineHeight);isNaN(r)&&(r=s.offsetHeight);var c=Math.round(t/r);u("linechange",{},{height:t,heightRpx:750/window.innerWidth*t,lineCount:c}),e.autoHeight&&(n.style.height="auto",a.style.height=t+"px")})),function(){const e="(prefers-color-scheme: dark)";Hv=0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&window.matchMedia(e).media!==e}(),n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),a.value=e.value}}),()=>{let t=e.disabled&&c?dr("textarea",{key:"disabled-textarea",ref:s,value:a.value,tabindex:"-1",readonly:!!e.disabled,maxlength:a.maxlength,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":Hv},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onFocus:e=>e.target.blur()},null,46,["value","readonly","maxlength","onFocus"]):dr("textarea",{key:"textarea",ref:s,value:a.value,disabled:!!e.disabled,maxlength:a.maxlength,enterkeyhint:e.confirmType,inputmode:e.inputmode,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":Hv},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onKeydown:g,onKeyup:_},null,46,["value","disabled","maxlength","enterkeyhint","inputmode","onKeydown","onKeyup"]);return dr("uni-textarea",{ref:o},[dr("div",{ref:i,class:"uni-textarea-wrapper"},[Ri(dr("div",Ir(r.attrs,{style:e.placeholderStyle,class:["uni-textarea-placeholder",e.placeholderClass]}),[e.placeholder],16),[[Lc,!a.value.length]]),dr("div",{ref:h,class:"uni-textarea-line"},[" "],512),dr("div",{class:"uni-textarea-compute"},[l.value.map((e=>dr("div",null,[e.trim()?e:"."]))),dr(Y_,{initial:!0,onResize:f},null,8,["initial","onResize"])]),"search"===e.confirmType?dr("form",{action:"",onSubmit:()=>!1,class:"uni-input-form"},[t],40,["onSubmit"]):t],512)],512)}}}),$v=Fh({name:"View",props:u({},Hh),setup(e,{slots:t}){const n=Zn(null),{hovering:o,binding:i}=Kh(e);return()=>{const s=e.hoverClass;return s&&"none"!==s?dr("uni-view",Ir({class:o.value?s:"",ref:n},i),[t.default&&t.default()],16):dr("uni-view",{ref:n},[t.default&&t.default()],512)}}});function Wv(e,t){if(t||(t=e.id),t)return e.$options.name.toLowerCase()+"."+t}function Yv(e,t,n){e&&gp(n||oh(),e,(({type:e,data:n},o)=>{t(e,n,o)}))}function zv(e,t){e&&function(e,t){t=fp(e,t),delete hp[t]}(t||oh(),e)}function Xv(e,t,n,o){const i=Dr().proxy;hs((()=>{Yv(t||Wv(i),e,o),!n&&t||Di((()=>i.id),((t,n)=>{Yv(Wv(i,t),e,o),zv(n&&Wv(i,n))}))})),_s((()=>{zv(t||Wv(i),o)}))}let Jv=0;function Zv(e,t,n,o){m(t)&&ls(e,t.bind(n),o)}function Qv(e,t,n){var o;const i=e.mpType||n.$mpType;if(i&&"component"!==i&&(Object.keys(e).forEach((o=>{if(function(e,t,n=!0){return!(n&&!m(t))&&(pt.indexOf(e)>-1||0===e.indexOf("on"))}(o,e[o],!1)){const i=e[o];h(i)?i.forEach((e=>Zv(o,e,n,t))):Zv(o,i,n,t)}})),"page"===i)){t.__isVisible=!0;try{let e=t.attrs.__pageQuery;0,rh(n,_e,e),delete t.attrs.__pageQuery,"preloadPage"!==(null==(o=n.$page)?void 0:o.openType)&&rh(n,le)}catch(aL){console.error(aL.message+se+aL.stack)}}}function ey(e,t,n){Qv(e,t,n)}function ty(e,t,n){return e[t]=n}function ny(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function oy(e){return function(t,n,o){if(!n)throw t;const i=e._instance;if(!i||!i.proxy)throw t;rh(i.proxy,pe,t)}}function iy(e,t){return e?[...new Set([].concat(e,t))]:t}function sy(e){const t=e._context.config;var n;t.errorHandler=ft(e,oy),n=t.optionMergeStrategies,pt.forEach((e=>{n[e]=iy}));const o=t.globalProperties;o.$set=ty,o.$applyOptions=ey,o.$callMethod=ny,function(e){ht.forEach((t=>t(e)))}(e)}const ay=$p("upm");function ry(){return la(ay)}function cy(e){const t=function(e){return wn(function(e){{const{enablePullDownRefresh:t,navigationBar:n}=e;if(t){const t=function(e){return e.offset&&(e.offset=Yp(e.offset)),e.height&&(e.height=Yp(e.height)),e.range&&(e.range=Yp(e.range)),e}(u({support:!0,color:"#2BD009",style:"circle",height:70,range:150,offset:0},e.pullToRefresh)),{type:o,style:i}=n;"custom"!==i&&"transparent"!==o&&(t.offset+=44+xp.top),e.pullToRefresh=t}}{const{navigationBar:t}=e,{titleSize:n,titleColor:o,backgroundColor:i}=t;t.titleText=t.titleText||"",t.type=t.type||"default",t.titleSize=n||"16px",t.titleColor=o||"#000000",t.backgroundColor=i||"#F8F8F8"}if(history.state){const t=history.state.__type__;"redirectTo"!==t&&"reLaunch"!==t||0!==xy().length||(e.isEntry=!0,e.isQuit=!0)}return e}(JSON.parse(JSON.stringify(ah(Ad().meta,e)))))}(e);return ua(ay,t),t}function uy(){return Ad()}function ly(){return history.state&&history.state.__id__||1}function dy(){const e=ih();if(!e)return;const t=Uy(),n=t.keys();for(const o of n){const e=t.get(o);e.$.__isTabBar?e.$.__isActive=!1:Fy(o)}e.$.__isTabBar&&(e.$.__isVisible=!1,rh(e,de))}function py(e,t){return e===t.fullPath||"/"===e&&t.meta.isEntry}function hy(e){const t=Uy().values();for(const n of t){const t=n.$page;if(py(e,t))return n.$.__isActive=!0,t.id}}const fy=Xf(m_,(({url:e,tabBarText:t,isAutomatedTesting:n},{resolve:o,reject:i})=>{if(Oy.handledBeforeEntryPageRoutes)return dy(),Iy({type:m_,url:e,tabBarText:t,isAutomatedTesting:n},hy(e)).then(o).catch(i);Py.push({args:{type:m_,url:e,tabBarText:t,isAutomatedTesting:n},resolve:o,reject:i})}),0,C_);function gy(){const e=th();if(!e)return;const t=e.$page;Fy(Hy(t.path,t.id))}const _y=Xf(g_,(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>{if(Oy.handledBeforeEntryPageRoutes)return gy(),Iy({type:g_,url:e,isAutomatedTesting:t}).then(n).catch(o);wy.push({args:{type:g_,url:e,isAutomatedTesting:t},resolve:n,reject:o})}),0,I_);function vy(){const e=Uy().keys();for(const t of e)Fy(t)}const yy=Xf(__,(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>{if(Oy.handledBeforeEntryPageRoutes)return vy(),Iy({type:__,url:e,isAutomatedTesting:t}).then(n).catch(o);Gy.push({args:{type:__,url:e,isAutomatedTesting:t},resolve:n,reject:o})}),0,M_);function Iy({type:e,url:t,tabBarText:n,events:o,isAutomatedTesting:i},s){const a=lI().$router,{path:r,query:c}=function(e){const[t,n]=e.split("?",2);return{path:t,query:ct(n||"")}}(t);return new Promise(((t,u)=>{const l=function(e,t){return{__id__:t||++qy,__type__:e}}(e,s);a["navigateTo"===e?"push":"replace"]({path:r,query:c,state:l,force:!0}).then((s=>{if(zl(s))return u(s.message);if("switchTab"===e&&(a.currentRoute.value.meta.tabBarText=n),"navigateTo"===e){const e=a.currentRoute.value.meta;return e.eventChannel?o&&(Object.keys(o).forEach((t=>{e.eventChannel._addListener(t,"on",o[t])})),e.eventChannel._clearCache()):e.eventChannel=new lt(l.__id__,o),t(i?{__id__:l.__id__}:{eventChannel:e.eventChannel})}return i?t({__id__:l.__id__}):t()}))}))}let My;function Cy(){var e;return My||(My=__uniConfig.tabBar&&wn((e=__uniConfig.tabBar,Wd()&&e.list&&e.list.forEach((e=>{Jd(e,["text"])})),e))),My}const Ty=window.CSS&&window.CSS.supports;function Sy(e){return Ty&&(Ty(e)||Ty.apply(window.CSS,e.split(":")))}const Ey=Sy("top:env(a)"),Dy=Sy("top:constant(a)"),ky=Sy("backdrop-filter:blur(10px)"),Ly=(()=>Ey?"env":Dy?"constant":"")();function by(e){return Ly?`calc(${e}px + ${Ly}(safe-area-inset-bottom))`:`${e}px`}const Ay="$$",Ry=new Map,Oy={handledBeforeEntryPageRoutes:!1},Ny=[],Py=[],wy=[],Gy=[];function Uy(){return Ry}function xy(){const e=[],t=Ry.values();for(const n of t)n.$.__isTabBar?n.$.__isActive&&e.push(n):e.push(n);return e}function Fy(e,t=!0){const n=Ry.get(e);n.$.__isUnload=!0,rh(n,ve),Ry.delete(e),t&&function(e){const t=Ky.get(e);t&&(Ky.delete(e),jy.pruneCacheEntry(t))}(e)}let qy=ly();function Vy(e){const t=ry();let n=e.fullPath;return e.meta.isEntry&&-1===n.indexOf(e.meta.route)&&(n="/"+e.meta.route+n.replace("/","")),function(e,t,n,o,i,s){const{id:a,route:r}=o,c=yt(o.navigationBar,__uniConfig.themeConfig,s).titleColor;return{id:a,path:je(r),route:r,fullPath:t,options:n,meta:o,openType:e,eventChannel:i,statusBarStyle:"#ffffff"===c?"light":"dark"}}("navigateTo",n,{},t)}function By(e){const t=Vy(e.$route);!function(e,t){e.route=t.route,e.$vm=e,e.$page=t,e.$mpType="page",e.$fontFamilySet=new Set,t.meta.isTabBar&&(e.$.__isTabBar=!0,e.$.__isActive=!0)}(e,t),Ry.set(Hy(t.path,t.id),e),1===Ry.size&&setTimeout((()=>{!function(){if(Oy.handledBeforeEntryPageRoutes)return;Oy.handledBeforeEntryPageRoutes=!0;const e=[...Ny];Ny.length=0,e.forEach((({args:e,resolve:t,reject:n})=>Iy(e).then(t).catch(n)));const t=[...Py];Py.length=0,t.forEach((({args:e,resolve:t,reject:n})=>(dy(),Iy(e,hy(e.url)).then(t).catch(n))));const n=[...wy];wy.length=0,n.forEach((({args:e,resolve:t,reject:n})=>(gy(),Iy(e).then(t).catch(n))));const o=[...Gy];Gy.length=0,o.forEach((({args:e,resolve:t,reject:n})=>(vy(),Iy(e).then(t).catch(n))))}()}),0)}function Hy(e,t){return e+Ay+t}const Ky=new Map,jy={get:e=>Ky.get(e),set(e,t){!function(e){const t=parseInt(e.split(Ay)[1]);if(!t)return;jy.forEach(((e,n)=>{const o=parseInt(n.split(Ay)[1]);if(o&&o>t){if(function(e){return"tabBar"===e.props.type}(e))return;jy.delete(n),jy.pruneCacheEntry(e),Oo((()=>{Ry.forEach(((e,t)=>{e.$.isUnmounted&&Ry.delete(t)}))}))}}))}(e),Ky.set(e,t)},delete(e){Ky.get(e)&&Ky.delete(e)},forEach(e){Ky.forEach(e)}};function $y(e,t){!function(e){const t=Yy(e),{body:n}=document;zy&&n.removeAttribute(zy),t&&n.setAttribute(t,""),zy=t}(e),function(e){let t=0,n=0;if("custom"!==e.navigationBar.style&&["default","float"].indexOf(e.navigationBar.type)>-1&&(t=44),e.isTabBar){const e=Cy();e.shown&&(n=parseInt(e.height))}var o;jp({"--window-top":(o=t,Ly?`calc(${o}px + ${Ly}(safe-area-inset-top))`:`${o}px`),"--window-bottom":by(n)})}(t),function(e){{const t="nvue-dir-"+__uniConfig.nvue["flex-direction"];e.isNVue?(document.body.setAttribute("nvue",""),document.body.setAttribute(t,"")):(document.body.removeAttribute("nvue"),document.body.removeAttribute(t))}}(t),Jy(e,t)}function Wy(e){const t=Yy(e);t&&function(e){const t=document.querySelector("uni-page-body");t&&t.setAttribute(e,"")}(t)}function Yy(e){return e.type.__scopeId}let zy,Xy;function Jy(e,t){if(document.removeEventListener("touchmove",ch),Xy&&document.removeEventListener("scroll",Xy),t.disableScroll)return document.addEventListener("touchmove",ch);const{onPageScroll:n,onReachBottom:o}=e,i="transparent"===t.navigationBar.type;if(!(null==n?void 0:n.length)&&!(null==o?void 0:o.length)&&!i)return;const s={},a=e.proxy.$page.id;(n||i)&&(s.onPageScroll=function(e,t,n){return o=>{t&&sT.publishHandler(Te,{scrollTop:o},e),n&&sT.emit(e+"."+Te,{scrollTop:o})}}(a,n,i)),(null==o?void 0:o.length)&&(s.onReachBottomDistance=t.onReachBottomDistance||50,s.onReachBottom=()=>sT.publishHandler(Ee,{},a)),Xy=dh(s),requestAnimationFrame((()=>document.addEventListener("scroll",Xy)))}function Zy(e){const t=bd({history:tI(),strict:!!__uniConfig.router.strict,routes:__uniRoutes,scrollBehavior:eI});t.beforeEach(((e,t)=>{var n;e&&t&&e.meta.isTabBar&&t.meta.isTabBar&&(n=t.meta.tabBarIndex,"undefined"!=typeof window&&(Qy[n]={left:window.pageXOffset,top:window.pageYOffset}))})),e.router=t,e.use(t)}let Qy=Object.create(null);const eI=(e,t,n)=>{if(n)return n;if(e&&t&&e.meta.isTabBar&&t.meta.isTabBar){const t=(o=e.meta.tabBarIndex,Qy[o]);if(t)return t}return{left:0,top:0};var o};function tI(){let{routerBase:e}=__uniConfig.router;"/"===e&&(e="");const t=(n=e,(n=location.host?n||location.pathname+location.search:"").includes("#")||(n+="#"),Bl(n));var n;return t.listen(((e,t,n)=>{"back"===n.direction&&function(e=1){const t=xy(),n=t.length-1,o=n-e;for(let i=n;i>o;i--){const e=t[i].$page;Fy(Hy(e.path,e.id),!1)}}(Math.abs(n.delta))})),t}const nI={install(e){sy(e),Th(e),Ph(e),e.config.warnHandler||(e.config.warnHandler=oI),Zy(e)}};function oI(e,t,n){if(t){if("PageMetaHead"===t.$.type.name)return;const e=t.$.parent;if(e&&"PageMeta"===e.type.name)return}const o=[`[Vue warn]: ${e}`];n.length&&o.push("\n",n),console.warn(...o)}const iI={class:"uni-async-loading"},sI=dr("i",{class:"uni-loading"},null,-1),aI=qh({name:"AsyncLoading",render:()=>(Ja(),or("div",iI,[sI]))});function rI(){window.location.reload()}const cI=qh({name:"AsyncError",setup(){ep();const{t:e}=Zd();return()=>dr("div",{class:"uni-async-error",onClick:rI},[e("uni.async.error")],8,["onClick"])}});let uI;function lI(){return uI}function dI(e){uI=e,Object.defineProperty(uI.$.ctx,"$children",{get:()=>xy().map((e=>e.$vm))});const t=uI.$.appContext.app;t.component(aI.name)||t.component(aI.name,aI),t.component(cI.name)||t.component(cI.name,cI),function(e){e.$vm=e,e.$mpType="app";const t=Zn(Zd().getLocale());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(uI),function(e,t){const n=e.$options||{};n.globalData=u(n.globalData||{},t),Object.defineProperty(e,"globalData",{get:()=>n.globalData,set(e){n.globalData=e}})}(uI),Oh(),kp()}function pI(e,{clone:t,init:n,setup:o,before:i}){t&&(e=u({},e)),i&&i(e);const s=e.setup;return e.setup=(e,t)=>{const i=Dr();n(i.proxy);const a=o(i);if(s)return s(a||e,t)},e}function hI(e,t){return e&&(e.__esModule||"Module"===e[Symbol.toStringTag])?pI(e.default,t):pI(e,t)}function fI(e){return hI(e,{clone:!0,init:By,setup(e){e.$pageInstance=e;const t=uy(),n=at(t.query);e.attrs.__pageQuery=n,e.proxy.$page.options=n,e.proxy.options=n;const o=ry();var i,s;return e.onReachBottom=wn([]),e.onPageScroll=wn([]),Di([e.onReachBottom,e.onPageScroll],(()=>{e.proxy===th()&&Jy(e,o)}),{once:!0}),ps((()=>{$y(e,o)})),hs((()=>{Wy(e);const{onReady:n}=e;n&&w(n),vI(t)})),es((()=>{if(!e.__isVisible){$y(e,o),e.__isVisible=!0;const{onShow:n}=e;n&&w(n),Oo((()=>{vI(t)}))}})),ns((()=>{if(e.__isVisible&&!e.__isUnload){e.__isVisible=!1;const{onHide:t}=e;t&&w(t)}})),i=o.id,sT.subscribe(fp(i,lp),s?s(_p):_p),_s((()=>{!function(e){sT.unsubscribe(fp(e,lp)),Object.keys(hp).forEach((t=>{0===t.indexOf(e+".")&&delete hp[t]}))}(o.id)})),n}})}function gI(){const{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}=BI(),i=90===Math.abs(Number(window.orientation))?"landscape":"portrait";aT.emit(Me,{deviceOrientation:i,size:{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}})}function _I(e){S(e.data)&&"WEB_INVOKE_APPSERVICE"===e.data.type&&aT.emit(Ue,e.data.data,e.data.pageId)}function mI(){const{emit:e}=aT;"visible"===document.visibilityState?e(we,u({},W_)):e(Ge)}function vI(e){const{tabBarText:t,tabBarIndex:n,route:o}=e.meta;t&&rh("onTabItemTap",{index:n,text:t,pagePath:o})}function yI(e){e=e>0&&e<1/0?e:0;const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.floor(e%3600%60),i=(t<10?"0":"")+t;let s=(n<10?"0":"")+n+":"+((o<10?"0":"")+o);return"00"!==i&&(s=i+":"+s),s}function II(e,t,n){const o=wn({gestureType:"none",volumeOld:0,volumeNew:0,currentTimeOld:0,currentTimeNew:0}),i={x:0,y:0};return{state:o,onTouchstart:function(e){const t=e.targetTouches[0];i.x=t.pageX,i.y=t.pageY,o.gestureType="none",o.volumeOld=0,o.currentTimeOld=o.currentTimeNew=0},onTouchmove:function(s){function a(){s.stopPropagation(),s.preventDefault()}n.fullscreen&&a();const r=o.gestureType;if("stop"===r)return;const c=s.targetTouches[0],u=c.pageX,l=c.pageY,d=i,p=t.value;if("progress"===r?function(e){const n=t.value,i=n.duration;let s=e/600*i+o.currentTimeOld;s<0?s=0:s>i&&(s=i);o.currentTimeNew=s}(u-d.x):"volume"===r&&function(e){const n=t.value,i=o.volumeOld;let s;"number"==typeof i&&(s=i-e/200,s<0?s=0:s>1&&(s=1),n.volume=s,o.volumeNew=s)}(l-d.y),"none"===r)if(Math.abs(u-d.x)>Math.abs(l-d.y)){if(!e.enableProgressGesture)return void(o.gestureType="stop");o.gestureType="progress",o.currentTimeOld=o.currentTimeNew=p.currentTime,n.fullscreen||a()}else{if(!e.pageGesture)return void(o.gestureType="stop");o.gestureType="volume",o.volumeOld=p.volume,n.fullscreen||a()}},onTouchend:function(e){const n=t.value;"none"!==o.gestureType&&"stop"!==o.gestureType&&(e.stopPropagation(),e.preventDefault()),"progress"===o.gestureType&&o.currentTimeOld!==o.currentTimeNew&&(n.currentTime=o.currentTimeNew),o.gestureType="none"}}}function MI(e,t,n,o,i,s,a,r){const c={play:e,stop:n,pause:t,seek:o,sendDanmu:i,playbackRate:s,requestFullScreen:a,exitFullScreen:r};Xv(((e,t)=>{let n;switch(e){case"seek":n=t.position;break;case"sendDanmu":n=t;break;case"playbackRate":n=t.rate}e in c&&c[e](n)}),function(e){const t=Qp(),n=Dr().proxy,o=n.$options.name.toLowerCase(),i=e||n.id||"context"+Jv++;return hs((()=>{n.$el.__uniContextInfo={id:i,type:o,page:t}})),`${o}.${i}`}(),!0)}const CI=Fh({name:"Video",props:{id:{type:String,default:""},src:{type:String,default:""},duration:{type:[Number,String],default:""},controls:{type:[Boolean,String],default:!0},danmuList:{type:Array,default:()=>[]},danmuBtn:{type:[Boolean,String],default:!1},enableDanmu:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},loop:{type:[Boolean,String],default:!1},muted:{type:[Boolean,String],default:!1},objectFit:{type:String,default:"contain"},poster:{type:String,default:""},direction:{type:[String,Number],default:""},showProgress:{type:Boolean,default:!0},initialTime:{type:[String,Number],default:0},showFullscreenBtn:{type:[Boolean,String],default:!0},pageGesture:{type:[Boolean,String],default:!1},enableProgressGesture:{type:[Boolean,String],default:!0},showPlayBtn:{type:[Boolean,String],default:!0},showCenterPlayBtn:{type:[Boolean,String],default:!0}},emits:["fullscreenchange","progress","loadedmetadata","waiting","error","play","pause","ended","timeupdate"],setup(e,{emit:t,attrs:n,slots:o}){const i=Zn(null),s=Zn(null),a=Bh(i,t),{state:r}=Tm(),{$attrs:c}=Um({excludeListeners:!0}),{t:u}=Zd();cp();const{videoRef:l,state:d,play:p,pause:f,stop:g,seek:_,playbackRate:m,toggle:v,onDurationChange:y,onLoadedMetadata:I,onProgress:M,onWaiting:C,onVideoError:T,onPlay:S,onPause:E,onEnded:D,onTimeUpdate:k}=function(e,t,n){const o=Zn(null),i=Hr((()=>of(e.src))),s=Hr((()=>"true"===e.muted||!0===e.muted)),a=wn({start:!1,src:i,playing:!1,currentTime:0,duration:0,progress:0,buffered:0,muted:s});function r(e){const t=e.target,n=t.buffered;n.length&&(a.buffered=n.end(n.length-1)/t.duration*100)}function c(){o.value.pause()}function u(e){const t=o.value;"number"!=typeof(e=Number(e))||isNaN(e)||(t.currentTime=e)}return Di((()=>i.value),(()=>{a.playing=!1,a.currentTime=0})),Di((()=>a.buffered),(e=>{n("progress",{},{buffered:e})})),Di((()=>s.value),(e=>{o.value.muted=e})),{videoRef:o,state:a,play:function(){const e=o.value;a.start=!0,e.play()},pause:c,stop:function(){u(0),c()},seek:u,playbackRate:function(e){o.value.playbackRate=e},toggle:function(){const e=o.value;a.playing?e.pause():e.play()},onDurationChange:function({target:e}){a.duration=e.duration},onLoadedMetadata:function(t){const o=Number(e.initialTime)||0,i=t.target;o>0&&(i.currentTime=o),n("loadedmetadata",t,{width:i.videoWidth,height:i.videoHeight,duration:i.duration}),r(t)},onProgress:r,onWaiting:function(e){n("waiting",e,{})},onVideoError:function(e){a.playing=!1,n("error",e,{})},onPlay:function(e){a.start=!0,a.playing=!0,n("play",e,{})},onPause:function(e){a.playing=!1,n("pause",e,{})},onEnded:function(e){a.playing=!1,n("ended",e,{})},onTimeUpdate:function(e){const t=e.target,o=a.currentTime=t.currentTime;n("timeupdate",e,{currentTime:o,duration:t.duration})}}}(e,0,a),{state:L,danmuRef:b,updateDanmu:A,toggleDanmu:R,sendDanmu:O}=function(e,t){const n=Zn(null),o=wn({enable:Boolean(e.enableDanmu)});let i={time:0,index:-1};const s=h(e.danmuList)?JSON.parse(JSON.stringify(e.danmuList)):[];function a(e){const t=document.createElement("p");t.className="uni-video-danmu-item",t.innerText=e.text;let o=`bottom: ${100*Math.random()}%;color: ${e.color};`;t.setAttribute("style",o),n.value.appendChild(t),setTimeout((function(){o+="left: 0;-webkit-transform: translateX(-100%);transform: translateX(-100%);",t.setAttribute("style",o),setTimeout((function(){t.remove()}),4e3)}),17)}return s.sort((function(e,t){return(e.time||0)-(t.time||0)})),{state:o,danmuRef:n,updateDanmu:function(e){const n=e.target.currentTime,r=i,c={time:n,index:r.index};if(n>r.time)for(let i=r.index+1;i<s.length;i++){const e=s[i];if(!(n>=(e.time||0)))break;c.index=i,t.playing&&o.enable&&a(e)}else if(n<r.time)for(let t=r.index-1;t>-1&&n<=(s[t].time||0);t--)c.index=t-1;i=c},toggleDanmu:function(){o.enable=!o.enable},sendDanmu:function(e){s.splice(i.index+1,0,{text:String(e.text),color:e.color,time:t.currentTime||0})}}}(e,d),{state:N,onFullscreenChange:P,emitFullscreenChange:w,toggleFullscreen:G,requestFullScreen:U,exitFullScreen:x}=function(e,t,n,o,i){const s=wn({fullscreen:!1}),a=/^Apple/.test(navigator.vendor);function r(t){s.fullscreen=t,e("fullscreenchange",{},{fullScreen:t,direction:"vertical"})}function c(e){const s=i.value,c=t.value,u=n.value;let l;e?!document.fullscreenEnabled&&!document.webkitFullscreenEnabled||a&&!o.userAction?u.webkitEnterFullScreen?u.webkitEnterFullScreen():(l=!0,c.remove(),c.classList.add("uni-video-type-fullscreen"),document.body.appendChild(c)):c[document.fullscreenEnabled?"requestFullscreen":"webkitRequestFullscreen"]():document.fullscreenEnabled||document.webkitFullscreenEnabled?document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen():u.webkitExitFullScreen?u.webkitExitFullScreen():(l=!0,c.remove(),c.classList.remove("uni-video-type-fullscreen"),s.appendChild(c)),l&&r(e)}function u(){c(!1)}return _s(u),{state:s,onFullscreenChange:function(e,t){t&&document.fullscreenEnabled||r(!(!document.fullscreenElement&&!document.webkitFullscreenElement))},emitFullscreenChange:r,toggleFullscreen:c,requestFullScreen:function(){c(!0)},exitFullScreen:u}}(a,s,l,r,i),{state:F,onTouchstart:q,onTouchend:V,onTouchmove:B}=II(e,l,N),{state:H,progressRef:K,ballRef:j,clickProgress:$,toggleControls:W}=function(e,t,n){const o=Zn(null),i=Zn(null),s=Hr((()=>e.showCenterPlayBtn&&!t.start)),a=Zn(!0),r=Hr((()=>!s.value&&e.controls&&a.value)),c=wn({touching:!1,controlsTouching:!1,centerPlayBtnShow:s,controlsShow:r,controlsVisible:a});let u;function l(){u=setTimeout((()=>{c.controlsVisible=!1}),3e3)}function d(){u&&(clearTimeout(u),u=null)}return _s((()=>{u&&clearTimeout(u)})),Di((()=>c.controlsShow&&t.playing&&!c.controlsTouching),(e=>{e?l():d()})),Di([()=>t.currentTime,()=>{e.duration}],(function(){c.touching||(t.progress=t.currentTime/t.duration*100)})),hs((()=>{const e=ot(!1);let s,a,r,u=!0;const l=i.value;function d(e){const n=e.targetTouches[0],i=n.pageX,c=n.pageY;if(u&&Math.abs(i-s)<Math.abs(c-a))return void p(e);u=!1;const l=o.value.offsetWidth;let d=r+(i-s)/l*100;d<0?d=0:d>100&&(d=100),t.progress=d,e.preventDefault(),e.stopPropagation()}function p(o){c.controlsTouching=!1,c.touching&&(l.removeEventListener("touchmove",d,e),u||(o.preventDefault(),o.stopPropagation(),n(t.duration*t.progress/100)),c.touching=!1)}l.addEventListener("touchstart",(n=>{c.controlsTouching=!0;const o=n.targetTouches[0];s=o.pageX,a=o.pageY,r=t.progress,u=!0,c.touching=!0,l.addEventListener("touchmove",d,e)})),l.addEventListener("touchend",p),l.addEventListener("touchcancel",p)})),{state:c,progressRef:o,ballRef:i,clickProgress:function(e){const i=o.value;let s=e.target,a=e.offsetX;for(;s&&s!==i;)a+=s.offsetLeft,s=s.parentNode;const r=i.offsetWidth;let c=0;a>=0&&a<=r&&(c=a/r,n(t.duration*c))},toggleControls:function(){c.controlsVisible=!c.controlsVisible},autoHideStart:l,autoHideEnd:d}}(e,d,_);return MI(p,f,g,_,O,m,U,x),()=>dr("uni-video",{ref:i,id:e.id,onClick:W},[dr("div",{ref:s,class:"uni-video-container",onTouchstart:q,onTouchend:V,onTouchmove:B,onFullscreenchange:Pu(P,["stop"]),onWebkitfullscreenchange:Pu((e=>P(e,!0)),["stop"])},[dr("video",Ir({ref:l,style:{"object-fit":e.objectFit},muted:!!e.muted,loop:!!e.loop,src:d.src,poster:e.poster,autoplay:!!e.autoplay},c.value,{class:"uni-video-video","webkit-playsinline":!0,playsinline:!0,onDurationchange:y,onLoadedmetadata:I,onProgress:M,onWaiting:C,onError:T,onPlay:S,onPause:E,onEnded:D,onTimeupdate:e=>{k(e),A(e)},onWebkitbeginfullscreen:()=>w(!0),onX5videoenterfullscreen:()=>w(!0),onWebkitendfullscreen:()=>w(!1),onX5videoexitfullscreen:()=>w(!1)}),null,16,["muted","loop","src","poster","autoplay","webkit-playsinline","playsinline","onDurationchange","onLoadedmetadata","onProgress","onWaiting","onError","onPlay","onPause","onEnded","onTimeupdate","onWebkitbeginfullscreen","onX5videoenterfullscreen","onWebkitendfullscreen","onX5videoexitfullscreen"]),Ri(dr("div",{class:"uni-video-bar uni-video-bar-full",onClick:Pu((()=>{}),["stop"])},[dr("div",{class:"uni-video-controls"},[Ri(dr("div",{class:{"uni-video-control-button":!0,"uni-video-control-button-play":!d.playing,"uni-video-control-button-pause":d.playing},onClick:Pu(v,["stop"])},null,10,["onClick"]),[[Lc,e.showPlayBtn]]),Ri(dr("div",{class:"uni-video-current-time"},[yI(d.currentTime)],512),[[Lc,e.showProgress]]),Ri(dr("div",{ref:K,class:"uni-video-progress-container",onClick:Pu($,["stop"])},[dr("div",{class:"uni-video-progress"},[dr("div",{style:{width:d.buffered+"%"},class:"uni-video-progress-buffered"},null,4),dr("div",{ref:j,style:{left:d.progress+"%"},class:"uni-video-ball"},[dr("div",{class:"uni-video-inner"},null)],4)])],8,["onClick"]),[[Lc,e.showProgress]]),Ri(dr("div",{class:"uni-video-duration"},[yI(Number(e.duration)||d.duration)],512),[[Lc,e.showProgress]])]),Ri(dr("div",{class:{"uni-video-danmu-button":!0,"uni-video-danmu-button-active":L.enable},onClick:Pu(R,["stop"])},[u("uni.video.danmu")],10,["onClick"]),[[Lc,e.danmuBtn]]),Ri(dr("div",{class:{"uni-video-fullscreen":!0,"uni-video-type-fullscreen":N.fullscreen},onClick:Pu((()=>G(!N.fullscreen)),["stop"])},null,10,["onClick"]),[[Lc,e.showFullscreenBtn]])],8,["onClick"]),[[Lc,H.controlsShow]]),Ri(dr("div",{ref:b,style:"z-index: 0;",class:"uni-video-danmu"},null,512),[[Lc,d.start&&L.enable]]),H.centerPlayBtnShow&&dr("div",{class:"uni-video-cover",onClick:Pu((()=>{}),["stop"])},[dr("div",{class:"uni-video-cover-play-button",onClick:Pu(p,["stop"])},null,8,["onClick"]),dr("p",{class:"uni-video-cover-duration"},[yI(Number(e.duration)||d.duration)])],8,["onClick"]),dr("div",{class:{"uni-video-toast":!0,"uni-video-toast-volume":"volume"===F.gestureType}},[dr("div",{class:"uni-video-toast-title"},[u("uni.video.volume")]),dr("svg",{class:"uni-video-toast-icon",width:"200px",height:"200px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[dr("path",{d:"M475.400704 201.19552l0 621.674496q0 14.856192-10.856448 25.71264t-25.71264 10.856448-25.71264-10.856448l-190.273536-190.273536-149.704704 0q-14.856192 0-25.71264-10.856448t-10.856448-25.71264l0-219.414528q0-14.856192 10.856448-25.71264t25.71264-10.856448l149.704704 0 190.273536-190.273536q10.856448-10.856448 25.71264-10.856448t25.71264 10.856448 10.856448 25.71264zm219.414528 310.837248q0 43.425792-24.28416 80.851968t-64.2816 53.425152q-5.71392 2.85696-14.2848 2.85696-14.856192 0-25.71264-10.570752t-10.856448-25.998336q0-11.999232 6.856704-20.284416t16.570368-14.2848 19.427328-13.142016 16.570368-20.284416 6.856704-32.569344-6.856704-32.569344-16.570368-20.284416-19.427328-13.142016-16.570368-14.2848-6.856704-20.284416q0-15.427584 10.856448-25.998336t25.71264-10.570752q8.57088 0 14.2848 2.85696 39.99744 15.427584 64.2816 53.139456t24.28416 81.137664zm146.276352 0q0 87.422976-48.56832 161.41824t-128.5632 107.707392q-7.428096 2.85696-14.2848 2.85696-15.427584 0-26.284032-10.856448t-10.856448-25.71264q0-22.284288 22.284288-33.712128 31.997952-16.570368 43.425792-25.141248 42.283008-30.855168 65.995776-77.423616t23.712768-99.136512-23.712768-99.136512-65.995776-77.423616q-11.42784-8.57088-43.425792-25.141248-22.284288-11.42784-22.284288-33.712128 0-14.856192 10.856448-25.71264t25.71264-10.856448q7.428096 0 14.856192 2.85696 79.99488 33.712128 128.5632 107.707392t48.56832 161.41824zm146.276352 0q0 131.42016-72.566784 241.41312t-193.130496 161.989632q-7.428096 2.85696-14.856192 2.85696-14.856192 0-25.71264-10.856448t-10.856448-25.71264q0-20.570112 22.284288-33.712128 3.999744-2.285568 12.85632-5.999616t12.85632-5.999616q26.284032-14.2848 46.854144-29.140992 70.281216-51.996672 109.707264-129.705984t39.426048-165.132288-39.426048-165.132288-109.707264-129.705984q-20.570112-14.856192-46.854144-29.140992-3.999744-2.285568-12.85632-5.999616t-12.85632-5.999616q-22.284288-13.142016-22.284288-33.712128 0-14.856192 10.856448-25.71264t25.71264-10.856448q7.428096 0 14.856192 2.85696 120.563712 51.996672 193.130496 161.989632t72.566784 241.41312z"},null)]),dr("div",{class:"uni-video-toast-value"},[dr("div",{style:{width:100*F.volumeNew+"%"},class:"uni-video-toast-value-content"},[dr("div",{class:"uni-video-toast-volume-grids"},[Cs(10,(()=>dr("div",{class:"uni-video-toast-volume-grids-item"},null)))])],4)])],2),dr("div",{class:{"uni-video-toast":!0,"uni-video-toast-progress":"progress"===F.gestureType}},[dr("div",{class:"uni-video-toast-title"},[yI(F.currentTimeNew)," / ",yI(d.duration)])],2),dr("div",{class:"uni-video-slots"},[o.default&&o.default()])],40,["onTouchstart","onTouchend","onTouchmove","onFullscreenchange","onWebkitfullscreenchange"])],8,["id","onClick"])}}),TI=({name:e,arg:t})=>{"postMessage"===e||uni[e](t)},SI=Ye((()=>aT.on(Ue,TI))),EI=Fh({inheritAttrs:!1,name:"WebView",props:{src:{type:String,default:""},fullscreen:{type:Boolean,default:!0}},setup(e){SI();const t=Zn(null),n=Zn(null),{$attrs:o,$excludeAttrs:i,$listeners:s}=Um({excludeListeners:!0});let a;return(()=>{const i=document.createElement("iframe");Ci((()=>{for(const e in o.value)if(p(o.value,e)){const t=o.value[e];i[e]=t}})),Ci((()=>{i.src=of(e.src)})),n.value=i,a=function(e,t,n){const o=()=>{var o,i;if(n){const{top:n,left:o,width:i,height:s}=e.value.getBoundingClientRect();We(t.value,{position:"absolute",display:"block",border:"0",top:n+"px",left:o+"px",width:i+"px",height:s+"px"})}else We(t.value,{width:(null==(o=e.value)?void 0:o.style.width)||"300px",height:(null==(i=e.value)?void 0:i.style.height)||"150px"})};return o}(t,n,e.fullscreen),e.fullscreen&&document.body.appendChild(i)})(),hs((()=>{var o;a(),!e.fullscreen&&(null==(o=t.value)||o.appendChild(n.value))})),ts((()=>{e.fullscreen&&(n.value.style.display="block")})),os((()=>{e.fullscreen&&(n.value.style.display="none")})),_s((()=>{e.fullscreen&&document.body.removeChild(n.value)})),()=>dr(ja,null,[dr("uni-web-view",Ir({class:e.fullscreen?"uni-webview--fullscreen":""},s.value,i.value,{ref:t}),[dr(Y_,{onResize:a},null,8,["onResize"])],16)])}});const DI=Ye((()=>{Cg.forEach((e=>{kI.prototype[e]=function(t){m(t)&&this._events[e].push(t)}})),Tg.forEach((e=>{kI.prototype[e]=function(t){var n=this._events[e.replace("off","on")],o=n.indexOf(t);o>=0&&n.splice(o,1)}}))}));class kI{constructor(){this._src="";var e=this._audio=new Audio;this._stoping=!1;["src","autoplay","loop","duration","currentTime","paused","volume"].forEach((t=>{Object.defineProperty(this,t,{set:"src"===t?t=>(e.src=of(t),this._src=t,t):n=>(e[t]=n,n),get:"src"===t?()=>this._src:()=>e[t]})})),this.startTime=0,Object.defineProperty(this,"obeyMuteSwitch",{set:()=>!1,get:()=>!1}),Object.defineProperty(this,"buffered",{get(){var t=e.buffered;return t.length?t.end(t.length-1):0}}),this._events={},Cg.forEach((e=>{this._events[e]=[]})),e.addEventListener("loadedmetadata",(()=>{var t=Number(this.startTime)||0;t>0&&(e.currentTime=t)}));var t=["canplay","pause","seeking","seeked","timeUpdate"];t.concat(["play","ended","error","waiting"]).forEach((n=>{e.addEventListener(n.toLowerCase(),(()=>{if(this._stoping&&t.indexOf(n)>=0)return;const e=`on${n.slice(0,1).toUpperCase()}${n.slice(1)}`;this._events[e].forEach((e=>{e()}))}),!1)})),DI()}play(){this._stoping=!1,this._audio.play()}pause(){this._audio.pause()}stop(){this._stoping=!0,this._audio.pause(),this._audio.currentTime=0,this._events.onStop.forEach((e=>{e()}))}seek(e){this._stoping=!1,"number"!=typeof(e=Number(e))||isNaN(e)||(this._audio.currentTime=e)}destroy(){this.stop()}}const LI=zf(0,(()=>new kI)),bI=Xf("makePhoneCall",(({phoneNumber:e},{resolve:t})=>(window.location.href=`tel:${e}`,t()))),AI="__DC_STAT_UUID",RI=navigator.cookieEnabled&&(window.localStorage||window.sessionStorage)||{};let OI;function NI(){if(OI=OI||RI[AI],!OI){OI=Date.now()+""+Math.floor(1e7*Math.random());try{RI[AI]=OI}catch(e){}}return OI}function PI(){if(!0!==__uniConfig.darkmode)return v(__uniConfig.darkmode)?__uniConfig.darkmode:"light";try{return window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}catch(e){return"light"}}function wI(){let e,t="0",n="",o="phone";const i=navigator.language;if(rf){e="iOS";const o=sf.match(/OS\s([\w_]+)\slike/);o&&(t=o[1].replace(/_/g,"."));const i=sf.match(/\(([a-zA-Z]+);/);i&&(n=i[1])}else if(af){e="Android";const o=sf.match(/Android[\s/]([\w\.]+)[;\s]/);o&&(t=o[1]);const i=sf.match(/\((.+?)\)/),s=i?i[1].split(";"):sf.split(" "),a=[/\bAndroid\b/i,/\bLinux\b/i,/\bU\b/i,/^\s?[a-z][a-z]$/i,/^\s?[a-z][a-z]-[a-z][a-z]$/i,/\bwv\b/i,/\/[\d\.,]+$/,/^\s?[\d\.,]+$/,/\bBrowser\b/i,/\bMobile\b/i];for(let e=0;e<s.length;e++){const t=s[e];if(t.indexOf("Build")>0){n=t.split("Build")[0].trim();break}let o;for(let e=0;e<a.length;e++)if(a[e].test(t)){o=!0;break}if(!o){n=t.trim();break}}}else if(df)n="iPad",e="iOS",o="pad",t=m(window.BigInt)?"14.0":"13.0";else if(cf||uf||lf){n="PC",e="PC",o="pc",t="0";let i=sf.match(/\((.+?)\)/)[1];if(cf){switch(e="Windows",cf[1]){case"5.1":t="XP";break;case"6.0":t="Vista";break;case"6.1":t="7";break;case"6.2":t="8";break;case"6.3":t="8.1";break;case"10.0":t="10"}const n=i&&i.match(/[Win|WOW]([\d]+)/);n&&(t+=` x${n[1]}`)}else if(uf){e="macOS";const n=i&&i.match(/Mac OS X (.+)/)||"";t&&(t=n[1].replace(/_/g,"."),-1!==t.indexOf(";")&&(t=t.split(";")[0]))}else if(lf){e="Linux";const n=i&&i.match(/Linux (.*)/)||"";n&&(t=n[1],-1!==t.indexOf(";")&&(t=t.split(";")[0]))}}else e="Other",t="0",o="unknown";const s=`${e} ${t}`,a=e.toLocaleLowerCase();let r="",c=String(function(){const e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Edge")>-1&&!t,o=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);const t=parseFloat(RegExp.$1);return t>6?t:6}return n?-1:o?11:-1}());if("-1"!==c)r="IE";else{const e=["Version","Firefox","Chrome","Edge{0,1}"],t=["Safari","Firefox","Chrome","Edge"];for(let n=0;n<e.length;n++){const o=e[n],i=new RegExp(`(${o})/(\\S*)\\b`);i.test(sf)&&(r=t[n],c=sf.match(i)[2])}}let u="portrait";const l=void 0===window.screen.orientation?window.orientation:window.screen.orientation.angle;return u=90===Math.abs(l)?"landscape":"portrait",{deviceBrand:void 0,brand:void 0,deviceModel:n,deviceOrientation:u,model:n,system:s,platform:a,browserName:r.toLocaleLowerCase(),browserVersion:c,language:i,deviceType:o,ua:sf,osname:e,osversion:t,theme:PI()}}const GI=zf(0,(()=>{const e=window.devicePixelRatio,t=pf(),n=hf(t),o=ff(t,n),i=function(e,t){return e?Math[t?"min":"max"](screen.height,screen.width):screen.height}(t,n),s=gf(o);let a=window.innerHeight;const r=xp.top,c={left:xp.left,right:s-xp.right,top:xp.top,bottom:a-xp.bottom,width:s-xp.left-xp.right,height:a-xp.top-xp.bottom},{top:u,bottom:l}=Hp();return a-=u,a-=l,{windowTop:u,windowBottom:l,windowWidth:s,windowHeight:a,pixelRatio:e,screenWidth:o,screenHeight:i,statusBarHeight:r,safeArea:c,safeAreaInsets:{top:xp.top,right:xp.right,bottom:xp.bottom,left:xp.left},screenTop:i-a}}));let UI,xI=!0;function FI(){xI&&(UI=wI())}const qI=zf(0,(()=>{FI();const{deviceBrand:e,deviceModel:t,brand:n,model:o,platform:i,system:s,deviceOrientation:a,deviceType:r,osname:c,osversion:l}=UI;return u({brand:n,deviceBrand:e,deviceModel:t,devicePixelRatio:window.devicePixelRatio,deviceId:NI(),deviceOrientation:a,deviceType:r,model:o,platform:i,system:s},{})})),VI=zf(0,(()=>{FI();const{theme:e,language:t,browserName:n,browserVersion:o}=UI;return u({appId:__uniConfig.appId,appName:__uniConfig.appName,appVersion:__uniConfig.appVersion,appVersionCode:__uniConfig.appVersionCode,appLanguage:Bg?Bg():t,enableDebug:!1,hostSDKVersion:void 0,hostPackageName:void 0,hostFontSizeSetting:void 0,hostName:n,hostVersion:o,hostTheme:e,hostLanguage:t,language:t,SDKVersion:"",theme:e,version:""},{})})),BI=zf(0,(()=>{xI=!0,FI(),xI=!1;const e=GI(),t=qI(),n=VI();xI=!0;const{ua:o,browserName:i,browserVersion:s,osname:a,osversion:r}=UI,c=u(e,t,n,{ua:o,browserName:i,browserVersion:s,uniPlatform:"web",uniCompileVersion:__uniConfig.compilerVersion,uniRuntimeVersion:__uniConfig.compilerVersion,fontSizeSetting:void 0,osName:a.toLocaleLowerCase(),osVersion:r,osLanguage:void 0,osTheme:void 0});return delete c.screenTop,delete c.enableDebug,__uniConfig.darkmode||delete c.theme,function(e){let t={};return S(e)&&Object.keys(e).sort().forEach((n=>{const o=n;t[o]=e[o]})),Object.keys(t)?t:e}(c)})),HI=Xf("getSystemInfo",((e,{resolve:t})=>t(BI())));const KI=Xf("setClipboardData",((e,t)=>{return n=void 0,o=[e,t],i=function*({data:e},{resolve:t,reject:n}){try{yield navigator.clipboard.writeText(e),t()}catch(o){!function(e,t,n){const o=document.getElementById("#clipboard");o&&o.remove();const i=document.createElement("textarea");i.setAttribute("inputmode","none"),i.id="#clipboard",i.style.position="fixed",i.style.top="-9999px",i.style.zIndex="-9999",document.body.appendChild(i),i.value=e,i.select(),i.setSelectionRange(0,i.value.length);const s=document.execCommand("Copy",!1);i.blur(),s?t():n()}(e,t,n)}},new Promise(((e,t)=>{var s=e=>{try{r(i.next(e))}catch(aL){t(aL)}},a=e=>{try{r(i.throw(e))}catch(aL){t(aL)}},r=t=>t.done?e(t.value):Promise.resolve(t.value).then(s,a);r((i=i.apply(n,o)).next())}));var n,o,i}),0,Zg);const jI=zf(0,((e,t)=>{const n=typeof t,o="string"===n?t:JSON.stringify({type:n,data:t});localStorage.setItem(e,o)}));function $I(e){const t=localStorage&&localStorage.getItem(e);if(!v(t))throw new Error("data not found");let n=t;try{const e=function(e){const t=["object","string","number","boolean","undefined"];try{const n=v(e)?JSON.parse(e):e,o=n.type;if(t.indexOf(o)>=0){const e=Object.keys(n);if(2===e.length&&"data"in n){if(typeof n.data===o)return n.data;if("object"===o&&/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/.test(n.data))return new Date(n.data)}else if(1===e.length)return""}}catch(n){}}(JSON.parse(t));void 0!==e&&(n=e)}catch(o){}return n}const WI=zf(0,(e=>{try{return $I(e)}catch(t){return""}})),YI=zf(0,(e=>{localStorage&&localStorage.removeItem(e)})),zI=zf(0,(()=>{localStorage&&localStorage.clear()})),XI=Xf("openDocument",(({filePath:e},{resolve:t})=>(window.open(e),t())),0,Qg),JI=Xf("hideKeyboard",((e,{resolve:t,reject:n})=>{const o=document.activeElement;!o||"TEXTAREA"!==o.tagName&&"INPUT"!==o.tagName||(o.blur(),t())}));const ZI=Xf("getImageInfo",(({src:e},{resolve:t,reject:n})=>{const o=new Image;o.onload=function(){t({width:o.naturalWidth,height:o.naturalHeight,path:0===e.indexOf("/")?window.location.protocol+"//"+window.location.host+e:e})},o.onerror=function(){n()},o.src=e}),0,i_),QI={image:{jpg:"jpeg",jpe:"jpeg",pbm:"x-portable-bitmap",pgm:"x-portable-graymap",pnm:"x-portable-anymap",ppm:"x-portable-pixmap",psd:"vnd.adobe.photoshop",pic:"x-pict",rgb:"x-rgb",svg:"svg+xml",svgz:"svg+xml",tif:"tiff",xif:"vnd.xiff",wbmp:"vnd.wap.wbmp",wdp:"vnd.ms-photo",xbm:"x-xbitmap",ico:"x-icon"},video:{"3g2":"3gpp2","3gp":"3gpp",avi:"x-msvideo",f4v:"x-f4v",flv:"x-flv",jpgm:"jpm",jpgv:"jpeg",m1v:"mpeg",m2v:"mpeg",mpe:"mpeg",mpg:"mpeg",mpg4:"mpeg",m4v:"x-m4v",mkv:"x-matroska",mov:"quicktime",qt:"quicktime",movie:"x-sgi-movie",mp4v:"mp4",ogv:"ogg",smv:"x-smv",wm:"x-ms-wm",wmv:"x-ms-wmv",wmx:"x-ms-wmx",wvx:"x-ms-wvx"}};function eM({count:e,sourceType:t,type:n,extension:o}){Mm();const i=document.createElement("input");return i.type="file",We(i,{position:"absolute",visibility:"hidden",zIndex:"-999",width:"0",height:"0",top:"0",left:"0"}),i.accept=o.map((e=>{if("all"!==n){const t=e.replace(".","");return`${n}/${QI[n][t]||t}`}return function(){const e=window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i);return!(!e||"micromessenger"!==e[0])}()?".":0===e.indexOf(".")?e:`.${e}`})).join(","),e&&e>1&&(i.multiple=!0),"all"!==n&&t instanceof Array&&1===t.length&&"camera"===t[0]&&i.setAttribute("capture","camera"),i}let tM=null;const nM=Xf("chooseFile",(({count:e,sourceType:t,type:n,extension:o},{resolve:i,reject:s})=>{sp();const{t:a}=Zd();tM&&(document.body.removeChild(tM),tM=null),tM=eM({count:e,sourceType:t,type:n,extension:o}),document.body.appendChild(tM),tM.addEventListener("change",(function(t){const n=t.target,o=[];if(n&&n.files){const t=n.files.length;for(let i=0;i<t;i++){const t=n.files[i];let s;Object.defineProperty(t,"path",{get:()=>(s=s||K_(t),s)}),i<e&&o.push(t)}}i({get tempFilePaths(){return o.map((({path:e})=>e))},tempFiles:o})})),tM.click(),Cm()||console.warn(a("uni.chooseFile.notUserActivation"))}),0,o_);let oM=null;const iM=Xf("chooseImage",(({count:e,sourceType:t,extension:n},{resolve:o,reject:i})=>{sp();const{t:s}=Zd();oM&&(document.body.removeChild(oM),oM=null),oM=eM({count:e,sourceType:t,extension:n,type:"image"}),document.body.appendChild(oM),oM.addEventListener("change",(function(t){const n=t.target,i=[];if(n&&n.files){const t=n.files.length;for(let o=0;o<t;o++){const t=n.files[o];let s;Object.defineProperty(t,"path",{get:()=>(s=s||K_(t),s)}),o<e&&i.push(t)}}o({get tempFilePaths(){return i.map((({path:e})=>e))},tempFiles:i})})),oM.click(),Cm()||console.warn(s("uni.chooseFile.notUserActivation"))}),0,e_),sM={esc:["Esc","Escape"],enter:["Enter"]},aM=Object.keys(sM);function rM(){const e=Zn(""),t=Zn(!1),n=n=>{if(t.value)return;const o=aM.find((e=>-1!==sM[e].indexOf(n.key)));o&&(e.value=o),Oo((()=>e.value=""))};return hs((()=>{document.addEventListener("keyup",n)})),_s((()=>{document.removeEventListener("keyup",n)})),{key:e,disable:t}}const cM=dr("div",{class:"uni-mask"},null,-1);function uM(e,t,n){return t.onClose=(...e)=>(t.visible=!1,n.apply(null,e)),Ku(ji({setup:()=>()=>(Ja(),or(e,t,null,16))}))}function lM(e){let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.append(t)),t}function dM(e,{onEsc:t,onEnter:n}){const o=Zn(e.visible),{key:i,disable:s}=rM();return Di((()=>e.visible),(e=>o.value=e)),Di((()=>o.value),(e=>s.value=!e)),Ci((()=>{const{value:e}=i;"esc"===e?t&&t():"enter"===e&&n&&n()})),o}let pM=0,hM="";function fM(e){let t=pM;pM+=e?1:-1,pM=Math.max(0,pM),pM>0?0===t&&(hM=document.body.style.overflow,document.body.style.overflow="hidden"):(document.body.style.overflow=hM,hM="")}const gM=qh({name:"ImageView",props:{src:{type:String,default:""}},setup(e){const t=wn({direction:"none"});let n=1,o=0,i=0,s=0,a=0;function r({detail:e}){n=e.scale}function c(e){const t=e.target.getBoundingClientRect();o=t.width,i=t.height}function u(e){const t=e.target.getBoundingClientRect();s=t.width,a=t.height,d(e)}function l(e){const r=n*o>s,c=n*i>a;t.direction=r&&c?"all":r?"horizontal":c?"vertical":"none",d(e)}function d(e){"all"!==t.direction&&"horizontal"!==t.direction||e.stopPropagation()}return()=>{const n={position:"absolute",left:"0",top:"0",width:"100%",height:"100%"};return dr(Fm,{style:n,onTouchstart:Vh(u),onTouchmove:Vh(d),onTouchend:Vh(l)},{default:()=>[dr(Zm,{style:n,direction:t.direction,inertia:!0,scale:!0,"scale-min":"1","scale-max":"4",onScale:r},{default:()=>[dr("img",{src:e.src,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",maxHeight:"100%",maxWidth:"100%"},onLoad:c},null,40,["src","onLoad"])]},8,["style","direction","inertia","scale","onScale"])]},8,["style","onTouchstart","onTouchmove","onTouchend"])}}});function _M(e){let t="number"==typeof e.current?e.current:e.urls.indexOf(e.current);return t=t<0?0:t,t}const mM=qh({name:"ImagePreview",props:{urls:{type:Array,default:()=>[]},current:{type:[Number,String],default:0}},emits:["close"],setup(e,{emit:t}){hs((()=>fM(!0))),ms((()=>fM(!1)));const n=Zn(null),o=Zn(_M(e));let i;function s(){i||Oo((()=>{t("close")}))}function a(e){o.value=e.detail.current}Di((()=>e.current),(()=>o.value=_M(e))),hs((()=>{const e=n.value;let t=0,o=0;e.addEventListener("mousedown",(e=>{i=!1,t=e.clientX,o=e.clientY})),e.addEventListener("mouseup",(e=>{(Math.abs(e.clientX-t)>20||Math.abs(e.clientY-o)>20)&&(i=!0)}))}));const r={position:"absolute","box-sizing":"border-box",top:"0",right:"0",width:"60px",height:"44px",padding:"6px","line-height":"32px","font-size":"26px",color:"white","text-align":"center",cursor:"pointer"};return()=>{let t;return dr("div",{ref:n,style:{display:"block",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",zIndex:999,background:"rgba(0,0,0,0.8)"},onClick:s},[dr(wv,{navigation:"auto",current:o.value,onChange:a,"indicator-dots":!1,autoplay:!1,style:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}},(i=t=e.urls.map((e=>dr(Uv,null,{default:()=>[dr(gM,{src:e},null,8,["src"])]}))),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!ir(i)?t:{default:()=>[t],_:1}),8,["current","onChange"]),dr("div",{style:r},[Zp("M17.25 16.156l7.375-7.313q0.281-0.281 0.281-0.641t-0.281-0.641q-0.25-0.25-0.625-0.25t-0.625 0.25l-7.375 7.344-7.313-7.344q-0.25-0.25-0.625-0.25t-0.625 0.25q-0.281 0.25-0.281 0.625t0.281 0.625l7.313 7.344-7.375 7.344q-0.281 0.25-0.281 0.625t0.281 0.625q0.125 0.125 0.281 0.188t0.344 0.063q0.156 0 0.328-0.063t0.297-0.188l7.375-7.344 7.375 7.406q0.125 0.156 0.297 0.219t0.328 0.063q0.188 0 0.344-0.078t0.281-0.203q0.281-0.25 0.281-0.609t-0.281-0.641l-7.375-7.406z","#ffffff",26)],4)],8,["onClick"]);var i}}});let vM,yM=null;const IM=()=>{yM=null,Oo((()=>{null==vM||vM.unmount(),vM=null}))},MM=Xf("previewImage",((e,{resolve:t})=>{yM?u(yM,e):(yM=wn(e),Oo((()=>{vM=uM(mM,yM,IM),vM.mount(lM("u-a-p"))}))),t()}),0,s_);let CM=null;const TM=Xf("chooseVideo",(({sourceType:e,extension:t},{resolve:n,reject:o})=>{sp();const{t:i}=Zd();CM&&(document.body.removeChild(CM),CM=null),CM=eM({sourceType:e,extension:t,type:"video"}),document.body.appendChild(CM),CM.addEventListener("change",(function(e){const t=e.target.files[0];let o="";const i={tempFilePath:o,tempFile:t,size:t.size,duration:0,width:0,height:0,name:t.name};Object.defineProperty(i,"tempFilePath",{get(){return o=o||K_(this.tempFile),o}});const s=document.createElement("video");if(void 0!==s.onloadedmetadata){const e=K_(t);s.onloadedmetadata=function(){j_(e),n(u(i,{duration:s.duration||0,width:s.videoWidth||0,height:s.videoHeight||0}))},setTimeout((()=>{s.onloadedmetadata=null,j_(e),n(i)}),300),s.src=e}else n(i)})),CM.click(),Cm()||console.warn(i("uni.chooseFile.notUserActivation"))}),0,t_),SM=Yf("request",(({url:e,data:t,header:n={},method:o,dataType:i,responseType:s,withCredentials:a,timeout:r=__uniConfig.networkTimeout.request},{resolve:c,reject:u})=>{let l=null;const d=function(e){const t=Object.keys(e).find((e=>"content-type"===e.toLowerCase()));if(!t)return;const n=e[t];if(0===n.indexOf("application/json"))return"json";if(0===n.indexOf("application/x-www-form-urlencoded"))return"urlencoded";return"string"}(n);if("GET"!==o)if(v(t)||t instanceof ArrayBuffer)l=t;else if("json"===d)try{l=JSON.stringify(t)}catch(_){l=t.toString()}else if("urlencoded"===d){const e=[];for(const n in t)p(t,n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));l=e.join("&")}else l=t.toString();const h=new XMLHttpRequest,f=new EM(h);h.open(o,e);for(const m in n)p(n,m)&&h.setRequestHeader(m,n[m]);const g=setTimeout((function(){h.onload=h.onabort=h.onerror=null,f.abort(),u("timeout",{errCode:5})}),r);return h.responseType=s,h.onload=function(){clearTimeout(g);const e=h.status;let t="text"===s?h.responseText:h.response;if("text"===s&&"json"===i)try{t=JSON.parse(t)}catch(_){}c({data:t,statusCode:e,header:DM(h.getAllResponseHeaders()),cookies:[]})},h.onabort=function(){clearTimeout(g),u("abort",{errCode:600003})},h.onerror=function(){clearTimeout(g),u(void 0,{errCode:5})},h.withCredentials=a,h.send(l),f}),0,u_);class EM{constructor(e){this._xhr=e}abort(){this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}function DM(e){const t={};return e.split(se).forEach((e=>{const n=e.match(/(\S+\s*):\s*(.*)/);n&&3===n.length&&(t[n[1]]=n[2])})),t}class kM{constructor(e){this._callbacks=[],this._xhr=e}onProgressUpdate(e){m(e)&&this._callbacks.push(e)}offProgressUpdate(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}abort(){this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}const LM=Yf("downloadFile",(({url:e,header:t={},timeout:n=__uniConfig.networkTimeout.downloadFile},{resolve:o,reject:i})=>{var s,a=new XMLHttpRequest,r=new kM(a);return a.open("GET",e,!0),Object.keys(t).forEach((e=>{a.setRequestHeader(e,t[e])})),a.responseType="blob",a.onload=function(){clearTimeout(s);const t=a.status,n=this.response;let i;const r=a.getResponseHeader("content-disposition");if(r){const e=r.match(/filename="?(\S+)"?\b/);e&&(i=e[1])}n.name=i||function(e){const t=(e=e.split("#")[0].split("?")[0]).split("/");return t[t.length-1]}(e),o({statusCode:t,tempFilePath:K_(n)})},a.onabort=function(){clearTimeout(s),i("abort",{errCode:600003})},a.onerror=function(){clearTimeout(s),i("",{errCode:602001})},a.onprogress=function(e){r._callbacks.forEach((t=>{var n=e.loaded,o=e.total;t({progress:Math.round(n/o*100),totalBytesWritten:n,totalBytesExpectedToWrite:o})}))},a.send(),s=setTimeout((function(){a.onprogress=a.onload=a.onabort=a.onerror=null,r.abort(),i("timeout",{errCode:5})}),n),r}),0,l_);class bM{constructor(e){this._callbacks=[],this._xhr=e}onProgressUpdate(e){m(e)&&this._callbacks.push(e)}offProgressUpdate(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}abort(){this._isAbort=!0,this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}const AM=Yf("uploadFile",(({url:e,file:t,filePath:n,name:o,files:i,header:s={},formData:a={},timeout:r=__uniConfig.networkTimeout.uploadFile},{resolve:c,reject:u})=>{var l=new bM;return h(i)&&i.length||(i=[{name:o,file:t,uri:n}]),Promise.all(i.map((({file:e,uri:t})=>e instanceof Blob?Promise.resolve(H_(e)):B_(t)))).then((function(t){var n,o=new XMLHttpRequest,d=new FormData;Object.keys(a).forEach((e=>{d.append(e,a[e])})),Object.values(i).forEach((({name:e},n)=>{const o=t[n];d.append(e||"file",o,o.name||`file-${Date.now()}`)})),o.open("POST",e),Object.keys(s).forEach((e=>{o.setRequestHeader(e,s[e])})),o.upload.onprogress=function(e){l._callbacks.forEach((t=>{var n=e.loaded,o=e.total;t({progress:Math.round(n/o*100),totalBytesSent:n,totalBytesExpectedToSend:o})}))},o.onerror=function(){clearTimeout(n),u("",{errCode:602001})},o.onabort=function(){clearTimeout(n),u("abort",{errCode:600003})},o.onload=function(){clearTimeout(n);const e=o.status;c({statusCode:e,data:o.responseText||o.response})},l._isAbort?u("abort",{errCode:600003}):(n=setTimeout((function(){o.upload.onprogress=o.onload=o.onabort=o.onerror=null,l.abort(),u("timeout",{errCode:5})}),r),o.send(d),l._xhr=o)})).catch((()=>{setTimeout((()=>{u("file error")}),0)})),l}),0,d_),RM=[],OM={open:"",close:"",error:"",message:""};class NM{constructor(e,t,n){let o;this._callbacks={open:[],close:[],error:[],message:[]};try{const n=this._webSocket=new WebSocket(e,t);n.binaryType="arraybuffer";["open","close","error","message"].forEach((e=>{this._callbacks[e]=[],n.addEventListener(e,(t=>{const{data:n,code:o,reason:i}=t,s="message"===e?{data:n}:"close"===e?{code:o,reason:i}:{};if(this._callbacks[e].forEach((t=>{try{t(s)}catch(aL){console.error(`thirdScriptError\n${aL};at socketTask.on${O(e)} callback function\n`,aL)}})),this===RM[0]&&OM[e]&&aT.invokeOnCallback(OM[e],s),"error"===e||"close"===e){const e=RM.indexOf(this);e>=0&&RM.splice(e,1)}}))}));["CLOSED","CLOSING","CONNECTING","OPEN","readyState"].forEach((e=>{Object.defineProperty(this,e,{get:()=>n[e]})}))}catch(aL){o=aL}n&&n(o,this)}send(e){const t=(e||{}).data,n=this._webSocket;try{if(n.readyState!==n.OPEN)throw Je(e,{errMsg:"sendSocketMessage:fail SocketTask.readyState is not OPEN",errCode:10002}),new Error("SocketTask.readyState is not OPEN");n.send(t),Je(e,"sendSocketMessage:ok")}catch(o){Je(e,{errMsg:`sendSocketMessage:fail ${o}`,errCode:602001})}}close(e={}){const t=this._webSocket;try{const n=e.code||1e3,o=e.reason;v(o)?t.close(n,o):t.close(n),Je(e,"closeSocket:ok")}catch(n){Je(e,`closeSocket:fail ${n}`)}}onOpen(e){this._callbacks.open.push(e)}onMessage(e){this._callbacks.message.push(e)}onError(e){this._callbacks.error.push(e)}onClose(e){this._callbacks.close.push(e)}}const PM=Yf("connectSocket",(({url:e,protocols:t},{resolve:n,reject:o})=>new NM(e,t,((e,t)=>{e?o(e.toString(),{errCode:600009}):(RM.push(t),n())}))),0,p_),wM=Xf("navigateBack",((e,{resolve:t,reject:n})=>{let o=!0;return!0===rh(Ce,{from:e.from||"navigateBack"})&&(o=!1),o?(lI().$router.go(-e.delta),t()):n(Ce)}),0,T_),GM=Xf(f_,(({url:e,events:t,isAutomatedTesting:n},{resolve:o,reject:i})=>{if(Oy.handledBeforeEntryPageRoutes)return Iy({type:f_,url:e,events:t,isAutomatedTesting:n}).then(o).catch(i);Ny.push({args:{type:f_,url:e,events:t,isAutomatedTesting:n},resolve:o,reject:i})}),0,y_);function UM(e){__uniConfig.darkmode&&aT.on(he,e)}function xM(e){aT.off(he,e)}function FM(e){let t={};return __uniConfig.darkmode&&(t=yt(e,__uniConfig.themeConfig,PI())),__uniConfig.darkmode?t:e}function qM(e,t){const n=qn(e),o=n?wn(FM(e)):FM(e);return __uniConfig.darkmode&&n&&Di(e,(e=>{const t=FM(e);for(const n in t)o[n]=t[n]})),t&&UM(t),o}const VM={light:{cancelColor:"#000000"},dark:{cancelColor:"rgb(170, 170, 170)"}},BM=ji({props:{title:{type:String,default:""},content:{type:String,default:""},showCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"Cancel"},cancelColor:{type:String,default:"#000000"},confirmText:{type:String,default:"OK"},confirmColor:{type:String,default:"#007aff"},visible:{type:Boolean},editable:{type:Boolean,default:!1},placeholderText:{type:String,default:""}},setup(e,{emit:t}){const n=Zn(""),o=()=>a.value=!1,i=()=>(o(),t("close","cancel")),s=()=>(o(),t("close","confirm",n.value)),a=dM(e,{onEsc:i,onEnter:()=>{!e.editable&&s()}}),r=function(e){const t=Zn(e.cancelColor),n=({theme:e})=>{((e,t)=>{t.value=VM[e].cancelColor})(e,t)};return Ci((()=>{e.visible?(t.value=e.cancelColor,"#000"===e.cancelColor&&("dark"===PI()&&n({theme:"dark"}),UM(n))):xM(n)})),t}(e);return()=>{const{title:t,content:o,showCancel:c,confirmText:u,confirmColor:l,editable:d,placeholderText:p}=e;return n.value=o,dr(lc,{name:"uni-fade"},{default:()=>[Ri(dr("uni-modal",{onTouchmove:Fp},[cM,dr("div",{class:"uni-modal"},[t?dr("div",{class:"uni-modal__hd"},[dr("strong",{class:"uni-modal__title",textContent:t||""},null,8,["textContent"])]):null,d?dr("textarea",{class:"uni-modal__textarea",rows:"1",placeholder:p,value:o,onInput:e=>n.value=e.target.value},null,40,["placeholder","value","onInput"]):dr("div",{class:"uni-modal__bd",onTouchmovePassive:qp,textContent:o},null,40,["onTouchmovePassive","textContent"]),dr("div",{class:"uni-modal__ft"},[c&&dr("div",{style:{color:r.value},class:"uni-modal__btn uni-modal__btn_default",onClick:i},[e.cancelText],12,["onClick"]),dr("div",{style:{color:l},class:"uni-modal__btn uni-modal__btn_primary",onClick:s},[u],12,["onClick"])])])],40,["onTouchmove"]),[[Lc,a.value]])]})}}});let HM;const KM=Ye((()=>{aT.on("onHidePopup",(()=>HM.visible=!1))}));let jM;function $M(e,t){const n="confirm"===e,o={confirm:n,cancel:"cancel"===e};n&&HM.editable&&(o.content=t),jM&&jM(o)}const WM=Xf("showModal",((e,{resolve:t})=>{KM(),jM=t,HM?(u(HM,e),HM.visible=!0):(HM=wn(e),Oo((()=>(uM(BM,HM,$M).mount(lM("u-a-m")),Oo((()=>HM.visible=!0))))))}),0,N_),YM={title:{type:String,default:""},icon:{default:"success",validator:e=>-1!==P_.indexOf(e)},image:{type:String,default:""},duration:{type:Number,default:1500},mask:{type:Boolean,default:!1},visible:{type:Boolean}},zM="uni-toast__icon",XM={light:"#fff",dark:"rgba(255,255,255,0.9)"},JM=e=>XM[e],ZM=ji({name:"Toast",props:YM,setup(e){np(),op();const{Icon:t}=function(e){const t=Zn(JM(PI())),n=({theme:e})=>t.value=JM(e);Ci((()=>{e.visible?UM(n):xM(n)}));const o=Hr((()=>{switch(e.icon){case"success":return dr(Zp(zp,t.value,38),{class:zM});case"error":return dr(Zp(Xp,t.value,38),{class:zM});case"loading":return dr("i",{class:[zM,"uni-loading"]},null,2);default:return null}}));return{Icon:o}}(e),n=dM(e,{});return()=>{const{mask:o,duration:i,title:s,image:a}=e;return dr(lc,{name:"uni-fade"},{default:()=>[Ri(dr("uni-toast",{"data-duration":i},[o?dr("div",{class:"uni-mask",style:"background: transparent;",onTouchmove:Fp},null,40,["onTouchmove"]):"",a||t.value?dr("div",{class:"uni-toast"},[a?dr("img",{src:a,class:zM},null,10,["src"]):t.value,dr("p",{class:"uni-toast__content"},[s])]):dr("div",{class:"uni-sample-toast"},[dr("p",{class:"uni-simple-toast__text"},[s])])],8,["data-duration"]),[[Lc,n.value]])]})}}});let QM,eC,tC="";const nC=Tt();function oC(e){QM?u(QM,e):(QM=wn(u(e,{visible:!1})),Oo((()=>{nC.run((()=>{Di([()=>QM.visible,()=>QM.duration],(([e,t])=>{if(e){if(eC&&clearTimeout(eC),"onShowLoading"===tC)return;eC=setTimeout((()=>{cC("onHideToast")}),t)}else eC&&clearTimeout(eC)}))})),aT.on("onHidePopup",(()=>cC("onHidePopup"))),uM(ZM,QM,(()=>{})).mount(lM("u-a-t"))}))),setTimeout((()=>{QM.visible=!0}),10)}const iC=Xf("showToast",((e,{resolve:t,reject:n})=>{oC(e),tC="onShowToast",t()}),0,w_),sC={icon:"loading",duration:1e8,image:""},aC=Xf("showLoading",((e,{resolve:t,reject:n})=>{u(e,sC),oC(e),tC="onShowLoading",t()}),0,O_),rC=Xf("hideLoading",((e,{resolve:t,reject:n})=>{cC("onHideLoading"),t()}));function cC(e){const{t:t}=Zd();if(!tC)return;let n="";if("onHideToast"===e&&"onShowToast"!==tC?n=t("uni.showToast.unpaired"):"onHideLoading"===e&&"onShowLoading"!==tC&&(n=t("uni.showLoading.unpaired")),n)return console.warn(n);tC="",setTimeout((()=>{QM.visible=!1}),10)}function uC(e){const t=Zn(0),n=Zn(0),o=Hr((()=>t.value>=500&&n.value>=500)),i=Hr((()=>{const t={content:{transform:"",left:"",top:"",bottom:""},triangle:{left:"",top:"",bottom:"","border-width":"","border-color":""}},i=t.content,s=t.triangle,a=e.popover;function r(e){return Number(e)||0}if(o.value&&a){u(s,{position:"absolute",width:"0",height:"0","margin-left":"-6px","border-style":"solid"});const e=r(a.left),t=r(a.width),o=r(a.top),c=r(a.height),l=e+t/2;i.transform="none !important";const d=Math.max(0,l-150);i.left=`${d}px`;let p=Math.max(12,l-d);p=Math.min(288,p),s.left=`${p}px`;const h=n.value/2;o+c-h>h-o?(i.top="auto",i.bottom=n.value-o+6+"px",s.bottom="-6px",s["border-width"]="6px 6px 0 6px",s["border-color"]="#fcfcfd transparent transparent transparent"):(i.top=`${o+c+6}px`,s.top="-6px",s["border-width"]="0 6px 6px 6px",s["border-color"]="transparent transparent #fcfcfd transparent")}return t}));return hs((()=>{const e=()=>{const{windowWidth:e,windowHeight:o,windowTop:i}=BI();t.value=e,n.value=o+(i||0)};window.addEventListener("resize",e),e(),ms((()=>{window.removeEventListener("resize",e)}))})),{isDesktop:o,popupStyle:i}}const lC={light:{listItemColor:"#000000",cancelItemColor:"#000000"},dark:{listItemColor:"rgba(255, 255, 255, 0.8)",cancelItemColor:"rgba(255, 255, 255)"}};const dC=ji({name:"ActionSheet",props:{title:{type:String,default:""},itemList:{type:Array,default:()=>[]},itemColor:{type:String,default:"#000000"},popover:{type:Object,default:null},visible:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:t}){tp();const n=Zn(260),o=Zn(0),i=Zn(0),s=Zn(0),a=Zn(0),r=Zn(null),c=Zn(null),{t:u}=Zd(),{_close:l}=function(e,t){function n(e){t("close",e)}const{key:o,disable:i}=rM();return Di((()=>e.visible),(e=>i.value=!e)),Ci((()=>{const{value:e}=o;"esc"===e&&n&&n(-1)})),{_close:n}}(e,t),{popupStyle:d}=uC(e);let p;function h(e){const t=s.value+e.deltaY;Math.abs(t)>10?(a.value+=t/3,a.value=a.value>=o.value?o.value:a.value<=0?0:a.value,p.scrollTo(a.value)):s.value=t,e.preventDefault()}hs((()=>{const{scroller:e,handleTouchStart:t,handleTouchMove:n,handleTouchEnd:o}=mv(r.value,{enableY:!0,friction:new dv(1e-4),spring:new fv(2,90,20),onScroll:e=>{a.value=e.target.scrollTop}});p=e,Km(r.value,(i=>{if(e)switch(i.detail.state){case"start":t(i);break;case"move":n(i);break;case"end":case"cancel":o(i)}}),!0)})),Di((()=>e.visible),(()=>{Oo((()=>{e.title&&(i.value=document.querySelector(".uni-actionsheet__title").offsetHeight),p.update(),r.value&&(o.value=r.value.clientHeight-n.value),document.querySelectorAll(".uni-actionsheet__cell").forEach((e=>{!function(e){const t=20;let n=0,o=0;e.addEventListener("touchstart",(e=>{const t=e.changedTouches[0];n=t.clientX,o=t.clientY})),e.addEventListener("touchend",(e=>{const i=e.changedTouches[0];if(Math.abs(i.clientX-n)<t&&Math.abs(i.clientY-o)<t){const t=e.target,n=e.currentTarget,o=new CustomEvent("click",{bubbles:!0,cancelable:!0,target:t,currentTarget:n});["screenX","screenY","clientX","clientY","pageX","pageY"].forEach((e=>{o[e]=i[e]})),e.target.dispatchEvent(o)}}))}(e)}))}))}));const f=function(e){const t=wn({listItemColor:"#000",cancelItemColor:"#000"}),n=({theme:e})=>{!function(e,t){["listItemColor","cancelItemColor"].forEach((n=>{t[n]=lC[e][n]}))}(e,t)};return Ci((()=>{e.visible?(t.listItemColor=t.cancelItemColor=e.itemColor,"#000"===e.itemColor&&(n({theme:PI()}),UM(n))):xM(n)})),t}(e);return()=>dr("uni-actionsheet",{onTouchmove:Fp},[dr(lc,{name:"uni-fade"},{default:()=>[Ri(dr("div",{class:"uni-mask uni-actionsheet__mask",onClick:()=>l(-1)},null,8,["onClick"]),[[Lc,e.visible]])]}),dr("div",{class:["uni-actionsheet",{"uni-actionsheet_toggle":e.visible}],style:d.value.content},[dr("div",{ref:c,class:"uni-actionsheet__menu",onWheel:h},[e.title?dr(ja,null,[dr("div",{class:"uni-actionsheet__cell",style:{height:`${i.value}px`}},null),dr("div",{class:"uni-actionsheet__title"},[e.title])]):"",dr("div",{style:{maxHeight:`${n.value}px`,overflow:"hidden"}},[dr("div",{ref:r},[e.itemList.map(((e,t)=>dr("div",{key:t,style:{color:f.listItemColor},class:"uni-actionsheet__cell",onClick:()=>l(t)},[e],12,["onClick"])))],512)])],40,["onWheel"]),dr("div",{class:"uni-actionsheet__action"},[dr("div",{style:{color:f.cancelItemColor},class:"uni-actionsheet__cell",onClick:()=>l(-1)},[u("uni.showActionSheet.cancel")],12,["onClick"])]),dr("div",{style:d.value.triangle},null,4)],6)],40,["onTouchmove"])}});let pC,hC,fC;const gC=Ye((()=>{aT.on("onHidePopup",(()=>fC.visible=!1))}));function _C(e){-1===e?hC&&hC("cancel"):pC&&pC({tapIndex:e})}const mC=Xf("showActionSheet",((e,{resolve:t,reject:n})=>{gC(),pC=t,hC=n,fC?(u(fC,e),fC.visible=!0):(fC=wn(e),Oo((()=>(uM(dC,fC,_C).mount(lM("u-s-a-s")),Oo((()=>fC.visible=!0))))))}),0,R_),vC=Xf("loadFontFace",(({family:e,source:t,desc:n},{resolve:o,reject:i})=>{(function(e,t,n){const o=document.fonts;if(o){const i=new FontFace(e,t,n);return i.load().then((()=>{o.add&&o.add(i)}))}return new Promise((o=>{const i=document.createElement("style"),s=[];if(n){const{style:e,weight:t,stretch:o,unicodeRange:i,variant:a,featureSettings:r}=n;e&&s.push(`font-style:${e}`),t&&s.push(`font-weight:${t}`),o&&s.push(`font-stretch:${o}`),i&&s.push(`unicode-range:${i}`),a&&s.push(`font-variant:${a}`),r&&s.push(`font-feature-settings:${r}`)}i.innerText=`@font-face{font-family:"${e}";src:${t};${s.join(";")}}`,document.head.appendChild(i),o()}))})(e,t=t.startsWith('url("')||t.startsWith("url('")?`url('${of(t.substring(5,t.length-2))}')`:t.startsWith("url(")?`url('${of(t.substring(4,t.length-1))}')`:of(t),n).then((()=>{o()})).catch((e=>{i(`loadFontFace:fail ${e}`)}))}));function yC(e){function t(){var t;t=e.navigationBar.titleText,document.title=t,aT.emit("onNavigationBarChange",{titleText:t})}Ci(t),ts(t)}const IC=Xf(b_,((e,{resolve:t,reject:n})=>{!function(e,t,n,o,i){if(!e)return i("page not found");const{navigationBar:s}=e;switch(t){case"setNavigationBarColor":const{frontColor:e,backgroundColor:t,animation:o}=n,{duration:i,timingFunc:a}=o;e&&(s.titleColor="#000000"===e?"#000000":"#ffffff"),t&&(s.backgroundColor=t),s.duration=i+"ms",s.timingFunc=a;break;case"showNavigationBarLoading":s.loading=!0;break;case"hideNavigationBarLoading":s.loading=!1;break;case b_:const{title:r}=n;s.titleText=r}o()}(nh(),b_,e,t,n)})),MC=Xf("pageScrollTo",(({scrollTop:e,selector:t,duration:n},{resolve:o})=>{!function(e,t){if(v(e)){const t=document.querySelector(e);if(t){const{top:n}=t.getBoundingClientRect();e=n+window.pageYOffset;const o=document.querySelector("uni-page-head");o&&(e-=o.offsetHeight)}}e<0&&(e=0);const n=document.documentElement,{clientHeight:o,scrollHeight:i}=n;if(e=Math.min(e,i-o),0===t)return void(n.scrollTop=document.body.scrollTop=e);if(window.scrollY===e)return;const s=t=>{if(t<=0)return void window.scrollTo(0,e);const n=e-window.scrollY;requestAnimationFrame((function(){window.scrollTo(0,window.scrollY+n/t*10),s(t-10)}))};s(t)}(t||e||0,n),o()}),0,A_),CC=Xf(G_,((e,{resolve:t})=>{aT.invokeViewMethod(G_,{},oh()),t()})),TC=["text","iconPath","iconfont","selectedIconPath","visible"],SC=["color","selectedColor","backgroundColor","borderStyle","borderColor","midButton"],EC=["badge","redDot"];function DC(e,t,n){t.forEach((function(t){p(n,t)&&(e[t]=n[t])}))}function kC(e,t,n,o){var i;let s=!1;const a=xy();if(a.length&&a[a.length-1].$page.meta.isTabBar&&(s=!0),!s)return o("not TabBar page");const{index:r}=t;if("number"==typeof r){const e=null==(i=null==__uniConfig?void 0:__uniConfig.tabBar)?void 0:i.list.length;if(!e||r>=e)return o("tabbar item not found")}const c=Cy();switch(e){case"showTabBar":c.shown=!0;break;case U_:c.shown=!1;break;case"setTabBarItem":const e=c.list[r],n=e.pagePath;DC(e,TC,t);const{pagePath:o}=t;if(o){const e=je(o);e!==n&&function(e,t,n){const o=hh(je(t));if(o){const{meta:e}=o;delete e.tabBarIndex,e.isQuit=e.isTabBar=!1}const i=hh(je(n));if(i){const{meta:t}=i;t.tabBarIndex=e,t.isQuit=t.isTabBar=!0;const o=__uniConfig.tabBar;o&&o.list&&o.list[e]&&(o.list[e].pagePath=$e(n))}}(r,n,e)}break;case"setTabBarStyle":DC(c,SC,t);break;case"showTabBarRedDot":DC(c.list[r],EC,{badge:"",redDot:!0});break;case"setTabBarBadge":DC(c.list[r],EC,{badge:t.text,redDot:!0});break;case"hideTabBarRedDot":case"removeTabBarBadge":DC(c.list[r],EC,{badge:"",redDot:!1})}n()}const LC=Xf(U_,((e,{resolve:t,reject:n})=>{kC(U_,e||{},t,n)})),bC=qh({name:"TabBar",setup(){const e=Zn([]),t=Cy(),n=qM(t,(()=>{const e=FM(t);n.backgroundColor=e.backgroundColor,n.borderStyle=e.borderStyle,n.color=e.color,n.selectedColor=e.selectedColor,n.blurEffect=e.blurEffect,n.midButton=e.midButton,e.list&&e.list.length&&e.list.forEach(((e,t)=>{n.list[t].iconPath=e.iconPath,n.list[t].selectedIconPath=e.selectedIconPath}))}));!function(e,t){function n(){let n=[];n=e.list.filter((e=>!1!==e.visible)),t.value=n}Zn(u({type:"midButton"},e.midButton)),Ci(n)}(n,e),function(e){Di((()=>e.shown),(t=>{jp({"--window-bottom":by(t?parseInt(e.height):0)})}))}(n);const o=function(e,t,n){return Ci((()=>{const o=e.meta;if(o.isTabBar){const e=o.route,i=n.value.findIndex((t=>t.pagePath===e));t.selectedIndex=i}})),(t,n)=>()=>{const{pagePath:o,text:i}=t;let s=je(o);s===__uniRoutes[0].alias&&(s="/"),e.path!==s?fy({from:"tabBar",url:s,tabBarText:i}):rh("onTabItemTap",{index:n,text:i,pagePath:o})}}(Ad(),n,e),{style:i,borderStyle:s,placeholderStyle:a}=function(e){const t=Hr((()=>{let t=e.backgroundColor;const n=e.blurEffect;return t||ky&&n&&"none"!==n&&(t=NC[n]),{backgroundColor:t||AC,backdropFilter:"none"!==n?"blur(10px)":n}})),n=Hr((()=>{const{borderStyle:t,borderColor:n}=e;return n&&v(n)?{backgroundColor:n}:{backgroundColor:PC[t]||PC.black}})),o=Hr((()=>({height:e.height})));return{style:t,borderStyle:n,placeholderStyle:o}}(n);return hs((()=>{n.iconfontSrc&&vC({family:"UniTabbarIconFont",source:`url("${n.iconfontSrc}")`})})),()=>{const t=function(e,t,n){const{selectedIndex:o,selectedColor:i,color:s}=e;return n.value.map(((n,a)=>{const r=o===a;return function(e,t,n,o,i,s,a,r){return dr("div",{key:a,class:"uni-tabbar__item",onClick:r(i,a)},[wC(e,t||"",n,o,i,s)],8,["onClick"])}(r?i:s,r&&n.selectedIconPath||n.iconPath||"",n.iconfont?r&&n.iconfont.selectedText||n.iconfont.text:void 0,n.iconfont?r&&n.iconfont.selectedColor||n.iconfont.color:void 0,n,e,a,t)}))}(n,o,e);return dr("uni-tabbar",{class:"uni-tabbar-"+n.position},[dr("div",{class:"uni-tabbar",style:i.value},[dr("div",{class:"uni-tabbar-border",style:s.value},null,4),t],4),dr("div",{class:"uni-placeholder",style:a.value},null,4)],2)}}});const AC="#f7f7fa",RC="rgb(0, 0, 0, 0.8)",OC="rgb(250, 250, 250, 0.8)",NC={dark:RC,light:OC,extralight:OC},PC={white:"rgba(255, 255, 255, 0.33)",black:"rgba(0, 0, 0, 0.33)"};function wC(e,t,n,o,i,s){const{height:a}=s;return dr("div",{class:"uni-tabbar__bd",style:{height:a}},[n?UC(n,o||RC,i,s):t&&GC(t,i,s),i.text&&xC(e,i,s),i.redDot&&FC(i.badge)],4)}function GC(e,t,n){const{type:o,text:i}=t,{iconWidth:s}=n;return dr("div",{class:"uni-tabbar__icon"+(i?" uni-tabbar__icon__diff":""),style:{width:s,height:s}},["midButton"!==o&&dr("img",{src:of(e)},null,8,["src"])],6)}function UC(e,t,n,o){var i;const{type:s,text:a}=n,{iconWidth:r}=o,c="uni-tabbar__icon"+(a?" uni-tabbar__icon__diff":""),u={width:r,height:r},l={fontSize:(null==(i=n.iconfont)?void 0:i.fontSize)||r,color:t};return dr("div",{class:c,style:u},["midButton"!==s&&dr("div",{class:"uni-tabbar__iconfont",style:l},[e],4)],6)}function xC(e,t,n){const{iconPath:o,text:i}=t,{fontSize:s,spacing:a}=n;return dr("div",{class:"uni-tabbar__label",style:{color:e,fontSize:s,lineHeight:o?"normal":1.8,marginTop:o?a:"inherit"}},[i],4)}function FC(e){return dr("div",{class:"uni-tabbar__reddot"+(e?" uni-tabbar__badge":"")},[e],2)}const qC="0px",VC=qh({name:"Layout",setup(e,{emit:t}){const n=Zn(null);Kp({"--status-bar-height":qC,"--top-window-height":qC,"--window-left":qC,"--window-right":qC,"--window-margin":qC,"--tab-bar-height":qC});const o=function(){const e=Ad();return{routeKey:Hr((()=>Hy("/"+e.meta.route,ly()))),isTabBar:Hr((()=>e.meta.isTabBar)),routeCache:jy}}(),{layoutState:i,windowState:s}=function(){uy();{const e=wn({marginWidth:0,leftWindowWidth:0,rightWindowWidth:0});return Di((()=>e.marginWidth),(e=>Kp({"--window-margin":e+"px"}))),Di((()=>e.leftWindowWidth+e.marginWidth),(e=>{Kp({"--window-left":e+"px"})})),Di((()=>e.rightWindowWidth+e.marginWidth),(e=>{Kp({"--window-right":e+"px"})})),{layoutState:e,windowState:Hr((()=>({})))}}}();!function(e,t){const n=uy();function o(){const o=document.body.clientWidth,i=xy();let s={};if(i.length>0){s=i[i.length-1].$page.meta}else{const e=hh(n.path,!0);e&&(s=e.meta)}const a=parseInt(String((p(s,"maxWidth")?s.maxWidth:__uniConfig.globalStyle.maxWidth)||Number.MAX_SAFE_INTEGER));let r=!1;r=o>a,r&&a?(e.marginWidth=(o-a)/2,Oo((()=>{const e=t.value;e&&e.setAttribute("style","max-width:"+a+"px;margin:0 auto;")}))):(e.marginWidth=0,Oo((()=>{const e=t.value;e&&e.removeAttribute("style")})))}Di([()=>n.path],o),hs((()=>{o(),window.addEventListener("resize",o)}))}(i,n);const a=function(){const e=uy(),t=Cy(),n=Hr((()=>e.meta.isTabBar&&t.shown));return Kp({"--tab-bar-height":t.height}),n}(),r=function(e){const t=Zn(!1);return Hr((()=>({"uni-app--showtabbar":e&&e.value,"uni-app--maxwidth":t.value})))}(a);return()=>{const e=function(e){const t=function({routeKey:e,isTabBar:t,routeCache:n}){return dr(Ld,null,{default:Qo((({Component:o})=>[(Ja(),or(Zi,{matchBy:"key",cache:n},[(Ja(),or(ci(o),{type:t.value?"tabBar":"",key:e.value}))],1032,["cache"]))])),_:1})}(e);return t}(o),t=function(e){return Ri(dr(bC,null,null,512),[[Lc,e.value]])}(a);return dr("uni-app",{ref:n,class:r.value},[e,t],2)}}});const BC="scanCode",HC=Xf(BC,Jf(BC)),KC="login",jC=Xf(KC,Jf(KC)),$C="getProvider",WC=Xf($C,Jf($C));function YC(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!ir(e)}function zC(e){if(e.mode===ZC.TIME)return"00:00";if(e.mode===ZC.DATE){const t=(new Date).getFullYear()-150;switch(e.fields){case QC.YEAR:return t.toString();case QC.MONTH:return t+"-01";default:return t+"-01-01"}}return""}function XC(e){if(e.mode===ZC.TIME)return"23:59";if(e.mode===ZC.DATE){const t=(new Date).getFullYear()+150;switch(e.fields){case QC.YEAR:return t.toString();case QC.MONTH:return t+"-12";default:return t+"-12-31"}}return""}function JC(e,t,n,o){const i=e.mode===ZC.DATE?"-":":",s=e.mode===ZC.DATE?t.dateArray:t.timeArray;let a;if(e.mode===ZC.TIME)a=2;else switch(e.fields){case QC.YEAR:a=1;break;case QC.MONTH:a=2;break;default:a=3}const r=String(n).split(i);let c=[];for(let u=0;u<a;u++){const e=r[u];c.push(s[u].indexOf(e))}return c.indexOf(-1)>=0&&(c=o?JC(e,t,o):c.map((()=>0))),c}const ZC={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},QC={YEAR:"year",MONTH:"month",DAY:"day"},eT={PICKER:"picker",SELECT:"select"},tT=Fh({name:"Picker",compatConfig:{MODE:3},props:{name:{type:String,default:""},range:{type:Array,default:()=>[]},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:ZC.SELECTOR,validator:e=>Object.values(ZC).includes(e)},fields:{type:String,default:""},start:{type:String,default:e=>zC(e)},end:{type:String,default:e=>XC(e)},disabled:{type:[Boolean,String],default:!1},selectorType:{type:String,default:""}},emits:["change","cancel","columnchange"],setup(e,{emit:t,slots:n}){rp();const{t:o}=Zd(),i=Zn(null),s=Zn(null),a=Zn(null),r=Zn(null),c=Zn(!1),{state:u,rangeArray:l}=function(e){const t=wn({valueSync:void 0,visible:!1,contentVisible:!1,popover:null,valueChangeSource:"",timeArray:[],dateArray:[],valueArray:[],oldValueArray:[],isDesktop:!1,popupStyle:{content:{},triangle:{}}}),n=Hr((()=>{let n=e.range;switch(e.mode){case ZC.SELECTOR:return[n];case ZC.MULTISELECTOR:return n;case ZC.TIME:return t.timeArray;case ZC.DATE:{const n=t.dateArray;switch(e.fields){case QC.YEAR:return[n[0]];case QC.MONTH:return[n[0],n[1]];default:return[n[0],n[1],n[2]]}}}return[]}));return{state:t,rangeArray:n}}(e),d=Bh(i,t),{system:p,selectorTypeComputed:f,_show:g,_l10nColumn:_,_l10nItem:m,_input:v,_fixInputPosition:y,_pickerViewChange:I,_cancel:M,_change:C,_resetFormData:T,_getFormData:S,_createTime:E,_createDate:D,_setValueSync:k}=function(e,t,n,o,i,s,a){const r=function(){const e=Zn(!1);return e.value=nT(),e}(),c=function(){const e=Zn("");return e.value=oT(),e}(),u=Hr((()=>{const t=e.selectorType;return Object.values(eT).includes(t)?t:r.value?eT.PICKER:eT.SELECT})),l=Hr((()=>e.mode===ZC.DATE&&!Object.values(QC).includes(e.fields)&&t.isDesktop?c.value:"")),d=Hr((()=>JC(e,t,e.start,zC(e)))),p=Hr((()=>JC(e,t,e.end,XC(e))));function f(n){if(e.disabled)return;t.valueChangeSource="";let o=i.value,s=n.currentTarget;o.remove(),(document.querySelector("uni-app")||document.body).appendChild(o),o.style.display="block";const a=s.getBoundingClientRect();t.popover={top:a.top,left:a.left,width:a.width,height:a.height},setTimeout((()=>{t.visible=!0}),20)}function g(){return{value:t.valueSync,key:e.name}}function _(){switch(e.mode){case ZC.SELECTOR:t.valueSync=0;break;case ZC.MULTISELECTOR:t.valueSync=e.value.map((e=>0));break;case ZC.DATE:case ZC.TIME:t.valueSync=""}}function m(){let e=[],n=[];for(let t=0;t<24;t++)e.push((t<10?"0":"")+t);for(let t=0;t<60;t++)n.push((t<10?"0":"")+t);t.timeArray.push(e,n)}function v(){let t=(new Date).getFullYear(),n=t-150,o=t+150;if(e.start){const t=new Date(e.start).getFullYear();!isNaN(t)&&t<n&&(n=t)}if(e.end){const t=new Date(e.end).getFullYear();!isNaN(t)&&t>o&&(o=t)}return{start:n,end:o}}function y(){let e=[];const n=v();for(let t=n.start,s=n.end;t<=s;t++)e.push(String(t));let o=[];for(let t=1;t<=12;t++)o.push((t<10?"0":"")+t);let i=[];for(let t=1;t<=31;t++)i.push((t<10?"0":"")+t);t.dateArray.push(e,o,i)}function I(e){return 60*e[0]+e[1]}function M(e){const t=31;return e[0]*t*12+(e[1]||0)*t+(e[2]||0)}function C(e,t){for(let n=0;n<e.length&&n<t.length;n++)e[n]=t[n]}function T(){let n=e.value;switch(e.mode){case ZC.MULTISELECTOR:{h(n)||(n=t.valueArray),h(t.valueSync)||(t.valueSync=[]);const o=t.valueSync.length=Math.max(n.length,e.range.length);for(let i=0;i<o;i++){const o=Number(n[i]),s=Number(t.valueSync[i]),a=isNaN(o)?isNaN(s)?0:s:o,r=e.range[i]?e.range[i].length-1:0;t.valueSync.splice(i,1,a<0||a>r?0:a)}}break;case ZC.TIME:case ZC.DATE:t.valueSync=String(n);break;default:{const e=Number(n);t.valueSync=e<0?0:e;break}}}function S(){let n,o=t.valueSync;switch(e.mode){case ZC.MULTISELECTOR:n=[...o];break;case ZC.TIME:n=JC(e,t,o,Xe({mode:ZC.TIME}));break;case ZC.DATE:n=JC(e,t,o,Xe({mode:ZC.DATE}));break;default:n=[o]}t.oldValueArray=[...n],t.valueArray=[...n]}function E(){let n=t.valueArray;switch(e.mode){case ZC.SELECTOR:return n[0];case ZC.MULTISELECTOR:return n.map((e=>e));case ZC.TIME:return t.valueArray.map(((e,n)=>t.timeArray[n][e])).join(":");case ZC.DATE:return t.valueArray.map(((e,n)=>t.dateArray[n][e])).join("-")}}function D(){L(),t.valueChangeSource="click";const e=E();t.valueSync=h(e)?e.map((e=>e)):e,n("change",{},{value:e})}function k(e){if("firefox"===l.value&&e){const{top:n,left:o,width:i,height:s}=t.popover,{pageX:a,pageY:r}=e;if(a>o&&a<o+i&&r>n&&r<n+s)return}L(),n("cancel",{},{})}function L(){t.visible=!1,setTimeout((()=>{let e=i.value;e.remove(),o.value.prepend(e),e.style.display="none"}),260)}function b(){e.mode===ZC.SELECTOR&&u.value===eT.SELECT&&(s.value.scrollTop=34*t.valueArray[0])}function A(e){const n=e.target;t.valueSync=n.value,Oo((()=>{D()}))}function R(e){if("chrome"===l.value){const t=o.value.getBoundingClientRect(),n=32;a.value.style.left=e.clientX-t.left-1.5*n+"px",a.value.style.top=e.clientY-t.top-.5*n+"px"}}function O(e){t.valueArray=N(e.detail.value,!0)}function N(t,n){const{getLocale:o}=Zd();if(e.mode===ZC.DATE){const i=o();if(!i.startsWith("zh"))switch(e.fields){case QC.YEAR:return t;case QC.MONTH:return[t[1],t[0]];default:switch(i){case"es":case"fr":return[t[2],t[1],t[0]];default:return n?[t[2],t[0],t[1]]:[t[1],t[2],t[0]]}}}return t}function P(t,n){const{getLocale:o}=Zd();if(e.mode===ZC.DATE){const i=o();if(i.startsWith("zh")){return t+["年","月","日"][n]}if(e.fields!==QC.YEAR&&n===(e.fields===QC.MONTH||"es"!==i&&"fr"!==i?0:1)){let e;switch(i){case"es":e=["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"];break;case"fr":e=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"];break;default:e=["January","February","March","April","May","June","July","August","September","October","November","December"]}return e[Number(t)-1]}}return t}return Di((()=>t.visible),(e=>{e?(clearTimeout(iT),t.contentVisible=e,b()):iT=setTimeout((()=>{t.contentVisible=e}),300)})),Di([()=>e.mode,()=>e.value,()=>e.range],T,{deep:!0}),Di((()=>t.valueSync),S,{deep:!0}),Di((()=>t.valueArray),(o=>{if(e.mode===ZC.TIME||e.mode===ZC.DATE){const n=e.mode===ZC.TIME?I:M,o=t.valueArray,i=d.value,s=p.value;if(e.mode===ZC.DATE){const e=t.dateArray,n=e[2].length,i=Number(e[2][o[2]])||1,s=new Date(`${e[0][o[0]]}/${e[1][o[1]]}/${i}`).getDate();s<i&&(o[2]-=s+n-i)}n(o)<n(i)?C(o,i):n(o)>n(s)&&C(o,s)}o.forEach(((o,i)=>{o!==t.oldValueArray[i]&&(t.oldValueArray[i]=o,e.mode===ZC.MULTISELECTOR&&n("columnchange",{},{column:i,value:o}))}))})),{selectorTypeComputed:u,system:l,_show:f,_cancel:k,_change:D,_l10nColumn:N,_l10nItem:P,_input:A,_resetFormData:_,_getFormData:g,_createTime:m,_createDate:y,_setValueSync:T,_fixInputPosition:R,_pickerViewChange:O}}(e,u,d,i,s,a,r);!function(e,t,n){const{key:o,disable:i}=rM();Ci((()=>{i.value=!e.visible})),Di(o,(e=>{"esc"===e?t():"enter"===e&&n()}))}(u,M,C),function(e,t){const n=la($h,!1);if(n){const o={reset:e,submit:()=>{const e=["",null],{key:n,value:o}=t();return""!==n&&(e[0]=n,e[1]=o),e}};n.addField(o),_s((()=>{n.removeField(o)}))}}(T,S),E(),D(),k();const L=uC(u);return Ci((()=>{u.isDesktop=L.isDesktop.value,u.popupStyle=L.popupStyle.value})),_s((()=>{s.value&&s.value.remove()})),hs((()=>{c.value=!0})),()=>{let t;const{visible:d,contentVisible:h,valueArray:T,popupStyle:S,valueSync:E}=u,{rangeKey:D,mode:k,start:L,end:b}=e,A=jh(e,"disabled");return dr("uni-picker",Ir({ref:i},A,{onClick:Vh(g)}),[c.value?dr("div",{ref:s,class:["uni-picker-container",`uni-${k}-${f.value}`],onWheel:Fp,onTouchmove:Fp},[dr(lc,{name:"uni-fade"},{default:()=>[Ri(dr("div",{class:"uni-mask uni-picker-mask",onClick:Vh(M),onMousemove:y},null,40,["onClick","onMousemove"]),[[Lc,d]])]}),p.value?null:dr("div",{class:[{"uni-picker-toggle":d},"uni-picker-custom"],style:S.content},[dr("div",{class:"uni-picker-header",onClick:qp},[dr("div",{class:"uni-picker-action uni-picker-action-cancel",onClick:Vh(M)},[o("uni.picker.cancel")],8,["onClick"]),dr("div",{class:"uni-picker-action uni-picker-action-confirm",onClick:C},[o("uni.picker.done")],8,["onClick"])],8,["onClick"]),h?dr(lv,{value:_(T),class:"uni-picker-content",onChange:I},YC(t=Cs(_(l.value),((e,t)=>{let n;return dr(vv,{key:t},YC(n=Cs(e,((e,n)=>dr("div",{key:n,class:"uni-picker-item"},["object"==typeof e?e[D]||"":m(e,t)]))))?n:{default:()=>[n],_:1})})))?t:{default:()=>[t],_:1},8,["value","onChange"]):null,dr("div",{ref:a,class:"uni-picker-select",onWheel:qp,onTouchmove:qp},[Cs(l.value[0],((e,t)=>dr("div",{key:t,class:["uni-picker-item",{selected:T[0]===t}],onClick:()=>{T[0]=t,C()}},["object"==typeof e?e[D]||"":e],10,["onClick"])))],40,["onWheel","onTouchmove"]),dr("div",{style:S.triangle},null,4)],6)],40,["onWheel","onTouchmove"]):null,dr("div",null,[n.default&&n.default()]),p.value?dr("div",{class:"uni-picker-system",onMousemove:Vh(y)},[dr("input",{class:["uni-picker-system_input",p.value],ref:r,value:E,type:k,tabindex:"-1",min:L,max:b,onChange:e=>{v(e),qp(e)}},null,42,["value","type","min","max","onChange"])],40,["onMousemove"]):null],16,["onClick"])}}});const nT=()=>0===String(navigator.vendor).indexOf("Apple")&&navigator.maxTouchPoints>0;const oT=()=>{if(/win|mac/i.test(navigator.platform)){if("Google Inc."===navigator.vendor)return"chrome";if(/Firefox/.test(navigator.userAgent))return"firefox"}return""};let iT;const sT=u(mp,{publishHandler(e,t,n){aT.subscribeHandler(e,t,n)}}),aT=u(Dh,{publishHandler(e,t,n){sT.subscribeHandler(e,t,n)}}),rT=qh({name:"PageHead",setup(){const e=Zn(null),t=ry(),n=qM(t.navigationBar,(()=>{const e=FM(t.navigationBar);n.backgroundColor=e.backgroundColor,n.titleColor=e.titleColor})),{clazz:o,style:i}=function(e){const t=Hr((()=>{const{type:t,titlePenetrate:n,shadowColorType:o}=e,i={"uni-page-head":!0,"uni-page-head-transparent":"transparent"===t,"uni-page-head-titlePenetrate":"YES"===n,"uni-page-head-shadow":!!o};return o&&(i[`uni-page-head-shadow-${o}`]=!0),i})),n=Hr((()=>({backgroundColor:e.backgroundColor,color:e.titleColor,transitionDuration:e.duration,transitionTimingFunction:e.timingFunc})));return{clazz:t,style:n}}(n);return()=>{const s=function(e,t){if(!t)return dr("div",{class:"uni-page-head-btn",onClick:uT},[Zp(Jp,"transparent"===e.type?"#fff":e.titleColor,26)],8,["onClick"])}(n,t.isQuit),a=n.type||"default",r="transparent"!==a&&"float"!==a&&dr("div",{class:{"uni-placeholder":!0,"uni-placeholder-titlePenetrate":n.titlePenetrate}},null,2);return dr("uni-page-head",{"uni-page-head-type":a},[dr("div",{ref:e,class:o.value,style:i.value},[dr("div",{class:"uni-page-head-hd"},[s]),cT(n),dr("div",{class:"uni-page-head-ft"},[])],6),r],8,["uni-page-head-type"])}}});function cT(e,t){return function({type:e,loading:t,titleSize:n,titleText:o,titleImage:i}){return dr("div",{class:"uni-page-head-bd"},[dr("div",{style:{fontSize:n,opacity:"transparent"===e?0:1},class:"uni-page-head__title"},[t?dr("i",{class:"uni-loading"},null):i?dr("img",{src:i,class:"uni-page-head__title_image"},null,8,["src"]):o],4)])}(e)}function uT(){1===xy().length?yy({url:"/"}):wM({from:"backbutton",success(){}})}const lT={name:"PageRefresh",setup(){const{pullToRefresh:e}=ry();return{offset:e.offset,color:e.color}}},dT=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},pT={class:"uni-page-refresh-inner"},hT=["fill"],fT=[lr("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1),lr("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1)],gT={class:"uni-page-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},_T=["stroke"];const mT=dT(lT,[["render",function(e,t,n,o,i,s){return Ja(),nr("uni-page-refresh",null,[lr("div",{style:Ve({"margin-top":o.offset+"px"}),class:"uni-page-refresh"},[lr("div",pT,[(Ja(),nr("svg",{fill:o.color,class:"uni-page-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},fT,8,hT)),(Ja(),nr("svg",gT,[lr("circle",{stroke:o.color,class:"uni-page-refresh__path",cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"},null,8,_T)]))])],4)])}]]);function vT(e,t,n){const o=Array.prototype.slice.call(e.changedTouches).filter((e=>e.identifier===t))[0];return!!o&&(e.deltaY=o.pageY-n,!0)}const yT="pulling",IT="reached",MT="aborting",CT="refreshing",TT="restoring";function ST(e){const t=ry(),{id:n,pullToRefresh:o}=t,{range:i,height:s}=o;let a,r,c,u,l,d,p,h;Xv((()=>{t.enablePullDownRefresh&&(h||(h=CT,m(),setTimeout((()=>{C()}),50)))}),"startPullDownRefresh",!1,n),Xv((()=>{t.enablePullDownRefresh&&h===CT&&(v(),h=TT,m(),function(e){if(!r)return;c.transition="-webkit-transform 0.3s",c.transform+=" scale(0.01)";const t=function(){n&&clearTimeout(n),r.removeEventListener("webkitTransitionEnd",t),c.transition="",c.transform="translate3d(-50%, 0, 0)",e()};r.addEventListener("webkitTransitionEnd",t);const n=setTimeout(t,350)}((()=>{v(),h=f=g=null})))}),G_,!1,n),hs((()=>{a=e.value.$el,r=a.querySelector(".uni-page-refresh"),c=r.style,u=r.querySelector(".uni-page-refresh-inner").style}));let f=null,g=null;function _(e){h&&a&&a.classList[e]("uni-page-refresh--"+h)}function m(){_("add")}function v(){_("remove")}const y=Vh((e=>{if(!t.enablePullDownRefresh)return;const n=e.changedTouches[0];l=n.identifier,d=n.pageY,p=!([MT,CT,TT].indexOf(h)>=0)})),I=Vh((e=>{if(!t.enablePullDownRefresh)return;if(!p)return;if(!vT(e,l,d))return;let{deltaY:n}=e;if(0!==(document.documentElement.scrollTop||document.body.scrollTop))return void(l=null);if(n<0&&!h)return;e.cancelable&&e.preventDefault(),null===f&&(g=n,h=yT,m()),n-=g,n<0&&(n=0),f=n;(n>=i&&h!==IT||n<i&&h!==yT)&&(v(),h=h===IT?yT:IT,m()),function(e){if(!r)return;let t=e/i;t>1?t=1:t*=t*t;const n=Math.round(e/(i/s))||0;u.transform="rotate("+360*t+"deg)",c.clip="rect("+(45-n)+"px,45px,45px,-5px)",c.transform="translate3d(-50%, "+n+"px, 0)"}(n)})),M=Vh((e=>{t.enablePullDownRefresh&&vT(e,l,d)&&null!==h&&(h===yT?(v(),h=MT,m(),function(e){if(!r)return;if(c.transform){c.transition="-webkit-transform 0.3s",c.transform="translate3d(-50%, 0, 0)";const t=function(){n&&clearTimeout(n),r.removeEventListener("webkitTransitionEnd",t),c.transition="",e()};r.addEventListener("webkitTransitionEnd",t);const n=setTimeout(t,350)}else e()}((()=>{v(),h=f=g=null}))):h===IT&&(v(),h=CT,m(),C()))}));function C(){r&&(c.transition="-webkit-transform 0.2s",c.transform="translate3d(-50%, "+s+"px, 0)",rh(n,De))}return{onTouchstartPassive:y,onTouchmove:I,onTouchend:M,onTouchcancel:M}}const ET=qh({name:"PageBody",setup(e,t){const n=ry(),o=Zn(null),i=n.enablePullDownRefresh?ST(o):null,s=Zn(null);return Di((()=>n.enablePullDownRefresh),(()=>{s.value=n.enablePullDownRefresh?i:null}),{immediate:!0}),()=>{const e=function(e,t){if(!t.enablePullDownRefresh)return null;return dr(mT,{ref:e},null,512)}(o,n);return dr(ja,null,[e,dr("uni-page-wrapper",s.value,[dr("uni-page-body",null,[Ss(t.slots,"default")])],16)])}}});const DT=qh({name:"Page",setup(e,t){const n=cy(ly()),o=n.navigationBar,i={};return yC(n),()=>dr("uni-page",{"data-page":n.route,style:i},"custom"!==o.style?[dr(rT),kT(t)]:[kT(t)])}});function kT(e){return Ja(),or(ET,{key:0},{default:Qo((()=>[Ss(e.slots,"page")])),_:3})}const LT={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0};window.uni={},window.wx={},window.rpx2px=ag;const bT=Object.assign({}),AT=Object.assign;window.__uniConfig=AT({tabBar:{position:"bottom",color:"#999",selectedColor:"#007aff",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",list:[{text:"视频",pagePath:"pages/index/index"},{text:"商城",pagePath:"pages/shop/shop"},{text:"消息",pagePath:"pages/news/news"},{text:"个人中心",pagePath:"pages/mine/mine"},{text:"我的",pagePath:"pages/mine/homepage"}],selectedIndex:0,shown:!0},globalStyle:{backgroundColor:"#F8F8F8",bounce:"none",navigationBar:{backgroundColor:"#F8F8F8",titleText:"九亿",type:"default",titleColor:"#000000"},isNVue:!1},condition:{current:0,list:[{name:"test",path:"pages/index/index"}]},uniIdRouter:{},compilerVersion:"4.29"},{appId:"__UNI__08B31BC",appName:"九亿",appVersion:"1.0.0",appVersionCode:"100",async:LT,debug:!1,networkTimeout:{request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},sdkConfigs:{},qqMapKey:void 0,bMapKey:void 0,googleMapKey:void 0,aMapKey:void 0,aMapSecurityJsCode:void 0,aMapServiceHost:void 0,nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:Object.keys(bT).reduce(((e,t)=>{const n=t.replace(/\.\/locale\/(uni-app.)?(.*).json/,"$2");return AT(e[n]||(e[n]={}),bT[t].default),e}),{}),router:{mode:"hash",base:"/",assets:"assets",routerBase:"/"},darkmode:!1,themeConfig:{}}),window.__uniLayout=window.__uniLayout||{};const RT={delay:LT.delay,timeout:LT.timeout,suspensible:LT.suspensible};LT.loading&&(RT.loadingComponent={name:"SystemAsyncLoading",render:()=>dr(ai(LT.loading))}),LT.error&&(RT.errorComponent={name:"SystemAsyncError",render:()=>dr(ai(LT.error))});const OT=()=>t((()=>import("./pages-index-index.Cz1MWaFA.js")),__vite__mapDeps([0,1])).then((e=>fI(e.default||e))),NT=Wi(AT({loader:OT},RT)),PT=()=>t((()=>import("./pages-news-ce.CCSXQBWS.js")),__vite__mapDeps([2,1])).then((e=>fI(e.default||e))),wT=Wi(AT({loader:PT},RT)),GT=()=>t((()=>import("./pages-login-open.Ceqt9LSI.js")),__vite__mapDeps([3,4,1,5,6,7])).then((e=>fI(e.default||e))),UT=Wi(AT({loader:GT},RT)),xT=()=>t((()=>import("./pages-login-loginPhone.D5C1kIqH.js")),__vite__mapDeps([8,9,1,10,11,6,12,7,13,14,15])).then((e=>fI(e.default||e))),FT=Wi(AT({loader:xT},RT)),qT=()=>t((()=>import("./pages-shop-shop.C5RtAyTc.js")),__vite__mapDeps([16,17,1,12,11,6,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34])).then((e=>fI(e.default||e))),VT=Wi(AT({loader:qT},RT)),BT=()=>t((()=>import("./pages-merchant-business-operator-index.CBATpPXw.js")),__vite__mapDeps([35,12,21,11,1,6,22,23,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,18,19,56,57])).then((e=>fI(e.default||e))),HT=Wi(AT({loader:BT},RT)),KT=()=>t((()=>import("./pages-merchant-order-index.Crl4Qf4M.js")),__vite__mapDeps([58,51,11,1,6,12,52,21,22,23,27,28,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,53,54,55,18,19,56,57,59])).then((e=>fI(e.default||e))),jT=Wi(AT({loader:KT},RT)),$T=()=>t((()=>import("./pages-merchant-commodity-release-index.DpK8lbMK.js")),__vite__mapDeps([60,61,62,1,63,12,53,54,51,11,6,52,64,65,22,66,55,18,19,56,67,68])).then((e=>fI(e.default||e))),WT=Wi(AT({loader:$T},RT)),YT=()=>t((()=>import("./pages-merchant-specifications-index.BJnEo0z4.js")),__vite__mapDeps([69,21,11,1,6,12,22,23,61,62,63,53,54,51,52,67,65,66,70])).then((e=>fI(e.default||e))),zT=Wi(AT({loader:YT},RT)),XT=()=>t((()=>import("./pages-shop-search-index.BWXa04zY.js")),__vite__mapDeps([71,29,30,1,31,12,32,33,72,62,11,6,73,21,22,23,24,25,26,55,18,19,56,74])).then((e=>fI(e.default||e))),JT=Wi(AT({loader:XT},RT)),ZT=()=>t((()=>import("./pages-shop-commodity-index.AHXL0zxb.js")),__vite__mapDeps([75,12,18,1,19,76,11,6,32,77,78,22,42,43,55,56,79,29,30,31,33,80,51,52,49,50,81])).then((e=>fI(e.default||e))),QT=Wi(AT({loader:ZT},RT)),eS=()=>t((()=>import("./pages-shop-continue-pay-index.BxWiA9RP.js")),__vite__mapDeps([82,21,11,1,6,12,22,23,49,50,37,38,62,30,31,39,40,45,46,41,42,43,44,83,84])).then((e=>fI(e.default||e))),tS=Wi(AT({loader:eS},RT)),nS=()=>t((()=>import("./pages-shop-store-index.Be7mMK6U.js")),__vite__mapDeps([85,18,1,12,19,25,76,11,6,32,77,78,22,21,23,29,30,31,33,72,62,73,86])).then((e=>fI(e.default||e))),oS=Wi(AT({loader:nS},RT)),iS=()=>t((()=>import("./pages-shop-order-index.BXP0itVA.js")),__vite__mapDeps([87,51,11,1,6,12,52,21,22,23,27,28,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,53,54,55,18,19,56,57,88,32,89])).then((e=>fI(e.default||e))),sS=Wi(AT({loader:iS},RT)),aS=()=>t((()=>import("./pages-shop-sales-index.uSAzbsuc.js")),__vite__mapDeps([90,11,1,6,12,37,38,47,48,91])).then((e=>fI(e.default||e))),rS=Wi(AT({loader:aS},RT)),cS=()=>t((()=>import("./pages-shop-refund-index.CM2xDrPk.js")),__vite__mapDeps([92,11,1,6,12,37,38,51,52,61,62,63,18,19,41,42,43,44,64,65,22,66,93])).then((e=>fI(e.default||e))),uS=Wi(AT({loader:cS},RT)),lS=()=>t((()=>import("./pages-shop-money-whereabouts-index.D1GGQQko.js")),__vite__mapDeps([94,37,1,38,12,95,41,42,43,44,45,46,96,11,6,97,98,21,22,23,99])).then((e=>fI(e.default||e))),dS=Wi(AT({loader:lS},RT)),pS=()=>t((()=>import("./pages-shop-after-sales-index.BAI2hYQi.js")),__vite__mapDeps([100,11,1,6,12,37,38,101,102,95,41,42,43,44,45,46,96,97,98,21,22,23,79,29,30,31,32,33,80,103])).then((e=>fI(e.default||e))),hS=Wi(AT({loader:pS},RT)),fS=()=>t((()=>import("./pages-shop-transaction-completed-index.fAeApCxU.js")),__vite__mapDeps([104,47,11,1,6,12,37,38,48,95,41,42,43,44,45,46,96,97,98,79,29,30,31,32,33,80])).then((e=>fI(e.default||e))),gS=Wi(AT({loader:fS},RT)),_S=()=>t((()=>import("./pages-shop-waiting-delivery-index.AlSm3FKc.js")),__vite__mapDeps([105,47,11,1,6,12,37,38,48,95,41,42,43,44,45,46,96,97,98,49,50,29,30,31,32,33])).then((e=>fI(e.default||e))),mS=Wi(AT({loader:_S},RT)),vS=()=>t((()=>import("./pages-shop-logistics-state-index.BAspZgEp.js")),__vite__mapDeps([106,42,1,43,12,37,38,101,11,6,102,49,50,79,29,30,31,32,33,80,96,97,107])).then((e=>fI(e.default||e))),yS=Wi(AT({loader:vS},RT)),IS=()=>t((()=>import("./pages-news-news.Cu6b6Bq2.js")),__vite__mapDeps([108,17,1,12,11,6,18,19,20,109,110,111,112,113,114,115,116,117])).then((e=>fI(e.default||e))),MS=Wi(AT({loader:IS},RT)),CS=()=>t((()=>import("./pages-news-group-chat-list-index.mvz8YPP9.js")),[]).then((e=>fI(e.default||e))),TS=Wi(AT({loader:CS},RT)),SS=()=>t((()=>import("./pages-news-group-chat-index.CB0JxUKb.js")),__vite__mapDeps([118,11,1,6,12,119,111,112])).then((e=>fI(e.default||e))),ES=Wi(AT({loader:SS},RT)),DS=()=>t((()=>import("./pages-news-question-answer-index.BxnVeVTv.js")),__vite__mapDeps([120,51,11,1,6,12,52,18,19,121,41,42,43,37,38,44,22,122])).then((e=>fI(e.default||e))),kS=Wi(AT({loader:DS},RT)),LS=()=>t((()=>import("./pages-news-red-envelope-index.2G34gMAp.js")),__vite__mapDeps([123,1,124])).then((e=>fI(e.default||e))),bS=Wi(AT({loader:LS},RT)),AS=()=>t((()=>import("./pages-mine-mine.BGof91S8.js")),__vite__mapDeps([125,17,1,12,11,6,18,19,20,79,29,30,31,32,33,80,126])).then((e=>fI(e.default||e))),RS=Wi(AT({loader:AS},RT)),OS=()=>t((()=>import("./pages-mine-set-up-index.BNKY79WP.js")),__vite__mapDeps([127,37,1,38,12,11,6,22,128])).then((e=>fI(e.default||e))),NS=Wi(AT({loader:OS},RT)),PS=()=>t((()=>import("./pages-mine-userinfo.CwlO_wcb.js")),__vite__mapDeps([129,11,1,6,12,130])).then((e=>fI(e.default||e))),wS=Wi(AT({loader:PS},RT)),GS=()=>t((()=>import("./pages-mine-switch-accounts-index.BHEKEsgD.js")),__vite__mapDeps([131,115,1,116,12,109,11,6,110,111,112,132,23])).then((e=>fI(e.default||e))),US=Wi(AT({loader:GS},RT)),xS=()=>t((()=>import("./pages-mine-pay-use-index.AL4UOHTi.js")),__vite__mapDeps([133,37,1,38,12,22,21,11,6,23,134])).then((e=>fI(e.default||e))),FS=Wi(AT({loader:xS},RT)),qS=()=>t((()=>import("./pages-mine-real-name-authentication-index.BIotYnT8.js")),__vite__mapDeps([135,61,62,1,63,12,51,11,6,52,136])).then((e=>fI(e.default||e))),VS=Wi(AT({loader:qS},RT)),BS=()=>t((()=>import("./pages-mine-delivery-address-index.DSkNs1PF.js")),__vite__mapDeps([137,53,1,54,12,51,11,6,52,55,18,19,22,56,21,23,42,43,65,66,88,32,138])).then((e=>fI(e.default||e))),HS=Wi(AT({loader:BS},RT)),KS=()=>t((()=>import("./pages-mine-balance-index.CTM9mN3A.js")),__vite__mapDeps([139,11,1,6,12,37,38,51,52,53,54,18,19,21,22,23,140,141,142])).then((e=>fI(e.default||e))),jS=Wi(AT({loader:KS},RT)),$S=()=>t((()=>import("./pages-mine-balance-details-index.b3H6WdCj.js")),__vite__mapDeps([143,21,11,1,6,12,22,23,140,141,144])).then((e=>fI(e.default||e))),WS=Wi(AT({loader:$S},RT)),YS=()=>t((()=>import("./pages-mine-historical-browsing-index.Dy-OeNeD.js")),__vite__mapDeps([145,37,1,38,12,30,31,41,42,43,44,88,32,146])).then((e=>fI(e.default||e))),zS=Wi(AT({loader:YS},RT)),XS=()=>t((()=>import("./pages-mine-browsed-index.BA4GMjNY.js")),__vite__mapDeps([147,41,42,1,43,12,37,38,44,65,22,66,67,148])).then((e=>fI(e.default||e))),JS=Wi(AT({loader:XS},RT)),ZS=()=>t((()=>import("./pages-mine-collection-index.Ci4OepAn.js")),__vite__mapDeps([149,41,42,1,43,12,37,38,44,45,46,22,88,32,150])).then((e=>fI(e.default||e))),QS=Wi(AT({loader:ZS},RT)),eE=()=>t((()=>import("./pages-mine-target-store-index.DeIyJLO4.js")),__vite__mapDeps([151,42,1,43,12,45,37,38,46,88,32])).then((e=>fI(e.default||e))),tE=Wi(AT({loader:eE},RT)),nE=()=>t((()=>import("./pages-mine-coupon-index.sTRTt4D7.js")),__vite__mapDeps([152,11,1,6,12,88,32,153])).then((e=>fI(e.default||e))),oE=Wi(AT({loader:nE},RT)),iE=()=>t((()=>import("./pages-mine-homepage.KRdm9VIZ.js")),__vite__mapDeps([154,17,1,12,11,6,18,19,20,155,156,110,111,113,114,157,115,116,158,159])).then((e=>fI(e.default||e))),sE=Wi(AT({loader:iE},RT)),aE=()=>t((()=>import("./pages-release-video.CWyPIMaG.js")),__vite__mapDeps([160,11,1,6,12,18,19,161])).then((e=>fI(e.default||e))),rE=Wi(AT({loader:aE},RT)),cE=()=>t((()=>import("./pages-index-wallet.Cggr0JM2.js")),__vite__mapDeps([162,11,1,6,12,18,19,163])).then((e=>fI(e.default||e))),uE=Wi(AT({loader:cE},RT)),lE=()=>t((()=>import("./pages-index-myTeam.BmF2_V5Z.js")),__vite__mapDeps([164,11,1,6,12,165,166])).then((e=>fI(e.default||e))),dE=Wi(AT({loader:lE},RT)),pE=()=>t((()=>import("./pages-index-search.24dCpZZF.js")),__vite__mapDeps([167,11,1,6,12,168,4,110,111,169])).then((e=>fI(e.default||e))),hE=Wi(AT({loader:pE},RT)),fE=()=>t((()=>import("./pages-index-videoHome.0J4YEipz.js")),__vite__mapDeps([170,11,1,6,12,18,19,171,109,110,111,112,155,156,172])).then((e=>fI(e.default||e))),gE=Wi(AT({loader:fE},RT)),_E=()=>t((()=>import("./pages-index-report.Bkf2T_5b.js")),__vite__mapDeps([173,11,1,6,12,18,19,155,156,174])).then((e=>fI(e.default||e))),mE=Wi(AT({loader:_E},RT)),vE=()=>t((()=>import("./pages-mine-collectsVideo.fWAotXoZ.js")),__vite__mapDeps([175,12,155,11,1,6,156,176])).then((e=>fI(e.default||e))),yE=Wi(AT({loader:vE},RT)),IE=()=>t((()=>import("./pages-index-promotion.Bd32afsy.js")),__vite__mapDeps([177,12,155,11,1,6,156,178])).then((e=>fI(e.default||e))),ME=Wi(AT({loader:IE},RT)),CE=()=>t((()=>import("./pages-index-myQrCode.Cv0mrINv.js")),__vite__mapDeps([179,165,1,180])).then((e=>fI(e.default||e))),TE=Wi(AT({loader:CE},RT)),SE=()=>t((()=>import("./pages-index-deal.DbnIWoHH.js")),__vite__mapDeps([181,171,12,182,109,11,1,6,110,111,112,183])).then((e=>fI(e.default||e))),EE=Wi(AT({loader:SE},RT)),DE=()=>t((()=>import("./pages-index-durian.CGE_W2m7.js")),__vite__mapDeps([184,18,1,12,19,185,186,187,113,114,188,165,189,182,190])).then((e=>fI(e.default||e))),kE=Wi(AT({loader:DE},RT)),LE=()=>t((()=>import("./pages-index-durainActivation.CEGKWbYt.js")),__vite__mapDeps([191,186,12,182,1,192])).then((e=>fI(e.default||e))),bE=Wi(AT({loader:LE},RT)),AE=()=>t((()=>import("./pages-index-trade.CWvpPCgL.js")),__vite__mapDeps([193,11,1,6,12,18,19,187,182,194,111,112])).then((e=>fI(e.default||e))),RE=Wi(AT({loader:AE},RT)),OE=()=>t((()=>import("./pages-index-orchard.5huHtivT.js")),__vite__mapDeps([195,18,1,12,19,185,187,186,109,11,6,110,111,112,182,196])).then((e=>fI(e.default||e))),NE=Wi(AT({loader:OE},RT)),PE=()=>t((()=>import("./pages-index-durianLog.UdFN9TWn.js")),__vite__mapDeps([197,12,1,182,111,6,112])).then((e=>fI(e.default||e))),wE=Wi(AT({loader:PE},RT)),GE=()=>t((()=>import("./pages-index-extend.Dv9r9kbq.js")),__vite__mapDeps([198,11,1,6,12,18,19,155,156,199])).then((e=>fI(e.default||e))),UE=Wi(AT({loader:GE},RT)),xE=()=>t((()=>import("./pages-login-register.dkbe3_iA.js")),__vite__mapDeps([200,9,201,1,15,10,11,6,12,7,13,202])).then((e=>fI(e.default||e))),FE=Wi(AT({loader:xE},RT)),qE=()=>t((()=>import("./pages-login-invite.CWHyjLNp.js")),__vite__mapDeps([203,9,12,201,1,15,10,11,6,7,13,204])).then((e=>fI(e.default||e))),VE=Wi(AT({loader:qE},RT)),BE=()=>t((()=>import("./pages-login-forget.BwVWU2nC.js")),__vite__mapDeps([205,9,201,1,15,206,6,7])).then((e=>fI(e.default||e))),HE=Wi(AT({loader:BE},RT)),KE=()=>t((()=>import("./pages-login-retrieve.BvW3wyiq.js")),__vite__mapDeps([207,9,10,11,1,6,12,7,208])).then((e=>fI(e.default||e))),jE=Wi(AT({loader:KE},RT)),$E=()=>t((()=>import("./pages-shop-settle.CHuKx2xo.js")),__vite__mapDeps([209,11,1,6,12,182,210])).then((e=>fI(e.default||e))),WE=Wi(AT({loader:$E},RT)),YE=()=>t((()=>import("./pages-index-integral.CeyhHVcE.js")),__vite__mapDeps([211,212,165,188,1,189,12,213])).then((e=>fI(e.default||e))),zE=Wi(AT({loader:YE},RT)),XE=()=>t((()=>import("./pages-index-integralLog.Cpli-vrX.js")),__vite__mapDeps([214,11,1,6,12,109,110,111,112,165])).then((e=>fI(e.default||e))),JE=Wi(AT({loader:XE},RT)),ZE=()=>t((()=>import("./pages-index-integralMall.BJz1yg7M.js")),__vite__mapDeps([215,11,1,6,12,212,165,216])).then((e=>fI(e.default||e))),QE=Wi(AT({loader:ZE},RT)),eD=()=>t((()=>import("./pages-index-appeal.CSACfTN7.js")),__vite__mapDeps([217,11,1,6,12,187,171,218])).then((e=>fI(e.default||e))),tD=Wi(AT({loader:eD},RT)),nD=()=>t((()=>import("./pages-index-beInvited.0yk_2_z8.js")),__vite__mapDeps([219,12,165,1,220])).then((e=>fI(e.default||e))),oD=Wi(AT({loader:nD},RT)),iD=()=>t((()=>import("./pages-index-videoDetail.Q58Gx9Uh.js")),__vite__mapDeps([221,12,11,1,6,121,168,4,110,111,18,19,157,115,116,158,222])).then((e=>fI(e.default||e))),sD=Wi(AT({loader:iD},RT)),aD=()=>t((()=>import("./pages-news-newFriend.4pKhThhf.js")),__vite__mapDeps([223,11,1,6,12,224])).then((e=>fI(e.default||e))),rD=Wi(AT({loader:aD},RT)),cD=()=>t((()=>import("./pages-news-newAttention.D6wUc9Sv.js")),__vite__mapDeps([225,11,1,6,12,226])).then((e=>fI(e.default||e))),uD=Wi(AT({loader:cD},RT)),lD=()=>t((()=>import("./pages-news-newFans.D8dRFBB1.js")),__vite__mapDeps([227,11,1,6,12,228])).then((e=>fI(e.default||e))),dD=Wi(AT({loader:lD},RT)),pD=()=>t((()=>import("./pages-news-message.BjSh5cv0.js")),__vite__mapDeps([229,78,1,230])).then((e=>fI(e.default||e))),hD=Wi(AT({loader:pD},RT)),fD=()=>t((()=>import("./pages-index-article.DSuWHom_.js")),__vite__mapDeps([231,12,1,111])).then((e=>fI(e.default||e))),gD=Wi(AT({loader:fD},RT)),_D=()=>t((()=>import("./pages-index-topUp.DCY71K1p.js")),__vite__mapDeps([232,11,1,6,12,83,233])).then((e=>fI(e.default||e))),mD=Wi(AT({loader:_D},RT)),vD=()=>t((()=>import("./pages-news-addFriend.CgkNGrzk.js")),__vite__mapDeps([234,11,1,6,12,235])).then((e=>fI(e.default||e))),yD=Wi(AT({loader:vD},RT)),ID=()=>t((()=>import("./pages-news-redPacket.BxJobKBp.js")),__vite__mapDeps([236,11,1,6,12,237])).then((e=>fI(e.default||e))),MD=Wi(AT({loader:ID},RT)),CD=()=>t((()=>import("./pages-news-audio-video-audio.DOnCDqCK.js")),[]).then((e=>fI(e.default||e))),TD=Wi(AT({loader:CD},RT)),SD=()=>t((()=>import("./pages-news-audio-video-video.BqZ2rU3T.js")),__vite__mapDeps([238,1])).then((e=>fI(e.default||e))),ED=Wi(AT({loader:SD},RT)),DD=()=>t((()=>import("./pages-news-applyFriend.-STHOPQ6.js")),__vite__mapDeps([239,12,1,240])).then((e=>fI(e.default||e))),kD=Wi(AT({loader:DD},RT)),LD=()=>t((()=>import("./TUIKit-components-TUIConversation-index.xIELV9qi.js")),__vite__mapDeps([241,242,243,244,1,245,246,247,248,249,250,251,252,253,254,255,256,12,257])).then((e=>fI(e.default||e))),bD=Wi(AT({loader:LD},RT)),AD=()=>t((()=>import("./TUIKit-components-TUIChat-index.DwECrWtn.js")),__vite__mapDeps([258,243,242,244,1,245,12,259,260,248,249,253,254,261,255,256,251,262,263])).then((e=>fI(e.default||e))),RD=Wi(AT({loader:AD},RT)),OD=()=>t((()=>import("./TUIKit-components-TUIChat-video-play.DOWVYERb.js")),__vite__mapDeps([264,243,244,12,1,265])).then((e=>fI(e.default||e))),ND=Wi(AT({loader:OD},RT)),PD=()=>t((()=>import("./TUIKit-components-TUIChat-web-view.DfgHbxt0.js")),__vite__mapDeps([266,243,12])).then((e=>fI(e.default||e))),wD=Wi(AT({loader:PD},RT)),GD=()=>t((()=>import("./TUIKit-components-TUIContact-index.DtCgyXd8.js")),__vite__mapDeps([267,242,243,244,1,245,268,253,254,259,260,261,247,250,249,269])).then((e=>fI(e.default||e))),UD=Wi(AT({loader:GD},RT)),xD=()=>t((()=>import("./TUIKit-components-TUIGroup-index.BCkNIvPL.js")),__vite__mapDeps([270,242,243,244,1,245,262,259,260,250,253,254,268,251,271])).then((e=>fI(e.default||e))),FD=Wi(AT({loader:xD},RT)),qD=()=>t((()=>import("./TUIKit-components-TUISearch-index.DuoOvP9h.js")),__vite__mapDeps([246,243,242,244,1,245,247,248,249,250,251,252])).then((e=>fI(e.default||e))),VD=Wi(AT({loader:qD},RT));function BD(e,t){return Ja(),or(DT,null,{page:Qo((()=>[dr(e,AT({},t,{ref:"page"}),null,512)])),_:1})}function HD(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}window.__uniRoutes=[{path:"/",alias:"/pages/index/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(NT,t)}},loader:OT,meta:{isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0,disableScroll:!1,navigationBar:{titleText:"视频",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/news/ce",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(wT,t)}},loader:PT,meta:{navigationBar:{titleText:"视频",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/login/open",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(UT,t)}},loader:GT,meta:{navigationBar:{titleText:"开屏页",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/login/loginPhone",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(FT,t)}},loader:xT,meta:{bounce:"none",navigationBar:{titleText:"手机号登录",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/shop",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(VT,t)}},loader:qT,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:1,onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{titleText:"商城",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/merchant/business-operator/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(HT,t)}},loader:BT,meta:{onReachBottomDistance:100,navigationBar:{titleText:"商家管理",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/merchant/order/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(jT,t)}},loader:KT,meta:{onReachBottomDistance:100,navigationBar:{titleText:"商家订单",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/merchant/commodity-release/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(WT,t)}},loader:$T,meta:{navigationBar:{titleText:"发布商品",type:"default"},isNVue:!1}},{path:"/pages/merchant/specifications/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(zT,t)}},loader:YT,meta:{navigationBar:{titleText:"规格",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/search/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(JT,t)}},loader:XT,meta:{onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{titleText:"搜索",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/commodity/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(QT,t)}},loader:ZT,meta:{navigationBar:{titleText:"商品详情",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/shop/continue-pay/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(tS,t)}},loader:eS,meta:{navigationBar:{titleText:"继续付款",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/shop/store/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(oS,t)}},loader:nS,meta:{navigationBar:{titleText:"店铺",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/shop/order/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(sS,t)}},loader:iS,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"订单",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/sales/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(rS,t)}},loader:aS,meta:{navigationBar:{backgroundColor:"#fff",titleText:"售后类型",type:"default"},isNVue:!1}},{path:"/pages/shop/refund/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(uS,t)}},loader:cS,meta:{navigationBar:{backgroundColor:"#fff",titleText:"申请退货退款",type:"default"},isNVue:!1}},{path:"/pages/shop/money-whereabouts/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(dS,t)}},loader:lS,meta:{navigationBar:{titleText:"钱款去向",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/after-sales/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(hS,t)}},loader:pS,meta:{navigationBar:{titleText:"售后详情",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/transaction-completed/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(gS,t)}},loader:fS,meta:{navigationBar:{titleText:"交易完成",type:"default"},isNVue:!1}},{path:"/pages/shop/waiting-delivery/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(mS,t)}},loader:_S,meta:{navigationBar:{titleText:"待发货",type:"default"},isNVue:!1}},{path:"/pages/shop/logistics-state/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(yS,t)}},loader:vS,meta:{navigationBar:{titleText:"物流状态",type:"default"},isNVue:!1}},{path:"/pages/news/news",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(MS,t)}},loader:IS,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:2,bounce:"none",navigationBar:{titleText:"消息",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/news/group-chat-list/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(TS,t)}},loader:CS,meta:{navigationBar:{titleText:"群聊列表",type:"default"},isNVue:!1}},{path:"/pages/news/group-chat/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(ES,t)}},loader:SS,meta:{navigationBar:{backgroundColor:"#fff",titleText:"创建群聊",type:"default"},isNVue:!1}},{path:"/pages/news/question-answer/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(kS,t)}},loader:DS,meta:{navigationBar:{titleText:"问答页",type:"default"},isNVue:!1}},{path:"/pages/news/red-envelope/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(bS,t)}},loader:LS,meta:{navigationBar:{titleText:"红包详情",type:"default"},isNVue:!1}},{path:"/pages/mine/mine",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(RS,t)}},loader:AS,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:3,navigationBar:{titleText:"我的",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/set-up/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(NS,t)}},loader:OS,meta:{navigationBar:{backgroundColor:"#fff",titleText:"设置",type:"default"},isNVue:!1}},{path:"/pages/mine/userinfo",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(wS,t)}},loader:PS,meta:{navigationBar:{backgroundColor:"#fff",titleText:"个人信息",type:"default"},isNVue:!1}},{path:"/pages/mine/switch-accounts/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(US,t)}},loader:GS,meta:{navigationBar:{titleText:"切换账号",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/pay-use/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(FS,t)}},loader:xS,meta:{navigationBar:{titleText:"先用后付",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/real-name-authentication/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(VS,t)}},loader:qS,meta:{navigationBar:{titleText:"实名认证",type:"default"},isNVue:!1}},{path:"/pages/mine/delivery-address/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(HS,t)}},loader:BS,meta:{onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{titleText:"收获地址",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/balance/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(jS,t)}},loader:KS,meta:{navigationBar:{titleText:"余额",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/balance-details/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(WS,t)}},loader:$S,meta:{onReachBottomDistance:100,navigationBar:{titleText:"余额明细",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/historical-browsing/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(zS,t)}},loader:YS,meta:{onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"历史浏览",type:"default"},isNVue:!1}},{path:"/pages/mine/browsed/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(JS,t)}},loader:XS,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"选择已浏览的商品",type:"default"},isNVue:!1}},{path:"/pages/mine/collection/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(QS,t)}},loader:ZS,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"全部收藏",type:"default"},isNVue:!1}},{path:"/pages/mine/target-store/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(tE,t)}},loader:eE,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"关注店铺",type:"default"},isNVue:!1}},{path:"/pages/mine/coupon/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(oE,t)}},loader:nE,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"优惠券",type:"default"},isNVue:!1}},{path:"/pages/mine/homepage",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(sE,t)}},loader:iE,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:4,navigationBar:{titleText:"个人主页",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/release/video",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(rE,t)}},loader:aE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"发布视频",type:"default"},isNVue:!1}},{path:"/pages/index/wallet",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(uE,t)}},loader:cE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"我的钱包",type:"default"},isNVue:!1}},{path:"/pages/index/myTeam",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(dE,t)}},loader:lE,meta:{navigationBar:{titleText:"我的团队",type:"default"},isNVue:!1}},{path:"/pages/index/search",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(hE,t)}},loader:pE,meta:{enablePullDownRefresh:!0,navigationBar:{titleText:"搜索页",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/videoHome",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(gE,t)}},loader:fE,meta:{navigationBar:{titleText:"用户视频首页",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/report",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(mE,t)}},loader:_E,meta:{navigationBar:{backgroundColor:"#fff",titleText:"举报",type:"default"},isNVue:!1}},{path:"/pages/mine/collectsVideo",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(yE,t)}},loader:vE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"收藏夹视频",type:"default"},isNVue:!1}},{path:"/pages/index/promotion",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(ME,t)}},loader:IE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"选择推广视频",type:"default"},isNVue:!1}},{path:"/pages/index/myQrCode",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(TE,t)}},loader:CE,meta:{navigationBar:{titleText:"我的分享",type:"default"},isNVue:!1}},{path:"/pages/index/deal",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(EE,t)}},loader:SE,meta:{navigationBar:{titleText:"我的交易",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/durian",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(kE,t)}},loader:DE,meta:{navigationBar:{titleText:"榴莲首页",type:"default"},isNVue:!1}},{path:"/pages/index/durainActivation",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(bE,t)}},loader:LE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"已激活",type:"default"},isNVue:!1}},{path:"/pages/index/trade",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(RE,t)}},loader:AE,meta:{enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"交易市场",type:"default"},isNVue:!1}},{path:"/pages/index/orchard",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(NE,t)}},loader:OE,meta:{navigationBar:{titleText:"榴莲果园",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/durianLog",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(wE,t)}},loader:PE,meta:{enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"榴莲果明细",type:"default"},isNVue:!1}},{path:"/pages/index/extend",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(UE,t)}},loader:GE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"投流推广",type:"default"},isNVue:!1}},{path:"/pages/login/register",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(FE,t)}},loader:xE,meta:{navigationBar:{titleText:"注册",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/login/invite",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(VE,t)}},loader:qE,meta:{navigationBar:{titleText:"邀请",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/login/forget",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(HE,t)}},loader:BE,meta:{navigationBar:{titleText:"忘记密码",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/login/retrieve",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(jE,t)}},loader:KE,meta:{navigationBar:{titleText:"找回账户",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/settle",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(WE,t)}},loader:$E,meta:{navigationBar:{titleText:"商家入驻",type:"default"},isNVue:!1}},{path:"/pages/index/integral",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(zE,t)}},loader:YE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"积分",type:"default"},isNVue:!1}},{path:"/pages/index/integralLog",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(JE,t)}},loader:XE,meta:{enablePullDownRefresh:!0,navigationBar:{titleText:"积分变动明细",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/integralMall",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(QE,t)}},loader:ZE,meta:{navigationBar:{backgroundColor:"#fff",titleText:"卷轴商城",type:"default"},isNVue:!1}},{path:"/pages/index/appeal",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(tD,t)}},loader:eD,meta:{navigationBar:{titleText:"交易申诉",type:"default"},isNVue:!1}},{path:"/pages/index/beInvited",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(oD,t)}},loader:nD,meta:{navigationBar:{backgroundColor:"#fff",titleText:"受邀成功",type:"default"},isNVue:!1}},{path:"/pages/index/videoDetail",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(sD,t)}},loader:iD,meta:{navigationBar:{titleText:"视频详情",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/news/newFriend",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(rD,t)}},loader:aD,meta:{navigationBar:{backgroundColor:"#fff",titleText:"新朋友",type:"default"},isNVue:!1}},{path:"/pages/news/newAttention",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(uD,t)}},loader:cD,meta:{navigationBar:{backgroundColor:"#fff",titleText:"新的关注",type:"default"},isNVue:!1}},{path:"/pages/news/newFans",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(dD,t)}},loader:lD,meta:{navigationBar:{backgroundColor:"#fff",titleText:"新的粉丝",type:"default"},isNVue:!1}},{path:"/pages/news/message",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(hD,t)}},loader:pD,meta:{navigationBar:{backgroundColor:"#fff",titleText:"消息",type:"default"},isNVue:!1}},{path:"/pages/index/article",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(gD,t)}},loader:fD,meta:{navigationBar:{titleText:"",type:"default"},isNVue:!1}},{path:"/pages/index/topUp",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(mD,t)}},loader:_D,meta:{navigationBar:{backgroundColor:"#fff",titleText:"余额充值",type:"default"},isNVue:!1}},{path:"/pages/news/addFriend",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(yD,t)}},loader:vD,meta:{navigationBar:{backgroundColor:"#fff",titleText:"添加朋友",type:"default"},isNVue:!1}},{path:"/pages/news/redPacket",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(MD,t)}},loader:ID,meta:{navigationBar:{titleText:"红包",type:"default"},isNVue:!1}},{path:"/pages/news/audio-video/audio",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(TD,t)}},loader:CD,meta:{navigationBar:{titleText:"语音",type:"default"},isNVue:!1}},{path:"/pages/news/audio-video/video",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(ED,t)}},loader:SD,meta:{navigationBar:{titleText:"视频",type:"default"},isNVue:!1}},{path:"/pages/news/applyFriend",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(kD,t)}},loader:DD,meta:{navigationBar:{titleText:"好友添加申请",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIConversation/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(bD,t)}},loader:LD,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIChat/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(RD,t)}},loader:AD,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIChat/video-play",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(ND,t)}},loader:OD,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIChat/web-view",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(wD,t)}},loader:PD,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIContact/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(UD,t)}},loader:GD,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIGroup/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(FD,t)}},loader:xD,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUISearch/index",component:{setup(){const e=lI(),t=e&&e.$route&&e.$route.query||{};return()=>BD(VD,t)}},loader:qD,meta:{navigationBar:{titleText:"聊天记录",type:"default"},isNVue:!1}}].map((e=>(e.meta.route=(e.alias||e.path).slice(1),e)));const KD="function"==typeof Proxy;class jD{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const s in e.settings){const t=e.settings[s];n[s]=t.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let i={...n};try{const e=localStorage.getItem(o),t=JSON.parse(e);Object.assign(i,t)}catch(aL){}this.fallbacks={getSettings:()=>i,setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(aL){}i=e}},t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function $D(e,t){const n=HD(),o=HD().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=KD&&e.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const s=i?new jD(e,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:e,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}else o.emit("devtools-plugin:setup",e,t)}
|
||
/*!
|
||
* vuex v4.1.0
|
||
* (c) 2022 Evan You
|
||
* @license MIT
|
||
*/var WD="store";function YD(e){return void 0===e&&(e=null),la(null!==e?e:WD)}function zD(e,t){if(void 0===t&&(t=[]),null===e||"object"!=typeof e)return e;var n,o=(n=function(t){return t.original===e},t.filter(n)[0]);if(o)return o.copy;var i=Array.isArray(e)?[]:{};return t.push({original:e,copy:i}),Object.keys(e).forEach((function(n){i[n]=zD(e[n],t)})),i}function XD(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function JD(e){return null!==e&&"object"==typeof e}function ZD(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function QD(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;tk(e,n,[],e._modules.root,!0),ek(e,n,t)}function ek(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},r={},c=Tt(!0);c.run((function(){XD(s,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),r[n]=Hr((function(){return a[n]()})),Object.defineProperty(e.getters,n,{get:function(){return r[n].value},enumerable:!0})}))})),e._state=wn({data:t}),e._scope=c,e.strict&&function(e){Di((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),i&&i.stop()}function tk(e,t,n,o,i){var s=!n.length,a=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=o),!s&&!i){var r=ok(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){r[c]=o.state}))}var u=o.context=function(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var s=ik(n,o,i),a=s.payload,r=s.options,c=s.type;return r&&r.root||(c=t+c),e.dispatch(c,a)},commit:o?e.commit:function(n,o,i){var s=ik(n,o,i),a=s.payload,r=s.options,c=s.type;r&&r.root||(c=t+c),e.commit(c,a,r)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return nk(e,t)}},state:{get:function(){return ok(e.state,n)}}}),i}(e,a,n);o.forEachMutation((function(t,n){!function(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}(e,a+n,t,u)})),o.forEachAction((function(t,n){var o=t.root?n:a+n,i=t.handler||t;!function(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i,s=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(i=s)&&"function"==typeof i.then||(s=Promise.resolve(s)),e._devtoolHook?s.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):s}))}(e,o,i,u)})),o.forEachGetter((function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,a+n,t,u)})),o.forEachChild((function(o,s){tk(e,t,n.concat(s),o,i)}))}function nk(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var s=i.slice(o);Object.defineProperty(n,s,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function ok(e,t){return t.reduce((function(e,t){return e[t]}),e)}function ik(e,t,n){return JD(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var sk="vuex:mutations",ak="vuex:actions",rk="vuex",ck=0;function uk(e,t){$D({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:sk,label:"Vuex Mutations",color:lk}),n.addTimelineLayer({id:ak,label:"Vuex Actions",color:lk}),n.addInspector({id:rk,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===rk)if(n.filter){var o=[];fk(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[hk(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===rk){var o=n.nodeId;nk(t,o),n.state=function(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var s=function(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var i=t,s=o.pop();o.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[s]=gk((function(){return e[n]}))}else t[n]=gk((function(){return e[n]}))})),t}(t);i.getters=Object.keys(s).map((function(e){return{key:e.endsWith("/")?pk(e):e,editable:!1,value:gk((function(){return s[e]}))}}))}return i}((i=t._modules,(a=(s=o).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+s+'".');return n===a.length-1?o:o._children}),"root"===s?i:i.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var i,s,a})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===rk){var o=n.nodeId,i=n.path;"root"!==o&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit((function(){n.set(t._state.data,i,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(rk),n.sendInspectorState(rk),n.addTimelineEvent({layerId:sk,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=ck++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:ak,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},i=Date.now()-e._time;o.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:ak,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var lk=8702998,dk={label:"namespaced",textColor:16777215,backgroundColor:6710886};function pk(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function hk(e,t){return{id:t||"root",label:pk(t),tags:e.namespaced?[dk]:[],children:Object.keys(e._children).map((function(n){return hk(e._children[n],t+n+"/")}))}}function fk(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[dk]:[]}),Object.keys(t._children).forEach((function(i){fk(e,t._children[i],n,o+i+"/")}))}function gk(e){try{return e()}catch(aL){return aL}}var _k=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},mk={namespaced:{configurable:!0}};mk.namespaced.get=function(){return!!this._rawModule.namespaced},_k.prototype.addChild=function(e,t){this._children[e]=t},_k.prototype.removeChild=function(e){delete this._children[e]},_k.prototype.getChild=function(e){return this._children[e]},_k.prototype.hasChild=function(e){return e in this._children},_k.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},_k.prototype.forEachChild=function(e){XD(this._children,e)},_k.prototype.forEachGetter=function(e){this._rawModule.getters&&XD(this._rawModule.getters,e)},_k.prototype.forEachAction=function(e){this._rawModule.actions&&XD(this._rawModule.actions,e)},_k.prototype.forEachMutation=function(e){this._rawModule.mutations&&XD(this._rawModule.mutations,e)},Object.defineProperties(_k.prototype,mk);var vk=function(e){this.register([],e,!1)};function yk(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;yk(e.concat(o),t.getChild(o),n.modules[o])}}function Ik(e){return new Mk(e)}vk.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},vk.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},vk.prototype.update=function(e){yk([],this.root,e)},vk.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new _k(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&XD(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},vk.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},vk.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Mk=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var i=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new vk(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var s=this,a=this.dispatch,r=this.commit;this.dispatch=function(e,t){return a.call(s,e,t)},this.commit=function(e,t,n){return r.call(s,e,t,n)},this.strict=o;var c=this._modules.root.state;tk(this,c,[],this._modules.root),ek(this,c),n.forEach((function(e){return e(t)}))},Ck={state:{configurable:!0}};Mk.prototype.install=function(e,t){e.provide(t||WD,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&uk(e,this)},Ck.state.get=function(){return this._state.data},Ck.state.set=function(e){},Mk.prototype.commit=function(e,t,n){var o=this,i=ik(e,t,n),s=i.type,a=i.payload,r={type:s,payload:a},c=this._mutations[s];c&&(this._withCommit((function(){c.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(r,o.state)})))},Mk.prototype.dispatch=function(e,t){var n=this,o=ik(e,t),i=o.type,s=o.payload,a={type:i,payload:s},r=this._actions[i];if(r){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(aL){}var c=r.length>1?Promise.all(r.map((function(e){return e(s)}))):r[0](s);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(aL){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(aL){}t(e)}))}))}},Mk.prototype.subscribe=function(e,t){return ZD(e,this._subscribers,t)},Mk.prototype.subscribeAction=function(e,t){return ZD("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Mk.prototype.watch=function(e,t,n){var o=this;return Di((function(){return e(o.state,o.getters)}),t,Object.assign({},n))},Mk.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Mk.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),tk(this,this.state,e,this._modules.get(e),n.preserveState),ek(this,this.state)},Mk.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete ok(t.state,e.slice(0,-1))[e[e.length-1]]})),QD(this)},Mk.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Mk.prototype.hotUpdate=function(e){this._modules.update(e),QD(this,!0)},Mk.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Mk.prototype,Ck);var Tk=Lk((function(e,t){var n={};return kk(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=bk(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),Sk=Lk((function(e,t){var n={};return kk(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var o=this.$store.commit;if(e){var s=bk(this.$store,"mapMutations",e);if(!s)return;o=s.context.commit}return"function"==typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Ek=Lk((function(e,t){var n={};return kk(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||bk(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),Dk=Lk((function(e,t){var n={};return kk(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var s=bk(this.$store,"mapActions",e);if(!s)return;o=s.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n}));function kk(e){return function(e){return Array.isArray(e)||JD(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function Lk(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function bk(e,t,n){return e._modulesNamespaceMap[n]}function Ak(e,t,n){var o=n?e.groupCollapsed:e.group;try{o.call(e,t)}catch(aL){e.log(t)}}function Rk(e){try{e.groupEnd()}catch(aL){e.log("—— log end ——")}}function Ok(){var e=new Date;return" @ "+Nk(e.getHours(),2)+":"+Nk(e.getMinutes(),2)+":"+Nk(e.getSeconds(),2)+"."+Nk(e.getMilliseconds(),3)}function Nk(e,t){return n="0",o=t-e.toString().length,new Array(o+1).join(n)+e;var n,o}var Pk={version:"4.1.0",Store:Mk,storeKey:WD,createStore:Ik,useStore:YD,mapState:Tk,mapMutations:Sk,mapGetters:Ek,mapActions:Dk,createNamespacedHelpers:function(e){return{mapState:Tk.bind(null,e),mapGetters:Ek.bind(null,e),mapMutations:Sk.bind(null,e),mapActions:Dk.bind(null,e)}},createLogger:function(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var o=e.transformer;void 0===o&&(o=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var s=e.actionFilter;void 0===s&&(s=function(e,t){return!0});var a=e.actionTransformer;void 0===a&&(a=function(e){return e});var r=e.logMutations;void 0===r&&(r=!0);var c=e.logActions;void 0===c&&(c=!0);var u=e.logger;return void 0===u&&(u=console),function(e){var l=zD(e.state);void 0!==u&&(r&&e.subscribe((function(e,s){var a=zD(s);if(n(e,l,a)){var r=Ok(),c=i(e),d="mutation "+e.type+r;Ak(u,d,t),u.log("%c prev state","color: #9E9E9E; font-weight: bold",o(l)),u.log("%c mutation","color: #03A9F4; font-weight: bold",c),u.log("%c next state","color: #4CAF50; font-weight: bold",o(a)),Rk(u)}l=a})),c&&e.subscribeAction((function(e,n){if(s(e,n)){var o=Ok(),i=a(e),r="action "+e.type+o;Ak(u,r,t),u.log("%c action","color: #03A9F4; font-weight: bold",i),Rk(u)}})))}}};const wk=Ik({state:{userinfo:{},tabbarMode:"default",alarmTime:""},mutations:{setState(e,t){const n=t.key,o=t.value;e[n]=o},setUserInfo(e,t){e.userinfo=t},setTabbarMode(e,t){e.tabbarMode=t}},getters:{getUserInfo:e=>e.userinfo,getTabbarMode:e=>e.tabbarMode},actions:{updateUserInfo({commit:e},t){e("setUserInfo",t)},changeTabbarMode({commit:e},t){e("setTabbarMode",t)}}}),Gk={applyVideo:e=>xk.request({url:"/homecommon/applyVideo",query:e.query,data:e.data,method:"POST",load:!0}),pushVideo:e=>xk.request({url:"/homecommon/pushVideo",query:e.query,method:"POST",load:!0}),getUserInfo:e=>xk.request({url:"/home/getUserInfo",query:e.query,method:"POST",load:!0}),myVideoList:e=>xk.request({url:"/home/myVideoList",query:e.query,method:"POST",load:!0}),getCollectList:e=>xk.request({url:"/collect/getCollectList",query:e.query,method:"POST"}),saveCollectList:e=>xk.request({url:"/collect/saveCollectList",query:e.query,method:"POST",load:!0}),updateCollectList:e=>xk.request({url:"/collect/updateCollectList",query:e.query,method:"POST",load:!0}),deleteCollect:e=>xk.request({url:"/collect/deleteCollect",query:e.query,load:!0,method:"POST"}),getCollectVideoList:e=>xk.request({url:"/collect/getCollectVideoList",query:e.query,load:!0,method:"POST"}),collectVideo:e=>xk.request({url:"/collect/collectVideo",query:e.query,method:"POST",load:!0}),cancelCollect:e=>xk.request({url:"/collect/cancelCollect",query:e.query,method:"POST",load:!0}),homeVideo:e=>xk.request({url:"/homecommon/homeVideo",query:e.query,method:"POST"}),businessHomeVideo:e=>xk.request({url:"/homecommon/businessHomeVideo",query:e.query,method:"POST"}),otherHomeVideo:e=>xk.request({url:"/homecommon/otherHomeVideo",query:e.query,method:"POST"}),followVideo:e=>xk.request({url:"/homecommon/followVideo",query:e.query,method:"POST"}),getLabel:e=>xk.request({url:"/home/getLabel",query:e.query,method:"POST"}),setLabel:e=>xk.request({url:"/home/setLabel",data:e.data,method:"POST",load:!0}),publishVideo:e=>xk.request({url:"/homecommon/publishVideo",data:e.data,method:"POST"}),updateVideo:e=>xk.request({url:"/homecommon/updateVideo",data:e.data,method:"POST"}),commentList:e=>xk.request({url:"/home/commentList",query:e.query,method:"POST"}),levelCommentList:e=>xk.request({url:"/home/levelCommentList",query:e.query,method:"POST"}),thumbsUp:e=>xk.request({url:"/home/thumbsUp",query:e.query,method:"POST"}),comment:e=>xk.request({url:"/home/comment",query:e.query,method:"POST"}),videoLike:e=>xk.request({url:"/home/videoLike",query:e.query,method:"POST"}),browseLog:e=>xk.request({url:"/home/browseLog",query:e.query,method:"POST"}),hotVideos:e=>xk.request({url:"/home/hotVideos",method:"POST"}),videoSearchLog:e=>xk.request({url:"/home/videoSearchLog",method:"POST"}),videoSearch:e=>xk.request({url:"/home/videoSearch",query:e.query,method:"POST"}),agreeFriend:e=>xk.request({url:"/user/friend/agreeFriend",path:e.path,query:e.query,method:"POST"}),refuseFriend:e=>xk.request({url:"/user/friend/refuseFriend",path:e.path,query:e.query,method:"POST"}),getFriendList:e=>xk.request({url:"/user/friend/getFriendList",path:e.path,query:e.query,method:"GET"}),getFansList:e=>xk.request({url:"/user/attention/getFansList",path:e.path,query:e.query,method:"GET"}),getAttentionList:e=>xk.request({url:"/user/attention/getAttentionList",path:e.path,query:e.query,method:"GET"}),attention:e=>xk.request({url:"/user/attention",path:e.path,data:e.data,method:"POST"}),videoBlock:e=>xk.request({url:"/home/videoBlock",query:e.query,load:!0,method:"POST"}),reportVideo:e=>xk.request({url:"/report/reportVideo",data:e.data,method:"POST"}),myLikeVideoList:e=>xk.request({url:"/home/myLikeVideoList",query:e.query,method:"POST"}),getVideoById:e=>xk.request({url:"/homecommon/getVideoById",query:e.query,method:"POST"}),videoShare:e=>xk.request({url:"/home/videoShare",query:e.query,method:"POST"}),setAlarm:e=>xk.request({url:"/home/setAlarm",query:e.query,method:"POST"}),getAlarm:()=>xk.request({url:"/home/getAlarm",method:"POST"}),viewingTasks:()=>xk.request({url:"/home/viewingTasks",method:"POST"})},Uk={login:{userRegister:e=>xk.request({url:"/user/login/userRegister",data:e.data,path:e.path}),getCaptcha:e=>xk.request({url:"/user/Captcha/getCaptcha",data:e.data,path:e.path,method:"GET"}),userLoginByPassword:e=>xk.request({url:"/user/login/userLoginByPassword",data:e.data}),resetPassword:e=>xk.request({url:"/user/login/resetPassword",data:e.data,path:e.path,method:"POST"}),getIMToken:e=>xk.request({url:"/im/token/getUserAppToken",query:e.query,method:"GET"})},mine:{getUserinfo:e=>xk.request({url:"/getAppInfo",method:"GET"}),updateUserInfo:e=>xk.request({url:"/user/info/updateUserInfo",data:e.data,method:"POST"}),certification:e=>xk.request({url:"/user/info/certification",query:e.query,data:e.data,method:"POST"}),pay:e=>xk.request({url:"/home/pay",query:e.query,method:"POST"}),getBalanceLog:e=>xk.request({url:"/home/getBalanceLog",query:e.query,method:"POST"}),myfreeze:e=>xk.request({url:"/home/myfreeze",method:"POST"})},video:Gk,news:{setNotes:e=>xk.request({url:"/user/friend/setNotes",method:"POST",query:e.query}),deleteFriend:e=>xk.request({url:"/user/friend/deleteFriend",method:"POST",path:e.path}),addFriend:e=>xk.request({url:"/user/friend/addFriend",method:"POST",path:e.path}),getFriendListPage:e=>xk.request({url:"/user/friend/getFriendListPage",path:e.path,query:e.query,method:"GET"}),searchFriendByName:e=>xk.request({url:"/user/friend/searchFriendByName",path:e.path,query:e.query,method:"GET"}),getImToken:e=>xk.request({url:"/im/token/getUserAppToken",method:"get",query:e}),sendRedBag:e=>xk.request({url:"/home/sendRedBag",method:"POST",data:e.data}),grabred:e=>xk.request({url:"/home/grabred",method:"POST",data:e.data}),getRedbag:e=>xk.request({url:"/home/getRedbag",method:"POST",query:e.data}),grabredLog:e=>xk.request({url:"/home/grabredLog",method:"POST",query:e})},uploadImg:"/homecommon/upload",uploadVideo:"/homecommon/uploadVideo",getArticle:e=>xk.request({url:"/home/getArticle",query:e.query,method:"POST"})},xk={config:{host:"http://91f.store/api",uploadFilePath:"/homecommon/file/preview?fileName=",uploadVideoPath:"/homecommon/file/play?fileName=",img_size:5,video_size:300,h5:"",TChat:{SDKAppID:"1600057470",secretKey:"7d016821bf27a846739e209534abe4c4bba131559b3318e19f8ccf9294e08b29",userSig:""}},reg:{tel:/^1[3-9]\d{9}$/,idCard:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/},alert(e){if(null!=e&&null!=e)return"string"==typeof e||"number"==typeof e?(iC({title:""+e,icon:"none",duration:3e3}),null):(e.title=e.title?e.title:"",e.content=e.content?e.content:"",e.confirmText=e.confirmText?e.confirmText:"确定",e.showCancel=!1!==e.showCancel,e.cancelText=e.cancelText?e.cancelText:"取消",new Promise(((t,n)=>{WM({title:e.title,content:e.content,confirmText:e.confirmText,showCancel:e.showCancel,cancelText:e.cancelText,success:n=>{e.success&&e.success(n),t(n)},fail:t=>{e.fail&&e.fail(t),n(t)},complete:e=>{}})})))},upload:e=>new Promise(((t,n)=>{let o=WI("token")||"";e.url=e.url?e.url:Uk[{img:"uploadImg",video:"uploadVideo"}[e.mode]],console.log("obj.url",e.url),e.file=e.file?e.file:"",e.data=e.data?e.data:{},e.header={"Access-Control-Allow-Origin":"*",...e.header},o&&(e.header.Authorization=`Bearer ${o}`),aC({title:"正在上传"}),AM({url:xk.config.host+e.url,filePath:e.file,header:e.header,formData:e.data,dataType:"json",name:"file",success:n=>{rC(),e.success&&e.success(JSON.parse(n.data)),t(JSON.parse(n.data))},fail:t=>{rC(),e.fail&&e.fail(t.data),n(t)}})})),request(e){let t=WI("token")||"";return new Promise(((n,o)=>{let i=xk.config.host+(e.url?e.url:"/api/index/index");e.path&&e.path instanceof Array&&e.path.forEach((e=>{i+=`/${e}`})),e.query&&(i=xk.setUrl(i,e.query)),e.load&&aC({title:"加载中",mask:!0}),e.header={"ngrok-skip-browser-warning":!0,"Content-Type":"application/json;charset=UTF-8","Access-Control-Allow-Headers":"Origin, X-Requested-With, Content-Type, Accept","Access-Control-Allow-Origin":"*",...e.header},t&&(e.header.Authorization=`Bearer ${t}`),SM({url:i,method:e.method?e.method:"POST",sslVerify:!1,data:e.data,header:e.header,dataType:"json",success:t=>{e.load&&rC(),401==t.data.code&&xk.logout((()=>{xk.alert("请先登录"),o(t.data)})),e.success&&e.success(t.data),n(t.data)},fail:t=>{e.load&&rC(),e.fail&&e.fail(t),o(t)},complete(t){e.complete&&e.complete(t)}})}))},imgReplace:(e,t)=>(t||(e=e.replace(/<img src="/gi,'<img src="'+xk.config.host)),e.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/gi,"<p").replace(/<p>/gi,'<p style="font-size: 15px; line-height: 25px;">').replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(width="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(style="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(alt="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)/gi,'<img style="width: 100%;" $1')),routeWithParams(e,t={},n="navigateTo"){const o=xk.setUrl("url",t);switch(n){case"navigateTo":GM({url:o});break;case"redirectTo":_y({url:o});break;case"reLaunch":yy({url:o});break;case"switchTab":fy({url:o});break;default:throw new Error(`Unsupported method: ${n}`)}},set_param(e){let t="";e||(e=[]);for(let[n,o]of Object.entries(e))t+=`${n}=${o}&`;return t="&"==t.substring(t.length-1)?t.substring(0,t.length-1):t,t||t.substring(1)},setUrl:(e,t)=>e+=(e.indexOf("?")<0?"?":"&")+xk.set_param(t),query_to_param(e){let t={};return decodeURIComponent(e).split("&").forEach((e=>{let[n,o]=e.split("=");t[n]=o})),t},countDownd(e){if(!e)return;e=Number(e);let t=xk.timeFormin(parseInt(time/86400)),n=xk.timeFormin(parseInt(time%86400/3600)),o=xk.timeFormin(parseInt(time%86400%3600/60)),i=xk.timeFormin(parseInt(time%86400%3600%60)),s="";return t&&(s+=t+"天"),s+=n||0==n?n>9?n+":":"0"+n+":":"00:",s+=o||0==o?o>9?o+":":"0"+o+":":"00:",s+=i?i>9?i:"0"+i:"00",s},timeFormin:e=>e<0?0:e,toTwo(e){let t=String(Number(e));return t.length<2&&(t="0"+t),t},formatTime(e,t){const n=new Date;e&&"string"==typeof e||(e="yyyy-MM-dd HH:mm:ss"),t?String(t).length<=10&&(t*=1e3):t=n.valueOf();const o=new Date(t);let i=o.getFullYear(),s=o.getMonth()+1,a=o.getDate(),r=o.getDay(),c=o.getHours(),u=o.getMinutes(),l=o.getSeconds();(e=(e=(e=(e=(e=(e=e.replace("yyyy",i)).replace("MM",this.toTwo(s))).replace("M",s)).replace("dd",this.toTwo(a))).replace("d",a)).replace("w",["日","一","二","三","四","五","六"][r])).match("h")?(c=c>12?c-12:c,e=(e=e.replace("hh",this.toTwo(c))).replace("h",c)):e.match("H")&&(e=(e=e.replace("HH",this.toTwo(c))).replace("H",c));let d=c>12?"am":"pm";return e=(e=(e=(e=(e=e.replace("mm",this.toTwo(u))).replace("m",u)).replace("ss",this.toTwo(l))).replace("s",l)).replace("a",d)},strtotime(e,t){if(t&&e.indexOf(" ")>-1){let n=e.split(" "),o=n[0],i=n[1];t?String(t).length<=10&&(t*=1e3):t=s.valueOf();let s=new Date(t);switch(i){case"year":s.setYear(s.getFullYear()+parseInt(o));break;case"month":s.setMonth(s.getMonth()+parseInt(o));break;case"day":s.setDate(s.getDate()+parseInt(o));break;case"week":s.setDate(s.getDate()+7*parseInt(o));break;case"hour":s.setHours(s.getHours()+parseInt(o));break;case"minute":s.setMinutes(s.getMinutes()+parseInt(o))}return s.getTime()}return new Date(t).getTime()},upload_image(e){const t=e.count?e.count:8;if(e.type||(e.type=2),""!=e.value&&null==e.value&&null==e.value&&(e.value=1==e.type?"":[]),e.value.length>=t&&2==e.type)return void xk.alert("上传图片已达上限");iM({count:1==e.type?1:t-e.value.length,sourceType:e.sourceType||["album","camera"],success:t=>{t.tempFiles.forEach((n=>{let o=1048576*xk.config.img_size;n.size>o&&!e.unlimited?xk.alert(`大小超过${xk.config.img_size}m`):xk.upload({file:n.path,mode:"img",success(n){if(200===n.code)return 2==e.type?e.value.push(xk.format_url(n.msg,"img")):1==e.type&&(e.value=xk.format_url(n.msg,"img")),console.log("obj",e,e.value),void(e.success&&e.success({result:n.msg,value:e.value}));xk.alert(t.msg)}})}))},fail(e){e.errMsg}})},upload_video(e){!e.count||e.count,TM({compressed:!1,success(t){xk.upload({file:t.tempFilePath,mode:"video",success(t){if(200!=t.code)xk.alert(t.msg);else{const n=xk.format_url(t.msg,"video");e.success&&e.success({result:t.msg,value:n})}}})},fail(e){e.errMsg}})},upload_files(e){const t=e.value;xk.config.file_suffix;const n=e.count?e.count:1;t.length>=n?xk.alert("上传数量已达上限"):(console.log("upload_files",e),xk.alert("暂未开放"))},upload_audio(e){const t=e.value;xk.config.audio_suffix;const n=e.count?e.count:1;t.length>=n?xk.alert("上传数量已达上限"):xk.alert("暂未开放")},video_coverImage:e=>`${e}?x-oss-process=video/snapshot,t_1,m_fast`,view_imgs(e,t){e&&0!=e.length?MM({urls:e,current:t}):xk.alert("暂无")},view_file(e){let t=xk.get_file_suffix(e).id;if(!["doc","xls","ppt","pdf","docx","xlsx","pptx"].includes(t))return xk.alert("操作需要在web端"),void console.log("Unsupported suffix",t);LM({url:e,success:e=>{XI({filePath:e.tempFilePath,fail:e=>{console.log("rs",e)}})}})},get_file_suffix(e,t){t||(t="file");const n=xk.config[{file:"file_suffix",audio:"audio_suffix"}[t]];let o="";return e&&(o=n.find((t=>t.id===e.split(".").pop().toLowerCase()))),o},get_audio_suffix(e){const t=xk.config.audio_suffix;let n="";return e&&(n=t.find((t=>t.id===e.split(".").pop().toLowerCase()))),n},payment(e){(e=e||{}).data=e.data?e.data:{}},payment_request(e){if(e.debug&&console.log("params",e),!e.fn)throw"no function";function t(t){const n=e.cb;n&&_y({url:xk.setUrl("/index/pay_result",{orderNumber:n.orderNumbers||"",result:t,styles:n.styles||"",price:n.price||"",url:n.url||""})})}e.fn(e.data).then((n=>{if(e.debug&&console.log("request success result",n),200==n.code)switch(e.data.payType){case"1":switch(e.method){case"mp":n.data&&n.data.paySign?uni.requestPayment({provider:"wxpay",timeStamp:n.data.timeStamp,package:n.data.package,nonceStr:n.data.nonceStr,paySign:n.data.paySign,signType:n.data.signType,success(o){e.success&&e.success(n),t("success")},fail(n){e.fail&&e.fail(n),t("fail")},complete(t){e.debug&&console.log("requestPayment complete",t),e.complete&&e.complete(t)}}):e.fail&&e.fail("no data");break;case"app":uni.requestPayment({provider:"wxpay",orderInfo:n.data,success(o){e.success&&e.success(n),t("success")},fail(n){e.fail&&e.fail(n),t("fail")},complete(t){e.debug&&console.log("requestPayment complete",t),e.complete&&e.complete(t)}})}break;case"2":if("app"===e.method)uni.requestPayment({provider:"alipay",orderInfo:n.msg,success(o){e.success&&e.success(n),t("success")},fail(n){e.fail&&e.fail(n),t("fail")},complete(t){e.debug&&console.log("requestPayment complete",t),e.complete&&e.complete(t)}});break;case"4":e.success&&e.success(n),t("success")}else xk.alert(n.msg),e.fail&&e.fail(n)})).catch((e=>{console.log("request catch result",e)}))},weChatLogin(e){e=e||{};const t=WI("parent_id"),n=WI("admin_id");uni.getUserProfile({desc:"weixin",success:o=>{const i=o.userInfo;let s={nickName:i.nickName,avatarUrl:i.avatarUrl};jC({provider:"weixin",success:o=>{s.code=o.code,s.platform="wechatMini",t&&(s.parent_id=t),n&&(s.admin_id=n),"login:ok"==o.errMsg&&xk.request({url:"/api/user/third",data:s,load:1}).then((t=>{200==t.code&&e.success&&e.success(t)}))}})},fail(t){xk.alert("您拒绝了授权"),e.fail&&e.fail(t)},complete(){e.complete&&e.complete()}})},authorize(e){return new Promise(((t,n)=>{e||(e={});const o={location:{name:"定位服务",scope:"scope.userLocation",txt:"需要获取您的地理位置"},photosAlbum:{name:"相册",scope:"scope.writePhotosAlbum",txt:"需要访问您的相册"},camera:{name:"摄像头",scope:"scope.camera",txt:"需要访问您的摄像头"}};e.key&&(e={...e,...o[e.key]});this[""](e).then((n=>{e.success&&e.success(n),t(n)})).catch((t=>{e.fail&&e.fail(t),n(t)}))}))},appAuthorize(e){return new Promise(((t,n)=>{if(!1===uni.getSystemSetting().locationEnabled)return this.alert(e.txt),void n({msg:"未授权对应功能"});const o=uni.getAppAuthorizeSetting().locationAuthorized;if(console.log("locationAuthorized",o),"config error"!==o){if("denied"===o);else if("authorized"===o)return void t(e);if("android"!=BI().platform)return this.alert("请在设置里允许打开定位信息"),void t({msg:"用户未开启定位权限"});plus.android.requestPermissions(["android.permission.ACCESS_FINE_LOCATION"],(e=>{for(let t=0;t<e.granted.length;t++){let n=e.granted[t];console.log("已获取的权限:"+n)}for(let t=0;t<e.deniedPresent.length;t++){let n=e.deniedPresent[t];console.log("拒绝本次申请的权限:"+n)}for(let t=0;t<e.deniedAlways.length;t++){let n=e.deniedAlways[t];console.log("永久拒绝申请的权限:"+n)}[-1].includes(null)&&uni.openAppAuthorizeSetting({success:e=>{n({msg:"引导用户打开设置页面",info:e})},fail:e=>{n({msg:"用户设置页面打开失败",info:e})}})}),(e=>{console.log("申请权限错误:"+e.code+" = "+e.message),t({code:e.code,message:e.message})}))}else n({msg:"开发者未勾选定位服务模块"})}))},weChatAuthorize:e=>new Promise(((t,n)=>{["scope.userInfo","scope.userLocation","scope.userLocationBackground","scope.address","scope.record","scope.writePhotosAlbum","scope.camera","scope.invoice","scope.invoiceTitle","scope.werun"].includes(e.scope)?uni.authorize({scope:e.scope,success:e=>{t(e)},fail:t=>{n(t),xk.alert({title:"系统提示",value:e.txt,success:e=>{e.confirm&&uni.openSetting()}})}}):t({msg:"不在限制范围内"})})),finalLogin(e,t){const n=e.data;jI("token",n),aC({mask:!0}),xk.getUserinfo((e=>{pg("login"),xk.loginTencent(e),xk.loginAccountManagement(e),setTimeout((()=>{fy({url:"/pages/index/index"})}),500),t&&t()}))},loginAccountManagement(e){let t=WI("userInfoList")||[];const n=t.findIndex((t=>t.userId===e.userId));-1!==n&&t.splice(n,1),t.push(e),jI("userInfoList",t)},loginTencent(e){Uk.login.getIMToken({query:{userId:e.userId}}).then((t=>{const n={SDKAppID:xk.config.TChat.SDKAppID,userID:e.userId+"",userSig:t};uni.$TUICallKit.login(n,(e=>{0===e.code?console.log("[TUICallKit] login success."):console.error("[TUICallKit] login failed, failed message = ",e.msg,params)})),uni.$chat.login({userID:e.userId+"",userSig:t}).then((e=>{console.log("im login success",e)}))}))},getUserinfo:e=>new Promise((t=>{Uk.mine.getUserinfo().then((n=>{if(200===n.code){const o=n.user;o.userPortrait=xk.format_url(o.userPortrait,"img"),o.background=xk.format_url(o.background,"img"),t(o),wk.commit("setState",{key:"userinfo",value:o}),jI("userinfo",o),e&&e(o)}})).finally((()=>{rC()}))})),isLogin(e){let t=uni.$store.state.userinfo;return new Promise(((n,o)=>{t.userId?(n(),e&&e()):o()}))},logout(e){wk.state.userinfo.userId&&(pg("logout"),uni.$chat.logout().then((e=>{console.log("tim logout rs")})).catch((e=>{console.log("tim logout error:",e)}))),wk.commit("setState",{key:"userinfo",value:{}}),YI("userinfo"),YI("token"),e&&e()},isAuth(e){xk.isLogin((()=>{const t=uni.$store.state.userinfo;console.log("userinfo.userIdCard",t.userIdCard),t.userIdCard?e.success&&e.success(t):(e.noLink||GM({url:"/pages/mine/real-name-authentication/index"}),e.fail&¶rm.fail(t))}))},makePhone(e){e||xk.alert("暂无手机号"),bI({phoneNumber:e,fail(e){console.log("err",e)}})},format_url:(e,t)=>e?e.match(/^http/)?e:"https://9yvideo.oss-cn-beijing.aliyuncs.com/"+e:"",replace_url(e){if(!e||"string"!=typeof e)throw`${e} is not String`;return e.slice(e.indexOf("?fileName=")+10)},formart_lnglat:e=>e?e=parseFloat(Number(e).toFixed(6)):e,checkLink(e,t="navigateTo"){const n=xy(),o=e,i=n.findIndex((e=>e.route==o));i<0?uni[t]({url:`/${o}`}):wM({delta:n.length-i-1})},rp(e){var t=["零","一","二","三","四","五","六","七","八","九","十"],n="";e=""+e;for(var o=0;o<e.length;o++)n+=t[parseInt(e.charAt(o))];return 2==n.length&&(n.charAt(1)==t[0]?(n=n.charAt(0)+t[10])==t[1]+t[10]&&(n=t[10]):n.charAt(0)==t[1]?n=t[10]+n.charAt(1):n.charAt(0)==t[2]?n=t[2]+t[10]+n.charAt(1):n.charAt(0)==t[3]?n=t[3]+t[10]+n.charAt(1):n.charAt(0)==t[4]?n=t[4]+t[10]+n.charAt(1):n.charAt(0)==t[5]?n=t[5]+t[10]+n.charAt(1):n.charAt(0)==t[6]?n=t[6]+t[10]+n.charAt(1):n.charAt(0)==t[7]?n=t[7]+t[10]+n.charAt(1):n.charAt(0)==t[8]?n=t[8]+t[10]+n.charAt(1):n.charAt(0)==t[9]?n=t[9]+t[10]+n.charAt(1):n.charAt(0)==t[10]&&(n=t[10]+t[10]+n.charAt(1))),n},copyText(e){KI({data:e,success:()=>{xk.alert({title:"文本已复制到剪贴板"})}})},showToastAndRedirect(e,t="none",n=()=>{}){iC({title:e,icon:t,duration:2e3,complete:()=>{n(),rC()}})},toChat(e){GM({url:xk.setUrl("/pages/news/question-answer/index",{name:e.name,msgId:e.msgId,type:e.type})})}},Fk={onLaunch(){this.getUserinfo()},methods:{getUserinfo(){const e=WI("token"),t=WI("userinfo");e&&(t&&wk.commit("setState",{key:"userinfo",value:t}),xk.getUserinfo((()=>{xk.loginTencent(t),xk.loginAccountManagement(t)})))}}};hI(Fk,{init:dI,setup(e){const t=uy(),n=()=>{var n;n=e,Object.keys(Hg).forEach((e=>{Hg[e].forEach((t=>{ls(e,t,n)}))}));const{onLaunch:o,onShow:i,onPageNotFound:s,onError:a}=e,r=function({path:e,query:t}){return u($_,{path:e,query:t}),u(W_,$_),u({},$_)}({path:t.path.slice(1)||__uniRoutes[0].meta.route,query:at(t.query)});if(o&&w(o,r),i&&w(i,r),!t.matched.length){const e={notFound:!0,openType:"appLaunch",path:t.path,query:{},scene:1001};s&&w(s,e)}a&&(e.appContext.config.errorHandler=e=>{w(a,e)})};return la(md).isReady().then(n),hs((()=>{window.addEventListener("resize",ut(gI,50,{setTimeout:setTimeout,clearTimeout:clearTimeout})),window.addEventListener("message",_I),document.addEventListener("visibilitychange",mI),function(){let e=null;try{e=window.matchMedia("(prefers-color-scheme: dark)")}catch(t){}if(e){let t=e=>{aT.emit(he,{theme:e.matches?"dark":"light"})};e.addEventListener?e.addEventListener("change",t):e.addListener(t)}}()})),t.query},before(e){e.mpType="app";const{setup:t}=e,n=()=>(Ja(),or(VC));e.setup=(e,o)=>{const i=t&&t(e,o);return m(i)?n:i},e.render=n}});var qk="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Vk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bk(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})})),n}var Hk={exports:{}};Hk.exports=function(){function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)),o}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){a(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e){return(n="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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(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&&u(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,n){return(d=l()?Reflect.construct.bind():function(e,t,n){var o=[null];return o.push.apply(o,t),t=new(Function.bind.apply(e,o)),n&&u(t,n.prototype),t}).apply(null,arguments)}function p(e){var t="function"==typeof Map?new Map:void 0;return function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)}(e)}function h(e,t){if(null==e)return{};var n,o=function(e,t){if(null==e)return{};for(var n,o={},i=Object.keys(e),s=0;s<i.length;s++)n=i[s],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),s=0;s<i.length;s++)n=i[s],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t=l();return function(){var n,o=c(e);if(n=t?(n=c(this).constructor,Reflect.construct(o,arguments,n)):o.apply(this,arguments),o=this,n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return f(o)}}function _(e,t){return v(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,s=[],a=!0,r=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(s.push(o.value),!t||s.length!==t);a=!0);}catch(c){r=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(r)throw i}}return s}}(e,t)||I(e,t)||C()}function m(e){return function(e){if(Array.isArray(e))return M(e)}(e)||y(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){if(Array.isArray(e))return e}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e,t){var n;if(e)return"string"==typeof e?M(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function C(){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 T(e,t){var n,o,i,s,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(o=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){i=!0,n=e},f:function(){try{o||null==a.return||a.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=I(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),s=0,{s:t=function(){},n:function(){return s>=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.")}var S={SDK_READY:"sdkStateReady",SDK_NOT_READY:"sdkStateNotReady",SDK_DESTROY:"sdkDestroy",MESSAGE_RECEIVED:"onMessageReceived",ROOM_CUSTOM_DATA_RECEIVED:"onRoomCustomDataReceived",MESSAGE_MODIFIED:"onMessageModified",MESSAGE_REVOKED:"onMessageRevoked",MESSAGE_READ_BY_PEER:"onMessageReadByPeer",MESSAGE_READ_RECEIPT_RECEIVED:"onMessageReadReceiptReceived",MESSAGE_EXTENSIONS_UPDATED:"onMessageExtensionsUpdated",MESSAGE_EXTENSIONS_DELETED:"onMessageExtensionsDeleted",MESSAGE_REACTIONS_UPDATED:"onMessageReactionsUpdated",CONVERSATION_LIST_UPDATED:"onConversationListUpdated",TOTAL_UNREAD_MESSAGE_COUNT_UPDATED:"onTotalUnreadMessageCountUpdated",CONVERSATION_GROUP_LIST_UPDATED:"onConversationGroupListUpdated",CONVERSATION_IN_GROUP_UPDATED:"onConversationInGroupUpdated",GROUP_LIST_UPDATED:"onGroupListUpdated",GROUP_ATTRIBUTES_UPDATED:"groupAttributesUpdated",GROUP_COUNTER_UPDATED:"onGroupCounterUpdated",TOPIC_CREATED:"onTopicCreated",TOPIC_DELETED:"onTopicDeleted",TOPIC_UPDATED:"onTopicUpdated",PROFILE_UPDATED:"onProfileUpdated",USER_STATUS_UPDATED:"onUserStatusUpdated",BLACKLIST_UPDATED:"blacklistUpdated",FRIEND_LIST_UPDATED:"onFriendListUpdated",FRIEND_GROUP_LIST_UPDATED:"onFriendGroupListUpdated",FRIEND_APPLICATION_LIST_UPDATED:"onFriendApplicationListUpdated",MY_FOLLOWERS_LIST_UPDATED:"onMyFollowersListUpdated",MY_FOLLOWING_LIST_UPDATED:"onMyFollowingListUpdated",MUTUAL_FOLLOWERS_LIST_UPDATED:"onMutualFollowersListUpdated",KICKED_OUT:"kickedOut",ERROR:"error",NET_STATE_CHANGE:"netStateChange",ALL_RECEIVE_MESSAGE_OPT_UPDATED:"onAllReceiveMessageOptUpdated"},E={MSG_TEXT:"TIMTextElem",MSG_IMAGE:"TIMImageElem",MSG_SOUND:"TIMSoundElem",MSG_AUDIO:"TIMSoundElem",MSG_FILE:"TIMFileElem",MSG_FACE:"TIMFaceElem",MSG_VIDEO:"TIMVideoFileElem",MSG_GEO:"TIMLocationElem",MSG_LOCATION:"TIMLocationElem",MSG_GRP_TIP:"TIMGroupTipElem",MSG_GRP_SYS_NOTICE:"TIMGroupSystemNoticeElem",MSG_CUSTOM:"TIMCustomElem",MSG_MERGER:"TIMRelayElem",MSG_PRIORITY_HIGH:"High",MSG_PRIORITY_NORMAL:"Normal",MSG_PRIORITY_LOW:"Low",MSG_PRIORITY_LOWEST:"Lowest",CONV_C2C:"C2C",CONV_GROUP:"GROUP",CONV_TOPIC:"TOPIC",CONV_SYSTEM:"@TIM#SYSTEM",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:"Private",GRP_WORK:"Private",GRP_PUBLIC:"Public",GRP_CHATROOM:"ChatRoom",GRP_MEETING:"ChatRoom",GRP_AVCHATROOM:"AVChatRoom",GRP_COMMUNITY:"Community",GRP_ROOM:"Room",GRP_LIVE:"Live",GRP_MBR_ROLE_OWNER:"Owner",GRP_MBR_ROLE_ADMIN:"Admin",GRP_MBR_ROLE_MEMBER:"Member",GRP_MBR_ROLE_CUSTOM:"Custom",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:"AcceptAndNotify",MSG_REMIND_ACPT_NOT_NOTE:"AcceptNotNotify",MSG_REMIND_DISCARD:"Discard",RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_MSG_EXCEPT_AT:"NotReceiveMsgExceptAt",GENDER_UNKNOWN:"Gender_Type_Unknown",GENDER_FEMALE:"Gender_Type_Female",GENDER_MALE:"Gender_Type_Male",KICKED_OUT_MULT_ACCOUNT:"multipleAccount",KICKED_OUT_MULT_DEVICE:"multipleDevice",KICKED_OUT_USERSIG_EXPIRED:"userSigExpired",KICKED_OUT_REST_API:"REST_API_Kick",ALLOW_TYPE_ALLOW_ANY:"AllowType_Type_AllowAny",ALLOW_TYPE_NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_TYPE_DENY_ANY:"AllowType_Type_DenyAny",FORBID_TYPE_NONE:"AdminForbid_Type_None",FORBID_TYPE_SEND_OUT:"AdminForbid_Type_SendOut",JOIN_OPTIONS_FREE_ACCESS:"FreeAccess",JOIN_OPTIONS_NEED_PERMISSION:"NeedPermission",JOIN_OPTIONS_DISABLE_APPLY:"DisableApply",JOIN_STATUS_SUCCESS:"JoinedSuccess",JOIN_STATUS_ALREADY_IN_GROUP:"AlreadyInGroup",JOIN_STATUS_WAIT_APPROVAL:"WaitAdminApproval",INVITE_OPTIONS_DISABLE_INVITE:"DisableInvite",INVITE_OPTIONS_NEED_PERMISSION:"NeedPermission",INVITE_OPTIONS_FREE_ACCESS:"FreeAccess",GRP_PROFILE_OWNER_ID:"ownerID",GRP_PROFILE_CREATE_TIME:"createTime",GRP_PROFILE_LAST_INFO_TIME:"lastInfoTime",GRP_PROFILE_MEMBER_NUM:"memberNum",GRP_PROFILE_MAX_MEMBER_NUM:"maxMemberNum",GRP_PROFILE_JOIN_OPTION:"joinOption",GRP_PROFILE_INVITE_OPTION:"inviteOption",GRP_PROFILE_INTRODUCTION:"introduction",GRP_PROFILE_NOTIFICATION:"notification",GRP_PROFILE_MUTE_ALL_MBRS:"muteAllMembers",SNS_ADD_TYPE_SINGLE:"Add_Type_Single",SNS_ADD_TYPE_BOTH:"Add_Type_Both",SNS_DELETE_TYPE_SINGLE:"Delete_Type_Single",SNS_DELETE_TYPE_BOTH:"Delete_Type_Both",SNS_APPLICATION_TYPE_BOTH:"Pendency_Type_Both",SNS_APPLICATION_SENT_TO_ME:"Pendency_Type_ComeIn",SNS_APPLICATION_SENT_BY_ME:"Pendency_Type_SendOut",SNS_APPLICATION_AGREE:"Response_Action_Agree",SNS_APPLICATION_AGREE_AND_ADD:"Response_Action_AgreeAndAdd",SNS_CHECK_TYPE_BOTH:"CheckResult_Type_Both",SNS_CHECK_TYPE_SINGLE:"CheckResult_Type_Single",SNS_TYPE_NO_RELATION:"CheckResult_Type_NoRelation",SNS_TYPE_A_WITH_B:"CheckResult_Type_AWithB",SNS_TYPE_B_WITH_A:"CheckResult_Type_BWithA",SNS_TYPE_BOTH_WAY:"CheckResult_Type_BothWay",NET_STATE_CONNECTED:"connected",NET_STATE_CONNECTING:"connecting",NET_STATE_DISCONNECTED:"disconnected",MSG_AT_ALL:"__kImSDK_MesssageAtALL__",READ_ALL_C2C_MSG:"readAllC2CMessage",READ_ALL_GROUP_MSG:"readAllGroupMessage",READ_ALL_MSG:"readAllMessage",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3,IOS_OFFLINE_PUSH_NO_SOUND:"push.no_sound",IOS_OFFLINE_PUSH_DEFAULT_SOUND:"default"},D={NEW_INVITATION_RECEIVED:"newInvitationReceived",INVITEE_ACCEPTED:"ts_invitee_accepted",INVITEE_REJECTED:"ts_invitee_rejected",INVITATION_CANCELLED:"ts_invitation_cancelled",INVITATION_TIMEOUT:"ts_invitation_timeout",INVITATION_MODIFIED:"ts_invitation_modified",ACTION_TYPE_UNKNOWN:0,ACTION_TYPE_INVITE:1,ACTION_TYPE_CANCEL_INVITE:2,ACTION_TYPE_ACCEPT_INVITE:3,ACTION_TYPE_REJECT_INVITE:4,ACTION_TYPE_INVITE_TIMEOUT:5},k=(s(q,[{key:"use",value:function(e){if("function"!=typeof e)throw"middleware must be a function";return this.cache.push(e),this}},{key:"next",value:function(e){if(this.middlewares&&0<this.middlewares.length)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}},{key:"run",value:function(e){return this.middlewares=this.cache.map((function(e){return e})),this.options=e,this.next()}}]),q),L=(s(F,[{key:"equal",value:function(e){return null!==e&&this.low===e.low&&this.high===e.high}},{key:"toString",value:function(){var e=Number(this.high).toString(16),t=Number(this.low).toString(16);if(t.length<8)for(var n=8-t.length;n;)t="0"+t,n--;return e+t}}]),F),b={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT0:"wss://*w4s.my-imcloud.com",DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT0:"wss://*w4k.my-imcloud.com",DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",STAT:"https://apikr.my-imcloud.com",ANYCAST:"wss://162.14.13.104"},GERMANY:{DEFAULT0:"wss://*w4g.my-imcloud.com",DEFAULT:"wss://wssger.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",STAT:"https://apiger.my-imcloud.com",ANYCAST:"wss://162.14.3.17"},IND:{DEFAULT0:"wss://*w4i.my-imcloud.com",DEFAULT:"wss://wssind.my-imcloud.com",BACKUP:"wss://wssind.im.qcloud.com",STAT:"https://apiind.my-imcloud.com",ANYCAST:"wss://162.14.18.188"},JPN:{DEFAULT0:"wss://*w4j.my-imcloud.com",DEFAULT:"wss://wssjpn.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT0:"wss://*w4u.my-imcloud.com",DEFAULT:"wss://wssusa.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",STAT:"https://apiusa.my-imcloud.com",ANYCAST:"wss://162.14.10.42"},INDONESIA:{DEFAULT0:"wss://*w4y.my-imcloud.com",DEFAULT:"wss://wssidn.im.qcloud.com",BACKUP:"wss://wssidn.my-imcloud.com",STAT:"https://apiidn.my-imcloud.com",ANYCAST:"wss://43.129.34.169"}}},A={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15,DONUT_NATIVE_APP:19,NS_NATIVE_APP:20,RN_NATIVE_APP:21},R="1.7.3",O=537048168,N="CHINA",P={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent:function(){this.CURRENT=b.PRODUCTION[0<arguments.length&&void 0!==arguments[0]?arguments[0]:N]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GRP:"group_open_http_svc",GRP_AV:"group_open_avchatroom_http_svc",GRP_COMMUNITY:"million_group_open_http_svc",GRP_ATTR:"group_open_attr_http_svc",FD:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GRP_NO_AUTH:"group_open_http_noauth_svc",BIG_GRP_POLLING:"group_open_long_polling_http_svc",BIG_GRP_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MSG:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",IM_OPEN_SPEECH:"im_open_speech",MSG_SEARCH:"message_search",FOLLOW:"follow",OFFLINE_PUSH_REPORT:"offline_push_report",IM_MSG_LOGIC:"im_msg_db_logic"}},w={SEARCH_GRP_SNS:new L(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new L(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new L(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new L(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new L(0,Math.pow(2,6)).toString(),USER_STATUS:new L(0,Math.pow(2,7)).toString(),CONV_MARK:new L(0,Math.pow(2,9)).toString(),CONV_GROUP:new L(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new L(0,Math.pow(2,11)).toString(),MSG_EXT:new L(0,Math.pow(2,13)).toString(),GRP_COUNTER:new L(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new L(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new L(Math.pow(2,7)).toString(),PLUGIN_CS:new L(Math.pow(2,8)).toString(),PLUGIN_PUSH:new L(Math.pow(2,9)).toString(),PLUGIN_BOT:new L(Math.pow(2,10)).toString(),MSG_REACTION:new L(Math.pow(2,16)).toString(),FOLLOW:new L(Math.pow(2,20)).toString()},G="group_profile",U=["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember","InviteJoinOption"],x=["Role","JoinTime","MsgSeq","MsgFlag"];function F(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;o(this,F),this.high=e,this.low=t}function q(){o(this,q),this.cache=[],this.options=null}P.HOST.setCurrent(N);for(var V,B="undefined"!=typeof wx&&"function"==typeof BI&&Boolean(BI().fontSizeSetting),H=B&&"function"==typeof wx.createGamePortal,K="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),j="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),$="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),W="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),Y="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,z="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,X=B&&"object"===n(wx.miniapp),J="undefined"!=typeof uni,Z=B||K||j||$||W||z||Y,Q="undefined"==typeof window&&!Z&&void 0!==qk&&void 0!==qk.NativeScriptGlobals,ee=void 0!==qk&&(void 0!==qk.nativeModuleProxy||void 0!==qk.ReactNative),te="undefined"!=typeof uni?!Z:"undefined"!=typeof window&&!Z&&!ee,ne=K?qq:j?tt:$?swan:W?my:B?wx:z?uni:Y?jd:{},oe=te&&window&&window.navigator&&window.navigator.userAgent||"",ie=(Y="WEB",/(micromessenger|webbrowser)/i.test(oe)?Y="WEB":K?Y="QQ_MP":j?Y="TT_MP":$?Y="BAIDU_MP":W?Y="ALI_MP":B?Y=X?"DONUT_NATIVE_APP":"WX_MP":z?Y="UNI_NATIVE_APP":Q?Y="NS_NATIVE_APP":ee&&(Y="RN_NATIVE_APP"),A[Y]),se=(X=/iPad/i.test(oe),Q=/iPhone/i.test(oe)&&!X,Y=/iPod/i.test(oe),Q||X||Y),ae=(Q=oe.match(/OS (\d+)_/i))&&Q[1]?Q[1]:null,re=/Android/i.test(oe),ce=(X=oe.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(Y=X[1]&&parseFloat(X[1]),Q=X[2]&&parseFloat(X[2]),Y&&Q?parseFloat(X[1]+"."+X[2]):Y||null):null,ue=(X=!(Q=/Edge/i.test(oe))&&/Chrome/i.test(oe),/MSIE/.test(oe)||-1<oe.indexOf("Trident")&&-1<oe.indexOf("rv:11.0")),le=Y=!(Y=(Y=/MSIE\s(\d+)\.\d/.exec(oe))&&parseFloat(Y[1]))&&/Trident\/7.0/i.test(oe)&&/rv:11.0/.test(oe)?11:Y,de=(Y=/Safari/i.test(oe)&&!X&&!re&&!Q,/Windows/i.test(oe)),pe=/MAC OS X/i.test(oe),he=te&&"undefined"!=typeof Worker&&!ue,fe=re||se,ge=te&&void 0!==window.tencent_cloud_im_csig_flutter_for_web_25F_cy,_e="undefined"!=typeof window&&void 0!==window.navigator&&(X=window.navigator.standalone,!(!se||X||Y)),me="undefined"!=typeof console?console:void 0!==qk&&qk.console?qk.console:"undefined"!=typeof window&&window.console?window.console:{},ve=function(){},ye=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],Ie=ye.length;Ie--;)V=ye[Ie],console[V]||(me[V]=ve);function Me(){var e=new Date;return e.setTime(De()),e}function Ce(){Ee=0}function Te(){return Math.floor(De()/1e3)}var Se=me,Ee=0,De=function(){return(new Date).getTime()+Ee},ke=0;function Le(){return qt()?"%c Chat %c":"Chat"}function be(){var e=Me();return e.toLocaleTimeString("en-US",{hour12:!1})+"."+function(e){var t;switch(e.toString().length){case 1:t="00"+e;break;case 2:t="0"+e;break;default:t=e}return t}(e.getMilliseconds())}var Ae={arguments2String:function(e){var t="";if(1===e.length)t=e[0];else for(var n=0,o=e.length;n<o;n++){if(lt(e[n]))try{t+=dt(e[n])?JSON.stringify(e[n],["message","code"]):JSON.stringify(e[n])}catch(i){t+=i?i.message:"";break}else t+=e[n];t+=" "}return t},_exec:function(e,t){qt()?Se[e](Le(),"background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent",be(),t):Se[e]("".concat(Le()," ").concat(be()," ").concat(t))},d:function(){var e;ke<=-1&&(e=this.arguments2String(arguments),this._exec("debug",e))},l:function(){var e;ke<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},log:function(){var e;ke<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},i:function(){var e;ke<=1&&(e=this.arguments2String(arguments),this._exec("info",e))},w:function(){var e;ke<=2&&(e=this.arguments2String(arguments),this._exec("warn",e))},e:function(){var e;ke<=3&&(e=this.arguments2String(arguments),this._exec("error",e))},setLevel:function(e){e<4&&this._exec("log","set level from "+ke+" to "+e),ke=e},getLevel:function(){return ke}},Re={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},Oe={NICK:"".concat(Q="Tag_Profile_IM_","Nick"),GENDER:"".concat(Q,"Gender"),BIRTHDAY:"".concat(Q,"BirthDay"),LOCATION:"".concat(Q,"Location"),SELFSIGNATURE:"".concat(Q,"SelfSignature"),ALLOWTYPE:"".concat(Q,"AllowType"),LANGUAGE:"".concat(Q,"Language"),AVATAR:"".concat(Q,"Image"),MESSAGESETTINGS:"".concat(Q,"MsgSettings"),ADMINFORBIDTYPE:"".concat(Q,"AdminForbidType"),LEVEL:"".concat(Q,"Level"),ROLE:"".concat(Q,"Role")},Ne={GROUP:"".concat("Tag_SNS_IM_","Group"),REMARK:"".concat("Tag_SNS_IM_","Remark"),ADDSOURCE:"".concat("Tag_SNS_IM_","AddSource"),ADDWORDING:"".concat("Tag_SNS_IM_","Wording"),ADDTIME:"".concat("Tag_SNS_IM_","AddTime")},Pe={UNKNOWN:"".concat(X="Gender_Type_","Unknown"),FEMALE:"".concat(X,"Female"),MALE:"".concat(X,"Male")},we={NONE:"".concat("AdminForbid_Type_","None"),SEND_OUT:"".concat("AdminForbid_Type_","SendOut")},Ge={NEED_CONFIRM:"".concat("AllowType_Type_","NeedConfirm"),ALLOW_ANY:"".concat("AllowType_Type_","AllowAny"),DENY_ANY:"".concat("AllowType_Type_","DenyAny")},Ue="JoinedSuccess",xe="WaitAdminApproval",Fe="@TOPIC#_",qe=Object.prototype.hasOwnProperty;function Ve(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(We(e)){for(var t in e)if(qe.call(e,t))return!1;return!0}return!!(Be(e)||He(e)||Ke(e))&&0===e.size}function Be(e){return"map"===pt(e)}function He(e){return"set"===pt(e)}function Ke(e){return"file"===pt(e)}function je(e){return null!==e&&("number"==typeof e&&!isNaN(+e)||"object"===n(e)&&e.constructor===Number)}function $e(e){return null!==e&&"object"===n(e)}function We(e){if("object"===n(e)&&null!==e){if(null===(e=Object.getPrototypeOf(e)))return 1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return e===t}}function Ye(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===pt(e)}function ze(e){return"function"==typeof e}function Xe(e){return"filelist"===pt(e)}function Je(e){return"string"==typeof e&&(e=e[0],!/[^a-zA-Z0-9]/.test(e))}function Ze(e,t,n,o){if(!lt(e)||!lt(t))return 0;for(var i,s=0,a=Object.keys(t),r=0,c=a.length;r<c;r++)if(i=a[r],!(ut(t[i])||n&&n.includes(i)))if(lt(e[i])&<(t[i]))s+=Ze(e[i],t[i],n,o);else{if(o&&o.includes(t[i]))continue;e[i]!==t[i]&&(e[i]=t[i],s+=1)}return s}function Qe(e,t){var n,o=new Map,i=T(e.entries());try{for(i.s();!(n=i.n()).done;){var s=_(n.value,2),a=s[0],r=s[1];r&&o.set(a,t?JSON.stringify(r):JSON.parse(JSON.stringify(r)))}}catch(c){i.e(c)}finally{i.f()}return o}function et(e){if(0===e.length)return 0;for(var t=0,n=0,o="undefined"!=typeof document&&void 0!==document.characterSet?document.characterSet:"UTF-8";void 0!==e[t];)n+=e[t++].charCodeAt[t]<=255?1:!1===o?3:2;return n}function nt(e){return e=e||99999999,Math.round(Math.random()*e)}function ot(){for(var e="",t=32;0<t;--t)e+=ht[Math.floor(Math.random()*ft)];return e}function it(e,t){for(var n in e)if(e[n]===t)return 1}function st(e){return-1===e.indexOf("http://")||-1===e.indexOf("https://")?"https://"+e:e.replace(/https|http/,"https")}function at(e){if(0===Object.getOwnPropertyNames(e).length)return Object.create(null);var t,o,i=Array.isArray(e)?[]:Object.create(null);for(o in e)null!==e[o]?void 0!==e[o]?(t=n(e[o]),0<=["string","number","function","boolean"].indexOf(t)?i[o]=e[o]:i[o]=at(e[o])):i[o]=void 0:i[o]=null;return i}var rt=["url"],ct=function(e){return"string"==typeof e},ut=function(e){return void 0===e},lt=function(e){return Ye(e)||$e(e)},dt=function(e){return e instanceof Error},pt=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},ht=(Date.now||(Date.now=function(){return(new Date).getTime()}),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),ft=ht.length,gt={};function _t(e,t){var n;return!(!Ye(e)||!Ye(t))&&(n=!1,t.forEach((function(t){var o=t.key,i=(t=t.value,e.find((function(e){return e.key===o})));i?i.value!==t&&(i.value=t,n=!0):(e.push({key:o,value:t}),n=!0)})),n)}function mt(e){return Ve(e)?[]:e.filter((function(e){return!0===e.isModified}))}function vt(e){return Ve(e)?[]:e.filter((function(e){return!1===e.isModified}))}function yt(e){return e===E.GRP_AVCHATROOM}function It(e){var t=e.type;return e=e.groupID,t===E.GRP_COMMUNITY||"".concat(e).startsWith("@TGS#_")&&!"".concat(e).includes(Fe)}function Mt(e){return"".concat(e).startsWith("@TGS#_")&&"".concat(e).includes(Fe)}function Ct(e){return ct(e)&&e.slice(0,3)===E.CONV_C2C}function Tt(e){return ct(e)&&e.slice(0,5)===E.CONV_GROUP}function St(e){return ct(e)&&e===E.CONV_SYSTEM}function Et(e,t){var n={};return Object.keys(e).forEach((function(o){n[o]=t(e[o],o)})),n}function Dt(e){return ee?Promise.resolve({width:0,height:0}):Z?new Promise((function(t,n){ne.getImageInfo({src:e,success:function(e){t({width:e.width,height:e.height})},fail:function(){t({width:0,height:0})}})})):ue&&9===le?Promise.resolve({width:0,height:0}):new Promise((function(t,n){var o=new Image;o.onload=function(){t({width:this.width,height:this.height}),o=null},o.onerror=function(){t({width:0,height:0}),o=null},o.src=e}))}function kt(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(e()+e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e())}function Lt(){var e=re?"android":se?"ios":de?"windows":pe?"mac":"unknown";if(Z)try{var t=ne.getSystemInfoSync().platform;void 0!==t&&(e=t)}catch(n){}return e}function bt(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.length<n;)e.push("0");for(;t.length<n;)t.push("0");for(var o=0;o<n;o++){var i=parseInt(e[o]),s=parseInt(t[o]);if(s<i)return 1;if(i<s)return-1}return 0}function At(e){var t=void 0===(t=e.originUrl)?void 0:t,n=e.originWidth,o=e.originHeight,i=(e=void 0===(e=e.min)?198:e,{url:void 0,width:0,height:0});return((n=parseInt(n))<=(o=parseInt(o))?n:o)<=e?(i.url=t,i.width=n,i.height=o):(o<=n?(i.width=Math.ceil(n*e/o),i.height=e):(i.width=e,i.height=Math.ceil(o*e/n)),o=t&&-1<t.indexOf("?")?"".concat(t,"&"):"".concat(t,"?"),i.url="".concat(o,198===e?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720")),ut(t)?h(i,rt):i}function Rt(e){var t=e[2];e[2]=e[1],e[1]=t;for(var n=0;n<e.length;n++)e[n].setType(n)}function Ot(e){return(e=e.servcmd).slice(e.indexOf(".")+1)}function Nt(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t)}function Pt(e,t){return e.includes(t)}function wt(e,t){return e.includes(t)}function Gt(e){return e.split(Fe)[0]}var Ut=function(e,t,n){if(ut(t))return"";switch(e){case E.MSG_TEXT:return t.text;case E.MSG_IMAGE:return n?"[Image]":"[图片]";case E.MSG_LOCATION:return n?"[Location]":"[位置]";case E.MSG_AUDIO:return n?"[Voice]":"[语音]";case E.MSG_VIDEO:return n?"[Video]":"[视频]";case E.MSG_FILE:return n?"[File]":"[文件]";case E.MSG_CUSTOM:return n?"[Custom Messages]":"[自定义消息]";case E.MSG_GRP_TIP:return n?"[Group Notification]":"[群提示消息]";case E.MSG_GRP_SYS_NOTICE:return n?"[Group System Message]":"[群系统通知]";case E.MSG_FACE:return n?"[Animated Sticker]":"[动画表情]";case E.MSG_MERGER:return n?"[Chat Record]":"[聊天记录]";default:return""}};function xt(e){return e===E.MSG_TEXT||e===E.MSG_CUSTOM||e===E.MSG_LOCATION||e===E.MSG_FACE}function Ft(e){var t=[];if(ct(e)){var n=e.length;if(0!==n)for(var o=n-1;0<=o;o--)"1"===e[o]&&t.push(Math.pow(2,n-o-1))}return t}function qt(){return!ue&&!Z}function Vt(e){return"the length of userIDList cannot exceed ".concat(e)}function Bt(e){var t;if(Ye(e)&&0!==e.length)return t=0,e.forEach((function(e){t+=e})),t.toFixed(0)}function Ht(e){var t;if(Ye(e)&&0!==e.length)return t=0,e.forEach((function(e){t+=e})),(t/e.length).toFixed(0)}function Kt(e,t,n){t=!(1<arguments.length&&void 0!==t)||t,n=!(2<arguments.length&&void 0!==n)||n;var o=Date.now();return t?n?"".concat(o-e," ms"):"".concat(Math.round((o-e)/1e3)," s"):n?o-e:Math.round((o-e)/1e3)}function jt(e){return!!(e&&1<e)}function $t(e,t,n,o){var i,s,a;return void 0===t||(i=!0,t.required&&Ve(e)&&(Ae.e("[".concat(n,'] Missing required params: "').concat(o,'".')),i=!1),Ve(e)||(s=pt(e))===(a=t.type.toLowerCase())||"asyncfunction"===s&&"function"===a||(Ae.e("[".concat(n,'] Invalid params: type check failed for "').concat(o,'". Expected ').concat(t.type,".")),i=!1),t.validator&&!t.validator(e,n,o)&&(Ae.e("[".concat(n,'] Invalid params: custom validator check failed for "').concat(o,'".')),i=!1),i)}function Wt(e){return!(!e||!(Ct(e)||Tt(e)||St(e))&&((e=An("InvalidConversationID",e))&&Ae.w(e),1))}function Yt(e){""!==e.desc&&""!==An("API_REFER")&&Ae.w("[".concat(e.api,"] | ").concat(e.paramName," | ").concat(e.desc,", ").concat(An("API_REFER")).concat(e.api))}function zt(){return An("StringRequiredLog")}function Xt(e){return An("NonEmptyStringRequiredLog",e)}function Jt(){return An("NumberRequiredLog")}function Zt(){return An("UndefinedNotAllowedLog")}function Qt(){return An("FileRequiredLog")}function en(){return An("FunctionRequiredLog")}function tn(){return An("ArrayRequiredLog")}function nn(){return An("NonEmptyArrayLog")}function on(){return An("CallbackMissingLog")}function sn(){return An("PositiveIntegerRequiredLog")}function an(e,t){return An("StringNotLongerThanLog",e,t)}function rn(e,t){return An("NumberGreaterOrEqualLog",e,t)}function cn(e){return An("KeyValueStringRequiredLog",e)}function un(){return An("PlainObjectRequiredLog")}function ln(){return An("NonEmptyContentRequiredLog")}function dn(){return An("FileNotSelectedLog")}function pn(){return An("MessageInstanceRequiredLog")}function hn(){return An("NonAnonymousFunctionLog")}function fn(){return An("MessageExtensionNotAvailableLog")}function gn(){return An("MessageReactionRequiredLog")}function _n(e,t){return An("MaximumArrayLengthLog",e,t)}function mn(e){return{code:0,data:e||{}}}function vn(e){return Promise.resolve(mn(e))}function yn(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return e instanceof Nn?(n&&null!==wn&&wn.emit(S.ERROR,e),Promise.reject(e)):e instanceof Error?(t=new Nn({code:Pn.UNCAUGHT_ERROR}),n&&null!==wn&&wn.emit(S.ERROR,t),Promise.reject(t)):ut(e)||ut(e.code)?Promise.reject(new Nn({code:Pn.UNCAUGHT_ERROR})):(t=new Nn(e),n&&null!==wn&&wn.emit(S.ERROR,t),Promise.reject(t))}var In,Mn="unSend",Cn="success",Tn="fail",Sn="notStart",En="pending",Dn="resolved",kn="rejected",Ln={type:"Boolean",required:!0},bn={type:"number",required:!0},An=null,Rn={hookGetAPITips:function(e){An=e},login:{userID:Y={type:"String",required:!0},userSig:Y},addToBlacklist:{userIDList:Q={type:"Array",required:!0}},removeFromBlacklist:{userIDList:Q},on:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Yt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Yt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Yt({api:t,paramName:n,desc:hn()}),!0)}}],once:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Yt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Yt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Yt({api:t,paramName:n,desc:hn()}),!0)}}],off:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Yt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Yt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Yt({api:t,paramName:n,desc:hn()}),!0)}}],sendMessage:[t({name:"message"},X={type:"Object",required:!0})],setMessageExtensions:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn&&!0===e.isSupportExtension||(Yt({api:t,paramName:n,desc:fn()}),!1)}}),t({name:"extensions"},Q)],getMessageExtensions:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn&&!0===e.isSupportExtension||(Yt({api:t,paramName:n,desc:fn()}),!1)}})],deleteMessageExtensions:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn&&!0===e.isSupportExtension||(Yt({api:t,paramName:n,desc:fn()}),!1)}})],addMessageReaction:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn||(Yt({api:t,paramName:n,desc:gn()}),!1)}}),t({name:"reactionID"},Y)],removeMessageReaction:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn||(Yt({api:t,paramName:n,desc:gn()}),!1)}}),t({name:"reactionID"},Y)],getMessageReactions:{messageList:t({},Q)},getAllUserListOfMessageReaction:{message:t(t({},X),{},{validator:function(e,t,n){return e.status===Cn||(Yt({api:t,paramName:n,desc:gn()}),!1)}}),reactionID:t({},Y),nextSeq:{type:"Number"},count:{type:"Number"}},getMessageList:{conversationID:t(t({},Y),{},{validator:Wt}),nextReqMessageID:{type:"String"},count:{type:"Number",validator:function(e,t,n){return!(!ut(e)&&!/^[1-9][0-9]*$/.test(e)&&(Yt({api:t,paramName:n,desc:sn()}),1))}}},getMessageListHopping:{conversationID:t(t({},Y),{},{validator:Wt}),sequence:{type:"Number"},time:{type:"Number"},direction:{type:"Number",validator:function(e,t,n){return!(!ut(e)&&0!==e&&1!==e&&(Yt({api:t,paramName:n,desc:An("0Or1RequiredLog")}),1))}},count:{type:"Number",validator:function(e,t,n){return!(!ut(e)&&!/^[1-9][0-9]*$/.test(e)&&(Yt({api:t,paramName:n,desc:sn}),1))}}},setMessageRead:{conversationID:t(t({},Y),{},{validator:Wt})},setAllMessageRead:{scope:{type:"String",required:!1,validator:function(e,t,n){return!e||-1!==[E.READ_ALL_C2C_MSG,E.READ_ALL_GROUP_MSG,E.READ_ALL_MSG].indexOf(e)||(Yt({api:t,paramName:n,desc:An("ValidScopeRequired")}),!1)}}},getConversationProfile:[t(t({name:"conversationID"},Y),{},{validator:Wt})],clearHistoryMessage:[t(t({name:"conversationID"},Y),{},{validator:Wt})],pinConversation:{conversationID:t(t({},Y),{},{validator:Wt}),isPinned:t({},Ln)},setConversationDraft:{conversationID:t(t({},Y),{},{validator:Wt}),draftText:{type:"String",validator:function(e,t,n){return!!ct(e)||(Yt({api:t,paramName:n,desc:zt()}),!1)}}},setConversationCustomData:{conversationIDList:t({},Q),customData:{type:"String",validator:function(e,t,n){return ct(e)?!(256<e.length&&(Yt({api:t,paramName:n,desc:an(n,256)}),1)):(Yt({api:t,paramName:n,desc:zt()}),!1)}}},markConversation:{conversationIDList:t({},Q),markType:{type:"number",validator:function(e,t,n){return je(e)?e<=0?(Yt({api:t,paramName:n,desc:An("NumberGreaterThanLog",n,0)}),!1):!(e>=Math.pow(2,64)&&(Yt({api:t,paramName:n,desc:An("NumberLessThanLog",n,"Math.pow(2,64)")}),1)):(Yt({api:t,paramName:n,desc:Jt()}),!1)}},enableMark:t({},Ln)},createConversationGroup:{conversationIDList:t({},Q),groupName:t(t({},Y),{},{validator:function(e,t,n){return!(!e||32<e.length&&(Yt({api:t,paramName:n,desc:an(n,32)}),1))}})},deleteConversationGroup:[t({name:"groupName"},Y)],renameConversationGroup:{oldName:t({},Y),newName:t(t({},Y),{},{validator:function(e,t,n){return!(!e||32<e.length&&(Yt({api:t,paramName:n,desc:an(n,32)}),1))}})},addConversationsToGroup:{conversationIDList:t({},Q),groupName:t({},Y)},deleteConversationsFromGroup:{conversationIDList:t({},Q),groupName:t({},Y)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:Y,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:Q},createGroup:{name:Y},joinGroup:{groupID:Y,type:{type:"String"},applyMessage:{type:"String"}},quitGroup:[t({name:"groupID"},Y)],handleApplication:{message:X,handleAction:Y,handleMessage:{type:"String"}},changeGroupOwner:{groupID:Y,newOwnerID:Y},updateGroupProfile:{groupID:Y,muteAllMembers:{type:"Boolean"}},dismissGroup:[t({name:"groupID"},Y)],searchGroupByID:[t({name:"groupID"},Y)],getGroupOnlineMemberCount:[t({name:"groupID"},Y)],initGroupAttributes:{groupID:Y,groupAttributes:t(t({},X),{},{validator:function(e,t,n){var o=!0;return Object.keys(e).forEach((function(i){if(!ct(e[i]))return Yt({api:t,paramName:n,desc:cn("value")}),o=!1})),o}})},setGroupAttributes:{groupID:Y,groupAttributes:t(t({},X),{},{validator:function(e,t,n){var o=!0;return Object.keys(e).forEach((function(i){if(!ct(e[i]))return Yt({api:t,paramName:n,desc:cn("value")}),o=!1})),o}})},deleteGroupAttributes:{groupID:Y,keyList:{type:"Array",validator:function(e,t,n){var o;return ut(e)||!Ye(e)?(Yt({api:t,paramName:n,desc:tn()}),!1):!!Ve(e)||(o=!0,e.forEach((function(e){if(!ct(e))return Yt({api:t,paramName:n,desc:An("StringArrayRequiredLog")}),o=!1})),o)}}},getGroupAttributes:{groupID:Y,keyList:{type:"Array",validator:function(e,t,n){var o;return ut(e)||!Ye(e)?(Yt({api:t,paramName:n,desc:tn()}),!1):!!Ve(e)||(o=!0,e.forEach((function(e){if(!ct(e))return Yt({api:t,paramName:n,desc:cn("key")}),o=!1})),o)}}},setGroupCounters:{groupID:Y,counters:X},increaseGroupCounter:{groupID:Y,key:Y,value:bn},decreaseGroupCounter:{groupID:Y,key:Y,value:bn},getGroupCounters:{groupID:Y},getGroupMemberList:{groupID:Y,count:{type:"Number"}},getGroupMemberProfile:{groupID:Y,userIDList:Q,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:Y,userIDList:Q},setGroupMemberRole:{groupID:Y,userID:Y,role:Y},setGroupMemberMuteTime:{groupID:Y,userID:Y,muteTime:{type:"Number",validator:function(e){return 0<=e}}},setGroupMemberNameCard:{groupID:Y,userID:{type:"String"},nameCard:{type:"String",validator:function(e,t,n){return ct(e)?(e.length,!0):(Yt({api:t,paramName:n,desc:zt()}),!1)}}},setGroupMemberCustomField:{groupID:Y,userID:{type:"String"},memberCustomField:Q},deleteGroupMember:{groupID:Y},markGroupMemberList:{groupID:Y,markType:{type:"number",validator:function(e,t,n){return je(e)?!(e<1e3&&(Yt({api:t,paramName:n,desc:rn(n,1e3)}),1)):(Yt({api:t,paramName:n,desc:Jt()}),!1)}},userIDList:t({},Q),enableMark:t({},Ln)},createTextMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){return We(e)?ct(e.text)?0!==e.text.length||(Yt({api:t,paramName:"payload.text",desc:ln()}),!1):(Yt({api:t,paramName:"payload.text",desc:zt()}),!1):(Yt({api:t,paramName:n,desc:un()}),!1)}})},createTextAtMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){return We(e)?ct(e.text)?0===e.text.length?(Yt({api:t,paramName:"payload.text",desc:ln()}),!1):!(e.atUserList&&!Ye(e.atUserList)&&(Yt({api:t,paramName:"payload.atUserList",desc:tn()}),1)):(Yt({api:t,paramName:"payload.text",desc:zt()}),!1):(Yt({api:t,paramName:n,desc:un()}),!1)}})},createCustomMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){return We(e)?e.data&&!ct(e.data)?(Yt({api:t,paramName:"payload.data",desc:zt()}),!1):e.description&&!ct(e.description)?(Yt({api:t,paramName:"payload.description",desc:zt()}),!1):!(e.extension&&!ct(e.extension)&&(Yt({api:t,paramName:"payload.extension",desc:zt()}),1)):(Yt({api:t,paramName:"payload",desc:un()}),!1)}})},createImageMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){if(!We(e))return Yt({api:t,paramName:n,desc:un()}),!1;if(ut(e.file))return Yt({api:t,paramName:"payload.file",desc:Zt()}),!1;if(te){if(!(e.file instanceof HTMLInputElement||Ke(e.file)))return We(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(Yt({api:t,paramName:"payload.file",desc:dn()}),!1):(Yt({api:t,paramName:"payload.file",desc:Qt()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Yt({api:t,paramName:"payload.file",desc:dn()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:on()}),!0}}})},createAudioMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){return!!We(e)||(Yt({api:t,paramName:n,desc:un()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:on()}),!0}}},createVideoMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){if(!We(e))return Yt({api:t,paramName:n,desc:un()}),!1;if(ut(e.file))return Yt({api:t,paramName:"payload.file",desc:Zt()}),!1;if(te){if(!(e.file instanceof HTMLInputElement||Ke(e.file)))return We(e.file)&&"undefined"!=typeof uni?!!Ke(e.file.tempFile)||(Yt({api:t,paramName:"payload.file",desc:dn()}),!1):(Yt({api:t,paramName:"payload.file",desc:Qt()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Yt({api:t,paramName:"payload.file",desc:dn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:on()}),!0}}},createFaceMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){return We(e)?je(e.index)?!!ct(e.data)||(Yt({api:t,paramName:"payload.data",desc:zt()}),!1):(Yt({api:t,paramName:"payload.index",desc:Jt()}),!1):(Yt({api:t,paramName:n,desc:un()}),!1)}})},createFileMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){if(!We(e))return Yt({api:t,paramName:n,desc:un()}),!1;if(ut(e.file))return Yt({api:t,paramName:"payload.file",desc:Zt()}),!1;if(te){if(!(e.file instanceof HTMLInputElement||Ke(e.file)))return We(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(Yt({api:t,paramName:"payload.file",desc:dn()}),!1):(Yt({api:t,paramName:"payload.file",desc:Qt()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Yt({api:t,paramName:"payload.file",desc:dn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:on()}),!0}}},createLocationMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){return We(e)?ct(e.description)?je(e.longitude)?!!je(e.latitude)||(Yt({api:t,paramName:"payload.latitude",desc:Jt()}),!1):(Yt({api:t,paramName:"payload.longitude",desc:Jt()}),!1):(Yt({api:t,paramName:"payload.description",desc:zt()}),!1):(Yt({api:t,paramName:n,desc:un()}),!1)}})},createMergerMessage:{to:Y,conversationType:Y,payload:t(t({},X),{},{validator:function(e,t,n){var o;return Ve(e.messageList)?(Yt({api:t,paramName:"payload.messageList",desc:nn()}),!1):Ve(e.compatibleText)?(Yt({api:t,paramName:"payload.compatibleText",desc:Xt("compatibleText")}),!1):(o=!1,e.messageList.forEach((function(e){e.status===Tn&&(o=!0)})),!o||(Yt({api:t,paramName:"payload.messageList",desc:An("MergeFailedMessageLog")}),!1))}})},revokeMessage:[t(t({name:"message"},X),{},{validator:function(e,t,n){return Ve(e)?(Yt({api:t,paramName:n,desc:pn()}),!1):e.conversationType===E.CONV_SYSTEM?(Yt({api:t,paramName:n,desc:An("MessageCanBeRevokedDesc")}),!1):!0!==e.isRevoked||(Yt({api:t,paramName:n,desc:An("MessageRevokedLog")}),!1)}})],deleteMessage:[t(t({name:"messageList"},Q),{},{validator:function(e,t,n){return!Ve(e)||(Yt({api:t,paramName:n,desc:nn()}),!1)}})],translateText:{sourceTextList:Q,sourceLanguage:Y,targetLanguage:Y},convertVoiceToText:{message:t(t({},X),{},{validator:function(e,t,n){return Ve(e)?(Yt({api:t,paramName:n,desc:pn()}),!1):e.type===E.MSG_AUDIO&&e.status===Cn||(Yt({api:t,paramName:n,desc:An("AudioMessageRequiredLog")}),!1)}})},modifyMessage:[t(t({name:"message"},X),{},{validator:function(e,t,n){return Ve(e)?(Yt({api:t,paramName:n,desc:pn()}),!1):e.conversationType===E.CONV_SYSTEM?(Yt({api:t,paramName:n,desc:An("MessageCanBeModifiedLog")}),!1):!0!==e._onlineOnlyFlag||(Yt({api:t,paramName:n,desc:An("OnlineMessageNotSupportLog")}),!1)}})],searchCloudMessages:{keywordList:{type:"Array",required:!1,validator:function(e,t,n){return!(e&&(Ye(e)?0===e.length?(Yt({api:t,paramName:n,desc:nn()}),1):5<e.length&&(Yt({api:t,paramName:n,desc:_n(n,5)}),1):(Yt({api:t,paramName:n,desc:tn()}),1)))}},keywordListMatchType:{type:"String",required:!1,validator:function(e,t,n){return!e||"or"===e||"and"===e||Yt({api:t,paramName:n,desc:"".concat(e," is invalid match type")})}},senderUserIDList:{type:"Array",required:!1,validator:function(e,t,n){return!(e&&(Ye(e)?(0===e.length&&Yt({api:t,paramName:n,desc:nn()}),5<e.length&&(Yt({api:t,paramName:n,desc:_n(n,5)}),1)):(Yt({api:t,paramName:n,desc:tn()}),1)))}},messageTypeList:{type:"Array",required:!1,validator:function(e,t,n){if(!e)return!0;if(!Ye(e))return Yt({api:t,paramName:n,desc:tn()}),!1;0===e.length&&Yt({api:t,paramName:n,desc:nn()});var o=[E.MSG_TEXT,E.MSG_IMAGE,E.MSG_AUDIO,E.MSG_FILE,E.MSG_VIDEO,E.MSG_LOCATION,E.MSG_CUSTOM,E.MSG_MERGER];return!(0<e.filter((function(e){return-1===o.indexOf(e)})).length&&(Yt({api:t,paramName:n,desc:An("ContainsUnsupportedMessageTypeLog",n)}),1))}},conversationID:{type:"String",required:!1,validator:function(e){return!e||Wt(e)}},timePosition:{type:"number",required:!1,validator:function(e,t,n){return!(e&&e<0&&(Yt({api:t,paramName:n,desc:rn(n,0)}),1))}},timePeriod:{type:"number",required:!1,validator:function(e,t,n){return!(e&&e<0&&(Yt({api:t,paramName:n,desc:rn(n,0)}),1))}},cursor:{type:"String",required:!1}},getUserProfile:{userIDList:{type:"Array",validator:function(e,t,n){return Ye(e)?(0===e.length&&Yt({api:t,paramName:n,desc:nn()}),!0):(Yt({api:t,paramName:n,desc:tn()}),!1)}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function(e,t,n){return!!ut(e)||!!Ye(e)||(Yt({api:t,paramName:n,desc:tn()}),!1)}}},setSelfStatus:{customStatus:{type:"String",validator:function(e,t,n){return!!ct(e)||(Yt({api:t,paramName:n,desc:zt()}),!1)}}},getUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return Ye(e)?0!==e.length||(Yt({api:t,paramName:n,desc:nn()}),!1):(Yt({api:t,paramName:n,desc:tn()}),!1)}}},subscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return Ye(e)?0!==e.length||(Yt({api:t,paramName:n,desc:nn()}),!1):(Yt({api:t,paramName:n,desc:tn()}),!1)}}},unsubscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return!e||!!Ye(e)||(Yt({api:t,paramName:n,desc:tn()}),!1)}}},addFriend:{to:Y,source:{type:"String",required:!0,validator:function(e,t,n){return!(!e||(e.startsWith("AddSource_Type_")?8<e.replace("AddSource_Type_","").length&&(Yt({api:t,paramName:n,desc:an("keyword",8)}),1):(Yt({api:t,paramName:n,desc:An("SourcePrefixLog")}),1)))}},remark:{type:"String",required:!1,validator:function(e,t,n){return!(ct(e)&&96<e.length&&(Yt({api:t,paramName:n,desc:an(n,96)}),1))}}},deleteFriend:{userIDList:Q},checkFriend:{userIDList:Q},getFriendProfile:{userIDList:Q},updateFriend:{userID:Y,remark:{type:"String",required:!1,validator:function(e,t,n){return!(ct(e)&&96<e.length&&(Yt({api:t,paramName:n,desc:an(n,96)}),1))}},friendCustomField:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||(Ye(e)?(o=!0,e.forEach((function(e){return ct(e.key)&&-1!==e.key.indexOf("Tag_SNS_Custom")?ct(e.value)?8<e.key.replace("Tag_SNS_Custom_","").length?(Yt({api:t,paramName:n,desc:an("keyword",8)}),o=!1):void 0:(Yt({api:t,paramName:n,desc:cn("value")}),o=!1):(Yt({api:t,paramName:n,desc:An("FriendCustomFieldPrefixLog")}),o=!1)})),o):(Yt({api:t,paramName:n,desc:tn()}),!1))}}},acceptFriendApplication:{userID:Y},refuseFriendApplication:{userID:Y},deleteFriendApplication:{userID:Y},createFriendGroup:{name:Y},deleteFriendGroup:{name:Y},addToFriendGroup:{name:Y,userIDList:Q},removeFromFriendGroup:{name:Y,userIDList:Q},renameFriendGroup:{oldName:Y,newName:Y},sendMessageReadReceipt:[{name:"messageList",type:"Array",validator:function(e,t,n){return Ye(e)?0!==e.length||(Yt({api:t,paramName:n,desc:nn()}),!1):(Yt({api:t,paramName:n,desc:tn()}),!1)}}],getMessageReadReceiptList:[{name:"messageList",type:"Array",validator:function(e,t,n){return Ye(e)?0!==e.length||(Yt({api:t,paramName:n,desc:nn()}),!1):(Yt({api:t,paramName:n,desc:tn()}),!1)}}],createTopicInCommunity:{groupID:Y,topicName:Y},deleteTopicFromCommunity:{groupID:Y,topicIDList:{type:"Array",validator:function(e,t,n){return!e||!!Ye(e)||(Yt({api:t,paramName:n,desc:tn()}),!1)}}},updateTopicProfile:{groupID:Y,topicID:Y},getTopicList:{groupID:Y,topicIDList:{type:"Array",validator:function(e,t,n){return!e||!!Ye(e)||(Yt({api:t,paramName:n,desc:tn()}),!1)}}},followUser:[t({name:"userIDList"},Q)],unfollowUser:[t({name:"userIDList"},Q)],getMyFollowingList:[t(t({name:"startIndex"},Y),{},{required:!1})],getMyFollowersList:[t(t({name:"startIndex"},Y),{},{required:!1})],getMutualFollowersList:[t(t({name:"startIndex"},Y),{},{required:!1})],getUserFollowInfo:[t(t({name:"userIDList"},Q),{},{required:!1})],checkFollowType:[t({name:"userIDList"},Q)],addSignalingListener:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Yt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Yt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Yt({api:t,paramName:n,desc:hn()}),!0)}}],removeSignalingListener:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Yt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Yt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Yt({api:t,paramName:n,desc:hn()}),!0)}}],invite:{userID:Y},inviteSync:[t(t({},X),{},{validator:function(e,t,n){return We(e)?!!ct(e.userID)||(Yt({api:t,paramName:"options.userID",desc:zt()}),!1):(Yt({api:t,paramName:"options",desc:un()}),!1)}}),{name:"successCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:en()}),!0}},{name:"errorCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:en()}),!0}}],inviteInGroup:{groupID:Y,inviteeList:Q},inviteInGroupSync:[t(t({},X),{},{validator:function(e,t,n){return We(e)?ct(e.groupID)?!!Ye(e.inviteeList)||(Yt({api:t,paramName:"options.inviteeList",desc:tn()}),!1):(Yt({api:t,paramName:"options.groupID",desc:zt()}),!1):(Yt({api:t,paramName:"options",desc:un()}),!1)}}),{name:"successCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:en()}),!0}},{name:"errorCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Yt({api:t,paramName:n,desc:en()}),!0}}],accept:{inviteID:Y},reject:{inviteID:Y},getSignalingInfo:[t(t({name:"message"},X),{},{validator:function(e,t,n){return!Ve(e)||(Yt({api:t,paramName:n,desc:pn()}),!1)}})],modifyInvitation:{inviteID:Y,data:Y}},On={login:1,logout:1,getLoginUser:1,getServerTime:1,on:1,once:1,off:1,setLogLevel:1,registerPlugin:1,destroy:1,isReady:1,createTextMessage:1,createTextAtMessage:1,createImageMessage:1,createAudioMessage:1,createVideoMessage:1,createCustomMessage:1,createFaceMessage:1,createFileMessage:1,createLocationMessage:1,createMergerMessage:1,downloadMergerMessage:1,createForwardMessage:1,sendMessage:1,resendMessage:1,revokeMessage:1,deleteMessage:1,translateText:1,convertVoiceToText:1,modifyMessage:1,searchCloudMessages:1,sendMessageReadReceipt:1,getGroupMessageReadMemberList:1,getMessageReadReceiptList:1,setMessageExtensions:1,getMessageExtensions:1,deleteMessageExtensions:1,addMessageReaction:1,removeMessageReaction:1,getMessageReactions:1,getAllUserListOfMessageReaction:1,getMessageList:1,findMessage:1,getMessageListHopping:1,setMessageRead:1,setAllMessageRead:1,getConversationList:1,getConversationProfile:1,deleteConversation:1,setConversationDraft:1,pinConversation:1,getTotalUnreadMessageCount:1,setConversationCustomData:1,markConversation:1,createConversationGroup:1,getConversationGroupList:1,deleteConversationGroup:1,renameConversationGroup:1,addConversationsToGroup:1,deleteConversationsFromGroup:1,clearHistoryMessage:1,setMessageRemindType:1,setAllReceiveMessageOpt:1,getAllReceiveMessageOpt:1,getGroupList:1,getGroupProfile:1,createGroup:1,joinGroup:1,updateGroupProfile:1,quitGroup:1,dismissGroup:1,changeGroupOwner:1,searchGroupByID:1,getGroupApplicationList:1,handleGroupApplication:1,initGroupAttributes:1,setGroupAttributes:1,deleteGroupAttributes:1,getGroupAttributes:1,setGroupCounters:1,increaseGroupCounter:1,decreaseGroupCounter:1,getGroupCounters:1,getJoinedCommunityList:1,createTopicInCommunity:1,deleteTopicFromCommunity:1,updateTopicProfile:1,getTopicList:1,getGroupMemberProfile:1,getGroupMemberList:1,addGroupMember:1,deleteGroupMember:1,setGroupMemberNameCard:1,setGroupMemberMuteTime:1,setGroupMemberRole:1,setGroupMemberCustomField:1,getGroupOnlineMemberCount:1,markGroupMemberList:1,getMyProfile:1,getUserProfile:1,updateMyProfile:1,setSelfStatus:1,getUserStatus:1,subscribeUserStatus:1,unsubscribeUserStatus:1,getBlacklist:1,addToBlacklist:1,removeFromBlacklist:1,getFriendList:1,addFriend:1,deleteFriend:1,checkFriend:1,updateFriend:1,getFriendProfile:1,getFriendApplicationList:1,refuseFriendApplication:1,deleteFriendApplication:1,acceptFriendApplication:1,setFriendApplicationRead:1,getFriendGroupList:1,createFriendGroup:1,renameFriendGroup:1,deleteFriendGroup:1,addToFriendGroup:1,removeFromFriendGroup:1,followUser:1,unfollowUser:1,getMyFollowingList:1,getMyFollowersList:1,getMutualFollowersList:1,getUserFollowInfo:1,checkFollowType:1,callExperimentalAPI:1,addSignalingListener:1,removeSignalingListener:1,invite:1,inviteSync:1,inviteInGroup:1,inviteInGroupSync:1,cancel:1,accept:1,reject:1,getSignalingInfo:1,modifyInvitation:1},Nn=(r(no,p(Error)),In=g(no),s(no)),Pn={NO_SDKAPPID:2e3,NO_ACCOUNT_TYPE:2001,NO_IDENTIFIER:2002,NO_USERSIG:2003,NO_TINYID:2022,NO_A2KEY:2023,USER_NOT_LOGGED_IN:2024,REPEAT_LOGIN:2025,COS_UNDETECTED:2040,COS_GET_SIG_FAIL:2041,MSG_SEND_FAIL:2100,MSG_SEND_FAIL_NOT_IN_AV:2101,MSG_INSTANCE_REQUIRED:2105,MSG_INVALID_CONV_TYPE:2106,MSG_F_IS_EMPTY:2108,MSG_ONPROGRESS_ERR:2109,MSG_REVOKE_FAIL:2110,MSG_DELETE_FAIL:2111,MSG_UNREAD_ALL_FAIL:2112,READ_RECEIPT_MSG_LIST_EMPTY:2114,MSG_SEND_GRP_WITH_TOPIC_FAIL:2115,CANNOT_DELETE_GRP_SYSTEM_NOTICE:2116,TRANSLATE_TEXT_FAIL:2117,VOICE_TO_TEXT_FAIL:2118,UNSUPPORTED_VOICE_FORMAT:2119,MSG_I_SELECT_F_FIRST:2251,MSG_I_TYPES_LIMIT:2252,MSG_I_SIZE_LIMIT:2253,MSG_A_UPLOAD_FAIL:2300,MSG_A_SIZE_LIMIT:2301,MSG_V_UPLOAD_FAIL:2350,MSG_V_SIZE_LIMIT:2351,MSG_V_TYPES_LIMIT:2352,MSG_F_UPLOAD_FAIL:2400,MSG_F_SELECT_F_FIRST:2401,MSG_F_SIZE_LIMIT:2402,MSG_F_URL_IS_EMPTY:2403,MSG_MERGER_TYPE_INVALID:2450,MSG_MERGER_KEY_INVALID:2451,MSG_MERGER_DOWNLOAD_FAIL:2452,MSG_FORWARD_TYPE_INVALID:2453,MSG_FORWARD_INVALID_ELEMENTS:2454,MSG_MODIFY_CONFLICT:2480,MSG_MODIFY_DISABLED_IN_AV:2481,CONV_NOT_FOUND:2500,USER_OR_GRP_NOT_FOUND:2501,CONV_UN_RECORDED_TYPE:2502,INVALID_CONV_ID:2503,ILLEGAL_GRP_TYPE:2600,ILLEGAL_GRP_ID:2602,CANNOT_FIND_GRP:2603,CANNOT_CHANGE_OWNER_IN_AV:2620,CANNOT_CHANGE_OWNER_TO_SELF:2621,MEMBER_NOT_IN_GRP:2623,JOIN_GRP_FAIL:2660,CANNOT_ADD_MEMBER_IN_AV:2661,CANNOT_JOIN_NON_AV_WITHOUT_LOGIN:2662,NOT_OWNER:2681,INVALID_MEMBER_ROLE:2683,CANNOT_SET_SELF_MEMBER_ROLE:2684,CANNOT_MUTE_SELF:2685,BAN_DURATION_INVALID:2686,OPERATION_NOT_SUPPORTED_IN_AV:2687,NOT_MY_FRIEND:2700,ALREADY_MY_FRIEND:2701,FRIEND_GRP_EXISTED:2710,FRIEND_GRP_NOT_EXIST:2711,FRIEND_APPLICATION_NOT_EXIST:2716,UPDATE_PROFILE_INVALID_PARAM:2721,UPDATE_PROFILE_NO_KEY:2722,CANNOT_ADD_SELF_TO_BLACKLIST:2742,NETWORK_ERROR:2800,NETWORK_TIMEOUT:2801,NO_NETWORK:2805,UNCAUGHT_ERROR:2903,INVALID_OPERATION:2905,INVALID_TRTC_CMD:2995,OVER_FREQUENCY_LIMIT:2996,NO_PROTOCOL:2997,NO_MODULE:2998,SDK_IS_NOT_READY:2999,LOGGING_IN:3e3,LOGIN_FAILED:3001,KICKED_OUT_MULT_DEVICE:3002,KICKED_OUT_MULT_ACCOUNT:3003,KICKED_OUT_USERSIG_EXPIRED:3004,LOGGED_OUT:3005,KICKED_OUT_REST_API:3006,ILLEGAL_TOPIC_ID:3021,NO_USE:3122,PROFANITY_FOUND:3123,OPTIONS_IS_EMPTY:3153,MSG_A2KEY_EXPIRED:20002,ACCOUNT_A2KEY_EXPIRED:70001,HELLO_ANSWER_KICKED_OUT:1002,OPEN_SERVICE_OVERLOAD_ERROR:60022,SIGNALING_INVALID_INVITE_ID:8010,SIGNALING_NO_PERMISSION:8011,SIGNALING_ALREADY_EXISTS:8012,INVALID_CANCEL_MESSAGE:8020,MSG_SEARCH_CURSOR_INVALID:27002,MSG_SEARCH_CURSOR_EXPIRED:27003},wn=null,Gn=(s(to,[{key:"isLoggedIn",value:function(){return this._m.get(12).isLoggedIn()}},{key:"isOversea",value:function(){return this._m.get(12).isOversea()}},{key:"isPrivateNetWork",value:function(){var e=this._m.get(12);return e.isPrivateNetWork()&&!e.getFileDownloadProxy()}},{key:"getFileDownloadProxy",value:function(){return this._m.get(12).getFileDownloadProxy()}},{key:"getDowloadFileAuthKey",value:function(){return this._m.get(12).getDowloadFileAuthKey()}},{key:"getMyUserID",value:function(){return this._m.get(12).getUserID()}},{key:"getMyTinyID",value:function(){return this._m.get(12).getTinyID()}},{key:"getSDKAppID",value:function(){return this._m.get(12).getSDKAppID()}},{key:"isIntl",value:function(){return this._m.get(12).isIntl()}},{key:"isUsingChatCore",value:function(){return this._m.get(12).isUsingChatCore()}},{key:"isDevMode",value:function(){return this._m.get(12).isDevMode()}},{key:"get",value:function(e){return this._m.get(e)}},{key:"getPlatform",value:function(){return ie}},{key:"getCloudConfig",value:function(e){return this._m.get(23).getCloudConfig(e)}},{key:"emitOEvt",value:function(e,t){this._m.getOEmitInst().emit(e,t)}},{key:"emitIEvt",value:function(e,t){this._m.getIEmitInst().emit(e,t)}},{key:"getIEmitInst",value:function(){return this._m.getIEmitInst()}},{key:"req",value:function(e){return this._m.get(20).req(e)}},{key:"canIUse",value:function(e){return this._m.get(27).canIUse(e)}},{key:"getErrMsg",value:function(e,t,n){return this._m.getErrMsg(e,t,n)}},{key:"warn",value:function(e,t,n){(e=this.getErrMsg(e,t,n))&&Ae.w(e)}},{key:"noUse",value:function(e){var t=Pn.NO_USE;return yn({code:t,message:this.getErrMsg(t,e)})}}]),bn=to,{LOGIN:"wslogin",LOGOUT:"wslogout",HELLO:"wshello",KICK_OTHER:"KickOther",SYNC_UNREAD_MSG:"getmsg",SEND_C2C_MSG:"sendmsg",SEND_GRP_MSG:"send_group_msg",GET_USER_PROFILE:"portrait_get_all",UPDATE_MY_PROFILE:"portrait_set",GET_BL:"black_list_get",ADD_TO_BL:"black_list_add",RM_FROM_BL:"black_list_delete",GET_FD_LIST:"friend_get",GET_FD_PROFILE:"friend_get_specified",CHECK_FD:"friend_check",DEL_FD:"friend_delete",ADD_FD:"friend_add",UPDATE_FD:"friend_update",RESPOND_FD_APPLICATION:"friend_response",GET_FD_APPLICATION_LIST:"pendency_get",DEL_FD_APPLICATION:"pendency_delete",REFUSE_FD_APPLICATION:"pendency_refuse",REPORT_FD_APPLICATION:"pendency_report",GET_FD_GRP_LIST:"group_get",CREATE_FD_GRP:"group_add",DEL_FD_GRP:"group_delete",UPDATE_FD_GRP:"group_update",REVOKE_C2C_MSG:"msgwithdraw",SET_C2C_MSG_READ:"msgreaded",SET_C2C_PEER_MUTE_NOTIFICATIONS:"set_c2c_peer_mute_notifications",GET_C2C_PEER_MUTE_NOTIFICATIONS:"get_c2c_peer_mute_notifications",GET_C2C_ROAMING_MSG:"getroammsg",GET_C2C_PEER_READ_TIME:"get_peer_read_time",DEL_C2C_MSG:"delete_c2c_msg_ramble",MODIFY_C2C_MSG:"modify_c2c_msg",MODIFY_C2C_MSG_EXT:"set_key_values",GET_C2C_MSG_EXT:"get_key_values",ADD_C2C_MSG_REACTION:"reaction_add",RM_C2C_MSG_REACTION:"reaction_del",GET_C2C_MSG_REACTIONS:"reaction_multi_stat",GET_C2C_MSG_REACTION_USER_LIST:"reaction_iterate",PAGING_GET_CONV_LIST:"page_get",DEL_CONV:"batch_delete",CLEAR_HISTORY_MSG:"clear_msg",PIN_CONV:"top",DEL_GROUP_AT_TIPS:"deletemsg",SET_CONV_CUSTOM_DATA:"set_conv_custom_data",MARK_CONV:"mark_contact",CREATE_CONV_GRP:"create_contact_group",DEL_CONV_GRP:"del_contact_group",RENAME_CONV_GRP:"update_contact_group",ADD_CONV_TO_GRP:"add_conv_to_group",DEL_CONV_FROM_GRP:"del_conv_from_group",GET_CONV_GRP_LIST:"get_contact_group",SEARCH_CONV_GRP_MARK:"search_contact_group",GET_GRP_LIST:"get_joined_group_list",GET_GRP_PROFILE:"get_group_self_member_info",CREATE_GRP:"create_group",DISMISS_GRP:"destroy_group",UPDATE_GRP_PROFILE:"modify_group_base_info",APPLY_JOIN_GRP:"apply_join_group",APPLY_JOIN_GRP_NOAUTH:"apply_join_group_noauth",QUIT_GRP:"quit_group",SEARCH_GRP:"get_group_public_info",CHANGE_GRP_OWNER:"change_group_owner",HANDLE_GRP_APPLICATION:"handle_apply_join_group",HANDLE_INVITE_JOIN_GRP:"handle_invite_join_permission_group",HANDLE_GRP_INVITATION:"handle_invite_join_group",REVOKE_GRP_MSG:"group_msg_recall",SET_GRP_MSG_READ:"msg_read_report",SET_ALL_MSG_READ:"read_all_unread_msg",GET_GRP_ROAMING_MSG:"group_msg_get",GET_READ_RECEIPT:"get_group_msg_receipt",SEND_READ_RECEIPT:"group_msg_receipt",SEND_C2C_READ_RECEIPT:"c2c_msg_read_receipt",GET_READ_RECEIPT_DETAIL:"get_group_msg_receipt_detail",GET_GRP_PENDENCY:"get_pendency",DEL_GRP_SYSTEM_NOTICE:"deletemsg",AV_POLLING:"get_msg",AV_NOAUTH_POLLING:"get_msg_noauth",GET_ONLINE_MBR_NUM:"get_online_member_num",DEL_GRP_MSG:"delete_group_ramble_msg_by_seq",MODIFY_GRP_MSG:"modify_group_msg",SET_GRP_ATTR:"set_group_attr",MODIFY_GRP_ATTR:"modify_group_attr",DEL_GRP_ATTR:"delete_group_attr",CLEAR_GRP_ATTR:"clear_group_attr",GET_GRP_ATTR:"get_group_attr",MODIFY_GRP_MSG_EXT:"group_set_key_values",GET_GRP_MSG_EXT:"group_get_key_values",GET_GRP_NOTIFY:"batch_get_group_notify",UPDATE_GRP_COUNTER:"update_group_counter",GET_GRP_COUNTER:"get_group_counter",ADD_GRP_MSG_REACTION:"group_reaction_add",RM_GRP_MSG_REACTION:"group_reaction_del",GET_GRP_MSG_REACTIONS:"group_reaction_multi_stat",GET_GRP_MSG_REACTION_USER_LIST:"group_reaction_iterate",GET_GRP_MBR_LIST:"get_group_member_info",GET_AV_MBR_LIST:"get_members",GET_GRP_MBR_PROFILE:"get_specified_group_member_info",ADD_GRP_MBR:"add_group_member",DEL_GRP_MBR:"delete_group_member",BAN_AV_MBR:"ban_group_member",MODIFY_GRP_MBR_INFO:"modify_group_member_info",MARK_AV_MBR_INFO:"modify_user_info",COS_SIGN:"cos",COS_PRE_SIG:"pre_sig",SIMPLE_COS_PRE_SIG:"simple_sig",GET_IMAGE_INFO:"get_imageinfo",GET_IP:"get_final_ip",VIDEO_COVER:"video_cover",SSO_STAT:"tim_web_report_v2",PING:"alive",MSG_PUSH:"msg_push",MSG_CLOUD_SEARCH:"query",MULTI_MSG_PUSH:"multi_msg_push_ws",MSG_PUSH_ACK:"ws_msg_push_ack",STATUS_FORCE_OFFLINE:"stat_forceoffline",UPLOAD_MERGER_MSG:"save_relay_json_msg",DOWNLOAD_MERGER_MSG:"get_relay_json_msg",FETCH_CLOUD_CTRL_CONFIG:"fetch_config",PUSHED_CLOUD_CTRL_CONFIG:"push_configv2",FETCH_COMMERCIAL_CONFIG:"fetch_imsdk_purchase_bitsv2",PUSHED_COMMERCIAL_CONFIG:"push_imsdk_purchase_bitsv2",OVERLOAD_NOTIFY:"notify2",CREATE_TOPIC:"create_topic",DEL_TOPIC:"destroy_topic",UPDATE_TOPIC_PROFILE:"modify_topic",GET_TOPIC_LIST:"get_topic",SET_SELF_STATUS:"ws_set_custom_status",GET_USER_STATUS:"ws_get_user_status",SUB_USER_STATUS:"ws_status_subscribe",UNSUB_USER_STATUS:"ws_status_unsubscribe",STAT_BACKGROUND:"ws_stat_background",STAT_FOREGROUND:"ws_stat_foreground",SET_TOKEN:"ws_stat_settoken",PUSH_REPORT:"uniapp_sdk_report",GET_PROFANITY_LIST:"get_local_words",TRANSLATE_TEXT:"ws_batch_trans_text",VOICE_TO_TEXT:"ws_sentence_recognition",FOLLOW:"follow_add",UNFOLLOW:"follow_delete",GET_FOLLOW:"follow_get",GET_FOLLOW_INFO:"follow_get_info",CHECK_FOLLOW_TYPE:"follow_check",SET_ALL_RECEIVE_MSG_OPT:"ws_set_do_not_disturb",GET_ALL_RECEIVE_MSG_OPT:"ws_get_do_not_disturb"}),Un="networkRTT",xn="messageE2EDelay",Fn="sendMessageC2C",qn="sendMessageGroup",Vn="sendMessageGroupAV",Bn="sendMessageRichMedia",Hn="cosUpload",Kn="messageReceivedGroup",jn="messageReceivedGroupAVPush",$n="messageReceivedGroupAVPull",Wn=(a(Ln={},Un,2),a(Ln,xn,3),a(Ln,Fn,4),a(Ln,qn,5),a(Ln,Vn,6),a(Ln,Bn,7),a(Ln,Kn,8),a(Ln,jn,9),a(Ln,$n,10),a(Ln,Hn,11),Ln),Yn={info:4,warning:5,error:6},zn={wifi:1,"2g":2,"3g":3,"4g":4,"5g":5,unknown:6,none:7,online:8},Xn={login:4,plugin_search:16,plugin_translate:16,plugin_voice_to_text:16,plugin_cs:16,plugin_push:16,plugin_bot:16,plugin_emoji_reaction:16},Jn=(s(eo,[{key:"updateTimeStamp",value:function(){this.timestamp=De()}},{key:"start",value:function(e){return this._startts=e,this}},{key:"end",value:function(){var e,t=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this._sentFlag||(this._netMonitorModule&&(e=this._netMonitorModule.getNetworkType(),this.setNetworkType(e)),e=De(),0===this.costTime&&(this.costTime=e-this._startts),this.setMoreMessage("startts:".concat(this._startts," endts:").concat(e)),n?(this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)):setTimeout((function(){t._sentFlag=!0,t._eventStatModule&&t._eventStatModule.pushIn(t)}),0))}},{key:"setError",value:function(e){var t;return e instanceof Error?this._sentFlag||(t=!0,(t=this._netMonitorModule?this._netMonitorModule.isOnline():t)?(e.code&&this.setCode(e.code),e.message&&this.setMoreMessage(e.message)):this.setCode(Pn.NO_NETWORK),this.setLevel("error")):Ae.w("".concat(this._n,".setError value not instanceof Error, please check!")),this}},{key:"setCode",value:function(e){return ut(e)||this._sentFlag||("ECONNABORTED"===e&&(this.code=103),je(e)?this.code=e:Ae.w("".concat(this._n,".setCode value not a number, please check!"),e,n(e))),this}},{key:"setMessage",value:function(e){return ut(e)||this._sentFlag||(je(e)&&(this.message=e.toString()),ct(e)&&(this.message=e)),this}},{key:"setCostTime",value:function(e){return this.costTime=e,this}},{key:"setLevel",value:function(e){return ut(e)||this._sentFlag||(this.level=Yn[e]),this}},{key:"setMoreMessage",value:function(e){return Ve(this.moreMessage)?this.moreMessage="".concat(e):this.moreMessage+=" ".concat(e),this}},{key:"setNetworkType",value:function(e){return ut(e)?Ae.w("".concat(this._n,".setNetworkType value is undefined, please check!")):(e=zn[e.toLowerCase()],ut(e)||(this.networkType=e)),this}},{key:"getStartTs",value:function(){return this._startts}},{key:"setUIPlatform",value:function(e){return this.uiPlatform=e,this}},{key:"setExtension",value:function(e){return this.extension=e,this}},{key:"setEventType",value:function(e){return this.eventType=e,this}}],[{key:"bindEventStatModule",value:function(e){eo.prototype._eventStatModule=e}},{key:"bindNetMonitorModule",value:function(e){eo.prototype._netMonitorModule=e}}]),eo),Zn=(s(Qn,[{key:"setText",value:function(e){this.content.text=e}},{key:"sendable",value:function(){return 0!==this.content.text.length}}]),Qn);function Qn(e){o(this,Qn),this.type=E.MSG_TEXT,this.content={text:e.text||""}}function eo(e){o(this,eo),this._n="SSOLogData",this.eventType=Xn[e]||0,this.timestamp=0,this.networkType=8,this.code=0,this.message="",this.moreMessage="",this.extension=e,this.costTime=0,this.duplicate=!1,this.level=4,this.uiPlatform=void 0,this._sentFlag=!1,this._startts=De()}function to(e){o(this,to),this._m=e,this._n=""}function no(e){o(this,no),t=In.call(this);var t,n=e.code,i=e.message;return e=e.data,t.code=n,i?t.message=i:t._getErrMsg&&(t.message=t._getErrMsg(t.code)),t.data=e||{},t}function oo(e,t,n,o){var i;if(o=3<arguments.length&&void 0!==o?o:[],e)return i=e,t&&(e.startsWith("http://")?i=e.replace(/^http:\/\/[^/]+/,t):e.startsWith("https://")&&(i=e.replace(/^https:\/\/[^/]+/,t))),n&&-1===i.indexOf("authKey=")&&ao(i,o)?(-1<i.indexOf("?")?"".concat(i,"&authKey="):"".concat(i,"?authKey=")).concat(n):i}function io(e,t,n){return n=2<arguments.length&&void 0!==n?n:[],e===E.MSG_VIDEO?ao((t[0].content||t[0].payload).snapshotUrl,n)&&(t[0].content?(t[0].content.snapshotUrl=so(t[0].content.snapshotUrl),t[0].content.thumbUrl=so(t[0].content.thumbUrl)):(t[0].payload.snapshotUrl=so(t[0].payload.snapshotUrl),t[0].payload.thumbUrl=so(t[0].payload.thumbUrl))):e===E.MSG_FILE?ao((t[0].content||t[0].payload).fileUrl,n)&&(t[0].content?t[0].content.fileUrl=so(t[0].content.fileUrl):t[0].payload.fileUrl=so(t[0].payload.fileUrl)):e===E.MSG_MERGER&&(e=(n=t[0].content||t[0].payload).downloadKey,n=void 0===(n=n.messageList)?[]:n,Ve(void 0===e?"":e))&&n.forEach((function(e){io(e.messageBody[0].type,e.messageBody)})),t}function so(e){if(!e)return e;if(-1===e.indexOf("authKey="))return e;for(var t=(e=e.split("?"))[1].split("&"),n=0,o=0;o<t.length;o++)if(-1<t[o].indexOf("authKey=")){n=o;break}return t.splice(n,1),0<t.length?"".concat(e[0],"?").concat(t.join("&")):e[0]}function ao(e,t){var n=!1;if(e){var o=(e=e.match(/:\/\/([0-9]?\.)?(.[^/:]+)/))&&e[2]||"";if(o.includes("rich-dev"))return 1;for(var i=0;i<t.length;i++)if(o.endsWith(t[i])){n=!0;break}}return n}s(Po,[{key:"_initImageInfoModel",value:function(){var e=this;this._ImageInfoModel=function(t){this.instanceID=nt(9999999),this.sizeType=t.type||0,this.type=0,this.size=t.size||0,this.width=t.width||0,this.height=t.height||0,this.imageUrl=t.imageUrl||t.url||"",this.url=oo(t.url||e._imageMemoryURL,e._fileDownloadProxy,e._authKey,e._fileDNList)},this._ImageInfoModel.prototype={setSizeType:function(e){this.sizeType=e},setType:function(e){this.type=e},setImageUrl:function(e){e&&(this.imageUrl=e)},getImageUrl:function(){return this.imageUrl}}}},{key:"initImageInfoArray",value:function(e){for(var t,n=0,o=null;n<=2;)t=ut(e)||ut(e[n])?{type:0,size:0,width:0,height:0,url:""}:e[n],(o=new this._ImageInfoModel(t)).setSizeType(n+1),o.setType(n),this.addImageInfo(o),n++;this.updateAccessSideImageInfoArray()}},{key:"updateImageInfoArray",value:function(e){for(var t,n=this.content.imageInfoArray.length,o=0;o<n;o++)t=this.content.imageInfoArray[o],e[o].size&&(t.size=e[o].size),e[o].url&&t.setImageUrl(e[o].url),e[o].width&&(t.width=e[o].width),e[o].height&&(t.height=e[o].height)}},{key:"_autoFixUrl",value:function(){for(var e=this.content.imageInfoArray.length,t="",n="",o=["http","https"],i=null,s=0;s<e;s++)this.content.imageInfoArray[s].url&&""!==(i=this.content.imageInfoArray[s]).imageUrl&&(n=i.imageUrl.slice(0,i.imageUrl.indexOf("://")+1),t=i.imageUrl.slice(i.imageUrl.indexOf("://")+1),o.indexOf(n)<0&&(n="https:"),this.content.imageInfoArray[s].setImageUrl([n,t].join("")))}},{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateImageFormat",value:function(e){this.content.imageFormat=Re[e.toUpperCase()]||Re.UNKNOWN}},{key:"createImageDataASURLInWeb",value:function(e){void 0!==e&&0<e.files.length&&(this._imageMemoryURL=window.URL.createObjectURL(e.files[0]))}},{key:"createImageDataASURL",value:function(e){e&&e.url&&(this._imageMemoryURL=e.url)}},{key:"replaceImageInfo",value:function(e,t){this.content.imageInfoArray[t]instanceof this._ImageInfoModel||(this.content.imageInfoArray[t]=e)}},{key:"addImageInfo",value:function(e){3<=this.content.imageInfoArray.length||this.content.imageInfoArray.push(e)}},{key:"updateAccessSideImageInfoArray",value:function(){var e=this.content.imageInfoArray,t=void 0===(t=(n=e[0]).width)?0:t,n=void 0===(n=n.height)?0:n;0!==t&&0!==n&&(Rt(e),Object.assign(e[2],At({originWidth:t,originHeight:n,min:720})))}},{key:"sendable",value:function(){return 0!==this.content.imageInfoArray.length&&""!==this.content.imageInfoArray[0].imageUrl&&0!==this.content.imageInfoArray[0].size}}]);var ro=Po,co=(s(No,[{key:"sendable",value:function(){return null!==this.content}}]),No),uo=(s(Oo,[{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateAudioUrl",value:function(e){this.content.remoteAudioUrl=e}},{key:"sendable",value:function(){return""!==this.content.remoteAudioUrl}}]),Oo),lo={from:!0,groupID:!0,groupName:!0,to:!0},po=(s(Ro,[{key:"_initContent",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case"remarkInfo":case"memberExtraInfo":case"onlineMemberInfo":break;case"groupProfile":t.content.groupProfile={},t._initGroupProfile(e[n]);break;case"operatorInfo":t.content.operatorInfo={},t._initOperatorInfo(e[n]);break;case"memberInfoList":case"msgMemberInfo":t._updateMemberList(e[n]);break;case"memberNum":t.content[n]=e[n],t.content.memberCount=e[n];break;case"newGroupProfile":t.content.newGroupProfile={},t._initNewGroupProfile(e[n]);break;default:t.content[n]=e[n]}})),this.content.userIDList||(this.content.userIDList=[this.content.operatorID])}},{key:"_initGroupProfile",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];lo[o]&&(this.content.groupProfile[o]=e[o])}}},{key:"_initOperatorInfo",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];this.content.operatorInfo[o]=e[o]}}},{key:"_updateMemberList",value:function(e){Ve(this.content.memberList)?this.content.memberList=e:this.content.memberList.forEach((function(t){e.forEach((function(e){t.userID===e.userID&&Object.assign(t,e)}))}))}},{key:"_initNewGroupProfile",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];this.content.newGroupProfile[o]="muteAllMembers"!==o?e[o]:1===e[o]}}}]),Ro),ho={from:!0,groupID:!0,groupName:!0,to:!0,groupType:!0},fo=(s(Ao,[{key:"_initContent",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case"memberInfoList":break;case"remarkInfo":t.content.handleMessage=e[n];break;case"groupProfile":t.content.groupProfile={},t._initGroupProfile(e[n]);break;default:t.content[n]=e[n]}}))}},{key:"_initGroupProfile",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];ho[o]&&("groupName"===o?this.content.groupProfile.name=e[o]:this.content.groupProfile[o]=e[o])}}}]),Ao),go=(s(bo,[{key:"_getFileInfo",value:function(e){var t,n;return ut(e.fileName)||ut(e.fileSize)?(t=e.file.files[0],z&&(t.path&&-1!==t.path.indexOf(".")&&(n=t.path.slice(t.path.lastIndexOf(".")+1).toLowerCase(),t.type=n,t.name||(t.name="".concat(nt(999999),".").concat(n))),t.name||(t.type="",t.name=t.path.slice(t.path.lastIndexOf("/")+1).toLowerCase()),t.suffix&&(t.type=t.suffix),t.url||(t.url=t.path)),{size:t.size,name:t.name}):{size:e.fileSize,name:e.fileName}}},{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateFileUrl",value:function(e){this.content.fileUrl=e}},{key:"sendable",value:function(){return""!==this.content.fileUrl&&""!==this.content.fileName&&0!==this.content.fileSize}}]),bo),_o=(s(Lo,[{key:"setData",value:function(e){return this.content.data=e,this}},{key:"setDescription",value:function(e){return this.content.description=e,this}},{key:"setExtension",value:function(e){return this.content.extension=e,this}},{key:"sendable",value:function(){return 0!==this.content.data.length||0!==this.content.description.length||0!==this.content.extension.length}}]),Lo),mo=(s(ko,[{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateVideoUrl",value:function(e){e&&(this.content.remoteVideoUrl=e)}},{key:"updateSnapshotInfo",value:function(e){var t=e.snapshotUrl,n=e.snapshotWidth;e=e.snapshotHeight,Ve(t)||(this.content.thumbUrl=this.content.snapshotUrl=t),Ve(n)||(this.content.thumbWidth=this.content.snapshotWidth=Number(n)),Ve(e)||(this.content.thumbHeight=this.content.snapshotHeight=Number(e))}},{key:"sendable",value:function(){return""!==this.content.remoteVideoUrl}}]),ko),vo=(s(Do,[{key:"sendable",value:function(){return!0}}]),Do),yo=(s(Eo,[{key:"_patchRichMediaPayload",value:function(e,t){e===E.MSG_IMAGE?t.imageInfoArray.forEach((function(e){!e.imageUrl&&e.url&&(e.imageUrl=e.url,e.sizeType=e.type,1===e.type?e.type=0:3===e.type&&(e.type=1))})):e===E.MSG_VIDEO?!t.remoteVideoUrl&&t.videoUrl&&(t.remoteVideoUrl=t.videoUrl):e===E.MSG_AUDIO?!t.remoteAudioUrl&&t.url&&(t.remoteAudioUrl=t.url):e===E.MSG_FILE&&!t.fileUrl&&t.url&&(t.fileUrl=t.url,t.url=void 0)}},{key:"_updateRichMediaDownloadUrl",value:function(e,t,n,o,i){(n||o)&&(e===E.MSG_IMAGE?t.imageInfoArray.forEach((function(e){e.url=oo(e.url,n,o,i)})):e===E.MSG_VIDEO?(t.videoUrl=oo(t.videoUrl,n,o,i),t.snapshotUrl=oo(t.thumbUrl,n,o,i),t.snapshotHeight=t.thumbHeight,t.snapshotWidth=t.thumbWidth):e===E.MSG_AUDIO?t.url=oo(t.url,n,o,i):e===E.MSG_FILE&&(t.fileUrl=oo(t.fileUrl,n,o,i)))}}]),Eo),Io=(s(So,[{key:"sendable",value:function(){return!Ve(this.content.messageList)||!Ve(this.content.downloadKey)}}]),So),Mo={1:E.MSG_PRIORITY_HIGH,2:E.MSG_PRIORITY_NORMAL,3:E.MSG_PRIORITY_LOW,4:E.MSG_PRIORITY_LOWEST},Co=(s(To,[{key:"elements",get:function(){return this._elements}},{key:"getElements",value:function(){return this._elements}},{key:"extractGroupInfo",value:function(e){null!==e&&(ct(e.nick)&&(this.nick=e.nick),ct(e.avatar)&&(this.avatar=e.avatar),We(e=e.messageFromAccountExtraInformation))&&ct(e.nameCard)&&(this.nameCard=e.nameCard)}},{key:"handleGroupAtInfo",value:function(e){var t=this;e.payload&&e.payload.atUserList&&e.payload.atUserList.forEach((function(e){e!==E.MSG_AT_ALL?(t._groupAtInfoList.push({groupAtAllFlag:0,groupAtUserID:e}),t.atUserList.push(e)):(t._groupAtInfoList.push({groupAtAllFlag:1}),t.atUserList.push(E.MSG_AT_ALL))})),Ye(e.groupAtInfo)&&e.groupAtInfo.forEach((function(e){0===e.groupAtAllFlag?t.atUserList.push(e.groupAtUserID):1===e.groupAtAllFlag&&t.atUserList.push(E.MSG_AT_ALL)}))}},{key:"getGroupAtInfoList",value:function(){return this._groupAtInfoList}},{key:"_initProxy",value:function(){this._elements[0]&&(this.payload=this._elements[0].content,this.type=this._elements[0].type)}},{key:"reInitialize",value:function(e){e&&(this.status=this.from?Cn:Mn,!this.from)&&(this.from=e),this._initFlow(e),this._initSequence(e),this._concatConversationID(e),this.generateMessageID()}},{key:"isSendable",value:function(){return 0!==this._elements.length&&(!0===this._relayFlag||"function"==typeof this._elements[0].sendable&&this._elements[0].sendable())}},{key:"_initTo",value:function(e){this.conversationType===E.CONV_GROUP&&(this.to=e.groupID)}},{key:"_initSequence",value:function(e){var t,n,o;0===this.clientSequence&&e&&(this.clientSequence=!!e&&(void 0===gt[e]&&(t="3".concat((o=new Date).getHours()).slice(-2),n="0".concat(o.getMinutes()).slice(-2),o="0".concat(o.getSeconds()).slice(-2),gt[e]=parseInt([t,n,o,"0001"].join("")),o=n=t=null,Ae.l("autoIncrementIndex start index:".concat(gt[e]))),gt[e]++)),0===this.sequence&&this.conversationType===E.CONV_C2C&&(this.sequence=this.clientSequence)}},{key:"generateMessageID",value:function(){this.from===E.CONV_SYSTEM&&(this.senderTinyID="144115198244471703"),this.ID="".concat(this.senderTinyID,"-").concat(this.clientTime,"-").concat(this.random)}},{key:"_initFlow",value:function(e){""!==e&&(e===this.from?(this.flow="out",this.isRead=!0):this.flow="in")}},{key:"_concatConversationID",value:function(e){var t=this.to,n=this.conversationType;n!==E.CONV_SYSTEM?(e=n===E.CONV_C2C?e===this.from?t:this.from:this.to,this.conversationID=e?"".concat(n).concat(e):null):this.conversationID=E.CONV_SYSTEM}},{key:"isElement",value:function(e){return e instanceof Zn||e instanceof ro||e instanceof co||e instanceof uo||e instanceof go||e instanceof mo||e instanceof po||e instanceof fo||e instanceof _o||e instanceof vo||e instanceof Io}},{key:"setElement",value:function(e,t,n,o){var i=this;if(this.isElement(e))this._elements=[e];else{var s=function(e){if(e.type&&e.content)switch(e.type){case E.MSG_TEXT:i.setTextElement(e.content);break;case E.MSG_IMAGE:i.setImageElement(e.content,t,n,o);break;case E.MSG_AUDIO:i.setAudioElement(e.content,t,n,o);break;case E.MSG_FILE:i.setFileElement(e.content,t,n,o);break;case E.MSG_VIDEO:i.setVideoElement(e.content,t,n,o);break;case E.MSG_CUSTOM:i.setCustomElement(e.content);break;case E.MSG_LOCATION:i.setLocationElement(e.content);break;case E.MSG_GRP_TIP:i.setGroupTipElement(e.content);break;case E.MSG_GRP_SYS_NOTICE:i.setGroupSystemNoticeElement(e.content);break;case E.MSG_FACE:i.setFaceElement(e.content);break;case E.MSG_MERGER:i.setMergerElement(e.content,t,n,o)}};if(Ye(e))for(var a=0;a<e.length;a++)s(e[a]);else s(e)}this._initProxy()}},{key:"clearElement",value:function(){this._elements.length=0}},{key:"setTextElement",value:function(e){e="string"==typeof e?e:e.text,e=new Zn({text:e}),this._elements.push(e)}},{key:"setImageElement",value:function(e,t,n,o){e=new ro(e,t,n,o),this._elements.push(e)}},{key:"setAudioElement",value:function(e,t,n,o){e=new uo(e,t,n,o),this._elements.push(e)}},{key:"setFileElement",value:function(e,t,n,o){e=new go(e,t,n,o),this._elements.push(e)}},{key:"setVideoElement",value:function(e,t,n,o){e=new mo(e,t,n,o),this._elements.push(e)}},{key:"setLocationElement",value:function(e){e=new vo(e),this._elements.push(e)}},{key:"setCustomElement",value:function(e){e=new _o(e),this._elements.push(e)}},{key:"setGroupTipElement",value:function(e){var t,n={},o=e.operationType;Ve(e.memberInfoList)?e.operatorInfo&&(n=e.operatorInfo):o!==E.GRP_TIP_MBR_JOIN&&o!==E.GRP_TIP_MBR_KICKED_OUT&&o!==E.GRP_TIP_MBR_SET_ADMIN&&o!==E.GRP_TIP_MBR_CANCELED_ADMIN||(n=e.memberInfoList[0]),Ve(e.memberExtraInfo)||(t=e.memberExtraInfo.reason,e.msgMemberInfo.forEach((function(e){e.reason=t}))),o=n.nick,n=n.avatar,ct(o)&&(this.nick=o),ct(n)&&(this.avatar=n),o=new po(e),this._elements.push(o)}},{key:"setGroupSystemNoticeElement",value:function(e){e=new fo(e),this._elements.push(e)}},{key:"setFaceElement",value:function(e){e=new co(e),this._elements.push(e)}},{key:"setMergerElement",value:function(e,t,n,o){e=new Io(e,t,n,o),this._elements.push(e)}},{key:"setIsRead",value:function(e){this.isRead=e}},{key:"setRelayFlag",value:function(e){this._relayFlag=e}},{key:"_computePriority",value:function(e){if(!ut(e)){if(ct(e)&&-1!==Object.values(Mo).indexOf(e))return e;if(je(e)&&(e=""+e,-1!==Object.keys(Mo).indexOf(e)))return Mo[e]}return E.MSG_PRIORITY_NORMAL}},{key:"setNickAndAvatar",value:function(e){var t=e.nick;e=e.avatar,ct(t)&&(this.nick=t),ct(e)&&(this.avatar=e)}},{key:"setNameCard",value:function(e){ct(e)&&(this.nameCard=e)}},{key:"initC2CReadReceiptInfo",value:function(e){var t=e.readReceiptSentByPeer;e=void 0===(e=e.timestamp)?0:e,this.conversationType===E.CONV_C2C&&!0===this.needReadReceipt&&(this.readReceiptInfo.isPeerRead=1===(void 0===t?void 0:t),this.readReceiptInfo.timestamp=e)}}]),To);function To(e){o(this,To),this.ID="",this.conversationID=e.conversationID||null,this.conversationType=e.conversationType||E.CONV_C2C,this.conversationSubType=e.conversationSubType,this.time=e.time||Math.ceil(Date.now()/1e3),this.sequence=e.sequence||0,this.clientSequence=e.clientSequence||e.sequence||0,this.random=e.random||0===e.random?e.random:nt(),this.priority=this._computePriority(e.priority),this.nick=e.nick||"",this.avatar=e.avatar||"",this.isPeerRead=!1,this.nameCard="",this.hasRiskContent=jt(e.checkResult),this._elements=[],this.isPlaceMessage=e.isPlaceMessage||0,this.isRevoked=2===e.isPlaceMessage||8===e.msgFlagBits,this.from=e.from||null,this.to=e.to||null,this.flow="",this.isSystemMessage=e.isSystemMessage||!1,this.protocol=e.protocol||"JSON",this.isResend=!1,this.isRead=!1,this.status=e.status||Cn,this._onlineOnlyFlag=!1,this._groupAtInfoList=[],this._relayFlag=!1,this.atUserList=[],this.cloudCustomData=e.cloudCustomData||"",this.isDeleted=!1,this.isModified=!!e.messageVersion,this._isExcludedFromUnreadCount=!(!e.messageControlInfo||1!==e.messageControlInfo.excludedFromUnreadCount),this._isExcludedFromLastMessage=!(!e.messageControlInfo||1!==e.messageControlInfo.excludedFromLastMessage),this.clientTime=e.clientTime||Te()||0,this.senderTinyID=e.senderTinyID||e.tinyID||"",this.readReceiptInfo=e.readReceiptInfo||{readCount:void 0,unreadCount:void 0,isPeerRead:void 0,timestamp:0},this.needReadReceipt=!0===e.needReadReceipt||1===e.needReadReceipt,this.version=e.messageVersion||0,this.isBroadcastMessage=e.isBroadcastMessage||!1,this._receiverList=e.receiverList||void 0,this.isSupportExtension=!0===e.isSupportExtension||1===e.isSupportExtension,this._cmConfigID=e.customModerationConfigurationID,this.revoker=e.revokerInfo&&e.revokerInfo.revoker||"",this.revokerInfo=e.revokerInfo||{userID:"",nick:"",avatar:""},this.revokeReason=e.revokeReason||"",this.reInitialize(e.currentUser),this.extractGroupInfo(e.groupProfile||null),this.handleGroupAtInfo(e),this.initC2CReadReceiptInfo(e)}function So(e,t,n,i){var s,a,r,c,u,l,d;o(this,So),this.type=E.MSG_MERGER,this.content={downloadKey:"",pbDownloadKey:"",messageList:[],title:"",abstractList:[],compatibleText:"",version:0,layersOverLimit:!1},e.downloadKey?(a=e.downloadKey,r=e.pbDownloadKey,c=e.title,u=e.abstractList,l=e.compatibleText,s=e.version,this.content.downloadKey=a,this.content.pbDownloadKey=r,this.content.title=c,this.content.abstractList=u,this.content.compatibleText=l,this.content.version=s||0):Ve(e.messageList)?1===e.layersOverLimit&&(this.content.layersOverLimit=!0):(a=e.messageList,r=e.title,c=e.abstractList,u=e.compatibleText,l=e.version,d=[],a.forEach((function(e){Ve(e)||(e=new yo(e,t,n,i),d.push(e))})),this.content.messageList=d,this.content.title=r,this.content.abstractList=c,this.content.compatibleText=u,this.content.version=l||0)}function Eo(e,t,n,i){var s,a;o(this,Eo),this.from=e.from,this.messageSender=e.from,this.time=e.time,this.messageSequence=e.sequence,this.clientSequence=e.clientSequence||e.sequence,this.messageRandom=e.random,this.cloudCustomData=e.cloudCustomData||"",this.clientTime=e.clientTime||void 0,e.ID?(this.ID=e.ID||"",this.nick=e.nick||"",this.avatar=e.avatar||"",e.messageBody?this.messageBody=JSON.parse(JSON.stringify(e.messageBody)):this.messageBody=[{type:e.type,payload:e.payload}],e.conversationType?e.conversationType.startsWith(E.CONV_C2C)?this.receiverUserID=e.to:e.conversationType.startsWith(E.CONV_GROUP)&&(this.receiverGroupID=e.to):e.receiverGroupID?this.receiverGroupID=e.receiverGroupID:e.receiverUserID&&(this.receiverUserID=e.receiverUserID),this.messageReceiver=e.to||e.messageReceiver):(this.nick=e.nick||"",this.avatar=e.avatar||"",this.messageBody=[],s=e.elements[0].type,a=e.elements[0].content,this._patchRichMediaPayload(s,a),this._updateRichMediaDownloadUrl(s,a,t,n,i),s===E.MSG_MERGER?this.messageBody.push({type:s,payload:new Io(a,t,n,i).content}):this.messageBody.push({type:s,payload:a}),e.groupID&&(this.receiverGroupID=e.groupID,this.messageReceiver=e.groupID),e.to&&(this.receiverUserID=e.to,this.messageReceiver=e.to),this.ID="".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random))}function Do(e){o(this,Do),this.type=E.MSG_LOCATION;var t=e.description,n=e.longitude;e=e.latitude,this.content={description:t,longitude:n,latitude:e}}function ko(e,t,n,i){o(this,ko),this.type=E.MSG_VIDEO,this._percent=0,this.content={remoteVideoUrl:e.remoteVideoUrl||e.videoUrl||"",videoFormat:e.videoFormat,videoSecond:parseInt(e.videoSecond,10),videoSize:e.videoSize,videoUrl:oo(e.videoUrl,t,n,i),videoDownloadFlag:2,videoUUID:e.videoUUID,thumbUUID:e.thumbUUID,thumbFormat:e.thumbFormat,thumbWidth:e.thumbWidth,snapshotWidth:e.thumbWidth,thumbHeight:e.thumbHeight,snapshotHeight:e.thumbHeight,thumbSize:e.thumbSize,snapshotSize:e.thumbSize,thumbDownloadFlag:2,thumbUrl:oo(e.thumbUrl,t,n,i),snapshotUrl:oo(e.thumbUrl,t,n,i)}}function Lo(e){o(this,Lo),this.type=E.MSG_CUSTOM,this.content={data:e.data||"",description:e.description||"",extension:e.extension||""}}function bo(e,t,n,i){o(this,bo),this.type=E.MSG_FILE,this._percent=0;var s=this._getFileInfo(e);this.content={downloadFlag:2,fileUrl:oo(e.url||e.fileUrl,t,n,i)||"",uuid:e.uuid,fileName:s.name||"",fileSize:s.size||0}}function Ao(e){o(this,Ao),this.type=E.MSG_GRP_SYS_NOTICE,this.content={},this._initContent(e)}function Ro(e){o(this,Ro),this.type=E.MSG_GRP_TIP,this.content={},this._initContent(e)}function Oo(e,t,n,i){o(this,Oo),this.type=E.MSG_AUDIO,this._percent=0,this.content={downloadFlag:2,second:e.second,size:e.size,url:oo(e.url,t,n,i),remoteAudioUrl:e.url||"",uuid:e.uuid}}function No(e){o(this,No),this.type=E.MSG_FACE,this.content=e||null}function Po(e,t,n,i){o(this,Po),this._imageMemoryURL="",this._fileDownloadProxy=t,this._authKey=n,this._fileDNList=i,Z||ee?this.createImageDataASURL(e.file):this.createImageDataASURLInWeb(e.file),this._initImageInfoModel(),this.type=E.MSG_IMAGE,this._percent=0,this.content={imageFormat:e.imageFormat||Re.UNKNOWN,uuid:e.uuid,imageInfoArray:[]},this.initImageInfoArray(e.imageInfoArray),this._autoFixUrl()}function wo(e){if(We(e))return{pushFlag:!0===e.disablePush?1:0,title:e.title||"",desc:e.description||"",ext:e.extension||"",apnsInfo:(o=void 0===(o=(n=e).apnsInfo)?{}:o,i=n.ignoreIOSBadge,n=n.disableVoipPush,i=!0===o.ignoreIOSBadge||!0===(void 0!==i&&i)?1:0,s=void 0,ut(n)||(s=!1===n?1:0),ut(o.disableVoipPush)||(s=!1===o.disableVoipPush?1:0),t(t({},o),{},{badgeMode:i,isVoipPush:s})),androidInfo:(o=void 0===(o=(n=e).androidInfo)?{}:o,n=n.androidOPPOChannelID,n=o.OPPOChannelID||(void 0===n?"":n),t(t({},o),{},{Sound:-1===(s=(i=o.sound||"").lastIndexOf("."))?i:i.slice(0,s),OPPOChannelID:n,GoogleChannelID:o.FCMChannelID||""}))};var n,o,i,s}r(Vo,bn),Go=g(Vo),s(Vo,[{key:"onNewMessage",value:function(e){var t=e.dataList,n=e.isInstantMessage,o=e.C2CRemainingUnreadList,i=e.C2CPairUnreadList,s=(e=e.isSyncingEnded,o=(n||Ae.l("".concat(this._n,".onNewMessage C2CPairUnreadList:"),i,"C2CRemainingUnreadList:",o),t=this._assembly({dataList:t,C2CRemainingUnreadList:o,C2CPairUnreadList:i,isInstantMessage:n})).conversationOptionsList,i=t.messageList,t=t.isUnreadC2CMessage,0<(s=mt(i)).length&&this.emitOEvt(S.MESSAGE_MODIFIED,s),this.get(11).onNewMessage({conversationOptionsList:o,isInstantMessage:n,isUnreadC2CMessage:t,isSyncingEnded:e}),vt(i));n&&0<s.length&&this.emitOEvt(S.MESSAGE_RECEIVED,s),i.length=0}},{key:"_assembly",value:function(e){for(var t=e.dataList,n=e.C2CRemainingUnreadList,o=e.C2CPairUnreadList,i=e.isInstantMessage,s=null,a=[],r=[],c={},u=this.get(26),l=!1,d=this.get(11),p=this.get(4),h=(e=this.get(17),this.getFileDownloadProxy()),f=this.getDowloadFileAuthKey(),g=e.getFileDNList(),_=0,m=t.length;_<m;_++)if(this._isC2CNotice(t[_]))this._noticeFromUnreadDBList.push(t[_].eventArray[0].c2CNotifyMsgArray[0]);else{var v=t[_],y=(v.currentUser=this.getMyUserID(),v.conversationType=E.CONV_C2C,v.isSystemMessage=!!v.isSystemMessage,(ut(v.nick)||ut(v.avatar))&&(l=!0),(s=new Co(v)).setElement(v.elements,h,f,g),s.setNickAndAvatar({nick:v.nick,avatar:v.avatar}),s.conversationID);if(i){if(this._msgFromUnreadDBMap.get(s.ID))continue;var I,M,C=!1,T=(s.from!==this.getMyUserID()?(M=d.getLatestMessageSentByPeer(y))&&(I=M.nick,M=M.avatar,l?s.setNickAndAvatar({nick:I,avatar:M}):I===s.nick&&M===s.avatar||(C=!0)):(I=d.getLatestMessageSentByMe(y))&&(M=I.nick,T=I.avatar,M===s.nick&&T===s.avatar||(d.modifyMessageSentByMe({conversationID:y,latestNick:s.nick,latestAvatar:s.avatar}),p.mockOnNickAvatarModified(s.nick,s.avatar))),1===t[_].isModified);if(d.isMessageSentByCurrentInstance(s)?s.isModified=T:T=!1,0===v.msgLifeTime)s._onlineOnlyFlag=!0,d.isMessageSentByCurrentInstance(s)||r.push(s);else{if(!d.pushIntoMessageList(r,s,T))continue;C&&(d.modifyMessageSentByPeer({conversationID:y,latestNick:s.nick,latestAvatar:s.avatar}),d.updateUserProfileSpecifiedKey({conversationID:y,nick:s.nick,avatar:s.avatar}))}i&&0<s.clientTime&&u.addMessageDelay(s.clientTime)}else this._msgFromUnreadDBMap.set(s.ID,s);if(0!==v.msgLifeTime){if(!1===s._onlineOnlyFlag){if(je(C=d.getLastMessageTime(y))&&s.time<C)continue;i&&(ut(c[y])?(v=0,"in"!==s.flow||s._isExcludedFromUnreadCount||(v=1),c[y]=a.push({conversationID:y,unreadCount:v,type:s.conversationType,subType:s.conversationSubType,lastMessage:s._isExcludedFromLastMessage?"":s})-1):(v=c[y],a[v].type=s.conversationType,a[v].subType=s.conversationSubType,a[v].lastMessage=s._isExcludedFromLastMessage?"":s,"in"!==s.flow||s._isExcludedFromUnreadCount||a[v].unreadCount++))}}else s._onlineOnlyFlag=!0}this._handleNoticeFromUnreadDB();var S=!1;if(Ye(o)&&0<o.length)for(var D=0,k=o.length;D<k;D++)!function(e){if(o[e].from!==E.CONV_SYSTEM){S=!0;var t=a.find((function(t){return t.conversationID==="".concat(E.CONV_C2C).concat(o[e].from)}));t?t.unreadCount=o[e].unreadCount:a.push({conversationID:"".concat(E.CONV_C2C).concat(o[e].from),unreadCount:o[e].unreadCount,type:E.CONV_C2C})}}(D);if(Ye(n))for(var L=0,b=n.length;L<b;L++)!function(e){a.find((function(t){return t.conversationID==="".concat(E.CONV_C2C).concat(n[e].from)}))||a.push({conversationID:"".concat(E.CONV_C2C).concat(n[e].from),type:E.CONV_C2C,lastMsgTime:n[e].lastMsgTime})}(L);return{conversationOptionsList:a,messageList:r,isUnreadC2CMessage:S}}},{key:"getMessageListFromUnreadDB",value:function(){return m(this._msgFromUnreadDBMap.values())}},{key:"_isC2CNotice",value:function(e){return!(!Ye(e=e.eventArray)||10!==e[0].event)}},{key:"_handleNoticeFromUnreadDB",value:function(){var e,t=this._noticeFromUnreadDBList.length;0!==t&&(Ae.l("".concat(this._n,"._handleNoticeFromUnreadDB count:").concat(t)),e=[],this._noticeFromUnreadDBList.forEach((function(t){t.hasOwnProperty("c2cMessageRevokedNotify")&&e.push(t)})),this.onMsgRevoked({dataList:e}),this._noticeFromUnreadDBList.length=0,e.length=0)}},{key:"onMsgRevoked",value:function(e){var t,n=this,o=this.get(11),i=[];e.dataList.forEach((function(e){e.c2cMessageRevokedNotify&&(e=e.c2cMessageRevokedNotify.revokedInfos,ut(e)||e.forEach((function(e){var s=n.getMyUserID()===e.from?"".concat(E.CONV_C2C).concat(e.to):"".concat(E.CONV_C2C).concat(e.from);t=o.revoke(s,e.sequence,e.random);var a,r=e.revokerInfo&&e.revokerInfo.revoker,c=e.revokerInfo&&e.revokerInfo.reason||"";t?a=t:(a={conversationID:s,sequence:e.sequence},e.tinyID&&e.clientTime&&e.random&&(a.ID="".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random)),e.time&&(a.time=e.time)),a&&(a.revoker=r,a.revokeReason=c,a.revokerInfo={userID:r,nick:"",avatar:""},i.push(a))})))})),0!==i.length&&(o.onMessageRevoked(i),Ae.l("".concat(this._n,".onMsgRevoked count:").concat(i.length)),o.updateRevokerInfo(i).then((function(e){n.emitOEvt(S.MESSAGE_REVOKED,e)})))}},{key:"onMsgReadReceipt",value:function(e){var t=this;e.dataList.forEach((function(e){var n;Ve(e.c2cMessageReadReceipt)||(n=e.c2cMessageReadReceipt.to,e.c2cMessageReadReceipt.uinPairReadArray.forEach((function(e){e=e.peerReadTime;var o=(Ae.l("".concat(t._n,".onMsgReadReceipt to:").concat(n," peerReadTime:").concat(e)),"".concat(E.CONV_C2C).concat(n)),i=t.get(11);i.recordPeerReadTime(o,e),i.updateMsgIsPeerReadProp(o,e)})))}))}},{key:"onMsgReadNotice",value:function(e){var t=this;e.dataList.forEach((function(e){var n;Ve(e.c2cMessageReadNotice)||(n=t.get(11),e.c2cMessageReadNotice.uinPairReadArray.forEach((function(e){var o=e.from;e=e.peerReadTime,Ae.l("".concat(t._n,".onMsgReadNotice from:").concat(o," lastReadTime:").concat(e)),o="".concat(E.CONV_C2C).concat(o),n.updateIsReadAfterReadReport({conversationID:o,lastMessageTime:e}),n.updateUnreadCount(o)})))}))}},{key:"onMsgModified",value:function(e){Ae.l("".concat(this._n,".onMsgModified options:"),e);var n=this.get(11);e.dataList.forEach((function(e){n.onMessageModified(t(t({},e),{},{conversationType:E.CONV_C2C}))}))}},{key:"onReadReceiptList",value:function(e){Ae.l("".concat(this._n,".onReadReceiptList options:"),e),this.get(11).updateReadReceiptInfo(e.dataList)}},{key:"sendMessage",value:function(e,t){return e=this._createC2CMessagePack(e,t),this.req(e)}},{key:"_createC2CMessagePack",value:function(e,t){var n=null,o=(t&&(t.offlinePushInfo&&(n=t.offlinePushInfo),!0===t.onlineUserOnly)&&(n?n.disablePush=!0:n={disablePush:!0}),""),i=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(o=e.cloudCustomData),[]),s=(We(t)&&We(t.messageControlInfo)&&(s=(r=t.messageControlInfo).excludedFromUnreadCount,a=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===s&&i.push("NoUnread"),!0===a&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck"),this.isOnlineMessage(e,t)?0:void 0),a=JSON.parse(JSON.stringify(e.getElements())),r=this.get(17).getFileDNList();return{P:Gn.SEND_C2C_MSG,data:{fromAccount:this.getMyUserID(),toAccount:e.to,msgBody:io(e.type,a,r),cloudCustomData:o,msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:s,nick:e.nick,avatar:e.avatar,offlinePushInfo:wo(n),messageControlInfo:0!==s?i:void 0,clientTime:e.clientTime,needReadReceipt:!0===e.needReadReceipt?1:0,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0,cmConfigID:e._cmConfigID}}}},{key:"isOnlineMessage",value:function(e,t){return!(!t||!0!==t.onlineUserOnly)}},{key:"revokeMessage",value:function(e){return this.req({P:Gn.REVOKE_C2C_MSG,data:{msgInfo:{fromAccount:e.from,toAccount:e.to,msgSeq:e.sequence,msgRandom:e.random,msgTimeStamp:e.time}}})}},{key:"deleteMessage",value:function(e){var t=e.to;return e=e.keyList,Ae.l("".concat(this._n,".deleteMessage toAccount:").concat(t," count:").concat(e.length)),this.req({P:Gn.DEL_C2C_MSG,data:{fromAccount:this.getMyUserID(),to:t,keyList:e}})}},{key:"modifyRemoteMessage",value:function(e){var t=e.from,n=e.to,o=void 0===(o=e.version)?0:o,i=e.sequence,s=e.random,a=e.time,r=e.payload,c=e.type,u=e.cloudCustomData,l=void(e=e._elements);return xt(c)&&(1<e.length&&e.splice(0,1,{type:c,content:r}),l=e),this.req({P:Gn.MODIFY_C2C_MSG,data:{from:t,to:n,version:o,sequence:i,random:s,time:a,elements:l,cloudCustomData:u}})}},{key:"setMessageRead",value:function(e){var t=this,n=e.conversationID,o=e.lastMessageTime,i="".concat(this._n,".").concat("setMessageRead"),s=(e="convID:".concat(n," lastMessageTime:").concat(o),Ae.l("".concat(i," ").concat(e)),je(o)||this.warn("DoNotModifyLastTime"),new Jn("setMessageRead"));return s.setMessage(e),this.req({P:Gn.SET_C2C_MSG_READ,data:{C2CMsgReaded:{cookie:"",C2CMsgReadedItem:[{toAccount:n.replace("C2C",""),lastMessageTime:o,receipt:1}]}}}).then((function(){s.end(),Ae.l("".concat(i," ok"));var e=t.get(11);return e.updateIsReadAfterReadReport({conversationID:n,lastMessageTime:o}),e.updateUnreadCount(n),mn()})).catch((function(e){return s.setError(e).end(),Ae.l("".concat(i," failed. error:"),e),yn(e)}))}},{key:"getRoamingMessage",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessage"),o=e.peerAccount,i=e.conversationID,s=e.count,a=e.lastMessageTime,r=(e=e.messageKey,"peerAccount:".concat(o," count:").concat(s||15," lastMessageTime:").concat(a||0," messageKey:").concat(e)),c=(Ae.l("".concat(n," ").concat(r)),new Jn("getRoamingMessage"));return this.req({P:Gn.GET_C2C_ROAMING_MSG,data:{peerAccount:o,count:s||15,lastMessageTime:a||0,messageKey:e}}).then((function(e){var o=(e=e.data).complete,s=e.messageList,a=e.messageKey,u=(e=e.lastMessageTime,ut(s)?Ae.l("".concat(n," ok. complete:").concat(o," but messageList is undefined!")):Ae.l("".concat(n," ok. complete:").concat(o," count:").concat(s.length)),c.setMessage("".concat(r," complete:").concat(o," length:").concat(s.length)).end(),t.get(11)),l=((o=1===o)&&u.setCompleted(i),[]);return s=u.onRoamingMessage(s,i,!0,l),u.modifyMessageList(i),u.updateIsRead(i),u.updateRoamingMsgKeyAndTime(i,a,e),a=u.getPeerReadTime(i),Ae.l("".concat(n," update isPeerRead property. convID:").concat(i," peerReadTime:").concat(a)),a?u.updateMsgIsPeerReadProp(i,a):(e=i.replace(E.CONV_C2C,""),t.getRemotePeerReadTime([e]).then((function(){u.updateMsgIsPeerReadProp(i,u.getPeerReadTime(i))}))),a="",0<s.length?a=s[0].ID:(e=u.getLocalOldestMessage(i))&&(a=e.ID),Ae.l("".concat(n," nextReqID:").concat(a," storedMsgCount:").concat(s.length)),{nextReqID:a,storedMessageList:s,assembledMessageList:l,isPullingCompleted:o}})).catch((function(e){return c.setMessage(r).setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))}},{key:"getRoamingMessagesHopping",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessagesHopping"),o=e.peerAccount,i=void 0===(i=e.time)?0:i,s=e.count,a=e.direction,r="".concat(E.CONV_C2C).concat(o),c="peerAccount:".concat(o," count:").concat(s," time:").concat(i," direction:").concat(a),u=(Ae.l("".concat(n," ").concat(c)),new Jn("getRoamingMessagesHopping"));return this.req({P:Gn.GET_C2C_ROAMING_MSG,data:{peerAccount:o,count:s+1,lastMessageTime:i,direction:a}}).then((function(e){var o=(e=e.data).complete,i=void 0===(i=e.messageList)?[]:i,s=(e=e.lastMessageTime,"complete:".concat(o," count:").concat(i.length)),l=(Ae.l("".concat(n," ok. ").concat(s)),u.setMessage("".concat(c," ").concat(s)).end(),1!==o&&(1===a?i.pop():i.shift()),t.get(11));return s=l.onRoamingMessage(i,r,!1),t._modifyMessageList(r,s),i=t._computeResult({complete:o,lastMessageTime:e,resultList:s}),l.storeHoppingMessageList(i.messageList),o=l.getPeerReadTime(r),Ae.l("".concat(n," update isPeerRead property. convID:").concat(r," peerReadTime:").concat(o)),o?l.updateMsgIsPeerReadProp(r,o):(e=r.replace(E.CONV_C2C,""),t.getRemotePeerReadTime([e]).then((function(){l.updateMsgIsPeerReadProp(r,l.getPeerReadTime(r))}))),mn(i)})).catch((function(e){return u.setMessage(c).setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_computeResult",value:function(e){var t=void 0===(t=e.complete)?0:t,n=e.lastMessageTime;return e={messageList:m(void 0===(e=e.resultList)?[]:e),isCompleted:!1,nextMessageTime:""},1===t?e.isCompleted=!0:e.nextMessageTime=n,e}},{key:"_modifyMessageList",value:function(e,t){if(e=this.get(11).getLocalConversation(e))for(var n=e.userProfile.nick,o=e.userProfile.avatar,i=(e=this.get(4).getNickAndAvatarByUserID(this.getMyUserID())).nick,s=e.avatar,a=t.length-1;0<=a;a--){var r=t[a];"in"===r.flow&&(r.nick!==n&&r.setNickAndAvatar({nick:n}),r.avatar!==o)&&r.setNickAndAvatar({avatar:o}),"out"===r.flow&&(r.nick!==i&&r.setNickAndAvatar({nick:i}),r.avatar!==s)&&r.setNickAndAvatar({avatar:s})}}},{key:"getRemotePeerReadTime",value:function(e){var t,n=this,o="".concat(this._n,".").concat("getRemotePeerReadTime");return Ve(e)?Promise.resolve():(t=new Jn("getRemotePeerReadTime"),Ae.l("".concat(o," userIDList:").concat(e)),this.req({P:Gn.GET_C2C_PEER_READ_TIME,data:{userIDList:e}}).then((function(i){var s=i.data.peerReadTimeList;Ae.l("".concat(o," ok. peerReadTimeList:").concat(s));for(var a="",r=n.get(11),c=0;c<e.length;c++)a+="".concat(e[c],"-").concat(s[c]," "),0<s[c]&&r.recordPeerReadTime("".concat(E.CONV_C2C).concat(e[c]),s[c]);t.setMessage(a).end()})).catch((function(e){t.setError(e).end(),Ae.w("".concat(o," failed. error:"),e)})))}},{key:"sendReadReceipt",value:function(e){var t,n=e[0].conversationID.replace(E.CONV_C2C,""),o=new Jn("sendReadReceipt"),i=(o.setMessage("peerAccount:".concat(n)),this.getMyUserID());return 0===(e=e.filter((function(e){return e.from!==i&&!0===e.needReadReceipt})).map((function(e){return{fromAccount:e.from,toAccount:e.to,sequence:e.sequence,random:e.random,time:e.time,clientTime:e.clientTime}}))).length?yn({code:Pn.READ_RECEIPT_MSG_LIST_EMPTY}):(t="".concat(this._n,".").concat("sendReadReceipt"),Ae.l("".concat(t,". peerAccount:").concat(n," length:").concat(e.length)),this.req({P:Gn.SEND_C2C_READ_RECEIPT,data:{peerAccount:n,messageInfoList:e}}).then((function(e){return o.end(),Ae.l("".concat(t," ok")),mn()})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)})))}},{key:"getReadReceiptList",value:function(e){var t=e[0].conversationID.replace(E.CONV_C2C,"");return Ae.l("".concat(this._n,".getReadReceiptList peerAccount:").concat(t," msgCount:").concat(e.length)),vn({messageList:e})}},{key:"getMessageExtensions",value:function(e,t){return Ae.l("".concat(this._n,".getMessageExtensions startSequence:").concat(t)),this.req({P:Gn.GET_C2C_MSG_EXT,data:{from:e.from,to:e.to,messageKey:this.getMessageKey(e),startSequence:t}})}},{key:"modifyMsgExts",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return Ae.l("".concat(this._n,".modifyMsgExts operateType:").concat(n)),this.req({P:Gn.MODIFY_C2C_MSG_EXT,data:{from:e.from,to:e.to,messageKey:this.getMessageKey(e),extensionList:t,operateType:n}})}},{key:"getMessageKey",value:function(e){var t=e.clientSequence,n=e.random;return e=e.time,"".concat(t,"_").concat(n,"_").concat(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._msgFromUnreadDBMap.clear(),this._noticeFromUnreadDBList.length=0}}]);var Go,Uo=Vo,xo={A2KEY_AND_TINYID_UPDATED:"_inner".concat(1),CLOUD_CONFIG:"_inner".concat(2),PROFILE_UPDATED:"_inner".concat(3),CONV_SYNC_COMPLETED:"_inner".concat(4),C2C_UNREAD_HANDLE_COMPLETED:"_inner".concat(5)},Fo=(s(qo,[{key:"_onCloudConfig",value:function(){var e=this._convM.getCloudConfig("topic_msg_limit");ut(e)||(this.TOPIC_MSG_LIMIT=Number(e)),Ae.l("".concat(this._n,"._onCloudConfig topicMsgLimit:").concat(this.TOPIC_MSG_LIMIT))}},{key:"onCheckTimer",value:function(e){if(e%20==0&&0<this._map.size){var t,n=T(this._map);try{for(n.s();!(t=n.n()).done;){var o=_(t.value,2),i=o[0],s=o[1];i.includes(Fe)&&s.size>=this.TOPIC_MSG_LIMIT&&this._convM.clearMemMsg(i,!0)}}catch(a){n.e(a)}finally{n.f()}}}},{key:"pushIn",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=e.conversationID,o=!0,i=(this._map.has(n)||this._map.set(n,new Map),this._getUniqueIDOfMsg(e));if(this._map.get(n).has(i)){var s=this._map.get(n).get(i);if(!t||!0===s.isModified)return!1}return this._map.get(n).set(i,e),this._setLatestMsgSentByPeer(n,e),this._setLatestMsgSentByMe(n,e),o}},{key:"unshift",value:function(e,t){var n;if(Ye(e)?0<e.length&&(n=e[0].conversationID,this._unshiftMultipleMsgs(e,t)):(n=e.conversationID,this._unshiftSingleMsg(e,t)),n){var o=Array.from(this._map.get(n).values());if(0!==(e=o.length)){for(var i=e-1;0<=i;i--)if("out"===o[i].flow){this._setLatestMsgSentByMe(n,o[i]);break}if(n.startsWith(E.CONV_C2C))for(var s=e-1;0<=s;s--)if("in"===o[s].flow){this._setLatestMsgSentByPeer(n,o[s]);break}}}}},{key:"_unshiftSingleMsg",value:function(e,t){var n,o,i=e.conversationID,s=this._getUniqueIDOfMsg(e);this._map.has(i)?(n=this._map.get(i),o=Array.from(n),n.has(s)||(o.unshift([s,e]),this._map.set(i,new Map(o)),t.push(e))):(this._map.set(i,new Map),this._map.get(i).set(s,e),t.push(e))}},{key:"_unshiftMultipleMsgs",value:function(e,t){for(var n=e.length,o=[],i=e[0].conversationID,s=this._map.get(i),a=this._map.has(i)?Array.from(s):[],r=0;r<n;r++){var c=this._getUniqueIDOfMsg(e[r]);s&&s.has(c)||(o.push([c,e[r]]),t.push(e[r]))}this._map.set(i,new Map(o.concat(a)))}},{key:"remove",value:function(e){var t=e.conversationID;e=this._getUniqueIDOfMsg(e),this._map.has(t)&&this._map.get(t).delete(e)}},{key:"revoke",value:function(e,t,n){var o;return this._map.has(e)?(o=this._map.get(e),this._updateMsgIsRevoked(o,t,n)):this._hoppingMsgMap.has(e)?(o=this._hoppingMsgMap.get(e),this._updateMsgIsRevoked(o,t,n)):null}},{key:"_updateMsgIsRevoked",value:function(e,t,n){var o,i=T(e);try{for(i.s();!(o=i.n()).done;){var s=_(o.value,2)[1];if(s.sequence===t&&(ut(n)||s.random===n))return s.isRevoked||(s.isRevoked=!0),s}}catch(a){i.e(a)}finally{i.f()}}},{key:"removeByConvID",value:function(e){var t=this._map.has(e);Ae.l("".concat(this._n,".removeByConvID convID:").concat(e," has:").concat(t)),t&&(this._map.delete(e),this._latestMsgSentByPeerMap.delete(e),this._latestMsgSentByMeMap.delete(e))}},{key:"findMessage",value:function(e){return this._findMsg(e,this._map)||this._findMsg(e,this._hoppingMsgMap)}},{key:"_findMsg",value:function(e,t){var n,o=null,i=T(t);try{for(i.s();!(n=i.n()).done;)for(var s=m(_(n.value,2)[1].values()),a=s.length,r=0;r<a;r++)if(s[r].ID===e){o=s[r];break}}catch(c){i.e(c)}finally{i.f()}return o}},{key:"updateMsgIsPeerReadProp",value:function(e,t){var n,o=[];return this._map.has(e)?(n=this._map.get(e),o=this._updateMsgIsPeerReadProp(n,t)):this._hoppingMsgMap.has(e)&&(n=this._hoppingMsgMap.get(e),o=this._updateMsgIsPeerReadProp(n,t)),Ae.l("".concat(this._n,".updateMsgIsPeerReadProp convID:").concat(e," peerReadTime:").concat(t," count:").concat(o.length)),o}},{key:"_updateMsgIsPeerReadProp",value:function(e,t){var n,o=[],i=T(e);try{for(i.s();!(n=i.n()).done;){var s=_(n.value,2)[1];s.time<=t&&!s.isPeerRead&&"out"===s.flow&&(s.isPeerRead=!0,o.push(s))}}catch(a){i.e(a)}finally{i.f()}return o}},{key:"updateMsgIsModifiedProp",value:function(e){var t=e.conversationID;this._map.has(t)&&(e=this._getUniqueIDOfMsg(e),t=this._map.get(t).get(e))&&(t.isModified=!0)}},{key:"hasLocalMsgList",value:function(e){return this._map.has(e)}},{key:"getLocalMsgList",value:function(e){return this.hasLocalMsgList(e)?m(this._map.get(e).values()):[]}},{key:"getLocalMaxSeq",value:function(e){return this.hasLocalMsgList(e)?(e=m(this._map.get(e).values()).map((function(e){return e.sequence})),Math.max.apply(Math,m(e))):0}},{key:"getLocalMaxTime",value:function(e){return this.hasLocalMsgList(e)?(e=m(this._map.get(e).values()).map((function(e){return e.time})),Math.max.apply(Math,m(e))):0}},{key:"hasLocalMsg",value:function(e,t){for(var n=!1,o=this.getLocalMsgList(e),i=o.length,s=0;s<i;s++)o[s].ID===t&&(n=!0);return n}},{key:"getLocalMsg",value:function(e,t){for(var n=null,o=this.getLocalMsgList(e),i=o.length,s=0;s<i;s++)if(o[s].ID===t){n=o[s];break}return n}},{key:"getLocalLastMsg",value:function(e){return(e=this.getLocalMsgList(e))[e.length-1]}},{key:"getLocalSecondLastMsg",value:function(e){return(e=this.getLocalMsgList(e))[e.length-2]}},{key:"getLocalOldestMsg",value:function(e){return this.getLocalMsgList(e)[0]}},{key:"_setLatestMsgSentByPeer",value:function(e,t){e.startsWith(E.CONV_C2C)&&"in"===t.flow&&this._latestMsgSentByPeerMap.set(e,t)}},{key:"_setLatestMsgSentByMe",value:function(e,t){"out"===t.flow&&this._latestMsgSentByMeMap.set(e,t)}},{key:"getLatestMsgSentByPeer",value:function(e){return this._latestMsgSentByPeerMap.get(e)}},{key:"getLatestMsgSentByMe",value:function(e){return this._latestMsgSentByMeMap.get(e)}},{key:"modifyMsgSentByPeer",value:function(e){var t=e.conversationID,n=e.latestNick,o=e.latestAvatar;if(!Ve(e=this._map.get(t))){var i=Array.from(e.values());if(0!==(e=i.length)){for(var s=null,a=0,r=!1,c=e-1;0<=c;c--)"in"===i[c].flow&&((s=i[c]).nick!==n&&(s.setNickAndAvatar({nick:n}),r=!0),s.avatar!==o&&(s.setNickAndAvatar({avatar:o}),r=!0),r)&&(a+=1);Ae.l("".concat(this._n,".modifyMsgSentByPeer convID:").concat(t," count:").concat(a))}}}},{key:"modifyMsgSentByMe",value:function(e){var t=e.conversationID,n=e.latestNick,o=e.latestAvatar;if(!Ve(e=this._map.get(t))){var i=Array.from(e.values());if(0!==(e=i.length)){for(var s=null,a=0,r=!1,c=e-1;0<=c;c--)"out"===i[c].flow&&((s=i[c]).nick!==n&&(s.setNickAndAvatar({nick:n}),r=!0),s.avatar!==o&&(s.setNickAndAvatar({avatar:o}),r=!0),r)&&(a+=1);Ae.l("".concat(this._n,".modifyMsgSentByMe convID:").concat(t," count:").concat(a))}}}},{key:"getTopicConvIDList",value:function(e){return m(this._map.keys()).filter((function(t){return t.startsWith("".concat(E.CONV_GROUP).concat(e))}))}},{key:"onMsgModified",value:function(e,t){var n,o,i,s;return(this._map.has(e)||this._hoppingMsgMap.has(e))&&(n="".concat(this._n,".onMsgModified"),i=this._getUniqueIDOfMsg(t),s=!!(o=this._getTargetMsg(e,i)),Ae.l("".concat(n," convID:").concat(e," uniqueID:").concat(i," has:").concat(s)),s)?(e=t.messageVersion,i=t.elements,s=t.cloudCustomData,t=t.checkResult,Ae.l("".concat(n," localVersion:").concat(o.version," remoteVersion:").concat(e)),o.version<e?(o.version=e,o._elements=JSON.parse(JSON.stringify(i)),o.payload=JSON.parse(JSON.stringify(i[0].content)),o.type=i[0].type,o.cloudCustomData=s,o.isModified=!0,o.hasRiskContent=jt(t),{isUpdated:!0,message:o}):{isUpdated:!1,message:o}):{isUpdated:!1,message:null}}},{key:"_getUniqueIDOfMsg",value:function(e){var t=e.from,n=e.to,o=e.random,i=e.sequence;return e=e.time,"".concat(t,"-").concat(n,"-").concat(o,"-").concat(i,"-").concat(e)}},{key:"_getTargetMsg",value:function(e,t){if(this._map.has(e))return this._map.get(e).get(t);var n=void 0;if(this._hoppingMsgMap.has(e))for(var o=m(this._hoppingMsgMap.get(e).values()),i=0;i<o.length;i++)if(this._getUniqueIDOfMsg(o[i])===t){n=o[i];break}return n}},{key:"storeHoppingMsgList",value:function(e){if(0!==e.length){var t=e[0].conversationID,n=e.length;this._hoppingMsgMap.has(t)||this._hoppingMsgMap.set(t,new Map);for(var o=this._hoppingMsgMap.get(t),i=0;i<n;i++){var s=e[i];o.has(s.ID)||o.set(s.ID,s)}}}},{key:"getHoppingMsg",value:function(e,t){if(this._hoppingMsgMap.has(e))return this._hoppingMsgMap.get(e).get(t)}},{key:"reset",value:function(){this._map.clear(),this._latestMsgSentByPeerMap.clear(),this._latestMsgSentByMeMap.clear(),this._hoppingMsgMap.clear()}}]),qo);function qo(e){o(this,qo),this._convM=e,this._map=new Map,this._n="MsgListHandler",this._latestMsgSentByPeerMap=new Map,this._latestMsgSentByMeMap=new Map,this._hoppingMsgMap=new Map,this.TOPIC_MSG_LIMIT=1e3,this._convM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Vo(e){return o(this,Vo),(e=Go.call(this,e))._n="C2CModule",e._msgFromUnreadDBMap=new Map,e._noticeFromUnreadDBList=[],e}function Bo(e){this.mixin(e)}function Ho(e,n,o){return ut(e)?{lastTime:0,lastSequence:0,fromAccount:"",messageForShow:"",payload:null,type:"",isRevoked:!1,cloudCustomData:"",onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:!1,revoker:null}:o&&e.ID||e instanceof Co?{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||"",messageForShow:Ut(e.type,e.payload,n),payload:e.payload||null,type:e.type||null,isRevoked:e.isRevoked||!1,cloudCustomData:e.cloudCustomData||"",onlineOnlyFlag:e._onlineOnlyFlag||!1,nick:e.nick||"",nameCard:e.nameCard||"",version:e.version||0,isPeerRead:e.isPeerRead||!1,revoker:e.revoker||null}:t(t({},e),{},{messageForShow:Ut(e.type,e.payload,n)})}function Ko(e,t){return Ve(e)?{lastTime:0,lastSequence:0,fromAccount:"",payload:null,type:"",messageForShow:"",nick:"",avatar:"",version:0,cloudCustomData:"",isRevoked:!1,revoker:null}:{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||"",payload:e.payload||null,type:e.type||"",messageForShow:Ut(e.type,e.payload,t),nick:e.nick||"",avatar:e.avatar||"",version:e.version||0,cloudCustomData:e.cloudCustomData||"",isRevoked:e.isRevoked||!1,revoker:e.revoker||null}}function jo(e){var t=String(e).replace(/[=]+$/,""),n="";if(t.length%4==1)return"";for(var o,i,s=0,a=0;i=t.charAt(a++);~i&&(o=s%4?64*o+i:i,s++%4)&&(n+=String.fromCharCode(255&o>>(-2*s&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);try{return decodeURIComponent(escape(n))}catch(r){return""}}Bo.mixin=function(e){(e=e.prototype||e)._isReady=!1,e.ready=function(e){if(e)return this._isReady?void(1<arguments.length&&void 0!==arguments[1]&&arguments[1]?e.call(this):setTimeout(e,1)):(this._readyQueue=this._readyQueue||[],void this._readyQueue.push(e))},e.triggerReady=function(){var e=this;this._isReady=!0,setTimeout((function(){var t=e._readyQueue;e._readyQueue=[],t&&0<t.length&&t.forEach((function(e){e.call(this)}),e)}),1)},e.resetReady=function(){this._isReady=!1,this._readyQueue=[]},e.isReady=function(){return this._isReady}};var $o,Wo,Yo,zo,Xo,Jo=["jpg","jpeg","gif","png","bmp","image","webp"],Zo=["mp4","quicktime","mov"],Qo=(s(ns,[{key:"validate",value:function(e){var t,n=!0,o="";if(Ve(e))return{valid:!1,tips:"empty options"};if(e.profileCustomField)for(var i=e.profileCustomField.length,s=null,a=0;a<i;a++){if(s=e.profileCustomField[a],!ct(s.key)||-1===s.key.indexOf("Tag_Profile_Custom"))return{valid:!1,tips:"The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom"};if(!ct(s.value))return{valid:!1,tips:"The type of values of the custom profile key-value pairs (which is profileCustomField) must be String"}}for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if("profileCustomField"===t)continue;if(Ve(e[t])&&!ct(e[t])&&!je(e[t])){o="key:"+t+", invalid value:"+e[t],n=!1;continue}switch(t){case"nick":ct(e[t])||(n=!(o="nick must be a string")),500<et(e[t])&&(o="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(et(e[t])," bytes"),n=!1);break;case"gender":it(Pe,e.gender)||(o="key:gender, invalid value:"+e.gender,n=!1);break;case"birthday":je(e.birthday)||(n=!(o="birthday must be a number"));break;case"location":ct(e.location)||(n=!(o="location must be a string"));break;case"selfSignature":ct(e.selfSignature)||(n=!(o="selfSignature must be a string"));break;case"allowType":it(Ge,e.allowType)||(o="key:allowType, invalid value:"+e.allowType,n=!1);break;case"language":je(e.language)||(n=!(o="language must be a number"));break;case"avatar":ct(e.avatar)||(n=!(o="avatar must be a string"));break;case"messageSettings":0!==e.messageSettings&&1!==e.messageSettings&&(n=!(o="messageSettings must be 0 or 1"));break;case"adminForbidType":it(we,e.adminForbidType)||(o="key:adminForbidType, invalid value:"+e.adminForbidType,n=!1);break;case"level":je(e.level)||(n=!(o="level must be a number"));break;case"role":je(e.role)||(n=!(o="role must be a number"));break;default:o="unknown key:"+t+" "+e[t],n=!1}}return{valid:n,tips:o}}}]),ns),ei=(s(ts,[{key:"set",value:function(e){var t;this.map.size>=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()}}]),ts),ti=["groupID","name","avatar","type","introduction","notification","ownerID","selfInfo","createTime","infoSequence","lastInfoTime","lastMessage","nextMessageSeq","memberNum","maxMemberNum","memberList","joinOption","groupCustomField","muteAllMembers","isSupportTopic","inviteOption","_lastRevokedTime"],ni=(s(es,[{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)ti.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),ut(e.muteAllMembers)||("On"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&_t(this.groupCustomField,e.groupCustomField),ut(e.memberNum)||(this.memberCount=e.memberNum),ut(e.maxMemberNum)||(this.maxMemberCount=e.maxMemberNum),ut(e.isSupportTopic)||(this.isSupportTopic=je(e.isSupportTopic)?1===e.isSupportTopic:e.isSupportTopic),Ze(this,e,["members","errorCode","lastMsgTime","groupCustomField","memberNum","maxMemberNum","isSupportTopic"]),Ye(e.members)&&0<e.members.length&&e.members.forEach((function(e){e.userID===t.selfInfo.userID&&Ze(t.selfInfo,e,["sequence"])}))}},{key:"updateSelfInfo",value:function(e){e={nameCard:e.nameCard,joinTime:e.joinTime,role:e.role,messageRemindType:e.messageRemindType,readedSequence:e.readedSequence,excludedUnreadSequenceList:e.excludedUnreadSequenceList},Ze(this.selfInfo,t({},e),[],["",null,void 0,0,NaN])}},{key:"setSelfNameCard",value:function(e){this.selfInfo.nameCard=e}}]),es),oi=(s(Qi,[{key:"toAccount",get:function(){return this.conversationID.startsWith(E.CONV_C2C)?this.conversationID.replace(E.CONV_C2C,""):this.conversationID.startsWith(E.CONV_GROUP)?this.conversationID.replace(E.CONV_GROUP,""):""}},{key:"_initProfile",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case"userProfile":t.userProfile=e.userProfile;break;case"groupProfile":t.groupProfile=e.groupProfile}})),ut(this.userProfile)&&this.type===E.CONV_C2C?this.userProfile=new Qo({userID:e.conversationID.replace("C2C","")}):ut(this.groupProfile)&&this.type===E.CONV_GROUP&&(this.groupProfile=new ni({groupID:e.conversationID.replace("GROUP","")}))}},{key:"updateUnreadCount",value:function(e){var t=e.nextUnreadCount,n=e.isFromGetConversations;e=e.isUnreadC2CMessage,ut(t)||(yt(this.subType)?this.unreadCount=0:n&&this.type===E.CONV_GROUP||n&&this.type===E.CONV_TOPIC||e&&this.type===E.CONV_C2C?this.unreadCount=t:this.unreadCount=this.unreadCount+t)}},{key:"updateLastMessage",value:function(e){this.lastMessage=Ho(e)}},{key:"updateGroupAtInfoList",value:function(e){var t;this._isNeedMergeGroupAtInfo(e)||(-1!==(t=(v(t=e.groupAtType)||y(t)||I(t)||C()).slice(0)).indexOf(E.CONV_AT_ME)&&-1!==t.indexOf(E.CONV_AT_ALL)&&(t=[E.CONV_AT_ALL_AT_ME]),t={from:e.from,groupID:e.groupID,topicID:e.topicID,messageSequence:e.sequence,atTypeArray:t,__random:e.__random,__sequence:e.__sequence},this.groupAtInfoList.push(t))}},{key:"_isNeedMergeGroupAtInfo",value:function(e){var t,n=e.groupID,o=e.sequence;return!!It({groupID:n})&&(t=!1,this.groupAtInfoList.forEach((function(n){n.messageSequence===o&&(-1<n.atTypeArray.indexOf(E.CONV_AT_ME)&&-1<e.groupAtType.indexOf(E.CONV_AT_ALL)&&(n.atTypeArray=[E.CONV_AT_ALL_AT_ME]),-1<n.atTypeArray.indexOf(E.CONV_AT_ALL)&&-1<e.groupAtType.indexOf(E.CONV_AT_ME)&&(n.atTypeArray=[E.CONV_AT_ALL_AT_ME],n.__random=e.__random,n.__sequence=e.__sequence),t=!0)})),t)}},{key:"clearGroupAtInfoList",value:function(){this.groupAtInfoList.length=0}},{key:"reduceUnreadCount",value:function(){return 1<=this.unreadCount&&(--this.unreadCount,!0)}},{key:"isLastMessageRevoked",value:function(e){var t=e.sequence;return e=e.time,this.type===E.CONV_C2C&&t===this.lastMessage.lastSequence&&e===this.lastMessage.lastTime||this.type===E.CONV_GROUP&&t===this.lastMessage.lastSequence}},{key:"setLastMessageRevoked",value:function(e){this.lastMessage.isRevoked=e}},{key:"setLastMessageRevoker",value:function(e){this.lastMessage.revoker=e}},{key:"setDraftText",value:function(e){this.draftText=e}}]),Qi),ii=(a(Q={},E.MSG_REMIND_ACPT_AND_NOTE,0),a(Q,E.MSG_REMIND_DISCARD,1),a(Q,E.MSG_REMIND_ACPT_NOT_NOTE,2),Q),si=(s(Zi,[{key:"onAllRcvMsgOptNotify",value:function(e){e=this._handleResult(e),this._convM.emitOEvt(S.ALL_RECEIVE_MESSAGE_OPT_UPDATED,e)}},{key:"getC2CMsgRemindType",value:function(e){var t=this,n="".concat(this._n,".getC2CMsgRemindType");return this._convM.req({P:Gn.GET_C2C_PEER_MUTE_NOTIFICATIONS,data:{toAccount:this._convM.getMyUserID(),userIDList:e}}).then((function(o){Ae.l("".concat(n," ok. userIDList:").concat(e)),o=o.data.muteFlagList,t._convM.onC2CMsgRemindTypeFetched(o)})).catch((function(e){Ae.e("".concat(n," failed. error:"),e)}))}},{key:"set",value:function(e){return e.groupID?this._setGroupMsgRemindType(e):Ye(e.userIDList)?this._setC2CMsgRemindType(e):void 0}},{key:"_setGroupMsgRemindType",value:function(e){var t=this,n="".concat(this._n,".").concat("_setGroupMsgRemindType"),o=e.groupID,i=e.messageRemindType,s="groupID:".concat(o," messageRemindType:").concat(i),a=new Jn("_setGroupMsgRemindType"),r=(a.setMessage(s),this._get(7));return r?r.modifyGroupMemberInfo({groupID:o,messageRemindType:i,userID:this._convM.getMyUserID()}).then((function(){a.end(),Ae.l("".concat(n," ok. ").concat(s));var o=t.onGroupMsgRemindTypeUpdated(e);return t._convM.onTotalUnreadCountUpdate(),mn(o)})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)})):yn({code:Pn.NO_MODULE})}},{key:"onGroupMsgRemindTypeUpdated",value:function(e){var t,n,o=e.groupID,i=(e=e.messageRemindType,Ae.l("".concat(this._n,".onGroupMsgRemindTypeUpdated groupID:").concat(o," messageRemindType:").concat(e)),this._get(7).getLocalGroupProfile(o));return i&&(i.selfInfo.messageRemindType=e),Mt(o)?(t=Gt(n=o),(n=this._get(10).getLocalTopic(t,n))&&n.updateSelfInfo({messageRemindType:e})&&this._convM.emitOEvt(S.TOPIC_UPDATED,{groupID:t,topic:n}),{topic:n}):(this._convM.patchMsgRemindType({ID:o,isC2CConversation:!1,messageRemindType:e})&&this._emitConvUpdate(),{group:i})}},{key:"_setC2CMsgRemindType",value:function(e){var t=this,n="".concat(this._n,".").concat("_setC2CMsgRemindType"),o=e.userIDList,i=e.messageRemindType,s=o.slice(0,30),a=(e=ii[i]||0,"userIDList:".concat(s," messageRemindType:").concat(i)),r=new Jn("_setC2CMsgRemindType");return r.setMessage(a),this._convM.req({P:Gn.SET_C2C_PEER_MUTE_NOTIFICATIONS,data:{userIDList:s,muteFlag:e}}).then((function(e){r.end(),e=e.data.errorList;var o=[],c=[],u=(Ye(e)&&e.forEach((function(e){o.push(e.userID),c.push({userID:e.userID,code:e.errorCode})})),e=s.filter((function(e){return-1===o.indexOf(e)})),Ae.l("".concat(n," ok. ").concat(a," successUserIDList:").concat(e," failureUserIDList:").concat(JSON.stringify(c))),0);return e.forEach((function(e){t._convM.patchMsgRemindType({ID:e,isC2CConversation:!0,messageRemindType:i})&&(u+=1)})),1<=u&&t._emitConvUpdate(),s.length=o.length=0,t._convM.onTotalUnreadCountUpdate(),vn({successUserIDList:e.map((function(e){return{userID:e}})),failureUserIDList:c})})).catch((function(e){return r.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_get",value:function(e){return this._convM.get(e)}},{key:"_emitConvUpdate",value:function(){this._convM.emitConvUpdate(!0,!1)}},{key:"setAllRcvMsgOpt",value:function(e){var t="".concat(this._n,".").concat("setAllRcvMsgOpt"),n=void 0===(n=e.messageRemindType)?E.MSG_REMIND_ACPT_NOT_NOTE:n,o=void 0===(o=e.isRepeated)||o,i=void 0===(i=(s=this._calcStartAndEndTime(e)).startTime)?0:i,s=void 0===(s=s.endTime)?0:s,a=(e=JSON.stringify(e),new Jn("setAllRcvMsgOpt"));return a.setMessage(e),Ae.l("".concat(t," options:").concat(e)),this._convM.req({P:Gn.SET_ALL_RECEIVE_MSG_OPT,data:{messageRemindType:ii[n],startTime:i,endTime:s,isRepeated:o?1:0}}).then((function(e){return a.end(),Ae.l("".concat(t," ok.")),mn(e)})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_calcStartAndEndTime",value:function(e){var t=void 0===(t=e.startHour)?0:t,n=void 0===(n=e.startMinute)?0:n,o=void 0===(o=e.startSecond)?0:o,i=void 0===(i=e.duration)?0:i,s=(e=void 0===(e=e.isRepeated)||e,(r=new Date).getFullYear()),a=r.getMonth(),r=r.getDate();return{startTime:s=Math.round(new Date(s,a,r,t,n,o).getTime()/1e3),endTime:e&&86400<=i?s+86400:s+i}}},{key:"getAllRcvMsgOpt",value:function(){var e=this,t="".concat(this._n,".").concat("getAllRcvMsgOpt"),n=new Jn("getAllRcvMsgOpt");return this._convM.req({P:Gn.GET_ALL_RECEIVE_MSG_OPT,data:{toAccount:this._convM.getMyUserID()}}).then((function(o){return o=o.data,n.setMessage(JSON.stringify(o)).end(),Ae.l("".concat(t," ok. data:").concat(JSON.stringify(o))),mn(o=e._handleResult(o))})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_handleResult",value:function(e){var t=e.messageRemindType,n=e.startTime,o=e.endTime,i=(e=e.isRepeated,E.MSG_REMIND_ACPT_AND_NOTE);return 1===t&&(i=E.MSG_REMIND_DISCARD),{messageRemindType:i=2===t?E.MSG_REMIND_ACPT_NOT_NOTE:i,startTime:n,endTime:o,isRepeated:1===e}}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Zi),ai=(s(Ji,[{key:"setConvCustomData",value:function(e){var t=this,n="".concat(this._n,".").concat("setConvCustomData"),o=e.conversationIDList,i=e.customData,s=(Ae.l("".concat(n," options:"),e),new Jn("setConvCustomData")),a=(s.setMessage(JSON.stringify(e)),{fromAccount:this._getMyUserID(),itemList:[]}),r=[],c=[];return o.forEach((function(e){var n;return t._hasLocalConv(e)?Ct(e)||Tt(e)?(n={operationType:2,contactItem:void 0,customMark:i},Ct(e)?n.contactItem={type:1,toAccount:e.replace(E.CONV_C2C,"")}:Tt(e)&&(n.contactItem={type:2,groupID:e.replace(E.CONV_GROUP,"")}),void a.itemList.push(n)):(t._onConvIDInvalid(c,e),!0):(t._onConvNotFound(c,e),!0)})),c.length===o.length?vn({successConversationIDList:r,failureConversationIDList:c}):this._convM.req({P:Gn.SET_CONV_CUSTOM_DATA,data:a}).then((function(e){var o,a,u;return s.end(),Ae.l("".concat(n," ok")),Ye(e=e.data.resultItem)&&(u=!1,e.forEach((function(e){o=t._concatConvID(e.contactItem),0===e.resultCode?(r.push(o),(a=t._getLocalConv(o))&&a.customData!==i&&(a.customData=i,u=!0)):c.push({conversationID:o,code:e.resultCode,message:e.resultInfo})})),!0===u)&&t._emitConvUpdate(),mn({successConversationIDList:r,failureConversationIDList:c})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"markConv",value:function(e){var t,n,o,i,s,a,r,c,u,l,d=this;return this._convM.canIUse(w.CONV_MARK)?(t="".concat(this._n,".").concat("markConv"),n=e.conversationIDList,o=e.markType,i=e.enableMark,Ae.l("".concat(t," options:"),e),s=new Jn("markConv"),a=void s.setMessage(JSON.stringify(e)),r=void 0,e=this._getFlagBit(o),!0===i?r=[e]:a=[e],c={fromAccount:this._getMyUserID(),itemList:[]},u=[],l=[],n.forEach((function(e){var t;return d._hasLocalConv(e)?Ct(e)||Tt(e)?(t={operationType:1,contactItem:void 0,clearMark:a,setMark:r},Ct(e)?t.contactItem={type:1,toAccount:e.replace(E.CONV_C2C,"")}:Tt(e)&&(t.contactItem={type:2,groupID:e.replace(E.CONV_GROUP,"")}),void c.itemList.push(t)):(d._onConvIDInvalid(l,e),!0):(d._onConvNotFound(l,e),!0)})),l.length===n.length?vn({successConversationIDList:u,failureConversationIDList:l}):this._convM.req({P:Gn.MARK_CONV,data:c}).then((function(e){var n,a,r;return s.end(),Ae.l("".concat(t," ok")),Ye(e=e.data.resultItem)&&(r=!1,e.forEach((function(e){var t;n=d._concatConvID(e.contactItem),0===e.resultCode?(u.push(n),(a=d._getLocalConv(n))&&(t=a.markList.indexOf(o),!0===i?-1===t&&(a.markList.push(o),r=!0):-1!==t&&(a.markList.splice(t,1),r=!0))):l.push({conversationID:n,code:e.resultCode,message:e.resultInfo})})),!0===r)&&d._emitConvUpdate(),mn({successConversationIDList:u,failureConversationIDList:l})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("markConv")}},{key:"getLocalConvGroupList",value:function(){var e=this;return Ae.l("".concat(this._n,".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)),this._pagingStatus===kn?this.getRemoteConvGroupList().then((function(){return mn(m(e._convGroupMap.values()))})):vn(m(this._convGroupMap.values()))}},{key:"searchConvGroupAndMark",value:function(e,t){var n=this,o="".concat(this._n,".searchConvGroupAndMark"),i=[];return e.forEach((function(e){1===t?i.push({type:1,toAccount:e}):2===t&&i.push({type:2,groupID:e})})),Ae.l("".concat(o," type:").concat(t," list:"),e),this._convM.req({P:Gn.SEARCH_CONV_GRP_MARK,data:{fromAccount:this._getMyUserID(),contactItem:i}}).then((function(e){var t=(e=e.data).contactItem;e=e.groupItem,Ae.l("".concat(o," ok. contactItem:"),t,"groupItem:",e),n._fillConvGroupMap(e),n._handleContactItem(t),n._emitConvUpdate()})).catch((function(e){Ae.w("".concat(o," failed. error:"),e)}))}},{key:"_fillConvGroupMap",value:function(e){var t=this;Ye(e)&&e.forEach((function(e){var n=e.convGroupID;e=e.groupName,t._convGroupMap.set(n,e)}))}},{key:"_handleContactItem",value:function(e){var t,n=this;Ye(e)&&e.forEach((function(e){var o=[],i=e.standardMark,s=e.customData,a=e.convGroupIDList;Ye(a)&&a.forEach((function(e){n._convGroupMap.has(e)&&o.push(n._convGroupMap.get(e))})),t=n._concatConvID(e),(t=n._getLocalConv(t))&&(t.markList=Ft(i),t.customData=s||"",t.conversationGroupList=[].concat(o))}))}},{key:"getRemoteConvGroupList",value:function(){var e=this,t="".concat(this._n,".getRemoteConvGroupList");return this._pagingStatus=En,this._convM.req({P:Gn.GET_CONV_GRP_LIST,data:{fromAccount:this._getMyUserID(),startIndex:this._startIndex}}).then((function(n){var o=(n=n.data).completeFlag,i=n.contactItem,s=void 0===(s=n.nextStartIndex)?0:s;if(n=n.groupItem,e._startIndex=s,Ae.l("".concat(t," completeFlag:").concat(o," nextStartIndex:").concat(s,", groupItem:"),n,"contactItem:",i),e._fillConvGroupMap(n),e._handleContactItem(i),0===o)return e.getRemoteConvGroupList();1===o&&(e._pagingStatus=Dn,e._emitConvUpdate(),e._emitConvGroupListUpdate())})).catch((function(n){e._pagingStatus=kn,Ae.w("".concat(t," failed. error:"),n)}))}},{key:"createConvGroup",value:function(e){var t,n,o,i,s,a,r=this;return this._convM.canIUse(w.CONV_GROUP)?(t="".concat(this._n,".").concat("createConvGroup"),Ae.l("".concat(t," options:"),e),(n=new Jn("createConvGroup")).setMessage(JSON.stringify(e)),o=e.groupName,e=e.conversationIDList,i={fromAccount:this._getMyUserID(),itemList:[{groupName:o,contactItem:[]}]},s=[],a=[],e.forEach((function(e){return r._hasLocalConv(e)?Ct(e)||Tt(e)?void(Ct(e)?i.itemList[0].contactItem.push({type:1,toAccount:e.replace(E.CONV_C2C,"")}):Tt(e)&&i.itemList[0].contactItem.push({type:2,groupID:e.replace(E.CONV_GROUP,"")})):(r._onConvIDInvalid(a,e),!0):(r._onConvNotFound(a,e),!0)})),a.length===e.length?vn({successConversationIDList:s,failureConversationIDList:a}):this._convM.req({P:Gn.CREATE_CONV_GRP,data:i}).then((function(e){n.end(),Ae.l("".concat(t," ok"));var i,c,u,l=(e=e.data.groupResultItem[0]).groupItem;return e=e.resultItem,We(l)&&(r._convGroupMap.set(l.convGroupID,l.groupName),r._emitConvGroupListUpdate()),Ye(e)&&(u=!1,e.forEach((function(e){i=r._concatConvID(e.contactItem),0===e.resultCode?(s.push(i),(c=r._getLocalConv(i))&&-1===c.conversationGroupList.indexOf(o)&&(c.conversationGroupList.push(o),u=!0)):a.push({conversationID:i,code:e.resultCode,message:e.resultInfo})})),!0===u)&&(r._emitConvUpdate(),r._emitConvGroupListUpdate()),mn({successConversationIDList:s,failureConversationIDList:a})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("createConvGroup")}},{key:"deleteConvGroup",value:function(e){var t,n,o=this;return this._convM.canIUse(w.CONV_GROUP)?(t="".concat(this._n,".").concat("deleteConvGroup"),Ae.l("".concat(t," groupName:").concat(e)),(n=new Jn("deleteConvGroup")).setMessage(e),this._convM.req({P:Gn.DEL_CONV_GRP,data:{fromAccount:this._getMyUserID(),groupName:[e]}}).then((function(i){var s;n.end(),Ae.l("".concat(t," ok")),Ye(i=i.data.groupItem)&&(s=!1,i.forEach((function(e){o._convGroupMap.has(e.convGroupID)&&(o._convGroupMap.delete(e.convGroupID),s=!0)})),!0===s)&&o._emitConvGroupListUpdate(),o._eraseFromConversationGroupList([e])})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("deleteConvGroup")}},{key:"renameConvGroup",value:function(e){var t,n,o,i,s=this;return this._convM.canIUse(w.CONV_GROUP)?(t="".concat(this._n,".").concat("renameConvGroup"),Ae.l("".concat(t," options:"),e),(n=new Jn("renameConvGroup")).setMessage(JSON.stringify(e)),o=e.oldName,i=e.newName,this._convM.req({P:Gn.RENAME_CONV_GRP,data:{fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:1,oldName:o,newName:i}}}).then((function(e){n.end(),Ae.l("".concat(t," ok")),e=e.data.updateGroupResult.convGroupID,s._convGroupMap.set(e,i),s._emitConvGroupListUpdate(),e=s._convM.getLocalConvList();var a,r,c=!1;e.forEach((function(e){a=e.conversationGroupList,-1!==(r=a.indexOf(o))&&(a.splice(r,1,i),c=!0)})),!0===c&&s._emitConvUpdate()})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("renameConvGroup")}},{key:"addConvsToGroup",value:function(e){var t,n,o,i,s,a,r,c=this;return this._convM.canIUse(w.CONV_GROUP)?(t="".concat(this._n,".").concat("addConvsToGroup"),Ae.l("".concat(t," options:"),e),(n=new Jn("addConvsToGroup")).setMessage(JSON.stringify(e)),o=e.conversationIDList,i=e.groupName,s={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:i,updateItem:[]}},a=[],r=[],o.forEach((function(e){return c._hasLocalConv(e)?Ct(e)||Tt(e)?void(Ct(e)?s.updateGroup.updateItem.push({operationType:1,contactItem:{type:1,toAccount:e.replace(E.CONV_C2C,"")}}):Tt(e)&&s.updateGroup.updateItem.push({operationType:1,contactItem:{type:2,groupID:e.replace(E.CONV_GROUP,"")}})):(c._onConvIDInvalid(r,e),!0):(c._onConvNotFound(r,e),!0)})),r.length===o.length?vn({successConversationIDList:a,failureConversationIDList:r}):this._convM.req({P:Gn.ADD_CONV_TO_GRP,data:s}).then((function(e){var o,s,u;return n.end(),Ae.l("".concat(t," ok")),Ye(e=e.data.updateGroupResult.contactResultItem)&&(u=!1,e.forEach((function(e){o=c._concatConvID(e.contactItem),0===e.resultCode?(s=c._getLocalConv(o))&&-1===s.conversationGroupList.indexOf(i)&&(s.conversationGroupList.push(i),a.push(o),u=!0):r.push({conversationID:o,code:e.resultCode,message:e.resultInfo})})),!0===u)&&(c._emitConvUpdate(),c._emitConvInGroupUpdate(i)),mn({successConversationIDList:a,failureConversationIDList:r})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("addConvsToGroup")}},{key:"deleteConvsFromGroup",value:function(e){var t,n,o,i,s,a,r,c=this,u="deleteConvsFromGroup";return this._convM.canIUse(w.CONV_GROUP)?(t="".concat(this._n,".").concat(u),Ae.l("".concat(t," options:"),e),(n=new Jn(u)).setMessage(JSON.stringify(e)),o=e.conversationIDList,i=e.groupName,s={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:i,updateItem:[]}},a=[],r=[],o.forEach((function(e){return c._hasLocalConv(e)?Ct(e)||Tt(e)?void(Ct(e)?s.updateGroup.updateItem.push({operationType:2,contactItem:{type:1,toAccount:e.replace(E.CONV_C2C,"")}}):Tt(e)&&s.updateGroup.updateItem.push({operationType:2,contactItem:{type:2,groupID:e.replace(E.CONV_GROUP,"")}})):(c._onConvIDInvalid(r,e),!0):(c._onConvNotFound(r,e),!0)})),r.length===o.length?vn({successConversationIDList:a,failureConversationIDList:r}):this._convM.req({P:Gn.DEL_CONV_FROM_GRP,data:s}).then((function(e){var o,s,u;return n.end(),Ae.l("".concat(t," ok")),Ye(e=e.data.updateGroupResult.contactResultItem)&&(u=!1,e.forEach((function(e){var t;o=c._concatConvID(e.contactItem),0===e.resultCode?(s=c._getLocalConv(o))&&-1!==(t=s.conversationGroupList.indexOf(i))&&(s.conversationGroupList.splice(t,1),a.push(o),u=!0):r.push({conversationID:o,code:e.resultCode,message:e.resultInfo})})),!0===u)&&(c._emitConvUpdate(),c._emitConvInGroupUpdate(i)),mn({successConversationIDList:a,failureConversationIDList:r})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse(u)}},{key:"onConvMarkUpdated",value:function(e){var t,n,o=this;Ve(e)||(Ae.l("".concat(this._n,".onConvMarkUpdated markItemList:"),e),n=!1,e.forEach((function(e){var i=e.recentContactItem,s=e.optType,a=e.standardMark;e=e.customMark,t=o._concatConvID(i),(t=o._getLocalConv(t))&&(1===s?n=o._diffStandardMark(t,a):2===s?n=o._diffCustomMark(t,e):3===s&&(i=o._diffStandardMark(t,a),s=o._diffCustomMark(t,e),n=i||s))})),!0===n&&this._emitConvUpdate())}},{key:"_diffStandardMark",value:function(e,t){t=Ft(t);var n=!1;return!0!==function(e,t){if(e!==t){if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1}return!0}(e.markList,t)&&(e.markList=t,n=!0),n}},{key:"_diffCustomMark",value:function(e,t){var n=!1;return e.customData!==t&&void 0!==t&&(e.customData=t,n=!0),n}},{key:"onConvGroupCreated",value:function(e){var t=this,n=(Ae.l("".concat(this._n,".onConvGroupCreated resultList:"),e),!1),o=!1;Ye(e)&&(e.forEach((function(e){var i,s,a=(s=e.msgGroupItem).groupID,r=s.groupName;t._convGroupMap.get(a)!==r&&(t._convGroupMap.set(a,r),o=!0),Ye(s=e.msgRecentContactItem)&&s.forEach((function(e){i=t._concatConvID(e),(i=t._getLocalConv(i))&&-1===i.conversationGroupList.indexOf(r)&&(i.conversationGroupList.push(r),n=!0)}))})),!0===n&&this._emitConvUpdate(),!0===o)&&this._emitConvGroupListUpdate()}},{key:"onConvGroupDeleted",value:function(e){var t,n=this,o=(Ae.l("".concat(this._n,".onConvGroupDeleted groupItemList:"),e),[]);Ye(e)&&(t=!1,e.forEach((function(e){var i=e.groupID;e=e.groupName,n._convGroupMap.has(i)&&(n._convGroupMap.delete(i),t=!0,o.push(e))})),!0===t)&&this._emitConvGroupListUpdate(),this._eraseFromConversationGroupList(o)}},{key:"_eraseFromConversationGroupList",value:function(e){Ve(e)||(this._convM.getLocalConvList().forEach((function(t){t.conversationGroupList=t.conversationGroupList.filter((function(t){return!e.includes(t)}))})),this._emitConvUpdate())}},{key:"onConvGroupNameUpdated",value:function(e){Ae.l("".concat(this._n,".onConvGroupNameUpdated options:"),e);var t,n,o,i=e.groupID,s=e.groupName,a=e.oldGroupName;this._convGroupMap.get(i)!==s&&(this._convGroupMap.set(i,s),this._emitConvGroupListUpdate(),e=this._convM.getLocalConvList(),o=!1,e.forEach((function(e){t=e.conversationGroupList,-1!==(n=t.indexOf(a))&&(t.splice(n,1,s),o=!0)})),!0===o)&&this._emitConvUpdate()}},{key:"onConvInGroupUpdated",value:function(e){var t,n,o,i=this,s=(Ae.l("".concat(this._n,".onConvInGroupUpdated options:"),e),e.oldGroupName);Ye(e=e.recentContactUpdateGroupItem)&&(o=!1,e.forEach((function(e){var a=e.contactOptType;e=e.recentContactItem,t=i._concatConvID(e),(t=i._getLocalConv(t))&&(n=t.conversationGroupList.indexOf(s),1===a?-1===n&&(t.conversationGroupList.push(s),o=!0):2===a&&-1!==n&&(t.conversationGroupList.splice(n,1),o=!0))})),!0===o)&&(this._emitConvUpdate(),this._emitConvInGroupUpdate(s))}},{key:"onConvAddedToOrDeletedFromGroup",value:function(e){var t,n,o=this,i=(Ae.l("".concat(this._n,".onConvAddedToOrDeletedFromGroup options:"),e),e.msgRecentContactItem),s=(e=e.msgRecentContactUpdateContactItem,i=this._concatConvID(i),this._getLocalConv(i));s&&Ye(e)&&(n=!1,e.forEach((function(e){var i=e.groupOptType;e=e.recentContactGroupItem.groupName,t=s.conversationGroupList.indexOf(e),1===i?-1===t&&(s.conversationGroupList.push(e),n=!0):2===i&&-1!==t&&(s.conversationGroupList.splice(t,1),n=!0),!0===n&&o._emitConvInGroupUpdate(e)})),!0===n)&&this._emitConvUpdate()}},{key:"onConvGroupListSynced",value:function(e){Ye(e)&&0!==e.length&&(Ae.l("".concat(this._n,".onConvGroupListSynced groupItem:"),e),this._fillConvGroupMap(e))}},{key:"getConvGroupListByID",value:function(e){var t,n=this;if(!Ve(e))return t=[],e.forEach((function(e){n._convGroupMap.has(e)&&t.push(n._convGroupMap.get(e))})),t}},{key:"_onConvNotFound",value:function(e,t){e.push({conversationID:t,code:Pn.CONV_NOT_FOUND,message:this._convM.getErrMsg(Pn.CONV_NOT_FOUND)})}},{key:"_onConvIDInvalid",value:function(e,t){e.push({conversationID:t,code:Pn.INVALID_CONV_ID,message:this._convM.getErrMsg(Pn.INVALID_CONV_ID)})}},{key:"_getFlagBit",value:function(e){for(var t=e.toString(2),n=t.length,o=n-1;0<=o;o--)if("1"===t[o])return n-o-1}},{key:"_concatConvID",value:function(e){var t,n=e.type,o=e.to,i=e.groupID;return e=e.userID,1===n?ut(e)?ut(o)||(t="".concat(E.CONV_C2C).concat(o)):t="".concat(E.CONV_C2C).concat(e):2===n&&(t="".concat(E.CONV_GROUP).concat(i)),t}},{key:"_getMyUserID",value:function(){return this._convM.getMyUserID()}},{key:"_getLocalConv",value:function(e){return this._convM.getLocalConversation(e)}},{key:"_hasLocalConv",value:function(e){return this._convM.hasLocalConversation(e)}},{key:"_emitConvUpdate",value:function(){this._convM.emitConvUpdate(!0,!1)}},{key:"_emitConvGroupListUpdate",value:function(){this._convM.emitOEvt(S.CONVERSATION_GROUP_LIST_UPDATED,m(this._convGroupMap.values()))}},{key:"_emitConvInGroupUpdate",value:function(e){var t={groupName:e,conversationList:[]},n=this._convM.getLocalConvList();t.conversationList=n.filter((function(t){return t.conversationGroupList.includes(e)})),this._convM.emitOEvt(S.CONVERSATION_IN_GROUP_UPDATED,t)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._convGroupMap.clear(),this._startIndex=0,this._pagingStatus=Sn}}]),Ji),ri=(r(Xi,bn),Xo=g(Xi),s(Xi,[{key:"_initListeners",value:function(){var e=this.getIEmitInst();e.on(xo.A2KEY_AND_TINYID_UPDATED,this._init,this),e.on(xo.PROFILE_UPDATED,this._onProfileUpdated,this),e.on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}},{key:"_init",value:function(){var e=this,t=(Ae.l("".concat(this._n,"._init")),this.get(13).getItem("conversationMap")),n=this.isIntl(),o=this.isUsingChatCore();if(t){for(var i=t.length,s=0;s<i;s++){var a=t[s];if(a){if(this._isNonExistentAccount(a.conversationID))continue;if(a.groupProfile&&yt(a.groupProfile.type))continue}this._convMap.set(a.conversationID,new oi(t[s],n,o))}this.emitConvUpdate(!0,!1)}this.ready((function(){0<e._tmpGroupList.length&&(e.updateConvGroupProfile(e._tmpGroupList),e._tmpGroupList.length=0)})),this.syncConvList()}},{key:"_isNonExistentAccount",value:function(e){var t;return"@TLS#ERROR"===(t=e.startsWith(E.CONV_C2C)?e.replace(E.CONV_C2C,""):t)||"@TLS#NOT_FOUND"===t}},{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&this._msgListHandler.onCheckTimer(e)}},{key:"onMessageSent",value:function(e){this._onSendOrRcvMsg({conversationOptionsList:e.conversationOptionsList,isInstantMessage:!0})}},{key:"onNewMessage",value:function(e){this._onSendOrRcvMsg(e)}},{key:"_onSendOrRcvMsg",value:function(e){var t=this,n=e.conversationOptionsList,o=void 0===(o=e.isInstantMessage)||o,i=void 0!==(i=e.isUnreadC2CMessage)&&i,s=void 0===(s=e.updateUnreadCount)||s,a=void 0!==(a=e.isSyncingEnded)&&a;this._isReady?0!==n.length?(!0===o&&this._checkNewConv(n),this._updateLocalConvList({conversationOptionsList:n,isInstantMessage:o,isUnreadC2CMessage:i,isFromGetConversations:!1,updateUnreadCount:s}),o||(this._convIDFromUnreadDBMap=new Map([].concat(m(this._convIDFromUnreadDBMap),m(n.map((function(e){return[e.conversationID,1]}))))),this._diffAndDeleteConv(),a&&this.emitIEvt(xo.C2C_UNREAD_HANDLE_COMPLETED)),0<n.filter((function(e){return!t._isConvNeedShow(e.conversationID)})).length||this.emitConvUpdate()):a&&this.emitIEvt(xo.C2C_UNREAD_HANDLE_COMPLETED):this.ready((function(){t._onSendOrRcvMsg(e)}))}},{key:"updateConvGroupProfile",value:function(e){var t,n=this;Ye(e)&&0===e.length||(0!==this._convMap.size?(t=!1,e.forEach((function(e){var o="".concat(E.CONV_GROUP).concat(e.groupID);n._convMap.has(o)&&(t=!0,(o=n._convMap.get(o)).groupProfile=JSON.parse(JSON.stringify(e)),o.lastMessage.lastSequence<e.nextMessageSeq&&(o.lastMessage.lastSequence=e.nextMessageSeq-1),o.subType||(o.subType=e.type))})),t&&this.emitConvUpdate(!0,!1)):this._tmpGroupList=e)}},{key:"onMessageRevoked",value:function(e,t){var n,o,i,s=this;0!==e.length&&(n=null,o=!1,i=[],e.forEach((function(e){(n=s._convMap.get(e.conversationID))&&(t&&n.reduceUnreadCount()&&(o=n.type!==E.CONV_TOPIC),n.type===E.CONV_TOPIC?i.push(e):n.isLastMessageRevoked({sequence:e.sequence,time:e.time})&&(n.setLastMessageRevoked(!0),n.setLastMessageRevoker(e.revoker),o=!0))})),this.get(10).onMessageRevoked(i),o)&&this.emitConvUpdate(!0,!1)}},{key:"updateRevokerInfo",value:function(e){for(var t=new Set,n=0;n<e.length;n++){var o=e[n].revoker;t.add(o)}var i=m(t),s=this.get(4);return new Promise((function(t){s.getUserProfile({userIDList:i}).then((function(n){if(!Ye(n=n.data)||0===n.length)return t(e);var o,i={},s=T(n);try{for(s.s();!(o=s.n()).done;){var a=o.value,r=a.userID,c=a.nick,u=a.avatar;i[r]={nick:c,avatar:u}}}catch(l){s.e(l)}finally{s.f()}e.forEach((function(e){var t=e.revoker;i[t]&&(e.revokerInfo.nick=i[t].nick||"",e.revokerInfo.avatar=i[t].avatar||"")})),t(e)})).catch((function(){t(e)}))}))}},{key:"isLastMessageRevoked",value:function(e){var t=!1,n=e.conversationID,o=e.sequence,i=e.time,s=this._convMap.get(n);return s&&(t=s.type===E.CONV_TOPIC?this.get(10).isLastMessageRevoked({topicID:n.replace(E.CONV_GROUP,""),sequence:o}):s.isLastMessageRevoked({sequence:o,time:i})),Ae.l("".concat(this._n,".isLastMessageRevoked options:"),e,"ret:".concat(t)),t}},{key:"onMessageDeleted",value:function(e){var t=this;if(0!==e.length){var n=null;e.forEach((function(e){(n=t._msgListHandler.getLocalMsg(e.conversationID,e.ID))&&(n.isDeleted=!0),e!==n&&(e.isDeleted=!0)})),e=e[0].conversationID;for(var o=this._msgListHandler.getLocalMsgList(e),i={},s=o.length-1;0<=s;s--)if(!o[s].isDeleted){i=o[s];break}var a,r=this._convMap.get(e);r&&(a=!1,r.lastMessage.lastSequence===i.sequence&&r.lastMessage.lastTime===i.time||(Ve(i)&&(i=void 0),r.updateLastMessage(i),r.type!==E.CONV_TOPIC&&(a=!0),Ae.l("".concat(this._n,".onMessageDeleted. update convID:").concat(e," with lastMessage:"),r.lastMessage)),e.startsWith(E.CONV_C2C)&&this.updateUnreadCount(e),a)&&this.emitConvUpdate(!0,!1)}}},{key:"onMessageModified",value:function(e){var t="".concat(this._n,".onMessageModified"),n=e.conversationType,o=e.from,i=e.to,s=e.time,a=e.sequence,r=e.elements,c=e.cloudCustomData,u=e.messageVersion,l=this.getMyUserID(),d="".concat(n).concat(i),p=(n=(i===l&&n===E.CONV_C2C&&(d="".concat(n).concat(o)),l=this._msgListHandler.onMsgModified(d,e)).isUpdated,l=l.message,!0===n&&this.emitOEvt(S.MESSAGE_MODIFIED,[l]),this._isTopicConv(d));return null===l?Ae.l("".concat(t," message is null! options:"),e):Ae.l("".concat(t," isUpdated:").concat(n," isTopicMessage:").concat(p," from:").concat(o," to:").concat(i," sequence:").concat(l.sequence," time:").concat(l.time)),p?this.get(10).onMessageModified(e):(n=this._convMap.get(d))&&(o=n.lastMessage)&&o.lastTime===s&&o.lastSequence===a&&o.version!==u&&(Ae.l("".concat(t," convID:").concat(d," lastMessage updated")),o.type=r[0].type,o.payload=r[0].content,o.messageForShow=Ut(o.type,o.payload,this.isIntl()),o.cloudCustomData=c,o.version=u,this.emitConvUpdate(!0,!1)),l}},{key:"onNewGroupAtTips",value:function(e){var n=this,o=(e=e.dataList,null);e.forEach((function(e){e.groupAtTips?o=e.groupAtTips:e.elements?o=t(t({},e.elements),{},{sync:!0}):e.groupAtType&&(o=t(t({},e),{},{sync:!0})),o.__random=e.random,o.__sequence=e.clientSequence,n._tmpGroupAtTipsList.push(o)})),Ae.l("".concat(this._n,".onNewGroupAtTips isReady:").concat(this._isReady),this._tmpGroupAtTipsList),this._isReady&&this._handleGroupAtTipsList()}},{key:"_handleGroupAtTipsList",value:function(){var e,t=this;0!==this._tmpGroupAtTipsList.length&&(e=!1,this._tmpGroupAtTipsList.forEach((function(n){var o,i=n.groupID,s=n.from,a=void 0===(a=n.topicID)?void 0:a,r=void 0!==(r=n.sync)&&r;s!==t.getMyUserID()&&(ut(a)?(s=t._convMap.get("".concat(E.CONV_GROUP).concat(i)))&&(s.updateGroupAtInfoList(n),e=!0):((i=t._convMap.get("".concat(E.CONV_GROUP).concat(a)))&&(i.updateGroupAtInfoList(n),s=t.get(10),o=i.groupAtInfoList,s.onAtInfoUpdated({topicID:a,groupAtInfoList:o})),Ve(i)&&r&&(t.updateTopicConversation([{conversationID:"".concat(E.CONV_GROUP).concat(a),type:E.CONV_TOPIC}]),t._convMap.get("".concat(E.CONV_GROUP).concat(a)).updateGroupAtInfoList(n))))})),e&&this.emitConvUpdate(!0,!1),this._tmpGroupAtTipsList.length=0)}},{key:"_checkNewConv",value:function(e){var t=this,n=[],o=[];e.forEach((function(e){t._convMap.has(e.conversationID)||(e.type===E.CONV_C2C?n.push(e.conversationID.replace(E.CONV_C2C,"")):e.type===E.CONV_GROUP&&o.push(e.conversationID.replace(E.CONV_GROUP,"")))})),0<n.length&&(this._onNewC2CConv(n),n=null),0<o.length&&(this._onNewGroupConv(o),o=null)}},{key:"_onNewC2CConv",value:function(e){var t=this.get(6);return Promise.all([t.getRemotePeerReadTime(e),this._msgRemindHandler.getC2CMsgRemindType(e),this._convGroupHandler.searchConvGroupAndMark(e,1)])}},{key:"_onNewGroupConv",value:function(e){var t=this.get(7);return t?Promise.all([t.getMsgRemindType(e),this._convGroupHandler.searchConvGroupAndMark(e,2)]):Promise.resolve()}},{key:"_setStorageConvList",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.getLocalConvList().filter((function(e){return e.type===E.CONV_C2C||e.type===E.CONV_GROUP&&e.lastMessage.type!==E.MSG_GRP_TIP})).slice(0,20).map((function(e){return{conversationID:e.conversationID,type:e.type,subType:e.subType,lastMessage:e.lastMessage,groupProfile:e.groupProfile,userProfile:e.userProfile}}));this.get(13).setItem("conversationMap",t,e)}},{key:"emitConvUpdate",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this.getLocalConvList();t&&(t=this.get(7))&&t.updateGroupLastMessage(n),e&&(this.get(12).isPartialUpdatedConvs()?(this._diffConvMap(this._convMapForDiff,this._convMap),0<this._partialUpdatedConvMap.size&&(this.emitOEvt(S.CONVERSATION_LIST_UPDATED),this.onTotalUnreadCountUpdate(),this._convMapForDiff.clear(),this._convMapForDiff=Qe(this._convMap,!0)),0===this._convMapForDiff.size&&(this._convMapForDiff=Qe(this._convMap,!0))):(this.emitOEvt(S.CONVERSATION_LIST_UPDATED),this.onTotalUnreadCountUpdate()))}},{key:"_diffConvMap",value:function(e,t){var n,o=T(t);try{for(o.s();!(n=o.n()).done;){var i=_(n.value,2),s=i[0],a=i[1];e.has(s)&&JSON.stringify(a)===e.get(s)||this._partialUpdatedConvMap.set(s,a)}}catch(r){o.e(r)}finally{o.f()}}},{key:"getPartialUpdatedConvs",value:function(){var e=m(Qe(this._partialUpdatedConvMap,!1).values());return this._partialUpdatedConvMap.clear(),e}},{key:"getLocalConvList",value:function(){var e=this;return m(this._convMap.values()).filter((function(t){return e._isConvNeedShow(t.conversationID)}))}},{key:"getLocalConversation",value:function(e){return this._convMap.get(e)}},{key:"hasLocalConversation",value:function(e){return this._convMap.has(e)}},{key:"getLocalOldestMessage",value:function(e){return this._msgListHandler.getLocalOldestMsg(e)}},{key:"syncConvList",value:function(){var e=this,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],n="syncConvList",o=new Jn(n);return this._pagingStatus===Sn&&this._convMap.clear(),this._pagingGetConvList(t).then((function(t){var i=Ht(e._pagingGetCostList),s=Bt(e._pagingGetCostList);return e._pagingGetCostList.length=0,e._pagingStatus=Dn,e._diffAndDeleteConv(),e.emitConvUpdate(!0,!1),e._setStorageConvList(),e._handleC2CPeerReadTime(),e.emitIEvt(xo.CONV_SYNC_COMPLETED),s="count:".concat(e._convMap.size," sum:").concat(s," avg:").concat(i),Ae.l("".concat(e._n,".").concat(n,". ").concat(s)),o.setMessage(s).end(),t})).catch((function(t){return e._pagingStatus=kn,o.setMessage(e._pagingTs).setError(t).end(),yn(t)}))}},{key:"_diffAndDeleteConv",value:function(){var e,t=this;this._isSyncCompleted()&&(e=[],this._convMap.forEach((function(n,o){!t._pagingConvIDMap.has(o)&&t._convIDFromUnreadDBMap.has(o)&&(t._convMap.delete(o),e.push(o))})),Ae.l("".concat(this._n,"._diffAndDeleteConv list:").concat(e)),e=null)}},{key:"_pagingGetConvList",value:function(){var e=this,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],n="".concat(this._n,"._pagingGetConvList"),o=(Ae.l("".concat(n," incrementalPullFlag:").concat(t," ts:").concat(this._pagingTs," startIdx:").concat(this._pagingStartIdx)+" pinnedTs:".concat(this._pagingPinnedTs," pinnedStartIdx:").concat(this._pagingPinnedStartIdx)),Date.now());return this._pagingStatus=En,this.req({P:Gn.PAGING_GET_CONV_LIST,data:{fromAccount:this.getMyUserID(),timeStamp:t?this._pagingTs:0,startIndex:t?this._pagingStartIdx:0,pinnedTimeStamp:t?this._pagingPinnedTs:0,pinnedStartIndex:t?this._pagingPinnedStartIdx:0,orderType:1}}).then((function(t){var i=(t=t.data).completeFlag,s=void 0===(s=t.conversations)?[]:s,a=t.timeStamp,r=t.startIndex,c=t.pinnedTimeStamp,u=t.pinnedStartIndex;if(t=t.groupItem,e._pagingGetCostList.push(Kt(o,!1)),Ae.l("".concat(n," ok. completeFlag:").concat(i," count:").concat(s.length," cost:").concat(Kt(o))),e._convGroupHandler.onConvGroupListSynced(t),0<s.length&&(t=e._getConvOptions(s),e._pagingConvIDMap=new Map([].concat(m(e._pagingConvIDMap),m(t.map((function(e){return[e.conversationID,1]}))))),e._updateLocalConvList({conversationOptionsList:t,isFromGetConversations:!0,updateUnreadCount:!0}),e.isLoggedIn())&&e.emitConvUpdate(),!e._isReady){if(!e.isLoggedIn())return vn();e.triggerReady()}return e._pagingTs=a,e._pagingStartIdx=r,e._pagingPinnedTs=c,e._pagingPinnedStartIdx=u,1!==i?e._pagingGetConvList():(e._handleGroupAtTipsList(),e._convGroupHandler.getRemoteConvGroupList(),vn())})).catch((function(t){throw!e.isLoggedIn()||e._isReady||(Ae.w("".concat(n," failed. error:"),t),e.triggerReady()),t}))}},{key:"_updateLocalConvList",value:function(e){var t=e.isFromGetConversations,n=Date.now();e=this._getTmpConvListMapping(e).newConvList,this._convMap=new Map(this._sortConvList(m(this._convMap))),t||this._updateUserOrGroupProfile(e),Ae.l("".concat(this._n,"._updateLocalConvList cost:").concat(Kt(n)))}},{key:"_getTmpConvListMapping",value:function(e){for(var t=e.conversationOptionsList,n=e.isFromGetConversations,o=e.isInstantMessage,i=e.isUnreadC2CMessage,s=void 0!==i&&i,a=e.updateUnreadCount,r=[],c=[],u=this.get(7),l=this.get(8),d=this.isIntl(),p=this.isUsingChatCore(),h=0,f=t.length;h<f;h++){var g=new oi(t[h],d,p),_=g.conversationID,m=g.type;if(!this._isNonExistentAccount(_)){if(this._convMap.has(_)){var v=this._convMap.get(_);if(n){this._convMap.set(_,g),m===E.CONV_C2C?g.unreadCount=v.unreadCount:m===E.CONV_GROUP&&(g.groupProfile=JSON.parse(JSON.stringify(v.groupProfile)));continue}var y=["unreadCount","allowType","adminForbidType","payload"],I=(!1===o&&y.push("lastMessage"),"boolean"==typeof o&&y.push("isPinned"),t[h].lastMessage),M=!ut(I);M||t[h].type===E.CONV_TOPIC||this._onLastMsgNotExist(t[h]),ut(o)&&M&&null===v.lastMessage.payload&&(v.lastMessage.payload=I.payload),Ve(v.lastMessage.revoker)||(v.lastMessage.revoker=null),Ze(v,g,y,[null,void 0,"",0,NaN]),!0===a&&v.updateUnreadCount({nextUnreadCount:g.unreadCount,isFromGetConversations:n,isUnreadC2CMessage:s}),o&&M&&(I.payload&&(v.lastMessage.payload=I.payload),v.type===E.CONV_GROUP)&&(v.lastMessage.nameCard=I.nameCard,v.lastMessage.nick=I.nick),M&&v.lastMessage.cloudCustomData!==I.cloudCustomData&&(v.lastMessage.cloudCustomData=I.cloudCustomData||"")}else m===E.CONV_GROUP&&u?(y=g.groupProfile.groupID,(M=u.getLocalGroupProfile(y))&&(g.groupProfile=M,!0===a)&&g.updateUnreadCount({nextUnreadCount:0})):m===E.CONV_C2C&&(v=_.replace(E.CONV_C2C,""),l)&&l.isMyFriend(v)&&(g.remark=l.getFriendRemark(v)),r.push(g),this._convMap.set(_,g);this._convMap.get(_).type===E.CONV_TOPIC&&c.push(this._convMap.get(_))}}for(var C=this.get(10),T=0,S=c.length;T<S;T++){var D,k=(D=c[T]).conversationID;Ve(D=D.groupAtInfoList)||C.onAtInfoUpdated({topicID:k.replace(E.CONV_GROUP,""),groupAtInfoList:D})}return{newConvList:r}}},{key:"_onLastMsgNotExist",value:function(e){new Jn("lastMsgNotExist").setMessage(JSON.stringify(e)).end()}},{key:"_sortConvList",value:function(e){var t=[],n=[],o=[],i=[];return e.forEach((function(e){(!0===e[1].isPinned?Ve(e[1].lastMessage.lastTime)?n:t:Ve(e[1].lastMessage.lastTime)?i:o).push(e)})),t.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime})).concat(n).concat(o.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime}))).concat(i)}},{key:"_sortConvListAndEmitEvent",value:function(){this._convMap=new Map(this._sortConvList(m(this._convMap))),this.emitConvUpdate(!0,!1)}},{key:"_updateUserOrGroupProfile",value:function(e){var t,n,o,i,s=this;0!==e.length&&(t=[],n=[],o=this.get(4),i=this.get(7),e.forEach((function(e){var o;e.type===E.CONV_C2C?t.push(e.toAccount):e.type===E.CONV_GROUP&&(o=e.toAccount,i.hasLocalGroup(o)?e.groupProfile=i.getLocalGroupProfile(o):n.push(o))})),Ae.l("".concat(this._n,"._updateUserOrGroupProfile userIDList:").concat(t," groupIDList:").concat(n)),0<t.length&&o.getUserProfile({userIDList:t}).then((function(e){Ye(e=e.data)?e.forEach((function(e){s._doUpdateUserProfile("".concat(E.CONV_C2C).concat(e.userID),e)})):s._doUpdateUserProfile("".concat(E.CONV_C2C).concat(e.userID),e)})),0<n.length)&&i.getGroupProfileAdvance({groupIDList:n,responseFilter:{groupBaseInfoFilter:["Type","Name","FaceUrl"]}}).then((function(e){e=e.data.successGroupList;var t=!1;e.forEach((function(e){var n="".concat(E.CONV_GROUP).concat(e.groupID);s._convMap.has(n)&&(Ze((n=s._convMap.get(n)).groupProfile,e,[],[null,void 0,"",0,NaN]),!n.subType&&e.type&&(n.subType=e.type),t=!0)})),t&&s.emitConvUpdate()}))}},{key:"_doUpdateUserProfile",value:function(e,t){this.hasLocalConversation(e)&&(this.getLocalConversation(e).userProfile=t,this.emitConvUpdate())}},{key:"_getConvOptions",value:function(e){var n=this,o=[],i=(e=e.filter((function(e){var t=e.type;return e=e.userID,1===t&&!n._isNonExistentAccount(e)||2===t})),this.getMyUserID());return e=e.map((function(e){var s;return ut(e.lastMsg)&&(e.lastMsg={elements:[]}),1===e.type?(s={userID:e.userID,nick:e.peerNick,avatar:e.peerAvatar},o.push(s),{conversationID:"".concat(E.CONV_C2C).concat(e.userID),type:E.CONV_C2C,lastMessage:{lastTime:e.time,lastSequence:e.sequence,fromAccount:e.lastC2CMsgFromAccount,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:null,payload:e.lastMsg.elements[0]?n._amendLayersOverLimitProp(e.lastMsg.elements[0].content):null,cloudCustomData:e.lastMsg.cloudCustomData||"",isRevoked:8===e.lastMessageFlag,onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:e.lastC2CMsgFromAccount===i&&e.time<=e.c2cPeerReadTime,revoker:e.lastMsg.revokerInfo?e.lastMsg.revokerInfo.revoker:null},unreadCount:0,userProfile:new Qo(s),peerReadTime:e.c2cPeerReadTime,isPinned:1===e.isPinned,customData:e.customMark||"",markList:Ft(e.standardMark),conversationGroupList:n._convGroupHandler.getConvGroupListByID(e.contactGroupId),remark:e.friendRemark||"",messageRemindType:n._transMsgRemindType(e.messageRemindType)}):{conversationID:"".concat(E.CONV_GROUP).concat(e.groupID),type:E.CONV_GROUP,lastMessage:t(t({lastTime:e.time,lastSequence:e.sequence,fromAccount:e.msgGroupFromAccount},n._patchTypeAndPayload(e)),{},{cloudCustomData:e.lastMsg.cloudCustomData||"",isRevoked:2===e.lastMessageFlag,onlineOnlyFlag:!1,nick:e.senderNick||"",nameCard:e.senderNameCard||"",revoker:e.lastMsg.revokerInfo?e.lastMsg.revokerInfo.revoker:null}),groupProfile:new ni({groupID:e.groupID,name:e.groupNick,avatar:e.groupImage,type:e.groupType,nextMessageSeq:e.nextMessageSeq}),unreadCount:n._computeGroupUnreadCount(e),peerReadTime:0,isPinned:1===e.isPinned,version:0,customData:e.customMark||"",markList:Ft(e.standardMark),conversationGroupList:n._convGroupHandler.getConvGroupListByID(e.contactGroupId),messageRemindType:n._transMsgRemindType(e.messageRemindType)}})),0<o.length&&this.get(4).onConvProfileUpdated(o),e}},{key:"_transMsgRemindType",value:function(e){var t="";return 0===e?t=E.MSG_REMIND_ACPT_AND_NOTE:1===e?t=E.MSG_REMIND_DISCARD:2===e?t=E.MSG_REMIND_ACPT_NOT_NOTE:3===e&&(t=E.NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT),t}},{key:"_computeGroupUnreadCount",value:function(e){var t;return 0<(t=(void 0===(t=e.unreadCount)?0:t)-(void 0===(e=e.noUnreadCount)?0:e))?t:0}},{key:"_patchTypeAndPayload",value:function(e){var n=(e=e.lastMsg).event,o=void 0===(o=e.elements)?[]:o;return e=void 0===(e=e.groupTips)?{}:e,ut(void 0===n?void 0:n)||Ve(e)?{type:o[0]?o[0].type:null,payload:o[0]?this._amendLayersOverLimitProp(o[0].content):null}:((n=new Co(e)).setElement({type:E.MSG_GRP_TIP,content:t(t({},e.elements),{},{groupProfile:e.groupProfile})}),o=JSON.parse(JSON.stringify(n.payload)),n=null,{type:E.MSG_GRP_TIP,payload:o})}},{key:"_amendLayersOverLimitProp",value:function(e){var t=e.layersOverLimit;return 0===t?e.layersOverLimit=!1:1===t&&(e.layersOverLimit=!0),e}},{key:"getLocalMessageList",value:function(e){return this._msgListHandler.getLocalMsgList(e)}},{key:"deleteLocalMessage",value:function(e){e instanceof Co&&this._msgListHandler.remove(e)}},{key:"onConvDeleted",value:function(e){Ye(e)&&(e=e.map((function(e){var t=e.type,n=e.userID;return e=e.groupID,1===t?"".concat(E.CONV_C2C).concat(n):2===t?"".concat(E.CONV_GROUP).concat(e):void 0})),Ae.l("".concat(this._n,".onConvDeleted convIDList:").concat(e)),this.deleteLocalConvList(e))}},{key:"onConvPinnedStatus",value:function(e,t){var n,o=this;Ye(e)&&(n=!1,e.forEach((function(e){var i,s=e.type,a=e.userID;e=e.groupID,1===s?i=o.getLocalConversation("".concat(E.CONV_C2C).concat(a)):2===s&&(i=o.getLocalConversation("".concat(E.CONV_GROUP).concat(e))),i&&(Ae.l("".concat(o._n,".onConvPinnedStatus convID:").concat(i.conversationID," localPinned:").concat(i.isPinned," remotePinned:").concat(t)),t?i.isPinned||(i.isPinned=!0,n=!0):i.isPinned&&(i.isPinned=!1,n=!0))})),n)&&this._sortConvListAndEmitEvent()}},{key:"getMessageList",value:function(e){var t=this,n=e.conversationID,o=e.nextReqMessageID,i=(e=e.count,"".concat(this._n,".getMessageList")),s="";if((r=this.getLocalConversation(n))&&r.groupProfile&&(s=r.groupProfile.type),yt(s))return Ae.l("".concat(i," not available in ").concat(s,". convID:").concat(n)),vn({messageList:[],nextReqMessageID:"",isCompleted:!0});(ut(e)||15<e)&&(e=15),o||this._isMeInCommunity(n)||this.clearMemMsg(n);var a=this._computeRemainingCount({conversationID:n,nextReqMessageID:o}),r=this._completedMap.has(n);return Ae.l("".concat(i," convID:").concat(n," isEverCleared:").concat(this._isEverCleared(n)," nextReqMessageID:").concat(o)+" remainingCount:".concat(a," count:").concat(e," isCompleted:").concat(r)),this._needGetHistory({conversationID:n,remainingCount:a,count:e})?this.getHistoryMessages({conversationID:n,nextReqMessageID:o,count:20}).then((function(e){var o=e.nextReqID,s=e.storedMessageList,r=e.assembledMessageList,c=(e=e.isPullingCompleted,t._completedMap.has(n)),u=s,l=(0<a&&(u=t._msgListHandler.getLocalMsgList(n).slice(0,s.length+a)),{nextReqMessageID:void 0,messageList:void 0,isCompleted:void 0});return t._isEverCleared(n)?(l.nextReqMessageID=o,l.messageList=r,l.isCompleted=e):(l.nextReqMessageID=c?"":o,l.messageList=u,l.isCompleted=c),s=l.messageList.filter((function(e){return e.isRevoked}))||[],r=l.messageList.map((function(e){return e.sequence})),Ae.l("".concat(i," ret.nextReqMessageID:").concat(l.nextReqMessageID," ret.isCompleted:").concat(l.isCompleted," sequenceList:"),r),Ye(s)&&0!==s.length?t.updateRevokerInfo(s).then((function(e){return e.forEach((function(e){var t=e.revokerInfo;l.messageList=l.messageList.map((function(n){return n.ID===e.ID&&t&&(n.revokeReason=t.reason||"",n.revokerInfo={userID:t.revoker||n.revoker,nick:t.nick,avatar:t.avatar}),n}))})),mn(l)})):mn(l)})):(this.modifyMessageList(n),vn(s=this._getMsgListFromMem({conversationID:n,nextReqMessageID:o,count:e})))}},{key:"_isEverCleared",value:function(e){return this._everClearedMap.has(e)}},{key:"_getMsgListFromMem",value:function(e){var t=e.conversationID,n=e.nextReqMessageID,o=(e=e.count,"".concat(this._n,"._getMsgListFromMem")),i=this._msgListHandler.getLocalMsgList(t),s=i.length,a=Ct(t),r=0,c={isCompleted:!1,nextReqMessageID:"",messageList:[]};return n?(r=a?i.findIndex((function(e){return e.ID===n})):i.findIndex((function(e){return e.sequence+""===n})))>e?(c.messageList=i.slice(r-e,r),c.nextReqMessageID=a?i[r-e].ID:i[r-e].sequence+""):(c.messageList=i.slice(0,r),c.isCompleted=!0):e<s?(c.messageList=i.slice(r=s-e,s),c.nextReqMessageID=a?i[r].ID:i[r].sequence+""):(c.messageList=i.slice(0,s),c.isCompleted=!0),e=c.messageList.map((function(e){return e.sequence})),Ae.l("".concat(o," convID:").concat(t)+" ret.nextReqMessageID:".concat(c.nextReqMessageID," ret.isCompleted:").concat(c.isCompleted," sequenceList:").concat(e)),c}},{key:"getMessageListHopping",value:function(e){var t,n,o=e.conversationID,i=e.sequence,s=e.time,a=e.count;return e=void 0===(e=e.direction)?0:e,(ut(a)||15<a)&&(a=15),o.startsWith(E.CONV_C2C)?(t=this.get(6),n=o.replace(E.CONV_C2C,""),t.getRoamingMessagesHopping({peerAccount:n,time:s,count:a,direction:e})):o.startsWith(E.CONV_GROUP)?(t=this.get(7),n=o.replace(E.CONV_GROUP,""),t.getRoamingMessagesHopping({groupID:n,sequence:i,count:a,direction:e})):void 0}},{key:"_computeRemainingCount",value:function(e){var t,n=e.conversationID,o=e.nextReqMessageID,i=(e=this._msgListHandler.getLocalMsgList(n)).length;return Ae.l("".concat(this._n,"._computeRemainingCount convID:").concat(n," nextReqMessageID:").concat(o," length:").concat(i)),o?(t=0,Ct(n)?t=e.findIndex((function(e){return e.ID===o})):Tt(n)&&(t=-1!==o.indexOf("-")?e.findIndex((function(e){return e.ID===o})):e.findIndex((function(e){return e.sequence+""===o}))),-1===t?0:t):i}},{key:"_needGetHistory",value:function(e){var t=e.conversationID,n=e.remainingCount,o=(e=e.count,this.getLocalConversation(t)),i="";return o&&o.groupProfile&&(i=o.groupProfile.type),!(St(t)||yt(i)||!this._isEverCleared(t)&&(o=n<=e&&!this._completedMap.has(t),Ae.l("".concat(this._n,"._needGetHistory convID:").concat(t," ret:").concat(o)),!o))}},{key:"_isTopicConv",value:function(e){return Mt(e=e.replace(E.CONV_GROUP,""))}},{key:"getHistoryMessages",value:function(e){var t,n,o,i,s,a,r=e.conversationID,c=e.count;return e=e.nextReqMessageID,r===E.CONV_SYSTEM?vn():(c=20<c?20:15,t=null,Ct(r)?(a=0,n="",o=!1,s=this._roamingMsgKeyAndTimeMap.has(r),e&&(o=!0,s?(a=this._roamingMsgKeyAndTimeMap.get(r).lastMessageTime,n=this._roamingMsgKeyAndTimeMap.get(r).messageKey):(i=this._msgListHandler.findMessage(e))&&(a=i.time,Ae.l("".concat(this._n,".getHistoryMessages convID:").concat(r," isRelayInfoExisted:").concat(s," lastMessageTime:").concat(a)))),(t=this.get(6)).getRoamingMessage({conversationID:r,peerAccount:r.replace(E.CONV_C2C,""),count:c,lastMessageTime:o?a:0,messageKey:o?n:""})):Tt(r)?(t=this.get(7))?(i=r.replace(E.CONV_GROUP,""),s=null,this._convMap.has(r)&&!Mt(i)&&(s=this._convMap.get(r).lastMessage),a=0,e?a=Number(e):s&&(a=s.lastSequence),t.getRoamingMessage({conversationID:r,groupID:i,count:c,sequence:a})):yn({code:Pn.NO_MODULE}):vn())}},{key:"patchConvLastMessage",value:function(e){var t,n,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=this.getLocalConversation(e);i&&(t=(n=i.lastMessage).messageForShow,n=n.payload,Ve(t)||Ve(n)||o)&&0!==(t=this._msgListHandler.getLocalMsgList(e)).length&&(n=t[t.length-1],Ae.l("".concat(this._n,".patchConvLastMessage bForceUpdate:").concat(o," convID:").concat(e," payload:"),n.payload),i.updateLastMessage(n))}},{key:"onRoamingMessage",value:function(){var e,n,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],s=3<arguments.length?arguments[3]:void 0,a=(u=1<arguments.length?arguments[1]:void 0).startsWith(E.CONV_C2C)?E.CONV_C2C:E.CONV_GROUP,r=null,c=[],u=[],l=0,d=o.length,p=a===E.CONV_GROUP,h=this.getFileDownloadProxy(),f=this.getDowloadFileAuthKey(),g=Ye(s),_=this.get(17).getFileDNList(),m=function(){p?--l:++l},v=function(){return p?d<=l:l<d};for(l=p?o.length-1:0,d=p?0:o.length;v();m())1!==o[l].isPlaceMessage&&((r=new Co(o[l])).to=o[l].to,a!==E.CONV_GROUP||ut(o[l].topicID)||(r.to=o[l].topicID),r.isSystemMessage=!!o[l].isSystemMessage,r.conversationType=a,e=4===o[l].event?{type:E.MSG_GRP_TIP,content:t(t({},o[l].elements),{},{groupProfile:o[l].groupProfile})}:o[l].elements,p||r.setNickAndAvatar({nick:o[l].nick,avatar:o[l].avatar}),Ve(e)?((n=new Jn("emptyMessageBody")).setMessage("from:".concat(r.from," to:").concat(r.to," sequence:").concat(r.sequence," event:").concat(o[l].event)),n.setLevel("warning").end()):(r.setElement(e,h,f,_),r.reInitialize(this.getMyUserID()),c.push(r),g&&s.push(r)));return m=v=null,i?(this._msgListHandler.unshift(c,u),c=null,u):c}},{key:"findMessage",value:function(e){return this._msgListHandler.findMessage(e)}},{key:"_isMeInCommunity",value:function(e){var t=!0;return this._isTopicConv(e)&&(e=Gt(e.replace(E.CONV_GROUP,"")),this.get(7).hasLocalGroup(e)||(t=!1,Ae.l("".concat(this._n,"._isMeInCommunity groupID:").concat(e," ret:").concat(t)))),t}},{key:"deleteTopicRoamingInfo",value:function(e){var t=this;It({groupID:e})&&this._msgListHandler.getTopicConvIDList(e).forEach((function(e){t.clearMemMsg(e)}))}},{key:"deleteGroupRoamingInfo",value:function(e){e="".concat(E.CONV_GROUP).concat(e),0<this._msgListHandler.getLocalMsgList(e).length&&this.clearMemMsg(e)}},{key:"setMessageRead",value:function(e){var t=e.conversationID,n=this.getLocalConversation(t);if(e="".concat(this._n,".setMessageRead"),Ae.l("".concat(e," convID:").concat(t," unreadCount:").concat(n?n.unreadCount:0)),!n)return vn();if(n.type!==E.CONV_GROUP&&n.type!==E.CONV_TOPIC||Ve(n.groupAtInfoList)||this.deleteGroupAtTips(t),0===n.unreadCount)return vn();var o=this._msgListHandler.getLocalLastMsg(t),i=n.lastMessage.lastTime,s=(i<(s=this._msgListHandler.getLocalMaxTime(t))&&(Ae.l("".concat(e," update lastMessageTime from ").concat(i," to ").concat(s)),i=s),this._msgListHandler.getLocalMaxSeq(t)),a=n.lastMessage.lastSequence,r=(a<s&&(Ae.l("".concat(e," update lastMessageSeq from ").concat(a," to ").concat(s)),a=s),n.type===E.CONV_TOPIC&&ut(o)&&(e=this.get(10),o=Gt(s=t.replace(E.CONV_GROUP,"")),e=e.getLocalTopic(o,s))&&(a=e.nextMessageSeq-1),null);switch(n.type){case E.CONV_C2C:return(r=this.get(6))?r.setMessageRead({conversationID:t,lastMessageTime:i}):yn({code:Pn.NO_MODULE});case E.CONV_GROUP:case E.CONV_TOPIC:return(r=this.get(7))?r.setMessageRead({conversationID:t,lastMessageSeq:a}):yn({code:Pn.NO_MODULE});case E.CONV_SYSTEM:return n.unreadCount=0,this.emitConvUpdate(!0,!1),vn();default:return vn()}}},{key:"setAllMessageRead",value:function(){var e,t=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o="setAllMessageRead",i="".concat(this._n,".").concat(o),s=(n.scope||(n.scope=E.READ_ALL_MSG),Ae.l("".concat(i," options:"),n),this._createSetAllMessageReadPack(n));return 0===s.readAllC2CMessage&&0===s.groupMessageReadInfoList.length?vn():(e=new Jn(o),this.req({P:Gn.SET_ALL_MSG_READ,data:s}).then((function(o){return o=o.data,o=t._handleAllMsgRead(o),e.setMessage("scope:".concat(n.scope," failureGroups:").concat(JSON.stringify(o))).end(),vn()})).catch((function(t){return e.setError(t).end(),Ae.w("".concat(i," failed. error:"),t),yn({code:t&&t.code?t.code:Pn.MSG_UNREAD_ALL_FAIL,message:t&&t.message?t.message:void 0})})))}},{key:"setConvCustomData",value:function(e){return this._convGroupHandler.setConvCustomData(e)}},{key:"markConv",value:function(e){return this._convGroupHandler.markConv(e)}},{key:"getConvGroupList",value:function(){return this._convGroupHandler.getLocalConvGroupList()}},{key:"createConvGroup",value:function(e){return this._convGroupHandler.createConvGroup(e)}},{key:"deleteConvGroup",value:function(e){return this._convGroupHandler.deleteConvGroup(e)}},{key:"renameConvGroup",value:function(e){return this._convGroupHandler.renameConvGroup(e)}},{key:"addConvsToGroup",value:function(e){return this._convGroupHandler.addConvsToGroup(e)}},{key:"deleteConvsFromGroup",value:function(e){return this._convGroupHandler.deleteConvsFromGroup(e)}},{key:"onConvMarkUpdated",value:function(e){this._convGroupHandler.onConvMarkUpdated(e)}},{key:"onConvGroupCreated",value:function(e){this._convGroupHandler.onConvGroupCreated(e)}},{key:"onConvGroupDeleted",value:function(e){this._convGroupHandler.onConvGroupDeleted(e)}},{key:"onConvGroupNameUpdated",value:function(e){this._convGroupHandler.onConvGroupNameUpdated(e)}},{key:"onConvInGroupUpdated",value:function(e){this._convGroupHandler.onConvInGroupUpdated(e)}},{key:"onConvAddedToOrDeletedFromGroup",value:function(e){this._convGroupHandler.onConvAddedToOrDeletedFromGroup(e)}},{key:"_getConvLastMessageSeq",value:function(e){var t=this._msgListHandler.getLocalLastMsg(e.conversationID);return e=e.lastMessage.lastSequence,t&&e<t.sequence?t.sequence:e}},{key:"_getConvLastMessageTime",value:function(e){var t=this._msgListHandler.getLocalLastMsg(e.conversationID);return e=e.lastMessage.lastTime,t&&e<t.time?t.time:e}},{key:"_createSetAllMessageReadPack",value:function(e){var t,n={readAllC2CMessage:0,groupMessageReadInfoList:[]},o=e.scope,i=T(this._convMap);try{for(i.s();!(t=i.n()).done;){var s,a=_(t.value,2)[1];if(0<a.unreadCount)if(a.type===E.CONV_C2C&&0===n.readAllC2CMessage){if(o===E.READ_ALL_MSG)n.readAllC2CMessage=1;else if(o===E.READ_ALL_C2C_MSG){n.readAllC2CMessage=1;break}}else a.type!==E.CONV_GROUP||o!==E.READ_ALL_GROUP_MSG&&o!==E.READ_ALL_MSG||(s=this._getConvLastMessageSeq(a),n.groupMessageReadInfoList.push({groupID:a.groupProfile.groupID,messageSequence:s}))}}catch(r){i.e(r)}finally{i.f()}return n}},{key:"onPushedAllMessageRead",value:function(e){this._handleAllMsgRead(e)}},{key:"_handleAllMsgRead",value:function(e){var t=e.groupMessageReadInfoList;return e=e.readAllC2CMessage,t=this._parseGroupReadInfo(t),1<=this._updateAllConvUnreadCount({readAllC2CMessage:e})&&this.emitConvUpdate(!0,!1),t}},{key:"_parseGroupReadInfo",value:function(e){var t=[];if(e&&e.length)for(var n=0,o=e.length;n<o;n++){var i=(r=e[n]).groupID,s=r.sequence,a=r.retCode,r=r.lastMessageSeq;ut(a)?this._remoteGroupReadSeqMap.set(i,r):(this._remoteGroupReadSeqMap.set(i,s),0!==a&&t.push("".concat(i,"-").concat(s,"-").concat(a)))}return t}},{key:"_updateAllConvUnreadCount",value:function(e){var t,n=e.readAllC2CMessage,o=0,i=T(this._convMap);try{for(i.s();!(t=i.n()).done;){var s,a,r,c,u=_(t.value,2),l=u[0],d=u[1];1<=d.unreadCount&&(1===n&&d.type===E.CONV_C2C?(s=this._getConvLastMessageTime(d),this.updateIsReadAfterReadReport({conversationID:l,lastMessageTime:s})):d.type===E.CONV_GROUP&&(a=l.replace(E.CONV_GROUP,""),this._remoteGroupReadSeqMap.has(a))&&(r=this._remoteGroupReadSeqMap.get(a),c=this._getConvLastMessageSeq(d),this.updateIsReadAfterReadReport({conversationID:l,remoteReadSequence:r}),r<=c)&&this._remoteGroupReadSeqMap.delete(a),this.updateUnreadCount(l,!1))&&(o+=1)}}catch(p){i.e(p)}finally{i.f()}return o}},{key:"isRemoteRead",value:function(e){var t,n=e.conversationID,o=(e=e.sequence,n.replace(E.CONV_GROUP,"")),i=!1;return this._remoteGroupReadSeqMap.has(o)&&(e<=(t=this._remoteGroupReadSeqMap.get(o))&&(i=!0,Ae.l("".concat(this._n,".isRemoteRead convID:").concat(n," msgSeq:").concat(e," remoteReadSeq:").concat(t))),t+10<=e)&&this._remoteGroupReadSeqMap.delete(o),i}},{key:"updateIsReadAfterReadReport",value:function(e){var t=e.conversationID,n=e.lastMessageSeq,o=e.lastMessageTime,i=this._msgListHandler.getLocalMsgList(t);if(0!==i.length)for(var s,a=i.length-1;0<=a;a--)if(s=i[a],!(o&&s.time>o||n&&s.sequence>n)){if("in"===s.flow&&s.isRead)break;s.setIsRead(!0)}}},{key:"updateUnreadCount",value:function(e){var t,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],o=!1,i=this.getLocalConversation(e),s=this._msgListHandler.getLocalMsgList(e);if(i)return(t=i.unreadCount)!==(s=s.filter((function(e){return!e.isRead&&!e._onlineOnlyFlag&&!e.isDeleted})).length)&&(i.unreadCount=s,o=!0,Ae.l("".concat(this._n,".updateUnreadCount from ").concat(t," to ").concat(s,", convID:").concat(e)),!0===n)&&this.emitConvUpdate(!0,!1),o&&i.type===E.CONV_TOPIC&&(t=i.unreadCount,s=this.get(10),n=e.replace(E.CONV_GROUP,""),s.onUnreadCountUpdatedFromConv(n,t)),o}},{key:"clearGroupAtInfoList",value:function(e){var t,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],o=this.getLocalConversation(e);o&&0<o.groupAtInfoList.length&&(o.clearGroupAtInfoList(),Ae.l("".concat(this._n,".clearGroupAtInfoList convID:").concat(e)),o.type===E.CONV_TOPIC&&(o=o.groupAtInfoList,t=this.get(10),e=e.replace(E.CONV_GROUP,""),t.onAtInfoUpdated({topicID:e,groupAtInfoList:o})),!0===n)&&this.emitConvUpdate(!0,!1)}},{key:"updateReadReceiptInfo",value:function(e){var t,n,o,i=this,s=void 0===(r=e.userID)?void 0:r,a=void 0===(r=e.groupID)?void 0:r,r=e.readReceiptList,c=void 0===(e=e.timestamp)?0:e;Ve(r)||(t=[],ut(s)?ut(a)||(n="".concat(E.CONV_GROUP).concat(a),r.forEach((function(e){var o=e.tinyID,s=e.clientTime,r=e.random,c=e.readCount;e=e.unreadCount,o="".concat(o,"-").concat(s,"-").concat(r),s=i._msgListHandler.getLocalMsg(n,o)||i._msgListHandler.getHoppingMsg(n,o),r={groupID:a,messageID:o,readCount:0,unreadCount:0},s&&(je(c)&&(s.readReceiptInfo.readCount=c,r.readCount=c),je(e)&&(s.readReceiptInfo.unreadCount=e,r.unreadCount=e),t.push(r))}))):(o="".concat(E.CONV_C2C).concat(s),r.forEach((function(e){var n=e.tinyID,a=e.clientTime;e=e.random,n="".concat(n,"-").concat(a,"-").concat(e),(a=i._msgListHandler.getLocalMsg(o,n)||i._msgListHandler.getHoppingMsg(o,n))&&!a.readReceiptInfo.isPeerRead&&(a.readReceiptInfo.isPeerRead=!0,a.readReceiptInfo.timestamp=c,t.push({userID:s,messageID:n,isPeerRead:!0,timestamp:c}))}))),0<t.length&&this.emitOEvt(S.MESSAGE_READ_RECEIPT_RECEIVED,t))}},{key:"updateIsRead",value:function(e){var t=this.getLocalConversation(e),n=this.getLocalMessageList(e);if(t&&0!==n.length&&!St(t.type)){for(var o=[],i=0,s=n.length;i<s;i++)"in"!==n[i].flow?"out"!==n[i].flow||n[i].isRead||n[i].setIsRead(!0):o.push(n[i]);var a=0;a=t.type===E.CONV_C2C?(e=o.slice(-t.unreadCount).filter((function(e){return e.isRevoked})).length,o.length-t.unreadCount-e):o.length-t.unreadCount;for(var r=0;r<a&&!o[r].isRead;r++)o[r].setIsRead(!0)}}},{key:"deleteGroupAtTips",value:function(e){var t,n,o,i=this,s="".concat(this._n,".deleteGroupAtTips"),a=(Ae.l("".concat(s)),this._convMap.get(e));return a&&0!==(t=a.groupAtInfoList).length?(a=void 0,e.startsWith(E.CONV_GROUP)&&(a=e.replace(E.CONV_GROUP,"")),n=m(t),(It({groupID:a})||Mt(a))&&0===(n=t.filter((function(e){return!e.atTypeArray.includes(E.CONV_AT_ALL)}))).length?(this.clearGroupAtInfoList(e,!1),Promise.resolve()):(o=this.getMyUserID(),this.req({P:Gn.DEL_GROUP_AT_TIPS,data:{messageListToDelete:n.map((function(e){return{from:e.from,to:o,messageSeq:e.__sequence,messageRandom:e.__random,groupID:ut(e.topicID)?e.groupID:e.topicID}}))}}).then((function(){return Ae.l("".concat(s," ok. count:").concat(t.length)),i.clearGroupAtInfoList(e,!1),Promise.resolve()})).catch((function(e){return Ae.e("".concat(s," failed. error:"),e),yn(e)})))):Promise.resolve()}},{key:"appendToMessageList",value:function(e){return this._msgListHandler.pushIn(e)}},{key:"setMessageRandom",value:function(e){this._sll.set(e.random)}},{key:"deleteMessageRandom",value:function(e){this._sll.delete(e.random)}},{key:"pushIntoMessageList",value:function(e,t,n){return!(!this._msgListHandler.pushIn(t,n)||this._sll.has(t.random)&&!n||(e.push(t),0))}},{key:"revoke",value:function(e,t,n){return this._msgListHandler.revoke(e,t,n)}},{key:"getPeerReadTime",value:function(e){return this._peerReadTimeMap.get(e)}},{key:"recordPeerReadTime",value:function(e,t){(!this._peerReadTimeMap.has(e)||this._peerReadTimeMap.get(e)<t)&&this._peerReadTimeMap.set(e,t)}},{key:"updateMsgIsPeerReadProp",value:function(e,t){var n;e.startsWith(E.CONV_C2C)&&0<t&&(0<(n=this._msgListHandler.updateMsgIsPeerReadProp(e,t)).length&&this.emitOEvt(S.MESSAGE_READ_BY_PEER,n),this._convMap.has(e))&&!Ve(n=this._convMap.get(e).lastMessage)&&n.fromAccount===this.getMyUserID()&&n.lastTime<=t&&!n.isPeerRead&&(n.isPeerRead=!0,this.emitConvUpdate(!0,!1))}},{key:"updateMsgIsModifiedProp",value:function(e){this._msgListHandler.updateMsgIsModifiedProp(e)}},{key:"setCompleted",value:function(e){Ae.l("".concat(this._n,".setCompleted convID:").concat(e)),this._completedMap.set(e,!0)}},{key:"updateRoamingMsgKeyAndTime",value:function(e,t,n){this._roamingMsgKeyAndTimeMap.set(e,{messageKey:t,lastMessageTime:n})}},{key:"getConvList",value:function(e){var t,n=this,o="".concat(this._n,".").concat("getConvList"),i="pagingStatus:".concat(this._pagingStatus,", local conversation count:").concat(this._convMap.size,", options:").concat(JSON.stringify(e));return Ae.l("".concat(o,". ").concat(i)),this._pagingStatus===kn?((t=new Jn("getConvList")).setMessage(i),this.syncConvList().then((function(){return t.end(),mn({conversationList:n._getConvList(e),isSyncCompleted:n._isSyncCompleted()})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))):(i=this._getConvList(e),Ae.l("".concat(o,". returned conversation count:").concat(i.length)),vn({conversationList:i,isSyncCompleted:this._isSyncCompleted()}))}},{key:"_getConvList",value:function(e){var t,n,o,i,s,a=this;return ut(e)?this.getLocalConvList():Ye(e)?0===e.length?[]:this.getLocalConvList().filter((function(t){return e.includes(t.conversationID)})):We(e)?(t=e.type,n=e.markType,o=e.groupName,i=e.hasUnreadCount,s=e.hasGroupAtInfo,this.getLocalConvList().filter((function(e){return a._filterType(e,t)&&a._filterMarkType(e,n)&&a._filterGroupName(e,o)&&a._filterUnreadCount(e,i)&&a._filterGroupAtInfo(e,s)}))):[]}},{key:"_filterType",value:function(e,t){return t!==E.CONV_C2C&&t!==E.CONV_GROUP||e.type===t}},{key:"_filterGroupName",value:function(e,t){return!ct(t)||(""===t?0===e.conversationGroupList.length:e.conversationGroupList.includes(t))}},{key:"_filterMarkType",value:function(e,t){return!je(t)||(0===t?0===e.markList.length:e.markList.includes(t))}},{key:"_filterUnreadCount",value:function(e,t){var n=!0;return!0===t?n=1<=e.unreadCount:!1===t&&(n=0===e.unreadCount),n}},{key:"_filterGroupAtInfo",value:function(e,t){var n=!0;return!0===t?n=1<=e.groupAtInfoList.length:!1===t&&(n=0===e.groupAtInfoList.length),n}},{key:"_handleC2CPeerReadTime",value:function(){var e,t=T(this._convMap);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2),o=n[0],i=n[1];i.type===E.CONV_C2C&&this.recordPeerReadTime(o,i.peerReadTime)}}catch(s){t.e(s)}finally{t.f()}}},{key:"_isPagingGetGroupListCompleted",value:function(){var e=this.get(7);return!e||e.isPagingGetCompleted()}},{key:"_getLocalGroupCount",value:function(){var e=this.get(7);return e?e.getLocalGroupList().length:0}},{key:"_hasLocalGroup",value:function(e){var t=this.get(7);return!!t&&t.hasLocalGroup(e.replace(E.CONV_GROUP,""))}},{key:"getConversationProfile",value:function(e){var t,n=this,o=!1;if(this._convMap.has(e)?t=this._convMap.get(e):(t=new oi({conversationID:e,type:Ct(e)?E.CONV_C2C:E.CONV_GROUP},this.isIntl(),this.isUsingChatCore()),o=!0),t._isInfoCompleted||t.type===E.CONV_SYSTEM)return vn({conversation:t});if(Tt(e)){if(!this.get(7))return yn({code:Pn.NO_MODULE});if(!this._hasLocalGroup(e))return vn({conversation:t})}var i="".concat(this._n,".").concat("getConversationProfile"),s=new Jn("getConversationProfile");return Ae.l("".concat(i,". convID:").concat(e," remark:").concat(t.remark," lastMessage:"),t.lastMessage),this._getUserOrGroupProfile(t).then((function(a){s.setMessage("convID:".concat(e," unreadCount:").concat(a.data.conversation.unreadCount)).end();var r,c=n.get(8);if(c&&t.type===E.CONV_C2C&&(r=e.replace(E.CONV_C2C,""),c.isMyFriend(r))&&(c=c.getFriendRemark(r),t.remark!==c)&&(t.remark=c,Ae.l("".concat(i,". convID:").concat(e," patch remark:").concat(t.remark))),Ae.l("".concat(i," ok. isNewConv:").concat(o," convID:").concat(e)),o){if(t.type===E.CONV_C2C)return n._onNewC2CConv([e.replace(E.CONV_C2C,"")]).then((function(){return vn({conversation:t})}));if(t.type===E.CONV_GROUP)return n._onNewGroupConv([e.replace(E.CONV_GROUP,"")]).then((function(){return vn({conversation:t})}))}return a})).catch((function(t){return s.setError(t).setMessage("convID:".concat(e)).end(),Ae.e("".concat(i," failed. error:"),t),yn(t)}))}},{key:"_getUserOrGroupProfile",value:function(e){var t=this;return e.type===E.CONV_C2C?this.get(4).getUserProfile({userIDList:[e.toAccount]}).then((function(n){return 0===(n=n.data).length?yn({code:Pn.USER_OR_GRP_NOT_FOUND}):(e.userProfile=n[0],e._isInfoCompleted=!0,t._insertConvAfterTopmost(e),vn({conversation:e}))})):this.get(7).getGroupProfile({groupID:e.toAccount}).then((function(n){return e.groupProfile=n.data.group,e._isInfoCompleted=!0,t._insertConvAfterTopmost(e),vn({conversation:e})}))}},{key:"_insertConvAfterTopmost",value:function(e){var t,n;e instanceof oi&&!this._convMap.has(e.conversationID)&&(n=(t=m(this._convMap)).findIndex((function(e){return!1===e[1].isPinned})),t.splice(n,0,[e.conversationID,e]),this._convMap=new Map(t),this._setStorageConvList(),this.emitConvUpdate(!0,!1))}},{key:"_onProfileUpdated",value:function(e){var t=this;e.data.forEach((function(e){var n=e.userID;n===t.getMyUserID()?t._onMyProfileModified({latestNick:e.nick,latestAvatar:e.avatar}):(n=t._convMap.get("".concat(E.CONV_C2C).concat(n)))&&(n.userProfile=e)}))}},{key:"_onCloudConfig",value:function(e){"0"===this.getCloudConfig("pull_on_invite")&&(this._bPullOnInvite=!1),Ae.l("".concat(this._n,"._onCloudConfig bPullOnInvite:").concat(this._bPullOnInvite))}},{key:"disableMsgPullOnInvite",value:function(){this._bPullOnInvite=!1}},{key:"_isSyncCompleted",value:function(){return this._pagingStatus===Dn}},{key:"_errorLog",value:function(e,t,n,o){var i=new Error("Params validate failed."),s="".concat(this.getErrMsg("API_REFER")).concat(e);throw Ae.w("[".concat(e,"] | ").concat(t," | ").concat(this.getErrMsg(n,o),", ").concat(s)),Ae.e("[".concat(e,"] Invalid ").concat(t,": type check failed for ").concat(t,".")),i}},{key:"_isValidConvID",value:function(e){return Ct(e)||Tt(e)||St(e)}},{key:"deleteConversation",value:function(e){var t=this,n="deleteConversation";return ct(e)||$e(e)||this._errorLog(n,"options","StringOrObjectRequiredLog"),ct(e)?(this._isValidConvID(e)||this._errorLog(n,"options","InvalidConversationID",e),Ae.l("".concat(this._n,".").concat(n," convID:").concat(e)),this.deleteConvList({conversationIDList:[e],flag:1})):(Ye(e.conversationIDList)||this._errorLog(n,"conversationIDList","ArrayRequiredLog"),0===e.conversationIDList.length&&this._errorLog(n,"conversationIDList","NonEmptyArrayLog"),e.conversationIDList.forEach((function(e){t._isValidConvID(e)||t._errorLog(n,"conversationIDList","InvalidConversationID",e)})),"clearHistoryMessage"in e&&"boolean"!=typeof e.clearHistoryMessage&&this._errorLog(n,"clearHistoryMessage","BooleanRequiredLog"),100<e.conversationIDList.length&&(e.conversationIDList=e.conversationIDList.slice(0,100)),this.deleteConvList(e))}},{key:"deleteConvList",value:function(e){var t=void 0===(t=e.conversationIDList)?[]:t,n=void 0===(n=e.clearHistoryMessage)||n,o=void 0===(e=e.flag)?0:e,i="".concat(this._n,".").concat("deleteConvList"),s=(e="convIDList:".concat(t," clearHistoryMessage:").concat(n),Ae.l("".concat(i," ").concat(e)),new Jn("deleteConvList"));return s.setMessage(e),Promise.all([this.rmLocalOnlyConvList(t),this.rmLocalAndRemoteConvList(t,n)]).then((function(e){return s.end(),0===(e=[].concat(m(e[0]),m(e[1]))).length?yn(new Nn({code:Pn.CONV_NOT_FOUND})):(Ae.l("".concat(i," ok")),vn(1===o?{conversationID:e[0]}:{conversationIDList:e}))})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)}))}},{key:"rmLocalOnlyConvList",value:function(e){var t=this;return e.filter((function(e){var n;return!!t._convMap.has(e)&&((n=t.getLocalConversation(e).type)!==E.CONV_GROUP||t._hasLocalGroup(e)?n===E.CONV_SYSTEM&&(t.get(7).deleteGroupSystemNotice({messageList:t._msgListHandler.getLocalMsgList(e)}),t.deleteLocalConv(e),!0):(t.deleteLocalConv(e),!0))}))}},{key:"rmLocalAndRemoteConvList",value:function(e,t){var n=this,o={fromAccount:this.getMyUserID(),conversationList:[],clearHistoryMessage:t?1:0};return e.forEach((function(e){var t;n._convMap.has(e)&&((t=n.getLocalConversation(e).type)===E.CONV_C2C?o.conversationList.push({toAccount:e.replace(t,""),type:1}):t===E.CONV_GROUP&&n._hasLocalGroup(e)&&o.conversationList.push({toGroupID:e.replace(t,""),type:2}))})),0===o.conversationList.length?[]:this.req({P:Gn.DEL_CONV,data:o}).then((function(e){var t=[];return 0<e.data.resultList.length&&e.data.resultList.map((function(e){0===e.code&&(e=1===e.type?"".concat(E.CONV_C2C).concat(e.to):"".concat(E.CONV_GROUP).concat(e.groupID),t.push(e))})),n.deleteLocalConvList(t),t}))}},{key:"setConvDraft",value:function(e){var t=e.conversationID,n=(e=e.draftText,"".concat(this._n,".").concat("setConvDraft"));return Ae.l("".concat(n," convID:").concat(t," draftText:").concat(e)),this._convMap.has(t)?((n=this._convMap.get(t)).setDraftText(e),this.emitConvUpdate(),vn({code:0,conversation:n})):yn({code:Pn.CONV_NOT_FOUND})}},{key:"clearHistoryMessage",value:function(e){var t=this,n={fromAccount:this.getMyUserID(),toAccount:void 0,type:void 0,toGroupID:void 0};if(!this._convMap.has(e))return yn({code:Pn.CONV_NOT_FOUND});var o=this._convMap.get(e).type;if(o===E.CONV_C2C)n.type=1,n.toAccount=e.replace(E.CONV_C2C,"");else{if(o!==E.CONV_GROUP)return o===E.CONV_SYSTEM?(this.get(7).deleteGroupSystemNotice({messageList:this._msgListHandler.getLocalMsgList(e)}),vn({conversationID:e})):yn({code:Pn.CONV_UN_RECORDED_TYPE});n.type=2,n.toGroupID=e.replace(E.CONV_GROUP,"")}var i="".concat(this._n,".").concat("clearHistoryMessage"),s=new Jn("clearHistoryMessage");return s.setMessage("convID:".concat(e)),Ae.l("".concat(i,". convID:").concat(e)),this.setMessageRead({conversationID:e}).then((function(){return t.req({P:Gn.CLEAR_HISTORY_MSG,data:n})})).then((function(){s.end(),Ae.l("".concat(i," ok")),t.clearMemMsg(e);var n=t.getLocalConversation(e);return n&&(n.updateLastMessage(),t._sortConvListAndEmitEvent()),vn({conversationID:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)}))}},{key:"pinConversation",value:function(e){var t,n,o,i=this,s=e.conversationID,a=e.isPinned,r=this.getLocalConversation(s);return r&&r.isPinned===a?vn({conversationID:s}):St(s)?(r&&(r.isPinned=a),this._sortConvListAndEmitEvent(),vn({conversationID:s})):(e=null,Ct(s)?e={type:1,toAccount:s.replace(E.CONV_C2C,"")}:Tt(s)&&(e={type:2,groupID:s.replace(E.CONV_GROUP,"")}),null===e?yn({code:Pn.INVALID_CONV_ID}):(t="".concat(this._n,".").concat("pinConversation"),n="convID:".concat(s," isPinned:").concat(a),(o=new Jn("pinConversation")).setMessage(n),Ae.l("".concat(t,". ").concat(n)),this.req({P:Gn.PIN_CONV,data:{fromAccount:this.getMyUserID(),operationType:!0===a?1:2,itemList:[e]}}).then((function(){return o.end(),Ae.l("".concat(t," ok")),r?r.isPinned!==a&&(r.isPinned=a):i._convMap.set(s,new oi({conversationID:s,type:Ct(s)?E.CONV_C2C:E.CONV_GROUP,isPinned:a},i.isIntl(),i.isUsingChatCore())),i._sortConvListAndEmitEvent(),mn({conversationID:s})})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))))}},{key:"setMessageRemindType",value:function(e){return this._msgRemindHandler.set(e)}},{key:"patchMsgRemindType",value:function(e){var t=e.ID,n=e.isC2CConversation,o=e.messageRemindType,i=!1;return(n=this.getLocalConversation("".concat(n?E.CONV_C2C:E.CONV_GROUP).concat(t)))&&n.messageRemindType!==o&&(n.messageRemindType=o,i=!0),Ae.l("".concat(this._n,".patchMsgRemindType options:"),e,"ret:".concat(i)),i}},{key:"onC2CMsgRemindTypeFetched",value:function(e){var t,n=this;Ye(e)&&0<e.length&&(t=0,e.forEach((function(e){var o=e.userID;e=e.muteFlag,e=n._transMsgRemindType(e),!0===n.patchMsgRemindType({ID:o,isC2CConversation:!0,messageRemindType:e})&&(t+=1)})),Ae.l("".concat(this._n,".onC2CMsgRemindTypeFetched updateCount:").concat(t)),1<=t)&&this.emitConvUpdate(!0,!1)}},{key:"onC2CMsgRemindTypeSynced",value:function(e){var t=this,n="".concat(this._n,".onC2CMsgRemindTypeSynced");e.dataList.forEach((function(e){var o;Ve(e.muteNotificationsSync)||(o=(e=e.muteNotificationsSync).to,e=e.muteFlag,e=t._transMsgRemindType(e),t.patchMsgRemindType({ID:o,isC2CConversation:!(o=0),messageRemindType:e})&&(o+=1),Ae.l("".concat(n," updateCount:").concat(o)),1<=o&&t.emitConvUpdate(!0,!1))}))}},{key:"onGroupMsgRemindTypeUpdated",value:function(e){this._msgRemindHandler.onGroupMsgRemindTypeUpdated(e)}},{key:"deleteLocalConv",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this._convMap.has(e);Ae.l("".concat(this._n,".deleteLocalConv convID:").concat(e," has:").concat(n)),n&&(this._convMap.delete(e),this._convMapForDiff.delete(e),this.clearMemMsg(e),this._setStorageConvList(!0),t)&&(n=!this._isTopicConv(e),this.emitConvUpdate(n,!1))}},{key:"pullMsgOnInvite",value:function(e){var t,n,o,i,s,a=this.get(7);a&&(t="".concat(this._n,".pullMsgOnInvite"),Ae.l("".concat(t," flag:").concat(this._bPullOnInvite)),this._bPullOnInvite)&&(s=this.getLocalLastMessage(e),n=this.getLocalSecondLastMessage(e),i=o=1,s&&(o=s.sequence),n&&(i=n.sequence),s=a.getGroupRemoteLastSeq(e.replace(E.CONV_GROUP,"")),Ae.l("".concat(t," convID:").concat(e," localLastSeq:").concat(o," localSecondLastSeq:").concat(i," remoteLastSeq:").concat(s)),this.clearMemMsg(e),1<o-i?this._recursiveGetMsgList([],e,!1,o,i):1<s-o&&this._recursiveGetMsgList([],e,!0,s,o))}},{key:"_recursiveGetMsgList",value:function(e,t,n,o,i,s){var a=this;this.getMessageList({conversationID:t,nextReqMessageID:s}).then((function(s){var r=(s=s.data).messageList,c=s.isCompleted,u=(s=s.nextReqMessageID,r.filter((function(e){return n?e.sequence>i&&e.sequence<=o:e.sequence>i&&e.sequence<o})));e.unshift.apply(e,m(u)),!c&&0<r.length&&r[0].sequence>i&&e.length<60?a._recursiveGetMsgList(e,t,n,o,i,s):a._emitMsgReceived(t,e)}))}},{key:"_emitMsgReceived",value:function(e,t){var n,o,i=this;0<t.length&&(t=t.filter((function(e,t,n){return t===n.findIndex((function(t){return t.sequence===e.sequence}))})),n=this.hasLocalConversation(e),o=t.map((function(e){return e.sequence})),Ae.l("".concat(this._n,"._emitMsgReceived convID:").concat(e," has:").concat(n," count:").concat(o.length," sequenceList:"),o),this.emitOEvt(S.MESSAGE_RECEIVED,t),n?this.patchConvLastMessage(e,!0):this.getConversationProfile(e).then((function(){i.patchConvLastMessage(e,!0)})))}},{key:"deleteLocalConvList",value:function(e){var t=this,n=!1;e.forEach((function(e){t._convMap.has(e)&&(t.deleteLocalConv(e,!1),n=!0)})),Ae.l("".concat(this._n,".deleteLocalConvList convID:").concat(e," isConvIDExisted:").concat(n)),n&&this.emitConvUpdate(!0,!1)}},{key:"isMessageSentByCurrentInstance",value:function(e){return!(!this._msgListHandler.hasLocalMsg(e.conversationID,e.ID)&&!this._sll.has(e.random))}},{key:"modifyMessageList",value:function(e){var t,n;e.startsWith(E.CONV_C2C)&&this._convMap.has(e)&&(n=this._convMap.get(e),t=Date.now(),this._msgListHandler.modifyMsgSentByPeer({conversationID:e,latestNick:n.userProfile.nick,latestAvatar:n.userProfile.avatar}),n=this.get(4).getNickAndAvatarByUserID(this.getMyUserID()),this._msgListHandler.modifyMsgSentByMe({conversationID:e,latestNick:n.nick,latestAvatar:n.avatar}),Ae.l("".concat(this._n,".modifyMessageList convID:").concat(e," cost:").concat(Kt(t))))}},{key:"updateUserProfileSpecifiedKey",value:function(e){Ae.l("".concat(this._n,".updateUserProfileSpecifiedKey options:"),e);var t=e.conversationID,n=e.nick;e=e.avatar,this._convMap.has(t)&&(t=this._convMap.get(t).userProfile,ct(n)&&t.nick!==n&&(t.nick=n),ct(e)&&t.avatar!==e&&(t.avatar=e),this.emitConvUpdate(!0,!1))}},{key:"_onMyProfileModified",value:function(e){var n=this,o=this.getLocalConvList(),i=Date.now();o.forEach((function(o){n.modifyMessageSentByMe(t({conversationID:o.conversationID},e))})),Ae.l("".concat(this._n,"._onMyProfileModified. modify all messages sent by me, cost:").concat(Kt(i)))}},{key:"modifyMessageSentByMe",value:function(e){this._msgListHandler.modifyMsgSentByMe(e)}},{key:"getLatestMessageSentByMe",value:function(e){return this._msgListHandler.getLatestMsgSentByMe(e)}},{key:"modifyMessageSentByPeer",value:function(e){this._msgListHandler.modifyMsgSentByPeer(e)}},{key:"getLatestMessageSentByPeer",value:function(e){return this._msgListHandler.getLatestMsgSentByPeer(e)}},{key:"pushIntoNoticeResult",value:function(e,t){return!(!this._msgListHandler.pushIn(t)||this._sll.has(t.random)||(e.push(t),0))}},{key:"getLocalLastMessage",value:function(e){return this._msgListHandler.getLocalLastMsg(e)}},{key:"getLocalSecondLastMessage",value:function(e){return this._msgListHandler.getLocalSecondLastMsg(e)}},{key:"checkAndPatchRemark",value:function(){var e,t,n=this.get(8);0!==this._convMap.size&&n&&0!==(e=m(this._convMap.values()).filter((function(e){return e.type===E.CONV_C2C}))).length&&(t=0,e.forEach((function(e){var o=e.conversationID.replace(E.CONV_C2C,"");n.isMyFriend(o)&&(o=n.getFriendRemark(o),e.remark!==o)&&(e.remark=o,t+=1)})),Ae.l("".concat(this._n,".checkAndPatchRemark. c2cConvCount:").concat(e.length," patchedCount:").concat(t)),0<t)&&this.emitConvUpdate(!0,!1)}},{key:"updateTopicConversation",value:function(e){this._updateLocalConvList({conversationOptionsList:e,isFromGetConversations:!0,updateUnreadCount:!0})}},{key:"sendReadReceipt",value:function(e){var t=e[0],n=null;return t.conversationType===E.CONV_C2C?n=this._m.get(6):t.conversationType===E.CONV_GROUP&&(n=this._m.get(7)),n?n.sendReadReceipt(e):yn({code:Pn.NO_MODULE})}},{key:"getReadReceiptList",value:function(e){var t=e[0],n=null;return t.conversationType===E.CONV_C2C?n=this._m.get(6):t.conversationType===E.CONV_GROUP&&(n=this._m.get(7)),n?n.getReadReceiptList(e):yn({code:Pn.NO_MODULE})}},{key:"getLastMessageTime",value:function(e){return(e=this.getLocalConversation(e))?e.lastMessage.lastTime:0}},{key:"getTotalUnreadCount",value:function(){var e=this.getLocalConvList(),t=0;return e.forEach((function(e){e.type===E.CONV_SYSTEM||""!==e.messageRemindType&&e.messageRemindType!==E.MSG_REMIND_ACPT_AND_NOTE||(t+=e.unreadCount)})),t}},{key:"onTotalUnreadCountUpdate",value:function(){var e=this.getTotalUnreadCount();this._convTotalUnreadCount!==e&&(Ae.l("".concat(this._n,".onTotalUnreadCountUpdate from ").concat(this._convTotalUnreadCount," to ").concat(e)),this._convTotalUnreadCount=e,this.emitOEvt(S.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED))}},{key:"_isConvNeedShow",value:function(e){var t,n;return e=this.getLocalConversation(e),!(!ut(e)&&(t=e.type===E.CONV_TOPIC,n=e.type===E.CONV_GROUP&&e.groupProfile.type===E.GRP_ROOM,e=e.type===E.CONV_GROUP&&e.groupProfile.type===E.GRP_LIVE,t||n||e))}},{key:"setAllRcvMsgOpt",value:function(e){return this._msgRemindHandler.setAllRcvMsgOpt(e)}},{key:"getAllRcvMsgOpt",value:function(){return this._msgRemindHandler.getAllRcvMsgOpt()}},{key:"onAllRcvMsgOptNotify",value:function(e){this._msgRemindHandler.onAllRcvMsgOptNotify(e)}},{key:"clearUnreadCount",value:function(e){(e=this.getLocalConversation(e))&&0<e.unreadCount&&(e.unreadCount=0,this.emitConvUpdate(!0,!1))}},{key:"storeHoppingMessageList",value:function(e){this._msgListHandler.storeHoppingMsgList(e)}},{key:"clearMemMsg",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];Ae.l("".concat(this._n,".clearMemMsg convID:").concat(e," isOverLimit:").concat(t)),this._msgListHandler.removeByConvID(e),this._completedMap.delete(e),this._roamingMsgKeyAndTimeMap.delete(e),this._everClearedMap.set(e,1)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._setStorageConvList(!0),this._pagingStatus=Sn,this._msgListHandler.reset(),this._msgRemindHandler.reset(),this._roamingMsgKeyAndTimeMap.clear(),this._sll.reset(),this._peerReadTimeMap.clear(),this._completedMap.clear(),this._convMap.clear(),this._pagingTs=0,this._pagingStartIdx=0,this._pagingPinnedTs=0,this._pagingPinnedStartIdx=0,this._remoteGroupReadSeqMap.clear(),this._convTotalUnreadCount=0,this._pagingGetCostList.length=0,this._pagingConvIDMap.clear(),this._convIDFromUnreadDBMap.clear(),this._pagingGetCostList.length=0,this._convMapForDiff.clear(),this._partialUpdatedConvMap.clear(),this._everClearedMap.clear(),this._bPullOnInvite=!0,this._convGroupHandler.reset(),this.resetReady()}}]),Xi),ci=(s(zi,[{key:"onCheckTimer",value:function(e){e%1==0&&0<this._cachedGroupTipsMap.size&&this._check()}},{key:"_check",value:function(){var e=this;this._cachedGroupTipsMap.forEach((function(t,n){var o=e._checkCountMap.get(n),i=e._grpM.hasLocalGroup(n);Ae.l("".concat(e._n,"._check groupID:").concat(n," hasLocalGroup:").concat(i," checkCount:").concat(o)),i?(e._notifyCachedGroupTips(n),e._checkCountMap.delete(n),e._grpM.deleteUnjoinedAVChatRoom(n)):o>=e.MAX_CHECK_COUNT?(e._deleteCachedGroupTips(n),e._checkCountMap.delete(n)):e._checkCountMap.set(n,++o)}))}},{key:"onNewGroupTips",value:function(e){Ae.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<n.length&&(this._grpM.emitOEvt(S.MESSAGE_RECEIVED,n),this._handleTips(n)),0<t.length&&(this._grpM.updateNextMessageSeq(t),this._grpM.get(11).onNewMessage({conversationOptionsList:t,isInstantMessage:!0}))}},{key:"_assembly",value:function(e){for(var n=e.event,o=e.dataList,i=null,s=[],a=[],r={},c=[],u=0,l=o.length;u<l;u++){var d=at(o[u]);if(6===n){if(this._grpM.isGroupAttributesUpdatedNotice(d))continue;if(this._grpM.isGroupCountersNotice(d))continue}var p=(_=d.groupProfile).groupID,h=void 0===(h=_.communityType)?0:h,f=void 0===(f=_.topicID)?void 0:f,g=_.invisible,_=void 0===(_=_.groupType)?void 0:_,m=void 0;if((y=this._grpM.isMessageFromTopic(h,f))&&(m=E.CONV_TOPIC,d.to=f),(v=this._grpM.hasLocalGroup(p))||!this._grpM.isUnjoinedAVChatRoom(p))if(v||y)if(this._grpM.isMessageFromOrToAVChatroom(p))d.event=n,c.push(d);else if(d.currentUser=this._grpM.getMyUserID(),d.conversationType=E.CONV_GROUP,(i=new Co(d)).setElement({type:E.MSG_GRP_TIP,content:t(t({},d.elements),{},{groupProfile:d.groupProfile})}),i.isSystemMessage=!1,1!==g){var v=this._grpM.get(11),y=(g=(y=i).conversationID,y.sequence);if(6===n)i._onlineOnlyFlag=!0,a.push(i);else if(!v.pushIntoNoticeResult(a,i))continue;this._grpM.isMessageFromCommunityOfTopic(h,f)||6===n&&v.getLocalConversation(g)||(6!==n&&this._qualityStat(i),h=v.isRemoteRead({conversationID:g,sequence:y}),ut(r[g])?(f=0,"in"!==i.flow||i._isExcludedFromUnreadCount||i._onlineOnlyFlag||h||(f=1),r[g]=s.push({conversationID:g,unreadCount:f,type:ut(m)?i.conversationType:m,subType:i.conversationSubType,lastMessage:i._isExcludedFromLastMessage?"":i})-1):(s[v=r[g]].type=i.conversationType,s[v].subType=i.conversationSubType,s[v].lastMessage=i._isExcludedFromLastMessage?"":i,"in"!==i.flow||i._isExcludedFromUnreadCount||i._onlineOnlyFlag||h||s[v].unreadCount++))}else this._qualityStat(i);else this._cacheAndCompare({groupID:p,event:n,item:d,groupType:_})}return{eventDataList:s,result:a,AVChatRoomMessageList:c}}},{key:"_qualityStat",value:function(e){this._grpM.get(26).addMessageSequence({key:Kn,message:e})}},{key:"_handleTips",value:function(e){var t=this;e.forEach((function(e){switch(e.payload.operationType){case 1:t._onNewMemberComeIn(e);break;case 2:t._onMemberQuit(e);break;case 3:t._onMemberKickedOut(e);break;case 4:t._onMemberSetAdmin(e);break;case 5:t._onMemberCancelledAdmin(e);break;case 6:t._onGroupProfileModified(e);break;case 7:t._onMemberInfoModified(e);break;case 8:t._onTopicProfileUpdated(e);break;default:Ae.w("".concat(t._n,"._handleTips unknown operationType:").concat(e.payload.operationType))}}))}},{key:"_onNewMemberComeIn",value:function(e){var t=(e=e.payload).memberNum;e=e.groupProfile.groupID,(e=this._grpM.getLocalGroupProfile(e))&&je(t)&&e.memberCount!==t&&(e.memberCount=t,this._updateConvGroupProfile(e))}},{key:"_onMemberQuit",value:function(e){var t=(n=e.payload).memberNum,n=n.groupProfile.groupID,o=this._grpM.getLocalGroupProfile(n);o&&je(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(n,e.payload.userIDList)}},{key:"_onMemberKickedOut",value:function(e){var t=(n=e.payload).memberNum,n=n.groupProfile.groupID,o=this._grpM.getLocalGroupProfile(n);o&&je(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(n,e.payload.userIDList)}},{key:"_updateConvGroupProfile",value:function(e){this._grpM.get(11).updateConvGroupProfile([e])}},{key:"_onMemberSetAdmin",value:function(e){var t=e.payload.groupProfile.groupID,n=(e=e.payload.userIDList,this._grpM.getGroupMemberHandler());e.forEach((function(e){(e=n.getLocalGroupMemberInfo(t,e))&&e.updateRole(E.GRP_MBR_ROLE_ADMIN)}))}},{key:"_onMemberCancelledAdmin",value:function(e){var t=e.payload.groupProfile.groupID,n=(e=e.payload.userIDList,this._grpM.getGroupMemberHandler());e.forEach((function(e){(e=n.getLocalGroupMemberInfo(t,e))&&e.updateRole(E.GRP_MBR_ROLE_MEMBER)}))}},{key:"_onGroupProfileModified",value:function(e){var t=this,n=(e=e.payload).newGroupProfile,o=e.groupProfile,i=e.operatorInfo,s=(e=o.groupID,this._grpM.getLocalGroupProfile(e));Object.keys(n).forEach((function(e){switch(e){case"ownerID":t._ownerChanged(s,n);break;case"groupName":s.name=n[e];break;default:s[e]=n[e]}})),ut(i)||Object.keys(i).forEach((function(e){"nameCard"===e?s.updateSelfInfo({nameCard:i[e]}):"role"===e&&s.updateSelfInfo({role:i[e]})})),o=!s.isSupportTopic,this._grpM.emitGroupListUpdate(!0,o)}},{key:"_ownerChanged",value:function(e,t){e=e.groupID;var n=this._grpM.getLocalGroupProfile(e),o=this._grpM.getMyUserID();o===t.ownerID&&(n.updateGroup({selfInfo:{role:E.GRP_MBR_ROLE_OWNER}}),n=(t=this._grpM.getGroupMemberHandler()).getLocalGroupMemberInfo(e,o),o=this._grpM.getLocalGroupProfile(e).ownerID,t=t.getLocalGroupMemberInfo(e,o),n&&n.updateRole(E.GRP_MBR_ROLE_OWNER),t)&&t.updateRole(E.GRP_MBR_ROLE_MEMBER)}},{key:"_onMemberInfoModified",value:function(e){var t=e.to,n=(o=e.payload).groupProfile,o=o.memberList,i=n.groupID,s=(Mt(t)&&this._updateTopicMuteTime(e),this._grpM.getGroupMemberHandler());o.forEach((function(e){var t=s.getLocalGroupMemberInfo(i,e.userID);t&&je(e.muteTime)&&t.updateMuteUntil(e.muteTime)}))}},{key:"_updateTopicMuteTime",value:function(e){var t=e.to,n=(e=e.payload).groupProfile,o=void 0===(e=e.memberList)?[]:e,i=(e=this._grpM.get(10),n=n.groupID,e.getLocalTopic(n,t));if(i){for(var s=!1,a=0;a<o.length;a++){var r=o[a];if(r.userID===this._grpM.getMyUserID()&&0<=r.muteTime){i.updateSelfInfo({muteTime:r.muteTime}),s=!0;break}}s&&this._grpM.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:i})}}},{key:"_onTopicProfileUpdated",value:function(e){var n=(o=e.payload).groupProfile.groupID,o=o.newTopicInfo;this._grpM.get(10).onTopicProfileUpdated(t({groupID:n,topicID:e.to},o))}},{key:"_cacheGroupTips",value:function(e,t){this._cachedGroupTipsMap.has(e)||this._cachedGroupTipsMap.set(e,[]),this._cachedGroupTipsMap.get(e).push(t)}},{key:"_deleteCachedGroupTips",value:function(e){this._cachedGroupTipsMap.has(e)&&this._cachedGroupTipsMap.delete(e)}},{key:"_notifyCachedGroupTips",value:function(e,t){var n=this,o=this._cachedGroupTipsMap.get(e)||[];Ae.l("".concat(this._n,"._notifyCachedGroupTips groupID:").concat(e," groupType:").concat(t," count:").concat(o.length)),o.forEach((function(e){n.onNewGroupTips(e)})),this._deleteCachedGroupTips(e)}},{key:"_cacheAndCompare",value:function(e){var t=e.groupID,n=e.event,o=e.item;e=e.groupType,Ae.l("".concat(this._n,"._cacheAndCompare groupID:").concat(t," groupType:").concat(e)),this._cacheGroupTips(t,{event:n,dataList:[o]}),n={groupID:t,type:e},e===E.GRP_AVCHATROOM?this._grpM.hasLocalGroup(t)?this._notifyCachedGroupTips(t,e):this._grpM.setUnjoinedAVChatRoom(t):(this._grpM.updateGroupMap([n]),this._notifyCachedGroupTips(t,e)),this._checkCountMap.has(t)||this._checkCountMap.set(t,0)}},{key:"reset",value:function(){this._cachedGroupTipsMap.clear(),this._checkCountMap.clear()}}]),zi),ui=(s(Yi,[{key:"onCheckTimer",value:function(e){e%1==0&&0<this._cachedGroupMessageMap.size&&this._check()}},{key:"_check",value:function(){var e=this;this._cachedGroupMessageMap.forEach((function(t,n){var o=e._checkCountMap.get(n),i=e._grpM.hasLocalGroup(n);Ae.l("".concat(e._n,"._check groupID:").concat(n," hasLocalGroup:").concat(i," checkCount:").concat(o)),i?(e._notifyCachedGroupMessage(n),e._checkCountMap.delete(n),e._grpM.deleteUnjoinedAVChatRoom(n)):o>=e.MAX_CHECK_COUNT?(e._deleteCachedGroupMessage(n),e._checkCountMap.delete(n)):e._checkCountMap.set(n,++o)}))}},{key:"updateLastMsg",value:function(e){var n="".concat(this._n,".updateLastMsg");if(0!==this._grpM.getGroupMap().size){for(var o,i,s,a,r=!1,c=e.length,u=0;u<c;u++)(o=e[u]).type===E.CONV_GROUP&&0!==o.lastMessage.lastSequence&&null!==o.lastMessage.payload&&(i=o.conversationID.split(/^GROUP/)[1],i=this._grpM.getLocalGroupProfile(i))&&(s=i.lastMessage,a=o.lastMessage,JSON.stringify(s)!==JSON.stringify(a))&&(i.lastMessage=t({},o.lastMessage),r=!0);Ae.l("".concat(n," convCount:").concat(c," groupCount:").concat(this._grpM.getLocalGroupList().length," isUpdated:").concat(r)),r&&(this._grpM.sortLocalGroupList(),this._grpM.emitGroupListUpdate(!0,!1))}else this.tempConversationList=e}},{key:"onNewMessage",value:function(e){var t,n=(t=this._assembly(e)).conversationOptionsList,o=t.messageList;0<(0<(0<(t=t.AVChatRoomMessageList).length&&this._grpM.onAVChatRoomMessage(t),t=mt(o)).length&&this._grpM.emitOEvt(S.MESSAGE_MODIFIED,t),0<n.length&&(this._grpM.get(11).onNewMessage({conversationOptionsList:n,isInstantMessage:!1!==e.isInstantMessage,updateUnreadCount:!1!==e.updateUnreadCount}),this._grpM.updateNextMessageSeq(n)),t=vt(o)).length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t),o.length=0}},{key:"_assembly",value:function(e){var t=e.dataList,n=e.event,o=e.isInstantMessage,i=null,s=[],a=[],r=[],c={},u=this._grpM.getFileDownloadProxy(),l=this._grpM.getDowloadFileAuthKey(),d=this._grpM.get(17).getFileDNList(),p=t.length;1<p&&t.sort((function(e,t){return e.sequence-t.sequence}));for(var h=this._grpM.get(11),f=this._grpM.get(4),g=0;g<p;g++){var _,m=at(t[g]),v=(C=m.groupProfile).groupID,y=void 0===(y=C.communityType)?0:y,I=void 0===(I=C.topicID)?void 0:I,M=C.invisible,C=void 0===(C=C.groupType)?void 0:C,T=void 0,S=this._grpM.isMessageFromTopic(y,I),D=(S&&(T=E.CONV_TOPIC,m.to=I),this._grpM.hasLocalGroup(v));!D&&this._grpM.isUnjoinedAVChatRoom(v)||(D||S?this._grpM.isMessageFromOrToAVChatroom(v)?(m.event=n,r.push(m)):(m.currentUser=this._grpM.getMyUserID(),m.conversationType=E.CONV_GROUP,m.isSystemMessage=!!m.isSystemMessage,(i=new Co(m)).setElement(m.elements,u,l,d),1!==M?(D=1===t[g].isModified,h.isMessageSentByCurrentInstance(i)?i.isModified=D:D=!1,1===m.onlineOnlyFlag?(i._onlineOnlyFlag=!0,h.isMessageSentByCurrentInstance(i)||a.push(i)):this._grpM.isMessageFromCommunityOfTopic(y,I)?a.push(i):(i.from===this._grpM.getMyUserID()&&(S=h.getLatestMessageSentByMe(i.conversationID))&&(M=S.nick,y=S.avatar,M===i.nick&&y===i.avatar||(h.modifyMessageSentByMe({conversationID:_,latestNick:i.nick,latestAvatar:i.avatar}),f.mockOnNickAvatarModified(i.nick,i.avatar))),h.pushIntoMessageList(a,i,D)&&(this._qualityStat(o,i),_=(I=i).conversationID,S=I.sequence,M=h.isRemoteRead({conversationID:_,sequence:S}),ut(c[_])?(y=0,"in"!==i.flow||i._isExcludedFromUnreadCount||M||(y=1),c[_]=s.push({conversationID:_,unreadCount:y,type:ut(T)?i.conversationType:T,subType:i.conversationSubType,lastMessage:i._isExcludedFromLastMessage?"":i})-1):(s[D=c[_]].type=ut(T)?i.conversationType:T,s[D].subType=i.conversationSubType,s[D].lastMessage=i._isExcludedFromLastMessage?"":i,"in"!==i.flow||i._isExcludedFromUnreadCount||M||s[D].unreadCount++)))):this._qualityStat(o,i)):this._cacheAndCompare({groupID:v,event:n,item:m,groupType:C}))}return{conversationOptionsList:s,messageList:a,AVChatRoomMessageList:r}}},{key:"_qualityStat",value:function(e,t){var n=this._grpM.get(26);n.addMessageSequence({key:Kn,message:t}),e&&0<t.clientTime&&n.addMessageDelay(t.clientTime)}},{key:"onMsgRevoked",value:function(e,t){var n=this,o=this._grpM.get(11),i=[],s=[];e.dataList.forEach((function(e){var t=e.elements.revokedInfos,n=e.revokerInfo,a=e.groupProfile,r=!1;a&&(r=It({groupID:a.groupID})||!Ve(a.topicID)),ut(t)||t.forEach((function(e){var t,c=Ve(e.topicID)?"GROUP".concat(e.groupID):"GROUP".concat(e.topicID),u=o.getLocalConversation(c),l=e.revokerInfo&&e.revokerInfo.revoker||n&&n.revoker,d=n&&n.reason||"";u&&yt(u.type)?t={conversationID:c,sequence:e.sequence,ID:"".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random)}:(u=o.revoke(c,e.sequence,e.random))?t=u:(t={conversationID:c,sequence:e.sequence},e.tinyID&&e.clientTime&&e.random&&(t.ID="".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random)),e.time&&(t.time=e.time)),t&&(t.revoker=l,t.revokeReason=d,t.revokerInfo={userID:l,nick:"",avatar:""},(r?(t.revokerInfo.nick=a.nick,t.revokerInfo.avatar=a.avatar,i):s).push(t))}))})),0===s.length&&0===i.length||(o.onMessageRevoked([].concat(i,s),t),0<i.length&&this._grpM.emitOEvt(S.MESSAGE_REVOKED,i),0<s.length&&o.updateRevokerInfo(s).then((function(e){n._grpM.emitOEvt(S.MESSAGE_REVOKED,e)})))}},{key:"_groupListTreeShaking",value:function(e){for(var t=new Map(m(this._grpM.getGroupMap())),n=0,o=e.length;n<o;n++)t.delete(e[n].groupID);this._grpM.hasJoinedAVChatRoom()&&this._grpM.getJoinedAVChatRoom().forEach((function(e){t.delete(e)})),this._grpM.getGroupMap().forEach((function(e,n){e.isSupportTopic&&t.delete(n)}));for(var i=m(t.keys()),s=0,a=i.length;s<a;s++)this._grpM.deleteGroup(i[s])}},{key:"syncGroupList",value:function(){var e,t,n=this,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0],i=(this._pagingStatus===Sn&&this._grpM.clearGroupMap(),m(U)),s=this.PAGING_GRP_COUNT_LIMIT,a=[];return!0===o?this._pagingGetGroupListWithTopic({limit:s,offset:0,groupBaseInfoFilter:i,groupList:a}):(o="syncGroupList",e="".concat(this._n,".").concat(o),t=new Jn(o),this._pagingGetGroupList({limit:s,offset:0,groupBaseInfoFilter:i,groupList:a}).then((function(){var o=Ht(n._pagingGetCostList),i=Bt(n._pagingGetCostList),s=(n._pagingGetCostList.length=0,n._pagingStatus=Dn,n._groupListTreeShaking(a),n._grpM.updateGroupMap(a),n._grpM.getLocalGroupList().length);return s="count:".concat(s," sum:").concat(i," avg:").concat(o),Ae.l("".concat(e," ok. ").concat(s)),t.setMessage(s).end(),n.tempConversationList&&(n.updateLastMsg(n.tempConversationList),n.tempConversationList=null),n._grpM.emitGroupListUpdate(!0,!0),mn({groupList:n._grpM.getLocalGroupList()})})).catch((function(o){return n._pagingStatus=kn,t.setError(o).end(),Ae.e("".concat(e," failed. error:"),o),yn(o)})))}},{key:"getGroupList",value:function(){var e,t=this,n="".concat(this._n,".").concat("getGroupList");return Ae.l("".concat(n," pagingStatus:").concat(this._pagingStatus)),this._pagingStatus===kn||this._pagingStatus===Sn?this.syncGroupList().then((function(){return mn({groupList:t._grpM.getLocalGroupList(),isSyncCompleted:t.isPagingGetCompleted()})})).catch((function(e){return Ae.e("".concat(n," failed. error:"),e),yn(e)})):(e=this._grpM.getLocalGroupList(),Ae.l("".concat(n,". returned group count:").concat(e.length)),vn({groupList:e,isSyncCompleted:this.isPagingGetCompleted()}))}},{key:"isPagingGetCompleted",value:function(){return this._pagingStatus===Dn}},{key:"_pagingGetGroupList",value:function(e){var t=this,n="".concat(this._n,".").concat("_pagingGetGroupList"),o=e.isCommunityRelay,i=void 0!==o&&o,s=e.limit,a=e.offset,r=e.groupBaseInfoFilter,c=e.groupList,u=Date.now();return this._grpM.req({P:Gn.GET_GRP_LIST,data:{type:i?E.GRP_COMMUNITY:void 0,memberAccount:this._grpM.getMyUserID(),limit:s,offset:a,responseFilter:{groupBaseInfoFilter:r,selfInfoFilter:["Role","JoinTime","MsgFlag","MsgSeq"]}}}).then((function(e){var o=void 0===(o=(e=e.data).groups)?[]:o,l=(e=e.totalCount,c.push.apply(c,m(o)),t._handleGroupAtInfoWithoutTopic(i,o),!((o=a+s)<e));return e="offset:".concat(a," limit:").concat(s," total:").concat(e," isCompleted:").concat(l," ")+"current:".concat(c.length," isCommunityRelay:").concat(i),t._pagingGetCostList.push(Kt(u,!1)),Ae.l("".concat(n," ok. ").concat(e," cost:").concat(Kt(u))),i||l?!i&&l?(Ae.l("".concat(n," start to get community list")),a=0,t._pagingGetGroupList({limit:s,offset:a,groupBaseInfoFilter:r,groupList:c,isCommunityRelay:!0})):i&&!l?(a=o,t._pagingGetGroupList({limit:s,offset:a,groupBaseInfoFilter:r,groupList:c,isCommunityRelay:!0})):mn({groupList:c}):(a=o,t._pagingGetGroupList({limit:s,offset:a,groupBaseInfoFilter:r,groupList:c}))})).catch((function(e){return 10018===e.code?(Ae.w("".concat(t.logPrefix," response size exceeds the limit, request count:").concat(s)),s=50,t._pagingGetGroupList({limit:s,offset:a,groupBaseInfoFilter:r,groupList:c,isCommunityRelay:i})):i?(11e3===e.code&&Ae.l("".concat(n," ok. community unavailable")),vn({groupList:c})):yn(e)}))}},{key:"_pagingGetGroupListWithTopic",value:function(e){var t=this,n="".concat(this._n,"._pagingGetGroupListWithTopic"),o=e.limit,i=e.offset,s=e.groupBaseInfoFilter,a=e.groupList,r=Date.now();return this._grpM.req({P:Gn.GET_GRP_LIST,data:{type:E.GRP_COMMUNITY,memberAccount:this._grpM.getMyUserID(),limit:o,offset:i,responseFilter:{groupBaseInfoFilter:s,selfInfoFilter:m(x)},isSupportTopic:1,needAppDefineData:1}}).then((function(e){var c=(e=e.data).groups,u=(e=e.totalCount,a.push.apply(a,m(void 0===c?[]:c)),!((c=i+o)<e));return Ae.l("".concat(n," ok. offset:").concat(i," limit:").concat(o," totalCount:").concat(e," isCompleted:").concat(u," currentCount:").concat(a.length," cost:").concat(Kt(r))),u?(t._grpM.updateGroupMap(a),t._grpM.emitGroupListUpdate(!0,!1),mn({groupList:e=t._grpM.getLocalGroupList().filter((function(e){return!0===e.isSupportTopic}))})):(i=c,t._pagingGetGroupListWithTopic({limit:o,offset:i,groupBaseInfoFilter:s,groupList:a}))})).catch((function(e){return 10018===e.code?(Ae.w("".concat(t.logPrefix," response size exceeds the limit, request count:").concat(o)),o=50,t._pagingGetGroupListWithTopic({limit:o,offset:i,groupBaseInfoFilter:s,groupList:a})):yn(e)}))}},{key:"_cacheGroupMessage",value:function(e,t){this._cachedGroupMessageMap.has(e)||this._cachedGroupMessageMap.set(e,[]),this._cachedGroupMessageMap.get(e).push(t)}},{key:"_deleteCachedGroupMessage",value:function(e){this._cachedGroupMessageMap.has(e)&&this._cachedGroupMessageMap.delete(e)}},{key:"_notifyCachedGroupMessage",value:function(e,t){var n=this,o=this._cachedGroupMessageMap.get(e)||[];Ae.l("".concat(this._n,"._notifyCachedGroupMessage groupID:").concat(e," groupType:").concat(t," count:").concat(o.length)),o.forEach((function(e){n.onNewMessage(e)})),this._deleteCachedGroupMessage(e)}},{key:"_cacheAndCompare",value:function(e){var t=e.groupID,n=e.event,o=e.item;e=e.groupType,Ae.l("".concat(this._n,"._cacheAndCompare groupID:").concat(t," groupType:").concat(e)),this._cacheGroupMessage(t,{event:n,dataList:[o]}),n={groupID:t,type:e},e===E.GRP_AVCHATROOM?this._grpM.hasLocalGroup(t)?this._notifyCachedGroupMessage(t,e):this._grpM.setUnjoinedAVChatRoom(t):(this._grpM.updateGroupMap([n]),this._notifyCachedGroupMessage(t,e)),this._checkCountMap.has(t)||this._checkCountMap.set(t,0)}},{key:"_handleGroupAtInfoWithoutTopic",value:function(e,n){var o=this;e&&0!==n.length&&n.forEach((function(e){var n=e.groupID,i=(e=e.groupAtInfoList,[]);ut(e)||(e.forEach((function(e){i.push(t(t({},e),{},{groupID:n}))})),o._grpM.get(11).onNewGroupAtTips({dataList:i}))}))}},{key:"setPagingGroupCount",value:function(e){ut(e)||(this.PAGING_GRP_COUNT_LIMIT=parseInt(e,10))}},{key:"reset",value:function(){this.PAGING_GRP_COUNT_LIMIT=200,this._cachedGroupMessageMap.clear(),this._checkCountMap.clear(),this._pagingStatus=Sn,this._pagingGetCostList=[]}}]),Yi),li=(s(Wi,[{key:"_onCloudConfig",value:function(){var e=this._grpM.getCloudConfig("grp_attr_cache_time");ut(e)||(this.CACHE_EXPIRE_TIME=Number(e))}},{key:"updateLocalMainSequenceOnReconnected",value:function(){this._groupAttributesMap.forEach((function(e){e.localMainSequence=0}))}},{key:"isGroupAttributesUpdatedNotice",value:function(e){var t=e.to,n=(e=e.elements.newGroupProfile,!ut(e)&&!Ve(e.groupAttributeOption));return n&&this._onGroupAttributesUpdated({groupID:t,groupAttributeOption:e.groupAttributeOption}),n}},{key:"_onGroupAttributesUpdated",value:function(e){var t,n=this,o=e.groupID,i=(e=e.groupAttributeOption).mainSequence,s=e.isWithChangedAttributeInfo,a=void 0===(a=e.groupAttributeList)?[]:a;e=e.operationType,Ae.l("".concat(this._n,".onGroupAttributesUpdated. ")+"groupID:".concat(o," isWithChangedAttributeInfo:").concat(s," operationType:").concat(e)),ut(e)||(this._groupAttributesCopy=this._getCachedAttributes({groupID:o}),0!=(t=i-this._getLocalGroupAttributes(o).localMainSequence)&&(1===s&&1==t?(this._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:i,groupAttributeList:a,operationType:e}),this._emitGroupAttributesUpdated(o)):this._hasLocalGroupAttributes(o)&&(s=this._getLocalGroupAttributes(o).avChatRoomKey,this._getGroupAttributes({groupID:o,avChatRoomKey:s}).then((function(){n._emitGroupAttributesUpdated(o)})))))}},{key:"initGroupAttributesCache",value:function(e){var t=e.groupID;e=void 0===(e=e.avChatRoomKey)?void 0:e,this._groupAttributesMap.set(t,{lastUpdateTime:0,localMainSequence:0,remoteMainSequence:0,attributes:new Map,avChatRoomKey:e}),Ae.l("".concat(this._n,".initGroupAttributesCache groupID:").concat(t," avChatRoomKey:").concat(e))}},{key:"initGroupAttributes",value:function(e){var t=this,n=e.groupID,o=e.groupAttributes,i=(e=this._getLocalGroupAttributes(n)).remoteMainSequence,s=(e=e.avChatRoomKey,new Jn("initGroupAttributes"));return s.setMessage("groupID:".concat(n," avChatRoomKey:").concat(e," mainSequence:").concat(i)),this._grpM.req({P:Gn.SET_GRP_ATTR,data:{groupID:n,avChatRoomKey:e,mainSequence:i,groupAttributeList:this._transformGroupAttributes(o)}}).then((function(e){Ae.l("".concat(t._n,".").concat("initGroupAttributes"," ok. groupID:").concat(n));var i=(e=e.data).mainSequence;return(e=m(e.groupAttributeList)).forEach((function(e){e.value=o[e.key]})),t._groupAttributesCopy=t._getCachedAttributes({groupID:n}),t._refreshCachedGroupAttributes({groupID:n,remoteMainSequence:i,groupAttributeList:e,operationType:1}),t._emitGroupAttributesUpdated(n),s.end(),mn({groupAttributes:o})})).catch((function(e){return s.setError(e).end(),yn(e)}))}},{key:"setGroupAttributes",value:function(e){var t=this,n="".concat(this._n,".").concat("setGroupAttributes"),o=e.groupID,i=e.groupAttributes,s=(e=this._getLocalGroupAttributes(o)).remoteMainSequence,a=e.avChatRoomKey,r=e.attributes,c=((e=this._transformGroupAttributes(i)).forEach((function(e){var t=e.key;e.sequence=0,r.has(t)&&(e.sequence=r.get(t).sequence)})),new Jn("setGroupAttributes"));return c.setMessage("groupID:".concat(o," groupAttributes:").concat(JSON.stringify(i))),Ae.l("".concat(n,". groupID:").concat(o," mainSequence:").concat(s)),this._grpM.req({P:Gn.MODIFY_GRP_ATTR,data:{groupID:o,avChatRoomKey:a,mainSequence:s,groupAttributeList:e}}).then((function(e){Ae.l("".concat(n," ok."));var s=(e=e.data).mainSequence;return(e=m(e.groupAttributeList)).forEach((function(e){e.value=i[e.key]})),t._groupAttributesCopy=t._getCachedAttributes({groupID:o}),t._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:s,groupAttributeList:e,operationType:2}),t._emitGroupAttributesUpdated(o),c.end(),mn({groupAttributes:i})})).catch((function(e){return c.setError(e).end(),yn(e)}))}},{key:"deleteGroupAttributes",value:function(e){var t=this,n=e.groupID,o=(e=void 0===(e=e.keyList)?[]:e,(r=this._getLocalGroupAttributes(n)).remoteMainSequence),i=r.avChatRoomKey,s=r.attributes,a=m(s.keys()),r=Gn.CLEAR_GRP_ATTR,c=3,u=(i={groupID:n,avChatRoomKey:i,mainSequence:o},[]),l=(0<e.length&&(a=[],r=Gn.DEL_GRP_ATTR,c=4,e.forEach((function(e){var t=0;s.has(e)&&(t=s.get(e).sequence,a.push(e)),u.push({key:e,sequence:t})})),i.groupAttributeList=u),new Jn("deleteGroupAttributes"));return l.setMessage("groupID:".concat(n," mainSequence:").concat(o," keyList:").concat(e," proto:").concat(r)),this._grpM.req({P:r,data:i}).then((function(e){return Ae.l("".concat(t._n,".").concat("deleteGroupAttributes"," ok. groupID:").concat(n)),e=e.data.mainSequence,t._groupAttributesCopy=t._getCachedAttributes({groupID:n}),t._refreshCachedGroupAttributes({groupID:n,remoteMainSequence:e,groupAttributeList:u,operationType:c}),t._emitGroupAttributesUpdated(n),l.end(),mn({keyList:a})})).catch((function(e){return l.setError(e).end(),yn(e)}))}},{key:"getGroupAttributes",value:function(e){var t=this,n="".concat(this._n,".").concat("getGroupAttributes"),o=e.groupID,i=(r=this._getLocalGroupAttributes(o)).avChatRoomKey,s=r.lastUpdateTime,a=r.localMainSequence,r=r.remoteMainSequence,c=new Jn("getGroupAttributes");return c.setMessage("groupID:".concat(o," localMainSequence:").concat(a," remoteMainSequence:").concat(r," keyList:").concat(e.keyList)),Date.now()-s>=this.CACHE_EXPIRE_TIME||a<r?this._getGroupAttributes({groupID:o,avChatRoomKey:i}).then((function(i){return c.setMoreMessage("get attributes from remote. count:".concat(i.length)).end(),Ae.l("".concat(n," from remote. groupID:").concat(o)),mn({groupAttributes:i=t._getCachedAttributes(e)})})).catch((function(e){return c.setError(e).end(),yn(e)})):(c.setMoreMessage("get attributes from cache").end(),Ae.l("".concat(n," from cache. groupID:").concat(o)),vn({groupAttributes:s=this._getCachedAttributes(e)}))}},{key:"_getGroupAttributes",value:function(e){var n=this,o=0;return ut(e.avChatRoomKey)||(o=1),this._grpM.req({P:Gn.GET_GRP_ATTR,data:t(t({},e),{},{groupType:o})}).then((function(t){Ae.l("".concat(n._n,"._getGroupAttributes ok. groupID:").concat(e.groupID));var o=(t=t.data).mainSequence,i=m(t=t.groupAttributeList);return ut(o)||n._refreshCachedGroupAttributes({groupID:e.groupID,remoteMainSequence:o,groupAttributeList:i,operationType:5}),t})).catch((function(e){return yn(e)}))}},{key:"_refreshCachedGroupAttributes",value:function(e){var t=e.groupID,n=e.remoteMainSequence,o=e.groupAttributeList;if(e=e.operationType,this._hasLocalGroupAttributes(t)){var i=this._getLocalGroupAttributes(t),s=i.localMainSequence;if(5===e||n-s==1)i.remoteMainSequence=n,i.localMainSequence=n,i.lastUpdateTime=Date.now(),this._updateCachedAttributes({groupAttributes:i,groupAttributeList:o,operationType:e});else{if(s===n)return;i.remoteMainSequence=n}this._groupAttributesMap.set(t,i),o="operationType:".concat(e," localMainSequence:").concat(s," remoteMainSequence:").concat(n),Ae.l("".concat(this._n,"._refreshCachedGroupAttributes. ").concat(o))}}},{key:"_getCachedAttributes",value:function(e){var t=e.groupID,n=(e=void 0===(e=e.keyList)?[]:e,{});if(this._hasLocalGroupAttributes(t)){var o=this._getLocalGroupAttributes(t).attributes;if(0<e.length)e.forEach((function(e){o.has(e)&&(n[e]=o.get(e).value)}));else{var i,s=T(o.keys());try{for(s.s();!(i=s.n()).done;){var a=i.value;n[a]=o.get(a).value}}catch(r){s.e(r)}finally{s.f()}}}return n}},{key:"_updateCachedAttributes",value:function(e){var t=e.groupAttributes,n=e.groupAttributeList;3!==(e=e.operationType)?4!==e?(1===e&&t.attributes.clear(),n.forEach((function(e){var n=e.key,o=e.value;e=e.sequence,t.attributes.set(n,{value:o,sequence:e})}))):n.forEach((function(e){t.attributes.delete(e.key)})):t.attributes.clear()}},{key:"_hasLocalGroupAttributes",value:function(e){return this._groupAttributesMap.has(e)}},{key:"_getLocalGroupAttributes",value:function(e){return this._hasLocalGroupAttributes(e)||this.initGroupAttributesCache({groupID:e}),this._groupAttributesMap.get(e)}},{key:"_transformGroupAttributes",value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push({key:n,value:e[n]})})),t}},{key:"_emitGroupAttributesUpdated",value:function(e){var t=this._getCachedAttributes({groupID:e}),n=(o=this._computeAttrChangedInfo(t)).updatedKeyList,o=o.deletedKeyList;Ae.l("".concat(this._n,"._emitGroupAttributesUpdated update:").concat(n.length,", delete:").concat(o.length)),0===n.length&&0===o.length||this._grpM.emitOEvt(S.GROUP_ATTRIBUTES_UPDATED,{groupID:e,groupAttributes:t,updatedKeyList:n,deletedKeyList:o})}},{key:"_computeAttrChangedInfo",value:function(e){var t=this,n=[],o=[];return Object.keys(e).forEach((function(o){e[o]!==t._groupAttributesCopy[o]&&n.push(o)})),Object.keys(this._groupAttributesCopy).forEach((function(t){ut(e[t])&&o.push(t)})),this._groupAttributesCopy={},{updatedKeyList:n,deletedKeyList:o}}},{key:"deleteLocalGroupAttributes",value:function(e){this._hasLocalGroupAttributes(e)&&this._groupAttributesMap.delete(e)}},{key:"reset",value:function(){this._groupAttributesMap.clear(),this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4}}]),Wi),di=(s($i,[{key:"_onCloudConfig",value:function(){var e=this._grpM.getCloudConfig("grp_counter_expire_time");ut(e)||(this.EXPIRE_TIME=Number(e))}},{key:"isGroupCountersNotice",value:function(e){var t=e.to,n=!1;return Ve(e=e.elements.groupCounterInfo)||(this._onGroupCountersUpdated({groupID:t,groupCounterInfo:e}),n=!0),n}},{key:"_onGroupCountersUpdated",value:function(e){var t=this,n=e.groupID;e.groupCounterInfo.forEach((function(e){var o=e.type,i=e.groupCounterSeq;e=void 0===(e=e.counterList)?[]:e,0!==o&&2!==o||(t._updateLocalGroupCounters({groupID:n,groupCounterSeq:i,counterList:e}),e.forEach((function(e){t._grpM.emitOEvt(S.GROUP_COUNTER_UPDATED,{groupID:n,key:e.key,value:e.value})}))),1===o&&t._deleteLocalGroupCounters({groupID:n,groupCounterSeq:i,counterList:e})})),Ae.l("".concat(this._n,"._onGroupCountersUpdated groupID:").concat(n))}},{key:"initGroupCountersCache",value:function(e){var t=e.groupID;e=e.avChatRoomKey,this._groupCountersMap.set(t,{lastUpdateTime:0,groupCounterSeq:0,counters:new Map,avChatRoomKey:e}),Ae.l("".concat(this._n,".initGroupCountersCache groupID:").concat(t," avChatRoomKey:").concat(e))}},{key:"setGroupCounters",value:function(e){var t,n,o,i,s;return this._grpM.canIUse(w.GRP_COUNTER)?(t="".concat(this._n,".").concat("setGroupCounters"),n=e.groupID,e=e.counters,e=this._convertObjectToList(e),o=this._getLocalGroupCounters(n).avChatRoomKey,i="groupID:".concat(n," count:").concat(e.length),(s=new Jn("setGroupCounters")).setMessage("".concat(i)),Ae.l("".concat(t,". ").concat(i)),this._updateGroupCounters({groupID:n,counterList:e,avChatRoomKey:o,mode:"Set"}).then((function(e){return s.end(),Ae.l("".concat(t," ok.")),mn({counters:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._grpM.noUse("setGroupCounters")}},{key:"increaseGroupCounter",value:function(e){var t,n,o,i,s,a,r="increaseGroupCounter";return this._grpM.canIUse(w.GRP_COUNTER)?(t="".concat(this._n,".").concat(r),n=e.groupID,o=e.key,e=e.value,i=this._getLocalGroupCounters(n).avChatRoomKey,s="groupID:".concat(n," key:").concat(o," value:").concat(e),(a=new Jn(r)).setMessage("".concat(s)),Ae.l("".concat(t,". ").concat(s)),this._updateGroupCounters({groupID:n,counterList:[{key:o,value:e}],avChatRoomKey:i,mode:"Increase"}).then((function(e){return a.end(),Ae.l("".concat(t," ok.")),mn({counters:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._grpM.noUse(r)}},{key:"decreaseGroupCounter",value:function(e){var t,n,o,i,s,a,r="decreaseGroupCounter";return this._grpM.canIUse(w.GRP_COUNTER)?(t="".concat(this._n,".").concat(r),n=e.groupID,o=e.key,e=e.value,i=this._getLocalGroupCounters(n).avChatRoomKey,s="groupID:".concat(n," key:").concat(o," value:").concat(e),(a=new Jn(r)).setMessage("".concat(s)),Ae.l("".concat(t,". ").concat(s)),this._updateGroupCounters({groupID:n,counterList:[{key:o,value:e}],avChatRoomKey:i,mode:"Decrease"}).then((function(e){return a.end(),Ae.l("".concat(t," ok.")),mn({counters:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._grpM.noUse(r)}},{key:"getGroupCounters",value:function(e){var t=this;if(!this._grpM.canIUse(w.GRP_COUNTER))return this._grpM.noUse("getGroupCounters");var n="".concat(this._n,".").concat("getGroupCounters"),o=e.groupID,i=void 0===(e=e.keyList)?[]:e,s=(e=this._getLocalGroupCounters(o)).avChatRoomKey,a=(e=e.lastUpdateTime,new Jn("getGroupCounters"));return a.setMessage("groupID:".concat(o)),Date.now()-e>=this.EXPIRE_TIME?this._getRemoteGroupCounters({groupID:o,avChatRoomKey:s}).then((function(e){return a.setMoreMessage("from remote. count:".concat(e.length)).end(),Ae.l("".concat(n," from remote. groupID:").concat(o)),mn({counters:e=t._getLocalCounters(o,i)})})).catch((function(e){return a.setError(e).end(),yn(e)})):(a.setMoreMessage("from cache").end(),Ae.l("".concat(n," from cache. groupID:").concat(o)),vn({counters:e=this._getLocalCounters(o,i)}))}},{key:"_getRemoteGroupCounters",value:function(e){var n=this;return this._grpM.req({P:Gn.GET_GRP_COUNTER,data:t({},e)}).then((function(t){var o=void 0===(o=(t=t.data).counterList)?[]:o;return t=t.groupCounterSeq,n._updateLocalGroupCounters({groupID:e.groupID,counterList:o,groupCounterSeq:t}),Ae.l("".concat(n._n,"._getRemoteGroupCounters ok. groupID:").concat(e.groupID)),o})).catch((function(e){return yn(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 n="".concat(this._n,"._updateGroupCounters"),o=e.groupID,i=e.avChatRoomKey,s=e.mode;return Ae.l("".concat(n,". groupID:").concat(o," avChatRoomKey:").concat(i," mode:").concat(s)),this._grpM.req({P:Gn.UPDATE_GRP_COUNTER,data:t({},e)}).then((function(e){Ae.l("".concat(n," ok.")),e=e.data.counterList;var t={};return(void 0===e?[]:e).forEach((function(e){var n=e.key;e=e.value,t[n]=e})),t})).catch((function(e){return yn(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,o,i=e.groupID,s=void 0===(s=e.counterList)?[]:s;e=e.groupCounterSeq,this._hasLocalGroupCounters(i)&&(o=this._getLocalGroupCounters(i),t=o.counters,n=o.avChatRoomKey,o=o.groupCounterSeq,0<e&&e<o||(s.forEach((function(e){var n=e.key;e=e.value,t.set(n,e)})),this._groupCountersMap.set(i,{lastUpdateTime:Date.now(),groupCounterSeq:e,counters:t,avChatRoomKey:n})))}},{key:"_deleteLocalGroupCounters",value:function(e){var t,n,o=e.groupID,i=void 0===(i=e.counterList)?[]:i;e=e.groupCounterSeq,this._hasLocalGroupCounters(o)&&(n=this._getLocalGroupCounters(o),t=n.counters,n=n.avChatRoomKey,i.forEach((function(e){t.delete(e.key)})),this._groupCountersMap.set(o,{lastUpdateTime:Date.now(),groupCounterSeq:e,counters:t,avChatRoomKey:n}))}},{key:"_getLocalCounters",value:function(e,t){var n={};if(this._hasLocalGroupCounters(e)){var o=this._getLocalGroupCounters(e).counters;if(0<t.length)t.forEach((function(e){o.has(e)&&(n[e]=o.get(e))}));else{var i,s=T(o.keys());try{for(s.s();!(i=s.n()).done;){var a=i.value;n[a]=o.get(a)}}catch(r){s.e(r)}finally{s.f()}}}return n}},{key:"reset",value:function(){this._groupCountersMap.clear(),this.EXPIRE_TIME=3e4}}]),$i),pi=(s(ji,[{key:"start",value:function(){var e=this._grpM.isLoggedIn();e||(this._proto=Gn.AV_NOAUTH_POLLING),Ae.l("".concat(this._n,".start pollingInterval:").concat(this._manager.getPollingInterval()," isLoggedIn:").concat(e)),this._isRunning=!0,this._request()}},{key:"isRunning",value:function(){return this._isRunning}},{key:"_request",value:function(){var e=this,t=this._onInit(this._groupID);this._grpM.req({P:this._proto,data:t}).then((function(t){e._onSuccess(e._groupID,t),e.isRunning()&&(clearTimeout(e._timeoutID),e._timeoutID=setTimeout(e._request.bind(e),e._manager.getPollingInterval()))})).catch((function(t){e._onFail(e._groupID,t),e.isRunning()&&(clearTimeout(e._timeoutID),e._timeoutID=setTimeout(e._request.bind(e),e._manager.MAX_POLLING_INTERVAL))}))}},{key:"stop",value:function(){Ae.l("".concat(this._n,".stop")),0<this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=-1),this._isRunning=!1}},{key:"getPollingTimerID",value:function(){return this._timeoutID}}]),ji),hi={3:!0,4:!0,5:!0,6:!0,17:!0,20:!0,21:!0,100:!0},fi=(s(Ki,[{key:"hasJoinedAVChatRoom",value:function(){var e=[];return 0<(e=0<this._joinedGroupMap.size?m(this._joinedGroupMap.values()).filter((function(e){return e.type===E.GRP_AVCHATROOM})):e).length}},{key:"getJoinedLiveList",value:function(){var e=[];return 0<this._joinedGroupMap.size?m(this._joinedGroupMap.values()).filter((function(e){return e.type===E.GRP_LIVE})):e}},{key:"checkJoinedAVChatRoomByID",value:function(e){return this._joinedGroupMap.has(e)}},{key:"getJoinedAVChatRoom",value:function(){return 0<this._joinedGroupMap.size?m(this._joinedGroupMap.keys()):[]}},{key:"_updatedata",value:function(e){var n=this._pollingRequestInfoMap.get(e);return e===m(this._pollingInstanceMap.keys())[0]?t(t({},n),{},{startBroadcastSeq:this._startBroadcastSeq,simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG}):t(t({},n),{},{simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG})}},{key:"_handleSuccess",value:function(e,t){var n,o=(c=t.data).key,i=c.nextSeq,s=c.rspMsgList,a=c.errorCode,r=c.nextBroadcastSeq,c=c.broadcastMessageList;0!==a?(a=this._pollingRequestInfoMap.get(e),n=new Jn("longPollingAVError"),a=a?"".concat(a.key,"-").concat(a.startSeq):"requestInfo is undefined",n.setMessage("".concat(e,"-").concat(a,"-").concat(t.errorInfo)).setCode(t.errorCode).end(!0)):this.checkJoinedAVChatRoomByID(e)&&(ct(o)&&je(i)&&this._pollingRequestInfoMap.set(e,{key:o,startSeq:i}),je(r)&&r>this._startBroadcastSeq&&(this._startBroadcastSeq=r),Ye(s)&&0<s.length?(s.forEach((function(e){e.to=e.groupID})),this.onMessage(s,e)):(this._pollingNoMessageCount+=1,this._pollingNoMessageCount===this.DEFAULT_POLLING_NO_MESSAGE_COUNT&&(this._pollingInterval=this.DEFAULT_POLLING_INTERVAL+this.DEFAULT_POLLING_INTERVAL_PLUS)),this._onBroadcastMessage(c))}},{key:"_handleFailure",value:function(e,t){}},{key:"onMessage",value:function(e,t){if(Ye(e)&&0!==e.length){var n="".concat(this._n,".onMessage"),o=(t&&(n+=" groupID:".concat(t)),0!==this._pollingNoMessageCount&&(this._pollingNoMessageCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL),null),i=[],s=this._get(11),a=this._get(26),r=e.length,c=(1<r&&e.sort((function(e,t){return e.sequence-t.sequence})),this._get(12).isUnlimitedAVChatRoom()),u=!1;Ae.getLevel()<=0&&(t=e.map((function(e){return e.sequence})),Ae.l("".concat(n," count:").concat(t.length," sequenceList:").concat(t)),t.length=0);for(var l=0;l<r;l++){var d=this.restoreMessageFromSimplified(e[l]);if(hi[d.event]){if(6===d.event){if(this._grpM.isGroupAttributesUpdatedNotice(d))continue;if(this._grpM.isGroupCountersNotice(d))continue}if(20!==d.event)if(21!==d.event)if(100!==d.event){o=this.packMessage(d,d.event);var p=1===d.isModified;if(u=1===d.isHistoryMessage,!c){if(this._seqSll.has(o.sequence))continue;this._seqSll.set(o.sequence)}var h=this._IDSll.has(o.ID);h?Ae.w("".concat(n," ID:").concat(o.ID," has:").concat(h)):(this._IDSll.set(o.ID),h=!1,!u&&this._isMessageSentByCurrentInstance(o)?p&&(h=!0,o.isModified=p,s.updateMsgIsModifiedProp(o)):h=!0,h&&(o.conversationType===E.CONV_SYSTEM&&5===o.payload.operationType&&this._onGroupDismissed(o.payload.groupProfile.groupID),u||o.conversationType===E.CONV_SYSTEM||(p=o.conversationID.replace(E.CONV_GROUP,""),this._pollingInstanceMap.has(p)?this._grpM.isLoggedIn()&&a.addMessageSequence({key:$n,message:o}):(o.type!==E.MSG_GRP_TIP&&0<o.clientTime&&a.addMessageDelay(o.clientTime),a.addMessageSequence({key:jn,message:o}))),i.push(o)))}else this.onRoomCustomData(d);else this._get(34).onMessageReactionNotify({event:21,dataList:d.elements.messageReactionNotifyList});else this.handleMessageRevokedNotice(d)}else Ae.w("".concat(n,". unknown event:").concat(d.event))}0!==i.length&&(0<(t=mt(i)).length&&this._grpM.emitOEvt(S.MESSAGE_MODIFIED,t),u||0<(t=this.packConversationOption(i)).length&&s.onNewMessage({conversationOptionsList:t,isInstantMessage:!0}),this._checkMessageStacked(i),0<(t=vt(i)).length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t),i.length=0)}}},{key:"handleMessageRevokedNotice",value:function(e){var t=this,n=e.groupID,o=e.elements.revokeMsgList,i=e.revokerInfo,s=[];o.forEach((function(e){var t=e.tinyID,o=e.clientTime,a=e.random;e=e.sequence,t={conversationID:"".concat(E.CONV_GROUP).concat(n),ID:"".concat(t,"-").concat(o,"-").concat(a),revoker:i.revoker,revokeReason:i.reason||"",revokerInfo:{userID:i.revoker,nick:"",avatar:""},sequence:e},s.push(t)})),0!==s.length&&this._get(11).updateRevokerInfo(s).then((function(e){t._grpM.emitOEvt(S.MESSAGE_REVOKED,e)}))}},{key:"isBroadcastOrNormal",value:function(e){return 3===e||17===e}},{key:"isGroupTip",value:function(e){return 4===e||6===e}},{key:"isGroupSystemNotice",value:function(e){return 5===e}},{key:"restoreGroupTipElements",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=void 0===(t=e.operatorInfo)?{}:t,n=e.operatorID,o=void 0===(o=e.userIDList)?[]:o,i=e.operationType,s=(je(e.groupJoinType)||1!==i&&2!==i||(e.groupJoinType=2===i?0:1),i=t.userID,t.avatar);return t=t.nick,e.operatorInfo={userID:void 0===i?n:i,avatar:void 0===s?"":s,nick:void 0===t?"":t},n=o.map((function(e){return{userID:e}})),e.memberInfoList=e.memberInfoList||n,e}},{key:"restoreMessageFromSimplified",value:function(e){var n,o,i,s=e.event;return this.isBroadcastOrNormal(s)&&(e.cloudCustomData=e.cloudCustomData||"",e.elements=e.elements.map((function(e){var n;return e.type===E.MSG_CUSTOM&&(n=e.content,e.content=t({data:"",description:"",extension:""},void 0===n?{}:n)),e}))),(this.isGroupTip(s)||this.isGroupSystemNotice(s))&&(e.from=e.from||"@TIM#SYSTEM"),this.isGroupTip(s)&&(e.elements=this.restoreGroupTipElements(e.elements),o=(i=void 0===(i=e.elements)?{}:i).operationType,n=i.operatorInfo,1===o)&&(o=[{userID:(void 0===n?{}:n).userID}],i.memberInfoList=i.memberInfoList||o),this.isGroupSystemNotice(s)&&(i=(n=e.elements).memberInfoList,o=n.operatorInfo,e.elements.memberInfoList=t({userID:e.elements.operatorID,avatar:"",nick:""},i=i||(void 0===o?{}:o)),e.elements=t({authentication:"",remarkInfo:"",messageKey:1e3*e.time},e.elements),s=Object.keys(e.elements).filter((function(e){return"operatorInfo"!==e})).reduce((function(n,o){return t(t({},n),{},a({},o,e.elements[o]))}),{}),e.elements=s),e}},{key:"_onGroupDismissed",value:function(e){Ae.l("".concat(this._n,"._onGroupDismissed groupID:").concat(e)),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}},{key:"_checkMessageStacked",value:function(e){var t="MessageStacked";100<=(e=e.length)&&(this._grpM.warn(t,e),this._reportMessageStackedCount<5)&&(new Jn(t).setMessage("count:".concat(e," groupID:").concat(m(this._joinedGroupMap.keys()))).setLevel("warning").end(),this._reportMessageStackedCount+=1)}},{key:"_isMessageSentByCurrentInstance",value:function(e){return!!this._get(11).isMessageSentByCurrentInstance(e)}},{key:"packMessage",value:function(e,t){e.currentUser=this._grpM.getMyUserID(),e.conversationType=5===t?E.CONV_SYSTEM:E.CONV_GROUP,e.isSystemMessage=!!e.isSystemMessage;var n=new Co(e),o=(e=this.packElements(e,t),t=this._grpM.getFileDownloadProxy(),this._grpM.getDowloadFileAuthKey()),i=this._get(17).getFileDNList();return n.setElement(e,t,o,i),n}},{key:"packElements",value:function(e,n){return 4===n||6===n?(this._updateMemberCountByGroupTips(e),{type:E.MSG_GRP_TIP,content:t(t({},e.elements),{},{groupProfile:e.groupProfile})}):5===n?{type:E.MSG_GRP_SYS_NOTICE,content:t(t({},e.elements),{},{groupProfile:t(t({},e.groupProfile),{},{groupID:e.groupID})})}:e.elements}},{key:"packConversationOption",value:function(e){for(var t=new Map,n=0;n<e.length;n++){var o,i=e[n],s=i.conversationID;t.has(s)?"in"===((o=t.get(s)).lastMessage=i).flow&&o.unreadCount++:t.set(s,{conversationID:i.conversationID,unreadCount:"out"===i.flow?0:1,type:i.conversationType,subType:i.conversationSubType,lastMessage:i})}return m(t.values())}},{key:"_updateMemberCountByGroupTips",value:function(e){var t,n,o,i=e.groupProfile.groupID;Ve(e=void 0===(e=e.elements.onlineMemberInfo)?void 0:e)||(t=void 0===(t=e.onlineMemberNum)?0:t,e=void 0===(e=e.expireTime)?this.DEFAULT_EXPIRE_TIME:e,n=this._onlineMemberCountMap.get(i)||{},o=Date.now(),Ve(n)?Object.assign(n,{lastReqTime:0,lastSyncTime:0,latestUpdateTime:o,memberCount:t,expireTime:e}):(n.latestUpdateTime=o,n.memberCount=t),this._onlineMemberCountMap.set(i,n))}},{key:"_onBroadcastMessage",value:function(e){if(!Ve(e)){for(var t=[],n=e.length,o=null,i=0;i<n;i++){var s=this.restoreMessageFromSimplified(e[i]);hi[s.event]?((o=this.packMessage(s,s.event)).isBroadcastMessage=!0,this._broadcastMessageIDMap.has(o.ID)||(t.push(o),this._broadcastMessageIDMap.set(o.ID,1))):Ae.w("".concat(this._n,"._onBroadcastMessage unknown event:").concat(s.event))}0<t.length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t)}}},{key:"start",value:function(e){var t;this._pollingInstanceMap.has(e)?(t=this._pollingInstanceMap.get(e)).isRunning()||t.start():((t=new pi({manager:this,groupID:e,onInit:this._updatedata.bind(this),onSuccess:this._handleSuccess.bind(this),onFail:this._handleFailure.bind(this)})).start(),this._pollingInstanceMap.set(e,t),Ae.l("".concat(this._n,".start groupID:").concat(e)))}},{key:"handleJoinResult",value:function(e){var t=this;return this._preCheck(e.group).then((function(){var n=e.longPollingKey,o=e.group,i=o.groupID;return t._joinedGroupMap.set(i,o),t._grpM.updateGroupMap([o]),t._grpM.deleteUnjoinedAVChatRoom(i),t._grpM.emitGroupListUpdate(!0,!1),ut(n)?vn({status:Ue,group:o}):Promise.resolve()}))}},{key:"startRunLoop",value:function(e){var t=this;return this.handleJoinResult(e).then((function(){var n=e.longPollingKey,o=e.group,i=e.startSeq,s=o.groupID;return t._pollingRequestInfoMap.set(s,{key:n,startSeq:void 0===i?0:i}),t.start(s),t._grpM.isLoggedIn()?vn({status:Ue,group:o}):vn({status:Ue})}))}},{key:"_preCheck",value:function(e){if(!this._get(12).isUnlimitedAVChatRoom()&&this.hasJoinedAVChatRoom()&&e.type!==E.GRP_LIVE){var t=(e=_(this._joinedGroupMap.entries().next().value,2))[0];if(e=e[1],this._grpM.isLoggedIn()&&e.selfInfo.role!==E.GRP_MBR_ROLE_OWNER&&e.ownerID!==this._grpM.getMyUserID())return this._grpM.quitGroup(t);this._grpM.deleteLocalGroupAndConversation(t),this.reset(t)}return Promise.resolve()}},{key:"joinWithoutAuth",value:function(e){var t=this,n=e.groupID,o="".concat(this._n,".").concat("joinWithoutAuth"),i=new Jn("joinWithoutAuth");return this._grpM.req({P:Gn.APPLY_JOIN_GRP_NOAUTH,data:e}).then((function(e){if(e=e.data.longPollingKey,i.setMessage("groupID:".concat(n," longPollingKey:").concat(e)).end(!0),ut(e))return yn({code:Pn.CANNOT_JOIN_NON_AV_WITHOUT_LOGIN});Ae.l("".concat(o," ok. groupID:").concat(n)),t._get(11).setCompleted("".concat(E.CONV_GROUP).concat(n));var s=new ni({groupID:n});return t.startRunLoop({group:s,longPollingKey:e}),mn({status:Ue})})).catch((function(e){return Ae.e("".concat(o," failed. groupID:").concat(n," error:"),e),i.setError(e).setMessage("groupID:".concat(n)).end(!0),yn(e)})).finally((function(){t._grpM.get(14).reportAtOnce()}))}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this._onlineMemberCountMap.get(e)||{},n=Date.now();return Ve(t)||n-t.lastSyncTime>1e3*t.expireTime&&1e4<n-t.latestUpdateTime&&3e3<n-t.lastReqTime?(t.lastReqTime=n,this._onlineMemberCountMap.set(e,t),this._getGroupOnlineMemberCount(e).then((function(e){return mn({memberCount:e.memberCount})})).catch((function(e){return yn(e)}))):vn({memberCount:t.memberCount})}},{key:"_getGroupOnlineMemberCount",value:function(e){var t=this,n="".concat(this._n,".").concat("_getGroupOnlineMemberCount"),o=new Jn("_getGroupOnlineMemberCount");return this._grpM.requestOnlineCount(e).then((function(o){var i=t._onlineMemberCountMap.get(e)||{},s=void 0===(s=(o=o.data).memberCount)?0:s,a=(o=void 0===(o=o.expireTime)?t.DEFAULT_EXPIRE_TIME:o,Ae.l("".concat(n," ok. groupID:").concat(e," memberCount:").concat(s," expireTime:").concat(o)),Date.now());return Ve(i)&&(i.lastReqTime=a),t._onlineMemberCountMap.set(e,Object.assign(i,{lastSyncTime:a,latestUpdateTime:a,memberCount:s,expireTime:o})),{memberCount:s}})).catch((function(t){return Ae.w("".concat(n," failed. error:"),t),o.setCode(t.code).setMessage("groupID:".concat(e," error:").concat(JSON.stringify(t))).end(),Promise.reject(t)}))}},{key:"_get",value:function(e){return this._grpM.get(e)}},{key:"setPollingInterval",value:function(e){ut(e)||(je(e)?this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=e:this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=parseInt(e,10))}},{key:"setPollingIntervalPlus",value:function(e){ut(e)||(je(e)?this.DEFAULT_POLLING_INTERVAL_PLUS=e:this.DEFAULT_POLLING_INTERVAL_PLUS=parseInt(e,10))}},{key:"setPollingNoMessageCount",value:function(e){ut(e)||(je(e)?this.DEFAULT_POLLING_NO_MESSAGE_COUNT=e:this.DEFAULT_POLLING_NO_MESSAGE_COUNT=parseInt(e,10))}},{key:"setPollingSimplifiedMessage",value:function(e){ut(e)||"0"!==e&&"1"!==e||(this.DEFAULT_POLLING_SIMPLIFIED_MSG=parseInt(e,10))}},{key:"getPollingInterval",value:function(){return this._pollingInterval}},{key:"onAVChatRoomMemberBanned",value:function(e){e=e.payload.groupProfile.groupID,Ae.l("".concat(this._n,".onAVChatRoomMemberBanned groupID:").concat(e)),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}},{key:"restartPolling",value:function(){Ae.l("".concat(this._n,".restartPolling count:").concat(this._pollingInstanceMap.size));var e,t=T(this._pollingInstanceMap.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.stop(),n.start()}}catch(o){t.e(o)}finally{t.f()}}},{key:"getPollingTimerID",value:function(e){var t;return this._pollingInstanceMap.has(e)?(t=this._pollingInstanceMap.get(e).getPollingTimerID(),Ae.l("".concat(this._n,".getPollingTimerID groupID:").concat(e," timerID:").concat(t)),t):-1}},{key:"hasPollingInstance",value:function(e){return this._pollingInstanceMap.has(e)}},{key:"onRoomCustomData",value:function(e){var t=e.groupID,n=e.sequence,o=e.time;e=(e=e.elements)&&e.content,this._get(30).onRoomCustomDataReceived(e),Ae.l("".concat(this._n,".onRoomCustomData groupID:").concat(t," sequence:").concat(n," time:").concat(o," data:").concat(e))}},{key:"reset",value:function(e){if(e){Ae.l("".concat(this._n,".reset groupID:").concat(e));var t=this._pollingInstanceMap.get(e);t&&t.stop(),this._pollingInstanceMap.delete(e),this._joinedGroupMap.delete(e),this._pollingRequestInfoMap.delete(e),this._onlineMemberCountMap.delete(e)}else{Ae.l("".concat(this._n,".reset all"));var n,o=T(this._pollingInstanceMap.values());try{for(o.s();!(n=o.n()).done;)n.value.stop()}catch(i){o.e(i)}finally{o.f()}this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear(),this._onlineMemberCountMap.clear(),this._broadcastMessageIDMap.clear()}this._seqSll.reset(),this._IDSll.reset(),this._reportMessageStackedCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=300,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0}}]),Ki),gi=(s(Hi,[{key:"updateMember",value:function(e){ut(e.onlineStatus)||(this.isOnline="Online"===e.onlineStatus);var t=[null,void 0,"",0,NaN];e.memberCustomField&&_t(this.memberCustomField,e.memberCustomField),Ze(this,e,["memberCustomField","marks","onlineStatus"],t)}},{key:"updateRole",value:function(e){["Owner","Admin","Member"].indexOf(e)<0||(this.role=e)}},{key:"updateMuteUntil",value:function(e){ut(e)||(this.muteUntil=Math.floor((Date.now()+1e3*e)/1e3))}},{key:"updateNameCard",value:function(e){ut(e)||(this.nameCard=e)}},{key:"updateMemberCustomField",value:function(e){e&&_t(this.memberCustomField,e)}}]),Hi),_i=(s(Bi,[{key:"_onProfileUpdated",value:function(e){for(var t=this,n=e.data,o=0;o<n.length;o++)!function(e){var o=n[e];t.groupMemberListMap.forEach((function(e){e.has(o.userID)&&e.get(o.userID).updateMember({nick:o.nick,avatar:o.avatar})}))}(o)}},{key:"deleteGroupMemberList",value:function(e){this.groupMemberListMap.delete(e)}},{key:"getGroupMemberList",value:function(e){var t,n=this,o=e.groupID,i=void 0===(i=e.role)?void 0:i,s=void 0===(c=e.offset)?0:c,a=void 0===(c=e.count)?15:c,r=(e=void 0===(c=e.filter)?void 0:c,"".concat(this._n,".").concat("getGroupMemberList")),c=this._grpM.hasLocalGroup(o);if(Ae.l("".concat(r," groupID:").concat(o," role:").concat(i," offset:").concat(s," count:").concat(a," hasLocalGroup:").concat(c)),!c)return vn({memberList:[],offset:0});if(this._grpM.getLocalGroupProfile(o).type===E.GRP_AVCHATROOM){if(this._grpM.canIUse(w.AV_MBR_LIST))return this._getAVChatRoomMemberList({groupID:o,offset:s,filter:e});this._grpM.warn("LiveOnlineMember")}i!==E.GRP_MBR_ROLE_ADMIN&&i!==E.GRP_MBR_ROLE_OWNER&&i!==E.GRP_MBR_ROLE_MEMBER||(t=i);var u=new Jn("getGroupMemberList"),l=0,d=(c={groupID:o,limit:100<a?100:a,memberRoleFilter:t?[t]:void 0,memberInfoFilter:this.DEFAULT_MEMBER_INFO_FILTER},It({groupID:o})?c.next="".concat(s):l=(c.offset=s)+a,[]);return this._grpM.req({P:Gn.GET_GRP_MBR_LIST,data:c}).then((function(e){var t=(e=e.data).members,i=e.memberNum;return e=e.next,ut(e=void 0===e?void 0:e)||(l=Ve(e)?0:e),Ye(t)&&0!==t.length?(n._grpM.hasLocalGroup(o)&&(n._grpM.getLocalGroupProfile(o).memberNum=i),d=n._updateLocalGroupMemberMap(o,t),n._grpM.get(4).getUserProfile({userIDList:t.map((function(e){return e.userID})),tagList:[Oe.NICK,Oe.AVATAR]})):(l=0,Promise.resolve([]))})).then((function(e){return Ye(e=e.data)&&0!==e.length?(e=e.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}})),n._updateLocalGroupMemberMap(o,e),d.length<a&&(l=0),u.setMessage("groupID:".concat(o," offset:").concat(s," count:").concat(a)).end(),Ae.l("".concat(r," ok.")),mn({memberList:d,offset:l})):vn({memberList:[],offset:l})})).catch((function(e){return u.setError(e).end(),Ae.e("".concat(r," failed. error:"),e),yn(e)}))}},{key:"_getAVChatRoomMemberList",value:function(e){var n=this,o=e.groupID,i=e.offset,s=(e=e.filter,"".concat(this._n,".").concat("_getAVChatRoomMemberList")),a=new Jn("_getAVChatRoomMemberList");return a.setMessage("groupID:".concat(o," offset:").concat(i," filter:").concat(e)),this._grpM.req({P:Gn.GET_AV_MBR_LIST,data:{groupID:o,offset:i,filter:e}}).then((function(e){var i=void 0===(i=(e=e.data).memberList)?[]:i;return e=void 0===(e=e.offset)?0:e,a.end(),Ae.l("".concat(s," ok. member count:").concat(i.length,", next request timestamp:").concat(e)),i=i.map((function(e){return t(t({},e),{},{onlineStatus:"Online"})})),mn({memberList:i=n._updateLocalGroupMemberMap(o,i),offset:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(s," failed. error:"),e),yn(e)}))}},{key:"getGroupMemberProfile",value:function(e){var n,o=this,i="getGroupMemberProfile",s="".concat(this._n,".").concat(i),a="groupID:".concat(e.groupID),r=(5<e.userIDList.length?a+=" userIDList.length:".concat(e.userIDList.length):a+=" userIDList:".concat(e.userIDList),Ae.l("".concat(s," ").concat(a)),50<e.userIDList.length&&(e.userIDList=e.userIDList.slice(0,50)),e.groupID),c=e.userIDList;return(s=this._grpM.getLocalGroupProfile(r))&&yt(s.type)?yn({code:s=Pn.OPERATION_NOT_SUPPORTED_IN_AV,message:this._grpM.getErrMsg(s,i)}):((n=new Jn(i)).setMessage(a),this._getGroupMemberProfileAdvance(t(t({},e),{},{userIDList:c})).then((function(e){return Ye(e=e.data.members)&&0!==e.length?(o._updateLocalGroupMemberMap(r,e),o._grpM.get(4).getUserProfile({userIDList:e.map((function(e){return e.userID})),tagList:[Oe.NICK,Oe.AVATAR]})):vn([])})).then((function(e){return e=e.data.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}})),o._updateLocalGroupMemberMap(r,e),e=c.filter((function(e){return o.hasLocalGroupMember(r,e)})).map((function(e){return o.getLocalGroupMemberInfo(r,e)})),n.end(),mn({memberList:e})})))}},{key:"addGroupMember",value:function(e){var t=this,n="".concat(this._n,".").concat("addGroupMember"),o=e.groupID,i=this._grpM.getLocalGroupProfile(o),s=i.type,a=new Jn("addGroupMember");return a.setMessage("groupID:".concat(o," groupType:").concat(s)),yt(s)?(s=new Nn({code:Pn.CANNOT_ADD_MEMBER_IN_AV}),a.setError(s).end(),yn(s)):(e.userIDList=e.userIDList.map((function(e){return{userID:e}})),Ae.l("".concat(n," groupID:").concat(o)),this._grpM.req({P:Gn.ADD_GRP_MBR,data:e}).then((function(o){o=o.data.members;var s=(Ae.l("".concat(n," ok")),o.filter((function(e){return 1===e.result})).map((function(e){return e.userID}))),r=o.filter((function(e){return 0===e.result})).map((function(e){return e.userID})),c=o.filter((function(e){return 2===e.result})).map((function(e){return e.userID})),u=(o=o.filter((function(e){return 4===e.result})).map((function(e){return e.userID})),"groupID:".concat(e.groupID,", ")+"successUserIDList:".concat(s,", ")+"failureUserIDList:".concat(r,", ")+"existedUserIDList:".concat(c,", ")+"overLimitUserIDList:".concat(o));return a.setMoreMessage(u).end(),0===s.length?mn({successUserIDList:s,failureUserIDList:r,existedUserIDList:c,overLimitUserIDList:o}):(t._updateConvGroupProfile(i),mn({successUserIDList:s,failureUserIDList:r,existedUserIDList:c,overLimitUserIDList:o,group:i}))})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)})))}},{key:"deleteGroupMember",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("deleteGroupMember"),s=e.groupID,a=e.userIDList,r=this._grpM.getLocalGroupProfile(s);return ut(r)?yn({code:Pn.CANNOT_FIND_GRP}):yt(r.type)?this._grpM.canIUse(w.AV_BAN_MBR)?this._banAVChatRoomMember(e):this._grpM.noUse("deleteGroupMember"):(t="groupID:".concat(s," ").concat(5<a.length?"userIDList.length:".concat(a.length):"userIDList:".concat(a)),Ae.l("".concat(i," groupID:").concat(s," userIDList:"),a),(n=new Jn("deleteGroupMember")).setMessage(t),this._grpM.req({P:Gn.DEL_GRP_MBR,data:e}).then((function(){return n.end(),Ae.l("".concat(i," ok")),o._updateConvGroupProfile(r),o.deleteLocalGroupMembers(s,a),mn({group:r,userIDList:a})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"_updateConvGroupProfile",value:function(e){this._grpM.get(11).updateConvGroupProfile([e])}},{key:"_banAVChatRoomMember",value:function(e){var t=this,n="".concat(this._n,".").concat("_banAVChatRoomMember"),o=e.groupID,i=e.userIDList,s="groupID:".concat(o," ").concat(5<i.length?"userIDList.length:".concat(i.length):"userIDList:".concat(i)),a=new Jn("_banAVChatRoomMember"),r=(a.setMessage(s),Ae.l("".concat(n," groupID:").concat(o," userIDList:"),i),this._grpM.getLocalGroupProfile(o));return ut(e.duration)||0===e.duration?yn({code:Pn.BAN_DURATION_INVALID}):this._grpM.req({P:Gn.BAN_AV_MBR,data:e}).then((function(){return a.end(),Ae.l("".concat(n," ok")),t.deleteLocalGroupMembers(o,i),mn({group:r,userIDList:i})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"setGroupMemberMuteTime",value:function(e){var t,n,o=this,i=e.groupID,s=e.userID,a=(e=e.muteTime,"".concat(this._n,".").concat("setGroupMemberMuteTime"));return s===this._grpM.getMyUserID()?yn({code:Pn.CANNOT_MUTE_SELF}):(t="groupID:".concat(i," userID:").concat(s," muteTime:").concat(e),Ae.l("".concat(a," ").concat(t)),(n=new Jn("setGroupMemberMuteTime")).setMessage(t),this.modifyGroupMemberInfo({groupID:i,userID:s,muteTime:e}).then((function(e){return n.end(),Ae.l("".concat(a," ok")),mn({group:o._grpM.getLocalGroupProfile(i),member:e})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(a," failed. error:"),e),yn(e)})))}},{key:"setGroupMemberRole",value:function(e){var t,n,o="".concat(this._n,".").concat("setGroupMemberRole"),i=e.groupID,s=e.userID,a=(e=e.role,"groupID:".concat(i," userID:").concat(s," role:").concat(e)),r=this._grpM.getLocalGroupProfile(i);return r&&r.selfInfo.role!==E.GRP_MBR_ROLE_OWNER?yn({code:Pn.NOT_OWNER}):(t=[E.GRP_MBR_ROLE_ADMIN,E.GRP_MBR_ROLE_MEMBER],It({groupID:i})&&t.push(E.GRP_MBR_ROLE_CUSTOM),t.indexOf(e)<0?yn({code:Pn.INVALID_MEMBER_ROLE}):s===this._grpM.getMyUserID()?yn({code:Pn.CANNOT_SET_SELF_MEMBER_ROLE}):((n=new Jn("setGroupMemberRole")).setMessage(a),Ae.l("".concat(o," ").concat(a)),this.modifyGroupMemberInfo({groupID:i,userID:s,role:e}).then((function(e){return n.end(),Ae.l("".concat(o," ok")),mn({group:r,member:e})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))))}},{key:"_filterProfanity",value:function(e,t){var n,o=this._grpM.get(29);return!o||(n=(o=o.filterText(t[e],"group_member_profile")).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"setGroupMemberNameCard",value:function(e){var t,n,o,i,s,a=this,r="setGroupMemberNameCard",c="".concat(this._n,".").concat(r);return e.nameCard&&!1===this._filterProfanity("nameCard",e)?yn({code:Pn.PROFANITY_FOUND}):(t=e.groupID,i=e.userID,n=void 0===i?this._grpM.getMyUserID():i,o=e.nameCard,i="groupID:".concat(t," userID:").concat(n," nameCard:").concat(o),Ae.l("".concat(c," ").concat(i)),(e=this._grpM.getLocalGroupProfile(t))&&yt(e.type)?yn({code:e=Pn.OPERATION_NOT_SUPPORTED_IN_AV,message:this._grpM.getErrMsg(e,r)}):((s=new Jn(r)).setMessage(i),this.modifyGroupMemberInfo({groupID:t,userID:n,nameCard:o}).then((function(e){Ae.l("".concat(c," ok")),s.end();var i=a._grpM.getLocalGroupProfile(t);return n===a._grpM.getMyUserID()&&i&&i.setSelfNameCard(o),mn({group:i,member:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(c," failed. error:"),e),yn(e)}))))}},{key:"setGroupMemberCustomField",value:function(e){var t,n=this,o="setGroupMemberCustomField",i="".concat(this._n,".").concat(o),s=e.groupID,a=void 0===(a=e.userID)?this._grpM.getMyUserID():a,r=(e=e.memberCustomField,"groupID:".concat(s," userID:").concat(a," memberCustomField:").concat(JSON.stringify(e))),c=(Ae.l("".concat(i," ").concat(r)),this._grpM.getLocalGroupProfile(s));return c&&yt(c.type)?yn({code:c=Pn.OPERATION_NOT_SUPPORTED_IN_AV,message:this._grpM.getErrMsg(c,o)}):((t=new Jn(o)).setMessage(r),this.modifyGroupMemberInfo({groupID:s,userID:a,memberCustomField:e}).then((function(e){return t.end(),Ae.l("".concat(i," ok")),mn({group:n._grpM.getLocalGroupProfile(s),member:e})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"modifyGroupMemberInfo",value:function(e){var n=this,o=e.groupID,i=e.userID,s=void 0;return Mt(o)&&(o=Gt(s=o)),this._grpM.req({P:Gn.MODIFY_GRP_MBR_INFO,data:t(t({},e),{},{groupID:o,topicID:s})}).then((function(){var t;return n.hasLocalGroupMember(o,i)?(t=n.getLocalGroupMemberInfo(o,i),ut(e.muteTime)||t.updateMuteUntil(e.muteTime),ut(e.role)||t.updateRole(e.role),ut(e.nameCard)||t.updateNameCard(e.nameCard),ut(e.memberCustomField)||t.updateMemberCustomField(e.memberCustomField),t):(t=n._grpM.getLocalGroupProfile(o))&&!yt(t.type)?n.getGroupMemberProfile({groupID:o,userIDList:[i]}).then((function(e){return _(e.data.memberList,1)[0]})):void 0}))}},{key:"markGroupMemberList",value:function(e){var t="".concat(this._n,".").concat("markGroupMemberList"),n=e.groupID,o=e.markType,i=e.enableMark,s=void 0===(e=e.userIDList)?[]:e,a=(e="groupID:".concat(n," markType:").concat(o," enableMark:").concat(i," userIDList count:").concat(s.length),Ae.l("".concat(t," ").concat(e)),2),r=[],c=(!0===i&&(a=1),i=m(s),500<s.length&&(i=s.slice(0,500),Ae.w("".concat(t," ").concat(Vt(500)))),i.forEach((function(e){r.push({userID:e,markType:[o]})})),i=null,new Jn("markGroupMemberList"));return c.setMessage(e),this._grpM.req({P:Gn.MARK_AV_MBR_INFO,data:{groupID:n,operationType:a,memberList:r}}).then((function(e){e=e.data.memberList;var n=[],o=[];return(e=void 0===e?[]:e).length===s.length?n.push.apply(n,m(s)):(e.forEach((function(e){n.push(e.userID)})),s.forEach((function(e){n.includes(e)||o.push(e)}))),e="success count:".concat(n.length," fail count:").concat(o.length),c.setMessage(e).end(),Ae.l("".concat(t," ok. ").concat(e)),mn({successUserIDList:n,failureUserIDList:o})})).catch((function(e){return c.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_getGroupMemberProfileAdvance",value:function(e){return this._grpM.req({P:Gn.GET_GRP_MBR_PROFILE,data:t(t({},e),{},{memberInfoFilter:e.memberInfoFilter||this.DEFAULT_MEMBER_INFO_FILTER})})}},{key:"_updateLocalGroupMemberMap",value:function(e,t){var n=this;return Ye(t)&&0!==t.length?t.map((function(t){return n.hasLocalGroupMember(e,t.userID)?n.getLocalGroupMemberInfo(e,t.userID).updateMember(t):n.setLocalGroupMember(e,new gi(t)),n.getLocalGroupMemberInfo(e,t.userID)})):[]}},{key:"deleteLocalGroupMembers",value:function(e,t){var n=this.groupMemberListMap.get(e);n&&t.forEach((function(e){n.delete(e)}))}},{key:"getLocalGroupMemberInfo",value:function(e,t){return this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).get(t):null}},{key:"setLocalGroupMember",value:function(e,t){this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).set(t.userID,t):(t=(new Map).set(t.userID,t),this.groupMemberListMap.set(e,t))}},{key:"getLocalGroupMemberList",value:function(e){return this.groupMemberListMap.get(e)}},{key:"hasLocalGroupMember",value:function(e,t){return this.groupMemberListMap.has(e)&&this.groupMemberListMap.get(e).has(t)}},{key:"hasLocalGroupMemberMap",value:function(e){return this.groupMemberListMap.has(e)}},{key:"reset",value:function(){this.groupMemberListMap.clear()}}]),Bi),mi=[17,18,20],vi=(s(Vi,[{key:"onNewGroupSystemNotice",value:function(e){var t=e.dataList,n=e.isSyncingEnded,o=(e=e.isInstantMessage,(Ae.d("".concat(this._n,".onReceiveSystemNotice count:").concat(t.length)),t=this._assembly({notifiesList:t,isInstantMessage:e})).eventDataList);t=t.result,0<o.length&&(this._grpM.get(11).onNewMessage({conversationOptionsList:o,isInstantMessage:e}),this._onReceivedGroupSystemNotice({result:t,isInstantMessage:e})),e?0<t.length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t):!0===n&&this._clearGroupSystemNotice()}},{key:"_assembly",value:function(e){var n=e.notifiesList,o=e.isInstantMessage,i=null,s=n.length,a=0,r=[],c={conversationID:E.CONV_SYSTEM,unreadCount:0,type:E.CONV_SYSTEM,subType:null,lastMessage:null};for(a=0;a<s;a++){var u=n[a],l=(d=u.groupProfile).communityType,d=void 0===(d=d.topicID)?void 0:d,p=void 0===(p=(h=u.elements).topicIDList)?void 0:p,h=h.operationType;if(!(2!==(void 0===l?0:l)||Ve(d)&&Ve(p))){if(mi.includes(h)){this._handleTopicSystemNotice(u);continue}Ve(d)||(u.to=d)}15!==u.elements.operationType&&(u.currentUser=this._grpM.getMyUserID(),u.conversationType=E.CONV_SYSTEM,u.conversationID=E.CONV_SYSTEM,(i=new Co(u)).setElement({type:E.MSG_GRP_SYS_NOTICE,content:t(t({},u.elements),{},{groupProfile:t({},u.groupProfile)})}),i.isSystemMessage=!0,(1===i.sequence&&1===i.random||2===i.sequence&&2===i.random)&&(i.sequence=nt(),i.random=nt(),i.generateMessageID(),Ae.l("".concat(this._n,"._assembly regenerate ID:").concat(i.ID))),this._grpM.get(11).pushIntoNoticeResult(r,i))&&(o?c.unreadCount++:i.setIsRead(!0),c.subType=i.conversationSubType)}return c.lastMessage=r[r.length-1],{eventDataList:0<r.length?[c]:[],result:r}}},{key:"_clearGroupSystemNotice",value:function(){var e=this;this._getPendencyList().then((function(t){t.forEach((function(t){e.pendencyMap.set("".concat(t.from,"_").concat(t.groupID,"_").concat(t.to),t)})),t=e._grpM.get(11).getLocalMessageList(E.CONV_SYSTEM);var n=[];t.forEach((function(t){var o=(s=t.payload).operatorID,i=s.operationType,s=s.groupProfile;1===i&&(i="".concat(o,"_").concat(s.groupID,"_").concat(s.to),o=e.pendencyMap.get(i))&&je(o.handled)&&0!==o.handled&&n.push(t)})),e.deleteGroupSystemNotice({messageList:n})}))}},{key:"deleteGroupSystemNotice",value:function(e){var t=this,n="".concat(this._n,".deleteGroupSystemNotice");return Ye(e.messageList)&&0!==e.messageList.length?(Ae.l("".concat(n," ")+e.messageList.map((function(e){return e.ID}))),this._grpM.req({P:Gn.DEL_GRP_SYSTEM_NOTICE,data:{messageListToDelete:e.messageList.map((function(e){return{from:E.CONV_SYSTEM,messageSeq:e.clientSequence,messageRandom:e.random}}))}}).then((function(){Ae.l("".concat(n," ok"));var o=t._grpM.get(11);return e.messageList.forEach((function(e){o.deleteLocalMessage(e)})),mn()})).catch((function(e){return Ae.e("".concat(n," error:"),e),yn(e)}))):vn()}},{key:"_getPendencyList",value:function(){var e=this,t=(o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).type,n=o.startTime,o=o.limit;return this._grpM.req({P:Gn.GET_GRP_PENDENCY,data:{type:void 0===t?void 0:t,startTime:void 0===n?0:n,limit:void 0===o?20:o,handleAccount:this._grpM.getMyUserID()}}).then((function(t){var n=t.data.pendencyList;return 0!==t.data.nextStartTime?e._getPendencyList({startTime:t.data.nextStartTime}).then((function(e){return[].concat(m(n),m(e))})):n}))}},{key:"getGroupApplicationList",value:function(){var e=this;return this._getPendencyList().then((function(t){return e._getPendencyList({type:E.GRP_COMMUNITY}).then((function(n){return t.push.apply(t,m(n)),e._handlePendencyResult(t)})).catch((function(n){return e._handlePendencyResult(t)}))}))}},{key:"_handlePendencyResult",value:function(e){var t=this,n=[];return e.forEach((function(e){t.pendencyMap.set("".concat(e.from,"_").concat(e.groupID,"_").concat(e.to),e),0===e.handled&&n.push({applicant:e.from,applicantNick:e.fromUserNickName,groupName:e.groupName,groupID:e.groupID,authentication:e.authentication,messageKey:e.time,applicationType:e.applicationType,userID:e.userID,note:e.note})})),vn({applicationList:n})}},{key:"_onReceivedGroupSystemNotice",value:function(e){var t=this,n=e.result;e.isInstantMessage&&n.forEach((function(e){switch(e.payload.operationType){case 1:case 3:case 6:case 11:case 12:case 15:break;case 2:t._onApplyJoinGroup(e);break;case 4:t._onMemberKicked(e);break;case 5:t._onGroupDismissed(e);break;case 7:t._onInviteGroup(e);break;case 8:t._onQuitGroup(e);break;case 9:t._onSetManager(e);break;case 10:t._onDeleteManager(e);break;case 20:t._onMessageRemindTypeSynced(e);break;case 21:t._grpM.onAVChatRoomMemberBanned(e)}}))}},{key:"_onApplyJoinGroup",value:function(e){var t=this,n=(e=e.payload.groupProfile).groupID,o=(e=e.groupType,this._grpM.hasLocalGroup(n));Ae.l("".concat(this._n,"._onApplyJoinGroup groupID:").concat(n," groupType:").concat(e," hasGroup:").concat(o)),o||yt(e)||this._grpM.getGroupProfile({groupID:n}).then((function(e){(e=e.data.group)&&(t._grpM.updateGroupMap([e]),e=!e.isSupportTopic,t._grpM.emitGroupListUpdate(!0,e))}))}},{key:"_onMemberKicked",value:function(e){e=e.payload.groupProfile.groupID,this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e)}},{key:"_onGroupDismissed",value:function(e){e=e.payload.groupProfile.groupID;var t=(this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e),this._grpM._AVChatRoomHandler);t&&t.checkJoinedAVChatRoomByID(e)&&t.reset(e)}},{key:"_onInviteGroup",value:function(e){var t=this,n=e.payload.groupProfile.groupID;e=this._grpM.hasLocalGroup(n),Ae.l("".concat(this._n,"._onInviteGroup groupID:").concat(n," hasGroup:").concat(e)),this._grpM.getGroupProfile({groupID:n}).then((function(){t._grpM.emitGroupListUpdate(),t._grpM.get(11).pullMsgOnInvite("".concat(E.CONV_GROUP).concat(n))}))}},{key:"_onQuitGroup",value:function(e){var t=(e=e.payload.groupProfile).groupID,n=(e=e.groupType,this._grpM.hasLocalGroup(t));Ae.l("".concat(this._n,"._onQuitGroup groupID:").concat(t," groupType:").concat(e," hasGroup:").concat(n)),n&&this._grpM.deleteLocalGroupAndConversation(t)}},{key:"_onSetManager",value:function(e){var t=(e=e.payload.groupProfile).to;e=e.groupID,(e=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(e,t))&&e.updateRole(E.GRP_MBR_ROLE_ADMIN)}},{key:"_onDeleteManager",value:function(e){var t=(e=e.payload.groupProfile).to;e=e.groupID,(e=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(e,t))&&e.updateRole(E.GRP_MBR_ROLE_MEMBER)}},{key:"_onMessageRemindTypeSynced",value:function(e){var t=e.payload.groupProfile.groupID;e=e.payload.messageRemindType,this._grpM.get(11).onGroupMsgRemindTypeUpdated({groupID:t,messageRemindType:e})}},{key:"_handleTopicSystemNotice",value:function(e){var t=(n=e.groupProfile).groupID,n=n.topicID,o=(e=e.elements).operationType,i=e.topicIDList,s=(e=e.messageRemindType,this._grpM.get(10));17===o?s.onTopicCreated({groupID:t,topicID:n}):18===o?s.onTopicDeleted({groupID:t,topicIDList:i}):20===o&&s.onMessageRemindTypeUpdated({groupID:t,topicID:n,messageRemindType:e})}},{key:"reset",value:function(){this.pendencyMap.clear()}}]),Vi),yi=["relayFlag"],Ii=(r(qi,bn),zo=g(qi),s(qi,[{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("polling_interval"),t=this.getCloudConfig("polling_interval_plus"),n=this.getCloudConfig("polling_no_msg_count"),o=this.getCloudConfig("polling_simplified_msg"),i=this.getCloudConfig("paging_grp_count");Ae.l("".concat(this._n,"._onCloudConfig pollingInterval:").concat(e)+" pollingIntervalPlus:".concat(t," pollingNoMessageCount:").concat(n)+" pollingSimplifiedMessage:".concat(o," pagingGroupCount:").concat(i)),this._AVChatRoomHandler.setPollingInterval(e),this._AVChatRoomHandler.setPollingIntervalPlus(t),this._AVChatRoomHandler.setPollingNoMessageCount(n),this._AVChatRoomHandler.setPollingSimplifiedMessage(o),this._commonGroupHandler.setPagingGroupCount(i)}},{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&(this._commonGroupHandler.onCheckTimer(e),this._groupTipsHandler.onCheckTimer(e))}},{key:"guardForAVChatRoom",value:function(e){var t,n=this;return e.conversationType!==E.CONV_GROUP||(t=Mt(e.to)?Gt(e.to):e.to,this.hasLocalGroup(t))?vn():this.getGroupProfile({groupID:t}).then((function(o){return o=o.data.group.type,Ae.l("".concat(n._n,".guardForAVChatRoom. groupID:").concat(t," type:").concat(o)),o===E.GRP_AVCHATROOM?yn(new Nn({code:o=Pn.MSG_SEND_FAIL_NOT_IN_AV,message:n.getErrMsg(o,e.from,t),data:{message:e}})):vn()}))}},{key:"checkJoinedAVChatRoomByID",value:function(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}},{key:"onNewMessage",value:function(e){this._commonGroupHandler.onNewMessage(e)}},{key:"updateNextMessageSeq",value:function(e){var t,n=this;Ye(e)&&(t=this.get(10),e.forEach((function(e){var o=e.conversationID.replace(E.CONV_GROUP,"");Mt(o)&&t.updateUnreadCountAndLastMsg(o,e.lastMessage),n.groupMap.has(o)&&(n.groupMap.get(o).nextMessageSeq=e.lastMessage.sequence+1)})))}},{key:"onNewGroupTips",value:function(e){this._groupTipsHandler.onNewGroupTips(e)}},{key:"onMsgRevoked",value:function(e){this._commonGroupHandler.onMsgRevoked(e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1])}},{key:"onNewGroupSystemNotice",value:function(e){this._groupSystemNoticeHandler.onNewGroupSystemNotice(e)}},{key:"onMsgReadNotice",value:function(e){var t=this;e.dataList.forEach((function(e){var n;e=e.elements.groupMessageReadNotice,ut(e)||(n=t.get(11),e.forEach((function(e){var o=e.groupID,i=void 0===(i=e.topicID)?void 0:i,s=(e=e.lastMessageSeq,Ae.l("".concat(t._n,".onMsgReadNotice groupID:").concat(o," lastMessageSeq:").concat(e)),o="".concat(E.CONV_GROUP).concat(o),!0);Ve(i)||(o="".concat(E.CONV_GROUP).concat(i),s=!1),n.updateIsReadAfterReadReport({conversationID:o,lastMessageSeq:e}),n.updateUnreadCount(o,s),n.clearGroupAtInfoList(o,s)})))}))}},{key:"onReadReceiptList",value:function(e){var t=this;Ae.l("".concat(this._n,".onReadReceiptList options:"),e),e.dataList.forEach((function(e){var n=e.groupProfile,o=(e=e.elements,n=n.groupID,t.get(11));e=e.readReceiptList,o.updateReadReceiptInfo({groupID:n,readReceiptList:e})}))}},{key:"onMsgModified",value:function(e){Ae.l("".concat(this._n,".onMsgModified options:"),e);var n=this.get(11);e.dataList.forEach((function(e){n.onMessageModified(t(t({},e),{},{conversationType:E.CONV_GROUP,to:e.topicID||e.groupID}))}))}},{key:"deleteGroupSystemNotice",value:function(e){this._groupSystemNoticeHandler.deleteGroupSystemNotice(e)}},{key:"initGroupMap",value:function(e){this.groupMap.set(e.groupID,new ni(e))}},{key:"clearGroupMap",value:function(){this.groupMap.clear()}},{key:"deleteGroup",value:function(e){this.groupMap.delete(e)}},{key:"updateGroupMap",value:function(e){var t,n=this,o=this.get(11);e.forEach((function(e){t=e.groupID,n.groupMap.has(t)?n.groupMap.get(t).updateGroup(e):(n.groupMap.set(t,new ni(e)),o.deleteGroupRoamingInfo(t))}));var i,s=this.getMyUserID(),a=T(this.groupMap);try{for(a.s();!(i=a.n()).done;){var r=_(i.value,2)[1];r.selfInfo.userID=s,"Owner"===r.selfInfo.role&&(r.ownerID=s)}}catch(c){a.e(c)}finally{a.f()}}},{key:"getGroupMap",value:function(){return this.groupMap}},{key:"getLocalGroupList",value:function(){return m(this.groupMap.values()).filter((function(e){return e.type!==E.GRP_ROOM&&e.type!==E.GRP_LIVE}))}},{key:"getLocalGroupProfile",value:function(e){return this.groupMap.get(e)}},{key:"sortLocalGroupList",value:function(){var e=m(this.groupMap).filter((function(e){return(e=_(e,2))[0],!Ve(e[1].lastMessage)}));e.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime})),this.groupMap=new Map(m(e))}},{key:"updateGroupLastMessage",value:function(e){this._commonGroupHandler.updateLastMsg(e)}},{key:"emitGroupListUpdate",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this.getLocalGroupList();e&&this.emitOEvt(S.GROUP_LIST_UPDATED),t&&(e=JSON.parse(JSON.stringify(n)),this.get(11).updateConvGroupProfile(e))}},{key:"getMyNameCardByGroupID",value:function(e){return(e=this.getLocalGroupProfile(e))?e.selfInfo.nameCard:""}},{key:"isPagingGetCompleted",value:function(){return this._commonGroupHandler.isPagingGetCompleted()}},{key:"getMsgRemindType",value:function(e){var t=this;return Ye(e)&&0!==e.length&&0!==(e=e.filter((function(e){return!yt(t.getLocalGroupProfile(e).type)}))).length?(Ae.l("".concat(this._n,".getMsgRemindType groupIDList:").concat(e)),this.getGroupProfileAdvance({groupIDList:e,responseFilter:{memberInfoFilter:["MsgFlag"]}}).then((function(e){e=e.data.successGroupList;var n=t.get(11);e.forEach((function(e){n.onGroupMsgRemindTypeUpdated({groupID:e.groupID,messageRemindType:Ye(e.members)?e.members[0].messageRemindType:""})}))}))):Promise.resolve()}},{key:"getGroupList",value:function(){return this._commonGroupHandler.getGroupList()}},{key:"syncCommunityWithTopic",value:function(){return this._commonGroupHandler.syncGroupList(!0)}},{key:"getGroupProfile",value:function(e){var t=this,n="".concat(this._n,".").concat("getGroupProfile"),o=new Jn("getGroupProfile"),i=e.groupID,s=e.groupCustomFieldFilter;return Ae.l("".concat(n," groupID:").concat(i)),s={groupIDList:[i],responseFilter:{groupBaseInfoFilter:m(U),groupCustomFieldFilter:s,memberInfoFilter:[].concat(m(x),["NameCard"])}},this.getGroupProfileAdvance(s).then((function(e){var s=(e=e.data).successGroupList;return e=e.failureGroupList,Ae.l("".concat(n," ok")),0<e.length?yn(e[0]):((e=yt(s[0].type)&&!t.hasLocalGroup(i)?new ni(s[0]):(t.updateGroupMap(s),t.getLocalGroupProfile(i))).isSupportTopic||t.get(11).updateConvGroupProfile([e]),o.setMessage("groupID:".concat(i," type:").concat(e.type," muteAllMembers:").concat(e.muteAllMembers," ownerID:").concat(e.ownerID)).end(),mn({group:e}))})).catch((function(t){return o.setError(t).setMessage("groupID:".concat(e.groupID)).end(),Ae.e("".concat(n," failed. error:"),t),yn(t)}))}},{key:"getGroupProfileAdvance",value:function(e){var n,o="".concat(this._n,".getGroupProfileAdvance"),i=(Ye(a=e.groupIDList)&&50<a.length&&(this.warn("GetGroupProfileLimit"),a.length=50),[]),s=[],a=(a.forEach((function(e){(It({groupID:e})?s:i).push(e)})),[]);return 0<i.length&&(n=this._getGroupProfileAdvance(t(t({},e),{},{groupIDList:i})),a.push(n)),0<s.length&&(n=this._getGroupProfileAdvance(t(t({},e),{},{groupIDList:s,relayFlag:0<i.length})),a.push(n)),Promise.all(a).then((function(e){var t=[],n=[];return e.forEach((function(e){t.push.apply(t,m(e.successGroupList)),n.push.apply(n,m(e.failureGroupList))})),mn({successGroupList:t,failureGroupList:n})})).catch((function(e){return Ae.e("".concat(o," failed. error:"),e),yn(e)}))}},{key:"_getGroupProfileAdvance",value:function(e){var t=this,n=e.relayFlag,o=void 0!==n&&n,i=h(e,yi);return this.req({P:Gn.GET_GRP_PROFILE,data:i}).then((function(e){return Ae.l("".concat(t._n,"._getGroupProfileAdvance ok. options:"),i),{successGroupList:(e=e.data.groups).filter((function(e){return ut(e.errorCode)||0===e.errorCode})),failureGroupList:e.filter((function(e){return e.errorCode&&0!==e.errorCode})).map((function(e){return new Nn({code:e.errorCode,message:e.errorInfo,data:{groupID:e.groupID}})}))}})).catch((function(t){return o&&It({groupID:e.groupIDList[0]})?{successGroupList:[],failureGroupList:[]}:yn(t)}))}},{key:"createGroup",value:function(e){var n=this,o=[E.GRP_PUBLIC,E.GRP_WORK,E.GRP_MEETING,E.GRP_AVCHATROOM,E.GRP_COMMUNITY],i="".concat(this._n,".").concat("createGroup"),s=e.type,a=e.groupID;if(e.name&&!1===this._filterProfanity("name",e))return yn({code:Pn.PROFANITY_FOUND});if(e.introduction&&!1===this._filterProfanity("introduction",e))return yn({code:Pn.PROFANITY_FOUND});if(e.notification&&!1===this._filterProfanity("notification",e))return yn({code:Pn.PROFANITY_FOUND});if(!o.includes(s))return yn({code:Pn.ILLEGAL_GRP_TYPE});if(!It({type:s})){if(!Ve(a)&&It({groupID:a}))return yn({code:Pn.ILLEGAL_GRP_ID});e.isSupportTopic=void 0}if(yt(s)&&!ut(e.memberList)&&0<e.memberList.length&&(e.memberList=void 0),this._canIUseJoinOption(s)||ut(e.joinOption)||(e.joinOption=void 0),It({type:s})){if(!Ve(a)&&!It({groupID:a}))return yn({code:Pn.ILLEGAL_GRP_ID});e.isSupportTopic=!0===e.isSupportTopic?1:0}var r=new Jn("createGroup"),c=(Ae.l("".concat(i," options:"),e),null),u=[];return this.req({P:Gn.CREATE_GRP,data:t(t({},e),{},{ownerID:this.getMyUserID(),webPushFlag:1})}).then((function(o){var s,a,l,d=(o=o.data).groupID,p=void 0===(o=o.overLimitUserIDList)?[]:o;return c=d,u=p,o="groupType:".concat(e.type," groupID:").concat(d," overLimitUserIDList:").concat(p),r.setMessage(o).end(),Ae.l("".concat(i," ok. ").concat(o)),e.type===E.GRP_AVCHATROOM||e.type===E.GRP_COMMUNITY&&1===e.isSupportTopic||(Ve(e.memberList)||Ve(p)||(e.memberList=e.memberList.filter((function(e){return-1===p.indexOf(e.userID)}))),n.updateGroupMap([t(t({},e),{},{groupID:d})]),o=n.get(2),l="",s=0,e.type===E.GRP_COMMUNITY?(l=n.isIntl()?"Create Community":"创建社群",s=1):l=n.isIntl()?"Create Group":"创建群组",a=n.get(4).getMyNick(),l=o.createCustomMessage({to:d,conversationType:E.CONV_GROUP,payload:{data:JSON.stringify({businessID:"group_create",content:l,cmd:s,opUser:a||n.getMyUserID(),version:4})}}),o.sendMessageInstance(l),n.emitGroupListUpdate()),n.getGroupProfile({groupID:d})})).then((function(e){var t=(n=(e=e.data.group).selfInfo).nameCard,n=n.joinTime;return e.updateSelfInfo({nameCard:t,joinTime:n,messageRemindType:E.MSG_REMIND_ACPT_AND_NOTE,role:E.GRP_MBR_ROLE_OWNER}),mn({group:e,overLimitUserIDList:u})})).catch((function(o){var s;return r.setMessage("groupType:".concat(e.type)).setError(o).end(),10010===o.code||10007===o.code?(n._silentlyGetGroupProfile(o.code,c),n.updateGroupMap([t(t({},e),{},{groupID:c})]),(s=n.getLocalGroupProfile(c)).selfInfo.role=E.GRP_MBR_ROLE_OWNER,mn({group:s,overLimitUserIDList:u})):(Ae.e("".concat(i," failed. error:"),o),yn(o))}))}},{key:"dismissGroup",value:function(e){var t=this,n="".concat(this._n,".").concat("dismissGroup"),o="groupID:".concat(e),i=new Jn("dismissGroup");return i.setMessage(o),Ae.l("".concat(n," ").concat(o)),this.req({P:Gn.DISMISS_GRP,data:{groupID:e}}).then((function(){return i.end(),Ae.l("".concat(n," ok")),t.deleteLocalGroupAndConversation(e),t.checkJoinedAVChatRoomByID(e)&&t._AVChatRoomHandler.reset(e),t._groupAttributesHandler.deleteLocalGroupAttributes(e),mn({groupID:e})})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"updateGroupProfile",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("updateGroupProfile");return this.hasLocalGroup(e.groupID)&&(t=this.getLocalGroupProfile(e.groupID).type,this._canIUseJoinOption(t)||ut(e.joinOption)||(Ae.w("".concat(i," joinOption is unavailable for Work/Meeting/AVChatRoom")),e.joinOption=void 0)),ut(e.muteAllMembers)||(e.muteAllMembers?e.muteAllMembers="On":e.muteAllMembers="Off"),e.name&&!1===this._filterProfanity("name",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?yn({code:Pn.PROFANITY_FOUND}):((n=new Jn("updateGroupProfile")).setMessage(JSON.stringify(e)),Ae.l("".concat(i," groupID:").concat(e.groupID)),this.req({P:Gn.UPDATE_GRP_PROFILE,data:e}).then((function(){return n.end(),Ae.l("".concat(i," ok")),o.hasLocalGroup(e.groupID)&&o.groupMap.get(e.groupID).updateGroup(e),mn({group:o.groupMap.get(e.groupID)})})).catch((function(e){return n.setError(e).end(),Ae.l("".concat(i," failed. error:"),e),yn(e)})))}},{key:"_filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],G)).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"joinGroup",value:function(e){var t,n=this,o=e.groupID,i="".concat(this._n,".joinGroup");return this.deleteUnjoinedAVChatRoom(o),this.hasLocalGroup(o)?this.isLoggedIn()?(t=new Jn("applyJoinGroup"),this.getGroupProfile({groupID:o}).then((function(){return t.setMessage("groupID:".concat(o," joinedStatus:").concat(E.JOIN_STATUS_ALREADY_IN_GROUP)).end(),vn({status:E.JOIN_STATUS_ALREADY_IN_GROUP})})).catch((function(s){return t.setMessage("groupID:".concat(o," unjoined")).end(),Ae.w("".concat(i," ").concat(o," was unjoined, now join!")),n.groupMap.delete(o),n.applyJoinGroup(e)}))):vn({status:E.JOIN_STATUS_ALREADY_IN_GROUP}):(Ae.l("".concat(i," groupID:").concat(o)),this.isLoggedIn()?this.applyJoinGroup(e):this._AVChatRoomHandler.joinWithoutAuth(e))}},{key:"applyJoinGroup",value:function(e){var n,o,i=this,s="".concat(this._n,".").concat("applyJoinGroup"),a=e.groupID;return Ve(e.applyMessage)||!1!==this._filterProfanity("applyMessage",e)?(n=new Jn("applyJoinGroup"),e=t({},e),(o=this.canIUse(w.AV_HISTORY_MSG))&&(e.historyMessageFlag=1),this.get(11).deleteTopicRoamingInfo(a),this.req({P:Gn.APPLY_JOIN_GRP,data:e}).then((function(e){var t=(e=e.data).joinedStatus,r=e.longPollingKey,c=e.startSeq,u=e.avChatRoomFlag,l=e.avChatRoomKey,d=e.messageList;switch(e="groupID:".concat(a," joinedStatus:").concat(t," longPollingKey:").concat(r," startSeq:").concat(c)+" avChatRoomFlag:".concat(u," canGetAVChatRoomHistoryMsg:").concat(o,",")+" historyMsgCount:".concat(Ve(d)?0:d.length),n.setMessage(e).end(),Ae.l("".concat(s," ok. ").concat(e)),t){case xe:return mn({status:xe});case Ue:return i.getGroupProfile({groupID:a}).then((function(e){return e=e.data.group,i._handleJoinResult({group:e,avChatRoomFlag:u,longPollingKey:r,startSeq:c,avChatRoomKey:l,messageList:d})})).catch((function(e){var t;return 10010===e.code||10007===e.code?(i._silentlyGetGroupProfile(e.code,a),t=new ni({groupID:a}),i.updateGroupMap([t]),i._handleJoinResult({group:t,avChatRoomFlag:u,longPollingKey:r,startSeq:c,avChatRoomKey:l,messageList:d})):(Ae.e("".concat(s," failed. error:"),e),yn(e))}));default:var p=new Nn({code:Pn.JOIN_GRP_FAIL});return Ae.e("".concat(s," failed. error:"),p),yn(p)}})).catch((function(e){return n.setMessage("groupID:".concat(a)).setError(e).end(),Ae.e("".concat(s," failed. error:"),e),yn(e)}))):yn({code:Pn.PROFANITY_FOUND})}},{key:"_handleJoinResult",value:function(e){var t=this,n=e.group,o=e.avChatRoomFlag,i=e.longPollingKey,s=e.startSeq,a=e.avChatRoomKey,r=e.messageList,c=n.groupID;return 1===o?(this.get(11).setCompleted("".concat(E.CONV_GROUP).concat(c)),this._groupAttributesHandler.initGroupAttributesCache({groupID:c,avChatRoomKey:a}),this._groupCountersHandler.initGroupCountersCache({groupID:c,avChatRoomKey:a}),(e=ut(i)?this._AVChatRoomHandler.handleJoinResult({group:n}):this._AVChatRoomHandler.startRunLoop({group:n,longPollingKey:i,startSeq:s})).then((function(){t._onAVChatRoomHistoryMessage(r,c)})),e):(this.emitGroupListUpdate(!0,!1),mn({status:Ue,group:n}))}},{key:"quitGroup",value:function(e){var t,n=this,o="".concat(this._n,".").concat("quitGroup"),i="groupID:".concat(e),s=(Ae.l("".concat(o," ").concat(i)),this.checkJoinedAVChatRoomByID(e));return s||this.hasLocalGroup(e)?s&&!this.isLoggedIn()?(Ae.l("".concat(o," anonymously ok. ").concat(i)),this.deleteLocalGroupAndConversation(e),this._AVChatRoomHandler.reset(e),vn({groupID:e})):((t=new Jn("quitGroup")).setMessage(i),this.req({P:Gn.QUIT_GRP,data:{groupID:e}}).then((function(){return t.end(),Ae.l("".concat(o," ok")),n.deleteLocalGroupAndConversation(e),s&&n._AVChatRoomHandler.reset(e),n._groupAttributesHandler.deleteLocalGroupAttributes(e),mn({groupID:e})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))):yn({code:Pn.MEMBER_NOT_IN_GRP})}},{key:"searchGroupByID",value:function(e){var t="".concat(this._n,".").concat("searchGroupByID"),n={groupIDList:[e]},o=new Jn("searchGroupByID");return o.setMessage("groupID:".concat(e)),Ae.l("".concat(t," groupID:").concat(e)),this.req({P:Gn.SEARCH_GRP,data:n}).then((function(e){if(0!==(e=e.data.groupProfile)[0].errorCode)throw new Nn({code:e[0].errorCode,message:e[0].errorInfo});return o.end(),Ae.l("".concat(t," ok")),mn({group:new ni(e[0])})})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"changeGroupOwner",value:function(e){var t,n=this,o="".concat(this._n,".").concat("changeGroupOwner");return this.hasLocalGroup(e.groupID)&&this.getLocalGroupProfile(e.groupID).type===E.GRP_AVCHATROOM?yn({code:Pn.CANNOT_CHANGE_OWNER_IN_AV}):e.newOwnerID===this.getMyUserID()?yn({code:Pn.CANNOT_CHANGE_OWNER_TO_SELF}):((t=new Jn("changeGroupOwner")).setMessage("groupID:".concat(e.groupID," newOwnerID:").concat(e.newOwnerID)),Ae.l("".concat(o," groupID:").concat(e.groupID)),this.req({P:Gn.CHANGE_GRP_OWNER,data:e}).then((function(){t.end(),Ae.l("".concat(o," ok"));var i,s=e.groupID,a=e.newOwnerID,r=(n.groupMap.get(s).ownerID=a,n._groupMemberHandler.getLocalGroupMemberList(s));return r instanceof Map&&(i=r.get(n.getMyUserID()),ut(i)||(i.updateRole("Member"),n.groupMap.get(s).selfInfo.role="Member"),i=r.get(a),ut(i)||i.updateRole("Owner")),n.emitGroupListUpdate(!0,!1),mn({group:n.groupMap.get(s)})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)})))}},{key:"getGroupApplicationList",value:function(){return this._groupSystemNoticeHandler.getGroupApplicationList()}},{key:"handleGroupApplication",value:function(e){var t,n,o,i,s,a=this,r="".concat(this._n,".").concat("handleGroupApplication"),c=e.handleAction,u=e.handleMessage,l=e.message,d=e.application,p=(l?(t=l.payload.operatorID,n=l.payload.groupProfile.groupID,o=l.payload.authentication,i=l.payload.messageKey):d&&(t=d.applicant,n=d.groupID,o=d.authentication,i=d.messageKey),Gn.HANDLE_GRP_APPLICATION),h=(d&&2===d.applicationType&&(p=Gn.HANDLE_INVITE_JOIN_GRP,s=d.userID),new Jn("handleGroupApplication"));return h.setMessage("groupID:".concat(n)),Ae.l("".concat(r," groupID:").concat(n)),this.req({P:p,data:{handleAction:c,handleMessage:u,applicant:t,invitee:s,groupID:n,authentication:o,messageKey:i}}).then((function(){return h.end(),Ae.l("".concat(r," ok")),l&&a._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),mn({group:a.getLocalGroupProfile(n)})})).catch((function(e){return h.setError(e).end(),Ae.e("".concat(r," failed. error"),e),yn(e)}))}},{key:"handleGroupInvitation",value:function(e){var n=this,o="".concat(this._n,".").concat("handleGroupInvitation"),i=(r=e.message.payload).groupProfile.groupID,s=r.authentication,a=r.messageKey,r=r.operatorID,c=e.handleAction,u=new Jn("handleGroupInvitation");return u.setMessage("groupID:".concat(i," inviter:").concat(r," handleAction:").concat(c)),Ae.l("".concat(o," groupID:").concat(i," inviter:").concat(r," handleAction:").concat(c)),this.req({P:Gn.HANDLE_GRP_INVITATION,data:t(t({},e),{},{inviter:r,groupID:i,authentication:s,messageKey:a})}).then((function(){return u.end(),Ae.l("".concat(o," ok")),n._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),mn({group:n.getLocalGroupProfile(i)})})).catch((function(e){return u.setError(e).end(),Ae.e("".concat(o," failed. error"),e),yn(e)}))}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this,n="".concat(this._n,".getGroupOnlineMemberCount"),o=this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e),i=this.hasLocalGroup(e);if(Ae.l("".concat(n," groupID:").concat(e," isAVChatRoom:").concat(o," has:").concat(i)),o)return this._AVChatRoomHandler.getGroupOnlineMemberCount(e);if(!i)return vn({memberCount:0});if(o=Date.now(),this._onlineMemberCountMap.has(e)){if(o-(i=this._onlineMemberCountMap.get(e)).lastReqTime<=6e4)return vn({memberCount:i.memberCount});i.lastReqTime=o}return this.requestOnlineCount(e).then((function(o){return o=void 0===(o=o.data.memberCount)?0:o,t._onlineMemberCountMap.set(e,{lastReqTime:Date.now(),memberCount:o}),Ae.l("".concat(n," ok. groupID:").concat(e," memberCount:").concat(o)),vn({memberCount:o})})).catch((function(e){return Ae.w("".concat(n," failed. error:"),e),Promise.reject(e)}))}},{key:"requestOnlineCount",value:function(e){return this.req({P:Gn.GET_ONLINE_MBR_NUM,data:{groupID:e}})}},{key:"hasLocalGroup",value:function(e){return this.groupMap.has(e)}},{key:"deleteLocalGroupAndConversation",value:function(e){var t=this.checkJoinedAVChatRoomByID(e),n=(Ae.l("".concat(this._n,".deleteLocalGroupAndConversation groupID:").concat(e," isJoinedAVChatRoom:").concat(t)),this.get(11)),o="".concat(E.CONV_GROUP).concat(e);t&&(this.stopMessageLongPolling({groupID:e}),n.deleteLocalConv(o)),It({groupID:e})&&(t=this.getLocalGroupProfile(e))&&!0===t.isSupportTopic&&this.get(10).deleteTopicListInCommunity(e),n.clearUnreadCount(o),n.setCompleted(o),this._deleteLocalGroup(e),this._onlineMemberCountMap.delete(e),this.emitGroupListUpdate(!0,!1)}},{key:"_deleteLocalGroup",value:function(e){this.groupMap.delete(e),this._groupMemberHandler.deleteGroupMemberList(e)}},{key:"sendMessage",value:function(e,t){return Ye(e._receiverList)&&0<e._receiverList.length&&!this.canIUse(w.MSG_TO_SPECIFIED_GRP_MBR)?this.noUse("Targeted Group Message"):(e=this.createGroupMessagePack(e,t),this.req(e))}},{key:"createGroupMessagePack",value:function(e,t){var n=null,o=(t&&t.offlinePushInfo&&(n=t.offlinePushInfo),""),i=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(o=e.cloudCustomData),[]),s=void(We(t)&&We(t.messageControlInfo)&&(s=(r=t.messageControlInfo).excludedFromUnreadCount,a=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===s&&i.push("NoUnread"),!0===a&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck")),a=(Ye(e._receiverList)&&0<e._receiverList.length&&(s=e._receiverList,50<e._receiverList.length)&&(s=e._receiverList.slice(0,50),this.warn("ReceiverListLimit")),this.isOnlineMessage(e,t)?1:0),r=JSON.parse(JSON.stringify(e.getElements())),c=(t=this.get(17).getFileDNList(),e.getGroupAtInfoList());return r={fromAccount:this.getMyUserID(),groupID:e.to,msgBody:io(e.type,r,t),cloudCustomData:o,random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:e.type!==E.MSG_TEXT||Ve(c)?void 0:c,onlineOnlyFlag:a,clientTime:e.clientTime,offlinePushInfo:wo(n),messageControlInfo:0==a?i:void 0,needReadReceipt:!0!==e.needReadReceipt||this.isMessageFromOrToAVChatroom(e.to)?0:1,receiverList:s,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0,cmConfigID:e._cmConfigID},Mt(e.to)&&(r.groupID=Gt(e.to),r.topicID=e.to),{P:Gn.SEND_GRP_MSG,data:r}}},{key:"revokeMessage",value:function(e){var t={groupID:e.to,msgSeqList:[{msgSeq:e.sequence}]};return Mt(e.to)&&(t.groupID=Gt(e.to),t.topicID=e.to),this.req({P:Gn.REVOKE_GRP_MSG,data:t})}},{key:"deleteMessage",value:function(e){var t=e.to;return e=e.keyList,Ae.l("".concat(this._n,".deleteMessage groupID:").concat(t," count:").concat(e.length)),e={groupID:t,deleter:this.getMyUserID(),keyList:e},Mt(t)&&(e.groupID=Gt(t),e.topicID=t),this.req({P:Gn.DEL_GRP_MSG,data:e})}},{key:"modifyRemoteMessage",value:function(e){var t=e.to,n=e.sequence,o=e.payload,i=e.type,s=void 0===(s=e.version)?0:s,a=e.cloudCustomData,r=(e=e._elements,t),c=void 0;return t=void(Mt(t)&&(r=Gt(t),c=t)),xt(i)&&(1<e.length&&e.splice(0,1,{type:i,content:o}),t=e),this.req({P:Gn.MODIFY_GRP_MSG,data:{groupID:r,topicID:c,sequence:n,version:s,elements:t,cloudCustomData:a}})}},{key:"getRoamingMessage",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessage"),o=e.conversationID,i=e.groupID,s=(e=e.sequence,new Jn("getRoamingMessage")),a=0,r=void 0;return Mt(i)&&(i=Gt(r=i)),this._computeLastSequence({groupID:i,topicID:r,sequence:e}).then((function(e){return a=e,Ae.l("".concat(n," groupID:").concat(i," startSequence:").concat(a)),t.req({P:Gn.GET_GRP_ROAMING_MSG,data:{groupID:i,count:21,sequence:a,topicID:r}})})).then((function(e){var c=(l=e.data).messageList,u=l.complete,l=void 0===(l=l.invisibleSequenceList)?[]:l,d=(e=void 0===(e=e.data.nextSequence)?0:e,ut(c)?Ae.l("".concat(n," ok. complete:").concat(u," nextSequence:").concat(e," but messageList is undefined!")):Ae.l("".concat(n," ok. complete:").concat(u," nextSequence:").concat(e," count:").concat(c.length)),s.setMessage("groupID:".concat(i," topicID:").concat(r," startSequence:").concat(a," complete:").concat(u," nextSequence:").concat(e)).end(),t.get(11)),p=[],h=[];return Ve(c)||(p=d.onRoamingMessage(c,o,!0,h),d.updateIsRead(o),d.patchConvLastMessage(o)),(c=2===u||e<1)&&(d.setCompleted(o),e=""),Ae.l("".concat(n," isPullingCompleted:").concat(c," nextReqID:").concat(e," storedMsgCount:").concat(p.length)+" invisibleSeqCount:".concat(l.length)),{nextReqID:e+"",storedMessageList:p,assembledMessageList:h,isPullingCompleted:c}})).catch((function(e){return s.setError(e).setMessage("groupID:".concat(i," topicID:").concat(r," startSequence:").concat(a)).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_getGroupIDOfMessage",value:function(e){return e.conversationID.replace(E.CONV_GROUP,"")}},{key:"getReadReceiptList",value:function(e){var t,n="".concat(this._n,".").concat("getReadReceiptList"),o=this._getGroupIDOfMessage(e[0]),i=this.getMyUserID(),s=e.filter((function(e){return e.from===i&&!0===e.needReadReceipt})).map((function(e){return{sequence:e.sequence}}));return Ae.l("".concat(n," groupID:").concat(o," sequenceList:").concat(JSON.stringify(s))),0===s.length?vn({messageList:e}):((t=new Jn("getReadReceiptList")).setMessage("groupID:".concat(o)),this.req({P:Gn.GET_READ_RECEIPT,data:{groupID:o,sequenceList:s}}).then((function(o){return t.end(),Ae.l("".concat(n," ok")),Ye(o=o.data.readReceiptList)&&o.forEach((function(t){e.forEach((function(e){0===t.code&&t.sequence===e.sequence&&(e.readReceiptInfo.readCount=t.readCount,e.readReceiptInfo.unreadCount=t.unreadCount)}))})),mn({messageList:e})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)})))}},{key:"sendReadReceipt",value:function(e){var t="".concat(this._n,".").concat("sendReadReceipt"),n=this._getGroupIDOfMessage(e[0]),o=new Jn("sendReadReceipt"),i=(o.setMessage("groupID:".concat(n)),this.getMyUserID());return 0===(e=e.filter((function(e){return e.from!==i&&!0===e.needReadReceipt})).map((function(e){return{sequence:e.sequence}}))).length?yn({code:Pn.READ_RECEIPT_MSG_LIST_EMPTY}):(Ae.l("".concat(t,". sequenceList:").concat(JSON.stringify(e))),this.req({P:Gn.SEND_READ_RECEIPT,data:{groupID:n,sequenceList:e}}).then((function(e){return o.end(),Ae.l("".concat(t," ok")),mn()})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)})))}},{key:"getReadReceiptDetail",value:function(e){var t=this,n=e.message,o=e.filter,i=e.cursor,s=(e=e.count,this._getGroupIDOfMessage(n)),a=n.ID,r=(n=n.sequence,"".concat(this._n,".").concat("getReadReceiptDetail")),c=this._receiptDetailCompleteMap.get(a)||!1,u=0!==o&&1!==o?0:o,l=(o=ct(i)?i:"",i=!je(e)||e<=0||100<=e?100:e,e="groupID:".concat(s," sequence:").concat(n," cursor:").concat(o," filter:").concat(u," completeFlag:").concat(c),Ae.l("".concat(r," ").concat(e)),{cursor:"",isCompleted:!1,messageID:a,unreadUserIDList:[],readUserIDList:[]}),d=new Jn("getReadReceiptDetail");return d.setMessage(e),this.req({P:Gn.GET_READ_RECEIPT_DETAIL,data:{groupID:s,sequence:n,flag:u,cursor:o,count:i}}).then((function(e){d.end();var n=(e=e.data).cursor,o=e.isCompleted,i=e.unreadUserIDList;return e=e.readUserIDList,l.cursor=n,1===o&&(l.isCompleted=!0,t._receiptDetailCompleteMap.set(a,!0)),0===u?l.readUserIDList=e.map((function(e){return e.userID})):1===u&&(l.unreadUserIDList=i.map((function(e){return e.userID}))),Ae.l("".concat(r," ok")),mn(l)})).catch((function(e){return d.setError(e).end(),Ae.w("".concat(r," failed. error:"),e),yn(e)}))}},{key:"getRoamingMessagesHopping",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessagesHopping"),o=e.groupID,i=e.count,s=e.sequence,a=e.direction,r=void 0;return ut(s)&&1===a?vn({messageList:[],isCompleted:!0,nextMessageSeq:""}):(Mt(o)&&(o=Gt(r=o)),this._computeReqSeqHopping({groupID:o,topicID:r,sequence:s}).then((function(c){ut(s)||1!==a||(c=s+i-1);var u="".concat(r?"topicID:".concat(r):"groupID:".concat(o)," sequence:").concat(s," reqSeq:").concat(c," direction:").concat(a),l=(Ae.l("".concat(n," ").concat(u)),new Jn("getRoamingMessagesHopping"));return t.req({P:Gn.GET_GRP_ROAMING_MSG,data:{groupID:o,topicID:r,count:i,sequence:c}}).then((function(o){var i=void 0===(i=(o=o.data).messageList)?[]:i,r=o.complete,c=void 0===(c=o.nextSequence)?0:c,d=(o=void 0===(o=o.invisibleSequenceList)?[]:o,"complete:".concat(r," nextSequence:").concat(c," remoteMsgCount:").concat(i.length," invisibleSequenceList:").concat(o)),p=(l.setMessage("".concat(u," ").concat(d)).end(),Ae.l("".concat(n," ok. ").concat(d)),d="".concat(E.CONV_GROUP).concat(e.groupID),t.get(11));return d=p.onRoamingMessage(i,d,!1),i=t._computeResult({groupID:e.groupID,direction:a,sequence:s,remoteMessageList:i,processedMessageList:d,complete:r,nextSequence:c,invisibleSequenceList:o}),p.storeHoppingMessageList(i.messageList),mn(i)})).catch((function(e){return l.setError(e).setMessage("groupID:".concat(o," sequence:").concat(s," count:").concat(i)).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))})))}},{key:"_computeReqSeqHopping",value:function(e){var t=this,n=e.groupID,o=void 0===(o=e.topicID)?void 0:o;return 0<(e=void 0===(e=e.sequence)?void 0:e)?Promise.resolve(e):ut(o)?this.getGroupProfileAdvance({groupIDList:[n],responseFilter:{groupBaseInfoFilter:["NextMsgSeq"]}}).then((function(e){var o=0;return Ve(e=e.data.successGroupList)||(o=e[0].nextMessageSeq-1),Ae.l("".concat(t._n,"._computeReqSeqHopping groupID:").concat(n," lastSequence:").concat(o," from remote")),o})).catch((function(e){return yn(e)})):Promise.resolve(0)}},{key:"_computeResult",value:function(e){var t={messageList:[],isCompleted:!1,nextMessageSeq:""},n=e.groupID,o=e.direction,i=e.sequence,s=void 0===(s=e.remoteMessageList)?[]:s,a=void 0===(a=e.processedMessageList)?[]:a,r=e.complete,c=e.nextSequence;if(e=e.invisibleSequenceList,0===o)return t.nextMessageSeq=c,(2===r||c<1)&&(t.isCompleted=!0,t.nextMessageSeq=""),t.messageList=a,t;if(1===o){if(Ve(s)){if(Ve(e))return t.isCompleted=!0,t.nextMessageSeq="",t;t.nextMessageSeq=e[0]+1}else r=s[0].sequence,c=e[0]||0,t.nextMessageSeq=c<r?r+1:c+1;return a.forEach((function(e){e.sequence>=i&&t.messageList.push(e)})),(It({groupID:n})||Mt(n))&&0===t.messageList.length&&s[0].sequence<i&&(t.isCompleted=!0,t.nextMessageSeq=""),t}}},{key:"setMessageRead",value:function(e){var t=this,n=e.conversationID,o=e.lastMessageSeq,i="".concat(this._n,".").concat("setMessageRead"),s=(e="convID:".concat(n," lastMessageSeq:").concat(o),Ae.l("".concat(i," ").concat(e)),je(o)||this.warn("DoNotModifyLastSeq"),new Jn("setMessageRead")),a=(s.setMessage(e),n.replace(E.CONV_GROUP,"")),r=void 0;return Mt(a)&&(a=Gt(r=a)),this.req({P:Gn.SET_GRP_MSG_READ,data:{groupID:a,topicID:r,messageReadSeq:o}}).then((function(){s.end(),Ae.l("".concat(i," ok"));var e,c=t.get(11),u=(c.updateIsReadAfterReadReport({conversationID:n,lastMessageSeq:o}),!0);return!ut(r)&&(u=!1,e=t.get(10).getLocalTopic(a,r))&&e.updateSelfInfo({readedSequence:o}),c.updateUnreadCount(n,u),mn()})).catch((function(e){return s.setError(e).end(),Ae.l("".concat(i," failed. error:"),e),yn(e)}))}},{key:"_computeLastSequence",value:function(e){var t=e.groupID,n=void 0===(n=e.topicID)?void 0:n;return 0<(e=e.sequence)?Promise.resolve(e):ut(n)?this.getGroupLastSequence(t):Promise.resolve(0)}},{key:"getGroupLastSequence",value:function(e){var t="".concat(this._n,".").concat("getGroupLastSequence"),n=new Jn("getGroupLastSequence"),o=0,i="",s="groupID:".concat(e);if(this.hasLocalGroup(e)){var a=this.getLocalGroupProfile(e),r=a.lastMessage;if(0<r.lastSequence&&!1===r.onlineOnlyFlag)return o=r.lastSequence,i="".concat(s,", ").concat(o," from group.lastMessage.lastSequence"),Ae.l("".concat(t," ").concat(i)),n.setMessage(i).end(),Promise.resolve(o);if(1<a.nextMessageSeq)return o=a.nextMessageSeq-1,i="".concat(s,", ").concat(o," from group.nextMessageSeq"),Ae.l("".concat(t," ").concat(i)),n.setMessage(i).end(),Promise.resolve(o)}return(r=this.get(11).getLocalConversation("GROUP".concat(e)))&&r.lastMessage.lastSequence&&!1===r.lastMessage.onlineOnlyFlag?(o=r.lastMessage.lastSequence,i="".concat(s,", ").concat(o," from conversation.lastMessage.lastSequence"),Ae.l("".concat(t," ").concat(i)),n.setMessage(i).end(),Promise.resolve(o)):this.getGroupProfileAdvance({groupIDList:[e],responseFilter:{groupBaseInfoFilter:["NextMsgSeq"]}}).then((function(e){return Ve(e=e.data.successGroupList)?Ae.w("".concat(t," ").concat(s,", empty successGroupList")):(o=e[0].nextMessageSeq-1,i="".concat(s,", ").concat(o," from remote"),Ae.l("".concat(t," ").concat(i))),n.setMessage(i).end(),o})).catch((function(e){return n.setError(e).setMessage(s).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"isMessageFromOrToAVChatroom",value:function(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}},{key:"hasJoinedAVChatRoom",value:function(){return this._AVChatRoomHandler.hasJoinedAVChatRoom()}},{key:"getJoinedAVChatRoom",value:function(){return this._AVChatRoomHandler.getJoinedAVChatRoom()}},{key:"getGroupRemoteLastSeq",value:function(e){return(e=this.getLocalGroupProfile(e))?e.nextMessageSeq-1:1}},{key:"isOnlineMessage",value:function(e,t){return!(!this._canIUseOnlineOnlyFlag(e)||!t||!0!==t.onlineUserOnly)}},{key:"_canIUseOnlineOnlyFlag",value:function(e){var t=this.getJoinedAVChatRoom();return!t||!t.includes(e.to)||e.conversationType!==E.CONV_GROUP}},{key:"_onAVChatRoomHistoryMessage",value:function(e,n){var o;Ve(e)||(Ae.l("".concat(this._n,"._onAVChatRoomHistoryMessage groupID:").concat(n," count:").concat(e.length)),o=[],e.forEach((function(e){o.push(t(t({},e),{},{isHistoryMessage:1}))})),this.onAVChatRoomMessage(o,n))}},{key:"onAVChatRoomMessage",value:function(e){this._AVChatRoomHandler.onMessage(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"")}},{key:"onAVChatRoomMemberBanned",value:function(e){this._AVChatRoomHandler.onAVChatRoomMemberBanned(e)}},{key:"setUnjoinedAVChatRoom",value:function(e){this._unjoinedAVChatRoomList.set(e,1)}},{key:"deleteUnjoinedAVChatRoom",value:function(e){this._unjoinedAVChatRoomList.has(e)&&this._unjoinedAVChatRoomList.delete(e)}},{key:"isUnjoinedAVChatRoom",value:function(e){return this._unjoinedAVChatRoomList.has(e)}},{key:"isGroupAttributesUpdatedNotice",value:function(e){return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e)}},{key:"updateLocalMainSequenceOnReconnected",value:function(){this._groupAttributesHandler.updateLocalMainSequenceOnReconnected()}},{key:"initGroupAttributes",value:function(e){return this._groupAttributesHandler.initGroupAttributes(e)}},{key:"setGroupAttributes",value:function(e){return this._groupAttributesHandler.setGroupAttributes(e)}},{key:"deleteGroupAttributes",value:function(e){return this._groupAttributesHandler.deleteGroupAttributes(e)}},{key:"getGroupAttributes",value:function(e){return this._groupAttributesHandler.getGroupAttributes(e)}},{key:"isMessageFromTopic",value:function(e,t){return 2===e&&!Ve(t)}},{key:"isMessageFromCommunityOfTopic",value:function(e,t){return 2===e&&Ve(t)}},{key:"getMessageExtensions",value:function(e,t){return Ae.l("".concat(this._n,".getMessageExtensions startSequence:").concat(t)),this.req({P:Gn.GET_GRP_MSG_EXT,data:{groupID:e.to,messageSequence:e.sequence,startSequence:t}})}},{key:"modifyMsgExts",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return Ae.l("".concat(this._n,".modifyMsgExts operateType:").concat(n)),this.req({P:Gn.MODIFY_GRP_MSG_EXT,data:{groupID:e.to,messageSequence:e.sequence,extensionList:t,operateType:n}})}},{key:"_genNotifyReqList",value:function(e){for(var t,n,o,i,s=[],a=0,r=e.length;a<r;a++)t=e[a],i=this.getLocalGroupProfile(t).type,n=this._getGroupLastRevokedTime(t),o=1e3*De(),i={notifyType:1,limit:20,type:It({type:i,groupID:t})?E.GRP_COMMUNITY:void 0,groupID:t,beginTime:n,endTime:o},s.push(i);return s}},{key:"getNotice",value:function(e){var t=this,n="".concat(this._n,".getNotice");0!==(e=e.filter((function(e){var n;return!!t.hasLocalGroup(e)&&(n=(e=t.getLocalGroupProfile(e)).type,e=e.isSupportTopic,!yt(n))&&!e}))).length&&(Ae.l("".concat(n," list:").concat(e)),this.req({P:Gn.GET_GRP_NOTIFY,data:{notifyReqList:this._genNotifyReqList(e)}}).then((function(e){e=e.data.notifyRspList;var o,i,s=[];Ye(e)&&(o={dataList:[]},i="".concat(n," ok."),e.forEach((function(e){var n=e.nextRevokedTime,a=e.groupID,r=e.notifyList;i+=" groupID:".concat(a," nextRevokedTime:").concat(n," count:").concat(r.length,"\n"),o.dataList.push({elements:{revokedInfos:t._genRevokedInfos(e)}}),0!==n?(t._setGroupLastRevokedTime(a,n),s.push(a)):t._setGroupLastRevokedTime(a,1e3*De())})),Ae.l(i),t.onMsgRevoked(o,!1)),0<s.length&&t.getNotice(s)})).catch((function(e){Ae.e("".concat(n," failed. error:"),e)})))}},{key:"_genRevokedInfos",value:function(e){var n=e.notifyList,o=e.groupID,i=[];return Ye(n)&&n.forEach((function(e){i.push({groupID:o,sequence:e.sequence,random:e.random,revokerInfo:t({},e.revokerInfo)})})),i}},{key:"_getGroupLastRevokedTime",value:function(e){return this.hasLocalGroup(e)?this.getLocalGroupProfile(e)._lastRevokedTime:0}},{key:"_setGroupLastRevokedTime",value:function(e,t){this.hasLocalGroup(e)&&(this.getLocalGroupProfile(e)._lastRevokedTime=t)}},{key:"isGroupCountersNotice",value:function(e){return this._groupCountersHandler.isGroupCountersNotice(e)}},{key:"setGroupCounters",value:function(e){return this._groupCountersHandler.setGroupCounters(e)}},{key:"increaseGroupCounter",value:function(e){return this._groupCountersHandler.increaseGroupCounter(e)}},{key:"decreaseGroupCounter",value:function(e){return this._groupCountersHandler.decreaseGroupCounter(e)}},{key:"getGroupCounters",value:function(e){return this._groupCountersHandler.getGroupCounters(e)}},{key:"getGroupMemberHandler",value:function(){return this._groupMemberHandler}},{key:"getGroupMemberList",value:function(e){return this._groupMemberHandler.getGroupMemberList(e)}},{key:"getGroupMemberProfile",value:function(e){return this._groupMemberHandler.getGroupMemberProfile(e)}},{key:"addGroupMember",value:function(e){return this._groupMemberHandler.addGroupMember(e)}},{key:"deleteGroupMember",value:function(e){return this._groupMemberHandler.deleteGroupMember(e)}},{key:"setGroupMemberMuteTime",value:function(e){return this._groupMemberHandler.setGroupMemberMuteTime(e)}},{key:"setGroupMemberRole",value:function(e){return this._groupMemberHandler.setGroupMemberRole(e)}},{key:"setGroupMemberNameCard",value:function(e){return this._groupMemberHandler.setGroupMemberNameCard(e)}},{key:"setGroupMemberCustomField",value:function(e){return this._groupMemberHandler.setGroupMemberCustomField(e)}},{key:"markGroupMemberList",value:function(e){return this._groupMemberHandler.markGroupMemberList(e)}},{key:"modifyGroupMemberInfo",value:function(e){return this._groupMemberHandler.modifyGroupMemberInfo(e)}},{key:"restartPolling",value:function(){this._AVChatRoomHandler.restartPolling()}},{key:"getPollingTimerID",value:function(e){var t;return e&&(t=this.getLocalGroupProfile(e))&&yt(t.type)?this._AVChatRoomHandler.getPollingTimerID(e):-1}},{key:"_canIUseJoinOption",value:function(e){return e===E.GRP_PUBLIC||It({type:e})}},{key:"_silentlyGetGroupProfile",value:function(e,t){var n=setTimeout(this.getGroupProfile.bind(this,{groupID:t}),3e3);this._timeoutIDs.push(n),Ae.l("".concat(this._n,"._silentlyGetGroupProfile errorCode:").concat(e," groupID:").concat(t," timeoutIDs:").concat(this._timeoutIDs))}},{key:"_clearTimeoutIDs",value:function(){this._timeoutIDs.forEach((function(e){clearTimeout(e)})),this._timeoutIDs=[]}},{key:"startMessageLongPolling",value:function(e){var t=e.groupID,n=e.longPollingKey,o=(e=void 0===(e=e.longPollingSequence)?1:e,this.get(12).isUnlimitedAVChatRoom()),i=(this._AVChatRoomHandler.hasPollingInstance(t)&&this.stopMessageLongPolling({groupID:t}),this._AVChatRoomHandler.getJoinedLiveList());return!o&&0<i.length&&this.stopMessageLongPolling({groupID:i[0]}),o=new ni({groupID:t,type:E.GRP_LIVE}),Ae.l("".concat(this._n,".startMessageLongPolling groupID:").concat(t," longPollingKey:").concat(n," longPollingSequence:").concat(e)),this._AVChatRoomHandler.startRunLoop({group:o,longPollingKey:n,startSeq:e})}},{key:"stopMessageLongPolling",value:function(e){e=e.groupID;var t=this.get(11);return this._AVChatRoomHandler.reset(e),this._deleteLocalGroup(e),t.deleteLocalConv("".concat(E.CONV_GROUP).concat(e)),Ae.l("".concat(this._n,".stopMessageLongPolling ok, groupID:").concat(e)),vn({groupID:e})}},{key:"reset",value:function(){this.groupMap.clear(),this._unjoinedAVChatRoomList.clear(),this._receiptDetailCompleteMap.clear(),this._onlineMemberCountMap.clear(),this._commonGroupHandler.reset(),this._groupSystemNoticeHandler.reset(),this._groupTipsHandler.reset(),this._groupAttributesHandler.reset(),this._groupCountersHandler.reset(),this._AVChatRoomHandler.reset(),this._groupMemberHandler.reset(),this._clearTimeoutIDs()}}]),qi),Mi=["topicID","topicName","avatar","introduction","notification","unreadCount","muteAllMembers","customData","groupAtInfoList","nextMessageSeq","selfInfo"],Ci=(s(Fi,[{key:"_initTopic",value:function(e){for(var t in e)Mi.indexOf(t)<0||("selfInfo"===t?this.updateSelfInfo(e[t]):this[t]="muteAllMembers"===t?1===e[t]:e[t])}},{key:"updateUnreadCount",value:function(){this.unreadCount=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0}},{key:"updateNextMessageSeq",value:function(e){this.nextMessageSeq=e}},{key:"updateLastMessage",value:function(e){this.lastMessage=Ko(e)}},{key:"updateGroupAtInfoList",value:function(e){this.groupAtInfoList=JSON.parse(JSON.stringify(e))}},{key:"updateTopic",value:function(e){ut(e.selfInfo)||this.updateSelfInfo(e.selfInfo),ut(e.muteAllMembers)||(this.muteAllMembers=1===e.muteAllMembers),Ze(this,e,["groupID","lastMessageTime","selfInfo","muteAllMembers","lastMsg"])}},{key:"updateSelfInfo",value:function(e){return 0===Ze(this.selfInfo,e,[],[""])}},{key:"reduceUnreadCount",value:function(){return 1<=this.unreadCount&&(--this.unreadCount,!0)}},{key:"isLastMessageRevoked",value:function(e){return e.sequence===this.lastMessage.lastSequence}},{key:"setLastMessageRevoked",value:function(e){this.lastMessage.isRevoked=e}},{key:"setLastMessageRevoker",value:function(e){this.lastMessage.revoker=e}}]),Fi),Ti=(r(xi,bn),Yo=g(xi),s(xi,[{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("topic_cache_time"),t=this.getCloudConfig("topic_last_active_time");ut(e)||(this.TOPIC_CACHE_TIME=Number(e)),ut(t)||(this.TOPIC_LAST_ACTIVE_TIME=Number(t))}},{key:"onTopicCreated",value:function(e){var t=e.groupID;this.resetGetTopicTime(t),this.emitOEvt(S.TOPIC_CREATED,e)}},{key:"onTopicDeleted",value:function(e){var t=this,n=e.groupID,o=e.topicIDList;(void 0===o?[]:o).forEach((function(e){t._deleteLocalTopic(n,e)})),this.emitOEvt(S.TOPIC_DELETED,e)}},{key:"onTopicProfileUpdated",value:function(e){var t=e.groupID,n=e.topicID;(n=this.getLocalTopic(t,n))&&(n.updateTopic(e),this.emitOEvt(S.TOPIC_UPDATED,{groupID:t,topic:n}))}},{key:"onTopicLatestMsg",value:function(e){var t,n,o=(e=e||{}).topicLatestMessage;e=e.excludedUnreadSequenceList,Ve(o)||(t=o.groupProfile.topicID,o.conversationType=E.CONV_GROUP,o.to=t,(n=new Co(o)).setElement(o.elements),this.updateUnreadCountAndLastMsg(t,n,e))}},{key:"onMessageRemindTypeUpdated",value:function(e){var t,n=e.groupID,o=e.topicID,i=(e=e.messageRemindType,this.getLocalTopic(n,o));i&&((t=i.updateSelfInfo({messageRemindType:e}))&&this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:i}),Ae.l("".concat(this._n,".onMessageRemindTypeUpdated topicID:").concat(o," messageRemindType:").concat(e," isUpdated:").concat(t)))}},{key:"onAtInfoUpdated",value:function(e){var t=e.topicID,n=(e=e.groupAtInfoList,Gt(t));(t=this.getLocalTopic(n,t))&&!ut(e)&&(t.updateGroupAtInfoList(e),this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:t}))}},{key:"onUnreadCountUpdatedFromConv",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=Gt(e);(e=this.getLocalTopic(n,e))&&e.unreadCount!==t&&(e.updateUnreadCount(t),0===t&&e.updateSelfInfo({readedSequence:e.lastMessage.lastSequence}),this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:e}))}},{key:"onMessageSent",value:function(e){var t,n,o=e.groupID,i=e.topicID;e=e.lastMessage,(i=this.getLocalTopic(o,i))&&(n=(t=void 0===(t=e.sequence)?0:t)+1)>i.nextMessageSeq&&(i.updateNextMessageSeq(n),i.updateLastMessage(e),i.updateSelfInfo({readedSequence:t}),i.updateUnreadCount(0),this.emitOEvt(S.TOPIC_UPDATED,{groupID:o,topic:i}))}},{key:"onMessageModified",value:function(e){var t,n=e.to,o=e.time,i=e.sequence,s=e.elements,a=e.cloudCustomData,r=e.messageVersion,c=Gt(n),u=this.getLocalTopic(c,n);u&&(t=u.lastMessage,Ae.d("".concat(this._n,".onMessageModified topicID:").concat(n," lastMessage:"),JSON.stringify(t),"options:",JSON.stringify(e)),t)&&(null===t.payload||t.lastTime===o&&t.lastSequence===i&&t.version!==r)&&(t.type=s[0].type,t.payload=s[0].content,t.messageForShow=Ut(t.type,t.payload,this.isIntl()),t.cloudCustomData=a,t.version=r,t.lastSequence=i,t.lastTime=o,this.emitOEvt(S.TOPIC_UPDATED,{groupID:c,topic:u}))}},{key:"onMessageRevoked",value:function(e){var t,n,o,i=this;0!==e.length&&(n=t=null,o=!1,e.forEach((function(e){var s=e.to;n=Gt(s),(t=i.getLocalTopic(n,s))&&(t.reduceUnreadCount()&&(o=!0),t.isLastMessageRevoked(e)&&(t.setLastMessageRevoked(!0),t.setLastMessageRevoker(e.revoker),o=!0),(s=t.selfInfo.excludedUnreadSequenceList||[]).push(e.sequence),t.updateSelfInfo({excludedUnreadSequenceList:s}))})),o)&&this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:t})}},{key:"isLastMessageRevoked",value:function(e){var t=e.topicID,n=(e=e.sequence,Gt(t));return n=this.getLocalTopic(n,t),t=!1,n?n.isLastMessageRevoked({sequence:e}):t}},{key:"updateUnreadCountAndLastMsg",value:function(e,t,n){var o,i=Gt(e),s=this.getLocalTopic(i,e);s&&(o=s.selfInfo.excludedUnreadSequenceList||[],ut(n)||(o=n),t._isExcludedFromUnreadCount&&o.push(t.sequence),s.updateSelfInfo({excludedUnreadSequenceList:o}),Ae.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),o=this._computeUnreadCount(s),s.updateUnreadCount(o),(t=this.get(11).getLocalConversation("".concat(E.CONV_GROUP).concat(e)))&&t.updateUnreadCount({nextUnreadCount:o,isFromGetConversations:!0}),this.emitOEvt(S.TOPIC_UPDATED,{groupID:i,topic:s}))}},{key:"getJoinedCommunityList",value:function(){return this.get(7).syncCommunityWithTopic()}},{key:"createTopicInCommunity",value:function(e){var n,o=this,i="".concat(this._n,".").concat("createTopicInCommunity"),s=e.topicID;return ut(s)||Mt(s)?e.topicName&&!1===this._filterProfanity("topicName",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?yn({code:Pn.PROFANITY_FOUND}):(n=new Jn("createTopicInCommunity"),this.req({P:Gn.CREATE_TOPIC,data:t({},e)}).then((function(s){return s=s.data.topicID,n.setMessage("topicID:".concat(s)).end(),Ae.l("".concat(i," ok. topicID:").concat(s)),o._updateTopicMap([t(t({},e),{},{topicID:s})]),mn({topicID:s})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)}))):yn({code:Pn.ILLEGAL_TOPIC_ID})}},{key:"deleteTopicFromCommunity",value:function(e){var t=this,n="".concat(this._n,".").concat("deleteTopicFromCommunity"),o=e.groupID,i=(e=void 0===(e=e.topicIDList)?[]:e,new Jn("deleteTopicFromCommunity"));return i.setMessage("groupID:".concat(o," topicIDList:").concat(e)),this.req({P:Gn.DEL_TOPIC,data:{groupID:o,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),i.setMoreMessage(e).end(),Ae.l("".concat(n," ok. ").concat(e)),s.forEach((function(e){t._deleteLocalTopic(o,e.topicID)})),mn({successTopicList:s,failureTopicList:a})})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"updateTopicProfile",value:function(e){var n,o=this,i="".concat(this._n,".").concat("updateTopicProfile");return Ae.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)?yn({code:Pn.PROFANITY_FOUND}):((n=new Jn("updateTopicProfile")).setMessage("groupID:".concat(e.groupID," topicID:").concat(e.topicID)),ut(e.muteAllMembers)||(e.muteAllMembers=!0===e.muteAllMembers?"On":"Off"),this.req({P:Gn.UPDATE_TOPIC_PROFILE,data:t({},e)}).then((function(){return n.end(),Ae.l("".concat(i," ok")),o._updateTopicMap([e]),mn({topic:o.getLocalTopic(e.groupID,e.topicID)})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"getTopicList",value:function(e){var n=this,o="".concat(this._n,".").concat("getTopicList"),i=e.groupID,s=0===(e=void 0===(e=e.topicIDList)?[]:e).length,a=new Jn("getTopicList");if(a.setMessage("groupID:".concat(i)),this._getTopicTimeMap.has(i)){var r=(c=this._getTopicTimeMap.get(i)).isGetAll,c=c.time;if((r||!r&&!s)&&Date.now()-c<1e3*this.TOPIC_CACHE_TIME&&(r=this._getLocalTopicList(i,e),s||r.length===e.length))return a.setMoreMessage("from cache, topic count:".concat(r.length)).end(),Ae.l("".concat(o," groupID:").concat(i," from cache, topic count:").concat(r.length)),vn({successTopicList:r,failureTopicList:[]})}return this.req({P:Gn.GET_TOPIC_LIST,data:{groupID:i,topicIDList:e}}).then((function(e){e=e.data.topicInfoList;var r=[],c=[],u=[];return(void 0===e?[]:e).forEach((function(e){var n=e.topic,o=e.selfInfo,i=e.errorCode,s=(e=e.errorInfo,n.topicID);0===i?(r.push(t(t({},n),{},{selfInfo:o})),c.push(s)):u.push({topicID:s,code:i,message:e})})),n._updateTopicMap(r),n._handleTopicAtInfo(r),e="success count:".concat(c.length,", fail count:").concat(u.length),a.setMoreMessage(e).end(),Ae.l("".concat(o," groupID:").concat(i," from remote, ").concat(e)),e=[],Ve(c)||(n._getTopicTimeMap.set(i,{time:Date.now(),isGetAll:s}),e=n._getLocalTopicList(i,c)),mn({successTopicList:e,failureTopicList:u})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(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=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=[];return(e=this._topicMap.get(e))&&(n=m(e.values())),0===t.length?n:n.filter((function(e){return t.includes(e.topicID)}))}},{key:"_deleteLocalTopic",value:function(e,t){this._topicMap.has(e)&&this._topicMap.get(e).has(t)&&(this._topicMap.get(e).delete(t),Ae.l("".concat(this._n,"._deleteLocalTopic groupID:").concat(e," topicID:").concat(t)))}},{key:"_updateTopicMap",value:function(e){var t=this,n=[];e.forEach((function(e){var o=e.groupID,i=e.topicID,s=null;t._topicMap.has(o)||t._topicMap.set(o,new Map),t._topicMap.get(o).has(i)?(s=t._topicMap.get(o).get(i)).updateTopic(e):(t._getTopicLastMessage(e),s=new Ci(e,t.isIntl()),t._topicMap.get(o).set(i,s)),e=t._computeUnreadCount(s),s.updateUnreadCount(e),n.push({conversationID:"".concat(E.CONV_GROUP).concat(i),type:E.CONV_TOPIC,unreadCount:e})})),0<n.length&&this.get(11).updateTopicConversation(n)}},{key:"resetGetTopicTime",value:function(e){var t=this;ut(e)?m(this._getTopicTimeMap.keys()).forEach((function(e){t._getTopicTimeMap.set(e,0)})):this._getTopicTimeMap.set(e,0)}},{key:"getTopicListOnReconnected",value:function(){var e=this,t=m(this._topicMap.keys()),n=[],o=this.get(11);t.forEach((function(t){var i=[],s=e._getLocalTopicList(t);o.deleteTopicRoamingInfo(t),s.forEach((function(t){var n=void 0===(n=t.lastMessage.lastTime)?0:n;Date.now()-1e3*n<1e3*e.TOPIC_LAST_ACTIVE_TIME&&i.push(t.topicID)})),0<i.length&&n.push({groupID:t,topicIDList:i})})),Ae.l("".concat(this._n,".getTopicListOnReconnected. active community count:").concat(n.length)),this._relayGetTopicList(n)}},{key:"_relayGetTopicList",value:function(e){var t,n,o,i=this;0!==e.length&&(n=5<(t=e.shift()).topicIDList.length?"topicIDList.length:".concat(t.topicIDList.length):"topicIDList:".concat(t.topicIDList),(o=new Jn("relayGetTopicList")).setMessage(n),Ae.l("".concat(this._n,"._relayGetTopicList. ").concat(n)),this.getTopicList(t).then((function(){o.end(),i._relayGetTopicList(e)})).catch((function(t){o.setError(t).end(),i._relayGetTopicList(e)})))}},{key:"_handleTopicAtInfo",value:function(e){var n=this;0!==e.length&&e.forEach((function(e){var o=e.groupID,i=e.topicID,s=(e=e.groupAtInfoList,[]);ut(e)||(e.forEach((function(e){s.push(t(t({},e),{},{groupID:o,topicID:i}))})),n.get(11).onNewGroupAtTips({dataList:s}))}))}},{key:"_getTopicLastMessage",value:function(e){var t;ut(e.lastMsg)||(t={time:e.lastMsg.time,sequence:e.lastMsg.sequence,from:e.lastMsg.from,payload:e.lastMsg.elements[0]?e.lastMsg.elements[0].content:null,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:"",nick:e.lastMsg.nick,avatar:e.lastMsg.avatar,version:e.lastMsg.messageVersion,cloudCustomData:e.lastMsg.cloudCustomData,isRevoked:2===e.lastMsg.isPlaceMessage,revoker:Ve(e.lastMsg.revokerInfo)?null:e.lastMsg.revokerInfo.revoker},e.lastMessage=t)}},{key:"deleteTopicListInCommunity",value:function(e){var t=this,n=this._getLocalTopicList(e),o=this.get(11);n.forEach((function(n){n=n.topicID,t._deleteLocalTopic(e,n),t._getTopicTimeMap.delete(e),o.deleteLocalConv("".concat(E.CONV_GROUP).concat(n))}))}},{key:"_computeUnreadCount",value:function(e){var t,n=(i=e.selfInfo).excludedUnreadSequenceList,o=i.readedSequence,i=e.nextMessageSeq-e.selfInfo.readedSequence-1;return Ye(n)&&(t=0,n.forEach((function(n){o<n&&n<=e.nextMessageSeq-1&&(t+=1)})),1<=t)&&(i-=t),i<0?0:i}},{key:"_filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],G)).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"getMessageExtensions",value:function(e,t){Ae.l("".concat(this._n,".getMessageExtensions startSequence:").concat(t));var n=Gt(e.to);return this.req({P:Gn.GET_GRP_MSG_EXT,data:{groupID:n,topicID:e.to,messageSequence:e.sequence,startSequence:t}})}},{key:"modifyMsgExts",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=(Ae.l("".concat(this._n,".modifyMsgExts operateType:").concat(n)),Gt(e.to));return this.req({P:Gn.MODIFY_GRP_MSG_EXT,data:{groupID:o,topicID:e.to,messageSequence:e.sequence,extensionList:t,operateType:n}})}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._topicMap.clear(),this._getTopicTimeMap.clear(),this.TOPIC_CACHE_TIME=300,this.TOPIC_LAST_ACTIVE_TIME=3600}}]),xi),Si=(s(Ui,[{key:"setExpirationTime",value:function(e){this.expirationTime=e}},{key:"getUserProfile",value:function(e){var t=this,n="".concat(this._n,".").concat("getUserProfile"),o=e.userIDList;e.fromAccount=this._userM.getMyAccount(),100<o.length&&(Ae.w("".concat(n," ").concat(Vt(100))),o.length=100);for(var i,s=[],a=[],r=0,c=o.length;r<c;r++)i=o[r],this._userM.isMyFriend(i)&&this._contains(i)?a.push(this._getProfileFromMap(i)):s.push(i);if(0===s.length)return vn(a);e.toAccount=s;var u=e.bFromGetMyProfile||!1,l=[],d=(e.toAccount.forEach((function(e){l.push({toAccount:e,standardSequence:0,customSequence:0})})),e.userItem=l,new Jn("getUserProfile"));return d.setMessage(5<o.length?"userIDList.length:".concat(o.length):"userIDList:".concat(o)),this._userM.req({P:Gn.GET_USER_PROFILE,data:e}).then((function(e){return d.end(),Ae.i("".concat(n," ok")),e=t._handleResponse(e).concat(a),mn(u?e[0]:e)})).catch((function(e){return d.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"getMyProfile",value:function(){var e,t=this._userM.getMyAccount(),n="".concat(this._n,".getMyProfile");return Ae.l("".concat(n," myAccount:").concat(t)),this._fill(),this._contains(t)?(e=this._getProfileFromMap(t),Ae.d("".concat(n," from cache, myProfile:").concat(JSON.stringify(e))),vn(e)):this.getUserProfile({fromAccount:t,userIDList:[t],bFromGetMyProfile:!0})}},{key:"_handleResponse",value:function(e){var t=e.data.userProfileItem;if(!Ye(t))return[];for(var n=[],o=(e=Date.now(),0),i=t.length;o<i;o++){var s=(a=t[o]).to,a=a.profileItem;"@TLS#NOT_FOUND"!==s&&""!==s&&(s=this._update(s,this._getLatestProfileFromResponse(s,a)).latestProfile,n.push(s))}return Ae.l("".concat(this._n,"._handleResponse cost:").concat(Kt(e))),n}},{key:"_getLatestProfileFromResponse",value:function(e,t){var n={userID:e,profileCustomField:[]};if(!Ve(t))for(var o=0,i=t.length;o<i;o++)if(-1<t[o].tag.indexOf("Tag_Profile_Custom"))n.profileCustomField.push({key:t[o].tag,value:t[o].value});else switch(t[o].tag){case Oe.NICK:n.nick=t[o].value;break;case Oe.GENDER:n.gender=t[o].value;break;case Oe.BIRTHDAY:n.birthday=t[o].value;break;case Oe.LOCATION:n.location=t[o].value;break;case Oe.SELFSIGNATURE:n.selfSignature=t[o].value;break;case Oe.ALLOWTYPE:n.allowType=t[o].value;break;case Oe.LANGUAGE:n.language=t[o].value;break;case Oe.AVATAR:n.avatar=t[o].value;break;case Oe.MESSAGESETTINGS:n.messageSettings=t[o].value;break;case Oe.ADMINFORBIDTYPE:n.adminForbidType=t[o].value;break;case Oe.LEVEL:n.level=t[o].value;break;case Oe.ROLE:n.role=t[o].value;break;default:Ae.w("".concat(this._n,"._getLatestProfileFromResponse unknown tag:"),t[o].tag,t[o].value)}return n}},{key:"updateMyProfile",value:function(e){var t=this,n="".concat(this._n,".").concat("updateMyProfile");if(e.nick&&!1===this._userM.filterProfanity("nick",e))return yn({code:Pn.PROFANITY_FOUND});if(e.selfSignature&&!1===this._userM.filterProfanity("selfSignature",e))return yn({code:Pn.PROFANITY_FOUND});var o=new Jn("updateMyProfile"),i=(o.setMessage(JSON.stringify(e)),(new Qo).validate(e));if(!i.valid)return o.setCode(Pn.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(i.tips)).end(),Ae.e("".concat(n," info:").concat(i.tips)),yn({code:Pn.UPDATE_PROFILE_INVALID_PARAM});var s,a,r=[];for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&("profileCustomField"===s?e.profileCustomField.forEach((function(e){r.push({tag:e.key,value:e.value})})):r.push({tag:Oe[s.toUpperCase()],value:e[s]}));return 0===r.length?(i=new Nn({code:Pn.UPDATE_PROFILE_NO_KEY}),o.setError(i).end(),Ae.e("".concat(n," failed. error:"),i),yn(i)):(a=this._userM.getMyAccount(),this._userM.req({P:Gn.UPDATE_MY_PROFILE,data:{fromAccount:a,profileItem:r}}).then((function(i){o.end(),Ae.i("".concat(n," ok"));var s=(r=t._update(a,e)).isProfileUpdated,r=r.latestProfile;return!0===s&&t._userM.emitOEvt(S.PROFILE_UPDATED,[r]),vn(r)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)})))}},{key:"onProfileModified",value:function(e){var t=e.dataList;if(!Ve(t)){var n=t.length;Ae.d("".concat(this._n,".onProfileModified count:").concat(n," dataList:"),e.dataList);for(var o=[],i=0;i<n;i++){var s=t[i].userID,a=(s=this._update(s,this._getLatestProfileFromResponse(s,t[i].profileList))).isProfileUpdated;s=s.latestProfile,!0===a&&o.push(s)}0<o.length&&(this._userM.emitIEvt(xo.PROFILE_UPDATED,o),this._userM.emitOEvt(S.PROFILE_UPDATED,o))}}},{key:"_fill",value:function(){if(0===this.accountProfileMap.size){for(var e=this._getCachedProfiles(),t=Date.now(),n=0,o=e.length;n<o;n++)t-e[n].lastUpdatedTime<this.expirationTime&&this.accountProfileMap.set(e[n].userID,e[n]);Ae.l("".concat(this._n,"._fill from cache, size:").concat(this.accountProfileMap.size))}}},{key:"_update",value:function(e,t){var n,o=!1,i=Date.now();return this._contains(e)?(n=this._getProfileFromMap(e),t.profileCustomField&&!0===_t(n.profileCustomField,t.profileCustomField)&&(n.lastUpdatedTime=i,o=!0),0<Ze(n,t,["profileCustomField"])&&(n.lastUpdatedTime=i,o=!0)):(n=new Qo(t),!this._userM.isMyFriend(e)&&e!==this._userM.getMyAccount()||(n.lastUpdatedTime=i,o=!0,this.accountProfileMap.set(e,n))),this._flush(e===this._userM.getMyAccount()),!0===o&&Ae.l("".concat(this._n,"._update account:").concat(e," isUpdated:").concat(o)),{isProfileUpdated:o,latestProfile:n}}},{key:"_flush",value:function(e){var t=m(this.accountProfileMap.values()),n=this._userM.getStorageModule();Ae.d("".concat(this._n,"._flush length:").concat(t.length," flushAtOnce:").concat(e)),n.setItem(this.TAG,t,e)}},{key:"_contains",value:function(e){return this.accountProfileMap.has(e)}},{key:"_getProfileFromMap",value:function(e){return this.accountProfileMap.get(e)}},{key:"_getCachedProfiles",value:function(){var e=this._userM.getStorageModule().getItem(this.TAG);return Ve(e)?[]:e}},{key:"onConvProfileUpdated",value:function(e){for(var t,n,o=[],i=0,s=e.length;i<s;i++)n=(t=e[i]).userID,this._userM.isMyFriend(n)&&(this._contains(n)?0<Ze(this._getProfileFromMap(n),t)&&o.push(n):o.push(t.userID));0!==o.length&&(Ae.l("".concat(this._n,".onConvProfileUpdated toAccountList:").concat(o)),this.getUserProfile({userIDList:o}))}},{key:"getNickAndAvatarByUserID",value:function(e){return this._contains(e)?{nick:(e=this._getProfileFromMap(e)).nick,avatar:e.avatar}:{nick:"",avatar:""}}},{key:"getUserNickAndAvatar",value:function(e){var t,n=this,o=m(new Set(e)),i=(Ae.l("".concat(this._n,".getUserNickAndAvatar userIDList.length:").concat(e.length," uniqueUserIDList.length:").concat(o.length)),[]);return 0===e.length?Promise.resolve(i):(e=this._createUserIDListGroup(o),t=[],e.forEach((function(e){t.push(n.getUserProfile({userIDList:e}))})),Promise.all(t).then((function(e){return e.forEach((function(e){e=e.data.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}})),i.push.apply(i,m(e))})),i})))}},{key:"_createUserIDListGroup",value:function(e){for(var t=[],n=0;n<e.length;)t.push(e.slice(n,n+=100));return t}},{key:"reset",value:function(){this._flush(!0),this.accountProfileMap.clear()}}]),Ui),Ei=s((function e(t){o(this,e)})),Di=(s(Gi,[{key:"getLocalBlacklist",value:function(){return m(this._blacklistMap.keys())}},{key:"getBlacklist",value:function(){var e=this,t="".concat(this._n,".getBlacklist"),n={fromAccount:this._userM.getMyAccount(),maxLimited:this.maxLimited,startIndex:0,lastSequence:this.currentSequence},o=new Jn("getBlacklist");return this._userM.req({P:Gn.GET_BL,data:n}).then((function(n){var i=(n=n.data).blackListItem,s=(n=n.currentSequence,Ve(i)?0:i.length);o.setMessage("count:".concat(s)).end(),Ae.i("".concat(t," ok")),e.currentSequence=n,e._handleResponse(i,!0),e._userM.emitOEvt(S.BLACKLIST_UPDATED,m(e._blacklistMap.keys()))})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"addBlacklist",value:function(e){var t,n,o=this,i=new Jn("addToBlacklist"),s="".concat(this._n,".addBlacklist"),a=this._userM.getMyAccount();return 1===e.userIDList.length&&e.userIDList[0]===a?(n=this._userM.getErrMsg(t=Pn.CANNOT_ADD_SELF_TO_BLACKLIST),i.setCode(t).setMessage(n).end(),n=new Nn({code:t}),Ae.e("".concat(s," failed. error:"),n),yn(n)):(e.userIDList.includes(a)&&(e.userIDList=e.userIDList.filter((function(e){return e!==a}))),e.fromAccount=this._userM.getMyAccount(),e.toAccount=e.userIDList,this._userM.req({P:Gn.ADD_TO_BL,data:e}).then((function(t){return i.setMessage(5<e.userIDList.length?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)).end(),Ae.i("".concat(s," ok")),o._handleResponse(t.resultItem,!0),mn(m(o._blacklistMap.keys()))})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(s," failed. error:"),e),yn(e)})))}},{key:"_handleResponse",value:function(e,t){if(!Ve(e))for(var n,o,i,s=0,a=e.length;s<a;s++)o=e[s].to,i=e[s].resultCode,!ut(i)&&0!==i||(t?((n=this._blacklistMap.has(o)?this._blacklistMap.get(o):new Ei).userID=o,Ve(e[s].addBlackTimeStamp)||(n.timeStamp=e[s].addBlackTimeStamp),this._blacklistMap.set(o,n)):this._blacklistMap.has(o)&&(n=this._blacklistMap.get(o),this._blacklistMap.delete(o)));Ae.l("".concat(this._n,"._handleResponse total:").concat(this._blacklistMap.size," bAdd:").concat(t))}},{key:"deleteBlacklist",value:function(e){var t=this,n="".concat(this._n,".deleteBlacklist"),o=new Jn("removeFromBlacklist");return e.fromAccount=this._userM.getMyAccount(),e.toAccount=e.userIDList,this._userM.req({P:Gn.RM_FROM_BL,data:e}).then((function(i){return o.setMessage(5<e.userIDList.length?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)).end(),Ae.i("".concat(n," ok")),t._handleResponse(i.data.resultItem,!1),mn(m(t._blacklistMap.keys()))})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"onAccountDeleted",value:function(e){for(var t=0,n=e.length;t<n;t++){var o=e[t];this._blacklistMap.has(o)&&this._blacklistMap.delete(o)}var i=e.length;0<i&&(Ae.l("".concat(this._n,".onAccountDeleted count:").concat(i," ").concat(i<30?"userIDList:".concat(e):"")),this._userM.emitOEvt(S.BLACKLIST_UPDATED,m(this._blacklistMap.keys())))}},{key:"onAccountAdded",value:function(e){for(var t,n=[],o=0,i=e.length;o<i;o++)t=e[o],this._blacklistMap.has(t)||(this._blacklistMap.set(t,new Ei({userID:t})),n.push(t));0<n.length&&(Ae.l("".concat(this._n,".onAccountAdded count:").concat(n.length," userIDList:"),n),this._userM.emitOEvt(S.BLACKLIST_UPDATED,m(this._blacklistMap.keys())))}},{key:"reset",value:function(){this._blacklistMap.clear(),this.startIndex=0,this.maxLimited=100,this.currentSequence=0}}]),Gi),ki=(s(wi,[{key:"_onCloudConfig",value:function(){var e=this._userM.getCloudConfig("status_query_count"),t=this._userM.getCloudConfig("status_sub_count"),n=this._userM.getCloudConfig("status_unsub_count");Ae.l("".concat(this._n,"._onCloudConfig statusQueryCount:").concat(e," statusSubscribeCount:").concat(t)+" statusUnsubscribeCount:".concat(n)),ut(e)||(this.MAX_QUERY_USER_COUNT=parseInt(e,10)),ut(e)||(this.MAX_SUBSCRIBE_USER_COUNT=parseInt(t,10)),ut(e)||(this.MAX_UNSUBSCRIBE_USER_COUNT=parseInt(n,10))}},{key:"onUserStatusUpdated",value:function(e){e=e.dataList;var t=this._userM.getMyUserID(),n=this._userM.get(12);e=e.map((function(e){var o=e.to,i=e.statusType;return e=jo(e=e.customStatus),o===t&&n.setCustomStatus(e),{userID:o,statusType:i,customStatus:e}})),Ae.l("".concat(this._n,".onUserStatusUpdated list:").concat(JSON.stringify(e))),this._userM.emitOEvt(S.USER_STATUS_UPDATED,e)}},{key:"setSelfStatus",value:function(e){var t,n,o=this,i="".concat(this._n,".setSelfStatus");return!1===this._userM.filterProfanity("customStatus",e)?yn({code:Pn.PROFANITY_FOUND}):(t=new Jn("setSelfStatus"),n=e.customStatus,this._userM.req({P:Gn.SET_SELF_STATUS,data:{customStatus:n}}).then((function(e){return t.setMessage("customStatus:".concat(n)).end(),Ae.l("".concat(i," ok. customStatus:").concat(n)),o._userM.get(12).setCustomStatus(n),mn({userID:o._userM.getMyUserID(),statusType:1,customStatus:n})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"getUserStatus",value:function(e){var t="".concat(this._n,".").concat("getUserStatus"),n=void 0===(e=e.userIDList)?[]:e,o=(e=this._userM.getMyUserID(),m(n)),i=void 0,s=o.indexOf(e);if(-1<s&&(o.splice(s,1),i={userID:e,statusType:1,customStatus:this._userM.get(12).getCustomStatus()}),0===o.length)return vn({successUserList:[i],failureUserList:[]});if(!this._userM.canIUse(w.USER_STATUS))return this._userM.noUse("getUserStatus");o.length>this.MAX_QUERY_USER_COUNT&&(Ae.w("".concat(t," ").concat(Vt(this.MAX_QUERY_USER_COUNT))),o=n.slice(0,this.MAX_QUERY_USER_COUNT));var a=new Jn("getUserStatus");return this._userM.req({P:Gn.GET_USER_STATUS,data:{userIDList:o}}).then((function(e){var o=void 0===(o=(e=e.data).successUserList)?[]:o,s=(e=void 0===(e=e.failureUserList)?[]:e,o=o.map((function(e){return{userID:e.userID,statusType:e.statusType,customStatus:jo(e=e.customStatus)}})),e=e.map((function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode;return e=e.errorInfo,{userID:Ve(n)?t:n,code:o,message:e}})),ut(i)||o.unshift(i),"userID count:".concat(n.length,", success count:").concat(o.length,", fail count:").concat(e.length));return a.setMessage("".concat(s)).end(),Ae.l("".concat(t," ok. ").concat(s,".")),mn({successUserList:o,failureUserList:e})})).catch((function(e){return a.setMessage("userID count:".concat(n.length)).setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"subscribeUserStatus",value:function(e){var t,n,o,i,s="subscribeUserStatus";return this._userM.canIUse(w.USER_STATUS)?(t="".concat(this._n,".").concat(s),(n=m(e=void 0===(e=e.userIDList)?[]:e)).length>this.MAX_SUBSCRIBE_USER_COUNT&&(Ae.w("".concat(t," ").concat(Vt(this.MAX_SUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_SUBSCRIBE_USER_COUNT)),o=new Jn(s),i="userID count:".concat(e.length),Ae.l("".concat(t," ").concat(i)),this._userM.req({P:Gn.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,o=e.errorCode;return e=e.errorInfo,{userID:Ve(n)?t:n,code:o,message:e}})),o.setMessage("".concat(i," fail count:").concat(e.length)).end(),Ae.l("".concat(t," ok. fail count:").concat(e.length,".")),mn({failureUserList:e})})).catch((function(e){return o.setMessage(i).setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._userM.noUse(s)}},{key:"unsubscribeUserStatus",value:function(e){var t,n,o,i,s="unsubscribeUserStatus";return this._userM.canIUse(w.USER_STATUS)?(t="".concat(this._n,".").concat(s),n=m(e=void 0===(e=(e||{}).userIDList)?[]:e),e.length>this.MAX_UNSUBSCRIBE_USER_COUNT&&(Ae.w("".concat(t," ").concat(Vt(this.MAX_UNSUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_UNSUBSCRIBE_USER_COUNT)),o=new Jn(s),i="userID count:".concat(e.length),Ae.l("".concat(t," ").concat(i)),e={userIDList:n},0===n.length&&(e.userIDList=void 0,e.unsubscribeAll=1),this._userM.req({P:Gn.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,o=e.errorCode;return e=e.errorInfo,{userID:Ve(n)?t:n,code:o,message:e}})),o.setMessage("".concat(i," fail count:").concat(e.length)).end(),Ae.l("".concat(t," ok. fail count:").concat(e.length,".")),mn({failureUserList:e})})).catch((function(e){return o.setMessage("".concat(i)).setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(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}}]),wi),Li=(r(Pi,bn),Wo=g(Pi),s(Pi,[{key:"onContextUpdated",value:function(e){this._profileHandler.getMyProfile(),this._blacklistHandler.getBlacklist()}},{key:"mockOnNickAvatarModified",value:function(e,t){Ae.l("".concat(this._n,"._mockOnNickAvatarModified nick:").concat(e," avatar:").concat(t)),this.onProfileModified({dataList:[{pushType:1,userID:this.getMyUserID(),profileList:[{tag:Oe.NICK,value:e},{tag:Oe.AVATAR,value:t}]}]})}},{key:"onProfileModified",value:function(e){this._profileHandler.onProfileModified(e)}},{key:"onRelationChainModified",value:function(e){var t,n;Ve(e=e.dataList)||(t=[],e.forEach((function(e){e.blackListDelAccount&&t.push.apply(t,m(e.blackListDelAccount))})),0<t.length&&this._blacklistHandler.onAccountDeleted(t),n=[],e.forEach((function(e){e.blackListAddAccount&&n.push.apply(n,m(e.blackListAddAccount))})),0<n.length&&this._blacklistHandler.onAccountAdded(n))}},{key:"onConvProfileUpdated",value:function(e){this._profileHandler.onConvProfileUpdated(e)}},{key:"getMyAccount",value:function(){return this.getMyUserID()}},{key:"getMyNick",value:function(){return this._profileHandler.getNickAndAvatarByUserID(this.getMyUserID()).nick}},{key:"getMyProfile",value:function(){return this._profileHandler.getMyProfile()}},{key:"getStorageModule",value:function(){return this.get(13)}},{key:"filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],"user_profile")).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"isMyFriend",value:function(e){var t=this.get(8);return!!t&&t.isMyFriend(e)}},{key:"getUserProfile",value:function(e){return this._profileHandler.getUserProfile(e)}},{key:"updateMyProfile",value:function(e){return this._profileHandler.updateMyProfile(e)}},{key:"getNickAndAvatarByUserID",value:function(e){return this._profileHandler.getNickAndAvatarByUserID(e)}},{key:"getUserNickAndAvatar",value:function(e){return this._profileHandler.getUserNickAndAvatar(e)}},{key:"getLocalBlacklist",value:function(){return vn(this._blacklistHandler.getLocalBlacklist())}},{key:"addBlacklist",value:function(e){return this._blacklistHandler.addBlacklist(e)}},{key:"deleteBlacklist",value:function(e){return this._blacklistHandler.deleteBlacklist(e)}},{key:"onUserStatusUpdated",value:function(e){this._userStatusHandler.onUserStatusUpdated(e)}},{key:"setSelfStatus",value:function(e){return this._userStatusHandler.setSelfStatus(e)}},{key:"getUserStatus",value:function(e){return this._userStatusHandler.getUserStatus(e)}},{key:"subscribeUserStatus",value:function(e){return this._userStatusHandler.subscribeUserStatus(e)}},{key:"unsubscribeUserStatus",value:function(e){return this._userStatusHandler.unsubscribeUserStatus(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._profileHandler.reset(),this._blacklistHandler.reset(),this._userStatusHandler.reset()}}]),Pi),bi=(s(Ni,[{key:"isLoggedIn",value:function(){return this._isLoggedIn}},{key:"isOversea",value:function(){return this._oversea}},{key:"isPrivateNetWork",value:function(){return this._proxyServer}},{key:"isDevMode",value:function(){return this._isDevMode}},{key:"isTestEnv",value:function(){return this._isTestEnv}},{key:"isPartialUpdatedConvs",value:function(){return this._isPartialUpdatedConvs}},{key:"isSingaporeSite",value:function(){return 2e7<=this._SDKAppID&&this._SDKAppID<3e7||172e7<=this._SDKAppID&&this._SDKAppID<173e7}},{key:"isKoreaSite",value:function(){return 3e7<=this._SDKAppID&&this._SDKAppID<4e7||173e7<=this._SDKAppID&&this._SDKAppID<174e7}},{key:"isGermanySite",value:function(){return 4e7<=this._SDKAppID&&this._SDKAppID<5e7||174e7<=this._SDKAppID&&this._SDKAppID<175e7}},{key:"isIndiaSite",value:function(){return 5e7<=this._SDKAppID&&this._SDKAppID<6e7||175e7<=this._SDKAppID&&this._SDKAppID<176e7}},{key:"isJapanSite",value:function(){return 6e7<=this._SDKAppID&&this._SDKAppID<7e7||176e7<=this._SDKAppID&&this._SDKAppID<177e7}},{key:"isUSASite",value:function(){return 7e7<=this._SDKAppID&&this._SDKAppID<8e7||177e7<=this._SDKAppID&&this._SDKAppID<178e7}},{key:"isIndonesiaSite",value:function(){return 8e7<=this._SDKAppID&&this._SDKAppID<9e7||178e7<=this._SDKAppID&&this._SDKAppID<179e7}},{key:"isIntl",value:function(){return 0===(e=this._SDKAppID)||2e7<=e&&e<9e7||172e7<=e&&e<179e7;var e}},{key:"isUnlimitedAVChatRoom",value:function(){return this._unlimitedAVChatRoom}},{key:"isUsingChatCore",value:function(){return this._isUsingChatCore}},{key:"setUsingChatCore",value:function(e){this._isUsingChatCore=e}},{key:"getUIPlatform",value:function(){return this._uiPlatform}},{key:"setUIPlatform",value:function(e){this._uiPlatform=e}},{key:"setUserID",value:function(e){this._userID=e}},{key:"getUserID",value:function(){return this._userID}},{key:"setUserSig",value:function(e){this._userSig=e}},{key:"getUserSig",value:function(){return this._userSig}},{key:"getSDKAppID",value:function(){return this._SDKAppID}},{key:"setTinyID",value:function(e){this._tinyID=e,this._isLoggedIn=!0}},{key:"getTinyID",value:function(){return this._tinyID}},{key:"setCustomStatus",value:function(e){this._customStatus=e}},{key:"getCustomStatus",value:function(){return this._customStatus}},{key:"getScene",value:function(){return ge?window.tencent_cloud_im_csig_flutter_for_web_25F_cy:this._isTUIKit()?"tuikit":this._scene}},{key:"getInstanceID",value:function(){return this._instanceID}},{key:"getStatusInstanceID",value:function(){return this._statusInstanceID}},{key:"setStatusInstanceID",value:function(e){this._statusInstanceID=e}},{key:"getVersion",value:function(){return this._version}},{key:"getA2Key",value:function(){return this._a2Key}},{key:"setA2Key",value:function(e){this._a2Key=e}},{key:"getContentType",value:function(){return this._contentType}},{key:"getProxyServer",value:function(){return this._proxyServer}},{key:"getFileUploadProxy",value:function(){return this._fileUploadProxy}},{key:"getFileDownloadProxy",value:function(){return this._fileDownloadProxy}},{key:"setApplicationID",value:function(e){this._applicationID=e}},{key:"getApplicationID",value:function(){return this._applicationID}},{key:"setDowloadFileAuthKey",value:function(e){this._authKey=e}},{key:"getDowloadFileAuthKey",value:function(){return this._authKey}},{key:"setCustomLoginInfo",value:function(e){this._customLoginInfo=e}},{key:"getCustomLoginInfo",value:function(){return this._customLoginInfo}},{key:"_isTUIKit",value:function(){var e=!1,t=!1,n=!1,o=!1,i=[];Z&&(i=Object.keys(ne));for(var s=0,a=(i=te?J?Object.keys(uni):Object.keys(window):i).length;s<a;s++)if(i[s].toLowerCase().includes("uikit")){e=!0;break}i=null;var r,c=(Z&&!ze(ne.createGamePortal)&&ze(lI)&&!ut(lI())&&We(r=lI().globalData)&&!0===r.isTUIKit&&(t=!0),!0===this._m.get(13).getStorageSync("TIM_".concat(this._SDKAppID,"_isTUIKit"))&&(n=!0),null);if(B&&!j&&"undefined"==typeof uni&&__wxConfig&&(c=__wxConfig.pages),K&&"undefined"==typeof uni&&__qqConfig&&(c=__qqConfig.pages),Ye(c)&&0<c.length){for(var u=0,l=c.length;u<l;u++)if(c[u].toLowerCase().includes("tui")){o=!0;break}c=null}return e||t||n||o}},{key:"reset",value:function(){this._isLoggedIn=!1,this._userSig="",this._a2Key="",this._tinyID="",this._customStatus="",this._statusInstanceID=0}}]),Ni),Ai={"k-vue2-pc":1,"k-vue2-h5":2,"k-vue2-h5-uni":3,"k-vue2-app-uni":4,"k-vue2-mp-uni":5,"k-vue2-pc-uni":6,"k-vue3-pc":7,"k-vue3-h5":8,"k-vue3-h5-uni":9,"k-vue3-app-uni":10,"k-vue3-mp-uni":11,"k-vue3-pc-uni":12,"k-rn":13},Ri=(r(Oi,bn),$o=g(Oi),s(Oi,[{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&e%this._helloInterval==0&&this._hello()}},{key:"getPushModule",value:function(){var e=void 0,t=this.get(36),n=this.get(28);return t.canIUseTIMPush()?e=t:n.canIUseOfflinePush()&&(e=n),e}},{key:"login",value:function(e){if(this.isLoggedIn())return n=this.getMyUserID(),(n=this.getErrMsg("RepeatLogin",n))&&Ae.w(n),vn({actionStatus:"OK",errorCode:0,errorInfo:n,repeatLogin:!0});if(Date.now()-this._lastLoginTs<=15e3)return this.warn("LoggingIn",e.userID),yn({code:Pn.REPEAT_LOGIN});Ae.l("".concat(this._n,".login userID:").concat(e.userID));var t,n=this._checkLoginInfo(e);return 0!==n.code?yn(n):(n=this.get(12),t=e.userID,e=e.userSig,n.setUserID(t),n.setUserSig(e),this.get(20).updateProtocolConfig(),this._login())}},{key:"_login",value:function(){var e=this,t=this.get(12),n=t.getScene(),o=0,i=n,s=(n&&n.startsWith("k-")&&(i=Ai[n],n="tuikit"),new Jn("login")),a=(s.setMessage("".concat(i)).setMoreMessage("identifier:".concat(this.getMyUserID())),"tuikit"===n),r=0,c=(J?r=a?3===i||4===i||5===i||6===i?31:9===i||10===i||11===i||12===i?32:4:3:Z?r=H?36:"tuikit"===n?12:11:te?r=ge?"flutter_web_uikit"===n?21:20:this._isReactUIKit()?fe?25:24:a?1===i||2===i?29:7===i||8===i?30:fe?17:14:fe?16:13:13===i&&(r=38),s.setUIPlatform(r),t.setUIPlatform(r),(a=this.getPushModule())&&(this._isWebUniapp=a.getUniAppPlatform(),i=this._getStatusInstanceID(),t.setStatusInstanceID(i),this.get(20).updateProtocolConfig(),o=a.getDeviceBrand()),"".concat(this._n,"._login"));return this._lastLoginTs=Date.now(),this.req({P:Gn.LOGIN,data:{deviceBrand:o,isWebUniapp:this._isWebUniapp,customInfo:t.getCustomLoginInfo()}}).then((function(o){e._lastLoginTs=0;var i=Date.now(),a=null,r=(g=o.data).a2Key,u=g.tinyID,l=g.helloInterval,d=g.instanceID,p=g.timeStamp,h=void 0===(h=g.customStatus)?"":h,f=g.purchaseBits,g=void 0===(g=g.authKey)?"":g,_=1e3*p,m=i-s.getStartTs();if(m=_+parseInt(m/2)-i,i=s.getStartTs()+m,s.start(i),i=_,Ee=m,(_=new Date).setTime(i),Ae.i("baseTime from server:".concat(_," offset:").concat(Ee)),u){if(r)return i=e.get(21).getSocketID(),_=jo(h),h="socketID:".concat(i," scene:").concat(n," helloInterval:").concat(l," instanceID:").concat(d," timeStamp:").concat(p)+" offset:".concat(m," customStatus:").concat(_," isWebUniapp:").concat(e._isWebUniapp),Ae.l("".concat(c," ok. ").concat(h)),p=i="",B&&ze(ne.getAccountInfoSync)&&(m=ne.getAccountInfoSync().miniProgram)&&(i=m.appId,p=m.envVersion),s.setMoreMessage("".concat(h," href:").concat(te?window.location.href:""," mpAppId:").concat(i," envVersion:").concat(p," authKey:").concat(g)).end(),t.setA2Key(r),t.setTinyID(u),t.setStatusInstanceID(d),t.setCustomStatus(_),t.setDowloadFileAuthKey(g),f&&e.get(27).onPushedConfig({errorCode:0,expiredTime:0,purchaseBits:f}),e.get(20).updateProtocolConfig(),e.emitIEvt(xo.A2KEY_AND_TINYID_UPDATED),e._helloInterval=l,e.triggerReady(),(m=e.getPushModule())&&(jI("timUniAppInstanceID",d),m.init()),e._fetchCloudControlConfig(),e.get(29).init(),o;a=new Nn({code:Pn.NO_A2KEY})}else a=new Nn({code:Pn.NO_TINYID});throw s.setError(a).end(),a})).catch((function(t){return s.setError(t).end(!0),e._m.setNotReadyReason(Pn.LOGIN_FAILED),Ae.e("".concat(c," failed. error:"),t),e._lastLoginTs=0,e._m.onLoginFailed(),yn(t)}))}},{key:"logout",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,n="".concat(this._n,".logout"),o=this.isLoggedIn();return Ae.i("".concat(n," type:").concat(t," isLoggedIn:").concat(o," isWebUniapp:").concat(this._isWebUniapp)),o?(new Jn("logout").setMessage("identifier:".concat(this.getMyUserID())).end(!0),0===t&&this._m.setNotReadyReason(Pn.LOGGED_OUT),this.req({P:Gn.LOGOUT,data:{type:t,isWebUniapp:this._isWebUniapp}}).then((function(){return e.resetReady(),vn({})})).catch((function(t){return Ae.e("".concat(n," error:"),t),e.resetReady(),vn({})}))):yn({code:Pn.USER_NOT_LOGGED_IN})}},{key:"getLoginUser",value:function(){return this.isLoggedIn()?this.getMyUserID():""}},{key:"_fetchCloudControlConfig",value:function(){this.get(23).fetchConfig()}},{key:"_getStatusInstanceID",value:function(){return WI("timUniAppInstanceID")||0}},{key:"_hello",value:function(){var e=this;this._lastWsHelloTs=Date.now(),this.req({P:Gn.HELLO,data:{isWebUniapp:this._isWebUniapp}}).catch((function(t){Ae.w("".concat(e._n,"._hello error:"),t)}))}},{key:"getLastWsHelloTs",value:function(){return this._lastWsHelloTs}},{key:"_checkLoginInfo",value:function(e){var t=0;return Ve(this.get(12).getSDKAppID())?t=Pn.NO_SDKAPPID:Ve(e.userID)?t=Pn.NO_IDENTIFIER:Ve(e.userSig)&&(t=Pn.NO_USERSIG),{code:t}}},{key:"_isReactUIKit",value:function(){return te&&void 0!==window.tencent_cloud_im_csig_react_uikit_23F_xa}},{key:"onMultipleAccountKickedOut",value:function(e){var t=this;new Jn("kickedOut").setMessage("type:".concat(E.KICKED_OUT_MULT_ACCOUNT," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),Ae.w("".concat(this._n,".onMultipleAccountKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),this.logout(1).then((function(){t.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_MULT_ACCOUNT}),t._m.setNotReadyReason(Pn.KICKED_OUT_MULT_ACCOUNT),t._m.reset()}))}},{key:"onMultipleDeviceKickedOut",value:function(e){var t=this;new Jn("kickedOut").setMessage("type:".concat(E.KICKED_OUT_MULT_DEVICE," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),Ae.w("".concat(this._n,".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),this.logout(1).then((function(){t.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_MULT_DEVICE}),t._m.setNotReadyReason(Pn.KICKED_OUT_MULT_DEVICE),t._m.reset()}))}},{key:"onUserSigExpired",value:function(){new Jn("kickedOut").setMessage(E.KICKED_OUT_USERSIG_EXPIRED).end(!0),Ae.w("".concat(this._n,".onUserSigExpired userID:").concat(this.getMyUserID())),0!==this.get(12).getStatusInstanceID()&&(this.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_USERSIG_EXPIRED}),this._m.setNotReadyReason(Pn.KICKED_OUT_USERSIG_EXPIRED),this._m.reset())}},{key:"onRestApiKickedOut",value:function(e){new Jn("kickedOut").setMessage("type:".concat(E.KICKED_OUT_REST_API," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),Ae.w("".concat(this._n,".onRestApiKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),0!==this.get(12).getStatusInstanceID()&&(this.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_REST_API}),this._m.setNotReadyReason(Pn.KICKED_OUT_REST_API),this._m.reset(),this.get(21).onRestApiKickedOut())}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this.resetReady(),this._helloInterval=120,this._lastLoginTs=0,this._lastWsHelloTs=0,this._isWebUniapp=0}}]),Oi);function Oi(e){return o(this,Oi),(e=$o.call(this,e))._n="SignModule",e._helloInterval=120,e._lastLoginTs=0,e._lastWsHelloTs=0,e._isWebUniapp=0,Bo.mixin(f(e)),e}function Ni(e,t){o(this,Ni),this._m=e,this._isLoggedIn=!1,this._SDKAppID=t.SDKAppID,this._userID=t.userID||"",this._userSig=t.userSig||"",this._version="3.4.7",this._a2Key="",this._tinyID="",this._customStatus="",this._contentType="json",this._unlimitedAVChatRoom=t.unlimitedAVChatRoom,this._scene=t.scene||"",this._oversea=t.oversea,this._instanceID=t.instanceID,this._statusInstanceID=0,this._isDevMode=t.devMode,this._isTestEnv=t.testEnv,this._proxyServer=t.proxyServer,this._fileUploadProxy=t.fileUploadProxy,this._fileDownloadProxy=t.fileDownloadProxy,this._applicationID=0,this._isPartialUpdatedConvs=t.partialUpdatedConversations,this._isUsingChatCore=!1,this._uiPlatform=0,this._authKey="",this._customLoginInfo=""}function Pi(e){return o(this,Pi),(e=Wo.call(this,e))._n="UserModule",e._profileHandler=new Si(f(e)),e._blacklistHandler=new Di(f(e)),e._userStatusHandler=new ki(f(e)),e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,e.onContextUpdated,f(e)),e}function wi(e){o(this,wi),this._userM=e,this._n="UserStatusHandler",this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100,this._userM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Gi(e){o(this,Gi),this._userM=e,this._n="BlacklistHandler",this._blacklistMap=new Map,this.startIndex=0,this.maxLimited=100,this.currentSequence=0}function Ui(e){o(this,Ui),this._userM=e,this._n="ProfileHandler",this.TAG="profile",this.accountProfileMap=new Map,this.expirationTime=864e5}function xi(e){return o(this,xi),(e=Yo.call(this,e))._n="TopicModule",e._topicMap=new Map,e._getTopicTimeMap=new Map,e.TOPIC_CACHE_TIME=300,e.TOPIC_LAST_ACTIVE_TIME=3600,e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Fi(e,t){o(this,Fi),this.topicID="",this.topicName="",this.avatar="",this.introduction="",this.notification="",this.unreadCount=0,this.muteAllMembers=!1,this.customData="",this.groupAtInfoList=[],this.nextMessageSeq=0,this.lastMessage=Ko(e.lastMessage,t),this.selfInfo={muteTime:0,readedSequence:0,messageRemindType:"",excludedUnreadSequenceList:void 0},this._initTopic(e)}function qi(e){return o(this,qi),(e=zo.call(this,e))._n="GroupModule",e._commonGroupHandler=new ui(f(e)),e._groupAttributesHandler=new li(f(e)),e._groupCountersHandler=new di(f(e)),e._AVChatRoomHandler=new fi(f(e)),e._groupTipsHandler=new ci(f(e)),e._groupSystemNoticeHandler=new vi(f(e)),e._groupMemberHandler=new _i(f(e)),e.groupMap=new Map,e._unjoinedAVChatRoomList=new Map,e._receiptDetailCompleteMap=new Map,e._onlineMemberCountMap=new Map,e._timeoutIDs=[],e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Vi(e){o(this,Vi),this._grpM=e,this._n="GroupSystemNoticeHandler",this.pendencyMap=new Map}function Bi(e){o(this,Bi),this._grpM=e,this._n="GroupMemberHandler",this.groupMemberListMap=new Map,this.DEFAULT_MEMBER_INFO_FILTER=["Role","JoinTime","NameCard","ShutUpUntil","OnlineStatus"],this._grpM.getIEmitInst().on(xo.PROFILE_UPDATED,this._onProfileUpdated,this)}function Hi(e){o(this,Hi),this.userID="",this.avatar="",this.nick="",this.role="",this.joinTime="",this.lastSendMsgTime="",this.nameCard="",this.muteUntil=0,this.memberCustomField=[],this.isOnline=!1,this.updateMember(e)}function Ki(e){o(this,Ki),this._grpM=e,this._n="AVChatRoomHandler",this._joinedGroupMap=new Map,this._pollingRequestInfoMap=new Map,this._pollingInstanceMap=new Map,this._seqSll=new ei(200),this._IDSll=new ei(100),this._reportMessageStackedCount=0,this._onlineMemberCountMap=new Map,this.DEFAULT_EXPIRE_TIME=60,this.DEFAULT_POLLING_INTERVAL=300,this.MAX_POLLING_INTERVAL=2e3,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0,this._startBroadcastSeq=1,this._broadcastMessageIDMap=new Map,this.DEFAULT_POLLING_SIMPLIFIED_MSG=0}function ji(e){o(this,ji);var t=e.manager,n=e.groupID,i=e.onInit,s=e.onSuccess;e=e.onFail,this._n="Polling",this._manager=t,this._grpM=t._grpM,this._onInit=i,this._onSuccess=s,this._onFail=e,this._groupID=n,this._timeoutID=-1,this._isRunning=!1,this._proto=Gn.AV_POLLING}function $i(e){o(this,$i),this._grpM=e,this._n="GroupCountersHandler",this._groupCountersMap=new Map,this.EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Wi(e){o(this,Wi),this._grpM=e,this._n="GroupAttributesHandler",this._groupAttributesMap=new Map,this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Yi(e){o(this,Yi),this._grpM=e,this._n="CommonGroupHandler",this.tempConversationList=null,this._cachedGroupMessageMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4,this.PAGING_GRP_COUNT_LIMIT=200,this._pagingStatus=Sn,this._pagingGetCostList=[],e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,this.syncGroupList,this)}function zi(e){o(this,zi),this._grpM=e,this._n="GroupTipsHandler",this._cachedGroupTipsMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4}function Xi(e){return o(this,Xi),(e=Xo.call(this,e))._n="ConvModule",Bo.mixin(f(e)),e._msgListHandler=new Fo(f(e)),e._msgRemindHandler=new si(f(e)),e._convGroupHandler=new ai(f(e)),e._sll=new ei(100),e._pagingStatus=Sn,e._pagingTs=0,e._pagingStartIdx=0,e._pagingPinnedTs=0,e._pagingPinnedStartIdx=0,e._pagingConvIDMap=new Map,e._convIDFromUnreadDBMap=new Map,e._convMap=new Map,e._tmpGroupList=[],e._tmpGroupAtTipsList=[],e._peerReadTimeMap=new Map,e._completedMap=new Map,e._roamingMsgKeyAndTimeMap=new Map,e._remoteGroupReadSeqMap=new Map,e._convTotalUnreadCount=0,e._pagingGetCostList=[],e._convMapForDiff=new Map,e._partialUpdatedConvMap=new Map,e._everClearedMap=new Map,e._bPullOnInvite=!0,e._initListeners(),e}function Ji(e){o(this,Ji),this._convM=e,this._n="ConvGroupHandler",this._convGroupMap=new Map,this._startIndex=0,this._pagingStatus=Sn}function Zi(e){o(this,Zi),this._convM=e,this._n="MsgRemindHandler"}function Qi(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];o(this,Qi),this.conversationID=e.conversationID||"",this.unreadCount=e.unreadCount||0,this.type=e.type||"",this.lastMessage=Ho(e.lastMessage,t,n),e.lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),this._isInfoCompleted=!1,this.peerReadTime=e.peerReadTime||0,this.groupAtInfoList=[],this.remark="",this.isPinned=e.isPinned||!1,this.messageRemindType=e.messageRemindType,this.markList=e.markList||[],this.customData=e.customData||"",this.conversationGroupList=e.conversationGroupList||[],this.draftText=e.draftText||"",this._initProfile(e),this.subType=this.groupProfile?this.groupProfile.type:""}function es(e){o(this,es),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(e)}function ts(e){o(this,ts),this.MAX_LENGTH=e,this.map=new Map}function ns(e){var t=this;o(this,ns),Ve(e)||(this.userID=e.userID||"",this.nick=e.nick||"",this.gender=e.gender||"",this.birthday=e.birthday||0,this.location=e.location||"",this.selfSignature=e.selfSignature||"",this.allowType=e.allowType||E.ALLOW_TYPE_ALLOW_ANY,this.language=e.language||0,this.avatar=e.avatar||"",this.messageSettings=e.messageSettings||0,this.adminForbidType=e.adminForbidType||E.FORBID_TYPE_NONE,this.level=e.level||0,this.role=e.role||0,this.lastUpdatedTime=0,this.profileCustomField=[],Ve(e.profileCustomField))||e.profileCustomField.forEach((function(e){t.profileCustomField.push({key:e.key,value:e.value})}))}function os(){return null}function is(e){var t=e.get(12);return{SDKType:10,SDKAppID:t.getSDKAppID(),SDKVersion:t.getVersion(),tinyID:Number(t.getTinyID()),userID:t.getUserID(),platform:e.getPlatform(),instanceID:t.getInstanceID(),traceID:De()}}s(gs,[{key:"_errorTolerantHandle",value:function(){Z||"undefined"!=typeof window&&this._canIUseCookies()||(this.getItem=os,this.setItem=os,this.removeItem=os,this.clear=os)}},{key:"onCheckTimer",value:function(e){e%20==0&&0!==this._storageQueue.size&&this._doFlush()}},{key:"_doFlush",value:function(){try{var e,t=T(this._storageQueue);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2),o=n[0],i=n[1];this._setStorageSync(this._getKey(o),i)}}catch(s){t.e(s)}finally{t.f()}this._storageQueue.clear()}catch(s){Ae.w("".concat(this._n,"._doFlush error:"),s)}}},{key:"_getPrefix",value:function(){var e=this._m.get(12);return"TIM_".concat(e.getSDKAppID(),"_").concat(e.getUserID(),"_")}},{key:"_getKey",value:function(e){return"".concat(this._getPrefix()).concat(e)}},{key:"getItem",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];try{var n=t?this._getKey(e):e;return this.getStorageSync(n)}catch(o){return Ae.w("".concat(this._n,".getItem error:"),o),{}}}},{key:"setItem",value:function(e,t){var n;2<arguments.length&&void 0!==arguments[2]&&arguments[2]?(n=3<arguments.length&&void 0!==arguments[3]&&!arguments[3]?e:this._getKey(e),this._setStorageSync(n,t)):this._storageQueue.set(e,t)}},{key:"clear",value:function(){try{Z?ne.clearStorageSync():this._canIUseCookies()&&localStorage.clear()}catch(e){Ae.w("".concat(this._n,".clear error:"),e)}}},{key:"removeItem",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];try{var n=t?this._getKey(e):e;this._removeStorageSync(n)}catch(o){Ae.w("".concat(this._n,".removeItem error:"),o)}}},{key:"getSize",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"b";try{var o={size:0,limitSize:5242880,unit:n};if(Object.defineProperty(o,"leftSize",{enumerable:!0,get:function(){return o.limitSize-o.size}}),Z&&(o.limitSize=1024*ne.getStorageInfoSync().limitSize),e)o.size=JSON.stringify(this.getItem(e)).length+this._getKey(e).length;else if(Z)ne.getStorageInfoSync().keys.forEach((function(e){o.size+=JSON.stringify(t.getStorageSync(e)).length+t._getKey(e).length}));else if(this._canIUseCookies())for(var i in localStorage)localStorage.hasOwnProperty(i)&&(o.size+=localStorage.getItem(i).length+i.length);return this._convertUnit(o)}catch(s){Ae.w("".concat(this._n," error:"),s)}}},{key:"_convertUnit",value:function(e){var t,n={},o=e.unit;for(t in n.unit=o,e)"number"==typeof e[t]&&("kb"===o.toLowerCase()?n[t]=Math.round(e[t]/1024):"mb"===o.toLowerCase()?n[t]=Math.round(e[t]/1024/1024):n[t]=e[t]);return n}},{key:"_setStorageSync",value:function(e,t){Z?W?my.setStorageSync({key:e,data:t}):ne.setStorageSync(e,t):this._canIUseCookies()&&localStorage.setItem(e,JSON.stringify(t))}},{key:"getStorageSync",value:function(e){return Z?W?my.getStorageSync({key:e}).data:ne.getStorageSync(e):this._canIUseCookies()?JSON.parse(localStorage.getItem(e)):{}}},{key:"_removeStorageSync",value:function(e){Z?W?my.removeStorageSync({key:e}):ne.removeStorageSync(e):this._canIUseCookies()&&localStorage.removeItem(e)}},{key:"_canIUseCookies",value:function(){return"undefined"!=typeof window&&navigator&&navigator.cookieEnabled&&localStorage}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._doFlush()}}]);var ss,as=gs,rs=(s(fs,[{key:"pushIn",value:function(e){Ae.d("".concat(this._n,".pushIn"),this._report.length,e),this._report.push(e)}},{key:"backfill",value:function(e){var t;Ye(e)&&0!==e.length&&(Ae.d("".concat(this._n,".backfill"),this._report.length,e.length),(t=this._report).unshift.apply(t,m(e)))}},{key:"getLogsNumInMemory",value:function(){return this._report.length}},{key:"isEmpty",value:function(){return 0===this._report.length}},{key:"_reset",value:function(){this._report.length=0,this._report=[]}},{key:"getLogsInMemory",value:function(){var e=this._report.slice();return this._reset(),e}}]),fs),cs=(r(hs,bn),ss=g(hs),s(hs,[{key:"reportAtOnce",value:function(){this._report()}},{key:"_onLoginSuccess",value:function(){var e=this,t=this.get(13),n=t.getItem(this.TAG,!1);!Ve(n)&&ze(n.forEach)&&(Ae.l("".concat(this._n,"._onLoginSuccess. logs count:").concat(n.length)),n.forEach((function(t){e._reportBody.pushIn(t)})),t.removeItem(this.TAG,!1))}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("evt_rpt_threshold"),t=this.getCloudConfig("evt_rpt_waiting"),n=this.getCloudConfig("evt_rpt_level"),o=this.getCloudConfig("evt_rpt_sdkappid_bl"),i=this.getCloudConfig("evt_rpt_tinyid_wl");ut(e)||(this.MIN_THRESHOLD=Number(e)),ut(t)||(this.WAITING_TIME=Number(t)),ut(n)||(this.REPORT_LEVEL=n.split(",").map((function(e){return Number(e)}))),ut(o)||(this.REPORT_SDKAPPID_BLACKLIST=o.split(",").map((function(e){return Number(e)}))),ut(i)||(this.REPORT_TINYID_WHITELIST=i.split(","))}},{key:"pushIn",value:function(e){e instanceof Jn&&(e.updateTimeStamp(),this._reportBody.pushIn(e),this._reportBody.getLogsNumInMemory()>=this.MIN_THRESHOLD)&&this._report()}},{key:"onCheckTimer",value:function(){Date.now()<this._lastReportTime+this.WAITING_TIME||this._reportBody.isEmpty()||this._report()}},{key:"_filterLogs",value:function(e){var t=this,n=(o=this.get(12)).getSDKAppID(),o=o.getTinyID();return Pt(this.REPORT_SDKAPPID_BLACKLIST,n)&&!wt(this.REPORT_TINYID_WHITELIST,o)?[]:e.filter((function(e){return t.REPORT_LEVEL.includes(e.level)}))}},{key:"_report",value:function(){var e,n,o=this;this._reportBody.isEmpty()||(e=this._reportBody.getLogsInMemory(),0!==(n=this._filterLogs(e)).length?(n={header:is(this),event:n},this.req({P:Gn.SSO_STAT,data:t({},n)}).then((function(){o._lastReportTime=Date.now()})).catch((function(t){Ae.w("".concat(o._n,"._report failed. error:"),t),o._lastReportTime=Date.now(),o._reportBody.backfill(e),o._reportBody.getLogsNumInMemory()>o.MAX_THRESHOLD&&o._flushAtOnce()}))):this._lastReportTime=Date.now())}},{key:"_flushAtOnce",value:function(){var e=this.get(13),t=e.getItem(this.TAG,!1),n=this._reportBody.getLogsInMemory(),o="".concat(this._n,"._flushAtOnce");Ve(t)?(Ae.l("".concat(o," 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)),Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._lastReportTime=0,this._report(),this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[]}}]),hs),us="none",ls="online",ds=(s(ps,[{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");Z?(ne.getNetworkType({success:function(n){e._networkType=n.networkType||n.subtype||"",n.networkType===us?Ae.w("".concat(t," no network, please check!")):Ae.i("".concat(t," networkType:").concat(n.networkType))}}),this._mpNetworkStatusCallback=this._onNetworkStatusChange.bind(this),ne.onNetworkStatusChange(this._mpNetworkStatusCallback)):te&&(this._networkType=ls,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:ls})}},{key:"_onWebOffline",value:function(){this._onNetworkStatusChange({isConnected:!1,networkType:us})}},{key:"_onNetworkStatusChange",value:function(e){var t=e.isConnected,n=(e=e.networkType,"".concat(this._n,"._onNetworkStatusChange")),o=!1,i="previous:".concat(this._networkType," current:").concat(e);t?(Ae.i("".concat(n," ").concat(i)),this._networkType!==e&&(o=!0,this._networkType=e,this._m.get(21).reConnect(!0))):this._networkType!==e&&(o=!0,this._networkType=e,Ae.w("".concat(n," no network, please check!")),this._m.get(21).offline()),o&&new Jn("networkChange").setMessage("isConnected:".concat(t," ").concat(i)).end()}},{key:"isOnline",value:function(){return this._networkType!==us}},{key:"getNetworkType",value:function(){return this._networkType}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),Z?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)}}]),ps);function ps(e){o(this,ps),this._m=e,this._networkType=ls,this._n="NetMonitorModule",this._mpNetworkStatusCallback=null,this._webOnlineCallback=null,this._webOfflineCallback=null,this._removeListener=null,this._m.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,this._startRN,this)}function hs(e){o(this,hs),(e=ss.call(this,e))._n="EventStatModule",e.TAG="im-ssolog-event",e._reportBody=new rs,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(xo.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,f(e)),t.on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function fs(e){o(this,fs),this._n="SSOLogBody",this._report=[]}function gs(e){o(this,gs),this._m=e,this._n="StorageModule",this._storageQueue=new Map,this._errorTolerantHandle()}function _s(e,t){return e(t={exports:{}},t.exports),t.exports}var ms,vs=_s((function(e){var t=Object.prototype.hasOwnProperty,n="~";function o(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,o,s,a){if("function"!=typeof o)throw new TypeError("The listener must be a function");return o=new i(o,s||e,a),s=n?n+t:t,e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],o]:e._events[s].push(o):(e._events[s]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function r(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),r.prototype.eventNames=function(){var e,o,i=[];if(0===this._eventsCount)return i;for(o in e=this._events)t.call(e,o)&&i.push(n?o.slice(1):o);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},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 o=0,i=t.length,s=new Array(i);o<i;o++)s[o]=t[o].fn;return s},r.prototype.listenerCount=function(e){return e=n?n+e:e,(e=this._events[e])?e.fn?1:e.length:0},r.prototype.emit=function(e,t,o,i,s,a){var r=n?n+e:e;if(!this._events[r])return!1;var c,u=this._events[r],l=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,o),!0;case 4:return u.fn.call(u.context,t,o,i),!0;case 5:return u.fn.call(u.context,t,o,i,s),!0;case 6:return u.fn.call(u.context,t,o,i,s,a),!0}for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];u.fn.apply(u.context,c)}else for(var d,p=u.length,h=0;h<p;h++)switch(u[h].once&&this.removeListener(e,u[h].fn,void 0,!0),l){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,t);break;case 3:u[h].fn.call(u[h].context,t,o);break;case 4:u[h].fn.call(u[h].context,t,o,i);break;default:if(!c)for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];u[h].fn.apply(u[h].context,c)}return!0},r.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},r.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},r.prototype.removeListener=function(e,t,o,i){if(e=n?n+e:e,this._events[e])if(t){var s=this._events[e];if(s.fn)s.fn!==t||i&&!s.once||o&&s.context!==o||a(this,e);else{for(var r=0,c=[],u=s.length;r<u;r++)(s[r].fn!==t||i&&!s[r].once||o&&s[r].context!==o)&&c.push(s[r]);c.length?this._events[e]=1===c.length?c[0]:c:a(this,e)}}else a(this,e);return this},r.prototype.removeAllListeners=function(e){return e?(e=n?n+e:e,this._events[e]&&a(this,e)):(this._events=new o,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prefixed=n,e.exports=r.EventEmitter=r})),ys=["rich.my-imcloud.com","imrich.qcloud.com"],Is=["requestSnapshotUrl"],Ms=(r(ks,bn),ms=g(ks),s(ks,[{key:"_init",value:function(){this._fileDownloadProxy=this.getFileDownloadProxy(),this._authKey=this.getDowloadFileAuthKey();var e=this.get(18);this.TIMUploadPlugin=e.getPlugin("tim-upload-plugin"),this.TIMUploadPlugin?this._initUploaderMethod():(this.COSSDK=e.getPlugin(e=Z?"cos-wx-sdk":"cos-js-sdk"),this.COSSDK?(this._getAuthorizationKey(),this.warn("CosReplacement",e)):this.warn("PluginUndetected"))}},{key:"_onCloudConfig",value:function(){var e=this,t="".concat(this._n,"._onCloudConfig"),n=this.getCloudConfig("upload_size_limit"),o=this.getCloudConfig("simple_cos"),i=this.getCloudConfig("file_dn_list");if(Ae.l("".concat(t," uploadSizeLimit:").concat(n," simpleCos:").concat(o)),!ut(n))try{var s=JSON.parse(n);this.UPLOAD_SIZE_LIMIT={A:s.a?1048576*parseInt(s.a):this.UPLOAD_SIZE_LIMIT.A,F:s.f?1048576*parseInt(s.f):this.UPLOAD_SIZE_LIMIT.F,I:s.i?1048576*parseInt(s.i):this.UPLOAD_SIZE_LIMIT.I,V:s.v?1048576*parseInt(s.v):this.UPLOAD_SIZE_LIMIT.V}}catch(a){}if(ut(o)||(this.isSimpleCos="1"===o),!ut(i))try{JSON.parse(i).forEach((function(t){e._fileDNList.includes(t)||e._fileDNList.push(t)}))}catch(a){}}},{key:"_getAuthorizationKey",value:function(){var e=this,t="".concat(this._n,".").concat("_getAuthorizationKey"),n=new Jn("_getAuthorizationKey"),o=Math.ceil(Date.now()/1e3);this.req({P:Gn.COS_SIGN,data:{duration:this.expiredTimeLimit}}).then((function(i){i=i.data;var s=(Ae.l("".concat(t," ok. data:"),i),i.expiredTime-o);n.setMessage("requestId:".concat(i.requestId," requestTime:").concat(o," expiredTime:").concat(i.expiredTime," diff:").concat(s,"s")).end(),!Z&&i.region&&(e.region=i.region),e.appid=i.appid,e.bucketName=i.bucketName,e.ciUrl=i.ciUrl,e.directory=i.directory,e.downloadUrl=i.downloadUrl,e.uploadUrl=i.uploadUrl,e.cosOptions={secretId:i.secretId,secretKey:i.secretKey,sessionToken:i.sessionToken,expiredTime:i.expiredTime},Ae.l("".concat(t," ok. region:").concat(e.region," bucketName:").concat(e.bucketName)),e._initUploaderMethod()})).catch((function(e){n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e)}))}},{key:"_getCosPreSigUrl",value:function(e){var t=this,n="".concat(this._n,".").concat("_getCosPreSigUrl"),o=Math.ceil(Date.now()/1e3),i=new Jn("_getCosPreSigUrl"),s={uploadMethod:e.uploadMethod,platform:this.getPlatform(),SDKAppID:this.getSDKAppID(),userID:e.userID,conversationType:e.conversationType,uploadConfig:[{fileID:1,fileType:e.fileType,fileName:e.fileName}]},a=Gn.SIMPLE_COS_PRE_SIG;return this.isSimpleCos||(s={fileType:e.fileType,fileName:e.fileName,uploadMethod:e.uploadMethod,duration:e.duration},a=Gn.COS_PRE_SIG),this.req({P:a,data:s}).then((function(e){t.tryCount=0,e=e.data||{};var s,a,r=(Ae.l("".concat(n," ok. isSimpleCos:").concat(t.isSimpleCos," data:"),e),"");return r=t.isSimpleCos?(s=(a=e.preSig[0]).uploadUrl,a=a.fileKey,"uploadIP:".concat(e.uploadIP," uploadUrl:").concat(s," fileKey:").concat(a," cost:").concat(Kt(o))):"requestId:".concat(e.requestId," expiredTime:").concat(e.expiredTime," diff:").concat(e.expiredTime-o,"s"),i.setMessage(r).end(),e})).catch((function(o){return-1===o.code&&(o.code=Pn.COS_GET_SIG_FAIL),i.setError(o).end(),Ae.w("".concat(n," failed. error:"),o),t.tryCount<1?(t.tryCount++,t._getCosPreSigUrl(e)):(t.tryCount=0,yn({code:Pn.COS_GET_SIG_FAIL}))}))}},{key:"_initUploaderMethod",value:function(){var e=this;this.TIMUploadPlugin?(this.timUploadPlugin=new this.TIMUploadPlugin,this._cosUploadMethod=function(t,n){e.timUploadPlugin.uploadFile(t,n)}):this.appid&&(this.cos=Z?new this.COSSDK({ForcePathStyle:!0,getAuthorization:this._getAuthorization.bind(this)}):new this.COSSDK({getAuthorization:this._getAuthorization.bind(this)}),this._cosUploadMethod=Z?function(t,n){e.cos.postObject(t,n)}:function(t,n){e.cos.uploadFiles(t,n)})}},{key:"onCheckTimer",value:function(e){!this.COSSDK||this.TIMUploadPlugin||this.isLoggedIn()&&e%60==0&&Math.ceil(Date.now()/1e3)>=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(Hn),this._uploadImage(e);case E.MSG_FILE:return t.addTotalCount(Hn),this._uploadFile(e);case E.MSG_AUDIO:return t.addTotalCount(Hn),this._uploadAudio(e);case E.MSG_VIDEO:return t.addTotalCount(Hn),this._uploadVideo(e);default:return Promise.resolve()}}},{key:"_uploadImage",value:function(e){var n=this,o=this.get(2),i=e.getElements()[0],s=o.getMessageOption(e.clientSequence);return this.doUploadImage({file:s.payload.file,to:s.to,message:e,onProgress:function(e){if(i.updatePercent(e),ze(s.onProgress))try{s.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(o){var s=o.location,a=o.fileType,r=o.fileSize,c=o.width,u=o.height,l=o.smallImageUrl,d=o.smallImageWidth,p=o.smallImageHeight,h=o.largeImageUrl,f=o.largeImageWidth,g=o.largeImageHeight,_=o.imageInfoArray;o=n.isPrivateNetWork()?s:st(s),i.updateImageFormat(a);var m,v,y={size:r,url:o,width:c,height:u};if(_&&0<_.length)for(var I=0;I<_.length;I++){var M=_[I];1===M.type?m=M:2===M.type?v=M:y=t(t({},y),M)}else v=l&&h?(m={url:l,width:d,height:p},{url:h,width:f,height:g}):(m=At({originUrl:o,originWidth:c,originHeight:u,min:198}),At({originUrl:o,originWidth:c,originHeight:u,min:720}));return i.updateImageInfoArray([t({},y),t({},v),t({},m)]),e}))}},{key:"_uploadFile",value:function(e){var t=this,n=this.get(2),o=e.getElements()[0],i=n.getMessageOption(e.clientSequence);return this.doUploadFile({file:i.payload.file,to:i.to,message:e,onProgress:function(e){if(o.updatePercent(e),ze(i.onProgress))try{i.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(n){var i=n=n.location;return t.isPrivateNetWork()||(i=oo(i=st(n),t._fileDownloadProxy,t._authKey,t._fileDNList)),o.updateFileUrl(i),e}))}},{key:"_uploadAudio",value:function(e){var t=this,n=this.get(2),o=e.getElements()[0],i=n.getMessageOption(e.clientSequence);return this.doUploadAudio({file:i.payload.file,to:i.to,message:e,onProgress:function(e){if(o.updatePercent(e),ze(i.onProgress))try{i.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(n){return n=n.location,n=t.isPrivateNetWork()?n:st(n),o.updateAudioUrl(n),e}))}},{key:"_uploadVideo",value:function(e){var t=this,n=this.get(2),o=e.getElements()[0],i=n.getMessageOption(e.clientSequence);return this.doUploadVideo({file:i.payload.file,to:i.to,message:e,onProgress:function(e){if(o.updatePercent(e),ze(i.onProgress))try{i.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(n){var i=n.location;return n=n.snapshotInfo,i=t.isPrivateNetWork()?i:st(i),o.updateVideoUrl(i),Ve(n)||o.updateSnapshotInfo(n),e}))}},{key:"_checkSizeError",value:function(e){var t="";return"A"===e?t="audio":"I"===e?t="image":"V"===e?t="video":"F"===e&&(t="file"),yn({code:Pn["MSG_".concat(e,"_SIZE_LIMIT")],message:this.getErrMsg("UploadSizeLimit",t,"".concat(this.UPLOAD_SIZE_LIMIT[e]/1048576,"MB"))})}},{key:"doUploadImage",value:function(e){var t,n,o=this;return!e.file||this._isEmptyFileList(e.file.files)?yn({code:Pn.MSG_I_SELECT_F_FIRST}):!0!==(t=this._checkImageType(e.file))||!0!==(t=this._checkImageSize(e.file))?t:(n=null,this._setUploadFileType(1),this.uploadByCOS(e).then((function(t){if(n=t,o.isPrivateNetWork())return Dt(s);if(Ye(n.imageInfoArray)){var i=n.imageInfoArray.find((function(e){return 3===e.type}));if(i)return i}var s;return ee?{width:e.file.width,height:e.file.height}:(s=st(t.location),o.COSSDK?Dt(s):Dt(s=oo(s,o._fileDownloadProxy,o._authKey,o._fileDNList)))})).then((function(e){return n.width=e.width,n.height=e.height,Promise.resolve(n)})))}},{key:"_checkImageType",value:function(e){var t="";return t=Z?e.url.slice(e.url.lastIndexOf(".")+1):ee?e.type.split("/")[1]:e.files[0].name.slice(e.files[0].name.lastIndexOf(".")+1),0<=Jo.indexOf(t.toLowerCase())||yn({code:Pn.MSG_I_TYPES_LIMIT})}},{key:"_checkImageSize",value:function(e){return 0===(e=(Z||ee?e:e.files[0]).size)?yn({code:Pn.MSG_F_IS_EMPTY}):e<this.UPLOAD_SIZE_LIMIT.I||this._checkSizeError("I")}},{key:"doUploadFile",value:function(e){return!e.file||this._isEmptyFileList(e.file.files)?yn({code:Pn.MSG_F_SELECT_F_FIRST}):e.file.files[0].size>this.UPLOAD_SIZE_LIMIT.F?this._checkSizeError("F"):0===e.file.files[0].size?yn({code:Pn.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?yn({code:Pn.MSG_F_IS_EMPTY}):-1===Zo.indexOf(e.file.videoFile.type)?yn({code:Pn.MSG_V_TYPES_LIMIT}):(this._setUploadFileType(2),Z||ee?this.handleVideoUpload(t(t({},e),{},{file:e.file.videoFile})):te?this.handleVideoUpload(e):void 0)}},{key:"handleVideoUpload",value:function(e){var t=this;return new Promise((function(n,o){t.uploadByCOS(e).then((function(e){n(e)})).catch((function(){t.uploadByCOS(e).then((function(e){n(e)})).catch((function(){o(new Nn({code:Pn.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?yn({code:Pn.MSG_F_IS_EMPTY}):(this._setUploadFileType(3),this.uploadByCOS(e)):yn({code:Pn.MSG_A_UPLOAD_FAIL})}},{key:"uploadByCOS",value:function(e){var t,n,o,i,s=this;return ze(this._cosUploadMethod)?this.timUploadPlugin?this._uploadWithPreSigUrl(e):(t=new Jn("upload"),n="".concat(this._n,".uploadByCOS"),o=Date.now(),i=this._getFile(e),new Promise((function(a,r){var c=Z?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 Nn({code:Pn.MSG_F_UPLOAD_FAIL}),t.setError(l).end(),Ae.l("".concat(n," failed. error:"),c.files[0].error),403===c.files[0].error.statusCode&&s._getAuthorizationKey(),r(l)):(p.fileName=i.name,p.fileSize=i.size,p.fileType=i.type.slice(i.type.indexOf("/")+1).toLowerCase(),p.location=(Z?c:c.files[0].data).Location,l=Date.now()-o,c=u._formatFileSize(i.size),d=u._formatSpeed(1e3*i.size/l),c="size:".concat(c," time:").concat(l,"ms speed:").concat(d),Ae.l("".concat(n," success. name:").concat(i.name," ").concat(c)),a(p),(d=s.get(26)).addCost(Hn,l),d.addFileSize(Hn,i.size),t.setMessage(c).end()):(p=new Nn({code:Pn.MSG_F_UPLOAD_FAIL}),t.setError(p).end(),Ae.w("".concat(n," failed. error:"),e),403===e.statusCode&&s._getAuthorizationKey(),r(p))}))}))):(this.warn("PluginUndetected"),yn({code:Pn.COS_UNDETECTED}))}},{key:"_uploadWithPreSigUrl",value:function(e){var t=this,n="".concat(this._n,"._uploadWithPreSigUrl"),o=this._getFile(e);return this._createCosOptionsPreSigUrl(e).then((function(e){return new Promise((function(i,s){var a=new Jn("upload"),r=e.requestSnapshotUrl,c=void 0===r?void 0:r,u=h(e,Is),l=Date.now();t._cosUploadMethod(u,(function(r,d){if(r||403===d.statusCode)a.setError(new Nn(r)).end(),h={HttpStatusCode:9999,CostTime:Kt(l,!1),error:r,url:e.url},d.data&&d.data.uploadIP&&(h.uploadIP=d.data.uploadIP),t._uploadSSOLog(h),Ae.l("".concat(n," failed, error:"),r),s(new Nn({code:Pn.MSG_F_UPLOAD_FAIL}));else{var p=Object.create(null),h=d.data.location||"",f=(t.isPrivateNetWork()||0!==h.indexOf("https://")&&0!==h.indexOf("http://")||(h=h.split("//")[1]),p.fileName=o.name,p.fileSize=o.size,p.fileType=o.type.slice(o.type.indexOf("/")+1).toLowerCase(),p.location=h,r=Kt(l,!1),h=t._formatFileSize(o.size),t._formatSpeed(1e3*o.size/r));if(h="size:".concat(h," time:").concat(r,"ms speed:").concat(f," res:").concat(JSON.stringify(d.data)),Ae.l("".concat(n," ok. name:").concat(o.name," ").concat(h)),a.setMessage(h).end(),f={HttpStatusCode:d.statusCode,FileSize:o.size,CostTime:r,url:e.url},(d.data&&d.data.uploadIP&&(f.uploadIP=d.data.uploadIP),t._uploadSSOLog(f),h=t.get(26)).addCost(Hn,r),h.addFileSize(Hn,o.size),f=[],u.thumbUrl&&u.largeUrl&&f.push.apply(f,[t._getSmallImageInfoByUrl(u.thumbUrl,p),t._getLargeImageInfoByUrl(u.largeUrl,p)]),1===t.uploadFileType&&t.isSimpleCos&&!t.isPrivateNetWork()&&(f.push(t._getImageInfoArray(u.downloadUrl,p)),d.data.uploadIP)&&f.push(t._getDownloadIP(u.downloadUrl.split("//")[1].split("/")[0],p)),c&&f.push(t._getSnapshotInfoByUrl(c,p)),0<f.length)return Promise.all(f).then((function(){i(p)}));i(p)}}))}))}))}},{key:"_getDownloadIP",value:function(e,t){var n="".concat(this._n,"._getDownloadIP"),o=Date.now();return this.req({P:Gn.GET_IP,data:{domainName:e}}).then((function(e){var i;e.data&&e.data.ip&&(Ae.l("".concat(n," ok. downloadIP:").concat(e.data.ip," cost:").concat(Kt(o))),(i=t.location.split("/"))[0]=e.data.ip,t.location=i.join("/"))})).catch((function(e){}))}},{key:"_getImageInfoArray",value:function(e,t){var n=this,o="".concat(this._n,"._getImageInfoArray"),i=Date.now();return this.req({P:Gn.GET_IMAGE_INFO,data:{imageUrl:e}}).then((function(e){return e=e.data||{},Ae.l("".concat(o," ok. data: ").concat(JSON.stringify(e)," cost:").concat(Kt(i))),t.imageInfoArray=e.imageInfoArray,e})).catch((function(o){t.imageInfoArray=void 0,n._uploadSSOLog({HttpStatusCode:1e4,CostTime:Kt(i,!1),url:e})}))}},{key:"_uploadSSOLog",value:function(e){var t,n;this.isSimpleCos&&((t=new Jn).setEventType(18),e.error&&t.setError(new Nn(e.error)),n="HttpStatusCode:".concat(e.HttpStatusCode,"|CosRequestId:").concat(e.CosRequestId||"","|")+"FileAlreadyExist:".concat(e.FileAlreadyExist||0,"|FileSize:").concat(e.FileSize||0,"|CostTime:").concat(e.CostTime),e.uploadIP&&(n+="|FinalIP:".concat(e.uploadIP)),t.setMessage("OK").setMoreMessage(e.url).setExtension(n).end())}},{key:"_getRawOrUploadProxyUrl",value:function(e){var t=this.get(12).getFileUploadProxy(),n=e;return t?e.replace(/^https:\/\/[^/]+/,t):n}},{key:"_getFile",value:function(e){return Ye(e.file.files)||Xe(e.file.files)?e.file.files[0]:e.file}},{key:"_formatFileSize",value:function(e){return e<1024?e+"B":e<1048576?Math.floor(e/1024)+"KB":Math.floor(e/1048576)+"MB"}},{key:"_formatSpeed",value:function(e){return e<=1048576?Nt(e/1024,1)+"KB/s":Nt(e/1048576,1)+"MB/s"}},{key:"_createCosOptionsWeb",value:function(e){var t=this._getFile(e),n=(n=t.name).slice(n.lastIndexOf("."));return n=this._genFileName("".concat(nt(999999)).concat(n)),{files:[{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(n),Body:t}],SliceSize:1048576,onProgress:function(t){if("function"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(n){Ae.w("onProgress callback error:",n)}},onFileFinish:function(e,t,n){}}}},{key:"_createCosOptionsWXMiniApp",value:function(e){var t=this._getFile(e),n=this._genFileName(t.name);return t=t.url,{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(n),FilePath:t,onProgress:function(t){if(Ae.l(JSON.stringify(t)),"function"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(n){Ae.w("onProgress callback error:",n)}}}}},{key:"_createCosOptionsPreSigUrl",value:function(e){var t,n=this,o="",i="",s=0,a=this._getFile(e);return s=Z||ee?(o=e.message.type===E.MSG_FILE?(t=(t=a.name).slice(t.lastIndexOf(".")),this._genFileName("".concat(nt(999999)).concat(t))):this._genFileName(a.name),i=a.url,1):(t=(t=a.name).slice(t.lastIndexOf(".")),o=this._genFileName("".concat(nt(999999)).concat(t)),i=a,0),this._getCosPreSigUrl({fileType:this.uploadFileType,fileName:o,uploadMethod:s,duration:this.duration,userID:e.message.from,conversationType:Ct(e.message.conversationID)?1:2}).then((function(t){var s=(l=n.isSimpleCos?t.preSig[0]:t).uploadUrl,a=l.downloadUrl,r=void 0===(r=l.requestSnapshotUrl)?void 0:r,c=l.thumbUrl,u=l.largeUrl,l=l.fileKey;return t=void 0===(t=t.uploadIP)?"":t,{url:n._getRawOrUploadProxyUrl(s),fileType:n.uploadFileType,fileName:o,resources:i,downloadUrl:a,requestSnapshotUrl:r,thumbUrl:c,largeUrl:u,fileKey:l,uploadIP:!n.isPrivateNetWork()&&t,onProgress:function(t){if("function"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(n){Ae.w("onProgress callback error:",n),Ae.e(n)}}}}))}},{key:"_genFileName",value:function(e){return"".concat(kt(),"-").concat(e)}},{key:"_setUploadFileType",value:function(e){this.uploadFileType=e}},{key:"_getSnapshotInfoByUrl",value:function(e,t){var n=this,o="_getSnapshotInfoByUrl",i=new Jn(o);return this.req({P:Gn.VIDEO_COVER,data:{platform:this.getPlatform(),coverName:this._genFileName(nt(99999)),requestSnapshotUrl:e}}).then((function(e){var s;return e=(e.data||{}).snapshotUrl,Ae.l("".concat(n._n,".").concat(o," ok. snapshotUrl:").concat(e)),i.setMessage("snapshotUrl:".concat(e)).end(),Ve(e)?{}:Dt(s=oo(e,n._fileDownloadProxy,n._authKey,n._fileDNList)).then((function(e){t.snapshotInfo={snapshotUrl:s,snapshotWidth:e.width,snapshotHeight:e.height}}))})).catch((function(e){return Ae.w("".concat(n._n,".").concat(o," failed. error:"),e),i.setCode(e.errorCode).setMessage(e.errorInfo).end(),{}}))}},{key:"_getSmallImageInfoByUrl",value:function(e,t){return Dt(oo(e,this._fileDownloadProxy,this._authKey,this._fileDNList)).then((function(n){t.smallImageUrl=e,t.smallImageWidth=n.width,t.smallImageHeight=n.height}))}},{key:"_getLargeImageInfoByUrl",value:function(e,t){return Dt(oo(e,this._fileDownloadProxy,this._authKey,this._fileDNList)).then((function(n){t.largeImageUrl=e,t.largeImageWidth=n.width,t.largeImageHeight=n.height}))}},{key:"_isEmptyFileList",value:function(e){return!(!Xe(e)||0!==e.length)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),ks),Cs=["downloadKey","pbDownloadKey","messageList"],Ts=(s(Ds,[{key:"uploadMergerMessage",value:function(e,t){var n="".concat(this._n,".").concat("uploadMergerMessage"),o=(Ae.d("".concat(n," message:"),e,"messageBytes:".concat(t)),e=JSON.parse(JSON.stringify(e.payload)).messageList).length,i=this._msgM.get(17).getFileDNList(),s=new Jn("uploadMergerMessage");return e.forEach((function(e){io(e.messageBody[0].type,e.messageBody,i)})),this._msgM.req({P:Gn.UPLOAD_MERGER_MSG,data:{messageList:e}}).then((function(e){Ae.d("".concat(n," ok. response:"),e.data);var i={pbDownloadKey:i=(e=e.data).pbDownloadKey,downloadKey:e=e.downloadKey,messageNumber:o};return s.setMessage("".concat(o,"-").concat(t,"-").concat(e)).end(),i})).catch((function(e){throw Ae.w("".concat(n," failed. error:"),e),s.setError(e).end(),e}))}},{key:"downloadMergerMessage",value:function(e){var n=this,o="".concat(this._n,".").concat("downloadMergerMessage"),i=(Ae.d("".concat(o," message:"),e),e.payload.downloadKey),s=this._msgM.getFileDownloadProxy(),a=this._msgM.getDowloadFileAuthKey(),r=new Jn("downloadMergerMessage");return r.setMessage("downloadKey:".concat(i)),this._msgM.req({P:Gn.DOWNLOAD_MERGER_MSG,data:{downloadKey:i}}).then((function(i){Ae.d("".concat(o," ok. response:"),i.data);var c,u,l=n._msgM.get(17).getFileDNList();return ze(e.clearElement)?((c=e.payload).downloadKey,c.pbDownloadKey,c.messageList,c=h(c,Cs),e.clearElement(),e.setElement({type:e.type,content:t({messageList:i.data.messageList},c)},s,a,l)):(u=[],i.data.messageList.forEach((function(e){Ve(e)||(e=new yo(e,s,a,l),u.push(e))})),e.payload.messageList=u,e.payload.downloadKey="",e.payload.pbDownloadKey=""),r.end(),e})).catch((function(e){throw Ae.w("".concat(o," failed. key:").concat(i," error:"),e),r.setError(e).end(),e}))}},{key:"createMergerMessagePack",value:function(e,t,n){return e.conversationType===E.CONV_C2C?this._createC2CMergerMessagePack(e,t,n):this._createGroupMergerMessagePack(e,t,n)}},{key:"_createC2CMergerMessagePack",value:function(e,t,n){var o=null,i=(t&&(t.offlinePushInfo&&(o=t.offlinePushInfo),!0===t.onlineUserOnly)&&(o?o.disablePush=!0:o={disablePush:!0}),[]),s=(We(t)&&We(t.messageControlInfo)&&(s=(r=t.messageControlInfo).excludedFromUnreadCount,a=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===s&&i.push("NoUnread"),!0===a&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck"),""),a=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(s=e.cloudCustomData),n.pbDownloadKey),r=n.downloadKey,c=(n=n.messageNumber,(l=e.payload).title),u=l.abstractList,l=l.compatibleText,d=(d=this._msgM.get(6))&&d.isOnlineMessage(e,t)?0:void 0;return{P:Gn.SEND_C2C_MSG,data:{fromAccount:this._msgM.getMyUserID(),toAccount:e.to,msgBody:[{msgType:e.type,msgContent:{pbDownloadKey:a,downloadKey:r,title:c,abstractList:u,compatibleText:l,messageNumber:n}}],cloudCustomData:s,clientTime:e.clientTime,msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:d,offlinePushInfo:wo(o),messageControlInfo:0!==d?i:void 0,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0}}}},{key:"_createGroupMergerMessagePack",value:function(e,t,n){var o=null,i=(t&&t.offlinePushInfo&&(o=t.offlinePushInfo),[]),s=(We(t)&&We(t.messageControlInfo)&&(s=(r=t.messageControlInfo).excludedFromUnreadCount,a=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===s&&i.push("NoUnread"),!0===a&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck"),""),a=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(s=e.cloudCustomData),n.pbDownloadKey),r=n.downloadKey,c=(n=n.messageNumber,(l=e.payload).title),u=l.abstractList,l=l.compatibleText,d=this._msgM.get(7);return t=d&&d.isOnlineMessage(e,t)?1:0,{P:Gn.SEND_GRP_MSG,data:{fromAccount:this._msgM.getMyUserID(),groupID:e.to,msgBody:[{msgType:e.type,msgContent:{pbDownloadKey:a,downloadKey:r,title:c,abstractList:u,compatibleText:l,messageNumber:n}}],random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:void 0,cloudCustomData:s,onlineOnlyFlag:t,offlinePushInfo:wo(o),clientTime:e.clientTime,needReadReceipt:!0!==e.needReadReceipt||d.isMessageFromOrToAVChatroom(e.to)?0:1,messageControlInfo:0==t?i:void 0,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0}}}}]),Ds),Ss={ERR_SVR_COMM_SENSITIVE_TEXT:80001,ERR_SVR_COMM_BODY_SIZE_LIMIT:80002,OPEN_SERVICE_OVERLOAD_ERROR:60022,ERR_SVR_MSG_PKG_PARSE_FAILED:20001,ERR_SVR_MSG_INTERNAL_AUTH_FAILED:20002,ERR_SVR_MSG_INVALID_ID:20003,ERR_SVR_MSG_PUSH_DENY:20006,ERR_SVR_MSG_IN_PEER_BLACKLIST:20007,ERR_SVR_MSG_BOTH_NOT_FRIEND:20009,ERR_SVR_MSG_NOT_PEER_FRIEND:20010,ERR_SVR_MSG_NOT_SELF_FRIEND:20011,ERR_SVR_MSG_SHUTUP_DENY:20012,ERR_SVR_GROUP_INVALID_PARAMETERS:10004,ERR_SVR_GROUP_PERMISSION_DENY:10007,ERR_SVR_GROUP_NOT_FOUND:10010,ERR_SVR_GROUP_INVALID_GROUPID:10015,ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY:10016,ERR_SVR_GROUP_SHUTUP_DENY:10017,MSG_SEND_FAIL:2100,OVER_FREQUENCY_LIMIT:2996},Es=[Pn.MSG_ONPROGRESS_ERR,Pn.MSG_I_SELECT_F_FIRST,Pn.MSG_I_TYPES_LIMIT,Pn.MSG_F_IS_EMPTY,Pn.MSG_I_SIZE_LIMIT,Pn.MSG_F_SELECT_F_FIRST,Pn.MSG_F_SIZE_LIMIT,Pn.MSG_V_SIZE_LIMIT,Pn.MSG_V_TYPES_LIMIT,Pn.MSG_A_UPLOAD_FAIL,Pn.MSG_A_SIZE_LIMIT,Pn.COS_UNDETECTED];function Ds(e){o(this,Ds),this._n="MergerMessageHandler",this._msgM=e}function ks(e){o(this,ks),(e=ms.call(this,e))._n="UploadModule",e.TIMUploadPlugin=null,e.timUploadPlugin=null,e.COSSDK=null,e._cosUploadMethod=null,e.expiredTimeLimit=600,e.appid=0,e.bucketName="",e.ciUrl="",e.directory="",e.downloadUrl="",e.uploadUrl="",e.region="ap-shanghai",e.cos=null,e.cosOptions={secretId:"",secretKey:"",sessionToken:"",expiredTime:0},e.uploadFileType="",e.duration=900,e.tryCount=0,e.UPLOAD_SIZE_LIMIT={A:20971520,F:104857600,I:20971520,V:104857600},e.isSimpleCos=!1,e._fileDownloadProxy="",e._authKey="",e._fileDNList=ys;var t=e.getIEmitInst();return t.on(xo.A2KEY_AND_TINYID_UPDATED,e._init,f(e)),t.on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Ls(e){var t=!1;return Object.values(Ss).includes(e)&&(t=!0),120001<=e&&e<=13e4||10100<=e&&e<=10200||t}var bs,As,Rs,Os,Ns,Ps,ws=["conversationID","timePosition","timePeriod"],Gs=(r(Ys,bn),Ps=g(Ys),s(Ys,[{key:"createTextMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=ct(e.payload)?e.payload:e.payload.text,e=new Zn({text:e}),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"createImageMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));if(Z){if(Ke(i=e.payload.file))return void this.warn("FileUnsupportedInMP","createImageMessage");var o=i.tempFiles[0].path||i.tempFiles[0].tempFilePath,i={url:o,name:o.slice(o.lastIndexOf("/")+1),size:i.tempFiles&&i.tempFiles[0].size||1,type:o.slice(o.lastIndexOf(".")+1).toLowerCase()};e.payload.file=i}else ee?(i={url:(o=e.payload.file).uri,name:o.fileName,size:o.fileSize||1,type:o.type,width:o.width,height:o.height},e.payload.file=i):te&&(Ke(e.payload.file)?(o=e.payload.file,e.payload.file={files:[o]}):We(e.payload.file)&&"undefined"!=typeof uni&&(i=e.payload.file.tempFiles[0],e.payload.file={files:[i]}));return o=new ro({imageFormat:Re.UNKNOWN,uuid:this._generateUUID(e.payload.file),file:e.payload.file}),i=this._getNickAndAvatarByUserID(t),n.setElement(o),n.setNickAndAvatar(i),n.setNameCard(this._getNameCardByGroupID(n)),this._messageOptionsMap.set(n.clientSequence,e),n}},{key:"createAudioMessage",value:function(e){var t=e.payload.file,n=(Z&&(n={url:t.tempFilePath,name:t.tempFilePath.slice(t.tempFilePath.lastIndexOf("/")+1),size:t.fileSize,second:parseInt(t.duration)/1e3,type:t.tempFilePath.slice(t.tempFilePath.lastIndexOf(".")+1).toLowerCase()},e.payload.file=n),ee&&(n={url:t.uri,name:t.uri.slice(t.uri.lastIndexOf("/")+1),size:t.fileSize||1,second:Math.floor(t.duration/1e3),type:t.uri.slice(t.uri.lastIndexOf(".")+1).toLowerCase()},e.payload.file=n),this.getMyUserID()),o=(e.currentUser=n,e.senderTinyID=this.getMyTinyID(),new Co(e));return t=new uo({second:Math.floor(t.duration/1e3),size:t.fileSize||t.size||1,url:t.tempFilePath,uuid:this._generateUUID(e.payload.file)}),n=this._getNickAndAvatarByUserID(n),o.setElement(t),o.setNickAndAvatar(n),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o}},{key:"createVideoMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),e.payload.file.thumbUrl="",e.payload.file.thumbSize=0,{});if(Z){if(W)return void this.warn("VideoUnsupportedInAlipay");if(Ke(e.payload.file))return void this.warn("FileUnsupportedInMP","createVideoMessage");var o=e.payload.file;Ye(o.tempFiles)&&(o=o.tempFiles[0]),n.url=o.tempFilePath,n.name=o.tempFilePath.slice(o.tempFilePath.lastIndexOf("/")+1),n.size=o.size||1,n.second=o.duration||0,n.type=o.tempFilePath.slice(o.tempFilePath.lastIndexOf(".")+1).toLowerCase()}else ee?(o=e.payload.file,n.url=o.uri,n.name=o.fileName,n.size=o.fileSize||1,n.second=o.duration||0,n.type=o.type.split("/")[1]):te&&(Ke(e.payload.file)?(o=e.payload.file,e.payload.file.files=[o]):We(e.payload.file)&&"undefined"!=typeof uni&&(o=e.payload.file.tempFile,e.payload.file.files=[o]),o=e.payload.file,n.url=window.URL.createObjectURL(o.files[0]),n.name=o.files[0].name,n.size=o.files[0].size||1,n.second=o.files[0].duration||0,n.type=o.files[0].type.split("/")[1]);return e.payload.file.videoFile=n,o=new Co(e),n=new mo({videoFormat:n.type,videoSecond:Nt(n.second,0),videoSize:n.size,remoteVideoUrl:"",videoUrl:n.url,videoUUID:this._generateUUID(e.payload.file.videoFile),thumbUUID:this._generateUUID(e.payload.file.videoFile),thumbWidth:e.payload.file.width||200,thumbHeight:e.payload.file.height||200,thumbUrl:e.payload.file.thumbUrl,thumbSize:e.payload.file.thumbSize,thumbFormat:e.payload.file.thumbUrl.slice(e.payload.file.thumbUrl.lastIndexOf(".")+1).toLowerCase()}),t=this._getNickAndAvatarByUserID(t),o.setElement(n),o.setNickAndAvatar(t),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o}},{key:"createCustomMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=new _o({data:e.payload.data,description:e.payload.description,extension:e.payload.extension}),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"createFaceMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=new co(e.payload),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"createMergerMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),t=this._getNickAndAvatarByUserID(t),new Co(e));return e=new Io(e.payload),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n.setRelayFlag(!0),n}},{key:"createForwardMessage",value:function(e){var t,n,o=e.to,i=e.conversationType,s=e.priority,a=e.payload,r=e.needReadReceipt,c=e.receiverList;return Ye(a._elements)?(t=this.getMyUserID(),n=this._getNickAndAvatarByUserID(t),a.type===E.MSG_GRP_TIP?yn({code:Pn.MSG_FORWARD_TYPE_INVALID}):(i={to:o,conversationType:i,conversationID:"".concat(i).concat(o),priority:s,isPlaceMessage:0,status:Mn,currentUser:t,senderTinyID:this.getMyTinyID(),cloudCustomData:e.cloudCustomData||a.cloudCustomData||"",needReadReceipt:r,receiverList:c,isSupportExtension:e.isSupportExtension||!1},(o=new Co(i)).setElement(a._elements[0]),o.setNickAndAvatar(n),o.setNameCard(this._getNameCardByGroupID(a)),o.setRelayFlag(!0),o)):yn({code:Pn.MSG_FORWARD_INVALID_ELEMENTS})}},{key:"downloadMergerMessage",value:function(e){return this._mergerMessageHandler.downloadMergerMessage(e)}},{key:"createFileMessage",value:function(e){if(Z){if(!B&&!K&&!z)return;var n=ne.getSystemInfoSync().SDKVersion;if(B&&bt(n,"2.5.0")<0)return void this.warn("WXChooseMessageFile");if(K&&bt(n,"1.18.0")<0)return void this.warn("QQChooseMessageFile")}te||z?Ke(e.payload.file)?(n=e.payload.file,e.payload.file={files:[n]}):We(e.payload.file)&&"undefined"!=typeof uni&&(i=(n=e.payload.file).tempFiles,n=n.files,o=null,Ye(i)?o=i[0]:Ye(n)&&(o=n[0]),e.payload.file={files:[o]}):B||K?(n=t(t({},(i=e.payload.file.tempFiles)[0]),{},{url:i[0].path}),e.payload.file={files:[n]}):ee&&(i=t(t({},o=e.payload.file),{},{url:o.uri}),e.payload.file={files:[i]}),n=this.getMyUserID();var o=(e.currentUser=n,e.senderTinyID=this.getMyTinyID(),new Co(e)),i=new go({uuid:this._generateUUID(e.payload.file),file:e.payload.file});return n=this._getNickAndAvatarByUserID(n),o.setElement(i),o.setNickAndAvatar(n),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o}},{key:"createLocationMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=new vo(e.payload),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"_onNoModule",value:function(){return yn({code:Pn.NO_MODULE})}},{key:"sendMessageInstance",value:function(e,t){var n=this;if(!1===this.get(29).filterMessage(e,t))return e.hasRiskContent=!0,this._onSendMessageFailed(e,new Nn({code:Pn.PROFANITY_FOUND}));var o,i,s,a,r=null;if(e.conversationType===E.CONV_C2C)r=this.get(6);else{if(e.conversationType!==E.CONV_GROUP)return yn({code:Pn.MSG_INVALID_CONV_TYPE});r=this.get(7)}return r?(i="".concat(this._n,".sendMessageInstance"),s=this.get(11),a=r.isOnlineMessage(e,t),this.get(17).upload(e).then((function(){return n._getSendMessageSpecifiedKey(e)===Bn&&n.get(26).addSuccessCount(Hn),n._guardForGroup(e).then((function(){if(!e.isSendable())return yn({code:Pn.MSG_F_URL_IS_EMPTY});n._addSendMessageTotalCount(e),o=Date.now();var i=function(e){var t="utf-8";te&&document&&(t=document.charset.toLowerCase());var n,o=0,i=e.length;if("utf-8"===t||"utf8"===t)for(var s=0;s<i;s++)(n=e.codePointAt(s))<=127?o+=1:n<=2047?o+=2:n<=65535?o+=3:(o+=4,s++);else if("utf-16"===t||"utf16"===t)for(var a=0;a<i;a++)(n=e.codePointAt(a))<=65535?o+=2:(o+=4,a++);else o=e.replace(/[^\x00-\xff]/g,"aa").length;return o}(JSON.stringify(e));return e.type===E.MSG_MERGER&&11264<i?n._mergerMessageHandler.uploadMergerMessage(e,i).then((function(o){return o=n._mergerMessageHandler.createMergerMessagePack(e,t,o),n.req(o)})):(s.setMessageRandom(e),r.sendMessage(e,t))})).then((function(r){var c=(r=r.data).time,u=r.sequence,l=r.readReceiptCode;return r=r.messageDropReason,je(l)&&0!==l&&(new Jn("sendMessageWithReceipt").setMessage("from:".concat(e.from," to:").concat(e.to," sequence:").concat(u," readReceiptCode:").concat(l)).end(),Ae.w("".concat(i," readReceiptCode:").concat(l," message:").concat(n.getErrMsg(l)))),r&&(l=new Jn("messageDropReason"),r="from:".concat(e.from," to:").concat(e.to," sequence:").concat(u," messageDropReason:").concat(r),l.setMessage(r).end(),Ae.w("".concat(i," ").concat(r))),n._addSendMessageSuccessCount(e,o),n._messageOptionsMap.delete(e.clientSequence),!0===e.isResend&&(l=s.findMessage(e.ID))&&(Ae.l("".concat(i," resend ok. ID:").concat(l.ID)),s.deleteLocalMessage(l)),e.status=Cn,e.time=c,r=!1,e.conversationType===E.CONV_GROUP?e.sequence=u:e.conversationType===E.CONV_C2C&&(l=s.getLatestMessageSentByMe(e.conversationID))&&(c=l.nick,u=l.avatar,c===e.nick&&u===e.avatar||(r=!0)),r&&s.modifyMessageSentByMe({conversationID:e.conversationID,latestNick:e.nick,latestAvatar:e.avatar}),!0===a?e._onlineOnlyFlag=!0:(s.appendToMessageList(e),l=e,We(t)&&We(t.messageControlInfo)&&(!0===t.messageControlInfo.excludedFromLastMessage&&(e._isExcludedFromLastMessage=!0,l=""),!0===t.messageControlInfo.excludedFromUnreadCount)&&(e._isExcludedFromUnreadCount=!0),c=e.conversationType,Mt(e.to)&&(c=E.CONV_TOPIC,n.get(10).onMessageSent({groupID:Gt(e.to),topicID:e.to,lastMessage:l})),s.onMessageSent({conversationOptionsList:[{conversationID:e.conversationID,unreadCount:0,type:c,subType:e.conversationSubType,lastMessage:l}]})),e._relayFlag||"TIMImageElem"!==e.type||Rt(e.payload.imageInfoArray),mn({message:e})}))})).catch((function(t){return n._onSendMessageFailed(e,t,a)}))):this._onNoModule()}},{key:"_guardForGroup",value:function(e){if(e.conversationType!==E.CONV_GROUP)return Promise.resolve();var t=this.get(7);if(!t)return this._onNoModule();if(It({groupID:e.to})){var n=t.getLocalGroupProfile(e.to);if(n&&n.isSupportTopic)return yn({code:Pn.MSG_SEND_GRP_WITH_TOPIC_FAIL})}return t.guardForAVChatRoom(e)}},{key:"_onSendMessageFailed",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o="".concat(this._n,"._onSendMessageFailed"),i=(e.status=Tn,80001!==t.code&&80004!==t.code||(e.hasRiskContent=!0),this.get(11)),s=(i.deleteMessageRandom(e),10100<=t.code&&t.code<=10200||120001<=t.code&&t.code<=13e4);return n||s||!0===i.appendToMessageList(e)&&Ae.l("".concat(o," message stored, ID:").concat(e.ID)),this._addSendMessageFailCountOnUser(e,t),n=new Jn("sendMessage"),s="head.seq:".concat(t.data.headSeq," type:").concat(e.type," from:").concat(e.from," to:").concat(e.to),te&&("connection"in navigator&&(i=navigator.connection,s+=" downlink:".concat(i.downlink," effectiveType:").concat(i.effectiveType," rtt:").concat(i.rtt)),"memory"in window.performance)&&(i=window.performance.memory,s+=" usedJSHeapSize:".concat(i.usedJSHeapSize," totalJSHeapSize:").concat(i.totalJSHeapSize," jsHeapSizeLimit:").concat(i.jsHeapSizeLimit)),n.setMessage(s).setError(t).end(),Ae.e("".concat(o," ").concat(s," error:"),t),yn(new Nn({code:t&&t.code?t.code:Pn.MSG_SEND_FAIL,message:t&&t.message?t.message:void 0,data:{message:e}}))}},{key:"_getSendMessageSpecifiedKey",value:function(e){if([E.MSG_IMAGE,E.MSG_AUDIO,E.MSG_VIDEO,E.MSG_FILE].includes(e.type))return Bn;if(e.conversationType===E.CONV_C2C)return Fn;if(e.conversationType===E.CONV_GROUP){var t=this.get(7);if(t&&(t=t.getLocalGroupProfile(e.to)))return yt(e=t.type)?Vn:qn}}},{key:"_addSendMessageTotalCount",value:function(e){(e=this._getSendMessageSpecifiedKey(e))&&this.get(26).addTotalCount(e)}},{key:"_addSendMessageSuccessCount",value:function(e,t){var n;(e=this._getSendMessageSpecifiedKey(e))&&((n=this.get(26)).addSuccessCount(e),n.addCost(e,Kt(t,!1)))}},{key:"_addSendMessageFailCountOnUser",value:function(e,t){t=void 0===(t=t.code)?-1:t;var n,o=this.get(26);(e=this._getSendMessageSpecifiedKey(e))===Bn&&(n=!1,n=!!Es.includes(t)||n)?o.addFailedCountOfUserSide(Hn):Ls(t)&&e&&o.addFailedCountOfUserSide(e)}},{key:"resendMessage",value:function(e,t){return e.isResend=!0,e.status=Mn,this.sendMessageInstance(e,t)}},{key:"revokeMessage",value:function(e){var t,n,o=this,i=null;return e.conversationType===E.CONV_C2C?i=this.get(6):e.conversationType===E.CONV_GROUP&&(i=this.get(7)),i?((t=new Jn("revokeMessage")).setMessage("type:".concat(e.type," from:").concat(e.from," to:").concat(e.to)),n="".concat(this._n,".").concat("revokeMessage"),i.revokeMessage(e).then((function(i){return Ve(i=i.data.recallRetList)||0===i[0].retCode?(Ae.i("".concat(n," ok. ID:").concat(e.ID)),e.isRevoked=!0,t.end(),o.get(11).onMessageRevoked([e]),mn({message:e})):(i=new Nn({code:i[0].retCode,data:{message:e}}),t.setCode(i.code).setMoreMessage(i.message).end(),yn(i))})).catch((function(o){t.setError(o).end();var i=new Nn({code:o&&o.code?o.code:Pn.MSG_REVOKE_FAIL,message:o&&o.message?o.message:void 0,data:{message:e}});return Ae.w("".concat(n," failed. error:"),o),yn(i)}))):this._onNoModule()}},{key:"deleteMessage",value:function(e){var t=this,n=null,o=e[0],i=o.conversationID,s="",a=[],r=[];if(o.conversationType===E.CONV_C2C)n=this.get(6),s=i.replace(E.CONV_C2C,""),e.forEach((function(e){e&&e.status===Cn&&e.conversationID===i&&(e._onlineOnlyFlag||a.push("".concat(e.sequence,"_").concat(e.random,"_").concat(e.time)),r.push(e))}));else if(o.conversationType===E.CONV_GROUP)n=this.get(7),s=i.replace(E.CONV_GROUP,""),e.forEach((function(e){e&&e.status===Cn&&e.conversationID===i&&(e._onlineOnlyFlag||a.push("".concat(e.sequence)),r.push(e))}));else if(o.conversationType===E.CONV_SYSTEM)return yn({code:Pn.CANNOT_DELETE_GRP_SYSTEM_NOTICE});if(!n)return this._onNoModule();if(0===a.length)return this._onMessageDeleted(r);30<a.length&&(a=a.slice(0,30),r=r.slice(0,30));var c=new Jn("deleteMessage"),u=(c.setMessage("to:".concat(s," count:").concat(a.length)),"".concat(this._n,".").concat("deleteMessage"));return n.deleteMessage({to:s,keyList:a}).then((function(e){return c.end(),Ae.i("".concat(u," ok")),t._onMessageDeleted(r)})).catch((function(e){return c.setError(e).end(),Ae.w("".concat(u," failed. error:"),e),yn(e=new Nn({code:e&&e.code?e.code:Pn.MSG_DELETE_FAIL,message:e&&e.message?e.message:void 0}))}))}},{key:"_onMessageDeleted",value:function(e){return this.get(11).onMessageDeleted(e),vn({messageList:e})}},{key:"translateText",value:function(e){var n="".concat(this._n,".").concat("translateText"),o=e.sourceTextList,i=e.sourceLanguage,s=(e=e.targetLanguage,new Jn("translateText"));return s.setMessage("sourceLanguage:".concat(i," targetLanguage:").concat(e)),this.req({P:Gn.TRANSLATE_TEXT,data:{sourceTextList:o,source:i||"auto",target:e,from:this.getMyTinyID(),SDKAppID:this.getSDKAppID()}}).then((function(e){var o=(e=e.data).error,i=e.requestID;if(e=e.translatedTextList,0===o.code)return s.end(),Ae.i("".concat(n," ok. requestID:").concat(i)),mn({translatedTextList:e});throw t(t({},o),{},{requestID:i})})).catch((function(e){return s.setCode(e.code).setMoreMessage(e.requestID).end(),Ae.w("".concat(n," failed. error:"),e),yn({code:Pn.TRANSLATE_TEXT_FAIL})}))}},{key:"convertVoiceToText",value:function(e){var n,o,i,s=e.message,a=(e=e.language,s.payload.url);return(s.from===this.getMyUserID()&&"out"===s.flow&&(a=s.payload.remoteAudioUrl),s=/\.(wav|pcm|ogg-opus|speex|silk|mp3|m4a|aac|amr)/).test(a)?(s=s.exec(a)[1]||"mp3",n="16k_zh-PY",e?"zh (cmn-Hans-CN)"===e?n="16k_zh":"en-US"===e?n="16k_en":"yue-Hant-HK"===e?n="16k_yue":"ja-JP"===e&&(n="16k_ja"):n="16k_zh-PY",e="serviceType:".concat(n," url:").concat(a),o="".concat(this._n,".").concat("convertVoiceToText"),Ae.i("".concat(o," ").concat(e)),(i=new Jn("convertVoiceToText")).setMessage(e),this.req({P:Gn.VOICE_TO_TEXT,data:{url:a,language:n,SDKAppID:this.getSDKAppID(),format:s}}).then((function(e){var n=(e=e.data).error,s=e.requestID;if(e=e.result,0===n.code)return i.end(),Ae.i("".concat(o," ok. requestID:").concat(s)),mn({result:e});throw t(t({},n),{},{requestID:s})})).catch((function(e){return i.setCode(e.code).setMoreMessage(e.requestID||"").end(),Ae.w("".concat(o," failed. error:"),e),yn({code:Pn.VOICE_TO_TEXT_FAIL})}))):yn({code:Pn.UNSUPPORTED_VOICE_FORMAT})}},{key:"modifyRemoteMessage",value:function(e){var t=this,n=null,o=e.conversationType,i=e.to,s=this.get(7);if(!s)return this._onNoModule();if(s.isMessageFromOrToAVChatroom(i))return yn({code:Pn.MSG_MODIFY_DISABLED_IN_AV,data:{message:e}});if(!1===this.get(29).filterMessage(e))return e.hasRiskContent=!0,yn({code:Pn.PROFANITY_FOUND,data:{message:e}});o===E.CONV_C2C?n=this.get(6):o===E.CONV_GROUP&&(n=this.get(7));var a=new Jn("modifyMessage"),r=(a.setMessage("to:".concat(i)),"".concat(this._n,".modifyRemoteMessage"));return n.modifyRemoteMessage(e).then((function(n){return a.end(),Ae.i("".concat(r," ok")),mn({message:n=t._onModifyRemoteMessageResp(e,n.data)})})).catch((function(n){var o;return a.setCode(n.code).setMoreMessage(n.message).end(),Ae.w("".concat(r," failed. error:"),n),20027===n.code?(o=t._onModifyRemoteMessageResp(e,n.data),yn({code:Pn.MSG_MODIFY_CONFLICT,data:{message:o}})):yn({code:n.code,message:n.message,data:{message:e}})}))}},{key:"_generateSearchdata",value:function(e){var t=e.conversationID,n=e.timePosition,o=e.timePeriod;return e=h(e,ws),ut(t)||(Ct(t)&&(e.account=t.replace(E.CONV_C2C,"")),Tt(t)&&(e.groupID=t.replace(E.CONV_GROUP,""))),je(o)&&0<o&&(je(n)&&0<n?e.startTime=n-o:e.startTime=Te()-o),e.startTime&&e.startTime<0&&(e.startTime=void 0),je(n)&&0<n&&(e.endTime=n),e}},{key:"searchCloudMessages",value:function(e){var t=this,n="searchCloudMessages",o="".concat(this._n,".").concat(n);if(!e)return yn({code:Pn.OPTIONS_IS_EMPTY,message:this.getErrMsg(Pn.OPTIONS_IS_EMPTY,n)});var i,s,a,r=e.keywordList,c=e.keywordListMatchType,u=e.conversationID,l=e.cursor,d=Ye(e.senderUserIDList)&&0<e.senderUserIDList.length,p=Ye(e.messageTypeList)&&0<e.messageTypeList.length;if(r||d||p)return i=Date.now(),s=new Jn(n),a="keywordList:".concat(r," keywordListMatchType:").concat(c," ")+"convID:".concat(u," cursor:").concat(l),Ae.l("".concat(o," ").concat(a)),this.req({P:Gn.MSG_CLOUD_SEARCH,data:this._generateSearchdata(e)}).then((function(n){var r=(c=n.data).code,c=c.message;if(0!==r)return c=t.getErrMsg(60020===r?"SearchCloudMessagesUnavailable":r)||c,r=new Nn({code:r,message:c}),s.setMessage(a).setError(r).end(),yn(r);t.get(27).isSearchCloudMessagesEnabled(),r=(c=n.data).cursor,n=c.totalCount,c=c.searchResult;var u="totalCount:".concat(n," cost:").concat(Kt(i));return mn({searchResultList:(Ae.l("".concat(o," ok. cursor:").concat(r," ").concat(u)),s.setMessage("".concat(a," ").concat(u)).end(),u=t._handleSearchResults(c,!e.conversationID)),cursor:r,totalCount:n})})).catch((function(e){return s.setMessage(a).setError(e).end(),yn(e)}));throw Ae.e("[".concat(n,'] Missing required params: "keywordList".')),new Error("Params validate failed.")}},{key:"_handleSearchResults",value:function(e,t){var n=this.get(11);return Ye(e)&&0!==e.length?e.map((function(e){var o=e.groupID,i=e.userID,s=e.messageCount,a=(e=void 0===(e=e.messageList)?[]:e,{conversationID:i=o?"".concat(E.CONV_GROUP).concat(o):"".concat(E.CONV_C2C).concat(i),messageCount:s,messageList:[]});return t&&1<s||0<(s=e.filter((function(e){return!!e}))).length&&(e=n.onRoamingMessage(s,i,!1),o&&e.reverse(),a.messageList=e,a.messageCount=e.length),a})):[]}},{key:"_onModifyRemoteMessageResp",value:function(e,t){Ae.d("".concat(this._n,"._onModifyRemoteMessageResp options:"),t);var n=e.conversationType,o=e.from,i=e.to,s=e.random,a=e.sequence,r=(e=e.time,t.elements),c=t.messageVersion;return t=void 0===(t=t.cloudCustomData)?"":t,this.get(11).onMessageModified({conversationType:n,from:o,to:i,time:e,random:s,sequence:a,elements:r,cloudCustomData:t,messageVersion:c})}},{key:"_generateUUID",value:function(e){var t=this.get(12);return t="".concat(t.getSDKAppID(),"-").concat(t.getUserID(),"-").concat(ot()),(e=(e=e.name||e.value||e.url||e.tempFilePath)&&e.slice(e.lastIndexOf(".")+1))?"".concat(t,".").concat(e):t}},{key:"getMessageOption",value:function(e){return this._messageOptionsMap.get(e)}},{key:"_getNickAndAvatarByUserID",value:function(e){return this.get(4).getNickAndAvatarByUserID(e)}},{key:"_getNameCardByGroupID",value:function(e){if(e.conversationType===E.CONV_GROUP){var t=this.get(7);if(t)return t.getMyNameCardByGroupID(e.to)}return""}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._messageOptionsMap.clear()}}]),Ys),Us=(r(Ws,bn),Ns=g(Ws),s(Ws,[{key:"onMsgExtNotify",value:function(e){var t=this,n=(e=e.dataList).messageInfo,o=e.operateType,i=e.operateResultList,s=e.tinyID,a=(e=e.globalSequence,n.clientTime),r=(n=n.random,"".concat(s,"-").concat(a,"-").concat(n)),c=[],u=[],l=(Ae.l("".concat(this._n,".onMsgExtNotify messageID:").concat(r," operateType:").concat(o," globalSequence:").concat(e)),this._updateGlobalSeq(r,e),!1),d=!1;i.forEach((function(e){var n=void 0===(n=e.extensions)?[]:n,i=e.clearSequence;1===o?(l=!0,n.forEach((function(e){c.push({key:e.key,value:e.value})})),t._updateLocalExt(r,n)):2===o?(d=!0,n.forEach((function(e){u.push(e.key)})),t._updateLocalExt(r,n)):3===o&&(d=!0,t._hasLocalExt(r)&&t._getLocalExt(r).forEach((function(e,t){e.seq<=i&&!Ve(e.value)&&u.push(t)})),t._clearLocalExt(r,i))})),l&&this.emitOEvt(S.MESSAGE_EXTENSIONS_UPDATED,{messageID:r,extensions:c}),d&&this.emitOEvt(S.MESSAGE_EXTENSIONS_DELETED,{messageID:r,keyList:u})}},{key:"setMessageExtensions",value:function(e,t){var n,o,i,s,a,r,c,u="setMessageExtensions";return this.canIUse(w.MSG_EXT)?(n="".concat(this._n,".").concat(u),o=e.ID,i=e.conversationID,s=e.sequence,a=e.time,r=m(t),20<t.length&&(r=t.slice(0,20),Ae.w("".concat(n,". the length of extensions cannot exceed 20."))),t="convID:".concat(i," messageID:").concat(o," sequence:").concat(s," time:").concat(a," count:").concat(r.length),(c=new Jn(u)).setMessage(t),Ae.l("".concat(n," ").concat(t)),this._modifyMsgExts(e,r).then((function(e){var t=e.resultList,o=e.successCount;return e=e.failureCount,o="successCount:".concat(o," failCount:").concat(e),c.setMoreMessage(o).end(),Ae.l("".concat(n," ok. ").concat(o)),mn({extensions:t})})).catch((function(e){return c.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"getMessageExtensions",value:function(e){var t,n,o,i,s,a,r,c=this,u="getMessageExtensions";return this.canIUse(w.MSG_EXT)?(t="".concat(this._n,".").concat(u),n=e.ID,s=e.conversationID,o=e.sequence,i=e.time,s="convID:".concat(s," messageID:").concat(n," sequence:").concat(o," time:").concat(i),(a=new Jn(u)).setMessage(s),r=void Ae.l("".concat(t," ").concat(s)),this.getMsgExtsMap.has(n)&&(r=this._getGlobalSeq(n)),this._getMsgExts(e,r).then((function(e){return a.end(),Ae.l("".concat(t," ok. extCount:").concat(e.length)),ut(r)&&0<e.length&&c.getMsgExtsMap.set(n,1),mn({extensions:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"deleteMessageExtensions",value:function(e,t){var n,o,i,s,a,r,c,u="deleteMessageExtensions";return this.canIUse(w.MSG_EXT)?(n="".concat(this._n,".").concat(u),o=[],i=3,Ve(t)||(i=2,t.forEach((function(e){o.push({key:e,value:"",seq:0})}))),t=e.ID,r=e.conversationID,s=e.sequence,a=e.time,r="convID:".concat(r," messageID:").concat(t," sequence:").concat(s," time:").concat(a," operateType:").concat(i),(c=new Jn(u)).setMessage(r),Ae.l("".concat(n," ").concat(r)),this._modifyMsgExts(e,o,i).then((function(e){var t=e.resultList,o=e.successCount,s=(e=e.failureCount,"");return 2===i&&(s="success count:".concat(o," fail count:").concat(e)),c.setMoreMessage("".concat(s)).end(),Ae.l("".concat(n," ok. ").concat(s)),mn({extensions:t})})).catch((function(e){return c.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"_modifyMsgExts",value:function(e,t){var n=this,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=Mt(e.to)?E.CONV_TOPIC:e.conversationType,s=void 0,a=(3!==o&&(s=this._getReqExts(e,t)),null);switch(i){case E.CONV_C2C:a=this.get(6);break;case E.CONV_GROUP:a=this.get(7);break;case E.CONV_TOPIC:a=this.get(10);break;default:return yn({code:Pn.NO_MODULE})}return a.modifyMsgExts(e,s,o).then((function(t){var o=(t=t.data).extensions,i=(t=t.seq,[]),s=0,a=0,r=[];return(o=Ve(o)?[]:o).forEach((function(e){var t=e.errorCode,n=(e=e.extension).key,o=e.value;e=e.seq,i.push({code:t,key:n,value:o}),0===t?s++:a++,r.push({key:n,value:o,seq:e})})),n._updateGlobalSeq(e.ID,t),0<r.length&&(n._updateLocalExt(e.ID,r),r=null),{resultList:i,successCount:s,failureCount:a}})).catch((function(e){return yn(e)}))}},{key:"_getReqExts",value:function(e,t){var n,o=[];return this._hasLocalExt(e.ID)?(n=this._getLocalExt(e.ID),t.forEach((function(e){var t=e.key,i=(e=e.value,0);n.has(t)&&(i=n.get(t).seq),o.push({key:t,value:e,seq:i})}))):t.forEach((function(e){var t=e.key;e=e.value,o.push({key:t,value:e,seq:0})})),o}},{key:"_getMsgExts",value:function(e,t){var n=this,o="".concat(this._n,"._getMsgExts"),i=e.ID,s=null;switch(Mt(e.to)?E.CONV_TOPIC:e.conversationType){case E.CONV_C2C:s=this.get(6);break;case E.CONV_GROUP:s=this.get(7);break;case E.CONV_TOPIC:s=this.get(10);break;default:return yn({code:Pn.NO_MODULE})}return s.getMessageExtensions(e,t).then((function(t){var s=(t=t.data).extensions,a=t.completeFlag,r=t.globalSequence;return t=t.clearSequence,s=Ve(s)?[]:s,Ae.l("".concat(o," ok. completeFlag:").concat(a," globalSequence:").concat(r," clearSequence:").concat(t," count:").concat(s.length)),n._updateLocalExt(i,s),n._clearLocalExt(i,t),n._updateGlobalSeq(i,r),1!==a?(t=s.slice(-1)[0].seq+1,n._getMsgExts(e,t)):n._getLocalExtList(i)})).catch((function(e){return yn(e)}))}},{key:"_hasLocalExt",value:function(e){return this.msgExtMap.has(e)}},{key:"_getLocalExt",value:function(e){return this.msgExtMap.get(e)}},{key:"_updateLocalExt",value:function(e,t){this._hasLocalExt(e)||this.msgExtMap.set(e,new Map);var n=this._getLocalExt(e);t.forEach((function(e){var t=e.key,o=e.value;e=e.seq,n.set(t,{value:void 0===o?"":o,seq:e})}))}},{key:"_clearLocalExt",value:function(e,t){var n;t<=0||!this._hasLocalExt(e)||(n=this._getLocalExt(e)).forEach((function(e,o){e.seq<=t&&n.delete(o)}))}},{key:"_getLocalExtList",value:function(e){var t=[];return this._hasLocalExt(e)&&this._getLocalExt(e).forEach((function(e,n){Ve(e=e.value)||t.push({key:n,value:e})})),t}},{key:"_getGlobalSeq",value:function(e){return this.globalSeqMap.get(e)}},{key:"_updateGlobalSeq",value:function(e,t){this.globalSeqMap.set(e,t)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this.msgExtMap.clear(),this.globalSeqMap.clear(),this.getMsgExtsMap.clear()}}]),Ws),xs=(r($s,bn),Os=g($s),s($s,[{key:"onReactionNotifyList",value:function(e){var n=this;(void 0===(e=(e||{}).dataList)?[]:e).forEach((function(e){var o=e.C2CMessageInfo,i=void 0===(i=e.groupMessageInfo)?{}:i,s=(e=void 0===(e=e.reactionList)?[]:e,i=(o=t(t({},void 0===o?{}:o),i)).tinyID,o.clientTime),a=(o=o.random,i="".concat(i,"-").concat(s,"-").concat(o),[]);e.forEach((function(e){ut(e.userIDList)&&(e.userIDList=[],e.count=0),a.push.apply(a,m(e.userIDList))})),Ae.l("".concat(n._n,".onReactionNotifyList messageID:").concat(i," reactionList:").concat(e.length)),n._handleReactionSummary([{messageID:i,reactionList:e}],a).then((function(e){n.emitOEvt(S.MESSAGE_REACTIONS_UPDATED,t({},e[0]))}))}))}},{key:"onReactionNotify",value:function(e){var n=(e=e.dataList||{}).C2CMessageInfo,o=void 0===(o=e.groupMessageInfo)?{}:o,i=e.reactionID,s=(e=e.operateType,o=(n=t(t({},void 0===n?{}:n),o)).tinyID,n.clientTime);n=n.random,o="".concat(o,"-").concat(s,"-").concat(n),Ae.l("".concat(this._n,".onReactionNotify messageID:").concat(o," reactionID:").concat(i," operateType:").concat(e)),1===e?this._addReactedByMyselfMap(o,i):this._removeReactedByMyselfMap(o,i),s="".concat(o,"-").concat(i),this._reactionInfoMap.has(s)&&((n=this._reactionInfoMap.get(s)).reactedByMyself=1===e,this.emitOEvt(S.MESSAGE_REACTIONS_UPDATED,{messageID:o,reactionList:[n]}))}},{key:"addMessageReaction",value:function(e,t){var n,o,i,s,a=this,r="addMessageReaction";return this.canIUse(w.MSG_REACTION)?(n="".concat(this._n,".").concat(r),s=e.ID,o=e.conversationID,o="convID:".concat(o," messageID:").concat(s," reactionID:").concat(t),(i=new Jn(r)).setMessage(o),Ae.l("".concat(n," ").concat(o)),s=this._createReactionOperationPack(e,t,1),this._addReactedByMyselfMap(e.ID,t),this.req(s).then((function(){return i.end(),Ae.l("".concat(n," ok.")),mn()})).catch((function(o){return a._removeReactedByMyselfMap(e.ID,t),i.setError(o).end(),Ae.e("".concat(n," failed. error:"),o),yn(o)}))):this.noUse(r)}},{key:"removeMessageReaction",value:function(e,t){var n,o,i,s,a="removeMessageReaction";return this.canIUse(w.MSG_REACTION)?(n="".concat(this._n,".").concat(a),s=e.ID,o=e.conversationID,o="convID:".concat(o," messageID:").concat(s," reactionID:").concat(t),(i=new Jn(a)).setMessage(o),Ae.l("".concat(n," ").concat(o)),s=this._createReactionOperationPack(e,t,2),this._removeReactedByMyselfMap(e.ID,t),this.req(s).then((function(){return i.end(),Ae.l("".concat(n," ok.")),mn()})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(a)}},{key:"getMessageReactions",value:function(e){var n,o,i,s,a,r,c=this,u="getMessageReactions";return this.canIUse(w.MSG_REACTION)?(n="".concat(this._n,".").concat(u),o=e.messageList,r=e.maxUserCountPerReaction,i=o[0].conversationID,i="convID:".concat(i," maxUserCountPerReaction:").concat(r," msgCount:").concat(o.length),(s=new Jn(u)).setMessage(i),Ae.l("".concat(n," ").concat(i)),a=new Map,r=this._createReactionSummaryPack(t(t({},e),{},{messageIDMap:a})),this.req(r).then((function(e){e=e.data.resultList;var t=[],n=[];return(void 0===e?[]:e).forEach((function(e){var o=void 0===(o=e.messageKey)?void 0:o,i=void 0===(i=e.messageSequence)?void 0:i;e=void 0===(e=e.reactionList)?[]:e,i=ut(o)?a.get(i):a.get(o),t.push({messageID:i,reactionList:e}),e.forEach((function(e){n.push.apply(n,m(e.userIDList))}))})),c._handleReactionSummary(t,n)})).then((function(e){return s.end(),Ae.l("".concat(n," ok.")),a.clear(),mn({resultList:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"getAllUserListOfMessageReaction",value:function(e){var t,n,o,i,s,a,r,c,u=this,l="getAllUserListOfMessageReaction";return this.canIUse(w.MSG_REACTION)?(t="".concat(this._n,".").concat(l),s=e.message,n=e.reactionID,o=e.nextSeq,i=e.count,c=s.ID,s=s.conversationID,s="convID:".concat(s," messageID:").concat(c," reactionID:").concat(n," nextSeq:").concat(o," count:").concat(i),(a=new Jn(l)).setMessage(s),Ae.l("".concat(t," ").concat(s)),r={userList:[],nextSeq:0,isCompleted:!1},c=this._createReactionUserListPack(e),this.req(c).then((function(e){var t=void 0===(t=(e=e.data).userIDList)?[]:t;return e=void 0===(e=e.nextSeq)?0:e,r.nextSeq=e,r.isCompleted=0===e,u.get(4).getUserNickAndAvatar(t)})).then((function(e){return r.userList=e,a.end(),Ae.l("".concat(t," ok.")),mn(r)})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse(l)}},{key:"_createReactionOperationPack",value:function(e,t,n){var o,i,s=void 0;return t={reactionID:t,userIDList:[this.getMyUserID()]},e.conversationType===E.CONV_C2C&&(o=this.get(6),s=1===n?Gn.ADD_C2C_MSG_REACTION:Gn.RM_C2C_MSG_REACTION,t.from=e.from,t.to=e.to,t.messageKey=o.getMessageKey(e)),e.conversationType===E.CONV_GROUP&&(o=void 0,i=e.to,Mt(e.to)&&(i=Gt(o=e.to)),s=1===n?Gn.ADD_GRP_MSG_REACTION:Gn.RM_GRP_MSG_REACTION,t.groupID=i,t.topicID=o,t.messageSequence=e.sequence),{P:s,data:t}}},{key:"_createReactionSummaryPack",value:function(e){var t,n,o,i=e.messageList,s=void 0===(s=e.maxUserCountPerReaction)?10:s,a=e.messageIDMap,r=void 0,c=void 0;return(e=i[0]).conversationType===E.CONV_C2C&&(t=this.get(6),n=i.map((function(e){var n=t.getMessageKey(e);return a.set(n,e.ID),n})),r=Gn.GET_C2C_MSG_REACTIONS,c={from:e.from,to:e.to,messageKeyList:n,count:s}),e.conversationType===E.CONV_GROUP&&(n=void 0,o=e.to,Mt(e.to)&&(o=Gt(n=e.to)),e=i.map((function(e){return a.set(e.sequence,e.ID),e.sequence})),r=Gn.GET_GRP_MSG_REACTIONS,c={groupID:o,topicID:n,messageSequenceList:e,count:s}),{P:r,data:c}}},{key:"_createReactionUserListPack",value:function(e){var t=e.message,n=e.reactionID,o=e.nextSeq,i=void 0;return n={reactionID:n,nextSeq:void 0===o?0:o,count:100<(e=void 0===(e=e.count)?100:e)?100:e},t.conversationType===E.CONV_C2C&&(o=this.get(6),i=Gn.GET_C2C_MSG_REACTION_USER_LIST,n.from=t.from,n.to=t.to,n.messageKey=o.getMessageKey(t)),t.conversationType===E.CONV_GROUP&&(e=void 0,o=t.to,Mt(t.to)&&(o=Gt(e=t.to)),i=Gn.GET_GRP_MSG_REACTION_USER_LIST,n.groupID=o,n.topicID=e,n.messageSequence=t.sequence),{P:i,data:n}}},{key:"_handleReactionSummary",value:function(e,t){var n=this;return this.get(4).getUserNickAndAvatar(t).then((function(t){var o=[];return e.forEach((function(e){var i=[];e.reactionList.forEach((function(o){var s=o.reactionID,a=o.count,r=o.userIDList,c=(o=void 0===(o=o.reactedByMyself)?void 0:o,[]);r.forEach((function(e){t.forEach((function(t){e===t.userID&&c.push(t)}))})),r={reactionID:s,totalUserCount:a,partialUserList:c,reactedByMyself:n._computeReactedByMyself({reactedByMyself:o,messageID:e.messageID,reactionID:s})},i.push(r),ut(o)&&!n._reactedByMyselfMap.has(e.messageID)&&(a="".concat(e.messageID,"-").concat(s),n._reactionInfoMap.set(a,r))})),o.push({messageID:e.messageID,reactionList:i})})),o}))}},{key:"_addReactedByMyselfMap",value:function(e,t){this._reactedByMyselfMap.has(e)||this._reactedByMyselfMap.set(e,[]),-1===(e=this._reactedByMyselfMap.get(e)).indexOf(t)&&e.push(t)}},{key:"_removeReactedByMyselfMap",value:function(e,t){this._reactedByMyselfMap.has(e)&&-1<(t=(e=this._reactedByMyselfMap.get(e)).indexOf(t))&&e.splice(t,1)}},{key:"_computeReactedByMyself",value:function(e){var t=e.reactedByMyself,n=e.messageID;return e=e.reactionID,ut(t)?!!this._reactedByMyselfMap.has(n)&&this._reactedByMyselfMap.get(n).includes(e):1===t}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._reactedByMyselfMap.clear(),this._reactionInfoMap.clear()}}]),$s),Fs=(r(js,bn),Rs=g(js),s(js,[{key:"sendMessage",value:function(e){var t=this,n=this._createMsg(e);if(null===n)return yn({code:Pn.MSG_SEND_FAIL});this._addSendMessageTotalCount(n);var o=Date.now();return this.get(11).setMessageRandom(n),this._sendComboMessage(n,e).then((function(e){var i=(e=e.data).time,s=e.sequence;return je(e=e.readReceiptCode)&&0!==e&&(new Jn("sendMessageWithReceipt").setMessage("from:".concat(n.from," to:").concat(n.to," sequence:").concat(s," readReceiptCode:").concat(e)).end(),Ae.w("".concat(t._n,".sendMessage readReceiptCode:").concat(e," message:").concat(t.getErrMsg(e)))),t._addSendMessageSuccessCount(n,o),e=t.get(11),n.status=Cn,n.time=i,n.conversationType===E.CONV_GROUP&&(n.sequence=s),e.appendToMessageList(n),i=n,!0===n._isExcludedFromLastMessage&&(i=""),e.onMessageSent({conversationOptionsList:[{conversationID:n.conversationID,unreadCount:0,type:n.conversationType,subType:n.conversationSubType,lastMessage:i}]}),mn({message:n})})).catch((function(e){return t._onSendMessageFailed(n,e)}))}},{key:"_sendComboMessage",value:function(e,t){var n=this._m.get(20),o="";return e.conversationType===E.CONV_C2C&&(o="".concat(P.NAME.OPEN_IM,".").concat(Gn.SEND_C2C_MSG)),e.conversationType===E.CONV_GROUP&&(o="".concat(P.NAME.GRP,".").concat(Gn.SEND_GRP_MSG)),n.sendComboMessage({servcmd:o,data:t})}},{key:"_createMsg",value:function(e){var t="".concat(this._n,"._createMsg"),n=null;try{var o,i=this.getMyUserID(),s={};s.senderTinyID=this.getMyTinyID(),s.currentUser=i,s.from=e.From_Account||i,e.GroupId?(s.conversationID="".concat(E.CONV_GROUP).concat(e.GroupId),s.conversationType=E.CONV_GROUP,s.to=e.GroupId):e.To_Account&&(s.conversationID="".concat(E.CONV_C2C).concat(e.To_Account),s.conversationType=E.CONV_C2C,s.to=e.To_Account),s.time=e.MsgTimeStamp||0,s.random=e.Random||e.MsgRandom||0,s.priority=e.MsgPriority,ct(e.CloudCustomData)&&0<e.CloudCustomData.length&&(s.cloudCustomData=e.CloudCustomData),Ye(e.SendMsgControl)&&(s.messageControlInfo={},e.SendMsgControl.includes("NoUnread")&&(s.messageControlInfo.excludedFromUnreadCount=1),e.SendMsgControl.includes("NoLastMsg"))&&(s.messageControlInfo.excludedFromLastMessage=1),s.conversationType===E.CONV_GROUP&&Ye(e.To_Account)&&0<e.To_Account.length&&(o=e.To_Account,50<e.To_Account.length&&(o=e.To_Account.slice(0,50),Ae.w("".concat(t," To_Account must be less than or equal to 50."))),s.receiverList=m(o),e.To_Account=m(o)),1!==e.IsNeedReadReceipt&&1!==e.NeedReadReceipt||(s.needReadReceipt=!0),1===e.SupportMessageExtension&&(s.isSupportExtension=!0),(n=new Co(s)).status=Mn,e.MsgClientTime=n.clientTime,n.conversationType===E.CONV_C2C&&(e.MsgSeq=n.sequence);for(var a,r=e.MsgBody.length,c=0;c<r;c++)"TIMTextElem"===(a=e.MsgBody[c]).MsgType?n.setTextElement(a.MsgContent.Text):"TIMCustomElem"===a.MsgType?n.setCustomElement({data:a.MsgContent.Data||"",description:a.MsgContent.Desc||"",extension:a.MsgContent.Ext||""}):"TIMFaceElem"===a.MsgType&&n.setFaceElement({index:a.MsgContent.Index,data:a.MsgContent.Data});var u=n.getElements();n.payload=u[0].content,n.type=u[0].type}catch(l){n=null,Ae.e("".concat(t," failed. error:"),l)}return n}},{key:"_onSendMessageFailed",value:function(e,t){e.status=Tn,this.get(11).deleteMessageRandom(e),this._addSendMessageFailCountOnUser(e,t);var n=new Jn("sendMessage"),o="head.seq:".concat(t.data.headSeq," type:").concat(e.type," from:").concat(e.from," to:").concat(e.to);return n.setMessage(o).setError(t).end(),Ae.e("".concat(this._n,"._onSendMessageFailed ").concat(o," error:"),t),yn(new Nn({code:t&&t.code?t.code:Pn.MSG_SEND_FAIL,message:t&&t.message?t.message:void 0,data:{message:e}}))}},{key:"_getSendMessageSpecifiedKey",value:function(e){return e.conversationType===E.CONV_C2C?Fn:e.conversationType===E.CONV_GROUP&&(e=this.get(7).getLocalGroupProfile(e.to))?yt(e=e.type)?Vn:qn:void 0}},{key:"_addSendMessageTotalCount",value:function(e){(e=this._getSendMessageSpecifiedKey(e))&&this.get(26).addTotalCount(e)}},{key:"_addSendMessageSuccessCount",value:function(e,t){var n;(e=this._getSendMessageSpecifiedKey(e))&&((n=this.get(26)).addSuccessCount(e),n.addCost(e,Kt(t,!1)))}},{key:"_addSendMessageFailCountOnUser",value:function(e,t){t=void 0===(t=t.code)?-1:t;var n=this.get(26);e=this._getSendMessageSpecifiedKey(e),Ls(t)&&e&&n.addFailedCountOfUserSide(e)}}]),js),qs=(r(Ks,bn),As=g(Ks),s(Ks,[{key:"registerPlugin",value:function(e){var t=this,n="0";Object.keys(e).forEach((function(o){t.plugins[o]=e[o],"tim-upload-plugin"===o&&"function"==typeof e[o].getVersion&&(n=e[o].getVersion())})),new Jn("registerPlugin").setMessage("".concat(Object.keys(e))).setMoreMessage("version:".concat(n)).end()}},{key:"getPlugin",value:function(e){return this.plugins[e]}},{key:"reset",value:function(){}}]),Ks),Vs=(r(Hs,bn),bs=g(Hs),s(Hs,[{key:"_init",value:function(){this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:0})}},{key:"_startSync",value:function(e){var n=this,o=e.cookie,i=e.syncFlag,s=e.isOnlineSync,a="".concat(this._n,"._startSync"),r=(Ae.l("".concat(a," options:"),e),new Jn("syncUnread"));r.setMessage(JSON.stringify(e)),this.req({P:Gn.SYNC_UNREAD_MSG,data:{cookie:o,syncFlag:i,isOnlineSync:s}}).then((function(e){var o=(i=e.data).cookie,i=i.syncFlag,s="$cookie:".concat(o," syncFlag:").concat(i);Ae.l("".concat(a," ok. ").concat(s)),n._cookie=o,r.setMoreMessage(s).end(),Ve(o)||(0===i||1===i?(n._dispatch(t(t({},e.data),{},{isSyncingEnded:!1})),n._startSync({cookie:o,syncFlag:i,isOnlineSync:0})):2===i&&n._dispatch(t(t({},e.data),{},{isSyncingEnded:!0})))})).catch((function(e){r.setError(e).end(),Ae.e("".concat(a," failed. error:"),e)}))}},{key:"_dispatch",value:function(e){e.eventArray&&this.get(20).onMessage({head:{},body:{eventArray:e.eventArray,isInstantMessage:this._onlineSyncFlag,isSyncingEnded:e.isSyncingEnded}}),this.get(6).onNewMessage({dataList:e.messageList,isInstantMessage:!!e.isSyncingEnded&&this._onlineSyncFlag,C2CRemainingUnreadList:e.C2CRemainingUnreadList,C2CPairUnreadList:e.C2CPairUnreadList,isSyncingEnded:e.isSyncingEnded})}},{key:"syncOnNeed",value:function(){Ae.l("".concat(this._n,".syncOnNeed cookie:").concat(this._cookie)),this._onlineSyncFlag=!0,this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:1})}},{key:"syncOnReconnected",value:function(){Ae.l("".concat(this._n,".syncOnReconnected cookie:").concat(this._cookie)),this._onlineSyncFlag=!0,this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:0})}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._onlineSyncFlag=!1,this._cookie=""}}]),Hs),Bs={req:{toAccount:"To_Account",fromAccount:"From_Account",to:"To_Account",from:"From_Account",groupID:"GroupId",groupAtUserID:"GroupAt_Account",extension:"Ext",data:"Data",description:"Desc",elements:"MsgBody",sizeType:"Type",downloadFlag:"Download_Flag",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",videoUrl:"",imageUrl:"URL",fileUrl:"Url",uuid:"UUID",priority:"MsgPriority",receiverUserID:"To_Account",receiverGroupID:"GroupId",messageSender:"SenderId",messageReceiver:"ReceiverId",nick:"From_AccountNick",avatar:"From_AccountHeadurl",messageNumber:"MsgNum",pbDownloadKey:"PbMsgKey",downloadKey:"JsonMsgKey",applicationType:"PendencyType",userIDList:"To_Account",groupNameList:"GroupName",userID:"To_Account",groupAttributeList:"GroupAttr",mainSequence:"AttrMainSeq",avChatRoomKey:"BytesKey",attributeControl:"AttrControl",sequence:"seq",messageControlInfo:"SendMsgControl",updateSequence:"UpdateSeq",clientTime:"MsgClientTime",sequenceList:"MsgSeqList",topicID:"TopicId",customData:"CustomString",isSupportTopic:"SupportTopic",isWebUniapp:"is_web_uniapp",isSupportExtension:"SupportMessageExtension",messageSequence:"MsgSeq",messageKey:"MsgKey",startSequence:"startSeq",simplifiedMessage:"DownsizeFlag",isRelayMessage:"IsRelayMsg",reactionID:"Reaction",messageSequenceList:"MsgSeqList",messageKeyList:"MsgKeyList",cmConfigID:"CustomModerationConfigID"},res:{MsgPriority:"priority",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",Download_Flag:"downloadFlag",GroupId:"groupID",Member_Account:"userID",MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",MsgSeq:"sequence",MsgRandom:"random",MsgTime:"time",MsgTimeStamp:"time",MsgContent:"content",MsgBody:"elements",From_AccountNick:"nick",From_AccountHeadurl:"avatar",GroupWithdrawInfoArray:"revokedInfos",GroupReadInfoArray:"groupMessageReadNotice",LastReadMsgSeq:"lastMessageSeq",WithdrawC2cMsgNotify:"c2cMessageRevokedNotify",C2cWithdrawInfoArray:"revokedInfos",C2cReadedReceipt:"c2cMessageReadReceipt",ReadC2cMsgNotify:"c2cMessageReadNotice",LastReadTime:"peerReadTime",MsgRand:"random",MsgType:"type",MsgShow:"messageShow",NextMsgSeq:"nextMessageSeq",FaceUrl:"avatar",ProfileDataMod:"profileModify",Profile_Account:"userID",ValueBytes:"value",ValueNum:"value",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgFrom_AccountExtraInfo:"messageFromAccountExtraInformation",Operator_Account:"operatorID",OpType:"operationType",ReportType:"operationType",UserId:"userID",User_Account:"userID",List_Account:"userIDList",MsgOperatorMemberExtraInfo:"operatorInfo",MsgMemberExtraInfo:"memberInfoList",ImageUrl:"avatar",NickName:"nick",MsgGroupNewInfo:"newGroupProfile",MsgAppDefinedData:"groupCustomField",Owner_Account:"ownerID",GroupFaceUrl:"avatar",GroupIntroduction:"introduction",GroupNotification:"notification",GroupApplyJoinOption:"joinOption",MsgKey:"messageKey",GroupInfo:"groupProfile",ShutupTime:"muteTime",Desc:"description",Ext:"extension",GroupAt_Account:"groupAtUserID",MsgNum:"messageNumber",PbMsgKey:"pbDownloadKey",JsonMsgKey:"downloadKey",MsgModifiedFlag:"isModified",PendencyItem:"applicationItem",PendencyType:"applicationType",AddTime:"time",AddSource:"source",AddWording:"wording",ProfileImImage:"avatar",PendencyAdd:"friendApplicationAdded",FrienPencydDel_Account:"friendApplicationDeletedUserIDList",Peer_Account:"userID",GroupAttr:"groupAttributeList",GroupAttrAry:"groupAttributeList",AttrMainSeq:"mainSequence",seq:"sequence",GroupAttrOption:"groupAttributeOption",BytesChangedKeys:"changedKeyList",GroupAttrInfo:"groupAttributeList",GroupAttrSeq:"mainSequence",PushChangedAttrValFlag:"isWithChangedAttributeInfo",SubKeySeq:"sequence",Val:"value",MsgGroupFromCardName:"senderNameCard",MsgGroupFromNickName:"senderNick",C2cNick:"peerNick",C2cImage:"peerAvatar",SendMsgControl:"messageControlInfo",NoLastMsg:"excludedFromLastMessage",NoUnread:"excludedFromUnreadCount",UpdateSeq:"updateSequence",MuteNotifications:"muteFlag",MsgClientTime:"clientTime",TinyId:"tinyID",GroupMsgReceiptList:"readReceiptList",ReadNum:"readCount",UnreadNum:"unreadCount",TopicId:"topicID",MillionGroupFlag:"communityType",SupportTopic:"isSupportTopic",MsgTopicNewInfo:"newTopicInfo",ShutupAll:"muteAllMembers",CustomString:"customData",TopicFaceUrl:"avatar",TopicIntroduction:"introduction",TopicNotification:"notification",TopicIdArray:"topicIDList",MsgVersion:"messageVersion",C2cMsgModNotifys:"c2cMessageModified",GroupMsgModNotifys:"groupMessageModified",ApplyJoinOption:"joinOption",MsgFlag:"messageRemindType",AtInfoList:"groupAtInfoList",AtFlagList:"groupAtType",AtMsgSeq:"sequence",BanDuration:"duration",BanDescription:"reason",NotVisible:"invisible",BytesTag:"tag",BytesValue:"value",RptBytesValue:"value",LatestSeq:"globalSequence",ClearSeq:"clearSequence",SupportMessageExtension:"isSupportExtension",ExtensionList:"extensions",GroupCounter:"counterList",Revoker_Account:"revoker",MsgExtensionNotify:"messageExtensionNotify",ExtensionC2cMsgInfo:"messageInfo",ExtensionGroupMsgInfo:"messageInfo",MsgOptType:"operateType",SetKVInfo:"operateResultList",DeleteKVInfo:"operateResultList",ClearKVInfo:"operateResultList",MsgKeyValue:"extensions",ClearMsgSeq:"clearSequence",MsgLastSeq:"globalSequence",InviteJoinOption:"inviteOption",MemberList_Account:"inviteeList",MsgMemberExtraInfoList:"inviteeInfoList",E:"event",GInf:"groupProfile",MCT:"clientTime",MR:"random",MP:"priority",MTS:"time",GId:"groupID",MS:"sequence",CCD:"cloudCustomData",F_Account:"from",F_Hd:"avatar",F_NN:"nick",GN:"groupName",GT:"groupType",IsSys:"isSystemMessage",OpInf:"operatorInfo",Img:"avatar",NN:"nick",OnlineInf:"onlineMemberInfo",ET:"expireTime",Num:"onlineMemberNum",Opt:"operationType",O_Account:"operatorID",RT:"operationType",UDF:"userDefinedField",L_Account:"userIDList",IsPlaceMsg:"isPlaceMessage",MsgCheckResult:"checkResult",Results:"resultList",Reaction:"reactionID",Reaction_Account:"userIDList",MsgReactionNotifyList:"messageReactionNotifyList",MsgReactionNotify:"messageReactionNotify",MsgReactionSummary:"reactionList",C2CMsgInfo:"C2CMessageInfo",GroupMsgInfo:"groupMessageInfo",int32_err_code:"errorCode",str_err_msg:"errorMsg",MsgDropReason:"messageDropReason",ReactedByMe:"reactedByMyself",Level:"messageRemindType",PeerReadTime:"timestamp",NoUnreadSeqList:"excludedUnreadSequenceList",NewMsg:"topicLatestMessage"},ignoreKeyWord:["C2C","ID","USP"]};function Hs(e){return o(this,Hs),(e=bs.call(this,e))._n="SyncUnreadMsgModule",e._cookie="",e._onlineSyncFlag=!1,e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,e._init,f(e)),e}function Ks(e){return o(this,Ks),(e=As.call(this,e))._n="PluginModule",e.plugins={},e}function js(e){return o(this,js),(e=Rs.call(this,e))._n="ComboMsgModule",e}function $s(e){return o(this,$s),(e=Os.call(this,e))._n="MsgReactionModule",e._reactedByMyselfMap=new Map,e._reactionInfoMap=new Map,e}function Ws(e){return o(this,Ws),(e=Ns.call(this,e))._n="MsgExtModule",e.msgExtMap=new Map,e.globalSeqMap=new Map,e.getMsgExtsMap=new Map,e}function Ys(e){return o(this,Ys),(e=Ps.call(this,e))._n="MessageModule",e._messageOptionsMap=new Map,e._mergerMessageHandler=new Ts(f(e)),e}function zs(e,t){if("string"==typeof e||Array.isArray(e))return t=Object.assign({pascalCase:!1},t),0===(e=Array.isArray(e)?e.map((function(e){return e.trim()})).filter((function(e){return e.length})).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e=e=(e=e!==e.toLowerCase()?Xs(e):e).replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(e,t){return t.toUpperCase()})).replace(/\d+(\w|$)/g,(function(e){return e.toUpperCase()})),t.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e);throw new TypeError("Expected the input to be `string | string[]`")}var Xs=function(e){for(var t=!1,n=!1,o=!1,i=0;i<e.length;i++){var s=e[i];t&&/[a-zA-Z]/.test(s)&&s.toUpperCase()===s?(e=e.slice(0,i)+"-"+e.slice(i),o=n,n=!(t=!1),i++):n&&o&&/[a-zA-Z]/.test(s)&&s.toLowerCase()===s?(e=e.slice(0,i-1)+"-"+e.slice(i-1),o=n,t=!(n=!1)):(t=s.toLowerCase()===s&&s.toUpperCase()!==s,o=n,n=s.toUpperCase()===s&&s.toLowerCase()!==s)}return e};function Js(e,t){var n=0;return function e(t,o){var i,s,a,r;return 100<++n?(n--,t):Ye(t)?(i=t.map((function(t){return $e(t)?e(t,o):t})),n--,i):$e(t)?(s=t,a=function(e,t){if(!Je(t))return!1;if(t!==zs(t))for(var n=0;n<Bs.ignoreKeyWord.length&&!t.includes(Bs.ignoreKeyWord[n]);n++);var i;return ut(o[t])?"OPPOChannelID"===(i=t)?i:i[0].toUpperCase()+zs(i).slice(1):o[t]},r=Object.create(null),Object.keys(s).forEach((function(e){var t=a(s[e],e);t&&(r[t]=s[e])})),i=Et(i=r,(function(t,n){return Ye(t)||$e(t)?e(t,o):t})),n--,i):void 0}(e,t)}for(var Zs,Qs=String.fromCharCode,ea=function(e){var t=0|e.charCodeAt(0);if(55296<=t)if(t<56320)if(56320<=(e=0|e.charCodeAt(1))&&e<=57343){if(65535<(t=(t<<10)+e-56613888|0))return Qs(240|t>>>18,128|t>>>12&63,128|t>>>6&63,128|63&t)}else t=65533;else t<=57343&&(t=65533);return t<=2047?Qs(192|t>>>6,128|63&t):Qs(224|t>>>12,128|t>>>6&63,128|63&t)},ta=function(e){for(var t=void 0===e?"":(""+e).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,ea),n=0|t.length,o=new Uint8Array(n),i=0;i<n;i=i+1|0)o[i]=0|t.charCodeAt(i);return o},na=(s(Ea,[{key:"getID",value:function(){return this._id}},{key:"_onOpen",value:function(e){this._handler.onOpen({id:this._id,res:JSON.stringify(e)})}},{key:"_onClose",value:function(e){this._handler.onClose({id:this._id,e:e})}},{key:"_onMessage",value:function(e){e=this._canIUseBinaryFrame?this._isAppCompressedData(e.data)?this._handler.inflate(e.data):function(e){for(var t=new Uint8Array(e),n="",o=0,i=t.length;o<i;){var s=t[o],a=0,r=0;if(s<=127?(a=0,r=255&s):s<=223?(a=1,r=31&s):s<=239?(a=2,r=15&s):s<=244&&(a=3,r=7&s),0<i-o-a)for(var c=0;c<a;)r=r<<6|63&(s=t[o+c+1]),c+=1;else r=65533,a=i-o;n+=String.fromCodePoint(r),o+=a+1}return n}(e.data):e.data,this._handler.onMessage({data:e})}},{key:"_isAppCompressedData",value:function(e){return 67===(e=new Uint8Array(e))[0]&&79===e[1]&&77===e[2]&&80===e[3]}},{key:"_onError",value:function(e){this._handler.onError({id:this._id,e:e})}},{key:"setIsWorkerEnabled",value:function(e){this._isWorkerEnabled=!0}},{key:"close",value:function(e){this._workerSocket&&(this._workerSocket.postMessage({cmd:"stop",code:e}),this._workerSocket.terminate(),this._workerSocket=null),W?(ne.offSocketClose(),ne.offSocketMessage(),ne.offSocketOpen(),ne.offSocketError(),ne.closeSocket()):this._socket&&(Z?(this._socket.onClose((function(){})),this._socket.onOpen((function(){})),this._socket.onMessage((function(){})),this._socket.onError((function(){}))):(this._socket.onopen=null,this._socket.onmessage=null,this._socket.onclose=null,this._socket.onerror=null),$?this._socket.close({code:e}):this._socket.close(e),this._socket=null)}},{key:"send",value:function(e){this._workerSocket?this._workerSocket.postMessage({cmd:"sendMessage",data:this._canIUseBinaryFrame?ta(e.data).buffer:e.data}):W?ne.sendSocketMessage({data:e.data,fail:function(){e.fail&&e.requestID&&e.fail(e.requestID)}}):this._socket&&(Z?this._socket.send({data:this._canIUseBinaryFrame?ta(e.data).buffer:e.data,fail:function(){e.fail&&e.requestID&&e.fail(e.requestID)}}):this._socket.send(this._canIUseBinaryFrame?ta(e.data):e.data))}}]),Ea),oa=["keyMap"],ia=["keyMap"],sa="connected",aa="connecting",ra="disconnected",ca=(s(Sa,[{key:"_setWebsocketHost",value:function(){var e=this._chM.get(12);this._currentSite=N,this._chM.isOversea()&&(this._currentSite="OVERSEA"),e.isSingaporeSite()?this._currentSite="SINGAPORE":e.isKoreaSite()?this._currentSite="KOREA":e.isGermanySite()?this._currentSite="GERMANY":e.isIndiaSite()?this._currentSite="IND":e.isJapanSite()?this._currentSite="JPN":e.isUSASite()?this._currentSite="USA":e.isIndonesiaSite()&&(this._currentSite="INDONESIA"),P.HOST.setCurrent(this._currentSite)}},{key:"_initConnection",value:function(){var e=this._chM.get(12).getSDKAppID()+"",t=(ut(P.HOST.CURRENT.BACKUP)?this._url=P.HOST.CURRENT.DEFAULT:""===this._url?this._url=P.HOST.CURRENT.DEFAULT0.replace("*",e):-1<this._url.indexOf(e)?this._url=P.HOST.CURRENT.DEFAULT:this._url===P.HOST.CURRENT.DEFAULT?this._url=P.HOST.CURRENT.BACKUP:this._url===P.HOST.CURRENT.BACKUP?this._url=this._canIUseAnyCast()?P.HOST.CURRENT.ANYCAST:P.HOST.CURRENT.DEFAULT:this._url===P.HOST.CURRENT.ANYCAST&&(P.HOST.CURRENT.ANYCAST="",this._url=P.HOST.CURRENT.DEFAULT),e=this._chM.get(12)).getProxyServer();Ve(t)||(this._url=t),e.isTestEnv()&&(this._url=b.TEST[this._currentSite].DEFAULT),this._connect(),this._nextPingTs=0}},{key:"_canIUseAnyCast",value:function(){return te&&P.HOST.CURRENT.ANYCAST}},{key:"onCheckTimer",value:function(e){e%1==0&&(this._checkPromiseMap(),this._checkNativeAppWS())}},{key:"_checkPromiseMap",value:function(){var e=this;0!==this._promiseMap.size&&this._promiseMap.forEach((function(t,n){var o=t.reject,i=t.timestamp,s=(t=t.headSeq,15e3);-1!==n.indexOf(Gn.LOGIN)?s=9e4:-1!==n.indexOf(Gn.PING)&&(s=3e3),Date.now()-i>=s&&(Ae.l("".concat(e._n,"._checkPromiseMap request timeout, delete requestID:").concat(n)),e._promiseMap.delete(n),o(new Nn({code:Pn.NETWORK_TIMEOUT,data:{headSeq:t}})),e._chM.onRequestTimeout())}))}},{key:"_checkNativeAppWS",value:function(){z&&!this.isConnected()&&this._reConnect()}},{key:"onOpen",value:function(e){var t,n;this._readyState!==ra&&(this._onOpenTs=Date.now(),n=e.id,e=e.res,this._socketID=n,t=Kt(this._startTs,!1),n="socketID:".concat(n," res:").concat(e),Ae.l("".concat(this._n,"._onOpen cost:").concat(t," ms. ").concat(n)),new Jn("wsOnOpen").setMessage(t).setCostTime(t).setMoreMessage(n).end(),this._readyState=sa,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 Jn("wsOnClose"),n=e.id,o=(e=e.e,"sourceSocketID:".concat(n," currentSocketID:").concat(this._socketID," code:").concat(e.code," reason:").concat(e.reason)),i=0;0!==this._onOpenTs&&(i=Date.now()-this._onOpenTs),t.setMessage(i).setCostTime(i).setMoreMessage(o).setCode(e.code).end(!0),Ae.l("".concat(this._n,"._onClose ").concat(o," onlineTime:").concat(i)),n===this._socketID&&(this._readyState=ra,i<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 Jn("wsOnError").setMessage(e.errMsg||JSON.stringify(e,["message","code"])).setMoreMessage(n).setLevel("error").end(!0),Ae.w("".concat(this._n,"._onError"),e,n),t===this._socketID&&(this._readyState=ra,this._chM.onError())}},{key:"onMessage",value:function(e){var t,n,o,i,s,a;try{t=JSON.parse(e.data)}catch(r){new Jn("jsonParseError").setMessage(e.data).end()}t&&t.head&&(e=this._getRequestIDFromHead(t.head),n=t.body,this._chM.get(30).isTRTCCommand(e)||(a=Ot(t.head),n=function e(t,n){var o,i,s;return Ye(t)?t.map((function(t){return $e(t)?e(t,n):t})):$e(t)?(o=t,i=function(e,t){return ut(n[t])?zs(t):n[t]},s={},Object.keys(o).forEach((function(e){s[i(o[e],e)]=o[e]})),Et(s,(function(t){return Ye(t)||$e(t)?e(t,n):t}))):void 0}(t.body,this._getResKeyMap(a))),Ae.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)?(o=(a=this._promiseMap.get(e)).resolve,i=a.reject,s=a.timestamp,a=a.headSeq,this._promiseMap.delete(e),this._calcRTT(s),n.errorCode&&0!==n.errorCode?(this._chM.onErrorCodeNotZero(n),i(new Nn({code:n.errorCode,message:n.errorInfo||"",data:e.includes(Gn.MODIFY_C2C_MSG)||e.includes(Gn.MODIFY_GRP_MSG)?{elements:n.elements,messageVersion:n.messageVersion,cloudCustomData:n.cloudCustomData,headSeq:a}:{headSeq:a}}))):o(mn(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!==aa&&this._readyState!==sa&&(this._startTs=Date.now(),this._onOpenTs=0,this._readyState=aa,this._socket=new na(this),this._socketID=this._socket.getID(),Ae.l("".concat(this._n,"._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled()," socketID:").concat(this._socketID," url:").concat(this.getURL())),new Jn("wsConnect").setMessage("socketID:".concat(this._socketID," url:").concat(this.getURL())).end())}},{key:"getURL",value:function(){this._chM.isDevMode()&&(this._canIUseBinaryFrame=!1);var e=Lt(),t=((W||B&&"windows"===e||z)&&(this._canIUseBinaryFrame=!1),-1),n=("ios"===e?t=ae||-1:"android"===e&&(t=ce||-1),this._chM.get(12)),o=this._chM.getPlatform(),i=n.getSDKAppID();return n=n.getInstanceID(),i="sdkappid=".concat(i,"&instanceid=").concat(n,"&random=").concat(this._getRandom(),"&platform=").concat(o,"&host=").concat(e)+"&version=".concat(t,"&sdkversion=").concat("3.4.7"),H&&(i+="&isminigame=1"),this._chM.canIUseInflate()&&(i+="&compress=gzip"),(this._canIUseBinaryFrame?"".concat(this._url,"/binfo?"):"".concat(this._url,"/info?")).concat(i)}},{key:"_closeConnection",value:function(e){Ae.l("".concat(this._n,"._closeConnection socketID:").concat(this._socketID)),this._socket&&(this._socket.close(e),this._socketID=-1,this._socket=null,this._readyState=ra)}},{key:"_resend",value:function(){var e=this;if(Ae.l("".concat(this._n,"._resend reConnectFlag:").concat(this._reConnectFlag),"promiseMap.size:".concat(this._promiseMap.size," simpleRequestMap.size:").concat(this._simpleRequestMap.size)),0<this._promiseMap.size&&this._promiseMap.forEach((function(t,n){var o=t.uplinkData,i=t.resolve;t=t.reject,-1!==n.indexOf(Gn.AV_POLLING)?e._promiseMap.delete(n):(e._promiseMap.set(n,{resolve:i,reject:t,timestamp:Date.now(),uplinkData:o}),e._execute(n,o))})),0<this._simpleRequestMap.size){var t,n=T(this._simpleRequestMap);try{for(n.s();!(t=n.n()).done;){var o=_(t.value,2),i=o[0],s=o[1];this._execute(i,s)}}catch(a){n.e(a)}finally{n.f()}this._simpleRequestMap.clear()}}},{key:"send",value:function(e){var t=this,n=(e.head.seq=this._getSequence(),e.head.reqtime=Math.floor(Date.now()/1e3),e.keyMap,h(e,oa)),o=this._getRequestIDFromHead(e.head),i=JSON.stringify(n);return new Promise((function(s,a){t._promiseMap.set(o,{resolve:s,reject:a,timestamp:Date.now(),uplinkData:i,headSeq:e.head.seq}),Ae.d("".concat(t._n,".send uplinkData:").concat(JSON.stringify(n)," requestID:").concat(o," readyState:").concat(t._readyState)),t._readyState!==sa?t._reConnect():(t._execute(o,i),t._chM.get(26).addRequestCount())}))}},{key:"simplySend",value:function(e){e.head.seq=this._getSequence(),e.head.reqtime=Math.floor(Date.now()/1e3),e.keyMap;var t=h(e,ia);e=this._getRequestIDFromHead(e.head),t=JSON.stringify(t),this._readyState!==sa?(this._simpleRequestMap.size<this.MAX_SIZE?this._simpleRequestMap.set(e,t):Ae.l("".concat(this._n,".simplySend. simpleRequestMap is full, drop request!")),this._reConnect()):this._execute(e,t)}},{key:"_execute",value:function(e,t){this._socket.send({data:t,fail:Z?this._onSendFail.bind(this):void 0,requestID:e})}},{key:"_onSendFail",value:function(e){Ae.l("".concat(this._n,"._onSendFail requestID:").concat(e)),this._chM.onSendFail()}},{key:"_getSequence",value:function(){var e;if(this._startSequence<2415919103)return e=this._startSequence,this._startSequence+=1,2415919103===this._startSequence&&(this._startSequence=nt()),e}},{key:"_getRequestIDFromHead",value:function(e){return e.servcmd+e.seq}},{key:"_getResKeyMap",value:function(e){return e=this._chM.getKeyMap(e),t(t({},Bs.res),e.res)}},{key:"_reConnect",value:function(){this._readyState!==sa&&this._readyState!==aa&&this.forcedReconnect()}},{key:"forcedReconnect",value:function(){var e="".concat(this._n,".forcedReconnect");Ae.l("".concat(e," count:").concat(this._reConnectCount," readyState:").concat(this._readyState)),this._reConnectFlag=!0,this._resetRandom(),this._reConnectCount<this.MAX_RECONNECT_COUNT?(this._reConnectCount+=1,this._closeConnection(4001),this._initConnection()):(this._reConnectCount=0,this._chM.get(15).isOnline()?(Ae.w("".concat(e," disconnected from wsserver but network is ok, continue...")),this._closeConnection(4001),this._initConnection()):this._chM.onReconnectFailed())}},{key:"getReconnectFlag",value:function(){return this._reConnectFlag}},{key:"_setNextPingTs",value:function(){this._nextPingTs=z?Date.now()+5e3:Date.now()+1e4}},{key:"getNextPingTs",value:function(){return this._nextPingTs}},{key:"isConnected",value:function(){return this._readyState===sa}},{key:"canIUseBinaryFrame",value:function(){return this._canIUseBinaryFrame}},{key:"getSocketID",value:function(){return this._socketID}},{key:"inflate",value:function(e){if(this._chM.canIUseInflate())return this._chM.get(37).inflate(e)}},{key:"setIsWorkerEnabled",value:function(e){Ae.l("".concat(this._n,".setIsWorkerEnabled flag:").concat(e)),this._isWorkerEnabled=e}},{key:"getIsWorkerEnabled",value:function(){return this._isWorkerEnabled&&he}},{key:"_getRandom",value:function(){return 0===this._random&&(this._random=Math.random()),this._random}},{key:"_resetRandom",value:function(){this._random=0}},{key:"close",value:function(){Ae.l("".concat(this._n,".close")),this._closeConnection(4e3),this._promiseMap.clear(),this._startSequence=nt(),this._readyState=ra,this._simpleRequestMap.clear(),this._reConnectFlag=!1,this._reConnectCount=0,this._onOpenTs=0,this._url="",this._random=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0}}]),Sa),ua=function(e,t,n){return new Promise((function(o,i){var s,a,r="application/x-www-form-urlencoded;charset=UTF-8";Z?ne.request({url:t,data:n,method:e,timeout:3e3,header:{"content-type":r},success:function(e){e&&e.data&&e.data.NetCheckInfo&&Ae.l("".concat("getconninfo ok in"," miniapp. ret:"),e.data),o()},fail:function(){i(new Nn({code:Pn.NETWORK_ERROR}))}}):(s=new XMLHttpRequest,a=setTimeout((function(){s.abort(),i(new Nn({code:Pn.NETWORK_TIMEOUT}))}),3e3),s.onreadystatechange=function(){4===s.readyState&&(clearTimeout(a),200===s.status||304===s.status?(s.responseText&&-1<s.responseText.indexOf("NetCheckInfo")&&Ae.l("".concat("getconninfo ok in"," web. ret:"),JSON.parse(s.responseText)),o()):i(new Nn({code:Pn.NETWORK_ERROR})))},s.open(e,t,!0),s.setRequestHeader("Content-type",r),n?s.send(n):s.send())}))},la=(r(Ta,bn),Zs=g(Ta),s(Ta,[{key:"onCheckTimer",value:function(e){this._socketHandler&&(this.isLoggedIn()?(0<this._timerForNotLoggedIn&&(clearInterval(this._timerForNotLoggedIn),this._timerForNotLoggedIn=-1),this._socketHandler.onCheckTimer(e)):this._socketHandler.onCheckTimer(1),this._checkNextPing())}},{key:"onErrorCodeNotZero",value:function(e){this.get(20).onErrorCodeNotZero(e)}},{key:"onMessage",value:function(e){this.get(20).onMessage(e)}},{key:"send",value:function(e){return this._socketHandler?this._previousState!==E.NET_STATE_CONNECTED&&e.head.servcmd.includes(Gn.SSO_STAT)?(this.reConnect(),this.isPrivateNetWork()?Promise.resolve():this._sendLogViaHTTP(e)):this._socketHandler.send(e):Promise.reject()}},{key:"_sendLogViaHTTP",value:function(e){var t=P.HOST.CURRENT.STAT;return t="".concat(t,"/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e.head.sdkappid,"&reqtime=").concat(Date.now()),e=JSON.stringify(e.body),ua("POST",t,e)}},{key:"simplySend",value:function(e){return this._socketHandler?this._socketHandler.simplySend(e):Promise.reject()}},{key:"onOpen",value:function(){this._ping()}},{key:"onClose",value:function(){this._socketHandler&&this._socketHandler.getReconnectFlag()&&this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED),this.reConnect()}},{key:"onError",value:function(){Z&&!z&&this.warn("DomainNameInMP"),this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"getKeyMap",value:function(e){return this.get(20).getKeyMap(e)}},{key:"onRequestTimeout",value:function(){3e4<=Date.now()-this._lastDiagnoseTS&&this.diagnose()}},{key:"onSendFail",value:function(){this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"onReconnected",value:function(){Ae.l("".concat(this._n,".onReconnected cost:").concat(Kt(this._disconnectedTS,!0,!0))),this._m.restartTimer(),this.get(20).onReconnected(Kt(this._disconnectedTS,!1,!1)),this._disconnectedTS=0,this._emitNetStateChangeEvent(E.NET_STATE_CONNECTED)}},{key:"onReconnectFailed",value:function(){Ae.l("".concat(this._n,".onReconnectFailed")),this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"setIsWorkerEnabled",value:function(e){this._socketHandler&&this._socketHandler.setIsWorkerEnabled(!1)}},{key:"offline",value:function(){this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"reConnect",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=!1,n=(this._socketHandler&&(t=this._socketHandler.getReconnectFlag()),"forcedFlag:".concat(e," fatalErrorFlag:").concat(this._fatalErrorFlag," previousState:").concat(this._previousState," reconnectFlag:").concat(t));Ae.l("".concat(this._n,".reConnect ").concat(n)),this._fatalErrorFlag||!this._socketHandler||!0!==e&&this._previousState===E.NET_STATE_CONNECTING&&t||(this._socketHandler.forcedReconnect(),this._emitNetStateChangeEvent(E.NET_STATE_CONNECTING))}},{key:"_emitNetStateChangeEvent",value:function(e){this._previousState!==e&&(Ae.l("".concat(this._n,"._emitNetStateChangeEvent from ").concat(this._previousState," to ").concat(e)),e===E.NET_STATE_DISCONNECTED&&0===this._disconnectedTS&&(this._disconnectedTS=Date.now(),this.diagnose()),this._previousState=e,this.emitOEvt(S.NET_STATE_CHANGE,{state:e}))}},{key:"_ping",value:function(){var e,t=this;!0!==this._probing&&(this._probing=!0,e=this.get(20).getProtocolData({P:Gn.PING}),this.send(e).then((function(){t._probing=!1})).catch((function(e){t._probing=!1;var n=t.get(15).isOnline();Ae.w("".concat(t._n,"._ping failed. bOnline:").concat(n," error:"),e),e&&60002===e.code?(new Jn("error").setMessage("code:".concat(e.code," message:").concat(e.message)).end(),t._fatalErrorFlag=!0,t._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)):n?t.reConnect():t._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)})))}},{key:"_checkNextPing",value:function(){this._socketHandler&&this._socketHandler.isConnected()&&Date.now()>=this._socketHandler.getNextPingTs()&&this._ping()}},{key:"dealloc",value:function(){this._socketHandler&&(this._socketHandler.close(),this._socketHandler=null),-1<this._timerForNotLoggedIn&&clearInterval(this._timerForNotLoggedIn)}},{key:"onRestApiKickedOut",value:function(){this._socketHandler&&(this._socketHandler.close(),this.reConnect(!0))}},{key:"canIUseInflate",value:function(){return this._m.canIUseInflate()}},{key:"getSocketID",value:function(){if(this._socketHandler)return this._socketHandler.getSocketID()}},{key:"diagnose",value:function(){this.isPrivateNetWork()||(this._lastDiagnoseTS=Date.now(),this._diagnoseBySSO(),this._diagnoseByCDN())}},{key:"_diagnoseBySSO",value:function(){var e=this,t=this._socketHandler.getURL(),n=t.split("/")[2];n.startsWith("ws")&&(t=t.slice(t.indexOf("info?")+5),n="https://".concat(n,"/v3/netcheck/getconninfo?").concat(t,"&reqtime=").concat(Date.now()),ua("GET",n).catch((function(t){Ae.w("".concat(e._n,"._diagnoseBySSO failed. error:"),t)})))}},{key:"_diagnoseByCDN",value:function(){var e=this,t=(t=this._socketHandler.getURL()).slice(t.indexOf("info?")+5);t="https://boce-cdn.my-imcloud.com/v3/netcheck/getconninfo?".concat(t,"&reqtime=").concat(Date.now()),ua("GET",t).catch((function(t){Ae.w("".concat(e._n,"._diagnoseByCDN failed. error:"),t)}))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._previousState=E.NET_STATE_CONNECTED,this._probing=!1,this._fatalErrorFlag=!1,this._timerForNotLoggedIn=setInterval(this.onCheckTimer.bind(this),1e3),this._disconnectedTS=0,this._lastDiagnoseTS=0}}]),Ta),da=["a2","tinyid"],pa=["a2","tinyid"],ha=(s(Ca,[{key:"_fillMap",value:function(){this._map.clear();var e=this._sessionM.genCommonHead(),n=this._sessionM.genCosSpecifiedHead(),o=this._sessionM.genSSOReportHead();this._map.set(Gn.LOGIN,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.LOGIN)}),body:{state:"Online",isWebUniapp:0,deviceBrand:0,customInfo:""},keyMap:{req:{deviceBrand:"InstType"},res:{InstId:"instanceID",HelloInterval:"helloInterval",RichMsgAuthKey:"authKey"}}}),this._map.set(Gn.LOGOUT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.LOGOUT)}),body:{type:0,isWebUniapp:0},keyMap:{req:{type:"wslogout_type"}}}),this._map.set(Gn.HELLO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.HELLO)}),body:{isWebUniapp:0},keyMap:{res:{NewInstInfo:"newInstanceInfo"}}}),this._map.set(Gn.KICK_OTHER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.STAT_SERVICE,".").concat(Gn.KICK_OTHER)}),body:{}}),this._map.set(Gn.COS_SIGN,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.IM_COS_SIGN,".").concat(Gn.COS_SIGN)}),body:{cmd:"open_im_cos_svc",subCmd:"get_cos_token",duration:300,version:2},keyMap:{req:{userSig:"usersig",subCmd:"sub_cmd",cmd:"cmd",duration:"duration",version:"version"},res:{expired_time:"expiredTime",bucket_name:"bucketName",session_token:"sessionToken",tmp_secret_id:"secretId",tmp_secret_key:"secretKey"}}}),this._map.set(Gn.COS_PRE_SIG,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.COS_PRE_SIG)}),body:{fileType:void 0,fileName:void 0,uploadMethod:0,duration:900},keyMap:{req:{userSig:"usersig",fileType:"file_type",fileName:"file_name",uploadMethod:"upload_method"},res:{expired_time:"expiredTime",request_id:"requestId",head_url:"headUrl",upload_url:"uploadUrl",download_url:"downloadUrl",ci_url:"ciUrl",snapshot_url:"requestSnapshotUrl"}}}),this._map.set(Gn.SIMPLE_COS_PRE_SIG,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.SIMPLE_COS_PRE_SIG)}),body:{uploadMethod:0,platform:2,SDKAppID:0,userID:"",conversationType:1,uploadConfig:[{fileID:1,fileType:1,fileName:""}]},keyMap:{req:{platform:"uint32_platform",SDKAppID:"uint32_sdkappid",userID:"str_user_id",uploadMethod:"uint32_upload_method",conversationType:"uint32_scene",uploadConfig:"rpt_upload_object",fileID:"uint32_file_id",fileType:"uint32_file_type",fileName:"str_file_name"},res:{str_final_ip:"uploadIP",rpt_pre_sig:"preSig",uint32_file_id:"fileID",uint32_exist_flag:"existFlag",str_download_url:"downloadUrl",str_upload_url:"uploadUrl",str_snapshot_url:"requestSnapshotUrl",str_file_key:"fileKey"}}}),this._map.set(Gn.GET_IMAGE_INFO,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.GET_IMAGE_INFO)}),body:{imageUrl:""},keyMap:{req:{imageUrl:"str_image_url"},res:{rpt_msg_image_info:"imageInfoArray",uint32_image_type:"type",str_url:"url",uint32_width:"width",uint32_height:"height",str_image_format:"imageFormat"}}}),this._map.set(Gn.GET_IP,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.GET_IP)}),body:{domainName:""},keyMap:{req:{domainName:"str_domain"},res:{str_final_ip:"ip"}}}),this._map.set(Gn.VIDEO_COVER,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.VIDEO_COVER)}),body:{version:1,platform:void 0,coverName:void 0,requestSnapshotUrl:void 0},keyMap:{req:{version:"version",platform:"platform",coverName:"cover_name",requestSnapshotUrl:"snapshot_url"},res:{error_code:"errorCode",error_msg:"errorInfo",download_url:"snapshotUrl"}}}),this._map.set(Gn.FETCH_COMMERCIAL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.FETCH_COMMERCIAL_CONFIG)}),body:{SDKAppID:0},keyMap:{req:{SDKAppID:"uint32_sdkappid"},res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}}),this._map.set(Gn.PUSHED_COMMERCIAL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.PUSHED_COMMERCIAL_CONFIG)}),body:{},keyMap:{res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}}),this._map.set(Gn.FETCH_CLOUD_CTRL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.FETCH_CLOUD_CTRL_CONFIG)}),body:{SDKAppID:0,version:0},keyMap:{req:{SDKAppID:"uint32_sdkappid",version:"uint64_version"},res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}}),this._map.set(Gn.PUSHED_CLOUD_CTRL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.PUSHED_CLOUD_CTRL_CONFIG)}),body:{},keyMap:{res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}}),this._map.set(Gn.OVERLOAD_NOTIFY,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OVERLOAD_PUSH,".").concat(Gn.OVERLOAD_NOTIFY)}),body:{},keyMap:{res:{OverLoadServCmd:"overloadCommand",DelaySecs:"waitingTime"}}}),this._map.set(Gn.SYNC_UNREAD_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SYNC_UNREAD_MSG)}),body:{cookie:"",syncFlag:0,needAbstract:1,isOnlineSync:0,needSignaling:1,needCachedMsg:1},keyMap:{req:{fromAccount:"From_Account",toAccount:"To_Account",from:"From_Account",to:"To_Account",time:"MsgTimeStamp",sequence:"MsgSeq",random:"MsgRandom",elements:"MsgBody"},res:{MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",ClientSeq:"clientSequence",MsgSeq:"sequence",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgRandom:"random",MsgTimeStamp:"time",MsgContent:"content",ToGroupId:"to",MsgKey:"messageKey",GroupTips:"groupTips",MsgBody:"elements",MsgType:"type",C2CRemainingUnreadCount:"C2CRemainingUnreadList",C2CPairUnreadCount:"C2CPairUnreadList"}}}),this._map.set(Gn.GET_PROFANITY_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_MSG_AUDIT_MGR,".").concat(Gn.GET_PROFANITY_LIST)}),body:{version:0,deviceID:"",startIndex:void 0},keyMap:{req:{version:"uint64_version",deviceID:"str_device_id",startIndex:"uint64_start_index"},res:{msg_cmd_error_code:"errorInfo",str_err_msg:"errorMessage",uint32_code:"errorCode",msg_scene_ctl_config:"filterConfig",uint64_c2c_custom_msg_flag:"c2c_custom_message",uint64_c2c_text_msg_flag:"c2c_text_message",uint64_group_custom_msg_flag:"group_custom_message",uint64_group_text_msg_flag:"group_text_message",uint64_group_info_flag:"group_profile",uint64_group_member_info_flag:"group_member_profile",uint64_relation_chain_flag:"sns",uint64_user_info_flag:"user_profile",rpt_msg_dirty_word:"lexicon",str_dirty_word:"profanity",str_replaced_content:"replacement",uint64_filter_type:"filterType",uint64_id:"id",uint64_word_type:"profanityType",uint64_complete_flag:"completeFlag",uint64_next_start_index:"nextStartIndex",uint64_version:"version",uint64_expired_time:"expiredTime"}}}),this._map.set(Gn.SEND_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SEND_C2C_MSG)}),body:{fromAccount:"",toAccount:"",msgSeq:0,msgRandom:0,msgBody:[],cloudCustomData:void 0,nick:"",avatar:"",msgLifeTime:void 0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{sound:"",badgeMode:0,isVoipPush:void 0,image:""},androidInfo:{sound:"",XiaoMiChannelID:"",OPPOChannelID:"",GoogleChannelID:"",VIVOClassification:1,VIVOCategory:"",HuaWeiCategory:"",HuaWeiImage:"",HonorImage:"",GoogleImage:""}},messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,isSupportExtension:0,isRelayMessage:0,cmConfigID:void 0},keyMap:{req:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",count:"MaxCnt",lastMessageTime:"LastMsgTime",messageKey:"MsgKey",peerAccount:"Peer_Account",data:"Data",description:"Desc",extension:"Ext",type:"MsgType",content:"MsgContent",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",nick:"From_AccountNick",avatar:"From_AccountHeadurl",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"IsNeedReadReceipt",GoogleChannelID:"GoogleChannelID",XiaoMiChannelID:"XiaoMiChannelID"}}}),this._map.set(Gn.SEND_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SEND_GRP_MSG)}),body:{fromAccount:"",groupID:"",random:0,clientSequence:0,priority:"",msgBody:[],cloudCustomData:void 0,onlineOnlyFlag:0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{sound:"",badgeMode:0,isVoipPush:void 0,image:""},androidInfo:{sound:"",XiaoMiChannelID:"",OPPOChannelID:"",GoogleChannelID:"",VIVOClassification:1,VIVOCategory:"",HuaWeiCategory:"",HuaWeiImage:"",HonorImage:"",GoogleImage:""}},groupAtInfo:[],messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,topicID:void 0,receiverList:void 0,isSupportExtension:0,isRelayMessage:0,cmConfigID:void 0},keyMap:{req:{to:"GroupId",extension:"Ext",data:"Data",description:"Desc",random:"Random",sequence:"ReqMsgSeq",count:"ReqMsgNumber",type:"MsgType",priority:"MsgPriority",content:"MsgContent",elements:"MsgBody",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",clientSequence:"ClientSeq",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"NeedReadReceipt",receiverList:"To_Account",GoogleChannelID:"GoogleChannelID",XiaoMiChannelID:"XiaoMiChannelID"},res:{MsgTime:"time",MsgSeq:"sequence"}}}),this._map.set(Gn.REVOKE_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.REVOKE_C2C_MSG)}),body:{msgInfo:{fromAccount:"",toAccount:"",msgTimeStamp:0,msgSeq:0,msgRandom:0}},keyMap:{req:{msgInfo:"MsgInfo",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom"}}}),this._map.set(Gn.REVOKE_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.REVOKE_GRP_MSG)}),body:{groupID:"",msgSeqList:void 0,topicID:""},keyMap:{req:{msgSeqList:"MsgSeqList",msgSeq:"MsgSeq"}}}),this._map.set(Gn.GET_C2C_ROAMING_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.GET_C2C_ROAMING_MSG)}),body:{peerAccount:"",count:15,lastMessageTime:0,messageKey:"",withRecalledMessage:1,direction:0},keyMap:{req:{messageKey:"MsgKey",peerAccount:"Peer_Account",count:"MaxCnt",lastMessageTime:"LastMsgTime",withRecalledMessage:"WithRecalledMsg",direction:"GetDirection"},res:{LastMsgTime:"lastMessageTime",IsNeedReadReceipt:"needReadReceipt",IsPeerRead:"readReceiptSentByPeer"}}}),this._map.set(Gn.MODIFY_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.MODIFY_C2C_MSG)}),body:{from:"",to:"",sequence:0,random:0,time:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{req:{sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}}),this._map.set(Gn.GET_GRP_ROAMING_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_ROAMING_MSG)}),body:{withRecalledMsg:1,groupID:"",count:15,sequence:"",topicID:void 0},keyMap:{req:{sequence:"ReqMsgSeq",count:"ReqMsgNumber",withRecalledMessage:"WithRecalledMsg"},res:{Random:"random",MsgTime:"time",MsgSeq:"sequence",ReqMsgSeq:"sequence",RspMsgList:"messageList",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgPriority:"priority",MsgBody:"elements",MsgType:"type",MsgContent:"content",IsFinished:"complete",Download_Flag:"downloadFlag",ClientSeq:"clientSequence",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",ToTopicId:"topicID",InvisibleMsgSeq:"invisibleSequenceList",NextReqMsgSeq:"nextSequence"}}}),this._map.set(Gn.SET_C2C_MSG_READ,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SET_C2C_MSG_READ)}),body:{C2CMsgReaded:void 0},keyMap:{req:{lastMessageTime:"LastedMsgTime"}}}),this._map.set(Gn.SET_C2C_PEER_MUTE_NOTIFICATIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SET_C2C_PEER_MUTE_NOTIFICATIONS)}),body:{userIDList:void 0,muteFlag:0},keyMap:{req:{userIDList:"Peer_Account",muteFlag:"Mute_Notifications"}}}),this._map.set(Gn.GET_C2C_PEER_MUTE_NOTIFICATIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.GET_C2C_PEER_MUTE_NOTIFICATIONS)}),body:{toAccount:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Peer_Account"},res:{MuteNotificationsList:"muteFlagList"}}}),this._map.set(Gn.SET_GRP_MSG_READ,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SET_GRP_MSG_READ)}),body:{groupID:void 0,messageReadSeq:void 0,topicID:void 0},keyMap:{req:{messageReadSeq:"MsgReadedSeq"}}}),this._map.set(Gn.SET_ALL_MSG_READ,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SET_ALL_MSG_READ)}),body:{readAllC2CMessage:0,groupMessageReadInfoList:[]},keyMap:{req:{readAllC2CMessage:"C2CReadAllMsg",groupMessageReadInfoList:"GroupReadInfo",messageSequence:"MsgSeq"},res:{C2CReadAllMsg:"readAllC2CMessage",GroupReadInfoArray:"groupMessageReadInfoList"}}}),this._map.set(Gn.DEL_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.DEL_C2C_MSG)}),body:{fromAccount:"",to:"",keyList:void 0},keyMap:{req:{keyList:"MsgKeyList"}}}),this._map.set(Gn.DEL_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DEL_GRP_MSG)}),body:{groupID:"",deleter:"",keyList:void 0,topicID:void 0},keyMap:{req:{deleter:"Deleter_Account",keyList:"Seqs"}}}),this._map.set(Gn.TRANSLATE_TEXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_TRANSLATE,".").concat(Gn.TRANSLATE_TEXT)}),body:{sourceTextList:void 0,SDKAppID:0,from:0,source:"",target:""},keyMap:{req:{sourceTextList:"SourceText",SDKAppID:"SdkAppId",from:"FromAccount"},res:{TargetText:"translatedTextList",RequestId:"requestID",CmdErrorCode:"error",ErrorCode:"code",ErrorInfo:"message"}}}),this._map.set(Gn.VOICE_TO_TEXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_SPEECH,".").concat(Gn.VOICE_TO_TEXT)}),body:{url:"",SDKAppID:0,format:"",sourceType:0,language:""},keyMap:{req:{url:"BytesUrl",SDKAppID:"Uint32Sdkappid",format:"BytesVoiceFormat",sourceType:"Uint64SourceType",language:"BytesEngServiceType"},res:{BytesRequestid:"requestID",BytesResult:"result",CmdErrorCode:"error",ErrorCode:"code",ErrorInfo:"message"}}}),this._map.set(Gn.MODIFY_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.MODIFY_GRP_MSG)}),body:{groupID:"",topicID:void 0,sequence:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{req:{sequence:"MsgSeq",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}}),this._map.set(Gn.GET_READ_RECEIPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_READ_RECEIPT)}),body:{groupID:"",sequenceList:void 0},keyMap:{req:{sequence:"MsgSeq"}}}),this._map.set(Gn.SEND_C2C_READ_RECEIPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SEND_C2C_READ_RECEIPT)}),body:{peerAccount:"",messageInfoList:void 0},keyMap:{req:{peerAccount:"Peer_Account",messageInfoList:"C2CMsgInfo",fromAccount:"From_Account",toAccount:"To_Account",sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",clientTime:"MsgClientTime"}}}),this._map.set(Gn.SEND_READ_RECEIPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SEND_READ_RECEIPT)}),body:{groupID:"",sequenceList:void 0},keyMap:{req:{sequenceList:"MsgSeqList",sequence:"MsgSeq"}}}),this._map.set(Gn.GET_READ_RECEIPT_DETAIL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_READ_RECEIPT_DETAIL)}),body:{groupID:"",sequence:void 0,flag:0,cursor:0,count:0},keyMap:{req:{sequence:"MsgSeq",count:"Num"},res:{ReadList:"readUserIDList",Read_Account:"userID",UnreadList:"unreadUserIDList",Unread_Account:"userID",IsFinish:"isCompleted"}}}),this._map.set(Gn.MODIFY_C2C_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.MODIFY_C2C_MSG_EXT)}),body:{from:void 0,to:void 0,messageKey:void 0,operateType:void 0,extensionList:void 0}}),this._map.set(Gn.GET_C2C_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_C2C_MSG_EXT)}),body:{from:void 0,to:void 0,messageKey:void 0,startSequence:void 0}}),this._map.set(Gn.MODIFY_GRP_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.MODIFY_GRP_MSG_EXT)}),body:{groupID:void 0,topicID:void 0,messageSequence:void 0,operateType:void 0,extensionList:void 0}}),this._map.set(Gn.GET_GRP_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_GRP_MSG_EXT)}),body:{groupID:void 0,topicID:void 0,messageSequence:void 0,startSequence:void 0}}),this._map.set(Gn.MSG_CLOUD_SEARCH,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.MSG_SEARCH,".").concat(Gn.MSG_CLOUD_SEARCH)}),body:{keywordList:void 0,keywordListMatchType:"or",account:void 0,groupID:void 0,count:100,cursor:void 0,messageTypeList:void 0,senderUserIDList:void 0,startTime:void 0,endTime:void 0},keyMap:{req:{keywordListMatchType:"MatchType",account:"PeerAccount",groupID:"GroupID",messageTypeList:"MsgTypeList",senderUserIDList:"SendUserIDList"},res:{GroupID:"groupID",UserID:"userID",Count:"messageCount",LastMsgTime:"lastMessageTime",ConversationMsgs:"searchResult",IsNeedReadReceipt:"needReadReceipt",IsPeerRead:"readReceiptSentByPeer",MsgSeq:"sequence",ReqMsgSeq:"sequence",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgContent:"content",ClientSeq:"clientSequence",ToTopicId:"topicID",InvisibleMsgSeq:"invisibleSequenceList",ErrorCode:"code",ErrorInfo:"message"}}}),this._map.set(Gn.ADD_C2C_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.ADD_C2C_MSG_REACTION)}),body:{from:void 0,to:void 0,reactionID:void 0,messageKey:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Add_Account"}}}),this._map.set(Gn.RM_C2C_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.RM_C2C_MSG_REACTION)}),body:{from:void 0,to:void 0,reactionID:void 0,messageKey:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Del_Account"}}}),this._map.set(Gn.GET_C2C_MSG_REACTIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_C2C_MSG_REACTIONS)}),body:{from:void 0,to:void 0,messageKeyList:void 0,count:void 0}}),this._map.set(Gn.GET_C2C_MSG_REACTION_USER_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_C2C_MSG_REACTION_USER_LIST)}),body:{from:void 0,to:void 0,reactionID:void 0,messageKey:void 0,count:void 0}}),this._map.set(Gn.ADD_GRP_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.ADD_GRP_MSG_REACTION)}),body:{groupID:void 0,topicID:void 0,reactionID:void 0,messageSequence:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Add_Account"}}}),this._map.set(Gn.RM_GRP_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.RM_GRP_MSG_REACTION)}),body:{groupID:void 0,topicID:void 0,reactionID:void 0,messageSequence:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Del_Account"}}}),this._map.set(Gn.GET_GRP_MSG_REACTIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_GRP_MSG_REACTIONS)}),body:{groupID:void 0,topicID:void 0,messageSequenceList:void 0,count:void 0},keyMap:{res:{MsgSeq:"messageSequence"}}}),this._map.set(Gn.GET_GRP_MSG_REACTION_USER_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_GRP_MSG_REACTION_USER_LIST)}),body:{groupID:void 0,topicID:void 0,reactionID:void 0,messageSequence:void 0,nextSeq:void 0,count:void 0}}),this._map.set(Gn.GET_C2C_PEER_READ_TIME,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.GET_C2C_PEER_READ_TIME)}),body:{userIDList:void 0},keyMap:{req:{userIDList:"To_Account"},res:{ReadTime:"peerReadTimeList"}}}),this._map.set(Gn.PAGING_GET_CONV_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.PAGING_GET_CONV_LIST)}),body:{fromAccount:void 0,timeStamp:void 0,startIndex:void 0,pinnedTimeStamp:void 0,pinnedStartIndex:void 0,orderType:void 0,messageAssistFlag:15,assistFlag:31},keyMap:{req:{messageAssistFlag:"MsgAssistFlags",assistFlag:"AssistFlags",pinnedTimeStamp:"TopTimeStamp",pinnedStartIndex:"TopStartIndex"},res:{SessionItem:"conversations",ToAccount:"groupID",To_Account:"userID",UnreadMsgCount:"unreadCount",MsgGroupReadedSeq:"messageReadSeq",C2cPeerReadTime:"c2cPeerReadTime",LastMsgFlags:"lastMessageFlag",TopFlags:"isPinned",TopTimeStamp:"pinnedTimeStamp",TopStartIndex:"pinnedStartIndex",GroupId:"convGroupID",C2cRemark:"friendRemark",MsgRecvOption:"messageRemindType",GroupIgnoredUnreadSeqCount:"noUnreadCount",GroupNextMsgSeq:"nextMessageSeq"}}}),this._map.set(Gn.DEL_CONV,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.DEL_CONV)}),body:{fromAccount:"",conversationList:void 0,clearHistoryMessage:void 0},keyMap:{req:{toGroupID:"ToGroupid",clearHistoryMessage:"ClearRamble",conversationList:"ContactItem"},res:{ResultItem:"resultList",ToGroupid:"groupID",ResultCode:"code",ResultInfo:"info"}}}),this._map.set(Gn.CLEAR_HISTORY_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.CLEAR_HISTORY_MSG)}),body:{fromAccount:"",toAccount:void 0,type:1,toGroupID:void 0},keyMap:{req:{toGroupID:"ToGroupid"}}}),this._map.set(Gn.PIN_CONV,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.PIN_CONV)}),body:{fromAccount:"",operationType:1,itemList:void 0},keyMap:{req:{itemList:"RecentContactItem"}}}),this._map.set(Gn.DEL_GROUP_AT_TIPS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.DEL_GROUP_AT_TIPS)}),body:{messageListToDelete:void 0},keyMap:{req:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}}),this._map.set(Gn.SET_CONV_CUSTOM_DATA,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.MARK_CONV)}),body:{fromAccount:"",itemList:void 0},keyMap:{req:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},res:{ToGroupId:"groupID",OptType:"operationType"}}}),this._map.set(Gn.MARK_CONV,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.MARK_CONV)}),body:{fromAccount:"",itemList:void 0},keyMap:{req:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},res:{ToGroupId:"groupID",OptType:"operationType"}}}),this._map.set(Gn.CREATE_CONV_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.CREATE_CONV_GRP)}),body:{fromAccount:"",itemList:void 0},keyMap:{req:{itemList:"GroupContactItem",groupID:"ToGroupId"},res:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType"}}}),this._map.set(Gn.DEL_CONV_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.DEL_CONV_GRP)}),body:{fromAccount:"",groupName:void 0},keyMap:{res:{GroupId:"convGroupID"}}}),this._map.set(Gn.RENAME_CONV_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.RENAME_CONV_GRP)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0},keyMap:{req:{oldName:"OldGroupName",newName:"NewGroupName",groupID:"ToGroupId",operationType:"ContactOptType",groupName:"OldGroupName",updateItem:"ContactUpdateItem"},res:{ContactOptType:"operationType",ToGroupId:"groupID",GroupId:"convGroupID"}}}),this._map.set(Gn.ADD_CONV_TO_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.RENAME_CONV_GRP)}),body:{fromAccount:"",updateType:void 0,updateGroup:{groupName:void 0,updateGroupType:void 0,updateItem:void 0}}}),this._map.set(Gn.DEL_CONV_FROM_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.RENAME_CONV_GRP)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0}}),this._map.set(Gn.GET_CONV_GRP_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.GET_CONV_GRP_LIST)}),body:{fromAccount:"",startIndex:void 0},keyMap:{res:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType",CustomMark:"customData",ContactGroupId:"convGroupIDList"}}}),this._map.set(Gn.SEARCH_CONV_GRP_MARK,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.SEARCH_CONV_GRP_MARK)}),body:{fromAccount:"",contactItem:void 0},keyMap:{req:{groupID:"ToGroupId"},res:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType",CustomMark:"customData",ContactGroupId:"convGroupIDList",ContactResultItem:"contactItem"}}}),this._map.set(Gn.GET_USER_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.PROFILE,".").concat(Gn.GET_USER_PROFILE)}),body:{fromAccount:"",userItem:[]},keyMap:{req:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}}),this._map.set(Gn.UPDATE_MY_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.PROFILE,".").concat(Gn.UPDATE_MY_PROFILE)}),body:{fromAccount:"",profileItem:[{tag:Oe.NICK,value:""},{tag:Oe.GENDER,value:""},{tag:Oe.ALLOWTYPE,value:""},{tag:Oe.AVATAR,value:""}]},keyMap:{req:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}}),this._map.set(Gn.GET_BL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_BL)}),body:{fromAccount:"",startIndex:0,maxLimited:30,lastSequence:0},keyMap:{res:{CurruentSequence:"currentSequence"}}}),this._map.set(Gn.ADD_TO_BL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.ADD_TO_BL)}),body:{fromAccount:"",toAccount:[]}}),this._map.set(Gn.RM_FROM_BL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.RM_FROM_BL)}),body:{fromAccount:"",toAccount:[]}}),this._map.set(Gn.SET_SELF_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.SET_SELF_STATUS)}),body:{customStatus:""}}),this._map.set(Gn.GET_USER_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.GET_USER_STATUS)}),body:{userIDList:void 0},keyMap:{res:{UserStatusList:"successUserList",ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID",Status:"statusType"}}}),this._map.set(Gn.SUB_USER_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.SUB_USER_STATUS)}),body:{userIDList:void 0},keyMap:{res:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}}),this._map.set(Gn.UNSUB_USER_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.UNSUB_USER_STATUS)}),body:{userIDList:void 0,unsubscribeAll:void 0},keyMap:{res:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}}),this._map.set(Gn.GET_FD_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_LIST)}),body:{fromAccount:"",startIndex:0,standardSequence:0,customSequence:0},keyMap:{res:{FriendNum:"friendCount",UserDataItem:"resultList",ValueItem:"tagValueList"}}}),this._map.set(Gn.ADD_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.ADD_FD)}),body:{fromAccount:"",addFriendItem:[],type:""},keyMap:{req:{source:"AddSource",wording:"AddWording",type:"AddType"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.UPDATE_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.UPDATE_FD)}),body:{fromAccount:"",updateItem:void 0},keyMap:{req:{snsItem:"SnsItem"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.DEL_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.DEL_FD)}),body:{fromAccount:"",userIDList:[],type:""},keyMap:{req:{type:"DeleteType"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.GET_FD_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_PROFILE)}),body:{fromAccount:"",userIDList:void 0},keyMap:{res:{InfoItem:"resultList",SnsProfileItem:"tagValueList"}}}),this._map.set(Gn.CHECK_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.CHECK_FD)}),body:{fromAccount:"",userIDList:[],type:""},keyMap:{req:{type:"CheckType"},res:{InfoItem:"resultList"}}}),this._map.set(Gn.GET_FD_APPLICATION_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_APPLICATION_LIST)}),body:{fromAccount:"",applicationType:"",startTime:0,maxLimited:0,lastSequence:0},keyMap:{res:{PendencyItem:"resultList",AddSource:"source",AddTime:"time",AddWording:"wording",Image:"avatar",UnreadPendencyCount:"unreadCount",To_Account:"userID",PendencyType:"type"}}}),this._map.set(Gn.RESPOND_FD_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.RESPOND_FD_APPLICATION)}),body:{fromAccount:"",responseFriendItem:[]},keyMap:{req:{tag:"TagName",action:"ResponseAction"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.DEL_FD_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.DEL_FD_APPLICATION)}),body:{fromAccount:"",type:"",userIDList:void 0},keyMap:{req:{type:"PendencyType",userIDList:"To_Account"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.REPORT_FD_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.REPORT_FD_APPLICATION)}),body:{fromAccount:"",latestTimeStamp:""},keyMap:{req:{latestTimeStamp:"LatestPendencyTimeStamp"}}}),this._map.set(Gn.CREATE_FD_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.CREATE_FD_GRP)}),body:{fromAccount:"",groupName:void 0,userIDList:void 0},keyMap:{req:{groupName:"GroupName",userIDList:"To_Account"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.DEL_FD_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.DEL_FD_GRP)}),body:{fromAccount:"",nameList:void 0},keyMap:{req:{nameList:"GroupName"}}}),this._map.set(Gn.GET_FD_GRP_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_GRP_LIST)}),body:{fromAccount:"",lastSequence:0,needFriend:"Need_Friend_Type_Yes"},keyMap:{res:{ResultItem:"resultList",GroupName:"name",FriendNumber:"friendCount",To_Account:"userIDList"}}}),this._map.set(Gn.UPDATE_FD_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.UPDATE_FD_GRP)}),body:{fromAccount:"",oldName:"",newName:void 0,updateGroupItem:void 0},keyMap:{req:{oldName:"GroupOldName",newName:"GroupNewName"},res:{UpdateType:"type",ResultItem:"resultList"}}}),this._map.set(Gn.GET_GRP_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_LIST)}),body:{memberAccount:"",limit:void 0,offset:void 0,groupType:void 0,responseFilter:{groupBaseInfoFilter:void 0,selfInfoFilter:void 0},isSupportTopic:0,needAppDefineData:1},keyMap:{req:{memberAccount:"Member_Account"},res:{GroupIdList:"groups",MsgSeq:"readedSequence",LastRecallTime:"_lastRevokedTime",AppDefinedData:"groupCustomField"}}}),this._map.set(Gn.GET_GRP_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_PROFILE)}),body:{groupIDList:void 0,responseFilter:{groupBaseInfoFilter:void 0,groupCustomFieldFilter:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0}},keyMap:{req:{groupIDList:"GroupIdList",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",groupCustomFieldFilter:"AppDefinedDataFilter_Group",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},res:{GroupIdList:"groups",AppDefinedData:"groupCustomField",AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_Group:"groupCustomFieldFilter",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",InfoSeq:"infoSequence",MemberList:"members",GroupInfo:"groups",ShutUpUntil:"muteUntil",ShutUpAllMember:"muteAllMembers"}}}),this._map.set(Gn.CREATE_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.CREATE_GRP)}),body:{type:void 0,name:void 0,groupID:void 0,ownerID:void 0,introduction:void 0,notification:void 0,maxMemberNum:void 0,joinOption:void 0,memberList:void 0,groupCustomField:void 0,memberCustomField:void 0,webPushFlag:1,avatar:"",isSupportTopic:void 0,inviteOption:void 0},keyMap:{req:{ownerID:"Owner_Account",userID:"Member_Account",avatar:"FaceUrl",maxMemberNum:"MaxMemberCount",joinOption:"ApplyJoinOption",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",inviteOption:"InviteJoinOption"},res:{HugeGroupFlag:"avChatRoomFlag",OverJoinedGroupLimit_Account:"overLimitUserIDList"}}}),this._map.set(Gn.DISMISS_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DISMISS_GRP)}),body:{groupID:void 0}}),this._map.set(Gn.UPDATE_GRP_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.UPDATE_GRP_PROFILE)}),body:{groupID:void 0,name:void 0,introduction:void 0,notification:void 0,avatar:void 0,joinOption:void 0,groupCustomField:void 0,muteAllMembers:void 0,inviteOption:void 0},keyMap:{req:{groupCustomField:"AppDefinedData",muteAllMembers:"ShutUpAllMember",joinOption:"ApplyJoinOption",avatar:"FaceUrl",inviteOption:"InviteJoinOption"},res:{AppDefinedData:"groupCustomField",ShutUpAllMember:"muteAllMembers"}}}),this._map.set(Gn.APPLY_JOIN_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.APPLY_JOIN_GRP)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1,historyMessageFlag:void 0},keyMap:{req:{applyMessage:"ApplyMsg",historyMessageFlag:"HugeGroupHistoryMsgFlag"},res:{HugeGroupFlag:"avChatRoomFlag",AVChatRoomKey:"avChatRoomKey",RspMsgList:"messageList",ToGroupId:"to"}}}),this._map.set(Gn.APPLY_JOIN_GRP_NOAUTH,(e.a2,e.tinyid,{head:t(t({},h(e,da)),{},{servcmd:"".concat(P.NAME.BIG_GRP_NO_AUTH,".").concat(Gn.APPLY_JOIN_GRP)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1},keyMap:{req:{applyMessage:"ApplyMsg"},res:{HugeGroupFlag:"avChatRoomFlag"}}})),this._map.set(Gn.QUIT_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.QUIT_GRP)}),body:{groupID:void 0}}),this._map.set(Gn.SEARCH_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SEARCH_GRP)}),body:{groupIDList:void 0,responseFilter:{groupBasePublicInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","CreateTime","Owner_Account","LastInfoTime","LastMsgTime","NextMsgSeq","MemberNum","MaxMemberNum","ApplyJoinOption","InviteJoinOption"]}}}),this._map.set(Gn.CHANGE_GRP_OWNER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.CHANGE_GRP_OWNER)}),body:{groupID:void 0,newOwnerID:void 0},keyMap:{req:{newOwnerID:"NewOwner_Account"}}}),this._map.set(Gn.HANDLE_GRP_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.HANDLE_GRP_APPLICATION)}),body:{groupID:void 0,applicant:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{req:{applicant:"Applicant_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}}),this._map.set(Gn.HANDLE_INVITE_JOIN_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.HANDLE_INVITE_JOIN_GRP)}),body:{groupID:void 0,applicant:void 0,invitee:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,userDefinedField:void 0},keyMap:{req:{applicant:"Applicant_Account",invitee:"Invited_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg"}}}),this._map.set(Gn.HANDLE_GRP_INVITATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.HANDLE_GRP_INVITATION)}),body:{groupID:void 0,inviter:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{req:{inviter:"Inviter_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}}),this._map.set(Gn.GET_GRP_PENDENCY,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_PENDENCY)}),body:{startTime:void 0,limit:void 0,handleAccount:void 0},keyMap:{req:{handleAccount:"Handle_Account"},res:{To_Account:"userID",ApplyInviteMsg:"note"}}}),this._map.set(Gn.DEL_GRP_SYSTEM_NOTICE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.DEL_GRP_SYSTEM_NOTICE)}),body:{messageListToDelete:void 0},keyMap:{req:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}}),this._map.set(Gn.AV_POLLING,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.BIG_GRP_POLLING,".").concat(Gn.AV_POLLING)}),body:{USP:1,startSeq:1,startBroadcastSeq:void 0,holdTime:90,key:void 0,simplifiedMessage:void 0},keyMap:{req:{USP:"USP"},res:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}}),this._map.set(Gn.AV_NOAUTH_POLLING,(e.a2,e.tinyid,{head:t(t({},h(e,pa)),{},{servcmd:"".concat(P.NAME.BIG_GRP_POLLING_NO_AUTH,".").concat(Gn.AV_POLLING)}),body:{USP:1,startSeq:1,holdTime:90,key:void 0,simplifiedMessage:void 0},keyMap:{req:{USP:"USP"},res:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}})),this._map.set(Gn.GET_ONLINE_MBR_NUM,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_ONLINE_MBR_NUM)}),body:{groupID:void 0},keyMap:{res:{OnlineMemberNum:"memberCount"}}}),this._map.set(Gn.SET_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SET_GRP_ATTR)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{req:{key:"key",value:"value"}}}),this._map.set(Gn.MODIFY_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.MODIFY_GRP_ATTR)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{req:{key:"key",value:"value"}}}),this._map.set(Gn.DEL_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DEL_GRP_ATTR)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{req:{key:"key"}}}),this._map.set(Gn.CLEAR_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.CLEAR_GRP_ATTR)}),body:{groupID:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]}}),this._map.set(Gn.GET_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_ATTR,".").concat(Gn.GET_GRP_ATTR)}),body:{groupID:void 0,avChatRoomKey:void 0,groupType:1},keyMap:{req:{avChatRoomKey:"Key",groupType:"GroupType"}}}),this._map.set(Gn.GET_GRP_NOTIFY,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_NOTIFY)}),body:{notifyReqList:[]},keyMap:{req:{notifyReqList:"NotifyReqList"},res:{NextMsgTime:"nextRevokedTime",NotifyMsgList:"notifyList",NotifyRspList:"notifyRspList"}}}),this._map.set(Gn.UPDATE_GRP_COUNTER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.UPDATE_GRP_COUNTER)}),body:{groupID:void 0,counterList:void 0,avChatRoomKey:void 0,mode:void 0},keyMap:{req:{counterList:"GroupCounter"}}}),this._map.set(Gn.GET_GRP_COUNTER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_COUNTER)}),body:{groupID:void 0,keyList:[],avChatRoomKey:void 0},keyMap:{req:{keyList:"GroupCounterKeys"}}}),this._map.set(Gn.CREATE_TOPIC,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.CREATE_TOPIC)}),body:{groupID:void 0,topicName:void 0,avatar:void 0,customData:void 0,topicID:void 0,notification:void 0,introduction:void 0},keyMap:{req:{avatar:"FaceUrl"}}}),this._map.set(Gn.DEL_TOPIC,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.DEL_TOPIC)}),body:{groupID:void 0,topicIDList:void 0},keyMap:{req:{topicIDList:"TopicIdList"},res:{DestroyResultItem:"resultList"}}}),this._map.set(Gn.UPDATE_TOPIC_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.UPDATE_TOPIC_PROFILE)}),body:{groupID:void 0,topicID:void 0,avatar:void 0,customData:void 0,notification:void 0,introduction:void 0,muteAllMembers:void 0,topicName:void 0},keyMap:{req:{avatar:"FaceUrl",muteAllMembers:"ShutUpAllMember"}}}),this._map.set(Gn.GET_TOPIC_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.GET_TOPIC_LIST)}),body:{groupID:void 0,topicIDList:void 0,MemberInfoFilter:["NoUnreadSeqList"]},keyMap:{req:{topicIDList:"TopicIdList"},res:{TopicAndSelfInfo:"topicInfoList",TopicInfo:"topic",GroupID:"groupID",ShutUpTime:"muteTime",ShutUpAllFlag:"muteAllMembers",LastMsgTime:"lastMessageTime",MsgSeq:"readedSequence",LastMsgSeq:"sequence"}}}),this._map.set(Gn.GET_GRP_MBR_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_MBR_LIST)}),body:{groupID:void 0,limit:0,offset:void 0,next:void 0,memberRoleFilter:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMap:{req:{memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},res:{AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",MemberList:"members",ShutUpUntil:"muteUntil"}}}),this._map.set(Gn.GET_AV_MBR_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_AV,".").concat(Gn.GET_AV_MBR_LIST)}),body:{groupID:void 0,offset:void 0,filter:void 0},keyMap:{req:{offset:"Timestamp",filter:"Mark"},res:{NextTimestamp:"offset"}}}),this._map.set(Gn.GET_GRP_MBR_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_MBR_PROFILE)}),body:{groupID:void 0,userIDList:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMap:{req:{userIDList:"Member_List_Account",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},res:{MemberList:"members",ShutUpUntil:"muteUntil",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",AppMemberDefinedData:"memberCustomField"}}}),this._map.set(Gn.ADD_GRP_MBR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.ADD_GRP_MBR)}),body:{groupID:void 0,silence:void 0,userIDList:void 0},keyMap:{req:{userID:"Member_Account",userIDList:"MemberList"},res:{MemberList:"members"}}}),this._map.set(Gn.DEL_GRP_MBR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DEL_GRP_MBR)}),body:{groupID:void 0,userIDList:void 0,reason:void 0},keyMap:{req:{userIDList:"MemberToDel_Account"}}}),this._map.set(Gn.BAN_AV_MBR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.BAN_AV_MBR)}),body:{groupID:void 0,userIDList:void 0,duration:void 0,reason:""},keyMap:{req:{userIDList:"Members_Account",duration:"Duration",reason:"Description"}}}),this._map.set(Gn.MODIFY_GRP_MBR_INFO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.MODIFY_GRP_MBR_INFO)}),body:{groupID:void 0,topicID:void 0,userID:void 0,messageRemindType:void 0,nameCard:void 0,role:void 0,memberCustomField:void 0,muteTime:void 0},keyMap:{req:{userID:"Member_Account",memberCustomField:"AppMemberDefinedData",muteTime:"ShutUpTime",messageRemindType:"MsgFlag"}}}),this._map.set(Gn.MARK_AV_MBR_INFO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_AV,".").concat(Gn.MARK_AV_MBR_INFO)}),body:{groupID:void 0,operationType:1,memberList:[]},keyMap:{req:{operationType:"CommandType",memberList:"MemberList",markType:"Marks",userID:"Member_Account"},res:{CommandType:"operationType",Marks:"markType",Member_Account:"userID"}}}),this._map.set(Gn.SSO_STAT,{head:t(t({},o),{},{servcmd:"".concat(P.NAME.IM_OPEN_STAT,".").concat(Gn.SSO_STAT)}),body:{header:{},event:[],quality:[]},keyMap:{req:{SDKType:"sdk_type",SDKVersion:"sdk_version",deviceType:"device_type",platform:"platform",instanceID:"instance_id",traceID:"trace_id",SDKAppID:"sdk_app_id",userID:"user_id",tinyID:"tiny_id",extension:"extension",timestamp:"timestamp",networkType:"network_type",eventType:"event_type",code:"error_code",message:"error_message",moreMessage:"more_message",duplicate:"duplicate",costTime:"cost_time",level:"level",qualityType:"quality_type",reportIndex:"report_index",wholePeriod:"whole_period",totalCount:"total_count",rttCount:"success_count_business",successRateOfRequest:"percent_business",countLessThan1Second:"success_count_business",percentOfCountLessThan1Second:"percent_business",countLessThan3Second:"success_count_platform",percentOfCountLessThan3Second:"percent_platform",successCountOfBusiness:"success_count_business",successRateOfBusiness:"percent_business",successCountOfPlatform:"success_count_platform",successRateOfPlatform:"percent_platform",successCountOfMessageReceived:"success_count_business",successRateOfMessageReceived:"percent_business",avgRTT:"average_value",avgDelay:"average_value",avgValue:"average_value",uiPlatform:"ui_platform"}}}),this._map.set(Gn.PING,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.HEARTBEAT,".").concat(Gn.PING)}),body:{}}),this._map.set(Gn.MSG_PUSH,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_PUSH,".").concat(Gn.MSG_PUSH)}),body:{},keyMap:{res:{C2cMsgArray:"C2CMessageArray",GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",C2cNotifyMsgArray:"C2CNotifyMessageArray",C2cMsgInfo:"C2CReadReceiptArray",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyAdd_Account:"userID",ProfileImNick:"nick",PendencyType:"applicationType",C2CReadAllMsg:"readAllC2CMessage",IsNeedReadReceipt:"needReadReceipt",Status:"statusType"}}}),this._map.set(Gn.MULTI_MSG_PUSH,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_PUSH,".").concat(Gn.MULTI_MSG_PUSH)}),body:{},keyMap:{res:{GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyType:"applicationType"}}}),this._map.set(Gn.MSG_PUSH_ACK,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.MSG_PUSH_ACK)}),body:{sessionData:void 0},keyMap:{req:{sessionData:"SessionData"}}}),this._map.set(Gn.STATUS_FORCE_OFFLINE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.STATUS_FORCE_OFFLINE)}),body:{},keyMap:{res:{C2cNotifyMsgArray:"C2CNotifyMessageArray",NoticeSeq:"noticeSequence",KickoutMsgNotify:"kickoutMsgNotify",NewInstInfo:"newInstanceInfo"}}}),this._map.set(Gn.DOWNLOAD_MERGER_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_LONG_MSG,".").concat(Gn.DOWNLOAD_MERGER_MSG)}),body:{downloadKey:""},keyMap:{res:{Data:"data",Desc:"description",Ext:"extension",Download_Flag:"downloadFlag",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID"}}}),this._map.set(Gn.UPLOAD_MERGER_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_LONG_MSG,".").concat(Gn.UPLOAD_MERGER_MSG)}),body:{messageList:[]},keyMap:{req:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",type:"MsgType",content:"MsgContent",data:"Data",description:"Desc",extension:"Ext",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody"}}}),this._map.set(Gn.FOLLOW,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.FOLLOW)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"FollowItem"},res:{ResultItem:"resultList",To_Account:"userID"}}}),this._map.set(Gn.UNFOLLOW,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.UNFOLLOW)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"To_Account"},res:{ResultItem:"resultList",To_Account:"userID"}}}),this._map.set(Gn.GET_FOLLOW_INFO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.GET_FOLLOW_INFO)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"To_Account"},res:{FollowInfo:"followInfoList",To_Account:"userID",FollowerCount:"followersCount",FollowingCount:"followingCount",MutualFollowingCount:"mutualFollowersCount"}}}),this._map.set(Gn.GET_FOLLOW,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.GET_FOLLOW)}),body:{fromAccount:"",type:1,nextCursor:"",count:500},keyMap:{req:{type:"FollowType",nextCursor:"StartCursor",count:"WantNum"},res:{FollowItem:"resultList",To_Account:"userID",ProfileItem:"profileList"}}}),this._map.set(Gn.CHECK_FOLLOW_TYPE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.CHECK_FOLLOW_TYPE)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"To_Account"},res:{ResultItem:"resultList",To_Account:"userID"}}}),this._map.set(Gn.SET_TOKEN,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.SET_TOKEN)}),body:{tokenID:"",pushMsg:0,sdkAppID:0,businessID:"",deviceBrand:"",deviceToken:"",isTpns:0,isWebUniapp:0,notificationStatus:0,deviceModel:"",systemVersion:"",pushVersion:""},keyMap:{req:{tokenID:"TokenID",pushMsg:"PushMsg",sdkAppID:"EnterVersion",businessID:"BusiID",deviceBrand:"InstType",deviceToken:"VarToken",isTpns:"IsTpns",notificationStatus:"NotificationStatus",deviceModel:"DeviceModel",systemVersion:"SystemVersion",pushVersion:"PushPluginVersion"}}}),this._map.set(Gn.STAT_FOREGROUND,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.STAT_FOREGROUND)}),body:{isWebUniapp:0}}),this._map.set(Gn.STAT_BACKGROUND,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.STAT_BACKGROUND)}),body:{C2CUnread:0,GroupUnread:0,isWebUniapp:0},keyMap:{req:{c2cUnreadCount:"C2cUnread",groupUnreadCount:"GrpUnread"}}}),this._map.set(Gn.PUSH_REPORT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OFFLINE_PUSH_REPORT,".").concat(Gn.PUSH_REPORT)}),body:{eventList:[]},keyMap:{req:{eventList:"UinappPushEvents",type:"EventType",time:"EventTime",pushId:"ClickExt"}}}),this._map.set(Gn.SET_ALL_RECEIVE_MSG_OPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_MSG_LOGIC,".").concat(Gn.SET_ALL_RECEIVE_MSG_OPT)}),body:{startTime:0,endTime:0,isRepeated:0,messageRemindType:0},keyMap:{req:{messageRemindType:"Level"}}}),this._map.set(Gn.GET_ALL_RECEIVE_MSG_OPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_MSG_LOGIC,".").concat(Gn.GET_ALL_RECEIVE_MSG_OPT)}),body:{toAccount:void 0}})}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){return this._map.get(e)}},{key:"update",value:function(){this._fillMap()}},{key:"getKeyMap",value:function(e){return this.has(e)?this.get(e).keyMap||{}:(Ae.w("".concat(this._n,".getKeyMap unknown P:").concat(e)),{})}},{key:"getProtocolData",value:function(e){var t=e.P,n=e.data;if(e=this.get(t),t=null,n){var o,i=this._simpleDeepCopy(e),s=(i=this._updateService(n,i)).body,a=Object.create(null);for(o in s)if(Object.prototype.hasOwnProperty.call(s,o)){if(a[o]=s[o],void 0===n[o])continue;a[o]=n[o]}i.body=a,t=this._getUplinkData(i)}else t=this._getUplinkData(e);return t}},{key:"_getUplinkData",value:function(e){var t=Ot((e=this._dataCleaner(e)).head);return t=Js(e.body,this._getReqKeyMap(t)),e.body=t,e}},{key:"_updateService",value:function(e,t){var n,o,i=Ot(t.head);return this._isFromGroupRequest(t)&&(n=e.type,o=e.groupID,e=void 0===(e=e.groupIDList)?[]:e,ut(o=void 0===o?void 0:o)&&(o=e[0]||""),It({type:n,groupID:o}))&&(t.head.servcmd="".concat(P.NAME.GRP_COMMUNITY,".").concat(i)),t}},{key:"_isFromGroupRequest",value:function(e){return e.head.servcmd.includes(P.NAME.GRP)||e.head.servcmd.includes(P.NAME.GRP_ATTR)}},{key:"_getReqKeyMap",value:function(e){return e=this.getKeyMap(e),t(t({},Bs.req),e.req)}},{key:"_dataCleaner",value:function(e){var t,o=Array.isArray(e)?[]:Object.create(null);for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&Je(t)&&null!==e[t]&&void 0!==e[t]&&("object"!==n(e[t])?o[t]=e[t]:o[t]=this._dataCleaner.bind(this)(e[t]));return o}},{key:"_simpleDeepCopy",value:function(e){for(var t,n=Object.keys(e),o={},i=0,s=n.length;i<s;i++)Ye(e[t=n[i]])?o[t]=Array.from(e[t]):$e(e[t])?o[t]=this._simpleDeepCopy(e[t]):o[t]=e[t];return o}}]),Ca),fa=[Gn.MSG_PUSH_ACK],ga=(s(Ma,[{key:"_onC2CMsgArray",value:function(e){var t=this._sessionM.get(6);e.dataList.forEach((function(e){var t;1===e.isSyncMessage&&(t=e.from,e.from=e.to,e.to=t)})),1===e.needSync&&this._sessionM.get(19).syncOnNeed(),t.onNewMessage({dataList:e.dataList,isInstantMessage:!0})}},{key:"_onC2CMsgModified",value:function(e){this._sessionM.get(6).onMsgModified(e)}},{key:"_onGroupMsgArray",value:function(e){var t=this._sessionM.get(7);t&&t.onNewMessage({event:e.event,dataList:e.dataList,isInstantMessage:!0})}},{key:"_onGroupMsgModified",value:function(e){var t=this._sessionM.get(7);t&&t.onMsgModified(e)}},{key:"_onGroupTips",value:function(e){var t=this._sessionM.get(7);if(t){var n=e.event,o=e.dataList,i=e.isInstantMessage,s=void 0===i||i,a=e.isSyncingEnded;switch(n){case 4:case 6:t.onNewGroupTips({event:n,dataList:o});break;case 5:for(var r=0;r<o.length;r++)if(Ye(o[r].elements.revokedInfos))t.onMsgRevoked({dataList:o});else if(Ye(o[r].elements.groupMessageReadNotice))t.onMsgReadNotice({dataList:o});else{if(!Ye(o[r].elements.readReceiptList)){t.onNewGroupSystemNotice({dataList:o,isInstantMessage:s,isSyncingEnded:a});break}t.onReadReceiptList({dataList:o})}break;case 12:this._sessionM.get(11).onNewGroupAtTips({dataList:o});break;default:Ae.l("".concat(this._n,"._onGroupTips unknown event:").concat(n," dataList:"),o)}}}},{key:"_onC2CNotifyMsgArray",value:function(e){var t,n=this,o=e.dataList;Ye(o)&&(t=this._sessionM.get(6),o.forEach((function(e){var i,s;We(e)&&(e.hasOwnProperty("kickoutMsgNotify")?(i=(s=e.kickoutMsgNotify).kickType,s=void 0===(s=s.newInstanceInfo)?{}:s,1===i?n._sessionM.onMultipleAccountKickedOut(s):2===i?n._sessionM.onMultipleDeviceKickedOut(s):3===i&&n._sessionM.onRestApiKickedOut(s)):e.hasOwnProperty("c2cMessageRevokedNotify")?t&&t.onMsgRevoked({dataList:o}):e.hasOwnProperty("c2cMessageReadReceipt")?t&&t.onMsgReadReceipt({dataList:o}):e.hasOwnProperty("c2cMessageReadNotice")?t&&t.onMsgReadNotice({dataList:o}):e.hasOwnProperty("muteNotificationsSync")&&n._sessionM.get(11).onC2CMsgRemindTypeSynced({dataList:o}))})))}},{key:"_onC2CReadReceiptArray",value:function(e){this._sessionM.get(6).onReadReceiptList(e)}},{key:"_onProfileModified",value:function(e){this._sessionM.get(4).onProfileModified({dataList:e.dataList});var t=this._sessionM.get(8);t&&t.onFriendProfileModified({dataList:e.dataList})}},{key:"_onRelationChainModified",value:function(e){this._sessionM.get(4).onRelationChainModified({dataList:e.dataList});var t=this._sessionM.get(8);t&&t.onRelationChainModified({dataList:e.dataList})}},{key:"_onRecentContact",value:function(e){var t;Ye(e=e.dataList)&&(t=this._sessionM.get(11))&&e.forEach((function(e){var n,o,i=e.pushType;1===i?(n=e.recentContactDeleteItem,t.onConvDeleted(n.recentContactList)):2===i?(n=e.recentContactTopItem,t.onConvPinnedStatus(n.recentContactList,!0)):3===i?(n=e.recentContactTopItem,t.onConvPinnedStatus(n.recentContactList,!1)):4===i?(n=e.recentContactMarkContact,t.onConvMarkUpdated(n.recentContactMarkContactItem)):5===i?(n=e.recentContactCreateContactGroup,t.onConvGroupCreated(n.msgContactGroupContactItem)):6===i?(n=e.recentContactDelContactGroup,t.onConvGroupDeleted(n.msgGroupItem)):7===i&&(i=(n=e.recentContactUpdateContactGroup).updateType,e=n.msgUpdateGroup,n=n.msgUpdateContact,1===i?1===(o=e.updateGroupType)?t.onConvGroupNameUpdated(e):2===o&&t.onConvInGroupUpdated(e):2===i&&t.onConvAddedToOrDeletedFromGroup(n))}))}},{key:"_onAllMsgRead",value:function(e){e=e.dataList;var t=this._sessionM.get(11);t&&t.onPushedAllMessageRead(e)}},{key:"_onUserStatusList",value:function(e){this._sessionM.get(4).onUserStatusUpdated(e)}},{key:"_onMsgExtNotify",value:function(e){this._sessionM.get(3).onMsgExtNotify(e)}},{key:"_onMsgReactionNotifyList",value:function(e){this._sessionM.get(34).onReactionNotifyList(e)}},{key:"_onMsgReactionNotify",value:function(e){this._sessionM.get(34).onReactionNotify(e)}},{key:"_onFollowNotify",value:function(e){this._sessionM.get(35).onFollowNotify(e)}},{key:"_onTopicLatestMsg",value:function(e){this._sessionM.get(10).onTopicLatestMsg(e)}},{key:"onMessage",value:function(e){var t=this,n=e.body;if(this._filterMsgFromIMOpenPush(e)){var o,i=n.eventArray,s=n.isInstantMessage,a=n.isSyncingEnded,r=n.needSync;if(Ye(i))for(var c,u,l,d=0,p=i.length;d<p;d++)100!==(l=(c=i[d]).event)?24!==l?26!==l?(o=Object.keys(c).find((function(e){return-1!==t._keys.indexOf(e)})))?(u=14===l?{readAllC2CMessage:c[o],groupMessageReadInfoList:c.groupMessageReadNotice||[]}:16===l?{userID:c.userID,timestamp:c.timestamp,readReceiptList:c[o]}:c[o],this._eventHandlerMap.get(o)({event:l,dataList:u,isInstantMessage:s,isSyncingEnded:a,needSync:r})):Ae.l("".concat(this._n,".onMessage unknown eventItem:"),c):this._onTopicLatestMsg(c):this._onAllRcvMsgOptNotify(c):this._onRoomCustomData(c.content)}}},{key:"_onRoomCustomData",value:function(e){this._sessionM.get(30).onRoomCustomDataReceived(e),Ae.l("".concat(this._n,"._onRoomCustomData data:").concat(e))}},{key:"_onAllRcvMsgOptNotify",value:function(e){this._sessionM.get(11).onAllRcvMsgOptNotify(e)}},{key:"_filterMsgFromIMOpenPush",value:function(e){var t=e.head,n=(e=e.body,t=t.servcmd,!1);return!(n=ut(t)?n:t.includes(P.NAME.IM_CONFIG_MANAGER)||t.includes(P.NAME.OVERLOAD_PUSH)||t.includes(P.NAME.STAT_SERVICE))||(t.includes(Gn.PUSHED_CLOUD_CTRL_CONFIG)?this._sessionM.get(23).onPushedConfig(e):t.includes(Gn.PUSHED_COMMERCIAL_CONFIG)?this._sessionM.get(27).onPushedConfig(e):t.includes(Gn.OVERLOAD_NOTIFY)?this._sessionM.onPushedServerOverload(e):t.includes(Gn.KICK_OTHER)&&(n=Date.now(),this._sessionM.reLoginOnKickOther(),e=new Jn("kickOther"),n-=t=this._sessionM.get(1).getLastWsHelloTs(),e.setMessage("last wshello time:".concat(t," diff:").concat(n,"ms")).end()),!1)}}]),Ma),_a=[{cmd:Gn.GET_GRP_PROFILE,interval:1,count:8},{cmd:Gn.UPDATE_GRP_PROFILE,interval:1,count:8},{cmd:Gn.GET_AV_MBR_LIST,interval:3,count:1},{cmd:Gn.GET_GRP_PENDENCY,interval:1,count:15},{cmd:Gn.GET_TOPIC_LIST,interval:1,count:10},{cmd:Gn.SET_GRP_ATTR,interval:5,count:10},{cmd:Gn.MODIFY_GRP_ATTR,interval:5,count:10},{cmd:Gn.DEL_GRP_ATTR,interval:5,count:10},{cmd:Gn.CLEAR_GRP_ATTR,interval:5,count:10},{cmd:Gn.GET_GRP_ATTR,interval:5,count:20},{cmd:Gn.UPDATE_GRP_COUNTER,interval:5,count:20},{cmd:Gn.GET_GRP_COUNTER,interval:5,count:20},{cmd:Gn.SET_ALL_MSG_READ,interval:1,count:1},{cmd:Gn.GET_USER_STATUS,interval:5,count:20},{cmd:Gn.SUB_USER_STATUS,interval:5,count:20},{cmd:Gn.UNSUB_USER_STATUS,interval:5,count:20},{cmd:Gn.MSG_CLOUD_SEARCH,interval:1,count:2},{cmd:Gn.CHECK_FOLLOW_TYPE,interval:5,count:20},{cmd:Gn.GET_GRP_ROAMING_MSG,interval:1,count:20},{cmd:Gn.GET_C2C_ROAMING_MSG,interval:1,count:20}],ma=new Map,va=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],ya=0,Ia=va.length;ya<Ia;ya++)ma.set(ya,va[ya]);function Ma(e){o(this,Ma),this._sessionM=e,this._n="MsgDispatcher",this._eventHandlerMap=new Map,this._eventHandlerMap.set("C2CMessageArray",this._onC2CMsgArray.bind(this)),this._eventHandlerMap.set("groupMessageArray",this._onGroupMsgArray.bind(this)),this._eventHandlerMap.set("groupTips",this._onGroupTips.bind(this)),this._eventHandlerMap.set("C2CNotifyMessageArray",this._onC2CNotifyMsgArray.bind(this)),this._eventHandlerMap.set("C2CReadReceiptArray",this._onC2CReadReceiptArray.bind(this)),this._eventHandlerMap.set("profileModify",this._onProfileModified.bind(this)),this._eventHandlerMap.set("friendListMod",this._onRelationChainModified.bind(this)),this._eventHandlerMap.set("recentContactMod",this._onRecentContact.bind(this)),this._eventHandlerMap.set("readAllC2CMessage",this._onAllMsgRead.bind(this)),this._eventHandlerMap.set("c2cMessageModified",this._onC2CMsgModified.bind(this)),this._eventHandlerMap.set("groupMessageModified",this._onGroupMsgModified.bind(this)),this._eventHandlerMap.set("userStatusList",this._onUserStatusList.bind(this)),this._eventHandlerMap.set("messageExtensionNotify",this._onMsgExtNotify.bind(this)),this._eventHandlerMap.set("messageReactionNotifyList",this._onMsgReactionNotifyList.bind(this)),this._eventHandlerMap.set("messageReactionNotify",this._onMsgReactionNotify.bind(this)),this._eventHandlerMap.set("followChangeList",this._onFollowNotify.bind(this)),this._keys=m(this._eventHandlerMap.keys())}function Ca(e){o(this,Ca),this._n="PHandler",this._sessionM=e,this._map=new Map,this._fillMap()}function Ta(e){return o(this,Ta),(e=Zs.call(this,e))._n="ChannelModule",e._socketHandler=new ca(f(e)),e._probing=!1,e._isAppShowing=!0,e._previousState=E.NET_STATE_CONNECTED,e._timerForNotLoggedIn=-1,e._timerForNotLoggedIn=setInterval(e.onCheckTimer.bind(f(e)),1e3),e._fatalErrorFlag=!1,e._disconnectedTS=0,e._lastDiagnoseTS=0,e}function Sa(e){o(this,Sa),this._chM=e,this._n="SocketHandler",this._promiseMap=new Map,this._readyState=ra,this._simpleRequestMap=new Map,this.MAX_SIZE=100,this._startSequence=nt(),this._startTs=0,this._reConnectFlag=!1,this._nextPingTs=0,this._reConnectCount=0,this.MAX_RECONNECT_COUNT=3,this._socketID=-1,this._random=0,this._socket=null,this._url="",this._onOpenTs=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0,this._currentSite=N,this._setWebsocketHost(),this._initConnection()}function Ea(e){o(this,Ea);var t,n,i=(this._handler=e).getURL();this._socket=null,this._workerSocket=null,this._id=nt(),this._handler.getIsWorkerEnabled()?(t=URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'],{type:"application/javascript; charset=utf-8"})),this._workerSocket=new Worker(t),(n=this)._workerSocket.onmessage=function(e){var t=(i=e.data).callback,o=i.e,i=i.extensions;"onOpen"===t?n._onOpen(i):"onClose"===t?n._onClose(o):"onError"===t?n._onError(o):"onMessage"===t&&n._onMessage(e.data)},this._workerSocket.postMessage({cmd:"start",id:this._id,url:i})):Z?W?(ne.connectSocket({url:i,header:{"content-type":"application/json"}}),ne.onSocketClose(this._onClose.bind(this)),ne.onSocketOpen(this._onOpen.bind(this)),ne.onSocketMessage(this._onMessage.bind(this)),ne.onSocketError(this._onError.bind(this))):(this._socket=ne.connectSocket({url:i,header:{"content-type":"application/json"},complete:function(){}}),this._socket.onClose(this._onClose.bind(this)),this._socket.onOpen(this._onOpen.bind(this)),this._socket.onMessage(this._onMessage.bind(this)),this._socket.onError(this._onError.bind(this))):(this._socket=new WebSocket(i),this._socket.binaryType="arraybuffer",this._socket.onopen=this._onOpen.bind(this,this._socket.extensions),this._socket.onmessage=this._onMessage.bind(this),this._socket.onclose=this._onClose.bind(this),this._socket.onerror=this._onError.bind(this)),this._canIUseBinaryFrame=e.canIUseBinaryFrame()}function Da(e){for(var t,n,o=e,i="",s=0,a=(o=e.length%8!=0?"0".repeat(8-e.length%8)+e:o).length;s<a;s+=8)t=parseInt(o.slice(s,s+4),2),n=parseInt(o.slice(s+4,s+8),2),i+=ma.get(t)+ma.get(n);return i}function ka(e){var t;return e<0||53<e?NaN:(t=0|1073741824*Math.random(),30<e?t+1073741824*(0|Math.random()*(1<<e-30)):t>>>30-e)}function La(e,t){for(var n=e.toString(16),o=t-n.length,i="0";0<o;o>>>=1,i+=i)1&o&&(n=i+n);return n}r($r,bn),Fa=g($r),s($r,[{key:"_init",value:function(){this._updateCmdFreqLimitMap(_a)}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("cmd_frequency_limit");ut(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){Ae.d("".concat(this._n,".req options:"),e);var t,n,o=e.P;return this._pHandler.has(o)?(t=(e=this.getProtocolData(e)).head.servcmd,this._isFreqOverLimit(t)?yn({code:n=Pn.OVER_FREQUENCY_LIMIT,message:this.getErrMsg(n,this._getCmd(t))}):this._isServerOverload(t)?yn({code:n=Pn.OPEN_SERVICE_OVERLOAD_ERROR,message:this.getErrMsg(n,this._getCmd(t))}):(n=this.get(21),fa.includes(o)?n.simplySend(e):n.send(e))):(Ae.w("".concat(this._n,".req unknown P:").concat(o)),yn({code:Pn.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:O,websdkversion:R,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:12775283,sdkability_ext:Da(""),cappid:e.getApplicationID()}}},{key:"genCosSpecifiedHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:O,websdkversion:R,sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getUserID(),usersig:e.getUserSig(),status_instid:e.getStatusInstanceID(),sdkability:12775283,sdkability_ext:Da(""),cappid:e.getApplicationID()}}},{key:"genSSOReportHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:O,websdkversion:R,sdkappid:e.getSDKAppID(),contenttype:"",reqtime:0,identifier:"",usersig:"",status_instid:e.getStatusInstanceID(),sdkability:12775283,sdkability_ext:Da(""),cappid:e.getApplicationID()}}},{key:"getProtocolData",value:function(e){return this._pHandler.getProtocolData(e)}},{key:"trans",value:function(e){var n=e.servcmd;return e=e.data,n={head:t(t({},this.genCommonHead()),{},{servcmd:n}),body:e},this.get(21).send(n)}},{key:"sendComboMessage",value:function(e){var n=e.servcmd;return e=e.data,n={head:t(t({},this.genCommonHead()),{},{servcmd:n}),body:e},this.get(21).send(n)}},{key:"onErrorCodeNotZero",value:function(e){var t,n=e.errorCode;n===Pn.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!==Pn.MSG_A2KEY_EXPIRED&&n!==Pn.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(){Ae.l("".concat(this._n,".reLoginOnKickOther")),this._reLogin()}},{key:"_reLoginOnReconnected",value:function(){Ae.l("".concat(this._n,"._reLoginOnReconnected")),this._reLogin()}},{key:"_reLogin",value:function(){var e,t,n,o=this,i="".concat(this._n,"._reLogin");this.isLoggedIn()&&(e=0,(t=this.get(1).getPushModule())&&(e=t.getUniAppPlatform()),n=new Jn("reLogin"),this.req({P:Gn.LOGIN,data:{isWebUniapp:e,customInfo:this.get(12).getCustomLoginInfo()}}).then((function(e){var t=(e=e.data).instanceID,s=(e=e.customStatus,o.get(12)),a=jo(e),r=(s.setStatusInstanceID(t),o.get(21)),c=r.getSocketID();c="socketID:".concat(c," instanceID:").concat(t," customStatus:").concat(a),n.setMessage(c).end(!0),Ae.l("".concat(i," ok. ").concat(c)),s.getCustomStatus()!==a&&o.get(4).onUserStatusUpdated({dataList:[{to:o.getMyUserID(),statusType:E.USER_STATUS_ONLINE,customStatus:e}]}),r.diagnose(),o.get(11).syncConvList(o._incrementalPullContactFlag).then((function(){Ae.l("".concat(i,", sync conv list ok.")),o.get(25).start()})),((t=o.get(7))&&t.updateLocalMainSequenceOnReconnected(),c=o.get(10)).resetGetTopicTime(),c.getTopicListOnReconnected(),(s=o.get(35))&&s.clearCacheOnReconnected()})))}},{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:Gn.MSG_PUSH_ACK,data:{sessionData:e}})}},{key:"_isFreqOverLimit",value:function(e){var t,n,o,i;return e=e.split(".")[1],!!this._cmdFreqLimitMap.has(e)&&(!this._cmdReqInfoMap.has(e)||(t=(n=this._cmdFreqLimitMap.get(e)).count,n=n.interval,o=(i=this._cmdReqInfoMap.get(e)).startTime,i=i.requestCount,Date.now()-o>1e3*n)?(this._cmdReqInfoMap.set(e,{startTime:Date.now(),requestCount:1}),!1):(this._cmdReqInfoMap.set(e,{startTime:o,requestCount:i+=1}),t<i))}},{key:"_isServerOverload",value:function(e){var t,n;return!!this._serverOverloadInfoMap.has(e)&&(t=(n=this._serverOverloadInfoMap.get(e)).overloadTime,n=n.waitingTime,Date.now()-t<=1e3*n||(this._serverOverloadInfoMap.delete(e),!1))}},{key:"_getCmd",value:function(e){var t="";if(e.includes(".")){var n,o=e.split(".")[1];for(n in Gn)if(Gn[n]===o){t=n;break}}return t}},{key:"onPushedServerOverload",value:function(e){var t=e.overloadCommand;e=e.waitingTime,this._serverOverloadInfoMap.set(t,{overloadTime:Date.now(),waitingTime:e}),Ae.w("".concat(this._n,".onPushedServerOverload waitingTime:").concat(e,"s cmd:").concat(this._getCmd(t)))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._updateCmdFreqLimitMap(_a),this._cmdReqInfoMap.clear(),this._serverOverloadInfoMap.clear(),this._incrementalPullContactFlag=!0}}]);var ba,Aa,Ra,Oa,Na,Pa,wa,Ga,Ua,xa,Fa,qa=$r,Va=(r(jr,bn),xa=g(jr),s(jr,[{key:"getCloudConfig",value:function(e){return ut(e)?this._cloudConfig:this._cloudConfig.has(e)?this._cloudConfig.get(e):void 0}},{key:"getServerConfig",value:function(e){var t={code:0,data:""};return!ut(e)&&this._cloudConfig.has(e)&&(t.data=this._cloudConfig.get(e)),Promise.resolve(t)}},{key:"_canFetch",value:function(){return this.isLoggedIn()&&!this._isFetching&&Date.now()>=this._expiredTime}},{key:"fetchConfig",value:function(){var e,t=this,n="".concat(this._n,".fetchConfig"),o=this._canFetch();Ae.l("".concat(n," canFetch:").concat(o)),o&&(e=new Jn("fetchCloudCtrlConfig"),o=this.get(12).getSDKAppID(),this._isFetching=!0,this.req({P:Gn.FETCH_CLOUD_CTRL_CONFIG,data:{SDKAppID:o,version:this._version}}).then((function(o){t._isFetching=!1;var i=(s=o.data).version,s=s.cloudControlConfig;e.setMessage("version:".concat(t._version," newVersion:").concat(i," config:").concat(s)).end(),Ae.l("".concat(n," ok")),t._parse(o.data)})).catch((function(o){t._isFetching=!1,e.setError(o).end(),Ae.l("".concat(n," failed. error:"),o),t._setExpiredTime(12e4)})))}},{key:"onPushedConfig",value:function(e){Ae.l("".concat(this._n,".onPushedConfig config:"),e),new Jn("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"),o=e.errorCode,i=e.errorMessage,s=e.cloudControlConfig,a=e.version,r=e.expiredTime;if(0===o){if(this._version!==a){var c=null;try{c=JSON.parse(s)}catch(u){this.isPrivateNetWork()||Ae.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(xo.CLOUD_CONFIG))}this._setExpiredTime(1e3*r)}else ut(o)?(Ae.l("".concat(n," failed. Invalid message format:"),e),this._setExpiredTime(36e5)):(Ae.e("".concat(n," errorCode:").concat(o," errorMessage:").concat(i)),this._setExpiredTime(12e4))}},{key:"_setExpiredTime",value:function(e){this._expiredTime=Date.now()+e}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._cloudConfig.clear(),this._expiredTime=0,this._version=0,this._isFetching=!1}}]),jr),Ba=(r(Kr,bn),Ua=g(Kr),s(Kr,[{key:"start",value:function(){this._recoverGroupChat(),this._recoverC2CChat()}},{key:"_recoverGroupChat",value:function(){var e,t,n,o,i=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,o=n-t,0<t)&&1<=o&&o<300?i._recoverGroupMsg({groupID:e,localLastMessageSequence:t,remoteLastMessageSequence:n}):r.push(e)})),this._getGroupNotice(r)}},{key:"_recoverC2CChat",value:function(){var e,t,n,o=this,i=this._getLocalConvList().filter((function(e){return e.type===E.CONV_C2C})),s=this.get(11),a=[Promise.resolve()];i.forEach((function(i){var r=i.conversationID;i=i.lastMessage,e=s.getLocalLastMessage(r),i&&0!==i.lastTime&&e&&(t=i.lastTime,e=e.time,n=t-e,0<e)&&1<=n&&n<=600&&a.push(o._recoverC2CMsg({conversationID:r,localLastMessageTime:e,remoteLastMessageTime:t}))})),Promise.all(a).then((function(){Ae.l("".concat(o._n,"._recoverC2CChat all done")),o.get(19).syncOnReconnected()}))}},{key:"_getLocalConvList",value:function(){return this.get(11).getLocalConvList()}},{key:"_recoverGroupMsg",value:function(e){var t=this,n="".concat(this._n,".").concat("_recoverGroupMsg"),o=(Ae.l("".concat(n," options:"),e),e.groupID),i=e.localLastMessageSequence,s=e.remoteLastMessageSequence,a=JSON.stringify(e),r=new Jn("_recoverGroupMsg");r.setMessage(a),this._getGroupRoamingMsg({groupID:o,sequence:i}).then((function(e){var c=(e=e.data).complete,u=e.messageList;if(!ut(u)){e=u[0].sequence;var l=u.map((function(e){return e.sequence})),d=(l="".concat(a," complete:").concat(c," sequenceList:").concat(l),Ae.l("".concat(n," ").concat(l)),e!==i&&e<s&&2!==c&&t._recoverGroupMsg({groupID:o,localLastMessageSequence:e,remoteLastMessageSequence:s}),r.setMessage(l).end(),t.get(7));1<u.length&&u.sort((function(e,t){return e.sequence-t.sequence}));for(var p=!1,h=0,f=u.length;h<f;h++)if(u[h].from===E.CONV_SYSTEM){p=!0;break}if(p)for(var g=0,_=u.length;g<_;g++){var m=u[g];m.from!==E.CONV_SYSTEM?d.onNewMessage({dataList:[m],isInstantMessage:!1,updateUnreadCount:!1}):d.onNewGroupTips({event:m.event,dataList:[m]})}else d.onNewMessage({dataList:u,isInstantMessage:!1,updateUnreadCount:!1})}})).catch((function(e){r.setError(e).end(),Ae.w("".concat(n," failed. error:"),e)}))}},{key:"_getGroupNotice",value:function(e){var t=e.length;if(Ae.l("".concat(this._n,"._getGroupNotice length:").concat(t)),0!==t){var n=this.get(7);if(t<=10)n.getNotice(e);else{var o=Math.floor(t/10);5<=o&&(o=5);for(var i=0;i<=o;i++)n.getNotice(e.slice(10*i,10*(i+1)))}}}},{key:"_getGroupRoamingMsg",value:function(e){var t=e.groupID;return e=e.sequence,this.req({P:Gn.GET_GRP_ROAMING_MSG,data:{groupID:t,count:this.PULL_LIMIT_COUNT,sequence:e+this.PULL_LIMIT_COUNT-1}})}},{key:"_recoverC2CMsg",value:function(e){var t=this,n="".concat(this._n,".").concat("_recoverC2CMsg"),o=(Ae.l("".concat(n," options:"),e),e.conversationID),i=e.localLastMessageTime,s=e.remoteLastMessageTime,a=JSON.stringify(e),r=new Jn("_recoverC2CMsg");return r.setMessage(a),this._getC2CRoamingMsg({conversationID:o,time:i}).then((function(e){var i=(e=e.data).complete;if(e=e.messageList,!ut(e)){var c=e.length;if(t.get(6).onNewMessage({dataList:e,isInstantMessage:!0}),c=e[c-1].time,e=e.map((function(e){return e.random})),e="".concat(a," complete:").concat(i," randomList:").concat(e),Ae.l("".concat(n," ").concat(e)),r.setMessage(e).end(),c<s&&1!==i)return t._recoverC2CMsg({conversationID:o,localLastMessageTime:c,remoteLastMessageTime:s})}})).catch((function(e){r.setError(e).end(),Ae.w("".concat(n," failed. error:"),e)}))}},{key:"_getC2CRoamingMsg",value:function(e){var t=e.conversationID;return e=e.time,this.req({P:Gn.GET_C2C_ROAMING_MSG,data:{peerAccount:t.replace(E.CONV_C2C,""),count:this.PULL_LIMIT_COUNT+1,lastMessageTime:e,direction:1}})}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Kr),Ha=(s(Hr,[{key:"addMessageDelay",value:function(e){0<=(e=Te()-e)&&this._e2eDelayArray.push(e)}},{key:"_calcAvg",value:function(e,t){var n;return 0===t?0:(n=0,e.forEach((function(e){n+=e})),Nt(n/t,1))}},{key:"_calcCountWithLimit",value:function(e){var t=e.e2eDelayArray,n=e.min,o=e.max;return t.filter((function(e){return n<=e&&e<o})).length}},{key:"_calcPercent",value:function(e,t){return 100<(e=Nt(e/t*100,2))?100:e}},{key:"_checkE2EDelayException",value:function(e,t){var n,o,i,s=e.filter((function(e){return t<e}));0<s.length&&(n=s.length,o=Math.min.apply(Math,m(s)),i=Math.max.apply(Math,m(s)),s=this._calcAvg(s,n),50<(e=Nt(n/e.length*100,2)))&&new Jn("messageE2EDelayException").setMessage("count:".concat(n," min:").concat(o," max:").concat(i," avg:").concat(s," percent:").concat(e)).setLevel("warning").end()}},{key:"getStatResult",value:function(){var e,t,n,o,i,s,a=this._e2eDelayArray.length;return 0===a?null:(e=m(this._e2eDelayArray),t=this._calcCountWithLimit({e2eDelayArray:e,min:0,max:1}),n=this._calcCountWithLimit({e2eDelayArray:e,min:1,max:3}),o=this._calcPercent(t,a),i=this._calcPercent(n,a),s=this._calcAvg(e,a),this._checkE2EDelayException(e,3),e.length=0,this.reset(),{totalCount:a,countLessThan1Second:t,percentOfCountLessThan1Second:o,countLessThan3Second:n,percentOfCountLessThan3Second:i,avgDelay:s})}},{key:"reset",value:function(){this._e2eDelayArray.length=0}}]),Hr),Ka=(s(Br,[{key:"addRequestCount",value:function(){this._requestCount+=1}},{key:"addRTT",value:function(e){this._rttArray.push(e)}},{key:"_calcTotalCount",value:function(){return this._requestCount}},{key:"_calcRTTCount",value:function(e){return e.length}},{key:"_calcSuccessRateOfRequest",value:function(e,t){return 0===t?0:100<(e=Nt(e/t*100,2))?100:e}},{key:"_calcAvg",value:function(e,t){var n;return 0===t?0:(n=0,e.forEach((function(e){n+=e})),parseInt(n/t))}},{key:"_calcMax",value:function(){return Math.max.apply(Math,m(this._rttArray))}},{key:"_calcMin",value:function(){return Math.min.apply(Math,m(this._rttArray))}},{key:"getStatResult",value:function(){var e,t,n=this._calcTotalCount(),o=m(this._rttArray);return 0===n?null:(e=this._calcRTTCount(o),t=this._calcSuccessRateOfRequest(e,n),o=this._calcAvg(o,e),Ae.l("".concat(this._n,".getStatResult max:").concat(this._calcMax()," min:").concat(this._calcMin()," avg:").concat(o)),this.reset(),{totalCount:n,rttCount:e,successRateOfRequest:t,avgRTT:o})}},{key:"reset",value:function(){this._requestCount=0,this._rttArray.length=0}}]),Br),ja=(s(Vr,[{key:"initMap",value:function(e){var t=this;e.forEach((function(e){t._map.set(e,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]})}))}},{key:"addTotalCount",value:function(e){return!(ut(e)||!this._map.has(e)||(this._map.get(e).totalCount+=1,0))}},{key:"addSuccessCount",value:function(e){return!(ut(e)||!this._map.has(e)||(this._map.get(e).successCount+=1,0))}},{key:"addFailedCountOfUserSide",value:function(e){return!(ut(e)||!this._map.has(e)||(this._map.get(e).failedCountOfUserSide+=1,0))}},{key:"addCost",value:function(e,t){return!(ut(e)||!this._map.has(e)||(this._map.get(e).costArray.push(t),0))}},{key:"addFileSize",value:function(e,t){return!(ut(e)||!this._map.has(e)||(this._map.get(e).fileSizeArray.push(t),0))}},{key:"_calcSuccessRateOfBusiness",value:function(e){return ut(e)||!this._map.has(e)?-1:100<(e=Nt((e=this._map.get(e)).successCount/e.totalCount*100,2))?100:e}},{key:"_calcSuccessRateOfPlatform",value:function(e){var t;return ut(e)||!this._map.has(e)?-1:(t=this._map.get(e),100<(e=Nt(e=this._calcSuccessCountOfPlatform(e)/t.totalCount*100,2))?100:e)}},{key:"_calcTotalCount",value:function(e){return ut(e)||!this._map.has(e)?-1:this._map.get(e).totalCount}},{key:"_calcSuccessCountOfBusiness",value:function(e){return ut(e)||!this._map.has(e)?-1:this._map.get(e).successCount}},{key:"_calcSuccessCountOfPlatform",value:function(e){return ut(e)||!this._map.has(e)?-1:(e=this._map.get(e)).successCount+e.failedCountOfUserSide}},{key:"_calcAvg",value:function(e){return ut(e)||!this._map.has(e)?-1:e===Hn?this._calcAvgSpeed(e):this._calcAvgCost(e)}},{key:"_calcAvgCost",value:function(e){var t,n=this._map.get(e).costArray.length;return 0===n?0:(t=0,this._map.get(e).costArray.forEach((function(e){t+=e})),parseInt(t/n))}},{key:"_calcAvgSpeed",value:function(e){var t=0,n=0;return this._map.get(e).costArray.forEach((function(e){t+=e})),this._map.get(e).fileSizeArray.forEach((function(e){n+=e})),parseInt(1e3*n/t)}},{key:"getStatResult",value:function(e){var t,n,o,i,s,a=this._calcTotalCount(e);return 0===a?null:(t=this._calcSuccessCountOfBusiness(e),n=this._calcSuccessRateOfBusiness(e),o=this._calcSuccessCountOfPlatform(e),i=this._calcSuccessRateOfPlatform(e),s=this._calcAvg(e),this.reset(e),{totalCount:a,successCountOfBusiness:t,successRateOfBusiness:n,successCountOfPlatform:o,successRateOfPlatform:i,avgValue:s})}},{key:"reset",value:function(e){ut(e)?this._map.clear():this._map.set(e,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]})}}]),Vr),$a=(s(qr,[{key:"initMap",value:function(e){var t=this;e.forEach((function(e){t._lastMap.set(e,new Map),t._currentMap.set(e,new Map)}))}},{key:"addMessageSequence",value:function(e){var t,n,o,i=e.key,s=e.message;return!(ut(i)||!this._lastMap.has(i)||!this._currentMap.has(i)||(t=s.conversationID,s=s.sequence,t=t.replace(E.CONV_GROUP,""),0!==this._lastMap.get(i).size&&this._lastMap.get(i).has(t)&&(o=(n=this._lastMap.get(i).get(t)).length-1,s>n[0])&&s<n[o]?(n.push(s),n.sort(),this._lastMap.get(i).set(t,n)):this._addCurrentMap(e),0))}},{key:"_addCurrentMap",value:function(e){var t=e.key,n=(e=e.message).conversationID;e=e.sequence,n=n.replace(E.CONV_GROUP,""),this._currentMap.get(t).has(n)||this._currentMap.get(t).set(n,[]),this._currentMap.get(t).get(n).push(e)}},{key:"_copyData",value:function(e){if(!ut(e)){this._lastMap.set(e,new Map);var t,n=this._lastMap.get(e),o=T(this._currentMap.get(e));try{for(o.s();!(t=o.n()).done;){var i=_(t.value,2),s=i[0],a=i[1];n.set(s,a)}}catch(r){o.e(r)}finally{o.f()}n=null,this._currentMap.set(e,new Map)}}},{key:"getStatResult",value:function(e){var t,n,o;return ut(this._currentMap.get(e))||ut(this._lastMap.get(e))?null:0===this._lastMap.get(e).size?(this._copyData(e),null):(n=t=0,this._lastMap.get(e).forEach((function(e,o){var i=(e=m(e.values())).length;e=e[i-1]-e[0]+1,t+=e,n+=i})),0===t?null:(100<(o=Nt(n/t*100,2))&&(o=100),this._copyData(e),{totalCount:t,successCountOfMessageReceived:n,successRateOfMessageReceived:o}))}},{key:"reset",value:function(){this._currentMap.clear(),this._lastMap.clear()}}]),qr),Wa=(r(Fr,bn),Ga=g(Fr),s(Fr,[{key:"_onLoginSuccess",value:function(){var e=this,t=(this._rateMessageSent.initMap(this._messageSentItems),this._rateMessageReceived.initMap(this._messageReceivedItems),this.get(13)),n=t.getItem(this.TAG,!1);!Ve(n)&&ze(n.forEach)&&(Ae.l("".concat(this._n,"._onLoginSuccess. logs count:").concat(n.length)),n.forEach((function(t){e._statInfoArr.push(t)})),t.removeItem(this.TAG,!1))}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("q_rpt_interval"),t=this.getCloudConfig("q_rpt_sdkappid_bl"),n=this.getCloudConfig("q_rpt_tinyid_wl");ut(e)||(this.REPORT_INTERVAL=Number(e)),ut(t)||(this.REPORT_SDKAPPID_BLACKLIST=t.split(",").map((function(e){return Number(e)}))),ut(n)||(this.REPORT_TINYID_WHITELIST=n.split(","))}},{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&e%this.REPORT_INTERVAL==0&&(this.wholePeriod=!0,this._report())}},{key:"addRequestCount",value:function(){this._avgRTT.addRequestCount()}},{key:"addRTT",value:function(e){this._avgRTT.addRTT(e)}},{key:"addMessageDelay",value:function(e){this._avgE2EDelay.addMessageDelay(e)}},{key:"addTotalCount",value:function(e){this._rateMessageSent.addTotalCount(e)||Ae.w("".concat(this._n,".addTotalCount invalid key:"),e)}},{key:"addSuccessCount",value:function(e){this._rateMessageSent.addSuccessCount(e)||Ae.w("".concat(this._n,".addSuccessCount invalid key:"),e)}},{key:"addFailedCountOfUserSide",value:function(e){this._rateMessageSent.addFailedCountOfUserSide(e)||Ae.w("".concat(this._n,".addFailedCountOfUserSide invalid key:"),e)}},{key:"addCost",value:function(e,t){this._rateMessageSent.addCost(e,t)||Ae.w("".concat(this._n,".addCost invalid key or cost:"),e,t)}},{key:"addFileSize",value:function(e,t){this._rateMessageSent.addFileSize(e,t)||Ae.w("".concat(this._n,".addFileSize invalid key or size:"),e,t)}},{key:"addMessageSequence",value:function(e){this._rateMessageReceived.addMessageSequence(e)||Ae.w("".concat(this._n,".addMessageSequence invalid key:"),e.key)}},{key:"_getQualityItem",value:function(e){var n={},o=zn[this.get(15).getNetworkType()];switch(ut(o)&&(o=8),o={qualityType:Wn[e],timestamp:De(),networkType:o,extension:""},e){case Un:n=this._avgRTT.getStatResult();break;case xn:n=this._avgE2EDelay.getStatResult();break;case Fn:case qn:case Vn:case Bn:case Hn:n=this._rateMessageSent.getStatResult(e);break;case Kn:case jn:case $n:n=this._rateMessageReceived.getStatResult(e)}return null===n?null:t(t({},o),n)}},{key:"_report",value:function(e){var t=this,n=[],o=null,i=(ut(e)?this._qualityItems.forEach((function(e){null!==(o=t._getQualityItem(e))&&(o.reportIndex=t.reportIndex,o.wholePeriod=t.wholePeriod,n.push(o))})):null!==(o=this._getQualityItem(e))&&(o.reportIndex=this.reportIndex,o.wholePeriod=this.wholePeriod,n.push(o)),Ae.d("".concat(this._n,"._report"),n),0<this._statInfoArr.length&&(n=n.concat(this._statInfoArr),this._statInfoArr=[]),e=this.get(12)).getSDKAppID();e=e.getTinyID(),0<(n=Pt(this.REPORT_SDKAPPID_BLACKLIST,i)&&!wt(this.REPORT_TINYID_WHITELIST,e)?[]:n).length&&this._doReport(n)}},{key:"_doReport",value:function(e){var n=this,o={header:is(this),quality:e};this.req({P:Gn.SSO_STAT,data:t({},o)}).then((function(){n.reportIndex++,n.wholePeriod=!1})).catch((function(t){Ae.w("".concat(n._n,"._doReport failed. error:"),t),n._statInfoArr=n._statInfoArr.concat(e),n._flushAtOnce()}))}},{key:"_flushAtOnce",value:function(){var e=this.get(13),t=e.getItem(this.TAG,!1),n=this._statInfoArr,o="".concat(this._n,"._flushAtOnce");Ve(t)?(Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1)):(10<(n=n.concat(t)).length&&(n=n.slice(0,10)),Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1)),this._statInfoArr=[]}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._report(),this.reportIndex=0,this.wholePeriod=!1,this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[],this._avgRTT.reset(),this._avgE2EDelay.reset(),this._rateMessageSent.reset(),this._rateMessageReceived.reset()}}]),Fr),Ya=s((function e(t){o(this,e),Ve(t)||(this.userID=t.userID||"",this.nick=t.nick||"",this.avatar=t.avatar||"",this.time=t.time||0,this.source=t.source||"",this.wording=t.wording||"",this.type=t.type||"")})),za=(s(xr,[{key:"getLocalApplicationList",value:function(){return{friendApplicationList:m(this._map.values()),unreadCount:this._unreadCount}}},{key:"_onApplicationListUpdated",value:function(){this._snsM.emitOEvt(S.FRIEND_APPLICATION_LIST_UPDATED,{friendApplicationList:m(this._map.values()),unreadCount:this._unreadCount})}},{key:"onApplicationRead",value:function(){this._unreadCount=0,this._onApplicationListUpdated()}},{key:"onApplicationAdded",value:function(e,n){var o,i,s=this;Ve(e)||(o="",o=n===this._snsM.getMyUserID()?E.SNS_APPLICATION_SENT_BY_ME:E.SNS_APPLICATION_SENT_TO_ME,i=!1,e.forEach((function(e){var n="".concat(e.userID,"_").concat(o);o!==E.SNS_APPLICATION_SENT_TO_ME||s._map.has(n)||(s._unreadCount+=1),s._map.set(n,new Ya(t(t({},e),{},{type:o}))),i=!0})),i&&this._onApplicationListUpdated())}},{key:"onApplicationDeleted",value:function(e){Ve(e)||(this._startTime=0,this._currentSeq=0,this.getApplicationList())}},{key:"getApplicationList",value:function(){var e=this,t="".concat(this._n,".").concat("getApplicationList"),n=new Jn("getApplicationList");return this._snsM.req({P:Gn.GET_FD_APPLICATION_LIST,data:{applicationType:E.SNS_APPLICATION_TYPE_BOTH,fromAccount:this._snsM.getMyUserID(),maxLimited:this._maxLimited,startTime:this._startTime,lastSequence:this._currentSeq}}).then((function(o){var i=(o=o.data).resultList,s=o.unreadCount,a=o.startTime,r=(o=o.currentSequence,e._startTime=a,e._currentSeq=o,e._unreadCount=s,Ye(i)?i.length:0);r="applicationCount:".concat(r," unreadCount:").concat(s," startTime:").concat(a," currentSequence:").concat(o),n.setMessage(r).end(),Ae.i("".concat(t," ok. ").concat(r)),e._map.clear(),Ye(i)&&i.forEach((function(t){var n=t.userID,o=t.type;t=new Ya(t),e._map.set("".concat(n,"_").concat(o),t)})),e._onApplicationListUpdated()})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"deleteApplication",value:function(e){var t,n="".concat(this._n,".").concat("deleteApplication"),o=e.userID,i=e.type;return i&&(i===E.SNS_APPLICATION_SENT_BY_ME||i===E.SNS_APPLICATION_SENT_TO_ME)||(i=E.SNS_APPLICATION_SENT_TO_ME),this._map.has("".concat(o,"_").concat(i))?((t=new Jn("deleteApplication")).setMessage("userID:".concat(o," type:").concat(i)),this._snsM.req({P:Gn.DEL_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),userIDList:[o],type:i}}).then((function(e){var s=(r=(e=e.data.resultList)[0]).to,a=r.resultCode,r=r.resultInfo;return t.setMoreMessage("resultList:".concat(JSON.stringify(e))).end(),Ae.i("".concat(n," ok. userID:").concat(o," type:").concat(i)),0===a?mn():yn({userID:s,code:a,message:r})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))):yn({code:Pn.FRIEND_APPLICATION_NOT_EXIST})}},{key:"acceptApplication",value:function(e){var t="".concat(this._n,".").concat("acceptApplication"),n=e.userID,o=e.remark,i=e.tag,s=e.type,a=(s&&(s===E.SNS_APPLICATION_AGREE||s===E.SNS_APPLICATION_AGREE_AND_ADD)||(s=E.SNS_APPLICATION_AGREE_AND_ADD),new Jn("acceptApplication"));return a.setMessage("userID:".concat(n," type:").concat(s)),this._snsM.req({P:Gn.RESPOND_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),responseFriendItem:[{userID:n,remark:o,tag:i,action:s}]}}).then((function(e){a.end();var o=(e=e.data.resultList[0]).resultCode;if(e=e.resultInfo,0!==o)return yn({code:o,message:e});Ae.i("".concat(t," ok. userID:").concat(n," type:").concat(s))})).catch((function(e){return a.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"refuseApplication",value:function(e){var t="".concat(this._n,".").concat("refuseApplication"),n=e.userID,o=new Jn("refuseApplication");return o.setMessage("userID:".concat(n)),this._snsM.req({P:Gn.RESPOND_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),responseFriendItem:[{userID:n,action:"Response_Action_Reject"}]}}).then((function(e){o.end();var i=(e=e.data.resultList[0]).resultCode;if(e=e.resultInfo,0!==i)return yn({code:i,message:e});Ae.i("".concat(t," ok. userID:").concat(n))})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"setApplicationRead",value:function(){var e=this,t="".concat(this._n,".").concat("setApplicationRead"),n=new Jn("setApplicationRead");return this._snsM.req({P:Gn.REPORT_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),latestTimeStamp:Nt(De()/1e3,0)}}).then((function(o){n.end(),Ae.i("".concat(t," ok")),e._unreadCount=0})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"reset",value:function(){this._maxLimited=100,this._currentSeq=0,this._unreadCount=0,this._map.clear()}}]),xr),Xa=(s(Ur,[{key:"validate",value:function(e){var t,n=!0,o="";if(Ve(e))return{valid:!1,tips:"empty options"};if(e.profileCustomField)for(var i=e.profileCustomField.length,s=null,a=0;a<i;a++){if(s=e.profileCustomField[a],!ct(s.key)||-1===s.key.indexOf("Tag_Profile_Custom"))return{valid:!1,tips:"The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom"};if(!ct(s.value))return{valid:!1,tips:"The type of values of the custom profile key-value pairs (which is profileCustomField) must be String"}}for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if("profileCustomField"===t)continue;if(Ve(e[t])&&!ct(e[t])&&!je(e[t])){o="key:"+t+", invalid value:"+e[t],n=!1;continue}switch(t){case"nick":ct(e[t])||(n=!(o="nick must be a string")),500<et(e[t])&&(o="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(et(e[t])," bytes"),n=!1);break;case"gender":it(Pe,e.gender)||(o="key:gender, invalid value:"+e.gender,n=!1);break;case"birthday":je(e.birthday)||(n=!(o="birthday must be a number"));break;case"location":ct(e.location)||(n=!(o="location must be a string"));break;case"selfSignature":ct(e.selfSignature)||(n=!(o="selfSignature must be a string"));break;case"allowType":it(Ge,e.allowType)||(o="key:allowType, invalid value:"+e.allowType,n=!1);break;case"language":je(e.language)||(n=!(o="language must be a number"));break;case"avatar":ct(e.avatar)||(n=!(o="avatar must be a string"));break;case"messageSettings":0!==e.messageSettings&&1!==e.messageSettings&&(n=!(o="messageSettings must be 0 or 1"));break;case"adminForbidType":it(we,e.adminForbidType)||(o="key:adminForbidType, invalid value:"+e.adminForbidType,n=!1);break;case"level":je(e.level)||(n=!(o="level must be a number"));break;case"role":je(e.role)||(n=!(o="role must be a number"));break;default:o="unknown key:"+t+" "+e[t],n=!1}}return{valid:n,tips:o}}},{key:"update",value:function(e){var t,n="",o=[];this.friendCustomField.forEach((function(e){o.push(e.key)}));for(var i=0,s=e.length;i<s;i++)if(n=e[i].tag,t=e[i].value,-1<n.indexOf("Tag_SNS_Custom"))-1<o.indexOf(n)?this.friendCustomField.forEach((function(e){e.key===n&&(e.value=t)})):this.friendCustomField.push({key:n,value:t});else if(-1<n.indexOf("Tag_Profile_Custom")){var a=!1;this.profile.profileCustomField.forEach((function(e){e.key===n&&(e.value=t,a=!0)})),a||this.profile.profileCustomField.push({key:n,value:t})}else switch(n){case Oe.NICK:this.profile.nick=t;break;case Oe.GENDER:this.profile.gender=t;break;case Oe.BIRTHDAY:this.profile.birthday=t;break;case Oe.LOCATION:this.profile.location=t;break;case Oe.SELFSIGNATURE:this.profile.selfSignature=t;break;case Oe.ALLOWTYPE:this.profile.allowType=t;break;case Oe.LANGUAGE:this.profile.language=t;break;case Oe.AVATAR:this.profile.avatar=t;break;case Oe.MESSAGESETTINGS:this.profile.messageSettings=t;break;case Oe.ADMINFORBIDTYPE:this.profile.adminForbidType=t;break;case Oe.LEVEL:this.profile.level=t;break;case Oe.ROLE:this.profile.role=t;break;case Ne.REMARK:this.remark=t;break;case Ne.ADDTIME:this.addTime=t;break;case Ne.GROUP:this.groupList=JSON.parse(JSON.stringify(t));break;case Ne.ADDSOURCE:this.source=t;break;case Ne.ADDWORDING:break;default:Ae.d("snsProfileItem unkown tag->",e[i].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)}}]),Ur),Ja=(s(Gr,[{key:"getLocalFriendList",value:function(){return m(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;Ve(e=e.dataList)||(t=this._snsM.get(11),e.forEach((function(e){var o,i=e.userID;e=e.profileList,n.isMyFriend(i)&&(Ae.l("".concat(n._n,".onFriendProfileModified. friend account:").concat(i,", profileList:").concat(JSON.stringify(e))),(o=n._map.get(i)).update(e),t.modifyMessageSentByPeer({conversationID:"".concat(E.CONV_C2C).concat(i),latestNick:o.profile.nick,latestAvatar:o.profile.avatar}))})),this._onFriendListUpdated())}},{key:"onFriendAdded",value:function(e){var t=this;0!==e.length&&(Ae.l("".concat(this._n,".onFriendAdded userIDList:").concat(e)),e.forEach((function(e){t._map.set(e,new Xa(e))})),this.getFriendProfile({userIDList:e}).then((function(n){e.forEach((function(e){var n=t._map.get(e);0<n.groupList.length&&t._snsM.updateWhenFriendAdded({nameList:n.groupList,userID:e})})),t._onFriendListUpdated()})))}},{key:"onFriendDeleted",value:function(e){var t=this;0!==e.length&&(Ae.l("".concat(this._n,".onFriendDeleted userIDList:").concat(e)),e.forEach((function(e){var n=t._map.get(e);0<n.groupList.length&&t._snsM.updateWhenFriendDeleted({nameList:n.groupList,userID:e}),t._map.delete(e)})),this._onFriendListUpdated())}},{key:"_onFriendListUpdated",value:function(){this._snsM.emitOEvt(S.FRIEND_LIST_UPDATED),this._snsM.get(11).checkAndPatchRemark()}},{key:"getFriendProfile",value:function(e){var t,n=this,o="".concat(this._n,".").concat("getFriendProfile"),i=(e=e.userIDList,[]),s=[],a=[];return e.forEach((function(e){var t;n._map.has(e)?(t=n._map.get(e),Date.now()-t.timestamp<n._expirationTime?s.push(t):a.push(e)):i.push({userID:e,code:Pn.NOT_MY_FRIEND,message:n._snsM.getErrMsg(Pn.NOT_MY_FRIEND)})})),0===a.length?(Ae.i("".concat(o," newUserIDList is empty")),vn({friendList:s,failureUserIDList:i})):((t=new Jn("getFriendProfile")).setMessage("userIDList:".concat(a)),Ae.i("".concat(o," userIDList:").concat(a)),this._snsM.req({P:Gn.GET_FD_PROFILE,data:{fromAccount:this._snsM.getMyUserID(),userIDList:a}}).then((function(e){return t.end(),Ae.i("".concat(o," ok")),e.data.resultList.forEach((function(e){var t,o=e.to,a=e.resultCode,r=e.resultInfo;e=e.tagValueList,ut(a)||0===a?(n._map.has(o)?(t=n._map.get(o)).update(e):(t=new Xa(o,e),n._map.set(o,t)),s.push(t)):i.push({userID:o,code:a,message:r})})),mn({friendList:s,failureUserIDList:i})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(o," failed. error:"),e),yn(e)})))}},{key:"isMyFriend",value:function(e){return this._map.has(e)}},{key:"pagingGetFriendList",value:function(){var e=this,t="".concat(this._n,".").concat("getFriendList"),n=new Jn("getFriendList"),o=Date.now();this._snsM.req({P:Gn.GET_FD_LIST,data:{fromAccount:this._snsM.getMyUserID(),startIndex:this._startIdx,standardSequence:this._standardSeq,customSequence:this._customSeq}}).then((function(i){var s=(i=i.data).friendCount,a=i.resultList,r=i.nextStartIndex,c=i.standardSequence,u=i.customSequence;i=i.completeFlag,e._startIdx=r,e._standardSeq=c,e._customSeq=u,s="friendCount:".concat(s," nextStartIndex:").concat(r," standardSequence:").concat(c," ")+"customSequence:".concat(u," completeFlag:").concat(i," cost:").concat(Kt(o)),n.setMessage(s).end(),Ae.i("".concat(t," ok."),s),Ve(a)||a.forEach((function(t){var n=t.to;t=t.tagValueList,e._map.set(n,new Xa(n,t))})),0===i?e.pagingGetFriendList():(e._snsM.emitOEvt(S.FRIEND_LIST_UPDATED),e._pagingGetFriendProfile())})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_pagingGetFriendProfile",value:function(){var e=this,t=m(this._map.keys()),n=this._snsM.get(4),o=t.length,i=o<=100?1:Math.ceil(o/100);Ae.l("".concat(this._n,"._pagingGetFriendProfile friendCount:").concat(o," pageCount:").concat(i));for(var s=0;s<i;s++)n.getUserProfile({userIDList:t.slice(100*s,100*(s+1))}).then((function(t){t.data.forEach((function(t){var n=e._map.get(t.userID);n&&n.updateProfile(t)})),e._onFriendListUpdated()}))}},{key:"addFriend",value:function(e){var t,n,o,i,s,a,r,c=this,u="".concat(this._n,".").concat("addFriend");return this._map.has(e.to)?yn({code:Pn.ALREADY_MY_FRIEND}):e.wording&&!1===this._snsM.filterProfanity("wording",e)?yn({code:Pn.PROFANITY_FOUND}):(t=e.to,n=e.source,o=e.type,i=e.wording,s=e.remark,e=e.groupName,(a=o)&&(a===E.SNS_ADD_TYPE_SINGLE||a===E.SNS_ADD_TYPE_BOTH)||(a=E.SNS_ADD_TYPE_BOTH),(r=new Jn("addFriend")).setMessage("to:".concat(t," source:").concat(n," type:").concat(a)),this._snsM.req({P:Gn.ADD_FD,data:{fromAccount:this._snsM.getMyUserID(),addFriendItem:[{to:t,source:n,wording:i,remark:s,groupName:e}],type:a}}).then((function(e){e=e.data.resultList;var t=(r.setMoreMessage("resultList:".concat(JSON.stringify(e))).end(),e=e[0]).to,n=e.resultCode;return e=e.resultInfo,Ae.i("".concat(u," ok. to:").concat(t," type:").concat(a," code:").concat(n)),ut(n)||0===n?mn({userID:t,code:0}):30539===n?mn({userID:t,code:n,message:c._snsM.getErrMsg(n)}):yn({userID:t,code:n,message:c._snsM.getErrMsg(n)||e})})).catch((function(e){return r.setError(e).end(),Ae.w("".concat(u," failed. error:"),e),yn(e)})))}},{key:"deleteFriend",value:function(e){var t,n=this,o="".concat(this._n,".").concat("deleteFriend"),i=e.userIDList,s=(e=e.type,1e3<i.length&&(Ae.w("".concat(o," ").concat(Vt(1e3))),i.length=1e3),[]),a=[],r=[];return i.forEach((function(e){n._map.has(e)?r.push(e):s.push({userID:e,code:Pn.NOT_MY_FRIEND,message:n._snsM.getErrMsg(Pn.NOT_MY_FRIEND)})})),0===r.length?vn({successUserIDList:a,failureUserIDList:s}):((i=e)&&(i===E.SNS_DELETE_TYPE_SINGLE||i===E.SNS_DELETE_TYPE_BOTH)||(i=E.SNS_DELETE_TYPE_BOTH),(t=new Jn("deleteFriend")).setMessage("userIDList:".concat(r," type:").concat(i)),this._snsM.req({P:Gn.DEL_FD,data:{fromAccount:this._snsM.getMyUserID(),userIDList:r,type:i}}).then((function(e){return t.end(),Ae.i("".concat(o," ok")),Ve(e=e.data.resultList)||e.forEach((function(e){var t=e.to,n=e.resultCode;e=e.resultInfo,ut(n)||0===n?a.push({userID:t}):s.push({userID:t,code:n,message:e})})),mn({successUserIDList:a,failureUserIDList:s})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(o," error:"),e),yn(e)})))}},{key:"updateFriend",value:function(e){var t,n,o,i=this,s=e.userID,a=e.remark,r=e.friendCustomField;return this._map.has(s)?(t="".concat(this._n,".").concat("updateFriend"),(n=new Jn("updateFriend")).setMessage("userID:".concat(s," remark:").concat(a," friendCustomField:").concat(r)),o=[],ut(a)||o.push({tag:Ne.REMARK,value:a}),Ye(r)&&0<r.length&&r.forEach((function(e){o.push({tag:e.key,value:e.value})})),this._snsM.req({P:Gn.UPDATE_FD,data:{fromAccount:this._snsM.getMyUserID(),updateItem:[{to:s,snsItem:o}]}}).then((function(e){n.end(),Ae.i("".concat(t," ok"));var o=(e=e.data.resultList[0]).to,s=e.resultCode;return e=e.resultInfo,ut(s)||0===s?((o=i._map.get(o))&&(ut(a)||(o.remark=a),Ye(r)&&0<r.length&&_t(o.friendCustomField,r),i._onFriendListUpdated()),mn(o)):yn({code:s,message:e})})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))):yn({code:Pn.NOT_MY_FRIEND})}},{key:"checkFriend",value:function(e){var t="".concat(this._n,".").concat("checkFriend"),n=e.userIDList,o=e.type,i=(o&&(o===E.SNS_CHECK_TYPE_SINGLE||o===E.SNS_CHECK_TYPE_BOTH)||(o=E.SNS_CHECK_TYPE_BOTH),new Jn("checkFriend"));return i.setMessage("userIDList:".concat(n," type:").concat(o)),this._snsM.req({P:Gn.CHECK_FD,data:{fromAccount:this._snsM.getMyUserID(),userIDList:n,type:o}}).then((function(e){i.end(),Ae.i("".concat(t," ok. userIDList:").concat(n," type:").concat(o));var s=[],a=[];return Ye(e=e.data.resultList)&&e.forEach((function(e){var t=e.to,n=e.relation,o=e.resultCode;e=e.resultInfo,ut(o)||0===o?s.push({userID:t,code:0,relation:n}):a.push({userID:t,code:o,message:e})})),mn({successUserIDList:s,failureUserIDList:a})})).catch((function(e){return i.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"onAddedToFriendGroup",value:function(e){var t=this,n=e.name;e=e.userIDList,Ae.l("".concat(this._n,".onAddedToFriendGroup groupName:").concat(n," userIDList:").concat(e)),n&&!Ve(e)&&e.forEach((function(e){t._map.has(e)&&t._map.get(e).addToGroupList(n)}))}},{key:"onRemovedFromFriendGroup",value:function(e){var t=this,n=e.name;e=e.userIDList,Ae.l("".concat(this._n,".onRemovedFromFriendGroup groupName:").concat(n," userIDList:").concat(e)),n&&!Ve(e)&&e.forEach((function(e){t._map.has(e)&&t._map.get(e).removeFromGroupList(n)}))}},{key:"reset",value:function(){this._map.clear(),this._startIdx=0,this._standardSeq=0,this._customSeq=0}}]),Gr),Za=(s(wr,[{key:"addToUserIDList",value:function(e){-1===this.userIDList.indexOf(e)&&(this.userIDList.push(e),this.count=this.userIDList.length)}},{key:"removeFromUserIDList",value:function(e){-1<(e=this.userIDList.indexOf(e))&&(this.userIDList.splice(e,1),this.count=this.userIDList.length)}}]),wr),Qa=(s(Pr,[{key:"getLocalGroupList",value:function(){return m(this._map.values())}},{key:"_onGroupListUpdated",value:function(){var e=m(this._map.values());this._snsM.emitOEvt(S.FRIEND_GROUP_LIST_UPDATED,e)}},{key:"getGroupList",value:function(){var e=this,t="".concat(this._n,".").concat("getGroupList"),n=new Jn("getGroupList");return this._snsM.req({P:Gn.GET_FD_GRP_LIST,data:{fromAccount:this._snsM.getMyUserID()}}).then((function(o){n.end(),Ve(o=o.data.resultList)?Ae.i("".concat(t," ok. count:0")):(Ae.i("".concat(t," ok. count:").concat(o.length)),e._map.clear(),o.forEach((function(t){var n=new Za(t);e._map.set(t.name,n)})),e._onGroupListUpdated())})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," error:"),e),yn(e)}))}},{key:"createGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("createGroup"),s=e.name;return e=e.userIDList,this._map.has(s)?yn({code:Pn.FRIEND_GRP_EXISTED}):(t="name:".concat(s," userIDList:").concat(e),(n=new Jn("createGroup")).setMessage(t),this._snsM.req({P:Gn.CREATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),groupName:[s],userIDList:Ye(e)?e:void 0}}).then((function(e){n.end(),Ae.l("".concat(i," ok. ").concat(t)),e=e.data.resultList;var a=[],r=[];return e&&e.forEach((function(e){var t=e.to,n=e.resultCode,o=e.resultInfo;ut(n)||0===n?a.push(t):(t={userID:e.to,code:n,message:o},r.push(t))})),e=new Za({name:s,userIDList:a}),o._map.set(s,e),o._snsM.onAddedToFriendGroup({name:s,userIDList:a}),o._onGroupListUpdated(),mn({friendGroup:e,failureUserIDList:r})})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)})))}},{key:"deleteGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("deleteGroup"),s=e.name;return this._map.has(s)?(t="name:".concat(s),(n=new Jn("deleteGroup")).setMessage(t),this._snsM.req({P:Gn.DEL_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),nameList:[s]}}).then((function(e){n.end(),Ae.l("".concat(i," ok. ").concat(t));var a=o._map.get(s);return a&&(o._snsM.onRemovedFromFriendGroup({name:s,userIDList:a.userIDList}),o._map.delete(s),a.userIDList.length=0),o._onGroupListUpdated(),mn(a)})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"renameGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("renameGroup"),s=e.oldName,a=e.newName;return this._map.has(s)?(t="oldName:".concat(s," newName:").concat(a),(n=new Jn("renameGroup")).setMessage(t),this._snsM.req({P:Gn.UPDATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),oldName:s,newName:a}}).then((function(){var e;return n.end(),Ae.l("".concat(i," ok. ").concat(t)),o._map.has(s)?((e=o._map.get(s)).name=a,o._map.delete(s),o._map.set(a,e),o._snsM.onRemovedFromFriendGroup({name:s,userIDList:e.userIDList}),o._snsM.onAddedToFriendGroup({name:a,userIDList:e.userIDList}),o._onGroupListUpdated(),mn(e)):mn()})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"addToGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("addToGroup"),s=e.name;return e=e.userIDList,this._map.has(s)?(t="name:".concat(s," userIDList:").concat(e),(n=new Jn("addToGroup")).setMessage(t),this._snsM.req({P:Gn.UPDATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),oldName:s,updateGroupItem:e.filter((function(e){return o._snsM.isMyFriend(e)})).map((function(e){return{to:e,updateType:"Update_Type_Add"}}))}}).then((function(e){return n.end(),Ae.l("".concat(i," ok. ").concat(t)),o._onGroupUpdated(s,e)})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"removeFromGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("removeFromGroup"),s=e.name;return e=e.userIDList,this._map.has(s)?(t="name:".concat(s," userIDList:").concat(e),(n=new Jn("removeFromGroup")).setMessage(t),this._snsM.req({P:Gn.UPDATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),oldName:s,updateGroupItem:e.filter((function(e){return o._snsM.isMyFriend(e)})).map((function(e){return{to:e,updateType:"Update_Type_Delete"}}))}}).then((function(e){return n.end(),Ae.l("".concat(i," ok. ").concat(t)),o._onGroupUpdated(s,e)})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"_onGroupUpdated",value:function(e,t){t=t.data.resultList;var n=this._map.get(e),o=[],i=[],s=[];return Ye(t)&&t.forEach((function(e){var t=e.to,a=e.resultCode,r=e.resultInfo,c=e.type;0===a?"Update_Type_Add"===c?n&&(n.addToUserIDList(t),i.push(t)):"Update_Type_Delete"===c&&n&&(n.removeFromUserIDList(t),s.push(t)):o.push({to:e.to,code:a,message:r})})),Ae.l("".concat(this._n,"._onGroupUpdated name:").concat(e," userIDList:").concat(n.userIDList)),0<i.length&&this._snsM.onAddedToFriendGroup({name:e,userIDList:i}),0<s.length&&this._snsM.onRemovedFromFriendGroup({name:e,userIDList:s}),mn({friendGroup:n,failureUserIDList:o})}},{key:"updateWhenFriendAdded",value:function(e){var t=this,n=e.nameList,o=e.userID;Ae.l("".concat(this._n,".updateWhenFriendAdded userID:").concat(o," nameList:").concat(n)),Ve(n)||n.forEach((function(e){t._map.has(e)&&t._map.get(e).addToUserIDList(o)}))}},{key:"updateWhenFriendDeleted",value:function(e){var t=this,n=e.nameList,o=e.userID;Ae.l("".concat(this._n,".updateWhenFriendDeleted userID:").concat(o," nameList:").concat(n)),Ve(n)||n.forEach((function(e){t._map.has(e)&&t._map.get(e).removeFromUserIDList(o)}))}},{key:"_onGroupNotExist",value:function(e){return yn({code:Pn.FRIEND_GRP_NOT_EXIST})}},{key:"reset",value:function(){this._map.clear()}}]),Pr),er=(r(Nr,bn),wa=g(Nr),s(Nr,[{key:"onContextUpdated",value:function(e){this._friendHandler.pagingGetFriendList(),this._friendGroupHandler.getGroupList(),this._friendApplicationHandler.getApplicationList()}},{key:"onRelationChainModified",value:function(e){var t,n,o,i,s,a,r=this;Ve(e=e.dataList)||(t=[],n=[],o=[],s=!(i=[]),a="",e.forEach((function(e){var c;3!==e.pushType&&4!==e.pushType||!e.from||(a=e.from),e.friendAddAccount&&(t.push.apply(t,m(e.friendAddAccount)),i.push.apply(i,m(e.friendAddAccount))),e.friendDelAccount&&n.push.apply(n,m(e.friendDelAccount)),e.friendApplicationAdded&&o.push.apply(o,m(e.friendApplicationAdded)),e.friendApplicationDeletedUserIDList&&i.push.apply(i,m(e.friendApplicationDeletedUserIDList)),e.reportTime&&7===e.pushType&&(s=!0),e.friendUpInfo&&(c={dataList:[]},e.friendUpInfo.forEach((function(e){c.dataList.push({userID:e.friendAccount,profileList:m(e.sns)})})),r.onFriendProfileModified(c))})),s&&this._friendApplicationHandler.onApplicationRead(),this._friendApplicationHandler.onApplicationAdded(o,a),this._friendApplicationHandler.onApplicationDeleted(i),this._friendHandler.onFriendAdded(t),this._friendHandler.onFriendDeleted(n))}},{key:"isMyFriend",value:function(e){return this._friendHandler.isMyFriend(e)}},{key:"filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],"sns")).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"onFriendProfileModified",value:function(e){this._friendHandler.onFriendProfileModified(e)}},{key:"getLocalFriendList",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=this._friendHandler.getLocalFriendList();return e?vn(t):t}},{key:"getFriendRemark",value:function(e){return this._friendHandler.getFriendRemark(e)}},{key:"getFriendList",value:function(){return this._friendHandler.pagingGetFriendList()}},{key:"addFriend",value:function(e){return this._friendHandler.addFriend(e)}},{key:"deleteFriend",value:function(e){return this._friendHandler.deleteFriend(e)}},{key:"checkFriend",value:function(e){return this._friendHandler.checkFriend(e)}},{key:"getFriendProfile",value:function(e){return this._friendHandler.getFriendProfile(e)}},{key:"updateFriend",value:function(e){return this._friendHandler.updateFriend(e)}},{key:"onAddedToFriendGroup",value:function(e){this._friendHandler.onAddedToFriendGroup(e)}},{key:"onRemovedFromFriendGroup",value:function(e){this._friendHandler.onRemovedFromFriendGroup(e)}},{key:"getLocalFriendApplicationList",value:function(){return vn(this._friendApplicationHandler.getLocalApplicationList())}},{key:"deleteFriendApplication",value:function(e){return this._friendApplicationHandler.deleteApplication(e)}},{key:"refuseFriendApplication",value:function(e){return this._friendApplicationHandler.refuseApplication(e)}},{key:"acceptFriendApplication",value:function(e){return this._friendApplicationHandler.acceptApplication(e)}},{key:"setFriendApplicationRead",value:function(e){return this._friendApplicationHandler.setApplicationRead(e)}},{key:"getLocalFriendGroupList",value:function(){return vn(this._friendGroupHandler.getLocalGroupList())}},{key:"createFriendGroup",value:function(e){return this._friendGroupHandler.createGroup(e)}},{key:"deleteFriendGroup",value:function(e){return this._friendGroupHandler.deleteGroup(e)}},{key:"addToFriendGroup",value:function(e){return this._friendGroupHandler.addToGroup(e)}},{key:"removeFromFriendGroup",value:function(e){return this._friendGroupHandler.removeFromGroup(e)}},{key:"renameFriendGroup",value:function(e){return this._friendGroupHandler.renameGroup(e)}},{key:"updateWhenFriendAdded",value:function(e){this._friendGroupHandler.updateWhenFriendAdded(e)}},{key:"updateWhenFriendDeleted",value:function(e){this._friendGroupHandler.updateWhenFriendDeleted(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._friendHandler.reset(),this._friendGroupHandler.reset(),this._friendApplicationHandler.reset()}}]),Nr),tr=(r(Or,bn),Pa=g(Or),s(Or,[{key:"isWorkerEnabled",value:function(){return this._isWorkerEnabled&&he}},{key:"startWorkerTimer",value:function(){Ae.l("".concat(this._n,".startWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("start")}},{key:"stopWorkerTimer",value:function(){Ae.l("".concat(this._n,".stopWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("stop")}},{key:"_init",value:function(){var e,t;he&&(e=URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'],{type:"application/javascript; charset=utf-8"})),this._workerTimer=new Worker(e),(t=this)._workerTimer.onmessage=function(e){e.data?(t._timerID=e.data,Ae.l("".concat(t._n,"._init seed:").concat(t._timerID))):t._m.onCheckTimer()})}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("enable_worker");Ae.l("".concat(this._n,"._onCloudConfig enableWorker:").concat(e)),ut(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(){Ae.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(){Ae.l("".concat(this._n,".reset"))}}]),Or),nr=(s(Rr,[{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,o=0;0<=n;n--,o++)t=(o<32?new L(0,Math.pow(2,o)):new L(Math.pow(2,o-32),0)).toString(),"1"===e[n]?this._featureMap.set(t,!0):this._featureMap.set(t,!1)}else Ae.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,o=!0,i=t.length-1,s=0;0<=i;i--,s++)if("1"===t.charAt(i)&&(n=(s<32?new L(0,Math.pow(2,s)):new L(Math.pow(2,s-32),0)).toString(),!this._featureMap.get(n))){o=!1;break}return Ae.l("".concat(this._n,".isFeatureEnabled decimalNumber:").concat(e," key:").concat(n," ret:").concat(o)),vn({enabled:o})}},{key:"isFeatureEnabledForStat",value:function(e){for(var t=parseInt(e).toString(2),n=t.length-1,o=0;0<=n;n--,o++)if("1"===t.charAt(n)){if(i=(o<32?new L(0,Math.pow(2,o)):new L(Math.pow(2,o-32),0)).toString(),!this._featureMap.get(i))break;var i,s="",a=0;i===w.PLUGIN_TRANSLATE?(s="plugin_translate",a=16):i===w.PLUGIN_VOICE_TO_TEXT?(s="plugin_voice_to_text",a=17):i===w.PLUGIN_CS?(s="plugin_cs",a=14):i===w.PLUGIN_PUSH?(s="plugin_push",a=13):i===w.PLUGIN_BOT?(s="plugin_bot",a=15):i===w.MSG_REACTION&&(s="plugin_emoji_reaction",a=18),""!==s&&(i=this._commercialConfigM.get(12).getUIPlatform(),new Jn(s).setCode(a).setUIPlatform(i).end(),Ae.l("".concat(this._n,".isFeatureEnabledForStat ").concat(s," code:").concat(a," uiPlatform:").concat(i)))}}},{key:"isSearchCloudMessagesEnabled",value:function(){var e;this._isSCMReported||(e=this._commercialConfigM.get(12).getUIPlatform(),new Jn("plugin_search").setCode(6).setUIPlatform(e).end(),this._isSCMReported=!0)}},{key:"clear",value:function(){this._featureMap.clear(),this._isSCMReported=!1}}]),Rr),or=(s(Ar,[{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,o=this._canFetch(),i="".concat(this._n,".fetchConfig");Ae.l("".concat(i," canFetch:").concat(o)),o&&(e=new Jn("fetchCommercialConfig"),o=this.get(12).getSDKAppID(),t=this.get(20),this._isFetching=!0,t.req({P:Gn.FETCH_COMMERCIAL_CONFIG,data:{SDKAppID:o}}).then((function(t){e.setMessage("purchaseBits:".concat(t.data.purchaseBits)).end(),Ae.l("".concat(i," 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));Ae.l("".concat(t)),new Jn("pushedCommercialConfig").setMessage("purchaseBits:".concat(e.purchaseBits)).end(),this._parseConfig(e)}},{key:"_parseConfig",value:function(e){var t="".concat(this._n,"._parseConfig"),n=e.errorCode,o=e.errorMessage,i=e.purchaseBits,s=e.expiredTime;0===n?(this._purchasedFeatureHandler.parsePurchaseBits(i),this._expiredTime=Date.now()+1e3*s):ut(n)?(Ae.l("".concat(t," failed. Invalid message format:"),e),this._setExpiredTimeOnResponseError(36e5)):(Ae.e("".concat(t," errorCode:").concat(n," errorMessage:").concat(o)),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:"isSearchCloudMessagesEnabled",value:function(){this._purchasedFeatureHandler.isSearchCloudMessagesEnabled()}},{key:"get",value:function(e){return this._m.get(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler.clear()}}]),Ar),ir=(r(br,bn),Na=g(br),s(br,[{key:"registerPlugin",value:function(e){var t,n,o,i,s,a,r,c,u,l,d,p,h;z?(this._offlinePushPlugin=e["tim-offline-push-plugin"],t=(h=e.offlinePushConfig||{}).huaweiBusinessID,n=h.xiaomiBusinessID,o=h.xiaomiAppID,i=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=o,this._androidPushConfig.xiaomiPushAppKey=i,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 Jn("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!ut(this._offlinePushPlugin))).end(!0),Ae.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");ze(this._offlinePushPlugin.getDeviceToken)?(e="androidPushConfig:".concat(JSON.stringify(this._androidPushConfig),", iosBusinessID:").concat(this._iosBusinessID),Ae.l("".concat(n," start. ").concat(e)),new Jn("_getDeviceToken").setMessage("".concat(e)).end(!0),this._offlinePushPlugin.getDeviceToken(this._androidPushConfig,(function(o){var i,s,a,r,c=new Jn("getDeviceTokenRes"),u=o.code,l=o.msg;0===u?(i=(r=o.data).deviceToken,s=r.deviceBrand,a=r.deviceType,r=r.bussinessId,t._deviceToken=i,t._businessID=r||t._iosBusinessID,e="deviceToken:".concat(i,", deviceBrand:").concat(s||a,", businessID:").concat(t._businessID),Ae.l("".concat(n," ok. ").concat(e)),c.setMessage(e).end(!0),t._setToken()):(c.setMessage("code:".concat(u,", msg:").concat(l)).end(!0),Ae.e("".concat(n," failed. error:"),o))}))):Ae.e("".concat(n," getDeviceToken is not a function"))}},{key:"canIUseOfflinePush",value:function(){return z&&!ut(this._offlinePushPlugin)}},{key:"_setAppShowListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setAppShowListener");ut(this._offlinePushPlugin)?Ae.e("".concat(t," offlinePushPlugin is undefined")):ze(this._offlinePushPlugin.setAppShowListener)?(new Jn("_setAppShowListener").end(!0),Ae.l("".concat(t," start")),this._offlinePushPlugin.setAppShowListener((function(n){n=(n||{}).appShow,new Jn("setAppShowListenerRes").setMessage("appShow:".concat(n)).end(!0),Ae.l("".concat(t," ok. appShow:").concat(n)),e._m.isReady()&&(0===n?(e._getConvUnreadCount(),e._onBackground()):1===n&&e._onForeground())}))):Ae.e("".concat(t," setAppShowListener is not a function"))}},{key:"getDeviceBrand",value:function(){var e;if(!ut(this._offlinePushPlugin)&&ze(this._offlinePushPlugin.getDeviceType))return e=(this._offlinePushPlugin.getDeviceType()||{}).deviceType,Ae.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,o="",i="",s=(Ve(this._deviceToken)&&(n=0),this.getUniAppPlatform()),a=this.getDeviceBrand(),r=(s===A.IOS||s===A.IPAD||s===A.MAC?i=this._deviceToken:s===A.ANDROID&&(o=this._deviceToken),new Jn("offlinePushSetToken"));return s="deviceToken:".concat(i||o,", businessID:").concat(this._businessID,", ")+"deviceBrand:".concat(a,", isWebUniapp:").concat(this._isWebUniapp,", pushMsg:").concat(n,", platform:").concat(s),r.setMessage("".concat(s)),Ae.l("".concat(e," ").concat(s)),this.req({P:Gn.SET_TOKEN,data:{tokenID:o,pushMsg:n,sdkAppID:t.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:a,deviceToken:i,isWebUniapp:this._isWebUniapp}}).then((function(t){return r.end(),Ae.l("".concat(e," ok")),t})).catch((function(t){return r.setError(t).end(),Ae.e("".concat(e," failed. error:"),t),yn(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 Jn("_onBackground");this.req({P:Gn.STAT_BACKGROUND,data:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then((function(o){return n.setMessage("c2cUnreadCount: ".concat(e._c2cUnreadCount,", groupUnreadCount: ").concat(e._groupUnreadCount)).end(),Ae.l("".concat(t," ok")),o})).catch((function(e){n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e)}))}},{key:"_onForeground",value:function(){var e="".concat(this._n,".").concat("_onForeground"),t=new Jn("_onForeground");this.req({P:Gn.STAT_FOREGROUND,data:{isWebUniapp:this._isWebUniapp}}).then((function(n){return t.end(),Ae.l("".concat(e," ok")),n})).catch((function(n){t.setError(n).end(),Ae.e("".concat(e," failed. error:"),n)}))}},{key:"getUniAppPlatform",value:function(){var e=BI().platform,t=this.getDeviceBrand();return"ios"===e?A.IOS:"android"===e?A.ANDROID:1002===t?A.IPAD:1001===t?A.MAC:void 0}},{key:"reset",value:function(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,Ae.l("".concat(this._n,".reset"))}}]),br),sr=(r(Lr,bn),Oa=g(Lr),s(Lr,[{key:"registerPlugin",value:function(e){var t,n,o;z?(t="".concat(this._n,".").concat("registerPlugin"),this._pushPlugin=e["tim-push"],this._getDeviceInfo(),n=(o=e.pushConfig||{}).androidConfig,o=o.iOSConfig,$e(n)&&(this._androidPushConfig=n[this._deviceInfo.packageName]),n=(o||{}).iOSBusinessID,this._iOSBusinessID=n,o=!ut(this._pushPlugin),new Jn("registerPlugin").setMessage(this._pluginName).setMoreMessage("isExisted:".concat(o)).end(!0),Ae.l("".concat(t," ok. pushConfig:").concat(JSON.stringify(e.pushConfig))),o?(this._setAppShowListener(),this._setPushEventReportListener()):Ae.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,n="".concat(this._n,".").concat("_reportEventCacheList");ze(this._pushPlugin.getPushEventCacheList)?(new Jn("_reportEventCacheList").end(!0),this._pushPlugin.getPushEventCacheList((function(o){var i=o.code,s=o.data.eventList,a=new Jn("getPushEventCacheListRes");if(a.setCode(i),0!==i)a.setMessage("res:".concat(JSON.stringify(o))).end(!0),Ae.e("".concat(n," failed. error:").concat(JSON.stringify(o)));else{i=s.length<10?"eventList:".concat(JSON.stringify(s)):"eventList.length:".concat(s.length),Ae.l("".concat(n," ok. ").concat(i)),a.setMessage(i).end(!0);for(var r=t(t({},o.data),{},{eventList:[]});0<s.length;)r.eventList=s.splice(0,40),e._pushReport(r)}}))):Ae.e("".concat(this._pluginName,".getPushEventCacheList is not a function"))}},{key:"_getDeviceToken",value:function(){var e,t=this,n="".concat(this._n,".").concat("_getDeviceToken");ze(this._pushPlugin.getDeviceToken)?(e="androidPushConfig:".concat(JSON.stringify(this._androidPushConfig)," iOSBusinessID:").concat(this._iOSBusinessID),Ae.l("".concat(n," start. ").concat(e)),new Jn("_getDeviceToken").setMessage("".concat(e)).end(!0),this._pushPlugin.getDeviceToken(this._androidPushConfig,(function(o){var i,s,a,r=o.code,c=o.msg,u=new Jn("getDeviceTokenRes");u.setCode(r),0===r?(i=(r=o.data).deviceToken,s=r.deviceBrand,a=r.deviceType,r=r.bussinessId,t._deviceToken=i,t._businessID=r||t._iOSBusinessID,e="deviceToken:".concat(i," deviceBrand:").concat(s||a," businessID:").concat(t._businessID),Ae.l("".concat(n," ok. ").concat(e)),u.setMessage(e).end(!0),t._setToken()):(u.setMessage(c).end(!0),Ae.e("".concat(n," failed. error:").concat(JSON.stringify(o))))}))):Ae.e("".concat(this._pluginName,".getDeviceToken is not a function"))}},{key:"_getDeviceInfo",value:function(){var e,n,o,i,s="".concat(this._n,".").concat("_getDeviceInfo");ze(this._pushPlugin.getDeviceInfo)?(i=(e=this._pushPlugin.getDeviceInfo()).code,n=e.data,(o=new Jn("_getDeviceInfo")).setCode(i),0===i?(this._deviceInfo=t(t({},this._deviceInfo),n),this._deviceInfo.pushVersion||(this._deviceInfo.pushVersion="1.0.1"),i="deviceInfo:".concat(JSON.stringify(this._deviceInfo)),Ae.l("".concat(s," ok. ").concat(i)),o.setMessage(i).end(!0)):(o.setMessage("deviceInfoRes:".concat(JSON.stringify(e))).end(!0),Ae.e("".concat(s," failed. error:").concat(JSON.stringify(e))))):Ae.e("".concat(this._pluginName,".getDeviceInfo is not a function"))}},{key:"canIUseTIMPush",value:function(){return z&&!ut(this._pushPlugin)}},{key:"_setAppShowListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setAppShowListener");ze(this._pushPlugin.setAppShowListener)?(new Jn("_setAppShowListener").end(!0),Ae.l("".concat(t," start")),this._pushPlugin.setAppShowListener((function(n){n=(n||{}).appShow,new Jn("setAppShowListenerRes").setMessage("appShow:".concat(n)).end(!0),Ae.l("".concat(t," ok. appShow:").concat(n)),e._m.isReady()&&(0===n?(e._getConvUnreadCount(),e._onBackground()):1===n&&e._onForeground())}))):Ae.e("".concat(this._pluginName,".setAppShowListener is not a function"))}},{key:"_setPushEventReportListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setPushEventReportListener");ze(this._pushPlugin.setPushEventReportListener)?(new Jn("_setPushEventReportListener").end(!0),this._pushPlugin.setPushEventReportListener((function(n){var o=n.code,i=n.data,s=i.eventList,a=new Jn("setPushEventReportListenerRes");a.setCode(o),0===o?(o="eventList:".concat(JSON.stringify(s)),Ae.l("".concat(t," ok. ").concat(o)),a.setMessage(o).end(!0),e._m.isReady()&&Ye(s)&&0<s.length&&e._pushReport(i)):(a.setMessage("res:".concat(JSON.stringify(n))).end(!0),Ae.e("".concat(t," failed. error:").concat(JSON.stringify(n))))}))):Ae.e("".concat(this._pluginName,".setPushEventReportListener is not a function"))}},{key:"getDeviceBrand",value:function(){var e;if(!ut(this._pushPlugin)&&ze(this._pushPlugin.getDeviceType))return e=(this._pushPlugin.getDeviceType()||{}).deviceType,Ae.l("".concat(this._n,".getDeviceBrand ok. deviceType:").concat(e)),e}},{key:"_setToken",value:function(){var e="".concat(this._n,".").concat("_setToken"),n=this.get(12),o=1,i="",s="",a=(Ve(this._deviceToken)&&(o=0),this.getUniAppPlatform()),r=this.getDeviceBrand(),c=(a===A.IOS||a===A.IPAD||a===A.MAC?s=this._deviceToken:a===A.ANDROID&&(i=this._deviceToken),a=t({tokenID:i,pushMsg:o,sdkAppID:n.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:r,deviceToken:s,isWebUniapp:this._isWebUniapp},this._deviceInfo),new Jn("_setToken"));i="data:".concat(JSON.stringify(a)),c.setMessage("".concat(i)),Ae.l("".concat(e," ").concat(i)),this.req({P:Gn.SET_TOKEN,data:a}).then((function(){c.end(),Ae.w("".concat(e," ok"))})).catch((function(t){c.setError(t).end(),Ae.e("".concat(e," failed. error:"),t),yn(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 Jn("_onBackground");this.req({P:Gn.STAT_BACKGROUND,data:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then((function(){n.setMessage("c2cUnreadCount:".concat(e._c2cUnreadCount," groupUnreadCount:").concat(e._groupUnreadCount)).end(),Ae.l("".concat(t," ok"))})).catch((function(e){n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e)}))}},{key:"_onForeground",value:function(){var e="".concat(this._n,".").concat("_onForeground"),t=new Jn("_onForeground");this.req({P:Gn.STAT_FOREGROUND,data:{isWebUniapp:this._isWebUniapp}}).then((function(){t.end(),Ae.l("".concat(e," ok"))})).catch((function(n){t.setError(n).end(),Ae.e("".concat(e," failed. error:"),n)}))}},{key:"_pushReport",value:function(e){var t=this,n="".concat(this._n,".").concat("_pushReport"),o=new Jn("_pushReport");this.req({P:Gn.PUSH_REPORT,data:{eventList:e.eventList}}).then((function(){o.end(),t._notifyReportSuccess(e)})).catch((function(e){o.setError(e).end(),Ae.e("".concat(n," failed. error:"),e)}))}},{key:"_notifyReportSuccess",value:function(e){!ut(this._pushPlugin)&&ze(this._pushPlugin.notifyReportSuccess)&&(this._pushPlugin.notifyReportSuccess(e),Ae.l("".concat(this._n,"._notifyReportSuccess ok")))}},{key:"getUniAppPlatform",value:function(){var e=BI().platform,t=this.getDeviceBrand();return"ios"===e?A.IOS:"android"===e?A.ANDROID:1002===t?A.IPAD:1001===t?A.MAC:void 0}},{key:"reset",value:function(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,Ae.l("".concat(this._n,".reset"))}}]),Lr),ar=(r(kr,bn),Ra=g(kr),s(kr,[{key:"init",value:function(){var e=this.get(18).getPlugin("tim-profanity-filter-plugin");e&&(this._plugin=new e({logger:Ae,isArray:Ye,isMap:Be,isDevMode:this.isDevMode()}),this._getLexicon())}},{key:"onCheckTimer",value:function(){this._plugin&&this._canIUseLexicon&&this.isLoggedIn()&&!this._isFetching&&Date.now()>=this._expiredTime&&this._getLexicon()}},{key:"filterMessage",value:function(e,t){var n=!0;if(this._plugin&&this._canIUseLexicon&&(!t||!t.messageControlInfo||!0!==t.messageControlInfo.excludedFromContentModeration)){t=e.type;var o=e.conversationType;if(t===E.MSG_TEXT||t===E.MSG_CUSTOM){var i,s="".concat(this._n,".filterMessage");if(Ae.l("".concat(s)),t===E.MSG_TEXT){if(o===E.CONV_C2C?i="c2c_text_message":o===E.CONV_GROUP&&(i="group_text_message"),!this._isConfigOn(i))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(o===E.CONV_C2C?i="c2c_custom_message":o===E.CONV_GROUP&&(i="group_custom_message"),!this._isConfigOn(i))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))}Ae.l("".concat(s," done. isAllowedToSend:").concat(n))}}return n}},{key:"filterText",value:function(e,t){var n="".concat(this._n,".filterText"),o={isAllowedToSend:!0,modifiedText:e};return this._plugin&&this._canIUseLexicon&&this._isConfigOn(t)&&(Ae.l("".concat(n)),e=(t=this._plugin.filter(e)).type,t=t.modifiedText,1===e?o.isAllowedToSend=!1:2===e&&(o.modifiedText=t),Ae.l("".concat(n," done. ret:"),o)),o}},{key:"_getLexicon",value:function(){var e=this,t=new Jn("profanityFilter"),n="".concat(this._n,"._getLexicon");this._isFetching=!0,this.req({P:Gn.GET_PROFANITY_LIST,data:{startIndex:this._startIndex,version:this._version}}).then((function(o){var i=(o=o.data).errorInfo,s=o.filterConfig,a=o.lexicon,r=o.strToken,c=o.completeFlag,u=o.nextStartIndex,l=o.version,d=(o=o.expiredTime,i.errorCode),p=i.errorMessage;return 0!==d?(e._isFetching=!1,Ae.w("".concat(n," failed. error:"),i),void t.setCode(d).setMessage(p).end()):(e._onFilterConfig(s),e._getToken(r),1===c?(Ae.l("".concat(n," done. version:").concat(l," expiredTime:").concat(o)),e._version=l,e._canIUseLexicon=!0,e._isFetching=!1,e._expiredTime=Date.now()+1e3*o,void e._plugin.onLexiconCompleted(a)):(e._startIndex=u,e._plugin.onLexiconSliced(a),void e._getLexicon()))})).catch((function(o){t.setError(o).end(),e._isFetching=!1,Ae.l("".concat(n," failed. error:"),o)}))}},{key:"_onFilterConfig",value:function(e){var t=this;Ve(e)||(this._filterConfigMap.clear(),Object.keys(e).forEach((function(n){t._filterConfigMap.set(n,e[n])})),Ae.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(ct(e)){var t=e.length,n="";if(t%2==0)for(var o=0;o<=t-1;o+=2)n=(n+=e[o+1])+e[o];else{for(var i=0;i<t-1;i+=2)n=(n+=e[i+1])+e[i];n+=e[t-1]}this._plugin.onToken(n)}}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._plugin&&(this._plugin.reset(),this._plugin=null),this._filterConfigMap.clear(),this._startIndex=0,this._version=0,this._canIUseLexicon=!1,this._isFetching=!1,this._expiredTime=0}}]),kr),rr=(s(Dr,[{key:"_onCloudConfig",value:function(){var e=this,t=this._m.get(23).getCloudConfig("rtc_cmd");ut(t)||((t=JSON.parse(t)).forEach((function(t){e._TRTCCommandList.includes(t)||e._TRTCCommandList.push(t)})),this._setTRTCCommandMap())}},{key:"_setTRTCCommandMap",value:function(){for(var e,t=0,n=this._TRTCCommandList.length;t<n;t++)e=this._TRTCCommandList[t].split(".")[0],this._TRTCCommandMap.set(e,1)}},{key:"onRoomCustomDataReceived",value:function(e){this._m.getOEmitInst().emit(S.ROOM_CUSTOM_DATA_RECEIVED,e)}},{key:"sendTRTCCustomData",value:function(e){var t=e.serviceCommand,n=(e=e.data,"".concat(P.NAME.TUIROOM_SVR,".*"));return ut(t)||(n=t),this._isValidServiceCommand(n)?this._trans({servcmd:n,data:e}):yn({code:Pn.INVALID_TRTC_CMD})}},{key:"_trans",value:function(e){Ae.d("".concat(this._n,"._trans. options:").concat(JSON.stringify(e)));var t=e.servcmd;return e=e.data,this._m.get(20).trans({servcmd:t,data:ct(e)?JSON.parse(e):e})}},{key:"_isValidServiceCommand",value:function(e){return e.endsWith(".*")?this._TRTCCommandList.includes(e):(e=e.split(".")[0],this._TRTCCommandMap.has(e))}},{key:"isTRTCCommand",value:function(e){return e=e.split(".")[0],this._TRTCCommandMap.has(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Dr),cr=(s(Er,[{key:"_init",value:function(){var e,t=this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE,!1);if(t){try{e=JSON.parse(t)}catch(n){this._getStorageModule().removeItem(this.TIM_ERROR_ASSISTANCE,!1),Ae.w("".concat(this._n,"._init error:"),n)}e&&(this._needToUpdate(e)?this._fetch():this._fillMap(e.message))}else this._fetch()}},{key:"_needToUpdate",value:function(e){var t=e.localSavedTime;return e=e.localSavedVersion,t=t&&(new Date).getTime()-t>=this.STORAGE_EXPIRES_TIME,e=!e||"3.4.7"!==e,Ae.l("".concat(this._n,"._needToUpdate isTimeout:").concat(t," isDifferentVersion:").concat(e)),t||e}},{key:"_fetch",value:function(){var e,t,n,o,i,s;this._m.get(12).isPrivateNetWork()||(e="https://web.sdk.qcloud.com/im/download/error-message/v3/0.0.6/tim-error-message.txt",t="application/x-www-form-urlencoded;charset=UTF-8",n="".concat(this._n,"._fetch ok in"),o=this,Z?ne.request({url:e,method:"GET",timeout:3e3,header:{"content-type":t},dataType:"text",success:function(e){o._fillAndSave(e.data),Ae.l("".concat(n," mini program"))},fail:function(){}}):(i=new XMLHttpRequest,s=setTimeout((function(){i.abort()}),3e3),i.onreadystatechange=function(){4===i.readyState&&(clearTimeout(s),200!==i.status&&304!==i.status||(Ae.l("".concat(n," browser")),o._fillAndSave(i.responseText)))},i.open("GET",e,!0),i.setRequestHeader("Content-type",t),i.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.4.7"}),!0,!1)}},{key:"_getStorageModule",value:function(){return this._m.get(13)}},{key:"_fillMap",value:function(e){this._map.clear();for(var t,n,o=e.split(";\n"),i=o.length,s=new RegExp(/'/g),a=0;a<i;a++)if(n=o[a].indexOf(":"),t=o[a].slice(0,n),n=o[a].slice(n+1,o[a].length),!t.startsWith("//")){if(ut(n))continue;this._map.set(t,n.replace(s,""))}}},{key:"get",value:function(e){var t=e.isIntl,n=e.key,o=e.replacement1;return e=e.replacement2,t="".concat(n,t?"_en":"_cn"),!this._map.has(t)&&this._map.has(n)&&(t=n),n="",this._map.has(t)&&(n=this._map.get(t),ut(o)||(n=n.replace("$replacement1",o)),ut(e)||(n=n.replace("$replacement2",e))),n}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Er),ur=(s(Sr,[{key:"onNewMessageList",value:function(e){var t=this;e.forEach((function(e){var n=t.getPayloadData(e);n&&t._handleActionType(n,e)}))}},{key:"onMessageModified",value:function(e){var t=this;e.forEach((function(e){var n=t.getPayloadData(e);n&&t._onInvitationModified(n,e)}))}},{key:"getPayloadData",value:function(e){var t="".concat(this._n,".getPayloadData");e=e.payload.data;try{return JSON.parse(e)}catch(n){return Ae.e("".concat(t," JSON parse error. signalingData:").concat(e)),null}}},{key:"_handleActionType",value:function(e,t){switch(e.actionType){case D.ACTION_TYPE_INVITE:this._onNewInvitationReceived(e,t);break;case D.ACTION_TYPE_REJECT_INVITE:this._onInviteeRejected(e);break;case D.ACTION_TYPE_ACCEPT_INVITE:this._onInviteeAccepted(e);break;case D.ACTION_TYPE_CANCEL_INVITE:this._onInvitationCancelled(e);break;case D.ACTION_TYPE_INVITE_TIMEOUT:this._onInvitationTimeout(e)}}},{key:"_genBaseEmitData",value:function(e){return{inviteID:e.inviteID,inviter:e.inviter,groupID:e.groupID,data:e.data||""}}},{key:"_onNewInvitationReceived",value:function(e,n){var o="".concat(this._n,"._onNewInvitationReceived"),i=e.inviteID,s=e.inviteeList,a=e.groupID,r=e.inviter,c=this._sigM.getMyUserID(),u=s.includes(c),l=e.timeout,d=(Me().getTime()-1e3*n.time)/1e3;0<l&&0<d&&d<l&&(l-=d),o="".concat(o," myselfIncluded:").concat(u," groupID:").concat(a," signalObj:").concat(JSON.stringify(e)),Ae.l("".concat(o," timeout:").concat(l,"s delta:").concat(d,"s")),!(a&&u||!a)||(o=this._sigM.getInviteInfo(i))&&o===e||(o||this._sigM.setInviteInfo(i,t(t({},e),{},{message:n})),this._sigM.emitEvent(D.NEW_INVITATION_RECEIVED,t(t({},this._genBaseEmitData(e)),{},{inviteeList:s})),r!==c&&this._sigM.startTimer(t(t({},e),{},{timeout:l})))}},{key:"_onInviteeRejected",value:function(e){var n="".concat(this._n,"._onInviteeRejected"),o=e.inviteID,i=e.inviter,s=e.groupID,a=this._sigM.hasInviteInfo(o);Ae.l("".concat(n," inviteID:").concat(o," hasInviteID:").concat(a," inviter:").concat(i," groupID:").concat(s)),a&&(this._sigM.updateInviteInfo(e),this._sigM.emitEvent(D.INVITEE_REJECTED,t(t({},this._genBaseEmitData(e)),{},{invitee:e.inviteeList[0]})))}},{key:"_onInviteeAccepted",value:function(e){var n="".concat(this._n,"._onInviteeAccepted"),o=e.inviteID,i=e.inviter,s=e.groupID,a=this._sigM.hasInviteInfo(o);Ae.l("".concat(n," inviteID:").concat(o," hasInviteID:").concat(a," inviter:").concat(i," groupID:").concat(s)),a&&(this._sigM.updateInviteInfo(e),this._sigM.emitEvent(D.INVITEE_ACCEPTED,t(t({},this._genBaseEmitData(e)),{},{invitee:e.inviteeList[0]})))}},{key:"_onInvitationCancelled",value:function(e){var t="".concat(this._n,"._onInvitationCancelled"),n=e.inviteID,o=e.inviter,i=e.groupID,s=this._sigM.hasInviteInfo(n);Ae.l("".concat(t," inviteID:").concat(n," hasInviteID:").concat(s," inviter:").concat(o," groupID:").concat(i)),s&&(this._sigM.deleteInviteInfo(n),this._sigM.emitEvent(D.INVITATION_CANCELLED,this._genBaseEmitData(e)))}},{key:"_onInvitationTimeout",value:function(e){var n="".concat(this._n,"._onInvitationTimeout"),o=e.inviteID,i=e.inviter,s=e.groupID,a=e.inviteeList,r=this._sigM.hasInviteInfo(o);Ae.l("".concat(n," inviteID:").concat(o," hasInviteID:").concat(r," inviter:").concat(i," groupID:").concat(s," data:").concat(e.data)),r&&(this._sigM.updateInviteInfo(e),this._sigM.emitEvent(D.INVITATION_TIMEOUT,t(t({},this._genBaseEmitData(e)),{},{inviteeList:a,isSelfTimeout:!1})))}},{key:"_onInvitationModified",value:function(e,n){var o="".concat(this._n,"._onInvitationModified"),i=e.inviteID,s=e.data;Ae.l("".concat(o," inviteID:").concat(i," data:").concat(s)),this._sigM.setInviteInfo(i,t(t({},e),{},{message:n})),this._sigM.emitEvent(D.INVITATION_MODIFIED,{inviteID:i,data:s})}}]),Sr),lr=(s(Tr,[{key:"generateInviteID",value:function(){var e,t=(t=La)((e=ka)(32),8)+"-"+t(e(16),4)+"-"+t(16384|e(12),4)+"-"+t(32768|e(14),4)+"-"+t(e(48),12);return Ae.l("".concat(this._n,".generateInviteID inviteID:").concat(t)),t}},{key:"createInviteInfo",value:function(e){var n=this.generateInviteID(),o=(e=this.createInviteCustomData(t(t({},e),{},{inviteID:n}))).groupID,i=e.inviteeList;return o=o||i[0],{customData:e,message:this._sigM.createSignaling(e,o),inviteID:n}}},{key:"_genBaseCustomData",value:function(e){var t=e.data,n=e.inviteID;return{businessID:1,timeout:0,data:void 0===t?"":t,inviteID:void 0===n?"":n,groupID:void 0===(e=e.groupID)?"":e}}},{key:"createInviteCustomData",value:function(e){var n=e.userID,o=void 0===(o=e.timeout)?0:o,i=void 0===(i=e.groupID)?"":i,s=this._sigM.getMyUserID();return s=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_INVITE,inviter:s,inviteeList:i?e.inviteeList:[n],timeout:o}),Ae.l("".concat(this._n,".createInviteCustomData customData:"),s),s}},{key:"createCancelCustomData",value:function(e){var n,o="".concat(this._n,".createCancelCustomData"),i=e.inviteID,s=this._sigM.getMyUserID(),a=(i=this._sigM.getInviteInfo(i)).inviteeList,r=i.groupID;return(i=i.inviter)===s?n=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_CANCEL_INVITE,groupID:r,inviter:s,inviteeList:a}):Ae.e("".concat(o," unmatched inviter:").concat(i," and my userID:").concat(s)),Ae.l("".concat(o," customData:"),n),n}},{key:"createAcceptCustomData",value:function(e){var n,o="".concat(this._n,".createAcceptCustomData"),i=e.inviteID,s=this._sigM.getMyUserID(),a=this._sigM.getInviteInfo(i),r=a.inviter,c=a.groupID;return a.inviteeList.includes(s)?n=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_ACCEPT_INVITE,groupID:c,inviter:r,inviteeList:[s]}):Ae.e("".concat(o," userID:").concat(s," not in inviteeList. inviteID:").concat(i," groupID:").concat(c)),Ae.l("".concat(o," customData:"),n),n}},{key:"createRejectCustomData",value:function(e){var n,o="".concat(this._n,".createRejectCustomData"),i=e.inviteID,s=this._sigM.getMyUserID(),a=this._sigM.getInviteInfo(i),r=a.inviter,c=a.groupID;return a.inviteeList.includes(s)?n=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_REJECT_INVITE,groupID:c,inviter:r,inviteeList:[s]}):Ae.e("".concat(o," userID:").concat(s," not in inviteeList. inviteID:").concat(i," groupID:").concat(c)),Ae.l("".concat(o," customData:"),n),n}},{key:"createTimeoutCustomData",value:function(e){var n="".concat(this._n,".createTimeoutCustomData"),o=e.inviteeList,i=e.inviter,s=void 0!==(s=e.isInviter)&&s,a=this._sigM.getMyUserID();return e=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_INVITE_TIMEOUT,inviter:i,inviteeList:s?o:[a]}),Ae.l("".concat(n," customData:"),e),e}}]),Tr),dr=(s(Cr,[{key:"setCloudConfig",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:20,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:300;this.COUNT=e,this.EXPIRED_TIME=t,Ae.l("".concat(this._n,".setCloudConfig count:").concat(e,", time:").concat(t))}},{key:"getHistorySignaling",value:function(){var e=this,t=this._sigM.get(11).getLocalConvList();Ve(t)||(this._getC2CSignalingList(),t=this._getValidGroupConvList(t),this._getGroupSignalingList(t).then((function(t){e._handleSignalingList(t)})))}},{key:"_getC2CSignalingList",value:function(){var e=this._sigM.get(6).getMessageListFromUnreadDB();e=this._sigM.filterMessageList(e),this._getRelatedToMeMap(e)}},{key:"_getGroupSignalingList",value:function(e){var t=this;return 0===(e=this._createPromiseList(e)).length?Promise.resolve(this._sortSignaling(this._relatedToMeMap)):this._concurrentGetMessageList(e).then((function(e){var n=new Map;return e.forEach((function(e){e=e.list,e=t._getRelatedToMeMap(e),n=new Map([].concat(m(n),m(e)))})),t._sortSignaling(n)}))}},{key:"_handleSignalingList",value:function(e){Ve(e)||this._sigM.onNewMessageList(e)}},{key:"_getValidGroupConvList",value:function(e){for(var t=[],n=0,o=e.length;n<o;n++){var i=(a=e[n]).type,s=a.unreadCount,a=a.lastMessage;i=i===E.CONV_GROUP,a=this._isNotExpired(a),i&&s&&a&&t.push(e[n])}return t}},{key:"_isNotExpired",value:function(e){return!(!e||!e.lastTime)&&e.lastTime>Te()-this.EXPIRED_TIME}},{key:"_createPromiseList",value:function(e){for(var t=[],n=0;n<e.length;n++){var o=(i=e[n]).conversationID,i=(i=i.unreadCount)<this.COUNT?i:this.COUNT;this._map.set(o,{msgCount:i,list:[]}),i=this._sigM.get(11).getMessageList({conversationID:o}),t.push(i)}return t}},{key:"_concurrentGetMessageList",value:function(e){var t=this,n=[];return Promise.all(e).then((function(e){for(var o=0;o<e.length;o++){var i=(s=e[o]).code,s=s.data;0===i&&0!==s.messageList.length&&(t._handleMessageList(s.messageList),i=t._relayGetMessageList(s))&&n.push(i)}return 0<n.length?t._concurrentGetMessageList(n):t._map}))}},{key:"_relayGetMessageList",value:function(e){var t,n=e.messageList,o=e.nextReqMessageID;return e=e.isCompleted,0===n.length||(n=n[0].conversationID,0===(t=this._map.get(n).msgCount))||e?null:this._sigM.get(11).getMessageList({conversationID:n,nextReqMessageID:o,count:t})}},{key:"_handleMessageList",value:function(e){var t=e.length,n=e[0].conversationID,o=(i=this._map.get(n)).msgCount,i=i.list;this._map.set(n,{msgCount:0<o-t?o-t:0,list:i.concat(this._sigM.filterMessageList(e))})}},{key:"_getRelatedToMeMap",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];this._saveRelatedToMe(n)}return this._relatedToMeMap}},{key:"_saveRelatedToMe",value:function(e){var t,n=(t=this._sigM.getPayloadData(e)||{}).actionType,o=void 0===(t=t.inviteID)?"":t;switch(void 0===n?"":n){case D.ACTION_TYPE_INVITE:this._setHistoryInvite(e);break;case D.ACTION_TYPE_REJECT_INVITE:case D.ACTION_TYPE_ACCEPT_INVITE:this._updateHistoryInvite(e);break;case D.ACTION_TYPE_CANCEL_INVITE:this._delHistoryInvite(o);break;case D.ACTION_TYPE_INVITE_TIMEOUT:this._updateHistoryInvite(e)}}},{key:"_setHistoryInvite",value:function(e){var n=this._sigM.getPayloadData(e)||{},o=void 0===(o=n.inviteID)?"":o,i=void 0===(i=n.inviteeList)?[]:i,s=void 0===(s=n.timeout)?0:s,a=this._sigM.getMyUserID();i.includes(a)&&(i=Te()-e.time,0<s&&s<i&&0!==s||this._relatedToMeMap.set(o,t(t({},n),{},{messageList:[e]})))}},{key:"_delHistoryInvite",value:function(e){this._relatedToMeMap.has(e)&&this._relatedToMeMap.delete(e)}},{key:"_updateHistoryInvite",value:function(e){var t=void 0===(t=(i=this._sigM.getPayloadData(e)||{}).inviteID)?"":t,n=void 0===(i=i.inviteeList)?[]:i;if(this._relatedToMeMap.has(t)){for(var o=(i=this._relatedToMeMap.get(t)).inviteeList,i=i.messageList,s=0;s<n.length;s++){var a=n[s];o.includes(a)&&o.splice(o.indexOf(a),1)}0===o.length?this._delHistoryInvite(t):i.push(e)}else this._delHistoryInvite(t)}},{key:"_sortSignaling",value:function(e){var t=[];return e.forEach((function(e){t=[].concat(m(t),m(e.messageList))})),t.sort((function(e,t){return e.time-t.time}))}},{key:"reset",value:function(){this._map.clear(),this._relatedToMeMap.clear()}}]),Cr),pr=s((function e(t,n){o(this,e),this.businessID=t.businessID||1,this.inviteID=t.inviteID,this.groupID=t.groupID||"",this.inviter=t.inviter||"",this.inviteeList=t.inviteeList||[],this.data=t.data||"",this.actionType=t.actionType||D.ACTION_TYPE_INVITE,this.timeout=t.timeout||0})),hr=["message"],fr=["message"],gr=(r(Mr,bn),Aa=g(Mr),s(Mr,[{key:"onC2CUnreadHandleCompleted",value:function(){this._isC2CUnreadHandleCompleted=!0,this._isCloudConfigCompleted&&this._isConvSyncCompleted&&!this._isSyncCompleted&&this.onReady()}},{key:"onConvSyncCompleted",value:function(){this._isConvSyncCompleted=!0,this._isC2CUnreadHandleCompleted&&this._isCloudConfigCompleted&&!this._isSyncCompleted&&this.onReady()}},{key:"onCloudConfig",value:function(){this._isCloudConfigCompleted=!0;var e=this.getCloudConfig("history_s_count"),t=this.getCloudConfig("history_s_time");ut(e)||(e=Number(e)),ut(t)||(t=Number(t)),this._historySignalingHandler.setCloudConfig(e,t),this._isC2CUnreadHandleCompleted&&this._isConvSyncCompleted&&!this._isSyncCompleted&&this.onReady()}},{key:"_isListenerExisted",value:function(){return-1<this._m.getOEmitInst().eventNames().indexOf(D.NEW_INVITATION_RECEIVED)}},{key:"onReady",value:function(){this._isSyncCompleted=!0;var e=this._isListenerExisted();Ae.l("".concat(this._n,".onReady. isListenerExisted: ").concat(e)),e&&this._historySignalingHandler.getHistorySignaling()}},{key:"onNewMessageList",value:function(e){if(0<(e=this.filterMessageList(e)).length)return this._remoteSignalingHandler.onNewMessageList(e)}},{key:"onMessageModified",value:function(e){if(0<(e=this.filterMessageList(e)).length)return this._remoteSignalingHandler.onMessageModified(e)}},{key:"hasInviteInfo",value:function(e){return this._inviteInfoMap.has(e)}},{key:"getInviteInfo",value:function(e){return this._inviteInfoMap.get(e)}},{key:"setInviteInfo",value:function(e,n){var o=n.message;n=h(n,hr),Ae.l("".concat(this._n,".setInviteInfo inviteID:").concat(e," data:"),n),this._inviteInfoMap.set(e,t(t({},n),{},{message:o}))}},{key:"deleteInviteInfo",value:function(e){this.hasInviteInfo(e)&&(Ae.l("".concat(this._n,".deleteInviteInfo inviteID:").concat(e,".")),this._inviteInfoMap.delete(e))}},{key:"updateInviteInfo",value:function(e){var t="".concat(this._n,".updateInviteInfo"),n=e.inviteID,o=e.inviter,i=e.inviteeList;e=e.groupID,Ae.l("".concat(t," inviteID:").concat(n," inviter:").concat(o," groupID:").concat(e)),e&&this.hasInviteInfo(n)&&(o=i[0],(e=this.getInviteInfo(n).inviteeList).includes(o)&&(e.splice(e.indexOf(o),1),Ae.l("".concat(t," remove ").concat(o,". localInviteeList.length:").concat(e.length))),0!==e.length)||this.deleteInviteInfo(n)}},{key:"canIUseSignaling",value:function(){return this._canIUseSignaling}},{key:"emitEvent",value:function(e,t){this.emitOEvt(e,t)}},{key:"addSignalingListener",value:function(e,t,n){this._canIUseSignaling||(this._canIUseSignaling=!0),this._m.getOEmitInst().on(e,t,n)}},{key:"removeSignalingListener",value:function(e,t,n){this._m.getOEmitInst().off(e,t,n),this._isListenerExisted()||(this._canIUseSignaling=!1)}},{key:"invite",value:function(e){var n=this,o="".concat(this._n,".").concat("invite"),i=this._localSignalingHandler.createInviteInfo(e),s=i.message,a=i.customData,r=i.inviteID;return Ae.l("".concat(o," options:").concat(JSON.stringify(e)," inviteID:").concat(r)),this.sendSignaling(s,e).then((function(e){return e&&0===e.code?(n.setInviteInfo(r,t(t({},a),{},{message:s})),n.startTimer(t(t({},a),{},{inviteID:r})),t(t({},e),{},{inviteID:r})):e})).catch((function(e){return yn(e)}))}},{key:"inviteSync",value:function(e,n,o){var i=this,s="".concat(this._n,".").concat("inviteSync"),a=this._localSignalingHandler.createInviteInfo(e),r=a.message,c=a.customData,u=a.inviteID;return Ae.l("".concat(s," options:").concat(JSON.stringify(e)," inviteID:").concat(u)),this.sendSignaling(r,e).then((function(e){if(e&&0===e.code)return i.setInviteInfo(u,t(t({},c),{},{message:r})),i.startTimer(t(t({},c),{},{inviteID:u})),n&&n({inviteID:u}),{inviteID:u};o&&o(0===e.code,e.message||"")})).catch((function(e){return o&&o(e.code,e.message),yn(e)})),u}},{key:"_handleImResponse",value:function(e,t,n){t&&0===t.code&&(this._isHandling=!1,n?this.deleteInviteInfo(e.inviteID):this.updateInviteInfo(e))}},{key:"cancel",value:function(e){var n=this,o="".concat(this._n,".").concat("cancel");if(Ae.l("".concat(o," options:").concat(JSON.stringify(e))),!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.INVALID_CANCEL_MESSAGE});this._isHandling=!0;var i,s=this._localSignalingHandler.createCancelCustomData(e);return s?(o=s.groupID,i=s.inviteeList,o=o||i[0],i=this.createSignaling(s,o),this.sendSignaling(i,e).then((function(o){return n._handleImResponse(s,o,!0),0===o.code?t(t({},o),{},{inviteID:e.inviteID}):o})).catch((function(e){return yn(e)}))):(this._isHandling=!1,yn({code:Pn.SIGNALING_NO_PERMISSION}))}},{key:"accept",value:function(e){var n=this,o="".concat(this._n,".").concat("accept");if(Ae.l("".concat(o," options:").concat(JSON.stringify(e))),!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.SIGNALING_INVALID_INVITE_ID});this._isHandling=!0;var i=this._localSignalingHandler.createAcceptCustomData(e);return i?(o=this.createSignaling(i),this.sendSignaling(o,e).then((function(o){return n._handleImResponse(i,o),0===o.code?t(t({},o),{},{inviteID:e.inviteID}):o})).catch((function(e){return yn(e)}))):(this._isHandling=!1,yn({code:Pn.SIGNALING_NO_PERMISSION}))}},{key:"reject",value:function(e){var n=this,o="".concat(this._n,".").concat("reject");if(Ae.l("".concat(o," options:").concat(JSON.stringify(e))),!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.SIGNALING_INVALID_INVITE_ID});this._isHandling=!0;var i=this._localSignalingHandler.createRejectCustomData(e);return i?(o=this.createSignaling(i),this.sendSignaling(o,e).then((function(o){return n._handleImResponse(i,o,!0),0===o.code?t(t({},o),{},{inviteID:e.inviteID}):o})).catch((function(e){return yn(e)}))):(this._isHandling=!1,yn({code:Pn.SIGNALING_NO_PERMISSION}))}},{key:"getSignalingInfo",value:function(e){var t="".concat(this._n,".getSignalingInfo"),n=e.ID,o=e.from,i=e.to,s=this._filterSignaling(e),a=null;return s&&(e=this.getPayloadData(e),a=new pr(e)),e=s?"actionType:".concat(a.actionType):"",Ae.l("".concat(t," messageID:").concat(n," from:").concat(o," to:").concat(i," ")+"".concat(e," isSignaling:").concat(s)),a}},{key:"modifyInvitation",value:function(e){var n=this,o=e.inviteID,i=e.data;if(!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.SIGNALING_INVALID_INVITE_ID});this._isHandling=!0;var s=(e=this.getInviteInfo(o)).message,a=h(e,fr),r=s.payload.data;return a.data=i,s.payload.data=JSON.stringify(a),this.get(2).modifyRemoteMessage(s).then((function(e){return n.setInviteInfo(o,t(t({},a),{},{message:s})),n._isHandling=!1,e})).catch((function(e){return n._isHandling=!1,s.payload.data=r,yn(e)}))}},{key:"_genMsgCtrlInfo",value:function(){var e=void 0===(e=(i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).data)?"":e,t=i.onlineUserOnly,n=void 0===(n=i.inviteID)?"":n,o=i.offlinePushInfo,i=i.actionType,s={_onlineOnlyFlag:!1};return n={onlineUserOnly:(s=n&&this.getInviteInfo(n)?this.getInviteInfo(n).message:s)._onlineOnlyFlag||t||!1,offlinePushInfo:o,messageControlInfo:{excludedFromContentModeration:!0,excludedFromUnreadCount:!1,excludedFromLastMessage:!1}},i===D.ACTION_TYPE_INVITE_TIMEOUT?(s=!!e.match(/excludeTimeoutSignalingFromHistoryMessage/),n.messageControlInfo.excludedFromUnreadCount=s,n.messageControlInfo.excludedFromLastMessage=s):(t=!!e.match(/excludeFromHistoryMessage/),o=!!e.match(/excludeOriginalSignalingFromHistoryMessage/),n.messageControlInfo.excludedFromUnreadCount=t||o,n.messageControlInfo.excludedFromLastMessage=t||o),n}},{key:"sendSignaling",value:function(e,t){var n=this;return this.get(2).sendMessageInstance(e,this._genMsgCtrlInfo(t)).catch((function(e){return n._isHandling=!1,yn(e)}))}},{key:"filterMessageList",value:function(e){var t=this;return e.filter((function(e){return t._filterSignaling(e)}))}},{key:"getPayloadData",value:function(e){return this._remoteSignalingHandler.getPayloadData(e)}},{key:"createSignaling",value:function(e,t){var n=e.groupID,o=e.inviter;return t={to:t||n||o,conversationType:n?E.CONV_GROUP:E.CONV_C2C,priority:E.MSG_PRIORITY_HIGH,payload:{data:JSON.stringify(e)}},o=this.get(2).createCustomMessage(t),Ae.l("".concat(this._n,".createSignaling. message:"),o),o}},{key:"_filterSignaling",value:function(e){var t,n,o=!1;return e.type&&e.type===E.MSG_CUSTOM&&(t=e.cloudCustomData,e=void 0===(e=e.payload.data)?"":e,t=(void 0===t?"":t).match(/"type":"tsignaling"/),n=e.match(/inviteID/),e=e.match(/actionType/),o=t||n&&e),!!o}},{key:"startTimer",value:function(e){var t,n,o,i=this,s="".concat(this._n,".startTimer"),a=e.timeout,r=e.inviteID,c=e.inviter,u=e.groupID,l=c===this.getMyUserID();Ae.l("".concat(s," timeout:").concat(a," isInviter:").concat(l," groupID:").concat(u)),a<=0||(t=l?a+5:a,n=1,o=setInterval((function(){var a=i._hasLocalInviteInfo(e,l);n<t&&a?++n:(a&&i._sendTimeoutNotice(r,l),Ae.l("".concat(s," end.")),clearInterval(o))}),1e3))}},{key:"_hasLocalInviteInfo",value:function(e,t){var n,o,i=e.inviteID;return e=e.groupID,!!this.hasInviteInfo(i)&&(n="".concat(this._n,"._hasLocalInviteInfo"),o=this.getInviteInfo(i).inviteeList,Ae.l("".concat(n," inviteID:").concat(i," inviteeList:").concat(o," groupID:").concat(e)),!e||(t?0<o.length:0<o.length&&o.includes(this.getMyUserID())))}},{key:"_getReceiver",value:function(e,t){var n=t.groupID,o=t.inviteeList;return t=t.inviter,e?n||o[0]:n||t}},{key:"_sendTimeoutNotice",value:function(e,n){var o=this,i=this.getInviteInfo(e),s=this._getReceiver(n,i),a=(Ae.l("".concat(this._n,"._sendTimeoutNotice inviteID:").concat(e," to:").concat(s," isInviter:").concat(n)),this._localSignalingHandler.createTimeoutCustomData(t(t({},i),{},{isInviter:n}))),r=this.createSignaling(a,s);return this.sendSignaling(r,a).then((function(t){var i,s,c;t&&0===t.code&&(t=a.data,i=a.groupID,s=a.inviteeList,c=a.inviter,o.emitEvent(D.INVITATION_TIMEOUT,{data:t,groupID:i,inviteID:e,inviteeList:s,inviter:c,isSelfTimeout:!0,message:r}),n?o.deleteInviteInfo(e):o.updateInviteInfo(a))}))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._inviteInfoMap.clear(),this._canIUseSignaling=!1,this._isHandling=!1,this._historySignalingHandler.reset(),this._isC2CUnreadHandleCompleted=!1,this._isConvSyncCompleted=!1,this._isSyncCompleted=!1,this._isCloudConfigCompleted=!1}}]),Mr),_r=["followDiffList"],mr={NONE:0,FOLLOWERS:1,FOLLOWING:2,MUTUAL:3},vr=(r(Ir,bn),ba=g(Ir),s(Ir,[{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("follow_req_count");ut(e)||(e=Number(e),this.DEFAULT_COUNT=e>this.MAX_COUNT?this.MAX_COUNT:e,this._clearFollowList())}},{key:"clearCacheOnReconnected",value:function(){this._clearFollowList(),this._followType.clear()}},{key:"onFollowNotify",value:function(e){var t=this;e=e.dataList||[],Ae.l("".concat(this._n,".onFollowNotify followChangeList:").concat(e.length)),e.forEach((function(e){var n=void 0===(n=e.followDiffList)?[]:n,o=h(e,_r);n.forEach((function(e){var n=e.isAdd,i=(e=void 0===(e=e.followType)?[]:e,t._initFollowInfo());i[e].userInfoList.push(o),i[e].isAdd=1===n,t._emitEvent(i)}))}))}},{key:"_initFollowInfo",value:function(){var e={};return Object.values(mr).forEach((function(t){t!==mr.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 o=e[n];0<o.userInfoList.length&&(n===mr.FOLLOWERS&&(t._clearFollowList(mr.FOLLOWERS),t.emitOEvt(S.MY_FOLLOWERS_LIST_UPDATED,o)),n===mr.FOLLOWING&&(t._clearFollowList(mr.FOLLOWING),t.emitOEvt(S.MY_FOLLOWING_LIST_UPDATED,o)),n===mr.MUTUAL)&&(t._clearFollowList(mr.MUTUAL),t.emitOEvt(S.MUTUAL_FOLLOWERS_LIST_UPDATED,o))}))}},{key:"followUser",value:function(e){var t,n,o;return this.canIUse(w.FOLLOW)?(t="".concat(this._n,".").concat("followUser"),n="userIDList:".concat(e.length),(o=new Jn("followUser")).setMessage(n),Ae.l("".concat(t," ").concat(n)),this.req({P:Gn.FOLLOW,data:{fromAccount:this.getMyUserID(),userIDList:e.map((function(e){return{userID:e}}))}}).then((function(e){return o.end(),Ae.l("".concat(t," ok.")),mn(e.data.resultList)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse("followUser")}},{key:"unfollowUser",value:function(e){var t,n,o;return this.canIUse(w.FOLLOW)?(t="".concat(this._n,".").concat("unfollowUser"),n="userIDList:".concat(e.length),(o=new Jn("unfollowUser")).setMessage(n),Ae.l("".concat(t," ").concat(n)),this.req({P:Gn.UNFOLLOW,data:{fromAccount:this.getMyUserID(),userIDList:e}}).then((function(e){return o.end(),Ae.l("".concat(t," ok.")),mn(e.data.resultList)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse("unfollowUser")}},{key:"getMyFollowersList",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o="getMyFollowersList";if(!this.canIUse(w.FOLLOW))return this.noUse(o);var i=n||this.FIRST_PAGE_INDEX;if(this._myFollowersList.has(i)){var s=(r=this._myFollowersList.get(i)).resultList,a=r.nextCursor,r=r.lastUpdateTime;if(Date.now()-r<this.MAX_CATCH_TIME&&0<s.length)return Ae.l("".concat(this._n,".").concat(o," nextCursor:").concat(n," from local.")),vn({resultList:s,nextCursor:a})}return this._getFollowList(n,mr.FOLLOWERS).then((function(s){return e._myFollowersList.set(i,t(t({},s),{},{lastUpdateTime:Date.now()})),Ae.l("".concat(e._n,".").concat(o," nextCursor:").concat(n," from remote.")),mn(s)}))}},{key:"getMyFollowingList",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o="getMyFollowingList";if(!this.canIUse(w.FOLLOW))return this.noUse(o);var i=n||this.FIRST_PAGE_INDEX;if(this._myFollowingList.has(i)){var s=(r=this._myFollowingList.get(i)).resultList,a=r.nextCursor,r=r.lastUpdateTime;if(Date.now()-r<this.MAX_CATCH_TIME&&0<s.length)return Ae.l("".concat(this._n,".").concat(o," nextCursor:").concat(n," from local.")),vn({resultList:s,nextCursor:a})}return this._getFollowList(n,mr.FOLLOWING).then((function(s){return e._myFollowingList.set(i,t(t({},s),{},{lastUpdateTime:Date.now()})),Ae.l("".concat(e._n,".").concat(o," nextCursor:").concat(n," from remote.")),mn(s)}))}},{key:"getMutualFollowersList",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o="getMutualFollowersList";if(!this.canIUse(w.FOLLOW))return this.noUse(o);var i=n||this.FIRST_PAGE_INDEX;if(this._myMutualFollowersList.has(i)){var s=(r=this._myMutualFollowersList.get(i)).resultList,a=r.nextCursor,r=r.lastUpdateTime;if(Date.now()-r<this.MAX_CATCH_TIME&&0<s.length)return Ae.l("".concat(this._n,".").concat(o," nextCursor:").concat(n," from local.")),vn({resultList:s,nextCursor:a})}return this._getFollowList(n,mr.MUTUAL).then((function(s){return e._myMutualFollowersList.set(i,t(t({},s),{},{lastUpdateTime:Date.now()})),Ae.l("".concat(e._n,".").concat(o," nextCursor:").concat(n," from remote.")),mn(s)}))}},{key:"_getFollowList",value:function(e,n){var o=this,i=new Jn("_getFollowList");return i.setMessage("nextCursor:".concat(e," type:").concat(n)),this.req({P:Gn.GET_FOLLOW,data:{fromAccount:this.getMyUserID(),count:this.DEFAULT_COUNT,nextCursor:e,type:n}}).then((function(e){i.end();var n=void 0===(n=(e=e.data).resultList)?[]:n,s=(e=void 0===(e=e.nextCursor)?"":e,[]);return n.forEach((function(e){var n=e.userID,i=e.followTime;e=e.profileList,s.push(t({userID:n,followTime:i},o._handleProfileItem(void 0===e?[]:e)))})),{resultList:s,nextCursor:e}})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(o._n,"._getFollowList failed. error:"),e),yn(e)}))}},{key:"_handleProfileItem",value:function(e){var t={};return e.forEach((function(e){switch(e.tag){case Oe.NICK:t.nick=e.value;break;case Oe.GENDER:t.gender=e.value;break;case Oe.BIRTHDAY:t.birthday=e.value;break;case Oe.LOCATION:t.location=e.value;break;case Oe.SELFSIGNATURE:t.selfSignature=e.value;break;case Oe.ALLOWTYPE:t.allowType=e.value;break;case Oe.LANGUAGE:t.language=e.value;break;case Oe.AVATAR:t.avatar=e.value;break;case Oe.MESSAGESETTINGS:t.messageSettings=e.value;break;case Oe.ADMINFORBIDTYPE:t.adminForbidType=e.value;break;case Oe.LEVEL:t.level=e.value;break;case Oe.ROLE:t.role=e.value;break;default:t[e.tag]=e.value}})),t}},{key:"getUserFollowInfo",value:function(e){var t,n,o;return this.canIUse(w.FOLLOW)?(n=!1,ut(e)&&(e=[this.getMyUserID()],n=!0),t="".concat(this._n,".").concat("getUserFollowInfo"),n="userIDList:".concat(e.length," isGetMyFollowInfo:").concat(n),(o=new Jn("getUserFollowInfo")).setMessage(n),Ae.l("".concat(t," ").concat(n)),this.req({P:Gn.GET_FOLLOW_INFO,data:{fromAccount:this.getMyUserID(),userIDList:e}}).then((function(e){o.end(),Ae.l("".concat(t," ok.")),e=e.data.followInfoList;var n=[];return(void 0===e?[]:e).forEach((function(e){var t=e.followersCount,o=e.followingCount;e=e.mutualFollowersCount,n.push({followersCount:t,followingCount:o,mutualFollowersCount:e})})),mn(n)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse("getUserFollowInfo")}},{key:"checkFollowType",value:function(e){var t=this;if(!this.canIUse(w.FOLLOW))return this.noUse("checkFollowType");100<e.length&&(e=e.slice(0,100),Ae.w("".concat(n," ").concat(Vt(100))));var n="".concat(this._n,".").concat("checkFollowType"),o="userIDList length:".concat(e.length," "),i=new Jn("checkFollowType"),s=(i.setMessage(o),Ae.l("".concat(n," ").concat(o)),[]),a=[];return e.forEach((function(e){var n;t._followType.has(e)?(n=t._followType.get(e),s.push({userID:e,followType:n})):a.push(e)})),Ae.l("".concat(n," from local count:").concat(s.length,", from remote count:").concat(a.length,".")),0===a.length?vn(s):this.req({P:Gn.CHECK_FOLLOW_TYPE,data:{fromAccount:this.getMyUserID(),userIDList:a}}).then((function(e){return i.end(),Ae.l("".concat(n," ok.")),(void 0===(e=e.data.resultList)?[]:e).forEach((function(e){var n=e.userID;e=e.followType,t._setFollowType(n,e),s.push({userID:n,followType:e})})),mn(s)})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_setFollowType",value:function(e,t){this._followType.set(e,t)}},{key:"_clearFollowList",value:function(e){ut(e)?(this._myFollowersList.clear(),this._myFollowingList.clear(),this._myMutualFollowersList.clear()):e!==mr.FOLLOWERS?e!==mr.FOLLOWING?e===mr.MUTUAL&&this._myMutualFollowersList.clear():this._myFollowingList.clear():this._myFollowersList.clear()}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._clearFollowList(),this._followType.clear()}}]),Ir),yr=_s((function(e,t){var o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t,o,i=Array.prototype.slice.call(arguments,1);i.length;){var s=i.shift();if(s){if("object"!==n(s))throw new TypeError(s+"must be non-object");for(var a in s)t=s,o=a,Object.prototype.hasOwnProperty.call(t,o)&&(e[a]=s[a])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,o,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+o),i);else for(var s=0;s<o;s++)e[i+s]=t[n+s]},flattenChunks:function(e){for(var t,n,o,i=0,s=0,a=e.length;s<a;s++)i+=e[s].length;for(o=new Uint8Array(i),s=t=0,a=e.length;s<a;s++)n=e[s],o.set(n,t),t+=n.length;return o}},s={arraySet:function(e,t,n,o,i){for(var s=0;s<o;s++)e[i+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(o)}));function Ir(e){return o(this,Ir),(e=ba.call(this,e))._n="FollowModule",e._myFollowersList=new Map,e._myFollowingList=new Map,e._myMutualFollowersList=new Map,e._followType=new Map,e.MAX_CATCH_TIME=6e5,e.FIRST_PAGE_INDEX=ot(),e.DEFAULT_COUNT=500,e.MAX_COUNT=1e3,e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Mr(e){o(this,Mr),(e=Aa.call(this,e))._n="SignalingModule",e._inviteInfoMap=new Map,e._canIUseSignaling=!1,e._isHandling=!1,e._remoteSignalingHandler=new ur(f(e)),e._localSignalingHandler=new lr(f(e)),e._historySignalingHandler=new dr(f(e)),e._isC2CUnreadHandleCompleted=!1,e._isConvSyncCompleted=!1,e._isSyncCompleted=!1,e._isCloudConfigCompleted=!1;var t=e.getIEmitInst();return t.on(xo.C2C_UNREAD_HANDLE_COMPLETED,e.onC2CUnreadHandleCompleted,f(e)),t.on(xo.CONV_SYNC_COMPLETED,e.onConvSyncCompleted,f(e)),t.on(xo.CLOUD_CONFIG,e.onCloudConfig,f(e)),e}function Cr(e){o(this,Cr),this._n="HistorySignalingHandler",this._sigM=e,this.COUNT=20,this.EXPIRED_TIME=300,this._map=new Map,this._relatedToMeMap=new Map}function Tr(e){o(this,Tr),this._n="LocalSignalingHandler",this._sigM=e}function Sr(e){o(this,Sr),this._n="RemoteSignalingHandler",this._sigM=e}function Er(e){o(this,Er),this._m=e,this._n="ErrMsgModule",this.TIM_ERROR_ASSISTANCE="tim_error_assistance",this.STORAGE_EXPIRES_TIME=6048e5,this._map=new Map,this._init()}function Dr(e){o(this,Dr),this._m=e,this._n="TransCmdModule",this._TRTCCommandList=["tui_room_svr.*","callkit_records_svr.*","room_engine_srv.*","room_engine_http_srv.*","room_engine_mic.*","live_engine_srv.*","live_engine_http_srv.*","live_engine_pk.*","trtc_ai_service.*"],this._TRTCCommandMap=new Map,this._setTRTCCommandMap(),this._m.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function kr(e){return o(this,kr),(e=Ra.call(this,e))._n="ProfanityFilterModule",e._plugin=null,e._filterConfigMap=new Map,e._startIndex=0,e._version=0,e._canIUseLexicon=!1,e._isFetching=!1,e._expiredTime=0,e}function Lr(e){var t;return o(this,Lr),(t=Oa.call(this,e))._m=e,t._n="TIMPushModule",t._pluginName="TIMPush",t._pushPlugin=void 0,t._androidPushConfig={},t._deviceToken="",t._businessID=0,t._iOSBusinessID=0,t._c2cUnreadCount=0,t._groupUnreadCount=0,t._isWebUniapp=0,t._deviceInfo={notificationStatus:0,deviceModel:"",systemVersion:"",pushVersion:"1.0.1",packageName:""},t}function br(e){var t;return o(this,br),(t=Na.call(this,e))._m=e,t._n="OfflinePushModule",t._offlinePushPlugin=void 0,t._androidPushConfig={huaweiPushBussinessId:"",xiaomiPushBussinessId:"",xiaomiPushAppId:"",xiaomiPushAppKey:"",meizuPushBussinessId:"",meizuPushAppId:"",meizuPushAppKey:"",vivoPushBussinessId:"",fcmPushBussinessId:"",oppoPushBussinessId:"",oppoPushAppKey:"",oppoPushAppSecret:"",honorPushBussinessId:""},t._deviceToken="",t._businessID=0,t._iosBusinessID=0,t._c2cUnreadCount=0,t._groupUnreadCount=0,t._isWebUniapp=0,t}function Ar(e){o(this,Ar),this._m=e,this._n="CommercialConfigModule",this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler=new nr(this)}function Rr(e){o(this,Rr),this._commercialConfigM=e,this._n="PurchasedFeatureHandler",this._isSCMReported=!1,this._featureMap=new Map}function Or(e){return o(this,Or),(e=Pa.call(this,e))._n="WorkerTimerModule",e._isWorkerEnabled=!0,e._workerTimer=null,e._timerID=-1,e._init(),e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Nr(e){return o(this,Nr),(e=wa.call(this,e))._n="SnsModule",e._friendHandler=new Ja(f(e)),e._friendApplicationHandler=new za(f(e)),e._friendGroupHandler=new Qa(f(e)),e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,e.onContextUpdated,f(e)),e}function Pr(e){o(this,Pr),this._snsM=e,this._n="FriendGroupHandler",this._map=new Map}function wr(e){o(this,wr),Ve(e)||(this.name=e.name||"",this.userIDList=e.userIDList||[],this.count=this.userIDList.length||0)}function Gr(e){o(this,Gr),this._snsM=e,this._n="FriendHandler",this._map=new Map,this._startIdx=0,this._standardSeq=0,this._customSeq=0,this._expirationTime=18e4}function Ur(e,n){o(this,Ur),this.userID=e,this.remark="",this.groupList=[],this.source="",this.addTime=0,this.friendCustomField=[],this.timestamp=0;var i={},s=[];if(i.userID=e,!Ve(n))for(var a,r="",c=0,u=n.length;c<u;c++)if(r=n[c].tag,a=n[c].value,-1<r.indexOf("Tag_SNS_Custom"))this.friendCustomField.push({key:r,value:a});else if(-1<r.indexOf("Tag_Profile_Custom"))s.push({key:r,value:a});else switch(r){case Oe.NICK:i.nick=a;break;case Oe.GENDER:i.gender=a;break;case Oe.BIRTHDAY:i.birthday=a;break;case Oe.LOCATION:i.location=a;break;case Oe.SELFSIGNATURE:i.selfSignature=a;break;case Oe.ALLOWTYPE:i.allowType=a;break;case Oe.LANGUAGE:i.language=a;break;case Oe.AVATAR:i.avatar=a;break;case Oe.MESSAGESETTINGS:i.messageSettings=a;break;case Oe.ADMINFORBIDTYPE:i.adminForbidType=a;break;case Oe.LEVEL:i.level=a;break;case Oe.ROLE:i.role=a;break;case Ne.REMARK:this.remark=a;break;case Ne.ADDTIME:this.addTime=a;break;case Ne.GROUP:this.groupList=JSON.parse(JSON.stringify(a));break;case Ne.ADDSOURCE:this.source=a;break;case Ne.ADDWORDING:break;default:Ae.l("snsProfileItem unknown tag->",n[c].tag)}this.profile=new Qo(t(t({},i),{},{profileCustomField:s}))}function xr(e){o(this,xr),this._snsM=e,this._n="FriendApplicationHandler",this._startTime=0,this._maxLimited=100,this._currentSeq=0,this._map=new Map,this._unreadCount=0}function Fr(e){o(this,Fr),(e=Ga.call(this,e))._n="QualityStatModule",e.TAG="im-ssolog-quality-stat",e.reportIndex=0,e.wholePeriod=!1,e._qualityItems=[Un,xn,Fn,qn,Vn,Bn,Hn,Kn,jn,$n],e._messageSentItems=[Fn,qn,Vn,Bn,Hn],e._messageReceivedItems=[Kn,jn,$n],e.REPORT_INTERVAL=120,e.REPORT_SDKAPPID_BLACKLIST=[],e.REPORT_TINYID_WHITELIST=[],e._statInfoArr=[],e._avgRTT=new Ka,e._avgE2EDelay=new Ha,e._rateMessageSent=new ja,e._rateMessageReceived=new $a;var t=e.getIEmitInst();return t.on(xo.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,f(e)),t.on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function qr(){o(this,qr),this._lastMap=new Map,this._currentMap=new Map}function Vr(){o(this,Vr),this._map=new Map}function Br(){o(this,Br),this._n="AvgRTT",this._requestCount=0,this._rttArray=[]}function Hr(){o(this,Hr),this._n="AvgE2EDelay",this._e2eDelayArray=[]}function Kr(e){return o(this,Kr),(e=Ua.call(this,e))._n="RecoverMsgModule",e.PULL_LIMIT_COUNT=15,e}function jr(e){return o(this,jr),(e=xa.call(this,e))._n="CloudControlModule",e._cloudConfig=new Map,e._expiredTime=0,e._version=0,e._isFetching=!1,e}function $r(e){return o(this,$r),(e=Fa.call(this,e))._n="SessionModule",e._platform=e.getPlatform(),e._pHandler=new ha(f(e)),e._msgDispatcher=new ga(f(e)),e._cmdFreqLimitMap=new Map,e._cmdReqInfoMap=new Map,e._serverOverloadInfoMap=new Map,e._incrementalPullContactFlag=!0,e._init(),e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Wr(e,t,n,o){for(var i=65535&e,s=e>>>16&65535,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;s=s+(i=i+t[o++]|0)|0,--a;);i%=65521,s%=65521}return i|s<<16}function Yr(e,t,n,o){var i=Xr,s=o+n;e^=-1;for(var a=o;a<s;a++)e=e>>>8^i[255&(e^t[a])];return~e}function zr(e,t,n,o,i,s,a,r){var c,u,l,d,p,h,f,g,_,m=r.bits,v=0,y=0,I=0,M=0,C=0,T=0,S=0,E=0,D=0,k=0,L=null,b=0,A=new yr.Buf16(16),R=new yr.Buf16(16),O=null,N=0;for(v=0;v<=15;v++)A[v]=0;for(y=0;y<o;y++)A[t[n+y]]++;for(C=m,M=15;1<=M&&0===A[M];M--);if(M<C&&(C=M),0===M)i[s++]=20971520,i[s++]=20971520,r.bits=1;else{for(I=1;I<M&&0===A[I];I++);for(C<I&&(C=I),v=E=1;v<=15;v++)if((E=(E<<1)-A[v])<0)return-1;if(0<E&&(0===e||1!==M))return-1;for(R[1]=0,v=1;v<15;v++)R[v+1]=R[v]+A[v];for(y=0;y<o;y++)0!==t[n+y]&&(a[R[t[n+y]]++]=y);if(h=0===e?(L=O=a,19):1===e?(L=Jr,b-=257,O=Zr,N-=257,256):(L=Qr,O=ec,-1),v=I,p=s,S=y=k=0,l=-1,d=(D=1<<(T=C))-1,1===e&&852<D||2===e&&592<D)return 1;for(;;){for(_=a[y]<h?(g=0,a[y]):a[y]>h?(g=O[N+a[y]],L[b+a[y]]):(g=96,0),c=1<<(f=v-S),I=u=1<<T;i[p+(k>>S)+(u-=c)]=f<<24|g<<16|_,0!==u;);for(c=1<<v-1;k&c;)c>>=1;if(k=0!==c?(k&c-1)+c:0,y++,0==--A[v]){if(v===M)break;v=t[n+a[y]]}if(C<v&&(k&d)!==l){for(p+=I,E=1<<(T=v-(S=0===S?C:S));T+S<M&&!((E-=A[T+S])<=0);)T++,E<<=1;if(D+=1<<T,1===e&&852<D||2===e&&592<D)return 1;i[l=k&d]=C<<24|T<<16|p-s}}0!==k&&(i[p+k]=v-S<<24|64<<16),r.bits=C}return 0}yr.assign,yr.shrinkBuf,yr.setTyped,yr.Buf8,yr.Buf16,yr.Buf32;var Xr=function(){for(var e=[],t=0;t<256;t++){for(var n=t,o=0;o<8;o++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}(),Jr=[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],Zr=[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],Qr=[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],ec=[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 tc(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function nc(){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 yr.Buf16(320),this.work=new yr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function oc(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 yr.Buf32(852),t.distcode=t.distdyn=new yr.Buf32(592),t.sane=1,t.back=-1,0):-2}function ic(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,oc(e)):-2}function sc(e,t){var n,o;return!e||!e.state||(o=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?-2:(null!==o.window&&o.wbits!==t&&(o.window=null),o.wrap=n,o.wbits=t,ic(e))}function ac(e,t){var n;return e?(n=new nc,(e.state=n).window=null,0!==(n=sc(e,t))&&(e.state=null),n):-2}var rc,cc,uc=!0;function lc(e,t,n,o){var i;return null===(e=e.state).window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new yr.Buf8(e.wsize)),o>=e.wsize?(yr.arraySet(e.window,t,n-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>o&&(i=o),yr.arraySet(e.window,t,n-o,i,e.wnext),(o-=i)?(yr.arraySet(e.window,t,n-o,o,0),e.wnext=o,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0}var dc={inflateReset:ic,inflateReset2:sc,inflateResetKeep:oc,inflateInit:function(e){return ac(e,15)},inflateInit2:ac,inflate:function(e,t){var n,o,i,s,a,r,c,u,l,d,p,h,f,g,_,m,v,y,I,M,C,T,S,E,D=0,k=new yr.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),a=e.next_out,i=e.output,c=e.avail_out,s=e.next_in,o=e.input,r=e.avail_in,u=n.hold,l=n.bits,d=r,p=c,T=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap)n.mode=13;else{for(;l<16;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(2&n.wrap&&35615===u)k[n.check=0]=255&u,k[1]=u>>>8&255,n.check=Yr(n.check,k,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<<C,e.adler=n.check=1,n.mode=512&u?10:12,l=u=0}}break;case 2:for(;l<16;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(n.flags=u,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,n.check=Yr(n.check,k,2,0)),l=u=0,n.mode=3;case 3:for(;l<32;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}n.head&&(n.head.time=u),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,k[2]=u>>>16&255,k[3]=u>>>24&255,n.check=Yr(n.check,k,4,0)),l=u=0,n.mode=4;case 4:for(;l<16;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,n.check=Yr(n.check,k,2,0)),l=u=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,n.check=Yr(n.check,k,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)),yr.arraySet(n.head.extra,o,s,h,C)),512&n.flags&&(n.check=Yr(n.check,o,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=o[s+h++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C)),C&&h<r;);if(512&n.flags&&(n.check=Yr(n.check,o,h,s)),r-=h,s+=h,C)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===r)break e;for(h=0;C=o[s+h++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C)),C&&h<r;);if(512&n.flags&&(n.check=Yr(n.check,o,h,s)),r-=h,s+=h,C)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}l=u=0}n.head&&(n.head.hcrc=n.flags>>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+=o[s++]<<l,l+=8}e.adler=n.check=tc(u),l=u=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=a,e.avail_out=c,e.next_in=s,e.avail_in=r,n.hold=u,n.bits=l,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last)u>>>=7&l,l-=7&l,n.mode=27;else{for(;l<3;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}switch(n.last=1&u,--l,3&(u>>>=1)){case 0:n.mode=14;break;case 1:b=A=void 0;var b,A=n;if(uc){for(rc=new yr.Buf32(512),cc=new yr.Buf32(32),b=0;b<144;)A.lens[b++]=8;for(;b<256;)A.lens[b++]=9;for(;b<280;)A.lens[b++]=7;for(;b<288;)A.lens[b++]=8;for(zr(1,A.lens,0,288,rc,0,A.work,{bits:9}),b=0;b<32;)A.lens[b++]=5;zr(2,A.lens,0,32,cc,0,A.work,{bits:5}),uc=!1}if(A.lencode=rc,A.lenbits=9,A.distcode=cc,A.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+=o[s++]<<l,l+=8}if((65535&u)!=(u>>>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<h?r:h)?c:h))break e;yr.arraySet(i,o,s,h,a),r-=h,s+=h,c-=h,a+=h,n.length-=h}else n.mode=12;break;case 17:for(;l<14;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(n.nlen=257+(31&u),u>>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}n.lens[L[n.have++]]=7&u,u>>>=3,l-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},T=zr(0,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,T){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;m=(D=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,v=65535&D,!((_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(v<16)u>>>=_,l-=_,n.lens[n.have++]=v;else{if(16===v){for(E=_+2;l<E;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(u>>>=_,l-=_,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(E=_+3;l<E;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}C=0,h=3+(7&(u>>>=_)),u>>>=3,l=l-_-3}else{for(E=_+7;l<E;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}C=0,h=11+(127&(u>>>=_)),u>>>=7,l=l-_-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,S={bits:n.lenbits},T=zr(1,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,T){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},T=zr(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,T){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,K=V=G=w=P=N=O=R=oe=ne=te=ee=Q=Z=J=X=z=Y=W=$=j=H=B=q=F=void 0;var R,O,N,P,w,G,U=e,x=p,F=U.state,q=U.next_in,V=U.input,B=q+(U.avail_in-5),H=U.next_out,K=U.output,j=H-(x-U.avail_out),$=H+(U.avail_out-257),W=F.dmax,Y=F.wsize,z=F.whave,X=F.wnext,J=F.window,Z=F.hold,Q=F.bits,ee=F.lencode,te=F.distcode,ne=(1<<F.lenbits)-1,oe=(1<<F.distbits)-1;t:do{for(Q<15&&(Z+=V[q++]<<Q,Q+=8,Z+=V[q++]<<Q,Q+=8),R=ee[Z&ne];;){if(Z>>>=O=R>>>24,Q-=O,0==(O=R>>>16&255))K[H++]=65535&R;else{if(!(16&O)){if(!(64&O)){R=ee[(65535&R)+(Z&(1<<O)-1)];continue}if(32&O){F.mode=12;break t}U.msg="invalid literal/length code",F.mode=30;break t}for(N=65535&R,(O&=15)&&(Q<O&&(Z+=V[q++]<<Q,Q+=8),N+=Z&(1<<O)-1,Z>>>=O,Q-=O),Q<15&&(Z+=V[q++]<<Q,Q+=8,Z+=V[q++]<<Q,Q+=8),R=te[Z&oe];;){if(Z>>>=O=R>>>24,Q-=O,!(16&(O=R>>>16&255))){if(!(64&O)){R=te[(65535&R)+(Z&(1<<O)-1)];continue}U.msg="invalid distance code",F.mode=30;break t}if(P=65535&R,Q<(O&=15)&&(Z+=V[q++]<<Q,(Q+=8)<O)&&(Z+=V[q++]<<Q,Q+=8),(P+=Z&(1<<O)-1)>W){U.msg="invalid distance too far back",F.mode=30;break t}if(Z>>>=O,Q-=O,P>(O=H-j)){if((O=P-O)>z&&F.sane){U.msg="invalid distance too far back",F.mode=30;break t}if(G=J,(w=0)===X){if(w+=Y-O,O<N){for(N-=O;K[H++]=J[w++],--O;);w=H-P,G=K}}else if(X<O){if(w+=Y+X-O,(O-=X)<N){for(N-=O;K[H++]=J[w++],--O;);if(w=0,X<N){for(N-=O=X;K[H++]=J[w++],--O;);w=H-P,G=K}}}else if(w+=X-O,O<N){for(N-=O;K[H++]=J[w++],--O;);w=H-P,G=K}for(;2<N;)K[H++]=G[w++],K[H++]=G[w++],K[H++]=G[w++],N-=3;N&&(K[H++]=G[w++],1<N)&&(K[H++]=G[w++])}else{for(w=H-P;K[H++]=K[w++],K[H++]=K[w++],K[H++]=K[w++],2<(N-=3););N&&(K[H++]=K[w++],1<N)&&(K[H++]=K[w++])}break}}break}}while(q<B&&H<$);q-=N=Q>>3,Z&=(1<<(Q-=N<<3))-1,U.next_in=q,U.next_out=H,U.avail_in=q<B?B-q+5:5-(q-B),U.avail_out=H<$?$-H+257:257-(H-$),F.hold=Z,F.bits=Q,a=e.next_out,i=e.output,c=e.avail_out,s=e.next_in,o=e.input,r=e.avail_in,u=n.hold,l=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;m=(D=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,v=65535&D,!((_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(m&&!(240&m)){for(y=_,I=m,M=v;m=(D=n.lencode[M+((u&(1<<y+I)-1)>>y)])>>>16&255,v=65535&D,!(y+(_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}u>>>=y,l-=y,n.back+=y}if(u>>>=_,l-=_,n.back+=_,n.length=v,0===m){n.mode=26;break}if(32&m){n.back=-1,n.mode=12;break}if(64&m){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&m,n.mode=22;case 22:if(n.extra){for(E=n.extra;l<E;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;m=(D=n.distcode[u&(1<<n.distbits)-1])>>>16&255,v=65535&D,!((_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(!(240&m)){for(y=_,I=m,M=v;m=(D=n.distcode[M+((u&(1<<y+I)-1)>>y)])>>>16&255,v=65535&D,!(y+(_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}u>>>=y,l-=y,n.back+=y}if(u>>>=_,l-=_,n.back+=_,64&m){e.msg="invalid distance code",n.mode=30;break}n.offset=v,n.extra=15&m,n.mode=24;case 24:if(n.extra){for(E=n.extra;l<E;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}n.offset+=u&(1<<n.extra)-1,u>>>=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}f=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),g=n.window}else g=i,f=a-n.offset,h=n.length;for(c-=h=c<h?c:h,n.length-=h;i[a++]=g[f++],--h;);0===n.length&&(n.mode=21);break;case 26:if(0===c)break e;i[a++]=n.length,c--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===r)break e;r--,u|=o[s++]<<l,l+=8}if(p-=c,e.total_out+=p,n.total+=p,p&&(e.adler=n.check=(n.flags?Yr:Wr)(n.check,i,p,a-p)),p=c,(n.flags?u:tc(u))!==n.check){e.msg="incorrect data check",n.mode=30;break}l=u=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===r)break e;r--,u+=o[s++]<<l,l+=8}if(u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}l=u=0}n.mode=29;case 29:T=1;break e;case 30:T=-3;break e;case 31:return-4;default:return-2}return e.next_out=a,e.avail_out=c,e.next_in=s,e.avail_in=r,n.hold=u,n.bits=l,(n.wsize||p!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&lc(e,e.output,e.next_out,p-e.avail_out),d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,n.total+=p,n.wrap&&p&&(e.adler=n.check=(n.flags?Yr:Wr)(n.check,i,p,e.next_out-p)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==d&&0===p||4===t)&&0===T?-5:T},inflateEnd:function(e){var t;return e&&e.state?((t=e.state).window&&(t.window=null),e.state=null,0):-2},inflateGetHeader:function(e,t){return e&&e.state&&2&(e=e.state).wrap?((e.head=t).done=!1,0):-2},inflateSetDictionary:function(e,t){var n,o=t.length;return!e||!e.state||0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&Wr(1,t,o,0)!==n.check?-3:lc(e,t,o,o)?(n.mode=31,-4):(n.havedict=1,0)},inflateInfo:"pako inflate (from Nodeca project)"},pc=!0,hc=!0;try{String.fromCharCode.apply(null,[0])}catch(wc){pc=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(wc){hc=!1}for(var fc=new yr.Buf8(256),gc=0;gc<256;gc++)fc[gc]=252<=gc?6:248<=gc?5:240<=gc?4:224<=gc?3:192<=gc?2:1;function _c(e,t){for(var n,o,i=t||e.length,s=new Array(2*i),a=0,r=0;r<i;)if((n=e[r++])<128)s[a++]=n;else if(4<(o=fc[n]))s[a++]=65533,r+=o-1;else{for(n&=2===o?31:3===o?15:7;1<o&&r<i;)n=n<<6|63&e[r++],o--;1<o?s[a++]=65533:n<65536?s[a++]=n:(n-=65536,s[a++]=55296|n>>10&1023,s[a++]=56320|1023&n)}var c=s,u=a;if(u<65534&&(c.subarray&&hc||!c.subarray&&pc))return String.fromCharCode.apply(null,yr.shrinkBuf(c,u));for(var l="",d=0;d<u;d++)l+=String.fromCharCode(c[d]);return l}function mc(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function vc(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}fc[254]=fc[254]=1;var yc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},Ic={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Mc=Object.prototype.toString;function Cc(e){if(!(this instanceof Cc))return new Cc(e);this.options=yr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;if(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new mc,this.strm.avail_out=0,(e=dc.inflateInit2(this.strm,t.windowBits))!==yc.Z_OK)throw new Error(Ic[e]);if(this.header=new vc,dc.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=function(e){for(var t,n,o,i,s=e.length,a=0,r=0;r<s;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<s&&56320==(64512&(o=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(o-56320),r++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new yr.Buf8(a),r=i=0;i<a;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<s&&56320==(64512&(o=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(o-56320),r++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t}(t.dictionary):"[object ArrayBuffer]"===Mc.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=dc.inflateSetDictionary(this.strm,t.dictionary))!==yc.Z_OK)throw new Error(Ic[e])}function Tc(e,t){if((t=new Cc(t)).push(e,!0),t.err)throw t.msg||Ic[t.err];return t.result}Cc.prototype.push=function(e,t){var n,o,i,s,a,r=this.strm,c=this.options.chunkSize,u=this.options.dictionary,l=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?yc.Z_FINISH:yc.Z_NO_FLUSH,"string"==typeof e?r.input=function(e){for(var t=new yr.Buf8(e.length),n=0,o=t.length;n<o;n++)t[n]=e.charCodeAt(n);return t}(e):"[object ArrayBuffer]"===Mc.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new yr.Buf8(c),r.next_out=0,r.avail_out=c),(n=(n=dc.inflate(r,yc.Z_NO_FLUSH))===yc.Z_NEED_DICT&&u?dc.inflateSetDictionary(this.strm,u):n)===yc.Z_BUF_ERROR&&!0===l&&(n=yc.Z_OK,l=!1),n!==yc.Z_STREAM_END&&n!==yc.Z_OK)return this.onEnd(n),!(this.ended=!0);!r.next_out||0!==r.avail_out&&n!==yc.Z_STREAM_END&&(0!==r.avail_in||o!==yc.Z_FINISH&&o!==yc.Z_SYNC_FLUSH)||("string"===this.options.to?(i=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+fc[e[n]]>t?n:t}(r.output,r.next_out),s=r.next_out-i,a=_c(r.output,i),r.next_out=s,r.avail_out=c-s,s&&yr.arraySet(r.output,r.output,i,s,0),this.onData(a)):this.onData(yr.shrinkBuf(r.output,r.next_out))),0===r.avail_in&&0===r.avail_out&&(l=!0)}while((0<r.avail_in||0===r.avail_out)&&n!==yc.Z_STREAM_END);return(o=n===yc.Z_STREAM_END?yc.Z_FINISH:o)===yc.Z_FINISH?(n=dc.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===yc.Z_OK):o!==yc.Z_SYNC_FLUSH||(this.onEnd(yc.Z_OK),!(r.avail_out=0))},Cc.prototype.onData=function(e){this.chunks.push(e)},Cc.prototype.onEnd=function(e){e===yc.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=yr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},X={};var Sc=((0,yr.assign)(X,{Inflate:Cc,inflate:Tc,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Tc(e,t)},ungzip:Tc},yc),X),Ec=(s(Nc,[{key:"inflate",value:function(e){e=new Uint8Array(e).slice(4);var t,n=Date.now();try{t=Sc.inflate(e,{to:"string"}),this._bLogForInflateOK||(this._bLogForInflateOK=!0,new Jn("inflateOK").end())}catch(i){return this._bLogForInflateError?void 0:(this._bLogForInflateError=!0,void new Jn("inflateError").setMessage(i).end())}e=e.length+4;var o=t.length;return Ae.d("inflate ok. zipped:".concat(e," unzipped:").concat(o)+" compression ratio:".concat(Math.round(100*(o-e)/o),"% cost:").concat(Date.now()-n)),t}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._bLogForInflateOK=!1,this._bLogForInflateError=!1}}]),Nc),Dc=(s(Oc,[{key:"_startTimer",value:function(){var e=this._map.get(24),t=e.isWorkerEnabled();Ae.l("".concat(this._n,".startTimer isWorkerEnabled:").concat(t," seed:").concat(this._checkTimer)),t?e.startWorkerTimer():this._startMainThreadTimer()}},{key:"_startMainThreadTimer",value:function(){this._checkTimer<0&&(this._checkTimer=setInterval(this.onCheckTimer.bind(this),1e3)),Ae.l("".concat(this._n,"._startMainThreadTimer seed:").concat(this._checkTimer))}},{key:"stopTimer",value:function(){var e=this._map.get(24),t=e.isWorkerEnabled();Ae.l("".concat(this._n,".stopTimer isWorkerEnabled:").concat(t," seed:").concat(this._checkTimer)),t?e.stopWorkerTimer():this._stopMainThreadTimer()}},{key:"_stopMainThreadTimer",value:function(){Ae.l("".concat(this._n,"._stopMainThreadTimer")),0<this._checkTimer&&(clearInterval(this._checkTimer),this._checkTimer=-1,this._checkCount=0)}},{key:"_stopMainThreadSocket",value:function(){Ae.l("".concat(this._n,"._stopMainThreadSocket"));var e=this._map.get(21);e.setIsWorkerEnabled(!0),e.reConnect()}},{key:"_startMainThreadSocket",value:function(){Ae.l("".concat(this._n,"._startMainThreadSocket"));var e=this._map.get(21);e.setIsWorkerEnabled(!1),e.reConnect()}},{key:"onWorkerTimerEnabled",value:function(){Ae.l("".concat(this._n,".onWorkerTimerEnabled, disable main thread timer and socket")),this._stopMainThreadTimer(),this._stopMainThreadSocket()}},{key:"onWorkerTimerDisabled",value:function(){Ae.l("".concat(this._n,".onWorkerTimerDisabled, enable main thread timer and socket")),this._startMainThreadTimer(),this._startMainThreadSocket()}},{key:"onCheckTimer",value:function(){this._checkCount+=1;var e,t=T(this._map);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2)[1];n.onCheckTimer&&n.onCheckTimer(this._checkCount)}}catch(o){t.e(o)}finally{t.f()}}},{key:"_initReadyList",value:function(){var e=this;this._readyList=[this._map.get(1)],this._readyList.forEach((function(t){t.ready((function(){return e._onModuleReady()}))}))}},{key:"_onModuleReady",value:function(){var e,t,n=!0;this._readyList.forEach((function(e){e.isReady()||(n=!1)})),n&&!this._isReady&&(this._isReady=!0,this._oEmitter.emit(S.SDK_READY),e=Date.now()-this._startLoginTs,Ae.w("SDK is ready. cost ".concat(e," ms")),this._startLoginTs=Date.now(),t=this._ssoLogForReady.getStartTs()+Ee,this._ssoLogForReady.setMessage(e).start(t).end())}},{key:"login",value:function(){0===this._startLoginTs&&(Ce(),this._startLoginTs=Date.now(),this._startTimer(),this._map.get(15).start(),this._ssoLogForReady=new Jn("sdkReady"),this._reason=Pn.LOGGING_IN)}},{key:"onLoginFailed",value:function(){this._startLoginTs=0}},{key:"getOEmitInst",value:function(){return null===this._oEmitter&&(this._oEmitter=new vs,e=this._oEmitter,wn=e,this._oEmitter._emit=this._oEmitter.emit,this._oEmitter.emit=function(e,t){var n,o,i=this;this._canIUseSignaling()&&(e===S.MESSAGE_RECEIVED&&this.get(33).onNewMessageList(t),e===S.MESSAGE_MODIFIED)&&this.get(33).onMessageModified(t),e===S.CONVERSATION_LIST_UPDATED||e===S.FRIEND_LIST_UPDATED||e===S.GROUP_LIST_UPDATED||e===S.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED?!1!==this._eventThrottling?this._eventThrottleMap.has(e)?(n=Date.now())-(o=this._eventThrottleMap.get(e)).last<=1e3?(o.timeoutID&&clearTimeout(o.timeoutID),o.timeoutID=setTimeout((function(){o.last=Date.now(),i._oEmitter._emit.apply(i._oEmitter,[e,{name:e,data:i._getEventData(e)}])}),1e3)):(o.last=n,this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:this._getEventData(e)}])):(this._eventThrottleMap.set(e,{last:Date.now(),timeoutID:-1}),this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:this._getEventData(e)}])):this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:this._getEventData(e)}]):this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:t}])}.bind(this)),this._oEmitter;var e}},{key:"_canIUseSignaling",value:function(){var e=this.get(33);return!!e&&e.canIUseSignaling()}},{key:"_getEventData",value:function(e){return e===S.CONVERSATION_LIST_UPDATED?this._map.get(12).isPartialUpdatedConvs()?this._map.get(11).getPartialUpdatedConvs():this._map.get(11).getLocalConvList():e===S.FRIEND_LIST_UPDATED?this._map.get(8).getLocalFriendList(!1):e===S.GROUP_LIST_UPDATED?this._map.get(7).getLocalGroupList():e===S.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED?this._map.get(11).getTotalUnreadCount():e===S.CONVERSATION_ID_LIST_UPDATED?this._map.get(11).getUpdatedConvIDList():void 0}},{key:"getIEmitInst",value:function(){return null===this._iEmitter&&(this._iEmitter=new vs,this._iEmitter._emit=this._iEmitter.emit,this._iEmitter.emit=function(e,t){e=We(t)&&t.data?[e,{name:e,data:t.data}]:[e,{name:e,data:t}],this._iEmitter._emit.apply(this._iEmitter,e)}.bind(this)),this._iEmitter}},{key:"hasModule",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){return this._map.get(e)}},{key:"canIUseModule",value:function(e){return!this._map.get(12).isUsingChatCore()||this._optionalModuleMap.has(e)}},{key:"canIUseInflate",value:function(){return!!this._map.get(37)}},{key:"isReady",value:function(){return this._isReady}},{key:"isIntl",value:function(){return this.get(12).isIntl()}},{key:"getNotReadyReason",value:function(){return this._reason}},{key:"setNotReadyReason",value:function(e){this._reason=e}},{key:"getErrMsg",value:function(e,t,n){return this._map.get(32).get({key:e,replacement1:t,replacement2:n,isIntl:this.isIntl()})}},{key:"warn",value:function(e,t,n){(e=this.getErrMsg(e,t,n))&&Ae.w(e)}},{key:"onError",value:function(e){var t="code:".concat(e.code," message:").concat(e.message);Ae.w("Oops! ".concat(t)),new Jn("error").setMessage(t).setLevel("error").end(),this.getOEmitInst().emit(S.ERROR,e)}},{key:"restartTimer",value:function(){Ae.l("".concat(this._n,".restartTimer")),this.stopTimer(),this._startTimer();var e=this.get(7);e&&e.restartPolling()}},{key:"getTimerID",value:function(){var e=this._map.get(24);return e.isWorkerEnabled()?e.getTimerID():this._checkTimer}},{key:"getPollingTimerID",value:function(e){return this._map.get(7).getPollingTimerID(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),Ce();var e,t=T(this._map);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2)[1];n.reset&&n.reset()}}catch(a){t.e(a)}finally{t.f()}this._startLoginTs=0,this._initReadyList(),this._isReady=!1,this.stopTimer(),this._oEmitter.emit(S.SDK_NOT_READY);var o,i=T(this._eventThrottleMap);try{for(i.s();!(o=i.n()).done;){var s=_(o.value,2)[1];s.timeoutID&&clearTimeout(s.timeoutID)}}catch(a){i.e(a)}finally{i.f()}this._eventThrottleMap.clear()}}]),Oc),kc=(s(Rc,[{key:"defense",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;if("string"!=typeof e)return null;if(0===e.length)return null;if("function"!=typeof t)return null;if(this._funcMap.has(e)&&this._funcMap.get(e).has(t))return this._funcMap.get(e).get(t);this._funcMap.has(e)||this._funcMap.set(e,new Map);var o=null;return this._funcMap.get(e).has(t)?o=this._funcMap.get(e).get(t):(o=this._pack(e,t,n),this._funcMap.get(e).set(t,o)),o}},{key:"defenseOnce",value:function(e,t){return"function"!=typeof t?null:this._pack(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0)}},{key:"find",value:function(e,t){return"string"!=typeof e||0===e.length||"function"!=typeof t?null:this._funcMap.has(e)&&this._funcMap.get(e).has(t)?this._funcMap.get(e).get(t):(this._m.warn("ListenerFnNotFound",e),null)}},{key:"delete",value:function(e,t){return"function"==typeof t&&!!this._funcMap.has(e)&&!!this._funcMap.get(e).has(t)&&(this._funcMap.get(e).delete(t),0===this._funcMap.get(e).size&&this._funcMap.delete(e),!0)}},{key:"_pack",value:function(e,t,n){var o=this;return function(){try{t.apply(n,Array.from(arguments))}catch(a){var i=Object.values(S).indexOf(e),s="CallbackError";-1!==i&&(i=Object.keys(S)[i],o._m.warn(s,i,a)),o._reportCount<5&&(new Jn(s).setMessage("eventName:".concat(e)).setMoreMessage(a.message).end(),o._reportCount+=1)}}}},{key:"destroy",value:function(){this._funcMap.clear()}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._reportCount=0}}]),Rc),Lc=(s(Ac,[{key:"onError",value:function(e){this._m.onError(e)}},{key:"login",value:function(e){return this._m.login(),this._get(1).login(e)}},{key:"logout",value:function(){var e=this;return this._get(1).logout().then((function(t){return e._safetyCallbackFactory.reset(),e._m.reset(),t}))}},{key:"getLoginUser",value:function(){return this._get(1).getLoginUser()}},{key:"getServerTime",value:function(){return De()}},{key:"isReady",value:function(){return this._m.isReady()}},{key:"isIntl",value:function(){return this._m.isIntl()}},{key:"getNotReadyReason",value:function(){return this._m.getNotReadyReason()}},{key:"getErrMsg",value:function(e,t,n){return this._m.getErrMsg(e,t,n)}},{key:"_get",value:function(e){return this._m.get(e)}},{key:"destroy",value:function(){var e=this,t=this._get(12),n=t.getSDKAppID();return Ae.w("destroy ".concat(n," ").concat(t.getInstanceID())),this.logout().finally((function(){e._safetyCallbackFactory.destroy(),e._m.stopTimer(),e._get(24).terminate(),e._get(21).dealloc(),e._m.getOEmitInst().emit(S.SDK_DESTROY,{SDKAppID:n})}))}},{key:"on",value:function(e,t,n){Ae.d("on","eventName:".concat(e)),this._m.getOEmitInst().on(e,this._safetyCallbackFactory.defense(e,t,n),n)}},{key:"once",value:function(e,t,n){Ae.d("once","eventName:".concat(e)),this._m.getOEmitInst().once(e,this._safetyCallbackFactory.defenseOnce(e,t,n),n||this)}},{key:"off",value:function(e,t,n,o){Ae.d("off","eventName:".concat(e));var i=this._safetyCallbackFactory.find(e,t);null!==i&&(this._m.getOEmitInst().off(e,i,n,o),this._safetyCallbackFactory.delete(e,t))}},{key:"registerPlugin",value:function(e){(ut(e["tim-push"])?ut(e["tim-offline-push-plugin"])?this._get(18):this._get(28):this._get(36)).registerPlugin(e)}},{key:"setLogLevel",value:function(e){var t;e<=0&&((t=this.getErrMsg("TIM_ASCII_ART"))&&console.log(t),(t=this.getErrMsg("API_REFER"))&&(qt()?console.log("%c ".concat("IM SDK API ->"," %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"),_e)&&t&&console.warn(t),Ae.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?yn({code:Pn.MSG_MERGER_TYPE_INVALID}):Ve(e.payload.downloadKey)?yn({code:Pn.MSG_MERGER_KEY_INVALID}):this._get(2).downloadMergerMessage(e).catch((function(e){return yn({code:Pn.MSG_MERGER_DOWNLOAD_FAIL})}))}},{key:"createForwardMessage",value:function(e){return this._get(2).createForwardMessage(e)}},{key:"sendMessage",value:function(e,t){return e instanceof Co?this._get(2).sendMessageInstance(e,t):yn({code:Pn.MSG_INSTANCE_REQUIRED})}},{key:"searchCloudMessages",value:function(e){return this._get(2).searchCloudMessages(e)}},{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):yn({code:Pn.INVALID_OPERATION})}},{key:"revokeMessage",value:function(e){return this._get(2).revokeMessage(e)}},{key:"resendMessage",value:function(e,t){return e instanceof Co?this._get(2).resendMessage(e,t):yn({code:Pn.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):yn({code:Pn.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:"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():yn({code:Pn.NO_MODULE})}},{key:"addFriend",value:function(e){var t=this._get(8);return t?t.addFriend(e):yn({code:Pn.NO_MODULE})}},{key:"deleteFriend",value:function(e){var t=this._get(8);return t?t.deleteFriend(e):yn({code:Pn.NO_MODULE})}},{key:"checkFriend",value:function(e){var t=this._get(8);return t?t.checkFriend(e):yn({code:Pn.NO_MODULE})}},{key:"getFriendProfile",value:function(e){var t=this._get(8);return t?t.getFriendProfile(e):yn({code:Pn.NO_MODULE})}},{key:"updateFriend",value:function(e){var t=this._get(8);return t?t.updateFriend(e):yn({code:Pn.NO_MODULE})}},{key:"getFriendApplicationList",value:function(){var e=this._get(8);return e?e.getLocalFriendApplicationList():yn({code:Pn.NO_MODULE})}},{key:"acceptFriendApplication",value:function(e){var t=this._get(8);return t?t.acceptFriendApplication(e):yn({code:Pn.NO_MODULE})}},{key:"refuseFriendApplication",value:function(e){var t=this._get(8);return t?t.refuseFriendApplication(e):yn({code:Pn.NO_MODULE})}},{key:"deleteFriendApplication",value:function(e){var t=this._get(8);return t?t.deleteFriendApplication(e):yn({code:Pn.NO_MODULE})}},{key:"setFriendApplicationRead",value:function(){var e=this._get(8);return e?e.setFriendApplicationRead():yn({code:Pn.NO_MODULE})}},{key:"getFriendGroupList",value:function(){var e=this._get(8);return e?e.getLocalFriendGroupList():yn({code:Pn.NO_MODULE})}},{key:"createFriendGroup",value:function(e){var t=this._get(8);return t?t.createFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"deleteFriendGroup",value:function(e){var t=this._get(8);return t?t.deleteFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"addToFriendGroup",value:function(e){var t=this._get(8);return t?t.addToFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"removeFromFriendGroup",value:function(e){var t=this._get(8);return t?t.removeFromFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"renameFriendGroup",value:function(e){var t=this._get(8);return t?t.renameFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"followUser",value:function(e){var t=this._get(35);return t?t.followUser(e):yn({code:Pn.NO_MODULE})}},{key:"unfollowUser",value:function(e){var t=this._get(35);return t?t.unfollowUser(e):yn({code:Pn.NO_MODULE})}},{key:"getMyFollowersList",value:function(e){var t=this._get(35);return t?t.getMyFollowersList(e):yn({code:Pn.NO_MODULE})}},{key:"getMyFollowingList",value:function(e){var t=this._get(35);return t?t.getMyFollowingList(e):yn({code:Pn.NO_MODULE})}},{key:"getMutualFollowersList",value:function(e){var t=this._get(35);return t?t.getMutualFollowersList(e):yn({code:Pn.NO_MODULE})}},{key:"getUserFollowInfo",value:function(e){var t=this._get(35);return t?t.getUserFollowInfo(e):yn({code:Pn.NO_MODULE})}},{key:"checkFollowType",value:function(e){var t=this._get(35);return t?t.checkFollowType(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupList",value:function(){var e=this._get(7);return e?e.getGroupList():yn({code:Pn.NO_MODULE})}},{key:"getGroupProfile",value:function(e){var t=this._get(7);return t?t.getGroupProfile(e):yn({code:Pn.NO_MODULE})}},{key:"createGroup",value:function(e){var t=this._get(7);return t?t.createGroup(e):yn({code:Pn.NO_MODULE})}},{key:"dismissGroup",value:function(e){var t=this._get(7);return t?t.dismissGroup(e):yn({code:Pn.NO_MODULE})}},{key:"updateGroupProfile",value:function(e){var t=this._get(7);return t?t.updateGroupProfile(e):yn({code:Pn.NO_MODULE})}},{key:"joinGroup",value:function(e){var t=this._get(7);return t?t.joinGroup(e):yn({code:Pn.NO_MODULE})}},{key:"quitGroup",value:function(e){var t=this._get(7);return t?t.quitGroup(e):yn({code:Pn.NO_MODULE})}},{key:"searchGroupByID",value:function(e){var t=this._get(7);return t?t.searchGroupByID(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this._get(7);return t?t.getGroupOnlineMemberCount(e):yn({code:Pn.NO_MODULE})}},{key:"changeGroupOwner",value:function(e){var t=this._get(7);return t?t.changeGroupOwner(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupApplicationList",value:function(){var e=this._get(7);return e?e.getGroupApplicationList():yn({code:Pn.NO_MODULE})}},{key:"handleGroupApplication",value:function(e){var t=this._get(7);return t?t.handleGroupApplication(e):yn({code:Pn.NO_MODULE})}},{key:"initGroupAttributes",value:function(e){var t=this._get(7);return t?t.initGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupAttributes",value:function(e){var t=this._get(7);return t?t.setGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"deleteGroupAttributes",value:function(e){var t=this._get(7);return t?t.deleteGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupAttributes",value:function(e){var t=this._get(7);return t?t.getGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupCounters",value:function(e){var t=this._get(7);return t?t.setGroupCounters(e):yn({code:Pn.NO_MODULE})}},{key:"increaseGroupCounter",value:function(e){var t=this._get(7);return t?t.increaseGroupCounter(e):yn({code:Pn.NO_MODULE})}},{key:"decreaseGroupCounter",value:function(e){var t=this._get(7);return t?t.decreaseGroupCounter(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupCounters",value:function(e){var t=this._get(7);return t?t.getGroupCounters(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupMemberList",value:function(e){var t=this._get(7);return t?t.getGroupMemberList(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupMemberProfile",value:function(e){var t=this._get(7);return t?t.getGroupMemberProfile(e):yn({code:Pn.NO_MODULE})}},{key:"addGroupMember",value:function(e){var t=this._get(7);return t?t.addGroupMember(e):yn({code:Pn.NO_MODULE})}},{key:"deleteGroupMember",value:function(e){var t=this._get(7);return t?t.deleteGroupMember(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberMuteTime",value:function(e){var t=this._get(7);return t?t.setGroupMemberMuteTime(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberRole",value:function(e){var t=this._get(7);return t?t.setGroupMemberRole(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberNameCard",value:function(e){var t=this._get(7);return t?t.setGroupMemberNameCard(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberCustomField",value:function(e){var t=this._get(7);return t?t.setGroupMemberCustomField(e):yn({code:Pn.NO_MODULE})}},{key:"markGroupMemberList",value:function(e){var t=this._get(7);return t?t.markGroupMemberList(e):yn({code:Pn.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 o=this._get(33);o&&o.addSignalingListener(e,this._safetyCallbackFactory.defense(e,t,n),n)}},{key:"removeSignalingListener",value:function(e,t,n){var o,i=this._safetyCallbackFactory.find(e,t);null!==i&&(o=this._get(33))&&(o.removeSignalingListener(e,i,n),this._safetyCallbackFactory.delete(e,t))}},{key:"invite",value:function(e){var t=this._get(33);return t?t.invite(e):yn({code:Pn.NO_MODULE})}},{key:"inviteSync",value:function(e,t,n){var o=this._get(33);return o?o.inviteSync(e,t,n):""}},{key:"inviteInGroup",value:function(e){var t=this._get(33);return t?t.invite(e):yn({code:Pn.NO_MODULE})}},{key:"inviteInGroupSync",value:function(e,t,n){var o=this._get(33);return o?o.inviteSync(e,t,n):""}},{key:"cancel",value:function(e){var t=this._get(33);return t?t.cancel(e):yn({code:Pn.NO_MODULE})}},{key:"accept",value:function(e){var t=this._get(33);return t?t.accept(e):yn({code:Pn.NO_MODULE})}},{key:"reject",value:function(e){var t=this._get(33);return t?t.reject(e):yn({code:Pn.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):yn({code:Pn.NO_MODULE})}}]),Ac),bc={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 Ac(e){o(this,Ac),e={SDKAppID:e.SDKAppID,unlimitedAVChatRoom:e.unlimitedAVChatRoom||!1,scene:e.scene||"",oversea:e.oversea||!1,instanceID:kt(),devMode:e.devMode||!1,testEnv:e.testEnv||!1,proxyServer:e.proxyServer||void 0,fileUploadProxy:e.fileUploadProxy||void 0,fileDownloadProxy:e.fileDownloadProxy||e.fileUploadProxy||void 0,eventThrottling:!1!==e.eventThrottling,partialUpdatedConversations:!0===e.partialUpdatedConversations,modules:e.modules||void 0},this._m=new Dc(e),this._safetyCallbackFactory=new kc(this._m)}function Rc(e){o(this,Rc),this._funcMap=new Map,this._m=e,this._n="SafetyCallback",this._reportCount=0}function Oc(e){var t=this;o(this,Oc);var n,i=new Jn("sdkConstruct"),s=(this._n="ModuleManager",this._isReady=!1,this._reason=Pn.USER_NOT_LOGGED_IN,this._startLoginTs=0,this._map=new Map,this._optionalModuleMap=new Map,this._iEmitter=null,this._oEmitter=null,this._checkCount=0,this._checkTimer=-1,this._map.set(12,new bi(this,e)),this._map.set(37,new Ec(this)),this._map.set(15,new ds(this)),this._map.set(27,new or(this)),this._map.set(23,new Va(this)),this._map.set(24,new tr(this)),this._map.set(26,new Wa(this)),this._map.set(21,new la(this)),this._map.set(20,new qa(this)),this._map.set(1,new Ri(this)),this._map.set(2,new Gs(this)),this._map.set(3,new Us(this)),this._map.set(34,new xs(this)),this._map.set(31,new Fs(this)),this._map.set(4,new Li(this)),this._map.set(6,new Uo(this)),this._map.set(11,new ri(this)),this._map.set(7,new Ii(this)),this._map.set(10,new Ti(this)),this._map.set(13,new as(this)),this._map.set(32,new cr(this)),this._map.set(14,new cs(this)),this._map.set(17,new Ms(this)),this._map.set(18,new qs(this)),this._map.set(19,new Vs(this)),this._map.set(25,new Ba(this)),this._map.set(8,new er(this)),this._map.set(28,new ir(this)),this._map.set(36,new sr(this)),this._map.set(29,new ar(this)),this._map.set(30,new rr(this)),this._map.set(33,new gr(this)),this._map.set(35,new vr(this)),this._eventThrottleMap=new Map,this._eventThrottling=e.eventThrottling,this._map.get(12).isPartialUpdatedConvs()&&(this._eventThrottling=!1),We(e.modules)?(Object.keys(e.modules).forEach((function(o){n=e.modules[o],"group-module"===o?t._map.set(7,new n(t)):"relationship-module"===o?t._map.set(8,new n(t)):"signaling-module"===o?t._map.set(33,new n(t)):"follow-module"===o&&t._map.set(35,new n(t)),t._optionalModuleMap.set(o,1)})),this._map.get(12).setUsingChatCore(!0)):this._map.has(7)||this._map.get(12).setUsingChatCore(!0),e.instanceID),a=e.SDKAppID,r=this._map.get(12).isIntl(),c=this._map.get(12).isUsingChatCore();s="instanceID:".concat(s," SDKAppID:").concat(a," isIntl:").concat(r," isUsingChatCore:").concat(c," host:").concat(Lt())+" isIOSWebView:".concat(_e," platform:").concat(ie," canIUseInflate:").concat(this.canIUseInflate())+" workerAvailable:".concat(he," eventThrottling:").concat(this._eventThrottling," UserAgent:").concat(oe),Jn.bindEventStatModule(this._map.get(14)),Jn.bindNetMonitorModule(this._map.get(15)),i.setMessage("".concat(s," ").concat(function(){var e="";if(Z)try{var t=ne.getSystemInfoSync(),n=t.model,o=t.version,i=t.system,s=t.platform,a=t.SDKVersion;e="model:".concat(n," version:").concat(o," system:").concat(i," platform:").concat(s," SDKVersion:").concat(a)}catch(r){e=""}return e}())).end(),Ae.i("SDK ".concat(s)),Nn.prototype._getErrMsg=this.getErrMsg.bind(this),this._readyList=void 0,this._ssoLogForReady=null,this._initReadyList()}function Nc(e){o(this,Nc),this._m=e,this._n="InflateModule",this._bLogForInflateOK=!1,this._bLogForInflateError=!1}var Pc={};return(Y={}).create=function(e){var n,o,i,s="TencentCloudChat.create",a=0;if(je(i=e.SDKAppID))a=i;else if(a=parseInt(i),isNaN(i))return Ae.e("".concat(s," failed. Failed to parse the SDKAppID, please check the arguments")),null;return a&&Pc[a]?Pc[a]:(Ae.l("".concat(s)),(i=new Lc(t(t({},e),{},{SDKAppID:a}))).on(S.SDK_DESTROY,(function(e){Pc[e.data.SDKAppID]=null,delete Pc[e.data.SDKAppID]})),n=i,o=Object.create(null),Object.keys(On).forEach((function(e){var t;n[e]&&(t=new k,o[e]=function(){var o=Array.from(arguments);return t.use((function(t,o){a=e;var i,s,a=!(!(i=n).isReady()&&1!==bc[a])||(s={code:s=i.getNotReadyReason(),message:"".concat(i.getErrMsg(s)," | ").concat(a," | ").concat(i.getErrMsg(Pn.SDK_IS_NOT_READY))},i.onError(s),s);return!0===a?o():yn(a)})).use((function(t,n){if(!0===function(e,t,n){if(void 0===t)return!0;var o=!0;if(We(t))Object.keys(t).forEach((function(i){var s=1===e.length?e[0][i]:void 0;o=!!$t(s,t[i],n,i)&&o}));else if(Ye(t))for(var i=0;i<t.length;i++)o=!!$t(e[i],t[i],n,t[i].name)&&o;if(o)return o;throw new Error("Params validate failed.")}(t,Rn[e],e))return n()})).use((function(t,o){return n[e].apply(n,t)})),t.run(o)})})),e=o,Pc[a]=e,Rn.hookGetAPITips(i.getErrMsg.bind(i)),Ae.l("".concat(s," ok")),e)},Y.TYPES=E,Y.EVENT=S,Y.TSignaling=D,Y.VERSION="3.4.7",Ae.l("TencentCloudChat.VERSION:".concat(Y.VERSION)),Y}();const Kk=Vk(Hk.exports);class jk{constructor(e=0,t=0){this.high=e,this.low=t}equal(e){return null!==e&&this.low===e.low&&this.high===e.high}toString(){var e=Number(this.high).toString(16);let t=Number(this.low).toString(16);if(t.length<8){let e=8-t.length;for(;e;)t="0"+t,e--}return e+t}}const $k={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT0:"wss://*w4s.my-imcloud.com",DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT0:"wss://*w4k.my-imcloud.com",DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",STAT:"https://apikr.my-imcloud.com",ANYCAST:"wss://162.14.13.104"},GERMANY:{DEFAULT0:"wss://*w4g.my-imcloud.com",DEFAULT:"wss://wssger.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",STAT:"https://apiger.my-imcloud.com",ANYCAST:"wss://162.14.3.17"},IND:{DEFAULT0:"wss://*w4i.my-imcloud.com",DEFAULT:"wss://wssind.my-imcloud.com",BACKUP:"wss://wssind.im.qcloud.com",STAT:"https://apiind.my-imcloud.com",ANYCAST:"wss://162.14.18.188"},JPN:{DEFAULT0:"wss://*w4j.my-imcloud.com",DEFAULT:"wss://wssjpn.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT0:"wss://*w4u.my-imcloud.com",DEFAULT:"wss://wssusa.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",STAT:"https://apiusa.my-imcloud.com",ANYCAST:"wss://162.14.10.42"},INDONESIA:{DEFAULT0:"wss://*w4y.my-imcloud.com",DEFAULT:"wss://wssidn.im.qcloud.com",BACKUP:"wss://wssidn.my-imcloud.com",STAT:"https://apiidn.my-imcloud.com",ANYCAST:"wss://43.129.34.169"}}},Wk="CHINA",Yk={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent(e=Wk){this.CURRENT=$k.PRODUCTION[e]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GRP:"group_open_http_svc",GRP_AV:"group_open_avchatroom_http_svc",GRP_COMMUNITY:"million_group_open_http_svc",GRP_ATTR:"group_open_attr_http_svc",FD:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GRP_NO_AUTH:"group_open_http_noauth_svc",BIG_GRP_POLLING:"group_open_long_polling_http_svc",BIG_GRP_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MSG:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",IM_OPEN_SPEECH:"im_open_speech",MSG_SEARCH:"message_search",FOLLOW:"follow",OFFLINE_PUSH_REPORT:"offline_push_report",IM_MSG_LOGIC:"im_msg_db_logic"}};new jk(0,Math.pow(2,1)).toString(),new jk(0,Math.pow(2,2)).toString(),new jk(0,Math.pow(2,3)).toString(),new jk(0,Math.pow(2,4)).toString(),new jk(0,Math.pow(2,6)).toString(),new jk(0,Math.pow(2,7)).toString(),new jk(0,Math.pow(2,9)).toString(),new jk(0,Math.pow(2,10)).toString(),new jk(0,Math.pow(2,11)).toString(),new jk(0,Math.pow(2,13)).toString(),new jk(0,Math.pow(2,15)).toString(),new jk(Math.pow(2,6)).toString(),new jk(Math.pow(2,7)).toString(),new jk(Math.pow(2,8)).toString(),new jk(Math.pow(2,9)).toString(),new jk(Math.pow(2,10)).toString(),new jk(Math.pow(2,16)).toString(),new jk(Math.pow(2,20)).toString();const zk=(Yk.HOST.setCurrent(Wk),"undefined"!=typeof wx&&"function"==typeof BI&&Boolean(BI().fontSizeSetting)),Xk=(zk&&wx.createGamePortal,"undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting)),Jk="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),Zk="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),Qk="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),eL="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,tL="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin;zk&&wx.miniapp;const nL=zk||Xk||Jk||Zk||Qk||tL||eL,oL="undefined"!=typeof global&&(void 0!==global.nativeModuleProxy||void 0!==global.ReactNative),iL="undefined"!=typeof uni?!nL:"undefined"!=typeof window&&!nL&&!oL,sL=(Xk?qq:Jk?tt:Zk?swan:Qk?my:zk?wx:tL?uni:eL&&jd,iL&&window&&window.navigator&&window.navigator.userAgent||"");var aL;let rL,cL;(aL=sL.match(/OS (\d+)_/i))&&aL[1]&&aL[1],function(){var e,t,n=sL.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);n&&(e=n[1]&&parseFloat(n[1]),t=n[2]&&parseFloat(n[2]),e)&&t&&parseFloat(n[1]+"."+n[2])}(),/MSIE/.test(sL)||-1<sL.indexOf("Trident")&&sL.indexOf("rv:11.0"),function(){var e=(e=/MSIE\s(\d+)\.\d/.exec(sL))&&parseFloat(e[1])}(),rL="undefined"!=typeof console?console:"undefined"!=typeof global&&global.console?global.console:"undefined"!=typeof window&&window.console?window.console:{};const uL=function(){},lL=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"];let dL=lL.length;for(;dL--;)cL=lL[dL],console[cL]||(rL[cL]=uL);const pL=function(e){return void 0===e},hL=function(e){return function(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===fL(e)}(e)||null!==e&&"object"==typeof e},fL=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},gL=(Date.now||(Date.now=function(){return(new Date).getTime()}),function(e,t,n,o){if(!hL(e)||!hL(t))return 0;let i=0;var s,a=Object.keys(t);for(let r=0,c=a.length;r<c;r++)if(s=a[r],!(pL(t[s])||n&&n.includes(s)))if(hL(e[s])&&hL(t[s]))i+=gL(e[s],t[s],n,o);else{if(o&&o.includes(t[s]))continue;e[s]!==t[s]&&(e[s]=t[s],i+=1)}return i});var _L={exports:{}};_L.exports=function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){a(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e){return(n="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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},s=Object.keys(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=void 0!==qk?qk:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u="undefined"!=typeof wx&&"function"==typeof BI&&Boolean(BI().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),f="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,g=f&&"ios"===qI().platform.toLocaleLowerCase(),_=(f&&qI().platform.toLocaleLowerCase(),u||l||d||p||h||f),m=void 0!==c&&(void 0!==c.nativeModuleProxy||void 0!==c.ReactNative),v=l?qq:d?tt:p?swan:h?my:u?wx:f?uni:{},y=function(e){if("object"!==n(e)||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var o=t;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return t===o};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(){o(this,e),this._n="WebRequest"}return s(e,[{key:"request",value:function(e,n){var o=this,i="".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(i," 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(o){var i=encodeURIComponent(o)+n;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(e)})).join(t):i+encodeURIComponent(e[o])})).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,o._xhrRes(u,o._xhrBody(u,s,e.uploadByIP&&e.uploadIP),l));else{if(e.uploadIP&&-1===e.url.indexOf(e.uploadIP))return e.url=(i=e.url,a=e.uploadIP,i.replace(/^http(s)?:\/\/(.*?)\//,"https://".concat(a,"/"))),e.uploadByIP=!0,o.request(e,n);var t={code:u.status,message:JSON.stringify(u.responseText)};n(t,o._xhrRes(u,o._xhrBody(u,s,e.uploadByIP&&e.uploadIP),l))}var i,a},u.onerror=function(t){var i=o._xhrBody(u,s,e.uploadByIP&&e.uploadIP),a={code:u.status,message:JSON.stringify(u.responseText)};i||u.statusText||0!==u.status||(t.message="CORS blocked or network error"),n(a,o._xhrRes(u,i)),a=null},e.onProgress&&u.upload&&(u.upload.onprogress=function(t){var n=t.total,o=t.loaded,i=Math.floor(100*o/n);e.onProgress({total:n,loaded:o,percent:(i>=100?100:i)/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(":"),o=e.substr(0,t).trim().toLowerCase(),i=e.substr(t+1).trim();n[o]=i}})),{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"],T=["name"],S=function(){function e(){o(this,e)}return s(e,[{key:"request",value:function(e,n){var o=this,i=e.resources,s=void 0===i?"":i,a=e.headers,c=void 0===a?{}:a,u=e.url,l=e.downloadUrl,d=void 0===l?"":l,p=u,f=null,_=d.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/),m=decodeURIComponent(_[3]),y=m.indexOf("?")>-1?m.split("?")[0]:m,I={key:e.fileKey?e.fileKey:y,success_action_status:200,"Content-Type":""},M={};if(g){var S=u.split("?sign=");if(S.length>1){var E=S[1];p="".concat(S[0],"?sign=").concat(encodeURIComponent("".concat(E))),M.sign=decodeURIComponent(E),M.signature=decodeURIComponent(E)}}var D={url:p,header:c,name:"file",filePath:s,formData:t(t({},I),M),timeout:e.timeout||3e5};if(h){var k=D;k.name,D=t(t({},r(k,T)),{},{fileName:"file",fileType:C[e.fileType]})}return(f=v.uploadFile(t(t({},D),{},{success:function(e){o._handleResponse({response:e,downloadUrl:d,callback:n})},fail:function(e){o._handleResponse({response:e,downloadUrl:d,callback:n})}}))).onProgressUpdate&&f.onProgressUpdate((function(t){e.onProgress&&e.onProgress({total:t.totalBytesExpectedToSend,loaded:t.totalBytesSent,percent:Math.floor(t.progress)/100})})),f}},{key:"_handleResponse",value:function(e){var n=e.downloadUrl,o=e.response,i=e.callback,s=o.header,a={};if(s)for(var r in s)s.hasOwnProperty(r)&&(a[r.toLowerCase()]=s[r]);var c=+o.statusCode;200===c?i(null,{statusCode:c,headers:a,data:t(t({},o.data),{},{location:n})}):i({code:c,message:JSON.stringify(o.data)},{statusCode:c,headers:a,data:void 0})}}]),e}(),E=function(){function e(){o(this,e)}return s(e,[{key:"request",value:function(e,t){var n=this,o=e.resources,i=void 0===o?"":o,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:i,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,o=e.callback,i=n.headers,s=n.status,a=i&&i.map||{};200===s?o(null,{statusCode:200,headers:a,data:{location:t}}):o({code:s,message:JSON.stringify(n)},{statusCode:s,headers:a,data:void 0})}}]),e}();return function(){function e(){o(this,e),this.retry=1,this.tryCount=0,this.systemClockOffset=0,this.httpRequest=_?new S:m?new E:new M,console.log("TIMUploadPlugin.VERSION: ".concat("1.4.1"))}return s(e,[{key:"uploadFile",value:function(e,t){var n=this;return this.httpRequest.request(e,(function(o,i){o&&n.tryCount<n.retry&&n.allowRetry(o)?(n.tryCount++,n.uploadFile(e,t)):(n.tryCount=0,t(o,i))}))}},{key:"allowRetry",value:function(e){var t=!1,n=!1;if(e){var o=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var i=e.error&&e.error.Code,s=e.error&&e.error.Message;("RequestTimeTooSkewed"===i||"AccessDenied"===i&&"Request has expired"===s)&&(n=!0)}catch(c){}if(n&&o){var a=Date.now(),r=Date.parse(o);Math.abs(a+this.systemClockOffset-r)>=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.1"}}]),e}()}();const mL=Vk(_L.exports);uni.$store=wk,uni.$TIM=Kk,uni.$chat=Kk.create({SDKAppID:xk.config.TChat.SDKAppID}),uni.$chat.setLogLevel(1),uni.$chat.registerPlugin({"tim-upload-plugin":mL}),function(){const e=Ku(Fk);return e.provide("util",xk),e.use(wk),{app:e,Vuex:Pk}}().app.use(nI).mount("#app");export{pg as $,wM as A,Di as B,Oo as C,Gg as D,Be as E,ja as F,Ss as G,Dr as H,Pm as I,YI as J,WI as K,CC as L,jI as M,Ve as N,lr as O,WC as P,Uv as Q,wv as R,Nv as S,MM as T,YD as U,J_ as V,Xh as W,X_ as X,Ev as Y,Sv as Z,Pu as _,nr as a,vv as a$,ai as a0,HC as a1,WM as a2,Kd as a3,KI as a4,Vk as a5,Hr as a6,Kk as a7,mC as a8,Gk as a9,LC as aA,HI as aB,dg as aC,lg as aD,fy as aE,Vg as aF,Ri as aG,Lc as aH,xy as aI,yy as aJ,Ts as aK,Wh as aL,TM as aM,nM as aN,ZI as aO,Mv as aP,cg as aQ,Xg as aR,Jg as aS,SM as aT,AM as aU,zI as aV,PM as aW,_y as aX,zg as aY,Bg as aZ,Kg as a_,lI as aa,JI as ab,Ks as ac,Kr as ad,LI as ae,iM as af,IC as ag,gg as ah,MC as ai,CI as aj,aC as ak,rC as al,tT as am,jv as an,Bk as ao,qk as ap,Pr as aq,ls as ar,le as as,de as at,_e as au,me as av,ve as aw,Te as ax,Ee as ay,De as az,dr as b,$r as b$,lv as b0,_s as b1,xv as b2,Av as b3,Jn as b4,ji as b5,mL as b6,Gu as b7,ps as b8,Ci as b9,Xu as bA,Ku as bB,Ra as bC,js as bD,Aa as bE,ju as bF,gr as bG,co as bH,Wi as bI,ou as bJ,Ns as bK,Ps as bL,Us as bM,ws as bN,Os as bO,iu as bP,Gs as bQ,Zr as bR,Rt as bS,Tt as bT,Et as bU,Ki as bV,pr as bW,jr as bX,Co as bY,da as bZ,Hu as b_,uo as ba,xi as bb,Ui as bc,Wa as bd,oc as be,Ct as bf,vo as bg,Jr as bh,Zi as bi,kt as bj,Ya as bk,fi as bl,Ha as bm,$a as bn,go as bo,lc as bp,hu as bq,_o as br,au as bs,mo as bt,Mo as bu,Io as bv,b as bw,O as bx,hr as by,nc as bz,or as c,Ti as c$,zu as c0,Yr as c1,Hn as c2,qn as c3,Vn as c4,xr as c5,Bn as c6,ir as c7,jn as c8,Hs as c9,Hi as cA,Gn as cB,xn as cC,Qn as cD,Ii as cE,ec as cF,Ot as cG,N as cH,Ds as cI,Kn as cJ,ho as cK,io as cL,ar as cM,no as cN,qs as cO,ru as cP,Rc as cQ,Mi as cR,Fs as cS,wi as cT,Cu as cU,bu as cV,Su as cW,Eu as cX,Mu as cY,zr as cZ,Xr as c_,Ir as ca,He as cb,ts as cc,es as cd,ns as ce,fs as cf,os as cg,Ms as ch,Is as ci,ys as cj,Dt as ck,vs as cl,gs as cm,Jo as cn,ua as co,ao as cp,Xo as cq,wo as cr,Un as cs,Ur as ct,Bu as cu,ui as cv,tc as cw,qi as cx,er as cy,Qr as cz,ef as d,Si as d0,$s as d1,xs as d2,Wr as d3,Zo as d4,Ju as d5,bg as d6,EI as d7,fr as e,fm as f,wn as g,xk as h,$v as i,BI as j,Uk as k,uv as l,la as m,GM as n,Ja as o,ci as p,Cs as q,Zn as r,hs as s,ms as t,oo as u,iC as v,Qo as w,Vv as x,Z as y,_r as z};
|