-
Notifications
You must be signed in to change notification settings - Fork 31
/
bundle.js
1 lines (1 loc) · 80.3 KB
/
bundle.js
1
var PhonePe=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(6),r=n(5),a=n(3),s=n(12);class o{static callback(e,t,n,i){r.Logger.logd("PhonePe","phonepeCallback called! with callbackName = "+e);let s=o.promiseMapping[e];s&&("1"===t?s[a.PhonePeSDKWebConstants.General.resolve](n):s[a.PhonePeSDKWebConstants.General.reject](i),delete o.promiseMapping[e])}static callNative(e,t,n){if(!s.MethodVersioningHandler.isMethodSupported(e))return void r.Logger.logd("PhonePe","Sorry! This method is not supported with PhonePe app's version");r.Logger.logd("PhonePe","Trying to call methodName = "+e);let a=window.webkit;if(i.PhonePeUtils.isValidMethodOniOS(e))a.messageHandlers[e].postMessage(n);else{window[t][e](JSON.stringify(n))}}static storePromiseAndCallNative(e,t,n){return new Promise((r,s)=>{let o=i.PhonePeUtils.createuuid();n[a.PhonePeSDKWebConstants.General.callbackId]=o,this.callNative(e,t,n),this.promiseMapping[o]={resolve:r,reject:s}})}static callReactNative(e,t){const n={methodName:e,payload:t},i=window;i.ReactNativeWebView?i.ReactNativeWebView.postMessage(JSON.stringify(n)):i.postMessage(JSON.stringify(n),"")}}o.promiseMapping={},t.MessagingHandler=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){let t,n,i,r,a,s,o,c,l,d;!function(e){e.READ_SMS="READ_SMS",e.LOCATION="LOCATION",e.CAMERA="CAMERA",e.WRITE_EXTERNAL_STORAGE="WRITE_EXTERNAL_STORAGE",e.READ_EXTERNAL_STORAGE="READ_EXTERNAL_STORAGE"}(t=e.Permission||(e.Permission={})),function(e){e.USER_NAME="USER_NAME",e.USER_PHONE_NO="USER_PHONE_NO",e.ADDRESS="ADDRESS",e.USER_EMAIL="USER_EMAIL"}(n=e.ResourceType||(e.ResourceType={})),function(e){e.LANDSCAPE="LANDSCAPE",e.PORTRAIT="PORTRAIT",e.DEVICE="DEVICE"}(i=e.OrientationMode||(e.OrientationMode={})),function(e){e.web="web",e.native="native"}(r=e.Species||(e.Species={})),function(e){e.ios="ios",e.android="android"}(a=e.OS||(e.OS={})),function(e){e.ios="phonepe-ios",e.android="phonepe-android"}(s=e.OSUserAgent||(e.OSUserAgent={})),function(e){e.email="email",e.name="name",e.phoneNumber="phoneNumber",e.isEmailVerified="isEmailVerified"}(o=e.UserDetail||(e.UserDetail={})),function(e){e.DEEPLINK="DEEPLINK",e.NODEMAP="NODEMAP"}(c=e.DeeplinkType||(e.DeeplinkType={})),function(e){e.BleManagerDidUpdateState="BleManagerDidUpdateState",e.BleManagerStopScan="BleManagerStopScan",e.BleManagerDiscoverPeripheral="BleManagerDiscoverPeripheral",e.BleManagerDidUpdateValueForCharacteristic="BleManagerDidUpdateValueForCharacteristic",e.BleManagerConnectPeripheral="BleManagerConnectPeripheral",e.BleManagerDisconnectPeripheral="BleManagerDisconnectPeripheral"}(l=e.BlueToothListenerEvents||(e.BlueToothListenerEvents={})),function(e){e.LOCAL="LOCAL",e.REMOTE="REMOTE",e.DEFERRED="DEFERRED"}(d=e.ConfigDownloadStrategy||(e.ConfigDownloadStrategy={})),e.version="1.0.4"}(t.ExternalConstants||(t.ExternalConstants={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){let t,n,i,r,a,s,o,c,l,d,u,g,h,p;e.sdkVersion="0.1",e.PhonePeSDKRNMajorVersion=0,e.PhonePeSDKRNMinorVersion=53,e.data_preferences="database_versions",e.PhonePeSDKVersion=4,function(e){e.confirmationScreenDuration=400,e.discoveryContextMode="PEER_TO_MERCHANT",e.paymentScreenName="PAY",e.v1="v1",e.v2="v2"}(t=e.General||(e.General={})),function(e){e.invalidParams="PARAMS_INVALID_OR_INSUFFICIENT"}(n=e.ErrorCode||(e.ErrorCode={})),function(e){e.payments=103,e.transactionDetails=105}(i=e.ActivityID||(e.ActivityID={})),function(e){e.name="PermissionsBridge",e.seekPermission="seekPermission",e.openSettingsPage="openSettingsPageForPermission",e.androidPrefix="android.permission.",e.locationPermissionName="ACCESS_FINE_LOCATION",e.kPermission="permission",e.kPermissionStatus="permissionGranted",e.kShowAgain="willShowPermissionAlertAgain"}(r=e.PermissionsBridge||(e.PermissionsBridge={})),function(e){e.bridgeName="AnalyticsBridge",e.methodName="logMerchantEvent",e.kName="name",e.kMetadata="metadata",e.kGroupingKey="groupingKey"}(a=e.AnalyticsBridge||(e.AnalyticsBridge={})),function(e){e.bridgeName="AuthBridge",e.fetchGrantToken="fetchGrantToken",e.fetchAuthToken="fetchAuthToken",e.fetchPermissionGrantToken="resourceGrant",e.resourceGrant="resourceGrant"}(s=e.AuthBridge||(e.AuthBridge={})),function(e){e.bridgeName="OrientationBridge",e.changeOrientation="changeOrientation",e.requestFullScreenMode="requestFullScreenMode",e.requestExitFullScreenMode="requestExitFullScreenMode"}(o=e.OrientationBridge||(e.OrientationBridge={})),function(e){e.bridgeName="OrderActionBridge",e.reserveOrder="reserveOrder",e.fetchOrderRequestToken="fetchOrderRequestToken",e.openPaymentsPageForReservedOrder="openPaymentsPageForReservedOrder"}(c=e.OrderActionBridge||(e.OrderActionBridge={})),function(e){e.bridgeName="FilePickerBridge",e.selectFile="selectFile",e.readFile="readFile"}(l=e.FilePickerBridge||(e.FilePickerBridge={})),function(e){e.bridgeName="CameraBridge",e.scanQRCode="scanQRCode",e.startCamera="startCamera"}(d=e.CameraBridge||(e.CameraBridge={})),function(e){e.bridgeName="BleManager",e.read="read",e.readRSSI="readRSSI",e.refreshCache="refreshCache",e.retrieveServices="retrieveServices",e.write="write",e.writeWithoutResponse="writeWithoutResponse",e.connect="connect",e.createBond="createBond",e.removeBond="removeBond",e.disconnect="disconnect",e.startNotification="startNotification",e.stopNotification="stopNotification",e.checkState="checkState",e.start="start",e.scan="scan",e.stopScan="stopScan",e.enableBluetooth="enableBluetooth",e.getConnectedPeripherals="getConnectedPeripherals",e.getBondedPeripherals="getBondedPeripherals",e.getDiscoveredPeripherals="getDiscoveredPeripherals",e.removePeripheral="removePeripheral",e.isPeripheralConnected="isPeripheralConnected",e.requestConnectionPriority="requestConnectionPriority",e.requestMTU="requestMTU",e.registerBluetoothOperationSuccessCallback="registerBluetoothOperationSuccessCallback"}(u=e.BleManager||(e.BleManager={})),function(e){e.bridgeName="VideoPlayerBridge",e.startVideoPlayer="startVideoPlayer"}(g=e.VideoPlayerBridge||(e.VideoPlayerBridge={})),function(e){e.videoCall="videoCall"}(h=e.Feature||(e.Feature={})),function(e){e.bridgeName="UIConfigBridge",e.fetchUiConfig="fetchUiConfig"}(p=e.UIConfigBridge||(e.UIConfigBridge={}))}(t.InternalConstants||(t.InternalConstants={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){let t,n,i,r,a,s,o,c,l,d,u,g,h;!function(e){e.reject="reject",e.resolve="resolve",e.callbackId="callbackId",e.prefName="prefName",e.key="key",e.defaultValue="defaultValue",e.value="value",e.min="min",e.max="max"}(t=e.General||(e.General={})),function(e){e.androidBridgeName="PreferencesBridge",e.getItem="getItem",e.setItem="setItem",e.removeItem="removeItem",e.removeItemAndroid="removeKey"}(n=e.Preferences||(e.Preferences={})),function(e){e.supportedVersion="getSupportedWebSDKVersion",e.androidBridgeName="MetadataBridge"}(i=e.Metadata||(e.Metadata={})),function(e){e.androidBridgeName="AppDetailsBridge",e.getAppDetails="getAppDetails"}(r=e.DeviceInfo||(e.DeviceInfo={})),function(e){e.androidBridgeName="LocationBridge",e.androidCachedBridgeName="CachedLocationBridge",e.startUpdatingLocation="startUpdatingLocation",e.stopUpdatingLocation="stopUpdatingLocation",e.getCurrentLocation="getCurrentLocation",e.getCachedLocation="getCachedLocation",e.locationSuccessEventKey="locationUpdated",e.locationFailureEventKey="failedToUpdateLocation",e.forceNewLocation="forceNew",e.getAddress="getAddress"}(a=e.Location||(e.Location={})),function(e){e.androidBridgeName="CachedLocationBridge"}(s=e.CachedLocationBridge||(e.CachedLocationBridge={})),function(e){e.androidBridgeName="AppDetailsBridge"}(o=e.AppDetailsBridge||(e.AppDetailsBridge={})),function(e){e.androidBridgeName="NavigationBridge",e.processRequest="processRequest",e.navigateToPath="navigateToPath",e.navigateToPathForResult="navigateToPathForResult",e.navigateToGenericPaymentForResult="navigateToGenericPaymentForResult",e.navigateToGenericPayment="navigateToGenericPayment",e.closeApp="closeApp",e.navigateToDeeplink="navigateToDeeplink",e.navigateToMap="navigateToMap",e.navigateToSwitchApp="navigateToSwitchApp",e.openSwitchApp="openSwitchApp"}(c=e.Navigation||(e.Navigation={})),function(e){e.navigateToPaymentsView="openPaymentsPage",e.navigateToTransactionDetail="openTransactionDetailsPage",e.navigateToGenericPaymentsView="openGenericPaymentsPage",e.navigateToHelpPage="openHelpPage",e.navigateToReactView="openReactView",e.closeApp="closeApp",e.navigateToDeeplink="navigateToDeeplink",e.openSwitchApp="openSwitchApp"}(l=e.NavigationIOS||(e.NavigationIOS={})),function(e){e.merchantId="merchantId",e.discoveryMode="mode",e.discoveryModeValue="PEER_TO_MERCHANT",e.title="Pay",e.transactionType="SENT_PAYMENT",e.timeoutTitle="Payment Expired",e.timeoutMessage="Sorry! Your payment request timed out. Please try again.",e.timeoutActionButtonTitle="OK",e.dismissTitle="Are you sure?",e.dismissMessage="Going back will cancel the payment. Are you sure you want to proceed?",e.dismissPositiveButtonTitle="I'm sure",e.dismissNegativeButtonTitle="Dismiss"}(d=e.Payments||(e.Payments={})),function(e){e.getUserDetails="getUserDetails",e.androidBridgeName="UserBridge",e.attributes="attributes"}(u=e.User||(e.User={})),function(e){e.androidBridgeName="CameraBridge",e.scanQRCode="scanQRCode",e.startCamera="startCamera"}(g=e.Camera||(e.Camera={})),function(e){e.closeView="closeView",e.sucessResponse="sucessResponse",e.failureResponse="failureResponse"}(h=e.React||(e.React={}))}(t.PhonePeSDKWebConstants||(t.PhonePeSDKWebConstants={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5);class r{static addSubscription(e){let t=this.eventNameToSubscriptionMapping[e.eventName];t?t.push(e):(t=[]).push(e),this.eventNameToSubscriptionMapping[e.eventName]=t}static removeSubscription(e){let t=e.eventName,n=e.callbackName,i=this.eventNameToSubscriptionMapping[t];if(i){let e=[],t=0;for(let r of i)r.callbackName===n&&(e.push(t),t++);for(;e.length;){let t=e.pop();t&&i.splice(t,1)}}}static removeAllSubscriptions(e){this.eventNameToSubscriptionMapping.hasOwnProperty(e)&&delete this.eventNameToSubscriptionMapping[e]}static sendEvent(e,t){let n=this.eventNameToSubscriptionMapping[e];if(n)for(let e of n)e.listener(t);else i.Logger.logd("PhonePe","[Error] No subscribers for eventName = "+e)}}r.eventNameToSubscriptionMapping={},t.EventHandler=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(8);class r{static isLoggingEnabled(){return i.PhonePe.loggingEnabled}static logd(e,t){r.isLoggingEnabled()&&console.log("["+e+"] "+t)}constructor(e){this.tag=e}logd(e){r.logd(this.tag,e)}logAnything(e){console.log(e)}logError(e){0}}t.Logger=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(2);var a=i.ExternalConstants.Permission;class s{static assert(e,t){if(!e)throw new Error(t)}static assertString(e,t){s.assertType(e,"string",t)}static assertNumber(e,t){s.assertType(e,"number",t)}static assertBoolean(e,t){s.assertType(e,"boolean",t)}static assertFunction(e,t){s.assertType(e,"function",t)}static assertArray(e,t){if((!t||e)&&e.constructor!==Array)throw new TypeError(r.InternalConstants.ErrorCode.invalidParams)}static assertObject(e,t){s.assertType(e,"object",t)}static assertType(e,t,n){if((!n||e)&&typeof e!==t)throw new TypeError(r.InternalConstants.ErrorCode.invalidParams)}static returnResolution(e){return new Promise((t,n)=>{t(e)})}static returnRejection(e){return new Promise((t,n)=>{n(e)})}static isValidSpecies(e){return e===i.ExternalConstants.Species.web||e===i.ExternalConstants.Species.native}static isValidOS(e){return e===i.ExternalConstants.OS.ios||e===i.ExternalConstants.OS.android}static createuuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}static osSpecificPermissionNames(e,t){let n=[];for(let s of e)if(t===i.ExternalConstants.OS.ios)n.push(a[s]);else{let e="";e=s===a.LOCATION?r.InternalConstants.PermissionsBridge.androidPrefix+r.InternalConstants.PermissionsBridge.locationPermissionName:r.InternalConstants.PermissionsBridge.androidPrefix+a[s],n.push(e)}return n}static strippedPermissionName(e,t){if(t===i.ExternalConstants.OS.ios)return e;let n=r.InternalConstants.PermissionsBridge.androidPrefix,s=e.replace(new RegExp("^"+n),"");return s===r.InternalConstants.PermissionsBridge.locationPermissionName&&(s=a.LOCATION),s}static isValidMethodOniOS(e){let t=window.webkit;return t&&t.messageHandlers&&t.messageHandlers[e]&&"function"==typeof t.messageHandlers[e].postMessage}static getReserveOrderPayload(e,t){const n={};return n["X-PROVIDER-ID"]=t,{headers:n,body:e}}}t.PhonePeUtils=s},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.WebView="WebView",e.ReactView="ReactView",e.PaymentsView="PaymentView",e.GenericPaymentsView="GenericPaymentsView",e.AppScreen="AppScreen",e.ContactPicker="ContactPicker",e.TransactionDetail="TransactionDetail",e.Profile="Profile",e.HelpPage="HelpPage",e.MandateSetup="MandateSetup",e.AddToWallet="AddToWallet",e.MicroApp="MicroApp",e.PWAWebView="PWAWebView",e.Deeplink="Deeplink"}(i=t.NavigationScreenType||(t.NavigationScreenType={}));class r{constructor(e,t,n,i){this.screenType=e,this.title=t,this.animated=n,this.showModally=i,this.isNewTask=!1}}t.BaseNavigationRequest=r;t.ReactViewNavigationRequest=class extends r{constructor(e,t,n,r,a,s,o,c,l,d,u,g,h){super(i.ReactView,r,a,s),this.appId=g,this.bundleName=e,this.componentName=t,this.shouldShowToolbar=n,this.toolBarText=r,this.animated=a,this.showModally=s,this.initialProperties=o,this.category=c,this.merchantId=l,this.merchantName=d,this.tAndCUrl=u,this.appUniqueId=h}};t.WebViewNavigationRequest=class extends r{constructor(e,t,n,r,a,s,o,c,l){super(i.WebView,t,c,l),this.url=e,this.title=t,this.shouldShowToolBar=n,this.shouldShowBackButton=r,this.screenName=a,this.shouldAllowWebViewBack=s,this.shouldShowProgressWhileLoading=o}};t.PWAWebViewNavigationRequest=class extends r{constructor(e,t,n,r){super(i.PWAWebView,"",!0,!0),this.merchantId=e,this.deepLinkUrl=t,this.appId=n,this.appUniqueId=r}};t.AppScreenNavigationRequest=class extends r{constructor(e,t,n,r,a,s){super(i.AppScreen,r,a,s),this.screenName=e,this.url=t,this.params=n}};t.PaymentMetaData=class{constructor(e){this.details=e}};t.PaymentNavigationRequest=class extends r{constructor(e,t,n,r,a,s,o,c,l,d){super(i.PaymentsView,t,n,r),this.mode=a,this.microPayRequest=s,this.internalPaymentUiConfig=o,this.transactionType=c,this.metaData=l,this.originInfo=d}};t.GenericPaymentNavigationRequest=class extends r{constructor(e,t,n,r,a){super(i.GenericPaymentsView,e,t,n),this.reservationId=r,a&&(this.fallbackUrl=a)}};t.MandateSetupNavigationRequest=class extends r{constructor(e,t,n,r,a,s){super(i.MandateSetup,n,r,a),this.mandateContext=e,this.mandateUiConfig=t,this.mandateType=s||"MERCHANT"}};t.AddToWalletNavigationRequest=class extends r{constructor(e,t,n,r){super(i.AddToWallet,t,n,r),this.addToWalletUiContext=e}};t.TransactionDetailsNavigationRequest=class extends r{constructor(e,t,n,r,a,s,o){super(i.TransactionDetail,t,n,r),this.transactionId=a,this.transactionType=s,this.info=o}};t.ContactNavigationRequest=class extends r{constructor(e,t,n,r,a,s,o,c,l,d,u,g,h,p){super(i.ContactPicker,t,n,r),this.contactPickerMode=a,this.contactPickerType=s,this.initialContacts=o,this.transactionType=c,this.isVpaEnable=l,this.isSelfEnable=d,this.phoneContact=u,this.vpaContact=g,this.accountContact=h}};t.ProfileNavRequest=class extends r{constructor(e,t,n,i){super(e,t,n,i)}};t.HelpPageNavRequest=class extends r{constructor(e,t,n,r,a,s,o,c,l){super(i.HelpPage,t,n,r),this.transactionId=e,this.screen=o,this.url=c,this.shouldShowToolBar=a,this.shouldAllowWebViewBack=s,this.freshBotIntentData=l}};t.FreshBotIntentData=class{constructor(e){this.freshBotScreens=e,this.queryParams={}}};t.CloseAppNavRequest=class{constructor(e){this.appIdentifier=e}};t.MicroAppNavigationRequest=class extends r{constructor(e,t,n,r,a,s){super(i.MicroApp,r,a,s),this.appId=e,this.appUniqueId=t,this.initialProperties=n}};t.AppNavigationRequest=class extends r{constructor(e,t,n){if(super(i.MicroApp,"",!0,!1),this.deeplinkUrl="",this.appUniqueId=e,this.appType=t,"PWA"===t)this.deeplinkUrl=n,this.initialProperties={merchantOrderContext:JSON.stringify({trackingUrl:n})};else try{this.initialProperties=JSON.parse(n)}catch(e){this.initialProperties={}}}}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(s,o)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),a=n(14),s=n(16),o=n(18),c=n(12),l=n(6),d=n(21),u=n(25),g=n(28),h=n(30),p=n(35),P=n(38),m=n(40),v=n(42),N=n(44),C=n(0),f=n(4),b=n(2),S=n(1),y=n(3),T=n(9),M=n(10),E=n(46),A=n(48),O=n(50),B=n(52),_=n(54);var I=S.ExternalConstants.Permission,w=S.ExternalConstants.BlueToothListenerEvents,R=S.ExternalConstants.DeeplinkType;t.MessagingHandler=C.MessagingHandler,t.EventHandler=f.EventHandler,t.Constants=S.ExternalConstants,t.PaymentModels=M.ExternalPaymentModels;class D{constructor(e,t){this.preferencesModule=p.NativePreferenceBridgeFactory.getNativePreferenceBridge(e,t),this.locationModule=u.LocationBridgeFactory.getNativeLocationBridge(e,t),this.navigationModule=h.NativeNavigationFactory.repository(e,t),this.cameraBridge=A.NativeCameraBridgeFactory.getNativeCameraBridge(e),this.permissionsBridge=o.NativePermissionsBridgeFactory.getPermissionsBridge(e,t),this.analyticsBridge=s.NativeAnalyticsBridgeFactory.getNativeAnalyticsBridge(e,t),this.authBridge=a.NativeOAuthBridgeFactory.bridge(e),this.deviceInfoBridge=P.NativeDeviceInfoBridgeFactory.bridge(e),this.bleManagerBridge=E.default.getBleManagerBridge(e),this.orderActionBridge=m.NativeOrderActionBridgeFactory.bridge(e),this.filePickerBridge=v.NativeFilePickerBridgeFactory.bridge(e),this.orientationBridge=N.OrientationBridgeFactory.getOrientationBridge(e),this.videoPlayerBridge=O.NativeVideoPlayerBridgeFactory.getNativeVideoPlayerBridge(e),this.uiConfigBridge=B.UIConfigBridgeFactory.getUIConfigBridge(e),this.species=e,this.reactModule=g.ReactBridgeFactory.getReactBridge()}static build(e,t){return i(this,void 0,void 0,function*(){let n=t;if(n||(n=this.getOperatingSystem(e)),!n)throw new Error(b.InternalConstants.ErrorCode.invalidParams);if(!l.PhonePeUtils.isValidSpecies(e)||!l.PhonePeUtils.isValidOS(n))throw new Error(b.InternalConstants.ErrorCode.invalidParams);let i=new D(e,n);return e===S.ExternalConstants.Species.web&&(yield c.MethodVersioningHandler.initSupportedVersionFromNative()),i})}static buildReactNative(e,t){return i(this,void 0,void 0,function*(){let n=t;if(n||(n=this.getOperatingSystem(e)),!n)throw new Error(b.InternalConstants.ErrorCode.invalidParams);if(!l.PhonePeUtils.isValidSpecies(e)||!l.PhonePeUtils.isValidOS(n))throw new Error(b.InternalConstants.ErrorCode.invalidParams);return new D(e,n)})}static getOperatingSystem(e){if(e===S.ExternalConstants.Species.web){if(-1!==navigator.userAgent.search(S.ExternalConstants.OSUserAgent.android))return S.ExternalConstants.OS.android;if(-1!==navigator.userAgent.search(S.ExternalConstants.OSUserAgent.ios))return S.ExternalConstants.OS.ios;let e=y.PhonePeSDKWebConstants.NavigationIOS.navigateToPaymentsView;return l.PhonePeUtils.isValidMethodOniOS(e)?S.ExternalConstants.OS.ios:S.ExternalConstants.OS.android}return S.ExternalConstants.OS.android}getItem(e,t,n){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertString(t),l.PhonePeUtils.assertString(n,!0)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.preferencesModule.getString(e,t,n)}setItem(e,t,n){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertString(t),l.PhonePeUtils.assertString(n)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.preferencesModule.saveString(e,t,n),l.PhonePeUtils.returnResolution(void 0)}removeItem(e,t){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertString(t)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.preferencesModule.removeItem(e,t),l.PhonePeUtils.returnResolution(void 0)}startUpdatingLocation(){this.locationModule.startUpdatingLocation()}stopUpdatingLocation(){this.locationModule.stopUpdatingLocation()}getCurrentLocation(){return this.locationModule.getCurrentLocation(!0)}registerLocationUpdateSuccessCallback(e,t){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertFunction(t)}catch(e){return l.PhonePeUtils.returnRejection(e)}let n=this.locationModule.onLocationUpdateSuccess(e,t);return l.PhonePeUtils.returnResolution(n)}registerLocationUpdateFailureCallback(e,t){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertFunction(t)}catch(e){return l.PhonePeUtils.returnRejection(e)}let n=this.locationModule.onLocationUpdateFailure(e,t);return l.PhonePeUtils.returnResolution(n)}getCachedLocation(){return this.locationModule.getCachedLocation()}openPaymentsPage(e,t,n,i,r,a){return this.makeCommonPaymentsPageCall(b.InternalConstants.General.v1,e,t,n,i,r,a)}openTransactionDetailsPage(e){try{l.PhonePeUtils.assertString(e)}catch(e){return l.PhonePeUtils.returnRejection(e)}let t=d.ExternalNavigationFactory.transactionDetailRequest(e);return this.navigationModule.processNavigationRequestForResultAsync(t)}seekPermission(e){try{l.PhonePeUtils.assertArray(e);for(let t of e)l.PhonePeUtils.assertString(t),l.PhonePeUtils.assert(void 0!==I[t],b.InternalConstants.ErrorCode.invalidParams)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.permissionsBridge.seekPermission(e)}openSettingsPageForPermission(){return this.permissionsBridge.openSettingsPageForPermission()}scanQRCode(e,t=".*"){return this.cameraBridge.scanQRCode(e,t)}startCamera(){return this.cameraBridge.startCamera()}loadFont(e,t,n){if(this.species===S.ExternalConstants.Species.web)return l.PhonePeUtils.returnRejection(b.InternalConstants.ErrorCode.invalidParams);throw new Error("Wrong species sent")}logMerchantEvent(e,t){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertObject(t,!0)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.analyticsBridge.logMerchantEvent(e,t)}fetchGrantToken(){return this.authBridge.fetchGrantToken()}fetchPermissionGrantToken(e){return this.authBridge.resourceGrant(e)}fetchAuthToken(){return this.authBridge.fetchAuthToken()}createServiceRequestToken(){return this.orderActionBridge.createServiceRequestToken()}getDeviceInfo(){return this.deviceInfoBridge.getDeviceInfo()}getAppDetails(){return this.deviceInfoBridge.getAppDetails()}bluetoothRead(e,t,n){return this.bleManagerBridge.read(e,t,n)}bluetoothReadRSSI(e){return this.bleManagerBridge.readRSSI(e)}registerBluetoothOperationSuccessCallback(e,t,n){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertFunction(n),l.PhonePeUtils.assert(Boolean(w[t]),b.InternalConstants.ErrorCode.invalidParams)}catch(e){return l.PhonePeUtils.returnRejection(e)}let i=this.bleManagerBridge.registerBluetoothOperationSuccessCallback(e,t,n);return l.PhonePeUtils.returnResolution(i)}bluetoothRefreshCache(e){return this.bleManagerBridge.refreshCache(e)}bluetoothRetrieveServices(e,t){return this.bleManagerBridge.retrieveServices(e,t)}bluetoothWrite(e,t,n,i,r=20){return this.bleManagerBridge.write(e,t,n,i,r)}bluetoothWriteWithoutResponse(e,t,n,i,r=20,a=10){return this.bleManagerBridge.writeWithoutResponse(e,t,n,i,r,a)}bluetoothConnect(e){return this.bleManagerBridge.connect(e)}bluetoothCreateBond(e){return this.bleManagerBridge.createBond(e)}bluetoothRemoveBond(e){return this.bleManagerBridge.removeBond(e)}bluetoothDisconnect(e){return this.bleManagerBridge.disconnect(e)}bluetoothStartNotification(e,t,n){return this.bleManagerBridge.startNotification(e,t,n)}bluetoothStopNotification(e,t,n){return this.bleManagerBridge.stopNotification(e,t,n)}bluetoothCheckState(){this.bleManagerBridge.checkState()}bluetoothStart(e){return this.bleManagerBridge.start(e)}bluetoothScan(e,t,n=!1,i={}){return this.bleManagerBridge.scan(e,t,n,i)}bluetoothStopScan(){return this.bleManagerBridge.stopScan()}bluetoothEnableBluetooth(){return this.bleManagerBridge.enableBluetooth()}bluetoothGetConnectedPeripherals(e){return this.bleManagerBridge.getConnectedPeripherals(e)}bluetoothGetBondedPeripherals(){return this.bleManagerBridge.getBondedPeripherals()}bluetoothGetDiscoveredPeripherals(){return this.bleManagerBridge.getDiscoveredPeripherals()}bluetoothRemovePeripheral(e){return this.bleManagerBridge.removePeripheral(e)}bluetoothIsPeripheralConnected(e,t){return this.bleManagerBridge.isPeripheralConnected(e,t)}bluetoothRequestConnectionPriority(e,t){return this.bleManagerBridge.requestConnectionPriority(e,t)}bluetoothRequestMTU(e,t){return this.bleManagerBridge.requestMTU(e,t)}reserveOrder(e,t){let n;try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertString(t),n=JSON.parse(_.Base64Client.decode(e)),l.PhonePeUtils.assertObject(n)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.orderActionBridge.reserveOrder(l.PhonePeUtils.getReserveOrderPayload(n,t))}proceedToPay(e,t){try{let n={};e&&(n={rid:e}),this.logMerchantEvent("CATEGORY_PAYMENT_INIT",n),l.PhonePeUtils.assertString(e),D.getOperatingSystem(this.species)!==S.ExternalConstants.OS.ios&&l.PhonePeUtils.assertString(t)}catch(e){return l.PhonePeUtils.returnRejection(e)}let n=t?encodeURIComponent(t):"";const i=d.ExternalNavigationFactory.genericPaymentNavigationRequest(e,n);return this.navigationModule.processNavigationRequestForResultAsync(i)}openPaymentsPageForReservedOrder(e,t,n,i,r,a){const s=JSON.parse(_.Base64Client.decode(t));return this.makeCommonPaymentsPageCall(b.InternalConstants.General.v2,e,s,n,i,r,a)}makeCommonPaymentsPageCall(e,t,n,i,r,a,s){try{l.PhonePeUtils.assertString(t),l.PhonePeUtils.assertObject(n),this.species===S.ExternalConstants.Species.web&&l.PhonePeUtils.assertString(i,!0),l.PhonePeUtils.assertString(r,!0),l.PhonePeUtils.assertArray(a,!0)}catch(e){return l.PhonePeUtils.returnRejection(e)}let o=n[T.ExternalPaymentsNamespace.Constant.kPayableAmount],c={};o&&(c={amount:o}),this.logMerchantEvent("CATEGORY_PAYMENT_INIT",c);let u=d.ExternalNavigationFactory.paymentNavigationRequest(t,n,e,i,r,a,s);return new Promise((e,t)=>{this.navigationModule.processNavigationRequestForResultAsync(u).then(t=>{let i={},r=T.ExternalPaymentsNamespace.Constant.kMerchantTransactionId,a=n[r];a&&(i[r]=a),e(i)}).catch(e=>{t(e)})})}selectFile(e,t){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertBoolean(t)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.filePickerBridge.selectFile(e,t)}readFile(e,t,n){try{if(l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertNumber(t),l.PhonePeUtils.assertNumber(n),t<0||n<0)throw new TypeError(b.InternalConstants.ErrorCode.invalidParams)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.filePickerBridge.readFile(e,t,n)}changeOrientation(e){try{if(!e)throw new TypeError(b.InternalConstants.ErrorCode.invalidParams);l.PhonePeUtils.assertString(e)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.orientationBridge.changeOrientation(e)}requestFullScreenMode(){this.orientationBridge.requestFullScreenMode()}requestExitFullScreenMode(){this.orientationBridge.requestExitFullScreenMode()}closeApp(){let e=new r.CloseAppNavRequest("");this.navigationModule.closeAppRequest(e)}openMicroApp(e){try{l.PhonePeUtils.assertString(e)}catch(e){return l.PhonePeUtils.returnRejection(e)}const t={appUniqueId:e,microAppOpenAnalyticsInfo:{pageDepth:"APP_REDIRECT",index:0,source:"UNKNOWN",category:"UNKNOWN",serviceabilityStatus:"UNKNOWN",appUniqueId:e}};return this.navigationModule.navigateToSwitchApp(t)}navigateToMap(e,t){try{l.PhonePeUtils.assertNumber(e),l.PhonePeUtils.assertNumber(t),l.PhonePeUtils.assert(e<=90&&e>=-90,"Latitude should be between -90 to 90"),l.PhonePeUtils.assert(t<=180&&t>=-180,"Latitude should be between -180 to 180")}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.navigationModule.navigateToMap(e,t)}isVideoCallingEnabled(){return this.isMethodSupported("videoCall")}startVideoPlayer(e){try{l.PhonePeUtils.assertString(e)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.videoPlayerBridge.startVideoPlayer(e)}navigateTo(e,t=R.DEEPLINK){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertString(t)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.navigationModule.navigateToDeeplink(e,t)}navigateToApp(e,t,n,i={}){try{l.PhonePeUtils.assertString(e),l.PhonePeUtils.assertString(t),l.PhonePeUtils.assertString(n)}catch(e){return l.PhonePeUtils.returnRejection(e)}return this.navigationModule.openSwitchApp(e,t,n,i)}fetchUiConfig(e,t){return this.uiConfigBridge.fetchUiConfig(e,t)}isMethodSupported(e){return c.MethodVersioningHandler.isMethodSupported(e)}closeAppView(e){return this.reactModule.closeView(e)}onCompleteProcess(e){return this.reactModule.sucessResponse(e)}onProcessFailuer(e){return this.reactModule.failuerResponse(e)}}D.loggingEnabled=!1,t.PhonePe=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10).ExternalPaymentModels.ActionButtonProp;!function(e){let t,n,r,a,s;!function(e){e.discoveryModeValue="PEER_TO_MERCHANT",e.title="Pay",e.transactionType="SENT_PAYMENT",e.timeoutTitle="Payment Expired",e.timeoutMessage="Sorry! Your payment request timed out. Please try again.",e.timeoutActionButtonTitle="OK",e.dismissTitle="Are you sure?",e.dismissMessage="Going back will cancel the payment. Are you sure you want to proceed?",e.dismissPositiveButtonTitle="I'm sure",e.dismissNegativeButtonTitle="Dismiss",e.PAYMENT_TIMEOUT="PAYMENT_TIMEOUT",e.PAYMENT_DISMISS="PAYMENT_DISMISS",e.kMerchantId="merchantId",e.kSellingPrice="sellingPrice",e.kPayableAmount="payableAmount",e.kServiceType="serviceType",e.kServiceTypeValue="WEBAPP",e.kReservationId="reservationId",e.kServiceRequestId="serviceRequestId",e.kServiceCategory="serviceCategory",e.kServiceCategoryValue="WEB",e.kServiceContext="serviceContext",e.kQuantity="quantity",e.kValidFor="validFor",e.kMerchantTransactionId="merchantTransactionId",e.kServiceTypeVersion="serviceTypeVersion",e.kKey="key",e.kValue="value"}(t=e.Constant||(e.Constant={})),function(e){e[e.CONTACT_TYPE_VPA=1]="CONTACT_TYPE_VPA",e[e.CONTACT_TYPE_PHONE=2]="CONTACT_TYPE_PHONE",e[e.CONTACT_TYPE_MERCHANT=3]="CONTACT_TYPE_MERCHANT",e[e.CONTACT_TYPE_USER_DATA=4]="CONTACT_TYPE_USER_DATA",e[e.CONTACT_TYPE_EXTERNAL_UPI_MERCHANT=5]="CONTACT_TYPE_EXTERNAL_UPI_MERCHANT",e[e.CONTACT_TYPE_RETAIL_MERCHANT=6]="CONTACT_TYPE_RETAIL_MERCHANT",e[e.CONTACT_TYPE_BANK_ACCOUNT=7]="CONTACT_TYPE_BANK_ACCOUNT",e[e.CONTACT_TYPE_WALLET=8]="CONTACT_TYPE_WALLET",e[e.CONTACT_TYPE_MY_ACCOUNT=9]="CONTACT_TYPE_MY_ACCOUNT"}(n=e.CONTACT_TYPE||(e.CONTACT_TYPE={})),function(e){e[e.MODE_SEND_MONEY=1]="MODE_SEND_MONEY",e[e.MODE_SPLIT_MONEY=2]="MODE_SPLIT_MONEY",e[e.REQUEST_MONEY=3]="REQUEST_MONEY",e[e.MODE_RECHARGE_MOBILE=4]="MODE_RECHARGE_MOBILE",e[e.MODE_WALLET_TOP_UP=5]="MODE_WALLET_TOP_UP",e[e.MODE_BLE_PAYMENT=6]="MODE_BLE_PAYMENT"}(r=e.PAYMENT_MODE||(e.PAYMENT_MODE={})),function(e){e.SENT_PAYMENT="SENT_PAYMENT",e.RECEIVED_PAYMENT="RECEIVED_PAYMENT",e.USER_TO_USER_SENT_REQUEST="USER_TO_USER_SENT_REQUEST",e.USER_TO_USER_RECEIVED_REQUEST="USER_TO_USER_RECEIVED_REQUEST",e.ENSEMBLE_SENT_PAYMENT="ENSEMBLE_SENT_PAYMENT",e.MISSED_PAYMENT="MISSED_PAYMENT",e.PHONE_RECHARGE="PHONE_RECHARGE",e.BILL_PAYMENT="BILL_PAYMENT",e.TICKETING="TICKETING",e.COMMUTE="COMMUTE",e.UNKNOWN="UNKNOWN"}(a=e.TRANSACTION_TYPE||(e.TRANSACTION_TYPE={})),function(e){e.MERCHANT_REVERSAL="MERCHANT_REVERSAL",e.MERCHANT_CASHBACK="MERCHANT_CASHBACK"}(s=e.TRANSFER_MODE||(e.TRANSFER_MODE={}));e.Contact=class{constructor(e,t,n,i){this.type=e,this.name=t,this.displayImageUrl=n,this.lookupId=i}};e.InternalPaymentUiConfig=class{constructor(e,t,n,r,a,s){if(this.isAmountEditable=!1,this.isInitialContactEditable=!1,this.isNoteEditable=!1,this.showRateMeDialog=!1,this.title=e,this.initialAmount=t,this.initialContactList=n,this.confirmationScreenDuration=r,a)this.confirmationActionButtonProperties=a;else{let e={PENDING:new i("DONE"),COMPLETED:new i("VIEW BOOKING"),ERRORED:new i("DONE"),DEFAULT:new i("DONE")};this.confirmationActionButtonProperties=e}this.shouldConfirmationCloseOnFailure=s||!1}};class o{constructor(e){this.allowedInstruments=e,this.supportedInstruments=e}}e.PayRequest=o;e.MicroPayRequest=class extends o{constructor(e,t,n,i,r,a){super(t),this.merchantId=e,this.serviceVersion=n,this.fallbackURL=i,this.paymentOptionsContext=r,this.serviceRequestId=a}};e.PaymentTimeOutModel=class{constructor(e,t,n,i,r,a){this.time=e,this.showDialog=t,this.title=n,this.message=i,this.actionButtonName=r,this.errorCode=a}};e.DismissBehaviourModel=class{constructor(e,t,n,i,r,a){this.showDialog=e,this.title=t,this.message=n,this.positiveButton=i,this.negativeButton=r,this.errorCode=a}};e.TopUpConsentContext=class{constructor(e,t,n){this.showDialog=e,this.title=t,this.message=n}};e.AddToWalletUiContext=class{constructor(e,t,n,i,r,a,s,o,c,l,d,u){this.walletPageTitle=e,this.suggestedAmount=t,this.showCloseWalletOption=n,this.hideWalletWithdrawal=i,this.minAmount=r,this.showRateMeDialog=a,this.isAmountEditable=s,this.confirmationScreenDuration=o,this.showTopupConsent=c,this.topUpConsentContext=l,this.paymentDismiss=d,this.paymentOptionsContext=u}};e.MandateConfig=class{constructor(e,t,n,i,r,a){this.type=e,this.merchantId=t,this.serviceProviderIds=n,this.serviceType=i,this.serviceCategory=r,this.entityType=a}};e.MandateVisibleProperties=class{constructor(e,t,n,i,r){this.amount=e,this.frequency=t,this.autoPayDay=n,this.payeeWidget=i,this.toolbar=r}};e.MandateUiConfig=class{constructor(e,t,n,i,r,a,s,o,c,l,d,u,g,h,p){this.visibilityProperty=e,this.analyticsInfo=t,this.successMessage=n,this.actionButtonText=i,this.title=r,this.merchantName=a,this.merchantMandateDescription=s,this.merchantBannerImageId=o,this.merchantBannerImageSection=c,this.merchantImageId=l,this.merchantImageSection=d,this.mandateInfoLink=u,this.confirmationScreenDuration=g,this.dismissButtonDisplayTimeout=h,this.contactId=p}};e.PaymentOptionsContext=class{constructor(e){this.type="FULFILL_SERVICE",this.metaData=e}};e.PaymentOptionsContextMetadata=class{constructor(e,t,n,i){this.merchantId=e,this.serviceCategory=t,this.serviceProviderId=n,this.serviceType=i}}}(t.ExternalPaymentsNamespace||(t.ExternalPaymentsNamespace={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){let t;!function(e){e.PENDING="PENDING",e.COMPLETED="COMPLETED",e.ERRORED="ERRORED",e.DEFAULT="DEFAULT"}(t=e.TransactionState||(e.TransactionState={}));e.ActionButtonProp=class{constructor(e,t){this.name=e,this.shouldHide=t}}}(t.ExternalPaymentModels||(t.ExternalPaymentModels={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(4);t.PhonePeWebSubscription=class{constructor(e,t,n){this.eventName=t,this.listener=n,this.callbackName=e}remove(){i.EventHandler.removeSubscription(this)}}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(s,o)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const r=n(5),a=n(0),s=n(3),o=n(2);class c{static initSupportedVersionFromNative(){return i(this,void 0,void 0,function*(){yield this.fetchNativeSupportedSDKVersion().then(e=>{r.Logger.logd("PhonePe","Version received from native side = "+e),c.version=Number(e)}).catch(e=>{throw r.Logger.logd("PhonePe","Error found when trying to fetch version = "+e),Error("Unable to fetch native version. App has to run inside PhonePe app.")}),this.populateMethodToVersionMapping()})}static isMethodSupported(e){if(e===s.PhonePeSDKWebConstants.Metadata.supportedVersion)return!0;if(!c.version)throw r.Logger.logd("PhonePe","[Error] Can't call isMethodSupported before native has returned the version"),Error("Can't call isMethodSupported before native has returned the version");let t=c.methodToVersionMapping[e];if(!t)throw r.Logger.logd("PhonePe","[Error] Could not find this method in mapping. This should never happen!"),Error("Could not find this method in supported methods.");{let e=t[s.PhonePeSDKWebConstants.General.min],n=t[s.PhonePeSDKWebConstants.General.max],i=c.version;if(r.Logger.logd("PhonePe","Comparing minVersion = "+e+" maxVersion = "+n+" nativeSDKSupportVersion = "+i),i<e)return!1;if(-1!==n&&i>n)return!1}return!0}static fetchNativeSupportedSDKVersion(){return r.Logger.logd("PhonePe","Trying to call supportedVersion method in fetchNativeSupportedSDKVersion"),a.MessagingHandler.storePromiseAndCallNative(s.PhonePeSDKWebConstants.Metadata.supportedVersion,s.PhonePeSDKWebConstants.Metadata.androidBridgeName,{})}static populateMethodToVersionMapping(){let e={min:1,max:-1};this.methodToVersionMapping[s.PhonePeSDKWebConstants.Preferences.getItem]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Preferences.setItem]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Preferences.removeItem]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Preferences.removeItemAndroid]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Location.startUpdatingLocation]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Location.stopUpdatingLocation]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Location.getCurrentLocation]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Location.getCachedLocation]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.DeviceInfo.getAppDetails]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.navigateToPath]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.navigateToPathForResult]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.NavigationIOS.navigateToPaymentsView]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.NavigationIOS.navigateToHelpPage]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.NavigationIOS.navigateToTransactionDetail]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.User.getUserDetails]=e,this.methodToVersionMapping[s.PhonePeSDKWebConstants.Metadata.supportedVersion]=e,this.methodToVersionMapping[o.InternalConstants.PermissionsBridge.openSettingsPage]=e,this.methodToVersionMapping[o.InternalConstants.PermissionsBridge.seekPermission]=e,this.methodToVersionMapping[o.InternalConstants.AnalyticsBridge.methodName]=e,this.methodToVersionMapping[o.InternalConstants.AuthBridge.fetchGrantToken]=e,this.methodToVersionMapping[o.InternalConstants.CameraBridge.scanQRCode]=e,this.methodToVersionMapping[o.InternalConstants.CameraBridge.startCamera]=e,this.methodToVersionMapping[o.InternalConstants.OrderActionBridge.reserveOrder]=Object.assign({},e,{min:3}),this.methodToVersionMapping[o.InternalConstants.OrderActionBridge.openPaymentsPageForReservedOrder]=Object.assign({},e,{min:3}),this.methodToVersionMapping[o.InternalConstants.OrderActionBridge.fetchOrderRequestToken]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.FilePickerBridge.readFile]=Object.assign({},e,{min:4}),this.methodToVersionMapping[o.InternalConstants.FilePickerBridge.selectFile]=Object.assign({},e,{min:4}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.NavigationIOS.navigateToGenericPaymentsView]=Object.assign({},e,{min:5}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.navigateToGenericPayment]=Object.assign({},e,{min:5}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.navigateToGenericPaymentForResult]=Object.assign({},e,{min:5}),this.methodToVersionMapping[o.InternalConstants.AuthBridge.fetchAuthToken]=Object.assign({},e,{min:5}),this.methodToVersionMapping[o.InternalConstants.AuthBridge.fetchPermissionGrantToken]=Object.assign({},e,{min:5}),this.methodToVersionMapping[o.InternalConstants.BleManager.read]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.readRSSI]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.refreshCache]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.retrieveServices]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.write]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.writeWithoutResponse]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.connect]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.createBond]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.removeBond]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.disconnect]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.startNotification]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.stopNotification]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.checkState]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.start]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.scan]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.stopScan]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.enableBluetooth]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.getConnectedPeripherals]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.getBondedPeripherals]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.getDiscoveredPeripherals]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.removePeripheral]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.isPeripheralConnected]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.requestConnectionPriority]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.requestMTU]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.BleManager.registerBluetoothOperationSuccessCallback]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.navigateToMap]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.navigateToSwitchApp]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.NavigationIOS.closeApp]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.NavigationIOS.navigateToDeeplink]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.PhonePeSDKWebConstants.Navigation.openSwitchApp]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.OrientationBridge.changeOrientation]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.OrientationBridge.requestExitFullScreenMode]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.OrientationBridge.requestFullScreenMode]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.Feature.videoCall]=Object.assign({},e,{min:7}),this.methodToVersionMapping[o.InternalConstants.VideoPlayerBridge.startVideoPlayer]=Object.assign({},e,{min:6}),this.methodToVersionMapping[o.InternalConstants.UIConfigBridge.fetchUiConfig]=Object.assign({},e,{min:6})}}c.methodToVersionMapping={},t.MethodVersioningHandler=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8);t.PhonePe=i.PhonePe;var r=n(0);t.MessagingHandler=r.MessagingHandler;var a=n(4);t.EventHandler=a.EventHandler;var s=n(1);t.Constants=s.ExternalConstants;var o=n(10);t.PaymentModels=o.ExternalPaymentModels;const c=n(8),l=n(0),d=n(4);window.PhonePe=Object.assign({},c.PhonePe,{MessagingHandler:l.MessagingHandler,EventHandler:d.EventHandler})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(15),r=n(1);t.NativeOAuthBridgeFactory=class{static bridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebNativeOAuthBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2).InternalConstants.AuthBridge;t.WebNativeOAuthBridge=class{fetchGrantToken(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.fetchGrantToken,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}resourceGrant(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.resourceGrant,r.bridgeName,{permissions:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}fetchAuthToken(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.fetchAuthToken,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(17),r=n(1);t.NativeAnalyticsBridgeFactory=class{static getNativeAnalyticsBridge(e,t){if(e===r.ExternalConstants.Species.web)return new i.WebNativeAnalyticsBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2);var a=r.InternalConstants.AnalyticsBridge;t.WebNativeAnalyticsBridge=class{logMerchantEvent(e,t){return i.MessagingHandler.storePromiseAndCallNative(a.methodName,a.bridgeName,this.objectForAnalytics(e,t))}objectForAnalytics(e,t){let n={};return n[r.InternalConstants.AnalyticsBridge.kName]=e,t&&(n[r.InternalConstants.AnalyticsBridge.kMetadata]=t),n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(19),r=n(20),a=n(1);t.NativePermissionsBridgeFactory=class{static getPermissionsBridge(e,t){if(e===a.ExternalConstants.Species.web)return t===a.ExternalConstants.OS.ios?new r.WebPermissionsBridgeiOS(t):new i.WebPermissionsBridge(t);throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),r=n(6),a=n(0);var s=n(2).InternalConstants.PermissionsBridge;t.WebPermissionsBridge=class{constructor(e){this.operatingSystem=e}seekPermission(e){let t=r.PhonePeUtils.osSpecificPermissionNames(e,this.operatingSystem);return new Promise((e,n)=>{a.MessagingHandler.storePromiseAndCallNative(s.seekPermission,s.name,{permissions:t}).then(t=>{if(i.Logger.logd("PhonePe","Unstripped response = "+JSON.stringify(t)),"string"==typeof t){let n=JSON.parse(t);n.forEach(e=>{let t=r.PhonePeUtils.strippedPermissionName(e[s.kPermission],this.operatingSystem);e[s.kPermission]=t}),i.Logger.logd("PhonePe","Stripped response = "+JSON.stringify(n)),e(n)}else n("Wrong response sent by PhonePe")}).catch(e=>{n(e)})})}openSettingsPageForPermission(){return a.MessagingHandler.storePromiseAndCallNative(s.openSettingsPage,s.name,{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(1),a=n(2);var s=r.ExternalConstants.Permission,o=a.InternalConstants.PermissionsBridge;t.WebPermissionsBridgeiOS=class{constructor(e){this.operatingSystem=e}seekPermission(e){let t=e.map(e=>{if(e===s.LOCATION){let t={};return t[o.kPermission]=e,navigator.geolocation?new Promise((e,n)=>{navigator.geolocation.getCurrentPosition(n=>{t[o.kPermissionStatus]=!0,t[o.kShowAgain]=!1,e(t)},n=>{n&&1===n.code?(t[o.kPermissionStatus]=!1,t[o.kShowAgain]=!1,e(t)):(t[o.kPermissionStatus]=!0,t[o.kShowAgain]=!1,e(t))},{timeout:100})}):(t[o.kPermissionStatus]=!1,t[o.kShowAgain]=!1,t)}{let t={};return t[o.kPermission]=e,t[o.kPermissionStatus]=!1,t[o.kShowAgain]=!1,t}});return Promise.all(t)}openSettingsPageForPermission(){return i.MessagingHandler.storePromiseAndCallNative(o.openSettingsPage,o.name,{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(22),r=n(23),a=n(7),s=n(9),o=n(24);var c=s.ExternalPaymentsNamespace.Constant;t.ExternalNavigationFactory=class{static genericPaymentNavigationRequest(e,t){return new a.GenericPaymentNavigationRequest("Pay",!0,!1,e,t)}static paymentNavigationRequest(e,t,n,l,d,u,g){let h=t[s.ExternalPaymentsNamespace.Constant.kPayableAmount],p=t[s.ExternalPaymentsNamespace.Constant.kValidFor];p&&(p*=1e3);let P=t[c.kMerchantId],m=r.ExternalPaymentsRequestFactory.internalPaymentUIConfig(h,e,p,d,g,P),v=r.ExternalPaymentsRequestFactory.microPayRequest(t,n,l),N=new a.PaymentMetaData([{}]);if(void 0!==u){let e=[];for(let t of u)for(let n in t)if(t.hasOwnProperty(n)){let i=n,r=t[n],a={};a[c.kKey]=i,a[c.kValue]=r,e.push(a)}N.details=e}let C=t[c.kServiceCategory];C||(C="JSSDK");let f=new i.OriginInfo(new o.AnalyticsInfo(C,C+"_NAVIGATE_TO_PAYMENTS",Math.random().toString(36).substring(7)));return new a.PaymentNavigationRequest("Pay","Pay",!0,!1,s.ExternalPaymentsNamespace.PAYMENT_MODE.MODE_SEND_MONEY,v,m,s.ExternalPaymentsNamespace.TRANSACTION_TYPE.SENT_PAYMENT,N,f)}static transactionDetailRequest(e){let t=new i.OriginInfo(new o.AnalyticsInfo("JSSDK","JSSDK_NAVIGATE_TO_TRANSACTION_DETAILS",Math.random().toString(36).substring(7)));return new a.TransactionDetailsNavigationRequest("Details","Details",!0,!1,e,s.ExternalPaymentsNamespace.TRANSACTION_TYPE.SENT_PAYMENT,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.OriginInfo=class{constructor(e){this.analyticsInfo=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9);var r=i.ExternalPaymentsNamespace.Constant,a=i.ExternalPaymentsNamespace.PaymentOptionsContext,s=i.ExternalPaymentsNamespace.PaymentOptionsContextMetadata,o=i.ExternalPaymentsNamespace.MicroPayRequest,c=i.ExternalPaymentsNamespace.PaymentTimeOutModel,l=i.ExternalPaymentsNamespace.DismissBehaviourModel,d=i.ExternalPaymentsNamespace.InternalPaymentUiConfig,u=i.ExternalPaymentsNamespace.Contact,g=i.ExternalPaymentsNamespace.CONTACT_TYPE;const h=n(2);t.ExternalPaymentsRequestFactory=class{static microPayRequest(e,t,n){let i=e[r.kServiceRequestId],c=new o(e[r.kMerchantId],191,h.InternalConstants.General.v1,n,void 0,i);c.serviceProviderId=c.merchantId;let l={};l[r.kSellingPrice]=e[r.kPayableAmount],l[r.kServiceType]=r.kServiceTypeValue,l[r.kReservationId]=e[r.kReservationId];let d={};d[r.kServiceCategory]=e[r.kServiceCategory],l[r.kServiceContext]=d,e[r.kQuantity]&&(l[r.kQuantity]=e[r.kQuantity]),l[r.kServiceTypeVersion]=e[r.kServiceTypeVersion],c.fulFillContext=JSON.stringify(l),c.discoveryContext=JSON.stringify(this.discoveryContext(c.merchantId));let u=new s(c.merchantId,e[r.kServiceCategory],c.merchantId,r.kServiceTypeValue);return c.paymentOptionsContext=JSON.stringify(new a(u)),c}static discoveryContext(e){return{merchantId:e,mode:h.InternalConstants.General.discoveryContextMode}}static internalPaymentUIConfig(e,t,n,i,r,a){let s=[new u(g.CONTACT_TYPE_MERCHANT,t,i,a)],o=h.InternalConstants.General.confirmationScreenDuration,c=new d(h.InternalConstants.General.paymentScreenName,e,s,o,r);return void 0!==n&&null!==n&&n>0&&(c.paymentTimeout=this.paymentTimeoutModel(n)),c.paymentDismiss=this.paymentDismissModel(),c}static paymentTimeoutModel(e){return new c(e,!0,r.timeoutTitle,r.timeoutMessage,r.timeoutActionButtonTitle,r.PAYMENT_TIMEOUT)}static paymentDismissModel(){return new l(!0,r.dismissTitle,r.dismissMessage,r.dismissPositiveButtonTitle,r.dismissNegativeButtonTitle,r.PAYMENT_DISMISS)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.AnalyticsInfo=class{constructor(e,t,n){this.category=e,this.action=t,this.groupingKey=n,this.startTimeStamp=(new Date).getTime(),this.lastTimeStamp=this.startTimeStamp,this.customDimens={},this.isTransactionalEvent=!1,this.value=0,this.isFirstTime=!0}setValue(e){this.value=e}setTransactionalEvent(e){this.isTransactionalEvent=!0,this.value=e}setCustomDimension(e){this.customDimens=e}setLastTimeStamp(e){this.lastTimeStamp=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(26),r=n(27),a=n(1);t.LocationBridgeFactory=class{static getNativeLocationBridge(e,t){if(e===a.ExternalConstants.Species.web)return t===a.ExternalConstants.OS.ios?new i.WebLocationBridgeiOS:new r.WebLocationBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(11),r=n(3),a=n(4),s=n(0);var o=r.PhonePeSDKWebConstants.Location;class c{getAddress(e,t){return Promise.reject("METHOD_NOT_SUPPORTED")}startUpdatingLocation(){navigator.geolocation&&(this.watchId=navigator.geolocation.watchPosition(c.watchSuccessCallback.bind(this),c.watchErrorCallback.bind(this)))}stopUpdatingLocation(){navigator.geolocation&&this.watchId&&navigator.geolocation.clearWatch(this.watchId)}static watchSuccessCallback(e){a.EventHandler.sendEvent(o.locationSuccessEventKey,JSON.stringify({latitude:e.coords.latitude,longitude:e.coords.longitude}))}static watchErrorCallback(e){a.EventHandler.sendEvent(o.locationSuccessEventKey,e.message)}getCurrentLocation(){return new Promise((e,t)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(t=>{e(JSON.stringify({latitude:t.coords.latitude,longitude:t.coords.longitude}))},e=>{t("LOCATION_FETCH_FAILURE")}):t("INTERNAL_ERROR")})}onLocationUpdateSuccess(e,t){let n=new i.PhonePeWebSubscription(e,o.locationSuccessEventKey,t);return a.EventHandler.addSubscription(n),n}onLocationUpdateFailure(e,t){let n=new i.PhonePeWebSubscription(e,o.locationFailureEventKey,t);return a.EventHandler.addSubscription(n),n}isLocationTurnedOn(){return Promise.resolve()}turnOnLocation(){return Promise.resolve()}setLocationPriority(e){}getCachedLocation(){return s.MessagingHandler.storePromiseAndCallNative(o.getCachedLocation,o.androidBridgeName,{})}}t.WebLocationBridgeiOS=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(11),r=n(3),a=n(0),s=n(4);var o=r.PhonePeSDKWebConstants.Location,c=r.PhonePeSDKWebConstants.CachedLocationBridge;t.WebLocationBridge=class{getAddress(e,t){return Promise.resolve()}startUpdatingLocation(){a.MessagingHandler.callNative(o.startUpdatingLocation,o.androidBridgeName,{})}stopUpdatingLocation(){a.MessagingHandler.callNative(o.stopUpdatingLocation,o.androidBridgeName,{}),s.EventHandler.removeAllSubscriptions(o.locationSuccessEventKey),s.EventHandler.removeAllSubscriptions(o.locationFailureEventKey)}getCurrentLocation(){let e={};return e[o.forceNewLocation]=!0,a.MessagingHandler.storePromiseAndCallNative(o.getCurrentLocation,o.androidBridgeName,e)}onLocationUpdateSuccess(e,t){let n=new i.PhonePeWebSubscription(e,o.locationSuccessEventKey,t);return s.EventHandler.addSubscription(n),n}onLocationUpdateFailure(e,t){let n=new i.PhonePeWebSubscription(e,o.locationFailureEventKey,t);return s.EventHandler.addSubscription(n),n}isLocationTurnedOn(){return Promise.resolve()}turnOnLocation(){return Promise.resolve()}setLocationPriority(e){}getCachedLocation(){return a.MessagingHandler.storePromiseAndCallNative(o.getCachedLocation,c.androidBridgeName,{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(29);t.ReactBridgeFactory=class{static getReactBridge(){return new i.ReactBridge}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(3),r=n(0);var a=i.PhonePeSDKWebConstants.React;t.ReactBridge=class{closeView(e){r.MessagingHandler.callReactNative(a.closeView,e)}sucessResponse(e){r.MessagingHandler.callReactNative(a.sucessResponse,e)}failuerResponse(e){r.MessagingHandler.callReactNative(a.failureResponse,e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(31),r=n(34),a=n(1);t.NativeNavigationFactory=class{static repository(e,t){if(e===a.ExternalConstants.Species.web)return t===a.ExternalConstants.OS.ios?new r.IOSWebNavigationHandler:new i.AndroidWebNavigationHandler;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(s,o)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const r=n(6),a=n(0),s=n(32),o=n(7),c=n(3),l=n(2);var d=c.PhonePeSDKWebConstants.Navigation,u=l.InternalConstants.ActivityID;class g{processNavigationRequestAsync(e,t){return i(this,void 0,void 0,function*(){if(e.screenType===o.NavigationScreenType.PaymentsView){let n=e;return this.navigateToPayment(n,e.isNewTask,t)}if(e.screenType===o.NavigationScreenType.TransactionDetail){let n=e;return this.navigateToTransactionDetail(n,e.isNewTask,t)}if(e.screenType===o.NavigationScreenType.GenericPaymentsView){let n=e;return this.navigateToGenericPayment(n,e.isNewTask,t)}return r.PhonePeUtils.returnRejection("Unhandled request type")})}processNavigationRequestForResultAsync(e){return i(this,void 0,void 0,function*(){return this.processNavigationRequestAsync(e,!0)})}navigateToPayment(e,t,n){let i=s.NativeNavigationRequestFactory.pathFromPaymentRequest(e,t),r=this.objectForNavigation(i,u.payments,t);return n?a.MessagingHandler.storePromiseAndCallNative(d.navigateToPathForResult,d.androidBridgeName,r):a.MessagingHandler.callNative(d.navigateToPath,d.androidBridgeName,r)}navigateToTransactionDetail(e,t,n){return i(this,void 0,void 0,function*(){let i=s.NativeNavigationRequestFactory.pathFromTransactionDetailsRequest(e,t),r=this.objectForNavigation(i,u.transactionDetails,t);return n?a.MessagingHandler.storePromiseAndCallNative(d.navigateToPathForResult,d.androidBridgeName,r):a.MessagingHandler.callNative(d.navigateToPath,d.androidBridgeName,r)})}navigateToGenericPayment(e,t,n){let i=s.NativeNavigationRequestFactory.pathFromGenericPaymentRequest(e,t),r=this.objectForNavigation(i,u.payments,t);return n?a.MessagingHandler.storePromiseAndCallNative(d.navigateToPathForResult,d.androidBridgeName,r):a.MessagingHandler.callNative(d.navigateToPath,d.androidBridgeName,r)}objectForNavigation(e,t,n){let i={};return i[g.pathKey]=JSON.stringify(e),i[g.activityIdKey]=t,i[g.isNewTaskKey]=n?268435456:0,i}closeAppRequest(e){a.MessagingHandler.storePromiseAndCallNative(d.closeApp,d.androidBridgeName,e)}navigateToMap(e,t){return new Promise((n,i)=>{a.MessagingHandler.storePromiseAndCallNative(d.navigateToMap,d.androidBridgeName,{latitude:e,longitude:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{i(e)})})}navigateToSwitchApp(e){return new Promise((t,n)=>{a.MessagingHandler.storePromiseAndCallNative(d.navigateToSwitchApp,d.androidBridgeName,e).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}navigateToDeeplink(e,t){return new Promise((n,i)=>{a.MessagingHandler.storePromiseAndCallNative(d.navigateToDeeplink,d.androidBridgeName,{deeplink:e,type:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{i(e)})})}openSwitchApp(e,t,n,i){return new Promise((r,s)=>{const c=new o.AppNavigationRequest(e,t,n);a.MessagingHandler.storePromiseAndCallNative(d.openSwitchApp,d.androidBridgeName,Object.assign({},c,i)).then(e=>{r(JSON.parse(e))}).catch(e=>{s(e)})})}}g.pathKey="path",g.activityIdKey="activityId",g.isNewTaskKey="isNewTask",t.AndroidWebNavigationHandler=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(33);t.NativeNavigationRequestFactory=class{static pathFromPaymentRequest(e,t){let n=[],r=new i.Node("payment_activity","ACTIVITY",{}),a={};a.mode=JSON.stringify(e.mode),a.internalPaymentUiConfig=JSON.stringify(e.internalPaymentUiConfig),a.microPayRequest=JSON.stringify(e.microPayRequest),a.transactionType=JSON.stringify(e.transactionType),a.info=JSON.stringify(e.originInfo),a.metaData=JSON.stringify(e.metaData);let s=new i.Node("micro_app_payment","FRAGMENT",a);return n.push(r),n.push(s),new i.Path(n)}static pathFromGenericPaymentRequest(e,t){let n=[],r=new i.Node("payment_activity","ACTIVITY",{}),a={};a.reservationId=e.reservationId,a.fallbackUrl=e.fallbackUrl;let s=new i.Node("micro_app_aggregator_payment","FRAGMENT",a);return n.push(r),n.push(s),new i.Path(n)}static pathFromTransactionDetailsRequest(e,t){let n=[],r=new i.Node("transaction_details_activity","ACTIVITY",{}),a={};a.transactionId=JSON.stringify(e.transactionId),a.transactionType=JSON.stringify("TICKETING"),a.info=JSON.stringify(e.info);let s=new i.Node("transaction_details_fragment","FRAGMENT",a);return n.push(r),n.push(s),new i.Path(n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Node=class{constructor(e,t,n){this.name=e,this.screenType=t,this.data=n}};t.Path=class{constructor(e){this.node=e}}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(s,o)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const r=n(6),a=n(7),s=n(0),o=n(3);t.IOSWebNavigationHandler=class{processNavigationRequestAsync(e,t){return i(this,void 0,void 0,function*(){if(e.screenType===a.NavigationScreenType.PaymentsView){let n=e;return this.navigateToPayment(n,e.isNewTask,t)}if(e.screenType===a.NavigationScreenType.TransactionDetail){let n=e;return this.navigateToTransactionDetail(n,e.isNewTask,t)}if(e.screenType===a.NavigationScreenType.GenericPaymentsView){let n=e;return this.navigateToGenericPayment(n,e.isNewTask,t)}return r.PhonePeUtils.returnRejection("Unhandled request type")})}processNavigationRequestForResultAsync(e){return i(this,void 0,void 0,function*(){return this.processNavigationRequestAsync(e,!0)})}navigateToPayment(e,t,n){let i=e,r=o.PhonePeSDKWebConstants.NavigationIOS.navigateToPaymentsView;return s.MessagingHandler.storePromiseAndCallNative(r,"",i)}navigateToTransactionDetail(e,t,n){return i(this,void 0,void 0,function*(){let t=e,n=o.PhonePeSDKWebConstants.NavigationIOS.navigateToTransactionDetail;return s.MessagingHandler.storePromiseAndCallNative(n,"",t)})}navigateToGenericPayment(e,t,n){return i(this,void 0,void 0,function*(){let t=e,n=o.PhonePeSDKWebConstants.NavigationIOS.navigateToGenericPaymentsView;return s.MessagingHandler.storePromiseAndCallNative(n,"",t)})}closeAppRequest(e){let t=e,n=o.PhonePeSDKWebConstants.NavigationIOS.closeApp;s.MessagingHandler.storePromiseAndCallNative(n,"",t)}navigateToMap(e,t){return Promise.reject("Implementation not found")}navigateToSwitchApp(e){return Promise.reject("Implementation not found")}navigateToDeeplink(e,t){const n=o.PhonePeSDKWebConstants.NavigationIOS.navigateToDeeplink;return s.MessagingHandler.storePromiseAndCallNative(n,"",{deeplink:e,type:t})}openSwitchApp(e,t,n,i){const r=o.PhonePeSDKWebConstants.NavigationIOS.openSwitchApp,c=new a.AppNavigationRequest(e,t,n);return s.MessagingHandler.storePromiseAndCallNative(r,"",Object.assign({},c,i))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(36),r=n(1),a=n(37);t.NativePreferenceBridgeFactory=class{static getNativePreferenceBridge(e,t){if(e===r.ExternalConstants.Species.web)return t===r.ExternalConstants.OS.ios?new a.WebNativePreferenceBridgeiOS(t):new i.WebNativePreferenceBridge(t);throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),r=n(0),a=n(1),s=n(3);var o=s.PhonePeSDKWebConstants.Preferences;t.WebNativePreferenceBridge=class{constructor(e){this.operatingSystem=e}getString(e,t,n){let i=this.prefObject(e,t,void 0,n);return r.MessagingHandler.storePromiseAndCallNative(o.getItem,o.androidBridgeName,i)}getNumber(e,t,n){return new Promise((e,t)=>{t("This should not be called in case of web pref bridge")})}getDecryptedUserId(){return new Promise((e,t)=>{t("This should not be called in case of web pref bridge")})}saveNumber(e,t,n){i.Logger.logd("PhonePe","[Error] his should not be called in case of web pref bridge")}saveString(e,t,n){let i=this.prefObject(e,t,n,void 0);r.MessagingHandler.callNative(o.setItem,o.androidBridgeName,i)}removeItem(e,t){let n=this.prefObject(e,t,void 0,void 0),i=o.removeItem;this.operatingSystem===a.ExternalConstants.OS.android&&(i=o.removeItemAndroid),r.MessagingHandler.callNative(i,s.PhonePeSDKWebConstants.Preferences.androidBridgeName,n)}prefObject(e,t,n,i){let r={};return e&&(r[s.PhonePeSDKWebConstants.General.prefName]=e),t&&(r[s.PhonePeSDKWebConstants.General.key]=t),i&&(r[s.PhonePeSDKWebConstants.General.defaultValue]=i),n&&(r[s.PhonePeSDKWebConstants.General.value]=n),r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5);class r{constructor(e){this.operatingSystem=e}getString(e,t,n){const i=this.createKey(e,t);return new Promise((e,t)=>{e(window.localStorage.getItem(i)||n)})}getNumber(e,t,n){return new Promise((e,t)=>{t("This should not be called in case of web pref bridge")})}getDecryptedUserId(){return new Promise((e,t)=>{t("This should not be called in case of web pref bridge")})}saveNumber(e,t,n){i.Logger.logd("PhonePe","[Error] his should not be called in case of web pref bridge")}saveString(e,t,n){const i=this.createKey(e,t);window.localStorage.setItem(i,n)}removeItem(e,t){const n=this.createKey(e,t);window.localStorage.removeItem(n)}createKey(e,t){return e+r.keySeperator+t}}r.keySeperator="::",t.WebNativePreferenceBridgeiOS=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(39),r=n(1);t.NativeDeviceInfoBridgeFactory=class{static bridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebNativeDeviceInfoBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(3);var a=r.PhonePeSDKWebConstants.DeviceInfo,s=r.PhonePeSDKWebConstants.AppDetailsBridge;t.WebNativeDeviceInfoBridge=class{getDeviceInfo(){return Promise.resolve()}getAppDetails(){return i.MessagingHandler.storePromiseAndCallNative(a.getAppDetails,s.androidBridgeName,{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(41),r=n(1);t.NativeOrderActionBridgeFactory=class{static bridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebNativeOrderActionBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2).InternalConstants.OrderActionBridge;t.WebNativeOrderActionBridge=class{reserveOrder(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.reserveOrder,r.bridgeName,e).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}createServiceRequestToken(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.fetchOrderRequestToken,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(43),r=n(1);t.NativeFilePickerBridgeFactory=class{static bridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebNativeFilePickerBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2).InternalConstants.FilePickerBridge;t.WebNativeFilePickerBridge=class{selectFile(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.selectFile,r.bridgeName,{mimeType:e,allowMultiple:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}readFile(e,t,n){return new Promise((a,s)=>{i.MessagingHandler.storePromiseAndCallNative(r.readFile,r.bridgeName,{uri:e,offset:t,length:n}).then(e=>{a(JSON.parse(e))}).catch(e=>{s(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(45);t.OrientationBridgeFactory=class{static getOrientationBridge(e){if(e===i.ExternalConstants.Species.web)return new r.OrientationBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2).InternalConstants.OrientationBridge;t.OrientationBridge=class{changeOrientation(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.changeOrientation,r.bridgeName,{orientation:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}requestExitFullScreenMode(){i.MessagingHandler.storePromiseAndCallNative(r.requestExitFullScreenMode,r.bridgeName,{})}requestFullScreenMode(){i.MessagingHandler.storePromiseAndCallNative(r.requestFullScreenMode,r.bridgeName,{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(47);t.default=class{static getBleManagerBridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebPPBleManager;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2).InternalConstants.BleManager,a=n(11),s=n(4);t.WebPPBleManager=class{read(e,t,n){return new Promise((a,s)=>{i.MessagingHandler.storePromiseAndCallNative(r.read,r.bridgeName,{peripheralId:e,serviceUUID:t,characteristicUUID:n}).then(e=>{a(JSON.parse(e))}).catch(e=>{s(e)})})}readRSSI(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.readRSSI,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}refreshCache(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.refreshCache,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}retrieveServices(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.retrieveServices,r.bridgeName,{peripheralId:e,services:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}write(e,t,n,a,s){return new Promise((o,c)=>{i.MessagingHandler.storePromiseAndCallNative(r.write,r.bridgeName,{peripheralId:e,serviceUUID:t,characteristicUUID:n,data:a,maxByteSize:s}).then(e=>{o(JSON.parse(e))}).catch(e=>{c(e)})})}writeWithoutResponse(e,t,n,a,s,o){return new Promise((c,l)=>{i.MessagingHandler.storePromiseAndCallNative(r.writeWithoutResponse,r.bridgeName,{peripheralId:e,serviceUUID:t,characteristicUUID:n,data:a,maxByteSize:s,queueSleepTime:o}).then(e=>{c(JSON.parse(e))}).catch(e=>{l(e)})})}connect(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.connect,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}createBond(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.createBond,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}registerBluetoothOperationSuccessCallback(e,t,n){let i=new a.PhonePeWebSubscription(e,t,n);return s.EventHandler.addSubscription(i),i}removeBond(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.removeBond,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}disconnect(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.disconnect,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}startNotification(e,t,n){return new Promise((a,s)=>{i.MessagingHandler.storePromiseAndCallNative(r.startNotification,r.bridgeName,{peripheralId:e,serviceUUID:t,characteristicUUID:n}).then(e=>{a(JSON.parse(e))}).catch(e=>{s(e)})})}stopNotification(e,t,n){return new Promise((a,s)=>{i.MessagingHandler.storePromiseAndCallNative(r.stopNotification,r.bridgeName,{peripheralId:e,serviceUUID:t,characteristicUUID:n}).then(e=>{a(JSON.parse(e))}).catch(e=>{s(e)})})}checkState(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.checkState,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}start(e){return e||(e={}),new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.start,r.bridgeName,{options:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}scan(e,t,n,a){return new Promise((s,o)=>{i.MessagingHandler.storePromiseAndCallNative(r.scan,r.bridgeName,{serviceUUIDs:e,seconds:t,allowDuplicates:n,scanningOptions:a}).then(e=>{s(JSON.parse(e))}).catch(e=>{o(e)})})}stopScan(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.stopScan,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}enableBluetooth(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.enableBluetooth,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}getConnectedPeripherals(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.getConnectedPeripherals,r.bridgeName,{serviceUUIDs:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}getBondedPeripherals(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.getBondedPeripherals,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}getDiscoveredPeripherals(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.getDiscoveredPeripherals,r.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}removePeripheral(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.removePeripheral,r.bridgeName,{peripheralId:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}isPeripheralConnected(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.isPeripheralConnected,r.bridgeName,{peripheralId:e,serviceUUIDs:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}requestConnectionPriority(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.requestConnectionPriority,r.bridgeName,{peripheralId:e,connectionPriority:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}requestMTU(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.requestMTU,r.bridgeName,{peripheralId:e,mtu:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(49),r=n(1);t.NativeCameraBridgeFactory=class{static getNativeCameraBridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebNativeCameraBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);var r=n(3).PhonePeSDKWebConstants.Camera;t.WebNativeCameraBridge=class{scanQRCode(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.scanQRCode,r.androidBridgeName,{showGallery:e,validator:t}).then(e=>{n(e)}).catch(e=>{a(e)})})}startCamera(){return new Promise((e,t)=>{i.MessagingHandler.storePromiseAndCallNative(r.startCamera,r.androidBridgeName,{}).then(t=>{e(t)}).catch(e=>{t(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(51),r=n(1);t.NativeVideoPlayerBridgeFactory=class{static getNativeVideoPlayerBridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebNativeVideoPlayerBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);var r=n(2).InternalConstants.VideoPlayerBridge;t.WebNativeVideoPlayerBridge=class{startVideoPlayer(e){return new Promise((t,n)=>{i.MessagingHandler.storePromiseAndCallNative(r.startVideoPlayer,r.bridgeName,JSON.parse(e)).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(53);t.UIConfigBridgeFactory=class{static getUIConfigBridge(e){if(e===i.ExternalConstants.Species.web)return new r.UIConfigBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2).InternalConstants.UIConfigBridge;t.UIConfigBridge=class{fetchUiConfig(e,t){return new Promise((n,a)=>{i.MessagingHandler.storePromiseAndCallNative(r.fetchUiConfig,r.bridgeName,{nodes:e,strategy:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(55);t.Base64Client=class{static encode(e){return i.Base64.encode(e)}static decode(e){return i.Base64.decode(e)}}},function(module,exports,__webpack_require__){(function(global){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(global,factory){module.exports=function(global){"use strict";var _Base64=(global=global||{}).Base64,version="2.5.1",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},n=0,i=e.length;n<i;n++)t[e.charAt(n)]=n;return t}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?fromCharCode(192|t>>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)}var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),i=[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)];return i.join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[À-ß][-¿]","[à-ï][-¿]{2}","[ð-÷][-¿]{3}"].join("|"),"g"),cb_btou=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return fromCharCode(55296+(n>>>10))+fromCharCode(56320+(1023&n));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,n=t%4,i=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),r=[fromCharCode(i>>>16),fromCharCode(i>>>8&255),fromCharCode(255&i)];return r.length-=[0,0,2,1][n],r.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(e){return encode(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}global.Meteor&&(Base64=global.Base64);module.exports?module.exports.Base64=global.Base64:(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return global.Base64}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));return{Base64:global.Base64}}(global)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==global?global:this)}).call(this,__webpack_require__(56))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}]);