UNPKG

ym-jsbridge

Version:

一门 Android/iOS App js SDK

2 lines 30.5 kB
/*20250529*/ !function(e,n){if("object"==typeof module&&"object"==typeof module.exports)module.exports=n(e);else{var t=n(e),i=e.jsBridge;if("object"==typeof i)for(var o in i){var a=i[o];t[o]||"function"!=typeof a||(t[o]=function(){a.apply(i,arguments)})}e.jsBridge=t}}("object"==typeof window?window:this,function(e){var n=/LT-APP\/(\d+)/,t=e.navigator?e.navigator.userAgent:"",i=n.test(t);if(!i){var o=e.WebViewJavascriptBridgeInterface;i=!!o,o&&o.ltApp&&(t+=o.ltApp())}var a=/(iPhone|iPad|iPod|iOS)/i.test(t)||e.navigator&&"MacIntel"==e.navigator.platform&&e.navigator.maxTouchPoints>0;!function(e){if(!e.WebViewJavascriptBridge){e.WebViewJavascriptBridge={registerHandler:function(e,n){t[e]=n},callHandler:function(e,n,t){2==arguments.length&&"function"==typeof n&&(t=n,n=null);u({handlerName:e,data:n},t)},disableJavscriptAlertBoxSafetyTimeout:function(){},_fetchQueue:function(){var e=JSON.stringify(n);return n=[],console.log("App fetch: "+e),e},_handleMessageFromJava:f,_handleMessageFromObjC:f};var n=[],t={},o=a?"https":"wvjbscheme",r=o+"://__WVJB_QUEUE_MESSAGE__?",s={},c=1;i&&function(){var e=document,n=e.createElement("iframe");n.style.display="none",n.src=o+"://__BRIDGE_LOADED__";var t=e.body?e.body:e.documentElement;t.appendChild(n),setTimeout(function(){t.removeChild(n)},3e3)}()}function u(e,t){var i="cb_"+c+++"_"+(new Date).getTime();t&&(s[i]=t,e.callbackId=i),n.push(e),(function(){var e="ltapp_wvjb_iframe",n=document.getElementById(e);n||((n=document.createElement("iframe")).id=e,n.style.display="none",(document.body?document.body:document.documentElement).appendChild(n));return n}()).src=r+i}function f(e){console.log("App call: "+e);var n=JSON.parse(e),i=null;if(n.responseId)try{if(i=s[n.responseId])return a||n.keepResponseId||delete s[n.responseId],i(n.responseData)}catch(e){console.log(e)}else{if(n.callbackId){var o=n.callbackId;i=function(e){u({responseId:o,responseData:e})}}try{var r=t[n.handlerName];if(r)return void r(n.data,i)}catch(e){console.log("WebViewJavascriptBridge: WARNING: javascript handler threw.",n,e)}i&&i({ok:!1})}}}(e);var r=!1,s={isReady:function(){return!!e.WebViewJavascriptBridge},ready:function(e){y(e)},audioPlayer:{play:function(e,n){p("10.play","object"==typeof e?e:{},"function"==typeof e?e:n)},pause:function(e){p("10.pause",{},e)},resume:function(e){p("10.resume",{},e)},stop:function(e){p("10.stop",{},e)},add:function(e,n){p("10.add",e,n)},list:function(e){p("10.list",{},e)},remove:function(e,n){p("10.remove",e,n)},clear:function(e){p("10.clear",{},e)},setListener:function(e){u("10.setListener",{},function(n,t){if(e&&t){var i=JSON.parse(t);e(i.event,i.data)}})},removeListener:function(e){u("10.removeListener")}},txVideo:{play:function(e){u("7.play","string"==typeof e?{url:e}:e)},playList:function(e){u("7.playList",e)},addPlayer:function(e,n){e.e="function"==typeof e.onEvent,u("7.addPlayer",e,function(t,i){if(/^\d+$/.test(i))n&&n(parseInt(i));else if(e.e){var o=JSON.parse(i);e.onEvent(o.p,o.e,o.d?o.d:null)}})},removePlayer:function(e){u("7.removePlayer",{p:e})}},network:{wifiInfo:function(e){p("6.wifiInfo",{},e)},active:function(e){p("6.active",{},e)},setConnectionListener:function(e){g("6.scl",{},e)}},ble:{getState:function(e){l("5.getState",{},e)},requestPermission:function(e){d("5.requestPermission",{},e)},requestEnable:function(e){d("5.requestEnable",{},e)},getBondedDevices:function(e){g("5.getBondedDevices",{},e)},getName:function(e){f("5.getName",{},e)},getPeripheral:function(e){g("5.getPeripheral",{},e)},isScanning:function(e){d("5.isScanning",{},e)},isConnected:function(e,n){d("5.isConnected",e,n)},scan:function(e){p("5.scan",{},e)},stopScan:function(e){d("5.stopScan",{},e)},connect:function(e,n){u("5.connect",e,n)},disconnect:function(e,n){u("5.disconnect",e,n)},requestMtu:function(e,n){p("5.requestMtu",e,n)},discoverServices:function(e,n){p("5.discoverServices",e,n)},discoverCharacteristics:function(e,n){p("5.discoverCharacteristics",e,n)},discoverDescriptors:function(e,n){p("5.discoverDescriptors",e,n)},setNotify:function(e,n){p("5.setNotify",e,n)},read:function(e,n){p("5.read",e,n)},write:function(e,n){p("5.write",e,n)}},fs:{exist:function(e,n){u("3.exist",{s:e},n)},mkdir:function(e,n){u("3.mkdir",{s:e},n)},list:function(e,n){p("3.list",{s:e},n)},size:function(e,n){u("3.size",{s:e},function(e,t){"function"==typeof n&&n(e,e?parseInt(t):t)})},delete:function(e,n){u("3.delete",{s:e},n)},copy:function(e,n,t){u("3.copy",{s:e,d:n},t)},writeText:function(e,n,t){u("3.writeText",{s:e,a:n},t)},appendText:function(e,n,t){u("3.appendText",{s:e,a:n},t)},readText:function(e,n){u("3.readText",{s:e},n)},writeBinary:function(e,n,t){u("3.writeBinary",{s:e,a:n},t)},appendBinary:function(e,n,t){u("3.appendBinary",{s:e,a:n},t)},readBinary:function(e,n){u("3.readBinary",{s:e},n)},toUri:function(e,n){u("3.toUri",{s:e},n)},toAbsolute:function(e,n){u("3.toAbsolute",{s:e},n)},share:function(e,n){u("3.share",{s:e},n)},open:function(e,n){u("3.open",{s:e},n)},unzip:function(e,n,t){var i={s:e,d:n};"object"==typeof e&&(i.s=e.src,i.d=e.dst,i.pwd=e.pwd,t=n),u("3.unzip",i,t)},md5:function(e,n){u("3.md5",{s:e},n)},sha1:function(e,n){u("3.sha1",{s:e},n)},sha256:function(e,n){u("3.sha256",{s:e},n)},download:function(e,n){f("3.download",e,function(t){var i=JSON.parse(t);0==i.a?"function"==typeof e.progress&&e.progress(i.t,i.d):"function"==typeof n&&n(1==i.a,i.m)})}},rc:{init:function(e,n){d("s.init",e,n)},setUserInfoListener:function(e){f("s.setUserInfoListener",{},e)},setUserInfo:function(e){u("s.setUserInfo",e,null)},connect:function(e,n){u("s.connect",e,n)},disconnect:function(e){d("s.disconnect",{},e)},logout:function(e){d("s.logout",{},e)}},rcIM:{startConversationList:function(e,n){d("q.startConversationList",e,n)},startConversation:function(e,n){d("q.startConversation",e,n)},startSubConversationList:function(e,n){d("q.startSubConversationList",e,n)},unreadMessageCount:function(e){l("q.unreadMessageCount",{},e)}},rcCall:{startSingleCall:function(e,n){d("r.startSingleCall",e,n)},startMultiCall:function(e,n){d("r.startMultiCall",e,n)}},video:{play:function(e){u("x.play","string"==typeof e?{url:e}:e)},addPlayer:function(e,n){e.e="function"==typeof e.onEvent,u("x.addPlayer",e,function(t,i){if(/^\d+$/.test(i))n&&n(parseInt(i));else if(e.e){var o=JSON.parse(i);e.onEvent(o.p,o.e,o.d?o.d:null)}})},removePlayer:function(e){u("x.removePlayer",{p:e})},resource:function(e){u("x.resource",e)},start:function(e){u("x.start",{p:e})},pause:function(e){u("x.pause",{p:e})},stop:function(e){u("x.stop",{p:e})},fullScreen:function(e){u("x.fullScreen",{p:e})}},displays:{getDisplays:function(e){g("z.getDisplays",{},e)},show:function(e,n){d("z.show",e,n)},dismiss:function(e){u("z.dismiss",{x:e})}},iap:{canMakePayments:function(e){d("i.canMakePayments",{},e)},getProducts:function(e,n){p("i.getProducts",e,n)},setTransanctionListener:function(e){p("i.setTransanctionListener",{},e)},getUnfinishedTransactions:function(){p("i.getUnfinishedTransactions",{})},purchase:function(e){p("i.purchase",e)},restoreTransactions:function(e){p("i.restoreTransactions",e)},finishTransaction:function(e){u("i.finishTransaction",e)},setDownloadListener:function(e){p("i.setDownloadListener",{},e)},startDownloads:function(e){p("i.startDownloads",e)},pauseDownloads:function(e){u("i.pauseDownloads",e)},resumeDownloads:function(e){u("i.resumeDownloads",e)},cancelDownloads:function(e){u("i.cancelDownloads",e)}},doc:{canOpen:function(e,n){d("c.canOpen",{url:e},n)},open:function(e){u("c.open",e)}},bc:{login:function(e){u("b.login",{},e)},logout:function(e){u("b.logout",{},e)},setShouldUseAlipay:function(e){u("b.setShouldUseAlipay",{b:e})},setSyncForTaoke:function(e){u("b.setSyncForTaoke",{b:e})},setForceH5:function(e){u("b.setForceH5",{b:e})},setTaokeParams:function(e){u("b.setTaokeParams",e)},setChannel:function(e){u("b.setChannel",e)},setISVCode:function(e){u("b.setISVCode",{s:e})},setISVVersion:function(e){u("b.setISVVersion",{s:e})},detail:function(e,n){u("b.detail",e,n)},shop:function(e,n){u("b.shop",e,n)},url:function(e,n){u("b.url",e,n)},addCart:function(e,n){u("b.addCart",e,n)},cart:function(e,n){u("b.cart",e,n)},order:function(e,n){u("b.order",e,n)}},jiguang:{setListener:function(e){g("j.setListener",{},e)},stopPush:function(){u("j.stopPush")},resumePush:function(){u("j.resumePush")},isPushStopped:function(e){d("j.isPushStopped",{},e)},getRegistrationID:function(e){f("j.getRegistrationID",{},e)},setAlias:function(e,n){f("j.setAlias",{alias:e},n)},deleteAlias:function(e){f("j.deleteAlias",{},e)},getAlias:function(e){f("j.getAlias",{},e)},setBadge:function(e){u("j.setBadge",{b:e})},setTags:function(e,n){g("j.setTags",{tags:e},n)},addTags:function(e,n){g("j.addTags",{tags:e},n)},deleteTags:function(e,n){g("j.deleteTags",{tags:e},n)},cleanTags:function(e){g("j.cleanTags",{},e)},getAllTags:function(e){g("j.getAllTags",{},e)}},notification:{getBadge:function(e){f("n.getBadge",{},function(n){e&&e(parseInt(n))})},setBadge:function(e){u("n.setBadge",{badge:e})},requestAuth:function(e){d("n.requestAuth",{},e)},notify:function(e,n){p("n.notify",e,n)},cancelAll:function(){u("n.cancelAll")}},x5:{videoCacheSize:function(e){s.ios?e&&e(0):u("x5.videoCacheSize",{},function(n,t){e&&e(n&&t?parseInt(t):0)})},clearVideoCache:function(e){s.ios?e&&e():f("x5.clearVideoCache",{},e)},playVideo:function(e,n){s.ios?n&&n(!1):d("x5.playVideo",{url:e},n)},getEnabledState:function(e){s.ios?e&&e(-1):l("x5.getEnabledState",{},e)},setEnabledState:function(e,n){s.ios?n&&n(!1):d("x5.setEnabledState",{s:e},n)}},weibo:{login:function(e){u("w.login",{},function(n,t){var i=t?JSON.parse(t):null;if("function"==typeof e)e(n,i);else if(n&&"string"==typeof e){var o=e+(e.indexOf("?")>=0?"&":"?")+"uid="+encodeURIComponent(i.uid)+"&expiresTime="+encodeURIComponent(i.expiresTime)+"&phoneNum="+encodeURIComponent(i.phoneNum)+"&refreshToken="+encodeURIComponent(i.refreshToken)+"&token="+encodeURIComponent(i.token);location.href=o}})},installed:function(e){d("w.installed",{},e)},shareText:function(e,n){c(e,n)},shareImage:function(e,n){c(e,n,"i")},shareVideo:function(e,n){c(e,n,"v")},shareWebPage:function(e,n){c(e,n,"w")},shareImages:function(e,n){c(e,n,"j")},shareStory:function(e,n){c(e,n,"s")}},accelerometer:{support:function(e){d("sa.support",{},e)},start:function(e){u("sa.start",{},e?function(n,t){if(n&&t){var i=JSON.parse(t);e(i[0],i[1],i[2])}}:null)},stop:function(e){u("sa.stop")}},gyroscope:{support:function(e){d("sg.support",{},e)},start:function(e){u("sg.start",{},e?function(n,t){if(n&&t){var i=JSON.parse(t);e(i[0],i[1],i[2])}}:null)},stop:function(e){u("sg.stop")}},checkCamera:function(e){s.ios?e&&e({count:2,front:!0,back:!0}):g("checkCamera",{},e)},appDownloads:function(){s.ios||u("appDownloads")},openSetting:function(e){u("openSetting",{w:e})},getSettingState:function(e,n){d("getSettingState",{w:e},n)},requestPermissions:function(e,n){g("requestPermissions",{p:e},n)},action:function(e){u("action",e?{btns:e}:{},null)},uiNavigation:function(e){u("uiNavigation",{b:e})},uiShare:function(e){u("uiShare",{b:e})},uiActions:function(e){u("uiActions",{b:e})},uiRefresh:function(e){u("uiRefresh",{b:e})},saveImageToAlbum:function(e,n){d("saveImageToAlbum",{i:e},n)},saveImagesToAlbum:function(e,n){d("saveImagesToAlbum",{i:e},n)},saveVideoToAlbum:function(e,n){d("saveVideoToAlbum",{i:e},n)},backToHome:function(e){u("backToHome",{loadHomePage:!!e})},setClipboardText:function(e){u("setClipboardText",{text:e})},debug:function(){u("debug",{}),r=!0},qqLogin:function(e){e?u("qqLogin",{},function(n,t){if("function"==typeof e)e(n,t?JSON.parse(t):null);else if(n&&"string"==typeof e){var i=JSON.parse(t),o=e+(e.indexOf("?")>=0?"&":"?")+"openid="+encodeURIComponent(i.openid)+"&access_token="+encodeURIComponent(i.access_token);i.userinfo&&(o+="&userinfo="+JSON.stringify(i.userinfo)),location.href=o}}):alert("Missing Parameter")},wxLogin:function(e){e?u("wxLogin",{},function(n,t){if("function"==typeof e)e(n,t?JSON.parse(t):null);else if(n&&"string"==typeof e){var i=JSON.parse(t),o=e+(e.indexOf("?")>=0?"&":"?")+"code="+encodeURIComponent(i.code);i.openid&&(o+="&openid="+encodeURIComponent(i.openid)),i.access_token&&(o+="&access_token="+encodeURIComponent(i.access_token)),i.userinfo&&(o+="&userinfo="+JSON.stringify(i.userinfo)),location.href=o}}):alert("Missing Parameter")},unionPay:function(e,n){u("v.pay",e,n)},unionSeInfo:function(e){s.ios?"function"==typeof e&&e(!1,"not supported"):u("v.seInfo",{},e)},unionPayAppInstalled:function(e){d("v.unionPayAppInstalled",{},e)},abcPay:function(e,n){u("u.abcPay",e,n)},abcPayAppInstalled:function(e){d("u.abcPayAppInstalled",{},e)},icbcPay:function(e,n){u("0.icbcPay",e,n)},net:function(e,n){u("net",e,function(e,t){var i=JSON.parse(t);n&&"function"==typeof n&&n(1==i.a,i.b)})},netUploadFile:function(e){u("netUploadFile",e,function(n,t){var i=JSON.parse(t);0==i.a&&"function"==typeof e.onProgress&&e.onProgress(i.b,i.c),1==i.a&&"function"==typeof e.onSuccess&&e.onSuccess(i.b),2==i.a&&"function"==typeof e.onFail&&e.onFail(i.b)})},http:{get:function(e,n,t){var i={url:e,method:"GET"};n&&"object"==typeof n&&(i.params=n),s.net(i,function(e,i){if(e){var o="function"==typeof n?n:"function"==typeof t?t:null;o&&o(JSON.parse(i))}})},post:function(e,n,t){var i={url:e,method:"POST"};n&&"object"==typeof n&&(i.params=n),s.net(i,function(e,i){if(e){var o="function"==typeof n?n:"function"==typeof t?t:null;o&&o(JSON.parse(i))}})}},onMenuScan:function(e){m("onMenuScan",function(n){s.scan({needResult:!0},e)})},cacheSize:function(e){u("cacheSize",{},function(n,t){e&&e(n&&t?parseInt(t):0)})},toast:function(e){u("toast",{s:"string"==typeof e?e:JSON.stringify(e)})},exit:function(e){u("exit",{k:!!e})},upgrade:function(e){u("upgrade",e,function(n,t){if(e&&"function"==typeof e.progress&&t){var i=JSON.parse(t);e.progress(i.a,i.b)}})},home:function(){s.ios?s.exit():u("home")},openInBrowser:function(e){u("openInBrowser",{s:e})},miniProgram:function(e){f("miniProgram",e,function(n){"function"==typeof e.onResult&&e.onResult(n)})},setMiniProgramResult:function(e){u("setMiniProgramResult",{r:"string"!=typeof e?JSON.stringify(e):e})},open:function(e){u("open","string"==typeof e?{url:e}:e)},setOptions:function(e){u("setOptions",e)},close:function(e){s.version>35&&s.isRoot||u("close",e?{f:e}:{})},evalInNavbar:function(e){u("evalInNavbar",{j:e})},evalInNavbarAction:function(e,n){s.evalInNavbar("action("+JSON.stringify({action:e,data:n})+")")},evalInToolbar:function(e){u("evalInToolbar",{j:e})},launch:function(e,n){"string"==typeof e?d("launch",{a:e},n):l("launch",{b:e},n)},canLaunch:function(e,n){d("canLaunch",{u:e},n)},launchPackage:function(e,n){d("launchPackage",{s:e},n)},onMenuAction:function(e){m("onMenuAction",function(n){s.action(e)})},onClose:function(e){m("onClose",e)},onBackPressed:function(e){m("onBackPressed",e)},onMenuShareTimeline:function(e){h("onMenuShareTimeline",0,e)},onMenuShareFriend:function(e){h("onMenuShareFriend",1,e)},onMenuShareQQ:function(e){h("onMenuShareQQ",2,e)},onMenuShareQZone:function(e){h("onMenuShareQZone",3,e)}};function c(e,n,t){e=e||{};var i={};t&&(i[t]=e),e.text&&(i.text=e.text),f("w.share",i,n)}function u(n,t,i){v()?e.WebViewJavascriptBridge.callHandler(n,t||{},function(e){if(r&&alert("js back\n\n"+e),i&&"function"==typeof i){var n=JSON.parse(e);return i(!!n.success,n.text)}}):y(function(){u(n,t,i)})}function f(e,n,t){return u(e,n,t?function(e,n){if(t)return t(n)}:null)}function l(e,n,t){return u(e,n,t?function(e,n){if(t)return t(parseInt(n))}:null)}function d(e,n,t){return u(e,n,t?function(e,n){if(t)return t("true"==n)}:null)}function p(e,n,t){return u(e,n,"function"==typeof t?function(e,n){var i=null;if(n)try{i=JSON.parse(n)}catch(e){}return t(e,i)}:null)}function g(e,n,t){return u(e,n,t?function(e,n){if(t)return t(n?JSON.parse(n):null)}:null)}function m(n,t){v()?e.WebViewJavascriptBridge.registerHandler(n,function(e,n){var i={ok:!0};if(t){var o=t(e);null!=o&&(i.data=o)}n(i)}):y(function(){m(n,t)})}function v(){return s.inApp||console.log("jsBridge can only used in App"),!!s.isReady()||(console.log("jsBridge is not ready\nUsage:\njsBridge.ready(function(){\n //do something\n});"),!1)}function h(e,n,t){m(e,function(e){"function"==typeof t?t():(t=t||{},s.share({to:n,title:t.title||document.title,link:t.link||location.href,imgUrl:t.imgUrl||"",desc:t.desc||""},function(e){e&&t.success&&t.success(),e||t.cancel&&t.cancel()}))})}function y(n){if(!(e&&e.navigator&&/MicroMessenger.*miniProgram|Alipay.*MiniProgram|toutiaomicroapp|QQ.*miniProgram|swan\/|JD.*miniProgram/i.test(e.navigator.userAgent)))return n&&n(e.WebViewJavascriptBridge);console.error("not support miniPrograme")}for(var b=[{f:"wxOpenCustomerServiceChat|wxLaunchMiniProgram|wxSubscribeMsg|showImages|showSplash|appSettings|sidebarOpen|sidebarClose|sidebarHeader|captureWebPage|sysShare|share|shareText|shareMusic|shareImage|shareVideo|shareWxMiniProgram|shareImages|shareQqMiniProgram|wxOpenLaunchAppExtinfo|clearCache|clearCookie|vibrate|onAppEnterBackground|onAppEnterForeground|progress|print|presentBrowser|restart|actionButton|getTheme|setTheme|setStatusBar|getStatusBar|setTitleBar|getTitleBar|setScreenOrientation|getScreenOrientation|setNavigationBar|getNavigationBar|setOption|getOption"},{f:"pay|wxPay|aliPay",j:1},{f:"appInfo|deviceInfo|contactOne|contactAll|bottomSheet|richDialog|richAlert",j:3},{f:"wxAppInstalled|sidebarIsOpen|saveScreenshotToAlbum|canGoBack|canGoForward",j:4},{i:1,f:"getOAIDv2",o:{getIMEI:function(e){s.ios?e&&e("unknown"):f("1.imei",{},e)},getOAID:function(e){s.ios?e&&e("unknown"):f("1.oaid",{},e)},getIDFA:function(e){s.ios?f("1.idfa",{},e):e&&e("unknown")}}},{f:"scanFromUrl|scanFromAlbum|scan|getClipboardText|getDeviceId|getInstallId",j:2},{i:"d",n:"d",f:"deviceOwnerAuth|deviceOwnerAuthAvailable|",j:4},{i:"g",n:"getui",f:"initSdk"},{i:"g",n:"getui",f:"turnOffPush|turnOnPush",j:1},{i:"g",n:"getui",f:"getClientid",j:2},{i:"g",n:"getui",f:"setListener",j:3},{i:"g",n:"getui",f:"setBadge|isPushTurnedOn|unBindAlias|setSilentTime",o:{setTag:function(e,n){d("g.setTag",{tags:e},n)},bindAlias:function(e,n){d("g.bindAlias",{alias:e},n)}},j:4},{i:2,f:"agreed|agreement|userAgreement|userPrivacy",o:{onAgree:function(e){s.ios?e&&e(!0):u("2.onAgree",{},e)}},j:1},{i:4,n:"db",f:"tables",o:{execSQL:function(e,n,t){p("4.execSQL",{s:e,a:n},t)},query:function(e,n,t){p("4.query",{s:e,a:n},t)}}},{i:9,n:"audioRecorder",f:"startRecord|stopRecord|play|pause|resume|stop|duration|remove|upload",e:1},{i:9,n:"audioRecorder",f:"read",j:2},{i:8,n:"umanalytics",f:"onEvent|getChannel"},{i:8,n:"umanalytics",f:"getDeviceInfo",j:3},{i:"a",n:"bdloc",f:"getCurrentPosition",j:3},{i:"a",n:"bdloc",f:"stop",j:1},{i:"y",n:"bdface",f:"detect|liveness",j:3},{i:"y",n:"bdface",f:"config",j:1},{i:11,n:"ttStat",f:"init|eventRegister|eventPurchase|eventAccessAccount|eventAccessPaymentChannel|eventAddCart|eventAddToFavorite|eventCheckOut|eventCreateGameRole|eventLogin|eventUpdateLevel|eventQuest|eventViewContent|eventV3|setUserUniqueID"},{i:12,n:"ttAd",f:"init|bannerExpressAd|interactionExpressAd|rewardVideoAd|fullScreenVideoAd|interactionAd2|launchTestTools",e:1},{i:13,n:"xlx",f:"init|refreshMediaUserId|refreshAppSecret|open"},{i:14,n:"hyAd",f:"init|openMotivateVideoAd",e:1},{i:15,n:"fm",f:"rewardVideoAd",e:1},{i:16,n:"hx",f:"init|rewardVideoAD|fullscreenVideoAD|interstitialAD|nativeAD|isAdOpen|gameList",e:1},{i:17,n:"yuemeng",f:"openReader|setOutUserId"},{i:18,n:"txRtc",f:"login|logout|getLoginStatus|setUserInfo|requestPermission|setListener|removeListener|getSDKVersion|enableFloatWindow|enableMuteMode|setCallingBell|call|groupCall|setCallListener|removeCallListener|createChatRoom|enterChatRoom|destroyChatRoom|setChatRoomListener|removeChatRoomListener|createVideoLiveRoom|enterVideoLiveRoom|setVideoLiveRoomListener|removeVideoLiveRoomListener|enterRoom|startLocalAudio|stopLocalAudio|exitRoom"},{i:19,n:"leto",f:"syncUserInfo|jumpMiniGame|startGameCenter",e:1},{i:20,n:"yhad",f:"rewardAdvert",e:1},{i:21,f:"alipayLogin"},{i:22,n:"dyad",f:"jumpAdList|jumpAdDetail|jumpMine"},{i:23,n:"mid",f:"init|commonTask|weChatTask|cplTask|newsTask|novelTask|uiPreference|rewardVideo",e:1},{i:24,n:"xw",f:"jumpToList|jumpToDetail"},{i:25,n:"yilan",f:"init|shortVideo|littleTiktokVideo|littleKuaishouVideo|play|login|logout|getToken",e:1},{i:26,n:"nfc",f:"isSupported|isEnabled|openSettings|enableForegroundDispatch|disableForegroundDispatch|writeNdefUri|writeNdefText|writeNdefMime|cancelWriteNdef|makeReadOnlyNdef|cancelMakeReadOnlyNdef|writeMifareUltralightPage|cancelWriteMifareUltralightPage|transceiveMifareUltralight|cancelTransceiveMifareUltralight",e:1},{i:27,n:"pcg",f:"load|loadDetail"},{i:28,n:"bh",f:"rewardVideo|fullVideo|interactionAd|nativeAd",e:1},{i:29,n:"xprinter",f:"init|connectBtPort|connectNetPort|connectUsbPort|disconnectCurrentPort|disconnetNetPort|checkLinkedState|getBtAvailableDevice|onDiscovery|writeDataByUSB|writeSendData|write|writeTSC|writePos58|writePos76|writePos80",e:1},{i:30,n:"sms",f:"list",e:1},{i:31,f:"appList",j:3},{i:32,n:"bm",f:"config|rewardVideoAd|interstitialAd|bannerAd|feedVideo|hVideo|interactive|cpa|setUserId",e:1},{i:33,f:"callLog"},{i:34,n:"dlna",f:"search|videoResource|audioResource|imageResource|play|pause|stop|seek|devices|mediaInfo|positionInfo"},{i:35,n:"qmf",f:"wxPay|aliPay|unionPay|pay|seInfo|unionPayAppInstalled"},{i:36,n:"wch",f:"info"},{i:37,n:"push",f:"getPushId|getDeviceToken|bindTag|bindAlias|isOnline",e:1},{i:38,n:"cncb",f:"pay"},{i:39,n:"gdtAction",f:"logAction|setUserUniqueId|onRegister|onLogin|onBindAccount|onQuestFinish|onCreateRole|onUpdateLevel|onShare|onRateApp|onViewContent|onAddToCart|onCheckout|onPurchase|onAddPaymentChannel"},{i:40,n:"netum",f:"setMode|getBlueToothList|connectSppBlueTooth|sendCommand",e:1},{i:41,n:"fusion",f:"setUserId|bannerAd|interactionAd|rewardVideoAd",e:1},{i:42,n:"game321",f:"platformLogin|openSuit",e:1},{i:43,n:"gdt",f:"setChannel|interaction|interactionFullScreen|rewardVideo",e:1},{i:44,n:"topflow",f:"banner|rewardVideo",e:1},{i:45,n:"tel",f:"call"},{i:46,n:"qs",f:"scan",e:1},{i:47,n:"amapLoc",f:"getCurrentPosition|stop"},{i:48,n:"amapNavi",f:"showRoute",e:1},{i:49,n:"amapTrack",f:"startTrack|stopTrack",e:1},{i:50,n:"pns",f:"setAuthSDKInfo|checkAuthEnvEnable|getLoginToken"},{i:51,n:"sia",f:"checkSupport|request"},{i:52,n:"zj",f:"rewardVideo|interstitial|fullScreenVideo|banner|contentVideo|h5|task|setUserId|getMedia|setMedia",e:1},{i:53,n:"serialPort",f:"getDevices|open|send|close",e:1},{i:54,n:"prt",f:"getUsbPrinters|open|close|sendBytesData|printText|printImage|printTable|initPrinter|setFont|setPrinter|setLeftMargin|cutPaper|ringBuzzer|blackLableFind|resetFeedDistance"},{i:55,n:"bmNews",f:"config|show|setUserId|startCountDown|setRewardResult",e:1},{i:56,n:"uhf",f:"open|close|isOpen|getFirmwareVersion|getTemperature|getPower|setPower|getRegion|setRegion|inventoryOnce|inventoryStart|inventoryStop|getTagIDCount|getTagIDs|readTagData|writeTagData|blockWriteTagData|blockEraseTagData|lockTag|killTag|setParameters|setParamBytes|readTagLED|readTagTemperature|registerReadTags|unregisterReadTags"},{i:57,n:"hkc",f:"addDevice|getDevices|addPreview|removePreview|startPreview|stopPreview|snapshot"},{i:58,n:"ob",f:"preview|removePreview|snapshot"},{i:59,n:"bmVideo",f:"config|show|setUserId",e:1},{i:60,n:"bmGame",f:"config|show|setUserId",e:1},{i:61,n:"bmNovel",f:"config|show|setUserId",e:1},{i:62,n:"xyAd",f:"config|rewardVideoAd|interstitialAd|bannerAd|feedVideo|hVideo|interactive|cpa|setUserId",e:1},{i:63,n:"xyNews",f:"config|show|startCountDown|setRewardResult|setUserId",e:1},{i:64,n:"xyVideo",f:"config|show|setUserId",e:1},{i:65,n:"xyGame",f:"config|show|setUserId",e:1},{i:66,n:"xyNovel",f:"config|show|setUserId",e:1},{i:67,n:"qqLoc",f:"getCurrentPosition|stop"},{i:68,n:"flyer",f:"logEvent|setAdditionalData|setMinTimeBetweenSessions|logSession|setResolveDeepLinkURLs|sendPushNotificationData|getAppsFlyerUID|setCustomerUserId|setCollect|setCollectData|stop|start|anonymizeUser",e:1},{i:69,n:"topVpn",f:"setConfigInfo|loginVOne|requestVPNResInfo|startService|closeService|logoutVOne|requestCaptcha|getStatus|modifyPassword",e:1},{i:70,n:"fbEvent",f:"logEvent|setAutoLogAppEventsEnabled|setAdvertiserIDCollectionEnabled"},{i:71,n:"fbLogin",f:"login|logout"},{i:72,n:"fbShare",f:"shareLink|sharePhoto|shareVideo|shareMedia"},{i:73,n:"tb",f:"requestPermissionIfNecessary|interaction|banner|rewardVideo|shortVideo",e:1},{i:74,n:"aliRpVerify",f:"start"},{i:75,n:"aliSmartVerify",f:"getMetaInfo|start"},{i:76,n:"aliZimVerify",f:"getMetaInfo|getSession|verify"},{i:77,n:"kc",f:"banner|insert|fullVideo|rewardVideo|videoContent|news|novel|dial|constellatory|almanac|oneiromancy|weather|study|xm",e:1},{i:78,n:"adjust",f:"registerAdjustBridge|trackEvent|setSessionParameter|trackThirdPartySharing|trackAdRevenue|trackPlayStoreSubscription|getGoogleAdId|getAmazonAdId|getAdjustAdId",e:1},{i:79,n:"vpn",f:"start|stop|status"},{i:80,n:"floater",f:"open|close|status|hasPermission|requestPermission|setWindowBackground"},{i:81,n:"yh",f:"startScan|stopScan|connect|disconnect|write",e:1},{i:82,n:"tz",f:"requestPermissionIfNecessary|reward|fullscreen|dialog|banner|contentVideo",e:1},{i:83,n:"txIm",f:"login|logout|getLoginStatus|getSDKVersion|getUnreadMessageCount|setListener|removeListener|setMessageListener|removeMessageListener|chat|conversation|contact"},{i:84,n:"easeIm",f:"init|login|status|logout|userInfo|unreadMessageCount|chat"},{i:85,n:"ttGm",f:"reward|interstitialFull|banner|requestPermissionIfNecessary|testTool|preload|launchTestTools",e:1},{i:86,n:"ttDp",f:"init|video|grid|userProfile|requestPermissionIfNecessary",e:1},{i:87,n:"contact",f:"pick|all|add|delete"},{i:88,n:"fn",f:"interaction|fullscreenVideo|banner|reward",e:1},{i:89,n:"yk",f:"requestPermission|requestEnable|scan|stopScan|connect|disconnect|getPrinterInfo|setAutoOffTime|setPaperSize|printImage|printBlankLine|cut"},{i:90,n:"qy",f:"start"},{i:91,n:"bdNavi",f:"showRoute",e:1},{i:92,n:"bp",f:"print",e:1},{i:93,n:"txDoc",f:"isSupportExt|open"},{i:94,n:"wwx",f:"register|isInstalled|login|shareText|shareLink|shareFile|shareVideo|shareImage|shareMiniProgram|shareLocation"},{i:95,n:"wj",f:"requestPermissionIfNecessary|reward|fullscreen|dialog|banner",e:1},{i:96,n:"yxIm",f:"init|login|logout|info|setCallkitUserNickname|setCallkitUserAvatar|setUserInfo|setGlobalOptions|getGlobalOptions|navigate",e:1},{i:97,n:"gid",f:"signIn|signIn2|signOut|googlePlayServicesAvailable"},{i:98,n:"yxRtc",f:"init|login|logout|info|setCallkitUserNickname|setCallkitUserAvatar|singleCall",e:1},{i:99,n:"dy",f:"initSdk|isAppInstalled|authorize|share|shareToContacts|openRecordPage"},{i:100,n:"wallpaper",f:"info|clear|setWallpaper"},{i:101,n:"ewg",f:"connect|disconnect|status|startCheck|stopCheck",e:1},{i:102,n:"msa",f:"request|requestByMsa|requestByManufacturer"},{i:103,n:"battery",f:"status",e:1},{i:104,n:"imei",f:"request"},{i:105,n:"emulator",f:"check"},{i:106,n:"tobid",f:"requestPermissionIfNecessary|reward|interstitial|banner|ksTube",e:1},{i:107,n:"hj",f:"requestPermissionIfNecessary|reward|interstitial|banner",e:1},{i:108,n:"audio",f:"getVolume|setVolume"},{i:109,n:"screen",f:"getBrightness|setBrightness"},{i:110,n:"usb",f:"devices|serialPorts|openSerialPort|closeSerialPort|writeSerialPort|readSerialPort|breakSerialPort",e:1},{i:111,n:"topOn",f:"reward|interstitial|banner",e:1},{i:112,n:"qx",f:"tube|tubeOption|resetVideo|putVideo|updateVideo|playVideo|switchNav",j:3},{i:113,n:"freight",f:"location|register|pickup|unload|sign|pod|uploadPickupImage|uploadUnloadImage|uploadPODImage|getPickupImageNames|getUnloadImageNames|getPODImageNames|deletePickupImage|deleteUnloadImage|deletePODImage|downloadPickupImage|downloadUnloadImage|downloadPODImage|getInvoices|confirmInvoice|getShipmentStatus"},{i:114,n:"freightLocate",f:"auth|start|send|pause|restart|stop"},{i:115,n:"tscPrinter",f:"connect|write|read|disconnect"},{i:116,n:"broadcast",f:"registerReceiver|unregisterReceiver|sendBroadcast"},{i:117,n:"lefu",f:"requestPermission|requestEnable|startSearch|stopSearch|isSearching|appleStartConnect|appleDisConnect|appleIsConnected|appleSyncTime|appleReadDeviceInfo|appleSyncUnit|appleGetHistoryData|appleDeleteHistoryData|appleSendResetDevice|appleResetSendListener",e:1},{i:118,n:"gtm",f:"logEvent|setUserProperty|setUserId|getFirebaseInfo"},{i:119,n:"ttAnalysis",f:"logEvent|logEventRegister|logEventPurchase"},{i:"t",n:"bdocr",f:"general|generalBasic|accurate|accurateBasic|generalEnhanced|webImage|idCardFront|idCardFrontAuto|idCardBack|idCardBackAuto|bankCard|vehicleLicense|drivingLicense|licensePlate|businessLicense|receipt|passport|vatInvoice|qrcode|numbers|lottery|businessCard|handWriting|custom",j:3},{i:"zq",n:"zqprinter",f:"SDK_Version|Prn_GetPortList|Prn_Connect|Prn_Disconnect|Prn_PrinterInit|Prn_Status|Prn_PowerStatus|Prn_PrintText|Prn_PrintEscText|Prn_PrintString|Prn_PrintBarcode|Prn_PrintQRCode|Prn_PrintBitmap|Prn_PrintBmp|Prn_CutPaper|Prn_OpenCashbox|Prn_LineFeed|Prn_MarkFeed|Prn_SetCharacterSet|Prn_SetInterCharacterSet|Prn_SetLineSpacing|Prn_SetFontStyle|Prn_SetFontSize|Prn_SetAlignment|Prn_SendData|Prn_ReadData|Prn_BeginTransaction|Prn_EndTransaction|Prn_GetMsrTrack",j:2}],P=function(e,n,t){Object.defineProperty(e,n,{configurable:!1,writable:!1,value:t})},S=function(e,n){for(var t=n.f.split("|"),i=0,o=t.length;i<o;i++){var a=t[i];a&&P(e,a,function(e,n){var t=(e.i?e.i+".":"")+n;return function(n,i){var o="function"==typeof n;return(1==e.j?u:2==e.j?f:3==e.j?g:4==e.j?d:p)(t,o?{}:n,o?n:i)}}(n,a))}if("object"==typeof n.o)for(var r in n.o)P(e,r,n.o[r])},w=0,I=b.length;w<I;w++){var A=b[w];A.n?s[A.n]?S(s[A.n],A):P(s,A.n,function(){var e,n={};return S(n,A),A.e&&(P(n,"setListener",(e=A.i,function(n){return u(e+".setListener",{},function(e,t){if(n&&t){var i=JSON.parse(t);return n(i.event,i.data)}})})),P(n,"removeListener",function(e){return function(){return u(e+".removeListener")}}(A.i))),n}()):S(s,A)}Object.defineProperty(s,"inApp",{configurable:!1,writable:!1,value:i}),Object.defineProperty(s,"version",{configurable:!1,writable:!1,value:n.test(t)?parseInt(n.exec(t)[1]):0});var T=/LT-APP\/(\d+)\/(\d+)/;Object.defineProperty(s,"appVersion",{configurable:!1,writable:!1,value:T.test(t)?parseInt(T.exec(t)[2]):0}),Object.defineProperty(s,"ios",{configurable:!1,writable:!1,value:a});var C=/YM-RT/.test(t);return Object.defineProperty(s,"isRoot",{configurable:!1,get:function(){return C}}),s.inApp&&s.ready(function(){s.version>35&&s.version<41&&d("_isRoot",{},function(e){C=e})}),s});