-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathbundle.js
More file actions
1 lines (1 loc) · 60.9 KB
/
Copy pathbundle.js
File metadata and controls
1 lines (1 loc) · 60.9 KB
1
var PhonePe=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=11)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalConstants=void 0,function(e){let t,n,r,i,a;!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.web="web",e.native="native"}(n=e.Species||(e.Species={})),function(e){e.ios="ios",e.android="android"}(r=e.OS||(e.OS={})),function(e){e.ios="phonepe-ios",e.android="phonepe-android"}(i=e.OSUserAgent||(e.OSUserAgent={})),function(e){e.email="email",e.name="name",e.phoneNumber="phoneNumber",e.isEmailVerified="isEmailVerified"}(a=e.UserDetail||(e.UserDetail={}))}(t.ExternalConstants||(t.ExternalConstants={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagingHandler=void 0;const r=n(5),i=n(4),a=n(3),o=n(10);class s{static callback(e,t,n,r){i.Logger.logd("PhonePe","phonepeCallback called! with callbackName = "+e);let o=s.promiseMapping[e];o&&("1"===t?o[a.PhonePeSDKWebConstants.General.resolve](n):o[a.PhonePeSDKWebConstants.General.reject](r),delete s.promiseMapping[e])}static callNative(e,t,n){if(!o.MethodVersioningHandler.isMethodSupported(e))return void i.Logger.logd("PhonePe","Sorry! This method is not supported with PhonePe app's version");i.Logger.logd("PhonePe","Trying to call methodName = "+e);let a=window.webkit;if(r.PhonePeUtils.isValidMethodOniOS(e))a.messageHandlers[e].postMessage(n);else{window[t][e](JSON.stringify(n))}}static storePromiseAndCallNative(e,t,n){return new Promise((i,o)=>{let s=r.PhonePeUtils.createuuid();n[a.PhonePeSDKWebConstants.General.callbackId]=s,this.callNative(e,t,n),this.promiseMapping[s]={resolve:i,reject:o}})}}t.MessagingHandler=s,s.promiseMapping={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InternalConstants=void 0,function(e){let t,n,r,i,a,o,s,c,l,d;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}(r=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"}(i=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"}(o=e.AuthBridge||(e.AuthBridge={})),function(e){e.bridgeName="AuthV2Bridge",e.isConsentGranted="isConsentGranted",e.fetchAuthTokenIfConsentRecorded="fetchAuthTokenIfConsentRecorded"}(s=e.AuthV2Bridge||(e.AuthV2Bridge={})),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={}))}(t.InternalConstants||(t.InternalConstants={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhonePeSDKWebConstants=void 0,function(e){let t,n,r,i,a,o,s,c,l;!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"}(r=e.Metadata||(e.Metadata={})),function(e){e.androidBridgeName="LocationBridge",e.startUpdatingLocation="startUpdatingLocation",e.stopUpdatingLocation="stopUpdatingLocation",e.getCurrentLocation="getCurrentLocation",e.locationSuccessEventKey="locationUpdated",e.locationFailureEventKey="failedToUpdateLocation",e.forceNewLocation="forceNew",e.getAddress="getAddress"}(i=e.Location||(e.Location={})),function(e){e.androidBridgeName="NavigationBridge",e.processRequest="processRequest",e.navigateToPath="navigateToPath",e.navigateToPathForResult="navigateToPathForResult",e.navigateToGenericPaymentForResult="navigateToGenericPaymentForResult",e.navigateToGenericPayment="navigateToGenericPayment"}(a=e.Navigation||(e.Navigation={})),function(e){e.navigateToPaymentsView="openPaymentsPage",e.navigateToTransactionDetail="openTransactionDetailsPage",e.navigateToGenericPaymentsView="openGenericPaymentsPage",e.navigateToHelpPage="openHelpPage",e.navigateToReactView="openReactView"}(o=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"}(s=e.Payments||(e.Payments={})),function(e){e.getUserDetails="getUserDetails",e.androidBridgeName="UserBridge",e.attributes="attributes"}(c=e.User||(e.User={})),function(e){e.androidBridgeName="CameraBridge",e.scanQRCode="scanQRCode",e.startCamera="startCamera"}(l=e.Camera||(e.Camera={}))}(t.PhonePeSDKWebConstants||(t.PhonePeSDKWebConstants={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const r=n(11);class i{constructor(e){this.tag=e}static isLoggingEnabled(){return r.PhonePe.loggingEnabled}static logd(e,t){i.isLoggingEnabled()&&console.log("["+e+"] "+t)}logd(e){i.logd(this.tag,e)}logAnything(e){console.log(e)}logError(e){0}}t.Logger=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhonePeUtils=void 0;const r=n(0),i=n(2);var a=r.ExternalConstants.Permission;class o{static assert(e,t){if(!e)throw new Error(t)}static assertString(e,t){o.assertType(e,"string",t)}static assertNumber(e,t){o.assertType(e,"number",t)}static assertBoolean(e,t){o.assertType(e,"boolean",t)}static assertFunction(e,t){o.assertType(e,"function",t)}static assertArray(e,t){if((!t||e)&&e.constructor!==Array)throw new TypeError(i.InternalConstants.ErrorCode.invalidParams)}static assertObject(e,t){o.assertType(e,"object",t)}static assertType(e,t,n){if((!n||e)&&typeof e!==t)throw new TypeError(i.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===r.ExternalConstants.Species.web||e===r.ExternalConstants.Species.native}static isValidOS(e){return e===r.ExternalConstants.OS.ios||e===r.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 o of e)if(t===r.ExternalConstants.OS.ios)n.push(a[o]);else{let e="";e=o===a.LOCATION?i.InternalConstants.PermissionsBridge.androidPrefix+i.InternalConstants.PermissionsBridge.locationPermissionName:i.InternalConstants.PermissionsBridge.androidPrefix+a[o],n.push(e)}return n}static strippedPermissionName(e,t){if(t===r.ExternalConstants.OS.ios)return e;let n=i.InternalConstants.PermissionsBridge.androidPrefix,o=e.replace(new RegExp("^"+n),"");return o===i.InternalConstants.PermissionsBridge.locationPermissionName&&(o=a.LOCATION),o}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=o},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MicroAppNavigationRequest=t.CloseAppNavRequest=t.FreshBotIntentData=t.HelpPageNavRequest=t.ProfileNavRequest=t.ContactNavigationRequest=t.ShoppingDetailsNavigationRequest=t.TransactionDetailsNavigationRequest=t.AddToWalletNavigationRequest=t.MandateSetupNavigationRequest=t.GenericPaymentNavigationRequest=t.PaymentNavigationRequest=t.PaymentMetaData=t.AppScreenNavigationRequest=t.PWAWebViewNavigationRequest=t.WebViewNavigationRequest=t.ReactViewNavigationRequest=t.BaseNavigationRequest=t.NavigationScreenType=void 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.ShoppingDetails="ShoppingDetails"}(r=t.NavigationScreenType||(t.NavigationScreenType={}));class i{constructor(e,t,n,r){this.screenType=e,this.title=t,this.animated=n,this.showModally=r,this.isNewTask=!1}}t.BaseNavigationRequest=i;t.ReactViewNavigationRequest=class extends i{constructor(e,t,n,i,a,o,s,c,l,d,u,h,g,P=!0){super(r.ReactView,i,a,o),this.appId=h,this.bundleName=e,this.componentName=t,this.shouldShowToolbar=n,this.toolBarText=i,this.animated=a,this.showModally=o,this.initialProperties=s,this.category=c,this.merchantId=l,this.merchantName=d,this.tAndCUrl=u,this.appUniqueId=g,this.microAppBar={enabled:P}}};t.WebViewNavigationRequest=class extends i{constructor(e,t,n,i,a,o,s,c,l){super(r.WebView,t,c,l),this.url=e,this.title=t,this.shouldShowToolBar=n,this.shouldShowBackButton=i,this.screenName=a,this.shouldAllowWebViewBack=o,this.shouldShowProgressWhileLoading=s}};t.PWAWebViewNavigationRequest=class extends i{constructor(e,t,n,i){super(r.PWAWebView,"",!0,!0),this.merchantId=e,this.deepLinkUrl=t,this.appId=n,this.appUniqueId=i}};t.AppScreenNavigationRequest=class extends i{constructor(e,t,n,i,a,o){super(r.AppScreen,i,a,o),this.screenName=e,this.url=t,this.params=n}};t.PaymentMetaData=class{constructor(e){this.details=e}};t.PaymentNavigationRequest=class extends i{constructor(e,t,n,i,a,o,s,c,l,d){super(r.PaymentsView,t,n,i),this.mode=a,this.microPayRequest=o,this.internalPaymentUiConfig=s,this.transactionType=c,this.metaData=l,this.originInfo=d}};t.GenericPaymentNavigationRequest=class extends i{constructor(e,t,n,i,a){super(r.GenericPaymentsView,e,t,n),this.reservationId=i,a&&(this.fallbackUrl=a)}};t.MandateSetupNavigationRequest=class extends i{constructor(e,t,n,i,a,o){super(r.MandateSetup,n,i,a),this.mandateContext=e,this.mandateUiConfig=t,this.mandateType=o||"MERCHANT"}};t.AddToWalletNavigationRequest=class extends i{constructor(e,t,n,i){super(r.AddToWallet,t,n,i),this.addToWalletUiContext=e}};t.TransactionDetailsNavigationRequest=class extends i{constructor(e,t,n,i,a,o,s){super(r.TransactionDetail,t,n,i),this.transactionId=a,this.transactionType=o,this.info=s}};t.ShoppingDetailsNavigationRequest=class extends i{constructor(e,t,n,i,a){super(r.ShoppingDetails,t,n,i),this.shoppingDetails=a}};t.ContactNavigationRequest=class extends i{constructor(e,t,n,i,a,o,s,c,l,d,u,h,g,P){super(r.ContactPicker,t,n,i),this.contactPickerMode=a,this.contactPickerType=o,this.initialContacts=s,this.transactionType=c,this.isVpaEnable=l,this.isSelfEnable=d,this.phoneContact=u,this.vpaContact=h,this.accountContact=g}};t.ProfileNavRequest=class extends i{constructor(e,t,n,r){super(e,t,n,r)}};t.HelpPageNavRequest=class extends i{constructor(e,t,n,i,a,o,s,c,l){super(r.HelpPage,t,n,i),this.transactionId=e,this.screen=s,this.url=c,this.shouldShowToolBar=a,this.shouldAllowWebViewBack=o,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 i{constructor(e,t,n,i,a,o){super(r.MicroApp,i,a,o),this.appId=e,this.appUniqueId=t,this.initialProperties=n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandler=void 0;const r=n(4);class i{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,r=this.eventNameToSubscriptionMapping[t];if(r){let e=[],t=0;for(let i of r)i.callbackName===n&&(e.push(t),t++);for(;e.length;){let t=e.pop();t&&r.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 r.Logger.logd("PhonePe","[Error] No subscribers for eventName = "+e)}}t.EventHandler=i,i.eventNameToSubscriptionMapping={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalPaymentsNamespace=void 0;var r=n(9).ExternalPaymentModels.ActionButtonProp;!function(e){let t,n,i,a,o;!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"}(i=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"}(o=e.TRANSFER_MODE||(e.TRANSFER_MODE={}));e.Contact=class{constructor(e,t,n,r){this.type=e,this.name=t,this.displayImageUrl=n,this.lookupId=r}};e.InternalPaymentUiConfig=class{constructor(e,t,n,i,a,o){if(this.isAmountEditable=!1,this.isInitialContactEditable=!1,this.isNoteEditable=!1,this.showRateMeDialog=!1,this.title=e,this.initialAmount=t,this.initialContactList=n,this.confirmationScreenDuration=i,a)this.confirmationActionButtonProperties=a;else{let e={PENDING:new r("DONE"),COMPLETED:new r("VIEW BOOKING"),ERRORED:new r("DONE"),DEFAULT:new r("DONE")};this.confirmationActionButtonProperties=e}this.shouldConfirmationCloseOnFailure=o||!1}};class s{constructor(e){this.allowedInstruments=e,this.supportedInstruments=e}}e.PayRequest=s;e.MicroPayRequest=class extends s{constructor(e,t,n,r,i,a){super(t),this.merchantId=e,this.serviceVersion=n,this.fallbackURL=r,this.paymentOptionsContext=i,this.serviceRequestId=a}};e.PaymentTimeOutModel=class{constructor(e,t,n,r,i,a){this.time=e,this.showDialog=t,this.title=n,this.message=r,this.actionButtonName=i,this.errorCode=a}};e.DismissBehaviourModel=class{constructor(e,t,n,r,i,a){this.showDialog=e,this.title=t,this.message=n,this.positiveButton=r,this.negativeButton=i,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,r,i,a,o,s,c,l,d,u){this.walletPageTitle=e,this.suggestedAmount=t,this.showCloseWalletOption=n,this.hideWalletWithdrawal=r,this.minAmount=i,this.showRateMeDialog=a,this.isAmountEditable=o,this.confirmationScreenDuration=s,this.showTopupConsent=c,this.topUpConsentContext=l,this.paymentDismiss=d,this.paymentOptionsContext=u}};e.MandateConfig=class{constructor(e,t,n,r,i,a){this.type=e,this.merchantId=t,this.serviceProviderIds=n,this.serviceType=r,this.serviceCategory=i,this.entityType=a}};e.MandateVisibleProperties=class{constructor(e,t,n,r,i){this.amount=e,this.frequency=t,this.autoPayDay=n,this.payeeWidget=r,this.toolbar=i}};e.MandateUiConfig=class{constructor(e,t,n,r,i,a,o,s,c,l,d,u,h,g,P){this.visibilityProperty=e,this.analyticsInfo=t,this.successMessage=n,this.actionButtonText=r,this.title=i,this.merchantName=a,this.merchantMandateDescription=o,this.merchantBannerImageId=s,this.merchantBannerImageSection=c,this.merchantImageId=l,this.merchantImageSection=d,this.mandateInfoLink=u,this.confirmationScreenDuration=h,this.dismissButtonDisplayTimeout=g,this.contactId=P}};e.PaymentOptionsContext=class{constructor(e){this.type="FULFILL_SERVICE",this.metaData=e}};e.PaymentOptionsContextMetadata=class{constructor(e,t,n,r){this.merchantId=e,this.serviceCategory=t,this.serviceProviderId=n,this.serviceType=r}}}(t.ExternalPaymentsNamespace||(t.ExternalPaymentsNamespace={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalPaymentModels=void 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";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.MethodVersioningHandler=void 0;const i=n(4),a=n(1),o=n(3),s=n(2);class c{static initSupportedVersionFromNative(){return r(this,void 0,void 0,function*(){yield this.fetchNativeSupportedSDKVersion().then(e=>{i.Logger.logd("PhonePe","Version received from native side = "+e),c.version=Number(e)}).catch(e=>{throw i.Logger.logd("PhonePe","Error found when trying to fetch version = "+e),Error("Something is really wrong here! We should be able to fetch version always. Are you sure you are testing it inside the PhonePe app?")}),this.populateMethodToVersionMapping()})}static isMethodSupported(e){if(e===o.PhonePeSDKWebConstants.Metadata.supportedVersion)return!0;if(!c.version)throw i.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 i.Logger.logd("PhonePe","[Error] Could not find this method in mapping. This should never happen!"),Error("Could not find this method in mapping. This should never happen!");{let e=t[o.PhonePeSDKWebConstants.General.min],n=t[o.PhonePeSDKWebConstants.General.max],r=c.version;if(i.Logger.logd("PhonePe","Comparing minVersion = "+e+" maxVersion = "+n+" nativeSDKSupportVersion = "+r),r<e)return!1;if(-1!==n&&r>n)return!1}return!0}static fetchNativeSupportedSDKVersion(){return i.Logger.logd("PhonePe","Trying to call supportedVersion method in fetchNativeSupportedSDKVersion"),a.MessagingHandler.storePromiseAndCallNative(o.PhonePeSDKWebConstants.Metadata.supportedVersion,o.PhonePeSDKWebConstants.Metadata.androidBridgeName,{})}static populateMethodToVersionMapping(){let e={min:1,max:-1};this.methodToVersionMapping[o.PhonePeSDKWebConstants.Preferences.getItem]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Preferences.setItem]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Preferences.removeItem]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Preferences.removeItemAndroid]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Location.startUpdatingLocation]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Location.stopUpdatingLocation]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Location.getCurrentLocation]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Navigation.navigateToPath]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Navigation.navigateToPathForResult]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.NavigationIOS.navigateToPaymentsView]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.NavigationIOS.navigateToHelpPage]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.NavigationIOS.navigateToTransactionDetail]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.User.getUserDetails]=e,this.methodToVersionMapping[o.PhonePeSDKWebConstants.Metadata.supportedVersion]=e,this.methodToVersionMapping[s.InternalConstants.PermissionsBridge.openSettingsPage]=e,this.methodToVersionMapping[s.InternalConstants.PermissionsBridge.seekPermission]=e,this.methodToVersionMapping[s.InternalConstants.AnalyticsBridge.methodName]=e,this.methodToVersionMapping[s.InternalConstants.AuthBridge.fetchGrantToken]=e,this.methodToVersionMapping[s.InternalConstants.CameraBridge.scanQRCode]=e,this.methodToVersionMapping[s.InternalConstants.CameraBridge.startCamera]=e,this.methodToVersionMapping[s.InternalConstants.OrderActionBridge.reserveOrder]=Object.assign({},e,{min:3}),this.methodToVersionMapping[s.InternalConstants.OrderActionBridge.openPaymentsPageForReservedOrder]=Object.assign({},e,{min:3}),this.methodToVersionMapping[s.InternalConstants.OrderActionBridge.fetchOrderRequestToken]=Object.assign({},e,{min:6}),this.methodToVersionMapping[s.InternalConstants.FilePickerBridge.readFile]=Object.assign({},e,{min:4}),this.methodToVersionMapping[s.InternalConstants.FilePickerBridge.selectFile]=Object.assign({},e,{min:4}),this.methodToVersionMapping[o.PhonePeSDKWebConstants.NavigationIOS.navigateToGenericPaymentsView]=Object.assign({},e,{min:5}),this.methodToVersionMapping[o.PhonePeSDKWebConstants.Navigation.navigateToGenericPayment]=Object.assign({},e,{min:5}),this.methodToVersionMapping[o.PhonePeSDKWebConstants.Navigation.navigateToGenericPaymentForResult]=Object.assign({},e,{min:5}),this.methodToVersionMapping[s.InternalConstants.AuthBridge.fetchAuthToken]=Object.assign({},e,{min:5});let t=Object.assign({},e,{min:8});this.methodToVersionMapping[s.InternalConstants.AuthV2Bridge.isConsentGranted]=t,this.methodToVersionMapping[s.InternalConstants.AuthV2Bridge.fetchAuthTokenIfConsentRecorded]=t}}t.MethodVersioningHandler=c,c.methodToVersionMapping={}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.PhonePe=t.PaymentModels=t.Constants=t.EventHandler=t.MessagingHandler=void 0;const i=n(6),a=n(46),o=n(44),s=n(42),c=n(40),l=n(10),d=n(5),u=n(38),h=n(34),g=n(31),P=n(26),p=n(24),m=n(22),v=n(20),f=n(1),N=n(7),y=n(2),C=n(0),T=n(3),b=n(8),E=n(9),S=n(18),A=n(16),M=n(14);var _=C.ExternalConstants.Permission;t.MessagingHandler=f.MessagingHandler,t.EventHandler=N.EventHandler,t.Constants=C.ExternalConstants,t.PaymentModels=E.ExternalPaymentModels;class O{constructor(e,t){this.preferencesModule=P.NativePreferenceBridgeFactory.getNativePreferenceBridge(e,t),this.locationModule=h.LocationBridgeFactory.getNativeLocationBridge(e,t),this.navigationModule=g.NativeNavigationFactory.repository(e,t),this.cameraBridge=A.NativeCameraBridgeFactory.getNativeCameraBridge(e),this.permissionsBridge=c.NativePermissionsBridgeFactory.getPermissionsBridge(e,t),this.analyticsBridge=s.NativeAnalyticsBridgeFactory.getNativeAnalyticsBridge(e,t),this.authBridge=a.NativeOAuthBridgeFactory.bridge(e),this.authV2Bridge=o.NativeOAuthV2BridgeFactory.bridge(e),this.deviceInfoBridge=p.NativeDeviceInfoBridgeFactory.bridge(e),this.bleManagerBridge=S.default.getBleManagerBridge(e),this.orderActionBridge=m.NativeOrderActionBridgeFactory.bridge(e),this.filePickerBridge=v.NativeFilePickerBridgeFactory.bridge(e),this.species=e}static build(e,t){return r(this,void 0,void 0,function*(){let n=t;if(n||(n=this.getOperatingSystem(e)),!n)throw new Error(y.InternalConstants.ErrorCode.invalidParams);if(!d.PhonePeUtils.isValidSpecies(e)||!d.PhonePeUtils.isValidOS(n))throw new Error(y.InternalConstants.ErrorCode.invalidParams);let r=new O(e,n);return e===C.ExternalConstants.Species.web&&(yield l.MethodVersioningHandler.initSupportedVersionFromNative()),r})}static getOperatingSystem(e){if(e===C.ExternalConstants.Species.web){if(-1!==navigator.userAgent.search(C.ExternalConstants.OSUserAgent.android))return C.ExternalConstants.OS.android;if(-1!==navigator.userAgent.search(C.ExternalConstants.OSUserAgent.ios))return C.ExternalConstants.OS.ios;let e=T.PhonePeSDKWebConstants.NavigationIOS.navigateToPaymentsView;return d.PhonePeUtils.isValidMethodOniOS(e)?C.ExternalConstants.OS.ios:C.ExternalConstants.OS.android}return C.ExternalConstants.OS.android}getItem(e,t,n){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertString(t),d.PhonePeUtils.assertString(n,!0)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.preferencesModule.getString(e,t,n)}setItem(e,t,n){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertString(t),d.PhonePeUtils.assertString(n)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.preferencesModule.saveString(e,t,n),d.PhonePeUtils.returnResolution(void 0)}removeItem(e,t){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertString(t)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.preferencesModule.removeItem(e,t),d.PhonePeUtils.returnResolution(void 0)}startUpdatingLocation(){this.locationModule.startUpdatingLocation()}stopUpdatingLocation(){this.locationModule.stopUpdatingLocation()}getCurrentLocation(){return this.locationModule.getCurrentLocation(!0)}registerLocationUpdateSuccessCallback(e,t){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertFunction(t)}catch(e){return d.PhonePeUtils.returnRejection(e)}let n=this.locationModule.onLocationUpdateSuccess(e,t);return d.PhonePeUtils.returnResolution(n)}registerLocationUpdateFailureCallback(e,t){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertFunction(t)}catch(e){return d.PhonePeUtils.returnRejection(e)}let n=this.locationModule.onLocationUpdateFailure(e,t);return d.PhonePeUtils.returnResolution(n)}openPaymentsPage(e,t,n,r,i,a){return this.makeCommonPaymentsPageCall(y.InternalConstants.General.v1,e,t,n,r,i,a)}openTransactionDetailsPage(e){try{d.PhonePeUtils.assertString(e)}catch(e){return d.PhonePeUtils.returnRejection(e)}let t=u.ExternalNavigationFactory.transactionDetailRequest(e);return this.navigationModule.processNavigationRequestForResultAsync(t)}seekPermission(e){try{d.PhonePeUtils.assertArray(e);for(let t of e)d.PhonePeUtils.assertString(t),d.PhonePeUtils.assert(void 0!==_[t],y.InternalConstants.ErrorCode.invalidParams)}catch(e){return d.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===C.ExternalConstants.Species.web)return d.PhonePeUtils.returnRejection(y.InternalConstants.ErrorCode.invalidParams);throw new Error("Wrong species sent")}logMerchantEvent(e,t){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertObject(t,!0)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.analyticsBridge.logMerchantEvent(e,t)}fetchGrantToken(){return this.authBridge.fetchGrantToken()}fetchAuthToken(){return this.authBridge.fetchAuthToken()}isConsentGranted(){return this.authV2Bridge.isConsentGranted()}fetchAuthTokenIfConsentRecorded(e){return this.authV2Bridge.fetchAuthTokenIfConsentRecorded(e)}createServiceRequestToken(){return this.orderActionBridge.createServiceRequestToken()}getDeviceInfo(){return this.deviceInfoBridge.getDeviceInfo()}bluetoothRead(e,t,n){return this.bleManagerBridge.read(e,t,n)}bluetoothReadRSSI(e){return this.bleManagerBridge.readRSSI(e)}bluetoothRefreshCache(e){return this.bleManagerBridge.refreshCache(e)}bluetoothRetrieveServices(e,t){return this.bleManagerBridge.retrieveServices(e,t)}bluetoothWrite(e,t,n,r,i=20){return this.bleManagerBridge.write(e,t,n,r,i)}bluetoothWriteWithoutResponse(e,t,n,r,i=20,a=10){return this.bleManagerBridge.writeWithoutResponse(e,t,n,r,i,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,r={}){return this.bleManagerBridge.scan(e,t,n,r)}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{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertString(t),n=JSON.parse(M.Base64Client.decode(e)),d.PhonePeUtils.assertObject(n)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.orderActionBridge.reserveOrder(d.PhonePeUtils.getReserveOrderPayload(n,t))}proceedToPay(e,t){try{this.logMerchantEvent("CATEGORY_PAYMENT_INIT",{}),d.PhonePeUtils.assertString(e),O.getOperatingSystem(this.species)===C.ExternalConstants.OS.ios&&d.PhonePeUtils.assertString(t)}catch(e){return d.PhonePeUtils.returnRejection(e)}let n=t?encodeURIComponent(t):"";const r=u.ExternalNavigationFactory.genericPaymentNavigationRequest(e,n);return this.navigationModule.processNavigationRequestForResultAsync(r)}openPaymentsPageForReservedOrder(e,t,n,r,i,a){const o=JSON.parse(M.Base64Client.decode(t));return this.makeCommonPaymentsPageCall(y.InternalConstants.General.v2,e,o,n,r,i,a)}makeCommonPaymentsPageCall(e,t,n,r,i,a,o){try{d.PhonePeUtils.assertString(t),d.PhonePeUtils.assertObject(n),this.species===C.ExternalConstants.Species.web&&d.PhonePeUtils.assertString(r,!0),d.PhonePeUtils.assertString(i,!0),d.PhonePeUtils.assertArray(a,!0)}catch(e){return d.PhonePeUtils.returnRejection(e)}let s=n[b.ExternalPaymentsNamespace.Constant.kPayableAmount],c={};s&&(c={amount:s}),this.logMerchantEvent("CATEGORY_PAYMENT_INIT",c);let l=u.ExternalNavigationFactory.paymentNavigationRequest(t,n,e,r,i,a,o);return new Promise((e,t)=>{this.navigationModule.processNavigationRequestForResultAsync(l).then(t=>{let r={},i=b.ExternalPaymentsNamespace.Constant.kMerchantTransactionId,a=n[i];a&&(r[i]=a),e(r)}).catch(e=>{t(e)})})}selectFile(e,t){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertBoolean(t)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.filePickerBridge.selectFile(e,t)}readFile(e,t,n){try{if(d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertNumber(t),d.PhonePeUtils.assertNumber(n),t<0||n<0)throw new TypeError(y.InternalConstants.ErrorCode.invalidParams)}catch(e){return d.PhonePeUtils.returnRejection(e)}return this.filePickerBridge.readFile(e,t,n)}closeApp(){let e=new i.CloseAppNavRequest("");this.navigationModule.closeAppRequest(e)}openMicroApp(e,t){try{d.PhonePeUtils.assertString(e),d.PhonePeUtils.assertObject(t,!0)}catch(e){return d.PhonePeUtils.returnRejection(e)}let n=new i.MicroAppNavigationRequest("",e,t,"",!0,!1);return this.navigationModule.processNavigationRequestAsync(n)}isMethodSupported(e){return l.MethodVersioningHandler.isMethodSupported(e)}}t.PhonePe=O,O.loggingEnabled=!1},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},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(void 0!==module&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},n=0,r=e.length;n<r;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),r=[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)];return r.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,r=(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),i=[fromCharCode(r>>>16),fromCharCode(r>>>8&255),fromCharCode(255&r)];return i.length-=[0,0,2,1][n],i.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);void 0!==module&&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__(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base64Client=void 0;const r=n(13);t.Base64Client=class{static encode(e){return r.Base64.encode(e)}static decode(e){return r.Base64.decode(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeCameraBridge=void 0;const r=n(1);var i=n(3).PhonePeSDKWebConstants.Camera;t.WebNativeCameraBridge=class{scanQRCode(e,t){return new Promise((n,a)=>{r.MessagingHandler.storePromiseAndCallNative(i.scanQRCode,i.androidBridgeName,{showGallery:e,validator:t}).then(e=>{n(e)}).catch(e=>{a(e)})})}startCamera(){return new Promise((e,t)=>{r.MessagingHandler.storePromiseAndCallNative(i.startCamera,i.androidBridgeName,{}).then(t=>{e(t)}).catch(e=>{t(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeCameraBridgeFactory=void 0;const r=n(15),i=n(0);t.NativeCameraBridgeFactory=class{static getNativeCameraBridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebNativeCameraBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebPPBleManager=void 0;t.WebPPBleManager=class{read(e,t,n){throw new Error("Wrong species sent")}readRSSI(e){throw new Error("Wrong species sent")}refreshCache(e){throw new Error("Wrong species sent")}retrieveServices(e,t){throw new Error("Wrong species sent")}write(e,t,n,r,i){throw new Error("Wrong species sent")}writeWithoutResponse(e,t,n,r,i,a){throw new Error("Wrong species sent")}connect(e){throw new Error("Wrong species sent")}createBond(e){throw new Error("Wrong species sent")}removeBond(e){throw new Error("Wrong species sent")}disconnect(e){throw new Error("Wrong species sent")}startNotification(e,t,n){throw new Error("Wrong species sent")}stopNotification(e,t,n){throw new Error("Wrong species sent")}checkState(){throw new Error("Wrong species sent")}start(e){throw new Error("Wrong species sent")}scan(e,t,n,r){throw new Error("Wrong species sent")}stopScan(){throw new Error("Wrong species sent")}enableBluetooth(){throw new Error("Wrong species sent")}getConnectedPeripherals(e){throw new Error("Wrong species sent")}getBondedPeripherals(){throw new Error("Wrong species sent")}getDiscoveredPeripherals(){throw new Error("Wrong species sent")}removePeripheral(e){throw new Error("Wrong species sent")}isPeripheralConnected(e,t){throw new Error("Wrong species sent")}requestConnectionPriority(e,t){throw new Error("Wrong species sent")}requestMTU(e,t){throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(17);t.default=class{static getBleManagerBridge(e){if(e===r.ExternalConstants.Species.web)return new i.WebPPBleManager;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeFilePickerBridge=void 0;const r=n(1),i=n(2).InternalConstants.FilePickerBridge;t.WebNativeFilePickerBridge=class{selectFile(e,t){return new Promise((n,a)=>{r.MessagingHandler.storePromiseAndCallNative(i.selectFile,i.bridgeName,{mimeType:e,allowMultiple:t}).then(e=>{n(JSON.parse(e))}).catch(e=>{a(e)})})}readFile(e,t,n){return new Promise((a,o)=>{r.MessagingHandler.storePromiseAndCallNative(i.readFile,i.bridgeName,{uri:e,offset:t,length:n}).then(e=>{a(JSON.parse(e))}).catch(e=>{o(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeFilePickerBridgeFactory=void 0;const r=n(19),i=n(0);t.NativeFilePickerBridgeFactory=class{static bridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebNativeFilePickerBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeOrderActionBridge=void 0;const r=n(1),i=n(2).InternalConstants.OrderActionBridge;t.WebNativeOrderActionBridge=class{reserveOrder(e){return new Promise((t,n)=>{r.MessagingHandler.storePromiseAndCallNative(i.reserveOrder,i.bridgeName,e).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}createServiceRequestToken(){return new Promise((e,t)=>{r.MessagingHandler.storePromiseAndCallNative(i.fetchOrderRequestToken,i.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeOrderActionBridgeFactory=void 0;const r=n(21),i=n(0);t.NativeOrderActionBridgeFactory=class{static bridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebNativeOrderActionBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeDeviceInfoBridge=void 0;t.WebNativeDeviceInfoBridge=class{getDeviceInfo(){return Promise.resolve()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeDeviceInfoBridgeFactory=void 0;const r=n(23),i=n(0);t.NativeDeviceInfoBridgeFactory=class{static bridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebNativeDeviceInfoBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativePreferenceBridge=void 0;const r=n(4),i=n(1),a=n(0),o=n(3);var s=o.PhonePeSDKWebConstants.Preferences;t.WebNativePreferenceBridge=class{constructor(e){this.operatingSystem=e}getString(e,t,n){let r=this.prefObject(e,t,void 0,n);return i.MessagingHandler.storePromiseAndCallNative(s.getItem,s.androidBridgeName,r)}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){r.Logger.logd("PhonePe","[Error] his should not be called in case of web pref bridge")}saveString(e,t,n){let r=this.prefObject(e,t,n,void 0);i.MessagingHandler.callNative(s.setItem,s.androidBridgeName,r)}removeItem(e,t){let n=this.prefObject(e,t,void 0,void 0),r=s.removeItem;this.operatingSystem===a.ExternalConstants.OS.android&&(r=s.removeItemAndroid),i.MessagingHandler.callNative(r,o.PhonePeSDKWebConstants.Preferences.androidBridgeName,n)}prefObject(e,t,n,r){let i={};return e&&(i[o.PhonePeSDKWebConstants.General.prefName]=e),t&&(i[o.PhonePeSDKWebConstants.General.key]=t),r&&(i[o.PhonePeSDKWebConstants.General.defaultValue]=r),n&&(i[o.PhonePeSDKWebConstants.General.value]=n),i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativePreferenceBridgeFactory=void 0;const r=n(25),i=n(0);t.NativePreferenceBridgeFactory=class{static getNativePreferenceBridge(e,t){if(e===i.ExternalConstants.Species.web)return new r.WebNativePreferenceBridge(t);throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.IOSWebNavigationHandler=void 0;const i=n(5),a=n(6),o=n(1),s=n(3);t.IOSWebNavigationHandler=class{processNavigationRequestAsync(e,t){return r(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 i.PhonePeUtils.returnRejection("Unhandled request type")})}processNavigationRequestForResultAsync(e){return r(this,void 0,void 0,function*(){return this.processNavigationRequestAsync(e,!0)})}navigateToPayment(e,t,n){let r=e,i=s.PhonePeSDKWebConstants.NavigationIOS.navigateToPaymentsView;return o.MessagingHandler.storePromiseAndCallNative(i,"",r)}navigateToTransactionDetail(e,t,n){return r(this,void 0,void 0,function*(){let t=e,n=s.PhonePeSDKWebConstants.NavigationIOS.navigateToTransactionDetail;return o.MessagingHandler.storePromiseAndCallNative(n,"",t)})}navigateToGenericPayment(e,t,n){return r(this,void 0,void 0,function*(){let t=e,n=s.PhonePeSDKWebConstants.NavigationIOS.navigateToGenericPaymentsView;return o.MessagingHandler.storePromiseAndCallNative(n,"",t)})}closeAppRequest(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Path=t.Node=void 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";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeNavigationRequestFactory=void 0;const r=n(28);t.NativeNavigationRequestFactory=class{static pathFromPaymentRequest(e,t){let n=[],i=new r.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 o=new r.Node("micro_app_payment","FRAGMENT",a);return n.push(i),n.push(o),new r.Path(n)}static pathFromGenericPaymentRequest(e,t){let n=[],i=new r.Node("payment_activity","ACTIVITY",{}),a={};a.reservationId=e.reservationId,a.fallbackUrl=e.fallbackUrl;let o=new r.Node("micro_app_aggregator_payment","FRAGMENT",a);return n.push(i),n.push(o),new r.Path(n)}static pathFromTransactionDetailsRequest(e,t){let n=[],i=new r.Node("payment_activity","ACTIVITY",{}),a={};a.transactionId=JSON.stringify(e.transactionId),a.transactionType=JSON.stringify("TICKETING"),a.info=JSON.stringify(e.info);let o=new r.Node("transaction_details_fragment","FRAGMENT",a);return n.push(i),n.push(o),new r.Path(n)}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.AndroidWebNavigationHandler=void 0;const i=n(5),a=n(1),o=n(29),s=n(6),c=n(3),l=n(2);var d=c.PhonePeSDKWebConstants.Navigation,u=l.InternalConstants.ActivityID;class h{processNavigationRequestAsync(e,t){return r(this,void 0,void 0,function*(){if(e.screenType===s.NavigationScreenType.PaymentsView){let n=e;return this.navigateToPayment(n,e.isNewTask,t)}if(e.screenType===s.NavigationScreenType.TransactionDetail){let n=e;return this.navigateToTransactionDetail(n,e.isNewTask,t)}if(e.screenType===s.NavigationScreenType.GenericPaymentsView){let n=e;return this.navigateToGenericPayment(n,e.isNewTask,t)}return i.PhonePeUtils.returnRejection("Unhandled request type")})}processNavigationRequestForResultAsync(e){return r(this,void 0,void 0,function*(){return this.processNavigationRequestAsync(e,!0)})}navigateToPayment(e,t,n){let r=o.NativeNavigationRequestFactory.pathFromPaymentRequest(e,t),i=this.objectForNavigation(r,u.payments,t);return n?a.MessagingHandler.storePromiseAndCallNative(d.navigateToPathForResult,d.androidBridgeName,i):a.MessagingHandler.callNative(d.navigateToPath,d.androidBridgeName,i)}navigateToTransactionDetail(e,t,n){return r(this,void 0,void 0,function*(){let r=o.NativeNavigationRequestFactory.pathFromTransactionDetailsRequest(e,t),i=this.objectForNavigation(r,u.transactionDetails,t);return n?a.MessagingHandler.storePromiseAndCallNative(d.navigateToPathForResult,d.androidBridgeName,i):a.MessagingHandler.callNative(d.navigateToPath,d.androidBridgeName,i)})}navigateToGenericPayment(e,t,n){let r=o.NativeNavigationRequestFactory.pathFromGenericPaymentRequest(e,t),i=this.objectForNavigation(r,u.payments,t);return n?a.MessagingHandler.storePromiseAndCallNative(d.navigateToPathForResult,d.androidBridgeName,i):a.MessagingHandler.callNative(d.navigateToPath,d.androidBridgeName,i)}objectForNavigation(e,t,n){let r={};return r[h.pathKey]=JSON.stringify(e),r[h.activityIdKey]=t,r[h.isNewTaskKey]=n?268435456:0,r}closeAppRequest(e){}}t.AndroidWebNavigationHandler=h,h.pathKey="path",h.activityIdKey="activityId",h.isNewTaskKey="isNewTask"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeNavigationFactory=void 0;const r=n(30),i=n(27),a=n(0);t.NativeNavigationFactory=class{static repository(e,t){if(e===a.ExternalConstants.Species.web)return t===a.ExternalConstants.OS.ios?new i.IOSWebNavigationHandler:new r.AndroidWebNavigationHandler;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhonePeWebSubscription=void 0;const r=n(7);t.PhonePeWebSubscription=class{constructor(e,t,n){this.eventName=t,this.listener=n,this.callbackName=e}remove(){r.EventHandler.removeSubscription(this)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebLocationBridge=void 0;const r=n(32),i=n(3),a=n(1),o=n(7);var s=i.PhonePeSDKWebConstants.Location;t.WebLocationBridge=class{getAddress(e,t){return Promise.resolve()}startUpdatingLocation(){a.MessagingHandler.callNative(s.startUpdatingLocation,s.androidBridgeName,{})}stopUpdatingLocation(){a.MessagingHandler.callNative(s.stopUpdatingLocation,s.androidBridgeName,{}),o.EventHandler.removeAllSubscriptions(s.locationSuccessEventKey),o.EventHandler.removeAllSubscriptions(s.locationFailureEventKey)}getCurrentLocation(){let e={};return e[s.forceNewLocation]=!0,a.MessagingHandler.storePromiseAndCallNative(s.getCurrentLocation,s.androidBridgeName,e)}onLocationUpdateSuccess(e,t){let n=new r.PhonePeWebSubscription(e,s.locationSuccessEventKey,t);return o.EventHandler.addSubscription(n),n}onLocationUpdateFailure(e,t){let n=new r.PhonePeWebSubscription(e,s.locationFailureEventKey,t);return o.EventHandler.addSubscription(n),n}isLocationTurnedOn(){return Promise.resolve()}turnOnLocation(){return Promise.resolve()}setLocationPriority(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationBridgeFactory=void 0;const r=n(33),i=n(0);t.LocationBridgeFactory=class{static getNativeLocationBridge(e,t){if(e===i.ExternalConstants.Species.web)return new r.WebLocationBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsInfo=void 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}),t.ExternalPaymentsRequestFactory=void 0;const r=n(8);var i=r.ExternalPaymentsNamespace.Constant,a=r.ExternalPaymentsNamespace.PaymentOptionsContext,o=r.ExternalPaymentsNamespace.PaymentOptionsContextMetadata,s=r.ExternalPaymentsNamespace.MicroPayRequest,c=r.ExternalPaymentsNamespace.PaymentTimeOutModel,l=r.ExternalPaymentsNamespace.DismissBehaviourModel,d=r.ExternalPaymentsNamespace.InternalPaymentUiConfig,u=r.ExternalPaymentsNamespace.Contact,h=r.ExternalPaymentsNamespace.CONTACT_TYPE;const g=n(2);t.ExternalPaymentsRequestFactory=class{static microPayRequest(e,t,n){let r=e[i.kServiceRequestId],c=new s(e[i.kMerchantId],191,g.InternalConstants.General.v1,n,void 0,r);c.serviceProviderId=c.merchantId;let l={};l[i.kSellingPrice]=e[i.kPayableAmount],l[i.kServiceType]=i.kServiceTypeValue,l[i.kReservationId]=e[i.kReservationId];let d={};d[i.kServiceCategory]=e[i.kServiceCategory],l[i.kServiceContext]=d,e[i.kQuantity]&&(l[i.kQuantity]=e[i.kQuantity]),l[i.kServiceTypeVersion]=e[i.kServiceTypeVersion],c.fulFillContext=JSON.stringify(l),c.discoveryContext=JSON.stringify(this.discoveryContext(c.merchantId));let u=new o(c.merchantId,e[i.kServiceCategory],c.merchantId,i.kServiceTypeValue);return c.paymentOptionsContext=JSON.stringify(new a(u)),c}static discoveryContext(e){return{merchantId:e,mode:g.InternalConstants.General.discoveryContextMode}}static internalPaymentUIConfig(e,t,n,r,i,a){let o=[new u(h.CONTACT_TYPE_MERCHANT,t,r,a)],s=g.InternalConstants.General.confirmationScreenDuration,c=new d(g.InternalConstants.General.paymentScreenName,e,o,s,i);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,i.timeoutTitle,i.timeoutMessage,i.timeoutActionButtonTitle,i.PAYMENT_TIMEOUT)}static paymentDismissModel(){return new l(!0,i.dismissTitle,i.dismissMessage,i.dismissPositiveButtonTitle,i.dismissNegativeButtonTitle,i.PAYMENT_DISMISS)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OriginInfo=void 0;t.OriginInfo=class{constructor(e){this.analyticsInfo=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalNavigationFactory=void 0;const r=n(37),i=n(36),a=n(6),o=n(8),s=n(35);var c=o.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,h){let g=t[o.ExternalPaymentsNamespace.Constant.kPayableAmount],P=t[o.ExternalPaymentsNamespace.Constant.kValidFor];P&&(P*=1e3);let p=t[c.kMerchantId],m=i.ExternalPaymentsRequestFactory.internalPaymentUIConfig(g,e,P,d,h,p),v=i.ExternalPaymentsRequestFactory.microPayRequest(t,n,l),f=new a.PaymentMetaData([{}]);if(void 0!==u){let e=[];for(let t of u)for(let n in t)if(t.hasOwnProperty(n)){let r=n,i=t[n],a={};a[c.kKey]=r,a[c.kValue]=i,e.push(a)}f.details=e}let N=t[c.kServiceCategory];N||(N="JSSDK");let y=new r.OriginInfo(new s.AnalyticsInfo(N,N+"_NAVIGATE_TO_PAYMENTS",Math.random().toString(36).substring(7)));return new a.PaymentNavigationRequest("Pay","Pay",!0,!1,o.ExternalPaymentsNamespace.PAYMENT_MODE.MODE_SEND_MONEY,v,m,o.ExternalPaymentsNamespace.TRANSACTION_TYPE.SENT_PAYMENT,f,y)}static transactionDetailRequest(e){let t=new r.OriginInfo(new s.AnalyticsInfo("JSSDK","JSSDK_NAVIGATE_TO_TRANSACTION_DETAILS",Math.random().toString(36).substring(7)));return new a.TransactionDetailsNavigationRequest("Details","Details",!0,!1,e,o.ExternalPaymentsNamespace.TRANSACTION_TYPE.SENT_PAYMENT,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebPermissionsBridge=void 0;const r=n(4),i=n(5),a=n(1);var o=n(2).InternalConstants.PermissionsBridge;t.WebPermissionsBridge=class{constructor(e){this.operatingSystem=e}seekPermission(e){let t=i.PhonePeUtils.osSpecificPermissionNames(e,this.operatingSystem);return new Promise((e,n)=>{a.MessagingHandler.storePromiseAndCallNative(o.seekPermission,o.name,{permissions:t}).then(t=>{if(r.Logger.logd("PhonePe","Unstripped response = "+JSON.stringify(t)),"string"==typeof t){let n=JSON.parse(t);n.forEach(e=>{let t=i.PhonePeUtils.strippedPermissionName(e[o.kPermission],this.operatingSystem);e[o.kPermission]=t}),r.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(o.openSettingsPage,o.name,{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativePermissionsBridgeFactory=void 0;const r=n(39),i=n(0);t.NativePermissionsBridgeFactory=class{static getPermissionsBridge(e,t){if(e===i.ExternalConstants.Species.web)return new r.WebPermissionsBridge(t);throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeAnalyticsBridge=void 0;const r=n(1),i=n(2);var a=i.InternalConstants.AnalyticsBridge;t.WebNativeAnalyticsBridge=class{logMerchantEvent(e,t){return r.MessagingHandler.storePromiseAndCallNative(a.methodName,a.bridgeName,this.objectForAnalytics(e,t))}objectForAnalytics(e,t){let n={};return n[i.InternalConstants.AnalyticsBridge.kName]=e,t&&(n[i.InternalConstants.AnalyticsBridge.kMetadata]=t),n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeAnalyticsBridgeFactory=void 0;const r=n(41),i=n(0);t.NativeAnalyticsBridgeFactory=class{static getNativeAnalyticsBridge(e,t){if(e===i.ExternalConstants.Species.web)return new r.WebNativeAnalyticsBridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeOAuthV2Bridge=void 0;const r=n(1),i=n(2).InternalConstants.AuthV2Bridge;t.WebNativeOAuthV2Bridge=class{isConsentGranted(){return new Promise((e,t)=>{r.MessagingHandler.storePromiseAndCallNative(i.isConsentGranted,i.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}fetchAuthTokenIfConsentRecorded(e){return new Promise((t,n)=>{r.MessagingHandler.storePromiseAndCallNative(i.fetchAuthTokenIfConsentRecorded,i.bridgeName,{consentMessage:e}).then(e=>{t(JSON.parse(e))}).catch(e=>{n(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeOAuthV2BridgeFactory=void 0;const r=n(43),i=n(0);t.NativeOAuthV2BridgeFactory=class{static bridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebNativeOAuthV2Bridge;throw new Error("Wrong species sent")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebNativeOAuthBridge=void 0;const r=n(1),i=n(2).InternalConstants.AuthBridge;t.WebNativeOAuthBridge=class{fetchGrantToken(){return new Promise((e,t)=>{r.MessagingHandler.storePromiseAndCallNative(i.fetchGrantToken,i.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}fetchAuthToken(){return new Promise((e,t)=>{r.MessagingHandler.storePromiseAndCallNative(i.fetchAuthToken,i.bridgeName,{}).then(t=>{e(JSON.parse(t))}).catch(e=>{t(e)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeOAuthBridgeFactory=void 0;const r=n(45),i=n(0);t.NativeOAuthBridgeFactory=class{static bridge(e){if(e===i.ExternalConstants.Species.web)return new r.WebNativeOAuthBridge;throw new Error("Wrong species sent")}}}]);