webtonative 1.0.71 → 1.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Biometric/index.js +1 -1
- package/InAppUpdate/index.js +1 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/webtonative.min.js +1 -1
package/Biometric/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.show=exports.saveSecret=exports.deleteSecret=exports.checkStatus=void 0;var _utills=require("../utills"),checkStatus=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"checkBiometricStatus"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.checkBiometricStatus(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"checkBiometricStatus"}))};exports.checkStatus=checkStatus;var saveSecret=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.secret;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"saveBiometricSecret"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.saveSecret(c),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"saveBiometricSecret",secret:c}))};exports.saveSecret=saveSecret;var deleteSecret=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"deleteBiometricSecret"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.deleteSecret(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"deleteBiometricSecret"}))};exports.deleteSecret=deleteSecret;var show=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.prompt;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"showBiometric"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.callBiometric(c||"Authenticate to continue!"),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showBiometric",prompt:c||""}))};exports.show=show;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.show=exports.saveSecret=exports.deleteSecret=exports.checkStatus=exports.biometricAuthWithDismissOnCancel=void 0;var _utills=require("../utills"),checkStatus=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"checkBiometricStatus"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.checkBiometricStatus(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"checkBiometricStatus"}))};exports.checkStatus=checkStatus;var saveSecret=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.secret;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"saveBiometricSecret"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.saveSecret(c),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"saveBiometricSecret",secret:c}))};exports.saveSecret=saveSecret;var deleteSecret=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"deleteBiometricSecret"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.deleteSecret(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"deleteBiometricSecret"}))};exports.deleteSecret=deleteSecret;var show=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.prompt;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"showBiometric"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.callBiometric(c||"Authenticate to continue!"),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showBiometric",prompt:c||""}))};exports.show=show;var biometricAuthWithDismissOnCancel=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.prompt,d=a.isAuthenticationOptional;["ANDROID_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"biometricAuthWithDismissOnCancel"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.biometricAuthWithDismissOnCancel(JSON.stringify({prompt:c||"Authenticate to continue!",isAuthenticationOptional:void 0!==d&&d})))};exports.biometricAuthWithDismissOnCancel=biometricAuthWithDismissOnCancel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.updateApplication=exports.checkIfAppUpdateAvailable=void 0;var _utills=require("../utills"),checkIfAppUpdateAvailable=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"checkIfAppUpdateAvailable"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.checkIfAppUpdateAvailable()}};exports.checkIfAppUpdateAvailable=checkIfAppUpdateAvailable;var updateApplication=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.updateType,c=void 0===b?"immediate":b,d=a.callback;(0,_utills.registerCb)(function(a){var b=a.type;"updateApplication"===b&&d&&d(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.updateApplication(c)}};exports.updateApplication=updateApplication;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIosApp=exports.isDeviceGPSEnabled=exports.isAndroidApp=exports.hideSplashScreen=exports.getSafeArea=exports.getAddOnStatus=exports.forceUpdateCookies=exports.enablePullToRefresh=exports.downloadFile=exports.downloadBlobFile=exports.disableScreenshot=exports.deviceInfo=exports["default"]=exports.customFileDownload=exports.closeApp=exports.clearAppCache=exports.checkPermission=exports.appFirstLoad=exports.addToSiri=void 0,Object.defineProperty(exports,"isNativeApp",{enumerable:!0,get:function get(){return _utills.isNativeApp}}),exports.openUrlInBrowser=exports.openAppSettingForPermission=exports.nfcSupported=exports.loadOfferCard=void 0,Object.defineProperty(exports,"platform",{enumerable:!0,get:function get(){return _utills.platform}}),exports.updateAppIcon=exports.statusBar=exports.showPermission=exports.showInAppReview=exports.showDateTimePicker=exports.shareLink=exports.shareFile=exports.setOrientation=exports.printFunction=void 0;var _utills=require("./utills"),isAndroidApp="ANDROID_APP"===_utills.platform;exports.isAndroidApp=isAndroidApp;var isIosApp="IOS_APP"===_utills.platform;/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIosApp=exports.isDeviceGPSEnabled=exports.isAndroidApp=exports.hideSplashScreen=exports.getSafeArea=exports.getAddOnStatus=exports.forceUpdateCookies=exports.enablePullToRefresh=exports.downloadFile=exports.downloadBlobFile=exports.disableScreenshot=exports.deviceInfo=exports["default"]=exports.customFileDownload=exports.customBackHandling=exports.closeApp=exports.clearAppCache=exports.checkPermission=exports.appFirstLoad=exports.addToSiri=void 0,Object.defineProperty(exports,"isNativeApp",{enumerable:!0,get:function get(){return _utills.isNativeApp}}),exports.openUrlInBrowser=exports.openAppSettingForPermission=exports.nfcSupported=exports.loadOfferCard=void 0,Object.defineProperty(exports,"platform",{enumerable:!0,get:function get(){return _utills.platform}}),exports.updateAppIcon=exports.statusBar=exports.showPermission=exports.showInAppReview=exports.showDateTimePicker=exports.shareLink=exports.shareFile=exports.setOrientation=exports.printFunction=void 0;var _utills=require("./utills"),isAndroidApp="ANDROID_APP"===_utills.platform;exports.isAndroidApp=isAndroidApp;var isIosApp="IOS_APP"===_utills.platform;/**
|
|
2
2
|
* This function hides splash screen
|
|
3
3
|
* @example wtn.hideSplashScreen()
|
|
4
|
-
*/exports.isIosApp=isIosApp;var hideSplashScreen=function(){_utills.isNativeApp&&_utills.webToNative.hideSplashScreen()};exports.hideSplashScreen=hideSplashScreen;var statusBar=function(a){_utills.isNativeApp&&(isAndroidApp?_utills.webToNative.statusBar(JSON.stringify(a)):isIosApp&&_utills.webToNativeIos.postMessage({action:"statusBar",color:a.color,style:a.style}))};exports.statusBar=statusBar;var downloadFile=function(a){_utills.isNativeApp&&(isAndroidApp||isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadFile",downloadUrl:a}))};exports.downloadFile=downloadFile;var downloadBlobFile=function(a){var b=a.fileName,c=a.downloadUrl;["IOS_APP"].includes(_utills.platform)&&isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadBlobFile",fileName:b,url:c})};exports.downloadBlobFile=downloadBlobFile;var customFileDownload=function(a){var b=a.downloadUrl,c=a.fileName,d=a.isBlob,e=a.mimeType,f=a.cookies,g=a.userAgent,h=a.openFileAfterDownload;["ANDROID_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.downloadFile(JSON.stringify({url:b,fileName:c,isBlob:d,mimeType:e,cookies:f,userAgent:g,openFileAfterDownload:h}))};exports.customFileDownload=customFileDownload;var deviceInfo=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){c?a(c):b({err:"Error getting device info"})},{key:"deviceInfo"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getDeviceInfo():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"deviceInfo"}):b("This function will work in Native App Powered By WebToNative")})};exports.deviceInfo=deviceInfo;var showInAppReview=function(){_utills.isNativeApp&&_utills.webToNative.showInAppReview()};exports.showInAppReview=showInAppReview;var isDeviceGPSEnabled=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"isDeviceGPSEnabled"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.isLocationServiceEnabled())};exports.isDeviceGPSEnabled=isDeviceGPSEnabled;var shareLink=function(a){var b=a.url,c=void 0===b?"":b;if(c)isAndroidApp&&_utills.webToNative.openShareIntent(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"share",url:c});else throw"url is mandatory"};exports.shareLink=shareLink;var openUrlInBrowser=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";if(a)isAndroidApp&&_utills.webToNative.openUrlInBrowser(a);else throw"url is mandatory"};exports.openUrlInBrowser=openUrlInBrowser;var enablePullToRefresh=function(a){isAndroidApp&&_utills.webToNative.enableSwipeRefresh(a)};exports.enablePullToRefresh=enablePullToRefresh;var clearAppCache=function(a){isAndroidApp&&_utills.webToNative.clearWebViewCache(JSON.stringify({reload:a}))};exports.clearAppCache=clearAppCache;var shareFile=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;isAndroidApp&&_utills.webToNative.shareFile(a,b,c)};exports.shareFile=shareFile;var closeApp=function(){isAndroidApp&&_utills.webToNative.closeApp(),isIosApp&&_utills.webToNativeIos.postMessage({action:"closeApp"})};exports.closeApp=closeApp;var showDateTimePicker=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.callback,c=a.showDate,d=a.showTime;(0,_utills.registerCb)(function(a){var c=a.type;"DATE_TIME_PICKER"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.pickDateTime(JSON.stringify({showDate:c,showTime:d}))}};exports.showDateTimePicker=showDateTimePicker;var printFunction=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.type,c=void 0===b?"url":b,d=a.url,e=void 0===d?"":d;isAndroidApp&&_utills.webToNative.print(JSON.stringify({type:c,url:e}))}};exports.printFunction=printFunction;var nfcSupported=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"nfcSupported"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.nfcSupported(),isIosApp&&_utills.webToNativeIos.postMessage({action:"nfcSupported"})}};exports.nfcSupported=nfcSupported;var loadOfferCard=function(a){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&(isAndroidApp&&_utills.webToNative.showOfferCard(JSON.stringify(a)),a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.loadOfferCard=loadOfferCard;var addToSiri=function(a){["IOS_APP"].includes(_utills.platform)&&(a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.addToSiri=addToSiri;var appFirstLoad=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){var d=c.type;"firstCallWhenAppStarted"===d&&(c?a(c):b({err:"Error getting request"}))},{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.firstCallWhenAppStarted():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"firstCallWhenAppStarted"}):b("This function will work in Native App Powered By WebToNative")})};exports.appFirstLoad=appFirstLoad;var forceUpdateCookies=function(){["ANDROID_APP"].includes(_utills.platform)&&isAndroidApp&&_utills.webToNative.forceUpdateCookies()};exports.forceUpdateCookies=forceUpdateCookies;var openAppSettingForPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.values;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;"openAppSettingForPermission"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.openAppSettingForPermission(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"openAppSettingForPermission",values:c})}};exports.openAppSettingForPermission=openAppSettingForPermission;var showPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permission,d=a.openAppSetting,e=void 0!==d&&d,f=a.alertDialogStyle;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;("showPermission"===c||"showPermission"===d)&&b&&b(a)}),isAndroidApp&&_utills.webToNative.showPermission(JSON.stringify({permission:c,openAppSetting:e,alertDialogStyle:f})),isIosApp&&_utills.webToNativeIos.postMessage({action:"showPermission",permission:c,openAppSetting:e,alertDialogStyle:f})}};exports.showPermission=showPermission;var updateAppIcon=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.active,c=void 0!==b&&b,d=a.iconName,e=void 0===d?null:d;isAndroidApp&&_utills.webToNative.updateAppIcon(JSON.stringify({active:c,iconName:e})),isIosApp&&_utills.webToNativeIos.postMessage({action:"updateAppIcon",iconName:e,active:c})}};exports.updateAppIcon=updateAppIcon;var disableScreenshot=function(a){if(["IOS_APP"].includes(_utills.platform)){var b=a.ssKey;isIosApp&&_utills.webToNativeIos.postMessage({action:"disableScreenshotForPage",ssKey:void 0!==b&&b})}};exports.disableScreenshot=disableScreenshot;var getSafeArea=function(a){if(["IOS_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"getSafeArea"===c&&b&&b(a)}),isIosApp&&_utills.webToNativeIos.postMessage({action:"getSafeArea"})}};exports.getSafeArea=getSafeArea;var getAddOnStatus=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.addOnName;(0,_utills.registerCb)(function(a){var c=a.type;"getAddOnStatus"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.getAddOnStatus(JSON.stringify({addOnName:c})),isIosApp&&_utills.webToNativeIos.postMessage({action:"getAddOnStatus",addOnName:c})}};exports.getAddOnStatus=getAddOnStatus;var checkPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permissionName;(0,_utills.registerCb)(function(a){var c=a.type;"checkPermission"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.checkPermission(JSON.stringify(c)),isIosApp&&_utills.webToNativeIos.postMessage({action:"checkPermission",permissionName:c})}};exports.checkPermission=checkPermission;var setOrientation=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.orientation,c=a.forceOrientation;isAndroidApp&&_utills.webToNative.setOrientation(JSON.stringify({orientation:b,forceOrientation:void 0!==c&&c}))}};exports.setOrientation=setOrientation;var _default={isAndroidApp:isAndroidApp,isIosApp:isIosApp,hideSplashScreen:hideSplashScreen,statusBar:statusBar,deviceInfo:deviceInfo,showInAppReview:showInAppReview,shareLink:shareLink,platform:_utills.platform,isNativeApp:_utills.isNativeApp,isDeviceGPSEnabled:isDeviceGPSEnabled,openUrlInBrowser:openUrlInBrowser,enablePullToRefresh:enablePullToRefresh,shareFile:shareFile,clearAppCache:clearAppCache,closeApp:closeApp,showDateTimePicker:showDateTimePicker,downloadBlobFile:downloadBlobFile,customFileDownload:customFileDownload,printFunction:printFunction,loadOfferCard:loadOfferCard,appFirstLoad:appFirstLoad,addToSiri:addToSiri,showPermission:showPermission,forceUpdateCookies:forceUpdateCookies,updateAppIcon:updateAppIcon,disableScreenshot:disableScreenshot,getSafeArea:getSafeArea,getAddOnStatus:getAddOnStatus,setOrientation:setOrientation,checkPermission:checkPermission,openAppSettingForPermission:openAppSettingForPermission};exports["default"]=_default;
|
|
4
|
+
*/exports.isIosApp=isIosApp;var hideSplashScreen=function(){_utills.isNativeApp&&_utills.webToNative.hideSplashScreen()};exports.hideSplashScreen=hideSplashScreen;var statusBar=function(a){_utills.isNativeApp&&(isAndroidApp?_utills.webToNative.statusBar(JSON.stringify(a)):isIosApp&&_utills.webToNativeIos.postMessage({action:"statusBar",color:a.color,style:a.style}))};exports.statusBar=statusBar;var downloadFile=function(a){_utills.isNativeApp&&(isAndroidApp||isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadFile",downloadUrl:a}))};exports.downloadFile=downloadFile;var downloadBlobFile=function(a){var b=a.fileName,c=a.downloadUrl;["IOS_APP"].includes(_utills.platform)&&isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadBlobFile",fileName:b,url:c})};exports.downloadBlobFile=downloadBlobFile;var customFileDownload=function(a){var b=a.downloadUrl,c=a.fileName,d=a.isBlob,e=a.mimeType,f=a.cookies,g=a.userAgent,h=a.openFileAfterDownload;["ANDROID_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.downloadFile(JSON.stringify({url:b,fileName:c,isBlob:d,mimeType:e,cookies:f,userAgent:g,openFileAfterDownload:h}))};exports.customFileDownload=customFileDownload;var deviceInfo=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){c?a(c):b({err:"Error getting device info"})},{key:"deviceInfo"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getDeviceInfo():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"deviceInfo"}):b("This function will work in Native App Powered By WebToNative")})};exports.deviceInfo=deviceInfo;var showInAppReview=function(){_utills.isNativeApp&&_utills.webToNative.showInAppReview()};exports.showInAppReview=showInAppReview;var isDeviceGPSEnabled=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"isDeviceGPSEnabled"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.isLocationServiceEnabled())};exports.isDeviceGPSEnabled=isDeviceGPSEnabled;var shareLink=function(a){var b=a.url,c=void 0===b?"":b;if(c)isAndroidApp&&_utills.webToNative.openShareIntent(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"share",url:c});else throw"url is mandatory"};exports.shareLink=shareLink;var openUrlInBrowser=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";if(a)isAndroidApp&&_utills.webToNative.openUrlInBrowser(a);else throw"url is mandatory"};exports.openUrlInBrowser=openUrlInBrowser;var enablePullToRefresh=function(a){isAndroidApp&&_utills.webToNative.enableSwipeRefresh(a)};exports.enablePullToRefresh=enablePullToRefresh;var clearAppCache=function(a){isAndroidApp&&_utills.webToNative.clearWebViewCache(JSON.stringify({reload:a}))};exports.clearAppCache=clearAppCache;var shareFile=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;isAndroidApp&&_utills.webToNative.shareFile(a,b,c)};exports.shareFile=shareFile;var closeApp=function(){isAndroidApp&&_utills.webToNative.closeApp(),isIosApp&&_utills.webToNativeIos.postMessage({action:"closeApp"})};exports.closeApp=closeApp;var showDateTimePicker=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.callback,c=a.showDate,d=a.showTime;(0,_utills.registerCb)(function(a){var c=a.type;"DATE_TIME_PICKER"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.pickDateTime(JSON.stringify({showDate:c,showTime:d}))}};exports.showDateTimePicker=showDateTimePicker;var printFunction=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.type,c=void 0===b?"url":b,d=a.url,e=void 0===d?"":d;isAndroidApp&&_utills.webToNative.print(JSON.stringify({type:c,url:e}))}};exports.printFunction=printFunction;var nfcSupported=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"nfcSupported"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.nfcSupported(),isIosApp&&_utills.webToNativeIos.postMessage({action:"nfcSupported"})}};exports.nfcSupported=nfcSupported;var loadOfferCard=function(a){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&(isAndroidApp&&_utills.webToNative.showOfferCard(JSON.stringify(a)),a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.loadOfferCard=loadOfferCard;var addToSiri=function(a){["IOS_APP"].includes(_utills.platform)&&(a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.addToSiri=addToSiri;var appFirstLoad=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){var d=c.type;"firstCallWhenAppStarted"===d&&(c?a(c):b({err:"Error getting request"}))},{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.firstCallWhenAppStarted():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"firstCallWhenAppStarted"}):b("This function will work in Native App Powered By WebToNative")})};exports.appFirstLoad=appFirstLoad;var forceUpdateCookies=function(){["ANDROID_APP"].includes(_utills.platform)&&isAndroidApp&&_utills.webToNative.forceUpdateCookies()};exports.forceUpdateCookies=forceUpdateCookies;var openAppSettingForPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.values;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;"openAppSettingForPermission"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.openAppSettingForPermission(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"openAppSettingForPermission",values:c})}};exports.openAppSettingForPermission=openAppSettingForPermission;var showPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permission,d=a.openAppSetting,e=void 0!==d&&d,f=a.alertDialogStyle;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;("showPermission"===c||"showPermission"===d)&&b&&b(a)}),isAndroidApp&&_utills.webToNative.showPermission(JSON.stringify({permission:c,openAppSetting:e,alertDialogStyle:f})),isIosApp&&_utills.webToNativeIos.postMessage({action:"showPermission",permission:c,openAppSetting:e,alertDialogStyle:f})}};exports.showPermission=showPermission;var updateAppIcon=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.active,c=void 0!==b&&b,d=a.iconName,e=void 0===d?null:d;isAndroidApp&&_utills.webToNative.updateAppIcon(JSON.stringify({active:c,iconName:e})),isIosApp&&_utills.webToNativeIos.postMessage({action:"updateAppIcon",iconName:e,active:c})}};exports.updateAppIcon=updateAppIcon;var disableScreenshot=function(a){if(["IOS_APP"].includes(_utills.platform)){var b=a.ssKey;isIosApp&&_utills.webToNativeIos.postMessage({action:"disableScreenshotForPage",ssKey:void 0!==b&&b})}};exports.disableScreenshot=disableScreenshot;var customBackHandling=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.enable;isAndroidApp&&_utills.webToNative.customBackHandling(JSON.stringify({enable:void 0!==b&&b}))}};exports.customBackHandling=customBackHandling;var getSafeArea=function(a){if(["IOS_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"getSafeArea"===c&&b&&b(a)}),isIosApp&&_utills.webToNativeIos.postMessage({action:"getSafeArea"})}};exports.getSafeArea=getSafeArea;var getAddOnStatus=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.addOnName;(0,_utills.registerCb)(function(a){var c=a.type;"getAddOnStatus"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.getAddOnStatus(JSON.stringify({addOnName:c})),isIosApp&&_utills.webToNativeIos.postMessage({action:"getAddOnStatus",addOnName:c})}};exports.getAddOnStatus=getAddOnStatus;var checkPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permissionName;(0,_utills.registerCb)(function(a){var c=a.type;"checkPermission"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.checkPermission(JSON.stringify(c)),isIosApp&&_utills.webToNativeIos.postMessage({action:"checkPermission",permissionName:c})}};exports.checkPermission=checkPermission;var setOrientation=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.orientation,c=a.forceOrientation;isAndroidApp&&_utills.webToNative.setOrientation(JSON.stringify({orientation:b,forceOrientation:void 0!==c&&c}))}};exports.setOrientation=setOrientation;var _default={isAndroidApp:isAndroidApp,isIosApp:isIosApp,hideSplashScreen:hideSplashScreen,statusBar:statusBar,deviceInfo:deviceInfo,showInAppReview:showInAppReview,shareLink:shareLink,platform:_utills.platform,isNativeApp:_utills.isNativeApp,isDeviceGPSEnabled:isDeviceGPSEnabled,openUrlInBrowser:openUrlInBrowser,enablePullToRefresh:enablePullToRefresh,shareFile:shareFile,clearAppCache:clearAppCache,closeApp:closeApp,showDateTimePicker:showDateTimePicker,downloadBlobFile:downloadBlobFile,customFileDownload:customFileDownload,printFunction:printFunction,loadOfferCard:loadOfferCard,appFirstLoad:appFirstLoad,addToSiri:addToSiri,showPermission:showPermission,forceUpdateCookies:forceUpdateCookies,updateAppIcon:updateAppIcon,disableScreenshot:disableScreenshot,getSafeArea:getSafeArea,getAddOnStatus:getAddOnStatus,setOrientation:setOrientation,checkPermission:checkPermission,openAppSettingForPermission:openAppSettingForPermission,customBackHandling:customBackHandling};exports["default"]=_default;
|
package/package.json
CHANGED
package/webtonative.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var e={d:function(n,t){for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{addToSiri:function(){return te},appFirstLoad:function(){return ie},checkPermission:function(){return Ae},clearAppCache:function(){return X},closeApp:function(){return Z},customFileDownload:function(){return j},default:function(){return de},deviceInfo:function(){return H},disableScreenshot:function(){return ce},downloadBlobFile:function(){return V},downloadFile:function(){return J},enablePullToRefresh:function(){return z},forceUpdateCookies:function(){return oe},getAddOnStatus:function(){return Pe},getSafeArea:function(){return ue},hideSplashScreen:function(){return U},isAndroidApp:function(){return W},isDeviceGPSEnabled:function(){return q},isIosApp:function(){return B},isNativeApp:function(){return b},loadOfferCard:function(){return ne},nfcSupported:function(){return ee},openAppSettingForPermission:function(){return re},openUrlInBrowser:function(){return G},platform:function(){return h},printFunction:function(){return $},setOrientation:function(){return le},shareFile:function(){return Q},shareLink:function(){return K},showDateTimePicker:function(){return Y},showInAppReview:function(){return x},showPermission:function(){return ae},statusBar:function(){return L},updateAppIcon:function(){return se}});var t={};e.r(t),e.d(t,{addTrigger:function(){return Ie},addTriggers:function(){return De},getPlayerId:function(){return fe},getTriggerValue:function(){return ve},getTriggers:function(){return Ne},logoutEmail:function(){return we},logoutSMSNumber:function(){return Re},optInUser:function(){return he},optOutUser:function(){return be},removeExternalUserId:function(){return Oe},removeTrigger:function(){return Se},removeTriggers:function(){return _e},setEmail:function(){return ye},setExternalUserId:function(){return pe},setSMSNumber:function(){return me},setTags:function(){return ge}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return Ee},Format:function(){return Me},Types:function(){return Fe}});var o={};e.r(o),e.d(o,{bannerAd:function(){return Be},fullScreenAd:function(){return Ue},rewardsAd:function(){return Le}});var r={};e.r(r),e.d(r,{logEvent:function(){return je},setCustomerUserId:function(){return Ve}});var a={};e.r(a),e.d(a,{send:function(){return He},sendPurchase:function(){return xe}});var s={};e.r(s),e.d(s,{hide:function(){return qe},show:function(){return Ke}});var c={};e.r(c),e.d(c,{getAll:function(){return ze},getPermissionStatus:function(){return Ge}});var u={};e.r(u),e.d(u,{start:function(){return Xe},stop:function(){return Qe}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return Ye},keepScreenOn:function(){return Ze}});var A={};e.r(A),e.d(A,{get:function(){return $e},set:function(){return en}});var l={};e.r(l),e.d(l,{prompt:function(){return nn}});var d={};e.r(d),e.d(d,{checkStatus:function(){return tn},deleteSecret:function(){return rn},saveSecret:function(){return on},show:function(){return an}});var f={};e.r(f),e.d(f,{request:function(){return sn},status:function(){return cn}});var p={};e.r(p),e.d(p,{logEvent:function(){return dn},logScreen:function(){return fn},setCollection:function(){return un},setDefaultEventParameters:function(){return ln},setUserId:function(){return Pn},setUserProperty:function(){return An}});var O={};e.r(O),e.d(O,{events:function(){return p}});var g={};e.r(g),e.d(g,{getFCMToken:function(){return gn},subscribe:function(){return pn},unsubscribe:function(){return On}});var I={};e.r(I),e.d(I,{Analytics:function(){return p},Messaging:function(){return g}});var D={};e.r(D),e.d(D,{trigger:function(){return In}});var S={};e.r(S),e.d(S,{pauseMedia:function(){return Sn},playMedia:function(){return Dn},stopMedia:function(){return _n}});var _={};e.r(_),e.d(_,{setPrintSize:function(){return vn}});var v={};e.r(v),e.d(v,{checkNotificationPermission:function(){return Nn},openAppNotificationPage:function(){return yn}});var N={};e.r(N),e.d(N,{pairDevice:function(){return wn},startBluetoothScan:function(){return mn},unpairDevice:function(){return Rn}});var y={};e.r(y),e.d(y,{makeTapToPay:function(){return Tn}});var m="undefined"!=typeof window,w=m&&window.WebToNativeInterface||{},R=m&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,h=w.getAndroidVersion?"ANDROID_APP":R?"IOS_APP":"WEBSITE",b=m&&"WEBSITE"!==h,T={},k=1,M=null;b&&(w.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,T){var i=T[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete T[t]):(o(n),a||delete T[t])}},window.iOSAdMobCBHook=w.androidAdMobCBHook=function(e){var n=JSON.parse(e);M&&M(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in T){var i=T[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete T[t]):(o(n),a||delete T[t])}});var F=function(e,n){"function"==typeof e&&(n&&n.key?T[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(T[k]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},k+=1))},E=function(e){"function"==typeof e&&(M=e)},C=function(){M&&(M=null)},W="ANDROID_APP"===h,B="IOS_APP"===h,U=function(){b&&w.hideSplashScreen()},L=function(e){b&&(W?w.statusBar(JSON.stringify(e)):B&&R.postMessage({action:"statusBar",color:e.color,style:e.style}))},J=function(e){b&&(W||B&&R.postMessage({action:"downloadFile",downloadUrl:e}))},V=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(h)&&B&&R.postMessage({action:"downloadBlobFile",fileName:n,url:t})},j=function(e){var n=e.downloadUrl,t=e.fileName,i=e.isBlob,o=e.mimeType,r=e.cookies,a=e.userAgent,s=e.openFileAfterDownload;["ANDROID_APP"].includes(h)&&"ANDROID_APP"===h&&w.downloadFile(JSON.stringify({url:n,fileName:t,isBlob:i,mimeType:o,cookies:r,userAgent:a,openFileAfterDownload:s}))},H=function(){return new Promise((function(e,n){F((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===h?w.getDeviceInfo():"IOS_APP"===h?R.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},x=function(){b&&w.showInAppReview()},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.isLocationServiceEnabled())},K=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";W&&w.openShareIntent(t),B&&R.postMessage({action:"share",url:t})},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";W&&w.openUrlInBrowser(e)},z=function(e){W&&w.enableSwipeRefresh(e)},X=function(e){W&&w.clearWebViewCache(JSON.stringify({reload:e}))},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;W&&w.shareFile(e,n,t)},Z=function(){W&&w.closeApp(),B&&R.postMessage({action:"closeApp"})},Y=function(e){if(["ANDROID_APP"].includes(h)){var n=e.callback,t=e.showDate,i=e.showTime;F((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),W&&w.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},$=function(e){if(["ANDROID_APP"].includes(h)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;W&&w.print(JSON.stringify({type:t,url:o}))}},ee=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback;F((function(e){"nfcSupported"===e.type&&n&&n(e)})),W&&w.nfcSupported(),B&&R.postMessage({action:"nfcSupported"})}},ne=function(e){["ANDROID_APP","IOS_APP"].includes(h)&&(W&&w.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),B&&R.postMessage(e))},te=function(e){["IOS_APP"].includes(h)&&(e.data&&(e.data=JSON.stringify(e.data)),B&&R.postMessage(e))},ie=function(){return new Promise((function(e,n){F((function(t){"firstCallWhenAppStarted"===t.type&&(t?e(t):n({err:"Error getting request"}))}),{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===h?w.firstCallWhenAppStarted():"IOS_APP"===h?R.postMessage({action:"firstCallWhenAppStarted"}):n("This function will work in Native App Powered By WebToNative")}))},oe=function(){["ANDROID_APP"].includes(h)&&W&&w.forceUpdateCookies()},re=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.values;F((function(e){var t=e.type;e.typeValue,"openAppSettingForPermission"===t&&n&&n(e)})),W&&w.openAppSettingForPermission(t),B&&R.postMessage({action:"openAppSettingForPermission",values:t})}},ae=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.permission,i=e.openAppSetting,o=void 0!==i&&i,r=e.alertDialogStyle;F((function(e){var t=e.type,i=e.typeValue;"showPermission"!==t&&"showPermission"!==i||n&&n(e)})),W&&w.showPermission(JSON.stringify({permission:t,openAppSetting:o,alertDialogStyle:r})),B&&R.postMessage({action:"showPermission",permission:t,openAppSetting:o,alertDialogStyle:r})}},se=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.active,t=void 0!==n&&n,i=e.iconName,o=void 0===i?null:i;W&&w.updateAppIcon(JSON.stringify({active:t,iconName:o})),B&&R.postMessage({action:"updateAppIcon",iconName:o,active:t})}},ce=function(e){if(["IOS_APP"].includes(h)){var n=e.ssKey,t=void 0!==n&&n;B&&R.postMessage({action:"disableScreenshotForPage",ssKey:t})}},ue=function(e){if(["IOS_APP"].includes(h)){var n=e.callback;F((function(e){"getSafeArea"===e.type&&n&&n(e)})),B&&R.postMessage({action:"getSafeArea"})}},Pe=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.addOnName;F((function(e){"getAddOnStatus"===e.type&&n&&n(e)})),W&&w.getAddOnStatus(JSON.stringify({addOnName:t})),B&&R.postMessage({action:"getAddOnStatus",addOnName:t})}},Ae=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.permissionName;F((function(e){"checkPermission"===e.type&&n&&n(e)})),W&&w.checkPermission(JSON.stringify(t)),B&&R.postMessage({action:"checkPermission",permissionName:t})}},le=function(e){if(["ANDROID_APP"].includes(h)){var n=e.orientation,t=e.forceOrientation,i=void 0!==t&&t;W&&w.setOrientation(JSON.stringify({orientation:n,forceOrientation:i}))}},de={isAndroidApp:W,isIosApp:B,hideSplashScreen:U,statusBar:L,deviceInfo:H,showInAppReview:x,shareLink:K,platform:h,isNativeApp:b,isDeviceGPSEnabled:q,openUrlInBrowser:G,enablePullToRefresh:z,shareFile:Q,clearAppCache:X,closeApp:Z,showDateTimePicker:Y,downloadBlobFile:V,customFileDownload:j,printFunction:$,loadOfferCard:ne,appFirstLoad:ie,addToSiri:te,showPermission:ae,forceUpdateCookies:oe,updateAppIcon:se,disableScreenshot:ce,getSafeArea:ue,getAddOnStatus:Pe,setOrientation:le,checkPermission:Ae,openAppSettingForPermission:re},fe=function(){return new Promise((function(e,n){F((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===h?w.getOneSignalId():"IOS_APP"===h?R.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},pe=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===h)return b&&w.setExternalUserId(e);"IOS_APP"===h&&R.postMessage({action:"setExternalUserId",userId:e})},Oe=function(){if("ANDROID_APP"===h)return b&&w.removeExternalUserId();"IOS_APP"===h&&R.postMessage({action:"removeExternalUserId"})},ge=function(e){var n=e.tags;if(n){if("ANDROID_APP"===h)return b&&w.setUserTags(JSON.stringify(n));"IOS_APP"===h&&R.postMessage({action:"setUserTags",tags:n})}},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===h?w.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===h&&R.postMessage({action:"addTrigger",key:n,value:t})},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===h?w.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===h&&R.postMessage({action:"addTriggers",triggers:n})},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===h?w.removeTriggerForKey(n):"IOS_APP"===h&&R.postMessage({action:"removeTrigger",key:n})},_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===h?w.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===h&&R.postMessage({action:"removeTriggers",keys:n})},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===h?w.getTriggerValueForKey(n):"IOS_APP"===h&&R.postMessage({action:"getTriggerValue",key:n}))},Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===h?w.getTriggers():"IOS_APP"===h&&R.postMessage({action:"getTriggers"}))},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&w.setEmail(n)},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&w.setSMSNumber(n)},we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&w.logoutEmail(n)},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&w.logoutSMSNumber(n)},he=function(){"ANDROID_APP"===h?w.optInOneSignalPermissionDialog():"IOS_APP"===h&&R.postMessage({action:"optInOneSignalPermissionDialog"})},be=function(){"ANDROID_APP"===h?w.optOutOneSignalPermissionDialog():"IOS_APP"===h&&R.postMessage({action:"optOutOneSignalPermissionDialog"})},Te=void 0,ke=null,Me={UNKNOWN:-1,ALL_FORMATS:0,CODE_128:1,CODE_39:2,CODE_93:4,CODABAR:8,DATA_MATRIX:16,EAN_13:32,EAN_8:64,ITF:128,QR_CODE:256,UPC_A:512,UPC_E:1024,PDF417:2048,AZTEC:4096},Fe={UNKNOWN:0,CONTACT_INFO:1,EMAIL:2,ISBN:3,PHONE:4,PRODUCT:5,SMS:6,TEXT:7,URL:8,WIFI:9,GEO:10,CALENDAR_EVENT:11,DRIVER_LICENSE:12},Ee=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.onBarcodeSearch,t=e.format;F((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===h&&w.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===h&&R.postMessage({action:"barcodeScan",barcodeFormat:String(t||Me.ALL_FORMATS)})}},Ce=void 0,We=null,Be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h))return"IOS_APP"===h&&R.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===h&&w.showBannerAd(JSON.stringify(e)),Ce},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.fullScreenAdCallback;return E((function(e){var n=e.status;We&&We(e),"adDismissed"===n&&(We=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&C()})),"IOS_APP"===h&&R.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===h&&w.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(We=n),Ce}},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.rewardsAdCallback;return E((function(e){var n=e.status;We&&We(e),"adDismissed"===n&&(We=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&C()})),"IOS_APP"===h&&R.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===h&&w.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(We=n),Ce}},Je={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.loginWithFacebook(),"IOS_APP"===h&&R.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.logoutWithFacebook(),"IOS_APP"===h&&R.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.signInWithGoogle(),"IOS_APP"===h&&R.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.signOutWithGoogle(),"IOS_APP"===h&&R.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===h&&R.postMessage({action:"appleSignIn",scope:t})}}}},Ve=function(e){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.setAppsFlyerUserId(e),"IOS_APP"===h&&R.postMessage({action:"setAppsFlyerUserId",userId:e}))},je=function(e,n){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===h&&R.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},He=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===h&&w.addFbEvents(n,i),"IOS_APP"===h&&R.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},xe=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===h&&w.addFbPurchaseEvent(n,t,i),"IOS_APP"===h&&R.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},qe=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.showHideStickyFooter(!1),"IOS_APP"===h&&R.postMessage({action:"showHideStickyFooter",show:!1}))},Ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.showHideStickyFooter(!0),"IOS_APP"===h&&R.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.getPermissionStatus(),"IOS_APP"===h&&R.postMessage({action:"askUserForContactPermission"}))},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.getAll(),"IOS_APP"===h&&R.postMessage({action:"getUserContactDetails"}))},Xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.data,t=e.callback,i=e.backgroundIndicator,o=void 0!==i&&i,r=e.pauseAutomatically,a=void 0===r||r,s=e.distanceFilter,c=void 0===s?0:s,u=e.desiredAccuracy,P=void 0===u?"best":u,A=e.activityType,l=void 0===A?"other":A,d=e.apiUrl,f=e.timeout;F((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===h&&R.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===h&&w.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:c}))}},Qe=function(){["ANDROID_APP","IOS_APP"].includes(h)&&(delete T["LOCATION_UPDATE"],"IOS_APP"===h&&R.postMessage({action:"stopLocation"}),"ANDROID_APP"===h&&w.stopTrackingLocation())},Ze=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&R.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===h&&w.keepScreenOn())},Ye=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&R.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===h&&w.keepScreenNormal())},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===h&&R.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===h&&w.getText())},en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&R.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===h&&w.setText(e.data||""))},nn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&R.postMessage({action:"showAppRating"}),"ANDROID_APP"===h&&w.showInAppReview())},tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.checkBiometricStatus(),"IOS_APP"===h&&R.postMessage({action:"checkBiometricStatus"}))},on=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.saveSecret(t),"IOS_APP"===h&&R.postMessage({action:"saveBiometricSecret",secret:t}))},rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.deleteSecret(),"IOS_APP"===h&&R.postMessage({action:"deleteBiometricSecret"}))},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===h&&R.postMessage({action:"showBiometric",prompt:t||""}))},sn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(h)&&(F((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===h&&R.postMessage({action:"requestTrackingAuthorization"}))},cn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(h)&&(F((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===h&&R.postMessage({action:"trackingConsentStatus"}))},un=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.enabled;"IOS_APP"===h&&R.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===h&&w.setFirebaseAnalyticsCollection(n)}},Pn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.userId;"IOS_APP"===h&&R.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===h&&w.setFirebaseUserId(n)}},An=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.key,t=e.value;"IOS_APP"===h&&R.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===h&&w.setFirebaseUserProp(n,t)}},ln=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.parameters;"IOS_APP"===h&&R.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===h&&w.setFirebaseDefaultParam(n)}},dn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.eventName,t=e.parameters;"IOS_APP"===h&&R.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===h&&w.logFirebaseEvent(n,t)}},fn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.screenName,t=e.screenClass;"IOS_APP"===h&&R.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===h&&w.logFirebaseScreenView(n,t)}},pn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.toTopic;"IOS_APP"===h&&R.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===h&&w.subscribeToTopic(n)}},On=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.fromTopic;"IOS_APP"===h&&R.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===h&&w.unsubscribeFromTopic(n)}},gn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback;F((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===h&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===h&&R.postMessage({action:"getFCMToken"}),"ANDROID_APP"===h&&w.getRegistrationToken()}},In=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(h)&&"IOS_APP"===h&&R.postMessage({action:"haptikEffect",effect:e.effect})},Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,t=e.imageUrl,i=void 0===t?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":t;["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.playMedia(JSON.stringify({url:n,imageUrl:i})),"IOS_APP"===h&&R.postMessage({action:"playMedia",url:n,image:i}))},Sn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.pausePlaying(),"IOS_APP"===h&&R.postMessage({action:"pauseMedia"}))},_n=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.stopPlaying(),"IOS_APP"===h&&R.postMessage({action:"stopMedia"}))},vn=function(e){if(["ANDROID_APP"].includes(h)){var n=e.printSize,t=void 0===n?"ISO_A4":n,i=e.label,o=void 0===i?"":i;"ANDROID_APP"===h&&w.setPrintSize(JSON.stringify({printSize:t,label:o}))}},Nn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"checkNotificationPermission"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.checkNotificationPermission(),"IOS_APP"===h&&R.postMessage({action:"checkNotificationPermission"}))},yn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&w.openAppNotificationPage(),"IOS_APP"===h&&R.postMessage({action:"openAppNotificationPage"}))},mn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP"].includes(h)&&(F((function(e){"startBluetoothScan"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.startBluetoothScan())},wn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address,i=e.timeout,o=void 0===i?10:i;["ANDROID_APP"].includes(h)&&(F((function(e){"pairWithDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.pairWithDevice(JSON.stringify({address:t,timeout:o})))},Rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address;["ANDROID_APP"].includes(h)&&(F((function(e){"unpairDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.unpairDevice(JSON.stringify({address:t})))};function hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function bn(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Tn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.apiUrl,i=void 0===t?null:t,o=e.amount,r=e.currency,a=e.isSimulated,s=void 0!==a&&a,c=e.captureMethod,u=void 0===c?"automatic":c,P=e.connectionToken,A=e.stripeLocationId,l=e.clientSecret,d=void 0===l?null:l;F((function(e){"makeTapToPayStripePayment"===e.type&&n&&n(e)}));var f={secretToken:P,amount:o,currency:r,isSimulated:s,captureMethod:u,locationId:A};i&&(f.apiUrl=i),d&&(f.client_secret=d),"ANDROID_APP"===h&&w.makeTapToPayStripePayment(JSON.stringify(f)),"IOS_APP"===h&&R.postMessage(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hn(Object(t),!0).forEach((function(n){bn(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({action:"makeTapToPayStripePayment"},f))}};window.WTN=n,window.WTN.OneSignal=t,window.WTN.VoiceSearch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onVoiceSearch;return F((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(ke&&ke(t),ke=null)})),b&&w.openVoiceSearch(),"function"==typeof n&&(ke=n),Te},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=Je,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;F((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===h&&R.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===h&&w.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(h)){var n=e.callback;F((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&w.getAllPurchases({action:"purchaseList"})}},window.WTN.getReceiptData=function(e){if(["IOS_APP"].includes(h)){var n=e.callback;F((function(e){"getReceiptData"===e.type&&n&&n(e)})),"IOS_APP"===h&&R.postMessage({action:"getReceiptData"})}},window.WTN.appsflyer=r,window.WTN.bottomNavigation=s,window.WTN.contacts=c,window.WTN.screen=P,window.WTN.backgroundLocation=u,window.WTN.clipboard=A,window.WTN.appReview=l,window.WTN.Biometric=d,window.WTN.ATTConsent=f,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=O,window.WTN.haptics=D,window.WTN.Firebase=I,window.WTN.MediaPlayer=S,window.WTN.Printing=_,window.WTN.Notification=v,window.WTN.Bluetooth=N,window.WTN.Stripe=y,window&&window.WebToNativeInterface&&window.WebToNativeInterface.getAndroidVersion?window.navigator.share=function(e){return new Promise((function(n,t){window.WebToNativeInterface.openShareIntent(e.url),n()}))}:WTN.isIosApp&&(window.navigator.share=function(e){return new Promise((function(n,t){R.postMessage({action:"share",url:e.url}),n()}))})}();
|
|
1
|
+
!function(){"use strict";var e={d:function(n,t){for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{addToSiri:function(){return ie},appFirstLoad:function(){return oe},checkPermission:function(){return de},clearAppCache:function(){return Q},closeApp:function(){return Y},customBackHandling:function(){return Pe},customFileDownload:function(){return H},default:function(){return pe},deviceInfo:function(){return x},disableScreenshot:function(){return ue},downloadBlobFile:function(){return j},downloadFile:function(){return V},enablePullToRefresh:function(){return X},forceUpdateCookies:function(){return re},getAddOnStatus:function(){return le},getSafeArea:function(){return Ae},hideSplashScreen:function(){return L},isAndroidApp:function(){return B},isDeviceGPSEnabled:function(){return K},isIosApp:function(){return U},isNativeApp:function(){return T},loadOfferCard:function(){return te},nfcSupported:function(){return ne},openAppSettingForPermission:function(){return ae},openUrlInBrowser:function(){return z},platform:function(){return b},printFunction:function(){return ee},setOrientation:function(){return fe},shareFile:function(){return Z},shareLink:function(){return G},showDateTimePicker:function(){return $},showInAppReview:function(){return q},showPermission:function(){return ce},statusBar:function(){return J},updateAppIcon:function(){return se}});var t={};e.r(t),e.d(t,{addTrigger:function(){return Se},addTriggers:function(){return _e},getPlayerId:function(){return Oe},getTriggerValue:function(){return ye},getTriggers:function(){return me},logoutEmail:function(){return we},logoutSMSNumber:function(){return be},optInUser:function(){return Te},optOutUser:function(){return ke},removeExternalUserId:function(){return Ie},removeTrigger:function(){return ve},removeTriggers:function(){return Ne},setEmail:function(){return Re},setExternalUserId:function(){return ge},setSMSNumber:function(){return he},setTags:function(){return De}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return We},Format:function(){return Ee},Types:function(){return Ce}});var o={};e.r(o),e.d(o,{bannerAd:function(){return Le},fullScreenAd:function(){return Je},rewardsAd:function(){return Ve}});var r={};e.r(r),e.d(r,{logEvent:function(){return xe},setCustomerUserId:function(){return He}});var a={};e.r(a),e.d(a,{send:function(){return qe},sendPurchase:function(){return Ke}});var c={};e.r(c),e.d(c,{hide:function(){return Ge},show:function(){return ze}});var s={};e.r(s),e.d(s,{getAll:function(){return Qe},getPermissionStatus:function(){return Xe}});var u={};e.r(u),e.d(u,{start:function(){return Ze},stop:function(){return Ye}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return en},keepScreenOn:function(){return $e}});var A={};e.r(A),e.d(A,{get:function(){return nn},set:function(){return tn}});var l={};e.r(l),e.d(l,{prompt:function(){return on}});var d={};e.r(d),e.d(d,{biometricAuthWithDismissOnCancel:function(){return un},checkStatus:function(){return rn},deleteSecret:function(){return cn},saveSecret:function(){return an},show:function(){return sn}});var f={};e.r(f),e.d(f,{request:function(){return Pn},status:function(){return An}});var p={};e.r(p),e.d(p,{logEvent:function(){return On},logScreen:function(){return gn},setCollection:function(){return ln},setDefaultEventParameters:function(){return pn},setUserId:function(){return dn},setUserProperty:function(){return fn}});var O={};e.r(O),e.d(O,{events:function(){return p}});var g={};e.r(g),e.d(g,{getFCMToken:function(){return Sn},subscribe:function(){return In},unsubscribe:function(){return Dn}});var I={};e.r(I),e.d(I,{Analytics:function(){return p},Messaging:function(){return g}});var D={};e.r(D),e.d(D,{trigger:function(){return _n}});var S={};e.r(S),e.d(S,{pauseMedia:function(){return Nn},playMedia:function(){return vn},stopMedia:function(){return yn}});var _={};e.r(_),e.d(_,{setPrintSize:function(){return mn}});var v={};e.r(v),e.d(v,{checkNotificationPermission:function(){return Rn},openAppNotificationPage:function(){return hn}});var N={};e.r(N),e.d(N,{pairDevice:function(){return bn},startBluetoothScan:function(){return wn},unpairDevice:function(){return Tn}});var y={};e.r(y),e.d(y,{makeTapToPay:function(){return Fn}});var m={};e.r(m),e.d(m,{checkIfAppUpdateAvailable:function(){return En},updateApplication:function(){return Cn}});var R="undefined"!=typeof window,h=R&&window.WebToNativeInterface||{},w=R&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,b=h.getAndroidVersion?"ANDROID_APP":w?"IOS_APP":"WEBSITE",T=R&&"WEBSITE"!==b,k={},M=1,F=null;T&&(h.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,k){var i=k[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete k[t]):(o(n),a||delete k[t])}},window.iOSAdMobCBHook=h.androidAdMobCBHook=function(e){var n=JSON.parse(e);F&&F(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in k){var i=k[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete k[t]):(o(n),a||delete k[t])}});var E=function(e,n){"function"==typeof e&&(n&&n.key?k[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(k[M]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},M+=1))},C=function(e){"function"==typeof e&&(F=e)},W=function(){F&&(F=null)},B="ANDROID_APP"===b,U="IOS_APP"===b,L=function(){T&&h.hideSplashScreen()},J=function(e){T&&(B?h.statusBar(JSON.stringify(e)):U&&w.postMessage({action:"statusBar",color:e.color,style:e.style}))},V=function(e){T&&(B||U&&w.postMessage({action:"downloadFile",downloadUrl:e}))},j=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(b)&&U&&w.postMessage({action:"downloadBlobFile",fileName:n,url:t})},H=function(e){var n=e.downloadUrl,t=e.fileName,i=e.isBlob,o=e.mimeType,r=e.cookies,a=e.userAgent,c=e.openFileAfterDownload;["ANDROID_APP"].includes(b)&&"ANDROID_APP"===b&&h.downloadFile(JSON.stringify({url:n,fileName:t,isBlob:i,mimeType:o,cookies:r,userAgent:a,openFileAfterDownload:c}))},x=function(){return new Promise((function(e,n){E((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===b?h.getDeviceInfo():"IOS_APP"===b?w.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},q=function(){T&&h.showInAppReview()},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.isLocationServiceEnabled())},G=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";B&&h.openShareIntent(t),U&&w.postMessage({action:"share",url:t})},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";B&&h.openUrlInBrowser(e)},X=function(e){B&&h.enableSwipeRefresh(e)},Q=function(e){B&&h.clearWebViewCache(JSON.stringify({reload:e}))},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;B&&h.shareFile(e,n,t)},Y=function(){B&&h.closeApp(),U&&w.postMessage({action:"closeApp"})},$=function(e){if(["ANDROID_APP"].includes(b)){var n=e.callback,t=e.showDate,i=e.showTime;E((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),B&&h.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},ee=function(e){if(["ANDROID_APP"].includes(b)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;B&&h.print(JSON.stringify({type:t,url:o}))}},ne=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback;E((function(e){"nfcSupported"===e.type&&n&&n(e)})),B&&h.nfcSupported(),U&&w.postMessage({action:"nfcSupported"})}},te=function(e){["ANDROID_APP","IOS_APP"].includes(b)&&(B&&h.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),U&&w.postMessage(e))},ie=function(e){["IOS_APP"].includes(b)&&(e.data&&(e.data=JSON.stringify(e.data)),U&&w.postMessage(e))},oe=function(){return new Promise((function(e,n){E((function(t){"firstCallWhenAppStarted"===t.type&&(t?e(t):n({err:"Error getting request"}))}),{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===b?h.firstCallWhenAppStarted():"IOS_APP"===b?w.postMessage({action:"firstCallWhenAppStarted"}):n("This function will work in Native App Powered By WebToNative")}))},re=function(){["ANDROID_APP"].includes(b)&&B&&h.forceUpdateCookies()},ae=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.values;E((function(e){var t=e.type;e.typeValue,"openAppSettingForPermission"===t&&n&&n(e)})),B&&h.openAppSettingForPermission(t),U&&w.postMessage({action:"openAppSettingForPermission",values:t})}},ce=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.permission,i=e.openAppSetting,o=void 0!==i&&i,r=e.alertDialogStyle;E((function(e){var t=e.type,i=e.typeValue;"showPermission"!==t&&"showPermission"!==i||n&&n(e)})),B&&h.showPermission(JSON.stringify({permission:t,openAppSetting:o,alertDialogStyle:r})),U&&w.postMessage({action:"showPermission",permission:t,openAppSetting:o,alertDialogStyle:r})}},se=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.active,t=void 0!==n&&n,i=e.iconName,o=void 0===i?null:i;B&&h.updateAppIcon(JSON.stringify({active:t,iconName:o})),U&&w.postMessage({action:"updateAppIcon",iconName:o,active:t})}},ue=function(e){if(["IOS_APP"].includes(b)){var n=e.ssKey,t=void 0!==n&&n;U&&w.postMessage({action:"disableScreenshotForPage",ssKey:t})}},Pe=function(e){if(["ANDROID_APP"].includes(b)){var n=e.enable,t=void 0!==n&&n;B&&h.customBackHandling(JSON.stringify({enable:t}))}},Ae=function(e){if(["IOS_APP"].includes(b)){var n=e.callback;E((function(e){"getSafeArea"===e.type&&n&&n(e)})),U&&w.postMessage({action:"getSafeArea"})}},le=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.addOnName;E((function(e){"getAddOnStatus"===e.type&&n&&n(e)})),B&&h.getAddOnStatus(JSON.stringify({addOnName:t})),U&&w.postMessage({action:"getAddOnStatus",addOnName:t})}},de=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.permissionName;E((function(e){"checkPermission"===e.type&&n&&n(e)})),B&&h.checkPermission(JSON.stringify(t)),U&&w.postMessage({action:"checkPermission",permissionName:t})}},fe=function(e){if(["ANDROID_APP"].includes(b)){var n=e.orientation,t=e.forceOrientation,i=void 0!==t&&t;B&&h.setOrientation(JSON.stringify({orientation:n,forceOrientation:i}))}},pe={isAndroidApp:B,isIosApp:U,hideSplashScreen:L,statusBar:J,deviceInfo:x,showInAppReview:q,shareLink:G,platform:b,isNativeApp:T,isDeviceGPSEnabled:K,openUrlInBrowser:z,enablePullToRefresh:X,shareFile:Z,clearAppCache:Q,closeApp:Y,showDateTimePicker:$,downloadBlobFile:j,customFileDownload:H,printFunction:ee,loadOfferCard:te,appFirstLoad:oe,addToSiri:ie,showPermission:ce,forceUpdateCookies:re,updateAppIcon:se,disableScreenshot:ue,getSafeArea:Ae,getAddOnStatus:le,setOrientation:fe,checkPermission:de,openAppSettingForPermission:ae,customBackHandling:Pe},Oe=function(){return new Promise((function(e,n){E((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===b?h.getOneSignalId():"IOS_APP"===b?w.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},ge=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===b)return T&&h.setExternalUserId(e);"IOS_APP"===b&&w.postMessage({action:"setExternalUserId",userId:e})},Ie=function(){if("ANDROID_APP"===b)return T&&h.removeExternalUserId();"IOS_APP"===b&&w.postMessage({action:"removeExternalUserId"})},De=function(e){var n=e.tags;if(n){if("ANDROID_APP"===b)return T&&h.setUserTags(JSON.stringify(n));"IOS_APP"===b&&w.postMessage({action:"setUserTags",tags:n})}},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===b?h.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===b&&w.postMessage({action:"addTrigger",key:n,value:t})},_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===b?h.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===b&&w.postMessage({action:"addTriggers",triggers:n})},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===b?h.removeTriggerForKey(n):"IOS_APP"===b&&w.postMessage({action:"removeTrigger",key:n})},Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===b?h.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===b&&w.postMessage({action:"removeTriggers",keys:n})},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===b?h.getTriggerValueForKey(n):"IOS_APP"===b&&w.postMessage({action:"getTriggerValue",key:n}))},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===b?h.getTriggers():"IOS_APP"===b&&w.postMessage({action:"getTriggers"}))},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(b)&&"ANDROID_APP"===b&&h.setEmail(n)},he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(b)&&"ANDROID_APP"===b&&h.setSMSNumber(n)},we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(b)&&"ANDROID_APP"===b&&h.logoutEmail(n)},be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(b)&&"ANDROID_APP"===b&&h.logoutSMSNumber(n)},Te=function(){"ANDROID_APP"===b?h.optInOneSignalPermissionDialog():"IOS_APP"===b&&w.postMessage({action:"optInOneSignalPermissionDialog"})},ke=function(){"ANDROID_APP"===b?h.optOutOneSignalPermissionDialog():"IOS_APP"===b&&w.postMessage({action:"optOutOneSignalPermissionDialog"})},Me=void 0,Fe=null,Ee={UNKNOWN:-1,ALL_FORMATS:0,CODE_128:1,CODE_39:2,CODE_93:4,CODABAR:8,DATA_MATRIX:16,EAN_13:32,EAN_8:64,ITF:128,QR_CODE:256,UPC_A:512,UPC_E:1024,PDF417:2048,AZTEC:4096},Ce={UNKNOWN:0,CONTACT_INFO:1,EMAIL:2,ISBN:3,PHONE:4,PRODUCT:5,SMS:6,TEXT:7,URL:8,WIFI:9,GEO:10,CALENDAR_EVENT:11,DRIVER_LICENSE:12},We=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.onBarcodeSearch,t=e.format;E((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===b&&h.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===b&&w.postMessage({action:"barcodeScan",barcodeFormat:String(t||Ee.ALL_FORMATS)})}},Be=void 0,Ue=null,Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(b))return"IOS_APP"===b&&w.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===b&&h.showBannerAd(JSON.stringify(e)),Be},Je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.fullScreenAdCallback;return C((function(e){var n=e.status;Ue&&Ue(e),"adDismissed"===n&&(Ue=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&W()})),"IOS_APP"===b&&w.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===b&&h.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(Ue=n),Be}},Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.rewardsAdCallback;return C((function(e){var n=e.status;Ue&&Ue(e),"adDismissed"===n&&(Ue=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&W()})),"IOS_APP"===b&&w.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===b&&h.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(Ue=n),Be}},je={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.scope;E((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.loginWithFacebook(),"IOS_APP"===b&&w.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.scope;E((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.logoutWithFacebook(),"IOS_APP"===b&&w.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.scope;E((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.signInWithGoogle(),"IOS_APP"===b&&w.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.scope;E((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.signOutWithGoogle(),"IOS_APP"===b&&w.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.scope;E((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===b&&w.postMessage({action:"appleSignIn",scope:t})}}}},He=function(e){["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.setAppsFlyerUserId(e),"IOS_APP"===b&&w.postMessage({action:"setAppsFlyerUserId",userId:e}))},xe=function(e,n){["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===b&&w.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},qe=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===b&&h.addFbEvents(n,i),"IOS_APP"===b&&w.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},Ke=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===b&&h.addFbPurchaseEvent(n,t,i),"IOS_APP"===b&&w.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},Ge=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.showHideStickyFooter(!1),"IOS_APP"===b&&w.postMessage({action:"showHideStickyFooter",show:!1}))},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.showHideStickyFooter(!0),"IOS_APP"===b&&w.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},Xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.getPermissionStatus(),"IOS_APP"===b&&w.postMessage({action:"askUserForContactPermission"}))},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.getAll(),"IOS_APP"===b&&w.postMessage({action:"getUserContactDetails"}))},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.data,t=e.callback,i=e.backgroundIndicator,o=void 0!==i&&i,r=e.pauseAutomatically,a=void 0===r||r,c=e.distanceFilter,s=void 0===c?0:c,u=e.desiredAccuracy,P=void 0===u?"best":u,A=e.activityType,l=void 0===A?"other":A,d=e.apiUrl,f=e.timeout;E((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===b&&w.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:s,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===b&&h.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:s}))}},Ye=function(){["ANDROID_APP","IOS_APP"].includes(b)&&(delete k["LOCATION_UPDATE"],"IOS_APP"===b&&w.postMessage({action:"stopLocation"}),"ANDROID_APP"===b&&h.stopTrackingLocation())},$e=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("IOS_APP"===b&&w.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===b&&h.keepScreenOn())},en=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("IOS_APP"===b&&w.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===b&&h.keepScreenNormal())},nn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===b&&w.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===b&&h.getText())},tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(b)&&("IOS_APP"===b&&w.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===b&&h.setText(e.data||""))},on=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("IOS_APP"===b&&w.postMessage({action:"showAppRating"}),"ANDROID_APP"===b&&h.showInAppReview())},rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.checkBiometricStatus(),"IOS_APP"===b&&w.postMessage({action:"checkBiometricStatus"}))},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.saveSecret(t),"IOS_APP"===b&&w.postMessage({action:"saveBiometricSecret",secret:t}))},cn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.deleteSecret(),"IOS_APP"===b&&w.postMessage({action:"deleteBiometricSecret"}))},sn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===b&&w.postMessage({action:"showBiometric",prompt:t||""}))},un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt,i=e.isAuthenticationOptional,o=void 0!==i&&i;["ANDROID_APP"].includes(b)&&(E((function(e){"biometricAuthWithDismissOnCancel"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.biometricAuthWithDismissOnCancel(JSON.stringify({prompt:t||"Authenticate to continue!",isAuthenticationOptional:o})))},Pn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(b)&&(E((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===b&&w.postMessage({action:"requestTrackingAuthorization"}))},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(b)&&(E((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===b&&w.postMessage({action:"trackingConsentStatus"}))},ln=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.enabled;"IOS_APP"===b&&w.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===b&&h.setFirebaseAnalyticsCollection(n)}},dn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.userId;"IOS_APP"===b&&w.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===b&&h.setFirebaseUserId(n)}},fn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.key,t=e.value;"IOS_APP"===b&&w.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===b&&h.setFirebaseUserProp(n,t)}},pn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.parameters;"IOS_APP"===b&&w.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===b&&h.setFirebaseDefaultParam(n)}},On=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.eventName,t=e.parameters;"IOS_APP"===b&&w.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===b&&h.logFirebaseEvent(n,t)}},gn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.screenName,t=e.screenClass;"IOS_APP"===b&&w.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===b&&h.logFirebaseScreenView(n,t)}},In=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.toTopic;"IOS_APP"===b&&w.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===b&&h.subscribeToTopic(n)}},Dn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.fromTopic;"IOS_APP"===b&&w.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===b&&h.unsubscribeFromTopic(n)}},Sn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback;E((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===b&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===b&&w.postMessage({action:"getFCMToken"}),"ANDROID_APP"===b&&h.getRegistrationToken()}},_n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(b)&&"IOS_APP"===b&&w.postMessage({action:"haptikEffect",effect:e.effect})},vn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,t=e.imageUrl,i=void 0===t?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":t;["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.playMedia(JSON.stringify({url:n,imageUrl:i})),"IOS_APP"===b&&w.postMessage({action:"playMedia",url:n,image:i}))},Nn=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.pausePlaying(),"IOS_APP"===b&&w.postMessage({action:"pauseMedia"}))},yn=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.stopPlaying(),"IOS_APP"===b&&w.postMessage({action:"stopMedia"}))},mn=function(e){if(["ANDROID_APP"].includes(b)){var n=e.printSize,t=void 0===n?"ISO_A4":n,i=e.label,o=void 0===i?"":i;"ANDROID_APP"===b&&h.setPrintSize(JSON.stringify({printSize:t,label:o}))}},Rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(b)&&(E((function(e){"checkNotificationPermission"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.checkNotificationPermission(),"IOS_APP"===b&&w.postMessage({action:"checkNotificationPermission"}))},hn=function(){["ANDROID_APP","IOS_APP"].includes(b)&&("ANDROID_APP"===b&&h.openAppNotificationPage(),"IOS_APP"===b&&w.postMessage({action:"openAppNotificationPage"}))},wn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP"].includes(b)&&(E((function(e){"startBluetoothScan"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.startBluetoothScan())},bn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address,i=e.timeout,o=void 0===i?10:i;["ANDROID_APP"].includes(b)&&(E((function(e){"pairWithDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.pairWithDevice(JSON.stringify({address:t,timeout:o})))},Tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address;["ANDROID_APP"].includes(b)&&(E((function(e){"unpairDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.unpairDevice(JSON.stringify({address:t})))};function kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Mn(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Fn=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.apiUrl,i=void 0===t?null:t,o=e.amount,r=e.currency,a=e.isSimulated,c=void 0!==a&&a,s=e.captureMethod,u=void 0===s?"automatic":s,P=e.connectionToken,A=e.stripeLocationId,l=e.clientSecret,d=void 0===l?null:l;E((function(e){"makeTapToPayStripePayment"===e.type&&n&&n(e)}));var f={secretToken:P,amount:o,currency:r,isSimulated:c,captureMethod:u,locationId:A};i&&(f.apiUrl=i),d&&(f.client_secret=d),"ANDROID_APP"===b&&h.makeTapToPayStripePayment(JSON.stringify(f)),"IOS_APP"===b&&w.postMessage(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kn(Object(t),!0).forEach((function(n){Mn(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({action:"makeTapToPayStripePayment"},f))}},En=function(e){if(["ANDROID_APP"].includes(b)){var n=e.callback;E((function(e){"checkIfAppUpdateAvailable"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.checkIfAppUpdateAvailable()}},Cn=function(e){if(["ANDROID_APP"].includes(b)){var n=e.updateType,t=void 0===n?"immediate":n,i=e.callback;E((function(e){"updateApplication"===e.type&&i&&i(e)})),"ANDROID_APP"===b&&h.updateApplication(t)}};window.WTN=n,window.WTN.OneSignal=t,window.WTN.VoiceSearch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onVoiceSearch;return E((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(Fe&&Fe(t),Fe=null)})),T&&h.openVoiceSearch(),"function"==typeof n&&(Fe=n),Me},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=je,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(b)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;E((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===b&&w.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===b&&h.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(b)){var n=e.callback;E((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===b&&h.getAllPurchases({action:"purchaseList"})}},window.WTN.getReceiptData=function(e){if(["IOS_APP"].includes(b)){var n=e.callback;E((function(e){"getReceiptData"===e.type&&n&&n(e)})),"IOS_APP"===b&&w.postMessage({action:"getReceiptData"})}},window.WTN.appsflyer=r,window.WTN.bottomNavigation=c,window.WTN.contacts=s,window.WTN.screen=P,window.WTN.backgroundLocation=u,window.WTN.clipboard=A,window.WTN.appReview=l,window.WTN.Biometric=d,window.WTN.ATTConsent=f,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=O,window.WTN.haptics=D,window.WTN.Firebase=I,window.WTN.MediaPlayer=S,window.WTN.Printing=_,window.WTN.Notification=v,window.WTN.Bluetooth=N,window.WTN.Stripe=y,window.WTN.InAppUpdate=m,window&&window.WebToNativeInterface&&window.WebToNativeInterface.getAndroidVersion?window.navigator.share=function(e){return new Promise((function(n,t){window.WebToNativeInterface.openShareIntent(e.url),n()}))}:WTN.isIosApp&&(window.navigator.share=function(e){return new Promise((function(n,t){w.postMessage({action:"share",url:e.url}),n()}))})}();
|