webtonative 1.0.73 → 1.0.74
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/Beacon/index.js +1 -0
- package/Siri/index.js +1 -0
- package/package.json +1 -1
- package/webtonative.min.js +1 -1
package/Beacon/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initBeaconData=void 0;var _utills=require("../utills"),initBeaconData=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.beaconData;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"initBeaconData"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.initBeaconData(JSON.stringify(c)),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"initBeaconData",data:c}))};exports.initBeaconData=initBeaconData;
|
package/Siri/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addToSiri=void 0;var _utills=require("../utills"),addToSiri=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.actionUrl,c=a.suggestedPhrase,d=a.title;["IOS_APP"].includes(_utills.platform)&&"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"addToSiri",data:{actionUrl:b,suggestedPhrase:c,title:d}})};exports.addToSiri=addToSiri;
|
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 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()}))})}();
|
|
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 re},appFirstLoad:function(){return ae},checkPermission:function(){return pe},clearAppCache:function(){return Y},closeApp:function(){return ee},customBackHandling:function(){return le},customFileDownload:function(){return q},default:function(){return ge},deviceInfo:function(){return K},disableScreenshot:function(){return Ae},downloadBlobFile:function(){return x},downloadFile:function(){return H},enablePullToRefresh:function(){return Z},forceUpdateCookies:function(){return ce},getAddOnStatus:function(){return fe},getSafeArea:function(){return de},hideSplashScreen:function(){return V},isAndroidApp:function(){return J},isDeviceGPSEnabled:function(){return z},isIosApp:function(){return L},isNativeApp:function(){return M},loadOfferCard:function(){return oe},nfcSupported:function(){return ie},openAppSettingForPermission:function(){return se},openUrlInBrowser:function(){return Q},platform:function(){return k},printFunction:function(){return te},setOrientation:function(){return Oe},shareFile:function(){return $},shareLink:function(){return X},showDateTimePicker:function(){return ne},showInAppReview:function(){return G},showPermission:function(){return ue},statusBar:function(){return j},updateAppIcon:function(){return Pe}});var t={};e.r(t),e.d(t,{addTrigger:function(){return ve},addTriggers:function(){return Ne},getPlayerId:function(){return Ie},getTriggerValue:function(){return he},getTriggers:function(){return we},logoutEmail:function(){return Te},logoutSMSNumber:function(){return ke},optInUser:function(){return Me},optOutUser:function(){return Fe},removeExternalUserId:function(){return Se},removeTrigger:function(){return ye},removeTriggers:function(){return me},setEmail:function(){return Re},setExternalUserId:function(){return De},setSMSNumber:function(){return be},setTags:function(){return _e}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return Ue},Format:function(){return Be},Types:function(){return We}});var o={};e.r(o),e.d(o,{bannerAd:function(){return Ve},fullScreenAd:function(){return je},rewardsAd:function(){return He}});var r={};e.r(r),e.d(r,{logEvent:function(){return Ke},setCustomerUserId:function(){return qe}});var a={};e.r(a),e.d(a,{send:function(){return Ge},sendPurchase:function(){return ze}});var c={};e.r(c),e.d(c,{hide:function(){return Xe},show:function(){return Qe}});var s={};e.r(s),e.d(s,{getAll:function(){return Ye},getPermissionStatus:function(){return Ze}});var u={};e.r(u),e.d(u,{start:function(){return $e},stop:function(){return en}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return tn},keepScreenOn:function(){return nn}});var A={};e.r(A),e.d(A,{get:function(){return on},set:function(){return rn}});var l={};e.r(l),e.d(l,{prompt:function(){return an}});var d={};e.r(d),e.d(d,{biometricAuthWithDismissOnCancel:function(){return An},checkStatus:function(){return cn},deleteSecret:function(){return un},saveSecret:function(){return sn},show:function(){return Pn}});var f={};e.r(f),e.d(f,{request:function(){return ln},status:function(){return dn}});var p={};e.r(p),e.d(p,{logEvent:function(){return In},logScreen:function(){return Dn},setCollection:function(){return fn},setDefaultEventParameters:function(){return gn},setUserId:function(){return pn},setUserProperty:function(){return On}});var O={};e.r(O),e.d(O,{events:function(){return p}});var g={};e.r(g),e.d(g,{getFCMToken:function(){return vn},subscribe:function(){return Sn},unsubscribe:function(){return _n}});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 Nn}});var S={};e.r(S),e.d(S,{pauseMedia:function(){return mn},playMedia:function(){return yn},stopMedia:function(){return hn}});var _={};e.r(_),e.d(_,{setPrintSize:function(){return wn}});var v={};e.r(v),e.d(v,{checkNotificationPermission:function(){return Rn},openAppNotificationPage:function(){return bn}});var N={};e.r(N),e.d(N,{pairDevice:function(){return kn},startBluetoothScan:function(){return Tn},unpairDevice:function(){return Mn}});var y={};e.r(y),e.d(y,{makeTapToPay:function(){return Cn}});var m={};e.r(m),e.d(m,{checkIfAppUpdateAvailable:function(){return Bn},updateApplication:function(){return Wn}});var h={};e.r(h),e.d(h,{addToSiri:function(){return Un}});var w={};e.r(w),e.d(w,{initBeaconData:function(){return Jn}});var R="undefined"!=typeof window,b=R&&window.WebToNativeInterface||{},T=R&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,k=b.getAndroidVersion?"ANDROID_APP":T?"IOS_APP":"WEBSITE",M=R&&"WEBSITE"!==k,F={},E=1,C=null;M&&(b.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,F){var i=F[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete F[t]):(o(n),a||delete F[t])}},window.iOSAdMobCBHook=b.androidAdMobCBHook=function(e){var n=JSON.parse(e);C&&C(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in F){var i=F[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete F[t]):(o(n),a||delete F[t])}});var B=function(e,n){"function"==typeof e&&(n&&n.key?F[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(F[E]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},E+=1))},W=function(e){"function"==typeof e&&(C=e)},U=function(){C&&(C=null)},J="ANDROID_APP"===k,L="IOS_APP"===k,V=function(){M&&b.hideSplashScreen()},j=function(e){M&&(J?b.statusBar(JSON.stringify(e)):L&&T.postMessage({action:"statusBar",color:e.color,style:e.style}))},H=function(e){M&&(J||L&&T.postMessage({action:"downloadFile",downloadUrl:e}))},x=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(k)&&L&&T.postMessage({action:"downloadBlobFile",fileName:n,url:t})},q=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(k)&&"ANDROID_APP"===k&&b.downloadFile(JSON.stringify({url:n,fileName:t,isBlob:i,mimeType:o,cookies:r,userAgent:a,openFileAfterDownload:c}))},K=function(){return new Promise((function(e,n){B((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===k?b.getDeviceInfo():"IOS_APP"===k?T.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},G=function(){M&&b.showInAppReview()},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.isLocationServiceEnabled())},X=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";J&&b.openShareIntent(t),L&&T.postMessage({action:"share",url:t})},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";J&&b.openUrlInBrowser(e)},Z=function(e){J&&b.enableSwipeRefresh(e)},Y=function(e){J&&b.clearWebViewCache(JSON.stringify({reload:e}))},$=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;J&&b.shareFile(e,n,t)},ee=function(){J&&b.closeApp(),L&&T.postMessage({action:"closeApp"})},ne=function(e){if(["ANDROID_APP"].includes(k)){var n=e.callback,t=e.showDate,i=e.showTime;B((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),J&&b.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},te=function(e){if(["ANDROID_APP"].includes(k)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;J&&b.print(JSON.stringify({type:t,url:o}))}},ie=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback;B((function(e){"nfcSupported"===e.type&&n&&n(e)})),J&&b.nfcSupported(),L&&T.postMessage({action:"nfcSupported"})}},oe=function(e){["ANDROID_APP","IOS_APP"].includes(k)&&(J&&b.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),L&&T.postMessage(e))},re=function(e){["IOS_APP"].includes(k)&&(e.data&&(e.data=JSON.stringify(e.data)),L&&T.postMessage(e))},ae=function(){return new Promise((function(e,n){B((function(t){"firstCallWhenAppStarted"===t.type&&(t?e(t):n({err:"Error getting request"}))}),{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===k?b.firstCallWhenAppStarted():"IOS_APP"===k?T.postMessage({action:"firstCallWhenAppStarted"}):n("This function will work in Native App Powered By WebToNative")}))},ce=function(){["ANDROID_APP"].includes(k)&&J&&b.forceUpdateCookies()},se=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.values;B((function(e){var t=e.type;e.typeValue,"openAppSettingForPermission"===t&&n&&n(e)})),J&&b.openAppSettingForPermission(t),L&&T.postMessage({action:"openAppSettingForPermission",values:t})}},ue=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.permission,i=e.openAppSetting,o=void 0!==i&&i,r=e.alertDialogStyle;B((function(e){var t=e.type,i=e.typeValue;"showPermission"!==t&&"showPermission"!==i||n&&n(e)})),J&&b.showPermission(JSON.stringify({permission:t,openAppSetting:o,alertDialogStyle:r})),L&&T.postMessage({action:"showPermission",permission:t,openAppSetting:o,alertDialogStyle:r})}},Pe=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.active,t=void 0!==n&&n,i=e.iconName,o=void 0===i?null:i;J&&b.updateAppIcon(JSON.stringify({active:t,iconName:o})),L&&T.postMessage({action:"updateAppIcon",iconName:o,active:t})}},Ae=function(e){if(["IOS_APP"].includes(k)){var n=e.ssKey,t=void 0!==n&&n;L&&T.postMessage({action:"disableScreenshotForPage",ssKey:t})}},le=function(e){if(["ANDROID_APP"].includes(k)){var n=e.enable,t=void 0!==n&&n;J&&b.customBackHandling(JSON.stringify({enable:t}))}},de=function(e){if(["IOS_APP"].includes(k)){var n=e.callback;B((function(e){"getSafeArea"===e.type&&n&&n(e)})),L&&T.postMessage({action:"getSafeArea"})}},fe=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.addOnName;B((function(e){"getAddOnStatus"===e.type&&n&&n(e)})),J&&b.getAddOnStatus(JSON.stringify({addOnName:t})),L&&T.postMessage({action:"getAddOnStatus",addOnName:t})}},pe=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.permissionName;B((function(e){"checkPermission"===e.type&&n&&n(e)})),J&&b.checkPermission(JSON.stringify(t)),L&&T.postMessage({action:"checkPermission",permissionName:t})}},Oe=function(e){if(["ANDROID_APP"].includes(k)){var n=e.orientation,t=e.forceOrientation,i=void 0!==t&&t;J&&b.setOrientation(JSON.stringify({orientation:n,forceOrientation:i}))}},ge={isAndroidApp:J,isIosApp:L,hideSplashScreen:V,statusBar:j,deviceInfo:K,showInAppReview:G,shareLink:X,platform:k,isNativeApp:M,isDeviceGPSEnabled:z,openUrlInBrowser:Q,enablePullToRefresh:Z,shareFile:$,clearAppCache:Y,closeApp:ee,showDateTimePicker:ne,downloadBlobFile:x,customFileDownload:q,printFunction:te,loadOfferCard:oe,appFirstLoad:ae,addToSiri:re,showPermission:ue,forceUpdateCookies:ce,updateAppIcon:Pe,disableScreenshot:Ae,getSafeArea:de,getAddOnStatus:fe,setOrientation:Oe,checkPermission:pe,openAppSettingForPermission:se,customBackHandling:le},Ie=function(){return new Promise((function(e,n){B((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===k?b.getOneSignalId():"IOS_APP"===k?T.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},De=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===k)return M&&b.setExternalUserId(e);"IOS_APP"===k&&T.postMessage({action:"setExternalUserId",userId:e})},Se=function(){if("ANDROID_APP"===k)return M&&b.removeExternalUserId();"IOS_APP"===k&&T.postMessage({action:"removeExternalUserId"})},_e=function(e){var n=e.tags;if(n){if("ANDROID_APP"===k)return M&&b.setUserTags(JSON.stringify(n));"IOS_APP"===k&&T.postMessage({action:"setUserTags",tags:n})}},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===k?b.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===k&&T.postMessage({action:"addTrigger",key:n,value:t})},Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===k?b.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===k&&T.postMessage({action:"addTriggers",triggers:n})},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===k?b.removeTriggerForKey(n):"IOS_APP"===k&&T.postMessage({action:"removeTrigger",key:n})},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===k?b.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===k&&T.postMessage({action:"removeTriggers",keys:n})},he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===k?b.getTriggerValueForKey(n):"IOS_APP"===k&&T.postMessage({action:"getTriggerValue",key:n}))},we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===k?b.getTriggers():"IOS_APP"===k&&T.postMessage({action:"getTriggers"}))},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(k)&&"ANDROID_APP"===k&&b.setEmail(n)},be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(k)&&"ANDROID_APP"===k&&b.setSMSNumber(n)},Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(k)&&"ANDROID_APP"===k&&b.logoutEmail(n)},ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(k)&&"ANDROID_APP"===k&&b.logoutSMSNumber(n)},Me=function(){"ANDROID_APP"===k?b.optInOneSignalPermissionDialog():"IOS_APP"===k&&T.postMessage({action:"optInOneSignalPermissionDialog"})},Fe=function(){"ANDROID_APP"===k?b.optOutOneSignalPermissionDialog():"IOS_APP"===k&&T.postMessage({action:"optOutOneSignalPermissionDialog"})},Ee=void 0,Ce=null,Be={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},We={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},Ue=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.onBarcodeSearch,t=e.format;B((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===k&&b.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===k&&T.postMessage({action:"barcodeScan",barcodeFormat:String(t||Be.ALL_FORMATS)})}},Je=void 0,Le=null,Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(k))return"IOS_APP"===k&&T.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===k&&b.showBannerAd(JSON.stringify(e)),Je},je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.fullScreenAdCallback;return W((function(e){var n=e.status;Le&&Le(e),"adDismissed"===n&&(Le=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&U()})),"IOS_APP"===k&&T.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===k&&b.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(Le=n),Je}},He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.rewardsAdCallback;return W((function(e){var n=e.status;Le&&Le(e),"adDismissed"===n&&(Le=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&U()})),"IOS_APP"===k&&T.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===k&&b.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(Le=n),Je}},xe={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.scope;B((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.loginWithFacebook(),"IOS_APP"===k&&T.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.scope;B((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.logoutWithFacebook(),"IOS_APP"===k&&T.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.scope;B((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.signInWithGoogle(),"IOS_APP"===k&&T.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.scope;B((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.signOutWithGoogle(),"IOS_APP"===k&&T.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.scope;B((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===k&&T.postMessage({action:"appleSignIn",scope:t})}}}},qe=function(e){["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.setAppsFlyerUserId(e),"IOS_APP"===k&&T.postMessage({action:"setAppsFlyerUserId",userId:e}))},Ke=function(e,n){["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===k&&T.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},Ge=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===k&&b.addFbEvents(n,i),"IOS_APP"===k&&T.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},ze=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===k&&b.addFbPurchaseEvent(n,t,i),"IOS_APP"===k&&T.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},Xe=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.showHideStickyFooter(!1),"IOS_APP"===k&&T.postMessage({action:"showHideStickyFooter",show:!1}))},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.showHideStickyFooter(!0),"IOS_APP"===k&&T.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.getPermissionStatus(),"IOS_APP"===k&&T.postMessage({action:"askUserForContactPermission"}))},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.getAll(),"IOS_APP"===k&&T.postMessage({action:"getUserContactDetails"}))},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(k)){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;B((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===k&&T.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:s,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===k&&b.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:s}))}},en=function(){["ANDROID_APP","IOS_APP"].includes(k)&&(delete F["LOCATION_UPDATE"],"IOS_APP"===k&&T.postMessage({action:"stopLocation"}),"ANDROID_APP"===k&&b.stopTrackingLocation())},nn=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("IOS_APP"===k&&T.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===k&&b.keepScreenOn())},tn=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("IOS_APP"===k&&T.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===k&&b.keepScreenNormal())},on=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===k&&T.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===k&&b.getText())},rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(k)&&("IOS_APP"===k&&T.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===k&&b.setText(e.data||""))},an=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("IOS_APP"===k&&T.postMessage({action:"showAppRating"}),"ANDROID_APP"===k&&b.showInAppReview())},cn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.checkBiometricStatus(),"IOS_APP"===k&&T.postMessage({action:"checkBiometricStatus"}))},sn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.saveSecret(t),"IOS_APP"===k&&T.postMessage({action:"saveBiometricSecret",secret:t}))},un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.deleteSecret(),"IOS_APP"===k&&T.postMessage({action:"deleteBiometricSecret"}))},Pn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===k&&T.postMessage({action:"showBiometric",prompt:t||""}))},An=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(k)&&(B((function(e){"biometricAuthWithDismissOnCancel"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.biometricAuthWithDismissOnCancel(JSON.stringify({prompt:t||"Authenticate to continue!",isAuthenticationOptional:o})))},ln=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(k)&&(B((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===k&&T.postMessage({action:"requestTrackingAuthorization"}))},dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(k)&&(B((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===k&&T.postMessage({action:"trackingConsentStatus"}))},fn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.enabled;"IOS_APP"===k&&T.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===k&&b.setFirebaseAnalyticsCollection(n)}},pn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.userId;"IOS_APP"===k&&T.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===k&&b.setFirebaseUserId(n)}},On=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.key,t=e.value;"IOS_APP"===k&&T.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===k&&b.setFirebaseUserProp(n,t)}},gn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.parameters;"IOS_APP"===k&&T.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===k&&b.setFirebaseDefaultParam(n)}},In=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.eventName,t=e.parameters;"IOS_APP"===k&&T.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===k&&b.logFirebaseEvent(n,t)}},Dn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.screenName,t=e.screenClass;"IOS_APP"===k&&T.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===k&&b.logFirebaseScreenView(n,t)}},Sn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.toTopic;"IOS_APP"===k&&T.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===k&&b.subscribeToTopic(n)}},_n=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.fromTopic;"IOS_APP"===k&&T.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===k&&b.unsubscribeFromTopic(n)}},vn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback;B((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===k&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===k&&T.postMessage({action:"getFCMToken"}),"ANDROID_APP"===k&&b.getRegistrationToken()}},Nn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(k)&&"IOS_APP"===k&&T.postMessage({action:"haptikEffect",effect:e.effect})},yn=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(k)&&("ANDROID_APP"===k&&b.playMedia(JSON.stringify({url:n,imageUrl:i})),"IOS_APP"===k&&T.postMessage({action:"playMedia",url:n,image:i}))},mn=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.pausePlaying(),"IOS_APP"===k&&T.postMessage({action:"pauseMedia"}))},hn=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.stopPlaying(),"IOS_APP"===k&&T.postMessage({action:"stopMedia"}))},wn=function(e){if(["ANDROID_APP"].includes(k)){var n=e.printSize,t=void 0===n?"ISO_A4":n,i=e.label,o=void 0===i?"":i;"ANDROID_APP"===k&&b.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(k)&&(B((function(e){"checkNotificationPermission"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.checkNotificationPermission(),"IOS_APP"===k&&T.postMessage({action:"checkNotificationPermission"}))},bn=function(){["ANDROID_APP","IOS_APP"].includes(k)&&("ANDROID_APP"===k&&b.openAppNotificationPage(),"IOS_APP"===k&&T.postMessage({action:"openAppNotificationPage"}))},Tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP"].includes(k)&&(B((function(e){"startBluetoothScan"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.startBluetoothScan())},kn=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(k)&&(B((function(e){"pairWithDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.pairWithDevice(JSON.stringify({address:t,timeout:o})))},Mn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address;["ANDROID_APP"].includes(k)&&(B((function(e){"unpairDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.unpairDevice(JSON.stringify({address:t})))};function Fn(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 En(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Cn=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){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;B((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"===k&&b.makeTapToPayStripePayment(JSON.stringify(f)),"IOS_APP"===k&&T.postMessage(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach((function(n){En(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({action:"makeTapToPayStripePayment"},f))}},Bn=function(e){if(["ANDROID_APP"].includes(k)){var n=e.callback;B((function(e){"checkIfAppUpdateAvailable"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.checkIfAppUpdateAvailable()}},Wn=function(e){if(["ANDROID_APP"].includes(k)){var n=e.updateType,t=void 0===n?"immediate":n,i=e.callback;B((function(e){"updateApplication"===e.type&&i&&i(e)})),"ANDROID_APP"===k&&b.updateApplication(t)}},Un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionUrl,t=e.suggestedPhrase,i=e.title;["IOS_APP"].includes(k)&&"IOS_APP"===k&&T.postMessage({action:"addToSiri",data:{actionUrl:n,suggestedPhrase:t,title:i}})},Jn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.beaconData;["ANDROID_APP","IOS_APP"].includes(k)&&(B((function(e){"initBeaconData"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.initBeaconData(JSON.stringify(t)),"IOS_APP"===k&&T.postMessage({action:"initBeaconData",data: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 B((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(Ce&&Ce(t),Ce=null)})),M&&b.openVoiceSearch(),"function"==typeof n&&(Ce=n),Ee},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=xe,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(k)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;B((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===k&&T.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===k&&b.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(k)){var n=e.callback;B((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===k&&b.getAllPurchases({action:"purchaseList"})}},window.WTN.getReceiptData=function(e){if(["IOS_APP"].includes(k)){var n=e.callback;B((function(e){"getReceiptData"===e.type&&n&&n(e)})),"IOS_APP"===k&&T.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.WTN.Siri=h,window.WTN.Beacon=w,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){T.postMessage({action:"share",url:e.url}),n()}))})}();
|