webtonative 1.0.70 → 1.0.71
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/Stripe/index.js +1 -1
- package/package.json +1 -1
- package/webtonative.min.js +1 -1
package/Stripe/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _utills=require("../utills");Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeTapToPay=void 0;function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var makeTapToPay=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.apiUrl,d=void 0===c?null:c,e=a.amount,f=a.currency,g=a.isSimulated,h=a.captureMethod,i=void 0===h?"automatic":h,j=a.connectionToken,k=a.stripeLocationId;(0,_utills.registerCb)(function(a){var c=a.type;"makeTapToPayStripePayment"===c&&b&&b(a)});var
|
|
1
|
+
"use strict";var _utills=require("../utills");Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeTapToPay=void 0;function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var makeTapToPay=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.apiUrl,d=void 0===c?null:c,e=a.amount,f=a.currency,g=a.isSimulated,h=a.captureMethod,i=void 0===h?"automatic":h,j=a.connectionToken,k=a.stripeLocationId,l=a.clientSecret,m=void 0===l?null:l;(0,_utills.registerCb)(function(a){var c=a.type;"makeTapToPayStripePayment"===c&&b&&b(a)});var n={secretToken:j,amount:e,currency:f,isSimulated:void 0!==g&&g,captureMethod:i,locationId:k};d&&(n.apiUrl=d),m&&(n.client_secret=m),"ANDROID_APP"===_utills.platform&&_utills.webToNative.makeTapToPayStripePayment(JSON.stringify(n)),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage(_objectSpread({action:"makeTapToPayStripePayment"},n))}};exports.makeTapToPay=makeTapToPay;
|
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;F((function(e){"makeTapToPayStripePayment"===e.type&&n&&n(e)}));var l={secretToken:P,amount:o,currency:r,isSimulated:s,captureMethod:u,locationId:A};i&&(l.apiUrl=i),"ANDROID_APP"===h&&w.makeTapToPayStripePayment(JSON.stringify(l)),"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"},l))}};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 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()}))})}();
|