@axa-fr/react-oidc 6.26.6 → 7.0.0

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.
Files changed (47) hide show
  1. package/README.md +79 -69
  2. package/dist/FetchToken.d.ts +0 -1
  3. package/dist/OidcProvider.d.ts +2 -3
  4. package/dist/OidcSecure.d.ts +0 -1
  5. package/dist/ReactOidc.d.ts +0 -1
  6. package/dist/User.d.ts +0 -1
  7. package/dist/core/default-component/AuthenticateError.component.d.ts +0 -1
  8. package/dist/core/default-component/Authenticating.component.d.ts +0 -1
  9. package/dist/core/default-component/Callback.component.d.ts +0 -1
  10. package/dist/core/default-component/Loading.component.d.ts +0 -1
  11. package/dist/core/default-component/ServiceWorkerNotSupported.component.d.ts +0 -1
  12. package/dist/core/default-component/SessionLost.component.d.ts +0 -1
  13. package/dist/core/default-component/SilentCallback.component.d.ts +0 -1
  14. package/dist/core/default-component/SilentLogin.component.d.ts +0 -1
  15. package/dist/core/default-component/index.d.ts +0 -1
  16. package/dist/core/routes/OidcRoutes.d.ts +0 -1
  17. package/dist/core/routes/index.d.ts.map +1 -1
  18. package/dist/core/routes/withRouter.d.ts +0 -1
  19. package/dist/index.d.ts +0 -1
  20. package/dist/index.js +42 -42
  21. package/dist/index.umd.cjs +9 -9
  22. package/package.json +3 -3
  23. package/src/FetchToken.tsx +3 -3
  24. package/src/OidcProvider.tsx +19 -19
  25. package/src/OidcSecure.tsx +2 -2
  26. package/src/ReactOidc.tsx +19 -19
  27. package/src/User.ts +2 -2
  28. package/src/core/default-component/Callback.component.tsx +2 -2
  29. package/src/core/default-component/SilentCallback.component.tsx +2 -2
  30. package/src/core/default-component/SilentLogin.component.tsx +2 -2
  31. package/dist/FetchToken.d.ts.map +0 -1
  32. package/dist/OidcProvider.d.ts.map +0 -1
  33. package/dist/OidcSecure.d.ts.map +0 -1
  34. package/dist/ReactOidc.d.ts.map +0 -1
  35. package/dist/User.d.ts.map +0 -1
  36. package/dist/core/default-component/AuthenticateError.component.d.ts.map +0 -1
  37. package/dist/core/default-component/Authenticating.component.d.ts.map +0 -1
  38. package/dist/core/default-component/Callback.component.d.ts.map +0 -1
  39. package/dist/core/default-component/Loading.component.d.ts.map +0 -1
  40. package/dist/core/default-component/ServiceWorkerNotSupported.component.d.ts.map +0 -1
  41. package/dist/core/default-component/SessionLost.component.d.ts.map +0 -1
  42. package/dist/core/default-component/SilentCallback.component.d.ts.map +0 -1
  43. package/dist/core/default-component/SilentLogin.component.d.ts.map +0 -1
  44. package/dist/core/default-component/index.d.ts.map +0 -1
  45. package/dist/core/routes/OidcRoutes.d.ts.map +0 -1
  46. package/dist/core/routes/withRouter.d.ts.map +0 -1
  47. package/dist/index.d.ts.map +0 -1
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var be;function Qe(){if(be)return G;be=1;var a=y,s=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,d=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function h(i,v,g){var k,O={},S=null,I=null;g!==void 0&&(S=""+g),v.key!==void 0&&(S=""+v.key),v.ref!==void 0&&(I=v.ref);for(k in v)o.call(v,k)&&!u.hasOwnProperty(k)&&(O[k]=v[k]);if(i&&i.defaultProps)for(k in v=i.defaultProps,v)O[k]===void 0&&(O[k]=v[k]);return{$$typeof:s,type:i,key:S,ref:I,props:O,_owner:d.current}}return G.Fragment=n,G.jsx=h,G.jsxs=h,G}var H={};/**
9
+ */var be;function Qe(){if(be)return G;be=1;var s=y,o=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function h(i,v,g){var k,O={},S=null,D=null;g!==void 0&&(S=""+g),v.key!==void 0&&(S=""+v.key),v.ref!==void 0&&(D=v.ref);for(k in v)a.call(v,k)&&!u.hasOwnProperty(k)&&(O[k]=v[k]);if(i&&i.defaultProps)for(k in v=i.defaultProps,v)O[k]===void 0&&(O[k]=v[k]);return{$$typeof:o,type:i,key:S,ref:D,props:O,_owner:d.current}}return G.Fragment=n,G.jsx=h,G.jsxs=h,G}var H={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,14 +14,14 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ke;function Ze(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var a=y,s=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),i=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),X=Symbol.iterator,U="@@iterator";function se(e){if(e===null||typeof e!="object")return null;var t=X&&e[X]||e[U];return typeof t=="function"?t:null}var D=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),f=1;f<t;f++)r[f-1]=arguments[f];W("error",e,r)}}function W(e,t,r){{var f=D.ReactDebugCurrentFrame,b=f.getStackAddendum();b!==""&&(t+="%s",r=r.concat([b]));var m=r.map(function(_){return String(_)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var oe=!1,ce=!1,ie=!1,le=!1,L=!1,Q;Q=Symbol.for("react.module.reference");function ue(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===u||L||e===d||e===g||e===k||le||e===I||oe||ce||ie||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===O||e.$$typeof===h||e.$$typeof===i||e.$$typeof===v||e.$$typeof===Q||e.getModuleId!==void 0))}function M(e,t,r){var f=e.displayName;if(f)return f;var b=t.displayName||t.name||"";return b!==""?r+"("+b+")":r}function Y(e){return e.displayName||"Context"}function V(e){if(e==null)return null;if(typeof e.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case n:return"Portal";case u:return"Profiler";case d:return"StrictMode";case g:return"Suspense";case k:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case i:var t=e;return Y(t)+".Consumer";case h:var r=e;return Y(r._context)+".Provider";case v:return M(e,e.render,"ForwardRef");case O:var f=e.displayName||null;return f!==null?f:V(e.type)||"Memo";case S:{var b=e,m=b._payload,_=b._init;try{return V(_(m))}catch{return null}}}return null}var A=Object.assign,C=0,T,F,Pe,Ae,Ve,Ce,Fe;function Ne(){}Ne.__reactDisabledLog=!0;function Ot(){{if(C===0){T=console.log,F=console.info,Pe=console.warn,Ae=console.error,Ve=console.group,Ce=console.groupCollapsed,Fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ne,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}C++}}function Et(){{if(C--,C===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:T}),info:A({},e,{value:F}),warn:A({},e,{value:Pe}),error:A({},e,{value:Ae}),group:A({},e,{value:Ve}),groupCollapsed:A({},e,{value:Ce}),groupEnd:A({},e,{value:Fe})})}C<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=D.ReactCurrentDispatcher,fe;function Z(e,t,r){{if(fe===void 0)try{throw Error()}catch(b){var f=b.stack.trim().match(/\n( *(at )?)/);fe=f&&f[1]||""}return`
18
- `+fe+e}}var ve=!1,q;{var Tt=typeof WeakMap=="function"?WeakMap:Map;q=new Tt}function Ie(e,t){if(!e||ve)return"";{var r=q.get(e);if(r!==void 0)return r}var f;ve=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=de.current,de.current=null,Ot();try{if(t){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(N){f=N}Reflect.construct(e,[],_)}else{try{_.call()}catch(N){f=N}e.call(_.prototype)}}else{try{throw Error()}catch(N){f=N}e()}}catch(N){if(N&&f&&typeof N.stack=="string"){for(var p=N.stack.split(`
19
- `),x=f.stack.split(`
20
- `),E=p.length-1,w=x.length-1;E>=1&&w>=0&&p[E]!==x[w];)w--;for(;E>=1&&w>=0;E--,w--)if(p[E]!==x[w]){if(E!==1||w!==1)do if(E--,w--,w<0||p[E]!==x[w]){var P=`
21
- `+p[E].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,P),P}while(E>=1&&w>=0);break}}}finally{ve=!1,de.current=m,Et(),Error.prepareStackTrace=b}var z=e?e.displayName||e.name:"",Xe=z?Z(z):"";return typeof e=="function"&&q.set(e,Xe),Xe}function wt(e,t,r){return Ie(e,!1)}function Rt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function $(e,t,r){if(e==null)return"";if(typeof e=="function")return Ie(e,Rt(e));if(typeof e=="string")return Z(e);switch(e){case g:return Z("Suspense");case k:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return wt(e.render);case O:return $(e.type,t,r);case S:{var f=e,b=f._payload,m=f._init;try{return $(m(b),t,r)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,De={},Le=D.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,r=$(e.type,e._source,t?t.type:null);Le.setExtraStackFrame(r)}else Le.setExtraStackFrame(null)}function St(e,t,r,f,b){{var m=Function.call.bind(ee);for(var _ in e)if(m(e,_)){var p=void 0;try{if(typeof e[_]!="function"){var x=Error((f||"React class")+": "+r+" type `"+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[_]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}p=e[_](t,_,f,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){p=E}p&&!(p instanceof Error)&&(te(b),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",f||"React class",r,_,typeof p),te(null)),p instanceof Error&&!(p.message in De)&&(De[p.message]=!0,te(b),j("Failed %s type: %s",r,p.message),te(null))}}}var jt=Array.isArray;function he(e){return jt(e)}function xt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function Pt(e){try{return Ue(e),!1}catch{return!0}}function Ue(e){return""+e}function We(e){if(Pt(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xt(e)),Ue(e)}var K=D.ReactCurrentOwner,At={key:!0,ref:!0,__self:!0,__source:!0},Me,Ye,pe;pe={};function Vt(e){if(ee.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Ct(e){if(ee.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Ft(e,t){if(typeof e.ref=="string"&&K.current&&t&&K.current.stateNode!==t){var r=V(K.current.type);pe[r]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',V(K.current.type),e.ref),pe[r]=!0)}}function Nt(e,t){{var r=function(){Me||(Me=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function It(e,t){{var r=function(){Ye||(Ye=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var Dt=function(e,t,r,f,b,m,_){var p={$$typeof:s,type:e,key:t,ref:r,props:_,_owner:m};return p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(p,"_self",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.defineProperty(p,"_source",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p};function Lt(e,t,r,f,b){{var m,_={},p=null,x=null;r!==void 0&&(We(r),p=""+r),Ct(t)&&(We(t.key),p=""+t.key),Vt(t)&&(x=t.ref,Ft(t,b));for(m in t)ee.call(t,m)&&!At.hasOwnProperty(m)&&(_[m]=t[m]);if(e&&e.defaultProps){var E=e.defaultProps;for(m in E)_[m]===void 0&&(_[m]=E[m])}if(p||x){var w=typeof e=="function"?e.displayName||e.name||"Unknown":e;p&&Nt(_,w),x&&It(_,w)}return Dt(e,p,x,b,f,K.current,_)}}var _e=D.ReactCurrentOwner,Be=D.ReactDebugCurrentFrame;function B(e){if(e){var t=e._owner,r=$(e.type,e._source,t?t.type:null);Be.setExtraStackFrame(r)}else Be.setExtraStackFrame(null)}var ge;ge=!1;function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function ze(){{if(_e.current){var e=V(_e.current.type);if(e)return`
17
+ */var ke;function Ze(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var s=y,o=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),i=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),X=Symbol.iterator,W="@@iterator";function oe(e){if(e===null||typeof e!="object")return null;var t=X&&e[X]||e[W];return typeof t=="function"?t:null}var L=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),f=1;f<t;f++)r[f-1]=arguments[f];M("error",e,r)}}function M(e,t,r){{var f=L.ReactDebugCurrentFrame,b=f.getStackAddendum();b!==""&&(t+="%s",r=r.concat([b]));var m=r.map(function(_){return String(_)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var ae=!1,ce=!1,ie=!1,le=!1,U=!1,Q;Q=Symbol.for("react.module.reference");function ue(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===u||U||e===d||e===g||e===k||le||e===D||ae||ce||ie||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===O||e.$$typeof===h||e.$$typeof===i||e.$$typeof===v||e.$$typeof===Q||e.getModuleId!==void 0))}function Y(e,t,r){var f=e.displayName;if(f)return f;var b=t.displayName||t.name||"";return b!==""?r+"("+b+")":r}function V(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case n:return"Portal";case u:return"Profiler";case d:return"StrictMode";case g:return"Suspense";case k:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case i:var t=e;return V(t)+".Consumer";case h:var r=e;return V(r._context)+".Provider";case v:return Y(e,e.render,"ForwardRef");case O:var f=e.displayName||null;return f!==null?f:A(e.type)||"Memo";case S:{var b=e,m=b._payload,_=b._init;try{return A(_(m))}catch{return null}}}return null}var P=Object.assign,F=0,T,N,xe,Pe,Ae,Fe,Ne;function Ie(){}Ie.__reactDisabledLog=!0;function Ot(){{if(F===0){T=console.log,N=console.info,xe=console.warn,Pe=console.error,Ae=console.group,Fe=console.groupCollapsed,Ne=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ie,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}}function Et(){{if(F--,F===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:T}),info:P({},e,{value:N}),warn:P({},e,{value:xe}),error:P({},e,{value:Pe}),group:P({},e,{value:Ae}),groupCollapsed:P({},e,{value:Fe}),groupEnd:P({},e,{value:Ne})})}F<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=L.ReactCurrentDispatcher,fe;function Z(e,t,r){{if(fe===void 0)try{throw Error()}catch(b){var f=b.stack.trim().match(/\n( *(at )?)/);fe=f&&f[1]||""}return`
18
+ `+fe+e}}var ve=!1,q;{var Tt=typeof WeakMap=="function"?WeakMap:Map;q=new Tt}function De(e,t){if(!e||ve)return"";{var r=q.get(e);if(r!==void 0)return r}var f;ve=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=de.current,de.current=null,Ot();try{if(t){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(I){f=I}Reflect.construct(e,[],_)}else{try{_.call()}catch(I){f=I}e.call(_.prototype)}}else{try{throw Error()}catch(I){f=I}e()}}catch(I){if(I&&f&&typeof I.stack=="string"){for(var p=I.stack.split(`
19
+ `),C=f.stack.split(`
20
+ `),E=p.length-1,w=C.length-1;E>=1&&w>=0&&p[E]!==C[w];)w--;for(;E>=1&&w>=0;E--,w--)if(p[E]!==C[w]){if(E!==1||w!==1)do if(E--,w--,w<0||p[E]!==C[w]){var x=`
21
+ `+p[E].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,x),x}while(E>=1&&w>=0);break}}}finally{ve=!1,de.current=m,Et(),Error.prepareStackTrace=b}var z=e?e.displayName||e.name:"",Xe=z?Z(z):"";return typeof e=="function"&&q.set(e,Xe),Xe}function wt(e,t,r){return De(e,!1)}function Rt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function $(e,t,r){if(e==null)return"";if(typeof e=="function")return De(e,Rt(e));if(typeof e=="string")return Z(e);switch(e){case g:return Z("Suspense");case k:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return wt(e.render);case O:return $(e.type,t,r);case S:{var f=e,b=f._payload,m=f._init;try{return $(m(b),t,r)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,Le={},Ue=L.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,r=$(e.type,e._source,t?t.type:null);Ue.setExtraStackFrame(r)}else Ue.setExtraStackFrame(null)}function St(e,t,r,f,b){{var m=Function.call.bind(ee);for(var _ in e)if(m(e,_)){var p=void 0;try{if(typeof e[_]!="function"){var C=Error((f||"React class")+": "+r+" type `"+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[_]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}p=e[_](t,_,f,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){p=E}p&&!(p instanceof Error)&&(te(b),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",f||"React class",r,_,typeof p),te(null)),p instanceof Error&&!(p.message in Le)&&(Le[p.message]=!0,te(b),j("Failed %s type: %s",r,p.message),te(null))}}}var jt=Array.isArray;function he(e){return jt(e)}function Ct(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function xt(e){try{return We(e),!1}catch{return!0}}function We(e){return""+e}function Me(e){if(xt(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(e)),We(e)}var K=L.ReactCurrentOwner,Pt={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ve,pe;pe={};function At(e){if(ee.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Ft(e){if(ee.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Nt(e,t){if(typeof e.ref=="string"&&K.current&&t&&K.current.stateNode!==t){var r=A(K.current.type);pe[r]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(K.current.type),e.ref),pe[r]=!0)}}function It(e,t){{var r=function(){Ye||(Ye=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function Dt(e,t){{var r=function(){Ve||(Ve=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var Lt=function(e,t,r,f,b,m,_){var p={$$typeof:o,type:e,key:t,ref:r,props:_,_owner:m};return p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(p,"_self",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.defineProperty(p,"_source",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p};function Ut(e,t,r,f,b){{var m,_={},p=null,C=null;r!==void 0&&(Me(r),p=""+r),Ft(t)&&(Me(t.key),p=""+t.key),At(t)&&(C=t.ref,Nt(t,b));for(m in t)ee.call(t,m)&&!Pt.hasOwnProperty(m)&&(_[m]=t[m]);if(e&&e.defaultProps){var E=e.defaultProps;for(m in E)_[m]===void 0&&(_[m]=E[m])}if(p||C){var w=typeof e=="function"?e.displayName||e.name||"Unknown":e;p&&It(_,w),C&&Dt(_,w)}return Lt(e,p,C,b,f,K.current,_)}}var _e=L.ReactCurrentOwner,Be=L.ReactDebugCurrentFrame;function B(e){if(e){var t=e._owner,r=$(e.type,e._source,t?t.type:null);Be.setExtraStackFrame(r)}else Be.setExtraStackFrame(null)}var ge;ge=!1;function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function ze(){{if(_e.current){var e=A(_e.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function Ut(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function Wt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
24
24
 
25
- Check your code at `+t+":"+r+"."}return""}}var Ge={};function Wt(e){{var t=ze();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
25
+ Check your code at `+t+":"+r+"."}return""}}var Ge={};function Mt(e){{var t=ze();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
26
26
 
27
- Check the top-level render call using <`+r+">.")}return t}}function He(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Wt(t);if(Ge[r])return;Ge[r]=!0;var f="";e&&e._owner&&e._owner!==_e.current&&(f=" It was passed a child from "+V(e._owner.type)+"."),B(e),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,f),B(null)}}function Je(e,t){{if(typeof e!="object")return;if(he(e))for(var r=0;r<e.length;r++){var f=e[r];ye(f)&&He(f,t)}else if(ye(e))e._store&&(e._store.validated=!0);else if(e){var b=se(e);if(typeof b=="function"&&b!==e.entries)for(var m=b.call(e),_;!(_=m.next()).done;)ye(_.value)&&He(_.value,t)}}}function Mt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===O))r=t.propTypes;else return;if(r){var f=V(t);St(r,e.props,"prop",f,e)}else if(t.PropTypes!==void 0&&!ge){ge=!0;var b=V(t);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",b||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Yt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var f=t[r];if(f!=="children"&&f!=="key"){B(e),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),B(null);break}}e.ref!==null&&(B(e),j("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}function Ke(e,t,r,f,b,m){{var _=ue(e);if(!_){var p="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(p+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var x=Ut(b);x?p+=x:p+=ze();var E;e===null?E="null":he(e)?E="array":e!==void 0&&e.$$typeof===s?(E="<"+(V(e.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,p)}var w=Lt(e,t,r,b,m);if(w==null)return w;if(_){var P=t.children;if(P!==void 0)if(f)if(he(P)){for(var z=0;z<P.length;z++)Je(P[z],e);Object.freeze&&Object.freeze(P)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Je(P,e)}return e===o?Yt(w):Mt(w),w}}function Bt(e,t,r){return Ke(e,t,r,!0)}function zt(e,t,r){return Ke(e,t,r,!1)}var Gt=zt,Ht=Bt;H.Fragment=o,H.jsx=Gt,H.jsxs=Ht}()),H}process.env.NODE_ENV==="production"?ne.exports=Qe():ne.exports=Ze();var c=ne.exports;const me="default",qe=(a,s)=>async(...n)=>{var S;const[o,d,...u]=n,h=d?{...d}:{method:"GET"};let i=new Headers;h.headers&&(i=h.headers instanceof Headers?h.headers:new Headers(h.headers));const g=await s().getValidTokenAsync(),k=(S=g==null?void 0:g.tokens)==null?void 0:S.accessToken;i.has("Accept")||i.set("Accept","application/json"),k&&(i.set("Authorization",`Bearer ${k}`),h.credentials||(h.credentials="same-origin"));const O={...h,headers:i};return await a(o,O,...u)},$e=(a=null,s=me)=>n=>o=>{const{fetch:d}=Oe(a||o.fetch,s);return c.jsx(n,{...o,fetch:d})},Oe=(a=null,s=me)=>{const n=a||window.fetch,o=l.VanillaOidc.get;return{fetch:y.useCallback((u,h)=>qe(n,()=>o(s))(u,h),[n,s])}},Ee=()=>c.jsx("div",{className:"oidc-authenticating",children:c.jsxs("div",{className:"oidc-authenticating__container",children:[c.jsx("h1",{className:"oidc-authenticating__title",children:"Error authentication"}),c.jsx("p",{className:"oidc-authenticating__content",children:"An error occurred during authentication."})]})}),et=()=>c.jsx("div",{className:"oidc-authenticating",children:c.jsxs("div",{className:"oidc-authenticating__container",children:[c.jsx("h1",{className:"oidc-authenticating__title",children:"Authentication in progress"}),c.jsx("p",{className:"oidc-authenticating__content",children:"You will be redirected to the login page."})]})}),tt=()=>Math.random().toString(36).substr(2,6),nt=(a,s)=>(n,o)=>{if(typeof a.CustomEvent=="function")return new a.CustomEvent(n,o);const d=o||{bubbles:!1,cancelable:!1,detail:void 0},u=s.createEvent("CustomEvent");return u.initCustomEvent(n,d.bubbles,d.cancelable,d.detail),u.prototype=a.Event.prototype,u},rt=(a,s,n)=>({replaceState:(o,d)=>{const u=n(),h=d||a.history.state;a.history.replaceState({key:u,state:h},null,o),a.dispatchEvent(s("popstate"))}}),at=()=>rt(window,nt(window,document),tt),Te=()=>c.jsx("div",{className:"oidc-callback",children:c.jsxs("div",{className:"oidc-callback__container",children:[c.jsx("h1",{className:"oidc-callback__title",children:"Authentication complete"}),c.jsx("p",{className:"oidc-callback__content",children:"You will be redirected to your application."})]})}),st=({callBackError:a,callBackSuccess:s,configurationName:n,withCustomHistory:o})=>{const[d,u]=y.useState(!1);y.useEffect(()=>{let v=!0;return(async()=>{const k=l.VanillaOidc.get;try{const{callbackPath:O}=await k(n).loginCallbackAsync();(o?o():at()).replaceState(O||"/")}catch(O){v&&(console.warn(O),u(!0))}})(),()=>{v=!1}},[]);const h=a||Ee,i=s||Te;return d?c.jsx(h,{configurationName:n}):c.jsx(i,{configurationName:n})},ot=()=>c.jsx("span",{className:"oidc-loading",children:"Loading"}),ct=()=>c.jsx("div",{className:"oidc-serviceworker",children:c.jsxs("div",{className:"oidc-serviceworker__container",children:[c.jsx("h1",{className:"oidc-serviceworker__title",children:"Unable to authenticate on this browser"}),c.jsx("p",{className:"oidc-serviceworker__content",children:"Your browser is not secure enough to make authentication work. Try updating your browser or use a newer browser."})]})}),it=()=>c.jsx("div",{className:"oidc-session-lost",children:c.jsxs("div",{className:"oidc-session-lost__container",children:[c.jsx("h1",{className:"oidc-session-lost__title",children:"Session timed out"}),c.jsx("p",{className:"oidc-session-lost__content",children:"Your session has expired. Please re-authenticate."})]})}),lt=({configurationName:a})=>(y.useEffect(()=>{(async()=>{const n=l.VanillaOidc.get;n(a).silentLoginCallbackAsync()})()},[]),c.jsx(c.Fragment,{})),ut=({configurationName:a})=>{const s=l.getParseQueryStringFromLocation(window.location.href),n=l.VanillaOidc.get,o=n(a);let d=null;for(const[u,h]of Object.entries(s))u==="state"||u==="scope"||(d===null&&(d={}),d[u]=h);return y.useEffect(()=>{o.tokens||o.loginAsync(null,d,!0,s.scope)},[]),c.jsx(c.Fragment,{})},dt=({callbackErrorComponent:a,callbackSuccessComponent:s,redirect_uri:n,silent_redirect_uri:o,silent_login_uri:d,children:u,configurationName:h,withCustomHistory:i=null})=>{const v=window?l.getPath(window.location.href):"",[g,k]=y.useState(v);y.useEffect(()=>{const S=()=>k(l.getPath(window.location.href));return S(),window.addEventListener("popstate",S,!1),()=>window.removeEventListener("popstate",S,!1)},[]);const O=l.getPath(n);if(o&&g===l.getPath(o))return c.jsx(lt,{configurationName:h});if(d&&g===l.getPath(d))return c.jsx(ut,{configurationName:h});switch(g){case O:return c.jsx(st,{callBackError:a,callBackSuccess:s,configurationName:h,withCustomHistory:i});default:return c.jsx(c.Fragment,{children:u})}},ft=y.memo(dt),we={name:"",data:null},vt=({loadingComponent:a,children:s,configurationName:n})=>{const[o,d]=y.useState(!0),u=l.VanillaOidc.get,h=u(n);y.useEffect(()=>{let v=!0;return h&&h.tryKeepExistingSessionAsync().then(()=>{v&&d(!1)}),()=>{v=!1}},[n]);const i=a;return c.jsx(c.Fragment,{children:o?c.jsx(i,{configurationName:n}):c.jsx(c.Fragment,{children:s})})},J=({isLoading:a,loadingComponent:s,children:n,configurationName:o})=>{const d=s;return a?c.jsx(d,{configurationName:o,children:n}):c.jsx(c.Fragment,{children:n})},ht=({children:a,configuration:s,configurationName:n="default",callbackSuccessComponent:o=Te,authenticatingComponent:d=et,loadingComponent:u=ot,serviceWorkerNotSupportedComponent:h=ct,authenticatingErrorComponent:i=Ee,sessionLostComponent:v=it,onSessionLost:g=null,onLogoutFromAnotherTab:k=null,onLogoutFromSameTab:O=null,withCustomHistory:S=null,onEvent:I=null,getFetch:X=null})=>{const U=(A="default")=>l.VanillaOidc.getOrCreate(X??l.getFetchDefault)(s,A),[se,D]=y.useState(!0),[j,W]=y.useState(we),[oe,ce]=y.useState("default");y.useEffect(()=>{const C=U(n).subscribeEvents((T,F)=>{I&&I(n,T,F)});return()=>{U(n).removeEventSubscription(C)}},[n,I]),y.useEffect(()=>{const C=U(n).subscribeEvents((T,F)=>{if(T===l.VanillaOidc.eventNames.refreshTokensAsync_error||T===l.VanillaOidc.eventNames.syncTokensAsync_error){if(g!=null){g();return}W({name:T,data:F})}else if(T===l.VanillaOidc.eventNames.logout_from_another_tab){if(k!=null){k();return}W({name:T,data:F})}else T===l.VanillaOidc.eventNames.logout_from_same_tab?O!=null&&O():T===l.VanillaOidc.eventNames.loginAsync_begin||T===l.VanillaOidc.eventNames.loginCallbackAsync_end||T===l.VanillaOidc.eventNames.loginAsync_error||T===l.VanillaOidc.eventNames.loginCallbackAsync_error?W({name:T,data:F}):T===l.VanillaOidc.eventNames.service_worker_not_supported_by_browser&&s.service_worker_only===!0&&W({name:T,data:F})});return ce(n),D(!1),()=>{U(n).removeEventSubscription(C),W(we)}},[s,n]);const ie=v,le=d,L=u,Q=h,ue=i,M=se||oe!==n,Y=U(n);switch(j.name){case l.VanillaOidc.eventNames.service_worker_not_supported_by_browser:return c.jsx(J,{loadingComponent:L,isLoading:M,configurationName:n,children:c.jsx(Q,{configurationName:n})});case l.VanillaOidc.eventNames.loginAsync_begin:return c.jsx(J,{loadingComponent:L,isLoading:M,configurationName:n,children:c.jsx(le,{configurationName:n})});case l.VanillaOidc.eventNames.loginAsync_error:case l.VanillaOidc.eventNames.loginCallbackAsync_error:return c.jsx(J,{loadingComponent:L,isLoading:M,configurationName:n,children:c.jsx(ue,{configurationName:n})});case l.VanillaOidc.eventNames.refreshTokensAsync_error:case l.VanillaOidc.eventNames.syncTokensAsync_error:case l.VanillaOidc.eventNames.logout_from_another_tab:return c.jsx(J,{loadingComponent:L,isLoading:M,configurationName:n,children:c.jsx(ie,{configurationName:n})});default:return c.jsx(J,{loadingComponent:L,isLoading:M,configurationName:n,children:c.jsx(ft,{redirect_uri:Y.configuration.redirect_uri,silent_redirect_uri:Y.configuration.silent_redirect_uri,silent_login_uri:Y.configuration.silent_login_uri,callbackSuccessComponent:o,callbackErrorComponent:i,authenticatingComponent:d,configurationName:n,withCustomHistory:S,children:c.jsx(vt,{loadingComponent:L,configurationName:n,children:a})})})}},Re=({children:a,callbackPath:s=null,extras:n=null,configurationName:o="default"})=>{const d=l.VanillaOidc.get,u=d(o);return y.useEffect(()=>{u.tokens||u.loginAsync(s,n)},[o,s,n]),u.tokens?c.jsx(c.Fragment,{children:a}):null},pt=(a,s=null,n=null,o="default")=>d=>c.jsx(Re,{callbackPath:s,extras:n,configurationName:o,children:c.jsx(a,{...d})}),re="default",ae=(a,s)=>{let n=!1;return a(s)&&(n=a(s).tokens!=null),n},_t=(a=re)=>{const s=l.VanillaOidc.get,[n,o]=y.useState(ae(s,a));return y.useEffect(()=>{let i=!0;const v=s(a);o(ae(s,a));const g=v.subscribeEvents((k,O)=>{(k===l.VanillaOidc.eventNames.logout_from_another_tab||k===l.VanillaOidc.eventNames.logout_from_same_tab||k===l.VanillaOidc.eventNames.token_aquired)&&i&&o(ae(s,a))});return()=>{i=!1,v.removeEventSubscription(g)}},[a]),{login:(i=void 0,v=null,g=!1)=>s(a).loginAsync(i,v,!1,void 0,g),logout:(i=void 0,v=null)=>s(a).logoutAsync(i,v),renewTokens:async(i=null)=>{const v=await s(a).renewTokensAsync(i);return{accessToken:v.accessToken,accessTokenPayload:v.accessTokenPayload,idToken:v.idToken,idTokenPayload:v.idTokenPayload}},isAuthenticated:n}},Se={accessToken:null,accessTokenPayload:null},gt=a=>{const s=l.VanillaOidc.get,n=s(a);if(n.tokens){const o=n.tokens;return{accessToken:o.accessToken,accessTokenPayload:o.accessTokenPayload}}return Se},yt=(a=re)=>{const s=l.VanillaOidc.get,[n,o]=y.useState(gt(a));return y.useEffect(()=>{let d=!0;const u=s(a);if(u.tokens){const i=u.tokens;o({accessToken:i.accessToken,accessTokenPayload:i.accessTokenPayload})}const h=u.subscribeEvents((i,v)=>{if((i===l.VanillaOidc.eventNames.token_renewed||i===l.VanillaOidc.eventNames.token_aquired||i===l.VanillaOidc.eventNames.logout_from_another_tab||i===l.VanillaOidc.eventNames.logout_from_same_tab||i===l.VanillaOidc.eventNames.refreshTokensAsync_error||i===l.VanillaOidc.eventNames.syncTokensAsync_error)&&d){const g=u.tokens;o(g!=null?{accessToken:g.accessToken,accessTokenPayload:g.accessTokenPayload}:Se)}});return()=>{d=!1,u.removeEventSubscription(h)}},[a]),n},je={idToken:null,idTokenPayload:null},bt=a=>{const s=l.VanillaOidc.get,n=s(a);if(n.tokens){const o=n.tokens;return{idToken:o.idToken,idTokenPayload:o.idTokenPayload}}return je},kt=(a=re)=>{const s=l.VanillaOidc.get,[n,o]=y.useState(bt(a));return y.useEffect(()=>{let d=!0;const u=s(a);if(u.tokens){const i=u.tokens;o({idToken:i.idToken,idTokenPayload:i.idTokenPayload})}const h=u.subscribeEvents((i,v)=>{if((i===l.VanillaOidc.eventNames.token_renewed||i===l.VanillaOidc.eventNames.token_aquired||i===l.VanillaOidc.eventNames.logout_from_another_tab||i===l.VanillaOidc.eventNames.logout_from_same_tab||i===l.VanillaOidc.eventNames.refreshTokensAsync_error||i===l.VanillaOidc.eventNames.syncTokensAsync_error)&&d){const g=u.tokens;o(g!=null?{idToken:g.idToken,idTokenPayload:g.idTokenPayload}:je)}});return()=>{d=!1,u.removeEventSubscription(h)}},[a]),n};var xe=(a=>(a.Unauthenticated="Unauthenticated",a.Loading="Loading user",a.Loaded="User loaded",a.LoadingError="Error loading user",a))(xe||{});const mt=(a="default")=>{const[s,n]=y.useState({user:null,status:"Unauthenticated"}),[o,d]=y.useState(""),u=l.VanillaOidc.get(a);y.useEffect(()=>{let i=!0;if(u&&u.tokens){n({...s,status:"Loading user"});const v=o!=="";u.userInfoAsync(v).then(g=>{i&&n({user:g,status:"User loaded"})}).catch(()=>n({...s,status:"Error loading user"}))}else n({user:null,status:"Unauthenticated"});return()=>{i=!1}},[o]);const h=()=>{d(o+" ")};return{oidcUser:s.user,oidcUserLoadingState:s.status,reloadOidcUser:h}};Object.defineProperty(R,"TokenRenewMode",{enumerable:!0,get:()=>l.TokenRenewMode}),R.OidcProvider=ht,R.OidcSecure=Re,R.OidcUserStatus=xe,R.useOidc=_t,R.useOidcAccessToken=yt,R.useOidcFetch=Oe,R.useOidcIdToken=kt,R.useOidcUser=mt,R.withOidcFetch=$e,R.withOidcSecure=pt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
27
+ Check the top-level render call using <`+r+">.")}return t}}function He(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Mt(t);if(Ge[r])return;Ge[r]=!0;var f="";e&&e._owner&&e._owner!==_e.current&&(f=" It was passed a child from "+A(e._owner.type)+"."),B(e),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,f),B(null)}}function Je(e,t){{if(typeof e!="object")return;if(he(e))for(var r=0;r<e.length;r++){var f=e[r];ye(f)&&He(f,t)}else if(ye(e))e._store&&(e._store.validated=!0);else if(e){var b=oe(e);if(typeof b=="function"&&b!==e.entries)for(var m=b.call(e),_;!(_=m.next()).done;)ye(_.value)&&He(_.value,t)}}}function Yt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===O))r=t.propTypes;else return;if(r){var f=A(t);St(r,e.props,"prop",f,e)}else if(t.PropTypes!==void 0&&!ge){ge=!0;var b=A(t);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",b||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var f=t[r];if(f!=="children"&&f!=="key"){B(e),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),B(null);break}}e.ref!==null&&(B(e),j("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}function Ke(e,t,r,f,b,m){{var _=ue(e);if(!_){var p="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(p+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var C=Wt(b);C?p+=C:p+=ze();var E;e===null?E="null":he(e)?E="array":e!==void 0&&e.$$typeof===o?(E="<"+(A(e.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,p)}var w=Ut(e,t,r,b,m);if(w==null)return w;if(_){var x=t.children;if(x!==void 0)if(f)if(he(x)){for(var z=0;z<x.length;z++)Je(x[z],e);Object.freeze&&Object.freeze(x)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Je(x,e)}return e===a?Vt(w):Yt(w),w}}function Bt(e,t,r){return Ke(e,t,r,!0)}function zt(e,t,r){return Ke(e,t,r,!1)}var Gt=zt,Ht=Bt;H.Fragment=a,H.jsx=Gt,H.jsxs=Ht}()),H}process.env.NODE_ENV==="production"?ne.exports=Qe():ne.exports=Ze();var c=ne.exports;const me="default",qe=(s,o)=>async(...n)=>{var S;const[a,d,...u]=n,h=d?{...d}:{method:"GET"};let i=new Headers;h.headers&&(i=h.headers instanceof Headers?h.headers:new Headers(h.headers));const g=await o().getValidTokenAsync(),k=(S=g==null?void 0:g.tokens)==null?void 0:S.accessToken;i.has("Accept")||i.set("Accept","application/json"),k&&(i.set("Authorization",`Bearer ${k}`),h.credentials||(h.credentials="same-origin"));const O={...h,headers:i};return await s(a,O,...u)},$e=(s=null,o=me)=>n=>a=>{const{fetch:d}=Oe(s||a.fetch,o);return c.jsx(n,{...a,fetch:d})},Oe=(s=null,o=me)=>{const n=s||window.fetch,a=l.OidcClient.get;return{fetch:y.useCallback((u,h)=>qe(n,()=>a(o))(u,h),[n,o])}},Ee=()=>c.jsx("div",{className:"oidc-authenticating",children:c.jsxs("div",{className:"oidc-authenticating__container",children:[c.jsx("h1",{className:"oidc-authenticating__title",children:"Error authentication"}),c.jsx("p",{className:"oidc-authenticating__content",children:"An error occurred during authentication."})]})}),et=()=>c.jsx("div",{className:"oidc-authenticating",children:c.jsxs("div",{className:"oidc-authenticating__container",children:[c.jsx("h1",{className:"oidc-authenticating__title",children:"Authentication in progress"}),c.jsx("p",{className:"oidc-authenticating__content",children:"You will be redirected to the login page."})]})}),tt=()=>Math.random().toString(36).substr(2,6),nt=(s,o)=>(n,a)=>{if(typeof s.CustomEvent=="function")return new s.CustomEvent(n,a);const d=a||{bubbles:!1,cancelable:!1,detail:void 0},u=o.createEvent("CustomEvent");return u.initCustomEvent(n,d.bubbles,d.cancelable,d.detail),u.prototype=s.Event.prototype,u},rt=(s,o,n)=>({replaceState:(a,d)=>{const u=n(),h=d||s.history.state;s.history.replaceState({key:u,state:h},null,a),s.dispatchEvent(o("popstate"))}}),st=()=>rt(window,nt(window,document),tt),Te=()=>c.jsx("div",{className:"oidc-callback",children:c.jsxs("div",{className:"oidc-callback__container",children:[c.jsx("h1",{className:"oidc-callback__title",children:"Authentication complete"}),c.jsx("p",{className:"oidc-callback__content",children:"You will be redirected to your application."})]})}),ot=({callBackError:s,callBackSuccess:o,configurationName:n,withCustomHistory:a})=>{const[d,u]=y.useState(!1);y.useEffect(()=>{let v=!0;return(async()=>{const k=l.OidcClient.get;try{const{callbackPath:O}=await k(n).loginCallbackAsync();(a?a():st()).replaceState(O||"/")}catch(O){v&&(console.warn(O),u(!0))}})(),()=>{v=!1}},[]);const h=s||Ee,i=o||Te;return d?c.jsx(h,{configurationName:n}):c.jsx(i,{configurationName:n})},at=()=>c.jsx("span",{className:"oidc-loading",children:"Loading"}),ct=()=>c.jsx("div",{className:"oidc-serviceworker",children:c.jsxs("div",{className:"oidc-serviceworker__container",children:[c.jsx("h1",{className:"oidc-serviceworker__title",children:"Unable to authenticate on this browser"}),c.jsx("p",{className:"oidc-serviceworker__content",children:"Your browser is not secure enough to make authentication work. Try updating your browser or use a newer browser."})]})}),it=()=>c.jsx("div",{className:"oidc-session-lost",children:c.jsxs("div",{className:"oidc-session-lost__container",children:[c.jsx("h1",{className:"oidc-session-lost__title",children:"Session timed out"}),c.jsx("p",{className:"oidc-session-lost__content",children:"Your session has expired. Please re-authenticate."})]})}),lt=({configurationName:s})=>(y.useEffect(()=>{(async()=>{const n=l.OidcClient.get;n(s).silentLoginCallbackAsync()})()},[]),c.jsx(c.Fragment,{})),ut=({configurationName:s})=>{const o=l.getParseQueryStringFromLocation(window.location.href),n=l.OidcClient.get,a=n(s);let d=null;for(const[u,h]of Object.entries(o))u==="state"||u==="scope"||(d===null&&(d={}),d[u]=h);return y.useEffect(()=>{a.tokens||a.loginAsync(null,d,!0,o.scope)},[]),c.jsx(c.Fragment,{})},dt=({callbackErrorComponent:s,callbackSuccessComponent:o,redirect_uri:n,silent_redirect_uri:a,silent_login_uri:d,children:u,configurationName:h,withCustomHistory:i=null})=>{const v=window?l.getPath(window.location.href):"",[g,k]=y.useState(v);y.useEffect(()=>{const S=()=>k(l.getPath(window.location.href));return S(),window.addEventListener("popstate",S,!1),()=>window.removeEventListener("popstate",S,!1)},[]);const O=l.getPath(n);if(a&&g===l.getPath(a))return c.jsx(lt,{configurationName:h});if(d&&g===l.getPath(d))return c.jsx(ut,{configurationName:h});switch(g){case O:return c.jsx(ot,{callBackError:s,callBackSuccess:o,configurationName:h,withCustomHistory:i});default:return c.jsx(c.Fragment,{children:u})}},ft=y.memo(dt),we={name:"",data:null},vt=({loadingComponent:s,children:o,configurationName:n})=>{const[a,d]=y.useState(!0),u=l.OidcClient.get,h=u(n);y.useEffect(()=>{let v=!0;return h&&h.tryKeepExistingSessionAsync().then(()=>{v&&d(!1)}),()=>{v=!1}},[n]);const i=s;return c.jsx(c.Fragment,{children:a?c.jsx(i,{configurationName:n}):c.jsx(c.Fragment,{children:o})})},J=({isLoading:s,loadingComponent:o,children:n,configurationName:a})=>{const d=o;return s?c.jsx(d,{configurationName:a,children:n}):c.jsx(c.Fragment,{children:n})},ht=({children:s,configuration:o,configurationName:n="default",callbackSuccessComponent:a=Te,authenticatingComponent:d=et,loadingComponent:u=at,serviceWorkerNotSupportedComponent:h=ct,authenticatingErrorComponent:i=Ee,sessionLostComponent:v=it,onSessionLost:g=null,onLogoutFromAnotherTab:k=null,onLogoutFromSameTab:O=null,withCustomHistory:S=null,onEvent:D=null,getFetch:X=null})=>{const W=(P="default")=>l.OidcClient.getOrCreate(X??l.getFetchDefault)(o,P),[oe,L]=y.useState(!0),[j,M]=y.useState(we),[ae,ce]=y.useState("default");y.useEffect(()=>{const F=W(n).subscribeEvents((T,N)=>{D&&D(n,T,N)});return()=>{W(n).removeEventSubscription(F)}},[n,D]),y.useEffect(()=>{const F=W(n).subscribeEvents((T,N)=>{if(T===l.OidcClient.eventNames.refreshTokensAsync_error||T===l.OidcClient.eventNames.syncTokensAsync_error){if(g!=null){g();return}M({name:T,data:N})}else if(T===l.OidcClient.eventNames.logout_from_another_tab){if(k!=null){k();return}M({name:T,data:N})}else T===l.OidcClient.eventNames.logout_from_same_tab?O!=null&&O():T===l.OidcClient.eventNames.loginAsync_begin||T===l.OidcClient.eventNames.loginCallbackAsync_end||T===l.OidcClient.eventNames.loginAsync_error||T===l.OidcClient.eventNames.loginCallbackAsync_error?M({name:T,data:N}):T===l.OidcClient.eventNames.service_worker_not_supported_by_browser&&o.service_worker_only===!0&&M({name:T,data:N})});return ce(n),L(!1),()=>{W(n).removeEventSubscription(F),M(we)}},[o,n]);const ie=v,le=d,U=u,Q=h,ue=i,Y=oe||ae!==n,V=W(n);switch(j.name){case l.OidcClient.eventNames.service_worker_not_supported_by_browser:return c.jsx(J,{loadingComponent:U,isLoading:Y,configurationName:n,children:c.jsx(Q,{configurationName:n})});case l.OidcClient.eventNames.loginAsync_begin:return c.jsx(J,{loadingComponent:U,isLoading:Y,configurationName:n,children:c.jsx(le,{configurationName:n})});case l.OidcClient.eventNames.loginAsync_error:case l.OidcClient.eventNames.loginCallbackAsync_error:return c.jsx(J,{loadingComponent:U,isLoading:Y,configurationName:n,children:c.jsx(ue,{configurationName:n})});case l.OidcClient.eventNames.refreshTokensAsync_error:case l.OidcClient.eventNames.syncTokensAsync_error:case l.OidcClient.eventNames.logout_from_another_tab:return c.jsx(J,{loadingComponent:U,isLoading:Y,configurationName:n,children:c.jsx(ie,{configurationName:n})});default:return c.jsx(J,{loadingComponent:U,isLoading:Y,configurationName:n,children:c.jsx(ft,{redirect_uri:V.configuration.redirect_uri,silent_redirect_uri:V.configuration.silent_redirect_uri,silent_login_uri:V.configuration.silent_login_uri,callbackSuccessComponent:a,callbackErrorComponent:i,authenticatingComponent:d,configurationName:n,withCustomHistory:S,children:c.jsx(vt,{loadingComponent:U,configurationName:n,children:s})})})}},Re=({children:s,callbackPath:o=null,extras:n=null,configurationName:a="default"})=>{const d=l.OidcClient.get,u=d(a);return y.useEffect(()=>{u.tokens||u.loginAsync(o,n)},[a,o,n]),u.tokens?c.jsx(c.Fragment,{children:s}):null},pt=(s,o=null,n=null,a="default")=>d=>c.jsx(Re,{callbackPath:o,extras:n,configurationName:a,children:c.jsx(s,{...d})}),re="default",se=(s,o)=>{let n=!1;return s(o)&&(n=s(o).tokens!=null),n},_t=(s=re)=>{const o=l.OidcClient.get,[n,a]=y.useState(se(o,s));return y.useEffect(()=>{let i=!0;const v=o(s);a(se(o,s));const g=v.subscribeEvents((k,O)=>{(k===l.OidcClient.eventNames.logout_from_another_tab||k===l.OidcClient.eventNames.logout_from_same_tab||k===l.OidcClient.eventNames.token_aquired)&&i&&a(se(o,s))});return()=>{i=!1,v.removeEventSubscription(g)}},[s]),{login:(i=void 0,v=null,g=!1)=>o(s).loginAsync(i,v,!1,void 0,g),logout:(i=void 0,v=null)=>o(s).logoutAsync(i,v),renewTokens:async(i=null)=>{const v=await o(s).renewTokensAsync(i);return{accessToken:v.accessToken,accessTokenPayload:v.accessTokenPayload,idToken:v.idToken,idTokenPayload:v.idTokenPayload}},isAuthenticated:n}},Se={accessToken:null,accessTokenPayload:null},gt=s=>{const o=l.OidcClient.get,n=o(s);if(n.tokens){const a=n.tokens;return{accessToken:a.accessToken,accessTokenPayload:a.accessTokenPayload}}return Se},yt=(s=re)=>{const o=l.OidcClient.get,[n,a]=y.useState(gt(s));return y.useEffect(()=>{let d=!0;const u=o(s);if(u.tokens){const i=u.tokens;a({accessToken:i.accessToken,accessTokenPayload:i.accessTokenPayload})}const h=u.subscribeEvents((i,v)=>{if((i===l.OidcClient.eventNames.token_renewed||i===l.OidcClient.eventNames.token_aquired||i===l.OidcClient.eventNames.logout_from_another_tab||i===l.OidcClient.eventNames.logout_from_same_tab||i===l.OidcClient.eventNames.refreshTokensAsync_error||i===l.OidcClient.eventNames.syncTokensAsync_error)&&d){const g=u.tokens;a(g!=null?{accessToken:g.accessToken,accessTokenPayload:g.accessTokenPayload}:Se)}});return()=>{d=!1,u.removeEventSubscription(h)}},[s]),n},je={idToken:null,idTokenPayload:null},bt=s=>{const o=l.OidcClient.get,n=o(s);if(n.tokens){const a=n.tokens;return{idToken:a.idToken,idTokenPayload:a.idTokenPayload}}return je},kt=(s=re)=>{const o=l.OidcClient.get,[n,a]=y.useState(bt(s));return y.useEffect(()=>{let d=!0;const u=o(s);if(u.tokens){const i=u.tokens;a({idToken:i.idToken,idTokenPayload:i.idTokenPayload})}const h=u.subscribeEvents((i,v)=>{if((i===l.OidcClient.eventNames.token_renewed||i===l.OidcClient.eventNames.token_aquired||i===l.OidcClient.eventNames.logout_from_another_tab||i===l.OidcClient.eventNames.logout_from_same_tab||i===l.OidcClient.eventNames.refreshTokensAsync_error||i===l.OidcClient.eventNames.syncTokensAsync_error)&&d){const g=u.tokens;a(g!=null?{idToken:g.idToken,idTokenPayload:g.idTokenPayload}:je)}});return()=>{d=!1,u.removeEventSubscription(h)}},[s]),n};var Ce=(s=>(s.Unauthenticated="Unauthenticated",s.Loading="Loading user",s.Loaded="User loaded",s.LoadingError="Error loading user",s))(Ce||{});const mt=(s="default")=>{const[o,n]=y.useState({user:null,status:"Unauthenticated"}),[a,d]=y.useState(""),u=l.OidcClient.get(s);y.useEffect(()=>{let i=!0;if(u&&u.tokens){n({...o,status:"Loading user"});const v=a!=="";u.userInfoAsync(v).then(g=>{i&&n({user:g,status:"User loaded"})}).catch(()=>n({...o,status:"Error loading user"}))}else n({user:null,status:"Unauthenticated"});return()=>{i=!1}},[a]);const h=()=>{d(a+" ")};return{oidcUser:o.user,oidcUserLoadingState:o.status,reloadOidcUser:h}};Object.defineProperty(R,"TokenRenewMode",{enumerable:!0,get:()=>l.TokenRenewMode}),R.OidcProvider=ht,R.OidcSecure=Re,R.OidcUserStatus=Ce,R.useOidc=_t,R.useOidcAccessToken=yt,R.useOidcFetch=Oe,R.useOidcIdToken=kt,R.useOidcUser=mt,R.withOidcFetch=$e,R.withOidcSecure=pt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/react-oidc",
3
- "version": "6.26.6",
3
+ "version": "7.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
@@ -40,8 +40,8 @@
40
40
  "lint": "eslint src"
41
41
  },
42
42
  "dependencies": {
43
- "@axa-fr/oidc-client-service-worker": "6.26.6",
44
- "@axa-fr/oidc-client": "6.26.6",
43
+ "@axa-fr/oidc-client-service-worker": "7.0.0",
44
+ "@axa-fr/oidc-client": "7.0.0",
45
45
  "base64-js": "1.5.1"
46
46
  },
47
47
  "peerDependencies": {
@@ -1,4 +1,4 @@
1
- import { Fetch, VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { Fetch, OidcClient } from '@axa-fr/oidc-client';
2
2
  import { useCallback } from 'react';
3
3
 
4
4
  export interface ComponentWithOidcFetchProps {
@@ -7,7 +7,7 @@ export interface ComponentWithOidcFetchProps {
7
7
 
8
8
  const defaultConfigurationName = 'default';
9
9
 
10
- const fetchWithToken = (fetch: Fetch, getOidcWithConfigurationName: () => VanillaOidc | null) => async (...params: Parameters<Fetch>) => {
10
+ const fetchWithToken = (fetch: Fetch, getOidcWithConfigurationName: () => OidcClient | null) => async (...params: Parameters<Fetch>) => {
11
11
  const [url, options, ...rest] = params;
12
12
  const optionTmp = options ? { ...options } : { method: 'GET' };
13
13
 
@@ -45,7 +45,7 @@ export const withOidcFetch = (fetch: Fetch = null, configurationName = defaultCo
45
45
 
46
46
  export const useOidcFetch = (fetch: Fetch = null, configurationName = defaultConfigurationName) => {
47
47
  const previousFetch = fetch || window.fetch;
48
- const getOidc = VanillaOidc.get;
48
+ const getOidc = OidcClient.get;
49
49
 
50
50
  const memoizedFetchCallback = useCallback(
51
51
  (input: RequestInfo | URL, init?: RequestInit) => {
@@ -1,4 +1,4 @@
1
- import { Fetch, getFetchDefault, OidcConfiguration, VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { Fetch, getFetchDefault, OidcConfiguration, OidcClient } from '@axa-fr/oidc-client';
2
2
  import { ComponentType, FC, PropsWithChildren, useEffect, useState } from 'react';
3
3
 
4
4
  import AuthenticatingError from './core/default-component/AuthenticateError.component.js';
@@ -8,7 +8,7 @@ import OidcRoutes from './core/routes/OidcRoutes.js';
8
8
  import { CustomHistory } from './core/routes/withRouter.js';
9
9
 
10
10
  export type oidcContext = {
11
- (name?: string): VanillaOidc;
11
+ (name?: string): OidcClient;
12
12
  };
13
13
 
14
14
  const defaultEventState = { name: '', data: null };
@@ -38,7 +38,7 @@ export type OidcSessionProps = {
38
38
 
39
39
  const OidcSession: FC<PropsWithChildren<OidcSessionProps>> = ({ loadingComponent, children, configurationName }) => {
40
40
  const [isLoading, setIsLoading] = useState(true);
41
- const getOidc = VanillaOidc.get;
41
+ const getOidc = OidcClient.get;
42
42
  const oidc = getOidc(configurationName);
43
43
  useEffect(() => {
44
44
  let isMounted = true;
@@ -94,7 +94,7 @@ export const OidcProvider: FC<PropsWithChildren<OidcProviderProps>> = ({
94
94
  getFetch = null,
95
95
  }) => {
96
96
  const getOidc = (configurationName = 'default') => {
97
- return VanillaOidc.getOrCreate(getFetch ?? getFetchDefault)(configuration, configurationName);
97
+ return OidcClient.getOrCreate(getFetch ?? getFetchDefault)(configuration, configurationName);
98
98
  };
99
99
  // eslint-disable-next-line @typescript-eslint/naming-convention
100
100
  const [loading, setLoading] = useState(true);
@@ -117,30 +117,30 @@ export const OidcProvider: FC<PropsWithChildren<OidcProviderProps>> = ({
117
117
  useEffect(() => {
118
118
  const oidc = getOidc(configurationName);
119
119
  const newSubscriptionId = oidc.subscribeEvents((name, data) => {
120
- if (name === VanillaOidc.eventNames.refreshTokensAsync_error || name === VanillaOidc.eventNames.syncTokensAsync_error) {
120
+ if (name === OidcClient.eventNames.refreshTokensAsync_error || name === OidcClient.eventNames.syncTokensAsync_error) {
121
121
  if (onSessionLost != null) {
122
122
  onSessionLost();
123
123
  return;
124
124
  }
125
125
  setEvent({ name, data });
126
- } else if (name === VanillaOidc.eventNames.logout_from_another_tab) {
126
+ } else if (name === OidcClient.eventNames.logout_from_another_tab) {
127
127
  if (onLogoutFromAnotherTab != null) {
128
128
  onLogoutFromAnotherTab();
129
129
  return;
130
130
  }
131
131
  setEvent({ name, data });
132
- } else if (name === VanillaOidc.eventNames.logout_from_same_tab) {
132
+ } else if (name === OidcClient.eventNames.logout_from_same_tab) {
133
133
  if (onLogoutFromSameTab != null) {
134
134
  onLogoutFromSameTab();
135
135
  }
136
136
  // setEvent({name, data});
137
- } else if (name === VanillaOidc.eventNames.loginAsync_begin ||
138
- name === VanillaOidc.eventNames.loginCallbackAsync_end ||
139
- name === VanillaOidc.eventNames.loginAsync_error ||
140
- name === VanillaOidc.eventNames.loginCallbackAsync_error
137
+ } else if (name === OidcClient.eventNames.loginAsync_begin ||
138
+ name === OidcClient.eventNames.loginCallbackAsync_end ||
139
+ name === OidcClient.eventNames.loginAsync_error ||
140
+ name === OidcClient.eventNames.loginCallbackAsync_error
141
141
  ) {
142
142
  setEvent({ name, data });
143
- } else if (name === VanillaOidc.eventNames.service_worker_not_supported_by_browser && configuration.service_worker_only === true) {
143
+ } else if (name === OidcClient.eventNames.service_worker_not_supported_by_browser && configuration.service_worker_only === true) {
144
144
  setEvent({ name, data });
145
145
  }
146
146
  });
@@ -165,22 +165,22 @@ export const OidcProvider: FC<PropsWithChildren<OidcProviderProps>> = ({
165
165
  const oidc = getOidc(configurationName);
166
166
  const eventName = event.name;
167
167
  switch (eventName) {
168
- case VanillaOidc.eventNames.service_worker_not_supported_by_browser:
168
+ case OidcClient.eventNames.service_worker_not_supported_by_browser:
169
169
  return (<Switch loadingComponent={LoadingComponent} isLoading={isLoading} configurationName={configurationName}>
170
170
  <ServiceWorkerNotSupportedComponent configurationName={configurationName} />
171
171
  </Switch>);
172
- case VanillaOidc.eventNames.loginAsync_begin:
172
+ case OidcClient.eventNames.loginAsync_begin:
173
173
  return (<Switch loadingComponent={LoadingComponent} isLoading={isLoading} configurationName={configurationName}>
174
174
  <AuthenticatingComponent configurationName={configurationName} />
175
175
  </Switch>);
176
- case VanillaOidc.eventNames.loginAsync_error:
177
- case VanillaOidc.eventNames.loginCallbackAsync_error:
176
+ case OidcClient.eventNames.loginAsync_error:
177
+ case OidcClient.eventNames.loginCallbackAsync_error:
178
178
  return (<Switch loadingComponent={LoadingComponent} isLoading={isLoading} configurationName={configurationName}>
179
179
  <AuthenticatingErrorComponent configurationName={configurationName} />
180
180
  </Switch>);
181
- case VanillaOidc.eventNames.refreshTokensAsync_error:
182
- case VanillaOidc.eventNames.syncTokensAsync_error:
183
- case VanillaOidc.eventNames.logout_from_another_tab:
181
+ case OidcClient.eventNames.refreshTokensAsync_error:
182
+ case OidcClient.eventNames.syncTokensAsync_error:
183
+ case OidcClient.eventNames.logout_from_another_tab:
184
184
  return (<Switch loadingComponent={LoadingComponent} isLoading={isLoading} configurationName={configurationName}>
185
185
  <SessionLostComponent configurationName={configurationName} />
186
186
  </Switch>);
@@ -1,4 +1,4 @@
1
- import { StringMap, VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { StringMap, OidcClient } from '@axa-fr/oidc-client';
2
2
  import { FC, PropsWithChildren, useEffect } from 'react';
3
3
 
4
4
  export type OidcSecureProps = {
@@ -8,7 +8,7 @@ export type OidcSecureProps = {
8
8
  };
9
9
 
10
10
  export const OidcSecure: FC<PropsWithChildren<OidcSecureProps>> = ({ children, callbackPath = null, extras = null, configurationName = 'default' }) => {
11
- const getOidc = VanillaOidc.get;
11
+ const getOidc = OidcClient.get;
12
12
  const oidc = getOidc(configurationName);
13
13
  useEffect(() => {
14
14
  if (!oidc.tokens) {
package/src/ReactOidc.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { StringMap, VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { StringMap, OidcClient } from '@axa-fr/oidc-client';
2
2
  import { useEffect, useState } from 'react';
3
3
 
4
4
  const defaultConfigurationName = 'default';
@@ -17,7 +17,7 @@ const defaultIsAuthenticated = (getOidc: GetOidcFn, configurationName: string) =
17
17
  };
18
18
 
19
19
  export const useOidc = (configurationName = defaultConfigurationName) => {
20
- const getOidc = VanillaOidc.get;
20
+ const getOidc = OidcClient.get;
21
21
  const [isAuthenticated, setIsAuthenticated] = useState<boolean>(defaultIsAuthenticated(getOidc, configurationName));
22
22
 
23
23
  useEffect(() => {
@@ -26,7 +26,7 @@ export const useOidc = (configurationName = defaultConfigurationName) => {
26
26
  setIsAuthenticated(defaultIsAuthenticated(getOidc, configurationName));
27
27
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
28
  const newSubscriptionId = oidc.subscribeEvents((name: string, data: any) => {
29
- if (name === VanillaOidc.eventNames.logout_from_another_tab || name === VanillaOidc.eventNames.logout_from_same_tab || name === VanillaOidc.eventNames.token_aquired) {
29
+ if (name === OidcClient.eventNames.logout_from_another_tab || name === OidcClient.eventNames.logout_from_same_tab || name === OidcClient.eventNames.token_aquired) {
30
30
  if (isMounted) {
31
31
  setIsAuthenticated(defaultIsAuthenticated(getOidc, configurationName));
32
32
  }
@@ -65,7 +65,7 @@ export const useOidc = (configurationName = defaultConfigurationName) => {
65
65
  const accessTokenInitialState = { accessToken: null, accessTokenPayload: null };
66
66
 
67
67
  const initTokens = (configurationName: string) => {
68
- const getOidc = VanillaOidc.get;
68
+ const getOidc = OidcClient.get;
69
69
  const oidc = getOidc(configurationName);
70
70
  if (oidc.tokens) {
71
71
  const tokens = oidc.tokens;
@@ -83,7 +83,7 @@ export type OidcAccessToken = {
83
83
  }
84
84
 
85
85
  export const useOidcAccessToken = (configurationName = defaultConfigurationName) => {
86
- const getOidc = VanillaOidc.get;
86
+ const getOidc = OidcClient.get;
87
87
  const [state, setAccessToken] = useState<OidcAccessToken>(initTokens(configurationName));
88
88
 
89
89
  useEffect(() => {
@@ -95,12 +95,12 @@ export const useOidcAccessToken = (configurationName = defaultConfigurationName)
95
95
  }
96
96
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
97
97
  const newSubscriptionId = oidc.subscribeEvents((name: string, data: any) => {
98
- if (name === VanillaOidc.eventNames.token_renewed ||
99
- name === VanillaOidc.eventNames.token_aquired ||
100
- name === VanillaOidc.eventNames.logout_from_another_tab ||
101
- name === VanillaOidc.eventNames.logout_from_same_tab ||
102
- name === VanillaOidc.eventNames.refreshTokensAsync_error ||
103
- name === VanillaOidc.eventNames.syncTokensAsync_error) {
98
+ if (name === OidcClient.eventNames.token_renewed ||
99
+ name === OidcClient.eventNames.token_aquired ||
100
+ name === OidcClient.eventNames.logout_from_another_tab ||
101
+ name === OidcClient.eventNames.logout_from_same_tab ||
102
+ name === OidcClient.eventNames.refreshTokensAsync_error ||
103
+ name === OidcClient.eventNames.syncTokensAsync_error) {
104
104
  if (isMounted) {
105
105
  const tokens = oidc.tokens;
106
106
  setAccessToken(tokens != null ? { accessToken: tokens.accessToken, accessTokenPayload: tokens.accessTokenPayload } : accessTokenInitialState);
@@ -119,7 +119,7 @@ export const useOidcAccessToken = (configurationName = defaultConfigurationName)
119
119
  const idTokenInitialState = { idToken: null, idTokenPayload: null };
120
120
 
121
121
  const initIdToken = (configurationName: string) => {
122
- const getOidc = VanillaOidc.get;
122
+ const getOidc = OidcClient.get;
123
123
  const oidc = getOidc(configurationName);
124
124
  if (oidc.tokens) {
125
125
  const tokens = oidc.tokens;
@@ -134,7 +134,7 @@ export type OidcIdToken = {
134
134
  }
135
135
 
136
136
  export const useOidcIdToken = (configurationName = defaultConfigurationName) => {
137
- const getOidc = VanillaOidc.get;
137
+ const getOidc = OidcClient.get;
138
138
  const [state, setIDToken] = useState<OidcIdToken>(initIdToken(configurationName));
139
139
 
140
140
  useEffect(() => {
@@ -146,12 +146,12 @@ export const useOidcIdToken = (configurationName = defaultConfigurationName) =>
146
146
  }
147
147
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
148
148
  const newSubscriptionId = oidc.subscribeEvents((name: string, data: any) => {
149
- if (name === VanillaOidc.eventNames.token_renewed ||
150
- name === VanillaOidc.eventNames.token_aquired ||
151
- name === VanillaOidc.eventNames.logout_from_another_tab ||
152
- name === VanillaOidc.eventNames.logout_from_same_tab ||
153
- name === VanillaOidc.eventNames.refreshTokensAsync_error ||
154
- name === VanillaOidc.eventNames.syncTokensAsync_error) {
149
+ if (name === OidcClient.eventNames.token_renewed ||
150
+ name === OidcClient.eventNames.token_aquired ||
151
+ name === OidcClient.eventNames.logout_from_another_tab ||
152
+ name === OidcClient.eventNames.logout_from_same_tab ||
153
+ name === OidcClient.eventNames.refreshTokensAsync_error ||
154
+ name === OidcClient.eventNames.syncTokensAsync_error) {
155
155
  if (isMounted) {
156
156
  const tokens = oidc.tokens;
157
157
  setIDToken(tokens != null ? { idToken: tokens.idToken, idTokenPayload: tokens.idTokenPayload } : idTokenInitialState);
package/src/User.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type OidcUserInfo, VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { type OidcUserInfo, OidcClient } from '@axa-fr/oidc-client';
2
2
  import { useEffect, useState } from 'react';
3
3
 
4
4
  export enum OidcUserStatus {
@@ -17,7 +17,7 @@ export const useOidcUser = <T extends OidcUserInfo = OidcUserInfo>(configuration
17
17
  const [oidcUser, setOidcUser] = useState<OidcUser<T>>({ user: null, status: OidcUserStatus.Unauthenticated });
18
18
  const [oidcUserId, setOidcUserId] = useState<string>('');
19
19
 
20
- const oidc = VanillaOidc.get(configurationName);
20
+ const oidc = OidcClient.get(configurationName);
21
21
  useEffect(() => {
22
22
  let isMounted = true;
23
23
  if (oidc && oidc.tokens) {
@@ -1,4 +1,4 @@
1
- import { VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { OidcClient } from '@axa-fr/oidc-client';
2
2
  import { ComponentType, useEffect, useState } from 'react';
3
3
 
4
4
  import { getCustomHistory } from '../routes/withRouter.js';
@@ -16,7 +16,7 @@ const CallbackManager: ComponentType<any> = ({ callBackError, callBackSuccess, c
16
16
  useEffect(() => {
17
17
  let isMounted = true;
18
18
  const playCallbackAsync = async () => {
19
- const getOidc = VanillaOidc.get;
19
+ const getOidc = OidcClient.get;
20
20
  try {
21
21
  const { callbackPath } = await getOidc(configurationName).loginCallbackAsync();
22
22
  const history = (withCustomHistory) ? withCustomHistory() : getCustomHistory();
@@ -1,10 +1,10 @@
1
- import { VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { OidcClient } from '@axa-fr/oidc-client';
2
2
  import { ComponentType, useEffect } from 'react';
3
3
 
4
4
  const SilentCallbackManager: ComponentType<any> = ({ configurationName }) => {
5
5
  useEffect(() => {
6
6
  const playCallbackAsync = async () => {
7
- const getOidc = VanillaOidc.get;
7
+ const getOidc = OidcClient.get;
8
8
  const oidc = getOidc(configurationName);
9
9
  oidc.silentLoginCallbackAsync();
10
10
  };
@@ -1,10 +1,10 @@
1
- import { getParseQueryStringFromLocation, VanillaOidc } from '@axa-fr/oidc-client';
1
+ import { getParseQueryStringFromLocation, OidcClient } from '@axa-fr/oidc-client';
2
2
  import { ComponentType, useEffect } from 'react';
3
3
 
4
4
  const SilentLogin: ComponentType<any> = ({ configurationName }) => {
5
5
  const queryParams = getParseQueryStringFromLocation(window.location.href);
6
6
 
7
- const getOidc = VanillaOidc.get;
7
+ const getOidc = OidcClient.get;
8
8
  const oidc = getOidc(configurationName);
9
9
 
10
10
  let extras = null;
@@ -1 +0,0 @@
1
- {"version":3,"file":"FetchToken.d.ts","sourceRoot":"","sources":["../src/src/FetchToken.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,qBAAqB,CAAC;AAGzD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAiCD,eAAO,MAAM,aAAa,WAAW,KAAK,oEAE7B,2BAA2B,4CAGvC,CAAC;AAEF,eAAO,MAAM,YAAY,WAAW,KAAK;mBAK7B,WAAW,GAAG,GAAG,SAAS,WAAW;CAQhD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OidcProvider.d.ts","sourceRoot":"","sources":["../src/src/OidcProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmB,iBAAiB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAMlF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,MAAM,WAAW,GAAG;IACtB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CAChC,CAAC;AAIF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,wBAAwB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9C,oBAAoB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1C,uBAAuB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC7C,4BAA4B,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAClD,gBAAgB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACtC,kCAAkC,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACxD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,QAAQ,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,aAAa,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,KAAK,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;CAC5C,CAAC;AA0CF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CA8HjE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OidcSecure.d.ts","sourceRoot":"","sources":["../src/src/OidcSecure.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC1B,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,MAAM,CAAC,EAAC,SAAS,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAa7D,CAAC;AAEF,eAAO,MAAM,cAAc,qBACP,GAAG,kBAAkB,eAAe,CAAC,CAAC,0HAMzD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReactOidc.d.ts","sourceRoot":"","sources":["../src/src/ReactOidc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAC;AAkB7D,eAAO,MAAM,OAAO;2BAuBY,MAAM,GAAG,SAAS,WAAqB,SAAS;4BAG9C,MAAM,GAAG,IAAI,GAAG,SAAS,WAAqB,SAAS;2BAGlD,SAAS,KAAW,QAAQ,eAAe,GAAG,WAAW,CAAC;;CAehG,CAAC;AAiBF,MAAM,MAAM,eAAe,GAAG;IAC1B,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,kBAAkB,CAAC,EAAE,GAAG,CAAC;CAC5B,CAAA;AAED,eAAO,MAAM,kBAAkB,iDAgC9B,CAAC;AAcF,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,cAAc,CAAC,EAAE,GAAG,CAAC;CACxB,CAAA;AAED,eAAO,MAAM,cAAc,6CAgC1B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../src/src/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,qBAAqB,CAAC;AAGrE,oBAAY,cAAc;IACtB,eAAe,oBAAmB;IAClC,OAAO,iBAAiB;IACxB,MAAM,gBAAgB;IACtB,YAAY,uBAAuB;CACtC;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,IAAI;IAC1D,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,cAAc,CAAC;CAC1B,CAAA;AAED,eAAO,MAAM,WAAW;;;;CA6BvB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthenticateError.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/AuthenticateError.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,mBAAmB,EAAE,aAAa,CAAC,GAAG,CAO3C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Authenticating.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/Authenticating.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,cAAc,EAAG,aAAa,CAAC,GAAG,CAOvC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callback.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/Callback.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAK3D,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,GAAG,CAKxC,CAAC;AAER,QAAA,MAAM,eAAe,EAAE,aAAa,CAAC,GAAG,CA+BvC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loading.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/Loading.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,OAAO,EAAG,aAAa,CAAC,GAAG,CAIhC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServiceWorkerNotSupported.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/ServiceWorkerNotSupported.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,QAAA,MAAM,yBAAyB,EAAG,aAAa,CAAC,GAAG,CAOlD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SessionLost.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/SessionLost.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,GAAG,CAS1C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SilentCallback.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/SilentCallback.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAEjD,QAAA,MAAM,qBAAqB,EAAE,aAAa,CAAC,GAAG,CAW7C,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SilentLogin.component.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/SilentLogin.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAEjD,QAAA,MAAM,WAAW,EAAE,aAAa,CAAC,GAAG,CAyBnC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/core/default-component/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OidcRoutes.d.ts","sourceRoot":"","sources":["../../../src/src/core/routes/OidcRoutes.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA8C,MAAM,OAAO,CAAC;AAKzF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,eAAe,GAAG;IACrB,wBAAwB,CAAC,EAAE,aAAa,CAAC;IACzC,sBAAsB,CAAC,EAAE,aAAa,CAAC;IACvC,uBAAuB,CAAC,EAAE,aAAa,CAAC;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,aAAa,CAAC;CACzC,CAAC;;AA6CF,wBAAsC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"withRouter.d.ts","sourceRoot":"","sources":["../../../src/src/core/routes/withRouter.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,WAAW,CAAC,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC;IAC7F,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;AAMF,KAAK,qBAAqB,CAAC,CAAC,GAAG,GAAG,IAAI;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAGF,eAAO,MAAM,WAAW,mBAAoB,cAAc,oBAAoB,QAAQ,aAC7E,MAAM,UACL,qBAAqB,KAC5B,WASF,CAAC;AAEF,KAAK,kBAAkB,GAAG,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAChF;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC5E,CAAA;AAiBD,eAAO,MAAM,gBAAgB,qBAAuE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxD,YAAY,EACV,sBAAsB,EACtB,KAAK,EACL,iBAAiB,EACjB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}