var e,n,t="undefined"!=typeof window?window:void 0,r="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,o="undefined"!=typeof location?location:void 0;function a(){return(null==o?void 0:o.href)||""}function u(){return(null==r?void 0:r.title)||""}var c,s,l,d=(null==i?void 0:i.userAgent)||"",f=(null==i?void 0:i.platform)||"",p=null===(n=null==d?void 0:d.match(/wxwork\/([\d.]+)/i))||void 0===n?void 0:n[1],v=!!p,h=!v&&/micromessenger/i.test(d),g=/\bAndroid\b/i.test(d),m=/Win/i.test(f),w=(e=function(){var e,n=null!==(e=null==i?void 0:i.maxTouchPoints)&&void 0!==e?e:1,t=/Mac/i.test(f);if(t&&n>2)return{isMac:!1,isIOS:!0};return{isMac:t,isIOS:/\b(iPhone|iPad|iPod)\b/i.test(d)}}(),e.isIOS),y=e.isMac;function C(){return c}function S(){var e;return null===(e=null==s?void 0:s.getResult())||void 0===e?void 0:e.params}function b(){var e;return null===(e=null==l?void 0:l.getResult())||void 0===e?void 0:e.params}function _(){var e=C();if(v&&(null==e?void 0:e.getAgentConfigSignature)){var n=b();return null==n?void 0:n.corpid}var t=S();return null==t?void 0:t.appId}function k(){var e=function(){var e=C();return v&&(null==e?void 0:e.getAgentConfigSignature)?b():S()}();if(e){var n=_();return{appId:n,verifyAppId:n,verifySignType:"sha1",verifyTimestamp:e.timestamp,verifyNonceStr:e.nonceStr,verifySignature:e.signature}}}var I=function(e,n){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},I(e,n)};function A(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}I(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var P=function(){return P=Object.assign||function(e){for(var n,t=1,r=arguments.length;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]u)return 1;if(a=0&&xr.splice(e,1)});function d(t){!function(e,n,t){var r="string"==typeof n?n:JSON.stringify(n);null==e||e.postMessage(r,t)}(e.contentWindow,t,n)}return e.addEventListener("load",(function(){s||d({type:"ww-iframe-handle:init"})})),{invoke:o,dispose:l}}function Dr(e,n){var t=_r("100%","100%",n.el),r=new Map,i=Br(t,"https://login.work.weixin.qq.com",(function(t){switch(t.type){case"getStaticOptions":return{name:e,options:P(P({},n),{el:void 0,params:void 0})};case"getJSAPIParams":return function(t){var i,o;return x(this,void 0,void 0,(function(){var a,u,c,s,l;return M(this,(function(d){switch(d.label){case 0:return z(n.params)?[4,n.params()]:[3,2];case 1:return u=d.sent(),[3,3];case 2:u=n.params,d.label=3;case 3:return a=u,c=F(),r.set(t.seq,a),l={webToken:n.webToken,url:c},(null===(i=t.payload)||void 0===i?void 0:i.skipSignature)?(s=void 0,[3,6]):[3,4];case 4:return[4,Wr(c,(null===(o=t.payload)||void 0===o?void 0:o.preferSignatureTypeList)||["agentConfig"])];case 5:s=d.sent(),d.label=6;case 6:return[2,(l.configParams=s,l.jsapi=e,l.jsapiParams=a,l)]}}))}))}(t);case"openModalFrame":return function(e){!function(e){null==Ar||Ar();var n=_r("100vw","100vh",document.body),t=n.style;t.position="fixed",t.left="0",t.top="0",t.zIndex="1000",n.classList.add("wecom-jssdk-modal"),n.setAttribute("src",e);var r=Br(n,"https://open.work.weixin.qq.com",(function(e){if("close"===e.type)return i()})).dispose;function i(){var e;null===(e=n.parentNode)||void 0===e||e.removeChild(n),r()}Ar=i}(e.payload.url)}(t);case"jsapiCallback":return function(e){if(!r.has(e.seq))return;var n=r.get(e.seq);r.delete(e.seq),U("success"===e.kind?null==n?void 0:n.success:null==n?void 0:n.fail,e.payload);U(null==n?void 0:n.complete,e.payload)}(t);case"call":return function(e){U(n[e.name],e.payload)}(t)}})).dispose;return t.style.opacity="0",t.src="https://login.work.weixin.qq.com/wwopen/ww-jsapi-transparent-frame",{el:t,unmount:function(){var e;i(),null===(e=t.parentNode)||void 0===e||e.removeChild(t)}}}var Tr={agentConfig:xe,suiteConfig:function(e){return x(this,void 0,void 0,(function(){var n,t;return M(this,(function(r){switch(r.label){case 0:if(!(null==(n=C())?void 0:n.getSuiteConfigSignature))throw new _e("Missing getSuiteConfigSignature");return[4,n.getSuiteConfigSignature(e)];case 1:return t=r.sent(),[2,{suiteid:n.suiteId,timestamp:"".concat(t.timestamp),nonceStr:t.nonceStr,signature:t.signature,jsApiList:V(n.jsApiList||["agentConfig"])}]}}))}))}};function Wr(e,n){return x(this,void 0,void 0,(function(){var t,r,i,o,a,u;return M(this,(function(c){switch(c.label){case 0:t=new Error("Missing signature handler"),r=0,i=n,c.label=1;case 1:if(!(r>>4&15)+t.charAt(15&n);return r}(function(e){return function(e){for(var n="",t=0;t<32*e.length;t+=8)n+=String.fromCharCode(e[t>>5]>>>24-t%32&255);return n}(function(e,n){e[n>>5]|=128<<24-n%32,e[15+(n+64>>9<<4)]=n;for(var t=new Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,u=-1009589776,c=0;c>2),t=0;t>5]|=(255&e.charCodeAt(t/8))<<24-t%32;return n}(e),8*e.length))}(e))}function Jr(e,n,t,r){return e<20?n&t|~n&r:e<40?n^t^r:e<60?n&t|n&r|t&r:n^t^r}function Fr(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function Gr(e,n){var t=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(t>>16)<<16|65535&t}function Qr(e,n){return e<>>32-n}function zr(e){var n=e;"string"==typeof e&&(n={ticket:e});var t=n.nonceStr||Math.random().toString(36).slice(2),r=n.timestamp||Math.floor(Date.now()/1e3),i=n.url||a().split("#")[0];return{timestamp:r,nonceStr:t,signature:Ur("jsapi_ticket=".concat(n.ticket,"&noncestr=").concat(t,"×tamp=").concat(r,"&url=").concat(i))}}var Hr={isWeChat:h,isWeCom:v},Kr=!0;export{oe as CameraMode,ce as CreateExternalPaymentType,se as EntryType,le as EnvVersion,Kr as IS_WECOM_SDK,pe as InTalkType,he as InputCorpGroupContactMode,ge as InputCorpGroupContactType,ae as LiveType,ne as LocationType,te as NetworkType,Se as OAType,be as OaExtDataType,de as OpenUserProfileType,fe as PrintFileIdType,ue as ProductViewType,ee as Proximity,jr as SDK_VERSION,ve as ScanQRCodeType,me as SelectEnterpriseContactMode,we as SelectEnterpriseContactType,ye as SelectExternalContactType,Ce as SelectPrivilegedContactMode,re as SizeType,ie as SourceType,Or as WWLoginLangType,Nr as WWLoginPanelSizeType,Er as WWLoginRedirectType,Lr as WWLoginType,pt as addCard,St as addDevice,bt as checkJsApi,kt as checkSchedule,vt as chooseCard,kn as chooseImage,It as chooseInvoice,wt as chooseWXPay,At as claimClassAdmin,ze as closeBLEConnection,Ve as closeBluetoothAdapter,Zn as closeWindow,wn as connectWifi,gt as consumeAndShareCard,Qe as createBLEConnection,Pt as createChatWithMsg,xt as createCorpGroupChat,Mt as createExternalPayment,Dr as createJSAPIPanel,Bt as createSchoolPayment,Rr as createWWLoginPanel,Dt as discoverDevice,Pn as downloadImage,Rn as downloadLivingReplay,Nn as downloadVoice,Pe as ensureAgentConfigReady,Me as ensureConfigReady,Ae as ensureCorpConfigReady,Tt as enterHWOpenTalk,Wt as enterpriseVerify,Hr as env,Lt as getApprovalSelectedItems,Ze as getBLEDeviceCharacteristics,Ke as getBLEDeviceServices,an as getBeacons,je as getBluetoothAdapterState,Je as getBluetoothDevices,tn as getClipboardData,Ge as getConnectedBluetoothDevices,bn as getConnectedWifi,Ot as getContext,Et as getCurCorpGroupChat,Nt as getCurCorpGroupContact,Vt as getCurExternalChat,jt as getCurExternalContact,xn as getLocalImgData,ln as getLocation,vn as getNetworkType,qt as getShareInfo,zr as getSignature,k as getVerifyParams,yn as getWifiList,$n as hideAllNonBaseMenuItem,Rt as hideChatAttachmentMenu,Xn as hideMenuItems,Hn as hideOptionMenu,Sr as initOpenData,$ as invoke,Z as isWeixinJSBridgeReady,Ut as launchMiniProgram,Ft as navigateToAddCustomer,Gt as navigateToKfChat,$e as notifyBLECharacteristicValueChange,Y as on,en as onBLECharacteristicValueChange,He as onBLEConnectionStateChange,cn as onBeaconServiceChange,un as onBeaconUpdate,qe as onBluetoothAdapterStateChange,Fe as onBluetoothDeviceFound,Cn as onGetWifiList,zn as onHistoryBack,pn as onLocationChange,rt as onMenuShareAppMessage,at as onMenuShareQQ,ct as onMenuShareQZone,it as onMenuShareTimeline,ot as onMenuShareWechat,ut as onMenuShareWeibo,hn as onNetworkStatusChange,Ee as onSearchBeacons,tt as onUserCaptureScreen,On as onVoicePlayEnd,Dn as onVoiceRecordEnd,X as onWeixinJSBridgeReady,Sn as onWifiConnected,Qt as openAddress,zt as openAppComment,Ht as openAppDeviceDataAuth,Kt as openAppManage,Ne as openBluetoothAdapter,Zt as openBusinessView,ht as openCard,nt as openDefaultBrowser,Xt as openDeviceProfile,Yt as openEnterpriseChat,yt as openEnterpriseRedPacket,$t as openExistedChatWithMsg,sn as openLocation,mt as openProductSpecificView,er as openThirdAppServiceChat,nr as openUserProfile,Wn as pauseVoice,Tn as playVoice,_n as previewFile,In as previewImage,tr as printFile,rr as queryCurrHWOpenTalk,Xe as readBLECharacteristicValue,ir as refundExternalPayment,Be as register,qn as replayLiving,or as saveApprovalSelectedItems,ar as scanQRCode,ur as selectCorpGroupContact,cr as selectEnterpriseContact,sr as selectExternalContact,lr as selectPrivilegedContact,dr as sendChatMessage,nn as setClipboardData,fr as setShareAttr,st as shareAppMessage,pr as shareToExternalChat,vr as shareToExternalContact,hr as shareToExternalMoments,lt as shareWechatMessage,et as showAllNonBaseMenuItem,Yn as showMenuItems,Kn as showOptionMenu,dn as startAutoLBS,rn as startBeaconDiscovery,Re as startBluetoothDevicesDiscovery,jn as startLiving,Un as startMeeting,Mn as startRecord,Le as startSearchBeacons,gr as startWecast,gn as startWifi,fn as stopAutoLBS,on as stopBeaconDiscovery,Ue as stopBluetoothDevicesDiscovery,Bn as stopRecord,Oe as stopSearchBeacons,Ln as stopVoice,mn as stopWifi,mr as thirdPartyOpenPage,Vn as translateVoice,ft as updateAppMessageShareData,wr as updateCorpGroupChat,yr as updateEnterpriseChat,Cr as updateMomentsSetting,dt as updateTimelineShareData,An as uploadImage,En as uploadVoice,Jn as wedocSelectDoc,Fn as wedriveSelectDir,Qn as wedriveSelectFileForDownload,Gn as wedriveSelectFileForShare,Ye as writeBLECharacteristicValue};