You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
42 KiB
1 lines
42 KiB
var ww=function(e){"use strict";var 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)||"",p=(null==i?void 0:i.platform)||"",f=null==(n=null==d?void 0:d.match(/wxwork\/([\d.]+)/i))?void 0:n[1],h=!!f,g=!h&&/micromessenger/i.test(d),v=/\bAndroid\b/i.test(d),y=/Win/i.test(p),m=function(){var e,n=null!=(e=null==i?void 0:i.maxTouchPoints)?e:1,t=/Mac/i.test(p);if(t&&n>2)return{isMac:!1,isIOS:!0};return{isMac:t,isIOS:/\b(iPhone|iPad|iPod)\b/i.test(d)}}(),w=m.isIOS,C=m.isMac;function S(){return c}function b(){var e;return null==(e=null==s?void 0:s.getResult())?void 0:e.params}function T(){var e;return null==(e=null==l?void 0:l.getResult())?void 0:e.params}function I(){var e=S();if(h&&(null==e?void 0:e.getAgentConfigSignature)){var n=T();return null==n?void 0:n.corpid}var t=b();return null==t?void 0:t.appId}function A(){var e=function(){var e=S();return h&&(null==e?void 0:e.getAgentConfigSignature)?T():b()}();if(e){var n=I();return{appId:n,verifyAppId:n,verifySignType:"sha1",verifyTimestamp:e.timestamp,verifyNonceStr:e.nonceStr,verifySignature:e.signature}}}function W(e,n,t,r,i,o,a){try{var u=e[o](a),c=u.value}catch(s){return void t(s)}u.done?n(c):Promise.resolve(c).then(r,i)}function k(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var o=e.apply(n,t);function a(e){W(o,r,i,a,u,"next",e)}function u(e){W(o,r,i,a,u,"throw",e)}a(void 0)}))}}function P(e,n){var t,r,i,o,a=function(e){return function(n){return u([e,n])}},u=function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(c=0)),c;)try{if(t=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(i=c.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){c=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){c.label=a[1];break}if(6===a[0]&&c.label<i[1]){c.label=i[1],i=a;break}if(i&&c.label<i[2]){c.label=i[2],c.ops.push(a);break}i[2]&&c.ops.pop(),c.trys.pop();continue}a=n.call(e,c)}catch(u){a=[6,u],r=0}finally{t=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}},c={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o}function L(){return L=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},L.apply(this,arguments)}function _(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function B(e,n){if(e){if("string"==typeof e)return _(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_(e,n):void 0}}function M(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=B(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}for(var x,D={config:"preVerifyJsApi",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareWechat:"menu:share:wechat",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress",getBrandWCPayRequest:"getBrandWCPayRequest"},E={},O=M(Object.keys(D));!(x=O()).done;){var R=x.value;E[D[R]]=R}function V(e){return D[e]||e}function N(e){return E[e]||e}function j(e){return e.map(V)}function U(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(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.")}()}var q=a();function J(e){if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");for(var n="",t=new Uint8Array(e),r=t.byteLength,i=0;i<r;i++)n+=String.fromCharCode(t[i]);return btoa(n)}function F(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").buffer;for(var n=atob(e),t=n.length,r=new Uint8Array(t),i=0;i<t;i++)r[i]=n.charCodeAt(i);return r.buffer}function G(e,n){if(Z(e))try{return e(n)}catch(t){!function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r;(r=console).error.apply(r,["[wwsdk]"].concat(U(n)))}(t)}}function z(e,n){return e.slice(0,n.length)===n}function Q(e){return e?q.split("#")[0]:a().split("#")[0]}function H(e){return X(e)?e.slice(e.indexOf(":")+1):""}function K(e){return!1===e||0===e}function Z(e){return"function"==typeof e}function X(e){return"string"==typeof e}function $(e){return e?X(e)?e:e.join(";"):e}function Y(e,n){return ee.apply(this,arguments)}function ee(){return(ee=k((function(n,r){return P(this,(function(i){switch(i.label){case 0:return e.isWeixinJSBridgeReady?[3,2]:[4,e.onWeixinJSBridgeReady];case 1:i.sent(),i.label=2;case 2:return t.WeixinJSBridge.on(n,r),[2]}}))}))).apply(this,arguments)}function ne(e){return te.apply(this,arguments)}function te(){return(te=k((function(n,r,i){var o,a;return P(this,(function(u){switch(u.label){case 0:return void 0===r&&(r={}),e.isWeixinJSBridgeReady?[3,2]:[4,e.onWeixinJSBridgeReady];case 1:u.sent(),u.label=2;case 2:return[4,new Promise((function(e){var i=L({},r,A());t.WeixinJSBridge.invoke(n,i,e)}))];case 3:if((o=u.sent()).errMsg||(o.errMsg=function(e,n){var t=N(e);if(!n)return t+":ok";var r=H(n);"confirm"===r&&(r="ok");"failed"===r&&(r="fail");z(r,"failed_")&&(r=r.slice(7));z(r,"fail_")&&(r=r.slice(5));r=r.replace(/_/g,"").toLowerCase(),("access denied"===r||"no permission to execute"===r)&&(r="permission denied");"config"===t&&"function not exist"===r&&(r="ok");r||(r="fail");return t+":"+r}(n,o.err_msg||o.errmsg)),a=H(o.errMsg),null==o.errCode&&(o.errCode=null!=o.err_code?o.err_code:"ok"===a?0:-1),G(i,o),"ok"!==a)throw o;return[2,o]}}))}))).apply(this,arguments)}function re(e,n){return re=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},re(e,n)}function ie(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&re(e,n)}function oe(e,n,t){return oe=function(){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}}()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(e,r));return t&&re(i,t.prototype),i},oe.apply(null,arguments)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function ue(e){var n="function"==typeof Map?new Map:void 0;return ue=function(e){var t=function(){return oe(e,arguments,ae(this).constructor)};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!==n){if(n.has(e))return n.get(e);n.set(e,t)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),re(t,e)},ue(e)}e.isWeixinJSBridgeReady=!!(null==t?void 0:t.WeixinJSBridge),e.onWeixinJSBridgeReady=Promise.resolve(),e.isWeixinJSBridgeReady||(e.onWeixinJSBridgeReady=new Promise((function(n){null==r||r.addEventListener("WeixinJSBridgeReady",(function(){e.isWeixinJSBridgeReady=!0,n()}))})));var ce,se,le,de,pe,fe,he,ge,ve,ye,me,we,Ce,Se,be,Te,Ie,Ae,We,ke,Pe,Le,_e,Be=function(e){function n(n){return e.call(this,"SDK Error: "+n)}return ie(n,e),n}(ue(Error)),Me=function(e){function n(){return e.call(this,"Aborted")}return ie(n,e),n}(Be),xe=1,De=2,Ee=function(){function e(e,n){this.type=e,this.useOriginalURL=g&&!y&&!C&&e===xe,this.url=Q(this.useOriginalURL),this.promise=this.awaitPromise(n(this.url))}var n=e.prototype;return n.checkValid=function(){return h&&this.url!==Q(this.useOriginalURL)&&(this.error=new Me),!this.error},n.getResult=function(){if(this.checkValid())return this.result},n.awaitPromise=function(e){var n=this;return k((function(){var t;return P(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e];case 1:return n.result=r.sent(),[2,n.result];case 2:throw t=r.sent(),n.error=t,t;case 3:return[2]}}))}))()},e}();function Oe(){return Re.apply(this,arguments)}function Re(){return Re=k((function(){var e,n;return P(this,(function(t){return(null==(e=s)?void 0:e.checkValid())?[2,e.promise]:(n=new Ee(xe,k((function(e){var t,r,i,o;return P(this,(function(a){switch(a.label){case 0:if(!(null==(t=S())?void 0:t.getConfigSignature))throw new Be("Missing getConfigSignature");return[4,t.getConfigSignature(e)];case 1:if(r=a.sent(),!n.checkValid())throw new Me;return i=function(e,n){return{appId:e.corpId,timestamp:""+n.timestamp,nonceStr:n.nonceStr,signature:n.signature,jsApiList:j(e.jsApiList||["config"]),openTagList:j(e.openTagList||[])}}(t,r),[4,ne("preVerifyJSAPI",{appId:i.appId,verifyJsApiList:i.jsApiList,verifyOpenTagList:i.openTagList,verifyAppId:i.appId,verifySignType:"sha1",verifyTimestamp:i.timestamp,verifyNonceStr:i.nonceStr,verifySignature:i.signature})];case 2:if(o=a.sent(),!n.checkValid())throw new Me;return[2,{params:i,result:o}]}}))}))),n.promise.then((function(e){var n=S();G(null==n?void 0:n.onConfigSuccess,e.result),G(null==n?void 0:n.onConfigComplete,e.result)}),(function(e){var n=S();G(null==n?void 0:n.onConfigFail,e),G(null==n?void 0:n.onConfigComplete,e)})),function(e){s=e}(n),[2,n.promise])}))})),Re.apply(this,arguments)}function Ve(){return Ne.apply(this,arguments)}function Ne(){return Ne=k((function(){var e,n;return P(this,(function(t){return(null==(e=l)?void 0:e.checkValid())?[2,e.promise]:(n=new Ee(De,k((function(e){var t,r,i,o;return P(this,(function(a){switch(a.label){case 0:return h&&function(e,n){for(var t=(null==e?void 0:e.split("."))||[],r=(null==n?void 0:n.split("."))||[],i=0,o=Math.max(t.length,r.length);i<o;i++){var a=parseInt(t[i])||0,u=parseInt(r[i])||0;if(a>u)return 1;if(a<u)return-1}return 0}(f,"3.0.24")<0&&(t=Oe()),[4,Promise.all([je(e),t])];case 1:if(r=a.sent(),i=r[0],!n.checkValid())throw new Me;return[4,ne("agentConfig",i)];case 2:if(o=a.sent(),!n.checkValid())throw new Me;return[2,{params:i,result:o}]}}))}))),n.promise.then((function(e){var n=S();G(null==n?void 0:n.onAgentConfigSuccess,e.result),G(null==n?void 0:n.onAgentConfigComplete,e.result)}),(function(e){var n=S();G(null==n?void 0:n.onAgentConfigFail,e),G(null==n?void 0:n.onAgentConfigComplete,e)})),function(e){l=e}(n),[2,n.promise])}))})),Ne.apply(this,arguments)}function je(e){return Ue.apply(this,arguments)}function Ue(){return Ue=k((function(e){var n,t;return P(this,(function(r){switch(r.label){case 0:if(!(null==(n=S())?void 0:n.getAgentConfigSignature))throw new Be("Missing getAgentConfigSignature");return[4,n.getAgentConfigSignature(e)];case 1:return t=r.sent(),[2,{corpid:n.corpId,agentid:""+n.agentId,timestamp:""+t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:j(n.jsApiList||["agentConfig"])}]}}))})),Ue.apply(this,arguments)}function qe(){var e=S();return h&&(null==e?void 0:e.getAgentConfigSignature)?Ve():Oe()}function Je(){if(S())return qe()}function Fe(e,n){return Ge.apply(this,arguments)}function Ge(){return(Ge=k((function(e,n,t){return P(this,(function(r){return void 0===t&&(t=n),[2,He(n,k((function(){return P(this,(function(n){switch(n.label){case 0:return[4,Je()];case 1:return n.sent(),[2,ne(e,t)]}}))})))]}))}))).apply(this,arguments)}function ze(e,n,t){return Qe.apply(this,arguments)}function Qe(){return(Qe=k((function(e,n,t){return P(this,(function(r){switch(r.label){case 0:return[4,Je()];case 1:return r.sent(),Y(e,(function(){He(n,t)})),[2]}}))}))).apply(this,arguments)}function He(e,n){return n(e).then((function(n){return G(null==e?void 0:e.success,n),G(null==e?void 0:e.complete,n),n}),(function(n){throw G("cancel"===H(n.errMsg)?null==e?void 0:e.cancel:null==e?void 0:e.fail,n),G(null==e?void 0:e.complete,n),n}))}function Ke(e){return{timeStamp:""+e.timestamp,nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function Ze(){return Ze=k((function(e){return P(this,(function(n){return[2,He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("checkJsApi",{jsApiList:j(e.jsApiList)})];case 2:return(n=t.sent()).checkResult=function(e){for(var n,t=L({},e),r=M(Object.keys(e));!(n=r()).done;){var i=n.value;t[N(i)]=e[i]}return t}(Xe(n.checkResult)),[2,n]}}))})))]}))})),Ze.apply(this,arguments)}function Xe(e){for(var n,t,r={},i=M(Object.keys(e));!(n=i()).done;){var o=n.value;if((t=e[o])&&"object"==typeof t)for(var a,u=Xe(e[o]),c=M(Object.keys(u));!(a=c()).done;){var s=a.value;r[o+"."+s]=u[s]}else r[o]=e[o]}return r}function $e(e){if(e&&X(e)){var n=e.split("?"),t=n[0],r=n.slice(1);return r.length?t+".html?"+r.join("?"):t+".html"}}function Ye(){return en.apply(this,arguments)}function en(){return(en=k((function(){var e,n;return P(this,(function(r){switch(r.label){case 0:if(!(null==t||null==(e=t.WWOpenData)?void 0:e.agentConfig))throw new Be("Missing WWOpenData.agentConfig");return[4,je(Q())];case 1:return n=r.sent(),[2,new Promise((function(e,r){t.WWOpenData.agentConfig(L({},n,{success:e,fail:r}))}))]}}))}))).apply(this,arguments)}function nn(e,n,t){var r=document.createElement("iframe"),i=r.style;i.display="block",i.border="none",i.background="transparent",i.width=e,i.height=n,r.referrerPolicy="origin",r.setAttribute("frameborder","0"),r.setAttribute("allowtransparency","true");var o=function(e){if("string"==typeof e)return document.querySelector(e);return e}(t);return o&&o.appendChild(r),r}function tn(e){return e&&"object"==typeof e?L({},e,{message:e.message,stack:e.stack}):e}function rn(e,n){var t=new Map;function r(){return r=k((function(t){var r,i;return P(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r={type:"ww-iframe-handle:response",uid:t.uid,kind:"resolve"},[4,n(t.args)];case 1:return e.apply(void 0,[(r.args=o.sent(),r)]),[3,3];case 2:throw i=o.sent(),e({type:"ww-iframe-handle:response",uid:t.uid,kind:"reject",args:tn(i)}),i;case 3:return[2]}}))})),r.apply(this,arguments)}return{invoke:function(n){return new Promise((function(r,i){var o,a=(o=Math.random().toString(36).slice(2),Date.now().toString(36)+"."+o);t.set(a,{resolve:r,reject:i}),e({type:"ww-iframe-handle:call",uid:a,args:n})}))},handleCallMessage:function(e){return r.apply(this,arguments)},handleResponseMessage:function(e){var n=t.get(e.uid);n&&(n[e.kind](e.args),t.delete(e.uid))}}}e.Proximity=void 0,(ce=e.Proximity||(e.Proximity={})).CLProximityUnknown="0",ce.CLProximityImmediate="1",ce.CLProximityNear="2",ce.CLProximityFar="3",e.LocationType=void 0,(se=e.LocationType||(e.LocationType={})).wgs84="wgs84",se.gcj02="gcj02",e.NetworkType=void 0,(le=e.NetworkType||(e.NetworkType={})).wifi="wifi",le.network2g="2g",le.network3g="3g",le.network4g="4g",le.none="none",le.unknown="unknown",e.SizeType=void 0,(de=e.SizeType||(e.SizeType={})).original="original",de.compressed="compressed",e.SourceType=void 0,(pe=e.SourceType||(e.SourceType={})).album="album",pe.camera="camera",e.CameraMode=void 0,(fe=e.CameraMode||(e.CameraMode={})).normal="normal",fe.batch="batch",fe.front="front",fe.batch_front="batch_front",e.LiveType=void 0,(he=e.LiveType||(e.LiveType={}))[he.common=0]="common",he[he.corp_training=1]="corp_training",he[he.edu_normal_class=2]="edu_normal_class",he[he.edu_small_class=3]="edu_small_class",e.ProductViewType=void 0,(ge=e.ProductViewType||(e.ProductViewType={}))[ge.normal=0]="normal",ge[ge.scan=1]="scan",e.CreateExternalPaymentType=void 0,(ve=e.CreateExternalPaymentType||(e.CreateExternalPaymentType={}))[ve.chat=0]="chat",ve[ve.qrcode=1]="qrcode",e.EntryType=void 0,(ye=e.EntryType||(e.EntryType={})).contact_profile="contact_profile",ye.single_chat_tools="single_chat_tools",ye.group_chat_tools="group_chat_tools",ye.chat_attachment="chat_attachment",ye.single_kf_tools="single_kf_tools",ye.chain_single_chat_tools="chain_single_chat_tools",ye.chain_group_chat_tools="chain_group_chat_tools",ye.normal="normal",e.EnvVersion=void 0,(me=e.EnvVersion||(e.EnvVersion={})).release="release",me.trial="trial",me.develop="develop",e.OpenUserProfileType=void 0,(we=e.OpenUserProfileType||(e.OpenUserProfileType={}))[we.internal=1]="internal",we[we.external=2]="external",e.PrintFileIdType=void 0,(Ce=e.PrintFileIdType||(e.PrintFileIdType={}))[Ce.mediaid=1]="mediaid",Ce[Ce.url=2]="url",Ce[Ce.localId=4]="localId",e.InTalkType=void 0,(Se=e.InTalkType||(e.InTalkType={})).None="None",Se.HWOpenTalk="HWOpenTalk",Se.VoIP="VoIP",Se.SystemCall="SystemCall",e.ScanQRCodeType=void 0,(be=e.ScanQRCodeType||(e.ScanQRCodeType={})).qrCode="qrCode",be.barCode="barCode",e.InputCorpGroupContactMode=void 0,(Te=e.InputCorpGroupContactMode||(e.InputCorpGroupContactMode={})).single="single",Te.multi="multi",e.InputCorpGroupContactType=void 0,(Ie=e.InputCorpGroupContactType||(e.InputCorpGroupContactType={})).department="department",Ie.user="user",e.SelectEnterpriseContactMode=void 0,(Ae=e.SelectEnterpriseContactMode||(e.SelectEnterpriseContactMode={})).single="single",Ae.multi="multi",e.SelectEnterpriseContactType=void 0,(We=e.SelectEnterpriseContactType||(e.SelectEnterpriseContactType={})).department="department",We.user="user",e.SelectExternalContactType=void 0,(ke=e.SelectExternalContactType||(e.SelectExternalContactType={}))[ke.all=0]="all",ke[ke.unselected=1]="unselected",e.SelectPrivilegedContactMode=void 0,(Pe=e.SelectPrivilegedContactMode||(e.SelectPrivilegedContactMode={})).single="single",Pe.multi="multi",e.OAType=void 0,(Le=e.OAType||(e.OAType={})).create_approval="10001",Le.view_approval="10002",e.OaExtDataType=void 0,(_e=e.OaExtDataType||(e.OaExtDataType={})).link="link",_e.text="text";var on,an=!1,un=[];function cn(e){try{var n=JSON.parse(e.data);if(!n.type.startsWith("ww-iframe-handle:"))return;for(var t,r=M(un.slice());!(t=r()).done;){(0,t.value)(n,e)}}catch(i){}}function sn(e,n,t){var r,i=function(t){!function(e,n,t){var r="string"==typeof n?n:JSON.stringify(n);null==e||e.postMessage(r,t)}(e.contentWindow,t,n)},o=rn((function(e){var n=JSON.stringify(e);l?i(n):s.push(n)}),t),a=o.invoke,u=o.handleCallMessage,c=o.handleResponseMessage,s=[],l=!1,d=(r=function(t,r){if(r.origin===n&&e.contentWindow===r.source)switch(t.type){case"ww-iframe-handle:ready":return function(){if(!l){l=!0;for(var e,n=M(s);!(e=n()).done;)i(e.value)}}();case"ww-iframe-handle:call":return u(t);case"ww-iframe-handle:response":return c(t)}},an||(an=!0,window.addEventListener("message",cn)),un.push(r),function(){var e=un.indexOf(r);e>=0&&un.splice(e,1)});return e.addEventListener("load",(function(){l||i({type:"ww-iframe-handle:init"})})),{el:e,invoke:a,dispose:d}}function ln(){return ln=k((function(e){var n,t;return P(this,(function(r){switch(r.label){case 0:if(!(null==(n=S())?void 0:n.getSuiteConfigSignature))throw new Be("Missing getSuiteConfigSignature");return[4,n.getSuiteConfigSignature(e)];case 1:return t=r.sent(),[2,{suiteid:n.suiteId,timestamp:""+t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:j(n.jsApiList||["agentConfig"])}]}}))})),ln.apply(this,arguments)}function dn(e,n){G(n[e.name],e.payload||e.data)}function pn(e,n){var t=function(){var e;a.dispose(),null==(e=r.parentNode)||e.removeChild(r)};null==on||on();var r=nn("100vw","100vh",document.body),i=r.style;i.position="fixed",i.left="0",i.top="0",i.zIndex="1000",r.classList.add("wecom-jssdk-modal"),r.setAttribute("src",e);var o=new URL(e).origin,a=sn(r,o,(function(e){return"close"===e.type&&t(),null==n?void 0:n(e)}));return on=t,a}var fn={agentConfig:je,suiteConfig:function(e){return ln.apply(this,arguments)}};function hn(e,n){return gn.apply(this,arguments)}function gn(){return gn=k((function(e,n){var t,r,i,o,a,u;return P(this,(function(c){switch(c.label){case 0:t=new Error("Missing signature handler"),r=M(n),c.label=1;case 1:if((i=r()).done)return[3,6];o=i.value,c.label=2;case 2:return c.trys.push([2,4,,5]),function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}(fn,o)?(a={type:o},[4,fn[o](e)]):[3,5];case 3:return[2,(a.params=c.sent(),a)];case 4:return u=c.sent(),t=u,[3,5];case 5:return[3,1];case 6:throw t}}))})),gn.apply(this,arguments)}var vn,yn,mn,wn,Cn,Sn="1.4.3";e.WWLoginType=void 0,(vn=e.WWLoginType||(e.WWLoginType={})).serviceApp="ServiceApp",vn.corpApp="CorpApp",e.WWLoginLangType=void 0,(yn=e.WWLoginLangType||(e.WWLoginLangType={})).zh="zh",yn.en="en",e.WWLoginRedirectType=void 0,(mn=e.WWLoginRedirectType||(e.WWLoginRedirectType={})).top="top",mn.callback="callback",mn.self="self",e.WWLoginPanelSizeType=void 0,(wn=e.WWLoginPanelSizeType||(e.WWLoginPanelSizeType={})).middle="middle",wn.small="small";var bn=((Cn={})[e.WWLoginPanelSizeType.middle]=["480px","416px"],Cn[e.WWLoginPanelSizeType.small]=["320px","380px"],Cn);function Tn(e){return function(e){for(var n,t="0123456789abcdef",r="",i=0;i<e.length;i++)n=e.charCodeAt(i),r+=t.charAt(n>>>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<e.length;c+=16){for(var s=r,l=i,d=o,p=a,f=u,h=0;h<80;h++){t[h]=h<16?e[c+h]:kn(t[h-3]^t[h-8]^t[h-14]^t[h-16],1);var g=Wn(Wn(kn(r,5),In(h,i,o,a)),Wn(Wn(u,t[h]),An(h)));u=a,a=o,o=kn(i,30),i=r,r=g}r=Wn(r,s),i=Wn(i,l),o=Wn(o,d),a=Wn(a,p),u=Wn(u,f)}return[r,i,o,a,u]}(function(e){for(var n=new Array(e.length>>2),t=0;t<n.length;t++)n[t]=0;for(var r=0;r<8*e.length;r+=8)n[r>>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return n}(e),8*e.length))}(e))}function In(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 An(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function Wn(e,n){var t=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(t>>16)<<16|65535&t}function kn(e,n){return e<<n|e>>>32-n}var Pn={isWeChat:g,isWeCom:h};return e.IS_WECOM_SDK=!0,e.SDK_VERSION=Sn,e.addCard=function(e){return He(e,k((function(){var n,t,r,i;return P(this,(function(o){switch(o.label){case 0:return[4,Je()];case 1:return o.sent(),[4,ne("batchAddCard",{card_list:e.cardList.map((function(e){return{card_id:e.cardId,card_ext:e.cardExt}}))})];case 2:if(!(n=o.sent()).card_list)return[2,n];for(t=M(n.card_list);!(r=t()).done;)(i=r.value).cardId=i.card_id,delete i.card_id,i.cardExt=i.card_ext,delete i.card_ext,i.isSuccess=!!i.is_succ,delete i.is_succ;return n.cardList=n.card_list,delete n.card_list,[2,n]}}))})))},e.addDevice=function(e){return Fe("addDevice",e)},e.checkJsApi=function(e){return Ze.apply(this,arguments)},e.checkSchedule=function(e){return Fe("checkSchedule",e)},e.chooseCard=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("chooseCard",{app_id:I(),location_id:e.shopId||"",sign_type:e.signType||"SHA1",card_id:e.cardId||"",card_type:e.cardType||"",card_sign:e.cardSign,time_stamp:""+e.timestamp,nonce_str:e.nonceStr})];case 2:return(n=t.sent()).cardList=n.choose_card_info,delete n.choose_card_info,[2,n]}}))})))},e.chooseImage=function(e){return void 0===e&&(e={}),He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("chooseImage",{scene:"1|2",count:e.count||9,sizeType:e.sizeType||["original","compressed"],sourceType:e.sourceType||["album","camera"],defaultCameraMode:e.defaultCameraMode||"normal",isSaveToAlbum:K(e.isSaveToAlbum)?0:1})];case 2:if(n=t.sent(),v&&n.localIds){n.localIds=n.localIds||"[]";try{n.localIds=JSON.parse(n.localIds)}catch(r){}}return[2,n]}}))})))},e.chooseInvoice=function(e){return Fe("chooseInvoice",e)},e.chooseWXPay=function(e){return Fe("getBrandWCPayRequest",e,Ke(e))},e.claimClassAdmin=function(e){return void 0===e&&(e={}),Fe("claimClassAdmin",e)},e.closeBLEConnection=function(e){return Fe("closeBLEConnection",e)},e.closeBluetoothAdapter=function(e){return void 0===e&&(e={}),Fe("closeBluetoothAdapter",e)},e.closeWindow=function(e){return void 0===e&&(e={}),Fe("closeWindow",e)},e.connectWifi=function(e){return Fe("connectWifi",e)},e.consumeAndShareCard=function(e){return Fe("consumedShareCard",e,{consumedCardId:e.cardId,consumedCode:e.code})},e.createBLEConnection=function(e){return Fe("createBLEConnection",e)},e.createChatWithMsg=function(e){return Fe("createChatWithMsg",e)},e.createCorpGroupChat=function(e){return Fe("createCorpGroupChat",e,{groupName:e.groupName||"",userIds:e.userIds,openUserIds:e.openUserIds,corpGroupUserIds:e.corpGroupUserIds})},e.createExternalPayment=function(e){return void 0===e&&(e={}),Fe("createExternalPayment",e)},e.createJSAPIPanel=function(e,n){var t=nn("100%","100%",n.el),r=new Map,i=sn(t,"https://login.work.weixin.qq.com",(function(t){switch(t.type){case"getStaticOptions":return{name:e,options:L({},n,{el:void 0,params:void 0})};case"getJSAPIParams":return function(e){return o.apply(this,arguments)}(t);case"openModalFrame":return function(e){pn(e.payload.url)}(t);case"jsapiCallback":return function(e){if(r.has(e.seq)){var n=r.get(e.seq);r.delete(e.seq),G("success"===e.kind?null==n?void 0:n.success:null==n?void 0:n.fail,e.payload),G(null==n?void 0:n.complete,e.payload)}}(t);case"call":return dn(t,n)}})).dispose;function o(){return(o=k((function(t){var i,o,a,u,c,s,l;return P(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=Q(),r.set(t.seq,a),s={webToken:n.webToken,url:c},(null==(i=t.payload)?void 0:i.skipSignature)?(l=void 0,[3,6]):[3,4];case 4:return[4,hn(c,(null==(o=t.payload)?void 0:o.preferSignatureTypeList)||["agentConfig"])];case 5:l=d.sent(),d.label=6;case 6:return[2,(s.configParams=l,s.jsapi=e,s.jsapiParams=a,s)]}}))}))).apply(this,arguments)}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)||e.removeChild(t)}}},e.createSchoolPayment=function(e){return Fe("createSchoolPayment",e)},e.createWWLoginPanel=function(n){for(var t,r,i=function(n){void 0===n&&(n=e.WWLoginPanelSizeType.middle);var t=bn[n]||bn[e.WWLoginPanelSizeType.middle];return{width:t[0],height:t[1]}}(null==(t=n.params)?void 0:t.panel_size),o=nn(i.width,i.height,n.el),a=sn(o,"https://login.work.weixin.qq.com",(function(e){if("call"===e.type)return dn(e,n);throw new Error("Unknown message type '"+e.type+"'")})).dispose,u=new URL("https://login.work.weixin.qq.com/wwlogin/sso/login"),c=M(Object.keys(n.params||{}));!(r=c()).done;){var s=r.value;u.searchParams.set(s,n.params[s])}return u.searchParams.set("version",Sn),o.src=u.href,{el:o,unmount:function(){var e;a(),null==(e=o.parentNode)||e.removeChild(o)}}},e.discoverDevice=function(e){return Fe("discoverDevice",e)},e.downloadImage=function(e){return Fe("downloadImage",e,{serverId:e.serverId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.downloadLivingReplay=function(e){return Fe("downloadLivingReplay",e)},e.downloadVoice=function(e){return Fe("downloadVoice",e,{serverId:e.serverId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.ensureAgentConfigReady=Ve,e.ensureConfigReady=qe,e.ensureCorpConfigReady=Oe,e.enterHWOpenTalk=function(e){return Fe("enterHWOpenTalk",e)},e.enterpriseVerify=function(e){return void 0===e&&(e={}),Fe("enterpriseVerify",e)},e.env=Pn,e.getApprovalSelectedItems=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("getApprovalSelectedItems",{key:e.key})];case 2:if(!(n=t.sent()).selectedData)return[2,n];try{n.selectedData=JSON.parse(n.selectedData)}catch(r){n.selectedData=[]}return[2,n]}}))})))},e.getBLEDeviceCharacteristics=function(e){return Fe("getBLEDeviceCharacteristics",e)},e.getBLEDeviceServices=function(e){return Fe("getBLEDeviceServices",e)},e.getBeacons=function(e){return void 0===e&&(e={}),Fe("getBeacons",e)},e.getBluetoothAdapterState=function(e){return void 0===e&&(e={}),Fe("getBluetoothAdapterState",e)},e.getBluetoothDevices=function(e){return void 0===e&&(e={}),He(e,k((function(){var e,n,t,r;return P(this,(function(i){switch(i.label){case 0:return[4,Je()];case 1:return i.sent(),[4,ne("getBluetoothDevices")];case 2:for(e=i.sent(),n=M(e.devices||[]);!(t=n()).done;)(r=t.value).advertisData=F(r.advertisData),r.serviceData=F(r.serviceData);return[2,e]}}))})))},e.getClipboardData=function(e){return void 0===e&&(e={}),Fe("getClipboardData",e)},e.getConnectedBluetoothDevices=function(e){return Fe("getConnectedBluetoothDevices",e)},e.getConnectedWifi=function(e){return void 0===e&&(e={}),Fe("getConnectedWifi",e)},e.getContext=function(e){return void 0===e&&(e={}),Fe("getContext",e)},e.getCurCorpGroupChat=function(e){return void 0===e&&(e={}),Fe("getCurCorpGroupChat",e)},e.getCurCorpGroupContact=function(e){return Fe("getCurCorpGroupContact",e)},e.getCurExternalChat=function(e){return void 0===e&&(e={}),Fe("getCurExternalChat",e)},e.getCurExternalContact=function(e){return void 0===e&&(e={}),Fe("getCurExternalContact",e)},e.getLocalImgData=function(e){return Fe("getLocalImgData",e)},e.getLocation=function(e){return void 0===e&&(e={}),He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("geoLocation",{type:e.type||"wgs84"})];case 2:return delete(n=t.sent()).type,[2,n]}}))})))},e.getNetworkType=function(e){return void 0===e&&(e={}),Fe("getNetworkType",e)},e.getShareInfo=function(e){return Fe("getShareInfo",e)},e.getSignature=function(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:Tn("jsapi_ticket="+n.ticket+"&noncestr="+t+"×tamp="+r+"&url="+i)}},e.getVerifyParams=A,e.getWifiList=function(e){return void 0===e&&(e={}),Fe("getWifiList",e)},e.hideAllNonBaseMenuItem=function(e){return void 0===e&&(e={}),Fe("hideAllNonBaseMenuItem",e)},e.hideChatAttachmentMenu=function(e){return Fe("hideChatAttachmentMenu",e)},e.hideMenuItems=function(e){return Fe("hideMenuItems",e)},e.hideOptionMenu=function(e){return void 0===e&&(e={}),Fe("hideOptionMenu",e)},e.initOpenData=function(e){return void 0===e&&(e={}),He(e,k((function(){var e;return P(this,(function(n){switch(n.label){case 0:return h?[4,Ve()]:[2,Ye()];case 1:if(e=n.sent().result,!y&&!(null==t?void 0:t.WeixinSandBox))throw new Be("Missing WeixinSandBox");return(null==t?void 0:t.WWOpenData)?[3,3]:[4,ne("wwapp.initWwOpenData")];case 2:n.sent(),n.label=3;case 3:if(!(null==t?void 0:t.WWOpenData))throw new Be("Init WWOpenData failed");return t.WWOpenData.initJSSDK&&t.WWOpenData.initJSSDK({invoke:ne,ensureAgentConfigReady:Ve}),[2,e]}}))})))},e.invoke=ne,e.launchMiniprogram=function(e){return Fe("launchMiniprogram",e,{appid:e.appid,path:$e(e.path),envVersion:e.envVersion})},e.navigateToAddCustomer=function(e){return void 0===e&&(e={}),Fe("navigateToAddCustomer",e)},e.navigateToKfChat=function(e){return Fe("navigateToKfChat",e)},e.notifyBLECharacteristicValueChange=function(e){return Fe("notifyBLECharacteristicValueChange",e)},e.on=Y,e.onBLECharacteristicValueChange=function(e){Y("onBLECharacteristicValueChange",(function(n){(null==n?void 0:n.value)&&(n.value=F(n.value)),e(n)}))},e.onBLEConnectionStateChange=function(e){Y("onBLEConnectionStateChange",e)},e.onBeaconServiceChange=function(e){Y("onBeaconServiceChange",e)},e.onBeaconUpdate=function(e){Y("onBeaconUpdate",e)},e.onBluetoothAdapterStateChange=function(e){Y("onBluetoothAdapterStateChange",e)},e.onBluetoothDeviceFound=function(e){Y("onBluetoothDeviceFound",e)},e.onGetWifiList=function(e){Y("onGetWifiList",e)},e.onHistoryBack=function(e){Y("historyBack",e)},e.onLocationChange=function(e){Y("auto:location:report",e)},e.onMenuShareAppMessage=function(e){ze("menu:share:appmessage",e,(function(){return ne("sendAppMessage",{title:e.title||u(),desc:e.desc||"",link:e.link||a(),img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""})}))},e.onMenuShareQQ=function(e){ze("menu:share:qq",e,(function(){return ne("shareQQ",{title:e.title||u(),desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||a()})}))},e.onMenuShareQZone=function(e){ze("menu:share:QZone",e,(function(){return ne("shareQZone",{title:e.title||u(),desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||a()})}))},e.onMenuShareTimeline=function(e){ze("menu:share:timeline",e,(function(){return ne("shareTimeline",{title:e.title||u(),desc:e.title||u(),img_url:e.imgUrl||"",link:e.link||a(),type:e.type||"link",data_url:e.dataUrl||""})}))},e.onMenuShareWechat=function(e){ze("menu:share:wechat",e,(function(){return ne("shareWechat",{title:e.title||u(),desc:e.desc||"",link:e.link||a(),img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""})}))},e.onMenuShareWeibo=function(e){ze("menu:share:weiboApp",e,(function(){return ne("shareWeiboApp",{title:e.title||u(),desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||a()})}))},e.onNetworkStatusChange=function(e){Y("onNetworkStatusChange",e)},e.onSearchBeacons=function(e){Y("onBeaconsInRange",e)},e.onUserCaptureScreen=function(e){Y("onUserCaptureScreen",e)},e.onVoicePlayEnd=function(e){Y("onVoicePlayEnd",e)},e.onVoiceRecordEnd=function(e){Y("onVoiceRecordEnd",e)},e.onWifiConnected=function(e){Y("onWifiConnected",e)},e.openAddress=function(e){return void 0===e&&(e={}),He(e,k((function(){var e;return P(this,(function(n){switch(n.label){case 0:return[4,Je()];case 1:return n.sent(),[4,ne("editAddress")];case 2:return(e=n.sent()).postalCode=e.addressPostalCode,delete e.addressPostalCode,e.provinceName=e.proviceFirstStageName,delete e.proviceFirstStageName,e.cityName=e.addressCitySecondStageName,delete e.addressCitySecondStageName,e.countryName=e.addressCountiesThirdStageName,delete e.addressCountiesThirdStageName,e.detailInfo=e.addressDetailInfo,delete e.addressDetailInfo,[2,e]}}))})))},e.openAppComment=function(e){return void 0===e&&(e={}),Fe("openAppComment",e)},e.openAppDeviceDataAuth=function(e){return void 0===e&&(e={}),Fe("openAppDeviceDataAuth",e)},e.openAppManage=function(e){return void 0===e&&(e={}),Fe("openAppManage",e)},e.openBluetoothAdapter=function(e){return void 0===e&&(e={}),Fe("openBluetoothAdapter",e)},e.openBusinessView=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("openBusinessView",{businessType:e.businessType,queryString:e.queryString||"",envVersion:e.envVersion})];case 2:if(n=t.sent(),!v||!n.extraData)return[2,n];try{n.extraData=JSON.parse(n.extraData)}catch(r){n.extraData={}}return[2,n]}}))})))},e.openCard=function(e){return Fe("batchViewCard",e,{card_list:e.cardList.map((function(e){return{card_id:e.cardId,code:e.code}}))})},e.openDefaultBrowser=function(e){return Fe("openDefaultBrowser",e)},e.openDeviceProfile=function(e){return Fe("openDeviceProfile",e)},e.openEnterpriseChat=function(e){return void 0===e&&(e={}),Fe("openEnterpriseChat",e,{chatId:e.chatId||"",chatname:e.groupName||"",groupName:e.groupName||"",useridlist:$(e.userIds),userIds:$(e.userIds),openIds:$(e.openIds),externalUserIds:$(e.externalUserIds)})},e.openEnterpriseRedPacket=function(e){return Fe("getRecevieBizHongBaoRequest",e,Ke(e))},e.openExistedChatWithMsg=function(e){return Fe("openExistedChatWithMsg",e)},e.openLocation=function(e){return Fe("openLocation",e,{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""})},e.openProductSpecificView=function(e){return Fe("openProductViewWithPid",e,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo})},e.openThirdAppServiceChat=function(e){return void 0===e&&(e={}),Fe("openThirdAppServiceChat",e)},e.openUserProfile=function(e){return Fe("openUserProfile",e)},e.pauseVoice=function(e){return Fe("pauseVoice",e)},e.playVoice=function(e){return Fe("playVoice",e)},e.previewFile=function(e){return Fe("previewFile",e)},e.previewImage=function(e){return Fe("imagePreview",e)},e.printFile=function(e){return Fe("printFile",e)},e.queryCurrHWOpenTalk=function(e){return void 0===e&&(e={}),Fe("queryCurrHWOpenTalk",e)},e.readBLECharacteristicValue=function(e){return Fe("readBLECharacteristicValue",e)},e.refundExternalPayment=function(e){return Fe("refundExternalPayment",e)},e.register=function(e){!function(e){c=e}(e),(g||h)&&qe()},e.replayLiving=function(e){return Fe("replayLiving",e)},e.saveApprovalSelectedItems=function(e){return Fe("saveApprovalSelectedItems",e,{key:e.key,selectedData:"string"==typeof e.selectedData?e.selectedData:JSON.stringify(e.selectedData)})},e.scanQRCode=function(e){return void 0===e&&(e={}),He(e,k((function(){var n,t,r,i;return P(this,(function(o){switch(o.label){case 0:return[4,Je()];case 1:return o.sent(),[4,ne("scanQRCode",{needResult:e.needResult?1:0,scanType:e.scanType||["qrCode","barCode"]})];case 2:if(t=o.sent(),!w)return[2,t];if(!(r=t.resultStr))return[2,t];try{i=JSON.parse(r)}catch(a){}return t.resultStr=null==i||null==(n=i.scan_code)?void 0:n.scan_result,[2,t]}}))})))},e.selectCorpGroupContact=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("selectCorpGroupContact",e)];case 2:if(!X((n=t.sent()).result))return[2,n];try{n.result=JSON.parse(n.result)}catch(r){}return[2,n]}}))})))},e.selectEnterpriseContact=function(e){return He(e,k((function(){var n;return P(this,(function(t){switch(t.label){case 0:return[4,Je()];case 1:return t.sent(),[4,ne("selectEnterpriseContact",e)];case 2:if(!X((n=t.sent()).result))return[2,n];try{n.result=JSON.parse(n.result)}catch(r){}return[2,n]}}))})))},e.selectExternalContact=function(e){return void 0===e&&(e={}),Fe("selectExternalContact",e)},e.selectPrivilegedContact=function(e){return Fe("selectPrivilegedContact",e)},e.sendChatMessage=function(e){return Fe("sendChatMessage",e)},e.setClipboardData=function(e){return Fe("setClipboardData",e)},e.setShareAttr=function(e){return void 0===e&&(e={}),Fe("setShareAttr",e)},e.shareAppMessage=function(e){return Fe("shareAppMessage",e)},e.shareToExternalChat=function(e){return Fe("shareToExternalChat",e)},e.shareToExternalContact=function(e){return Fe("shareToExternalContact",e)},e.shareToExternalMoments=function(e){return Fe("shareToExternalMoments",e)},e.shareWechatMessage=function(e){return Fe("shareWechatMessage",e)},e.showAllNonBaseMenuItem=function(e){return void 0===e&&(e={}),Fe("showAllNonBaseMenuItem",e)},e.showMenuItems=function(e){return Fe("showMenuItems",e)},e.showOptionMenu=function(e){return void 0===e&&(e={}),Fe("showOptionMenu",e)},e.showSecurityGatewayConfirmModal=function(e){var n=new URL("https://open.work.weixin.qq.com/wwopen/secureGateway/confirm");if(n.searchParams.set("confirm_id",e.confirmId),!w&&!v){n.searchParams.set("modal","true");var t=pn(n.href,(function(n){switch(n.type){case"call":return dn(n,e);case"close":return;default:throw new Error("Unknown message type '"+n.type+"'")}}));return{el:t.el,unmount:function(){var e;t.dispose(),null==(e=t.el.parentNode)||e.removeChild(t.el)}}}location.href=n.href},e.startAutoLBS=function(e){return Fe("startAutoLBS",e)},e.startBeaconDiscovery=function(e){return Fe("startBeaconDiscovery",e)},e.startBluetoothDevicesDiscovery=function(e){return void 0===e&&(e={}),Fe("startBluetoothDevicesDiscovery",e)},e.startLiving=function(e){return void 0===e&&(e={}),Fe("startLiving",e)},e.startMeeting=function(e){return void 0===e&&(e={}),Fe("startMeeting",e)},e.startRecord=function(e){return void 0===e&&(e={}),Fe("startRecord",e)},e.startSearchBeacons=function(e){return void 0===e&&(e={}),Fe("startMonitoringBeacons",e)},e.startWecast=function(e){return void 0===e&&(e={}),Fe("startWecast",e)},e.startWifi=function(e){return void 0===e&&(e={}),Fe("startWifi",e)},e.stopAutoLBS=function(e){return void 0===e&&(e={}),Fe("stopAutoLBS",e)},e.stopBeaconDiscovery=function(e){return void 0===e&&(e={}),Fe("stopBeaconDiscovery",e)},e.stopBluetoothDevicesDiscovery=function(e){return void 0===e&&(e={}),Fe("stopBluetoothDevicesDiscovery",e)},e.stopRecord=function(e){return void 0===e&&(e={}),Fe("stopRecord",e)},e.stopSearchBeacons=function(e){return void 0===e&&(e={}),Fe("stopMonitoringBeacons",e)},e.stopVoice=function(e){return Fe("stopVoice",e)},e.stopWifi=function(e){return void 0===e&&(e={}),Fe("stopWifi",e)},e.thirdPartyOpenPage=function(e){return Fe("thirdPartyOpenPage",e)},e.translateVoice=function(e){return Fe("translateVoice",e,{localId:e.localId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.updateAppMessageShareData=function(e){return void 0===e&&(e={}),Fe("updateAppMessageShareData",e)},e.updateCorpGroupChat=function(e){return Fe("updateCorpGroupChat",e)},e.updateEnterpriseChat=function(e){return Fe("updateEnterpriseChat",e,{chatId:e.chatId,userIdsToAdd:$(e.userIdsToAdd)})},e.updateMomentsSetting=function(e){return Fe("updateMomentsSetting",e)},e.updateTimelineShareData=function(e){return void 0===e&&(e={}),Fe("updateTimelineShareData",e)},e.uploadImage=function(e){return Fe("uploadImage",e,{localId:e.localId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.uploadVoice=function(e){return Fe("uploadVoice",e,{localId:e.localId,isShowProgressTips:K(e.isShowProgressTips)?0:1})},e.wedocSelectDoc=function(e){return void 0===e&&(e={}),Fe("wedocSelectDoc",e)},e.wedriveSelectDir=function(e){return void 0===e&&(e={}),Fe("wedriveSelectDir",e)},e.wedriveSelectFileForDownload=function(e){return Fe("wedriveSelectFileForDownload",e)},e.wedriveSelectFileForShare=function(e){return Fe("wedriveSelectFileForShare",e)},e.writeBLECharacteristicValue=function(e){return Fe("writeBLECharacteristicValue",e,{deviceId:e.deviceId,serviceId:e.serviceId,characteristicId:e.characteristicId,value:J(e.value)})},e}({});
|
|
|