react-ecosistema-unp 1.3.0-pre-release.1 → 1.3.0-pre-release.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/WebSocketManager.css +1 -0
- package/dist/auth/hooks/useFinalizarSesion.js +15 -126
- package/dist/index-Cs6Q8pv4.js +394 -0
- package/dist/lib/utils/websocket-manager/WebSocketManager.d.ts +15 -0
- package/dist/lib/utils/websocket-manager/WebSocketProvider.d.ts +14 -0
- package/dist/lib/utils/websocket-manager/useWebSocket.d.ts +4 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/utils/websocket-manager/WebSocketManager.js +42 -0
- package/dist/utils/websocket-manager/WebSocketProvider.js +24 -0
- package/dist/utils/websocket-manager/useWebSocket.js +8 -0
- package/dist/utils.js +11 -5
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
@@ -1,132 +1,21 @@
|
|
|
1
|
-
import { useNavigate as
|
|
2
|
-
import { useAuthId as
|
|
3
|
-
import { FinSesionService as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let o = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
|
|
8
|
-
a.type = "text/css", o.firstChild ? o.insertBefore(a, o.firstChild) : o.appendChild(a), a.styleSheet ? a.styleSheet.cssText = t : a.appendChild(document.createTextNode(t));
|
|
9
|
-
}
|
|
10
|
-
L(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
11
|
-
`);
|
|
12
|
-
var g = (t) => typeof t == "number" && !isNaN(t), c = (t) => typeof t == "string", k = (t) => typeof t == "function", U = (t) => c(t) || g(t), X = (t) => E(t) || c(t) || k(t) || g(t), D = 1, w = () => `${D++}`, i = /* @__PURE__ */ new Map(), u = [], x = /* @__PURE__ */ new Set(), I = () => i.size > 0, R = (t, { containerId: o }) => {
|
|
13
|
-
var a;
|
|
14
|
-
return (a = i.get(o || 1)) == null ? void 0 : a.toasts.get(t);
|
|
15
|
-
};
|
|
16
|
-
function N(t, o) {
|
|
17
|
-
var a;
|
|
18
|
-
if (o) return !!((a = i.get(o)) != null && a.isToastActive(t));
|
|
19
|
-
let f = !1;
|
|
20
|
-
return i.forEach((s) => {
|
|
21
|
-
s.isToastActive(t) && (f = !0);
|
|
22
|
-
}), f;
|
|
23
|
-
}
|
|
24
|
-
function F(t) {
|
|
25
|
-
if (!I()) {
|
|
26
|
-
u = u.filter((o) => t != null && o.options.toastId !== t);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (t == null || U(t)) i.forEach((o) => {
|
|
30
|
-
o.removeToast(t);
|
|
31
|
-
});
|
|
32
|
-
else if (t && ("containerId" in t || "id" in t)) {
|
|
33
|
-
let o = i.get(t.containerId);
|
|
34
|
-
o ? o.removeToast(t.id) : i.forEach((a) => {
|
|
35
|
-
a.removeToast(t.id);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
var A = (t = {}) => {
|
|
40
|
-
i.forEach((o) => {
|
|
41
|
-
o.props.limit && (!t.containerId || o.id === t.containerId) && o.clearQueue();
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
function P(t, o) {
|
|
45
|
-
X(t) && (I() || u.push({ content: t, options: o }), i.forEach((a) => {
|
|
46
|
-
a.buildToast(t, o);
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
function z(t, o) {
|
|
50
|
-
i.forEach((a) => {
|
|
51
|
-
(o == null || !(o != null && o.containerId) || (o == null ? void 0 : o.containerId) === a.id) && a.toggle(t, o == null ? void 0 : o.id);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function B(t) {
|
|
55
|
-
return x.add(t), () => {
|
|
56
|
-
x.delete(t);
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function Q(t) {
|
|
60
|
-
return t && (c(t.toastId) || g(t.toastId)) ? t.toastId : w();
|
|
61
|
-
}
|
|
62
|
-
function y(t, o) {
|
|
63
|
-
return P(t, o), o.toastId;
|
|
64
|
-
}
|
|
65
|
-
function _(t, o) {
|
|
66
|
-
return { ...o, type: o && o.type || t, toastId: Q(o) };
|
|
67
|
-
}
|
|
68
|
-
function m(t) {
|
|
69
|
-
return (o, a) => y(o, _(t, a));
|
|
70
|
-
}
|
|
71
|
-
function r(t, o) {
|
|
72
|
-
return y(t, _("default", o));
|
|
73
|
-
}
|
|
74
|
-
r.loading = (t, o) => y(t, _("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...o }));
|
|
75
|
-
function M(t, { pending: o, error: a, success: f }, s) {
|
|
76
|
-
let e;
|
|
77
|
-
o && (e = c(o) ? r.loading(o, s) : r.loading(o.render, { ...s, ...o }));
|
|
78
|
-
let n = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, b = (l, d, h) => {
|
|
79
|
-
if (d == null) {
|
|
80
|
-
r.dismiss(e);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
let v = { type: l, ...n, ...s, data: h }, p = c(d) ? { render: d } : d;
|
|
84
|
-
return e ? r.update(e, { ...v, ...p }) : r(p.render, { ...v, ...p }), h;
|
|
85
|
-
}, T = k(t) ? t() : t;
|
|
86
|
-
return T.then((l) => b("success", f, l)).catch((l) => b("error", a, l)), T;
|
|
87
|
-
}
|
|
88
|
-
r.promise = M;
|
|
89
|
-
r.success = m("success");
|
|
90
|
-
r.info = m("info");
|
|
91
|
-
r.error = m("error");
|
|
92
|
-
r.warning = m("warning");
|
|
93
|
-
r.warn = r.warning;
|
|
94
|
-
r.dark = (t, o) => y(t, _("default", { theme: "dark", ...o }));
|
|
95
|
-
function V(t) {
|
|
96
|
-
F(t);
|
|
97
|
-
}
|
|
98
|
-
r.dismiss = V;
|
|
99
|
-
r.clearWaitingQueue = A;
|
|
100
|
-
r.isActive = N;
|
|
101
|
-
r.update = (t, o = {}) => {
|
|
102
|
-
let a = R(t, o);
|
|
103
|
-
if (a) {
|
|
104
|
-
let { props: f, content: s } = a, e = { delay: 100, ...f, ...o, toastId: o.toastId || t, updateId: w() };
|
|
105
|
-
e.toastId !== t && (e.staleId = t);
|
|
106
|
-
let n = e.render || s;
|
|
107
|
-
delete e.render, y(n, e);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
r.done = (t) => {
|
|
111
|
-
r.update(t, { progress: 1 });
|
|
112
|
-
};
|
|
113
|
-
r.onChange = B;
|
|
114
|
-
r.play = (t) => z(!0, t);
|
|
115
|
-
r.pause = (t) => z(!1, t);
|
|
116
|
-
const Z = () => {
|
|
117
|
-
const t = O(), { setAuthToken: o, setUserToken: a } = C();
|
|
1
|
+
import { useNavigate as i } from "react-router-dom";
|
|
2
|
+
import { useAuthId as a } from "./AuthHook.js";
|
|
3
|
+
import { FinSesionService as c } from "../services/FinSesionService.js";
|
|
4
|
+
import { y as l } from "../../index-Cs6Q8pv4.js";
|
|
5
|
+
const k = () => {
|
|
6
|
+
const o = i(), { setAuthToken: n, setUserToken: r } = a();
|
|
118
7
|
return { FinSesion: () => {
|
|
119
|
-
|
|
120
|
-
new Promise(async (
|
|
8
|
+
l.promise(
|
|
9
|
+
new Promise(async (t, s) => {
|
|
121
10
|
try {
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
11
|
+
const e = localStorage.getItem("access_token");
|
|
12
|
+
if (!e)
|
|
124
13
|
throw new Error("No se encontró el token de acceso.");
|
|
125
|
-
await
|
|
126
|
-
|
|
14
|
+
await c(e), localStorage.removeItem("access_token"), localStorage.removeItem("user_token"), n(null), r(null), setTimeout(() => {
|
|
15
|
+
t(!0), o("/");
|
|
127
16
|
}, 1e3);
|
|
128
|
-
} catch (
|
|
129
|
-
e
|
|
17
|
+
} catch (e) {
|
|
18
|
+
s(e);
|
|
130
19
|
}
|
|
131
20
|
}),
|
|
132
21
|
{
|
|
@@ -138,5 +27,5 @@ const Z = () => {
|
|
|
138
27
|
} };
|
|
139
28
|
};
|
|
140
29
|
export {
|
|
141
|
-
|
|
30
|
+
k as useFinalizarSesion
|
|
142
31
|
};
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import T, { useState as Q, useRef as D, useEffect as H, useSyncExternalStore as dt, useLayoutEffect as at, isValidElement as U, cloneElement as Z } from "react";
|
|
2
|
+
function ot(t) {
|
|
3
|
+
var e, a, o = "";
|
|
4
|
+
if (typeof t == "string" || typeof t == "number") o += t;
|
|
5
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
6
|
+
var r = t.length;
|
|
7
|
+
for (e = 0; e < r; e++) t[e] && (a = ot(t[e])) && (o && (o += " "), o += a);
|
|
8
|
+
} else for (a in t) t[a] && (o && (o += " "), o += a);
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
function N() {
|
|
12
|
+
for (var t, e, a = 0, o = "", r = arguments.length; a < r; a++) (t = arguments[a]) && (e = ot(t)) && (o && (o += " "), o += e);
|
|
13
|
+
return o;
|
|
14
|
+
}
|
|
15
|
+
function yt(t) {
|
|
16
|
+
if (typeof document > "u") return;
|
|
17
|
+
let e = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
|
|
18
|
+
a.type = "text/css", e.firstChild ? e.insertBefore(a, e.firstChild) : e.appendChild(a), a.styleSheet ? a.styleSheet.cssText = t : a.appendChild(document.createTextNode(t));
|
|
19
|
+
}
|
|
20
|
+
yt(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
21
|
+
`);
|
|
22
|
+
var M = (t) => typeof t == "number" && !isNaN(t), A = (t) => typeof t == "string", z = (t) => typeof t == "function", ut = (t) => A(t) || M(t), j = (t) => A(t) || z(t) ? t : null, pt = (t, e) => t === !1 || M(t) && t > 0 ? t : e, W = (t) => U(t) || A(t) || z(t) || M(t);
|
|
23
|
+
function mt(t, e, a = 300) {
|
|
24
|
+
let { scrollHeight: o, style: r } = t;
|
|
25
|
+
requestAnimationFrame(() => {
|
|
26
|
+
r.minHeight = "initial", r.height = o + "px", r.transition = `all ${a}ms`, requestAnimationFrame(() => {
|
|
27
|
+
r.height = "0", r.padding = "0", r.margin = "0", setTimeout(e, a);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function _t({ enter: t, exit: e, appendPosition: a = !1, collapse: o = !0, collapseDuration: r = 300 }) {
|
|
32
|
+
return function({ children: l, position: s, preventExitTransition: d, done: f, nodeRef: u, isIn: _, playToast: x }) {
|
|
33
|
+
let E = a ? `${t}--${s}` : t, k = a ? `${e}--${s}` : e, I = D(0);
|
|
34
|
+
return at(() => {
|
|
35
|
+
let v = u.current, m = E.split(" "), p = (n) => {
|
|
36
|
+
n.target === u.current && (x(), v.removeEventListener("animationend", p), v.removeEventListener("animationcancel", p), I.current === 0 && n.type !== "animationcancel" && v.classList.remove(...m));
|
|
37
|
+
};
|
|
38
|
+
v.classList.add(...m), v.addEventListener("animationend", p), v.addEventListener("animationcancel", p);
|
|
39
|
+
}, []), H(() => {
|
|
40
|
+
let v = u.current, m = () => {
|
|
41
|
+
v.removeEventListener("animationend", m), o ? mt(v, f, r) : f();
|
|
42
|
+
};
|
|
43
|
+
_ || (d ? m() : (I.current = 1, v.className += ` ${k}`, v.addEventListener("animationend", m)));
|
|
44
|
+
}, [_]), T.createElement(T.Fragment, null, l);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function et(t, e) {
|
|
48
|
+
return { content: st(t.content, t.props), containerId: t.props.containerId, id: t.props.toastId, theme: t.props.theme, type: t.props.type, data: t.props.data || {}, isLoading: t.props.isLoading, icon: t.props.icon, reason: t.removalReason, status: e };
|
|
49
|
+
}
|
|
50
|
+
function st(t, e, a = !1) {
|
|
51
|
+
return U(t) && !A(t.type) ? Z(t, { closeToast: e.closeToast, toastProps: e, data: e.data, isPaused: a }) : z(t) ? t({ closeToast: e.closeToast, toastProps: e, data: e.data, isPaused: a }) : t;
|
|
52
|
+
}
|
|
53
|
+
function gt({ closeToast: t, theme: e, ariaLabel: a = "close" }) {
|
|
54
|
+
return T.createElement("button", { className: `Toastify__close-button Toastify__close-button--${e}`, type: "button", onClick: (o) => {
|
|
55
|
+
o.stopPropagation(), t(!0);
|
|
56
|
+
}, "aria-label": a }, T.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, T.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
|
|
57
|
+
}
|
|
58
|
+
function bt({ delay: t, isRunning: e, closeToast: a, type: o = "default", hide: r, className: l, controlledProgress: s, progress: d, rtl: f, isIn: u, theme: _ }) {
|
|
59
|
+
let x = r || s && d === 0, E = { animationDuration: `${t}ms`, animationPlayState: e ? "running" : "paused" };
|
|
60
|
+
s && (E.transform = `scaleX(${d})`);
|
|
61
|
+
let k = N("Toastify__progress-bar", s ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${_}`, `Toastify__progress-bar--${o}`, { "Toastify__progress-bar--rtl": f }), I = z(l) ? l({ rtl: f, type: o, defaultClassName: k }) : N(k, l), v = { [s && d >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: s && d < 1 ? null : () => {
|
|
62
|
+
u && a();
|
|
63
|
+
} };
|
|
64
|
+
return T.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": x }, T.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${_} Toastify__progress-bar--${o}` }), T.createElement("div", { role: "progressbar", "aria-hidden": x ? "true" : "false", "aria-label": "notification timer", className: I, style: E, ...v }));
|
|
65
|
+
}
|
|
66
|
+
var vt = 1, rt = () => `${vt++}`;
|
|
67
|
+
function Tt(t, e, a) {
|
|
68
|
+
let o = 1, r = 0, l = [], s = [], d = e, f = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(), _ = (n) => (u.add(n), () => u.delete(n)), x = () => {
|
|
69
|
+
s = Array.from(f.values()), u.forEach((n) => n());
|
|
70
|
+
}, E = ({ containerId: n, toastId: i, updateId: c }) => {
|
|
71
|
+
let h = n ? n !== t : t !== 1, C = f.has(i) && c == null;
|
|
72
|
+
return h || C;
|
|
73
|
+
}, k = (n, i) => {
|
|
74
|
+
f.forEach((c) => {
|
|
75
|
+
var h;
|
|
76
|
+
(i == null || i === c.props.toastId) && ((h = c.toggle) == null || h.call(c, n));
|
|
77
|
+
});
|
|
78
|
+
}, I = (n) => {
|
|
79
|
+
var i, c;
|
|
80
|
+
(c = (i = n.props) == null ? void 0 : i.onClose) == null || c.call(i, n.removalReason), n.isActive = !1;
|
|
81
|
+
}, v = (n) => {
|
|
82
|
+
if (n == null) f.forEach(I);
|
|
83
|
+
else {
|
|
84
|
+
let i = f.get(n);
|
|
85
|
+
i && I(i);
|
|
86
|
+
}
|
|
87
|
+
x();
|
|
88
|
+
}, m = () => {
|
|
89
|
+
r -= l.length, l = [];
|
|
90
|
+
}, p = (n) => {
|
|
91
|
+
var i, c;
|
|
92
|
+
let { toastId: h, updateId: C } = n.props, y = C == null;
|
|
93
|
+
n.staleId && f.delete(n.staleId), n.isActive = !0, f.set(h, n), x(), a(et(n, y ? "added" : "updated")), y && ((c = (i = n.props).onOpen) == null || c.call(i));
|
|
94
|
+
};
|
|
95
|
+
return { id: t, props: d, observe: _, toggle: k, removeToast: v, toasts: f, clearQueue: m, buildToast: (n, i) => {
|
|
96
|
+
if (E(i)) return;
|
|
97
|
+
let { toastId: c, updateId: h, data: C, staleId: y, delay: b } = i, L = h == null;
|
|
98
|
+
L && r++;
|
|
99
|
+
let P = { ...d, style: d.toastStyle, key: o++, ...Object.fromEntries(Object.entries(i).filter(([$, S]) => S != null)), toastId: c, updateId: h, data: C, isIn: !1, className: j(i.className || d.toastClassName), progressClassName: j(i.progressClassName || d.progressClassName), autoClose: i.isLoading ? !1 : pt(i.autoClose, d.autoClose), closeToast($) {
|
|
100
|
+
f.get(c).removalReason = $, v(c);
|
|
101
|
+
}, deleteToast() {
|
|
102
|
+
let $ = f.get(c);
|
|
103
|
+
if ($ != null) {
|
|
104
|
+
if (a(et($, "removed")), f.delete(c), r--, r < 0 && (r = 0), l.length > 0) {
|
|
105
|
+
p(l.shift());
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
x();
|
|
109
|
+
}
|
|
110
|
+
} };
|
|
111
|
+
P.closeButton = d.closeButton, i.closeButton === !1 || W(i.closeButton) ? P.closeButton = i.closeButton : i.closeButton === !0 && (P.closeButton = W(d.closeButton) ? d.closeButton : !0);
|
|
112
|
+
let O = { content: n, props: P, staleId: y };
|
|
113
|
+
d.limit && d.limit > 0 && r > d.limit && L ? l.push(O) : M(b) ? setTimeout(() => {
|
|
114
|
+
p(O);
|
|
115
|
+
}, b) : p(O);
|
|
116
|
+
}, setProps(n) {
|
|
117
|
+
d = n;
|
|
118
|
+
}, setToggle: (n, i) => {
|
|
119
|
+
let c = f.get(n);
|
|
120
|
+
c && (c.toggle = i);
|
|
121
|
+
}, isToastActive: (n) => {
|
|
122
|
+
var i;
|
|
123
|
+
return (i = f.get(n)) == null ? void 0 : i.isActive;
|
|
124
|
+
}, getSnapshot: () => s };
|
|
125
|
+
}
|
|
126
|
+
var w = /* @__PURE__ */ new Map(), R = [], V = /* @__PURE__ */ new Set(), ht = (t) => V.forEach((e) => e(t)), nt = () => w.size > 0;
|
|
127
|
+
function xt() {
|
|
128
|
+
R.forEach((t) => lt(t.content, t.options)), R = [];
|
|
129
|
+
}
|
|
130
|
+
var kt = (t, { containerId: e }) => {
|
|
131
|
+
var a;
|
|
132
|
+
return (a = w.get(e || 1)) == null ? void 0 : a.toasts.get(t);
|
|
133
|
+
};
|
|
134
|
+
function it(t, e) {
|
|
135
|
+
var a;
|
|
136
|
+
if (e) return !!((a = w.get(e)) != null && a.isToastActive(t));
|
|
137
|
+
let o = !1;
|
|
138
|
+
return w.forEach((r) => {
|
|
139
|
+
r.isToastActive(t) && (o = !0);
|
|
140
|
+
}), o;
|
|
141
|
+
}
|
|
142
|
+
function Et(t) {
|
|
143
|
+
if (!nt()) {
|
|
144
|
+
R = R.filter((e) => t != null && e.options.toastId !== t);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (t == null || ut(t)) w.forEach((e) => {
|
|
148
|
+
e.removeToast(t);
|
|
149
|
+
});
|
|
150
|
+
else if (t && ("containerId" in t || "id" in t)) {
|
|
151
|
+
let e = w.get(t.containerId);
|
|
152
|
+
e ? e.removeToast(t.id) : w.forEach((a) => {
|
|
153
|
+
a.removeToast(t.id);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
var wt = (t = {}) => {
|
|
158
|
+
w.forEach((e) => {
|
|
159
|
+
e.props.limit && (!t.containerId || e.id === t.containerId) && e.clearQueue();
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
function lt(t, e) {
|
|
163
|
+
W(t) && (nt() || R.push({ content: t, options: e }), w.forEach((a) => {
|
|
164
|
+
a.buildToast(t, e);
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
function It(t) {
|
|
168
|
+
var e;
|
|
169
|
+
(e = w.get(t.containerId || 1)) == null || e.setToggle(t.id, t.fn);
|
|
170
|
+
}
|
|
171
|
+
function ft(t, e) {
|
|
172
|
+
w.forEach((a) => {
|
|
173
|
+
(e == null || !(e != null && e.containerId) || (e == null ? void 0 : e.containerId) === a.id) && a.toggle(t, e == null ? void 0 : e.id);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function Ct(t) {
|
|
177
|
+
let e = t.containerId || 1;
|
|
178
|
+
return { subscribe(a) {
|
|
179
|
+
let o = Tt(e, t, ht);
|
|
180
|
+
w.set(e, o);
|
|
181
|
+
let r = o.observe(a);
|
|
182
|
+
return xt(), () => {
|
|
183
|
+
r(), w.delete(e);
|
|
184
|
+
};
|
|
185
|
+
}, setProps(a) {
|
|
186
|
+
var o;
|
|
187
|
+
(o = w.get(e)) == null || o.setProps(a);
|
|
188
|
+
}, getSnapshot() {
|
|
189
|
+
var a;
|
|
190
|
+
return (a = w.get(e)) == null ? void 0 : a.getSnapshot();
|
|
191
|
+
} };
|
|
192
|
+
}
|
|
193
|
+
function Lt(t) {
|
|
194
|
+
return V.add(t), () => {
|
|
195
|
+
V.delete(t);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function Ot(t) {
|
|
199
|
+
return t && (A(t.toastId) || M(t.toastId)) ? t.toastId : rt();
|
|
200
|
+
}
|
|
201
|
+
function B(t, e) {
|
|
202
|
+
return lt(t, e), e.toastId;
|
|
203
|
+
}
|
|
204
|
+
function F(t, e) {
|
|
205
|
+
return { ...e, type: e && e.type || t, toastId: Ot(e) };
|
|
206
|
+
}
|
|
207
|
+
function Y(t) {
|
|
208
|
+
return (e, a) => B(e, F(t, a));
|
|
209
|
+
}
|
|
210
|
+
function g(t, e) {
|
|
211
|
+
return B(t, F("default", e));
|
|
212
|
+
}
|
|
213
|
+
g.loading = (t, e) => B(t, F("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...e }));
|
|
214
|
+
function zt(t, { pending: e, error: a, success: o }, r) {
|
|
215
|
+
let l;
|
|
216
|
+
e && (l = A(e) ? g.loading(e, r) : g.loading(e.render, { ...r, ...e }));
|
|
217
|
+
let s = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, d = (u, _, x) => {
|
|
218
|
+
if (_ == null) {
|
|
219
|
+
g.dismiss(l);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
let E = { type: u, ...s, ...r, data: x }, k = A(_) ? { render: _ } : _;
|
|
223
|
+
return l ? g.update(l, { ...E, ...k }) : g(k.render, { ...E, ...k }), x;
|
|
224
|
+
}, f = z(t) ? t() : t;
|
|
225
|
+
return f.then((u) => d("success", o, u)).catch((u) => d("error", a, u)), f;
|
|
226
|
+
}
|
|
227
|
+
g.promise = zt;
|
|
228
|
+
g.success = Y("success");
|
|
229
|
+
g.info = Y("info");
|
|
230
|
+
g.error = Y("error");
|
|
231
|
+
g.warning = Y("warning");
|
|
232
|
+
g.warn = g.warning;
|
|
233
|
+
g.dark = (t, e) => B(t, F("default", { theme: "dark", ...e }));
|
|
234
|
+
function Pt(t) {
|
|
235
|
+
Et(t);
|
|
236
|
+
}
|
|
237
|
+
g.dismiss = Pt;
|
|
238
|
+
g.clearWaitingQueue = wt;
|
|
239
|
+
g.isActive = it;
|
|
240
|
+
g.update = (t, e = {}) => {
|
|
241
|
+
let a = kt(t, e);
|
|
242
|
+
if (a) {
|
|
243
|
+
let { props: o, content: r } = a, l = { delay: 100, ...o, ...e, toastId: e.toastId || t, updateId: rt() };
|
|
244
|
+
l.toastId !== t && (l.staleId = t);
|
|
245
|
+
let s = l.render || r;
|
|
246
|
+
delete l.render, B(s, l);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
g.done = (t) => {
|
|
250
|
+
g.update(t, { progress: 1 });
|
|
251
|
+
};
|
|
252
|
+
g.onChange = Lt;
|
|
253
|
+
g.play = (t) => ft(!0, t);
|
|
254
|
+
g.pause = (t) => ft(!1, t);
|
|
255
|
+
function $t(t) {
|
|
256
|
+
var e;
|
|
257
|
+
let { subscribe: a, getSnapshot: o, setProps: r } = D(Ct(t)).current;
|
|
258
|
+
r(t);
|
|
259
|
+
let l = (e = dt(a, o, o)) == null ? void 0 : e.slice();
|
|
260
|
+
function s(d) {
|
|
261
|
+
if (!l) return [];
|
|
262
|
+
let f = /* @__PURE__ */ new Map();
|
|
263
|
+
return t.newestOnTop && l.reverse(), l.forEach((u) => {
|
|
264
|
+
let { position: _ } = u.props;
|
|
265
|
+
f.has(_) || f.set(_, []), f.get(_).push(u);
|
|
266
|
+
}), Array.from(f, (u) => d(u[0], u[1]));
|
|
267
|
+
}
|
|
268
|
+
return { getToastToRender: s, isToastActive: it, count: l == null ? void 0 : l.length };
|
|
269
|
+
}
|
|
270
|
+
function Nt(t) {
|
|
271
|
+
let [e, a] = Q(!1), [o, r] = Q(!1), l = D(null), s = D({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: d, pauseOnHover: f, closeToast: u, onClick: _, closeOnClick: x } = t;
|
|
272
|
+
It({ id: t.toastId, containerId: t.containerId, fn: a }), H(() => {
|
|
273
|
+
if (t.pauseOnFocusLoss) return E(), () => {
|
|
274
|
+
k();
|
|
275
|
+
};
|
|
276
|
+
}, [t.pauseOnFocusLoss]);
|
|
277
|
+
function E() {
|
|
278
|
+
document.hasFocus() || p(), window.addEventListener("focus", m), window.addEventListener("blur", p);
|
|
279
|
+
}
|
|
280
|
+
function k() {
|
|
281
|
+
window.removeEventListener("focus", m), window.removeEventListener("blur", p);
|
|
282
|
+
}
|
|
283
|
+
function I(y) {
|
|
284
|
+
if (t.draggable === !0 || t.draggable === y.pointerType) {
|
|
285
|
+
n();
|
|
286
|
+
let b = l.current;
|
|
287
|
+
s.canCloseOnClick = !0, s.canDrag = !0, b.style.transition = "none", t.draggableDirection === "x" ? (s.start = y.clientX, s.removalDistance = b.offsetWidth * (t.draggablePercent / 100)) : (s.start = y.clientY, s.removalDistance = b.offsetHeight * (t.draggablePercent === 80 ? t.draggablePercent * 1.5 : t.draggablePercent) / 100);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function v(y) {
|
|
291
|
+
let { top: b, bottom: L, left: P, right: O } = l.current.getBoundingClientRect();
|
|
292
|
+
y.nativeEvent.type !== "touchend" && t.pauseOnHover && y.clientX >= P && y.clientX <= O && y.clientY >= b && y.clientY <= L ? p() : m();
|
|
293
|
+
}
|
|
294
|
+
function m() {
|
|
295
|
+
a(!0);
|
|
296
|
+
}
|
|
297
|
+
function p() {
|
|
298
|
+
a(!1);
|
|
299
|
+
}
|
|
300
|
+
function n() {
|
|
301
|
+
s.didMove = !1, document.addEventListener("pointermove", c), document.addEventListener("pointerup", h);
|
|
302
|
+
}
|
|
303
|
+
function i() {
|
|
304
|
+
document.removeEventListener("pointermove", c), document.removeEventListener("pointerup", h);
|
|
305
|
+
}
|
|
306
|
+
function c(y) {
|
|
307
|
+
let b = l.current;
|
|
308
|
+
if (s.canDrag && b) {
|
|
309
|
+
s.didMove = !0, e && p(), t.draggableDirection === "x" ? s.delta = y.clientX - s.start : s.delta = y.clientY - s.start, s.start !== y.clientX && (s.canCloseOnClick = !1);
|
|
310
|
+
let L = t.draggableDirection === "x" ? `${s.delta}px, var(--y)` : `0, calc(${s.delta}px + var(--y))`;
|
|
311
|
+
b.style.transform = `translate3d(${L},0)`, b.style.opacity = `${1 - Math.abs(s.delta / s.removalDistance)}`;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function h() {
|
|
315
|
+
i();
|
|
316
|
+
let y = l.current;
|
|
317
|
+
if (s.canDrag && s.didMove && y) {
|
|
318
|
+
if (s.canDrag = !1, Math.abs(s.delta) > s.removalDistance) {
|
|
319
|
+
r(!0), t.closeToast(!0), t.collapseAll();
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
y.style.transition = "transform 0.2s, opacity 0.2s", y.style.removeProperty("transform"), y.style.removeProperty("opacity");
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
let C = { onPointerDown: I, onPointerUp: v };
|
|
326
|
+
return d && f && (C.onMouseEnter = p, t.stacked || (C.onMouseLeave = m)), x && (C.onClick = (y) => {
|
|
327
|
+
_ && _(y), s.canCloseOnClick && u(!0);
|
|
328
|
+
}), { playToast: m, pauseToast: p, isRunning: e, preventExitTransition: o, toastRef: l, eventHandlers: C };
|
|
329
|
+
}
|
|
330
|
+
var At = typeof window < "u" ? at : H, q = ({ theme: t, type: e, isLoading: a, ...o }) => T.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: t === "colored" ? "currentColor" : `var(--toastify-icon-color-${e})`, ...o });
|
|
331
|
+
function Dt(t) {
|
|
332
|
+
return T.createElement(q, { ...t }, T.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
|
|
333
|
+
}
|
|
334
|
+
function Rt(t) {
|
|
335
|
+
return T.createElement(q, { ...t }, T.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
|
|
336
|
+
}
|
|
337
|
+
function Mt(t) {
|
|
338
|
+
return T.createElement(q, { ...t }, T.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
|
|
339
|
+
}
|
|
340
|
+
function Bt(t) {
|
|
341
|
+
return T.createElement(q, { ...t }, T.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
|
|
342
|
+
}
|
|
343
|
+
function St() {
|
|
344
|
+
return T.createElement("div", { className: "Toastify__spinner" });
|
|
345
|
+
}
|
|
346
|
+
var G = { info: Rt, warning: Dt, success: Mt, error: Bt, spinner: St }, Xt = (t) => t in G;
|
|
347
|
+
function Ht({ theme: t, type: e, isLoading: a, icon: o }) {
|
|
348
|
+
let r = null, l = { theme: t, type: e };
|
|
349
|
+
return o === !1 || (z(o) ? r = o({ ...l, isLoading: a }) : U(o) ? r = Z(o, l) : a ? r = G.spinner() : Xt(e) && (r = G[e](l))), r;
|
|
350
|
+
}
|
|
351
|
+
var Ut = (t) => {
|
|
352
|
+
let { isRunning: e, preventExitTransition: a, toastRef: o, eventHandlers: r, playToast: l } = Nt(t), { closeButton: s, children: d, autoClose: f, onClick: u, type: _, hideProgressBar: x, closeToast: E, transition: k, position: I, className: v, style: m, progressClassName: p, updateId: n, role: i, progress: c, rtl: h, toastId: C, deleteToast: y, isIn: b, isLoading: L, closeOnClick: P, theme: O, ariaLabel: $ } = t, S = N("Toastify__toast", `Toastify__toast-theme--${O}`, `Toastify__toast--${_}`, { "Toastify__toast--rtl": h }, { "Toastify__toast--close-on-click": P }), ct = z(v) ? v({ rtl: h, position: I, type: _, defaultClassName: S }) : N(S, v), J = Ht(t), tt = !!c || !f, K = { closeToast: E, type: _, theme: O }, X = null;
|
|
353
|
+
return s === !1 || (z(s) ? X = s(K) : U(s) ? X = Z(s, K) : X = gt(K)), T.createElement(k, { isIn: b, done: y, position: I, preventExitTransition: a, nodeRef: o, playToast: l }, T.createElement("div", { id: C, tabIndex: 0, onClick: u, "data-in": b, className: ct, ...r, style: m, ref: o, ...b && { role: i, "aria-label": $ } }, J != null && T.createElement("div", { className: N("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !L }) }, J), st(d, t, !e), X, !t.customProgressBar && T.createElement(bt, { ...n && !tt ? { key: `p-${n}` } : {}, rtl: h, theme: O, delay: f, isRunning: e, isIn: b, closeToast: E, hide: x, type: _, className: p, controlledProgress: tt, progress: c || 0 })));
|
|
354
|
+
}, Ft = (t, e = !1) => ({ enter: `Toastify--animate Toastify__${t}-enter`, exit: `Toastify--animate Toastify__${t}-exit`, appendPosition: e }), Yt = _t(Ft("bounce", !0)), qt = { position: "top-right", transition: Yt, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light", "aria-label": "Notifications Alt+T", hotKeys: (t) => t.altKey && t.code === "KeyT" };
|
|
355
|
+
function Qt(t) {
|
|
356
|
+
let e = { ...qt, ...t }, a = t.stacked, [o, r] = Q(!0), l = D(null), { getToastToRender: s, isToastActive: d, count: f } = $t(e), { className: u, style: _, rtl: x, containerId: E, hotKeys: k } = e;
|
|
357
|
+
function I(m) {
|
|
358
|
+
let p = N("Toastify__toast-container", `Toastify__toast-container--${m}`, { "Toastify__toast-container--rtl": x });
|
|
359
|
+
return z(u) ? u({ position: m, rtl: x, defaultClassName: p }) : N(p, j(u));
|
|
360
|
+
}
|
|
361
|
+
function v() {
|
|
362
|
+
a && (r(!0), g.play());
|
|
363
|
+
}
|
|
364
|
+
return At(() => {
|
|
365
|
+
var m;
|
|
366
|
+
if (a) {
|
|
367
|
+
let p = l.current.querySelectorAll('[data-in="true"]'), n = 12, i = (m = e.position) == null ? void 0 : m.includes("top"), c = 0, h = 0;
|
|
368
|
+
Array.from(p).reverse().forEach((C, y) => {
|
|
369
|
+
let b = C;
|
|
370
|
+
b.classList.add("Toastify__toast--stacked"), y > 0 && (b.dataset.collapsed = `${o}`), b.dataset.pos || (b.dataset.pos = i ? "top" : "bot");
|
|
371
|
+
let L = c * (o ? 0.2 : 1) + (o ? 0 : n * y);
|
|
372
|
+
b.style.setProperty("--y", `${i ? L : L * -1}px`), b.style.setProperty("--g", `${n}`), b.style.setProperty("--s", `${1 - (o ? h : 0)}`), c += b.offsetHeight, h += 0.025;
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}, [o, f, a]), H(() => {
|
|
376
|
+
function m(p) {
|
|
377
|
+
var n;
|
|
378
|
+
let i = l.current;
|
|
379
|
+
k(p) && ((n = i.querySelector('[tabIndex="0"]')) == null || n.focus(), r(!1), g.pause()), p.key === "Escape" && (document.activeElement === i || i != null && i.contains(document.activeElement)) && (r(!0), g.play());
|
|
380
|
+
}
|
|
381
|
+
return document.addEventListener("keydown", m), () => {
|
|
382
|
+
document.removeEventListener("keydown", m);
|
|
383
|
+
};
|
|
384
|
+
}, [k]), T.createElement("section", { ref: l, className: "Toastify", id: E, onMouseEnter: () => {
|
|
385
|
+
a && (r(!1), g.pause());
|
|
386
|
+
}, onMouseLeave: v, "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text", "aria-label": e["aria-label"] }, s((m, p) => {
|
|
387
|
+
let n = p.length ? { ..._ } : { ..._, pointerEvents: "none" };
|
|
388
|
+
return T.createElement("div", { tabIndex: -1, className: I(m), "data-stacked": a, style: n, key: `c-${m}` }, p.map(({ content: i, props: c }) => T.createElement(Ut, { ...c, stacked: a, collapseAll: v, isIn: d(c.toastId, c.containerId), key: `t-${c.key}` }, i)));
|
|
389
|
+
}));
|
|
390
|
+
}
|
|
391
|
+
export {
|
|
392
|
+
Qt as L,
|
|
393
|
+
g as y
|
|
394
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface WebSocketMessageHandler {
|
|
3
|
+
message: string;
|
|
4
|
+
action: (data: any) => void;
|
|
5
|
+
}
|
|
6
|
+
interface WebSocketManagerProps {
|
|
7
|
+
urlWs: string;
|
|
8
|
+
handlers: WebSocketMessageHandler[];
|
|
9
|
+
socketKey: string;
|
|
10
|
+
onGeneralFetch?: (showLoading?: boolean) => void;
|
|
11
|
+
autoReconnect?: boolean;
|
|
12
|
+
maxReconnectAttempts?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const WebSocketManager: React.FC<WebSocketManagerProps>;
|
|
15
|
+
export { WebSocketManager };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type WebSocketStatus = "connecting" | "connected" | "disconnected" | "error";
|
|
3
|
+
interface WebSocketContextType {
|
|
4
|
+
sockets: Record<string, WebSocket>;
|
|
5
|
+
statuses: Record<string, WebSocketStatus>;
|
|
6
|
+
setSocket: (key: string, socket: WebSocket) => void;
|
|
7
|
+
setStatus: (key: string, status: WebSocketStatus) => void;
|
|
8
|
+
removeSocket: (key: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const WebSocketProvider: ({ children }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const useWebSocketContext: () => WebSocketContextType;
|
|
14
|
+
export {};
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -2,3 +2,6 @@ export { AuthProvider } from './auth/contexts/AuthContex.js';
|
|
|
2
2
|
export { ProtectedRoute } from './utils/components/ProtectedRoute.js';
|
|
3
3
|
export { UserRoute } from './utils/components/UserRoute.js';
|
|
4
4
|
export { UnpHistorico } from './utils/unp-historico/UnpHistorico.js';
|
|
5
|
+
export { WebSocketProvider } from './utils/websocket-manager/WebSocketProvider.js';
|
|
6
|
+
export { useWebSocket } from './utils/websocket-manager/useWebSocket.js';
|
|
7
|
+
export { WebSocketManager } from './utils/websocket-manager/WebSocketManager.js';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as b, useCallback as W, useEffect as j } from "react";
|
|
3
|
+
import { L as k } from "../../index-Cs6Q8pv4.js";
|
|
4
|
+
import { useWebSocketContext as C } from "./WebSocketProvider.js";
|
|
5
|
+
import '../../assets/WebSocketManager.css';const L = ({
|
|
6
|
+
urlWs: l,
|
|
7
|
+
handlers: i,
|
|
8
|
+
socketKey: r,
|
|
9
|
+
onGeneralFetch: a,
|
|
10
|
+
autoReconnect: m = !0,
|
|
11
|
+
maxReconnectAttempts: d = 5
|
|
12
|
+
}) => {
|
|
13
|
+
const e = b(null), c = b(0), { setSocket: f, setStatus: t, removeSocket: s } = C(), u = W(() => {
|
|
14
|
+
e.current && e.current.close(), console.log(`Conectando WebSocket: ${r}`), t(r, "connecting"), e.current = new WebSocket(l), e.current.onopen = () => {
|
|
15
|
+
console.log("WebSocket conectado."), c.current = 0, f(r, e.current), t(r, "connected");
|
|
16
|
+
}, e.current.onmessage = (n) => {
|
|
17
|
+
console.log("Mensaje recibido:", n.data);
|
|
18
|
+
try {
|
|
19
|
+
const o = JSON.parse(n.data), S = i.find((g) => g.message === o.message);
|
|
20
|
+
S ? S.action(o) : console.warn("No se encontró handler para el mensaje:", o.message), a && a();
|
|
21
|
+
} catch (o) {
|
|
22
|
+
console.error("Error procesando mensaje WebSocket:", o);
|
|
23
|
+
}
|
|
24
|
+
}, e.current.onclose = () => {
|
|
25
|
+
if (console.log("WebSocket cerrado."), t(r, "disconnected"), s(r), m && c.current < d) {
|
|
26
|
+
const n = Math.min(3e4, 1e3 * 2 ** c.current);
|
|
27
|
+
console.log(`Reintentando en ${n / 1e3}s...`), setTimeout(() => {
|
|
28
|
+
c.current += 1, u();
|
|
29
|
+
}, n);
|
|
30
|
+
}
|
|
31
|
+
}, e.current.onerror = (n) => {
|
|
32
|
+
var o;
|
|
33
|
+
console.error("Error en WebSocket:", n), t(r, "error"), (o = e.current) == null || o.close();
|
|
34
|
+
};
|
|
35
|
+
}, [l, i, r, a, m, d, f, t, s]);
|
|
36
|
+
return j(() => (u(), () => {
|
|
37
|
+
e.current && (e.current.close(), s(r));
|
|
38
|
+
}), [u, r, s]), /* @__PURE__ */ p(k, {});
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
L as WebSocketManager
|
|
42
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as b, useState as r, useContext as m } from "react";
|
|
3
|
+
const u = b(void 0), W = ({ children: s }) => {
|
|
4
|
+
const [S, n] = r({}), [i, c] = r({}), d = (e, t) => {
|
|
5
|
+
n((o) => ({ ...o, [e]: t }));
|
|
6
|
+
}, k = (e, t) => {
|
|
7
|
+
c((o) => ({ ...o, [e]: t }));
|
|
8
|
+
}, x = (e) => {
|
|
9
|
+
n((t) => {
|
|
10
|
+
const o = { ...t };
|
|
11
|
+
return delete o[e], o;
|
|
12
|
+
}), c((t) => ({ ...t, [e]: "disconnected" }));
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ a(u.Provider, { value: { sockets: S, statuses: i, setSocket: d, setStatus: k, removeSocket: x }, children: s });
|
|
15
|
+
}, f = () => {
|
|
16
|
+
const s = m(u);
|
|
17
|
+
if (!s)
|
|
18
|
+
throw new Error("useWebSocketContext must be used within a WebSocketProvider");
|
|
19
|
+
return s;
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
W as WebSocketProvider,
|
|
23
|
+
f as useWebSocketContext
|
|
24
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { AuthProvider as
|
|
1
|
+
import { AuthProvider as r } from "./auth/contexts/AuthContex.js";
|
|
2
2
|
import { ProtectedRoute as p } from "./utils/components/ProtectedRoute.js";
|
|
3
3
|
import { UserRoute as m } from "./utils/components/UserRoute.js";
|
|
4
|
-
import { UnpHistorico as
|
|
4
|
+
import { UnpHistorico as c } from "./utils/unp-historico/UnpHistorico.js";
|
|
5
|
+
import { WebSocketProvider as u } from "./utils/websocket-manager/WebSocketProvider.js";
|
|
6
|
+
import { useWebSocket as d } from "./utils/websocket-manager/useWebSocket.js";
|
|
7
|
+
import { WebSocketManager as s } from "./utils/websocket-manager/WebSocketManager.js";
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
r as AuthProvider,
|
|
7
10
|
p as ProtectedRoute,
|
|
8
|
-
|
|
9
|
-
m as UserRoute
|
|
11
|
+
c as UnpHistorico,
|
|
12
|
+
m as UserRoute,
|
|
13
|
+
s as WebSocketManager,
|
|
14
|
+
u as WebSocketProvider,
|
|
15
|
+
d as useWebSocket
|
|
10
16
|
};
|
package/package.json
CHANGED