1(self.webpackChunkpermissionsApp=self.webpackChunkpermissionsApp||[]).push([[710],{1469:function(e,n,t){"use strict";var i=t(5893);t(8413);var r=t(4862),s=t(2413),o=t(9926),a=t(6468),l=t(9946);n.Z=e=>{let{permissionItem:n,isChecked:t,onToggleChange:c}=e;return(0,i.jsx)(r.Z,{header:n.permissionTitle,isFullWidth:!0,leadingContent:(0,i.jsx)(a.qk,{children:(0,i.jsx)(s.J,{icon:n.mudraIcon,color:"color-icon-primary-default",size:"sm"})}),trailingContent:l.pf.includes(n.type)?null:(0,i.jsx)(o.Z,{isChecked:t,onChange:e=>{let{checked:t}=e;c(n.type,t)},value:n.type}),showDivider:!1,subHeader:n.permissionDescription,type:r.e.Fixed})}},6468:function(e,n,t){"use strict";t.d(n,{$_:function(){return d},Be:function(){return p},Pz:function(){return c},qk:function(){return u}});var i=t(2729),r=t(9521);function s(){let e=(0,i._)(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1001;\n background-color: #ffffff;\n"]);return s=function(){return e},e}function o(){let e=(0,i._)(["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n min-width: 24px;\n min-height: 24px;\n flex-shrink: 0;\n padding-top: 2px;\n"]);return o=function(){return e},e}function a(){let e=(0,i._)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n"]);return a=function(){return e},e}function l(){let e=(0,i._)(["\n font-size: 12px;\n color: #333;\n text-decoration: underline;\n font-weight: 700;\n cursor: pointer;\n margin-bottom: 16px;\n"]);return l=function(){return e},e}let c=r.ZP.div(s()),u=r.ZP.div(o()),d=r.ZP.div(a()),p=r.ZP.span(l())},6743:function(e,n,t){"use strict";var i,r,s;t.d(n,{$:function(){return r},GZ:function(){return i}}),(s=i||(i={})).PERMISSION="permission",s.MANAGE_PERMISSION="managePermission",(r||(r={})).CUSTOMER_APP="tokenCustomerData"},9946:function(e,n,t){"use strict";var i,r;t.d(n,{S$:function(){return i},Sz:function(){return c},TX:function(){return a},gv:function(){return o},pf:function(){return l},qG:function(){return s}});let s={HEADER_TITLE:"Permissions",SKIP:"Skip",ALLOW:"Allow",CAPTURE_PAGE_HEADER:"Enable App Permissions",CAPTURE_PAGE_SUBHEADER:"Piramal App works best with access to these permissions. Your data is safe with us!",APP_PERMISSIONS:"App Permissions",PRIVACY_POLICY:"Privacy Policy",ALLOW_CTA_LABEL:"Allow & Continue",TNC_TITLE:"By Allowing, you agree to our"};(r=i||(i={})).GRANTED="granted",r.DENIED="denied",r.UNAVAILABLE="unavailable",r.BLOCKED="blocked",r.LIMITED="limited";let o=["sms","location","device","installedApps"],a=["sms","location","device"],l=["installedApps"],c=[{permissionTitle:"SMS",permissionDescription:"Piramal Finance Limited collects and securely transmits only banking, credit card, loan repayment, salary credit, and other financial transaction SMS messages to enable credit risk assessment, income verification, fraud prevention, and loan eligibility evaluation, after you provide your consent during the loan application process. Personal messages, OTPs, passwords, PINs, CVVs, contacts, and promotional SMS are not collected.",mudraIcon:"sms-filled",type:"sms"},{permissionTitle:"Location",permissionDescription:"Piramal Finance Limited collects and securely transmits your device location to enable address verification, fraud prevention, KYC verification, and credit risk assessment, after you provide your consent during the loan application process.",mudraIcon:"location-filled",type:"location"},{permissionTitle:"Device",permissionDescription:"Piramal Finance Limited collects and securely transmits device information, including the device model, operating system, OS version, installed applications (where applicable), and SIM operator name(s), to enable device identification, fraud prevention, security checks, and credit risk assessment, after you provide your consent during the loan application process. The app does not collect IMEI, serial number, or other persistent device identifiers.",mudraIcon:"smartphone-outline",type:"device"},{permissionTitle:"Installed Applications",permissionDescription:"Piramal Finance Limited collects and securely transmits metadata about applications installed on your device, including the application name, package name, installation date, last updated date, and version, to enable credit risk assessment, fraud prevention, security checks, and loan eligibility evaluation, after you provide your consent during the loan application process. The app does not collect personal data or the contents of any installed applications.",mudraIcon:"users-shield-filled",type:"installedApps"}]},2790:function(e,n,t){"use strict";t.d(n,{IH:function(){return i},ZI:function(){return r},kT:function(){return s}});let i={TNC_URL:"/api/v1/consent/detail/{0}",ADD_OR_UPDATE_CONSENT:"api/v1/consent/user/addOrUpdate"},r={getConfig:"/permissions/config/ui"},s=[r.getConfig]},2243:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return I}});var i,r,s,o,a,l=t(5893),c=t(8413),u=t(5417),d=t(2413),p=t(9946),m=t(4266),f=t(3339),h=t.n(f),v=t(1469);(i=s||(s={})).SMS="sms",i.LOCATION="location",i.INSTALLED_APPS="installedApps",(o||(o={})).APP_PERMISSION_CONSENT="APP_PERMISSIONS_CONSENT";var _=t(9461),C=t(4152);let g=e=>{let{permissionsList:n=p.gv,permissionOverrides:t,onBack:i}=e,r=p.Sz.filter(e=>null==n?void 0:n.includes(e.type)),[s,o]=(0,c.useState)(r.map(e=>e.type));return{selectedPermissions:s,setSelectedPermissions:o,processedPermissionsList:(0,c.useMemo)(()=>r.map(e=>{var n,i;let r=null==t?void 0:t[e.type];return r?{...e,permissionTitle:null!==(n=r.permissionTitle)&&void 0!==n?n:e.permissionTitle,permissionDescription:null!==(i=r.permissionDescription)&&void 0!==i?i:e.permissionDescription}:e}),[n,t]),handleBackPress:()=>{i&&i()}}};var P=t(6468),T=t(8612);(r=a||(a={})).ACTIVE="ACTIVE",r.INACTIVE="INACTIVE";var y=e=>{let{onBack:n,onSkip:t,onAllow:i,permissionsList:r,permissionOverrides:s,termsConsentType:f=o.APP_PERMISSION_CONSENT,applicationSource:y,userData:E}=e,{selectedPermissions:I,setSelectedPermissions:A,processedPermissionsList:x,handleBackPress:S}=g({permissionsList:r,permissionOverrides:s,onBack:n}),[N,L]=(0,c.useState)(null),[O,R]=(0,c.useState)(!1),b=()=>R(!0),w=()=>R(!1),k=async e=>{let n=(null==I?void 0:I.length)?I:[];e?(T.T.triggerConsentFlowForMobile(n),i&&i(I)):t&&t();try{T.U.addOrUpdateConsent({medium:y,phoneNumber:(null==E?void 0:E.phoneNumber)||"",consentType:o.APP_PERMISSION_CONSENT,status:e?a.ACTIVE:a.INACTIVE})}catch(e){}},D=async()=>{try{var e;let n=await T.U.getConsentById(f);L(null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.termsAndConditions),b()}catch(e){}},j=(0,c.useMemo)(()=>(0,l.jsx)(m.ZT,{onClick:()=>k(!1),size:12,textColor:m.wL["color-text-primary-default"],weight:m.vS.bold,className:"cursor-pointer",children:p.qG.SKIP}),[k]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(P.Pz,{children:(0,l.jsx)(u.h4,{theme:u.Ov.Dark,variant:u.bm.Mobile,header:p.qG.HEADER_TIT
1LE,trailingContent:j})}),(0,l.jsxs)("div",{className:h().container,children:[(0,l.jsxs)("div",{className:h().wrapper,children:[(0,l.jsx)(d.J,{icon:"users-shield-filled",color:"color-icon-secondary-default",size:"md",customClassName:h().shieldIcon}),(0,l.jsx)(m.ZT,{size:18,textColor:m.wL["color-text-header-default"],weight:m.vS.extraBold,className:h().header,children:p.qG.CAPTURE_PAGE_HEADER}),(0,l.jsx)(m.ZT,{size:14,textColor:m.wL["color-text-subtext-default"],weight:m.vS.regular,children:p.qG.CAPTURE_PAGE_SUBHEADER})]}),x.map((e,n)=>(0,l.jsx)("div",{className:h().permissionCard,children:(0,l.jsx)(v.Z,{permissionItem:e,isChecked:I.includes(e.type),onToggleChange:(e,n)=>{n?I.includes(e)||A(n=>[...n,e]):A(n=>n.filter(n=>n!==e))}},n)},e.permissionTitle))]}),(0,l.jsx)("div",{className:h().paperRoot,children:(0,l.jsxs)("div",{className:h().termsConsentContainer,children:[(0,l.jsx)(C.zx,{onClick:()=>k(!0),size:C.qE["2xl"],variant:C.Wu.Primary,isFullWidth:!0,customClassName:h().buttonStyles,disabled:!1,children:p.qG.ALLOW}),f&&(0,l.jsx)(P.Be,{children:(0,l.jsxs)(m.ZT,{size:12,textColor:m.wL["color-text-subtext-default"],weight:m.vS.regular,className:h().privacyText,children:[p.qG.TNC_TITLE," ",(0,l.jsx)("span",{className:h().privacyLink,onClick:D,children:p.qG.PRIVACY_POLICY})]})})]})}),(0,l.jsx)(_.R,{isOpen:O,closeOnBgClick:!0,footerContent:(0,l.jsx)(P.$_,{children:(0,l.jsx)(C.zx,{isFullWidth:!0,variant:"secondary",onClick:w,children:p.qG.ALLOW_CTA_LABEL})}),header:p.qG.PRIVACY_POLICY,onClose:w,showCloseIcon:!1,variant:"default",children:(0,l.jsx)("div",{className:"nunito-Regular tnc colorgray mt-2 text-sm",style:{textAlign:"justify"},dangerouslySetInnerHTML:{__html:N}})})]})},E=t(8339),I=e=>(0,l.jsx)(E.Z,{...e,children:(0,l.jsx)(y,{...e})})},8339:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var i=t(5893),r=t(8413),s=t.n(r),o=t(2892),a=t(2790),l=t(7066),c=t(3454);let{decrypt:u}=t(4391),d=async()=>await l.Z.get(a.ZI.getConfig).then(e=>{if(e&&e.data){let n=c.env.ENCRYPTION_SECRET||"permissions-mfe-web-default";return JSON.parse(u(e.data,n))}}).catch(()=>{console.log("config instance not available")});var p=t(4608);let m=s().createContext((e,n)=>{});var f=t(6743),h=t(3454),v=e=>{let[n,t]=(0,r.useState)(!1),{logger:s}=(0,o.HN)({appName:"permissions-mfe",OTEL_AUTH_SECRET:h.env.OTEL_AUTH_SECRET||"",OTEL_ENDPOINT:h.env.OTEL_ENDPOINT||"",enableErrorProcessing:!0,sourceMapPath:h.env.ASSET_PREFIX?(0,p.N)(h.env.ASSET_PREFIX):""});return(0,r.useEffect)(()=>{(async()=>{try{let n=await d();t(!0);let i={nginxConfig:{apiKey:n.NGINX_API_KEY,basePath:n.NGINX_API_URL,apis:Object.values(a.IH)},whitelistedUrls:a.kT,environment:n.ENV_KEY||"dev1",tokenManagerConfig:{tokenRef:e.tokenKey||f.$.CUSTOMER_APP}};n&&o.Wz.init(i)}catch(e){t(!1)}})()},[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(m.Provider,{value:s,children:e.children})})}},8612:function(e,n,t){"use strict";t.d(n,{T:function(){return c},U:function(){return u}});var i=t(2790),r=t(4608),s=t(6743);let o=()=>{var e;return(null===(e=window)||void 0===e?void 0:e.ReactNativeWebView)!==void 0},a=e=>{try{if(o()){var n,t;let i=JSON.stringify(e);null===(t=window)||void 0===t||null===(n=t.ReactNativeWebView)||void 0===n||n.postMessage(i)}}catch(e){console.error(e)}};var l=t(2892);let c={managePermission:(e,n)=>{a({msgType:s.GZ.MANAGE_PERMISSION,data:{permissionType:e,isEnabled:n}})},triggerConsentFlowForMobile:e=>{a({msgType:s.GZ.PERMISSION,data:{permissionList:e}})}},u={getConsentById:e=>{let n=(0,r.U)(i.IH.TNC_URL,e);return l.Wz.get(n)},addOrUpdateConsent:e=>l.Wz.put(i.IH.ADD_OR_UPDATE_CONSENT,e)}},4391:function(e,n,t){"use strict";var i=t(1876).Buffer;let r=t(2474);e.exports={bypassCsrfProtection:(e,n,t)=>t(),encrypt:function(e,n){let t=r.randomBytes(12),i=r.createHash("sha256").update(n).digest(),s=r.createCipheriv("aes-256-gcm",i,t,{authTagLength:16}),o=s.update(e,"utf8","hex");o+=s.final("hex");let a=s.getAuthTag();return t.toString("hex")+":"+a.toString("hex")+":"+o},decrypt:function(e,n){let t=e.split(":"),s=i.from(t[0],"hex"),o=i.from(t[1],"hex"),a=t[2],l=r.createHash("sha256").update(n).digest(),c=r.createDecipheriv("aes-256-gcm",l,s,{authTagLength:16});return c.setAuthTag(o),c.update(a,"hex","utf8")+c.final("utf8")}}},4608:function(e,n,t){"use strict";function i(e){for(var n=arguments.length,t=Array(n>1?n-1:0),i=1;i<n;i++)t[i-1]=arguments[i];return e.replace(/{(\d+)}/g,(e,n)=>{let i=t[parseInt(n,10)];if(void 0===i)throw Error("Missing parameter for placeholder {".concat(n,"}"));return String(i)})}t.d(n,{N:function(){return r},U:function(){return i}});let r=e=>{if(URL.canParse(e)){let n=new URL(e);return n.hostname+n.pathname}return e}},3339:function(e){e.exports={headerWrapper:"CapturePermissions_headerWrapper__M44Tl",container:"CapturePermissions_container__O_bTp",wrapper:"CapturePermissions_wrapper__nbp2G",shieldIcon:"CapturePermissions_shieldIcon__2VWDW",header:"CapturePermissions_header__vElQ3",permissionCard:"CapturePermissions_permissionCard___3Tyv",paperRoot:"CapturePermissions_paperRoot__ggo9l",buttonStyles:"CapturePermissions_buttonStyles__DJuQP",termsConsentContainer:"CapturePermissions_termsConsentContainer___BfCs",privacyPolicyText:"CapturePermissions_privacyPolicyText__Cyanc",privacyText:"CapturePermissions_privacyText__oMrp1",privacyLink:"CapturePermissions_privacyLink__g_Bxe"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.