zalo-js-bridge
Advanced tools
Comparing version 1.7.13 to 1.7.17
@@ -18,4 +18,37 @@ import ZaloBridge from './utils/native-bridge' | ||
} | ||
/** | ||
* Open Reward Ads | ||
* @example | ||
* ZJSBridge.Ads.openRewardAds({}, e => {console.log(e)}) | ||
* @param {object} data | ||
* @param {void} callback Hàm callback trả về kết quả sau khi gọi action | ||
*/ | ||
static openRewardAds(data, callback) { | ||
return ZaloBridge.jsCall(Action.openRewardAds, data, callback, true); | ||
} | ||
/** | ||
* Open Adtima Ads | ||
* @example | ||
* ZJSBridge.Ads.openAdtimaAds({}, e => {console.log(e)}) | ||
* @param {object} data | ||
* @param {void} callback Hàm callback trả về kết quả sau khi gọi action | ||
*/ | ||
static openAdtimaAds(data, callback) { | ||
return ZaloBridge.jsCall(Action.openAdtimaAds, data, callback, true); | ||
} | ||
/** | ||
* Get Ads id | ||
* @example | ||
* ZJSBridge.Ads.getAdsID({}, e => {console.log(e)}) | ||
* @param {object} data | ||
* @param {void} callback Hàm callback trả về kết quả sau khi gọi action | ||
*/ | ||
static getAdsID(data, callback) { | ||
return ZaloBridge.jsCall(Action.getAdsID, data, callback, true); | ||
} | ||
} | ||
export default Ads |
@@ -38,2 +38,3 @@ const Action = { | ||
opensharesheet: 'action.open.sharesheet', // have callack | ||
requestcamera: 'action.request.permission.camera', | ||
@@ -88,4 +89,7 @@ //Webview | ||
login: 'action.jump.login', | ||
openInterstitialAds: 'action.open.adtima.ads.interstitial' | ||
openInterstitialAds: 'action.open.adtima.ads.interstitial', | ||
openRewardAds: 'action.open.adtima.ads', | ||
openAdtimaAds: 'action.open.adtima.ads', | ||
getAdsID: 'action.get.adidclient' | ||
}; | ||
export default Action; |
@@ -213,3 +213,3 @@ import Action from '../config/action' | ||
if (this.jsCallFuncCallbacks[data.action]) { | ||
console.log("jscallback: ", data); | ||
// console.log("jscallback: ", data); | ||
var callback = this.jsCallFuncCallbacks[data.action]; | ||
@@ -216,0 +216,0 @@ callback.call(this, data); |
@@ -578,4 +578,25 @@ import ZaloBridge from './utils/native-bridge' | ||
} | ||
/** | ||
* Dùng cho H5 chủ động request camera permission. | ||
* @example | ||
* ZJSBridge.Zalo.requestCamera(e => {console.log(e)}) | ||
* @param {void} callback Hàm callback trả về kết quả sau khi gọi action | ||
* ``` | ||
* { | ||
* "error_code": 0, | ||
* "error_message": "User accepted", | ||
* } | ||
*``` | ||
* Error code define: | ||
* - 0: User accepted | ||
* - 1: App had permission before | ||
* - -1: Unknown error | ||
* - -2: User denied | ||
*/ | ||
static requestCamera(callback) { | ||
return ZaloBridge.jsCall(Action.requestcamera, {}, callback); | ||
} | ||
} | ||
export default Zalo |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ZJSBridge",[],t):"object"==typeof exports?exports.ZJSBridge=t():e.ZJSBridge=t()}(window,(function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=2)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={getdownloadedsticker:"action.get.downloaded.sticker",opensharesticker:"action.open.share.sticker",openprofile:"action.open.profile",openfeeddetail:"action.open.feeddetail",openfriendrada:"action.open.friendrada",openinapp:"action.open.inapp",openoutapp:"action.open.outapp",openpage:"action.open.page",openphotodetail:"action.open.photodetail",opengalary:"action.open.galary",opengamecenter:"action.open.gamecenter",opengamenews:"action.open.gamenews",opentabcontact:"action.open.tab.contact",opentabsocial:"action.open.tab.social",openfriendsuggest:"action.open.friendsuggest",opengrouplist:"action.open.grouplist",opennearby:"action.open.nearby",openroom:"action.open.room",openstickerstore:"action.open.stickerstore",opencreatechat:"action.open.createchat",copylinkcatesticker:"action.copy.link.catesticker",requestbuysticker:"action.request.buy.sticker",openchat:"action.open.chat",opentabchat:"action.open.tab.chat",openChatGroup:"action.open.chatgroup",openaddfriend:"action.open.addfriend",opentabmore:"action.open.tab.more",openpostfeed:"action.open.postfeed",openlogindevices:"action.open.logindevices",opensendsticker:"action.open.sendsticker",reportabuse:"action.report.abuse",followoa:"action.follow.oa",unfollowoa:"action.unfollow.oa",opengamedetail:"action.open.gamedetail",opensharesheet:"action.open.sharesheet",changetitleheader:"action.change.title.header",clearcachewebview:"action.webview.clearcache",confirmcache:"action.webview.confirmcache",isvisible:"action.webview.isvisible",networktype:"action.webview.networktype",changebuttonheader:"action.change.button.header",createoptionmenu:"action.create.options.menu",createshortcut:"action.create.shortcut",changeleftbuttonbar:"action.change.actionbar.leftbutton.type",closewindow:"action.window.close",checkResError:"action.webview.checkResError",requestPayment:"action.iap.requestpayment",getzbrowserstats:"action.zbrowser.getstats",jsbridge:"action.zbrowser.jsbridge",bioauthen:"action.prompt.authentication",changeColorHeader:"action.change.actionbar.color",checkStateAuthen:"action.prompt.authentication.check_state",openappstore:"action.open.appstore",getlocation:"action.get.location",querylocationhide:"action.query.location.hide",showtoast:"action.show.toast",openapp:"action.open.app",hidekeyboard:"action.hide.keyboard",openphone:"action.open.phone",openqr:"action.open.qr",opensms:"action.open.sms",viewqr:"action.view.myqr",keepscreen:"action.keep.screen",autorotate:"action.change.autorotate",checkappinstalled:"action.check.app.installed",queryshow:"action.query.show",queryhide:"action.query.hide",openinapprw:"action.open.inapprw",gettrackingstatus:"action.zalorun.getTrackingStatus",settrackingstatus:"action.zalorun.setTrackingStatus",getdaystep:"action.zalorun.getDayStep",forcesubmitdata:"action.zalorun.forceSubmitData",setweight:"action.zalorun.setWeight",getAdIdClient:"action.get.adidclient",openProfileExt:"action.open.profile.ext",downloadcate:"action.download.cate",login:"action.jump.login",openInterstitialAds:"action.open.adtima.ads.interstitial"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),u=n(0),i=(a=u)&&a.__esModule?a:{default:a};var r=[i.default.getdownloadedsticker,i.default.openpostfeed,i.default.reportabuse,i.default.followoa,i.default.unfollowoa,i.default.opensharesheet,i.default.createoptionmenu,i.default.changeleftbuttonbar,i.default.closewindow,i.default.jsbridge,i.default.getlocation,i.default.querylocationhide,i.default.showtoast,i.default.viewqr,i.default.keepscreen,i.default.gettrackingstatus,i.default.settrackingstatus,i.default.getdaystep,i.default.forcesubmitdata,i.default.setweight,i.default.downloadcate],c=new(function(){function e(t){var n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appId=t||this.getToken("zapp"),this.accessTk=this.getToken("zacc_session")||"DEFAULT_ACCESS_TOKEN",this.jsAccessTk=this.getToken("zlink3rd"),this.jsCallFuncCallbacks={},this.listenerEvent={},this.userAgent=navigator.userAgent||navigator.vendor||window.opera,this.device=(n=this.userAgent,a=n.toLowerCase(),{isWP:/iemobile/.test(a),isAndroid:/android/i.test(a)&&!/iemobile/.test(a),isIOS:/iphone|ipad|ipod/.test(a)&&!/iemobile/.test(a),isMobile:/android|iphone|ipad|ipod|iemobile/.test(a)})}return l(e,[{key:"setAccessToken",value:function(e){this.accessTk=e}},{key:"loginCallback",value:function(e){console.log(e)}},{key:"login",value:function(){alert("call login: "+this.appId+" ZJSBridge.onLoginCallback"),ZaloJavaScriptInterface.login(this.appId,"ZJSBridge.onLoginCallback")}},{key:"getAppId",value:function(){return this.appId}},{key:"isObject",value:function(e){return"object"===(void 0===e?"undefined":o(e))}},{key:"isEmpty",value:function(e){return!e||0===e.trim().length}},{key:"isString",value:function(e){return"string"==typeof e||null!=e&&("object"===(void 0===e?"undefined":o(e))&&(!!e.constructor&&null!==e.constructor.toString().match(/string/i)))}},{key:"parseJSON",value:function(e){return this.isObject(JSON)&&JSON.parse&&this.isString(e)?JSON.parse(e):"object"===(void 0===e?"undefined":o(e))?e:new Function("return "+e)()}},{key:"readCookie",value:function(e){var t=document.cookie;if(t&&(t=t.split("; "))&&t.length>0)for(var n=e.length+1,a=t.length-1;a>=0;a--){var o=t[a];if(o&&0===o.indexOf(e)&&(o=o.substring(n,o.length)))return o=o.replace(/["']/g,"")}return null}},{key:"getCurrHost",value:function(){var e=window.location.host;return e?0===e.indexOf("www.")?e.replace("www.","")+"_":e+"_":""}},{key:"getCurrHostRootZaloMe",value:function(){var e=window.location.host;if(e){if(e.indexOf("zalo.me")>=0)return"zalo.me_";if(e.indexOf("baomoi.com")>=0)return"baomoi.com_";if(e.indexOf("mp3.zing.vn")>=0)return"mp3.zing.vn_";if(e.indexOf("zaloapp.com")>=0)return"zaloapp.com_"}return""}},{key:"isZaloBrowser",value:function(){return window.navigator.userAgent.includes("Zalo")}},{key:"readCookieByDomain",value:function(e){return this.readCookie(this.getCurrHost()+e)}},{key:"readCookieByRootDomain",value:function(e){return this.readCookie(this.getCurrHostRootZaloMe()+e)}},{key:"readCookieFallback",value:function(e){var t=this.readCookieByDomain(e);return t||(t=this.readCookieByRootDomain(e))?t:this.readCookie(e)}},{key:"serialize",value:function(e){if(this.isObject(JSON)&&JSON.stringify)return JSON.stringify(e);if(void 0===e)return"undefined";if(null===e)return"null";try{if("string"==typeof e||null!==e.constructor.toString().match(/string/i))return'"'+e.replace(/"/g,'\\"')+'"'}catch(e){console.log(e)}var t;if(null!==Object.prototype.toString.call(e).match(/array/i)){t=new Array;for(var n=e.length,a=0;a<n;a++)t.push(this.serialize(e[a]));return"["+t.join(",")+"]"}if("object"===(void 0===e?"undefined":o(e))){for(var l in t=new Array,e)t.push('"'+l+'":'+this.serialize(e[l]));return"{"+t.join(",")+"}"}return e.toString()}},{key:"getToken",value:function(e){return this.readCookieFallback(e)}},{key:"defaulCallBackJSCall",value:function(e){null!=e&&(e=this.parseJSON(e))}},{key:"onJSCall",value:function(e){try{if(e=this.parseJSON(e),this.jsCallFuncCallbacks[e.action])console.log("jscallback: ",e),this.jsCallFuncCallbacks[e.action].call(this,e),this.jsCallFuncCallbacks[e.action]=null,delete this.jsCallFuncCallbacks[e.action]}catch(e){console.log(e)}}},{key:"onMultiJSCall",value:function(e){try{if(e=this.parseJSON(e),this.jsCallFuncCallbacks[e.action])this.jsCallFuncCallbacks[e.action].call(this,e)}catch(e){console.log(e)}}},{key:"isFunction",value:function(e){return"function"==typeof e}},{key:"getFeatureId",value:function(){return this.readCookieFallback("fid")}},{key:"jsCallback",value:function(e,t,n){ZaloJavaScriptInterface.jsH5EventCallback(e,t,n)}},{key:"registerListenerEvent",value:function(e,t){console.log("register "+e+" : "+t),this.listenerEvent[e]=t}},{key:"zalo_h5_event_handler",value:function(e,t,n){if(console.log("eventId: "+e+", eventName: "+t+", eventData: "+n),this.listenerEvent[t]){var a=this.listenerEvent[t];this.jsCallback(e,t,a)}}},{key:"jsCall",value:function(e,t,n){var a=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:3;try{if(!this.device.isMobile||this.isEmpty(e))return this.onJSCall({error_code:-13,error_message:"params invalid!",data:{device:this.device.isMobile,jsToken:this.jsAccessTk,access_token:this.accessTk},action:e}),!1;null==t&&(t={}),this.isFunction(t)&&void 0===n&&(n=t,t={}),n||(n=this.defaultCallback);var u={error_code:-14,error_message:"Request Timeout!",data:{},action:e};this.jsCallFuncCallbacks[e]=n,r.includes(e)&&setTimeout((function(){a.onJSCall(u)}),8e3);try{return t=this.serialize(t),o?this.device.isIOS?ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,ZJSBridge.onMultiJSCall):ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,"ZJSBridge.onMultiJSCall"):this.device.isIOS?ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,ZJSBridge.onJSCall):ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,"ZJSBridge.onJSCall")}catch(i){if(!(l-- >0))return u={error_code:-5,error_message:"Not ready!",data:{userAgent:this.userAgent,options:t,jsToken:this.jsAccessTk,access_token:this.accessTk},action:e,js_error:i},this.onJSCall(u),!1;setTimeout((function(){a.jsCall(e,t,n,o,l)}),500)}}catch(e){console.log(e)}return!1}}]),e}())(window.zAppID);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callCustomAction=t.login=t.onLoginCallback=t.onMultiJSCall=t.onJSCall=t.Ads=t.Misc=t.H5=t.Device=t.Zalo=void 0;var a=s(n(0)),o=s(n(3)),l=s(n(4)),u=s(n(5)),i=s(n(6)),r=s(n(7)),c=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){c.default.zalo_h5_event_handler(e,t,n)}},t.Zalo=o.default,t.Device=l.default,t.H5=u.default,t.Misc=i.default,t.Ads=r.default,t.onJSCall=function(e){c.default.onJSCall(e)},t.onMultiJSCall=function(e){c.default.onMultiJSCall(e)},t.onLoginCallback=function(e){console.log(1234),c.default.loginCallback(e)},t.login=function(e){c.default.jsCall(a.default.login,{},e,!0)},t.callCustomAction=function(e,t,n){c.default.jsCall(e,t,n,!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"getAccessToken",value:function(){return o.default.accessTk?o.default.accessTk:"no token"}},{key:"setAccessToken",value:function(e){return e?o.default.setAccessToken(e):"no token"}},{key:"openTabContact",value:function(e){return console.log("openTabContact"),o.default.jsCall(l.default.opentabcontact,{},e)}},{key:"getDownloadedSticker",value:function(e){return console.log("getDownloadedSticker"),o.default.jsCall(l.default.getdownloadedsticker,{},e)}},{key:"openShareSticker",value:function(e,t){return o.default.jsCall(l.default.opensharesticker,{cateDetailsInfo:e},t)}},{key:"openInApp",value:function(e,t){return o.default.jsCall(l.default.openinapp,{url:e},t)}},{key:"openOutApp",value:function(e,t){return o.default.jsCall(l.default.openoutapp,{url:e},t)}},{key:"openPostFeed",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openpostfeed,e,t)}},{key:"openShareSheet",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.opensharesheet,e,t)}},{key:"registerListenerEvent",value:function(e,t){o.default.registerListenerEvent(e,t)}},{key:"openProfile",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openprofile,e,t)}},{key:"openFeedDetail",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openfeeddetail,e,t)}},{key:"openFriendRada",value:function(e){return o.default.jsCall(l.default.openfriendrada,{},e)}},{key:"openPage",value:function(e){return o.default.jsCall(l.default.openpage,{},e)}},{key:"openPhotoDetail",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openphotodetail,e,t)}},{key:"openGalary",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.opengalary,e,t)}},{key:"openGameCenter",value:function(e){return o.default.jsCall(l.default.opengamecenter,{},e)}},{key:"openGameNews",value:function(e){return o.default.jsCall(l.default.opengamenews,{},e)}},{key:"openTabSocial",value:function(e){return o.default.jsCall(l.default.opentabsocial,{},e)}},{key:"openFriendSuggest",value:function(e){return o.default.jsCall(l.default.openfriendsuggest,{},e)}},{key:"openGroupList",value:function(e){return o.default.jsCall(l.default.opengrouplist,{},e)}},{key:"openNearby",value:function(e){return o.default.jsCall(l.default.opennearby,{},e)}},{key:"openRoom",value:function(e){return o.default.jsCall(l.default.openroom,{},e)}},{key:"openStickerStore",value:function(e){return o.default.jsCall(l.default.openstickerstore,{},e)}},{key:"openCreateChat",value:function(e){return o.default.jsCall(l.default.opencreatechat,{},e)}},{key:"copyLinkCateSticker",value:function(e){return o.default.jsCall(l.default.copylinkcatesticker,{},e)}},{key:"openChat",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openchat,e,t)}},{key:"openTabChat",value:function(e){return o.default.jsCall(l.default.opentabchat,{},e)}},{key:"openAddFriend",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openaddfriend,e,t)}},{key:"openTabMore",value:function(e){return o.default.jsCall(l.default.opentabmore,{},e)}},{key:"openLoginDevices",value:function(e){return o.default.jsCall(l.default.openlogindevices,{},e)}},{key:"openSendSticker",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.opensendsticker,e,t)}},{key:"reportAbuse",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.reportabuse,e,t)}},{key:"followOA",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.followoa,e,t)}},{key:"unfollowOA",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.unfollowoa,e,t)}},{key:"openGameDetail",value:function(e,t){return o.default.jsCall(l.default.opengamedetail,e,t)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"openAppStore",value:function(e){return o.default.jsCall(l.default.openappstore,e)}},{key:"getLocation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2];return o.default.jsCall(l.default.getlocation,{silent_request:e,permission_description:t},n)}},{key:"openApp",value:function(e){return o.default.jsCall(l.default.openapp,e)}},{key:"configRotate",value:function(e,t){return o.default.jsCall(l.default.autorotate,{autoRotate:e},t)}},{key:"showToast",value:function(e,t){return o.default.jsCall(l.default.showtoast,{toast:e},t)}},{key:"queryLocationHide",value:function(e,t,n){var a={};return a.title=e,a.touserid=t,a.zapp=o.default.getAppId(),o.default.jsCall(l.default.querylocationhide,a,n)}},{key:"hideKeyboard",value:function(e){return o.default.jsCall(l.default.hidekeyboard,{},e)}},{key:"openPhone",value:function(e){return o.default.jsCall(l.default.openphone,e)}},{key:"openQr",value:function(e){return o.default.jsCall(l.default.openqr,{},e)}},{key:"openSMS",value:function(e,t){return o.default.jsCall(l.default.opensms,{content:e,phoneCode:t})}},{key:"viewQr",value:function(e,t,n){return o.default.jsCall(l.default.viewqr,{uid:e,dpn:t},n)}},{key:"keepScreen",value:function(e,t){var n=Number(e);return o.default.jsCall(l.default.keepscreen,{keep_screen_on:n},t)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"changeTitleHeader",value:function(e,t){return o.default.jsCall(l.default.changetitleheader,{title:e},t)}},{key:"clearCacheWebview",value:function(e,t){return o.default.jsCall(l.default.clearcachewebview,{title:e},t)}},{key:"configLeftButton",value:function(e,t){if(!e||!e.buttonType&&!e.homeConfig)throw"data is invalid";return o.default.jsCall(l.default.changeleftbuttonbar,e,t)}},{key:"configRightMenu",value:function(e,t,n,a,u){var i={};return i.supportToolBar=t,i.reset=n,i.menuListItems=e,i.zapp=o.default.getAppId(),i.callback=a,o.default.jsCall(l.default.createoptionmenu,i,u)}},{key:"closeWebview",value:function(e){return o.default.jsCall(l.default.closewindow,{},e)}},{key:"openBioAuthentication",value:function(e,t){return o.default.jsCall(l.default.bioauthen,e,t)}},{key:"jsBridge",value:function(e,t){return o.default.jsCall(l.default.jsbridge,e,t)}},{key:"changeColorHeader",value:function(e,t){return o.default.jsCall(l.default.changeColorHeader,{data:e},t)}},{key:"checkStateAuthen",value:function(e){return o.default.jsCall(l.default.checkStateAuthen,{},e)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"checkAppInstalled",value:function(e,t){return o.default.jsCall(l.default.checkappinstalled,e,t)}},{key:"queryShow",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.queryshow,e,t)}},{key:"queryHide",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.queryhide,e,t)}},{key:"openInAppRw",value:function(e,t){return o.default.jsCall(l.default.openinapprw,e,t)}},{key:"getTrackingStatus",value:function(e){return o.default.jsCall(l.default.gettrackingstatus,{},e)}},{key:"setTrackingStatus",value:function(e,t){return o.default.jsCall(l.default.settrackingstatus,e,t)}},{key:"getDayStep",value:function(e){return o.default.jsCall(l.default.getdaystep,{},e)}},{key:"forceSubmitData",value:function(e){return o.default.jsCall(l.default.forcesubmitdata,{},e)}},{key:"setWeight",value:function(e,t){return o.default.jsCall(l.default.setweight,e,t)}},{key:"openProfileExt",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openProfileExt,e,t)}},{key:"downloadCate",value:function(e,t){return o.default.jsCall(l.default.downloadcate,e,t)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"openInterstitialAds",value:function(e,t){return o.default.jsCall(l.default.openInterstitialAds,e,t,!0)}}]),e}();t.default=i}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ZJSBridge",[],t):"object"==typeof exports?exports.ZJSBridge=t():e.ZJSBridge=t()}(window,(function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=2)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={getdownloadedsticker:"action.get.downloaded.sticker",opensharesticker:"action.open.share.sticker",openprofile:"action.open.profile",openfeeddetail:"action.open.feeddetail",openfriendrada:"action.open.friendrada",openinapp:"action.open.inapp",openoutapp:"action.open.outapp",openpage:"action.open.page",openphotodetail:"action.open.photodetail",opengalary:"action.open.galary",opengamecenter:"action.open.gamecenter",opengamenews:"action.open.gamenews",opentabcontact:"action.open.tab.contact",opentabsocial:"action.open.tab.social",openfriendsuggest:"action.open.friendsuggest",opengrouplist:"action.open.grouplist",opennearby:"action.open.nearby",openroom:"action.open.room",openstickerstore:"action.open.stickerstore",opencreatechat:"action.open.createchat",copylinkcatesticker:"action.copy.link.catesticker",requestbuysticker:"action.request.buy.sticker",openchat:"action.open.chat",opentabchat:"action.open.tab.chat",openChatGroup:"action.open.chatgroup",openaddfriend:"action.open.addfriend",opentabmore:"action.open.tab.more",openpostfeed:"action.open.postfeed",openlogindevices:"action.open.logindevices",opensendsticker:"action.open.sendsticker",reportabuse:"action.report.abuse",followoa:"action.follow.oa",unfollowoa:"action.unfollow.oa",opengamedetail:"action.open.gamedetail",opensharesheet:"action.open.sharesheet",requestcamera:"action.request.permission.camera",changetitleheader:"action.change.title.header",clearcachewebview:"action.webview.clearcache",confirmcache:"action.webview.confirmcache",isvisible:"action.webview.isvisible",networktype:"action.webview.networktype",changebuttonheader:"action.change.button.header",createoptionmenu:"action.create.options.menu",createshortcut:"action.create.shortcut",changeleftbuttonbar:"action.change.actionbar.leftbutton.type",closewindow:"action.window.close",checkResError:"action.webview.checkResError",requestPayment:"action.iap.requestpayment",getzbrowserstats:"action.zbrowser.getstats",jsbridge:"action.zbrowser.jsbridge",bioauthen:"action.prompt.authentication",changeColorHeader:"action.change.actionbar.color",checkStateAuthen:"action.prompt.authentication.check_state",openappstore:"action.open.appstore",getlocation:"action.get.location",querylocationhide:"action.query.location.hide",showtoast:"action.show.toast",openapp:"action.open.app",hidekeyboard:"action.hide.keyboard",openphone:"action.open.phone",openqr:"action.open.qr",opensms:"action.open.sms",viewqr:"action.view.myqr",keepscreen:"action.keep.screen",autorotate:"action.change.autorotate",checkappinstalled:"action.check.app.installed",queryshow:"action.query.show",queryhide:"action.query.hide",openinapprw:"action.open.inapprw",gettrackingstatus:"action.zalorun.getTrackingStatus",settrackingstatus:"action.zalorun.setTrackingStatus",getdaystep:"action.zalorun.getDayStep",forcesubmitdata:"action.zalorun.forceSubmitData",setweight:"action.zalorun.setWeight",getAdIdClient:"action.get.adidclient",openProfileExt:"action.open.profile.ext",downloadcate:"action.download.cate",login:"action.jump.login",openInterstitialAds:"action.open.adtima.ads.interstitial",openRewardAds:"action.open.adtima.ads",openAdtimaAds:"action.open.adtima.ads"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),u=n(0),r=(a=u)&&a.__esModule?a:{default:a};var i=[r.default.getdownloadedsticker,r.default.openpostfeed,r.default.reportabuse,r.default.followoa,r.default.unfollowoa,r.default.opensharesheet,r.default.createoptionmenu,r.default.changeleftbuttonbar,r.default.closewindow,r.default.jsbridge,r.default.getlocation,r.default.querylocationhide,r.default.showtoast,r.default.viewqr,r.default.keepscreen,r.default.gettrackingstatus,r.default.settrackingstatus,r.default.getdaystep,r.default.forcesubmitdata,r.default.setweight,r.default.downloadcate],c=new(function(){function e(t){var n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appId=t||this.getToken("zapp"),this.accessTk=this.getToken("zacc_session")||"DEFAULT_ACCESS_TOKEN",this.jsAccessTk=this.getToken("zlink3rd"),this.jsCallFuncCallbacks={},this.listenerEvent={},this.userAgent=navigator.userAgent||navigator.vendor||window.opera,this.device=(n=this.userAgent,a=n.toLowerCase(),{isWP:/iemobile/.test(a),isAndroid:/android/i.test(a)&&!/iemobile/.test(a),isIOS:/iphone|ipad|ipod/.test(a)&&!/iemobile/.test(a),isMobile:/android|iphone|ipad|ipod|iemobile/.test(a)})}return l(e,[{key:"setAccessToken",value:function(e){this.accessTk=e}},{key:"loginCallback",value:function(e){console.log(e)}},{key:"login",value:function(){alert("call login: "+this.appId+" ZJSBridge.onLoginCallback"),ZaloJavaScriptInterface.login(this.appId,"ZJSBridge.onLoginCallback")}},{key:"getAppId",value:function(){return this.appId}},{key:"isObject",value:function(e){return"object"===(void 0===e?"undefined":o(e))}},{key:"isEmpty",value:function(e){return!e||0===e.trim().length}},{key:"isString",value:function(e){return"string"==typeof e||null!=e&&("object"===(void 0===e?"undefined":o(e))&&(!!e.constructor&&null!==e.constructor.toString().match(/string/i)))}},{key:"parseJSON",value:function(e){return this.isObject(JSON)&&JSON.parse&&this.isString(e)?JSON.parse(e):"object"===(void 0===e?"undefined":o(e))?e:new Function("return "+e)()}},{key:"readCookie",value:function(e){var t=document.cookie;if(t&&(t=t.split("; "))&&t.length>0)for(var n=e.length+1,a=t.length-1;a>=0;a--){var o=t[a];if(o&&0===o.indexOf(e)&&(o=o.substring(n,o.length)))return o=o.replace(/["']/g,"")}return null}},{key:"getCurrHost",value:function(){var e=window.location.host;return e?0===e.indexOf("www.")?e.replace("www.","")+"_":e+"_":""}},{key:"getCurrHostRootZaloMe",value:function(){var e=window.location.host;if(e){if(e.indexOf("zalo.me")>=0)return"zalo.me_";if(e.indexOf("baomoi.com")>=0)return"baomoi.com_";if(e.indexOf("mp3.zing.vn")>=0)return"mp3.zing.vn_";if(e.indexOf("zaloapp.com")>=0)return"zaloapp.com_"}return""}},{key:"isZaloBrowser",value:function(){return window.navigator.userAgent.includes("Zalo")}},{key:"readCookieByDomain",value:function(e){return this.readCookie(this.getCurrHost()+e)}},{key:"readCookieByRootDomain",value:function(e){return this.readCookie(this.getCurrHostRootZaloMe()+e)}},{key:"readCookieFallback",value:function(e){var t=this.readCookieByDomain(e);return t||(t=this.readCookieByRootDomain(e))?t:this.readCookie(e)}},{key:"serialize",value:function(e){if(this.isObject(JSON)&&JSON.stringify)return JSON.stringify(e);if(void 0===e)return"undefined";if(null===e)return"null";try{if("string"==typeof e||null!==e.constructor.toString().match(/string/i))return'"'+e.replace(/"/g,'\\"')+'"'}catch(e){console.log(e)}var t;if(null!==Object.prototype.toString.call(e).match(/array/i)){t=new Array;for(var n=e.length,a=0;a<n;a++)t.push(this.serialize(e[a]));return"["+t.join(",")+"]"}if("object"===(void 0===e?"undefined":o(e))){for(var l in t=new Array,e)t.push('"'+l+'":'+this.serialize(e[l]));return"{"+t.join(",")+"}"}return e.toString()}},{key:"getToken",value:function(e){return this.readCookieFallback(e)}},{key:"defaulCallBackJSCall",value:function(e){null!=e&&(e=this.parseJSON(e))}},{key:"onJSCall",value:function(e){try{if(e=this.parseJSON(e),this.jsCallFuncCallbacks[e.action])this.jsCallFuncCallbacks[e.action].call(this,e),this.jsCallFuncCallbacks[e.action]=null,delete this.jsCallFuncCallbacks[e.action]}catch(e){console.log(e)}}},{key:"onMultiJSCall",value:function(e){try{if(e=this.parseJSON(e),this.jsCallFuncCallbacks[e.action])this.jsCallFuncCallbacks[e.action].call(this,e)}catch(e){console.log(e)}}},{key:"isFunction",value:function(e){return"function"==typeof e}},{key:"getFeatureId",value:function(){return this.readCookieFallback("fid")}},{key:"jsCallback",value:function(e,t,n){ZaloJavaScriptInterface.jsH5EventCallback(e,t,n)}},{key:"registerListenerEvent",value:function(e,t){console.log("register "+e+" : "+t),this.listenerEvent[e]=t}},{key:"zalo_h5_event_handler",value:function(e,t,n){if(console.log("eventId: "+e+", eventName: "+t+", eventData: "+n),this.listenerEvent[t]){var a=this.listenerEvent[t];this.jsCallback(e,t,a)}}},{key:"jsCall",value:function(e,t,n){var a=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:3;try{if(!this.device.isMobile||this.isEmpty(e))return this.onJSCall({error_code:-13,error_message:"params invalid!",data:{device:this.device.isMobile,jsToken:this.jsAccessTk,access_token:this.accessTk},action:e}),!1;null==t&&(t={}),this.isFunction(t)&&void 0===n&&(n=t,t={}),n||(n=this.defaultCallback);var u={error_code:-14,error_message:"Request Timeout!",data:{},action:e};this.jsCallFuncCallbacks[e]=n,i.includes(e)&&setTimeout((function(){a.onJSCall(u)}),8e3);try{return t=this.serialize(t),o?this.device.isIOS?ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,ZJSBridge.onMultiJSCall):ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,"ZJSBridge.onMultiJSCall"):this.device.isIOS?ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,ZJSBridge.onJSCall):ZaloJavaScriptInterface.jsCall(this.jsAccessTk,e,this.accessTk,t,"ZJSBridge.onJSCall")}catch(r){if(!(l-- >0))return u={error_code:-5,error_message:"Not ready!",data:{userAgent:this.userAgent,options:t,jsToken:this.jsAccessTk,access_token:this.accessTk},action:e,js_error:r},this.onJSCall(u),!1;setTimeout((function(){a.jsCall(e,t,n,o,l)}),500)}}catch(e){console.log(e)}return!1}}]),e}())(window.zAppID);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callCustomAction=t.login=t.onLoginCallback=t.onMultiJSCall=t.onJSCall=t.Ads=t.Misc=t.H5=t.Device=t.Zalo=void 0;var a=s(n(0)),o=s(n(3)),l=s(n(4)),u=s(n(5)),r=s(n(6)),i=s(n(7)),c=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){c.default.zalo_h5_event_handler(e,t,n)}},t.Zalo=o.default,t.Device=l.default,t.H5=u.default,t.Misc=r.default,t.Ads=i.default,t.onJSCall=function(e){c.default.onJSCall(e)},t.onMultiJSCall=function(e){c.default.onMultiJSCall(e)},t.onLoginCallback=function(e){console.log(1234),c.default.loginCallback(e)},t.login=function(e){c.default.jsCall(a.default.login,{},e,!0)},t.callCustomAction=function(e,t,n){c.default.jsCall(e,t,n,!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"getAccessToken",value:function(){return o.default.accessTk?o.default.accessTk:"no token"}},{key:"setAccessToken",value:function(e){return e?o.default.setAccessToken(e):"no token"}},{key:"openTabContact",value:function(e){return console.log("openTabContact"),o.default.jsCall(l.default.opentabcontact,{},e)}},{key:"getDownloadedSticker",value:function(e){return console.log("getDownloadedSticker"),o.default.jsCall(l.default.getdownloadedsticker,{},e)}},{key:"openShareSticker",value:function(e,t){return o.default.jsCall(l.default.opensharesticker,{cateDetailsInfo:e},t)}},{key:"openInApp",value:function(e,t){return o.default.jsCall(l.default.openinapp,{url:e},t)}},{key:"openOutApp",value:function(e,t){return o.default.jsCall(l.default.openoutapp,{url:e},t)}},{key:"openPostFeed",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openpostfeed,e,t)}},{key:"openShareSheet",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.opensharesheet,e,t)}},{key:"registerListenerEvent",value:function(e,t){o.default.registerListenerEvent(e,t)}},{key:"openProfile",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openprofile,e,t)}},{key:"openFeedDetail",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openfeeddetail,e,t)}},{key:"openFriendRada",value:function(e){return o.default.jsCall(l.default.openfriendrada,{},e)}},{key:"openPage",value:function(e){return o.default.jsCall(l.default.openpage,{},e)}},{key:"openPhotoDetail",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openphotodetail,e,t)}},{key:"openGalary",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.opengalary,e,t)}},{key:"openGameCenter",value:function(e){return o.default.jsCall(l.default.opengamecenter,{},e)}},{key:"openGameNews",value:function(e){return o.default.jsCall(l.default.opengamenews,{},e)}},{key:"openTabSocial",value:function(e){return o.default.jsCall(l.default.opentabsocial,{},e)}},{key:"openFriendSuggest",value:function(e){return o.default.jsCall(l.default.openfriendsuggest,{},e)}},{key:"openGroupList",value:function(e){return o.default.jsCall(l.default.opengrouplist,{},e)}},{key:"openNearby",value:function(e){return o.default.jsCall(l.default.opennearby,{},e)}},{key:"openRoom",value:function(e){return o.default.jsCall(l.default.openroom,{},e)}},{key:"openStickerStore",value:function(e){return o.default.jsCall(l.default.openstickerstore,{},e)}},{key:"openCreateChat",value:function(e){return o.default.jsCall(l.default.opencreatechat,{},e)}},{key:"copyLinkCateSticker",value:function(e){return o.default.jsCall(l.default.copylinkcatesticker,{},e)}},{key:"openChat",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openchat,e,t)}},{key:"openTabChat",value:function(e){return o.default.jsCall(l.default.opentabchat,{},e)}},{key:"openAddFriend",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openaddfriend,e,t)}},{key:"openTabMore",value:function(e){return o.default.jsCall(l.default.opentabmore,{},e)}},{key:"openLoginDevices",value:function(e){return o.default.jsCall(l.default.openlogindevices,{},e)}},{key:"openSendSticker",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.opensendsticker,e,t)}},{key:"reportAbuse",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.reportabuse,e,t)}},{key:"followOA",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.followoa,e,t)}},{key:"unfollowOA",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.unfollowoa,e,t)}},{key:"openGameDetail",value:function(e,t){return o.default.jsCall(l.default.opengamedetail,e,t)}},{key:"requestCamera",value:function(e){return o.default.jsCall(l.default.requestcamera,{},e)}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"openAppStore",value:function(e){return o.default.jsCall(l.default.openappstore,e)}},{key:"getLocation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2];return o.default.jsCall(l.default.getlocation,{silent_request:e,permission_description:t},n)}},{key:"openApp",value:function(e){return o.default.jsCall(l.default.openapp,e)}},{key:"configRotate",value:function(e,t){return o.default.jsCall(l.default.autorotate,{autoRotate:e},t)}},{key:"showToast",value:function(e,t){return o.default.jsCall(l.default.showtoast,{toast:e},t)}},{key:"queryLocationHide",value:function(e,t,n){var a={};return a.title=e,a.touserid=t,a.zapp=o.default.getAppId(),o.default.jsCall(l.default.querylocationhide,a,n)}},{key:"hideKeyboard",value:function(e){return o.default.jsCall(l.default.hidekeyboard,{},e)}},{key:"openPhone",value:function(e){return o.default.jsCall(l.default.openphone,e)}},{key:"openQr",value:function(e){return o.default.jsCall(l.default.openqr,{},e)}},{key:"openSMS",value:function(e,t){return o.default.jsCall(l.default.opensms,{content:e,phoneCode:t})}},{key:"viewQr",value:function(e,t,n){return o.default.jsCall(l.default.viewqr,{uid:e,dpn:t},n)}},{key:"keepScreen",value:function(e,t){var n=Number(e);return o.default.jsCall(l.default.keepscreen,{keep_screen_on:n},t)}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"changeTitleHeader",value:function(e,t){return o.default.jsCall(l.default.changetitleheader,{title:e},t)}},{key:"clearCacheWebview",value:function(e,t){return o.default.jsCall(l.default.clearcachewebview,{title:e},t)}},{key:"configLeftButton",value:function(e,t){if(!e||!e.buttonType&&!e.homeConfig)throw"data is invalid";return o.default.jsCall(l.default.changeleftbuttonbar,e,t)}},{key:"configRightMenu",value:function(e,t,n,a,u){var r={};return r.supportToolBar=t,r.reset=n,r.menuListItems=e,r.zapp=o.default.getAppId(),r.callback=a,o.default.jsCall(l.default.createoptionmenu,r,u)}},{key:"closeWebview",value:function(e){return o.default.jsCall(l.default.closewindow,{},e)}},{key:"openBioAuthentication",value:function(e,t){return o.default.jsCall(l.default.bioauthen,e,t)}},{key:"jsBridge",value:function(e,t){return o.default.jsCall(l.default.jsbridge,e,t)}},{key:"changeColorHeader",value:function(e,t){return o.default.jsCall(l.default.changeColorHeader,{data:e},t)}},{key:"checkStateAuthen",value:function(e){return o.default.jsCall(l.default.checkStateAuthen,{},e)}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"checkAppInstalled",value:function(e,t){return o.default.jsCall(l.default.checkappinstalled,e,t)}},{key:"queryShow",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.queryshow,e,t)}},{key:"queryHide",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.queryhide,e,t)}},{key:"openInAppRw",value:function(e,t){return o.default.jsCall(l.default.openinapprw,e,t)}},{key:"getTrackingStatus",value:function(e){return o.default.jsCall(l.default.gettrackingstatus,{},e)}},{key:"setTrackingStatus",value:function(e,t){return o.default.jsCall(l.default.settrackingstatus,e,t)}},{key:"getDayStep",value:function(e){return o.default.jsCall(l.default.getdaystep,{},e)}},{key:"forceSubmitData",value:function(e){return o.default.jsCall(l.default.forcesubmitdata,{},e)}},{key:"setWeight",value:function(e,t){return o.default.jsCall(l.default.setweight,e,t)}},{key:"openProfileExt",value:function(e,t){return e.zapp=o.default.getAppId(),o.default.jsCall(l.default.openProfileExt,e,t)}},{key:"downloadCate",value:function(e,t){return o.default.jsCall(l.default.downloadcate,e,t)}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=u(n(1)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"openInterstitialAds",value:function(e,t){return o.default.jsCall(l.default.openInterstitialAds,e,t,!0)}},{key:"openRewardAds",value:function(e,t){return o.default.jsCall(l.default.openRewardAds,e,t,!0)}},{key:"openAdtimaAds",value:function(e,t){return o.default.jsCall(l.default.openAdtimaAds,e,t,!0)}}]),e}();t.default=r}])})); | ||
//# sourceMappingURL=lib.js.map |
{ | ||
"name": "zalo-js-bridge", | ||
"version": "1.7.13", | ||
"version": "1.7.17", | ||
"description": "A Javascript Framework for WebApp", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -1,1 +0,1 @@ | ||
1.7.13 | ||
1.7.17 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18876301
301
64716