PageSourceSearch

https://medtronicconnect.com/apps/portal/static/js/694.27baf0fc.chunk.js

js medtronicconnect.com collected 2026-10-08 07:39:07 UTC 14,981 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkportal_next=self.webpackChunkportal_next||[]).push([[694],{86171(e,n,t){t.d(n,{H:()=>s});var o=t(3147),r=t(50751),i=t(88069);const s=async()=>(async e=>{var n,t,o;const s=null===(n=e.getConfig().Auth)||void 0===n?void 0:n.Cognito;(0,r.$y)(s);const a=await e.Auth.getTokens({forceRefresh:!1});(0,i.H0)(a);const d=null!==(t=null===(o=a.idToken)||void 0===o?void 0:o.payload)&&void 0!==t?t:{},l={username:d["cognito:username"],userId:d.sub},c=function(e){return null===e||void 0===e?void 0:e.signInDetails}(a);return c&&(l.signInDetails=c),l})(o.H)},22694(e,n,t){t.d(n,{$:()=>K});var o=t(3147),r=t(50751);var i=t(92218),s=t(46019),a=t(39401),d=t(95272),l=t(87750),c=t(16485),p=t(97920),u=t(71152),g=t(29155);var m=t(6680),h=t(99242),f=t(62996);async function y(e){if(!e.AccessToken)throw new h.x({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"});{const n=(0,r.Cq)(e.AccessToken),t=1e3*(n.payload.iat||0),o=(new Date).getTime(),i=t>0?t-o:0;let s,a,d;e.RefreshToken&&(a=e.RefreshToken),e.IdToken&&(s=(0,r.Cq)(e.IdToken)),null!==e&&void 0!==e&&e.NewDeviceMetadata&&(d=e.NewDeviceMetadata);const l={accessToken:n,idToken:s,refreshToken:a,clockDrift:i,deviceMetadata:d,username:e.username};null!==e&&void 0!==e&&e.signInDetails&&(l.signInDetails=e.signInDetails),await f.o.setTokens({tokens:l})}}var v=t(86171),w=t(53890),E=t(6749);var S,A=t(9496),C=t(40593);!function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"}(S||(S={}));S.EmptyChallengeResponse,S.EmptyConfirmResetPasswordUsername,S.EmptyConfirmSignUpCode,S.EmptyConfirmSignUpUsername,S.EmptyConfirmResetPasswordConfirmationCode,S.EmptyConfirmResetPasswordNewPassword,S.EmptyResendSignUpCodeUsername,S.EmptyResetPasswordUsername,S.EmptySignInPassword,S.EmptySignInUsername,S.EmptySignUpPassword,S.EmptySignUpUsername,S.CustomAuthSignInPassword,S.IncorrectMFAMethod,S.EmptyVerifyTOTPSetupCode,S.EmptyUpdatePassword,S.EmptyConfirmUserAttributeCode,S.InvalidPreferredChallenge;var I,U;!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"}(I||(I={})),function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"}(U||(U={}));new C.C("AuthError");Error;const P={oauthSignInError:{message:I.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:I.DEFAULT_MSG,log:"\n            Error: Amplify has not been configured correctly.\n            This error is typically caused by one of the following scenarios:\n\n            1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n                See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n            \n            2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n        "},missingAuthConfig:{message:I.DEFAULT_MSG,log:"\n            Error: Amplify has not been configured correctly. \n            The configuration object is missing required auth properties.\n            This error is typically caused by one of the following scenarios:\n\n            1. Did you run `amplify push` after adding auth via `amplify add auth`?\n                See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n            2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n        "},emptyUsername:{message:I.EMPTY_USERNAME},invalidUsername:{message:I.INVALID_USERNAME},emptyPassword:{message:I.EMPTY_PASSWORD},emptyCode:{message:I.EMPTY_CODE},signUpError:{message:I.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:I.NO_MFA},invalidMFA:{message:I.INVALID_MFA},emptyChallengeResponse:{message:I.EMPTY_CHALLENGE},noUserSession:{message:I.NO_USER_SESSION},deviceConfig:{message:I.DEVICE_CONFIG}
1,networkError:{message:I.NETWORK_ERROR},autoSignInError:{message:I.AUTOSIGNIN_ERROR},default:{message:I.DEFAULT_MSG}},_=(e,n)=>new E.l({message:null!==e&&void 0!==e?e:"An error has occurred during the oauth process.",name:U.OAuthSignInError,recoverySuggestion:null!==n&&void 0!==n?n:P.oauthSignInError.log});var R;!function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError",e.OAuthSignInError="oauthSignInError"}(R||(R={}));const T=async e=>{const n=await l.f.loadOAuthState(),t=e===n?n:void 0;if(!t)throw new E.l({name:R.OAuthSignInError,message:null===e?"`signInWithRedirect` has been canceled.":"An error occurred while validating the state.",recoverySuggestion:null===e?void 0:"Try to initiate an OAuth flow from Amplify"});return t},k=async e=>{let n=e.currentUrl,t=e.userAgentValue,o=e.clientId,r=e.redirectUri,i=e.responseType,s=e.domain,a=e.preferPrivateSession;const d=new u.o(n),l=d.searchParams.get("error"),c=d.searchParams.get("error_description");if(l)throw _(null!==c&&void 0!==c?c:l);return"code"===i?O({currentUrl:n,userAgentValue:t,clientId:o,redirectUri:r,domain:s,preferPrivateSession:a}):M({currentUrl:n,redirectUri:r,preferPrivateSession:a})},O=async e=>{var n;let t=e.currentUrl,o=e.userAgentValue,i=e.clientId,s=e.redirectUri,a=e.domain,d=e.preferPrivateSession;const m=new u.o(t),h=m.searchParams.get("code"),f=m.searchParams.get("state");if(!h||!f)throw _("User cancelled OAuth flow.");const v=await T(f),w="https://"+a+"/oauth2/token",E=await l.f.loadPKCE(),S=(0,p.A)({grant_type:"authorization_code",code:h,client_id:i,redirect_uri:s},E?{code_verifier:E}:{}),A=Object.entries(S).map(e=>{let n=(0,c.A)(e,2),t=n[0],o=n[1];return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(o))}).join("&"),C=await(await fetch(w,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[g.YJ]:o},body:A})).json(),I=C.access_token,U=C.refresh_token,P=C.id_token,R=C.error,k=C.error_message;C.token_type,C.expires_in;if(R)throw _(null!==k&&void 0!==k?k:R);const O=null!==(n=I&&(0,r.Cq)(I).payload.username)&&void 0!==n?n:"username";return await y({username:O,AccessToken:I,IdToken:P,RefreshToken:U}),b({redirectUri:s,state:v,preferPrivateSession:d})},M=async e=>{var n,t;let o=e.currentUrl,i=e.redirectUri,s=e.preferPrivateSession;const a=(null!==(n=new u.o(o).hash)&&void 0!==n?n:"#").substring(1).split("&").map(e=>e.split("=")).reduce((e,n)=>{let t=(0,c.A)(n,2),o=t[0],r=t[1];return(0,p.A)((0,p.A)({},e),{},{[o]:r})},{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0}),d=a.id_token,l=a.access_token,g=a.state,m=(a.token_type,a.expires_in,a.error_description),h=a.error;if(h)throw _(null!==m&&void 0!==m?m:h);if(!l)throw _("No access token returned from OAuth flow.");const f=await T(g),v=null!==(t=l&&(0,r.Cq)(l).payload.username)&&void 0!==t?t:"username";return await y({username:v,AccessToken:l,IdToken:d}),b({redirectUri:i,state:f,preferPrivateSession:s})},b=async e=>{let n=e.redirectUri,t=e.state,o=e.preferPrivateSession;var r;await f.o.setOAuthMetadata({oauthSignIn:!0}),await l.f.clearOAuthData(),await l.f.storeOAuthSignIn(!0,o),(0,A.i)(),F(n),N(t)&&m.YZ.dispatch("auth",{event:"customOAuthState",data:(r=D(t),(r.match(/.{2}/g)||[]).map(e=>String.fromCharCode(parseInt(e,16))).join(""))},"Auth",m.U9),m.YZ.dispatch("auth",{event:"signInWithRedirect"},"Auth",m.U9),await(async()=>{try{m.YZ.dispatch("auth",{event:"signedIn",data:await(0,v.H)()},"Auth",m.U9)}catch(e){if(e.name===w.zz)throw new E.l({name:w.yA,message:"Unable to get user session following successful sign-in.",recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."});throw e}})()},N=e=>/-/.test(e),D=e=>e.split("-").splice(1).join("-"),F=e=>{"undefined"!==typeof window&&"undefined"!==typeof window.history&&window.history.replaceState(window.history.state,"",e)};var L=t(88785);const j=async e=>{(0,A.i)(),await l.f.clearOAuthInflightData(),m.YZ.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",m.U9)},G=async e=>{try{(0,r.$y)(e),(0,r.G6)(e),l.f.setAuthConfig(e)}catch(n){return}if(await l.f.loadOAuthInFlight())try{const n=window.location.href,t=e.loginWith,o=e.userPoolClientId,r=t.oauth,i=r.domain,a=r.redirectSignIn,l=r.responseType,c=(0,L.M)(a);await k({currentUrl:n,clientId:o,domain:i,redirectUri:c,responseType:l,userAgentValue:(0,d.A)(s.BM.SignInWithRedirect)})}catch(t){await j(t)}};(0,i.B)()&&o.H[a.$](G);const H={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"Sign
1InWithApple"};var Y=t(89287),V=t(89922);var W=t(45219);const x={convert(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{urlSafe:!1,skipPadding:!1};const t="string"===typeof e?e:function(e){return Array.from(e,e=>String.fromCodePoint(e)).join("")}(e);let o=(0,W.xA)()(t);return n.urlSafe&&(o=o.replace(/\+/g,"-").replace(/\//g,"_")),n.skipPadding&&(o=o.replace(/=/g,"")),o}},z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",q=e=>{const n=new Uint8Array(e);(0,W.MY)().getRandomValues(n);let t,o="";for(const r of n)o+=z.charAt(r%62);return{value:o,method:"S256",toCodeChallenge:()=>t||(t=function(e){const n=new V.I;n.update(e);const t=(o=x.convert(n.digestSync(),{urlSafe:!0}),o.replace(/=/g,""));var o;return t}(o),t)}};const B=()=>(e=>{const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=[],o=new Uint8Array(e);(0,W.MY)().getRandomValues(o);for(const r of o)t.push(n[r%62]);return t.join("")})(32);async function K(e){var n,t,i,s,a,d,c,p,u,g;const m=null===(n=o.H.getConfig().Auth)||void 0===n?void 0:n.Cognito;(0,r.$y)(m),(0,r.G6)(m),l.f.setAuthConfig(m),null!==e&&void 0!==e&&null!==(t=e.options)&&void 0!==t&&t.prompt||await async function(){let e;try{e=await(0,v.H)()}catch(n){}if(e&&e.userId&&e.username)throw new E.l({name:w.z0,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}();let h,f="COGNITO";return"string"===typeof(null===e||void 0===e?void 0:e.provider)?f=H[e.provider]:null!==e&&void 0!==e&&null!==(i=e.provider)&&void 0!==i&&i.custom?f=e.provider.custom:null!==e&&void 0!==e&&null!==(s=e.provider)&&void 0!==s&&s.idpIdentifier&&(h=e.provider.idpIdentifier),Z({oauthConfig:m.loginWith.oauth,clientId:m.userPoolClientId,provider:f,idpIdentifier:h,customState:null===e||void 0===e?void 0:e.customState,preferPrivateSession:null===e||void 0===e||null===(a=e.options)||void 0===a?void 0:a.preferPrivateSession,options:{loginHint:null===e||void 0===e||null===(d=e.options)||void 0===d?void 0:d.loginHint,lang:null===e||void 0===e||null===(c=e.options)||void 0===c?void 0:c.lang,nonce:null===e||void 0===e||null===(p=e.options)||void 0===p?void 0:p.nonce,prompt:null===e||void 0===e||null===(u=e.options)||void 0===u?void 0:u.prompt},authSessionOpener:null===e||void 0===e||null===(g=e.options)||void 0===g?void 0:g.authSessionOpener})}const Z=async e=>{var n;let t=e.oauthConfig,o=e.provider,r=e.idpIdentifier,a=e.clientId,c=e.customState,p=e.preferPrivateSession,u=e.options,g=e.authSessionOpener;const m=t.domain,h=t.redirectSignIn,f=t.responseType,y=t.scopes,v=null!==u&&void 0!==u?u:{},w=v.loginHint,E=v.lang,S=v.nonce,A=v.prompt,C=B(),I=g||Y.z,U=c?"".concat(C,"-").concat(c.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")):C;const P=q(128),R=P.value,T=P.method,O=P.toCodeChallenge,M=(0,L.M)(t.redirectSignIn);(0,i.B)()&&l.f.storeOAuthInFlight(!0),l.f.storeOAuthState(U),l.f.storePKCE(R);const b=new URLSearchParams;b.append("redirect_uri",M),b.append("response_type",f),b.append("client_id",a),r?b.append("idp_identifier",r):b.append("identity_provider",o),b.append("scope",y.join(" ")),w&&b.append("login_hint",w
1),E&&b.append("lang",E),S&&b.append("nonce",S),A&&b.append("prompt",A.toLowerCase()),b.append("state",U),"code"===f&&(b.append("code_challenge",O()),b.append("code_challenge_method",T));const N="https://".concat(m,"/oauth2/authorize?").concat(b.toString());var D;D=l.f,window.addEventListener("pageshow",async function e(n){if(n.persisted&&await D.loadOAuthInFlight()){const e=_("User cancelled OAuth flow.");await j(e)}window.removeEventListener("pageshow",e)});const F=null!==(n=await I(N,h,p))&&void 0!==n?n:{},G=F.type,H=F.error,V=F.url;try{if("error"===G)throw _(String(H));if("canceled"===G)throw _(String(G));"success"===G&&V&&await k({currentUrl:V,clientId:a,domain:m,redirectUri:M,responseType:f,userAgentValue:(0,d.A)(s.BM.SignInWithRedirect),preferPrivateSession:p})}catch(W){throw await j(W),W}}}}]);
2//# sourceMappingURL=694.27baf0fc.chunk.js.map

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.