@ikas/storefront 3.0.0-alpha.43 → 3.0.0-alpha.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_virtual/index.js_commonjs-proxy13.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy14.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/components/checkout/components/master-pass/modal-otp/index.js +1 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/offer-product/select/index.js +1 -1
- package/build/components/checkout/components/offer-product/style.module.scss.js +1 -1
- package/build/components/checkout/modelMasterPass.js +1 -1
- package/build/ext/axios/package.json.js +1 -1
- package/build/ikas.cjs +1 -1
- package/build/scripts/generators/config/content.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'../ext/
|
|
1
|
+
import e from'../ext/inline-style-parser/index.js';export{default}from"../node_modules/inline-style-parser/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'../ext/
|
|
1
|
+
import e from'../ext/safe-buffer/index.js';export{default}from"../node_modules/safe-buffer/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useRef as t,useState as o,useEffect as a}from"react";import{observer as n}from"mobx-react-lite";import"../../../../../storefront/index.js";import'../../../../../ext/lodash/isArguments.js';import'../../../../../ext/lodash/isBuffer.js';import'../../../../../ext/lodash/isTypedArray.js';import'../../../../../ext/lodash/_baseGetTag.js';import{useTranslation as s}from"../../../../../utils/i18n.js";import{Button as r}from"../../button/index.js";import{FormItem as c}from"../../form-item/index.js";import{FormItemType as m}from"../../form-item/model.js";import l from"../modal/index.js";import i from"./svg/master-pass.js";import p from"./style.module.scss.js";var u=n((function(n){var u=n.visible,d=n.type,f=n.vm,h=n.onClose,v=s().t,b=t(),g=o(180),x=g[0],k=g[1],M=o(""),E=M[0],j=M[1],P=o(!1),T=P[0],y=P[1],C=o(!1),O=C[0],N=C[1],V=function(){if(!O&&E&&f.checkout.masterPassPaymentGateway){N(!0),f.mpVM.onOtpFormSubmit({validationCode:E,store:f.store,checkout:f.checkout,callback:function(){N(!1),j(""),R()}})}},R=function(){k(0)},_=function(){k(180)},w=function(){k(180)};a((function(){if(!(x<1&&b.current))return b.current&&clearInterval(b.current),b.current=setInterval((function(){k(x-1)}),1e3),function(){b.current&&clearInterval(b.current)};clearInterval(b.current)}),[x]);var I,L,A,B,S,D,F=x<=120,G=e.createElement("div",null,e.createElement("div",{className:p.Wrapper},"masterPassOtp"===d&&e.createElement("span",{"data-mr":!0,className:p.Logo},e.createElement(i,null)),e.createElement("p",{className:p.Text},v("masterPassOtp"===d?"checkout-page:masterPass.otpModal.otpTextMasterPass":"checkout-page:masterPass.otpModal.otpTextBank"))),e.createElement("div",{className:p.Countdown},v("checkout-page:masterPass.otpModal.countdownText"),e.createElement("strong",null,(I=x%3600,L=Math.floor(I/60),A=I%60,B=Math.ceil(A),S=L<10?"0".concat(L):L,D=B<10?"0".concat(B):B,"".concat(S,":").concat(D)))),f.mpVM.otpResponse.text&&e.createElement("div",{role:"error"===f.mpVM.otpResponse.status?"alert":"",className:p.OtpResponseText},f.mpVM.otpResponse.text),e.createElement("form",{onSubmit:function(e){e.preventDefault(),V()}},e.createElement(c,{type:m.TEXT,label:v("checkout-page:masterPass.otpModal.inputLabel"),name:"
|
|
1
|
+
import e,{useRef as t,useState as o,useEffect as a}from"react";import{observer as n}from"mobx-react-lite";import"../../../../../storefront/index.js";import'../../../../../ext/lodash/isArguments.js';import'../../../../../ext/lodash/isBuffer.js';import'../../../../../ext/lodash/isTypedArray.js';import'../../../../../ext/lodash/_baseGetTag.js';import{useTranslation as s}from"../../../../../utils/i18n.js";import{Button as r}from"../../button/index.js";import{FormItem as c}from"../../form-item/index.js";import{FormItemType as m}from"../../form-item/model.js";import l from"../modal/index.js";import i from"./svg/master-pass.js";import p from"./style.module.scss.js";var u=n((function(n){var u=n.visible,d=n.type,f=n.vm,h=n.onClose,v=s().t,b=t(),g=o(180),x=g[0],k=g[1],M=o(""),E=M[0],j=M[1],P=o(!1),T=P[0],y=P[1],C=o(!1),O=C[0],N=C[1],V=function(){if(!O&&E&&f.checkout.masterPassPaymentGateway){N(!0),f.mpVM.onOtpFormSubmit({validationCode:E,store:f.store,checkout:f.checkout,callback:function(){N(!1),j(""),R()}})}},R=function(){k(0)},_=function(){k(180)},w=function(){k(180)};a((function(){if(!(x<1&&b.current))return b.current&&clearInterval(b.current),b.current=setInterval((function(){k(x-1)}),1e3),function(){b.current&&clearInterval(b.current)};clearInterval(b.current)}),[x]);var I,L,A,B,S,D,F=x<=120,G=e.createElement("div",null,e.createElement("div",{className:p.Wrapper},"masterPassOtp"===d&&e.createElement("span",{"data-mr":!0,className:p.Logo},e.createElement(i,null)),e.createElement("p",{className:p.Text},v("masterPassOtp"===d?"checkout-page:masterPass.otpModal.otpTextMasterPass":"checkout-page:masterPass.otpModal.otpTextBank"))),e.createElement("div",{className:p.Countdown},v("checkout-page:masterPass.otpModal.countdownText"),e.createElement("strong",null,(I=x%3600,L=Math.floor(I/60),A=I%60,B=Math.ceil(A),S=L<10?"0".concat(L):L,D=B<10?"0".concat(B):B,"".concat(S,":").concat(D)))),f.mpVM.otpResponse.text&&e.createElement("div",{role:"error"===f.mpVM.otpResponse.status?"alert":"",className:p.OtpResponseText},f.mpVM.otpResponse.text),e.createElement("form",{onSubmit:function(e){e.preventDefault(),V()}},e.createElement(c,{type:m.TEXT,label:v("checkout-page:masterPass.otpModal.inputLabel"),name:"one-time-code",autocomplete:"off",rightContent:f.mpVM.isOtpFormSubmitAtLeastOnce&&F?e.createElement("button",{type:"button",className:p.ResendButton,disabled:T,onClick:function(e){e.stopPropagation(),T||(y(!0),f.mpVM.resendOtp({store:f.store,checkout:f.checkout,callback:function(){y(!1),w(),j("")}}))}},v("checkout-page:masterPass.otpModal.resendText")):void 0,value:E,onChange:function(e){j(e)}}),e.createElement(r,{type:"submit",style:{width:"100%",marginTop:"16px"},text:v("checkout-page:masterPass.otpModal.buttonText"),isLoading:O,isDisabled:!E,onClick:V})));return a((function(){u?_():R()}),[u]),a((function(){_()}),[d]),console.log("calisti modal",u),e.createElement(l,{visible:u,onClose:h},G)}));export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{formatMoney as a}from"../../../../utils/currency.js";import{useTranslation as r}from"../../../../utils/i18n.js";import{Button as
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{formatMoney as a}from"../../../../utils/currency.js";import{useTranslation as r}from"../../../../utils/i18n.js";import{Button as c}from"../button/index.js";import n from"./select/index.js";import o from"../svg/cross.js";import i from"./style.module.scss.js";var d=function(t){var a=t.seconds,c=t.rejectOffer,n=r().t,o=e.useState(a),d=o[0],s=o[1];e.useEffect((function(){var e=d>0&&setInterval((function(){return s(d-1)}),1e3);return 0===d&&c(),function(){return clearInterval(e)}}),[d]);return e.createElement("div",{className:i.CountdownContainer},e.createElement("div",{className:i.CountdownText},n("checkout-page:timeRemaining",{value:function(e){var t=Math.floor(e/60/60),a=Math.floor(e/60)-60*t,r=e%60;return 0!==t?t.toString().padStart(2,"0")+":":a.toString().padStart(2,"0")+":"+r.toString().padStart(2,"0")}(d)})))},s=t((function(t){var s,l=t.vm,u=t.campaignOffer,m=r().t,f=e.useState(u.productDetail.selectedVariant.id),p=f[0],v=f[1],g=function(){l.updateCartCampaignOffer({accepted:!1,cartId:l.checkout.id,campaignOfferId:u.campaignOffer.id,campaignOfferProductId:u.offer.id,productId:u.offer.productId,variantId:p})};return e.createElement("div",{className:i.Container},u.offer.countdownMinutes&&e.createElement(d,{seconds:60*u.offer.countdownMinutes,rejectOffer:g}),e.createElement("div",{className:i.ContentContainer},e.createElement("div",{className:i.Header},e.createElement("div",{className:i.Title},u.offer.title),e.createElement("div",{className:i.RejectButton,onClick:g},e.createElement(o,null))),e.createElement("div",{className:i.ProductContainer},e.createElement("div",{className:i.ImageContainer},e.createElement("img",{className:i.Image,src:null===(s=u.productDetail.selectedVariant.mainImage)||void 0===s?void 0:s.thumbnailSrc})),e.createElement("div",{className:i.ProductDetails},e.createElement("div",{className:i.ProductName},u.productDetail.product.name),u.productDetail.product.brand&&e.createElement("div",{className:i.Brand},u.productDetail.product.brand.name),e.createElement("div",{className:i.ProductPrice},e.createElement("span",{className:i.Discount},a(u.productDetail.selectedVariant.price.finalPrice,l.checkout.currencyCode))," ",a(u.productDetail.selectedVariant.price.finalPrice-u.productDetail.selectedVariant.price.finalPrice*(u.offer.discountAmount||100)/100,l.checkout.currencyCode)),e.createElement("div",{className:i.Actions},u.productDetail.product.hasVariant&&u.productDetail.hasStock&&e.createElement(n,{value:p,onSelectChange:function(e){v(e)},options:u.productDetail.product.variants.filter((function(e){return e.hasStock})).map((function(e){return{label:e.variantValues.map((function(e){return e.name})).join(", "),value:e.id}}))}),e.createElement(c,{style:{width:"100%",height:44,fontSize:14},isDisabled:!u.productDetail.hasStock,text:m("checkout-page:actions.addToCart"),onClick:function(){l.updateCartCampaignOffer({accepted:!0,cartId:l.checkout.id,campaignOfferId:u.campaignOffer.id,campaignOfferProductId:u.offer.id,productId:u.offer.productId,variantId:p})}}))))))}));export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import a from"./style.module.scss.js";import
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import a from"./style.module.scss.js";import r from"./arrows.js";var l=t((function(t){var l=t.value,n=t.options,o=t.onSelectChange;return e.createElement("div",{className:a.Container},e.createElement("select",{className:a.Select,onChange:function(e){return o(e.target.value)}},!l&&e.createElement("option",{selected:!0,disabled:!0,key:-1}),null==n?void 0:n.map((function(t,a){return e.createElement("option",{key:a+t.value,value:t.value,selected:l===t.value},t.label)}))),e.createElement("div",{className:a.ArrowContainer},e.createElement(r,null)))}));export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from'../../../../ext/style-inject/dist/style-inject.es.js';var
|
|
1
|
+
import n from'../../../../ext/style-inject/dist/style-inject.es.js';var e={Container:"style-module_Container__3zW3x",CountdownContainer:"style-module_CountdownContainer__2-1gy",CountdownText:"style-module_CountdownText__X4H5U",ContentContainer:"style-module_ContentContainer__2Xs-1",Header:"style-module_Header__3xT0y",Title:"style-module_Title__2BmRm",RejectButton:"style-module_RejectButton__2ph9e",ProductContainer:"style-module_ProductContainer__1oWuO",ImageContainer:"style-module_ImageContainer__3HIYg",Image:"style-module_Image__3CWsj",ProductDetails:"style-module_ProductDetails__3qkC5",ProductName:"style-module_ProductName__hjoHz",Brand:"style-module_Brand__3LHOL",ProductPrice:"style-module_ProductPrice__2NcwT",Discount:"style-module_Discount__2mg3j",Actions:"style-module_Actions__1lwfq"};n(".style-module_Container__3zW3x {\n margin-top: 32px;\n margin-bottom: 48px;\n background-color: var(--checkout-card-bg-color);\n border-radius: 8px;\n}\n\n.style-module_CountdownContainer__2-1gy {\n display: flex;\n justify-content: center;\n padding: 6px;\n background-color: #cfced3;\n border-radius: 8px 8px 0 0;\n}\n\n.style-module_CountdownText__X4H5U {\n font-size: 14px;\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_ContentContainer__2Xs-1 {\n padding: 24px;\n width: 100%;\n}\n\n.style-module_Header__3xT0y {\n display: flex;\n justify-content: space-between;\n}\n\n.style-module_Title__2BmRm {\n margin-bottom: 24px;\n font-size: 22px;\n color: var(--checkout-primary-text-color);\n font-weight: 600;\n}\n\n.style-module_RejectButton__2ph9e {\n height: 35px;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 20px;\n margin-left: 12px;\n cursor: pointer;\n}\n\n.style-module_ProductContainer__1oWuO {\n display: flex;\n}\n\n.style-module_ImageContainer__3HIYg {\n height: 136px;\n width: 136px;\n position: relative;\n background-color: #fff;\n margin-right: 24px;\n border-radius: 8px;\n flex: 0 0 136px;\n}\n\n.style-module_Image__3CWsj {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.style-module_ProductDetails__3qkC5 {\n flex: 1;\n}\n\n.style-module_ProductName__hjoHz {\n margin-bottom: 2px;\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n font-weight: 600;\n line-height: 24px;\n}\n\n.style-module_Brand__3LHOL {\n margin-bottom: 2px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_ProductPrice__2NcwT {\n font-size: 14px;\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_Discount__2mg3j {\n font-size: 14px;\n font-weight: 600;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n}\n\n.style-module_Actions__1lwfq {\n display: flex;\n margin-top: 24px;\n}");export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as s,__rest as t}from'../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import{IkasStorefrontConfig as a}from"../../storefront/index.js";import n from"../../__api/queries/getMasterpassRequestToken.js";import{MasterPassOperationTypeEnum as r}from"../../__api/types/index.js";import{useTranslation as i}from"../../utils/i18n.js";var c="undefined"==typeof localStorage,u=/000000[0|1]{10}/g,d=/[0|1]1100[0|1]{11}/g,l=/[0|1]11100[0|1]{10}/g,h=function(){function h(){var h=this;this.checkMasterPassData={status:""},this.saveCardToMasterPass={isCheckboxChecked:!1,cardName:"",phoneNumber:"",isSendConfirmationButtonPending:!1},this.otpResponse={status:"",text:""},this.isOtpFormSubmitAtLeastOnce=!1,this.visibleModal=void 0,this.cards=[],this.saveCardToMasterPassPhoneNumberDisabledInputValue=function(e){var s=e.store,t=e.checkout,o=e.withPlus;return h.phoneNumber({store:s,checkout:t,withPlus:o})||""},this.onSaveCardToMasterPassCheckedChange=function(e){h.saveCardToMasterPass.isCheckboxChecked=e},this.onSaveCardToMasterPassCardNameChange=function(e){h.saveCardToMasterPass.cardName=e},this.onSaveCardToMasterPassPhoneNumberChange=function(e){h.saveCardToMasterPass.phoneNumber=e},this.onSaveCardToMasterPassSendConfirmationButtonClick=function(e){var s=e.creditCard,t=e.store,o=e.checkout,a=e.paymentGateway,n=e.callback;console.log("onSaveCardToMasterPassSendConfirmationButtonClick 1"),h.register({creditCard:s,store:t,checkout:o,paymentGateway:a,callback:n})},this.showLinkCardToClientModal=function(){h.visibleModal="linkCardToClientModal"},this.hideLinkCardToClientModal=function(){h.visibleModal=void 0},this.showOtpModal=function(e){h.otpResponse.text="",h.otpResponse.status="",h.visibleModal="masterPassOtp"===e?"otpModalMasterPass":"otpModalBank",console.log("calisti",h.visibleModal)},this.hideOtpModal=function(){h.visibleModal=void 0,h.otpResponse.text="",h.otpResponse.status="",h.isOtpFormSubmitAtLeastOnce=!1},this.onResponseModalClose=function(){h.visibleModal=void 0,h.mfsResponseModalText=""},this.onSuccessModalClose=function(){h.visibleModal=void 0},this.onLinkCardToClientButtonClick=function(e){h.linkCardToClient(e)},this.onOtpFormSubmit=function(e){h.otpResponse.text="",h.otpResponse.status="",h.validateTransaction(e)},this.MFS=function(){var e;if(!c){if(window.MFS&&(null===(e=window.MFS)||void 0===e?void 0:e.setClientId))return window.MFS;console.error("MFS can not use.")}},this.getToken=function(t){var o=t.cartId,a=t.paymentGatewayId,r=t.operationType,i=t.phoneNumber;return e(h,void 0,void 0,(function(){var e;return s(this,(function(s){switch(s.label){case 0:return[4,n({cartId:o,paymentGatewayId:a,operationType:r,phoneNumber:i})];case 1:return(e=s.sent()).data&&e.isSuccess&&!e.errors.length?[2,e.data]:(this.showTokenErrorWithModal(),[2])}}))}))},this.phoneNumber=function(e){var s,t,o=e.store,a=e.checkout,n=e.withPlus,r=void 0!==n&&n,i=(null===(s=o.customerStore.customer)||void 0===s?void 0:s.phone)||(null===(t=a.shippingAddress)||void 0===t?void 0:t.phone);return i&&i.includes("+")&&!r&&(i=i.replace("+","")),i},this.sendSmsLanguage=function(e){var s,t="eng";if(e.localeOptions.length){var o=e.localeOptions.find((function(e){return e.routing.locale===a.getCurrentLocale()}));o&&o.iso3&&(t=null===(s=o.iso3)||void 0===s?void 0:s.toLowerCase())}return t},this.clearSaveCardToMasterPassForm=function(){h.saveCardToMasterPass.isCheckboxChecked=!1,h.saveCardToMasterPass.phoneNumber="",h.saveCardToMasterPass.cardName="",h.saveCardToMasterPass.isSendConfirmationButtonPending=!1},this.mfsResponseHandler=function(e){return function(s,t){console.log({field:"mfsResponseHandler",response:t}),e.callback&&e.callback();var o,a=function(e){var s;return null===(s=null==t?void 0:t.accountStatus)||void 0===s?void 0:s.match(e)};a(u)&&(h.checkMasterPassData.status="noMasterPassAccount",(o=h.phoneNumber({checkout:e.checkout,store:e.store,withPlus:!0}))&&(h.saveCardToMasterPass.phoneNumber=o));a(d)&&(h.checkMasterPassData.status="hasMasterPassAccountButDoesNotHaveAnyOperation",h.showLinkCardToClientModal(),(o=h.phoneNumber({checkout:e.checkout,store:e.store,withPlus:!0}))&&(h.saveCardToMasterPass.phoneNumber=o));if(a(l)&&(h.checkMasterPassData.status="hasMasterPassAccountAndHasRelation",(null==e?void 0:e.checkout)&&e.store&&(h.listCards({store:e.store,checkout:e.checkout}),console.log("call listcards"))),"validateTransaction"!==e.source&&"resendOtp"!==e.source||!t.responseDescription||(h.otpResponse.text=t.responseDescription,"1409"===t.responseCode&&(h.otpResponse.status="error")),"0000"!=t.responseCode&&""!=t.responseCode||(console.log("Register Success"),"deleteCard"===e.source&&h.listCards({store:e.store,checkout:e.checkout}),"validateTransaction"===e.source&&(null==e?void 0:e.checkout)&&e.store&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===h.checkMasterPassData.status?h.visibleModal="linkCardToClientModalSuccess":h.visibleModal="otpModalSuccess",e.checkout.selectedPaymentGateway=void 0,h.clearSaveCardToMasterPassForm(),h.listCards({store:e.store,checkout:e.checkout}))),"5196"===t.responseCode&&t.responseDescription&&(h.visibleModal="mfsResponseModal",h.mfsResponseModalText=t.responseDescription),"5001"==t.responseCode||"5008"==t.responseCode){var n="5001"===t.responseCode?"bankOtp":"masterPassOtp";h.showOtpModal(n)}if("5010"==t.responseCode&&"undefined"!=typeof window)return console.log('response.responseCode == "5010"'),void window.location.assign(t.url3D+"&returnUrl="+window.location.href);console.log({source:"MFS response.responseDescription",responseDescription:t.responseDescription,response:t})}},this.showTokenErrorWithModal=function(){var e=i().t;h.visibleModal="mfsResponseModal",h.mfsResponseModalText=e("checkout-page:errorUnknown")},this.checkMasterPass=function(o){return e(h,void 0,void 0,(function(){var e,a,n,i,c,u,d=o.checkout,l=o.store;return t(o,["checkout","store"]),s(this,(function(s){switch(s.label){case 0:return console.log("checkMasterPass 1"),(e=this.MFS())?(a=this.phoneNumber({store:l,checkout:d}),console.log("checkMasterPass 2"),n=d.masterPassPaymentGateway,a&&n&&n.masterPassClientId?(console.log("checkMasterPass 3",a),[4,this.getToken({cartId:d.id,paymentGatewayId:n.id,operationType:r.CHECK_MASTER_PASS_USER,phoneNumber:a})]):[2]):[2];case 1:return(i=s.sent())?(e.setClientId(n.masterPassClientId),c=this.sendSmsLanguage(l),u=this.prepareFormData({sendSmsLanguage:c,sendSms:"N",referenceNo:i.requestReferenceNumber,token:i.token,userId:a}),e.checkMasterPass(u,this.mfsResponseHandler({source:"checkMasterPass",checkout:d,store:l})),console.log("checkMasterPass 4"),[2]):[2]}}))}))},this.register=function(t){var o=t.creditCard,a=t.store,n=t.checkout,i=t.paymentGateway,c=t.callback;return e(h,void 0,void 0,(function(){var e,t,u,d;return s(this,(function(s){switch(s.label){case 0:return console.log("register 1"),(e=this.MFS())?(console.log("register 2"),(t=o.phoneNumber)&&i.masterPassClientId?(console.log("register 3"),[4,this.getToken({cartId:n.id,paymentGatewayId:i.id,operationType:r.REGISTER_CARD,phoneNumber:t})]):[2]):[2];case 1:return u=s.sent(),console.log("register 4"),(null==u?void 0:u.token)?(d=this.prepareFormData({msisdn:t,token:null==u?void 0:u.token,referenceNo:u.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(a),rtaPan:o.rtaPan,expiryDate:o.expiryDate,cvc:o.cvc,accountAliasName:o.accountAliasName,timeZone:u.timeZone,sendSms:"Y",actionType:"A",clientIp:"",delinkReason:"",eActionType:"A",cardTypeFlag:"05",cpinFlag:"Y",defaultAccount:"Y",mmrpConfig:"110010",identityVerificationFlag:"Y",mobileAccountConfig:"MWA",uiChannelType:"6"}),console.log("reigster 5"),e.setClientId(i.masterPassClientId),e.register(d,this.mfsResponseHandler({source:"register",store:a,checkout:n,callback:c})),[2]):[2]}}))}))},this.resendOtp=function(t){var o=t.store,a=t.checkout,n=t.callback;return e(h,void 0,void 0,(function(){var e,t,r;return s(this,(function(s){return this.isOtpFormSubmitAtLeastOnce&&(e=this.MFS())?(t=e.getLastToken(),r=this.sendSmsLanguage(o),e.resendOtp(t,r,this.mfsResponseHandler({source:"resendOtp",store:o,checkout:a,callback:n})),[2]):[2]}))}))},this.linkCardToClient=function(t){var o=t.store,a=t.checkout,n=t.callback;return e(h,void 0,void 0,(function(){var e,t,i,c,u;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({store:o,checkout:a}))&&(null==(i=a.masterPassPaymentGateway)?void 0:i.id))?[4,this.getToken({cartId:a.id,paymentGatewayId:i.id,operationType:r.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(c=s.sent())?(u=this.prepareFormData({sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(o),token:c.token,referenceNo:c.requestReferenceNumber,cardAliasName:"",msisdn:t}),e.linkCardToClient(u,this.mfsResponseHandler({source:"linkCardToClient",store:o,checkout:a,callback:n})),[2]):(n&&n(),[2])}}))}))},this.validateTransaction=function(t){var o=t.validationCode,a=t.store,n=t.checkout,i=t.callback;return e(h,void 0,void 0,(function(){var e,t,c,u,d;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({store:a,checkout:n}))&&(c=n.masterPassPaymentGateway))?[4,this.getToken({cartId:n.id,paymentGatewayId:c.id,operationType:r.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(u=s.sent())?(d=this.prepareFormData({pinType:"otp",validationCode:o,sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(a),token:u.token,referenceNo:u.requestReferenceNumber}),this.isOtpFormSubmitAtLeastOnce||(this.isOtpFormSubmitAtLeastOnce=!0),e.validateTransaction(d,this.mfsResponseHandler({source:"validateTransaction",store:a,checkout:n,callback:i})),[2]):[2]}}))}))},this.listCards=function(t){var o=t.store,a=t.checkout;return e(h,void 0,void 0,(function(){var e,t,n,i,c,u,d=this;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({store:o,checkout:a}))?(n=null===(u=a.masterPassPaymentGateway)||void 0===u?void 0:u.id,console.log("listCards paymentGatewayId",n),n?[4,this.getToken({cartId:a.id,paymentGatewayId:n,operationType:r.LIST_CARDS,phoneNumber:t})]:[2]):[2];case 1:return(i=s.sent())?(c=function(e,s){"0000"!=s.responseCode&&""!=s.responseCode&&(console.error({source:"mfs response.responseDescription",responseDescription:s.responseDescription,response:s}),console.log("TransactionID->",s.transactionId));var t=[];if(Array.isArray(s.cards)&&s.cards.length)for(var o=0;o<s.cards.length;o++){var a=s.cards[o];a.paymentGatewayId=n,t.push(a)}d.cards=t,console.log("list_card response->",s),console.log("Cards",t),console.log("TransactionID->",s.transactionId)},e.listCards(t,i.token,c),[2]):[2]}}))}))},this.deleteCard=function(t){var o=t.store,a=t.checkout,n=t.card;return e(h,void 0,void 0,(function(){var e,t,i,c;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({store:o,checkout:a}))?[4,this.getToken({cartId:a.id,paymentGatewayId:n.paymentGatewayId,operationType:r.DELETE_CARD,phoneNumber:t})]:[2];case 1:return(i=s.sent())?(c=this.prepareFormData({sendSms:"N",msisdn:t,token:i.token,referenceNo:i.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(o),accountAliasName:n.Name}),e.deleteCard(c,this.mfsResponseHandler({source:"deleteCard",store:o,checkout:a})),[2]):[2]}}))}))},o(this)}return Object.defineProperty(h.prototype,"isSaveCardToMasterPassPhoneNumberInputVisible",{get:function(){return("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||this.checkMasterPassData.status,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSaveCardToMasterPassPhoneNumberInputDisabled",{get:function(){return!("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)||("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||"noMasterPassAccount"===this.checkMasterPassData.status)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSendConfirmationButtonDisabled",{get:function(){return this.isSaveCardToMasterPassPhoneNumberInputVisible?this.isSaveCardToMasterPassPhoneNumberInputDisabled?!this.saveCardToMasterPass.cardName:!this.saveCardToMasterPass.cardName||!this.saveCardToMasterPass.phoneNumber:!this.saveCardToMasterPass.cardName},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isLinkCardToClientModalVisible",{get:function(){return"linkCardToClientModal"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isOtpModalVisible",{get:function(){return"otpModalBank"===this.visibleModal||"otpModalMasterPass"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isResponseModalVisible",{get:function(){return!("mfsResponseModal"!==this.visibleModal||!this.mfsResponseModalText)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSuccessModalVisible",{get:function(){return"linkCardToClientModalSuccess"===this.visibleModal||"otpModalSuccess"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"otpModalType",{get:function(){return"otpModalMasterPass"===this.visibleModal?"masterPassOtp":"bankOtp"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"successModalType",{get:function(){return"hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status?"linkCardToClient":"register"},enumerable:!1,configurable:!0}),h.prototype.prepareFormData=function(e){var s=new FormData;return Object.entries(e).forEach((function(e){var t=e[0],o=e[1];return s.append(t,o)})),s},h}();export{h as default};
|
|
1
|
+
import{__awaiter as e,__generator as s,__rest as t}from'../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import{IkasStorefrontConfig as a}from"../../storefront/index.js";import n from"../../__api/queries/getMasterpassRequestToken.js";import{MasterPassOperationTypeEnum as r}from"../../__api/types/index.js";import{useTranslation as i}from"../../utils/i18n.js";var c="undefined"==typeof localStorage,u=/000000[0|1]{10}/g,d=/[0|1]1100[0|1]{11}/g,l=/[0|1]11100[0|1]{10}/g,h=function(){function h(){var h=this;this.checkMasterPassData={status:""},this.saveCardToMasterPass={isCheckboxChecked:!1,cardName:"",phoneNumber:"",isSendConfirmationButtonPending:!1},this.otpResponse={status:"",text:""},this.isOtpFormSubmitAtLeastOnce=!1,this.visibleModal=void 0,this.cards=[],this.saveCardToMasterPassPhoneNumberDisabledInputValue=function(e){var s=e.store,t=e.checkout,o=e.withPlus;return h.phoneNumber({store:s,checkout:t,withPlus:o})||""},this.onSaveCardToMasterPassCheckedChange=function(e){h.saveCardToMasterPass.isCheckboxChecked=e},this.onSaveCardToMasterPassCardNameChange=function(e){h.saveCardToMasterPass.cardName=e},this.onSaveCardToMasterPassPhoneNumberChange=function(e){h.saveCardToMasterPass.phoneNumber=e},this.onSaveCardToMasterPassSendConfirmationButtonClick=function(e){var s=e.creditCard,t=e.store,o=e.checkout,a=e.paymentGateway,n=e.callback;console.log("onSaveCardToMasterPassSendConfirmationButtonClick 1"),h.register({creditCard:s,store:t,checkout:o,paymentGateway:a,callback:n})},this.showLinkCardToClientModal=function(){h.visibleModal="linkCardToClientModal"},this.hideLinkCardToClientModal=function(){h.visibleModal=void 0},this.showOtpModal=function(e){h.otpResponse.text="",h.otpResponse.status="",h.visibleModal="masterPassOtp"===e?"otpModalMasterPass":"otpModalBank",console.log("calisti",h.visibleModal)},this.hideOtpModal=function(){h.visibleModal=void 0,h.otpResponse.text="",h.otpResponse.status="",h.isOtpFormSubmitAtLeastOnce=!1},this.onResponseModalClose=function(){h.visibleModal=void 0,h.mfsResponseModalText=""},this.onSuccessModalClose=function(){h.visibleModal=void 0},this.onLinkCardToClientButtonClick=function(e){h.linkCardToClient(e)},this.onOtpFormSubmit=function(e){h.otpResponse.text="",h.otpResponse.status="",h.validateTransaction(e)},this.MFS=function(){var e;if(!c){if(window.MFS&&(null===(e=window.MFS)||void 0===e?void 0:e.setClientId))return window.MFS;console.error("MFS can not use.")}},this.getToken=function(t){var o=t.cartId,a=t.paymentGatewayId,r=t.operationType,i=t.phoneNumber;return e(h,void 0,void 0,(function(){var e;return s(this,(function(s){switch(s.label){case 0:return[4,n({cartId:o,paymentGatewayId:a,operationType:r,phoneNumber:i})];case 1:return(e=s.sent()).data&&e.isSuccess&&!e.errors.length?[2,e.data]:(this.showTokenErrorWithModal(),[2])}}))}))},this.phoneNumber=function(e){var s,t,o=e.store,a=e.checkout,n=e.withPlus,r=void 0!==n&&n,i=(null===(s=o.customerStore.customer)||void 0===s?void 0:s.phone)||(null===(t=a.shippingAddress)||void 0===t?void 0:t.phone);return i&&i.includes("+")&&!r&&(i=i.replace("+","")),i},this.sendSmsLanguage=function(e){var s,t="tur";if(e.localeOptions.length){var o=e.localeOptions.find((function(e){return e.routing.locale===a.getCurrentLocale()}));o&&o.iso3&&(t=null===(s=o.iso3)||void 0===s?void 0:s.toLowerCase())}return t},this.clearSaveCardToMasterPassForm=function(){h.saveCardToMasterPass.isCheckboxChecked=!1,h.saveCardToMasterPass.phoneNumber="",h.saveCardToMasterPass.cardName="",h.saveCardToMasterPass.isSendConfirmationButtonPending=!1},this.mfsResponseHandler=function(e){return function(s,t){console.log({field:"mfsResponseHandler",response:t}),e.callback&&e.callback();var o,a=function(e){var s;return null===(s=null==t?void 0:t.accountStatus)||void 0===s?void 0:s.match(e)};a(u)&&(h.checkMasterPassData.status="noMasterPassAccount",(o=h.phoneNumber({checkout:e.checkout,store:e.store,withPlus:!0}))&&(h.saveCardToMasterPass.phoneNumber=o));a(d)&&(h.checkMasterPassData.status="hasMasterPassAccountButDoesNotHaveAnyOperation",h.showLinkCardToClientModal(),(o=h.phoneNumber({checkout:e.checkout,store:e.store,withPlus:!0}))&&(h.saveCardToMasterPass.phoneNumber=o));if(a(l)&&(h.checkMasterPassData.status="hasMasterPassAccountAndHasRelation",(null==e?void 0:e.checkout)&&e.store&&(h.listCards({store:e.store,checkout:e.checkout}),console.log("call listcards"))),"validateTransaction"!==e.source&&"resendOtp"!==e.source||!t.responseDescription||(h.otpResponse.text=t.responseDescription,"1409"===t.responseCode&&(h.otpResponse.status="error")),"0000"!=t.responseCode&&""!=t.responseCode||(console.log("Register Success"),"deleteCard"===e.source&&h.listCards({store:e.store,checkout:e.checkout}),"validateTransaction"===e.source&&(null==e?void 0:e.checkout)&&e.store&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===h.checkMasterPassData.status?h.visibleModal="linkCardToClientModalSuccess":h.visibleModal="otpModalSuccess",e.checkout.selectedPaymentGateway=void 0,h.clearSaveCardToMasterPassForm(),h.listCards({store:e.store,checkout:e.checkout}))),"5196"===t.responseCode&&t.responseDescription&&(h.visibleModal="mfsResponseModal",h.mfsResponseModalText=t.responseDescription),"5001"==t.responseCode||"5008"==t.responseCode){var n="5001"===t.responseCode?"bankOtp":"masterPassOtp";h.showOtpModal(n)}if("5010"==t.responseCode&&"undefined"!=typeof window)return console.log('response.responseCode == "5010"'),void window.location.assign(t.url3D+"&returnUrl="+window.location.href);console.log({source:"MFS response.responseDescription",responseDescription:t.responseDescription,response:t})}},this.showTokenErrorWithModal=function(){var e=i().t;h.visibleModal="mfsResponseModal",h.mfsResponseModalText=e("checkout-page:errorUnknown")},this.checkMasterPass=function(o){return e(h,void 0,void 0,(function(){var e,a,n,i,c,u,d=o.checkout,l=o.store;return t(o,["checkout","store"]),s(this,(function(s){switch(s.label){case 0:return console.log("checkMasterPass 1"),(e=this.MFS())?(a=this.phoneNumber({store:l,checkout:d}),console.log("checkMasterPass 2"),n=d.masterPassPaymentGateway,a&&n&&n.masterPassClientId?(console.log("checkMasterPass 3",a),[4,this.getToken({cartId:d.id,paymentGatewayId:n.id,operationType:r.CHECK_MASTER_PASS_USER,phoneNumber:a})]):[2]):[2];case 1:return(i=s.sent())?(e.setClientId(n.masterPassClientId),c=this.sendSmsLanguage(l),u=this.prepareFormData({sendSmsLanguage:c,sendSms:"N",referenceNo:i.requestReferenceNumber,token:i.token,userId:a}),e.checkMasterPass(u,this.mfsResponseHandler({source:"checkMasterPass",checkout:d,store:l})),console.log("checkMasterPass 4"),[2]):[2]}}))}))},this.register=function(t){var o=t.creditCard,a=t.store,n=t.checkout,i=t.paymentGateway,c=t.callback;return e(h,void 0,void 0,(function(){var e,t,u,d;return s(this,(function(s){switch(s.label){case 0:return console.log("register 1"),(e=this.MFS())?(console.log("register 2"),(t=o.phoneNumber)&&i.masterPassClientId?(console.log("register 3"),[4,this.getToken({cartId:n.id,paymentGatewayId:i.id,operationType:r.REGISTER_CARD,phoneNumber:t})]):[2]):[2];case 1:return u=s.sent(),console.log("register 4"),(null==u?void 0:u.token)?(d=this.prepareFormData({msisdn:t,token:null==u?void 0:u.token,referenceNo:u.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(a),rtaPan:o.rtaPan,expiryDate:o.expiryDate,cvc:o.cvc,accountAliasName:o.accountAliasName,timeZone:u.timeZone,sendSms:"Y",actionType:"A",clientIp:"",delinkReason:"",eActionType:"A",cardTypeFlag:"05",cpinFlag:"Y",defaultAccount:"Y",mmrpConfig:"110010",identityVerificationFlag:"Y",mobileAccountConfig:"MWA",uiChannelType:"6"}),console.log("reigster 5"),e.setClientId(i.masterPassClientId),e.register(d,this.mfsResponseHandler({source:"register",store:a,checkout:n,callback:c})),[2]):[2]}}))}))},this.resendOtp=function(t){var o=t.store,a=t.checkout,n=t.callback;return e(h,void 0,void 0,(function(){var e,t,r;return s(this,(function(s){return this.isOtpFormSubmitAtLeastOnce&&(e=this.MFS())?(t=e.getLastToken(),r=this.sendSmsLanguage(o),e.resendOtp(t,r,this.mfsResponseHandler({source:"resendOtp",store:o,checkout:a,callback:n})),[2]):[2]}))}))},this.linkCardToClient=function(t){var o=t.store,a=t.checkout,n=t.callback;return e(h,void 0,void 0,(function(){var e,t,i,c,u;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({store:o,checkout:a}))&&(null==(i=a.masterPassPaymentGateway)?void 0:i.id))?[4,this.getToken({cartId:a.id,paymentGatewayId:i.id,operationType:r.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(c=s.sent())?(u=this.prepareFormData({sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(o),token:c.token,referenceNo:c.requestReferenceNumber,cardAliasName:"",msisdn:t}),e.linkCardToClient(u,this.mfsResponseHandler({source:"linkCardToClient",store:o,checkout:a,callback:n})),[2]):(n&&n(),[2])}}))}))},this.validateTransaction=function(t){var o=t.validationCode,a=t.store,n=t.checkout,i=t.callback;return e(h,void 0,void 0,(function(){var e,t,c,u,d;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({store:a,checkout:n}))&&(c=n.masterPassPaymentGateway))?[4,this.getToken({cartId:n.id,paymentGatewayId:c.id,operationType:r.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(u=s.sent())?(d=this.prepareFormData({pinType:"otp",validationCode:o,sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(a),token:u.token,referenceNo:u.requestReferenceNumber}),this.isOtpFormSubmitAtLeastOnce||(this.isOtpFormSubmitAtLeastOnce=!0),e.validateTransaction(d,this.mfsResponseHandler({source:"validateTransaction",store:a,checkout:n,callback:i})),[2]):[2]}}))}))},this.listCards=function(t){var o=t.store,a=t.checkout;return e(h,void 0,void 0,(function(){var e,t,n,i,c,u,d=this;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({store:o,checkout:a}))?(n=null===(u=a.masterPassPaymentGateway)||void 0===u?void 0:u.id,console.log("listCards paymentGatewayId",n),n?[4,this.getToken({cartId:a.id,paymentGatewayId:n,operationType:r.LIST_CARDS,phoneNumber:t})]:[2]):[2];case 1:return(i=s.sent())?(c=function(e,s){"0000"!=s.responseCode&&""!=s.responseCode&&(console.error({source:"mfs response.responseDescription",responseDescription:s.responseDescription,response:s}),console.log("TransactionID->",s.transactionId));var t=[];if(Array.isArray(s.cards)&&s.cards.length)for(var o=0;o<s.cards.length;o++){var a=s.cards[o];a.paymentGatewayId=n,t.push(a)}d.cards=t,console.log("list_card response->",s),console.log("Cards",t),console.log("TransactionID->",s.transactionId)},e.listCards(t,i.token,c),[2]):[2]}}))}))},this.deleteCard=function(t){var o=t.store,a=t.checkout,n=t.card;return e(h,void 0,void 0,(function(){var e,t,i,c;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({store:o,checkout:a}))?[4,this.getToken({cartId:a.id,paymentGatewayId:n.paymentGatewayId,operationType:r.DELETE_CARD,phoneNumber:t})]:[2];case 1:return(i=s.sent())?(c=this.prepareFormData({sendSms:"N",msisdn:t,token:i.token,referenceNo:i.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(o),accountAliasName:n.Name}),e.deleteCard(c,this.mfsResponseHandler({source:"deleteCard",store:o,checkout:a})),[2]):[2]}}))}))},o(this)}return Object.defineProperty(h.prototype,"isSaveCardToMasterPassPhoneNumberInputVisible",{get:function(){return("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||this.checkMasterPassData.status,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSaveCardToMasterPassPhoneNumberInputDisabled",{get:function(){return!("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)||("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||"noMasterPassAccount"===this.checkMasterPassData.status)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSendConfirmationButtonDisabled",{get:function(){return this.isSaveCardToMasterPassPhoneNumberInputVisible?this.isSaveCardToMasterPassPhoneNumberInputDisabled?!this.saveCardToMasterPass.cardName:!this.saveCardToMasterPass.cardName||!this.saveCardToMasterPass.phoneNumber:!this.saveCardToMasterPass.cardName},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isLinkCardToClientModalVisible",{get:function(){return"linkCardToClientModal"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isOtpModalVisible",{get:function(){return"otpModalBank"===this.visibleModal||"otpModalMasterPass"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isResponseModalVisible",{get:function(){return!("mfsResponseModal"!==this.visibleModal||!this.mfsResponseModalText)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSuccessModalVisible",{get:function(){return"linkCardToClientModalSuccess"===this.visibleModal||"otpModalSuccess"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"otpModalType",{get:function(){return"otpModalMasterPass"===this.visibleModal?"masterPassOtp":"bankOtp"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"successModalType",{get:function(){return"hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status?"linkCardToClient":"register"},enumerable:!1,configurable:!0}),h.prototype.prepareFormData=function(e){var s=new FormData;return Object.entries(e).forEach((function(e){var t=e[0],o=e[1];return s.append(t,o)})),s},h}();export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var s=[["axios@0.21.4","/Users/ikas/Projects/ikas-storefront"]],e="axios@0.21.4",a="axios@0.21.4",r=!1,i="sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",t="/axios",o={},n={type:"version",registry:!0,raw:"axios@0.21.4",name:"axios",escapedName:"axios",rawSpec:"0.21.4",saveSpec:null,fetchSpec:"0.21.4"},d=["/"],c="https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",p="0.21.4",m="/Users/ikas/Projects/ikas-storefront",l={name:"Matt Zabriskie"},u={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},x={url:"https://github.com/axios/axios/issues"},g=[{path:"./dist/axios.min.js",threshold:"5kB"}],h={"follow-redirects":"^1.14.0"},b="Promise based HTTP client for the browser and node.js",j={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},k="https://axios-http.com",v="dist/axios.min.js",f=["xhr","http","ajax","promise","node"],w="MIT",_="index.js",y="axios",H={type:"git",url:"git+https://github.com/axios/axios.git"},N={build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},V="./index.d.ts",q="dist/axios.min.js",A="0.21.4",P={_args:s,_from:"axios@0.21.4",_id:a,_inBundle:false,_integrity:i,_location:"/axios",_phantomChildren:o,_requested:n,_requiredBy:d,_resolved:c,_spec:"0.21.4",_where:m,author:l,browser:u,bugs:x,bundlesize:g,dependencies:h,description:b,devDependencies:j,homepage:"https://axios-http.com",jsdelivr:"dist/axios.min.js",keywords:f,license:"MIT",main:"index.js",name:"axios",repository:H,scripts:N,typings:"./index.d.ts",unpkg:q,version:"0.21.4"};export{s as _args,e as _from,a as _id,r as _inBundle,i as _integrity,t as _location,o as _phantomChildren,n as _requested,d as _requiredBy,c as _resolved,p as _spec,m as _where,l as author,u as browser,x as bugs,g as bundlesize,P as default,h as dependencies,b as description,j as devDependencies,k as homepage,v as jsdelivr,f as keywords,w as license,_ as main,y as name,H as repository,N as scripts,V as typings,q as unpkg,A as version};
|