1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CuSCYub7.js","assets/@dnd-kit-CvKD3808.js","assets/scheduler-CzFDRTuY.js","assets/formik-DVb7NHq2.js","assets/deepmerge-DhIoniG1.js","assets/lodash-es-dVqQl90_.js","assets/classnames-DQJUBwbq.js","assets/yup-Cc6wdN4a.js","assets/nanoclone-BAWie4i9.js","assets/lodash-DtqBWxdB.js","assets/property-expr-DEi1ZLzV.js","assets/toposort-wzUPxOnj.js","assets/clsx-B-dksMZM.js","assets/use-sync-external-store-0ltzHWXl.js","assets/@reduxjs-pdW1aPPJ.js","assets/redux-DITMfSWq.js","assets/immer-j6wo2d3h.js","assets/redux-thunk-ClJT1hhx.js","assets/@standard-schema-DjkmAgHD.js","assets/reselect-C27TLnWV.js","assets/async-mutex-CSJywVGb.js","assets/@remix-run-Cg-J7xM8.js","assets/qrcode-CGiDONbL.js","assets/encode-utf8-Cn5aGd7v.js","assets/dijkstrajs-D_NXgYpA.js","assets/webfontloader-CAANvh7m.js","assets/qr-scanner-B5J5GenG.js","assets/date-fns-kGJLxptz.js","assets/@babel-DzC3tTiF.js","assets/@popperjs-BQBsAJpH.js","assets/warning-ACeS3pyp.js","assets/next-qrcode-DxcFnElz.js","assets/cropperjs-CZP2odOl.js","assets/cropperjs-CwOW9WHn.css","assets/lodash.debounce-tlW2z3Hn.js","assets/@tanstack-xCou1saz.js","assets/decimal.js-CNRKZ6of.js","assets/uuid-Ch9TGLTe.js","assets/index-D5PxjJqz.css","assets/index-Lfd1QM11.js","assets/index-CHjkNwXS.css"])))=>i.map(i=>d[i]); 2import{r as i,a as Pr,R as E,b as Rp,d as Ap,g as md,e as Op,u as Fp,C as qp,f as Wp,h as Si,i as Vp,D as Hp,j as Up,S as Yp,v as Kp,s as Gp,K as zp,T as Zp,M as Qp}from"./@dnd-kit-CvKD3808.js";import{c as wr}from"./clsx-B-dksMZM.js";import{w as Xp}from"./use-sync-external-store-0ltzHWXl.js";import{u as Me}from"./formik-DVb7NHq2.js";import{c as Jp,b as e2,a as t2,s as Rn,Q as n2,d as r2,f as s2,e as Tc,g as o2,h as cs}from"./@reduxjs-pdW1aPPJ.js";import{c as a2}from"./reselect-C27TLnWV.js";import{M as i2}from"./async-mutex-CSJywVGb.js";import{c as l2}from"./redux-DITMfSWq.js";import{i as Lt,r as Yl,g as Kl,j as La,m as c2,A as d2,p as u2,s as uo,a as p2,c as m2,b as h2,E as f2,d as Mc,e as Dc}from"./@remix-run-Cg-J7xM8.js";import{c as Ie,a as ae,b as _s,d as Gl,e as bo,s as _2}from"./yup-Cc6wdN4a.js";import"./property-expr-DEi1ZLzV.js";import{c as L}from"./classnames-DQJUBwbq.js";import{b as hd}from"./qrcode-CGiDONbL.js";import{W as g2}from"./webfontloader-CAANvh7m.js";import{_ as fd,e as gl}from"./qr-scanner-B5J5GenG.js";import{g as ne,i as Jn,a as er,b as vl,c as Kn,d as v2,e as st,f as Pc,h as y2,j as Ua,s as jt,k as qr,l as os,m as yl,n as ds,o as b2,p as x2,q as cn,r as dn,t as ls,u as bl,v as yn,w as po,x as mo,y as Ea,z as xl,A as zl,B as Ni,C as C2,D as Ic,E as Bc,F as k2,G as w2,H as _d,I as Rc,J as fa,K as _a,L as j2,M as S2,N as gd,O as vd,P as N2,Q as L2,R as E2,S as $2,T as T2,U as M2,V as ho,W as D2,X as P2,Y as $a,Z as Ta,_ as Ma,$ as Ac,a0 as Oc,a1 as I2,a2 as yd}from"./date-fns-kGJLxptz.js";import{c as B2}from"./@popperjs-BQBsAJpH.js";import{w as R2}from"./warning-ACeS3pyp.js";import{i as Ya}from"./next-qrcode-DxcFnElz.js";import{d as A2}from"./lodash-DtqBWxdB.js";import{C as O2}from"./cropperjs-CZP2odOl.js";import{d as F2}from"./lodash.debounce-tlW2z3Hn.js";import{c as q2,a as W2,g as V2}from"./@tanstack-xCou1saz.js";import{D as Io}from"./decimal.js-CNRKZ6of.js";import{v as Li}from"./uuid-Ch9TGLTe.js";import"./scheduler-CzFDRTuY.js";import"./deepmerge-DhIoniG1.js";import"./lodash-es-dVqQl90_.js";import"./immer-j6wo2d3h.js";import"./redux-thunk-ClJT1hhx.js";import"./@standard-schema-DjkmAgHD.js";import"./nanoclone-BAWie4i9.js";import"./toposort-wzUPxOnj.js";import"./encode-utf8-Cn5aGd7v.js";import"./dijkstrajs-D_NXgYpA.js";import"./@babel-DzC3tTiF.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function o(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(r){if(r.ep)return;r.ep=!0;const a=o(r);fetch(r.href,a)}})();var bd={exports:{}},Ka={};/** 3 * @license React 4 * react-jsx-runtime.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var H2=i,U2=Symbol.for("react.element"),Y2=Symbol.for("react.fragment"),K2=Object.prototype.hasOwnProperty,G2=H2.__SECRET_INT
10ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,z2={key:!0,ref:!0,__self:!0,__source:!0};function xd(e,n,o){var s,r={},a=null,c=null;o!==void 0&&(a=""+o),n.key!==void 0&&(a=""+n.key),n.ref!==void 0&&(c=n.ref);for(s in n)K2.call(n,s)&&!z2.hasOwnProperty(s)&&(r[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps,n)r[s]===void 0&&(r[s]=n[s]);return{$$typeof:U2,type:e,key:a,ref:c,props:r,_owner:G2.current}}Ka.Fragment=Y2;Ka.jsx=xd;Ka.jsxs=xd;bd.exports=Ka;var t=bd.exports,Cd,Fc=Pr;Cd=Fc.createRoot,Fc.hydrateRoot;Object.groupBy===void 0&&(Object.groupBy=function(e,n){return Array.from(e).reduce((o,s,r)=>{const a=n(s,r);return o[a]||(o[a]=[]),o[a].push(s),o},{})});function Z2(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}Z2(`: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}
10.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}
10}.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`);var xo=e=>typeof e=="number"&&!isNaN(e),Lr=e=>typeof e=="string",kn=e=>typeof e=="function",Q2=e=>Lr(e)||xo(e),Cl=e=>Lr(e)||kn(e)?e:null,X2=(e,n)=>e===!1||xo(e)&&e>0?e:n,kl=e=>i.isValidElement(e)||Lr(e)||kn(e)||xo(e);function J2(e,n,o=300){let{scrollHeight:s,style:r}=e;requestAnimationFrame(()=>{r.minHeight="initial",r.height=s+"px",r.transition=`all ${o}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(n,o)})})}function e0({enter:e,exit:n,appendPosition:o=!1,collapse:s=!0,collapseDuration:r=300}){return function({children:a,position:c,preventExitTransition:l,done:d,nodeRef:u,isIn:p,playToast:m}){let h=o?`${e}--${c}`:e,f=o?`${n}--${c}`:n,_=i.useRef(0);return i.useLayoutEffect(()=>{let v=u.current,g=h.split(" "),C=y=>{y.target===u.current&&(m(),v.removeEventListener("animationend",C),v.removeEventListener("animationcancel",C),_.current===0&&y.type!=="animationcancel"&&v.classList.remove(...g))};v.classList.add(...g),v.addEventListener("animationend",C),v.addEventListener("animationcancel",C)},[]),i.useEffect(()=>{let v=u.current,g=()=>{v.removeEventListener("animationend",g),s?J2(v,d,r):d()};p||(l?g():(_.current=1,v.className+=` ${f}`,v.addEventListener("animationend",g)))},[p]),E.createElement(E.Fragment,null,a)}}function qc(e,n){return{content:kd(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:n}}function kd(e,n,o=!1){return i.isValidElement(e)&&!Lr(e.type)?i.cloneElement(e,{closeToast:n.closeToast,toastProps:n,data:n.data,isPaused:o}):kn(e)?e({closeToast:n.closeToast,toastProps:n,data:n.data,isPaused:o}):e}function t0({closeToast:e,theme:n,ariaLabel:o="close"}){return E.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:s=>{s.stopPropagation(),e(!0)},"aria-label":o},E.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},E.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"})))}function n0({delay:e,isRunning:n,closeToast:o,type:s="default",hide:r,className:a,controlledProgress:c,progress:l,rtl:d,isIn:u,theme:p}){let m=r||c&&l===0,h={animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};c&&(h.transform=`scaleX(${l})`);let f=wr("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":d}),_=kn(a)?a({rtl:d,type:s,defaultClassName:f}):wr(f,a),v={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{u&&o()}};return E.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},E.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${s}`}),E.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:_,style:h,...v}))}var r0=1,wd=()=>`${r0++}`;function s0(e,n,o){let s=1,r=0,a=[],c=[],l=n,d=new Map,u=new Set,p=y=>(u.add(y),()=>u.delete(y)),m=()=>{c=Array.from(d.values()),u.forEach(y=>y())},h=({containerId:y,toastId:b,updateId:x})=>{let N=y?y!==e:e!==1,S=d.has(b)&&x==null;return N||S},f=(y,b)=>{d.forEach(x=>{var N;(b==null||b===x.props.toastId)&&((N=x.toggle)==null||N.call(x,y))})},_=y=>{var b,x;(x=(b=y.props)==null?void 0:b.onClose)==null||x.call(b,y.removalReason),y.isActive=!1},v=y=>
vendor: 9,977 bytes, line 11
11{if(y==null)d.forEach(_);else{let b=d.get(y);b&&_(b)}m()},g=()=>{r-=a.length,a=[]},C=y=>{var b,x;let{toastId:N,updateId:S}=y.props,j=S==null;y.staleId&&d.delete(y.staleId),y.isActive=!0,d.set(N,y),m(),o(qc(y,j?"added":"updated")),j&&((x=(b=y.props).onOpen)==null||x.call(b))};return{id:e,props:l,observe:p,toggle:f,removeToast:v,toasts:d,clearQueue:g,buildToast:(y,b)=>{if(h(b))return;let{toastId:x,updateId:N,data:S,staleId:j,delay:$}=b,T=N==null;T&&r++;let M={...l,style:l.toastStyle,key:s++,...Object.fromEntries(Object.entries(b).filter(([B,I])=>I!=null)),toastId:x,updateId:N,data:S,isIn:!1,className:Cl(b.className||l.toastClassName),progressClassName:Cl(b.progressClassName||l.progressClassName),autoClose:b.isLoading?!1:X2(b.autoClose,l.autoClose),closeToast(B){d.get(x).removalReason=B,v(x)},deleteToast(){let B=d.get(x);if(B!=null){if(o(qc(B,"removed")),d.delete(x),r--,r<0&&(r=0),a.length>0){C(a.shift());return}m()}}};M.closeButton=l.closeButton,b.closeButton===!1||kl(b.closeButton)?M.closeButton=b.closeButton:b.closeButton===!0&&(M.closeButton=kl(l.closeButton)?l.closeButton:!0);let P={content:y,props:M,staleId:j};l.limit&&l.limit>0&&r>l.limit&&T?a.push(P):xo($)?setTimeout(()=>{C(P)},$):C(P)},setProps(y){l=y},setToggle:(y,b)=>{let x=d.get(y);x&&(x.toggle=b)},isToastActive:y=>{var b;return(b=d.get(y))==null?void 0:b.isActive},getSnapshot:()=>c}}var pt=new Map,fo=[],wl=new Set,o0=e=>wl.forEach(n=>n(e)),jd=()=>pt.size>0;function a0(){fo.forEach(e=>Nd(e.content,e.options)),fo=[]}var i0=(e,{containerId:n})=>{var o;return(o=pt.get(n||1))==null?void 0:o.toasts.get(e)};function Sd(e,n){var o;if(n)return!!((o=pt.get(n))!=null&&o.isToastActive(e));let s=!1;return pt.forEach(r=>{r.isToastActive(e)&&(s=!0)}),s}function l0(e){if(!jd()){fo=fo.filter(n=>e!=null&&n.options.toastId!==e);return}if(e==null||Q2(e))pt.forEach(n=>{n.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let n=pt.get(e.containerId);n?n.removeToast(e.id):pt.forEach(o=>{o.removeToast(e.id)})}}var c0=(e={})=>{pt.forEach(n=>{n.props.limit&&(!e.containerId||n.id===e.containerId)&&n.clearQueue()})};function Nd(e,n){kl(e)&&(jd()||fo.push({content:e,options:n}),pt.forEach(o=>{o.buildToast(e,n)}))}function d0(e){var n;(n=pt.get(e.containerId||1))==null||n.setToggle(e.id,e.fn)}function Ld(e,n){pt.forEach(o=>{(n==null||!(n!=null&&n.containerId)||(n==null?void 0:n.containerId)===o.id)&&o.toggle(e,n==null?void 0:n.id)})}function u0(e){let n=e.containerId||1;return{subscribe(o){let s=s0(n,e,o0);pt.set(n,s);let r=s.observe(o);return a0(),()=>{r(),pt.delete(n)}},setProps(o){var s;(s=pt.get(n))==null||s.setProps(o)},getSnapshot(){var o;return(o=pt.get(n))==null?void 0:o.getSnapshot()}}}function p0(e){return wl.add(e),()=>{wl.delete(e)}}function m0(e){return e&&(Lr(e.toastId)||xo(e.toastId))?e.toastId:wd()}function Co(e,n){return Nd(e,n),n.toastId}function Ga(e,n){return{...n,type:n&&n.type||e,toastId:m0(n)}}function za(e){return(n,o)=>Co(n,Ga(e,o))}function fe(e,n){return Co(e,Ga("default",n))}fe.loading=(e,n)=>Co(e,Ga("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...n}));function h0(e,{pending:n,error:o,success:s},r){let a;n&&(a=Lr(n)?fe.loading(n,r):fe.loading(n.render,{...r,...n}));let c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,p,m)=>{if(p==null){fe.dismiss(a);return}let h={type:u,...c,...r,data:m},f=Lr(p)?{render:p}:p;return a?fe.update(a,{...h,...f}):fe(f.render,{...h,...f}),m},d=kn(e)?e():e;return d.then(u=>l("success",s,u)).catch(u=>l("error",o,u)),d}fe.promise=h0;fe.success=za("success");fe.info=za("info");fe.error=za("error");fe.warning=za("warning");fe.warn=fe.warning;fe.dark=(e,n)=>Co(e,Ga("default",{theme:"dark",...n}));function f0(e){l0(e)}fe.dismiss=f0;fe.clearWaitingQueue=c0;fe.isActive=Sd;fe.update=(e,n={})=>{let o=i0(e,n);if(o){let{props:s,content:r}=o,a={delay:100,...s,...n,toastId:n.toastId||e,updateId:wd()};a.toastId!==e&&(a.staleId=e);let c=a.render||r;delete a.render,Co(c,a)}};fe.done=e=>{fe.update(e,{progress:1})};fe.onChange=p0;fe.play=e=>Ld(!0,e);fe.pause=e=>Ld(!1,e);function _0(e){var n;let{subscribe:o,getSnapshot:s,setProps:r}=i.useRef(u0(e)).current;r(e);let a=(n=i.useSyncExternalStore(o,s,s))==null?void 0:n.slice();function c(l){if(!a)return[];let d=new Map;return e.newestOnTop&&a.reverse(),a.forEach(u=>{let{position:p}=u.props;d.has(p)||d.set(p,[]),d.get(p).push(u)}),Array.from(d,u=>l(u[0],u[1]))}return{getToastToRender:c,isToastActive:Sd,count:a==null?void 0:a.length}}function g0(e){let[n,o]=i.useState(!1),[s,r]=i.useState(!1),a=i.useRef(null),c=i.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:d,closeToast:u,onClick:p,closeOnClick:m}=e;d0({id:e.toastId,containerId:e.containerId,fn:o}),i.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{f()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||C(),window.addEventListener("focus",g),window.addEventListener("blur",C)}function f(){window.removeEventListener("focus",g),window.removeEventListener("blur",C)}function _(j){if(e.draggable===!0||e.draggable===j.pointerType){y();let $=a.current;c.canCloseOnClick=!0,c.canDrag=!0,$.style.transition="none",e.draggableDirection==="x"?(c.start=j.clientX,c.removalDistance=$.offsetWidth*(e.draggablePercent/100)):(c.start=j.clientY,c.removalDistance=$.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function v(j){let{top:$,bottom:T,left:M,right:P}=a.current.getBoundingClientRect();j.nativeEvent.type!=="touchend"&&e.pauseOnHover&&j.clientX>=M&&j.clientX<=P&&j.clientY>=$&&j.clientY<=T?C():g()}function g(){o(!0)}function C(){o(!1)}function y(){c.didMove=!1,document.addEventListener("pointermove",x),document.addEventListener("pointerup",N)}function b(){document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",N)}function x(j){let $=a.current;if(c.canDrag&&$){c.didMove=!0,n&&C(),e.draggableDirection==="x"?c.delta=j.clientX-c.start:c.delta=j.clientY-c.start,c.start!==j.clientX&&(c.canCloseOnClick=!1);let T=e.draggableDirection==="x"?`${c.delta}px, var(--y)`:`0, calc(${c.delta}px + var(--y))`;$.style.transform=`translate3d(${T},0)`,$.style.opacity=`${1-Math.abs(c.delta/c.removalDistance)}`}}function N(){b();let j=a.current;if(c.canDrag&&c.didMove&&j){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance){r(!0),e.closeToast(!0),e.collapseAll();return}j.style.transition="transform 0.2s, opacity 0.2s",j.style.removeProperty("transform"),j.style.removeProperty("opacity")}}let S={onPointerDown:_,onPointerUp:v};return l&&d&&(S.onMouseEnter=C,e.stacked||(S.onMouseLeave=g)),m&&(S.onClick=j=>{p&&p(j),c.canCloseOnClick&&u(!0)}),{playToast:g,pauseToast:C,isRunning:n,preventExitTransition:s,toastRef:a,eventHandlers:S}}var v0=typeof window<"u"?i.useLayoutEffect:i.useEffect,Za=({theme:e,type:n,isLoading:o,...s})=>E.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...s});function y0(e){return E.createElement(Za,{...e},E.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"}))}function b0(e){return E.createElement(Za,{...e},E.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"}))}function x0(e){return E.createElement(Za,{...e},E.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"}))}function C0(e){return E.createElement(Za,{...e},E.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"}))}function k0(){return E.createElement("div",{className:"Toastify__spinner"})}var jl={info:b0,warning:y0,success:x0,error:C0,spinner:k0},w0=e=>e in jl;function j0({theme:e,type:n,isLoading:o,icon:s}){let r=null,a={theme:e,type:n};return s===!1||(kn(s)?r=s({...a,isLoading:o}):i.isValidElement(s)?r=i.cloneElement(s,a):o?r=jl.spinner():w0(n)&&(r=jl[n](a))),r}var S0=e=>{let{isRunning:n,preventExitTransition:o,toastRef:s,eventHandlers:r,playToast:a}=g0(e),{closeButton:c,children:l,autoClose:d,onClick:u,type:p,hideProgressBar:m,closeToast:h,transition:f,position:_,className:v,style:g,progressClassName:C,updateId:y,role:b,progress:x,rtl:N,toastId:S,deleteToast:j,isIn:$,isLoading:T,closeOnClick:M,theme:P,ariaLabel:B}=e,I=wr("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${p}`,{"Toastify__toast--rtl":N},{"Toastify__toast--close-on-click":M}),A=kn(v)?v({rtl:N,position:_,type:p,defaultClassName:I}):wr(I,v),W=j0(e),z=!!x||!d,G={closeToast:h,type:p,theme:P},K=null;return c===!1||(kn(c)?K=c(G):i.isValidElement(c)?K=i.cloneElement(c,G):K=t0(G)),E.createElement(f,{isIn:$,done:j,position:_,preventExitTransition:o,nodeRef:s,playToast:a},E.createElement("div",{id:S,tabIndex:0,onClick:u,"data-in":$,className:A,...r,style:g,ref:s,...$&&{role:b,"aria-label":B}},W!=null&&E.createElement("div",{className:wr("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter"
11:!T})},W),kd(l,e,!n),K,!e.customProgressBar&&E.createElement(n0,{...y&&!z?{key:`p-${y}`}:{},rtl:N,theme:P,delay:d,isRunning:n,isIn:$,closeToast:h,hide:m,type:p,className:C,controlledProgress:z,progress:x||0})))},N0=(e,n=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:n}),L0=e0(N0("bounce",!0)),E0={position:"top-right",transition:L0,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function $0(e){let n={...E0,...e},o=e.stacked,[s,r]=i.useState(!0),a=i.useRef(null),{getToastToRender:c,isToastActive:l,count:d}=_0(n),{className:u,style:p,rtl:m,containerId:h,hotKeys:f}=n;function _(g){let C=wr("Toastify__toast-container",`Toastify__toast-container--${g}`,{"Toastify__toast-container--rtl":m});return kn(u)?u({position:g,rtl:m,defaultClassName:C}):wr(C,Cl(u))}function v(){o&&(r(!0),fe.play())}return v0(()=>{var g;if(o){let C=a.current.querySelectorAll('[data-in="true"]'),y=12,b=(g=n.position)==null?void 0:g.includes("top"),x=0,N=0;Array.from(C).reverse().forEach((S,j)=>{let $=S;$.classList.add("Toastify__toast--stacked"),j>0&&($.dataset.collapsed=`${s}`),$.dataset.pos||($.dataset.pos=b?"top":"bot");let T=x*(s?.2:1)+(s?0:y*j);$.style.setProperty("--y",`${b?T:T*-1}px`),$.style.setProperty("--g",`${y}`),$.style.setProperty("--s",`${1-(s?N:0)}`),x+=$.offsetHeight,N+=.025})}},[s,d,o]),i.useEffect(()=>{function g(C){var y;let b=a.current;f(C)&&((y=b.querySelector('[tabIndex="0"]'))==null||y.focus(),r(!1),fe.pause()),C.key==="Escape"&&(document.activeElement===b||b!=null&&b.contains(document.activeElement))&&(r(!0),fe.play())}return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[f]),E.createElement("section",{ref:a,className:"Toastify",id:h,onMouseEnter:()=>{o&&(r(!1),fe.pause())},onMouseLeave:v,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":n["aria-label"]},c((g,C)=>{let y=C.length?{...p}:{...p,pointerEvents:"none"};return E.createElement("div",{tabIndex:-1,className:_(g),"data-stacked":o,style:y,key:`c-${g}`},C.map(({content:b,props:x})=>E.createElement(S0,{...x,stacked:o,collapseAll:v,isIn:l(x.toastId,x.containerId),key:`t-${x.key}`},b)))}))}var T0={};/*! ***************************************************************************** 12Copyright (c) Microsoft Corporation. 13 14Permission to use, copy, modify, and/or distribute this software for any 15purpose with or without fee is hereby granted. 16 17THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 18REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 19AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 20INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 21LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 22OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 23PERFORMANCE OF THIS SOFTWARE. 24***************************************************************************** */var Sl=function(){return Sl=Object.assign||function(e){for(var n,o=1,s=arguments.length;o<s;o++)for(var r in n=arguments[o])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},Sl.apply(this,arguments)},Nl,M0=function(e){var n;e?function(o){if(o)for(;o.lastChild;)o.lastChild.remove()}(typeof e=="string"?document.getElementById(e):e):(n=document.querySelector(".grecaptcha-badge"))&&n.parentNode&&document.body.removeChild(n.parentNode)},D0=function(e,n){M0(n),window.___grecaptcha_cfg=void 0;var o=document.querySelector("#"+e);o&&o.remove(),function(){var s=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]');s&&s.remove()}()},P0=function(e){var n=e.render,o=e.onLoadCallbackName,s=e.language,r=e.onLoad,a=e.useRecaptchaNet,c=e.useEnterprise,l=e.scriptProps,d=l===void 0?{}:l,u=d.nonce,p=u===void 0?"":u,m=d.defer,h=m!==void 0&&m,f=d.async,_=f!==void 0&&f,v=d.id,g=v===void 0?"":v,C=d.appendTo,y=g||"google-recaptcha-v3";if(function(N){return!!document.querySelector("#"+N)}(y))r();else{var b=function(N){return"https://www."+(N.useRecaptchaNet?"recaptcha.net":"google.com")+"/recaptcha/"+(N.useEnterprise?"enterprise.js":"api.js")}({useEnterprise:c,useRecaptchaNet:a}),x=document.createElement("script");x.id=y,x.src=b+"?render="+n+(n==="explicit"?"&onload="+o:"")+(s?"&hl="+s:""),p&&(x.nonce=p),x.defer=!!h,x.async=!!_,x.onload=r,(C==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(x)}},Ei=function(e){typeof process<"u"&&T0&&!1||console.warn(e)};(function(e){e.SCRIPT_NOT_AVAILABLE="Recaptcha script is not available"})(Nl||(Nl={}));
24var Zl=i.createContext({executeRecaptcha:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}});Zl.Consumer;function I0(e){var n=e.reCaptchaKey,o=e.useEnterprise,s=o!==void 0&&o,r=e.useRecaptchaNet,a=r!==void 0&&r,c=e.scriptProps,l=e.language,d=e.container,u=e.children,p=i.useState(null),m=p[0],h=p[1],f=i.useRef(n),_=JSON.stringify(c),v=JSON.stringify(d==null?void 0:d.parameters);i.useEffect(function(){if(n){var y=(c==null?void 0:c.id)||"google-recaptcha-v3",b=(c==null?void 0:c.onLoadCallbackName)||"onRecaptchaLoadCallback";return window[b]=function(){var x=s?window.grecaptcha.enterprise:window.grecaptcha,N=Sl({badge:"inline",size:"invisible",sitekey:n},(d==null?void 0:d.parameters)||{});f.current=x.render(d==null?void 0:d.element,N)},P0({render:d!=null&&d.element?"explicit":n,onLoadCallbackName:b,useEnterprise:s,useRecaptchaNet:a,scriptProps:c,language:l,onLoad:function(){if(window&&window.grecaptcha){var x=s?window.grecaptcha.enterprise:window.grecaptcha;x.ready(function(){h(x)})}else Ei("<GoogleRecaptchaProvider /> "+Nl.SCRIPT_NOT_AVAILABLE)},onError:function(){Ei("Error loading google recaptcha script")}}),function(){D0(y,d==null?void 0:d.element)}}Ei("<GoogleReCaptchaProvider /> recaptcha key not provided")},[s,a,_,v,l,n,d==null?void 0:d.element]);var g=i.useCallback(function(y){if(!m||!m.execute)throw new Error("<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded");return m.execute(f.current,{action:y})},[m,f]),C=i.useMemo(function(){return{executeRecaptcha:m?g:void 0,container:d==null?void 0:d.element}},[g,m,d==null?void 0:d.element]);return E.createElement(Zl.Provider,{value:C},u)}var B0=function(){return i.useContext(Zl)};function Ed(e,n){return e(n={exports:{}},n.exports),n.exports;/** @license React v16.13.1 25 * react-is.production.min.js 26 * 27 * Copyright (c) Facebook, Inc. and its affiliates. 28 * 29 * This source code is licensed under the MIT license found in the 30 * LICENSE file in the root directory of this source tree. 31 */}var Ve=typeof Symbol=="function"&&Symbol.for,Ll=Ve?Symbol.for("react.element"):60103,El=Ve?Symbol.for("react.portal"):60106,ga=Ve?Symbol.for("react.fragment"):60107,va=Ve?Symbol.for("react.strict_mode"):60108,ya=Ve?Symbol.for("react.profiler"):60114,ba=Ve?Symbol.for("react.provider"):60109,xa=Ve?Symbol.for("react.context"):60110,$l=Ve?Symbol.for("react.async_mode"):60111,Da=Ve?Symbol.for("react.concurrent_mode"):60111,Ca=Ve?Symbol.for("react.forward_ref"):60112,ka=Ve?Symbol.for("react.suspense"):60113,R0=Ve?Symbol.for("react.suspense_list"):60120,wa=Ve?Symbol.for("react.memo"):60115,ja=Ve?Symbol.for("react.lazy"):60116,A0=Ve?Symbol.for("react.block"):60121,O0=Ve?Symbol.for("react.fundamental"):60117,F0=Ve?Symbol.for("react.responder"):60118,q0=Ve?Symbol.for("react.scope"):60119;function wt(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case Ll:switch(e=e.type){case $l:case Da:case ga:case ya:case va:case ka:return e;default:switch(e=e&&e.$$typeof){case xa:case Ca:case ja:case wa:case ba:return e;default:return n}}case El:return n}}}function Wc(e){return wt(e)===Da}var W0={AsyncMode:$l,ConcurrentMode:Da,ContextConsumer:xa,ContextProvider:ba,Element:Ll,ForwardRef:Ca,Fragment:ga,Lazy:ja,Memo:wa,Portal:El,Profiler:ya,StrictMode:va,Suspense:ka,isAsyncMode:function(e){return Wc(e)||wt(e)===$l},isConcurrentMode:Wc,isContextConsumer:function(e){return wt(e)===xa},isContextProvider:function(e){return wt(e)===ba},isElement:function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ll},isForwardRef:function(e){return wt(e)===Ca},isFragment:function(e){return wt(e)===ga},isLazy:function(e){return wt(e)===ja},isMemo:function(e){return wt(e)===wa},isPortal:function(e){return wt(e)===El},isProfiler:function(e){return wt(e)===ya},isStrictMode:function(e){return wt(e)===va},isSuspense:function(e){return wt(e)===ka},isValidElementType:function(e){return typeof e=="string"||typeof e=="function"||e===ga||e===Da||e===ya||e===va||e===ka||e===R0||typeof e=="object"&&e!==null&&(e.$$typeof===ja||e.$$typeof===wa||e.$$typeof===ba||e.$$typeof===xa||e.$$typeof===Ca||e.$$typeof===O0||e.$$typeof===F0||e.$$typeof===q0||e.$$typeof===A0)},typeOf:wt},le=Ed(function(e,n){}),Vc=(le.AsyncMode,le.ConcurrentMode,le.ContextConsumer,le.ContextProvider,le.Element,le.ForwardRef,le.Fragment,le.Lazy,le.Memo,le.Portal,le.Profiler,le.StrictMode,le.Suspense,le.isAsyncMode,le.isConcurrentMode,le.isContextConsumer,le.isContextProvider,le.isElement,le.isForwardRef,le.isFragment,le.isLazy,le.isMemo,le.isPortal,le.isProfiler,le.isStrictMode,le.isSuspense,le.isValidElementType,le.typeOf,Ed(function(e){e.exports=W0})),V0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Hc={};Hc[Vc.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Hc[Vc.Memo]=V0;function H0(e){e()}let $d=H0;const U0=e=>$d=e,Y0=()=>$d,Uc=Symbol.for("react-redux-context"),Yc=typeof globalThis<"u"?globalThis:{};function K0(){var e;if(!i.createContext)return{};const n=(e=Yc[Uc])!=null?e:Yc[Uc]=new Map;let o=n.get(i.createContext);return o||(o=i.createContext(null),n.set(i.createContext,o)),o}const tr=K0();function Ql(e=tr){return function(){return i.useContext(e)}}const Td=Ql(),G0=()=>{throw new Error("uSES not initialized!")};let Md=G0;const z0=e=>{Md=e},Z0=(e,n)=>e===n;function Q0(e=tr){const n=e===tr?Td:Ql(e);return function(s,r={}){const{equalityFn:a=Z0,stabilityCheck:c=void 0,noopCheck:l=void 0}=typeof r=="function"?{equalityFn:r}:r,{store:d,subscription:u,getServerState:p,stabilityCheck:m,noopCheck:h}=n();i.useRef(!0);const f=i.useCallback({[s.name](v){return s(v)}}[s.name],[s,m,c]),_=Md(u.addNestedSub,d.getState,p||d.getState,f,a);return i.useDebugValue(_),_}}const Xl=Q0();var ue={};/** 32 * @license React 33 * react-is.production.min.js 34 * 35 * Copyright (c) Facebook, Inc. and its affiliates. 36 * 37 * This source code is licensed under the MIT license found in the 38 * LICENSE file in the root directory of this source tree. 39 */var Jl=Symbol.for("react.element"),ec=Symbol.for("react.portal"),Qa=Symbol.for("react.fragment"),Xa=Symbol.for("react.strict_mode"),Ja=Symbol.for("react.profiler"),ei=Symbol.for("react.provider"),ti=Symbol.for("react.context"),X0=Symbol.for("react.server_context"),ni=Symbol.for("react.forward_ref"),ri=Symbol.for("react.suspense"),si=Symbol.for("react.suspense_list"),oi=Symbol.for("react.memo"),ai=Symbol.for("react.lazy"),J0=Symbol.for("react.offscreen"),Dd;Dd=Symbol.for("react.module.reference");function It(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case Jl:switch(e=e.type,e){case Qa:case Ja:case Xa:case ri:case si:return e;default:switch(e=e&&e.$$typeof,e){case X0:case ti:case ni:case ai:case oi:case ei:return e;default:return n}}case ec:return n}}}ue.ContextConsumer=ti;ue.ContextProvider=ei;ue.Element=Jl;ue.ForwardRef=ni;ue.Fragment=Qa;ue.Lazy=ai;ue.Memo=oi;ue.Portal=ec;ue.Profiler=Ja;ue.StrictMode=Xa;ue.Suspense=ri;ue.SuspenseList=si;ue.isAsyncMode=function(){return!1};ue.isConcurrentMode=function(){return!1};ue.isContextConsumer=function(e){return It(e)===ti};ue.isContextProvider=function(e){return It(e)===ei};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jl};ue.isForwardRef=function(e){return It(e)===ni};ue.isFragment=function(e){return It(e)===Qa};ue.isLazy=function(e){return It(e)===ai};ue.isMemo=function(e){return It(e)===oi};ue.isPortal=function(e){return It(e)===ec};ue.isProfiler=function(e){return It(e)===Ja};ue.isStrictMode=function(e){return It(e)===Xa};ue.isSuspense=function(e){return It(e)===ri};ue.isSuspenseList=function(e){return It(e)===si};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Qa||e===Ja||e===Xa||e===ri||e===si||e===J0||typeof e=="object"&&e!==null&&(e.$$typeof===ai||e.$$typeof===oi||e.$$typeof===ei||e.$$typeof===ti||e.$$typeof===ni||e.$$typeof===Dd||e.getModuleId!==void 0)};ue.typeOf=It;function em(){const e=Y0();let n=null,o=null;return{clear(){n=null,o=null},notify(){e(()=>{let s=n;for(;s;)s.callback(),s=s.next})},get(){let s=[],r=n;for(;r;)s.push(r),r=r.next;return s},subscribe(s){let r=!0,a=o={callback:s,next:null,prev:o};return a.prev?a.prev.next=a:n=a,function(){!r||n===null||(r=!1,a.next?a.next.prev=a.prev:o=a.prev,a.prev?a.prev.next=a.next:n=a.next)}}}}const Kc={notify(){},get:()=>[]};function tm(e,n){let o,s=Kc,r=0,a=!1;function c(v){p();const g=s.subscribe(v);let C=!1;return()=>{C||(C=!0,g(),m())}}function l(){s.notify()}function d(){_.onStateChange&&_.onStateChange()}function u(){return a}function p(){r++,o||(o=e.subscribe(d),s=em())}function m(){r--,o&&r===0&&(o(),o=void 0,s.clear(),s=Kc)}function h(){a||(a=!0,p())}function f(){a&&(a=!1,m())}const _={addNestedSub:c,notifyNestedSubs:l,handleChangeWrapper:d,isSubscribed:u,trySubscribe:h,tryUnsubscribe:f,getListeners:()=>s};return _}const nm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rm=nm?i.useLayoutEffect:i.useEffect;function Gc(e,n){return e===n?e!==0||n!==0||1/e===1/n:e!==e&&n!==n}
39function ao(e,n){if(Gc(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;const o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(let r=0;r<o.length;r++)if(!Object.prototype.hasOwnProperty.call(n,o[r])||!Gc(e[o[r]],n[o[r]]))return!1;return!0}function sm({store:e,context:n,children:o,serverState:s,stabilityCheck:r="once",noopCheck:a="once"}){const c=i.useMemo(()=>{const u=tm(e);return{store:e,subscription:u,getServerState:s?()=>s:void 0,stabilityCheck:r,noopCheck:a}},[e,s,r,a]),l=i.useMemo(()=>e.getState(),[e]);rm(()=>{const{subscription:u}=c;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),l!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[c,l]);const d=n||tr;return i.createElement(d.Provider,{value:c},o)}function Pd(e=tr){const n=e===tr?Td:Ql(e);return function(){const{store:s}=n();return s}}const Id=Pd();function om(e=tr){const n=e===tr?Id:Pd(e);return function(){return n().dispatch}}const Bd=om();z0(Xp.useSyncExternalStoreWithSelector);U0(Pr.unstable_batchedUpdates);const am={isAuth:!1},Rd=Jp({name:"auth",initialState:am,reducers:{setAuth:(e,{payload:n})=>{e.isAuth=n}}}),{actions:_o}=Rd;function Bo(e){return e.replace(e[0],e[0].toUpperCase())}var im="query",lm="mutation",cm="infinitequery";function dm(e){return e.type===im}function um(e){return e.type===lm}function Ad(e){return e.type===cm}function $s(e,...n){return Object.assign(e,...n)}var $i=Symbol();function Ti(e){const n=i.useRef(e),o=i.useMemo(()=>r2(n.current,e),[e]);return i.useEffect(()=>{n.current!==o&&(n.current=o)},[o]),o}function Ro(e){const n=i.useRef(e);return i.useEffect(()=>{ao(n.current,e)||(n.current=e)},[e]),ao(n.current,e)?n.current:e}var pm=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mm=pm(),hm=()=>typeof navigator<"u"&&navigator.product==="ReactNative",fm=hm(),_m=()=>mm||fm?i.useLayoutEffect:i.useEffect,gm=_m(),zc=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:n2.pending}:e;function Mi(e,...n){const o={};return n.forEach(s=>{o[s]=e[s]}),o}var Di=["data","status","isLoading","isSuccess","isError","error"];function vm({api:e,moduleOptions:{batch:n,hooks:{useDispatch:o,useSelector:s,useStore:r},unstable__sideEffectsInRender:a,createSelector:c},serializeQueryArgs:l,context:d}){const u=a?S=>S():i.useEffect,p=S=>{var j,$;return($=(j=S.current)==null?void 0:j.unsubscribe)==null?void 0:$.call(j)},m=d.endpointDefinitions;return{buildQueryHooks:b,buildInfiniteQueryHooks:x,buildMutationHook:N,usePrefetch:_};function h(S,j,$){if(j!=null&&j.endpointName&&S.isUninitialized){const{endpointName:A}=j,W=m[A];$!==Rn&&l({queryArgs:j.originalArgs,endpointDefinition:W,endpointName:A})===l({queryArgs:$,endpointDefinition:W,endpointName:A})&&(j=void 0)}let T=S.isSuccess?S.data:j==null?void 0:j.data;T===void 0&&(T=S.data);const M=T!==void 0,P=S.isLoading,B=(!j||j.isLoading||j.isUninitialized)&&!M&&P,I=S.isSuccess||M&&(P&&!(j!=null&&j.isError)||S.isUninitialized);return{...S,data:T,currentData:S.data,isFetching:P,isLoading:B,isSuccess:I}}function f(S,j,$){if(j!=null&&j.endpointName&&S.isUninitialized){const{endpointName:A}=j,W=m[A];$!==Rn&&l({queryArgs:j.originalArgs,endpointDefinition:W,endpointName:A})===l({queryArgs:$,endpointDefinition:W,endpointName:A})&&(j=void 0)}let T=S.isSuccess?S.data:j==null?void 0:j.data;T===void 0&&(T=S.data);const M=T!==void 0,P=S.isLoading,B=(!j||j.isLoading||j.isUninitialized)&&!M&&P,I=S.isSuccess||P&&M;return{...S,data:T,currentData:S.data,isFetching:P,isLoading:B,isSuccess:I}}function _(S,j){const $=o(),T=Ro(j);return i.useCallback((M,P)=>$(e.util.prefetch(S,M,{...T,...P})),[S,$,T])}function v(S,j,{refetchOnReconnect:$,refetchOnFocus:T,refetchOnMountOrArgChange:M,skip:P=!1,pollingInterval:B=0,skipPollingIfUnfocused:I=!1,...A}={}){const{initiate:W}=e.endpoints[S],z=o(),G=i.useRef(void 0);if(!G.current){const Le=z(e.internalActions.internal_getRTKQSubscriptions());G.current=Le}const K=Ti(P?Rn:j),ee=Ro({refetchOnReconnect:$,refetchOnFocus:T,pollingInterval:B,skipPollingIfUnfocused:I}),ie=A.initialPageParam,U=Ro(ie),F=i.useRef(void 0);let{queryCacheKey:R,requestId:Y}=F.current||{},X=!1;R&&Y&&(X=G.current.isRequestSubscribed(R,Y));const Ne=!X&&F.current!==void 0;return u(()=>{Ne&&(F.current=void 0)},[Ne]),u(()=>{var Pn;const Le=F.current;if(typeof process<"u",K===Rn){Le==null||Le.unsubscribe(),F.current=void 0;return}const Be=(Pn=F.current)==null?void 0:Pn.subscriptionOptions;if(!Le||Le.arg!==K){Le==null||Le.unsubscribe();const Es=z(W(K,{subscriptionOptions:ee,forceRefetch:M,...Ad(m[S])?{initialPageParam:U}:{}}));F.current=Es}else ee!==Be&&Le.updateSubscriptionOptions(ee)},[z,W,M,K,ee,Ne,U,S]),[F,z,W,ee]}function g(S,j){return(T,{skip:M=!1,selectFromResult:P}={})=>{const{select:B}=e.endpoints[S],I=Ti(M?Rn:T),A=i.useRef(void 0),W=i.useMemo(()=>c([B(I),(ie,U)=>U,ie=>I],j,{memoizeOptions:{resultEqualityCheck:ao}}),[B,I]),z=i.useMemo(()=>P?c([W],P,{devModeChecks:{identityFunctionCheck:"never"}}):W,[W,P]),G=s(ie=>z(ie,A.current),ao),K=r(),ee=W(K.getState(),A.current);return gm(()=>{A.current=ee},[ee]),G}}function C(S){i.useEffect(()=>()=>{p(S),S.current=void 0},[S])}
39function y(S){if(!S.current)throw new Error(s2(38));return S.current.refetch()}function b(S){const j=(M,P={})=>{const[B]=v(S,M,P);return C(B),i.useMemo(()=>({refetch:()=>y(B)}),[B])},$=({refetchOnReconnect:M,refetchOnFocus:P,pollingInterval:B=0,skipPollingIfUnfocused:I=!1}={})=>{const{initiate:A}=e.endpoints[S],W=o(),[z,G]=i.useState($i),K=i.useRef(void 0),ee=Ro({refetchOnReconnect:M,refetchOnFocus:P,pollingInterval:B,skipPollingIfUnfocused:I});u(()=>{var Y,X;const R=(Y=K.current)==null?void 0:Y.subscriptionOptions;ee!==R&&((X=K.current)==null||X.updateSubscriptionOptions(ee))},[ee]);const ie=i.useRef(ee);u(()=>{ie.current=ee},[ee]);const U=i.useCallback(function(R,Y=!1){let X;return n(()=>{p(K),K.current=X=W(A(R,{subscriptionOptions:ie.current,forceRefetch:!Y})),G(R)}),X},[W,A]),F=i.useCallback(()=>{var R,Y;(R=K.current)!=null&&R.queryCacheKey&&W(e.internalActions.removeQueryResult({queryCacheKey:(Y=K.current)==null?void 0:Y.queryCacheKey}))},[W]);return i.useEffect(()=>()=>{p(K)},[]),i.useEffect(()=>{z!==$i&&!K.current&&U(z,!0)},[z,U]),i.useMemo(()=>[U,z,{reset:F}],[U,z,F])},T=g(S,h);return{useQueryState:T,useQuerySubscription:j,useLazyQuerySubscription:$,useLazyQuery(M){const[P,B,{reset:I}]=$(M),A=T(B,{...M,skip:B===$i}),W=i.useMemo(()=>({lastArg:B}),[B]);return i.useMemo(()=>[P,{...A,reset:I},W],[P,A,I,W])},useQuery(M,P){const B=j(M,P),I=T(M,{selectFromResult:M===Rn||P!=null&&P.skip?void 0:zc,...P}),A=Mi(I,...Di);return i.useDebugValue(A),i.useMemo(()=>({...I,...B}),[I,B])}}}function x(S){const j=(T,M={})=>{const[P,B,I,A]=v(S,T,M),W=i.useRef(A);u(()=>{W.current=A},[A]);const z=i.useCallback(function(ee,ie){let U;return n(()=>{p(P),P.current=U=B(I(ee,{subscriptionOptions:W.current,direction:ie}))}),U},[P,B,I]);C(P);const G=Ti(M.skip?Rn:T),K=i.useCallback(()=>y(P),[P]);return i.useMemo(()=>({trigger:z,refetch:K,fetchNextPage:()=>z(G,"forward"),fetchPreviousPage:()=>z(G,"backward")}),[K,z,G])},$=g(S,f);return{useInfiniteQueryState:$,useInfiniteQuerySubscription:j,useInfiniteQuery(T,M){const{refetch:P,fetchNextPage:B,fetchPreviousPage:I}=j(T,M),A=$(T,{selectFromResult:T===Rn||M!=null&&M.skip?void 0:zc,...M}),W=Mi(A,...Di,"hasNextPage","hasPreviousPage");return i.useDebugValue(W),i.useMemo(()=>({...A,fetchNextPage:B,fetchPreviousPage:I,refetch:P}),[A,B,I,P])}}}function N(S){return({selectFromResult:j,fixedCacheKey:$}={})=>{const{select:T,initiate:M}=e.endpoints[S],P=o(),[B,I]=i.useState();i.useEffect(()=>()=>{B!=null&&B.arg.fixedCacheKey||B==null||B.reset()},[B]);const A=i.useCallback(function(R){const Y=P(M(R,{fixedCacheKey:$}));return I(Y),Y},[P,M,$]),{requestId:W}=B||{},z=i.useMemo(()=>T({fixedCacheKey:$,requestId:B==null?void 0:B.requestId}),[$,B,T]),G=i.useMemo(()=>j?c([z],j):z,[j,z]),K=s(G,ao),ee=$==null?B==null?void 0:B.arg.originalArgs:void 0,ie=i.useCallback(()=>{n(()=>{B&&I(void 0),$&&P(e.internalActions.removeMutationResult({requestId:W,fixedCacheKey:$}))})},[P,$,B,W]),U=Mi(K,...Di,"endpointName");i.useDebugValue(U);const F=i.useMemo(()=>({...K,originalArgs:ee,reset:ie}),[K,ee,ie]);return i.useMemo(()=>[A,F],[A,F])}}}var ym=Symbol(),bm=({batch:e=Pr.unstable_batchedUpdates,hooks:n={useDispatch:Bd,useSelector:Xl,useStore:Id},createSelector:o=a2,unstable__sideEffectsInRender:s=!1,...r}={})=>({name:ym,init(a,{serializeQueryArgs:c},l){const d=a,{buildQueryHooks:u,buildInfiniteQueryHooks:p,buildMutationHook:m,usePrefetch:h}=vm({api:a,moduleOptions:{batch:e,hooks:n,unstable__sideEffectsInRender:s,createSelector:o},serializeQueryArgs:c,context:l});return $s(d,{usePrefetch:h}),$s(l,{batch:e}),{injectEndpoint(f,_){if(dm(_)){const{useQuery:v,useLazyQuery:g,useLazyQuerySubscription:C,useQueryState:y,useQuerySubscription:b}=u(f);$s(d.endpoints[f],{useQuery:v,useLazyQuery:g,useLazyQuerySubscription:C,useQueryState:y,useQuerySubscription:b}),a[`use${Bo(f)}Query`]=v,a[`useLazy${Bo(f)}Query`]=g}if(um(_)){const v=m(f);$s(d.endpoints[f],{useMutation:v}),a[`use${Bo(f)}Mutation`]=v}else if(Ad(_)){const{useInfiniteQuery:v,useInfiniteQuerySubscription:g,useInfiniteQueryState:C}=p(f);$s(d.endpoints[f],{useInfiniteQuery:v,useInfiniteQuerySubscription:g,useInfiniteQueryState:C}),a[`use${Bo(f)}InfiniteQuery`]=v}}}}}),Ir=e2(t2(),bm());const ko={resourcesUrl:"https://src.softnote.com",baseApiUrl:"https://api.tectum.io/",explorerApiUrl:"https://api.explorer.tectum.io/",feeApiUrl:"https://api.fee.softnote.com/",posUrl:"https://pos.softnote.com/",cashUrl:"https://softnote.cash/",appVersion:"5.0.0"},se={set(e,n){localStorage.setItem(e,JSON.stringify(n))},get(e){const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},remove(e){window.localStorage.removeItem(e)}};var re=(e=>(e.cryptocurrencySort="LSKeyCryptocurrencySort",e.mintingInfo="LSMintingInfo",e.isCookieAccepted="isCookieAccepted",e.feeRate="feeRate",e.browserId="browserId",e.hideZeroBalancesCrypto="hideZeroBalancesCrypto",e.hideZeroBalancesBills="hideZeroBalancesBills",e.passwordCodeSentTime="code_password_sent_time",e.twoFACodeSentTime="code_2fa_sent_time",e.tsEmailCodeSentTime="tsEmailCodeSentTime",e.ts2faCodeSentTime="ts2faCodeSentTime",e.accessToken="access_token",e.refreshToken="refresh_token",e.accessTokenExp="access_token_exp",e))(re||{});const tc=e=>{se.set(re.accessToken,e.accessToken),se.set(re.accessTokenExp,e.expires_in),se.set(re.refreshToken,e.refreshToken)},Od=()=>{se.remove(re.accessToken),se.remove(re.refreshToken),se.remove(re.accessTokenExp)},{baseApiUrl:Br,explorerApiUrl:xm,feeApiUrl:EF}=ko,Ao=new i2,Rr=e=>{const n={baseUrl:e,prepareHeaders(r){const a=se.get(re.accessToken);return a&&r.set("Authorization",a),r}},o=Tc(n);return async(r,a,c)=>{var d,u,p,m;await Ao.waitForUnlock();let l=await o(r,a,c);if(l.error&&(l.error.status===401||((d=l.error.data)==null?void 0:d.status_code)===401))if(Ao.isLocked()){if(await Ao.waitForUnlock(),!se.get(re.accessToken))return l;l=await o(r,a,c)}else{const h=await Ao.acquire();try{const f=se.get(re.refreshToken),_=await Tc({...n,baseUrl:Br+"passport"})({url:"/v1/token/refresh",method:"POST",body:{refreshToken:f}},a,c);(p=(u=_.data)==null?void 0:u.payload)!=null&&p.accessToken?(tc((m=_.data)==null?void 0:m.payload),l=await o(r,a,c)):(Od(),se.remove(re.passwordCodeSentTime),se.remove(re.twoFACodeSentTime),no.dispatch(_o.setAuth(!1)),no.dispatch(jn.util.resetApiState()),no.dispatch(us.util.resetApiState()),no.dispatch(wn.util.resetApiState()))}finally{h()}}return l}},wn=Ir({reducerPath:"softnoteApi",baseQuery:Rr(Br+"softnote"),endpoints:()=>({}),tagTypes:["Bills","XPortBalance","XPortBills","SoftnoteBalance","AvaliableSoftNotesForExport","MintHouse","EmitUserStack","EmitPoolStack"]}),jn=Ir({reducerPath:"passportApi",baseQuery:Rr(Br+"passport"),endpoints:()=>({}),tagTypes:["User","Operations","TransactionSecurity","ApiKey"]}),us=Ir({reducerPath:"cloudApi",baseQuery:Rr(Br+"cloud"),endpoints:()=>({}),tagTypes:["Balance"]}),Pa=Ir({reducerPath:"cashApi",baseQuery:Rr(Br+"softnote-cash"),endpoints:()=>({})}),Ia=Ir({reducerPath:"referralApi",baseQuery:Rr(Br+"referral"),endpoints:()=>({})}),Ba=Ir({reducerPath:"stakingApi",baseQuery:Rr(Br+"staking"),endpoints:()=>({}),tagTypes:["Staking"]}),Tl=Ir({reducerPath:"explorerApi",baseQuery:Rr(xm+"explorer"),endpoints:()=>({})}),Cm=l2({[wn.reducerPath]:wn.reducer,[jn.reducerPath]:jn.reducer,[us.reducerPath]:us.reducer,[Pa.reducerPath]:Pa.reducer,[Ia.reducerPath]:Ia.reducer,[Ba.reducerPath]:Ba.reducer,[Tl.reducerPath]:Tl.reducer,auth:Rd.reducer}),no=o2({reducer:Cm,middleware:e=>e().concat([jn.middleware,wn.middleware,us.middleware,Pa.middleware,Ia.middleware,Ba.middleware,Tl.middleware])}),En=Bd,nc=Xl,km=({children:e})=>t.jsx(I0,{reCaptchaKey:"6LcK94YkAAAAAGQ2T15Rd2gglRFJEXYbaoNnPn0o",children:t.jsx(sm,{store:no,children:e})});/** 40 * React Router v6.25.1 41 * 42 * Copyright (c) Remix Software Inc. 43 * 44 * This source code is licensed under the MIT license found in the 45 * LICENSE.md file in the root directory of this source tree. 46 * 47 * @license MIT 48 */function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])}return e},Ra.apply(this,arguments)}const wo=i.createContext(null),rc=i.createContext(null),$n=i.createContext(null),sc=i.createContext(null),hn=i.createContext({outlet:null,matches:[],isDataRoute:!1}),Fd=i.createContext(null);function wm(e,n){let{relative:o}=n===void 0?{}:n;gs()||Lt(!1);let{basename:s,navigator:r}=i.useContext($n),{hash:a,pathname:c,search:l}=ii(e,{relative:o}),d=c;return s!=="/"&&(d=c==="/"?s:La([s,c])),r.createHref({pathname:d,search:l,hash:a})}function gs(){return i.useContext(sc)!=null}function Fe(){return gs()||Lt(!1),i.useContext(sc).location}function qd(e){i.useContext($n).static||i.useLayoutEffect(e)}function Zt(){let{isDataRoute:e}=i.useContext(hn);return e?Rm():jm()}function jm(){gs()||Lt(!1);let e=i.useContext(wo),{basename:n,future:o,navigator:s}=i.useContext($n),{matches:r}=i.useContext(hn),{pathname:a}=Fe(),c=JSON.stringify(Kl(r,o.v7_relativeSplatPath)),l=i.useRef(!1);return qd(()=>{l.current=!0}),i.useCallback(function(u,p){if(p===void 0&&(p={}),!l.current)return;if(typeof u=="number"){s.go(u);return}let m=Yl(u,JSON.parse(c),a,p.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:La([n,m.pathname])),(p.replace?s.replace:s.push)(m,p.state,p)},[n,s,c,a,e])}const Sm=i.createContext(null);function Nm(e){let n=i.useContext(hn).outlet;return n&&i.createElement(Sm.Provider,{value:e},n)}function jo(){let{matches:e}=i.useContext(hn),n=e[e.length-1];return n?n.params:{}}function ii(e,n){let{relative:o}=n===void 0?{}:n,{future:s}=i.useContext($n),{matches:r}=i.useContext(hn),{pathname:a}=Fe(),c=JSON.stringify(Kl(r,s.v7_relativeSplatPath));return i.useMemo(()=>Yl(e,JSON.parse(c),a,o==="path"),[e,c,a,o])}function Lm(e,n,o,s){gs()||Lt(!1);let{navigator:r}=i.useContext($n),{matches:a}=i.useContext(hn),c=a[a.length-1],l=c?c.params:{};c&&c.pathname;let d=c?c.pathnameBase:"/";c&&c.route;let u=Fe(),p;p=u;let m=p.pathname||"/",h=m;if(d!=="/"){let v=d.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let f=c2(e,{pathname:h});return Dm(f&&f.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:La([d,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?d:La([d,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,o,s)}function Em(){let e=Hd(),n=p2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),o=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application
48Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},n),o?i.createElement("pre",{style:r},o):null,null)}const $m=i.createElement(Em,null);class Tm extends i.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,o){return o.location!==n.location||o.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:o.error,location:o.location,revalidation:n.revalidation||o.revalidation}}componentDidCatch(n,o){console.error("React Router caught the following error during render",n,o)}render(){return this.state.error!==void 0?i.createElement(hn.Provider,{value:this.props.routeContext},i.createElement(Fd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Mm(e){let{routeContext:n,match:o,children:s}=e,r=i.useContext(wo);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),i.createElement(hn.Provider,{value:n},s)}function Dm(e,n,o,s){var r;if(n===void 0&&(n=[]),o===void 0&&(o=null),s===void 0&&(s=null),e==null){var a;if((a=o)!=null&&a.errors)e=o.matches;else return null}let c=e,l=(r=o)==null?void 0:r.errors;if(l!=null){let p=c.findIndex(m=>m.route.id&&(l==null?void 0:l[m.route.id])!==void 0);p>=0||Lt(!1),c=c.slice(0,Math.min(c.length,p+1))}let d=!1,u=-1;if(o&&s&&s.v7_partialHydration)for(let p=0;p<c.length;p++){let m=c[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=p),m.route.id){let{loaderData:h,errors:f}=o,_=m.route.loader&&h[m.route.id]===void 0&&(!f||f[m.route.id]===void 0);if(m.route.lazy||_){d=!0,u>=0?c=c.slice(0,u+1):c=[c[0]];break}}}return c.reduceRight((p,m,h)=>{let f,_=!1,v=null,g=null;o&&(f=l&&m.route.id?l[m.route.id]:void 0,v=m.route.errorElement||$m,d&&(u<0&&h===0?(_=!0,g=null):u===h&&(_=!0,g=m.route.hydrateFallbackElement||null)));let C=n.concat(c.slice(0,h+1)),y=()=>{let b;return f?b=v:_?b=g:m.route.Component?b=i.createElement(m.route.Component,null):m.route.element?b=m.route.element:b=p,i.createElement(Mm,{match:m,routeContext:{outlet:p,matches:C,isDataRoute:o!=null},children:b})};return o&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?i.createElement(Tm,{location:o.location,revalidation:o.revalidation,component:v,error:f,children:y(),routeC
48ontext:{outlet:null,matches:C,isDataRoute:!0}}):y()},null)}var Wd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wd||{}),Aa=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Aa||{});function Pm(e){let n=i.useContext(wo);return n||Lt(!1),n}function Im(e){let n=i.useContext(rc);return n||Lt(!1),n}function Bm(e){let n=i.useContext(hn);return n||Lt(!1),n}function Vd(e){let n=Bm(),o=n.matches[n.matches.length-1];return o.route.id||Lt(!1),o.route.id}function Hd(){var e;let n=i.useContext(Fd),o=Im(Aa.UseRouteError),s=Vd(Aa.UseRouteError);return n!==void 0?n:(e=o.errors)==null?void 0:e[s]}function Rm(){let{router:e}=Pm(Wd.UseNavigateStable),n=Vd(Aa.UseNavigateStable),o=i.useRef(!1);return qd(()=>{o.current=!0}),i.useCallback(function(r,a){a===void 0&&(a={}),o.current&&(typeof r=="number"?e.navigate(r):e.navigate(r,Ra({fromRouteId:n},a)))},[e,n])}function as(e){let{to:n,replace:o,state:s,relative:r}=e;gs()||Lt(!1);let{future:a,static:c}=i.useContext($n),{matches:l}=i.useContext(hn),{pathname:d}=Fe(),u=Zt(),p=Yl(n,Kl(l,a.v7_relativeSplatPath),d,r==="path"),m=JSON.stringify(p);return i.useEffect(()=>u(JSON.parse(m),{replace:o,state:s,relative:r}),[u,m,r,o,s]),null}function vs(e){return Nm(e.context)}function Am(e){let{basename:n="/",children:o=null,location:s,navigationType:r=d2.Pop,navigator:a,static:c=!1,future:l}=e;gs()&&Lt(!1);let d=n.replace(/^\/*/,"/"),u=i.useMemo(()=>({basename:d,navigator:a,static:c,future:Ra({v7_relativeSplatPath:!1},l)}),[d,l,a,c]);typeof s=="string"&&(s=u2(s));let{pathname:p="/",search:m="",hash:h="",state:f=null,key:_="default"}=s,v=i.useMemo(()=>{let g=uo(p,d);return g==null?null:{location:{pathname:g,search:m,hash:h,state:f,key:_},navigationType:r}},[d,p,m,h,f,_,r]);return v==null?null:i.createElement($n.Provider,{value:u},i.createElement(sc.Provider,{children:o,value:v}))}new Promise(()=>{});function Om(e){let n={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(n,{element:i.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(n,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(n,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),n}/** 49 * React Router DOM v6.25.1 50 * 51 * Copyright (c) Remix Software Inc. 52 * 53 * This source code is licensed under the MIT license found in the 54 * LICENSE.md file in the root directory of this source tree. 55 * 56 * @license MIT 57 */function ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])}return e},ps.apply(this,arguments)}function Ud(e,n){if(e==null)return{};var o={},s=Object.keys(e),r,a;for(a=0;a<s.length;a++)r=s[a],!(n.indexOf(r)>=0)&&(o[r]=e[r]);return o}function Fm(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qm(e,n){return e.button===0&&(!n||n==="_self")&&!Fm(e)}function Ml(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,o)=>{let s=e[o];return n.concat(Array.isArray(s)?s.map(r=>[o,r]):[[o,s]])},[]))}function Wm(e,n){let o=Ml(e);return n&&n.forEach((s,r)=>{o.has(r)||n.getAll(r).forEach(a=>{o.append(r,a)})}),o}const Vm=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Hm=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Um="6";try{window.__reactRouterVersion=Um}catch{}function Ym(e,n){return m2({basename:void 0,future:ps({},void 0,{v7_prependBasename:!0}),history:h2({window:void 0}),hydrationData:Km(),routes:e,mapRouteProperties:Om,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function Km(){var e;let n=(e=window)==null?void 0:e.__staticRouterHydrationData;return n&&n.errors&&(n=ps({},n,{errors:Gm(n.errors)})),n}function Gm(e){if(!e)return null;let n=Object.entries(e),o={};for(let[s,r]of n)if(r&&r.__type==="RouteErrorResponse")o[s]=new f2(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let a=window[r.__subType];if(typeof a=="function")try{let c=new a(r.message);c.stack="",o[s]=c}catch{}}if(o[s]==null){let a=new Error(r.message);a.stack="",o[s]=a}}else o[s]=r;return o}const Yd=i.createContext({isTransitioning:!1}),zm=i.createContext(new Map),Zm="startTransition",Zc=Rp[Zm],Qm="flushSync",Qc=Ap[Qm];function Xm(e){Zc?Zc(e):e()}function Ts(e){Qc?Qc(e):e()}class Jm{constructor(){this.status="pending",this.promise=new Promise((n,o)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",n(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",o(s))}})}}function eh(e){let{fallbackElement:n,router:o,future:s}=e,[r,a]=i.useState(o.state),[c,l]=i.useState(),[d,u]=i.useState({isTransitioning:!1}),[p,m]=i.useState(),[h,f]=i.useState(),[_,v]=i.useState(),g=i.useRef(new Map),{v7_startTransition:C}=s||{},y=i.useCallback($=>{C?Xm($):$()},[C]),b=i.useCallback(($,T)=>{let{deletedFetchers:M,unstable_flushSync:P,unstable_viewTransitionOpts:B}=T;M.forEach(A=>
57g.current.delete(A)),$.fetchers.forEach((A,W)=>{A.data!==void 0&&g.current.set(W,A.data)});let I=o.window==null||o.window.document==null||typeof o.window.document.startViewTransition!="function";if(!B||I){P?Ts(()=>a($)):y(()=>a($));return}if(P){Ts(()=>{h&&(p&&p.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:B.currentLocation,nextLocation:B.nextLocation})});let A=o.window.document.startViewTransition(()=>{Ts(()=>a($))});A.finished.finally(()=>{Ts(()=>{m(void 0),f(void 0),l(void 0),u({isTransitioning:!1})})}),Ts(()=>f(A));return}h?(p&&p.resolve(),h.skipTransition(),v({state:$,currentLocation:B.currentLocation,nextLocation:B.nextLocation})):(l($),u({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}))},[o.window,h,p,g,y]);i.useLayoutEffect(()=>o.subscribe(b),[o,b]),i.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new Jm)},[d]),i.useEffect(()=>{if(p&&c&&o.window){let $=c,T=p.promise,M=o.window.document.startViewTransition(async()=>{y(()=>a($)),await T});M.finished.finally(()=>{m(void 0),f(void 0),l(void 0),u({isTransitioning:!1})}),f(M)}},[y,c,p,o.window]),i.useEffect(()=>{p&&c&&r.location.key===c.location.key&&p.resolve()},[p,h,r.location,c]),i.useEffect(()=>{!d.isTransitioning&&_&&(l(_.state),u({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]),i.useEffect(()=>{},[]);let x=i.useMemo(()=>({createHref:o.createHref,encodeLocation:o.encodeLocation,go:$=>o.navigate($),push:($,T,M)=>o.navigate($,{state:T,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:($,T,M)=>o.navigate($,{replace:!0,state:T,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[o]),N=o.basename||"/",S=i.useMemo(()=>({router:o,navigator:x,static:!1,basename:N}),[o,x,N]),j=i.useMemo(()=>({v7_relativeSplatPath:o.future.v7_relativeSplatPath}),[o.future.v7_relativeSplatPath]);return i.createElement(i.Fragment,null,i.createElement(wo.Provider,{value:S},i.createElement(rc.Provider,{value:r},i.createElement(zm.Provider,{value:g.current},i.createElement(Yd.Provider,{value:d},i.createElement(Am,{basename:N,location:r.location,navigationType:r.historyAction,navigator:x,future:j},r.initialized||o.future.v7_partialHydration?i.createElement(th,{routes:o.routes,future:o.future,state:r}):n))))),null)}const th=i.memo(nh);function nh(e){let{routes:n,future:o,state:s}=e;return Lm(n,void 0,s,o)}const rh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ge=i.forwardRef(function(n,o){let{onClick:s,relative:r,reloadDocument:a,replace:c,state:l,target:d,to:u,preventScrollReset:p,unstable_viewTransition:m}=n,h=Ud(n,Vm),{basename:f}=i.useContext($n),_,v=!1;if(typeof u=="string"&&sh.test(u)&&(_=u,rh))try{let b=new URL(window.location.href),x=u.startsWith("//")?new URL(b.protocol+u):new URL(u),N=uo(x.pathname,f);x.origin===b.origin&&N!=null?u=N+x.search+x.hash:v=!0}catch{}let g=wm(u,{relative:r}),C=ah(u,{replace:c,state:l,target:d,preventScrollReset:p,relative:r,unstable_viewTransition:m});function y(b){s&&s(b),b.defaultPrevented||C(b)}return i.createElement("a",ps({},h,{href:_||g,onClick:v||a?s:y,ref:o,target:d}))}),Er=i.forwardRef(function(n,o){let{"aria-current":s="page",caseSensitive:r=!1,className:a="",end:c=!1,style:l,to:d,unstable_viewTransition:u,children:p}=n,m=Ud(n,Hm),h=ii(d,{relative:m.relative}),f=Fe(),_=i.useContext(rc),{navigator:v,basename:g}=i.useContext($n),C=_!=null&&ih(h)&&u===!0,y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,b=f.pathname,x=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;r||(b=b.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=uo(x,g)||x);const N=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=b===y||!c&&b.startsWith(y)&&b.charAt(N)==="/",j=x!=null&&(x===y||!c&&x.startsWith(y)&&x.charAt(y.length)==="/"),$={isActive:S,isPending:j,isTransitioning:C},T=S?s:void 0,M;typeof a=="function"?M=a($):M=[a,S?"active":null,j?"pending":null,C?"transitioning":null].filter(
57Boolean).join(" ");let P=typeof l=="function"?l($):l;return i.createElement(ge,ps({},m,{"aria-current":T,className:M,ref:o,style:P,to:d,unstable_viewTransition:u}),typeof p=="function"?p($):p)});var Dl;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Dl||(Dl={}));var Xc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xc||(Xc={}));function oh(e){let n=i.useContext(wo);return n||Lt(!1),n}function ah(e,n){let{target:o,replace:s,state:r,preventScrollReset:a,relative:c,unstable_viewTransition:l}=n===void 0?{}:n,d=Zt(),u=Fe(),p=ii(e,{relative:c});return i.useCallback(m=>{if(qm(m,o)){m.preventDefault();let h=s!==void 0?s:Mc(u)===Mc(p);d(e,{replace:h,state:r,preventScrollReset:a,relative:c,unstable_viewTransition:l})}},[u,d,p,s,r,o,e,a,c,l])}function li(e){let n=i.useRef(Ml(e)),o=i.useRef(!1),s=Fe(),r=i.useMemo(()=>Wm(s.search,o.current?null:n.current),[s.search]),a=Zt(),c=i.useCallback((l,d)=>{const u=Ml(typeof l=="function"?l(r):l);o.current=!0,a("?"+u,d)},[a,r]);return[r,c]}function ih(e,n){n===void 0&&(n={});let o=i.useContext(Yd);o==null&&Lt(!1);let{basename:s}=oh(Dl.useViewTransitionState),r=ii(e,{relative:n.relative});if(!o.isTransitioning)return!1;let a=uo(o.currentLocation.pathname,s)||o.currentLocation.pathname,c=uo(o.nextLocation.pathname,s)||o.nextLocation.pathname;return Dc(r.pathname,c)!=null||Dc(r.pathname,a)!=null}var ro=(e=>(e[e.JustEmail=0]="JustEmail",e[e.Just2Fa=1]="Just2Fa",e[e.FullSecure=2]="FullSecure",e[e.NotSecure=3]="NotSecure",e))(ro||{}),$r=(e=>(e[e.internal=-1]="internal",e[e.email=0]="email",e[e.auth2FA=1]="auth2FA",e))($r||{}),yt=(e=>(e[e.none=0]="none",e[e.incomplete=1]="incomplete",e[e.waiting=2]="waiting",e[e.inreview=3]="inreview",e[e.approved=4]="approved",e[e.rejected=5]="rejected",e[e.blocked=6]="blocked",e))(yt||{}),oc=(e=>(e[e.outgoing=0]="outgoing",e[e.incoming=1]="incoming",e))(oc||{}),Pt=(e=>(e[e.pending=0]="pending",e[e.failed=-1]="failed",e[e.success=1]="success",e))(Pt||{}),ss=(e=>(e[e.SN_WALLET=0]="SN_WALLET",e[e.X_PORT=1]="X_PORT",e[e.MINT_HOUSE=2]="MINT_HOUSE",e[e.WALLET=3]="WALLET",e[e.EPOS=4]="EPOS",e))(ss||{}),Z=(e=>(e[e.EXPORT=0]="EXPORT",e[e.SEND=1]="SEND",e[e.MINT=2]="MINT",e[e.IMPORT=3]="IMPORT",e[e.FILL=4]="FILL",e[e.BURN=5]="BURN",e[e.ACCRUED=6]="ACCRUED",e[e.RECEIPT=7]="RECEIPT",e[e.MIGRATED_OUT=8]="MIGRATED_OUT",e[e.MIGRATED_IN=9]="MIGRATED_IN",e[e.SWAP_OUT=11]="SWAP_OUT",e[e.SWAP_IN=12]="SWAP_IN",e[e.EPOS_PAY=13]="EPOS_PAY",e[e.EPOS_RECEIVE=15]="EPOS_RECEIVE",e[e.WITHDRAW_STAKING=16]="WITHDRAW_STAKING",e[e.RECEIVE_STAKING=17]="RECEIVE_STAKING",e[e.WITHDRAW_REFERRER=18]="WITHDRAW_REFERRER",e[e.RECEIVE_REFERRER=19]="RECEIVE_REFERRER",e))(Z||{});function lh(e=11){return Math.random().toString(36).substring(2,e+2)}const Se=jn.injectEndpoints({endpoints:e=>({getUser:e.query({query:()=>({url:"/v1/user",method:"GET"}),transformResponse:n=>(n.payload.avatar+="?v="+lh(5),n),providesTags:[{type:"User"}]}),requestKey:e.query({query:()=>({url:"/v1/user/update",method:"GET"})}),updateUser:e.mutation({query:n=>({url:"/v1/user/update",method:"POST",body:n}),invalidatesTags:(n,o)=>o?[]:[{type:"User"}]}),getPrivateKey:e.query({query:n=>({url:"/v1/pk/ethereum",method:"POST",body:{password:n}})}),securityUpdate:e.mutation({query:n=>({url:"/v1/user/update",method:"POST",body:n}),invalidatesTags:[{type:"User"}]}),uploadAvatar:e.mutation({query:n=>({url:"/v1/avatar",method:"POST",body:n}),invalidatesTags:[{type:"User"}]}),deleteAvatar:e.mutation({query:()=>({url:"/v1/avatar/delete",method:"GET"}),invalidatesTags:[{type:"User"}]}),fetchIcons:e.query({query:()=>({url:"/v1/icons",method:"GET"})}),changeIcon:e.mutation({query:n=>({url:"/v1/icon",method:"POST",body:n}),invalidatesTags:[{type:"User"}]}),updateNotificationSettings:e.mutation({query:n=>({url:"/v1/user/notifications",method:"PUT",body:n}),invalidatesTags:[{type:"User"}],async onQueryStarted(n,{dispatch:o,queryFulfilled:s}){const r=o(Se.util.updateQueryData("getUser",void 0,a=>{a.payload.notifications={login:n.login!==void 0?n.login:a.payload.notifications.login,operations:n.operations!==void 0?n.operations:a.payload.notifications.operations,news:n.news!==void 0?n.news:a.payload.notifications.news}}));try{await s}catch{r.undo()}}}),updatePrivacySettings:e.mutation({query:n=>({url:"/v1/user/privacy",method:"PUT",body:n}),invalidatesTags:[{type:"User"}]}),support:e.query({query:n=>({url:"/v1/user/support",method:"POST",body:n})}),getOperations:e.query({query:n=>({url:"/v1/user/operations",params:n}),serializeQueryArgs:({queryArgs:n,endpointDefinition:o,endpointName:s})=>{const r={...n};return delete r.offset,cs({queryArgs:r,endpointDefinition:o,endpointName:s})},merge:(n,o,{arg:{offset:s}})=>{if(s===0){n.payload=o.payload;return}n.payload.operations.push(...o.payload.operations)},forceRefetch({currentArg:n,previousArg:o}){return n!==o},providesTags:["Operations"]}),getOperationById:e.query({query:({id:n})=>({url:`/v1/user/operations/${n}`,method:"GET"})}),userPromo:e.mutation({query:n=>({url:"/v1/promo/action",method:"POST",body:n}),invalidatesTags:(n,o)=>o?[]:[{type:"User"}]}),sendTransactionSecurityEmailCode:e.query({query:()=>({url:"/v1/transaction-security/email",method:"GET"})}),updateTransactionSecurityEmail:e.mutation({query:n=>({url:"/v1/transaction-security/email",method:"POST",body:n}),invalidatesTags:(n,o)=>o?[]:[{type:"User"}]}),sendTransactionSecurity2faCode:e.query({query:()=>({url:"/v1/transaction-security/2fa",method:"GET"})}),updateTransactionSecurity2fa:e.mutation({query:n=>({url:"/v1/transaction-security/2fa",method:"POST",body:n}),invalidatesTags:(n,o)=>o?[]:[{type:"User"}]}),createApiKey:e.mutation({query:n=>({url:"/v2/apikey/create",body:n||{},method:"POST"}),invalidatesTags:(n,o)=>o?[]:["User","ApiKey"]}),getApiKey:e.query({query:()=>({url:"/v2/apikey",method:"GET"}),providesTags:["ApiKey"]}),getReferrals:e.query({query:n=>({url:"/v1/referrals",method:"GET",params:n})})})}),ht=()=>{const e=nc(s=>s.auth.isAuth),{data:n,...o}=Se.useGetUserQuery(void 0,{skip:!e});return{user:n==null?void 0:n.payload,...o}},Jc=60;function So(e){const[n,o]=i.useState(()=>{try{const l=se.get(e);if(l===null)return 0;const d=Math.floor(Date.now()/1e3),u=l+Jc-d;return Math.max(0,u)}catch{return 0}}),s=i.useRef();i.useEffect(()=>()=>window.clearInterval(s.current),[]);const r=i.useCallback(()=>{s.current=window.setInterval(()=>{o(l=>l<=1?(clearInterval(s.current),se.remove(e),0):l-1)},1e3)},[e]),a=i.useCallback(()=>{const l=Math.floor(Date.now()/1e3);se.set(e,l),o(Jc),window.clearInterval(s.current),r()},[r,e]),c=i.useCallback(()=>{window.clearInterval(s.current),o(0),se.remove(e)},[e]);return i.useEffect(()=>{n>0&&(window.clearInterval(s.current),r())},[r,n]),[n,a,c]}const e1={0:"unknownErrorOccured",1:"success",816:"userNotFound",93:"authorizationError",110:"insufficientFunds",2221:"notEnoughETH",4441:"notEnoughFeesToCompleteTheTransaction",10001:"unableToSendEmail",10002:"incorrectCode",10003:"3FAEntry",10004:"recaptchaTokenFailed",10005:"2FAEntry",10006:"notAllRequiredFieldsWereAnswered",10007:"userWasNotInitializedAPersonalAccountBecauseThereWasAProblemWithPreviousAccount",10008:"incorrectQueryParameters",10009:"theCodeIsIncorrect",10010:"noDataFoundToProcessTheRequest",10011:"invalidAccessToken",10012:"expiredAccessToken",10013:"theAccessTokenWasObtainedFromDifferentIPAddress",10014:"accessTokenNotFound",10016:"allAttemptsToVerifyTheCodeHaveBeenExhausted",10018:"givenEmailHasAlreadyBeenUsed",10019:"emailConfirmationRequired",10020:"processingOf3FAWasUnsuccessful",10021:"userWasNotFoundInThe3FAService",10022:"insufficientFunds",10023:"authorizationIsControlledByMultiInput",10024:"userHasBeenBlockedByTheSystem",10027:"sendingToSelf",10030:"accessToRequestedDataIsDenied",10031:"incorrectPasswordUnableToRetrivePrivateKeyData",10032:"usernameIsUnavailable",10100:"temporaryCodeSent",10102:"accessDenied",10103:"confirmationCodeExpired",10104:"recaptchaVerificationFailed",10201:"temporaryAccountBlockAfterAllLoginAttempsWereExhausted",10202:"adminBlockOfActionUnderID1",10203:"adminBlockOfActionUnderID2",10209:"invalidLoginOrPassword",10211:"invalidLoginOrPassword",10216:"nameForbidden",10220:"passwordPatternNotMatch",20022:"lackOfFunds",20023:"transactonWasUnsuccessful",20024:"salesAreLimited",20025:"notEnoughFeesToCompleteTheTransaction",20027:"requestedAmountisovertheLimit",20029:"failedToCreatePool",20031:"fillingAmountMax",20032:"invalidValidatorFee",20033:"failedToObtainAddressForCreatingPool",20034:"failedToPerformFilling",20035:"failedToGetPoolReward",20036:"fillingAmountMin",20037:"poolNameAlreadyExists",20038:"poolNotFound",20039:"failedToObtainDataForPoolAction",20040:"unavailablePoolOperation",30001:"nonExistentTransaction",30002:"requestedAmountExceedsTheLimit",30003:"fillingNotComplete",30004:"mintingNotComplete",30005:"blueBillFillingLimit",30006:"fillingListEmpty",30007:"onlyWrappedBillsCanBeBurnt",30008:"burningListEmpty",30009:"incorrectBills",30010:"burningServiceError",30024:"invalidPasscode",30025:"unableToBurnThisCurrency",30026:"currencyOfCurrentNominalCanNotBeBurned",90907:"reachedTheAttemptLimit",91302:"eposInvalidData"},t1={unknownErrorOccured:"Unknown error occurred",success:"Success",userNotFound:"User not found",authorizationError:"Authorization error",insufficientFunds:"Insufficient funds",notEnoughETH:"Not enough
57ETH",notEnoughFeesToCompleteTheTransaction:"Not enough fees to complete the transaction",unableToSendEmail:"Unable to send email",incorrectCode:"Incorrect code","3FAEntry":"3FA entry",recaptchaTokenFailed:"Recaptcha token failed","2FAEntry":"2FA entry",notAllRequiredFieldsWereAnswered:"Not all required fields were answered",userWasNotInitializedAPersonalAccountBecauseThereWasAProblemWithPreviousAccount:"User was not initialized because there was a problem with the previous account",incorrectQueryParameters:"Incorrect query parameters",theCodeIsIncorrect:"The code is incorrect",noDataFoundToProcessTheRequest:"No data found to process the request",invalidAccessToken:"Invalid access token",expiredAccessToken:"Expired access token",theAccessTokenWasObtainedFromDifferentIPAddress:"The access token was obtained from a different IP address",accessTokenNotFound:"Access token not found",allAttemptsToVerifyTheCodeHaveBeenExhausted:"All attempts to verify the code have been exhausted",givenEmailHasAlreadyBeenUsed:"Given email has already been used",emailConfirmationRequired:"Email confirmation required",processingOf3FAWasUnsuccessful:"Processing of 3FA was unsuccessful",userWasNotFoundInThe3FAService:"User was not found in the 3FA service",authorizationIsControlledByMultiInput:"Authorization is controlled by multi input",userHasBeenBlockedByTheSystem:"User has been blocked by the system",sendingToSelf:"Sending to self is not allowed",accessToRequestedDataIsDenied:"Access to requested data is denied",incorrectPasswordUnableToRetrivePrivateKeyData:"Incorrect password; unable to retrieve private key data",usernameIsUnavailable:"Username is unavailable",temporaryCodeSent:"Temporary code sent",accessDenied:"Access denied",confirmationCodeExpired:"Confirmation code expired",recaptchaVerificationFailed:"Recaptcha verification failed",temporaryAccountBlockAfterAllLoginAttempsWereExhausted:"Temporary account block after all login attempts were exhausted",adminBlockOfActionUnderID1:"Admin block of action under ID 1",adminBlockOfActionUnderID2:"Admin block of action under ID 2",invalidLoginOrPassword:"Invalid login or password",nameForbidden:"Name is forbidden",passwordPatternNotMatch:"Password pattern does not match",lackOfFunds:"Lack of funds",transactonWasUnsuccessful:"Transaction was unsuccessful",salesAreLimited:"Sales are limited",requestedAmountisovertheLimit:"Requested amount is over the limit",failedToCreatePool:"Failed to create pool",fillingAmountMax:"Filling amount max",invalidValidatorFee:"Invalid validator fee",failedToObtainAddressForCreatingPool:"Failed to obtain address for creating pool",failedToPerformFilling:"Failed to perform filling",failedToGetPoolReward:"Failed to get pool reward",fillingAmountMin:"Filling amount min",poolNameAlreadyExists:"Pool name already exists",poolNotFound:"Pool not found",failedToObtainDataForPoolAction:"Failed to obtain data for pool action",unavailablePoolOperation:"Unavailable pool operation",nonExistentTransaction:"Non-existent transaction",requestedAmountExceedsTheLimit:"Requested amount exceeds the limit",fillingNotComplete:"Filling not complete",mintingNotComplete:"Minting not complete",blueBillFillingLimit:"Blue bill filling limit",fillingListEmpty:"Filling list empty",onlyWrappedBillsCanBeBurnt:"Only wrapped bills can be burnt",burningListEmpty:"Burning list empty",incorrectBills:"Incorrect bills",burningServiceError:"Burning service error",invalidPasscode:"Invalid passcode",unableToBurnThisCurrency:"Unable to burn this currency",currencyOfCurrentNominalCanNotBeBurned:"Currency of current nominal cannot be burned",reachedTheAttemptLimit:"Reached the attempt limit",eposInvalidData:"EPOS invalid data",defaultErrorMessage:"Something wrong. Try later"};function Q(e){const n=e;if(!n)return"";if("status"in n&&n.status===413)return"Payload Too Large";if("data"in n&&typeof n.data=="object"&&n.data){const o=n.data,s=o.status||o.errorCode;if(s&&s in e1)return n1(e1[s]);if(Array.isArray(o.errorMsgs)&&o.errorMsgs.length>0)return o.errorMsgs[0];if("message"in o)return o.message}return"message"in n&&n.message?n.message:n1("defaultErrorMessage")}function n1(e){return t1[e]||t1.defaultErrorMessage}const Kd=()=>Ie().shape({emailCode:ae().required().onlyNumbers().min(5),code:ae().required().onlyNumbers().min(6)}),ch="_loader_16wwh_1",dh="_rotate_16wwh_1",uh="_square_16wwh_6",ph="_square1_16wwh_1",mh="_square2_16wwh_1",hh="_square3_16wwh_1",fh="_square4_16wwh_1",Ms={loader:ch,rotate:dh,square:uh,square1:ph,square2:mh,square3:hh,square4:fh},_h=()=>t.jsxs("div",{className:Ms.loader,children:[t.jsx("div",{className:Ms.square}),t.jsx("div",{className:Ms.square}),t.jsx("div",{className:Ms.square}),t.jsx("div",{className:Ms.square})]}),gh="_primary_1qfaa_1",vh="_secondary_1qfaa_1",yh="_disabled_1qfaa_19",bh="_large_1qfaa_25",xh="_alternate_1qfaa_41",Pi={primary:gh,secondary:vh,disabled:yh,large:bh,alternate:xh},O=e=>{const{children:n,disabled:o,isLoading:s,onClick:r,variant:a="primary",size:c="medium",as:l,className:d,type:u="button",...p}=e,m=l||"button",h=m==="button",f=!!(o||s),_=g=>{if(f){g.preventDefault();return}r&&r()},v=s?t.jsx(_h,{}):n;return t.jsx(m,{...p,onClick:_,className:L(Pi[a],d,{[Pi.disabled]:f,[Pi.large]:c==="large"}),...h?{type:u,disabled:f}:{"aria-disabled":f||void 0},children:v})},Ch="_wrapper_cbwm6_1",kh="_loader_cbwm6_7",wh="_rotate_cbwm6_1",jh="_square_cbwm6_18",Sh="_square1_cbwm6_1",Nh="_square2_cbwm6_1",Lh="_square3_cbwm6_1",Eh="_square4_cbwm6_1",Wr={wrapper:Ch,loader:kh,rotate:wh,square:jh,square1:Sh,square2:Nh,square3:Lh,square4:Eh},Tn=({className:e})=>t.jsx("div",{className:L(Wr.wrapper,e),children:t.jsxs("div",{className:Wr.loader,children:[t.jsx("div",{className:Wr.square}),t.jsx("div",{className:Wr.square}),t.jsx("div",{className:Wr.square}),t.jsx("div",{className:Wr.square})]})}),$h=e=>i.createElement("svg",{viewBox:"0 0 35 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M22.4923 0.681601C22.0318 0.235035 21.4061 0 20.7686 0H9.8597C8.73812 0 7.75821 0.799119 7.5457 1.90378L6.67205 6.36945C6.61302 6.69849 6.86095 7.00404 7.20333 7.00404H8.79715C9.10411 7.00404 9.36385 6.79251 9.42288 6.48696L10.1549 2.7029H20.4026L15.1725 29.2853H4.92474L5.64492 25.6188C5.70395 25.2898 5.45602 24.9842 5.11364 24.9842H3.53162C3.22466 24.9842 2.96493 25.1957 2.90589 25.5013L2.18572 29.1913C2.03224 29.9669 2.28017 30.7543 2.84686 31.3184C3.2955 31.765 3.92122 32 4.55875 32H15.4676C16.5892 32 17.5691 31.2009 17.7816 30.0962L23.1416 2.80867C23.2951 2.03305 23.059 1.23393 22.4923 0.681601Z",fill:"#7384AA"}),i.createElement("path",{d:"M20.9333 31.9883H22.5271C22.8341 31.9883 23.0938 31.7767 23.1529 31.4712L29.2094 0.634594C29.2684 0.305545 29.0205 0 28.6781 0H27.0843C26.7773 0 26.5176 0.211531 26.4586 0.5170
5777L20.402 31.3537C20.343 31.6827 20.5909 31.9883 20.9333 31.9883Z",fill:"#7384AA"}),i.createElement("path",{d:"M26.5651 31.9883H28.159C28.4659 31.9883 28.7257 31.7767 28.7847 31.4712L34.853 0.634594C34.9121 0.305545 34.6641 0 34.3218 0H32.7279C32.421 0 32.1612 0.211531 32.1022 0.517077L26.0457 31.3654C25.9748 31.6827 26.2346 31.9883 26.5651 31.9883Z",fill:"#7384AA"}),i.createElement("path",{d:"M1.0535 19.0533C1.20218 18.5754 1.55953 18.2548 2.58101 18.2548C3.60248 18.2548 3.91503 18.5754 3.80334 19.0533L3.79034 19.112C3.62597 19.9456 4.20128 20.5327 5.22276 20.5327C6.30294 20.5327 7.03089 20.0278 7.20701 19.1355C7.39486 18.1726 6.89 17.6207 5.0349 16.9867C2.95672 16.2704 1.80609 14.9906 2.20529 12.9827C2.67494 10.5639 4.87052 9.13135 7.27745 9.13135C9.89572 9.13135 11.3164 10.7752 10.9524 12.5835C10.9524 12.5835 10.9149 12.7689 10.8641 12.924C10.7184 13.3685 10.3654 13.7224 9.34389 13.7224C8.32241 13.7224 8.04863 13.3819 8.14256 12.924L8.15803 12.83C8.28719 12.0786 7.81754 11.468 6.81955 11.468C5.83329 11.468 5.17579 11.9611 5.01142 12.7479C4.85878 13.5228 5.35191 14.2039 7.12482 14.8614C9.27344 15.6716 10.4476 16.7636 10.0131 18.9593C9.55523 21.296 7.62968 22.8694 4.78834 22.8694C1.99395 22.8694 0.655464 21.0376 1.0077 19.2294C1.02239 19.1559 1.0316 19.1162 1.0535 19.0533Z",fill:"#F7F8FA"})),Th="_loader_xfu4u_1",Mh="_glow_xfu4u_10",Dh="_glowPulse_xfu4u_1",Ph="_logo_xfu4u_18",Ih="_breathe_xfu4u_1",Bh="_markWave_xfu4u_1",Rh="_letterPulse_xfu4u_1",Ii={loader:Th,glow:Mh,glowPulse:Dh,logo:Ph,breathe:Ih,markWave:Bh,letterPulse:Rh},Ah=({className:e})=>t.jsxs("div",{className:L(Ii.loader,e),role:"status","aria-label":"Loading",children:[t.jsx("div",{className:Ii.glow,"aria-hidden":!0}),t.jsx($h,{className:Ii.logo,"aria-hidden":!0})]}),Oh=async e=>{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e);{const n=document.createElement("textarea");return n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",document.body.appendChild(n),n.focus(),n.select(),new Promise((o,s)=>{try{document.execCommand("copy")?o():s(new Error("Copy command failed"))}catch(r){s(r)}finally{n.remove()}})}},Fh=e=>i.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M13.3346 4.3335L6.0013 11.6668L2.66797 8.3335",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qh=e=>i.createElement("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("rect",{x:3.5,y:7,width:14,height:14,rx:3,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.5 3.87866C9.06202 3.31517 9.82548 2.99894 10.6213 3H18.5C20.1569 3 21.5 4.34315 21.5 6V13.8787C21.5011 14.6745 21.1848 15.438 20.6213 16",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Wh="_copyButton_pwto1_1",Vh="_icon_pwto1_10",Hh="_iconPrimary_pwto1_18",Uh="_iconCopied_pwto1_23",Yh="_primaryButton_pwto1_27",Vr={copyButton:Wh,icon:Vh,iconPrimary:Hh,iconCopied:Uh,primaryButton:Yh},Kh=3e3,it=e=>{const{value:n,onCopy:o,className:s,variant:r="default"}=e,[a,c]=i.useState(!1),l=async()=>{try{await Oh(String(n)),c(!0),o==null||o()}catch{c(!1)}};i.useEffect(()=>{if(!a)return;const p=setTimeout(()=>{c(!1)},Kh);return()=>clearTimeout(p)},[a]);const d=a?Fh:qh,u=a?"Copied":"Copy";return r==="primary"?t.jsx(O,{variant:"primary",className:L(Vr.primaryButton,s),onClick:l,"aria-label":u,children:t.jsx(d,{className:L(Vr.icon,Vr.iconPrimary),"aria-hidden":!0})}):t.jsx("button",{type:"button",className:L(Vr.copyButton,s),onClick:l,"aria-label":u,children:t.jsx(d,{className:L(Vr.icon,{[Vr.iconCopied]:a}),"aria-hidden":!0})})},ac=e=>i.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M4.99989 5.00012L15 15.0001",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0001 4.99997L5.00001 15",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Gh=e=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M12.0001 19C11.1581 19 10.3151 18.822 9.49609 18.505",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20.882 12.468C18.99 15.967 15.495 19 12 19",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.0781 8.92102C19.7691 9.73002 20.3831 10.612 20.8811 11.533C21.0381 11.824 21.0381 12.177 20.8811 12.468",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5 19L19 5",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.77406 14.227C8.54406 12.997 8.54406 11.002 9.77406 9.77199C11.0041 8.54199 12.9991 8.54199 14.2291 9.77199",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0437 6.956C15.4967 5.759 13.7478 5 11.9998 5C8.50475 5 5.00975 8.033 3.11775 11.533C2.96075 11.824 2.960
5775 12.177 3.11775 12.468C4.06375 14.217 5.40975 15.849 6.95575 17.045",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),zh=e=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11775 12.467C2.96075 12.176 2.96075 11.823 3.11775 11.532C5.00975 8.033 8.50475 5 11.9998 5C15.4948 5 18.9898 8.033 20.8818 11.533C21.0388 11.824 21.0388 12.177 20.8818 12.468C18.9898 15.967 15.4948 19 11.9998 19C8.50475 19 5.00975 15.967 3.11775 12.467Z",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.1213 9.87868C15.2929 11.0502 15.2929 12.9497 14.1213 14.1213C12.9497 15.2929 11.0502 15.2929 9.87868 14.1213C8.70711 12.9497 8.70711 11.0502 9.87868 9.87868C11.0502 8.70711 12.9497 8.70711 14.1213 9.87868",stroke:"white",strokeWidth:1.4286,strokeLinecap:"round",strokeLinejoin:"round"})),Zh=e=>i.createElement("svg",{viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M12.6696 11.6638L10.2613 9.2625C11.0383 8.27257 11.4599 7.05013 11.4583 5.79167C11.4583 4.67091 11.126 3.57532 10.5033 2.64344C9.88068 1.71156 8.99567 0.985248 7.96022 0.556352C6.92477 0.127455 5.78539 0.0152364 4.68616 0.233886C3.58694 0.452536 2.57723 0.992233 1.78473 1.78473C0.992234 2.57723 0.452536 3.58693 0.233886 4.68616C0.0152363 5.78538 0.127455 6.92476 0.556352 7.96021C0.985249 8.99566 1.71156 9.88067 2.64344 10.5033C3.57532 11.126 4.67091 11.4583 5.79168 11.4583C7.05014 11.4599 8.27258 11.0383 9.26251 10.2613L11.6638 12.6696C11.7296 12.736 11.808 12.7887 11.8943 12.8246C11.9806 12.8606 12.0732 12.8791 12.1667 12.8791C12.2602 12.8791 12.3528 12.8606 12.4391 12.8246C12.5254 12.7887 12.6038 12.736 12.6696 12.6696C12.736 12.6037 12.7887 12.5254 12.8246 12.4391C12.8606 12.3528 12.8791 12.2602 12.8791 12.1667C12.8791 12.0732 12.8606 11.9806 12.8246 11.8943C12.7887 11.8079 12.736 11.7296 12.6696 11.6638ZM1.54167 5.79167C1.54167 4.9511 1.79093 4.12941 2.25793 3.4305C2.72492 2.73159 3.38868 2.18685 4.16527 1.86518C4.94186 1.54351 5.79639 1.45934 6.62081 1.62333C7.44523 1.78732 8.20251 2.19209 8.79688 2.78647C9.39126 3.38084 9.79603 4.13812 9.96002 4.96254C10.124 5.78695 10.0398 6.64149 9.71817 7.41807C9.39649 8.19466 8.85176 8.85842 8.15285 9.32541C7.45394 9.79241 6.63225 10.0417 5.79168 10.0417C4.6645 10.0417 3.5835 9.5939 2.78647 8.79687C1.98944 7.99984 1.54167 6.91884 1.54167 5.79167Z",fill:"currentColor"})),Qh="_wrapper_jyreu_1",Xh="_input_jyreu_8",Jh="_label_jyreu_8",e3="_labelFullWidth_jyreu_9",t3="_inputWrapper_jyreu_28",n3="_buttons_jyreu_45",r3="_button_jyreu_45",s3="_inputWarning_jyreu_54",o3="_inputError_jyreu_57",a3="_inputLarge_jyreu_60",i3="_inputSearch_jyreu_64",l3="_error_jyreu_68",c3="_warning_jyreu_69",d3="_header_jyreu_85",u3="_limit_jyreu_104",p3="_limitTyping_jyreu_109",m3="_limitMax_jyreu_112",h3="_limitMaxGreen_jyreu_115",f3="_search_jyreu_129",_3="_buttonPassword_jyreu_158",g3="_copyButton_jyreu_163",Ee={wrapper:Qh,input:Xh,label:Jh,labelFullWidth:e3,inputWrapper:t3,buttons:n3,button:r3,inputWarning:s3,inputError:o3,inputLarge:a3,inputSearch:i3,error:l3,warning:c3,header:d3,limit:u3,limitTyping:p3,limitMax:m3,limitMaxGreen:h3,search:f3,buttonPassword:_3,copyButton:g3},J=e=>{const{value:n,onChange:o,handleClear:s,error:r,warning:a,type:c,label:l,placeholder:d,limit:u,disabled:p,className:m,readOnly:h,onFocus:f,onBlur:_,style:v,onKeyDown:g,id:C,name:y,showPassword:b,max:x,min:N,isSearch:S,autoComplete:j,limitGreen:$,withCopy:T,onCopy:M,controlButtons:P,size:B="medium"}=e,[I,A]=i.useState(!1),W=()=>{A(F=>!F)},z=b?I?"text":"password":c,G=()=>{o&&o({target:{value:""}})},K=i.useRef(null),ee=16,[ie,U]=i.useState(ee);return i.useEffect(()=>{const F=Y=>{for(const X of Y){const{width:Ne}=X.contentRect;Ne>0?U(Ne):U(ee)}},R=new ResizeObserver(F);return K.current&&R.observe(K.current),()=>R.disconnect()},[]),t.jsxs("div",{className:L(Ee.wrapper,m),children:[(l||u)&&t.jsxs("div",{className:Ee.header,children:[l&&t.jsx("span",{className:L({[Ee.label]:u,[Ee.labelFullWidth]:!u}),children:l}),u&&t.jsxs("span",{className:L(Ee.limit,{[Ee.limitTyping]:String(n).length>=1,[Ee.limitMaxGreen]:$&&String(n).length>=u,[Ee.limitMax]:!$&&String(n).length>=u}),children:[String(n).length," / ",u]})]}),t.jsxs("div",{className:Ee.inputWrapper,children:[S&&t.jsx("div",{className:Ee.search,children:t.jsx(Zh,{})}),t.jsx("input",{autoComplete:j,id:C,name:y,type:z,className:L(Ee.input,{[Ee.inputError]:r,[Ee.inputWarning]:a,[Ee.inputLarge]:B==="large",[Ee.inputSearch]:S}),value:n,onChange:o,disabled:p,readOnly:h,onBlur:_,onFocus:f,onKeyDown:g,style:{...v,paddingRight:ie},placeholder:d,maxLength:u,max:x,min:N}),t.jsxs("div",{className:Ee.buttons,ref:K,children:[P,String(n).length>=1&&!h&&t.jsx("button",{type:"button",className:Ee.button,onClick:s||G,"aria-label":"Clear",children:t.jsx(ac,{"aria-hidden":!0})}),b&&t.jsx("button",{type:"button",className:L(Ee.button,Ee.buttonPassword),onClick:W,"aria-label":I?"Hide password":"Show password",children:I?t.jsx(zh,{"aria-hidden":!0}):t.jsx(Gh,{"aria-hidden":!0})}),h&&T&&t.jsx(it,{value:String(n),className:Ee.copyButton,onCopy:M})]})]}),r&&t.jsx("span",{className:Ee.error,children:r}),a&&t.jsx("span",{className:Ee.warning,children:a})]})},v3=(e,n)=>{i.useEffect(()=>{const o=s=>{const r=e==null?void 0:e.current;!r||r.contains((s==null?void 0:s.target)||null)||n(s)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,n])},y3=e=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M19.332 6.793C17.701 4.5 15.028 3 12 3C7.029 3 3 7.029 3 12C3 12.539 3.056 13.064 3.147 13.576",stroke:"#8A929A",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.42383 19.594V17.207H6.81283",stroke:"#8A929A",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.66797 17.2068C6.29897 19.4998 8.97197 20.9998 12 20.9998C16.971 20.9998 21 16.9708 21 11.9998C21 11.4608 20.944 10.9358 20.853 10.4238",stroke:"#8A929A",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.576 4.40576V6.79276H17.187",stroke:"#8A929A",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),b3=e=>
57i.createElement("svg",{width:12,height:7,viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M0.833008 0.833374L5.83301 5.83337L10.833 0.833374",stroke:"#717A8C",strokeWidth:1.66667,strokeLinecap:"round",strokeLinejoin:"round"})),x3="_wrapper_1lbhv_1",C3="_label_1lbhv_10",k3="_wrapperOpen_1lbhv_13",w3="_disabled_1lbhv_17",j3="_field_1lbhv_17",S3="_arrow_1lbhv_22",N3="_readOnly_1lbhv_26",L3="_loading_1lbhv_30",E3="_open_1lbhv_72",$3="_fieldError_1lbhv_78",T3="_fieldLarge_1lbhv_81",M3="_dropdown_1lbhv_90",D3="_list_1lbhv_97",P3="_showAnimation_1lbhv_1",I3="_off_1lbhv_120",B3="_hideAnimation_1lbhv_1",R3="_container_1lbhv_125",A3="_containerLarge_1lbhv_142",O3="_listItem_1lbhv_145",F3="_listItemFocused_1lbhv_152",q3="_listItemActive_1lbhv_155",W3="_search_1lbhv_209",V3="_searchField_1lbhv_216",H3="_noResults_1lbhv_241",U3="_error_1lbhv_248",Y3="_loader_1lbhv_259",we={wrapper:x3,label:C3,wrapperOpen:k3,disabled:w3,field:j3,arrow:S3,readOnly:N3,loading:L3,open:E3,fieldError:$3,fieldLarge:T3,dropdown:M3,list:D3,showAnimation:P3,off:I3,hideAnimation:B3,container:R3,containerLarge:A3,listItem:O3,listItemFocused:F3,listItemActive:q3,search:W3,searchField:V3,noResults:H3,error:U3,loader:Y3},Oe=e=>{const{options:n=[],onChange:o,label:s,disabled:r=!1,readOnly:a=!1,className:c,style:l,placeholder:d="Select",selected:u,searchPlaceholder:p="Search",loadingPlaceholder:m="Loading...",error:h,isLoading:f=!1,showSearch:_=!0,size:v="medium"}=e,[g,C]=i.useState(!1),[y,b]=i.useState(""),[x,N]=i.useState(-1),S=i.useRef(null),j=i.useRef(null),$=i.useRef(null),T=i.useId(),M=`${T}-label`,P=`${T}-dropdown`,{filteredOptions:B,originalToFilteredIndex:I,filteredToOriginalIndex:A}=i.useMemo(()=>{const F=n.filter(X=>X.label.toLowerCase().includes(y.toLowerCase())),R=new Map,Y=new Map;return F.forEach((X,Ne)=>{const Le=n.findIndex(Be=>Be.value===X.value);R.set(Le,Ne),Y.set(Ne,Le)}),{filteredOptions:F,originalToFilteredIndex:R,filteredToOriginalIndex:Y}},[n,y]);i.useEffect(()=>{if(u!=null){const F=n.findIndex(R=>R.value===u);F>=0&&N(F)}},[u,n,g]),i.useLayoutEffect(()=>{if(!g)return;const F=Y=>{var X;(X=j.current)==null||X.scrollIntoView({block:"nearest",behavior:Y})},R=requestAnimationFrame(()=>{F("smooth")});return()=>cancelAnimationFrame(R)},[g]),i.useEffect(()=>{if(g&&x>=0&&$.current){const F=I.get(x);if(F!==void 0){const R=$.current.getElementsByTagName("li");R[F]&&R[F].scrollIntoView({block:"nearest",behavior:"smooth"})}}},[x,g,I]),v3(S,()=>{C(!1)});const W=i.useMemo(()=>n.find(F=>F.value===u),[n,u]),z=()=>{if(!f&&!a){const F=!g;if(C(F),F){const R=u!=null?n.findIndex(Y=>Y.value===u):0;N(R>=0?R:0)}}},G=F=>{o&&F!==u&&o(F),C(!1)},K=F=>{F.stopPropagation(),b("")},ee=()=>f?m:n.length===0?"No options available":W!=null&&W.render?W.render:(W==null?void 0:W.label)||d,ie=F=>{if(!(r||a||f))switch(F.key){case"ArrowDown":if(F.preventDefault(),g){const R=I.get(x);if(R!==void 0&&R<B.length-1){const Y=R+1,X=A.get(Y);X!==void 0&&N(X)}}else{C(!0);const R=u!=null?n.findIndex(Y=>Y.value===u):0;N(R>=0?R:0)}break;case"ArrowUp":if(F.preventDefault(),g){const R=I.get(x);if(R!==void 0&&R>0){const Y=R-1,X=A.get(Y);X!==void 0&&N(X)}}else{C(!0);const R=u!=null?n.findIndex(Y=>Y.value===u):n.length-1;N(R>=0?R:n.length-1)}break;case"Enter":if(F.preventDefault(),g)x>=0&&G(n[x].value);
57else{C(!0);const R=u!=null?n.findIndex(Y=>Y.value===u):0;N(R>=0?R:0)}break;case"Escape":F.preventDefault(),C(!1);break}},U=()=>a||f||!n.length?null:t.jsx("div",{id:P,ref:j,className:we.dropdown,role:"listbox","aria-labelledby":s?M:void 0,children:t.jsxs("div",{className:L(we.list,{[we.off]:!g}),children:[_&&n.length>4&&t.jsx("div",{className:we.search,children:t.jsx(J,{name:"Search",value:y,onChange:F=>b(F.target.value),isSearch:!0,placeholder:p,className:we.searchField,handleClear:K})}),t.jsx("ul",{className:L(we.container,{[we.containerLarge]:v==="large"}),ref:$,children:B.length===0?t.jsx("li",{className:we.noResults,children:"No results found"}):B.map((F,R)=>{const Y=A.get(R),X=Y===x;return t.jsx("li",{id:`${T}-option-${Y}`,role:"option","aria-selected":F.value===u,className:L(we.listItem,{[we.listItemActive]:F.value===u,[we.listItemFocused]:X}),onClick:()=>G(F.value),tabIndex:X?0:-1,children:F.render||F.label},F.value)})})]})});return t.jsxs("div",{className:L(we.wrapper,c,{[we.disabled]:r,[we.readOnly]:a,[we.loading]:f,[we.wrapperOpen]:g}),ref:S,children:[s&&t.jsx("span",{className:we.label,id:M,children:s}),t.jsxs("div",{className:L(we.field,{[we.open]:g,[we.fieldError]:h,[we.fieldLarge]:v==="large"}),style:l,onClick:z,onKeyDown:ie,role:"combobox","aria-haspopup":"listbox","aria-expanded":g,"aria-controls":P,"aria-labelledby":s?M:void 0,"aria-activedescendant":x>=0?`${T}-option-${x}`:void 0,"aria-disabled":r||a,tabIndex:r||a?-1:0,children:[ee(),!a&&!f&&t.jsx(b3,{className:we.arrow}),f&&t.jsx(y3,{className:we.loader})]}),h&&t.jsx("span",{className:we.error,children:h}),U()]})},K3=e=>i.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10 3C6.13438 3 3 6.13438 3 10C3 13.8656 6.13438 17 10 17C13.8656 17 17 13.8656 17 10C17 6.13438 13.8656 3 10 3ZM12.5844 12.6594L11.5531 12.6547L10 10.8031L8.44844 12.6531L7.41563 12.6578C7.34688 12.6578 7.29063 12.6031 7.29063 12.5328C7.29063 12.5031 7.30156 12.475 7.32031 12.4516L9.35313 10.0297L7.32031 7.60938C7.30143 7.58647 7.29096 7.5578 7.29063 7.52812C7.29063 7.45937 7.34688 7.40312 7.41563 7.40312L8.44844 7.40781L10 9.25938L11.5516 7.40938L12.5828 7.40469C12.6516 7.40469 12.7078 7.45937 12.7078 7.52969C12.7078 7.55937 12.6969 7.5875 12.6781 7.61094L10.6484 10.0312L12.6797 12.4531C12.6984 12.4766 12.7094 12.5047 12.7094 12.5344C12.7094 12.6031 12.6531 12.6594 12.5844 12.6594Z",fill:"#FF4D4F"})),G3=e=>i.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10 3C6.13438 3 3 6.13438 3 10C3 13.8656 6.13438 17 10 17C13.8656 17 17 13.8656 17 10C17 6.13438 13.8656 3 10 3ZM10.5 13.375C10.5 13.4438 10.4437 13.5 10.375 13.5H9.625C9.55625 13.5 9.5 13.4438 9.5 13.375V9.125C9.5 9.05625 9.55625 9 9.625 9H10.375C10.4437 9 10.5 9.05625 10.5 9.125V13.375ZM10 8C9.80374 7.99599 9.61687 7.91522 9.47948 7.775C9.3421 7.63478 9.26515 7.4463 9.26515 7.25C9.26515 7.0537 9.3421 6.86522 9.47948 6.725C9.61687 6.58478 9.80374 6.50401 10 6.5C10.1963 6.50401 10.3831 6.58478 10.5205 6.725C10.6579 6.86522 10.7348 7.0537 10.7348 7.25C10.7348 7.4463 10.6579 7.63478 10.5205 7.775C10.3831 7.91522 10.1963 7.99599 10 8Z",fill:"#2261F6"})),z3=e=>i.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10 3C6.13438 3 3 6.13438 3 10C3 13.8656 6.13438 17 10 17C13.8656 17 17 13.8656 17 10C17 6.13438 13.8656 3 10 3ZM13.0234 7.71406L9.73281 12.2766C9.68682 12.3408 9.62619 12.3931 9.55595 12.4291C9.48571 12.4652 9.40787 12.4841 9.32891 12.4841C9.24994 12.4841 9.17211 12.4652 9.10186 12.4291C9.03162 12.3931 8.97099 12.3408 8.925 12.2766L6.97656 9.57656C6.91719 9.49375 6.97656 9.37813 7.07812 9.37813H7.81094C7.97031 9.37813 8.12187 9.45469 8.21562 9.58594L9.32812 11.1297L11.7844 7.72344C11.8781 7.59375 12.0281 7.51562 12.1891 7.51562H12.9219C13.0234 7.51562 13.0828 7.63125 13.0234 7.71406Z",fill:"#52C41A"})),Z3=e=>i.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10 3C6.13438 3 3 6.13438 3 10C3 13.8656 6.13438 17 10 17C13.8656 17 17 13.8656 17 10C17 6.13438 13.8656 3 10 3ZM9.5 6.625C9.5 6.55625 9.55625 6.5 9.625 6.5H10.375C10.4437 6.5 10.5 6.55625 10.5 6.625V10.875C10.5 10.9437 10.4437 11 10.375 11H9.625C9.55625 11 9.5 10.9437 9.5 10.875V6.625ZM10 13.5C9.80374 13.496 9.61687 13.4152 9.47948 13.275C9.3421 13.1348 9.26515 12.9463 9.26515 12.75C9.26515 12.5537 9.3421 12.3652 9.47948 12.225C9.61687 12.0848 9.80374 12.004 10 12C10.1963 12.004 10.3831 12.0848 10.5205 12.225C10.6579 12.3652 10.7348 12.5537 10.7348 12.75C10.7348 12.9463 10.6579 13.1348 10.5205 13.275C10.3831 13.4152 10.1963 13.496 10 13.5Z",fill:"#FAAD14"})),Q3=e=>i.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M18.6443 9.76409C18.6443 9.64623 18.5478 9.5498 18.43 9.5498L16.6621 9.55784L13.9996 12.7319L11.3398 9.56052L9.56927 9.55248C9.45141 9.55248 9.35498 9.64623 9.35498 9.76677C9.35498 9.81766 9.37373 9.86588 9.40587 9.90606L12.8907 14.0578L9.40587 18.2069C9.37351 18.2462 9.35555 18.2954 9.35498 18.3462C9.35498 18.4641 9.45141 18.5605 9.56927 18.5605L11.3398 18.5525L13.9996 15.3784L16.
576594 18.5498L18.4273 18.5578C18.5452 18.5578 18.6416 18.4641 18.6416 18.3436C18.6416 18.2927 18.6228 18.2444 18.5907 18.2043L15.1112 14.0552L18.5961 9.90338C18.6282 9.86588 18.6443 9.81498 18.6443 9.76409Z",fill:"#FF4D4F"}),i.createElement("path",{d:"M14 2C7.37321 2 2 7.37321 2 14C2 20.6268 7.37321 26 14 26C20.6268 26 26 20.6268 26 14C26 7.37321 20.6268 2 14 2ZM14 23.9643C8.49821 23.9643 4.03571 19.5018 4.03571 14C4.03571 8.49821 8.49821 4.03571 14 4.03571C19.5018 4.03571 23.9643 8.49821 23.9643 14C23.9643 19.5018 19.5018 23.9643 14 23.9643Z",fill:"#FF4D4F"})),X3=e=>i.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14 2C7.37321 2 2 7.37321 2 14C2 20.6268 7.37321 26 14 26C20.6268 26 26 20.6268 26 14C26 7.37321 20.6268 2 14 2ZM14 23.9643C8.49821 23.9643 4.03571 19.5018 4.03571 14C4.03571 8.49821 8.49821 4.03571 14 4.03571C19.5018 4.03571 23.9643 8.49821 23.9643 14C23.9643 19.5018 19.5018 23.9643 14 23.9643Z",fill:"#2261F6"}),i.createElement("path",{d:"M12.7139 9.28571C12.7139 9.62671 12.8493 9.95373 13.0904 10.1949C13.3316 10.436 13.6586 10.5714 13.9996 10.5714C14.3406 10.5714 14.6676 10.436 14.9087 10.1949C15.1498 9.95373 15.2853 9.62671 15.2853 9.28571C15.2853 8.94472 15.1498 8.61769 14.9087 8.37658C14.6676 8.13546 14.3406 8 13.9996 8C13.6586 8 13.3316 8.13546 13.0904 8.37658C12.8493 8.61769 12.7139 8.94472 12.7139 9.28571ZM14.6424 12.2857H13.3567C13.2389 12.2857 13.1424 12.3821 13.1424 12.5V19.7857C13.1424 19.9036 13.2389 20 13.3567 20H14.6424C14.7603 20 14.8567 19.9036 14.8567 19.7857V12.5C14.8567 12.3821 14.7603 12.2857 14.6424
5712.2857Z",fill:"#2261F6"})),J3=e=>i.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M19.0089 9.74023H17.7526C17.4794 9.74023 17.2196 9.87148 17.0588 10.0965L12.8481 15.9358L10.941 13.2893C10.7803 13.067 10.5231 12.9331 10.2472 12.9331H8.99099C8.81688 12.9331 8.7151 13.1313 8.81688 13.2733L12.1544 17.9018C12.2332 18.0119 12.3372 18.1016 12.4576 18.1634C12.578 18.2253 12.7114 18.2575 12.8468 18.2575C12.9822 18.2575 13.1156 18.2253 13.236 18.1634C13.3564 18.1016 13.4604 18.0119 13.5392 17.9018L19.1803 10.0804C19.2847 9.93845 19.183 9.74023 19.0089 9.74023Z",fill:"#52C41A"}),i.createElement("path",{d:"M14 2C7.37321 2 2 7.37321 2 14C2 20.6268 7.37321 26 14 26C20.6268 26 26 20.6268 26 14C26 7.37321 20.6268 2 14 2ZM14 23.9643C8.49821 23.9643 4.03571 19.5018 4.03571 14C4.03571 8.49821 8.49821 4.03571 14 4.03571C19.5018 4.03571 23.9643 8.49821 23.9643 14C23.9643 19.5018 19.5018 23.9643 14 23.9643Z",fill:"#52C41A"})),ef=e=>i.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14 2C7.37321 2 2 7.37321 2 14C2 20.6268 7.37321 26 14 26C20.6268 26 26 20.6268 26 14C26 7.37321 20.6268 2 14 2ZM14 23.9643C8.49821 23.9643 4.03571 19.5018 4.03571 14C4.03571 8.49821 8.49821 4.03571 14 4.03571C19.5018 4.03571 23.9643 8.49821 23.9643 14C23.9643 19.5018 19.5018 23.9643 14 23.9643Z",fill:"#FAAD14"}),i.createElement("path",{d:"M12.7139 18.7143C12.7139 19.0553 12.8493 19.3823 13.0904 19.6234C13.3316 19.8645 13.6586 20 13.9996 20C14.3406 20 14.6676 19.8645 14.9087 19.6234C15.1498 19.3823 15.2853 19.0553 15.2853 18.7143C15.2853 18.3733 15.1498 18.0463 14.9087 17.8052C14.6676 17.564 14.3406 17.4286 13.9996 17.4286C13.6586 17.4286 13.3316 17.564 13.0904 17.8052C12.8493 18.0463 12.7139 18.3733 12.7139 18.7143ZM13.3567 15.7143H14.6424C14.7603 15.7143 14.8567 15.6179 14.8567 15.5V8.21429C14.8567 8.09643 14.7603 8 14.6424 8H13.3567C13.2389 8 13.1424 8.09643 13.1424 8.21429V15.5C13.1424 15.6179 13.2389 15.7143 13.3567 15.7143Z",fill:"#FAAD14"})),tf="_wrapper_jfynv_1",nf="_shake_jfynv_1",rf="_success_jfynv_20",sf="_info_jfynv_26",of="_warning_jfynv_32",af="_error_jfynv_38",lf="_withDescription_jfynv_44",cf="_closeButton_jfynv_48",df="_text_jfynv_52",uf="_icon_jfynv_65",pf="_description_jfynv_70",mf="_noAnimation_jfynv_96",hf="_revealWrapper_jfynv_100",ff="_revealHidden_jfynv_106",_f="_reveal_jfynv_100",gf="_revealInner_jfynv_114",vf="_toast_jfynv_119",Rt={wrapper:tf,shake:nf,success:rf,info:sf,warning:of,error:af,withDescription:lf,closeButton:cf,text:df,icon:uf,description:pf,noAnimation:mf,revealWrapper:hf,revealHidden:ff,reveal:_f,revealInner:gf,toast:vf},V=e=>{const{variant:n,title:o,message:s,withIcon:r=!0,closable:a,className:c,style:l,id:d,onClose:u,animated:p=!1,reveal:m}=e,h=o??s,f=o?s:void 0,_={error:f?Q3:K3,info:f?X3:G3,success:f?J3:z3,warning:f?ef:Z3}[n],v=t.jsxs("div",{className:L(Rt.wrapper,Rt[n],c,{[Rt.withDescription]:f,[Rt.noAnimation]:!p}),style:l,id:d,children:[t.jsxs("div",{className:Rt.text,children:[r&&t.jsx(_,{className:Rt.icon,"aria-hidden":!0}),t.jsx("div",{children:h})]}),f&&t.jsx("div",{className:Rt.description,children:f}),a&&t.jsx("button",{type:"button",className:Rt.closeButton,onClick:u,"aria-label":"Close",children:t.jsx(ac,{"aria-hidden":!0})})]},String(h));return m===void 0?v:t.jsx("div",{className:L(Rt.revealWrapper,{[Rt.revealHidden]:!m}),"aria-hidden":!m,children:t.jsx("div",{className:Rt.revealInner,children:v})})},Gd=e=>{if(!e)return null;const n=window.getComputedStyle(e),o=n.getPropertyValue("overflow"),s=n.getPropertyValue("overflow-y");return/(auto|scroll)/.test(o+s)?e:Gd(e.parentElement)},yf=e=>i.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17.5V17.5C5.8575 17.5 2.5 14.1425 2.5 10V10C2.5 5.8575 5.8575 2.5 10 2.5V2.5C14.1425 2.5 17.5 5.8575 17.5 10V10C17.5 14.1425 14.1425 17.5 10 17.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.0003 14.1667V10H9.16699",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.79084 6.66671C9.67584 6.66671 9.5825 6.76004 9.58334 6.87504C9.58334 6.99004 9.67667 7.08337 9.79167 7.08337C9.90667 7.08337 10 6.99004 10 6.87504C10 6.76004 9.90667 6.66671 9.79084 6.66671",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),bf="_tooltip_1lood_1",xf="_top_1lood_29",Cf="_topRight_1lood_34",kf="_topLeft_1lood_38",wf="_bottom_1lood_42",jf="_bottomRight_1lood_47",Sf="_bottomLeft_1lood_52",Nf="_left_1lood_57",Lf="_leftTop_1lood_62",Ef="_leftBottom_1lood_67",$f="_right_1lood_72",Tf="_rightTop_1lood_77",Mf="_rightBottom_1lood_82",Df="_text_1lood_88",Pf="_wrapper_1lood_94",If="_icon_1lood_106",et={tooltip:bf,top:xf,topRight:Cf,topLeft:kf,bottom:wf,bottomRight:jf,bottomLeft:Sf,left:Nf,leftTop:Lf,leftBottom:Ef,right:$f,rightTop:Tf,rightBottom:Mf,text:Df,wrapper:Pf,icon:If},Bf={top:et.top,"top-right":et.topRight,"top-left":et.topLeft,left:et.left,"left-top":et.leftTop,"left-bottom":et.leftBottom,right:et.right,"right-top":et.rightTop,"right-bottom":et.rightBottom,bottom:et.bottom,"bottom-right":et.bottomRight,"bottom-left":et.bottomLeft},Re=8,Hr=7,Oo=25,Ds=20,Ar=e=>{const{value:n,pointerPosition:o,className:s,style:r,id:a,children:c}=e,[l,d]=i.useState(!1),u=i.useRef(null),p=i.useRef(null),m=(()=>{const C=document.documentElement.dir||"ltr";let y=o;return C==="rtl"&&(y.includes("left")?y=y.replace("left","right"):y.includes("right")&&(y=y.replace("right","left"))),y})(),h=Bf[m],f=()=>{const C={x:0,y:0};if(!p.current||!u.current)return{x:C.x,y:C.y};const y=p.current.getBoundingClientRect(),b=u.current.getBoundingClientRect();switch(m){case"bottom":C.x=y.left+y.width/2-b.width/2,C.y=y.top-b.height-Re-Hr;break;case"bottom-left":C.x=y.left+y.width/2-Oo,C.y=y.top-b.height-Re-Hr;break;case"bottom-right":C.x=y.left+y.width/2-b.width+Oo,C.y=y.top-b.height-Re-Hr;break;case"top":C.x=y.left+y.width/2-b.width/2,C.y=y.bottom+Re+Hr;break;case"top-left":C.x=y.left+y.width/2-Oo,C.y=y.bottom+Re+Hr;break;case"top-right":C.x=y.left+y.width/2-b.width+Oo,C.y=y.bottom+Re+Hr;break;case"right":C.x=y.left-b.width-Re-Re,C.y=y.top+y.height/2-b.height/2;break;case"right-top":C.x=y.left-b.width-Re-Re,C.y=y.top+y.height/2-Ds;break;case"right-bottom":C.x=y.left-b.width-Re-Re,C.y=y.top+y.height/2-b.height+Ds;break;case"left":C.x=y.right+Re+Re,C.y=y.top+y.height/2-b.height/2;break;case"left-top":C.x=y.right+Re+Re,C.y=y.top+y.height/2-Ds;break;case"left-bottom":C.x=y.right+Re+Re,C.y=y.top+y.height/2-b.height+Ds;break;default:C.x=y.right+Re+Re,C.y=y.top+y.height/2-Ds;break}return C},[_,v]=i.useState(()=>f()),g=()=>{if(!l)return null;const C=t.jsx("div",{ref:u,className:L(et.tooltip,h,s),style:{...r,left:`${_.x}px`,top:`${_.y}px`},id:a,children:t.jsx("span",{className:et.text,children:n})});return Pr.createPortal(C,document.body)};return i.useEffect(()=>{if(l&&u.current&&p.current){const C=f();v({x:C.x,y:C.y})}},[l,m]),i.useEffect(()=>{const C=p.current;if(!C)return;const y=Gd(C)||window,b=()=>{d(!1)};return y.addEventListener("scroll",b),()=>{y.removeEventListener("scroll",b)}},[]),t.jsxs("div",{className:et.wrapper,children:[t.jsx("div",{ref:p,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onTouchStart:()=>d(C=>!C),children:c||t.jsx(yf,{className:et.icon,"aria-label":"info"})}),g()]})},Rf=e=>i.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Af="_wrapper_15t6d_1",Of={wrapper:Af},ci=e=>{const{checked:n,onClick:o,className:s,id:r,"aria-label":a,"aria-labelledby":c}=e;return t.jsxs("div",{className:L(Of.wrapper,s),children:[t.jsx("input",{id:r,type:"checkbox",checked:n,onChange:o,readOnly:!o,"aria-label":a,"aria-labelledby":c}),t.jsx("span",{"aria-hidden":!0}),t.jsx(Rf,{"aria-hidden":!0})]})},Ff="_skeleton_1qeq0_1",qf="_loadingAnimation_1qeq0_1",Wf="_light_1qeq0_21",r1={skeleton:Ff,loadingAnimation:qf,light:Wf},H=({count:e=1,className:n,variant:o="default"})=>{const s=Math.max(0,Math.floor(e));return t.jsx(t.Fragment,{children:Array.from({length:s},(r,a)=>t.jsx("div",{className:L(r1.skeleton,o==="light"&&r1.light,n)},a))})},Vf="_slider_1pe1f_15",s1={switch:"_switch_1pe1f_1",slider:Vf}
57,Oa=e=>{const{value:n=!1,onChange:o,className:s,id:r,"aria-label":a,"aria-labelledby":c}=e,l=o?d=>o(d.target.checked):void 0;return t.jsxs("label",{className:L(s1.switch,s),children:[t.jsx("input",{id:r,type:"checkbox",role:"switch",checked:n,onChange:l,"aria-label":a,"aria-labelledby":c}),t.jsx("span",{className:s1.slider,"aria-hidden":!0})]})},Hf="_body_hqh6r_1",Uf={body:Hf},Yf=e=>{const{children:n,className:o}=e;return t.jsx("div",{className:L(Uf.body,o),children:n})},Kf="_footer_1husm_1",Gf={footer:Kf},zf=e=>{const{children:n,className:o}=e;return t.jsx("footer",{className:L(Gf.footer,o),children:n})},Zf=e=>i.createElement("svg",{viewBox:"0 0 26 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M25 11.9229L2.84619 11.9229",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.0769 0.846191L1 11.9231L12.0769 23",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qf="_header_aowkq_1",Xf="_backButton_aowkq_10",Jf="_heading_aowkq_31",e5="_title_aowkq_38",t5="_subtitle_aowkq_45",n5="_withBackButton_aowkq_52",r5="_moveHeadingAfterBackButton_aowkq_1",s5="_titleAnimationDisabled_aowkq_58",o5="_withSubtitle_aowkq_81",An={header:Qf,backButton:Xf,heading:Jf,title:e5,subtitle:t5,withBackButton:n5,moveHeadingAfterBackButton:r5,titleAnimationDisabled:s5,withSubtitle:o5},a5=e=>{const{title:n,subtitle:o,className:s,onBackClick:r,disableTitleAnimation:a}=e;return t.jsxs("header",{className:L(An.header,s,{[An.withBackButton]:r,[An.withSubtitle]:!!o,[An.titleAnimationDisabled]:a}),children:[r&&t.jsx("button",{type:"button",className:An.backButton,onClick:r,"aria-label":"Go back",children:t.jsx(Zf,{})}),t.jsxs("div",{className:An.heading,children:[n&&t.jsx("span",{className:An.title,children:n}),o&&t.jsx("p",{className:An.subtitle,children:o})]})]})};function i5(){const e=i.useRef(!0);return i.useEffect(()=>{e.current=!1},[]),e.current}const o1=typeof document<"u"?document:{},l5=e=>{const n=i.useRef(void 0),o=o1.documentElement,{body:s}=o1,r=i.useCallback(()=>{if(!s||!s.style||n.current)return;const c=window.innerWidth-((o==null?void 0:o.clientWidth)??0),l=parseInt(window.getComputedStyle(s).getPropertyValue("padding-right"))||0;o&&(o.style.position="relative",o.style.overflow="hidden"),s.style.position="relative",s.style.overflow="hidden",s.style.paddingRight=`${l+c}px`,e.current&&(e.current.style.paddingRight=`${l+c}px`),n.current=!0},[s,o,e]),a=i.useCallback(()=>{!s||!s.style||!o||(o.style.position="",o.style.overflow="",s.style.position="",s.style.overflow="",s.style.paddingRight="",e.current&&(e.current.style.paddingRight=""),n.current=!1)},[s,o,e]);return[r,a]},c5=64;function d5(e,n,o,s){i.useEffect(()=>{if(!s)return;const r=e.current,a=n.current;if(!r||!a)return;let c=0,l=0,d=!1,u=0;const p=v=>{a.style.transform=`translateY(${v}px)`;const g=a.getBoundingClientRect().height||1;a.style.opacity=String(Math.max(.35,1-v/g))},m=()=>{a.style.transition="",a.style.transform="",a.style.opacity=""},h=v=>{c=v.touches[0].clientY,l=c,d=!0,a.style.transition="none"},f=v=>{if(!d)return;l=v.touches[0].clientY;const g=Math.max(l-c,0);cancelAnimationFrame(u),u=requestAnimationFrame(()=>p(g))},_=()=>{if(!d)return;d=!1,cancelAnimationFrame(u);const v=Math.max(l-c,0);if(a.style.transition="",v>c5){o();return}m()};return r.addEventListener("touchstart",h,{passive:!0}),r.addEventListener("touchmove",f,{passive:!0}),r.addEventListener("touchend",_),r.addEventListener("touchcancel",_),()=>{cancelAnimationFrame(u),r.removeEventListener("touchstart",h),r.removeEventListener("touchmove",f),r.removeEventListener("touchend",_),r.removeEventListener("touchcancel",_),m()}},[e,n,o,s])}const u5="_wrapper_ctx62_1",p5="_show_ctx62_9",m5="_backdrop_ctx62_9",h5="_modal_ctx62_12",f5="_container_
57ctx62_26",_5="_fitContent_ctx62_42",g5="_content_ctx62_46",v5="_loader_ctx62_57",y5="_closeButton_ctx62_64",b5="_dragHandle_ctx62_81",Xt={wrapper:u5,show:p5,backdrop:m5,modal:h5,container:f5,fitContent:_5,content:g5,loader:v5,closeButton:y5,dragHandle:b5},a1=200,x5=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),C5=e=>{const{isOpen:n,onClose:o,children:s,modalClassName:r,fitContent:a=!1,"aria-label":c,"aria-labelledby":l}=e,d=i.useRef(null),u=i.useRef(null),p=i.useRef(null),m=i.useRef(null),h=i5(),[f,_]=i.useState(!1);i.useEffect(()=>{if(n&&!f){_(!0);return}if(!n&&f){const x=window.setTimeout(()=>_(!1),a1);return()=>clearTimeout(x)}},[f,n]);const[v,g]=l5(d);i.useEffect(()=>{h||(f?v():g())},[f,v,g,h]),i.useEffect(()=>g,[g]);const[C,y]=i.useState(!1);if(i.useEffect(()=>{y(!!(n&&f))},[f,n]),d5(p,u,o,a&&f),i.useEffect(()=>{if(!n||!f)return;m.current=document.activeElement;const x=u.current;if(!x)return;const N=()=>Array.from(x.querySelectorAll(x5)).filter(j=>!j.hasAttribute("disabled")&&j.getAttribute("aria-hidden")!=="true");(N()[0]??x).focus();const S=j=>{if(j.key==="Escape"){j.preventDefault(),o();return}if(j.key!=="Tab")return;const $=N();if($.length===0){j.preventDefault(),x.focus();return}const T=$[0],M=$[$.length-1],P=document.activeElement;j.shiftKey?(P===T||!x.contains(P))&&(j.preventDefault(),M.focus()):P===M&&(j.preventDefault(),T.focus())};return document.addEventListener("keydown",S),()=>{var j,$;document.removeEventListener("keydown",S),($=(j=m.current)==null?void 0:j.focus)==null||$.call(j)}},[n,f,o]),!f)return null;const b=t.jsxs("div",{className:L(Xt.wrapper,{[Xt.show]:C}),style:{"--animationTime":`${a1}ms`},ref:d,children:[t.jsx("div",{className:Xt.backdrop,onClick:o}),t.jsx("div",{className:Xt.container,children:t.jsx("div",{ref:u,className:L(Xt.modal,a&&Xt.fitContent,r),"data-modal-root":"true","data-fit-content":a||void 0,role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":l,tabIndex:-1,children:t.jsx(i.Suspense,{fallback:t.jsx(Tn,{className:Xt.loader}),children:t.jsxs("div",{className:Xt.content,children:[a&&t.jsx("div",{ref:p,className:Xt.dragHandle,"aria-hidden":!0}),t.jsx("button",{type:"button",className:Xt.closeButton,onClick:o,"aria-label":"Close",children:t.jsx(ac,{"aria-hidden":!0})}),s]})})})})]});return Pr.createPortal(b,document.body)},D=C5;D.Header=a5;D.Body=Yf;D.Footer=zf;const k5=(e,n)=>{let o=!1,s,r;function a(...c){if(o){r=c;return}return o=!0,s=setTimeout(()=>{o=!1,r&&(a(...r),r=null)},n),e.apply(this,c)}return a.cancel=()=>{clearTimeout(s),o=!1,r=null},a},w5="_panel_11a6a_1",j5="_light_11a6a_9",S5="_dense_11a6a_18",i1={panel:w5,light:j5,dense:S5},ze=({children:e,variant:n="light",className:o})=>t.jsx("div",{className:L(i1.panel,i1[n],o),children:e}),No=e=>i.createElement("svg",{viewBox:"0 0 26 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M25 11.9229L2.84619 11.9229",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.0769 0.846191L1 11.9231L12.0769 23",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),N5="_header_tyikw_1",L5="_back_tyikw_9",E5="_title_tyikw_39",$5="_titleText_tyikw_54",T5="_titleIcon_tyikw_59",M5="_action_tyikw_73",D5="_skeleton_tyikw_78",ir={header:N5,back:L5,title:E5,titleText:$5,titleIcon:T5,action:M5,skeleton:D5},ct=e=>{const{title:n,isLoading:o,className:s,actionElement:r,hideBackButton:a=!1,icon:c}=e,l=Zt(),d=()=>{window.history.length<=1?l("/bills"):l(-1)};return t.jsxs("div",{className:L(ir.header,s),children:[!a&&t.jsx("button",{type:"button",onClick:d,className:ir.back,"aria-label":"Go back",children:t.jsx(No,{})}),t.jsx("div",{className:ir.title,children:o?t.jsx(H,{className:ir.skeleton}):t.jsxs(t.Fragment,{children:[c&&t.jsx("span",{className:ir.titleIcon,children:c}),t.jsx("span",{className:ir.titleText,children:n})]})}),r&&t.jsx("div",{className:ir.action,children:r})]})},P5="_sendButton_lgmfr_1",I5="_disabled_lgmfr_12",l1={sendButton:P5,disabled:I5}
57,ar=({onClick:e,cooldownTime:n,isDisabled:o,isLoading:s,className:r})=>{const a=s||o||!!(n&&n>0),c=s?"Sendingâ¦":n?`${n} sec`:"Send Code";return t.jsx("button",{type:"button",className:L(l1.sendButton,r,{[l1.disabled]:a}),onClick:e,disabled:a,children:c},"sendCode")};function at(e,n){return n?Object.keys(e.values).filter(s=>!n.includes(s)).map(s=>e.values[s]).every(Boolean):Object.values(e.values).every(Boolean)}function ys(e,n){if(e.length<=n)return e;const o=n-3,s=e.substring(0,Math.ceil(o/2)),r=e.substring(e.length-Math.floor(o/2));return s+"..."+r}function bs(e,n){const o=e.split("@");if(o.length!==2)return e;const[s,r]=o;return`${ys(s,n)}@${r}`}const B5="_wrapper_n1b2n_1",R5="_panel_n1b2n_7",A5="_status_n1b2n_11",O5="_form_n1b2n_19",F5="_codeLabel_n1b2n_26",q5="_submitButton_n1b2n_38",Ur={wrapper:B5,panel:R5,status:A5,form:O5,codeLabel:F5,submitButton:q5},W5=e=>{const{formik:n,isLoading:o,user:s,onSendClick:r,remainingTimeToResendCode:a,isRequestingCode:c,hasCodeSession:l,error:d,handleSubmit:u}=e;return t.jsxs("section",{className:Ur.wrapper,children:[t.jsx(ct,{title:"Google Authenticator"}),t.jsxs(ze,{className:Ur.panel,children:[t.jsx("div",{className:Ur.status,children:"Connected"}),t.jsx(V,{variant:"warning",message:"Disabling Google Authenticator will reduce your account security. Make sure you understand the risks."}),t.jsxs("div",{className:Ur.form,children:[t.jsx(J,{name:"emailCode",value:n.values.emailCode,onChange:n.handleChange,handleClear:()=>n.setFieldValue("emailCode",""),label:t.jsxs("div",{className:Ur.codeLabel,children:[t.jsxs("span",{children:["Code from"," ",bs((s==null?void 0:s.email)??"",15)]}),t.jsx(ar,{onClick:r,cooldownTime:a,isLoading:c})]}),error:n.errors.emailCode,autoComplete:"one-time-code"}),t.jsx(J,{name:"code",value:n.values.code,onChange:n.handleChange,handleClear:()=>n.setFieldValue("code",""),label:"Verification code",error:n.errors.code,autoComplete:"one-time-code"}),d&&t.jsx(V,{variant:"error",message:d,animated:!0}),t.jsx(O,{className:Ur.submitButton,onClick:u,isLoading:o,disabled:!l||!at(n),children:"Disable"})]})]})]})},V5=()=>{const[e,n]=i.useState(!1),{user:o}=ht(),[s,{data:r,error:a,isFetching:c}]=Se.useLazyRequestKeyQuery(),[l,{isLoading:d,error:u,isSuccess:p}]=Se.useSecurityUpdateMutation(),[m,h]=So(re.twoFACodeSentTime),f=async()=>{try{await s().unwrap(),h()}catch{}},_=Me({initialValues:{emailCode:"",code:""},validationSchema:Kd(),validateOnChange:e,onSubmit:g=>{r&&l({mode:$r.email,secret_2fa:"",code:g.code,secure:{code:g.emailCode,key:r.payload.key??""}})}}),v=()=>{n(!0),_.handleSubmit()};return i.useEffect(()=>{p&&se.remove(re.twoFACodeSentTime)},[p]),t.jsx(W5,{formik:_,isLoading:d,onSendClick:f,remainingTimeToResendCode:m,isRequestingCode:c,hasCodeSession:!!r,user:o,error:Q(a||u),handleSubmit:v})},bt=jn.injectEndpoints({endpoints:e=>({auth:e.mutation({query:n=>({url:"/v1/auth",method:"POST",body:n})}),logout:e.query({query:()=>({url:"/v1/user/logout",method:"PUT"})}),registration:e.mutation({query:n=>({url:"/v1/registration",method:"POST",body:n})}),registrationEmailCodeCheck:e.mutation({query:n=>({url:"/v1/registration/check-code",method:"POST",body:n})}),preRegistration:e.mutation({query:n=>({url:"/v1/registration/pre",method:"POST",body:n})}),refresh:e.query({query:n=>({url:"/v1/token/refresh",method:"POST",body:{refreshToken:n}})}),socialAuth:e.mutation({query:({providerName:n,...o})=>({url:`/v1/auth/social/${n}`,method:"POST",body:o})}),authCheck:e.mutation({query:n=>({url:"/v1/auth/check",method:"POST",body:n})}),emailCodeResend:e.mutation({query:n=>({url:"/v1/notifications/resend-code",method:"POST",body:n})}),auth2FA:e.mutation({query:n=>({url:"/v1/auth/2fa",method:"POST",body:n})}),auth2FAGenerateKey:e.query({query:()=>({url:"/v1/generate-2fa",method:"GET"})}),qrCodeGenerate:e.query({query:({deviceId:n,sessionId:o})=>({url:"/v1/auth/qr-code/generate",method:"POST",headers:{deviceId:n},params:{sessionId:o}})}),qrCodeCheck:e.query({query:({deviceId:n,sessionId:o,qrCode:s})=>({url:"/v1/auth/qr-code/check",method:"POST",headers:{deviceId:n},body:{sessionId:o,qrCode:s}})}),qrCodeAuth:e.query({query:({deviceId:n,sessionId:o,qrCode:s})=>({url:"/v1/auth/qr-code/auth",method:"POST",headers:{deviceId:n},body:{sessionId:o,qrCode:s}})})})}),H5="_wrapper_1ntqp_1",U5="_loader_1ntqp_7",Y5="_rotate_1ntqp_1",K5="_square_1ntqp_17",G5="_square1_1ntqp_1",z5="_square2_1ntqp_1",Z5="_square3_1ntqp_1",Q5="_square4_1ntqp_1",Yr={wrapper:H5,loader:U5,rotate:Y5,square:K5,square1:G5,square2:z5,square3:Z5,square4:Q5},Fa=e=>{const{className:n}=e;return t.jsx("div",{className:L(Yr.wrapper,n),children:t.jsxs("div",{className:Yr.loader,children:[t.jsx("div",{className:Yr.square}),t.jsx("div",{className:Yr.square}),t.jsx("div",{className:Yr.square}),t.jsx("div",{className:Yr.square})]})})},X5="_wrapper_1bt1n_1",J5="_panel_1bt1n_7",e4="_text_1bt1n_11",t4="_form_1bt1n_19",n4="_codeLabel_1bt1n_26",r4="_loader_1bt1n_38",s4="_image_1bt1n_44",o4="_secretKey_1bt1n_54",a4="_submitButton_1bt1n_69",At={wrapper:X5,panel:J5,text:e4,form:t4,codeLabel:n4,loader:r4,image:s4,secretKey:o4,submitButton:a4},i4=e=>{const{secret:n,image:o,formik:s,isLoading:r,user:a,onSendClick:c,remainingTimeToResendCode:l,isRequesting
57Code:d,error:u,keyError:p,handleSubmit:m,isEnableAllowed:h}=e,f=!!(n&&o);return t.jsxs("section",{className:At.wrapper,children:[t.jsx(ct,{title:"Google Authenticator"}),t.jsxs(ze,{className:At.panel,children:[t.jsx("p",{className:At.text,children:"Two-factor authentication adds an extra layer of protection for your account. Enter the code from your email and a code from the Google Authenticator app to complete setup."}),t.jsxs("div",{className:At.form,children:[t.jsx(J,{name:"emailCode",value:s.values.emailCode,onChange:s.handleChange,handleClear:()=>s.setFieldValue("emailCode",""),label:t.jsxs("div",{className:At.codeLabel,children:[t.jsxs("span",{children:["Code from"," ",bs((a==null?void 0:a.email)??"",15)]}),t.jsx(ar,{onClick:c,cooldownTime:l,isLoading:d})]}),error:s.errors.emailCode,autoComplete:"one-time-code"}),p&&t.jsx(V,{variant:"error",message:p,animated:!0})]}),t.jsx("p",{className:At.text,children:"Download Google Authenticator, add a new account, then scan this QR code or enter the secret key manually."}),f?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:At.image,children:t.jsx("img",{src:o,alt:"Google Authenticator QR"})}),t.jsxs("div",{className:At.secretKey,children:[t.jsx("span",{children:ys(n,24)}),t.jsx(it,{value:n})]}),t.jsxs("div",{className:At.form,children:[t.jsx(J,{type:"text",name:"code",value:s.values.code,onChange:s.handleChange,handleClear:()=>s.setFieldValue("code",""),label:"Verification code",error:s.errors.code,autoComplete:"one-time-code"}),u&&t.jsx(V,{variant:"error",message:u,animated:!0}),t.jsx(O,{className:At.submitButton,onClick:m,isLoading:r,disabled:!at(s)||!h,children:"Enable"})]})]}):t.jsx("div",{className:At.loader,children:t.jsx(Fa,{})})]})]})},l4=(e,n)=>{const[o,s]=i.useState("");return i.useEffect(()=>{if(e&&n){const r=`otpauth://totp/SoftnoteWallet(${n})?secret=${e}`;hd.toDataURL(r,(a,c)=>{a||s(c)})}},[e,n]),o},c4=()=>{const[e,n]=i.useState(!1),[o,{data:s,error:r,isFetching:a}]=Se.useLazyRequestKeyQuery(),[c,{isLoading:l,isSuccess:d,error:u}]=Se.useSecurityUpdateMutation(),{user:p}=ht(),[m,h]=So(re.twoFACodeSentTime),f=async()=>{try{await o().unwrap(),h()}catch{}},{data:_,error:v}=bt.useAuth2FAGenerateKeyQuery(),g=_==null?void 0:_.payload,C=l4(_==null?void 0:_.payload,p==null?void 0:p.email),y=Me({initialValues:{code:"",emailCode:""},validationSchema:Kd(),validateOnChange:e,onSubmit:x=>{!g||!s||c({mode:$r.auth2FA,secret_2fa:g,code:x.code,secure:{code:x.emailCode,key:s.payload.key??""}})}}),b=()=>{n(!0),y.handleSubmit()};return i.useEffect(()=>{d&&se.remove(re.twoFACodeSentTime)},[d]),t.jsx(i4,{secret:g,image:C,formik:y,isLoading:l,onSendClick:f,remainingTimeToResendCode:m,isRequestingCode:a,user:p,error:Q(v||u),keyError:Q(r),handleSubmit:b,isEnableAllowed:!!s})},d4=()=>{const{user:e}=ht();return(e==null?void 0:e.secure.mode)===$r.auth2FA?t.jsx(V5,{}):t.jsx(c4,{})},Qt=wn.injectEndpoints({endpoints:e=>({getBalances:e.query({query:()=>({url:"/v1/x-port",method:"GET"}),providesTags:n=>n&&n.payload?[...n.payload.map(o=>({type:"XPortBalance",id:o.currency.key})),{type:"XPortBalance",id:"all"}]:[{type:"XPortBalance",id:"all"}]}),getBalanceByKey:e.query({query:({currencyKey:n})=>({url:`/v1/x-port/${n}`,method:"GET"}),providesTags:(n,o,{currencyKey:s})=>[{type:"XPortBalance",id:s}]}),getBills:e.query({query:({currencyKey:n,...o})=>({url:`/v2/x-port/list/${n}`,params:o,method:"GET"}),serializeQueryArgs:({queryArgs:n,endpointDefinition:o,endpointName:s})=>{const r={...n};return delete r.offset,delete r.count,cs({queryArgs:r,endpointDefinition:o,endpointName:s})},merge:(n,o,{arg:{offset:s}})=>{if(s===0){n.bills=o.bills;return}n.bills.push(...o.bills)},forceRefetch({currentArg:n,previousArg:o}){return n!==o},providesTags:(n,o,{currencyKey:s})=>[{type:"XPortBills",id:s}]}),handover:e.mutation({query:({currencyKey:n,stack:o,to:s})=>({url:`/v1/x-port/handover/${n}`,method:"POST",body:{stack:o,to:s}}),invalidatesTags:(n,o,{currencyKey:s})=>o?[]:[{type:"XPortBalance",id:s},{type:"XPortBalance",id:"all"},{type:"XPortBills",id:s}]}),export:e.mutation({query:({currencyKey:n,stack:o})=>({url:`/v1/x-port/export/${n}`,method:"POST",body:{stack:o}}),invalidatesTags:(n,o,{currencyKey:s})=>o?[]:[{type:"XPortBalance",id:s},{type:"XPortBalance",id:"all"},{type:"XPortBills",id:s}]}),deposit:e.mutation({query:({currencyKey:n,stack:o})=>({url:`/v1/x-port/deposit/${n}`,method:"POST",body:{stack:o}}),invalidatesTags:(n,o,{currencyKey:s})=>o?[]:[{type:"XPortBalance",id:s},{type:"XPortBalance",id:"all"},{type:"XPortBills",id:s},{type:"SoftnoteBalance",id:s},"AvaliableSoftNotesForExport"]})})}),pn=e=>{const{currencyKey:n,className:o,...s}=e,{resourcesUrl:r}=ko;return t.jsx("img",{className:o,src:`${r}/icons/${n}.svg`,alt:n,...s})};function di(){const[e,n]=i.useState({}),o=i.useMemo(()=>{const l=[];return Object.values(e).forEach(d=>{d.forEach(u=>{l.push(u.id)})}),l},[e]),s=i.useCallback((l,d,u)=>{n(p=>{const m={...p},h=[...p[l]??[]];
57return(Array.isArray(d)?d:[d]).forEach(_=>{const v=h.findIndex(g=>g.id===_.id);u==="add"&&v===-1?h.push(_):u==="remove"&&v!==-1?h.splice(v,1):u||(v===-1?h.push(_):h.splice(v,1))}),h.length===0?delete m[l]:m[l]=h,m})},[]),r=i.useCallback((l,d)=>{n(u=>{const p={...u};return p[l]=[...d],p})},[]),a=i.useCallback(l=>{n(d=>{const u={...d};return delete u[l],u})},[]),c=i.useCallback(()=>n({}),[]);return{selectedBills:e,toggleSelectBill:s,selectAllBills:r,unselectAllBillsByNominal:a,resetSelectedBills:c,selectedBillsIds:o}}const u4=()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,p4=e=>1-Math.pow(1-e,3),c1=e=>{const n=Number(e);return Number.isFinite(n)?n:0};function m4(e){const{value:n,duration:o=500}=e,[s,r]=i.useState(()=>c1(n)),a=i.useRef(s),c=i.useRef();return i.useEffect(()=>{const l=c1(n),d=a.current,u=()=>{c.current!==void 0&&(cancelAnimationFrame(c.current),c.current=void 0)};if(u(),d===l||u4()||o<=0)return a.current=l,r(l),u;let p;const m=h=>{p===void 0&&(p=h);const f=Math.min((h-p)/o,1),_=d+(l-d)*p4(f);if(a.current=_,r(_),f<1){c.current=requestAnimationFrame(m);return}a.current=l,r(l),c.current=void 0};return c.current=requestAnimationFrame(m),u},[n,o]),s}const h4=(e,n)=>{let o=e;if((n.trimTrailingZeros||n.omitFractionalPart)&&(o=o.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),n.omitFractionalPart&&o.includes(".")){const[s]=o.split(".");if(s!==void 0&&Number(s)===Number(o))return s}return o},q=(e,n,o={})=>{if(e==null||isNaN(e))return"0";let r=Number(e.toFixed(14));(r===0||isNaN(r))&&(r=0);try{const a=o.omitFractionalPart&&Number.isInteger(r)?0:n,c=r.toLocaleString("en-US",{maximumFractionDigits:n,minimumFractionDigits:a,roundingMode:"trunc"}).replaceAll(","," ");return h4(c,o)}catch{return"0"}},ic=(e,n)=>e.toLocaleString("en-US",{maximumFractionDigits:n}).replaceAll(","," "),ui=(e,n=!1)=>
57{if(e>=.01)return q(e,2);const o=14;return e<10**-o?"0.00":n?ic(e,o):"0.00.."},f4="_container_1ggot_1",_4="_balance_1ggot_6",g4="_symbol_1ggot_15",v4="_skeleton_1ggot_33",Fo={container:f4,balance:_4,symbol:g4,skeleton:v4,"skeleton-loading":"_skeleton-loading_1ggot_1"},pi=e=>{const{value:n=0,isLoading:o,decimal:s=2,currencyFormat:r="symbol",ticker:a,className:c,valueClassName:l,amountSource:d="crypto"}=e,u=m4({value:n}),p=d==="bills"?{trimTrailingZeros:!0,omitFractionalPart:!0}:void 0;return t.jsx("div",{className:L(Fo.container,c),children:t.jsxs("div",{className:L(Fo.balance,l,{[Fo.skeleton]:o}),children:[r==="symbol"&&t.jsx("span",{className:Fo.symbol,children:"$"}),q(u,s,p),r==="ticker"&&a&&` ${a}`]})})},y4="_wrapper_4xpxt_1",b4="_info_4xpxt_9",x4="_title_4xpxt_31",C4="_balance_4xpxt_40",k4="_balanceValue_4xpxt_44",w4="_converted_4xpxt_54",j4="_bills_4xpxt_62",lr={wrapper:y4,info:b4,title:x4,balance:C4,balanceValue:k4,converted:w4,bills:j4},S4=e=>{const{balance:n,billsAmount:o,isLoading:s,decimal:r,ticker:a,converted:c}=e,l=o===1?"1 Bill":`${o??0} Bills`;return t.jsx("div",{className:lr.wrapper,children:t.jsxs("div",{className:lr.info,children:[t.jsx("span",{className:lr.title,children:"Balance"}),t.jsx(pi,{value:n,isLoading:s,decimal:r,currencyFormat:a?"ticker":"symbol",ticker:a,amountSource:"bills",className:lr.balance,valueClassName:lr.balanceValue}),c!==void 0&&t.jsxs("span",{className:lr.converted,children:["$",ui(c||0)]}),t.jsx("span",{className:lr.bills,children:l})]})})},N4="_noBills_1rte5_1",L4={noBills:N4},zd=({stripe:e})=>t.jsxs("div",{className:L4.noBills,children:[t.jsx("span",{children:"No Bills"}),t.jsxs("span",{children:["Start working with SoftNote bills. ",t.jsx("br",{}),t.jsx(ge,{to:`/mint-house/${e}/mint`,children:"Mint"})," or"," ",t.jsx(ge,{to:`/bills?hub=${e}&modal=deposit`,children:"Deposit"})," ","them."]})]}),nr=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M8 10L12 14L16 10",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),E4=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.99622 12.0005C2.9971 11.3372 3.14973 10.6829 3.4424 10.0877V10.0877C5.09849 6.90514 8.41286 4.93373 12 4.9976C15.5871 4.93373 18.9014 6.90514 20.5575 10.0877V10.0877C21.1524 11.2935 21.1524 12.7075 20.5575 13.9133V13.9133C18.9014 17.0959 15.5871 19.0673 12 19.0034C8.41286 19.0673 5.09849 17.0959 3.4424 13.9133V13.9133C3.14973 13.3181 2.9971 12.6638 2.99622 12.0005Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0012 12.0003C15.0012 13.6578 13.6575 15.0015 12 15.0015C10.3424 15.0015 8.99872 13.6578 8.99872 12.0003C8.99872 10.3427 10.3424 8.99902 12 8.99902",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),xs=e=>{const{children:n,loadMore:o,hasMore:s,isLoading:r,loader:a,options:c}=e,l=i.useRef(null);return i.useEffect(()=>{const d=l.current;if(!d||r||!s)return;const u=new IntersectionObserver(([p])=>{p.isIntersecting&&o()},c);return u.observe(d),()=>u.disconnect()},[s,r,o,c]),t.jsxs(t.Fragment,{children:[n,r&&s&&a,s&&t.jsx("div",{ref:l,style:{minHeight:1}})]})};function Bt(e){const n=$4(e),o=i.useMemo(()=>window.matchMedia(n),[n]),[s,r]=i.useState(o.matches);return i.useEffect(()=>{const a=c=>r(c.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[o]),s}function $4(e){return e.replace("@media","").trim()}function Mn(){const[e,n]=li(),o=e.get("modal"),s=i.useCallback(c=>{const l=new URLSearchParams(e);l.set("modal",c),n(l,{replace:!0})},[e,n]),r=i.useCallback(()=>{const c=new URLSearchParams(e);c.delete("modal"),n(c,{replace:!0})},[e,n]),a=i.useCallback(c=>o===c,[o]);return{openModal:s,closeModal:r,isModalOpen:a}}const Cs="(max-width: 992px)",ks="(max-width: 576px)",qo=50,Bi=10;function Sn(e){return/^\d+\.?\d*$|^$/.test(e)}function T4(e,n=8,o=8){if(!Sn(e))return!1;const[s,r]=e.split(".");return!(r&&r.length>n||s.length>o)}var ms=(e=>(e[e.None=0]="None",e[e.Filled=1]="Filled",e[e.InWallet=10]="InWallet",e[e.Coinaged=11]="Coinaged",e[e.Burned=12]="Burned",e[e.InVault=111]="InVault",e))(ms||{});const Zd=(e,n=1)=>{const o=String(e),s=" ".repeat(n);return`${o.slice(0,5)}${s}${o.slice(5,8)}${s}${o.slice(8,11)}${s}${o.slice(11,14)}${s}${o.slice(14)}`},Qd=e=>i.createElement("svg",{viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e}
57,i.createElement("path",{d:"M12 17.5V3.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20 21.5H4",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17 12.5L11.999 17.501L6.99902 12.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Wo={BLOCKCHAIR:"https://blockchair.com/bitcoin/address",ETHERSCAN:"https://etherscan.io/address",TRONSCAN:"https://tronscan.org/#/address",TECTUM:"https://explorer.tectum.io"};function M4(e,n){if(e.split("-")[0]==="tectum")return`${Wo.TECTUM}/${e}/address/${n}`;switch(e){case"bitcoin-sha256-btc":return`${Wo.BLOCKCHAIR}/${n}`;case"ethereum-erc20-usdt":case"ethereum-erc20-eth":return`${Wo.ETHERSCAN}/${n}`;case"tron-trc20-usdt":case"tron-trc20-trx":return`${Wo.TRONSCAN}/${n}`;default:return""}}const Ri=1e8,Pl=686,Il=343,D4=2.686588921,P4=(e,n)=>{if(n===1)return String(e);const o=["","K","M","B","T"],s=1e3;if(e<1e4)return e.toFixed(10).replace(/\.?0+$/,"");let r=0;for(;Math.abs(e)>=s&&r<o.length-1;)e/=s,r++;return e+o[r]},Bl=(e,n)=>{e=+e.toFixed();const o=["","one","two","three","four","five","six","seven","eight","nine"],s=["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],r=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"],a=["","thousand","million","billion","trillion","quadrillion","quintillion","sextillion","septillion","octillion","nonillion","decillion"];if(e===0)return"ZERO";if(e<0)return"MINUS "+Bl(Math.abs(e),n);let c="",l=0;for(;e>0;){let d=e%1e3;if(e=Math.floor(e/1e3),d!==0){let u="";d>=100&&(u+=o[Math.floor(d/100)]+" hundred ",d%=100),d>=10&&d<=19?(u+=s[d-10],d=0):d>=20&&(u+=r[Math.floor(d/10)]+" ",d%=10),d!==0&&(u+=o[d]+" "),c=u.trim()+" "+a[l]+" "+c}l++}return n==="BTC"?`${c.trim()} satoshi`.toUpperCase().split("").join(" "):c.trim().toUpperCase().split("").join(" ")},Vo=e=>{if(+e<1e4)return Number(e).toFixed(10).replace(/\.?0+$/,"");const n=e.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")},d1=e=>e.toFixed(15).replace(/\.?0+$/,""),I4=()=>new Promise(e=>{g2.load({google:{families:["Inter:400,500,600,700","Roboto Mono"]},active:()=>e()})}),B4=(e,n,o)=>`https://src.softnote.com/templates/${e===ms.Coinaged?`yellow/${n.toLowerCase()}`:n.toLowerCase()}/${o.toUpperCase()}.svg`,u1=e=>new Promise((n,o)=>{const s=new Image;s.crossOrigin="Anonymous",s.onload=()=>n(s),s.onerror=r=>o(r),s.src=e}),R4=async(e,n)=>await hd.toDataURL(e,{width:84*n,margin:0,color:{dark:"#000000",light:"#FFFFFF"}}),A4=async(e,n)=>{try{const{currencyInfo:o,color:s,status:r,serialNumber:a}=e,c=B4(r,s,o.ticker),l=new URL(ko.cashUrl+"bill");l.searchParams.set("serialNumber",a);const d=await R4(l.toString(),n),[u,p]=await Promise.all([u1(c),u1(d),I4()]);return{billTemplate:u,qrCode:p}}catch(o){throw console.log(o),o}},p1=async({canvas:e,isForDownload:n=!1,scale:o=1,softnoteData:s,setIsLoaded:r})=>{const a=e.getContext("2d");if(!a)return;const{nominal:c,token:l,currencyInfo:d,serialNumber:u,color:p,status:m}=s;try{const{billTemplate:h,qrCode:f}=await A4(s,o);if(e.height=Pl*o,e.width=Il*o,a.clearRect(0,0,e.width,e.height),a.drawImage(h,0,0,e.width,e.height),a.fillStyle="black",a.font=`bold ${45*o}px Inter`,a.fillText(P4(c,d.id),23*o,112*o),a.font=`600 ${8*o}px Inter`,d.ticker==="BTC"&&a.fillText(Bl(c*Ri,d.ticker),25*o,126*o),c%1===0&&c>=1e4&&a.fillText(Bl(c,d.ticker),25*o,126*o),a.font=`${16*o}px Roboto Mono`,a.fillText(u,25*o,161*o),a.drawImage(f,23*o,184*o,84*o,84*o),a.font=`600 ${11*o}px Inter`,a.fillStyle=p==="blue"&&m!==ms.Coinaged?"white":"black",d.ticker.length>3?a.fillText(`${d.network.toUpperCase()} / ${d.protocol}`,167*o,45*o):a.fillText(`${d.network.toUpperCase()} / ${d.protocol}`,150*o,45*o),a.save(),a.translate(45*o,618*o),a.rotate(3*Math.PI/2),a.font=`bold ${27*o}px Inter`,a.fillStyle="white",a.globalAlpha=.8,d.ticker==="BTC"){const _=a.measureText(`${d1(c)} BTC | `).width;a.font=`${17*o}px Inter`;const v=a.measureText(`${Vo((c*Ri).toFixed())} SATS`).width;a.font=`bold ${27*o}px Inter`,a.fillRect(-3*o,-30*o,_+v,39*o)}else a.fillRect(-3*o,-30*o,a.measureText(`${Vo(c)} ${d.ticker} `).width,39*o);if(a.globalAlpha=1,a.fillStyle="black",a.fillText(`${Vo(c)} ${d.ticker}`,0,0),d.ticker==="BTC"){a.font=`${27*o}px Inter`;
57const _=a.measureText(`${d1(c)} BTC |`).width;a.font=`${17*o}px Inter`,a.fillText(`| ${Vo((c*Ri).toFixed())} SATS`,_,-4*o)}if(a.font=`500 ${15*o}px Roboto Mono`,a.fillText(l,-39*o,274*o),a.fillStyle=p==="blue"&&m!==ms.Coinaged?"white":"black",a.font=`600 ${7.8*o}px Inter`,a.fillText(`${d.network.toUpperCase()} / ${d.protocol}`.split("").join(" "),-31*o,253.4*o),a.restore(),n){const _=document.createElement("a");_.download=`${s.serialNumber}.png`,_.href=e.toDataURL(),_.click()}r(!0)}catch(h){console.log(h)}},O4="_skeleton_gd0hc_1",F4="_notLoaded_gd0hc_6",q4="_error_gd0hc_10",m1={skeleton:O4,notLoaded:F4,error:q4},W4=e=>{const{softnoteData:n,setHandleDownloadClick:o}=e,[s,r]=i.useState(!1),a=i.useRef(null),c=()=>{const l=document.createElement("canvas");l.width=Il,l.height=Pl,p1({canvas:l,isForDownload:!0,scale:D4,softnoteData:n,setIsLoaded:r})};return i.useEffect(()=>{a.current&&p1({canvas:a.current,softnoteData:n,setIsLoaded:r})},[n]),i.useEffect(()=>{s&&o(()=>c)},[s]),t.jsxs(t.Fragment,{children:[t.jsx("canvas",{className:L({[m1.notLoaded]:!s}),ref:a,width:Il,height:Pl}),!s&&t.jsx(H,{className:m1.skeleton})]})},V4="_content_15wf3_1",H4="_serial_15wf3_8",U4="_download_15wf3_17",Ai={content:V4,serial:H4,download:U4},Y4=e=>{const{softnoteData:n}=e,[o,s]=i.useState(),r=M4(n.currencyInfo.key,n.token);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"SoftNote Bill",subtitle:"Preview SoftNote."}),t.jsxs(D.Body,{className:Ai.content,children:[t.jsx("span",{className:Ai.serial,children:Zd(n.serialNumber,3)}),t.jsx(W4,{softnoteData:n,setHandleDownloadClick:s})]}),t.jsxs(D.Footer,{children:[t.jsxs(O,{onClick:o,className:Ai.download,disabled:o===void 0,children:["Save as pic",t.jsx(Qd,{})]}),t.jsx(O,{as:"a",href:r,target:"_blank",rel:"noreferrer",disabled:!r,children:"Check in Explorer"})]})]})},K4=e=>{const{isOpen:n,onClose:o,softnoteData:s}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(Y4,{softnoteData:s})})},G4="_wrapper_1x40s_1",z4="_container_1x40s_9",Z4="_green_1x40s_17",Q4="_amount_1x40s_21",X4="_amountSelected_1x40s_25",J4="_buttonListActive_1x40s_29",e9="_blue_1x40s_34",t9="_info_1x40s_51",n9="_counter_1x40s_72",r9="_disabledEl_1x40s_94",s9="_totalCost_1x40s_121",o9="_buttonList_1x40s_29",a9="_listCollapse_1x40s_175",i9="_listCollapseOpen_1x40s_182",l9="_listCollapseInner_1x40s_187",c9="_list_1x40s_175",d9="_listContainer_1x40s_208",u9="_listItem_1x40s_232",p9="_serialNumber_1x40s_250",m9="_actions_1x40s_259",h9="_actionBtn_1x40s_267",f9="_heightAuto_1x40s_293",_9="_disabled_1x40s_94",g9="_plusTooltip_1x40s_313",v9="_checkbox_1x40s_318",y9="_skeleton_1x40s_337",ce={wrapper:G4,container:z4,green:Z4,amount:Q4,amountSelected:X4,buttonListActive:J4,blue:e9,info:t9,counter:n9,disabledEl:r9,totalCost:s9,buttonList:o9,listCollapse:a9,listCollapseOpen:i9,listCollapseInner:l9,list:c9,listContainer:d9,listItem:u9,serialNumber:p9,actions:m9,actionBtn:h9,heightAuto:f9,disabled:_9,plusTooltip:g9,checkbox:v9,skeleton:y9},b9=e=>{const{color:n,disabled:o,denomination:s,currency:r,billsAmount:a,selectedAmount:c,onSelectBill:l,selectedBillsIds:d,selectedBills:u,showPreviewButton:p}=e,{openModal:m,closeModal:h,isModalOpen:f}=Mn(),_=Bt(ks),[v,g]=i.useState(0),C=d.length>=qo,[y,{data:b,isFetching:x}]=Qt.useLazyGetBillsQuery(),N=(b==null?void 0:b.bills)??[],S=(b==null?void 0:b.billsCount)??a,j=c>=S||x||C,$=C?`Maximum ${qo} Bills selected`:c>=S?"No more Bills available":"Loadingâ¦",T=i.useCallback(()=>{N.length===0&&v>0||(y({currencyKey:r.key,nominal:s,count:Bi,offset:v}),g(R=>R+Bi))},[N.length,r.key,s,y,v]),M=()=>{if(I){A(!1);return}z(!0),requestAnimationFrame(()=>{A(!0)})},[P,B]=i.useState(c),[I,A]=i.useState(P>0),[W,z]=i.useState(I);i.useEffect(()=>{if(I){z(!0);return}const R=setTimeout(()=>{z(!1)},200);return()=>clearTimeout(R)},[I]);const G=i.useRef(null),K=async R=>{z(!0),requestAnimationFrame(()=>{A(!0)});const Y=u[s]||[];if(R>c){const X=R-c;let Ne=[];if(R>N.length){const Be=Math.ceil(Math.max(Bi,R)/10)*10,Pn=await y({currencyKey:r.key,nominal:s,count:Be,offset:0}).unwrap();g(Be),Ne=(Pn.bills??[]).filter(In=>!d.includes(In.id))}
57else Ne=N.filter(Be=>!d.includes(Be.id));const Le=Ne.slice(0,X);Le.length>0&&l(s,Le,"add")}else if(R<c){const X=c-R,Ne=Y.slice(-X);Ne.length>0&&l(s,Ne,"remove")}},ee=()=>{if(C)return;const R=c+1;S>=R&&K(R)},ie=()=>{const R=c-1;R>=0&&K(R)},U=R=>{if(x)return;const Y=R.target.value;if(!Sn(Y))return;const X=Number(Y),Ne=X+d.length-c;X>S||X>qo||X>P&&Ne>qo||(G.current&&clearTimeout(G.current),B(X),G.current=setTimeout(()=>{K(X)},500))},F=R=>{l(s,R)};return i.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),i.useEffect(()=>{B(c)},[c]),t.jsxs("div",{className:L(ce.wrapper,ce[n]),children:[t.jsxs("div",{className:L(ce.container,{[ce.disabled]:o}),children:[t.jsxs("div",{className:ce.info,children:[t.jsxs("span",{children:[q(Number(s),r.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",r.ticker]}),t.jsx("p",{children:S===1?"1 Bill":`${S} Bills`})]}),t.jsxs("div",{className:ce.counter,children:[t.jsx("button",{onClick:ie,className:L({[ce.disabledEl]:c<=0||x}),children:"-"}),t.jsx("input",{value:P||0,placeholder:"0",onChange:U,className:L(ce.amount,{[ce.amountSelected]:c>0})}),j?t.jsx("span",{className:ce.plusTooltip,children:t.jsx(Ar,{value:$,pointerPosition:"bottom-right",children:t.jsx("button",{type:"button",className:ce.disabledEl,disabled:!0,"aria-label":$,children:"+"})})}):t.jsx("button",{type:"button",onClick:ee,children:"+"})]}),!_&&t.jsxs("div",{className:ce.totalCost,children:[t.jsx("span",{children:"Total Amount of Selected Bills"}),t.jsxs("p",{children:[q(Number(s)*c,r.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",r.ticker]})]}),t.jsx("button",{onClick:M,className:L(ce.buttonList,{[ce.buttonListActive]:I}),children:t.jsx(nr,{})})]}),t.jsx("div",{className:L(ce.listCollapse,{[ce.listCollapseOpen]:I}),children:t.jsx("div",{className:ce.listCollapseInner,children:W&&t.jsx("div",{className:ce.list,children:t.jsx("div",{className:L(ce.listContainer,{[ce.heightAuto]:N.length<6}),children:t.jsx(xs,{hasMore:N.length<S,loader:t.jsx(H,{count:Math.min(S,3),className:ce.skeleton}),loadMore:T,isLoading:x,children:N.map(R=>t.jsxs(E.Fragment,{children:[t.jsxs("div",{className:L(ce.listItem,{[ce.disabled]:(c>=S||C||x)&&!d.includes(R.id)}),children:[t.jsx(ci,{onClick:()=>F(R),checked:d.includes(R.id),className:ce.checkbox,"aria-label":`Select bill ${R.serial}`}),t.jsx("span",{className:ce.serialNumber,children:Zd(R.serial)}),t.jsxs("div",{className:ce.actions,children:[p&&t.jsx("button",{type:"button",className:ce.actionBtn,onClick:()=>m(`preview_${R.serial}`),"aria-label":"Preview SoftNote",children:t.jsx(E4,{"aria-hidden":!0})}),t.jsx(it,{value:R.serial,className:ce.actionBtn})]})]},R.id),f(`preview_${R.serial}`)&&t.jsx(K4,{isOpen:f(`preview_${R.serial}`),onClose:h,softnoteData:{serialNumber:R.serial,color:n,status:n==="blue"||n==="green"?ms.InWallet:ms.Coinaged,currencyInfo:r,nominal:s,token:R.address}})]},R.id))})})})})})]})},x9="_wrapper_bvmlz_1",C9="_clear_bvmlz_9",k9="_disabled_bvmlz_20",w9="_list_bvmlz_30",j9="_skeleton_bvmlz_37",cr={wrapper:x9,clear:C9,disabled:k9,list:w9,skeleton:j9},S9=e=>{const{combinations:n,currency:o,hubColor:s,isLoading:r=!1,onSelectBill:a,selectedBills:c,selectedBillsIds:l,resetSelectedBills:d,showPreviewButton:u}=e,p=()=>{d()},m=l.length===0,h=(n==null?void 0:n.reduce((f,{count:_})=>f+_,0))??0;return r?t.jsx("div",{className:cr.wrapper,children:t.jsx("div",{className:cr.list,children:t.jsx(H,{count:(n==null?void 0:n.length)??3,className:cr.skeleton})})}):h>0?t.jsxs("div",{className:cr.wrapper,children:[t.jsx("button",{className:L(cr.clear,{[cr.disabled]:m}),onClick:p,children:"Clear"}),t.jsx("div",{className:cr.list,children:n==null?void 0:n.map(f=>{var _;return t.jsx(b9,{color:s,denomination:f.nominal,currency:o,billsAmount:f.count,selectedAmount:((_=c[f.nominal])==null?void 0:_.length)??0,onSelectBill:a,selectedBillsIds:l,selectedBills:c,showPreviewButton:u},f.nominal)})})]}):t.jsx(zd,{stripe:s})},mi=E.memo(S9),Tr=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M5 12L19 12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10 7L5 12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}
57),i.createElement("path",{d:"M10 17L5 12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Xd=e=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...e},i.createElement("g",null,i.createElement("path",{d:"M19 9V17.5C19 18.8807 17.8807 20 16.5 20H7.5C6.11929 20 5 18.8807 5 17.5V9"}),i.createElement("path",{d:"M21 5H3"}),i.createElement("path",{d:"M15 9C15 10.6569 13.6569 12 12 12C10.3431 12 9 10.6569 9 9"}),i.createElement("path",{d:"M14.5 16H9.5"}))),Jd=e=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",preserveAspectRatio:"none",...e},i.createElement("g",null,i.createElement("path",{d:"M10.5852 16.416C10.013 15.8438 9.84178 14.9832 10.1515 14.2355C10.4612 13.4878 11.1907 13.0003 12 13.0003C12.8093 13.0003 13.5389 13.4878 13.8485 14.2355C14.1582 14.9832 13.987 15.8438 13.4148 16.416C13.0396 16.7913 12.5307 17.0021 12 17.0021C11.4694 17.0021 10.9604 16.7913 10.5852 16.416",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.5023 17.0021V13.0004",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M6.49771 17.0021V13.0004",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12 7.99833V2.99625",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.0008 4.99708L12 2.99625L9.99918 4.99708",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.0017 8.99875H19.0029C19.5336 8.9986 20.0426 9.20936 20.4179 9.58462C20.7931 9.95988 21.0038 10.4689 21.0038 10.9996V19.0029C21.0038 19.5336 20.7931 20.0426 20.4179 20.4179C20.0426 20.7931 19.5336 21.0039 19.0029 21.0037H4.99709C4.46639 21.0039 3.95738 20.7931 3.58212 20.4179C3.20686 20.0426 2.99625 19.5336 2.99625 19.0029V10.9996C2.99625 10.4689 3.20686 9.95988 3.58212 9.58462C3.95738 9.20936 4.46639 8.9986 4.99709 8.99875H7.99834",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})));var Pe=(e=>(e[e.green=0]="green",e[e.blue=1]="blue",e))(Pe||{}),mn=(e=>(e[e.turnOff=0]="turnOff",e[e.disabled=1]="disabled",e[e.enabled=2]="enabled",e[e.new=3]="new",e))(mn||{}),N9=(e=>(e[e.INVALID=0]="INVALID",e[e.BLOCKED=1]="BLOCKED",e[e.ALREADY=2]="ALREADY",e))(N9||{});const L9=wn.injectEndpoints({endpoints:e=>({getBalance:e.query({query:({currencyKey:n})=>({url:`/v1/balance/${n}`,method:"GET"}),providesTags:(n,o,{currencyKey:s})=>[{type:"SoftnoteBalance",id:s}]}),getCurrencies:e.query({query:()=>({url:"/v1/currencies",method:"GET"})}),getAvailableSoftnotesForExport:e.query({query:({currencyKey:n})=>({url:`/v1/export/data/${n}`,method:"GET"}),providesTags:["AvaliableSoftNotesForExport"]}),exportSoftnotes:e.mutation({query:({currencyKey:n,combination:o})=>({url:`/v1/export/${n}`,method:"POST",body:{combination:o}}),invalidatesTags:(n,o,{currencyKey:s})=>o?[]:["XPortBalance","XPortBills","AvaliableSoftNotesForExport",{type:"SoftnoteBalance",id:s}]}),import:e.mutation({query:n=>({url:"/v1/import",method:"POST",body:n}),invalidatesTags:(n,o,s)=>o?[]:["XPortBalance","XPortBills"]}),swap:e.mutation({query:n=>({url:"/v1/swap",method:"POST",body:n}),invalidatesTags:(n,o,{currencyFrom:s})=>o?[]:[{type:"XPortBalance",id:s},{type:"XPortBalance",id:"all"},{type:"XPortBills",id:s}]}),getSwapCurrencies:e.query({query:()=>({url:"v1/swap/currencies",method:"GET"})})})});function E9(e){const n=i.useRef(e);return i.useLayoutEffect(()=>{n.current=e},[e]),n}function hi(e){const{status:n,color:o}=e??{},s=E9(n),{data:r,isFetching:a,error:c}=L9.useGetCurrenciesQuery();return{currencies:i.useMemo(()=>{let d=(r==null?void 0:r.payload)??[];const u=Array.isArray(s.current)?p=>s.current.includes(p.softNoteStatus):s.current!==void 0?p=>p.softNoteStatus===s.current:p=>p.softNoteStatus>0;if(d=d.filter(u),o!==void 0){const p=o===Pe.green?m=>m.id>500:m=>m.id<500;d=d.filter(p)}return d},[o,r==null?void 0:r.payload,s]),isFetching:a,error:c}}function Gt(e){return Object.entries(e).reduce((n,[o,s])=>{const r=Number(o),a=s.length;return{totalCount:n.totalCount+a,totalAmount:n.totalAmount+r*a}},{totalCount:0,totalAmount:0})}const Nt=e=>e?`${e.ticker.toUpperCase()} (${e.protocol.toUpperCase()})`:"",eu=e=>`${e.network}|${e.protocol}`,ws=e=>{const n=e.split("-");return{network:n[0].toUpperCase(),protocol:n[1].toUpperCase(),ticker:n[2].toUpperCase()}};var vt=(e=>(e.user="user",e.pool="pool",e))(vt||{});function rr(e){if(!e)return"";if(Array.isArray(e))return $9(e);const n=[];for(const o in e){const s=ic(Number(o),8),r=Array.isArray(e[o])?e[o].length:e[o];n.push(`${r}x${s}`)}return n.join(", ")}function $9(e){return e.map(({denomination:n,amount:o})=>`${o}x${n}`).join(", ")}function h1(e){return{[vt.user]:"my bills to fill",[vt.pool]:"pool bills to fill"}[e]??""}function tu(e){if(!e)return;
57const{amount_bills:n,count_bills:o,currency:s,decimal:r=8}=e;return`${q(n,r)} ${String(s).toUpperCase()} / ${o} Bills`}const Ze=e=>{!se.get(re.isCookieAccepted)||typeof window>"u"||(window.dataLayer=window.dataLayer||[],window.dataLayer.push(e))},T9="_table_1mone_1",M9="_panel_1mone_7",D9="_tableRow_1mone_14",P9="_tablelabel_1mone_30",I9="_tableValue_1mone_39",Ps={table:T9,panel:M9,tableRow:D9,tablelabel:P9,tableValue:I9},lt=e=>{const{data:n,className:o,variant:s="panel"}=e;return t.jsx("div",{className:L(Ps.table,s==="panel"&&Ps.panel,o),children:n.map((r,a)=>r.renderRow?r.renderRow(r,a):t.jsxs("div",{className:Ps.tableRow,children:[t.jsx("div",{className:Ps.tablelabel,children:r.label}),t.jsx("div",{className:Ps.tableValue,children:r.value})]},String(r.label)+a))})},B9="_wrapper_vim7m_1",R9="_header_vim7m_10",A9="_left_vim7m_17",O9="_toggleButton_vim7m_20",F9="_body_vim7m_34",q9="_bills_vim7m_39",W9="_billItem_vim7m_48",V9="_serial_vim7m_53",H9="_open_vim7m_58",Ot={wrapper:B9,header:R9,left:A9,toggleButton:O9,body:F9,bills:q9,billItem:W9,serial:V9,open:H9},Lo=e=>{const{nominal:n,bills:o,currency:s}=e,[r,a]=i.useState(!1),c=()=>a(d=>!d),l=Bt(Cs);return t.jsxs("div",{className:L(Ot.wrapper,{[Ot.open]:r}),children:[t.jsxs("div",{className:Ot.header,children:[t.jsxs("span",{className:Ot.left,children:[q(n,s.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",s.ticker," x ",o.length," Bill(s)"]}),t.jsxs("span",{className:Ot.right,children:[o.length," Bill(s)"]}),l?t.jsx("button",{className:Ot.toggleButton,onClick:c,children:t.jsx(nr,{})}):t.jsx(Ar,{value:"Сlick to find out more information",pointerPosition:"bottom-right",children:t.jsx("button",{className:Ot.toggleButton,onClick:c,children:t.jsx(nr,{})})})]}),t.jsx("div",{className:Ot.body,children:t.jsx("ul",{className:Ot.bills,children:o.map(d=>{const{nominal:u,serial:p}=d;return t.jsxs("li",{className:Ot.billItem,children:["pin"in d?t.jsxs("div",{children:[t.jsx("span",{className:Ot.serial,children:p}),"/",d.pin]}):t.jsx("span",{children:p}),t.jsxs("span",{children:[q(u,s.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",s.ticker]})]},p)})})})]})};function Eo(e){return i.useMemo(()=>{let n;return Array.isArray(e)?n=Object.groupBy(e,s=>s.nominal.toString()):n=e,Object.entries(n).map(([s,r])=>({nominal:Number(s),bills:r})).sort((s,r)=>s.nominal-r.nominal)},[e])}const U9="_content_1ccpn_1",Y9="_tableRow_1ccpn_7",K9="_tablelabel_1ccpn_14",G9="_softnoteList_1ccpn_23",z9="_footer_1ccpn_30",Z9="_agree_1ccpn_36",Q9="_buttons_1ccpn_42",X9="_footerButton_1ccpn_47",J9="_copySoftnotes_1ccpn_58",e6="_total_1ccpn_64",t6="_totalLabel_1ccpn_70",n6="_totalValue_1ccpn_77",r6="_body_1ccpn_84",s6="_bottomInfo_1ccpn_90",o6="_buttonsInfo_1ccpn_96",a6="_selectedInfo_1ccpn_101",i6="_selectedInfoRow_1ccpn_111",l6="_selectedInfoTotal_1ccpn_126",c6="_selectedInfoValue_1ccpn_138",d6="_footerInfo_1ccpn_142",xe={content:U9,tableRow:Y9,tablelabel:K9,softnoteList:G9,footer:z9,agree:Z9,buttons:Q9,footerButton:X9,copySoftnotes:J9,total:e6,totalLabel:t6,totalValue:n6,body:r6,bottomInfo:s6,buttonsInfo:o6,selectedInfo:a6,selectedInfoRow:i6,selectedInfoTotal:l6,selectedInfoValue:c6,footerInfo:d6},u6=e=>{const{isLoading:n,error:o,selectedBills:s,currency:r,onExport:a,onClickBack:c,source:l}=e,[d,u]=i.useState(!1),p=()=>u(h=>!h);Gt(s);const m=Eo(s);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Export SoftNote(s)",subtitle:"Review bills and confirm the export.",onBackClick:l==="billsPage"?c:void 0}),t.jsxs(D.Body,{className:xe.content,children:[t.jsx(V,{variant:"warning",title:"Attention",message:"You are in export mode. After export your banknote will be in off-chain mode and will disappear from your wallet balance. In order not to lose your funds, please copy or save the serial number and passcode of the bill."}),o&&t.jsx(V,{variant:"error",message:o,animated:!0}),t.jsx(lt,{data:[{label:"SoftNote",value:t.jsx("div",{className:xe.softnoteList,children:m.map(({nominal:h,bills:f})=>t.jsx(Lo,{nominal:h,bills:f,currency:r},h))}),renderRow:(h,f)=>t.jsxs("div",{className:xe.tableRow,children:[t.jsx("div",{className:xe.tablelabel,children:h.label}),h.value]},String(h.label)+f)}]})]}),t.jsxs(D.Footer,{className:xe.footer,children:[t.jsxs("div",{className:xe.footerInfo,children:[t.jsx("p",{className:xe.disclaimer,children:"After switching to off-chain mode, we are not responsible if user loses bill or forgets passcode."}),t.jsxs("div",{className:xe.agree,onClick:p,children:[t.jsx(ci,{checked:d}),t.jsx("span",{children:"I agree and understand all consequences"})]})]}),t.jsx("div",{className:xe.buttonsInfo,children:t.jsx(O,{disabled:!d,onClick:a,isLoading:n,children:"Export"})})]})]})};var hs=(e=>(e[e.turnOff=0]="turnOff",e[e.disabled=1]="disabled",e[e.enabled=2]="enabled",e[e.new=3]="new",e))(hs||{});const p6="_container_o3awd_1",m6="_softNote_o3awd_8",h6="_softNoteBlueStripe_o3awd_12",f6="_softNoteGreenStripe_o3awd_16",_6="_icon_o3awd_20",g6="_content_o3awd_27",v6="_ticker_o3awd_35",y6="_network_o3awd_43",b6="_balances_o3awd_51",x6="_balance_o3awd_51",C6="_balanceDetails_o3awd_66",Ft={container:p6,softNote:m6,softNoteBlueStripe:h6,softNoteGreenStripe:f6,icon:_6,content:g6,ticker:v6,network:y6,balances:b6,balance:x6,balanceDetails:C6},lc=({currency:e,balance:n,converted:o,bills:s,stripeColor:r})=>{const a=s!==void 0;return t.jsxs("div",{className:L(Ft.container,{[Ft.softNote]:r,[Ft.softNoteBlueStripe]:r==="blue",[Ft.softNoteGreenStripe]:r==="green"}),children:[t.jsx(pn,{currencyKey:e.key,className:Ft.icon,alt:`${e.ticker} icon`}),t.jsxs("div",{className:Ft.content,children:[t.jsx("div",{className:Ft.ticker,children:e.ticker}),t.jsxs("div",{className:Ft.network,children:[e.network," (",e.protocol,")"]})]}),t.jsx("div",{className:Ft.balances,children:n!=null&&o!==null&&o!==void 0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:Ft.balance,children:q(n,e.decimal,{trimTrailingZeros:a,omitFractionalPart:a})}),t.jsxs("div",{className:Ft.balanceDetails,children:[a&&t.jsxs(t.Fragment,{children:[s," Bill(s) / "]}),"$",ui(o||0)]})]})})]})};function cc(e){const{includeAllOption:n=!0,excludeZeroBalance:o=!1}=e||{},{data:s,isFetching:r,error:a}=Qt.useGetBalancesQuery();return{currencyOptions:i.useMemo(()=>{const p=[...((s==null?void 0:s.payload)??[]).filter(m=>(m==null?void 0:m.currency)&&(m.currency.softNoteStatus===hs.enabled||m.currency.softNoteStatus===hs.new
57)&&(!o||m.amount!==0))].sort((m,h)=>h.conv-m.conv).map(m=>{const h=`${m.currency.ticker.toUpperCase()} (${m.currency.protocol})`,f=t.jsx(lc,{currency:m.currency,balance:m.amount,converted:m.conv,stripeColor:m.currency.id>=500?"green":"blue",bills:m.combination.reduce((_,v)=>_+v.count,0)});return{value:m.currency.key,label:h,render:f}});return n&&p.unshift({value:"all",label:"All",render:t.jsx(t.Fragment,{children:"All"})}),p},[s==null?void 0:s.payload,o,n]),isFetching:r,error:a}}const k6=e=>{var x,N;const{onSelectCurrency:n,selectedCurrency:o,isCurrenciesLoading:s,onSelectBill:r,selectedBillsIds:a,selectedBills:c,resetSelectedBills:l,onClickNext:d}=e,{currencyOptions:u}=cc({includeAllOption:!1,excludeZeroBalance:!0}),{currentData:p,isFetching:m,error:h}=Qt.useGetBalanceByKeyQuery({currencyKey:(o==null?void 0:o.key)??""},{skip:!o}),f=(x=p==null?void 0:p.payload)==null?void 0:x.currency,_=(N=p==null?void 0:p.payload)==null?void 0:N.combination,v=f??o,g=v?v.id>=500?"green":"blue":void 0,C=(_==null?void 0:_.reduce((S,{count:j})=>S+j,0))??0,{totalAmount:y,totalCount:b}=Gt(c);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Export SoftNote(s)",subtitle:"Select SoftNote bills to export off-chain."}),t.jsxs(D.Body,{className:xe.body,children:[h&&t.jsx(V,{variant:"error",message:Q(h),animated:!0}),t.jsx(Oe,{options:u,selected:o==null?void 0:o.key,label:"Cryptocurrency",onChange:n,placeholder:"Select Currency",isLoading:s,size:"large"}),(m||_)&&g&&v&&t.jsx(mi,{combinations:_,hubColor:g,currency:v,isLoading:m,onSelectBill:r,selectedBillsIds:a,selectedBills:c,resetSelectedBills:l},C+v.key)]}),t.jsxs(D.Footer,{className:xe.bottomInfo,children:[f&&t.jsxs("div",{className:xe.selectedInfo,children:[t.jsxs("div",{className:xe.selectedInfoRow,children:[t.jsx("span",{children:"Bill(s)"}),t.jsxs("span",{children:[b," Bill(s)"]})]}),t.jsxs("div",{className:xe.selectedInfoTotal,children:[t.jsx("span",{children:"Total Amount"}),t.jsxs("span",{className:xe.selectedInfoValue,children:[q(y,f.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",f.ticker]})]})]}),t.jsx("div",{className:xe.buttonsInfo,children:t.jsx(O,{variant:"primary",onClick:d,disabled:y===0||!o,children:"Next"})})]})]})};function ot(e){const n=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}function nu(e,n){const o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0");if(n){const r=String(e.getSeconds()).padStart(2,"0");return`${o}:${s}:${r}`}return`${o}:${s}`}const zt=(e,n,o)=>{const s=Date.parse(e);if(Number.isNaN(s))return"";const r=new Date(s);return n?`${ot(r)}, ${nu(r,o)}`:`${ot(r)}`};function ru(e,n,o){const s=new Date(e).getTime(),a=new Date(n).getTime()-s;return Math.floor(a/1e3/60/60/24)}function w6(e){const n=e.getUTCFullYear(),o=String(e.getUTCMonth()+1).padStart(2,"0"),s=String(e.getUTCDate()).padStart(2,"0"),r=String(e.getUTCHours()).padStart(2,"0"),a=String(e.getUTCMinutes()).padStart(2,"0"),c=String(e.getUTCSeconds()).padStart(2,"0");return`${n}-${o}-${s} ${r}:${a}:${c}`}const j6=(e,n)=>{const o=document.createElement("a"),s=new Blob([e],{type:"text/plain"});o.href=URL.createObjectURL(s),o.download=n,document.body.appendChild(o),o.click()},S6=e=>{const{exportedBills:n,currency:o}=e,s=n.reduce((l,{nominal:d})=>l+d,0),r=Eo(n),a=r.map(({nominal:l,bills:d})=>{const u=`${q(Number(l),o.decimal)} ${o.ticker} X ${d.length} Bill(s)`,p=d.map(m=>`${m.serial}/${m.pin}`).join(` 58`);return`${u} 59${p}`}).join(` 60 61`),c=()=>{const l=`Exported SoftNotes ${ot(new Date)}.txt`;j6(a,l)};return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Export SoftNote(s)",subtitle:"Save serial numbers and passcodes securely."}),t.jsxs(D.Body,{className:xe.content,children:[t.jsx(V,{variant:"success",message:"SoftNote bills exported successfully. Passcodes cannot be recovered â save and secure them properly."}),t.jsxs("div",{className:xe.total,children:[t.jsx("span",{className:xe.totalLabel,children:"Total"}),t.jsxs("span",{className:xe.totalValue,children:[q(s,o.decimal)," ",o.ticker]})]}),t.jsx(lt,{data:[{label:"SoftNote",value:t.jsx("div",{className:xe.softnoteList,children:r.map(({nominal:l,bills:d})=>t.jsx(Lo,{nominal:l,bills:d,currency:o},l))}),renderRow:(l,d)=>t.jsxs("div",{className:xe.tableRow,children:[t.jsx("div",{className:xe.tablelabel,children:l.label}),l.value]},String(l.label)+d)}]})]}),t.jsxs(D.Footer,{children:[t.jsxs(O,{className:xe.footerButton,as:"div",children:[t.jsx(it,{value:a,className:xe.copySoftn
61otes})," ","Copy Text"]}),t.jsxs(O,{className:xe.footerButton,onClick:c,children:[t.jsx(Qd,{}),"Save File"]})]})]})},N6=e=>{const{onClose:n,source:o,selectedBills:s,currency:r,resetSelectedBills:a}=e,[c,l]=i.useState(o==="currencyPage"?"confirm":"init"),{currencies:d,isFetching:u}=hi({status:[mn.enabled,mn.new]}),[p,m]=i.useState(r==null?void 0:r.key),h=d.find(P=>P.key===p),f=di(),_=r||h,v=f.selectedBillsIds,g=s||f.selectedBills,C=a||f.resetSelectedBills,[y,{data:b,isLoading:x,error:N,reset:S}]=Qt.useExportMutation(),j=()=>{_&&(y({currencyKey:_.key,stack:v}),Ze({event:"bills_export_attempt",currency:Nt(_),amount:Gt(g).totalAmount,summary:rr(g)}))},$=P=>{m(P),C()},T=()=>{l("confirm")},M=()=>{o==="billsPage"?(S(),l("init")):n()};return i.useEffect(()=>{b!=null&&b.payload.exported.length&&(Ze({event:"bills_export_success",currency:Nt(_),amount:Gt(g).totalAmount,summary:rr(g)}),C(),l("result"))},[b,C]),i.useLayoutEffect(()=>{!v.length&&c!=="result"&&o==="currencyPage"&&n()},[v,c]),t.jsxs(t.Fragment,{children:[c==="init"&&t.jsx(k6,{selectedCurrency:h,isCurrenciesLoading:u,onSelectBill:f.toggleSelectBill,selectedBillsIds:v,selectedBills:g,resetSelectedBills:C,onSelectCurrency:$,onClickNext:T}),c==="confirm"&&_&&t.jsx(u6,{isLoading:x,error:Q(N),selectedBills:g,currency:_,onExport:j,onClickBack:M,source:o}),c==="result"&&_&&b&&t.jsx(S6,{currency:_,exportedBills:b.payload.exported})]})},su=e=>{const{isOpen:n,onClose:o,selectedBills:s,currency:r,resetSelectedBills:a,source:c}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(N6,{selectedBills:s,currency:r,resetSelectedBills:a,source:c,onClose:o})})},L6="_tableRow_1y4dj_1",E6="_tablelabel_1y4dj_8",$6="_softnoteList_1y4dj_17",T6="_body_1y4dj_24",M6="_info_1y4dj_30",D6="_bottomInfo_1y4dj_51",P6="_buttons_1y4dj_57",I6="_selectedInfo_1y4dj_62",B6="_selectedInfoRow_1y4dj_72",R6="_selectedInfoTotal_1y4dj_87",A6="_selectedInfoValue_1y4dj_99",O6="_fields_1y4dj_103",F6="_recipient_1y4dj_109",De={tableRow:L6,tablelabel:E6,softnoteList:$6,body:T6,info:M6,bottomInfo:D6,buttons:P6,selectedInfo:I6,selectedInfoRow:B6,selectedInfoTotal:R6,selectedInfoValue:A6,fields:O6,recipient:F6},q6=e=>{const{formik:n,onClickBack:o,onHandover:s,isLoading:r,selectedBills:a,currency:c,error:l,handoverData:d,onClose:u}=e,p=d?d.payload.recipient:n.values.id,m=d?d.payload.bills:Object.values(a).flat(),h=Eo(m),f=m.reduce((_,v)=>_+v.nominal,0);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Send SoftNote(s)",subtitle:d?"Review the transfer details.":"Confirm recipient and SoftNote bills.",onBackClick:d?void 0:o}),t.jsxs(D.Body,{className:De.body,children:[l&&t.jsx(V,{variant:"error",message:l,animated:!0}),d&&t.jsx(V,{variant:"success",message:"SoftNote bills were sent successfully"}),t.jsx(lt,{data:[{label:"To",value:p},{label:"Amount",value:q(f,c.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})},{label:"Currency",value:`${c.ticker} (${c.protocol})`},{label:"SoftNote",value:t.jsx("div",{className:De.softnoteList,children:h.map(({nominal:_,bills:v})=>t.jsx(Lo,{nominal:_,bills:v,currency:c},_))}),renderRow:(_,v)=>t.jsxs("div",{className:De.tableRow,children:[t.jsx("div",{className:De.tablelabel,children:_.label}),_.value]},String(_.label)+v)}]})]}),t.jsx(D.Footer,{children:d?t.jsx(O,{onClick:u,children:"Done"}):t.jsx(O,{variant:"primary",onClick:s,isLoading:r,children:"Send"})})]})},W6=e=>{const{onClose:n,onSelectCurrency:o,formik:s,selectedCurrency:r,isCurrenciesLoading:a,onSelectBill:c,selectedBillsIds:l,selectedBills:d,resetSelectedBills:u,onSubmit:p}=e,{currencyOptions:m}=cc({includeAllOption:!1,excludeZeroBalance:!0}),{data:h,isFetching:f,error:_}=Qt.useGetBalanceByKeyQuery({currencyKey:(r==null?void 0:r.key)??""},{skip:!r}),{currency:v,amount:g,combination:C}=(h==null?void 0:h.payload)??{},y=v?v.id>=500?"green":"blue":void 0,b=(C==null?void 0:C.reduce((S,{count:j})=>S+j,0))??0,{totalAmount:x,totalCount:N}=Gt(d);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Send SoftNote(s)",subtitle:"Choose bills and enter the recipient ID."}),t.jsxs(D.Body,{className:De.body,children:[_&&t.jsx(V,{variant:"error",message:Q(_),animated:!0}),t.jsxs("form",{id:"handover-form",onSubmit:p,className:De.fields,children:[t.jsx(Oe,{options:m,selected:r==null?void 0:r.key,label:"Cryptocurrency",onChange:o,placeholder:"Select Currency",isLoading:a,className:De.crypto,size:"large"}),t.jsx(J,{type:"text",name:"id",value:s.values.id,error:s.errors.id,onChange:s.handleChange,handleClear:()=>s.setFieldValue("id",""),label:"Email or Tectum ID",className:De.recipient}),t.jsx("input",{type:"submit",hidden:!0})]}),h&&t.jsx(t.Fragment,{children:C&&y&&v&&t.jsx(mi,{combinations:C,hubColor:y,currency:v,onSelectBill:c,selectedBillsIds:l,selectedBills:d,resetSelectedBills:u},b+v.key)})]}),t.jsxs(D.Footer,{className:De.bottomInfo,children:[v&&t.jsxs("div",{className:De.selectedInfo,children:[t.jsxs("div",{className:De.selectedInfoRow,children:[t.jsx("span",{children:"Bill
61(s)"}),t.jsxs("span",{children:[N," Bill(s)"]})]}),t.jsxs("div",{className:De.selectedInfoTotal,children:[t.jsx("span",{children:"Total Amount"}),t.jsxs("span",{className:De.selectedInfoValue,children:[q(x,v.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",v.ticker]})]})]}),t.jsx("div",{className:De.buttons,children:t.jsx(O,{type:"submit",form:"handover-form",variant:"primary",disabled:!at(s)||x===0,children:"Next"})})]})]})},V6=e=>{const{onClose:n,formik:o,onSubmit:s,selectedBills:r,currency:a}=e,{totalAmount:c,totalCount:l}=Gt(r);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Send SoftNote(s)",subtitle:"Enter the recipient Email ID or Tectum ID."}),t.jsx(D.Body,{className:De.body,children:t.jsxs("form",{id:"handover-form",onSubmit:s,children:[t.jsx(J,{type:"text",name:"id",value:o.values.id,error:o.errors.id,onChange:o.handleChange,handleClear:()=>o.setFieldValue("id",""),label:"Email ID or Tectum ID"}),t.jsx("input",{type:"submit",hidden:!0})]})}),t.jsxs(D.Footer,{className:De.bottomInfo,children:[a&&t.jsxs("div",{className:De.selectedInfo,children:[t.jsxs("div",{className:De.selectedInfoRow,children:[t.jsx("span",{children:"Bill(s)"}),t.jsxs("span",{children:[l," Bill(s)"]})]}),t.jsxs("div",{className:De.selectedInfoTotal,children:[t.jsx("span",{children:"Total Amount"}),t.jsxs("span",{className:De.selectedInfoValue,children:[q(c,a.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",a.ticker]})]})]}),t.jsx("div",{className:De.buttons,children:t.jsx(O,{type:"submit",form:"handover-form",variant:"primary",disabled:!at(o),children:"Next"})})]})]})};var on=(e=>(e.initBills="initBills",e.initCurrency="initCurrency",e.confirm="confirm",e))(on||{});const H6=2,dc=55,U6=62,Nn=5,sr=6,Y6=()=>Ie().shape({id:ae().required().min(1).max(dc)}),K6=e=>{const{onClose:n,source:o,selectedBills:s,currency:r,resetSelectedBills:a}=e,{currencies:c,isFetching:l}=hi({status:[mn.enabled,mn.new]}),[d,u]=i.useState(r==null?void 0:r.key),p=c.find(A=>A.key===d),m=di(),h=r||p,f=m.selectedBillsIds,_=s||m.selectedBills,v=a||m.resetSelectedBills,[g,C]=i.useState(o==="currencyPage"?on.initCurrency:on.initBills),[y,b]=i.useState(!1),[x,{data:N,isLoading:S,error:j,reset:$}]=Qt.useHandoverMutation(),T=Me({initialValues:{id:""},validationSchema:Y6(),validateOnChange:y,onSubmit:()=>{C(on.confirm)}}),M=A=>{A.preventDefault(),Object.keys(_).length!==0&&(b(!0),T.handleSubmit())},P=()=>{d&&(x({to:T.values.id,stack:f,currencyKey:d}),Ze({event:"bills_handover_attempt",currency:Nt(h),amount:Gt(_).totalAmount,summary:rr(_)}))},B=()=>{$(),C(o==="currencyPage"?on.initCurrency:on.initBills)};i.useEffect(()=>{N&&(Ze({event:"bills_handover_success",currency:Nt(h),amount:Gt(_).totalAmount,summary:rr(_)}),v())},[N,v]),i.useLayoutEffect(()=>{!f.length&&g!==on.confirm&&o==="currencyPage"&&n()},[f,g]);const I=A=>{u(A),v()};return t.jsxs(t.Fragment,{children:[g===on.initBills&&t.jsx(W6,{onClose:n,onSelectCurrency:I,formik:T,isCurrenciesLoading:l,selectedCurrency:p,onSelectBill:m.toggleSelectBill,selectedBillsIds:f,selectedBills:_,resetSelectedBills:v,onSubmit:M}),g===on.initCurrency&&h&&t.jsx(V6,{onClose:n,selectedBills:_,formik:T,onSubmit:M,currency:h}),g===on.confirm&&h&&t.jsx(q6,{formik:T,onClickBack:B,onHandover:P,isLoading:S,selectedBills:_,currency:h,error:Q(j),handoverData:N,onClose:n})]})},ou=e=>{const{isOpen:n,onClose:o,resetSelectedBills:s,selectedBills:r,currency:a,source:c}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(K6,{onClose:o,resetSelectedBills:s,selectedBills:r,currency:a,source:c})})};Pa.injectEndpoints({endpoints:e=>({fetchSoftnote:e.query({query:n=>({url:"/softnote",params:n})}),burnBlue:e.mutation({query:n=>({url:"/softnote/burn",body:n,method:"POST"})}),fetchSoftnotes:e.query({query:n=>({url:"/softnotes/info",body:n,method:"POST"})}),burnSoftnotes:e.query({query:n=>({url:"/softnote/burn/list",body:n,method:"POST"})})})});const Rl=wn.injectEndpoints({endpoints:e=>({burnPrepare:e.query({query:({key:n,banknotes:o})=>({url:`/v1/mint-house/burn/prepare/${n}`,body:{banknotes:o},method:"POST"})}),burn:e.mutation({query:({key:n,...o})=>({url:`/v1/mint-house/burn/${n}`,body:o,method:"POST"})}),burnPrepareBills:e.query({query:({key:n,banknotes:o})=>({url:`/v2/mint-house/burn/prepare/${n}`,body:{banknotes:o},method:"POST"})}),burnBills:e.mutation({query:({key:n,...o})=>({url:`/v2/mint-house/burn/${n}`,body:o,method:"POST"})})})}),f1=300,G6=2e3,Ae=us.injectEndpoints({endpoints:e=>({getCurrencies:e.query({query:()=>({url:"/v1/currencies",method:"GET"})}),getBalance:e.query({query:({key:n,fresh:o})=>({url:`/v1/balance/${n}${o?`?fresh=${o}`:""}`,method:"GET"}),serializeQueryArgs:({queryArgs:n,endpointDefinition:o,endpointName:s})=>{const r={...n};return delete r.fresh,cs({queryArgs:r,endpointDefinition:o,endpointName:s})}
61,keepUnusedDataFor:f1,providesTags:(n,o,s)=>[{type:"Balance",id:s.key}]}),getBalances:e.query({query:()=>({url:"/v1/balances",method:"GET"}),keepUnusedDataFor:f1,providesTags:[{type:"Balance"}]}),initSendCrypto:e.mutation({query:({key:n,...o})=>({url:`/v2/send/initiate/${n}`,method:"POST",body:o})}),completeSendCrypto:e.mutation({query:n=>({url:"/v2/send/complete",method:"POST",body:n})}),getFee:e.query({query:({key:n})=>({url:`/v1/fee/${n}`,method:"GET"})}),getMigrateFee:e.query({query:n=>({url:"/v1/sc/exchange/info",params:n,method:"GET"})}),migrate:e.mutation({query:n=>({url:"/v1/sc/exchange",method:"POST",body:n})}),migrateBeta:e.mutation({query:n=>({url:"/v1/sc/migrate/token",method:"POST",body:n})}),getQuote:e.query({query:({currencyKey:n})=>({url:`/v2/sc/quote/${n}`,method:"GET"})}),getSwapInfo:e.query({query:({currencyFrom:n,currencyTo:o})=>({url:`/v1/sc/swap/rate/${n}/${o}`,method:"GET"})}),swapQuote:e.query({query:n=>({url:"/v1/sc/swap/quote",method:"POST",body:n})}),swap:e.mutation({query:n=>({url:"/v1/sc/swap",method:"POST",body:n})}),migrateExternalInitiate:e.mutation({query:n=>({url:"/v1/sc/exchange/external/input/initiate",method:"POST",body:n})}),migrateExternalConfirm:e.mutation({query:n=>({url:"/v1/sc/exchange/external/input/confirm",method:"POST",body:n})}),migrateExternalOutput:e.mutation({query:n=>({url:"/v1/sc/exchange/external/output",method:"POST",body:n})}),getExternalMigrationStatus:e.query({query:({id:n})=>({url:`/v1/sc/exchange/external/check/${n}`,method:"GET"})}),payEpos:e.mutation({query:n=>({url:"/v1/epos/qr",method:"POST",body:n})}),getSwapCurrencies:e.query({query:()=>({url:"/v1/sc/swap/currencies",method:"GET"})})})});var mt=(e=>(e[e.processing=0]="processing",e[e.success=1]="success",e[e.error=-1]="error",e))(mt||{}),Mr=(e=>(e[e.minting=0]="minting",e[e.filling=1]="filling",e[e.burning=2]="burning",e))(Mr||{});const z6="_wrapper_4ygdo_1",Z6="_green_4ygdo_11",Q6="_blue_4ygdo_16",X6="_info_4ygdo_21",J6="_totalCost_4ygdo_42",Is={wrapper:z6,green:Z6,blue:Q6,info:X6,totalCost:J6},e8=e=>q(Number(e.denomination)*e.amount,e.currency.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0}),fi=e=>{const{softnotes:n,totalLabel:o,calcTotal:s=e8,totalTicker:r}=e;return n!=null&&n.length?n.sort((a,c)=>Number(a.denomination)-Number(c.denomination)).map(a=>t.jsxs("div",{className:L(Is.wrapper,{[Is.green]:a.type===Pe.green,[Is.blue]:a.type===Pe.blue}),children:[t.jsxs("div",{className:Is.info,children:[t.jsxs("span",{children:[q(Number(a.denomination),a.currency.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",a.currency.ticker]}),t.jsxs("p",{children:[a.amount," Bill(s)"]})]}),t.jsxs("div",{className:Is.totalCost,children:[t.jsx("span",{children:o}),t.jsxs("p",{children:[s(a)," ",r??a.currency.ticker]})]})]},a.denomination)):null},St=wn.injectEndpoints({endpoints:e=>({getOptions:e.query({query:()=>({url:"/v1/mint-house/options",method:"GET"})}),getInfo:e.query({query:()=>({url:"/v1/mint-house",method:"GET"})}),getCurrencyInfo:e.query({query:({currencyKey:n})=>({url:`/v1/mint-house/${n}`,method:"GET"}),providesTags:(n,o,{currencyKey:s})=>[{type:"MintHouse",id:s}]}),getRequests:e.query({query:n=>{const o={key:n.key,limit:n.limit,offset:n.offset};return n.type!=="all"&&(o.type=n.type),{url:"/v1/mint-house/requests",params:o,method:"GET"}},serializeQueryArgs:({queryArgs:n,endpointDefinition:o,endpointName:s})=>{const r={...n};return delete r.offset,cs({queryArgs:r,endpointDefinition:o,endpointName:s})},merge:(n,o,{arg:{offset:s}})=>{if(s===0){n.payload=o.payload;return}n.payload.requests.push(...o.payload.requests)},forceRefetch({currentArg:n,previousArg:o}){return n!==o}}),getRequestByKey:e.query({query:({key:n})=>({url:`/v1/mint-house/request/${n}`,method:"GET"})}),getState:e.query({query:({currencyKey:n,type:o})=>({url:`/v1/mint-house/state/${n}`,params:{type:o},method:"GET"}),keepUnusedDataFor:0}),getMintData:e.query({query:({currencyKey:n})=>({url:`/v1/mint-house/mint/data/${n}`,method:"GET"})}),mint:e.mutation({query:({key:n,bills:o})=>({url:`/v1/mint-house/mint/${n}`,method:"POST",body:{bills:o}})}),getUserStack:e.query({query:({currencyKey:n})=>({url:`/v1/mint-house/mint/stack/my/${n}`,method:"GET"}),providesTags:(n,o,{currencyKey:s})=>[{type:"EmitUserStack",id:s}]}),getPoolStack:e.query({query:({currencyKey:n})=>({url:`/v1/mint-house/mint/stack/${n}`,method:"GET"}),providesTags:(n,o,{currencyKey:s})=>[{type:"EmitPoolStack",id:s}]}),getUserSoftNotes:e.query({query:({currencyKey:n,...o})=>({url:`/v1/mint-house/mint/my/sn/${n}`,params:o,method:"GET"}),serializeQueryArgs:({queryArgs:n,endpointDefinition:o,endpointName:s})=>{const r={...n};return delete r.offset,delete r.limit,cs({queryArgs:r,endpointDefinition:o,endpointName:s})},merge:(n,o,{arg:{offset:s}})=>{if(s===0){n.payload=o.payload;return}n.payload.push(...o.payload)},forceRefetch({currentArg:n,previousArg:o}){return n!==o}}),fill:e.mutation({query:({currencyKey:n,...o})=>({url:`/v2/mint-house/fill/${n}`,method:"POST",body:o})})})}),au=1,iu=1e3,t8=100,n8=1e3,r8=3e4,Bs=10;function _i({currencyKey:e,operationType:n}){var d,u;const[o,s]=i.useState(null),{data:r,refetch:a}=St.useGetStateQuery({currencyKey:e,type:n}),{data:c}=St.useGetRequestByKeyQuery({key:((d=r==null?void 0:r.payload.process)==null?void 0:d.key)||""},{pollingInterval:r8,skip:!((u=r==null?void 0:r.payload.process)!=null&&u.key)||(o==null?void 0:o.status)!==mt.processing});i.useEffect(()=>{if(!r)return;const{notification:p,process:m}=r.payload;s(p||m||null)},[r]);const l=En();return i.useEffect(()=>{if(!c)return;const p=c.payload;s(p),(p==null?void 0:p.status)===mt.success&&(n===Mr.filling?l(St.util.invalidateTags([{type:"MintHouse",id:e},{type:"XPortBalance"},{type:"XPortBills"}])):n===Mr.minting&&l(St.util.invalidateTags([{type:"MintHouse",id:e}])))},[c,n,e,l]),{lastRequest:o,resetRequest:()=>s(null),refetchState:a}}const $o="The SoftNote minting and burning service has been updated. We are currently fixing technical issues affecting certain bills. If you encounter an error, please contact support.",s8="_content_17duw_1",o8="_softnotes_17duw_7",a8="_select_17duw_13",i8="_selectLabel_17duw_17",l8="_skeleton_17duw_23",c8="_total_17duw_27",d8="_totalLabel_17duw_34",u8="_totalValue_17duw_38",p8="_tableRow_17duw_43",m8="_tablelabel_17duw_50",h8="_softnoteList_17duw_59",f8="_link_17duw_66",_8="_textAreaErrors_17duw_70",g8="_textAreaWarning_17duw_74",v8="_alert_17duw_78",y8="_bottomInfo_17duw_82",b8="_buttonsInfo_17duw_88",x8="_body_17duw_93",C8="_selectedInfo_17duw_99",k8="_selectedInfoRow_17duw_109",w8="_selectedInfoTotal_17duw_124",j8="_selectedInfoValue_17duw_136",oe={content:s8,softnotes:o8,select:a8,selectLabel:i8,skeleton:l8,total:c8,totalLabel:d8,totalValue:u8,tableRow:p8,tablelabel:m8,softnoteList:h8,link:f8,textAreaErrors:_8,textAreaWarning:g8,alert:v8,bottomInfo:y8,buttonsInfo:b8,body:x8,selectedInfo:C8,selectedInfoRow:k8,selectedInfoTotal:w8,selectedInfoValue:j8},S8=e=>{const{onClose:n,softnotes:o,totalCount:s,totalAmount:r,currency:a,serialNumbers:c,resetSelectedBills:l,isOpen:d,onClickBack:u,source:p,selectedBills:m}=e,{lastRequest:h}=_i({currencyKey:a.key,operationType:Mr.burning}),f=(h==null?void 0:h.status)===mt.processing,[_,{isSuccess:v,error:g,isLoading:C}]=Rl.useBurnBillsMutation(),y=()=>{_({key:a.key,fee:0,currenciesFill:a.key,banknotes:c})},{data:b,error:x,isLoading:N}=Ae.useGetFeeQuery({key:a.key}),S=b==null?void 0:b.payload.fee,j=Math.max(r-(S||0),0),$=En();i.useEffect(()=>
61{v&&!d&&(l(),$(Qt.util.invalidateTags([{type:"XPortBalance",id:a.key},{type:"XPortBalance",id:"all"},{type:"XPortBills",id:a.key}])))},[d,v]);const T=Eo(m);return v&&j!==void 0?t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"To My Crypto",subtitle:"Review the conversion details."}),t.jsxs(D.Body,{className:oe.content,children:[t.jsx(V,{message:"Your SoftNote(s) are being burned. This may take some time â funds will appear in My Crypto when complete.",variant:"success"}),t.jsxs("div",{className:oe.total,children:[t.jsx("span",{className:oe.totalLabel,children:"You Received"}),t.jsxs("span",{className:oe.totalValue,children:[q(j,a.decimal)," ",a.ticker]})]}),t.jsx(lt,{data:[{label:"Currency",value:`${a.ticker} (${a.protocol})`},{label:"Total Bills",value:`${s} Bills`},{label:"Total Amount Burned",value:`${q(r,a.decimal)} ${a.ticker}`},{label:"Network Fee",value:a&&S!==void 0&&`${q(S,a.decimal)} ${a.ticker}`},{label:"To",value:"My Crypto"},{label:"SoftNote",value:t.jsx("div",{className:oe.softnoteList,children:T.map(({nominal:M,bills:P})=>t.jsx(Lo,{nominal:M,bills:P,currency:a},M))}),renderRow:(M,P)=>t.jsxs("div",{className:oe.tableRow,children:[t.jsx("div",{className:oe.tablelabel,children:M.label}),M.value]},String(M.label)+P)}]})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:n,children:"Done"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"To My Crypto",subtitle:"Confirm bills and network fee.",onBackClick:p==="billsPage"?u:void 0}),t.jsxs(D.Body,{className:oe.content,children:[f&&t.jsx(V,{title:"Attention",message:"Youâre already burning SoftNote(s). Please wait until the process is complete.",variant:"warning"}),(g||x)&&t.jsx(V,{message:Q(g||x),variant:"error",animated:!0}),t.jsx(lt,{data:[{label:"Total Bills",value:`${s} Bills`},{label:"Total Amount",value:`${q(r,a.decimal)} ${a.ticker}`},{label:"Network Fee",value:a&&S!==void 0&&!N?`${q(S,a.decimal)} ${a.ticker}`:t.jsx(H,{className:oe.skeleton})},{label:"You Receive",value:a&&j!==void 0&&!N?`${q(j,a.decimal)} ${a.ticker}`:t.jsx(H,{className:oe.skeleton})}]}),t.jsxs("div",{className:oe.softnotes,children:[t.jsx("div",{className:oe.tablelabel,children:"SoftNote"}),t.jsx(fi,{softnotes:o,totalLabel:"Amount"})]})]}),t.jsxs(D.Footer,{className:oe.bottomInfo,children:[t.jsx(V,{variant:"warning",message:$o}),t.jsx(O,{onClick:y,disabled:N||!!(S&&r<S)||f,isLoading:C,children:"To My Crypto"})]})]})},N8="_wrapper_10kd4_1",L8="_hidden_10kd4_6",E8="_reveal_10kd4_1",$8="_content_10kd4_14",T8="_label_10kd4_22",M8="_buttons_10kd4_32",D8="_button_10kd4_32",P8="_selected_10kd4_53",I8="_rateLabel_10kd4_60",B8="_amount_10kd4_69",R8="_skeleton_10kd4_93",Jt={wrapper:N8,hidden:L8,reveal:E8,content:$8,label:T8,buttons:M8,button:D8,selected:P8,rateLabel:I8,amount:B8,skeleton:R8},_1=[{label:"Low",rate:1},{label:"Average",rate:3},{label:"High",rate:10}],lu=e=>{const{initialFee:n,feeCurrency:o,isLoading:s,onChange:r,className:a}=e,c=_1[1].rate,[l,d]=i.useState(c),u=n*l,p=!!o&&n>0&&!(o!=null&&o.fixFee);i.useEffect(()=>{r(o!=null&&o.fixFee?n:u)},[u,o==null?void 0:o.fixFee,n,r]);const m=h=>{s||d(h)};return t.jsx("div",{className:L(Jt.wrapper,a,{[Jt.hidden]:!p}),"aria-hidden":!p,children:t.jsxs("div",{className:Jt.content,children:[t.jsx("div",{className:Jt.label,children:"Transaction speed"}),t.jsx("div",{className:Jt.buttons,children:_1.map(({label:h,rate:f})=>t.jsxs("button",{className:L(Jt.button,{[Jt.selected]:f===l}),onClick:()=>m(f),type:"button",disabled:s||!p,children:[t.jsx("span",{className:Jt.rateLabel,children:h}),t.jsx("span",{className:Jt.amount,children:s?t.jsx(H,{className:Jt.skeleton,variant:f===l?"light":"default"}):t.jsxs(t.Fragment,{children:[o&&q(f*n,o.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",o==null?void 0:o.ticker]})})]},f))})]})})},cu=2*60,A8=6e4,O8=e=>{const{onClose:n,softnotes:o,totalCount:s,totalAmount:r,currency:a,serialNumbers:c,selectedBills:l,resetSelectedBills:d,isOpen:u,onClickBack:p,source:m}=e,h=En(),{lastRequest:f}=_i({currencyKey:a.key,operationType:Mr.burning}),_=(f==null?void 0:f.status)===mt.processing,[v,{isSuccess:g,error:C,isLoading:y}]=Rl.useBurnBillsMutation(),{data:b,error:x,isFetching:N}=Rl.useBurnPrepareBillsQuery({key:a.key,banknotes:c},{skip:g||!c.length}),S=i.useMemo(()=>{var R;return((R=b==null?void 0:b.currenciesFill)==null?void 0:R.map(Y=>({value:Y.key,label:`${Y.network} (${Y.protocol})`})))??[]},[b==null?void 0:b.currenciesFill]),[j,$]=i.useState();i.useEffect(()=>{if(!S.length){$(void 0);return}S.find(Y=>Y.value===j)||$(S[0].value)},[S,j]);const T=R=>{$(R)},{data:M,isFetching:P,error:B}=Ae.useGetFeeQuery({key:j||""},{pollingInterval:g?void 0:cu*1e3,skip:!j}),{currencyFee:I,currency:A,fee:W=0}=(M==null?void 0:M.payload)??{},[z,G]=i.useState(0),K=I&&A&&I.price/A.price*z,ee=Math.max(r-(K||0),0),ie=()=>{if(!j)return;const R=Number(z.toFixed((I==null?void 0:I.decimal)??8));v({key:a.key,fee:R,currenciesFill:j,banknotes:c})},U=x||C||B,F=Eo(l);return i.useEffect(()=>{g&&!u&&(d(),h(Qt.util.invalidateTags([{type:"XPortBalance",id:a.key},{type:"XPortBalance",id:"all"},{type:"XPortBills",id:a.key}])))},[u,g]),g&&ee!==void 0?t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"To My Crypto",subtitle:"Review the conversion details."}),t.jsxs(D.Body,{className:oe.content,children:[t.jsx(V,{message:"Your SoftNote(s) are being burned. This may take some time â funds will appear in My Crypto when complete.",variant:"success"}),t.jsxs("div",{className:oe.total,children:[t.jsx("span",{className:oe.totalLabel,children:"You Received"}),t.jsxs("span",{className:oe.totalValue,children:[q(ee,a.decimal)," ",a.ticker]})]}),t.jsx(lt,{data:[{label:"Currency",value:`${a.ticker} (${a.protocol})`},{label:"Total Bills",value:`${s} Bills`},{label:"Total Amount Burned",value:`${q(r,a.decimal)} ${a.ticker}`},{label:"Network Fee",value:A&&K!==void 0&&`${q(K,A.decimal)} ${A.ticker}`},{label:"To",value:"My Crypto"},{label:"SoftNote",value:t.jsx("div",{className:oe.softnoteList,children:F.map(({nominal:R,bills:Y})=>t.jsx(Lo,{nominal:R,bills:Y,currency:a},R))}),renderRow:(R,Y)=>t.jsxs("div",{className:oe.tableRow,children:[t.jsx("div",{className:oe.tablelabel,children:R.label}),R.value]},String(R.label)+Y)}]})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:n,children:"Done"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"To My Crypto",subtitle:"Confirm network, fee and bills.",onBackClick:m==="billsPage"?p:void 0}),t.jsxs(D.Body,{className:oe.content,children:[_&&t.jsx(V,{title:"Attention",message:"Youâre already burning SoftNote(s). Please wait until the process is complete.",variant:"warning"}),U&&t.jsx(V,{message:Q(U),variant:"error",animated:!0}),t.jsx(Oe,{className:oe.select,options:S,selected:j,onChange:T,readOnly:S&&S.length<=1,label:t.jsxs("div",{className:oe.selectLabel,children:["Network"," ",t.jsx(Ar,{value:"Select the network address to withdraw liquidity from SoftNote",pointerPosition:"left-top"})]}),isLoading:N}),t.jsx(lt,{data:[{label:"Total Bills",value:`${s} Bills`},{label:"Total Amount",value:`${q(r,a.decimal)} ${a.ticker}`},{label:"Network Fee",value:A&&K!==void 0&&!P?`${q(K,A.decimal)} ${A.ticker}`:t.jsx(H,{className:oe.skeleton})},{label:"You Receive",value:A&&ee!==void 0&&!P?`${q(ee,A.decimal)} ${A.ticker}`:t.jsx(H,{className:oe.skeleton})}]}),t.jsx(lu,{initialFee:W,feeCurrency:I,isLoading:P||!b,onChange:G}),t.jsxs("div",{className:oe.softnotes,children:[t.jsx("div",{className:oe.tablelabel,children:"SoftNote"}),t.jsx(fi,{softnotes:o,totalLabel:"Amount"})]})]}),t.jsxs(D.Footer,{className:oe.bottomInfo,children:[t.jsx(V,{variant:"warning",message:$o}),t.jsx(O,{onClick:ie,disabled:!M||P||N||!!(K&&r<K)||_,isLoading:y,children:"To My Crypto"})]})]})},F8=(e,n)=>Object.entries(e).map(([o,s])=>({denomination:Number(o).toString(),amount:s.length,type:n.id>=500?Pe.green:Pe.blue,currency:n})),q8=e=>{const{onClose:n,selectedBills:o,currency:s,resetSelectedBills:r,isOpen:a,onClickBack:c,source:l}=e,d=s.id>=500?Pe.green:Pe.blue,{totalCount:u,totalAmount:p}=Gt(o),m=F8(o,s),h=Object.values(o).flatMap(_=>_.map(v=>v.serial)),f=d===Pe.blue?S8:O8;return i.useEffect(()=>{u<=0&&n()},[u]),t.jsx(f,{onClose:n,softnotes:m,totalCount:u,totalAmount:p,currency:s,serialNumbers:h,selectedBills:o,resetSelectedBills:r,isOpen:a,onClickBack:c,source:l})},W8=e=>{const{onClose:n,onSelectCurrency:o,selectedCurrency:s,isCurrenciesLoading:r,onSelectBill:a,selectedBillsIds:c,selectedBills:l,resetSelectedBills:d,onClickNext:u}=e,{currencyOptions:p}=cc({includeAllOption:!1,excludeZeroBalance:!0}),{data:m,isFetching:h,error:f}=Qt.useGetBalanceByKeyQuery({currencyKey:(s==null?void 0:s.key)??""},{skip:!s}
61),{currency:_,amount:v,combination:g}=(m==null?void 0:m.payload)??{},C=_?_.id>=500?"green":"blue":void 0,y=(g==null?void 0:g.reduce((N,{count:S})=>N+S,0))??0,{totalAmount:b,totalCount:x}=Gt(l);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"To My Crypto",subtitle:"Select SoftNote bills to convert into crypto."}),t.jsxs(D.Body,{className:oe.body,children:[f&&t.jsx(V,{variant:"error",message:Q(f),animated:!0}),t.jsx(Oe,{options:p,selected:s==null?void 0:s.key,label:"Cryptocurrency",onChange:o,placeholder:"Select Currency",isLoading:r,size:"large"}),m&&t.jsx(t.Fragment,{children:g&&C&&_&&t.jsx(mi,{combinations:g,hubColor:C,currency:_,onSelectBill:a,selectedBillsIds:c,selectedBills:l,resetSelectedBills:d},y+_.key)})]}),t.jsxs(D.Footer,{className:oe.bottomInfo,children:[t.jsx(V,{variant:"warning",message:$o}),_&&t.jsxs("div",{className:oe.selectedInfo,children:[t.jsxs("div",{className:oe.selectedInfoRow,children:[t.jsx("span",{children:"Bill(s)"}),t.jsxs("span",{children:[x," Bill(s)"]})]}),t.jsxs("div",{className:oe.selectedInfoTotal,children:[t.jsx("span",{children:"Total Amount"}),t.jsxs("span",{className:oe.selectedInfoValue,children:[q(b,_.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})," ",_.ticker]})]})]}),t.jsx("div",{className:oe.buttonsInfo,children:t.jsx(O,{variant:"primary",onClick:u,disabled:b===0||!s,children:"Next"})})]})]})},V8=e=>{const{onClose:n,source:o,selectedBills:s,currency:r,resetSelectedBills:a,isOpen:c}=e,[l,d]=i.useState(o==="currencyPage"?"confirm":"init"),{currencies:u,isFetching:p}=hi({status:[hs.enabled,hs.new]}),[m,h]=i.useState(r==null?void 0:r.key),f=u.find(S=>S.key===m),_=di(),v=r||f,g=_.selectedBillsIds,C=s||_.selectedBills,y=a||_.resetSelectedBills,b=S=>{h(S),y()},x=()=>{d("confirm")},N=()=>{o==="billsPage"?d("init"):n()};return t.jsxs(t.Fragment,{children:[l==="init"&&t.jsx(W8,{onClose:n,selectedCurrency:f,isCurrenciesLoading:p,onSelectBill:_.toggleSelectBill,selectedBillsIds:g,selectedBills:C,resetSelectedBills:y,onSelectCurrency:b,onClickNext:x}),l==="confirm"&&v&&t.jsx(q8,{onClose:n,selectedBills:C,currency:v,resetSelectedBills:y,isOpen:c,onClickBack:N,source:o})]})},du=e=>{const{isOpen:n,onClose:o,selectedBills:s,currency:r,resetSelectedBills:a,source:c}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(V8,{onClose:o,selectedBills:s,currency:r,resetSelectedBills:a,isOpen:n,source:c})})},H8="_bottom_14um4_1",U8="_hidden_14um4_22",Y8="_info_14um4_26",K8="_buttons_14um4_38",Rs={bottom:H8,hidden:U8,info:Y8,buttons:K8},G8=e=>{const{selectedBills:n,currency:o,selectedBillsIds:s,resetSelectedBills:r}=e,{totalCount:a,totalAmount:c}=Gt(n),{openModal:l,closeModal:d,isModalOpen:u}=Mn(),p=Bt(Cs),m=[{icon:t.jsx(Tr,{style:{transform:"rotate(135deg)"}}),label:"Send",onClick:()=>l("handover")},{icon:t.jsx(Xd,{}),label:"Export",onClick:()=>l("export")},{icon:t.jsx(Jd,{}),label:"To Crypto",onClick:()=>l("burn")}];return o?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:L(Rs.bottom,{[Rs.hidden]:a<=0}),children:[t.jsxs("div",{className:Rs.info,children:[t.jsx("span",{children:"Total:"}),t.jsxs("span",{children:[q(c,o.decimal)," ",o.ticker]}),t.jsx("span",{children:p?`(${a} ${a===1?"Bill":"Bills"})`:`${a} ${a===1?"Bill":"Bills"}`})]}),t.jsx("div",{className:Rs.buttons,children:m.map(({label:h,onClick:f,icon:_})=>t.jsxs(O,{className:Rs.button,onClick:f,children:[_,h]},h))})]}),t.jsx(ou,{isOpen:u("handover"),onClose:d,resetSelectedBills:r,selectedBills:n,currency:o,source:"currencyPage"}),t.jsx(su,{isOpen:u("export"),onClose:d,selectedBills:n,resetSelectedBills:r,currency:o,source:"currencyPage"}),t.jsx(du,{isOpen:u("burn"),onClose:d,selectedBills:n,resetSelectedBills:r,currency:o,source:"currencyPage"})]}):null},z8="_wrapper_1nd0z_1",Z8="_header_1nd0z_8",Q8="_sectionHeader_1nd0z_13",X8="_blue_1nd0z_32",J8="_green_1nd0z_36",e7="_loader_1nd0z_41",As={wrapper:z8,header:Z8,sectionHeader:Q8,blue:X8,green:J8,loader:e7},t7=()=>{const{currencyKey:e}=jo(),{data:n,error:o,isFetching:s}=Qt.useGetBalanceByKeyQuery({currencyKey:e??""});if(o)throw new Error("404");const{currency:r,amount:a,conv:c,combination:l}=(n==null?void 0:n.payload)??{},d=r?r.id>=500?"green":"blue":void 0,u=(l==null?void 0:l.reduce((v,{count:g})=>v+g,0))??0,{selectedBills:p,toggleSelectBill:m,resetSelectedBills:h,selectedBillsIds:f}=di(),_=`${u}${r==null?void 0:r.key}`;return i.useEffect(()=>{h()},[_]),!n&&s?t.jsx(Tn,{className:As.loader}):t.jsxs("div",{className:As.wrapper,children:[t.jsx("div",{className:As.header,children:t.jsx(ct,{title:`${r==null?void 0:r.ticker} (${r==null?void 0:r.protocol})`,isLoading:s,icon:r!=null&&r.key?t.jsx(pn,{currencyKey:r.key,alt:""}):void 0,className:L(As.sectionHeader,d&&As[d])})}
61),t.jsx(S4,{balance:a,billsAmount:u,isLoading:s,decimal:r==null?void 0:r.decimal,ticker:r==null?void 0:r.ticker,converted:c}),l&&d&&r&&t.jsx(mi,{combinations:l,hubColor:d,currency:r,onSelectBill:m,selectedBillsIds:f,selectedBills:p,resetSelectedBills:h,showPreviewButton:!0},_),t.jsx(G8,{selectedBills:p,currency:r,selectedBillsIds:f,resetSelectedBills:h})]})},n7="_header_1m82f_1",r7="_eyebrow_1m82f_8",s7="_title_1m82f_19",o7="_subtitle_1m82f_27",Os={header:n7,eyebrow:r7,title:s7,subtitle:o7},js=({eyebrow:e,title:n,subtitle:o,children:s,className:r})=>t.jsxs("section",{className:L(Os.header,r),children:[t.jsxs("div",{className:Os.heading,children:[e&&t.jsx("span",{className:Os.eyebrow,children:e}),t.jsx("h1",{className:Os.title,children:n}),o&&t.jsx("p",{className:Os.subtitle,children:o})]}),s]});function a7(){const{data:e,isFetching:n,error:o}=Qt.useGetBalancesQuery(),s=i.useMemo(()=>{if(!e)return{};const d={};for(const u of e.payload){const{currency:p,combination:m=[],amount:h,conv:f}=u;if(!p.softNoteStatus||p.softNoteStatus<hs.enabled)continue;const _=m.reduce((v,{count:g})=>v+g,0);d[p.key]={currency:p,bills:_,amount:h,conv:f}}return d},[e]),{totalConv:r,totalBills:a,totalGreenBills:c,totalBlueBills:l}=i.useMemo(()=>Object.values(s).reduce((d,{conv:u,bills:p,currency:m})=>(d.totalConv+=u,d.totalBills+=p,m.id>=500?d.totalGreenBills+=p:d.totalBlueBills+=p,d),{totalConv:0,totalBills:0,totalGreenBills:0,totalBlueBills:0}),[s]);return{summaryOfBalances:s,totalConv:r,totalBills:a,totalGreenBills:c,totalBlueBills:l,isFetching:n,error:o}}const i7="_wrapper_1ivjs_1",l7="_info_1ivjs_9",c7="_title_1ivjs_31",d7="_balance_1ivjs_40",u7="_balanceValue_1ivjs_44",Fs={wrapper:i7,info:l7,title:c7,balance:d7,balanceValue:u7},p7=e=>{const{totalBalance:n,isLoading:o}=e;return t.jsx("div",{className:Fs.wrapper,children:t.jsxs("div",{className:Fs.info,children:[t.jsx("span",{className:Fs.title,children:"Balance"}),t.jsx(pi,{value:n,isLoading:o,className:Fs.balance,valueClassName:Fs.balanceValue})]})})},m7=e=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...e},i.createElement("g",null,i.createElement("path",{d:"M13.414 7.586C14.195 8.367 14.195 9.633 13.414 10.414C12.633 11.195 11.367 11.195 10.586 10.414C9.805 9.633 9.805 8.367 10.586 7.586C11.367 6.805 12.633 6.805 13.414 7.586"}),i.createElement("path",{d:"M6.5 7V11"}),i.createElement("path",{d:"M17.5 7V11"}),i.createElement("path",{d:"M12 21V16"}),i.createElement("path",{d:"M12 16L10 18"}),i.createElement("path",{d:"M14 18L12 16"}),i.createElement("path",{d:"M8 15H5C3.895 15 3 14.105 3 13V5C3 3.895 3.895 3 5 3H19C20.105 3 21 3.895 21 5V13C21 14.105 20.105 15 19 15H16"}))),uu=e=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-factory app-icon app-icon-md app-icon-on-primary",...e},i.createElement("path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"}),i.createElement("path",{d:"M17 18h1"}),i.createElement("path",{d:"M12 18h1"}),i.createElement("path",{d:"M7 18h1"})),h7="_block_kma07_1",f7="_icon_kma07_22",_7="_disabled_kma07_39",Oi={block:h7,icon:f7,disabled:_7},Ut=e=>{const{label:n,disabled:o,icon:s,className:r,as:a,...c}=e,l=a||"button";return t.jsxs(l,{className:L(Oi.block,r,{[Oi.disabled]:o}),...c,children:[t.jsx("div",{className:Oi.icon,children:s}),t.jsx("span",{children:n})]},n)},g7=i.lazy(()=>fd(()=>import("./index-CuSCYub7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]))),v7=e=>{const{isOpen:n,onClose:o}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(g7,{onClose:o})})},y7="_actions_8q2cp_1",b7="_title_8q2cp_6",x7="_wrapper_8q2cp_14",C7="_action_8q2cp_1",Fi={actions:y7,title:b7,wrapper:x7,action:C7},k7=()=>{const{openModal:e,closeModal:n,isModalOpen:o}=Mn(),s=Zt(),r=[{icon:t.jsx(Tr,{style:{rotate:"315deg"}}),label:"Deposit",onClick:()=>e("deposit")},{icon:t.jsx(Jd,{}),label:"To Crypto",onClick:()=>e("burn")},{icon:t.jsx(Tr,{style:{rotate:"135deg"}}),label:"Send",onClick:()=>e("handover")},{icon:t.jsx(uu,{}),label:"Mint",onClick:()=>s("/mint-house/blue/mint")},{icon:t.jsx(Xd,{}),label:"Export",onClick:()=>e("export")},{icon:t.jsx(m7,{}),label:"Fill",onClick:()=>s("/mint-house/blue/fill")}];return t.jsxs(t.Fragment,{children:[t.jsx("section",{className:Fi.actions,children:t.jsx("div",{className:Fi.wrapper,children:r.map(({icon:a,label:c,onClick:l})=>t.jsx(Ut,{label:c,icon:a,onClick:l,className:Fi.action},c))})}),t.jsx(v7,{isOpen:o("deposit"),onClose:n}),t.jsx(ou,{isOpen:o("handover"),onClose:n,source:"billsPage"}),t.jsx(su,{isOpen:o("export"),onClose:n,source:"billsPage"}),t.jsx(du,{isOpen:o("burn"),onClose:n,source:"billsPage"})]})},w7="_wrapper_8qmhl_1",j7={wrapper:w7},pu=e=>{const{hideZeroBalances:n,onToggleHideZeroBalances:o,className:s}=e;return t.jsxs("div",{className:L(j7.wrapper,s),children:[t.jsx(Oa,{value:n,onChange:o}),t.jsx("span",{children:"Hide Zero Balances"})]})};function mu(e){const[n,o]=i.useState(()=>!!se.get(e)),s=()=>o(r=>!r);return i.useEffect(()=>{se.set(e,n)},[e,n]),{hideZeroBalances:n,toggleHideZeroBalances:s}}function Ln(e){return e.charAt(0).toUpperCase()+e.slice(1)}const S7="_wrapper_11eh6_1",N7="_two_11eh6_19",L7="_three_11eh6_31",E7="_blue_11eh6_55",$7="_green_11eh6_58",T7="_amount_11eh6_69",M7="_currency_11eh6_90",D7="_ticker_11eh6_96",P7="_network_11eh6_101",dr={wrapper:S7,two:N7,three:L7,blue:E7,green:$7,amount:T7,currency:M7,ticker:D7,network:P7},I7=e=>{const{balance:{currency:n,amount:o,bills:s},stripeColor:r}=e,a=c=>c===2?"two":c>2?"three":"";
61return t.jsxs(ge,{className:L(dr.wrapper,dr[r],dr[a(s)]),to:`/bills/${n.key}`,children:[t.jsxs("div",{className:dr.amount,children:[t.jsx("span",{children:q(o,n.decimal,{trimTrailingZeros:!0,omitFractionalPart:!0})}),t.jsxs("span",{children:[s," Bill(s)"]})]}),t.jsxs("div",{className:dr.currency,children:[t.jsx(pn,{currencyKey:n.key,width:20,height:20}),t.jsx("span",{className:dr.ticker,children:n.ticker}),"/",t.jsxs("span",{className:dr.network,children:[Ln(n.network)," ",t.jsx("br",{}),n.protocol]})]})]})},B7="_tabs_w85e1_1",R7="_tab_w85e1_1",A7="_selected_w85e1_32",O7="_disabled_w85e1_32",F7="_blue_w85e1_36",q7="_green_w85e1_46",W7="_count_w85e1_57",Kr={tabs:B7,tab:R7,selected:A7,disabled:O7,blue:F7,green:q7,count:W7},hu=({items:e,className:n})=>t.jsx("div",{className:L(Kr.tabs,n),children:e.map(o=>{const s=L(Kr.tab,Kr[o.color],{[Kr.selected]:o.selected,[Kr.disabled]:o.disabled}),r=t.jsxs(t.Fragment,{children:[t.jsx("span",{children:o.label}),o.count!==void 0&&t.jsx("span",{className:Kr.count,children:o.count})]});return o.to?t.jsx(Er,{to:o.to,className:s,"aria-disabled":o.disabled,onClick:a=>{o.disabled&&a.preventDefault()},children:r},o.color):t.jsx("button",{type:"button",className:s,onClick:o.onClick,disabled:o.disabled,children:r},o.color)})}),V7=({stripeColor:e,onClick:n,totalBlueBills:o,totalGreenBills:s})=>t.jsx(hu,{items:[{color:"blue",label:"Blue Stripe",selected:e==="blue",count:o,onClick:()=>n("blue")},{color:"green",label:"Green Stripe",selected:e==="green",count:s,onClick:()=>n("green")}]}),H7="_header_1kjje_1",U7="_content_1kjje_8",Y7="_filter_1kjje_15",K7="_currencies_1kjje_19",G7="_skeleton_1kjje_26",z7="_noBills_1kjje_37",Gr={header:H7,content:U7,filter:Y7,currencies:K7,skeleton:G7,noBills:z7},g1=["blue","green"],Z7=({summaryOfBalances:e,isLoading:n,totalBlueBills:o,totalGreenBills:s})=>{const[r,a]=li(),c=i.useMemo(()=>{const f=r.get("hub");return f&&g1.includes(f)?f:"blue"},[r]),[l,d]=i.useState(c);i.useEffect(()=>{const f=r.get("hub");if(f&&g1.includes(f))d(f);else{const _=new URLSearchParams(r);_.set("hub",l),a(_,{replace:!0})}},[r,l,a]);const u=f=>{d(f);const _=new URLSearchParams(r);_.set("hub",f),a(_)},{hideZeroBalances:p,toggleHideZeroBalances:m}=mu(re.hideZeroBalancesBills),h=Object.values(e).filter(f=>p&&f.bills===0?!1:l==="green"?f.currency.id>=500:f.currency.id<500);return t.jsxs(ze,{children:[t.jsx("div",{className:Gr.header,children:t.jsx(pu,{hideZeroBalances:p,onToggleHideZeroBalances:m,className:Gr.filter})}),t.jsx(V7,{stripeColor:l,onClick:u,totalGreenBills:s,totalBlueBills:o}),t.jsx("div",{className:Gr.content,children:n?t.jsx("div",{className:Gr.currencies,children:t.jsx(H,{count:3,className:Gr.skeleton})}):h.length>0?t.jsx("div",{className:Gr.currencies,children:h.map(f=>t.jsx(I7,{balance:f,stripeColor:l},f.currency.key))}):t.jsx(zd,{stripe:l})})]})},Q7="_container_13ebz_1",X7={container:Q7},J7=()=>{const{summaryOfBalances:e,totalConv:n,totalGreenBills:o,totalBlueBills:s,isFetching:r}=a7();return t.jsxs("div",{className:X7.container,children:[t.jsx(js,{title:"My SoftNotes",subtitle:"View balances and manage your SoftNotes."}),t.jsx(p7,{totalBalance:n,isLoading:r}),t.jsx(k7,{}),t.jsx(Z7,{summaryOfBalances:e,isLoading:r,totalGreenBills:o,totalBlueBills:s})]})};function xt(e){const[n,{isFetching:o,isLoading:s,error:r}]=Ae.useLazyGetBalanceQuery(),[a,c]=i.useState(void 0),l=Xl(Ae.endpoints.getBalances.select()),d=i.useMemo(()=>{var h;if(!((h=l==null?void 0:l.data)!=null&&h.payload))return new Map;const m=new Map;return l.data.payload.forEach(f=>{var _;(_=f.currency)!=null&&_.isActual&&m.set(f.currency.key,f)}),m},[l]),u=En();i.useEffect(()=>{if(!e)return;let m=!1;const h=d.get(e);return n({key:e},!0).then(f=>{var v;if(m||!((v=f==null?void 0:f.data)!=null&&v.payload))return;const _=f.data.payload;c(_),h&&h.value!==_.value&&u(Ae.util.invalidateTags([{type:"Balance"}]))}),()=>{m=!0}},[e,n,u]);const p=i.useCallback(()=>{e&&(n({key:e,fresh:1}),u(Ae.util.invalidateTags([{type:"Balance"}])))},[e,n,u]);return{balance:a,isFetching:o,isLoading:s,error:r,updateBalance:p}}const e_="_wrapper_1kye5_1",t_="_info_1kye5_9",n_="_title_1kye5_31",r_="_balance_1kye5_40",s_="_balanceValue_1kye5_44",o_="_c
61onverted_1kye5_54",zr={wrapper:e_,info:t_,title:n_,balance:r_,balanceValue:s_,converted:o_},a_=({balance:e,decimal:n,ticker:o,converted:s,isLoading:r})=>t.jsx("div",{className:zr.wrapper,children:t.jsxs("div",{className:zr.info,children:[t.jsx("span",{className:zr.title,children:"Balance"}),t.jsx(pi,{value:e,isLoading:r,decimal:n,currencyFormat:o?"ticker":"symbol",ticker:o,className:zr.balance,valueClassName:zr.balanceValue}),s!==void 0&&t.jsxs("span",{className:zr.converted,children:["$",ui(s||0,!0)]})]})}),fu=e=>i.createElement("svg",{viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M11.4403 10.6666L22.4994 21.3333",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M22.4994 10.6666L11.4403 21.3333",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));function _u(e){var a,c,l;const n=e.direction===oc.outgoing?"-":"+",o=((a=e.currency)==null?void 0:a.decimal)??8,s=((l=(c=e.currency)==null?void 0:c.ticker)==null?void 0:l.toUpperCase())??"",r=q(e.value,o);return`${n}${r} ${s}`}const i_=e=>i.createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.69807 8.05909L10.1809 3.99585L13.9357 8.37651L16.3653 5.54194L18.302 7.80143C19.5465 9.25333 20.2305 11.1025 20.2305 13.0148V13.2724C20.2305 15.3227 19.4161 17.289 17.9663 18.7387C16.5166 20.1885 14.5503 21.0029 12.5 21.0029V21.0029C8.23059 21.0029 4.76953 17.5419 4.76953 13.2724V13.2724C4.76953 11.3602 5.45359 9.51099 6.69807 8.05909Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ut=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M17.334 12L17.334 6.66667C17.334 6.31305 17.1935 5.97391 16.9435 5.72386C16.6934 5.47381 16.3543 5.33333 16.0007 5.33333L8.00065 5.33333C7.64703 5.33333 7.30789 5.47381 7.05784 5.72386C6.80779 5.97391 6.66732 6.31305 6.66732 6.66667L6.66732 12",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.33268 15.9993L11.9993 18.666L14.666 15.9993",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12 18.666L12 9.99935",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),gu=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M4.92004 17.0401H3.96004C3.45082 17.0401 2.96246 16.8378 2.60239 16.4777C2.24232 16.1177 2.04004 15.6293 2.04004 15.1201V5.5201C2.04004 5.01088 2.24232 4.52252 2.60239 4.16245C2.96246 3.80238 3.45082 3.6001 3.96004 3.6001H19.32C19.8293 3.6001 20.3176 3.80238 20.6777 4.16245C21.0378 4.52252 21.24 5.01088 21.24 5.5201V15.1201C21.24 15.6293 21.0378 16.1177 20.6777 16.4777C20.3176 16.8378 19.8293 17.0401 19.32 17.0401H18.36",stroke:"currentColor",strokeWidth:1.92,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.6401 15.1199L16.4401 20.8799H6.84009L11.6401 15.1199Z",stroke:"currentColor",strokeWidth:1.92,strokeLinecap:"round",strokeLinejoin:"round"})),l_=e=>i.createElement("svg",{viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("ellipse",{cx:6.99898,cy:7.66611,rx:4.00167,ry:1.66736,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.0006 10.0004C11.0006 10.9213 9.20904 11.6678 6.99898 11.6678C4.78892 11.6678 2.99731 10.9213 2.99731 10.0004",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0024 7.66611C15.0024 8.58697 13.2108 9.33347 11.0007 9.33347",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.0006 7.66611V12.6682C11.0006 13.5891 9.20904 14.3356 6.99898 14.3356C4.78892 14.3356 2.99731 13.5891 2.99731 12.6682V7.66611",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0024 5.33181V10.3339C15.0024 11.2547 13.2108 12.0013 11.0007 12.0013",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.3325 6.00542C7.1345 5.83546 7.01413 5.5923 6.99902 5.33181C6.99902 4.41142 8.7931 3.66444 11.0007 3.66444C13.2083 3.66444 15.0024 4.41142 15.0024 5.33181C15.0024 6.25219 13.2083 6.99917 11.0007 6.99917C10.8873 6.99917 10.7739 6.99917 10.6672 6.9925",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),c_=e=>i.createElement("svg",{viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M3.82349 11.353H4.76466",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.1765 3.82355H15.1177",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.80689 9.25203C7.21248 8.65762 6.98033 7.79125 7.1979 6.97926C7.41547 6.16728 8.0497 5.53305 8.86169 5.31548C9.67367 5.09791 10.54 5.33006 11.1345 5.92447",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.70588 14.1765H3.82353C2.26414 14.1765 1 12.9123 1 11.3529V3.82353C1 2.26414 2.26414 1 3.82353 1H15.1176C16.677 1 17.9412 2.26414 17.9412 3.82353V7.58824",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.94129 13.2353H11.8236C12.0835 13.2353 12.2942 13.446 12.2942 13.7059V17H9.94129C9.68139 17 9.4707 16.7893 9.4707 16.5294V13.7059C9.4707 13.446 9.68139 13.2353 9.94129 13.2353Z",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7648 9.47059H14.6471C14.907 9.47059 15.1177 9.68128 15.1177 9.94118V17H12.2942V9.94118C12.2942 9.68128 12.5049 9.47059 12.7648 9.47059Z",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5883 11.3529H17.4706C17.7305 11.3529 17.9412 11.5636 17.9412 11.8235V16.5294C17.9412 16.7893 17.7305 17 17.4706 17H15.1177V11.8235C15.1177 11.5636 15.3284 11.3529 15.5883 11.3529Z",stroke:"currentColor",strokeWidth:1.41176,strokeLinecap:"round",strokeLinejoin:"round"})),v1=e=>i.createElement("svg",{viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M6.66797 3.83398L5.41797 5.08398",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.41797 2.58398L6.66797 3.83398",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5 3.83398C3.61917 3.83398 2.5 4.95315 2.5 6.33398",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5 3.83268H6.66667",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.332 17.166L14.582 15.916",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.582 18.416L13.332 17.166",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15 17.166C16.3808 17.166 17.5 16.0468 17.5 14.666",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.9987 17.1667H13.332",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.91536 17.1667C10.4362 17.1667 12.4987 15.1042 12.4987 12.5833C12.4987 10.0625 10.4362 8 7.91536 8C5.39453 8 3.33203 10.0625 3.33203 12.5833C3.33203 13.6117 3.67953 14.5608 4.25703 15.3267C5.09453 16.4408 6.42286 17.1667 7.91536 17.1667Z",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.3269 5.17578C17.1094 6.95828 17.1094 9.87495 15.3269 11.6574C15.1844 11.7999 15.0286 11.9191 14.8711 12.0349",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.3243 5.17477C13.5418 3.39227 10.6251 3.39227 8.8426 5.17477C8.70094 5.31643 8.57927 5.4706 8.46094 5.62643",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"})),d_=e=>{switch(e){case Z.EXPORT:return t.jsx(ut,{style:{width:24,transform:"rotate(180deg)"}});case Z.SEND:return t.jsx(ut,{style:{width:24,transform:"rotate(90deg)"}});case Z.ACCRUED:return t.jsx(c_,{style:{width:19}});case Z.BURN:return t.jsx(i_,{style:{width:18}});case Z.FILL:return t.jsx(gu,{style:{width:16}});case Z.MINT:return t.jsx(l_,{style:{width:18}});case Z.IMPORT:return t.jsx(ut,{style:{width:24}});case Z.RECEIPT:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});case Z.MIGRATED_OUT:return t.jsx(ut,{style:{width:24,transform:"rotate(90deg)"}});case Z.MIGRATED_IN:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});case Z.SWAP_IN:return t.jsx(v1,{style:{width:20}});case Z.SWAP_OUT:return t.jsx(v1,{style:{width:20}});case Z.EPOS_PAY:return t.jsx(ut,{style:{width:24,transform:"rotate(90deg)"}});case Z.EPOS_RECEIVE:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});case Z.WITHDRAW_STAKING:return t.jsx(ut,{style:{width:24,transform:"rotate(90deg)"}});case Z.RECEIVE_STAKING:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});case Z.RECEIVE_REFERRER:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});default:return""}},vu=e=>{switch(e){case ss.SN_WALLET:return"My Bills";case ss.MINT_HOUSE:return"Mint house";case ss.WALLET:return"My Crypto";case ss.X_PORT:return"My Bills";case ss.EPOS:return"ePoS";default:return""}},yu=({action:e,currency:n})=>{switch(e){case Z.EXPORT:return"Export";case Z.SEND:return"Send";case Z.ACCRUED:return"Accrue";case Z.BURN:return"Burn";case Z.FILL:return"Fill";
61case Z.MINT:return"Mint";case Z.IMPORT:return"Deposit";case Z.RECEIPT:return"Handover";case Z.MIGRATED_OUT:return"Migrate Out";case Z.MIGRATED_IN:return"Migrate In";case Z.SWAP_IN:return"Swap";case Z.SWAP_OUT:return"Swap";case Z.EPOS_PAY:return"Pmt Received";case Z.EPOS_RECEIVE:return"SoftNote ePoS";case Z.WITHDRAW_STAKING:return"Create Staking";case Z.RECEIVE_STAKING:switch(n.key){case"tectum-t12-tet":return"Close Staking";case"tectum-t12-tct":return"Staking Reward"}break;case Z.RECEIVE_REFERRER:return"Referral Bonus";default:return""}},u_="_item_1py98_1",p_="_pending_1py98_36",m_="_failed_1py98_46",h_="_firstInGroup_1py98_56",f_="_lastInGroup_1py98_60",__="_icon_1py98_64",g_="_main_1py98_75",v_="_value_1py98_83",y_="_signature_1py98_93",b_="_aside_1py98_102",x_="_amount_1py98_112",C_="_positiveAmount_1py98_121",k_="_network_1py98_125",w_="_status_1py98_135",j_="_pendingStatus_1py98_142",S_="_failedStatus_1py98_146",Qe={item:u_,pending:p_,failed:m_,firstInGroup:h_,lastInGroup:f_,icon:__,main:g_,value:v_,signature:y_,aside:b_,amount:x_,positiveAmount:C_,network:k_,status:w_,pendingStatus:j_,failedStatus:S_},N_={[Pt.pending]:"Pending",[Pt.success]:"Completed",[Pt.failed]:"Failed"},L_=e=>{var c;const{operation:n,onClick:o,isFirstInGroup:s,isLastInGroup:r}=e,a=n.status!==Pt.success;return t.jsxs("div",{className:L(Qe.item,{[Qe.firstInGroup]:s,[Qe.lastInGroup]:r,[Qe.pending]:n.status===Pt.pending,[Qe.failed]:n.status===Pt.failed}),onClick:o,children:[t.jsx("div",{className:Qe.icon,children:d_(n.action)}),t.jsxs("div",{className:Qe.main,children:[t.jsx("div",{className:Qe.value,children:yu(n)}),t.jsx("div",{className:Qe.signature,children:vu(n.area)})]}),t.jsxs("div",{className:Qe.aside,children:[t.jsx("div",{className:L(Qe.amount,{[Qe.positiveAmount]:n.direction!==oc.outgoing}),children:_u(n)}),a?t.jsx("div",{className:L(Qe.status,{[Qe.pendingStatus]:n.status===Pt.pending,[Qe.failedStatus]:n.status===Pt.failed}),children:N_[n.status]}):t.jsxs("div",{className:Qe.network,children:[n.network&&Ln(n.network)," ",n.protocol&&((c=n.protocol)==null?void 0:c.toUpperCase())]})]})]})},E_=ot(new Date),$_=ot(new Date(Date.now()-864e5)),bu=e=>{const n=zt(e);return n===E_?"Today":n===$_?"Yesterday":n},T_="_date_1h55s_1",M_="_noData_1h55s_14",y1={date:T_,noData:M_},xu=e=>{const{onOpen:n,data:o,fetchNext:s,isLoading:r,isFetching:a,count:c}=e;if(r)return t.jsx(H,{});if(!o.length)return t.jsx("div",{className:y1.noData,children:"No Data"});let l="";return t.jsx("div",{children:t.jsx(xs,{hasMore:o.length<(c??0),loader:t.jsx(Fa,{}),loadMore:s,isLoading:a,children:o.map((d,u)=>{const p=[],m=zt(d.date),h=m!==l,f=o[u+1],_=!f||m!==zt(f.date);return h&&(p.push(t.jsx("div",{className:y1.date,children:bu(d.date)},d.date)),l=m),p.push(t.jsx(L_,{operation:d,onClick:()=>n(d),isFirstInGroup:h,isLastInGroup:_},d.id)),p})})})},D_=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M15 3V5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7 3V5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3 9H19",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19 10V7C19 5.343 17.657 4 16 4H6C4.343 4 3 5.343 3 7V16C3 17.657 4.343 19 6 19H11",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.121 13.879C20.419 15.177 20.279 17.366 18.703 18.473C17.7 19.177 16.299 19.177 15.296 18.473C13.719 17.367 13.58 15.177 14.878 13.879C16.05 12.707 17.95 12.707 19.121 13.879",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M21 20L19.12 18.12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Cu=(e,n)=>{i.useEffect(()=>{const o=s=>{const r=e==null?void 0:e.current;!r||r.contains((s==null?void 0:s.target)||null)||n(s)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e])},b1=typeof document<"u"?document:{},uc=e=>{const n=i.useRef(void 0),o=b1.documentElement,{body:s}=b1,r=i.useCallback(()=>
61{if(!s||!s.style||n.current)return;const c=window.innerWidth-((o==null?void 0:o.clientWidth)??0),l=parseInt(window.getComputedStyle(s).getPropertyValue("padding-right"))||0;o&&(o.style.position="relative",o.style.overflow="hidden"),s.style.position="relative",s.style.overflow="hidden",s.style.paddingRight=`${l+c}px`,e.current&&(e.current.style.paddingRight=`${l+c}px`),n.current=!0},[s,o,e]),a=i.useCallback(()=>{!s||!s.style||!o||(o.style.position="",o.style.overflow="",s.style.position="",s.style.overflow="",s.style.paddingRight="",e.current&&(e.current.style.paddingRight=""),n.current=!1)},[s,o,e]);return[r,a]},P_="_wrapper_20m5b_1",I_="_show_20m5b_12",x1={wrapper:P_,show:I_},B_=e=>{const{children:n,open:o,onClose:s,refObject:r}=e,a=Bt(ks),[c,l]=i.useState(!1);i.useEffect(()=>{o&&!c?l(!0):!o&&c&&setTimeout(()=>l(!1),250)},[c,o]),Cu(r,s);const d=i.useRef(null),[u,p]=uc(d);i.useEffect(()=>{let f;return c&&a?u():f=window.setTimeout(p,250),()=>clearTimeout(f)},[c,u,p,a]),i.useEffect(()=>p,[p]);const[m,h]=i.useState(!1);return i.useEffect(()=>{h(!!(o&&c))},[c,o]),c?t.jsx("div",{className:L(x1.wrapper,{[x1.show]:m}),ref:d,children:n}):null},ku=e=>i.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M5.33203 5.3335L10.6654 10.6668",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.6654 5.3335L5.33203 10.6668",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));function R_(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Al(e,n)}function Al(e,n){return Al=Object.setPrototypeOf||function(s,r){return s.__proto__=r,s},Al(e,n)}function A_(e,n){if(e==null)return{};var o={},s=Object.keys(e),r,a;for(a=0;a<s.length;a++)r=s[a],!(n.indexOf(r)>=0)&&(o[r]=e[r]);return o}function C1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O_(e,n,o){return e===n?!0:e.correspondingElement?e.correspondingElement.classList.contains(o):e.classList.contains(o)}function F_(e,n,o){if(e===n)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&O_(e,n,o))return!0;e=e.parentNode||e.host}return e}function q_(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var W_=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var n=!1,o=Object.defineProperty({},"passive",{get:function(){n=!0}}),s=function(){};return window.addEventListener("testPassiveEventSupport",s,o),window.removeEventListener("testPassiveEventSupport",s,o),n}};function V_(e){return e===void 0&&(e=0),function(){return++e}}var H_=V_(),Ol,Ho={},qi={},U_=["touchstart","touchmove"],Y_="ignore-react-onclickoutside";function k1(e,n){var o={},s=U_.indexOf(n)!==-1;return s&&Ol&&(o.passive=!e.props.preventDefault),o}function gi(e,n){var o,s,r=e.displayName||e.name||"Component";return s=o=function(a){R_(c,a);function c(d){var u;return u=a.call(this,d)||this,u.__outsideClickHandler=function(p){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(p);return}var m=u.getInstance();if(typeof m.props.handleClickOutside=="function"){m.props.handleClickOutside(p);return}if(typeof m.handleClickOutside=="function"){m.handleClickOutside(p);return}throw new Error("WrappedComponent: "+r+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var p=u.getInstance();return typeof p.setClickOutsideRef=="function"?p.setClickOutsideRef():Pr.findDOMNode(p)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||qi[u._uid])){typeof Ol>"u"&&(Ol=W_()),qi[u._uid]=!0;var p=u.props.eventTypes;p.forEach||(p=[p]),Ho[u._uid]=function(m){if(u.componentNode!==null&&!(u.initTimeStamp>m.timeStamp)&&(u.props.preventDefault&&m.preventDefault(),u.props.stopPropagation&&m.stopPropagation(),!(u.props.excludeScrollbar&&q_(m)))){var h=m.composed&&m.composedPath&&m.composedPath().shift()||m.target;F_(h,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(m)}},p.forEach(function(m){document.addEventListener(m,Ho[u._uid],k1(C1(u),m))})}},u.disableOnClickOutside=function(){delete qi[u._uid];var p=Ho[u._uid];if(p&&typeof document<"u"){var m=u.props.eventTypes;m.forEach||(m=[m]),m.forEach(function(h){return document.removeEventListener(h,p,k1(C1(u),h))}),delete Ho[u._uid]}},u.getRef=function(p){return u.instanceRef=p},u._uid=H_(),u.initTimeStamp=performance.now(),u}var l=c.prototype;return l.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},l.componentDidMount=function(){typeof document>"u"||!document.createElement||(this.getInstance(),this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside())},l.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},l.componentWillUnmount=function(){this.disableOnClickOutside()},l.render=function(){var u=this.props;u.excludeScrollbar;var p=A_(u,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?p.ref=this.getRef
61:p.wrappedRef=this.getRef,p.disableOnClickOutside=this.disableOnClickOutside,p.enableOnClickOutside=this.enableOnClickOutside,i.createElement(e,p)},c}(i.Component),o.displayName="OnClickOutside("+r+")",o.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:!1,outsideClickIgnoreClass:Y_,preventDefault:!1,stopPropagation:!1},o.getClass=function(){return e.getClass?e.getClass():e},s}var wu=i.createContext(),ju=i.createContext();function K_(e){var n=e.children,o=i.useState(null),s=o[0],r=o[1],a=i.useRef(!1);i.useEffect(function(){return function(){a.current=!0}},[]);var c=i.useCallback(function(l){a.current||r(l)},[]);return i.createElement(wu.Provider,{value:s},i.createElement(ju.Provider,{value:c},n))}var Su=function(n){return Array.isArray(n)?n[0]:n},Nu=function(n){if(typeof n=="function"){for(var o=arguments.length,s=new Array(o>1?o-1:0),r=1;r<o;r++)s[r-1]=arguments[r];return n.apply(void 0,s)}},Fl=function(n,o){if(typeof n=="function")return Nu(n,o);n!=null&&(n.current=o)},w1=function(n){return n.reduce(function(o,s){var r=s[0],a=s[1];return o[r]=a,o},{})},j1=typeof window<"u"&&window.document&&window.document.createElement?i.useLayoutEffect:i.useEffect,G_=typeof Element<"u",z_=typeof Map=="function",Z_=typeof Set=="function",Q_=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sa(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var o,s,r;if(Array.isArray(e)){if(o=e.length,o!=n.length)return!1;for(s=o;s--!==0;)if(!Sa(e[s],n[s]))return!1;return!0}var a;if(z_&&e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(a=e.entries();!(s=a.next()).done;)if(!n.has(s.value[0]))return!1;for(a=e.entries();!(s=a.next()).done;)if(!Sa(s.value[1],n.get(s.value[0])))return!1;return!0}if(Z_&&e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(a=e.entries();!(s=a.next()).done;)if(!n.has(s.value[0]))return!1;return!0}if(Q_&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(o=e.length,o!=n.length)return!1;for(s=o;s--!==0;)if(e[s]!==n[s])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof n.valueOf=="function")return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof n.toString=="function")return e.toString()===n.toString();if(r=Object.keys(e),o=r.length,o!==Object.keys(n).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,r[s]))return!1;if(G_&&e instanceof Element)return!1;for(s=o;s--!==0;)if(!((r[s]==="_owner"||r[s]==="__v"||r[s]==="__o")&&e.$$typeof)&&!Sa(e[r[s]],n[r[s]]))return!1;return!0}return e!==e&&n!==n}var X_=function(n,o){try{return Sa(n,o)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}};const J_=md(X_);var eg=[],tg=function(n,o,s){s===void 0&&(s={});var r=i.useRef(null),a={onFirstUpdate:s.onFirstUpdate,placement:s.placement||"bottom",strategy:s.strategy||"absolute",modifiers:s.modifiers||eg},c=i.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=c[0],d=c[1],u=i.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(f){var _=f.state,v=Object.keys(_.elements);Pr.flushSync(function(){d({styles:w1(v.map(function(g){return[g,_.styles[g]||{}]})),attributes:w1(v.map(function(g){return[g,_.attributes[g]]}))})})},requires:["computeStyles"]}},[]),p=i.useMemo(function(){var h={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return J_(r.current,h)?r.current||h:(r.current=h,h)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),m=i.useRef();return j1(function(){m.current&&m.current.setOptions(p)},[p]),j1(function(){if(!(n==null||o==null)){var h=s.createPopper||B2,f=h(n,o,p);return m.current=f,function(){f.destroy(),m.current=null}}},[n,o,s.createPopper]),{state:m.current?m.current.state:null,styles:l.styles,attributes:l.attributes,update:m.current?m.current.update:null,forceUpdate:m.current?m.current.forceUpdate:null}},ng=function(){},rg=function(){return Promise.resolve(null)},sg=[];function og(e){var n=e.placement,o=n===void 0?"bottom":n,s=e.strategy,r=s===void 0?"absolute":s,a=e.modifiers,c=a===void 0?sg:a,l=e.referenceElement,d=e.onFirstUpdate,u=e.innerRef,p=e.children,m=i.useContext(wu),h=i.useState(null),f=h[0],_=h[1],v=i.useState(null),g=v[0],C=v[1];i.useEffect(function(){Fl(u,f)},[u,f]);var y=i.useMemo(function(){return{placement:o,strategy:r,onFirstUpdate:d,modifiers:[].concat(c,[{name:"arrow",enabled:g!=null,options:{element:g}}])}},[o,r,d,c,g]),b=tg(l||m,f,y),x=b.state,N=b.styles,S=b.forceUpdate,j=b.update,$=i.useMemo(function(){return{ref:_,style:N.popper,placement:x?x.placement:o,hasPopperEscaped:x&&x.modifiersData.hide?x.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:x&&x.modifiersData.hide?x.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:N.arrow,ref:C},forceUpdate:S||ng,update:j||rg}},[_,C,o,x,N,j,S]);return Su(p)($)}function ag(e){var n=e.children,o=e.innerRef,s=i.useContext(ju),r=i.useCallback(function(a){Fl(o,a),Nu(s,a)},[o,s]);return i.useEffect(function(){return function(){return Fl(o,null)}},[]),i.useEffect(function(){R2(!!s,"`Reference` should not be used outside of a `Manager` component.")},[s]),Su(n)({ref:r})}function S1(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,s)}return o}function qa(e){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};
61n%2?S1(Object(o),!0).forEach(function(s){k(e,s,o[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):S1(Object(o)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))})}return e}function ql(e){return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ql(e)}function He(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function N1(e,n){for(var o=0;o<n.length;o++){var s=n[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Lu(s.key),s)}}function Ue(e,n,o){return n&&N1(e.prototype,n),o&&N1(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,n,o){return(n=Lu(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])}return e},fs.apply(this,arguments)}function Ye(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Wl(e,n)}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wa(e)}function Wl(e,n){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,s){return o.__proto__=s,o},Wl(e,n)}function w(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ke(e){var n=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,s=Wa(e);if(n){var r=Wa(this).constructor;o=Reflect.construct(s,arguments,r)}else o=s.apply(this,arguments);return function(a,c){if(c&&(typeof c=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w(a)}(this,o)}}function go(e){return function(n){if(Array.isArray(n))return Wi(n)}(e)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(e)||function(n,o){if(n){if(typeof n=="string")return Wi(n,o);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wi(n,o)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 62In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Wi(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,s=new Array(n);o<n;o++)s[o]=e[o];return s}function Lu(e){var n=function(o,s){if(typeof o!="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var a=r.call(o,s||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)}(e,"string");return typeof n=="symbol"?n:String(n)}var L1=function(e,n){switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},E1=function(e,n){switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},ig={p:E1,P:function(e,n){var o,s=e.match(/(P+)(p+)?/)||[],r=s[1],a=s[2];if(!a)return L1(e,n);switch(r){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;default:o=n.dateTime({width:"full"})}return o.replace("{{date}}",L1(r,n)).replace("{{time}}",E1(a,n))}},io=12,lg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function _e(e){var n=e?typeof e=="string"||e instanceof String?w2(e):_d(e):new Date;return Yn(n)?n:null}
62function Yn(e,n){return n=n||new Date("1/1/1000"),Ea(e)&&!Kn(e,n)}function je(e,n,o){if(o==="en")return Rc(e,n,{awareOfUnicodeTokens:!0});var s=Sr(o);return o&&!s&&console.warn('A locale object was not found for the provided string ["'.concat(o,'"].')),!s&&jr()&&Sr(jr())&&(s=Sr(jr())),Rc(e,n,{locale:s||null,awareOfUnicodeTokens:!0})}function en(e,n){var o=n.dateFormat,s=n.locale;return e&&je(e,Array.isArray(o)?o[0]:o,s)||""}function $1(e,n){var o=n.hour,s=o===void 0?0:o,r=n.minute,a=r===void 0?0:r,c=n.second;return fa(_a(j2(e,c===void 0?0:c),a),s)}function un(e,n,o){var s=Sr(n||jr());return S2(e,{locale:s,weekStartsOn:o})}function zn(e){return gd(e)}function so(e){return vd(e)}function T1(e){return N2(e)}function M1(){return ls(_e())}function Gn(e,n){return e&&n?L2(e,n):!e&&!n}function Yt(e,n){return e&&n?E2(e,n):!e&&!n}function Va(e,n){return e&&n?$2(e,n):!e&&!n}function Ce(e,n){return e&&n?T2(e,n):!e&&!n}function kr(e,n){return e&&n?M2(e,n):!e&&!n}function Na(e,n,o){var s,r=ls(n),a=xl(o);try{s=ho(e,{start:r,end:a})}catch{s=!1}return s}function Eu(e,n){var o=typeof window<"u"?window:globalThis;o.__localeData__||(o.__localeData__={}),o.__localeData__[e]=n}function jr(){return(typeof window<"u"?window:globalThis).__localeId__}function Sr(e){if(typeof e=="string"){var n=typeof window<"u"?window:globalThis;return n.__localeData__?n.__localeData__[e]:null}return e}function pc(e,n){return je(jt(_e(),e),"LLLL",n)}function $u(e,n){return je(jt(_e(),e),"LLL",n)}function vi(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.maxDate,r=n.excludeDates,a=n.excludeDateIntervals,c=n.includeDates,l=n.includeDateIntervals,d=n.filterDate;return yi(e,{minDate:o,maxDate:s})||r&&r.some(function(u){return Ce(e,u)})||a&&a.some(function(u){var p=u.start,m=u.end;return ho(e,{start:p,end:m})})||c&&!c.some(function(u){return Ce(e,u)})||l&&!l.some(function(u){var p=u.start,m=u.end;return ho(e,{start:p,end:m})})||d&&!d(_e(e))||!1}function mc(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.excludeDates,s=n.excludeDateIntervals;return s&&s.length>0?s.some(function(r){var a=r.start,c=r.end;return ho(e,{start:a,end:c})}):o&&o.some(function(r){return Ce(e,r)})||!1}function Tu(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.maxDate,r=n.excludeDates,a=n.includeDates,c=n.filterDate;return yi(e,{minDate:gd(o),maxDate:D2(s)})||r&&r.some(function(l){return Yt(e,l)})||a&&!a.some(function(l){return Yt(e,l)})||c&&!c(_e(e))||!1}function Vi(e,n,o,s){var r=ne(e),a=st(e),c=ne(n),l=st(n),d=ne(s);return r===c&&r===d?a<=o&&o<=l:r<c?d===r&&a<=o||d===c&&l>=o||d<c&&d>r:void 0}function cg(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.maxDate,r=n.excludeDates,a=n.includeDates,c=n.filterDate;return yi(e,{minDate:o,maxDate:s})||r&&r.some(function(l){return Va(e,l)})||a&&!a.some(function(l){return Va(e,l)})||c&&!c(_e(e))||!1}function Hi(e,n,o){if(!Ea(n)||!Ea(o))return!1;var s=ne(n),r=ne(o);return s<=e&&r>=e}function Mu(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.maxDate,r=n.excludeDates,a=n.includeDates,c=n.filterDate,l=new Date(e,0,1);return yi(l,{minDate:vd(o),maxDate:P2(s)})||r&&r.some(function(d){return Gn(l,d)})||a&&!a.some(function(d){return Gn(l,d)})||c&&!c(_e(l))||!1}function Ui(e,n,o,s){var r=ne(e),a=os(e),c=ne(n),l=os(n),d=ne(s);return r===c&&r===d?a<=o&&o<=l:r<c?d===r&&a<=o||d===c&&l>=o||d<c&&d>r:void 0}function yi(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.maxDate;return o&&$a(e,o)<0||s&&$a(e,s)>0}function D1(e,n){return n.some(function(o){return cn(o)===cn(e)&&dn(o)===dn(e)})}function P1(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.excludeTimes,s=n.includeTimes,r=n.filterTime;return o&&D1(e,o)||s&&!D1(e,s)||r&&!r(e)||!1}function I1(e,n){var o=n.minTime,s=n.maxTime;if(!o||!s)throw new Error("Both minTime and maxTime props required");var r,a=_e(),c=fa(_a(a,dn(e)),cn(e)),l=fa(_a(a,dn(o)),cn(o)),d=fa(_a(a,dn(s)),cn(s));try{r=!ho(c,{start:l,end:d})}catch{r=!1}return r}function B1(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.includeDates,r=ds(e,1);return o&&Ta(o,r)>0||s&&s.every(function(a){return Ta(a,r)>0})||!1}function R1(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.maxDate,s=n.includeDates,r=er(e,1);return o&&Ta(r,o)>0||s&&s.every(function(a){return Ta(r,a)>0})||!1}function A1(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.minDate,s=n.includeDates,r=po(e,1);return o&&Ma(o,r)>0||s&&s.every(function(a){return Ma(a,r)>0})||!1}function O1(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.maxDate,s=n.includeDates,r=mo(e,1);return o&&Ma(r,o)>0||s&&s.every(function(a){return Ma(r,a)>0})||!1}function Du(e){var n=e.minDate,o=e.includeDates;if(o&&n){var s=o.filter(function(r){return $a(r,n)>=0});return Ac(s)}return o?Ac(o):n}function Pu(e){var n=e.maxDate,o=e.includeDates;if(o&&n){var s=o.filter(function(r){return $a(r,n)<=0});return Oc(s)}return o?Oc(o):n}function F1(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",o=new Map,s=0,r=e.length;s<r;s++){var a=e[s];if(zl(a)){var c=je(a,"MM.dd.yyyy"),l=o.get(c)||[];l.includes(n)||(l.push(n),o.set(c,l))}else if(ql(a)==="object"){var d=Object.keys(a),u=d[0],p=a[d[0]];if(typeof u=="string"&&p.constructor===Array)for(var m=0,h=p.length;m<h;m++){var f=je(p[m],"MM.dd.yyyy"),_=o.get(f)||[];_.includes(u)||(_.push(u),o.set(f,_))}}}return o}function dg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--holidays",o=new Map;return e.forEach(function(s){var r=s.date,a=s.holidayName;if(zl(r)){var c=je(r,"MM.dd.yyyy"),l=o.get(c)||{};if(!("className"in l)||l.className!==n||(d=l.holidayNames,u=[a],d.length!==u.length||!d.every(function(m,h){return m===u[h]}))){var d,u;l.className=n;var p=l.holidayNames;l.holidayNames=p?[].concat(go(p),[a]):[a],o.set(c,l)}}}),o}function ug(e,n,o,s,r){for(var a=r.length,c=[],l=0;l<a;l++){var d=bl(I2(e,cn(r[l])),dn(r[l])),u=bl(e,(o+1)*s);Jn(d,n)&&Kn(d,u)&&c.push(r[l])}return c}function q1(e){return e<10?"0".concat(e):"".concat(e)}function is(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:io,o=Math.ceil(ne(e)/n)*n;return{startPeriod:o-(n-1),endPeriod:o}}function W1(e){var n=e.getSeconds(),o=e.getMilliseconds();return _d(e.getTime()-1e3*n-o)}function pg(e,n,o,s){for(var r=[],a=0;a<2*n+1;a++){var c=e+n-a,l=!0;o&&(l=ne(o)<=c),s&&l&&(l=ne(s)>=c),l&&r.push(c)}return r}
62var mg=gi(function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;He(this,o),k(w(r=n.call(this,s)),"renderOptions",function(){var d=r.props.year,u=r.state.yearsList.map(function(h){return E.createElement("div",{className:d===h?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:h,onClick:r.onChange.bind(w(r),h),"aria-selected":d===h?"true":void 0},d===h?E.createElement("span",{className:"react-datepicker__year-option--selected"},"â"):"",h)}),p=r.props.minDate?ne(r.props.minDate):null,m=r.props.maxDate?ne(r.props.maxDate):null;return m&&r.state.yearsList.find(function(h){return h===m})||u.unshift(E.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},E.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),p&&r.state.yearsList.find(function(h){return h===p})||u.push(E.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},E.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u}),k(w(r),"onChange",function(d){r.props.onChange(d)}),k(w(r),"handleClickOutside",function(){r.props.onCancel()}),k(w(r),"shiftYears",function(d){var u=r.state.yearsList.map(function(p){return p+d});r.setState({yearsList:u})}),k(w(r),"incrementYears",function(){return r.shiftYears(1)}),k(w(r),"decrementYears",function(){return r.shiftYears(-1)});var a=s.yearDropdownItemNumber,c=s.scrollableYearDropdown,l=a||(c?10:5);return r.state={yearsList:pg(r.props.year,l,r.props.minDate,r.props.maxDate)},r.dropdownRef=i.createRef(),r}return Ue(o,[{key:"componentDidMount",value:function(){var s=this.dropdownRef.current;if(s){var r=s.children?Array.from(s.children):null,a=r?r.find(function(c){return c.ariaSelected}):null;s.scrollTop=a?a.offsetTop+(a.clientHeight-s.clientHeight)/2:(s.scrollHeight-s.clientHeight)/2}}},{key:"render",value:function(){var s=L({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return E.createElement("div",{className:s,ref:this.dropdownRef},this.renderOptions())}}]),o}()),hg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"state",{dropdownVisible:!1}),k(w(s),"renderSelectOptions",function(){for(var l=s.props.minDate?ne(s.props.minDate):1900,d=s.props.maxDate?ne(s.props.maxDate):2100,u=[],p=l;p<=d;p++)u.push(E.createElement("option",{key:p,value:p},p));return u}),k(w(s),"onSelectChange",function(l){s.onChange(l.target.value)}),k(w(s),"renderSelectMode",function(){return E.createElement("select",{value:s.props.year,className:"react-datepicker__year-select",onChange:s.onSelectChange},s.renderSelectOptions())}),k(w(s),"renderReadView",function(l){return E.createElement("div",{key:"read",style:{visibility:l?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(d){return s.toggleDropdown(d)}},E.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),E.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},s.props.year))}),k(w(s),"renderDropdown",function(){return E.createElement(mg,{key:"dropdown",year:s.props.year,onChange:s.onChange,onCancel:s.toggleDropdown,minDate:s.props.minDate,maxDate:s.props.maxDate,scrollableYearDropdown:s.props.scrollableYearDropdown,yearDropdownItemNumber:s.props.yearDropdownItemNumber})}),k(w(s),"renderScrollMode",function(){var l=s.state.dropdownVisible,d=[s.renderReadView(!l)];return l&&d.unshift(s.renderDropdown()),d}),k(w(s),"onChange",function(l){s.toggleDropdown(),l!==s.props.year&&s.props.onChange(l)}),k(w(s),"toggleDropdown",function(l){s.setState({dropdownVisible:!s.state.dropdownVisible},function(){s.props.adjustDateOnChange&&s.handleYearChange(s.props.date,l)})}),k(w(s),"handleYearChange",function(l,d){s.onSelect(l,d),s.setOpen()}),k(w(s),"onSelect",function(l,d){s.props.onSelect&&s.props.onSelect(l,d)}),k(w(s),"setOpen",function(){s.props.setOpen&&s.props.setOpen(!0)}),s}return Ue(o,[{key:"render",value:function(){var s;switch(this.props.dropdownMode){case"scroll":s=this.renderScrollMode();break;case"select":s=this.renderSelectMode()}return E.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},s)}}]),o}
62(),fg=gi(function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"isSelectedMonth",function(l){return s.props.month===l}),k(w(s),"renderOptions",function(){return s.props.monthNames.map(function(l,d){return E.createElement("div",{className:s.isSelectedMonth(d)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:l,onClick:s.onChange.bind(w(s),d),"aria-selected":s.isSelectedMonth(d)?"true":void 0},s.isSelectedMonth(d)?E.createElement("span",{className:"react-datepicker__month-option--selected"},"â"):"",l)})}),k(w(s),"onChange",function(l){return s.props.onChange(l)}),k(w(s),"handleClickOutside",function(){return s.props.onCancel()}),s}return Ue(o,[{key:"render",value:function(){return E.createElement("div",{className:"react-datepicker__month-dropdown"},this.renderOptions())}}]),o}()),_g=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"state",{dropdownVisible:!1}),k(w(s),"renderSelectOptions",function(l){return l.map(function(d,u){return E.createElement("option",{key:u,value:u},d)})}),k(w(s),"renderSelectMode",function(l){return E.createElement("select",{value:s.props.month,className:"react-datepicker__month-select",onChange:function(d){return s.onChange(d.target.value)}},s.renderSelectOptions(l))}),k(w(s),"renderReadView",function(l,d){return E.createElement("div",{key:"read",style:{visibility:l?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:s.toggleDropdown},E.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),E.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},d[s.props.month]))}),k(w(s),"renderDropdown",function(l){return E.createElement(fg,{key:"dropdown",month:s.props.month,monthNames:l,onChange:s.onChange,onCancel:s.toggleDropdown})}),k(w(s),"renderScrollMode",function(l){var d=s.state.dropdownVisible,u=[s.renderReadView(!d,l)];return d&&u.unshift(s.renderDropdown(l)),u}),k(w(s),"onChange",function(l){s.toggleDropdown(),l!==s.props.month&&s.props.onChange(l)}),k(w(s),"toggleDropdown",function(){return s.setState({dropdownVisible:!s.state.dropdownVisible})}),s}return Ue(o,[{key:"render",value:function(){var s,r=this,a=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(c){return $u(c,r.props.locale)}:function(c){return pc(c,r.props.locale)});switch(this.props.dropdownMode){case"scroll":s=this.renderScrollMode(a);break;case"select":s=this.renderSelectMode(a)}return E.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},s)}}]),o}();function gg(e,n){for(var o=[],s=zn(e),r=zn(n);!Jn(s,r);)o.push(_e(s)),s=er(s,1);return o}var vg=gi(function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),k(w(r=n.call(this,s)),"renderOptions",function(){return r.state.monthYearsList.map(function(a){var c=vl(a),l=Gn(r.props.date,a)&&Yt(r.props.date,a);return E.createElement("div",{className:l?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:c,onClick:r.onChange.bind(w(r),c),"aria-selected":l?"true":void 0},l?E.createElement("span",{className:"react-datepicker__month-year-option--selected"},"â"):"",je(a,r.props.dateFormat,r.props.locale))})}),k(w(r),"onChange",function(a){return r.props.onChange(a)}),k(w(r),"handleClickOutside",function(){r.props.onCancel()}),r.state={monthYearsList:gg(r.props.minDate,r.props.maxDate)},r}return Ue(o,[{key:"render",value:function(){var s=L({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return E.createElement("div",{className:s},this.renderOptions())}}]),o}()),yg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"state",{dropdownVisible:!1}),k(w(s),"renderSelectOptions",function(){for(var l=zn(s.props.minDate),d=zn(s.props.maxDate),u=[];!Jn(l,d);){var p=vl(l);u.push(E.createElement("option",{key:p,value:p},je(l,s.props.dateFormat,s.props.locale))),l=er(l,1)}return u}),k(w(s),"onSelectChange",function(l){s.onChange(l.target.value)}),k(w(s),"renderSelectMode",function(){return E.createElement("select",{value:vl(zn(s.props.date)),className:"react-datepicker__month-year-select",onChange:s.onSelectChange},s.renderSelectOptions())}),k(w(s),"renderReadView",function(l){var d=je(s.props.date,s.props.dateFormat,s.props.locale);return E.createElement("div",{key:"read",style:{visibility:l?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:function(u){return s.toggleDropdown(u)}},E.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),E.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},d))}),k(w(s),"renderDropdown",function(){return E.createElement(vg,{key:"dropdown",date:s.props.date,dateFormat:s.props.dateFormat,onChange:s.onChange,onCancel:s.toggleDropdown,minDate:s.props.minDate,maxDate:s.props.maxDate,scrollableMonthYearDropdown:s.props.scrollableMonthYearDropdown,locale:s.props.locale})}),k(w(s),"renderScrollMode",function(){var l=s.state.dropdownVisible,d=[s.renderReadView(!l)];return l&&d.unshift(s.renderDropdown()),d}),k(w(s),"onChange",function(l){s.toggleDropdown();var d=_e(parseInt(l));Gn(s.props.date,d)&&Yt(s.props.date,d)||s.props.onChange(d)}),k(w(s),"toggleDropdown",function(){return s.setState({dropdownVisible:!s.state.dropdownVisible})}),s}return Ue(o,[{key:"render",value:function(){var s;switch(this.props.dropdownMode){case"scroll":s=this.renderScrollMode();break;case"select":s=this.renderSelectMode()}return E.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},s)}}]),o}
62(),bg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"dayEl",E.createRef()),k(w(s),"handleClick",function(l){!s.isDisabled()&&s.props.onClick&&s.props.onClick(l)}),k(w(s),"handleMouseEnter",function(l){!s.isDisabled()&&s.props.onMouseEnter&&s.props.onMouseEnter(l)}),k(w(s),"handleOnKeyDown",function(l){l.key===" "&&(l.preventDefault(),l.key="Enter"),s.props.handleOnKeyDown(l)}),k(w(s),"isSameDay",function(l){return Ce(s.props.day,l)}),k(w(s),"isKeyboardSelected",function(){return!s.props.disabledKeyboardNavigation&&!(s.isSameDay(s.props.selected)||s.isSameWeek(s.props.selected))&&(s.isSameDay(s.props.preSelection)||s.isSameWeek(s.props.preSelection))}),k(w(s),"isDisabled",function(){return vi(s.props.day,s.props)}),k(w(s),"isExcluded",function(){return mc(s.props.day,s.props)}),k(w(s),"isStartOfWeek",function(){return Ce(s.props.day,un(s.props.day,s.props.locale,s.props.calendarStartDay))}),k(w(s),"isSameWeek",function(l){return s.props.showWeekPicker&&Ce(l,un(s.props.day,s.props.locale,s.props.calendarStartDay))}),k(w(s),"getHighLightedClass",function(){var l=s.props,d=l.day,u=l.highlightDates;if(!u)return!1;var p=je(d,"MM.dd.yyyy");return u.get(p)}),k(w(s),"getHolidaysClass",function(){var l=s.props,d=l.day,u=l.holidays;if(!u)return!1;var p=je(d,"MM.dd.yyyy");return u.has(p)?[u.get(p).className]:void 0}),k(w(s),"isInRange",function(){var l=s.props,d=l.day,u=l.startDate,p=l.endDate;return!(!u||!p)&&Na(d,u,p)}),k(w(s),"isInSelectingRange",function(){var l,d=s.props,u=d.day,p=d.selectsStart,m=d.selectsEnd,h=d.selectsRange,f=d.selectsDisabledDaysInRange,_=d.startDate,v=d.endDate,g=(l=s.props.selectingDate)!==null&&l!==void 0?l:s.props.preSelection;return!(!(p||m||h)||!g||!f&&s.isDisabled())&&(p&&v&&(Kn(g,v)||kr(g,v))?Na(u,g,v):(m&&_&&(Jn(g,_)||kr(g,_))||!(!h||!_||v||!Jn(g,_)&&!kr
62(g,_)))&&Na(u,_,g))}),k(w(s),"isSelectingRangeStart",function(){var l;if(!s.isInSelectingRange())return!1;var d=s.props,u=d.day,p=d.startDate,m=d.selectsStart,h=(l=s.props.selectingDate)!==null&&l!==void 0?l:s.props.preSelection;return Ce(u,m?h:p)}),k(w(s),"isSelectingRangeEnd",function(){var l;if(!s.isInSelectingRange())return!1;var d=s.props,u=d.day,p=d.endDate,m=d.selectsEnd,h=d.selectsRange,f=(l=s.props.selectingDate)!==null&&l!==void 0?l:s.props.preSelection;return Ce(u,m||h?f:p)}),k(w(s),"isRangeStart",function(){var l=s.props,d=l.day,u=l.startDate,p=l.endDate;return!(!u||!p)&&Ce(u,d)}),k(w(s),"isRangeEnd",function(){var l=s.props,d=l.day,u=l.startDate,p=l.endDate;return!(!u||!p)&&Ce(p,d)}),k(w(s),"isWeekend",function(){var l=v2(s.props.day);return l===0||l===6}),k(w(s),"isAfterMonth",function(){return s.props.month!==void 0&&(s.props.month+1)%12===st(s.props.day)}),k(w(s),"isBeforeMonth",function(){return s.props.month!==void 0&&(st(s.props.day)+1)%12===s.props.month}),k(w(s),"isCurrentDay",function(){return s.isSameDay(_e())}),k(w(s),"isSelected",function(){return s.isSameDay(s.props.selected)||s.isSameWeek(s.props.selected)}),k(w(s),"getClassNames",function(l){var d,u=s.props.dayClassName?s.props.dayClassName(l):void 0;return L("react-datepicker__day",u,"react-datepicker__day--"+je(s.props.day,"ddd",d),{"react-datepicker__day--disabled":s.isDisabled(),"react-datepicker__day--excluded":s.isExcluded(),"react-datepicker__day--selected":s.isSelected(),"react-datepicker__day--keyboard-selected":s.isKeyboardSelected(),"react-datepicker__day--range-start":s.isRangeStart(),"react-datepicker__day--range-end":s.isRangeEnd(),"react-datepicker__day--in-range":s.isInRange(),"react-datepicker__day--in-selecting-range":s.isInSelectingRange(),"react-datepicker__day--selecting-range-start":s.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":s.isSelectingRangeEnd(),"react-datepicker__day--today":s.isCurrentDay(),"react-datepicker__day--weekend":s.isWeekend(),"react-datepicker__day--outside-month":s.isAfterMonth()||s.isBeforeMonth()},s.getHighLightedClass("react-datepicker__day--highlighted"),s.getHolidaysClass())}),k(w(s),"getAriaLabel",function(){var l=s.props,d=l.day,u=l.ariaLabelPrefixWhenEnabled,p=u===void 0?"Choose":u,m=l.ariaLabelPrefixWhenDisabled,h=m===void 0?"Not available":m,f=s.isDisabled()||s.isExcluded()?h:p;return"".concat(f," ").concat(je(d,"PPPP",s.props.locale))}),k(w(s),"getTitle",function(){var l=s.props,d=l.day,u=l.holidays,p=u===void 0?new Map:u,m=je(d,"MM.dd.yyyy");return p.has(m)&&p.get(m).holidayNames.length>0?p.get(m).holidayNames.join(", "):""}),k(w(s),"getTabIndex",function(l,d){var u=l||s.props.selected,p=d||s.props.preSelection;return(!s.props.showWeekPicker||!s.props.showWeekNumber&&s.isStartOfWeek())&&(s.isKeyboardSelected()||s.isSameDay(u)&&Ce(p,u))?0:-1}),k(w(s),"handleFocusDay",function(){var l,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=!1;s.getTabIndex()===0&&!d.isInputFocused&&s.isSameDay(s.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(u=!0),s.props.inline&&!s.props.shouldFocusDayInline&&(u=!1),s.props.containerRef&&s.props.containerRef.current&&s.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(u=!0),s.props.monthShowsDuplicateDaysEnd&&s.isAfterMonth()&&(u=!1),s.props.monthShowsDuplicateDaysStart&&s.isBeforeMonth()&&(u=!1)),u&&((l=s.dayEl.current)===null||l===void 0||l.focus({preventScroll:!0}))}),k(w(s),"renderDayContents",function(){return s.props.monthShowsDuplicateDaysEnd&&s.isAfterMonth()||s.props.monthShowsDuplicateDaysStart&&s.isBeforeMonth()?null:s.props.renderDayContents?s.props.renderDayContents(Pc(s.props.day),s.props.day):Pc(s.props.day)}),k(w(s),"render",function(){return E.createElement("div",{ref:s.dayEl,className:s.getClassNames(s.props.day),onKeyDown:s.handleOnKeyDown,onClick:s.handleClick,onMouseEnter:s.handleMouseEnter,tabIndex:s.getTabIndex(),"aria-label":s.getAriaLabel(),role:"option",title:s.getTitle(),"aria-disabled":s.isDisabled(),"aria-current":s.isCurrentDay()?"date":void 0,"aria-selected":s.isSelected()||s.isInRange()},s.renderDayContents(),s.getTitle()!==""&&E.createElement("span",{className:"holiday-overlay"},s.getTitle()))}),s}
62return Ue(o,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(s){this.handleFocusDay(s)}}]),o}(),xg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"weekNumberEl",E.createRef()),k(w(s),"handleClick",function(l){s.props.onClick&&s.props.onClick(l)}),k(w(s),"handleOnKeyDown",function(l){l.key===" "&&(l.preventDefault(),l.key="Enter"),s.props.handleOnKeyDown(l)}),k(w(s),"isKeyboardSelected",function(){return!s.props.disabledKeyboardNavigation&&!Ce(s.props.date,s.props.selected)&&Ce(s.props.date,s.props.preSelection)}),k(w(s),"getTabIndex",function(){return s.props.showWeekPicker&&s.props.showWeekNumber&&(s.isKeyboardSelected()||Ce(s.props.date,s.props.selected)&&Ce(s.props.preSelection,s.props.selected))?0:-1}),k(w(s),"handleFocusWeekNumber",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=!1;s.getTabIndex()===0&&!l.isInputFocused&&Ce(s.props.date,s.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(d=!0),s.props.inline&&!s.props.shouldFocusDayInline&&(d=!1),s.props.containerRef&&s.props.containerRef.current&&s.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(d=!0)),d&&s.weekNumberEl.current&&s.weekNumberEl.current.focus({preventScroll:!0})}),s}return Ue(o,[{key:"componentDidMount",value:function(){this.handleFocusWeekNumber()}},{key:"componentDidUpdate",value:function(s){this.handleFocusWeekNumber(s)}},{key:"render",value:function(){var s=this.props,r=s.weekNumber,a=s.ariaLabelPrefix,c=a===void 0?"week ":a,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s.onClick,"react-datepicker__week-number--selected":Ce(this.props.date,this.props.selected),"react-datepicker__week-number--keyboard-selected":this.isKeyboardSelected()};return E.createElement("div",{ref:this.weekNumberEl,className:L(l),"aria-label":"".concat(c," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},r)}}],[{key:"defaultProps",get:function(){return{ariaLabelPrefix:"week "}}}]),o}(),Cg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"handleDayClick",function(l,d){s.props.onDayClick&&s.props.onDayClick(l,d)}),k(w(s),"handleDayMouseEnter",function(l){s.props.onDayMouseEnter&&s.props.onDayMouseEnter(l)}),k(w(s),"handleWeekClick",function(l,d,u){if(typeof s.props.onWeekSelect=="function"&&s.props.onWeekSelect(l,d,u),s.props.showWeekPicker){var p=un(l,s.props.locale,s.props.calendarStartDay);s.handleDayClick(p,u)}s.props.shouldCloseOnSelect&&s.props.setOpen(!1)}),k(w(s),"formatWeekNumber",function(l){return s.props.formatWeekNumber?s.props.formatWeekNumber(l):function(d,u){var p=jr()&&Sr(jr());return y2(d,p?{locale:p}:null)}(l)}),k(w(s),"renderDays",function(){var l=un(s.props.day,s.props.locale,s.props.calendarStartDay),d=[],u=s.formatWeekNumber(l);if(s.props.showWeekNumber){var p=s.props.onWeekSelect||s.props.showWeekPicker?s.handleWeekClick.bind(w(s),l,u):void 0;d.push(E.createElement(xg,{key:"W",weekNumber:u,date:l,onClick:p,selected:s.props.selected,preSelection:s.props.preSelection,ariaLabelPrefix:s.props.ariaLabelPrefix,showWeekPicker:s.props.showWeekPicker,showWeekNumber:s.props.showWeekNumber,disabledKeyboardNavigation:s.props.disabledKeyboardNavigation,handleOnKeyDown:s.props.handleOnKeyDown,isInputFocused:s.props.isInputFocused,containerRef:s.props.containerRef}))}return d.concat([0,1,2,3,4,5,6].map(function(m){var h=Ua(l,m);return E.createElement(bg,{ariaLabelPrefixWhenEnabled:s.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:s.props.disabledDayAriaLabelPrefix,key:h.valueOf(),day:h,month:s.props.month,onClick:s.handleDayClick.bind(w(s),h),onMouseEnter:s.handleDayMouseEnter.bind(w(s),h),minDate:s.props.minDate,maxDate:s.props.maxDate,excludeDates:s.props.excludeDates,excludeDateIntervals:s.props.excludeDateIntervals,includeDates:s.props.includeDates,includeDateIntervals:s.props.includeDateIntervals,highlightDates:s.props.highlightDates,holidays:s.props.holidays,selectingDate:s.props.selectingDate,filterDate:s.props.filterDate,preSelection:s.props.preSelection,selected:s.props.selected,selectsStart:s.props.selectsStart,selectsEnd:s.props.selectsEnd,selectsRange:s.props.selectsRange,showWeekPicker:s.props.showWeekPicker,showWeekNumber:s.props.showWeekNumber,selectsDisabledDaysInRange:s.props.selectsDisabledDaysInRange,startDate:s.props.startDate,endD
62ate:s.props.endDate,dayClassName:s.props.dayClassName,renderDayContents:s.props.renderDayContents,disabledKeyboardNavigation:s.props.disabledKeyboardNavigation,handleOnKeyDown:s.props.handleOnKeyDown,isInputFocused:s.props.isInputFocused,containerRef:s.props.containerRef,inline:s.props.inline,shouldFocusDayInline:s.props.shouldFocusDayInline,monthShowsDuplicateDaysEnd:s.props.monthShowsDuplicateDaysEnd,monthShowsDuplicateDaysStart:s.props.monthShowsDuplicateDaysStart,locale:s.props.locale})}))}),k(w(s),"startOfWeek",function(){return un(s.props.day,s.props.locale,s.props.calendarStartDay)}),k(w(s),"isKeyboardSelected",function(){return!s.props.disabledKeyboardNavigation&&!Ce(s.startOfWeek(),s.props.selected)&&Ce(s.startOfWeek(),s.props.preSelection)}),s}return Ue(o,[{key:"render",value:function(){var s={"react-datepicker__week":!0,"react-datepicker__week--selected":Ce(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return E.createElement("div",{className:L(s)},this.renderDays())}}],[{key:"defaultProps",get:function(){return{shouldCloseOnSelect:!0}}}]),o}(),Iu="two_columns",Bu="three_columns",Ru="four_columns",Yi=k(k(k({},Iu,{grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2}),Bu,{grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3}),Ru,{grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4});function V1(e,n){return e?Ru:n?Iu:Bu}var kg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"MONTH_REFS",go(Array(12)).map(function(){return E.createRef()})),k(w(s),"QUARTER_REFS",go(Array(4)).map(function(){return E.createRef()})),k(w(s),"isDisabled",function(l){return vi(l,s.props)}),k(w(s),"isExcluded",function(l){return mc(l,s.props)}),k(w(s),"handleDayClick",function(l,d){s.props.onDayClick&&s.props.onDayClick(l,d,s.props.orderInDisplay)}),k(w(s),"handleDayMouseEnter",function(l){s.props.onDayMouseEnter&&s.props.onDayMouseEnter(l)}),k(w(s),"handleMouseLeave",function(){s.props.onMouseLeave&&s.props.onMouseLeave()}),k(w(s),"isRangeStartMonth",function(l){var d=s.props,u=d.day,p=d.startDate,m=d.endDate;return!(!p||!m)&&Yt(jt(u,l),p)}),k(w(s),"isRangeStartQuarter",function(l){var d=s.props,u=d.day,p=d.startDate,m=d.endDate;return!(!p||!m)&&Va(qr(u,l),p)}),k(w(s),"isRangeEndMonth",function(l){var d=s.props,u=d.day,p=d.startDate,m=d.endDate;return!(!p||!m)&&Yt(jt(u,l),m)}),k(w(s),"isRangeEndQuarter",function(l){var d=s.props,u=d.day,p=d.startDate,m=d.endDate;return!(!p||!m)&&Va(qr(u,l),m)}),k(w(s),"isInSelectingRangeMonth",function(l){var d,u=s.props,p=u.day,m=u.selectsStart,h=u.selectsEnd,f=u.selectsRange,_=u.startDate,v=u.endDate,g=(d=s.props.selectingDate)!==null&&d!==void 0?d:s.props.preSelection;return!(!(m||h||f)||!g)&&(m&&v?Vi(g,v,l,p):(h&&_||!(!f||!_||v))&&Vi(_,g,l,p))}),k(w(s),"isSelectingMonthRangeStart",function(l){var d;if(!s.isInSelectingRangeMonth(l))return!1;var u=s.props,p=u.day,m=u.startDate,h=u.selectsStart,f=jt(p,l),_=(d=s.props.selectingDate)!==null&&d!==void 0?d:s.props.preSelection;return Yt(f,h?_:m)}),k(w(s),"isSelectingMonthRangeEnd",function(l){var d;if(!s.isInSelectingRangeMonth(l))return!1;var u=s.props,p=u.day,m=u.endDate,h=u.selectsEnd,f=u.selectsRange,_=jt(p,l),v=(d=s.props.selectingDate)!==null&&d!==void 0?d:s.props.preSelection;return Yt(_,h||f?v:m)}),k(w(s),"isInSelectingRangeQuarter",function(l){var d,u=s.props,p=u.day,m=u.selectsStart,h=u.selectsEnd,f=u.selectsRange,_=u.startDate,v=u.endDate,g=(d=s.props.selectingDate)!==null&&d!==void 0?d:s.props.preSelection;return!(!(m||h||f)||!g)&&(m&&v?Ui(g,v,l,p):(h&&_||!(!f||!_||v))&&Ui(_,g,l,p))}),k(w(s),"isWeekInMonth",function(l){var d=s.props.day,u=Ua(l,6);return Yt(l,d)||Yt(u,d)}),k(w(s),"isCurrentMonth",function(l,d){return ne(l)===ne(_e())&&d===st(_e())}),k(w(s),"isCurrentQuarter",function(l,d){return ne(l)===ne(_e())&&d===os(_e())}),k(w(s),"isSelectedMonth",function(l,d,u){return st(u)===d&&ne(l)===ne(u)}),k(w(s),"isSelectedQuarter",function(l,d,u){return os(l)===d&&ne(l)===ne(u)}),k(w(s),"renderWeeks",function(){for(var l=[],d=s.props.fixedHeight,u=0,p=!1,m=un(zn(s.props.day),s.props.locale,s.props.calendarStartDay);l.push(E.createElement(Cg,{ariaLabelPrefix:s.props.weekAriaLabelPrefix,chooseDayAriaLabelPrefix:s.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:s.props.disabledDayAriaLabelPrefix,key:u,day:m,month:st(s.props.day),onDayCl
62ick:s.handleDayClick,onDayMouseEnter:s.handleDayMouseEnter,onWeekSelect:s.props.onWeekSelect,formatWeekNumber:s.props.formatWeekNumber,locale:s.props.locale,minDate:s.props.minDate,maxDate:s.props.maxDate,excludeDates:s.props.excludeDates,excludeDateIntervals:s.props.excludeDateIntervals,includeDates:s.props.includeDates,includeDateIntervals:s.props.includeDateIntervals,inline:s.props.inline,shouldFocusDayInline:s.props.shouldFocusDayInline,highlightDates:s.props.highlightDates,holidays:s.props.holidays,selectingDate:s.props.selectingDate,filterDate:s.props.filterDate,preSelection:s.props.preSelection,selected:s.props.selected,selectsStart:s.props.selectsStart,selectsEnd:s.props.selectsEnd,selectsRange:s.props.selectsRange,selectsDisabledDaysInRange:s.props.selectsDisabledDaysInRange,showWeekNumber:s.props.showWeekNumbers,showWeekPicker:s.props.showWeekPicker,startDate:s.props.startDate,endDate:s.props.endDate,dayClassName:s.props.dayClassName,setOpen:s.props.setOpen,shouldCloseOnSelect:s.props.shouldCloseOnSelect,disabledKeyboardNavigation:s.props.disabledKeyboardNavigation,renderDayContents:s.props.renderDayContents,handleOnKeyDown:s.props.handleOnKeyDown,isInputFocused:s.props.isInputFocused,containerRef:s.props.containerRef,calendarStartDay:s.props.calendarStartDay,monthShowsDuplicateDaysEnd:s.props.monthShowsDuplicateDaysEnd,monthShowsDuplicateDaysStart:s.props.monthShowsDuplicateDaysStart})),!p;){u++,m=yl(m,1);var h=d&&u>=6,f=!d&&!s.isWeekInMonth(m);if(h||f){if(!s.props.peekNextMonth)break;p=!0}}return l}),k(w(s),"onMonthClick",function(l,d){s.handleDayClick(zn(jt(s.props.day,d)),l)}),k(w(s),"onMonthMouseEnter",function(l){s.handleDayMouseEnter(zn(jt(s.props.day,l)))}),k(w(s),"handleMonthNavigation",function(l,d){s.isDisabled(d)||s.isExcluded(d)||(s.props.setPreSelection(d),s.MONTH_REFS[l].current&&s.MONTH_REFS[l].current.focus())}),k(w(s),"onMonthKeyDown",function(l,d){var u=s.props,p=u.selected,m=u.preSelection,h=u.disabledKeyboardNavigation,f=u.showTwoColumnMonthYearPicker,_=u.showFourColumnMonthYearPicker,v=u.setPreSelection,g=l.key;if(g!=="Tab"&&l.preventDefault(),!h){var C=V1(_,f),y=Yi[C].verticalNavigationOffset,b=Yi[C].grid;switch(g){case"Enter":s.onMonthClick(l,d),v(p);break;case"ArrowRight":s.handleMonthNavigation(d===11?0:d+1,er(m,1));break;case"ArrowLeft":s.handleMonthNavigation(d===0?11:d-1,ds(m,1));break;case"ArrowUp":s.handleMonthNavigation(b[0].includes(d)?d+12-y:d-y,ds(m,y));break;case"ArrowDown":s.handleMonthNavigation(b[b.length-1].includes(d)?d-12+y:d+y,er(m,y))}}}),k(w(s),"onQuarterClick",function(l,d){s.handleDayClick(T1(qr(s.props.day,d)),l)}),k(w(s),"onQuarterMouseEnter",function(l){s.handleDayMouseEnter(T1(qr(s.props.day,l)))}),k(w(s),"handleQuarterNavigation",function(l,d){s.isDisabled(d)||s.isExcluded(d)||(s.props.setPreSelection(d),s.QUARTER_REFS[l-1].current&&s.QUARTER_REFS[l-1].current.focus())}),k(w(s),"onQuarterKeyDown",function(l,d){var u=l.key;if(!s.props.disabledKeyboardNavigation)switch(u){case"Enter":s.onQuarterClick(l,d),s.props.setPreSelection(s.props.selected);break;case"ArrowRight":s.handleQuarterNavigation(d===4?1:d+1,x2(s.props.preSelection,1));break;case"ArrowLeft":s.handleQuarterNavigation(d===1?4:d-1,b2(s.props.preSelection,1))}}),k(w(s),"getMonthClassNames",function(l){var d=s.props,u=d.day,p=d.startDate,m=d.endDate,h=d.selected,f=d.minDate,_=d.maxDate,v=d.preSelection,g=d.monthClassName,C=d.excludeDates,y=d.includeDates,b=g?g(jt(u,l)):void 0,x=jt(u,l);return L("react-datepicker__month-text","react-datepicker__month-".concat(l),b,{"react-datepicker__month-text--disabled":(f||_||C||y)&&Tu(x,s.props),"react-datepicker__month-text--selected":s.isSelectedMonth(u,l,h),"react-datepicker__month-text--keyboard-selected":!s.props.disabledKeyboardNavigation&&st(v)===l,"react-datepicker__month-text--in-selecting-range":s.isInSelectingRangeMonth(l),"react-datepicker__month-text--in-range":Vi(p,m,l,u),"react-datepicker__month-text--range-start":s.isRangeStartMonth(l),"react-datepicker__month-text--range-end":s.isRangeEndMonth(l),"react-datepicker__month-text--selecting-range-start":s.isSelectingMonthRangeStart(l),"react-datepicker__month-text--selecting-range-end":s.isSelectingMonthRangeEnd(l),"react-datepicker__month-text--today":s.isCurrentMonth(u,l)})}),k(w(s),"getTabIndex",function(l){var d=st(s.props.preSelection);return s.props.disabledKeyboardNavigation||l!==d?"-1":"0"}
62),k(w(s),"getQuarterTabIndex",function(l){var d=os(s.props.preSelection);return s.props.disabledKeyboardNavigation||l!==d?"-1":"0"}),k(w(s),"getAriaLabel",function(l){var d=s.props,u=d.chooseDayAriaLabelPrefix,p=u===void 0?"Choose":u,m=d.disabledDayAriaLabelPrefix,h=m===void 0?"Not available":m,f=d.day,_=jt(f,l),v=s.isDisabled(_)||s.isExcluded(_)?h:p;return"".concat(v," ").concat(je(_,"MMMM yyyy"))}),k(w(s),"getQuarterClassNames",function(l){var d=s.props,u=d.day,p=d.startDate,m=d.endDate,h=d.selected,f=d.minDate,_=d.maxDate,v=d.preSelection,g=d.disabledKeyboardNavigation;return L("react-datepicker__quarter-text","react-datepicker__quarter-".concat(l),{"react-datepicker__quarter-text--disabled":(f||_)&&cg(qr(u,l),s.props),"react-datepicker__quarter-text--selected":s.isSelectedQuarter(u,l,h),"react-datepicker__quarter-text--keyboard-selected":!g&&os(v)===l,"react-datepicker__quarter-text--in-selecting-range":s.isInSelectingRangeQuarter(l),"react-datepicker__quarter-text--in-range":Ui(p,m,l,u),"react-datepicker__quarter-text--range-start":s.isRangeStartQuarter(l),"react-datepicker__quarter-text--range-end":s.isRangeEndQuarter(l)})}),k(w(s),"getMonthContent",function(l){var d=s.props,u=d.showFullMonthYearPicker,p=d.renderMonthContent,m=d.locale,h=d.day,f=$u(l,m),_=pc(l,m);return p?p(l,f,_,h):u?_:f}),k(w(s),"getQuarterContent",function(l){var d=s.props,u=d.renderQuarterContent,p=function(m,h){return je(qr(_e(),m),"QQQ",h)}(l,d.locale);return u?u(l,p):p}),k(w(s),"renderMonths",function(){var l=s.props,d=l.showTwoColumnMonthYearPicker,u=l.showFourColumnMonthYearPicker,p=l.day,m=l.selected;return Yi[V1(u,d)].grid.map(function(h,f){return E.createElement("div",{className:"react-datepicker__month-wrapper",key:f},h.map(function(_,v){return E.createElement("div",{ref:s.MONTH_REFS[_],key:v,onClick:function(g){s.onMonthClick(g,_)},onKeyDown:function(g){s.onMonthKeyDown(g,_)},onMouseEnter:function(){return s.onMonthMouseEnter(_)},tabIndex:s.getTabIndex(_),className:s.getMonthClassNames(_),role:"option","aria-label":s.getAriaLabel(_),"aria-current":s.isCurrentMonth(p,_)?"date":void 0,"aria-selected":s.isSelectedMonth(p,_,m)},s.getMonthContent(_))}))})}),k(w(s),"renderQuarters",function(){var l=s.props,d=l.day,u=l.selected;return E.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(p,m){return E.createElement("div",{key:m,ref:s.QUARTER_REFS[m],role:"option",onClick:function(h){s.onQuarterClick(h,p)},onKeyDown:function(h){s.onQuarterKeyDown(h,p)},onMouseEnter:function(){return s.onQuarterMouseEnter(p)},className:s.getQuarterClassNames(p),"aria-selected":s.isSelectedQuarter(d,p,u),tabIndex:s.getQuarterTabIndex(p),"aria-current":s.isCurrentQuarter(d,p)?"date":void 0},s.getQuarterContent(p))}))}),k(w(s),"getClassNames",function(){var l=s.props,d=l.selectingDate,u=l.selectsStart,p=l.selectsEnd,m=l.showMonthYearPicker,h=l.showQuarterYearPicker,f=l.showWeekPicker;return L("react-datepicker__month",{"react-datepicker__month--selecting-range":d&&(u||p)},{"react-datepicker__monthPicker":m},{"react-datepicker__quarterPicker":h},{"react-datepicker__weekPicker":f})}),s}return Ue(o,[{key:"render",value:function(){var s=this.props,r=s.showMonthYearPicker,a=s.showQuarterYearPicker,c=s.day,l=s.ariaLabelPrefix,d=l===void 0?"month ":l;return E.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(d," ").concat(je(c,"yyyy-MM")),role:"listbox"},r?this.renderMonths():a?this.renderQuarters():this.renderWeeks())}}]),o}(),Au=function(e){Ye(o,E.Component);var n=Ke(o);function o(){var s;He(this,o);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return k(w(s=n.call.apply(n,[this].concat(a))),"state",{height:null}),k(w(s),"scrollToTheSelectedTime",function(){requestAnimationFrame(function(){s.list&&(s.list.scrollTop=s.centerLi&&o.calcCenterPosition(s.props.monthRef?s.props.monthRef.clientHeight-s.header.clientHeight:s.list.clientHeight,s.centerLi))})}),k(w(s),"handleClick",function(l){(s.props.minTime||s.props.maxTime)&&I1(l,s.props)||(s.props.excludeTimes||s.props.includeTimes||s.props.filterTime)&&P1(l,s.props)||s.props.onChange(l)}),k(w(s),"isSelectedTime",function(l){return s.props.selected&&(
62d=s.props.selected,u=l,W1(d).getTime()===W1(u).getTime());var d,u}),k(w(s),"isDisabledTime",function(l){return(s.props.minTime||s.props.maxTime)&&I1(l,s.props)||(s.props.excludeTimes||s.props.includeTimes||s.props.filterTime)&&P1(l,s.props)}),k(w(s),"liClasses",function(l){var d=["react-datepicker__time-list-item",s.props.timeClassName?s.props.timeClassName(l):void 0];return s.isSelectedTime(l)&&d.push("react-datepicker__time-list-item--selected"),s.isDisabledTime(l)&&d.push("react-datepicker__time-list-item--disabled"),s.props.injectTimes&&(60*cn(l)+dn(l))%s.props.intervals!=0&&d.push("react-datepicker__time-list-item--injected"),d.join(" ")}),k(w(s),"handleOnKeyDown",function(l,d){l.key===" "&&(l.preventDefault(),l.key="Enter"),l.key!=="ArrowUp"&&l.key!=="ArrowLeft"||!l.target.previousSibling||(l.preventDefault(),l.target.previousSibling.focus()),l.key!=="ArrowDown"&&l.key!=="ArrowRight"||!l.target.nextSibling||(l.preventDefault(),l.target.nextSibling.focus()),l.key==="Enter"&&s.handleClick(d),s.props.handleOnKeyDown(l)}),k(w(s),"renderTimes",function(){for(var l=[],d=s.props.format?s.props.format:"p",u=s.props.intervals,p=s.props.selected||s.props.openToDate||_e(),m=ls(p),h=s.props.injectTimes&&s.props.injectTimes.sort(function(b,x){return b-x}),f=60*function(b){var x=new Date(b.getFullYear(),b.getMonth(),b.getDate()),N=new Date(b.getFullYear(),b.getMonth(),b.getDate(),24);return Math.round((+N-+x)/36e5)}(p),_=f/u,v=0;v<_;v++){var g=bl(m,v*u);if(l.push(g),h){var C=ug(m,g,v,u,h);l=l.concat(C)}}var y=l.reduce(function(b,x){return x.getTime()<=p.getTime()?x:b},l[0]);return l.map(function(b,x){return E.createElement("li",{key:x,onClick:s.handleClick.bind(w(s),b),className:s.liClasses(b),ref:function(N){b===y&&(s.centerLi=N)},onKeyDown:function(N){s.handleOnKeyDown(N,b)},tabIndex:b===y?0:-1,role:"option","aria-selected":s.isSelectedTime(b)?"true":void 0,"aria-disabled":s.isDisabledTime(b)?"true":void 0},je(b,d,s.props.locale))})}),s}return Ue(o,[{key:"componentDidMount",value:function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})}},{key:"render",value:function(){var s=this,r=this.state.height;return E.createElement("div",{className:"react-datepicker__time-container ".concat(this.props.todayButton?"react-datepicker__time-container--with-today-button":"")},E.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(this.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(a){s.header=a}},E.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),E.createElement("div",{className:"react-datepicker__time"},E.createElement("div",{className:"react-datepicker__time-box"},E.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){s.list=a},style:r?{height:r}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))}}],[{key:"defaultProps",get:function(){return{intervals:30,onTimeChange:function(){},todayButton:null,timeCaption:"Time"}}}]),o}();k(Au,"calcCenterPosition",function(e,n){return n.offsetTop-(e/2-n.clientHeight/2)});var wg=function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),k(w(r=n.call(this,s)),"YEAR_REFS",go(Array(r.props.yearItemNumber)).map(function(){return E.createRef()})),k(w(r),"isDisabled",function(a){return vi(a,r.props)}),k(w(r),"isExcluded",function(a){return mc(a,r.props)}),k(w(r),"selectingDate",function(){var a;return(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection}),k(w(r),"updateFocusOnPaginate",function(a){var c=(function(){this.YEAR_REFS[a].current.focus()}).bind(w(r));window.requestAnimationFrame(c)}),k(w(r),"handleYearClick",function(a,c){r.props.onDayClick&&r.props.onDayClick(a,c)}),k(w(r),"handleYearNavigation",function(a,c){var l=r.props,d=l.date,u=l.yearItemNumber,p=is(d,u).startPeriod;r.isDisabled(c)||r.isExcluded(c)||(r.props.setPreSelection(c),a-p==-1?r.updateFocusOnPaginate(u-1):a-p===u?r.updateFocusOnPaginate(0):r.YEAR_REFS[a-p].current.focus())}),k(w(r),"isSameDay",function(a,c){return Ce(a,c)}),k(w(r),"isCurrentYear",function(a){return a===ne(_e())}),k(w(r),"isRangeStart",function(a){return r.props.startDate&&r.props.endDate&&Gn(yn(_e(),a),r.props.startDate)}),k(w(r),"isRangeEnd",function(a){return r.props.startDate&&r.props.endDate&&Gn(yn(_e(),a),r.props.endDate)}),k(w(r),"isInRange",function(a){return Hi(a,r.props.startDate,r.props.endDate)}),k(w(r),"isInSelectingRange",function(a){var c=r.props,l=c.selectsStart,d=c.selectsEnd,u=c.selectsRange,p=c.startDate,m=c.endDate;
62return!(!(l||d||u)||!r.selectingDate())&&(l&&m?Hi(a,r.selectingDate(),m):(d&&p||!(!u||!p||m))&&Hi(a,p,r.selectingDate()))}),k(w(r),"isSelectingRangeStart",function(a){if(!r.isInSelectingRange(a))return!1;var c=r.props,l=c.startDate,d=c.selectsStart,u=yn(_e(),a);return Gn(u,d?r.selectingDate():l)}),k(w(r),"isSelectingRangeEnd",function(a){if(!r.isInSelectingRange(a))return!1;var c=r.props,l=c.endDate,d=c.selectsEnd,u=c.selectsRange,p=yn(_e(),a);return Gn(p,d||u?r.selectingDate():l)}),k(w(r),"isKeyboardSelected",function(a){var c=so(yn(r.props.date,a));return!r.props.disabledKeyboardNavigation&&!r.props.inline&&!Ce(c,so(r.props.selected))&&Ce(c,so(r.props.preSelection))}),k(w(r),"onYearClick",function(a,c){var l=r.props.date;r.handleYearClick(so(yn(l,c)),a)}),k(w(r),"onYearKeyDown",function(a,c){var l=a.key;if(!r.props.disabledKeyboardNavigation)switch(l){case"Enter":r.onYearClick(a,c),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleYearNavigation(c+1,mo(r.props.preSelection,1));break;case"ArrowLeft":r.handleYearNavigation(c-1,po(r.props.preSelection,1))}}),k(w(r),"getYearClassNames",function(a){var c=r.props,l=c.minDate,d=c.maxDate,u=c.selected,p=c.excludeDates,m=c.includeDates,h=c.filterDate;return L("react-datepicker__year-text",{"react-datepicker__year-text--selected":a===ne(u),"react-datepicker__year-text--disabled":(l||d||p||m||h)&&Mu(a,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(a),"react-datepicker__year-text--range-start":r.isRangeStart(a),"react-datepicker__year-text--range-end":r.isRangeEnd(a),"react-datepicker__year-text--in-range":r.isInRange(a),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(a),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(a),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(a),"react-datepicker__year-text--today":r.
62isCurrentYear(a)})}),k(w(r),"getYearTabIndex",function(a){return r.props.disabledKeyboardNavigation?"-1":a===ne(r.props.preSelection)?"0":"-1"}),k(w(r),"getYearContainerClassNames",function(){var a=r.props,c=a.selectingDate,l=a.selectsStart,d=a.selectsEnd,u=a.selectsRange;return L("react-datepicker__year",{"react-datepicker__year--selecting-range":c&&(l||d||u)})}),k(w(r),"getYearContent",function(a){return r.props.renderYearContent?r.props.renderYearContent(a):a}),r}return Ue(o,[{key:"render",value:function(){for(var s=this,r=[],a=this.props,c=a.date,l=a.yearItemNumber,d=a.onYearMouseEnter,u=a.onYearMouseLeave,p=is(c,l),m=p.startPeriod,h=p.endPeriod,f=function(v){r.push(E.createElement("div",{ref:s.YEAR_REFS[v-m],onClick:function(g){s.onYearClick(g,v)},onKeyDown:function(g){s.onYearKeyDown(g,v)},tabIndex:s.getYearTabIndex(v),className:s.getYearClassNames(v),onMouseEnter:function(g){return d(g,v)},onMouseLeave:function(g){return u(g,v)},key:v,"aria-current":s.isCurrentYear(v)?"date":void 0},s.getYearContent(v)))},_=m;_<=h;_++)f(_);return E.createElement("div",{className:this.getYearContainerClassNames()},E.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.clearSelectingDate},r))}}]),o}(),jg=function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),k(w(r=n.call(this,s)),"onTimeChange",function(a){r.setState({time:a});var c=r.props.date,l=c instanceof Date&&!isNaN(c)?c:new Date;l.setHours(a.split(":")[0]),l.setMinutes(a.split(":")[1]),r.props.onChange(l)}),k(w(r),"renderTimeInput",function(){var a=r.state.time,c=r.props,l=c.date,d=c.timeString,u=c.customTimeInput;return u?E.cloneElement(u,{date:l,value:a,onChange:r.onTimeChange}):E.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:a,onChange:function(p){r.onTimeChange(p.target.value||d)}})}),r.state={time:r.props.timeString},r}return Ue(o,[{key:"render",value:function(){return E.createElement("div",{className:"react-datepicker__input-time-container"},E.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),E.createElement("div",{className:"react-datepicker-time__input-container"},E.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))}}],[{key:"getDerivedStateFromProps",value:function(s,r){return s.timeString!==r.time?{time:s.timeString}:null}}]),o}();function Sg(e){var n=e.className,o=e.children,s=e.showPopperArrow,r=e.arrowProps,a=r===void 0?{}:r;return E.createElement("div",{className:n},s&&E.createElement("div",fs({className:"react-datepicker__triangle"},a)),o)}var Ng=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Lg=function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),k(w(r=n.call(this,s)),"handleClickOutside",function(a){r.props.onClickOutside(a)}),k(w(r),"setClickOutsideRef",function(){return r.containerRef.current}),k(w(r),"handleDropdownFocus",function(a){(function(){var c=((arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Ng.some(function(l){return c.indexOf(l)>=0})})(a.target)&&r.props.onDropdownFocus()}),k(w(r),"getDateInView",function(){var a=r.props,c=a.preSelection,l=a.selected,d=a.openToDate,u=Du(r.props),p=Pu(r.props),m=_e(),h=d||l||c;return h||(u&&Kn(m,u)?u:p&&Jn(m,p)?p:m)}),k(w(r),"increaseMonth",function(){r.setState(function(a){var c=a.date;return{date:er(c,1)}},function(){return r.handleMonthChange(r.state.date)})}),k(w(r),"decreaseMonth",function(){r.setState(function(a){var c=a.date;return{date:ds(c,1)}},function(){return r.handleMonthChange(r.state.date)})}),k(w(r),"handleDayClick",function(a,c,l){r.props.onSelect(a,c,l),r.props.setPreSelection&&r.props.setPreSelection(a)}),k(w(r),"handleDayMouseEnter",function(a){r.setState({selectingDate:a}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(a)}),k(w(r),"handleMonthMouseLeave",function(){r.setState({selectingDate:null}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()}),k(w(r),"handleYearMouseEnter",function(a,c){r.setState({selectingDate:yn(_e(),c)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(a,c)}),k(w(r),"handleYearMouseLeave",function(a,c){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(a,c)}),k(w(r),"handleYearChange",function(a){r.props.onYearChange&&(r.props.onYearChange(a),r.setState({isRenderAriaLiveMessage:!0})),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(a),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(a)}),k(w(r),"handleMonthChange",function(a){r.handleCustomMonthChange(a),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(a),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(a)}),k(w(r),"handleCustomMonthChange",function(a){r.props.onMonthChange&&(r.props.onMonthChange(a),r.setState({isRenderAriaLiveMessage:!0}))}),k(w(r),"handleMonthYearChange",function(a){r.handleYearChange(a),r.handleMonthChange(a)}),k(w(r),"changeYear",function(a){r.setState(function(c){var l=c.date;return{date:yn(l,a)}},function(){return r.handleYearChange(r.state.date)})}),k(w(r),"changeMonth",function(a){r.setState(function(c){var l=c.date;return{date:jt(l,a)}},function(){return r.handleMonthChange(r.state.date)})}),k(w(r),"changeMonthYear",function(a){r.setState(function(c){var l=c.date;return{date:yn(jt(l,st(a)),ne(a))}},function(){return r.handleMonthYearChange(r.state.date)})}),k(w(r),"header",function(){var a=un(arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.state.date,r.props.locale,r.props.calendarStartDay),c=[];return r.props.showWeekNumbers&&c.push(E.createElement("div",{key:"W",className:"react-datepicker__day-name"},r.props.weekLabel||"#")),c.concat([0,1,2,3,4,5,6].map(function(l){var d=Ua(a,l),u=r.formatWeekday(d,r.props.locale),p=r.props.weekDayClassName?r.props.weekDayClassName(
62d):void 0;return E.createElement("div",{key:l,className:L("react-datepicker__day-name",p)},u)}))}),k(w(r),"formatWeekday",function(a,c){return r.props.formatWeekDay?function(l,d,u){return d(je(l,"EEEE",u))}(a,r.props.formatWeekDay,c):r.props.useWeekdaysShort?function(l,d){return je(l,"EEE",d)}(a,c):function(l,d){return je(l,"EEEEEE",d)}(a,c)}),k(w(r),"decreaseYear",function(){r.setState(function(a){var c=a.date;return{date:po(c,r.props.showYearPicker?r.props.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})}),k(w(r),"clearSelectingDate",function(){r.setState({selectingDate:null})}),k(w(r),"renderPreviousButton",function(){if(!r.props.renderCustomHeader){var a;switch(!0){case r.props.showMonthYearPicker:a=A1(r.state.date,r.props);break;case r.props.showYearPicker:a=function(C){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=y.minDate,x=y.yearItemNumber,N=x===void 0?io:x,S=is(so(po(C,N)),N).endPeriod,j=b&&ne(b);return j&&j>S||!1}(r.state.date,r.props);break;default:a=B1(r.state.date,r.props)}if((r.props.forceShowMonthNavigation||r.props.showDisabledMonthNavigation||!a)&&!r.props.showTimeSelectOnly){var c=["react-datepicker__navigation","react-datepicker__navigation--previous"],l=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(l=r.decreaseYear),a&&r.props.showDisabledMonthNavigation&&(c.push("react-datepicker__navigation--previous--disabled"),l=null);var d=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,p=u.previousMonthButtonLabel,m=u.previousYearButtonLabel,h=r.props,f=h.previousMonthAriaLabel,_=f===void 0?typeof p=="string"?p:"Previous Month":f,v=h.previousYearAriaLabel,g=v===void 0?typeof m=="string"?m:"Previous Year":v;return E.createElement("button",{type:"button",className:c.join(" "),onClick:l,onKeyDown:r.props.handleOnKeyDown,"aria-label":d?g:_},E.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},d?r.props.previousYearButtonLabel:r.props.previousMonthButtonLabel))}}}),k(w(r),"increaseYear",function(){r.setState(function(a){var c=a.date;return{date:mo(c,r.props.showYearPicker?r.props.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})}),k(w(r),"renderNextButton",function(){if(!r.props.renderCustomHeader){var a;switch(!0){case r.props.showMonthYearPicker:a=O1(r.state.date,r.props);break;case r.props.showYearPicker:a=function(C){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=y.maxDate,x=y.yearItemNumber,N=x===void 0?io:x,S=is(mo(C,N),N).startPeriod,j=b&&ne(b);return j&&j<S||!1}(r.state.date,r.props);break;default:a=R1(r.state.date,r.props)}if((r.props.forceShowMonthNavigation||r.props.showDisabledMonthNavigation||!a)&&!r.props.showTimeSelectOnly){var c=["react-datepicker__navigation","react-datepicker__navigation--next"];r.props.showTimeSelect&&c.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&c.push("react-datepicker__navigation--next--with-today-button");var l=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(l=r.increaseYear),a&&r.props.showDisabledMonthNavigation&&(c.push("react-datepicker__navigation--next--disabled"),l=null);var d=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,p=u.nextMonthButtonLabel,m=u.nextYearButtonLabel,h=r.props,f=h.nextMonthAriaLabel,_=f===void 0?typeof p=="string"?p:"Next Month":f,v=h.nextYearAriaLabel,g=v===void 0?typeof m=="string"?m:"Next Year":v;return E.createElement("button",{type:"button",className:c.join(" "),onClick:l,onKeyDown:r.props.handleOnKeyDown,"aria-label":d?g:_},E.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"].join(" ")},d?r.props.nextYearButtonLabel:r.props.nextMonthButtonLabel))}}}),k(w(r),"renderCurrentMonth",function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.state.date,c=["react-datepicker__current-month"];return r.props.showYearDropdown&&c.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&c.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&c.push("react-datepicker__current-month--hasMonthYearDropdown"),E.createElement("div",{className:c.join(" ")},je(a,r.props.dateFormat,r.props.locale))}),k(w(r),"renderYearDropdown",function(){var a=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(r.props.showYearDropdown&&!a)return E.createElement(hg,{adjustDateOnChange:r.props.adjustDateOnChange,date:r.state.date,onSelect:r.props.onSelect,setOpen:r.props.setOpen,dropdownMode:r.props.dropdownMode,onChange:r.changeYear,minDate:r.props.minDate,maxDate:r.props.maxDate,year:ne(r.state.date),scrollableYearDropdown:r.props.scrollableYearDropdown,yearDropdownItemNumber:r.props.yearDropdownItemNumber})}),k(w(r),"renderMonthDropdown",function(){var a=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(r.props.showMonthDropdown&&!a)return E.createElement(_g,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,onChange:r.changeMonth,month:st(r.state.date),useShortMonthInDropdown:r.props.useShortMonthInDropdown})}),k(w(r),"renderMonthYearDropdown",function(){var a=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(r.props.showMonthYearDropdown&&!a)return E.createElement(yg,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,dateFormat:r.props.dateFormat,onChange:r.changeMonthYear,minDate:r.props.minDate,maxDate:r.props.maxDate,date:r.state.date,
62scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown})}),k(w(r),"handleTodayButtonClick",function(a){r.props.onSelect(M1(),a),r.props.setPreSelection&&r.props.setPreSelection(M1())}),k(w(r),"renderTodayButton",function(){if(r.props.todayButton&&!r.props.showTimeSelectOnly)return E.createElement("div",{className:"react-datepicker__today-button",onClick:function(a){return r.handleTodayButtonClick(a)}},r.props.todayButton)}),k(w(r),"renderDefaultHeader",function(a){var c=a.monthDate,l=a.i;return E.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(c),E.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(l!==0),r.renderMonthYearDropdown(l!==0),r.renderYearDropdown(l!==0)),E.createElement("div",{className:"react-datepicker__day-names"},r.header(c)))}),k(w(r),"renderCustomHeader",function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=a.monthDate,l=a.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var d=B1(r.state.date,r.props),u=R1(r.state.date,r.props),p=A1(r.state.date,r.props),m=O1(r.state.date,r.props),h=!r.props.showMonthYearPicker&&!r.props.showQuarterYearPicker&&!r.props.showYearPicker;return E.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},r.props.renderCustomHeader(qa(qa({},r.state),{},{customHeaderCount:l,monthDate:c,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:d,nextMonthButtonDisabled:u,prevYearButtonDisabled:p,nextYearButtonDisabled:m})),h&&E.createElement("div",{className:"react-datepicker__day-names"},r.header(c)))}),k(w(r),"renderYearHeader",function(){var a=r.state.date,c=r.props,l=c.showYearPicker,d=is(a,c.yearItemNumber),u=d.startPeriod,p=d.endPeriod;return E.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(u," - ").concat(p):ne(a))}),k(w(r),"renderHeader",function(a){switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(a);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(a);default:return r.renderDefaultHeader(a)}}),k(w(r),"renderMonths",function(){var a;if(!r.props.showTimeSelectOnly&&!r.props.showYearPicker){for(var c=[],l=r.props.showPreviousMonths?r.props.monthsShown-1:0,d=ds(r.state.date,l),u=(a=r.props.monthSelectedIn)!==null&&a!==void 0?a:l,p=0;p<r.props.monthsShown;++p){var m=er(d,p-u+l),h="month-".concat(p),f=p<r.props.monthsShown-1,_=p>0;c.push(E.createElement("div",{key:h,ref:function(v){r.monthContainer=v},className:"react-datepicker__month-container"},r.renderHeader({monthDate:m,i:p}),E.createElement(kg,{chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,ariaLabelPrefix:r.props.monthAriaLabelPrefix,onChange:r.changeMonthYear,day:m,dayClassName:r.props.dayClassName,calendarStartDay:r.props.calendarStartDay,monthClassName:r.props.monthClassName,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,onWeekSelect:r.props.onWeekSelect,orderInDisplay:p,formatWeekNumber:r.props.formatWeekNumber,locale:r.props.locale,minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,highlightDates:r.props.highlightDates,holidays:r.props.holidays,selectingDate:r.state.selectingDate,includeDates:r.props.includeDates,includeDateIntervals:r.props.includeDateIntervals,inline:r.props.inline,shouldFocusDayInline:r.props.shouldFocusDayInline,fixedHeight:r.props.fixedHeight,filterDate:r.props.filterDate,preSelection:r.props.preSelection,setPreSelection:r.props.setPreSelection,selected:r.props.selected,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,selectsDisabledDaysInRange:r.props.selectsDisabledDaysInRange,showWeekNumbers:r.props.showWeekNumbers,startDate:r.props.startDate,endD
62ate:r.props.endDate,peekNextMonth:r.props.peekNextMonth,setOpen:r.props.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,renderDayContents:r.props.renderDayContents,renderMonthContent:r.props.renderMonthContent,renderQuarterContent:r.props.renderQuarterContent,renderYearContent:r.props.renderYearContent,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,showWeekPicker:r.props.showWeekPicker,isInputFocused:r.props.isInputFocused,containerRef:r.containerRef,monthShowsDuplicateDaysEnd:f,monthShowsDuplicateDaysStart:_})))}return c}}),k(w(r),"renderYears",function(){if(!r.props.showTimeSelectOnly)return r.props.showYearPicker?E.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader(),E.createElement(wg,fs({onDayClick:r.handleDayClick,selectingDate:r.state.selectingDate,clearSelectingDate:r.clearSelectingDate,date:r.state.date},r.props,{onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave}))):void 0}),k(w(r),"renderTimeSection",function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return E.createElement(Au,{selected:r.props.selected,openToDate:r.props.openToDate,onChange:r.props.onTimeChange,timeClassName:r.props.timeClassName,format:r.props.timeFormat,includeTimes:r.props.includeTimes,intervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,todayButton:r.props.todayButton,showMonthDropdown:r.props.showMonthDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,monthRef:r.state.monthContainer,injectTimes:r.props.injectTimes,locale:r.props.locale,handleOnKeyDown:r.props.handleOnKeyDown,showTimeSelectOnly:r.props.showTimeSelectOnly})}),k(w(r),"renderInputTimeSection",function(){var a=new Date(r.props.selected),c=Yn(a)&&r.props.selected?"".concat(q1(a.getHours()),":").concat(q1(a.getMinutes())):"";if(r.props.showTimeInput)return E.createElement(jg,{date:a,timeString:c,timeInputLabel:r.props.timeInputLabel,onChange:r.props.onTimeChange,customTimeInput:r.props.customTimeInput})}),k(w(r),"renderAriaLiveRegion",function(){var a,c=is(r.state.date,r.props.yearItemNumber),l=c.startPeriod,d=c.endPeriod;return a=r.props.showYearPicker?"".concat(l," - ").concat(d):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?ne(r.state.date):"".concat(pc(st(r.state.date),r.props.locale)," ").concat(ne(r.state.date)),E.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&a)}),k(w(r),"renderChildren",function(){if(r.props.children)return E.createElement("div",{className:"react-datepicker__children-container"},r.props.children)}),r.containerRef=E.createRef(),r.state={date:r.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},r}return Ue(o,[{key:"componentDidMount",value:function(){var s=this;this.props.showTimeSelect&&(this.assignMonthContainer=void s.setState({monthContainer:s.monthContainer}))}},{key:"componentDidUpdate",value:function(s){var r=this;if(!this.props.preSelection||Ce(this.props.preSelection,s.preSelection)&&this.props.monthSelectedIn===s.monthSelectedIn)this.props.openToDate&&!Ce(this.props.openToDate,s.openToDate)&&this.setState({date:this.props.openToDate});else{var a=!Yt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return a&&r.handleCustomMonthChange(r.state.date)})}}},{key:"render",value:function(){var s=this.props.container||Sg;return E.createElement("div",{style:{display:"contents"},ref:this.containerRef},E.createElement(s,{className:L("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:io}}}]),o}(),Eg=function(e){var n=e.icon,o=e.className,s=o===void 0?"":o,r=e.onClick,a="react-datepicker__calendar-icon";return E.isValidElement(n)?E.cloneElement(n,{className:"".concat(n.props.className||""," ").concat(a," ").concat(s),onClick:function(c){typeof n.props.onClick=="function"&&n.props.onClick(c),typeof r=="function"&&r(c)}}):typeof n=="string"?E.createElement("i",{className:"".concat(a," ").concat(n," ").concat(s),"aria-hidden":"true",onClick:r}):E.createElement("svg",{className:"".concat(a," ").concat(s),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:r},E.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 9
626 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Ou=function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),(r=n.call(this,s)).el=document.createElement("div"),r}return Ue(o,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return Op.createPortal(this.props.children,this.el)}}]),o}(),$g=function(e){return!e.disabled&&e.tabIndex!==-1},Fu=function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),k(w(r=n.call(this,s)),"getTabChildren",function(){return Array.prototype.slice.call(r.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter($g)}),k(w(r),"handleFocusStart",function(){var a=r.getTabChildren();a&&a.length>1&&a[a.length-1].focus()}),k(w(r),"handleFocusEnd",function(){var a=r.getTabChildren();a&&a.length>1&&a[0].focus()}),r.tabLoopRef=E.createRef(),r}return Ue(o,[{key:"render",value:function(){return this.props.enableTabLoop?E.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},E.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,E.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),o}(),Tg=function(e){Ye(o,E.Component);var n=Ke(o);function o(){return He(this,o),n.apply(this,arguments)}return Ue(o,[{key:"render",value:function(){var s,r=this.props,a=r.className,c=r.wrapperClassName,l=r.hidePopper,d=r.popperComponent,u=r.popperModifiers,p=r.popperPlacement,m=r.popperProps,h=r.targetComponent,f=r.enableTabLoop,_=r.popperOnKeyDown,v=r.portalId,g=r.portalHost;if(!l){var C=L("react-datepicker-popper",a);s=E.createElement(og,fs({modifiers:u,placement:p},m),function(b){var x=b.ref,N=b.style,S=b.placement,j=b.arrowProps;return E.createElement(Fu,{enableTabLoop:f},E.createElement("div",{ref:x,style:N,className:C,"data-placement":S,onKeyDown:_},E.cloneElement(d,{arrowProps:j})))})}this.props.popperContainer&&(s=E.createElement(this.props.popperContainer,{},s)),v&&!l&&(s=E.createElement(Ou,{portalId:v,portalHost:g},s));var y=L("react-datepicker-wrapper",c);return E.createElement(K_,{className:"react-datepicker-manager"},E.createElement(ag,null,function(b){var x=b.ref;return E.createElement("div",{ref:x,className:y},h)}),s)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),o}(),H1="react-datepicker-ignore-onclickoutside",Mg=gi(Lg),Ki="Date input not valid.",qu=function(e){Ye(o,E.Component);var n=Ke(o);function o(s){var r;return He(this,o),k(w(r=n.call(this,s)),"getPreSelection",function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:_e()}),k(w(r),"modifyHolidays",function(){var a;return(a=r.props.holidays)===null||a===void 0?void 0:a.reduce(function(c,l){var d=new Date(l.date);return Ea(d)?[].concat(go(c),[qa(qa({},l),{},{date:d})]):c},[])}),k(w(r),"calcInitialState",function(){var a,c=r.getPreSelection(),l=Du(r.props),d=Pu(r.props),u=l&&Kn(c,ls(l))?l:d&&Jn(c,xl(d))?d:c;return{open:r.props.startOpen||!1,preventFocus:!1,preSelection:(a=r.props.selectsRange?r.props.startDate:r.props.selected)!==null&&a!==void 0?a:u,highlightDates:F1(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),k(w(r),"clearPreventFocusTimeout",function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)}),k(w(r),"setFocus",function(){r.input&&r.input.focus&&r.input.focus({preventScroll:!0})}),k(w(r),"setBlur",function(){r.input&&r.input.blur&&r.input.blur(),r.cancelFocusInput()}),k(w(r),"setOpen",function(a){var c=arguments.length>1&&arguments[1]!==void 0&&arguments[1];r.setState({open:a,preSelection:a&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:Gi},function(){a||r.setState(function(l){return{focused:!!c&&l.focused}},function(){!c&&r.setBlur(),r.setState({inputValue:null})})})}),k(w(r),"inputOk",function(){return zl(r.state.preSelection)}),k(w(r),"isCalendarOpen",function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open}),k(w(r),"handleFocus",function(a){r.state.preventFocus||(r.props.onFocus(a),r.props.preventOpenOnFocus||r.props.readOnly||r.setOpen(!0)),r.setState({focused:!0})}),k(w(r),"sendFocusBackToInput",function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})}),k(w(r),"cancelFocusInput",function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=null}),k(w(r),"deferFocusInput",function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)}),k(w(r),"handleDropdownFocus",function(){r.cancelFocusInput()}),k(w(r),"handleBlur",function(a){(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&r.props.onBlur(a),r.setState({focused:!1})}),k(w(r),"handleCalendarClickOutside",function(a){r.props.inline||r.setOpen(!1),r.props.onClickOutside(a),r.props.withPortal&&a.preventDefault()}),k(w(r),"handleChange",function(){for(var a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];var d=c[0];if(!r.props.onChangeRaw||(r.props.onChangeRaw.apply(w(r),c),typeof d.isDefaultPrevented=="function"&&!d.isDefaultPrevented())){r.setState({inputValue:d.target.value,lastPreSelectChange:Dg});var u,p,m,h,f,_,v,g,C=(u=d.target.value,p=r.props.dateFormat,m=r.props.locale,h=r.props.strictParsing,f=r.props.minDate,_=null,v=Sr(m)||Sr(jr()),g=!0,Array.isArray(p)?(p.forEac
62h(function(y){var b=Ni(u,y,new Date,{locale:v});h&&(g=Yn(b,f)&&u===je(b,y,m)),Yn(b,f)&&g&&(_=b)}),_):(_=Ni(u,p,new Date,{locale:v}),h?g=Yn(_)&&u===je(_,p,m):Yn(_)||(p=p.match(lg).map(function(y){var b=y[0];return b==="p"||b==="P"?v?(0,ig[b])(y,v.formatLong):b:y}).join(""),u.length>0&&(_=Ni(u,p.slice(0,u.length),new Date)),Yn(_)||(_=new Date(u))),Yn(_)&&g?_:null));r.props.showTimeSelectOnly&&r.props.selected&&C&&!Ce(C,r.props.selected)&&(C=C2(r.props.selected,{hours:cn(C),minutes:dn(C),seconds:Ic(C)})),!C&&d.target.value||(r.props.showWeekPicker&&(C=un(C,r.props.locale,r.props.calendarStartDay)),r.setSelected(C,d,!0))}}),k(w(r),"handleSelect",function(a,c,l){if(r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&r.sendFocusBackToInput(),r.props.onChangeRaw&&r.props.onChangeRaw(c),r.props.showWeekPicker&&(a=un(a,r.props.locale,r.props.calendarStartDay)),r.setSelected(a,c,!1,l),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect)r.setPreSelection(a);else if(!r.props.inline){r.props.selectsRange||r.setOpen(!1);var d=r.props,u=d.startDate,p=d.endDate;!u||p||Kn(a,u)||r.setOpen(!1)}}),k(w(r),"setSelected",function(a,c,l,d){var u=a;if(r.props.showYearPicker){if(u!==null&&Mu(ne(u),r.props))return}else if(r.props.showMonthYearPicker){if(u!==null&&Tu(u,r.props))return}else if(u!==null&&vi(u,r.props))return;var p=r.props,m=p.onChange,h=p.selectsRange,f=p.startDate,_=p.endDate;if(!kr(r.props.selected,u)||r.props.allowSameDay||h)if(u!==null&&(!r.props.selected||l&&(r.props.showTimeSelect||r.props.showTimeSelectOnly||r.props.showTimeInput)||(u=$1(u,{hour:cn(r.props.selected),minute:dn(r.props.selected),second:Ic(r.props.selected)})),r.props.inline||r.setState({preSelection:u}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:d})),h){var v=f&&!_,g=f&&_;!f&&!_?m([u,null],c):v&&(Kn(u,f)?m([u,null],c):m([f,u],c)),g&&m([u,null],c)}else m(u,c);l||(r.props.onSelect(u,c),r.setState({inputValue:null}))}),k(w(r),"setPreSelection",function(a){var c=r.props.minDate!==void 0,l=r.props.maxDate!==void 0,d=!0;if(a){r.props.showWeekPicker&&(a=un(a,r.props.locale,r.props.calendarStartDay));var u=ls(a);if(c&&l)d=Na(a,r.props.minDate,r.props.maxDate);else if(c){var p=ls(r.props.minDate);d=Jn(a,p)||kr(u,p)}else if(l){var m=xl(r.props.maxDate);d=Kn(a,m)||kr(u,m)}}d&&r.setState({preSelection:a})}),k(w(r),"toggleCalendar",function(){r.setOpen(!r.state.open)}),k(w(r),"handleTimeChange",function(a){var c=r.props.selected?r.props.selected:r.getPreSelection(),l=r.props.selected?a:$1(c,{hour:cn(a),minute:dn(a)});r.setState({preSelection:l}),r.props.onChange(l),r.props.shouldCloseOnSelect&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}),k(w(r),"onInputClick",function(){r.props.disabled||r.props.readOnly||r.setOpen(!0),r.props.onInputClick()}),k(w(r),"onInputKeyDown",function(a){r.props.onKeyDown(a);var c=a.key;if(r.state.open||r.props.inline||r.props.preventOpenOnFocus){if(r.state.open){if(c==="ArrowDown"||c==="ArrowUp"){a.preventDefault();var l=r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',d=r.calendar.componentNode&&r.calendar.componentNode.querySelector(l);return void(d&&d.focus({preventScroll:!0}))}var u=_e(r.state.preSelection);c==="Enter"?(a.preventDefault(),r.inputOk()&&r.state.lastPreSelectChange===Gi?(r.handleSelect(u,a),!r.props.shouldCloseOnSelect&&r.setPreSelection(u)):r.setOpen(!1)):c==="Escape"?(a.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1)):c==="Tab"&&r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:Ki})}}else c!=="ArrowDown"&&c!=="ArrowUp"&&c!=="Enter"||r.onInputClick()}),k(w(r),"onPortalKeyDown",function(a){a.key==="Escape"&&(a.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))}),k(w(r),"onDayKeyDown",function(a){r.props.onKeyDown(a);var c=a.key,l=_e(r.state.preSelection);if(c==="Enter")a.preventDefault(),r.handleSelect(l,a),!r.props.shouldCloseOnSelect&&r.setPreSelection(l);else if(c==="Escape")a.preventDefault(),r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:Ki}
62);else if(!r.props.disabledKeyboardNavigation){var d;switch(c){case"ArrowLeft":d=r.props.showWeekPicker?Bc(l,1):k2(l,1);break;case"ArrowRight":d=r.props.showWeekPicker?yl(l,1):Ua(l,1);break;case"ArrowUp":d=Bc(l,1);break;case"ArrowDown":d=yl(l,1);break;case"PageUp":d=ds(l,1);break;case"PageDown":d=er(l,1);break;case"Home":d=po(l,1);break;case"End":d=mo(l,1);break;default:d=null}if(!d)return void(r.props.onInputError&&r.props.onInputError({code:1,msg:Ki}));if(a.preventDefault(),r.setState({lastPreSelectChange:Gi}),r.props.adjustDateOnChange&&r.setSelected(d),r.setPreSelection(d),r.props.inline){var u=st(l),p=st(d),m=ne(l),h=ne(d);u!==p||m!==h?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}}),k(w(r),"onPopperKeyDown",function(a){a.key==="Escape"&&(a.preventDefault(),r.sendFocusBackToInput())}),k(w(r),"onClearClick",function(a){a&&a.preventDefault&&a.preventDefault(),r.sendFocusBackToInput(),r.props.selectsRange?r.props.onChange([null,null],a):r.props.onChange(null,a),r.setState({inputValue:null})}),k(w(r),"clear",function(){r.onClearClick()}),k(w(r),"onScroll",function(a){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?a.target!==document&&a.target!==document.documentElement&&a.target!==document.body||r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(a)&&r.setOpen(!1)}),k(w(r),"renderCalendar",function(){return r.props.inline||r.isCalendarOpen()?E.createElement(Mg,{ref:function(a){r.calendar=a},locale:r.props.locale,calendarStartDay:r.props.calendarStartDay,chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,monthAriaLabelPrefix:r.props.monthAriaLabelPrefix,adjustDateOnChange:r.props.adjustDateOnChange,setOpen:r.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,dateFormat:r.props.dateFormatCalendar,useWeekdaysShort:r.props.useWeekdaysShort,formatWeekDay:r.props.formatWeekDay,dropdownMode:r.props.dropdownMode,selected:r.props.selected,preSelection:r.state.preSelection,onSelect:r.handleSelect,onWeekSelect:r.props.onWeekSelect,openToDate:r.props.openToDate,minDate:r.props.minDate,maxDate:r.props.maxDate,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,startDate:r.props.startDate,endDate:r.props.endDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,filterDate:r.props.filterDate,onClickOutside:r.handleCalendarClickOutside,formatWeekNumber:r.props.formatWeekNumber,highlightDates:r.state.highlightDates,holidays:dg(r.modifyHolidays()),includeDates:r.props.includeDates,includeDateIntervals:r.props.includeDateIntervals,includeTimes:r.props.includeTimes,injectTimes:r.props.injectTimes,inline:r.props.inline,shouldFocusDayInline:r.state.shouldFocusDayInline,peekNextMonth:r.props.peekNextMonth,showMonthDropdown:r.props.showMonthDropdown,showPreviousMonths:r.props.showPreviousMonths,useShortMonthInDropdown:r.props.useShortMonthInDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showWeekNumbers:r.props.showWeekNumbers,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,forceShowMonthNavigation:r.props.forceShowMonthNavigation,showDisabledMonthNavigation:r.props.showDisabledMonthNavigation,scrollableYearDropdown:r.props.scrollableYearDropdown,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown,todayButton:r.props.todayButton,weekLabel:r.props.weekLabel,outsideClickIgnoreClass:H1,fixedHeight:r.props.fixedHeight,monthsShown:r.props.monthsShown,monthSelectedIn:r.state.monthSelectedIn,onDropdownFocus:r.handleDropdownFocus,onMonthChange:r.props.onMonthChange,onYearChange:r.props.onYearChange,dayClassName:r.props.dayClassName,weekDayClassName:r.props.weekDayClassName,monthClassName:r.props.monthClassName,timeClassName:r.props.timeClassName,showDateSelect:r.props.showDateSelect,showTimeSelect:r.props.showTimeSelect,showTimeSelectOnly:r.props.showTimeSelectOnly,onTimeChange:r.handleTimeChange,timeFormat:r.props.timeFormat,timeIntervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,className:r.props.calendarClassName,container:r.props.calendarContainer,yearItemNumber:r.props.yearItemNumber,yearDropdownItemNumber:r.props.yearDropdownItemNumber,previousMonthAriaLabel:r.props.previousMonthAriaLabel,previousMonthButtonLabel:r.props.previousMonthButtonLabel,nextMonthAriaLabel:r.props.nextMonthAriaLabel,nextMonthButtonLabel:r.props.nextMonthButtonLabel,previousYearAriaLabel:r.props.previousYearAriaLabel,previousYearButtonLabel:r.props.previousYearButtonLabel,nextYearAriaLabel:r.props.nextYearAriaLabel,nextYearButtonLabel:r.props.nextYearButtonLabel,timeInputLabel:r.props.timeInputLabel,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,renderCustomHeader:r.props.renderCustomHeader,popperProps:r.props.popperProps,renderDayContents:r.props.renderDayContents,renderMonthContent:r.props.renderMonthContent,renderQuarterContent:r.props.renderQuarterContent,renderYearContent:r.props.renderYearContent,onDayMouseEnter:r.props.onDayMouseEnter,onMonthMouseLeave:r.props.onMonthMouseLeave,onYearMouseEnter:r.props.onYearMouseEnter,onYearMouseLeave:r.props.onYearMouseLeave,selectsDisabledDaysInRange:r.props.selectsDisabledDaysInRange,showTimeInput:r.props.showTimeInput,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,showWeekPicker:r.props.showWeekPicker,showPopperArrow:r.props.showPopperArrow,excludeScrollbar:r.props.excludeScrollbar,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,isInputFocused:r.state.focused,customTimeInput:r.props.customTimeInput,setPreSelection:r.setPreSelection},r.props.children):null}),k(w(r),"renderAriaLiveRegion",function(){var a,c=r.props,l=c.dateFormat,d=c.locale,u=r.props.showTimeInput||r.props.showTimeSelect?"PPPPp":"PPPP";return a=r.props.selectsRange?"Selected start date: ".concat(en(r.props.startDate,{dateFormat:u,locale:d}),". ").concat(r.props.endDate?"End date: "+en(r.props.endDate,{dateFormat:u,locale:d}):""):r.props.showTimeSelectOnly?"Selected time: ".concat(en(r.props.selected,{dateFormat:l,locale:d})):r.props.showYearPicker?"Selected year: ".concat(en(r.props.selected,{dateFormat:"yyyy",locale:d})):r.props.showMonthYearPicker?"Selected month: ".concat(en(r.props.selected,{dateFormat:"MMMM yyyy",locale:d})):r.props.showQuarterYearPicker?"Selected quarter: ".concat(en(r.props.selected,{dateFormat:"yyyy, QQQ",locale:d})):"Selected date: ".concat(en(r.props.selected,{dateFormat:u,locale:d})),E.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-l
62ive"},a)}),k(w(r),"renderDateInput",function(){var a,c=L(r.props.className,k({},H1,r.state.open)),l=r.props.customInput||E.createElement("input",{type:"text"}),d=r.props.customInputRef||"ref",u=typeof r.props.value=="string"?r.props.value:typeof r.state.inputValue=="string"?r.state.inputValue:r.props.selectsRange?function(p,m,h){if(!p)return"";var f=en(p,h),_=m?en(m,h):"";return"".concat(f," - ").concat(_)}(r.props.startDate,r.props.endDate,r.props):en(r.props.selected,r.props);return E.cloneElement(l,(k(k(k(k(k(k(k(k(k(k(a={},d,function(p){r.input=p}),"value",u),"onBlur",r.handleBlur),"onChange",r.handleChange),"onClick",r.onInputClick),"onFocus",r.handleFocus),"onKeyDown",r.onInputKeyDown),"id",r.props.id),"name",r.props.name),"form",r.props.form),k(k(k(k(k(k(k(k(k(k(a,"autoFocus",r.props.autoFocus),"placeholder",r.props.placeholderText),"disabled",r.props.disabled),"autoComplete",r.props.autoComplete),"className",L(l.props.className,c)),"title",r.props.title),"readOnly",r.props.readOnly),"required",r.props.required),"tabIndex",r.props.tabIndex),"aria-describedby",r.props.ariaDescribedBy),k(k(k(a,"aria-invalid",r.props.ariaInvalid),"aria-labelledby",r.props.ariaLabelledBy),"aria-required",r.props.ariaRequired)))}),k(w(r),"renderClearButton",function(){var a=r.props,c=a.isClearable,l=a.disabled,d=a.selected,u=a.startDate,p=a.endDate,m=a.clearButtonTitle,h=a.clearButtonClassName,f=h===void 0?"":h,_=a.ariaLabelClose,v=_===void 0?"Close":_;return!c||d==null&&u==null&&p==null?null:E.createElement("button",{type:"button",className:L("react-datepicker__close-icon",f,{"react-datepicker__close-icon--disabled":l}),disabled:l,"aria-label":v,onClick:r.onClearClick,title:m,tabIndex:-1})}),r.state=r.calcInitialState(),r.preventFocusTimeout=null,r}return Ue(o,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(s,r){var a,c;s.inline&&(a=s.selected,c=this.props.selected,a&&c?st(a)!==st(c)||ne(a)!==ne(c):a!==c)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&s.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),s.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:F1(this.props.highlightDates)}),r.focused||kr(s.selected,this.props.selected)||this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),r.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var s=this.props,r=s.showIcon,a=s.icon,c=s.calendarIconClassname,l=s.toggleCalendarOnIconClick,d=this.state.open;return E.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&E.createElement(Eg,fs({icon:a,className:"".concat(c," ").concat(d&&"react-datepicker-ignore-onclickoutside")},l?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var s=this.renderCalendar();if(this.props.inline)return s;if(this.props.withPortal){var r=this.state.open?E.createElement(Fu,{enableTabLoop:this.props.enableTabLoop},E.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},s)):null;return this.state.open&&this.props.portalId&&(r=E.createElement(Ou,{portalId:this.props.portalId,portalHost:this.props.portalHost},r)),E.createElement("div",null,this.renderInputContainer(),r)}return E.createElement(Tg,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:s,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:io,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1}}}]),o}(),Dg="input",Gi="navigate";Eu("en",yd);const Pg=e=>{const{changeEndDate:n,endDate:o,startDate:s,minDate:r,locale:a}=e;return t.jsx("div",{children:t.jsx(qu,{startDate:s,endDate:o,minDate:r,maxDate:new Date,selected:o,onChange:n,locale:a,inline:!0,selectsEnd:!0})})};Eu("en",yd);const Ig=e=>{const{changeStartDate:n,startDate:o,endDate:s=new Date,minDate:r,locale:a}=e;return t.jsx("div",{children:t.jsx(qu,{minDate:r,maxDate:new Date,startDate:o,endDate:s,selected:o,onChange:n,locale:a,inline:!0,selectsStart:!0})})},Bg="_wrapper_10ifs_1",Rg="_content_10ifs_6",Ag="_header_10ifs_96",Og="_title_10ifs_104",Fg="_closeBtn_10ifs_111",qg="_tabs_10ifs_135",Wg="_tabBtn_10ifs_141",Vg="_active_10ifs_162",Hg="_tabContent_10ifs_174",Ug="_bottom_10ifs_179",Yg="_bt
62n_10ifs_187",Xe={wrapper:Bg,content:Rg,header:Ag,title:Og,closeBtn:Fg,tabs:qg,tabBtn:Wg,active:Vg,default:"_default_10ifs_165",tabContent:Hg,bottom:Ug,btn:Yg},Kg=e=>{const{onClose:n,selectedStartDate:o,selectedEndDate:s,onChange:r,minDate:a}=e,[c,l]=i.useState("start"),[d,u]=i.useState(o),[p,m]=i.useState(s),h=g=>{p&&g>p?(u(p),m(g)):u(g),l("end")},f=g=>{d&&g<d?(m(d),u(g)):m(g)},_=()=>{u(null),m(null),l("start")},v=()=>{r(d,p)};return t.jsx("div",{className:Xe.wrapper,children:t.jsxs("div",{className:Xe.content,children:[t.jsxs("div",{className:Xe.header,children:[t.jsx("div",{className:Xe.title,children:"Select a Period"}),t.jsx("button",{onClick:n,className:Xe.closeBtn,children:t.jsx(ku,{})})]}),t.jsxs("div",{className:Xe.tabs,children:[t.jsx("div",{onClick:()=>l("start"),className:L(Xe.tabBtn,{[Xe.active]:c==="start",[Xe.default]:!d}),children:d?ot(d):"Start Date"}),t.jsx("div",{onClick:()=>l("end"),className:L(Xe.tabBtn,{[Xe.active]:c==="end",[Xe.default]:!p}),children:p?ot(p):"End Date"})]}),t.jsx("div",{className:Xe.tabContent,children:c==="start"?t.jsx(Ig,{endDate:p,startDate:d,minDate:a,changeStartDate:h,locale:"en"}):t.jsx(Pg,{endDate:p,startDate:d,minDate:a,changeEndDate:f,locale:"en"})}),t.jsxs("div",{className:Xe.bottom,children:[t.jsx(O,{variant:"secondary",className:Xe.btn,onClick:_,children:"Reset"}),t.jsx(O,{className:Xe.btn,onClick:v,disabled:!d||!p,children:"Apply"})]})]})})},Gg="_wrapper_1vq4k_1",zg="_btn_1vq4k_5",Zg="_open_1vq4k_22",zi={wrapper:Gg,btn:zg,open:Zg},Wu=e=>{const{isOpen:n,onToggle:o,onClose:s,startDate:r,endDate:a,onChangeDate:c,minDate:l,className:d}=e,u=i.useRef(null);return t.jsxs("div",{className:L(zi.wrapper,d),ref:u,children:[t.jsx("button",{type:"button",onClick:o,className:L(zi.btn,{[zi.open]:n}),"aria-label":"Select date range","aria-expanded":n,children:t.jsx(D_,{})}),t.jsx(B_,{onClose:s,open:n,refObject:u,children:t.jsx(Kg,{onClose:s,selectedStartDate:r,selectedEndDate:a,onChange:c,minDate:l})})]})},To=e=>i.createElement("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M15.9081 7.54902V4.28107H12.6401",stroke:"currentColor",strokeWidth:1.22548,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.0062 9.183L15.9082 4.28107",stroke:"currentColor",strokeWidth:1.22548,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.7251 10.817V12.451C16.7251 14.707 14.8963 16.5359 12.6402 16.5359H7.73827C5.48221 16.5359 3.65332 14.707 3.65332 12.451V7.54903C3.65332 5.29297 5.48221 3.46408 7.73827 3.46408H9.37224",stroke:"currentColor",strokeWidth:1.22548,strokeLinecap:"round",strokeLinejoin:"round"})),Qg="_hash_1gw8t_1",Xg="_icon_1gw8t_7",Jg="_link_1gw8t_12",Uo={hash:Qg,icon:Xg,link:Jg},ev=({operation:e})=>{const n=i.useMemo(()=>{const o=[];return o.push({label:"Operation ID",value:e.id}),e.hash&&o.push({label:"Transaction Hash",value:t.jsxs("div",{className:Uo.hash,children:[t.jsx("span",{children:ys(e.hash,22)}),t.jsx(it,{className:Uo.copy,value:e.hash}),t.jsx("a",{href:`https://explorer.tectum.io/${e.currency.key}/transaction/${e.hash}`,target:"_blank",rel:"noreferrer",className:Uo.link,children:t.jsx(To,{className:Uo.icon})})]})}),o},[e]);return t.jsx(lt,{data:n})},tv="_body_1tx25_1",nv="_info_1tx25_7",rv="_label_1tx25_13",sv="_amount_1tx25_20",ov="_status_1tx25_27",av
62="_date_1tx25_33",Zr={body:tv,info:nv,label:rv,amount:sv,status:ov,date:av},U1={[Pt.pending]:{label:"Pending",color:"#487bff"},[Pt.success]:{label:"Confirmed",color:"#00DC30"},[Pt.failed]:{label:"Cancelled",color:"#FF3030"}},iv=({operation:e,onClose:n})=>{const{data:o}=Se.useGetOperationByIdQuery({id:e.id}),s=o==null?void 0:o.payload;return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:yu(e)??"",subtitle:vu(e.area)}),t.jsxs(D.Body,{className:Zr.body,children:[t.jsxs("div",{className:Zr.info,children:[t.jsx("span",{className:Zr.label,children:"Amount"}),t.jsx("span",{className:Zr.amount,children:_u(e)}),t.jsx("span",{className:Zr.status,style:{color:U1[e.status].color},children:U1[e.status].label})]}),t.jsx("div",{className:Zr.date,children:zt(e.date,!0,!0)}),s?t.jsx(ev,{operation:s}):t.jsx(Tn,{})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:n,children:"Close"})})]})},Vu=e=>{const{isOpen:n,onClose:o,operation:s}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(iv,{operation:s,onClose:o})})},ln=10,bi=300*1e3,lv=15,cv="_wrapper_1ob7q_1",dv="_rowBetween_1ob7q_5",uv="_title_1ob7q_11",pv="_btn_1ob7q_18",Yo={wrapper:cv,rowBetween:dv,title:uv,btn:pv},mv=e=>{const{currency:n}=e;return t.jsx("div",{className:Yo.wrapper,children:t.jsxs("div",{className:Yo.rowBetween,children:[t.jsxs("div",{className:Yo.title,children:["History ",n.ticker," (",n.protocol,")"]}),t.jsx(ge,{to:"/history",className:Yo.btn,children:"View All"})]})})},hv="_wrapper_6wwg3_1",fv="_filters_6wwg3_5",_v="_typeFilter_6wwg3_12",gv="_dateFilter_6wwg3_16",vv="_dateRangeWrapper_6wwg3_20",yv="_dateRange_6wwg3_20",bv="_dateRangeClose_6wwg3_39",On={wrapper:hv,filters:fv,typeFilter:_v,dateFilter:gv,dateRangeWrapper:vv,dateRange:yv,dateRangeClose:bv},xv=[{label:"All",value:"all"},{label:"Export",value:Z.EXPORT},{label:"Send",value:Z.SEND},{label:"Accrue",value:Z.ACCRUED},{label:"Burn",value:Z.BURN},{label:"Fill",value:Z.FILL},{label:"Mint",value:Z.MINT},{label:"Deposit",value:Z.IMPORT},{label:"Handover",value:Z.RECEIPT},{label:"Migrate Out",value:Z.MIGRATED_OUT},{label:"Migrate In",value:Z.MIGRATED_IN}],Cv=e=>{const{currency:n}=e,[o,s]=i.useState(!1),r=W=>{l(W),s(!0)},a=()=>s(!1),[c,l]=i.useState(),[d,u]=i.useState(0),p=i.useCallback(()=>{u(W=>W+10)},[]),[m,h]=i.useState(null),f=W=>{h(W==="all"?null:W),u(0)},[_,v]=i.useState(!1),g=i.useCallback(()=>{v(W=>!W)},[]),C=i.useCallback(()=>{v(!1)},[]),[y,b]=i.useState(null),[x,N]=i.useState(null),S=i.useCallback((W,z)=>{W&&z&&W>z||(W&&z?(b(W),N(z)):W?(b(W),N(W)):z&&(b(z),N(z)),C(),u(0))},[N,b]),j=i.useCallback(()=>{b(null),N(null),u(0)},[N,b]),{data:{payload:{operations:$=[],count:T=0}={}}={},error:M,isLoading:P,isFetching:B}=Se.useGetOperationsQuery({count:ln,offset:d,start:y?ot(y):void 0,end:x?ot(x):void 0,key:n.key,action:m??void 0}),{user:I}=ht(),A=I&&I.date_create?new Date(I.date_create):null;return P?t.jsx(ze,{className:On.wrapper,children:t.jsx(H,{})}):t.jsxs(ze,{className:On.wrapper,children:[t.jsx(mv,{currency:n}),t.jsxs("div",{className:On.filters,children:[t.jsx(Oe,{selected:m??"all",options:xv,label:"Operation type",onChange:f,className:On.typeFilter,showSearch:!1}),t.jsx(Wu,{isOpen:_,onToggle:g,onClose:C,startDate:y,endDate:x,onChangeDate:S,minDate:A,className:On.dateFilter})]}),y&&x&&t.jsx("div",{className:On.dateRangeWrapper,children:t.jsxs("div",{className:On.dateRange,children:[ot(y)," / ",ot(x),t.jsx("div",{onClick:j,className:On.dateRangeClose,children:t.jsx(fu,{})})]})}),$.length>0&&t.jsx(xu,{count:T,data:$,fetchNext:p,isLoading:P,isFetching:B,onOpen:r}),M&&t.jsx(V,{variant:"error",message:Q(M),animated:!0}),c&&t.jsx(Vu,{operation:c,isOpen:o,onClose:a})]})},Hu=e=>i.createElement("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M8.50049 14.002L5.50049 17.002L8.50049 20.002",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.5005 17.002L5.50049 17.002",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.5005 10.002L19.5005 7.00195L16.5005 4.00195",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.50049 7.00195L19.5005 7.00195",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Uu=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M11.7188 9.57237L15.002 6.28909",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.511 6.15781C11.5112 6.11403 11.5468 6.07865 11.5906 6.07873C11.6343 6.07881 11.6698 6.11432 11.6698 6.1581C11.6698 6.20188 11.6343 6.23739 11.5906 6.23747C11.5468 6.23755 11.5112 6.20216 11.511 6.15839V6.15781",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.07031 7.44968V5.81417C8.07031 4.06076 9.49173 2.63934 11.2451 2.63934H15.4782C17.2316 2.63934 18.6531 4.06076 18.6531 5.81417V10.0473C18.6531 11.8007 17.2316 13.2221 15.4782 13.2221H14.8048",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.2127 9.70361C15.2126 9.74739 15.177 9.78277 15.1332 9.78269C15.0895 9.78261 15.054 9.7471 15.054 9.70332C15.054 9.65954 15.0895 9.62403 15.1332 9.62395C15.177 9.62387 15.2126 9.65926 15.2127 9.70304V9.70361",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.6529 16.1082V20.9186",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.7305 18.0324L18.6546 16.1082",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20.5804 18.0324L18.6562 16.1082",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3.26172 12.8372V19.3793C3.26282 20.2292 4.98465 20.9186 7.10999 20.9186C9.23533 20.9186 10.95
6272 20.2292 10.9583 19.3793V12.8372",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.9572 12.8372C10.9572 13.6871 9.23423 14.3765 7.10889 14.3765C4.98355 14.3765 3.26172 13.6871 3.26172 12.8372C3.26172 11.9862 4.98574 11.2979 7.10999 11.2979C9.23423 11.2979 10.9572 11.9873 10.9583 12.8372",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3.26172 16.1082C3.26172 16.9582 4.98355 17.6476 7.10889 17.6476C9.23423 17.6476 10.9572 16.9582 10.9572 16.1082",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),hc=()=>{const{data:e,isFetching:n,error:o}=Ae.useGetBalancesQuery();return{...i.useMemo(()=>{if(!(e!=null&&e.payload))return{totalBalance:0,actualCurrencies:[],balanceMap:new Map};let r=0;const a=[],c=new Map;return e.payload.forEach(l=>{var u;if((u=l.currency)==null?void 0:u.isActual){const p=l.conv;p!==null&&Number.isFinite(p)&&(r+=p),a.push(l.currency),c.set(l.currency.key,l)}}),{totalBalance:r,actualCurrencies:a,balanceMap:c}},[e]),isFetching:n,error:o}},kv=e=>{const{initialCurrencyKey:n,excludeZeroBalance:o=!1}=e||{},{actualCurrencies:s,balanceMap:r,isFetching:a,error:c}=hc(),l=i.useMemo(()=>s.length?[...o?s.filter(f=>{var _;return((_=r.get(f.key))==null?void 0:_.value)!==0}):s].sort((f,_)=>{var C,y;const v=((C=r.get(f.key))==null?void 0:C.conv)??0;return(((y=r.get(_.key))==null?void 0:y.conv)??0)-v}).map(f=>{const _=`${f.ticker.toUpperCase()} (${f.protocol})`,v=r.get(f.key),g=t.jsx(lc,{currency:f,balance:v==null?void 0:v.value,converted:v==null?void 0:v.conv});return{value:f.key,label:_,render:g}}):[],[s,r,o]),[d,u]=i.useState(n);return{currencyOptions:l,selectedCurrencyKey:d,handleChangeCurrencyKey:m=>{u(m)},getCurrenciesError:c,isCurrenciesLoading:a}},wv="_wrapper_o3wiu_1",jv="_qrWrapper_o3wiu_9",Sv="_skeleton_o3wiu_22",Nv="_copy_o3wiu_28",Lv="_input_o3wiu_32",Qr={wrapper:wv,qrWrapper:jv,skeleton:Sv,copy:Nv,input:Lv},Ev=e=>{const{currencyKey:n}=e,[o,s]=i.useState(n),r=u=>{s(u)},{balance:a,isFetching:c}=xt(o),{currencyOptions:l}=kv(),{Canvas:d}=Ya();return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Deposit Crypto",subtitle:"Scan the QR or copy the address for the selected network."}),t.jsxs(D.Body,{className:Qr.wrapper,children:[t.jsx(Oe,{options:l,selected:o,label:"Network",onChange:r,placeholder:"Select Currency",size:"large"}),c&&t.jsx("div",{className:Qr.qrWrapper,children:t.jsx(H,{className:Qr.skeleton})}),a&&!c&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:Qr.qrWrapper,children:t.jsx(d,{text:a.token,options:{margin:4,width:240,color:{dark:"#000000",light:"#ffffff"}}})}),t.jsx(J,{name:"id",value:(a==null?void 0:a.token)??"",readOnly:!0,size:"large",label:"Your wallet address",className:Qr.input,controlButtons:t.jsx(it,{value:(a==null?void 0:a.token)??"",variant:"primary",className:Qr.copy})}),t.jsx(V,{variant:"warning",message:`Only send assets on ${Ln(a.currency.network)} (${a.currency.protocol.toUpperCase()}) to this address. Sending from other networks may result in permanent loss.`})]})]})]})},Yu=e=>{const{isOpen:n,onClose:o,currencyKey:s}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(Ev,{currencyKey:s})})};var xn=(e=>(e[e.from3to4=0]="from3to4",e[e.from4to3=1]="from4to3",e))(xn||{});const $v="_maxSum_1h4sv_1",Tv={maxSum:$v},fc=({onClick:e})=>t.jsx("button",{type:"button",className:Tv.maxSum,onClick:e,children:"MAX"}),Mv="_link_ph61t_1",Dv={link:Mv},Dr=({children:e,className:n,...o})=>{const s=L(Dv.link,n);if("to"in o&&o.to)return t.jsx(ge,{to:o.to,className:s,children:e});const{href:r,target:a="_blank",rel:c="noreferrer"}=o;return t.jsx("a",{href:r,target:a,rel:c,className:s,children:e})},_c=()=>{const[e]=Ae.useLazyGetBalanceQuery(),[n]=Ae.useLazyGetBalancesQuery();return i.useCallback(s=>{const r=new Set(s);setTimeout(()=>{r.forEach(a=>{e({key:a,fresh:1}),n()})},G6)},[e,n])},Pv="_withCopy_vvubu_1",Y1={withCopy:Pv},Ku=({amount:e,currencyFrom:n,currencyTo:o,fillFrom:s,migrateTo:r,addressTo:a,currencyFee:c,fee:l,hash:d,externalFee:u,externalCurrency:p,className:m})=>{const h=i.useMemo(()=>{const f=[];return d&&f.push({label:"Transaction Hash",value:t.jsxs("div",{className:Y1.withCopy,children:[d," ",t.jsx(it,{value:d})]})}),s&&f.push({label:"Fill from",value:s}
62),f.push({label:"From",value:`${n.ticker} (${n.protocol})`}),r&&f.push({label:"Migrate To",value:a?t.jsxs("div",{className:Y1.withCopy,children:[a," ",t.jsx(it,{value:a})]}):r}),f.push({label:"To",value:`${o.ticker} (${o.protocol})`},{label:"Amount Debited",value:`${q(Number(e),n.decimal)} ${n.ticker}`}),s==="SoftNote Wallet"&&l&&c&&(f.push({label:"Network Fee",value:`${q(Number(l),c.decimal)} ${c.ticker}`}),n.key===c.key&&f.push({label:"Total Amount",value:`${q(Number(e)+Number(l),n.decimal)} ${n.ticker}`})),s==="External Wallet"&&u&&p&&f.push({label:"Network Fee",value:`${u} ${p.ticker}`}),f},[e,c,n,o,l,d,s,r,u,p,a]);return t.jsx(lt,{data:h,className:m})};var an=(e=>(e.main="main",e.beta="beta",e))(an||{}),vn=(e=>(e.init="init",e.confirm="confirm",e.result="result",e))(vn||{});const Iv="_wrapper_hei79_1",Bv="_tab_hei79_13",Rv="_active_hei79_32",qs={wrapper:Iv,tab:Bv,active:Rv},Gu=({activeTab:e,onTabChange:n,className:o})=>t.jsxs("div",{className:L(qs.wrapper,o),role:"tablist","aria-label":"Migration mode",children:[t.jsx("button",{type:"button",role:"tab","aria-selected":e===an.main,className:L(qs.tab,{[qs.active]:e===an.main}),onClick:()=>n(an.main),children:"Other Networks"}),t.jsx("button",{type:"button",role:"tab","aria-selected":e===an.beta,className:L(qs.tab,{[qs.active]:e===an.beta}),onClick:()=>n(an.beta),children:"Tectum 4.1"})]}),Av=({decimal:e=8,maxSum:n})=>Ie().shape({amount:_s().minCrypto(10**-e,e).maxCrypto(n??1/0,e).required()}),Ov="_wrapper_1d62t_1",Fv="_labelWrapper_1d62t_7",qv="_label_1d62t_7",Wv="_balance_1d62t_20",Vv="_separator_1d62t_27",Hv="_circle_1d62t_34",Uv="_footer_1d62t_50",Yv="_checkField_1d62t_56",Kv="_checkbox_1d62t_69",Gv="_totalAmount_1d62t_75",qt={wrapper:Ov,labelWrapper:Fv,label:qv,balance:Wv,separator:Vv,circle:Hv,footer:Uv,checkField:Yv,checkbox:Kv,totalAmount:Gv},zv=e=>{switch(e){case xn.from3to4:return{from:"(T12)",to:"(T12 v4.1)"};case xn.from4to3:return{from:"(T12 v4.1)",to:"(T12)"};default:return{from:"",to:""}}},Zv=[{value:xn.from3to4,label:"TET (T12)"},{value:xn.from4to3,label:"TET (T12 v4.1)"}],Fn={id:1,network:"Tectum",protocol:"T12",ticker:"TET",isActual:!0,key:"tectum-t12-tet",decimal:8,price:0,fixFee:!0},Qv=e=>{const{onClose:n,activeTab:o,onTabChange:s}=e,[r,a]=i.useState(xn.from3to4),[c,l]=i.useState(!1),[d,u]=i.useState(!1),p=B=>{a(B),x.setFieldValue("amount","")},m=zv(r),{balance:h,isFetching:f}=xt("tectum-t12-tet"),_=(h==null?void 0:h.value)??0,[v,{isSuccess:g,error:C,isLoading:y}]=Ae.useMigrateBetaMutation(),b=Q(C),x=Me({initialValues:{amount:"",cryptocurrency:r.toString()},validationSchema:Av({decimal:8,maxSum:r===xn.from4to3?1/0:_}),validateOnChange:c,onSubmit:B=>{v({amount:Number(B.amount),type:r}),Ze({event:"crypto_migrate_attempt",currency:`${m.from} - ${m.to}`,amount:Number(B.amount),network:"tectum 4.1"})}}),N=B=>{Sn(B.target.value)&&x.setFieldValue("amount",B.target.value)},S=()=>{x.setFieldValue("amount",_)},j=()=>{l(!0),x.handleSubmit()},$=_c();i.useEffect(()=>{g&&(Ze({event:"crypto_migrate_success",currency:`${m.from} - ${m.to}`,amount:Number(x.values.amount),network:"tectum 4.1"}),$(["tectum-t12-tet"]))},[g]);const T={id:1,network:"Tectum",protocol:`T12 ${m.to}`,ticker:"TET",isActual:!0,key:"tectum-t12-tet",decimal:8,price:0,fixFee:!0},M=i.useRef(null);i.useEffect(()=>{b&&M.current&&M.current.scrollIntoView({behavior:"smooth",block:"start"})},[b]);const P=()=>{u(B=>!B)};return g?t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Migrate Crypto",subtitle:"Review the migration details."}),t.jsxs(D.Body,{className:qt.wrapper,children:[t.jsx(V,{variant:"success",title:"Migration completed",message:t.jsxs(t.Fragment,{children:["Find your private key"," ",t.jsx(Dr,{to:"/settings/privacy/private-key",children:"here"}),"."]})}),t.jsx(Ku,{amount:x.values.amount,currencyFee:Fn,currencyFrom:Fn,currencyTo:T,fee:"0"})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:n,variant:"primary",children:"Done"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Migrate Crypto",subtitle:"Move TET between Tectum T12 and T12 v4.1."}),t.jsxs(D.Body,{className:qt.wrapper,children:[t.jsx(Gu,{activeTab:o,onTabChange:s}),b&&t.jsx("div",{ref:M,children:t.jsx(V,{variant:"error",message:b,animated:!0})}),t.jsx(V,{variant:"warning",title:"Beta feature",message:t.jsxs(t.Fragment,{children:["Limited functionality â funds cannot be migrated back to wallet balance in this release. Check balance via Tectum Node 4.1."," ",t.jsx(Dr,{href:"https://tectum.gitbook.io/tectum_lightnode",children:"Instructions"})]})}),t.jsx(Oe,{options:Zv,selected:r,label:"Currency",onChange:p,placeholder:"Select Currency"}),t.jsx(J,{placeholder:"0",onChange:N,value:x.values.amount,handleClear:()=>x.setFieldValue("amount",""),type:"text",name:"amount",label:t.jsxs("div",{className:qt.labelWrapper,children:[t.jsxs("div",{className:qt.label,children:[t.jsx("span",{children:"Amount"}),r===xn.from3to4&&t.jsxs("span",{className:qt.balance,children:["Balance:"," ",f?"...":q(_,8)," ","TET"]})]}),r===xn.from3to4&&t.jsx(fc,{onClick:S})]}),error:x.errors.amount,size:"large"}
62),t.jsx("div",{className:qt.separator,"aria-hidden":!0,children:t.jsx("div",{className:qt.circle,children:t.jsx(No,{})})}),t.jsx(J,{value:`TET ${m.to}`,label:"Destination",readOnly:!0}),t.jsxs("div",{className:qt.totalAmount,children:[t.jsx("span",{children:"Network Fee"}),t.jsx("span",{children:`${q(0,(Fn==null?void 0:Fn.decimal)??8)} ${(Fn==null?void 0:Fn.ticker)??""}`})]})]}),t.jsxs(D.Footer,{className:qt.footer,children:[t.jsxs("div",{className:qt.checkField,children:[t.jsx(ci,{checked:d,onClick:P,className:qt.checkbox}),t.jsx("span",{children:"I acknowledge the risks of using the beta version and release company from any liability."})]}),t.jsx(O,{onClick:j,disabled:!at(x)||!d,isLoading:y,variant:"primary",children:"Migrate"})]})]})};function Xv({initialCurrency:e,isFromExternal:n}){var C;const{actualCurrencies:o,balanceMap:s,isFetching:r}=hc(),a=i.useRef(!1),c=i.useMemo(()=>{let b=[...o].sort((x,N)=>{var $,T;const S=(($=s.get(x.key))==null?void 0:$.conv)??0;return(((T=s.get(N.key))==null?void 0:T.conv)??0)-S}).filter(x=>{var N;return!!((N=x.migrationCurrencies)!=null&&N.length)});return n?b=b.filter(x=>x.protocol!=="T12"||x.network!=="tectum"):b=b.filter(x=>{var N;return((N=s.get(x.key))==null?void 0:N.value)!==0}),b},[o,n,s]),[l,d]=i.useState(),[u,p]=i.useState(),m=c.find(y=>y.key===l)??o.find(y=>y.key===l),h=((C=m==null?void 0:m.migrationCurrencies)==null?void 0:C.find(y=>y.key===u))??o.find(y=>y.key===u);i.useEffect(()=>{var x;if(a.current||!(e!=null&&e.key))return;const y=c.find(N=>N.key===e.key);if(!y)return;d(e.key);const b=((x=y.migrationCurrencies)==null?void 0:x.length)===1?y.migrationCurrencies[0].key:void 0;p(b),a.current=!0},[e==null?void 0:e.key,c]);const f=i.useCallback(y=>{var N;const b=c.find(S=>S.key===y);d(y);const x=((N=b==null?void 0:b.migrationCurrencies)==null?void 0:N.length)===1?b.migrationCurrencies[0].key:void 0;p(x)},[c]),_=i.useCallback(y=>{p(y)},[]),v=i.useCallback(()=>{d(void 0),p(void 0)},[]),g=i.useMemo(()=>{var b;const y=x=>{const N=s.get(x.key);return{value:x.key,label:`${x.ticker} (${x.protocol})`,render:t.jsx(lc,{currency:x,balance:N==null?void 0:N.value,converted:N==null?void 0:N.conv})}};return{from:c.map(y),to:((b=m==null?void 0:m.migrationCurrencies)==null?void 0:b.map(y))||[]}},[c,m,s]);return{migrateFromCurrency:m,setMigrateFromCurrency:f,migrateToCurrency:h,setMigrateToCurrency:_,clearMigrationCurrencies:v,migrateFromSelectOptions:g.from,migrateToSelectOptions:g.to,isCurrenciesLoading:r}}const zu=["TET","TCT"],Ha=[{value:"wallet",label:"SoftNote Wallet"},{value:"external",label:"External Wallet"}],Jv="_amount_128ot_1",ey="_label_128ot_8",ty="_value_128ot_15",ny="_copy_128ot_26",Ko={amount:Jv,label:ey,value:ty,copy:ny},ry=({value:e,ticker:n})=>t.jsxs("div",{className:Ko.amount,children:[t.jsx("span",{className:Ko.label,children:"Amount"}),t.jsxs("div",{className:Ko.value,children:[`${e} ${n.toUpperCase()}`,t.jsx(it,{value:e,className:Ko.copy})]})]}),sy="_wrapper_1ootp_1",oy="_description_1ootp_9",ay="_address_1ootp_21",iy="_qrWrapper_1ootp_29",ly="_copy_1ootp_42",cy="_label_1ootp_46",dy="_footer_1ootp_55",Ws={wrapper:sy,description:oy,address:ay,qrWrapper:iy,copy:ly,label:cy,footer:dy},uy=({onBackClick:e,onMigrateClick:n,isLoading:o,formik:s,ticker:r,address:a,error:c,amountTotal:l})=>{const{Canvas:d}=Ya();return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Migrate Crypto",subtitle:"Send the exact amount, then paste the transaction hash.",onBackClick:e}),t.jsxs(D.Body,{className:Ws.wrapper,children:[t.jsx(ry,{value:l,ticker:r}),t.jsxs("div",{className:Ws.address,children:[t.jsx("div",{className:Ws.qrWrapper,children:t.jsx(d,{text:a,options:{margin:2,width:200,color:{dark:"#000000",light:"#ffffff"}}})}),t.jsx(J,{type:"text",name:"address",value:a,readOnly:!0,size:"large",label:"Your wallet address",controlButtons:t.jsx(it,{value:a,variant:"primary",className:Ws.copy})})]}),t.jsx(J,{name:"hash",value:s.values.hash,onChange:s.handleChange,label:"Transaction Hash",handleClear:()=>s.setFieldValue("hash",""),placeholder:"Enter transaction hash",error:s.errors.hash}),c&&t.jsx(V,{variant:"error",message:c,animated:!0})]}),t.jsxs(D.Footer,{className:Ws.footer,children:[t.jsx(V,{variant:"warning",message:"Please send the exact amount displayed on the screen and ensure youâve selected the correct network. Transactions with an invali
62d hash will not be credited."}),t.jsx(O,{onClick:n,disabled:!s.values.hash,isLoading:o,variant:"primary",children:"Migrate"})]})]})},py="_labelWrapper_1rnsd_1",my="_label_1rnsd_1",hy="_bold_1rnsd_14",fy="_hidden_1rnsd_21",_y="_visible_1rnsd_25",gy="_loadingDots_1rnsd_30",vy="_dotAnimation_1rnsd_1",Go={labelWrapper:py,label:my,bold:hy,hidden:fy,visible:_y,loadingDots:gy,dotAnimation:vy},yy=({migrateFromCurrency:e,balance:n,isBalanceLoading:o,quote:s,isFromExternal:r,onMaxClick:a})=>t.jsxs("div",{className:L(Go.labelWrapper,{[Go.visible]:e,[Go.hidden]:!e}),children:[t.jsxs("div",{className:Go.label,children:[t.jsx("span",{children:"Amount"}),!r&&t.jsx(t.Fragment,{children:t.jsx("span",{children:(e==null?void 0:e.protocol)==="T12"&&zu.includes(e==null?void 0:e.ticker)&&s!==void 0&&t.jsxs(t.Fragment,{children:["Available for migration:"," ",q(s,8)," ",e.ticker]})})})]}),t.jsx(fc,{onClick:a})]}),by="_wrapper_1kre9_1",xy="_revealHidden_1kre9_8",Cy="_reveal_1kre9_8",ky="_revealInner_1kre9_23",wy="_separator_1kre9_29",jy="_circle_1kre9_36",Sy="_maxSum_1kre9_62",Ny="_footer_1kre9_75",Ly="_checkField_1kre9_81",Ey="_checkbox_1kre9_95",$y="_buttons_1kre9_100",Ty="_description_1kre9_105",My="_totalAmount_1kre9_113",Dy="_totalAmountSkeleton_1kre9_132",Py="_label_1kre9_138",$e={wrapper:by,revealHidden:xy,reveal:Cy,revealInner:ky,separator:wy,circle:jy,maxSum:Sy,footer:Ny,checkField:Ly,checkbox:Ey,buttons:$y,description:Ty,totalAmount:My,totalAmountSkeleton:Dy,label:Py},Iy=({activeTab:e,onTabChange:n,error:o,fillFrom:s,onFillFromChange:r,migrateFromSelectOptions:a,migrateFromCurrency:c,onMigrateFromCurrencyChange:l,requiresQuota:d,quote:u,formik:p,isCurrenciesLoading:m,onAmountChange:h,balance:f,isBalanceLoading:_,onMaxClick:v,migrateTo:g,onMigrateToChange:C,migrateToCurrency:y,feeError:b,migrateToSelectOptions:x,onMigrateToCurrencyChange:N,initialFee:S,feeCurrency:j,isFeeLoading:$,onClose:T,onSubmit:M,isLoading:P,onFeeChange:B,fee:I})=>{const A=()=>!c||!y?!0:s==="wallet"&&g==="wallet"?!at(p,["hash","address"]):s==="external"&&g==="wallet"?!at(p,["hash","address"]):s==="wallet"&&g==="external"?!at(p,["hash"]):!0;return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Migrate Crypto",subtitle:"Transfer tokens across networks â to SoftNote Wallet or an external address."}),t.jsxs(D.Body,{className:$e.wrapper,children:[t.jsx(Gu,{activeTab:e,onTabChange:n}),o&&t.jsx(V,{variant:"error",message:o||b,animated:!0}),t.jsx(Oe,{options:Ha,label:"Fill from",selected:s,onChange:r}),t.jsx(Oe,{options:a,selected:c==null?void 0:c.key,label:"Currency",onChange:l,placeholder:"Select Currency",error:p.errors.cryptocurrency,isLoading:m,size:"large"}),t.jsx("div",{className:L($e.reveal,{[$e.revealHidden]:!c}),children:t.jsx("div",{className:$e.revealInner,children:t.jsx(J,{placeholder:"0",onChange:h,value:p.values.amount,handleClear:()=>p.setFieldValue("amount",""),type:"text",name:"amount",size:"large",label:t.jsx(yy,{migrateFromCurrency:c,balance:f,isBalanceLoading:_,quote:u,isFromExternal:s==="external",onMaxClick:v}),error:p.errors.amount})})}),t.jsx("div",{className:L($e.reveal,{[$e.revealHidden]:!c}),"aria-hidden":!c,children:t.jsx("div",{className:$e.revealInner,children:t.jsx("div",{className:$e.separator,children:t.jsx("div",{className:$e.circle,children:t.jsx(No,{})})})})}),s!=="external"&&t.jsx("div",{className:L($e.reveal,{[$e.revealHidden]:!c}),children:t.jsx("div",{className:$e.revealInner,children:t.jsx(Oe,{options:Ha,label:"Migrate to",selected:g,onChange:C})})}),g==="external"&&t.jsx(J,{name:"address",value:p.values.address,onChange:p.handleChange,label:"Cryptocurrency address",handleClear:()=>p.setFieldValue("address",""),placeholder:"Enter cryptocurrency address",error:p.errors.address}),t.jsx("div",{className:L($e.reveal,{[$e.revealHidden]:!c}),children:t.jsx("div",{className:$e.revealInner,children:t.jsx(Oe,{selected:y==null?void 0:y.key,options:x,onChange:N,label:"Destination currency",size:"large"})})}),s!=="external"&&t.jsx("div",{className:L($e.reveal,{[$e.revealHidden]:!c}),children:t.jsx("div",{className:$e.revealInner,children:t.jsx(lu,{initialFee:S??0,feeCurrency:j,isLoading:$,onChange:B})})})]}),t.jsxs(D.Footer,{className:$e.footer,children:[c&&s!=="external"&&t.jsxs("div",{className:$e.totalAmount,children:[t.jsx("span",{children:"Network Fee"}),t.jsx("span",{children:$?t.jsx(H,{className:$e.totalAmountSkeleton}):`${q(I??0,(j==null?void 0:j.decimal)??8)} ${(j==null?void 0:j.ticker)??""}`})]}),t.jsx(O,{onClick:M,disabled:A(),isLoading:P,variant:"primary",children:s==="external"?"Next":"Migrate"})]})]})},By=({feeCurrency:e,amount:n,migrateFromCurrency:o,migrateToCurrency:s,feeAmount:r,onClose:a,hash:c,fillFrom:l,migrateTo:d,externalFee:u,externalCurrency:p,addressTo:m})=>t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Migrate Crypto",subtitle:"Review the migration details and track the status."}),t.jsxs(D.Body,{className:$e.wrapper,children:[t.jsx(V,{variant:"warning",title:"Token migration is underway",message:t.jsxs(t.Fragment,{children:["This may take some time depending on network load. Track status on"," ",t.jsx(Dr,{href:"https://etherscan.io/",children:"Etherscan"}),","," ",t.jsx(Dr,{href:"https://bscscan.com/",children:"Bscscan"}),", or in History."]})}),t.jsx(Ku,{amount:n,currencyFee:e,currencyFrom:o,currencyTo:s,fee:r,hash:c,fillFrom:l,migrateTo:d,externalFee:u,externalCurrency:p,addressTo:m})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:a,variant:"primary",children:"Done"})})]}),Ry=({decimal:e=8,maxSum:n,isToExternal:o,isConfirmStep:s})=>Ie().shape({amount:_s().minCrypto(10**-e,e).maxCrypto(n??1/0,e).required(),cryptocurrency:ae().required(),address:o?ae().required().min(H6).max(U6).noSpaces():ae(),hash:s?ae().required():ae()}),Ay=({initialCurrency:e,onClose:n,activeTab:o,onTabChange:s})=>{var Ec,$c;const[r,a]=i.useState(vn.init),[c,l]=i.useState("wallet"),[d,u]=i.useState("wallet"),[p,m]=i.useState(!1),[h,f]=i.useState(0),[_,v]=i.useState(null),{migrateFromCurrency:g,setMigrateFromCurrency:C,migrateToCurrency:y,setMigrateToCurrency:b,clearMigrationCurrencies:x,migrateFromSelectOptions:N,migrateToSelectOptions:S,isCurrenciesLoading:j}=Xv({initialCurrency:e,isFromExternal:c==="external"}),{balance:$,isFetching:T}=xt(g==null?void 0:g.key),M=$==null?void 0:$.value,[P,{isSuccess:B,error:I,isLoading:A,reset:W}]=Ae.useMigrateMutation(),[z,{data:G,isLoading:K,error:ee,reset:ie}]=Ae.useMigrateExternalInitiateMutation(),[U,{data:F,isLoading:R,error:Y,reset:X}]=Ae.useMigrateExternalConfirmMutation(),[Ne,{data:Le,isLoading:Be,error:Pn,reset:Es}]=Ae.useMigrateExternalOutputMutation(),{data:In,isFetching:wp,error:jp}=Ae.useGetMigrateFeeQuery({from:(g==null?void 0:g.id)??-1,to:(y==null?void 0:y.id)??-1},{pollingInterval:A8,skip:!(g!=null&&g.id)||!(y!=null&&y.id)||B||c==="external"}),Bn=In==null?void 0:In.currency,Lc=In==null?void 0:In.fee,Sp=ve=>{C(ve)};i.useEffect(()=>{dt.setFieldValue("cryptocurrency",(g==null?void 0:g.key)??"")},[g]),i.useEffect(()=>{dt.setFieldValue("address","")},[d]);const Np=ve=>{b(ve)},Do=(g==null?void 0:g.protocol)==="T12"&&zu.includes(g==null?void 0:g.ticker),{data:ji,error:Lp}=Ae.useGetQuoteQuery({currencyKey:(y==null?void 0:y.key)??""},{skip:!Do||!(y!=null&&y.key)}),Po=ji==null?void 0:ji.userQuoteAmount,dt=Me({initialValues:{amount:"",cryptocurrency:g==null?void 0:g.key,address:"",hash:""},validationSchema:Ry({decimal:g==null?void 0:g.decimal,maxSum:c==="external"?1/0:Do?Math.min(Po??0,M??0):M??0,isToExternal:d==="external",isConfirmStep:r===vn.confirm}),validateOnChange:p,onSubmit:({amount:ve,address:Fr})=>{if(!(!g||!y)){if(c==="wallet"&&d==="wallet"){if(Lc===void 0)return;ie(),X(),Es(),P({amount:Number(ve),currencyFrom:g.id,currencyTo:y.id,fee:h}),Ze({event:"crypto_migrate_attempt",currency:`${Nt(g)} - ${Nt(y)}`,amount:Number(ve),network:"other networks"})}c==="external"&&d==="wallet"&&(W(),X(),Es(),z({amount:Number(ve),currencyFromKey:g.key,currencyToKey:y.key})),c==="wallet"&&d==="external"&&(W(),X(),ie(),Ne({amount:Number(ve),currencyFromKey:g.key,currencyToKey:y.key,fee:h,addressTo:Fr}))}}}),Ep=_c();i.useEffect(()=>
62{if(B||Le||F){g&&y&&v({from:g,to:y,feeCurrency:Bn}),a(vn.result),Ze({event:"crypto_migrate_success",currency:`${Nt(g)} - ${Nt(y)}`,amount:Number(dt.values.amount),network:"other networks"});const ve=[g==null?void 0:g.key,y==null?void 0:y.key,Bn==null?void 0:Bn.key].filter(Fr=>!!Fr);ve.length>0&&Ep(ve)}},[B,Le,F]),i.useEffect(()=>{G&&a(vn.confirm)},[G]);const $p=()=>{const ve=h,Fr=(g==null?void 0:g.key)===(Bn==null?void 0:Bn.key)?Math.max((M??0)-ve,0):M??0,Ip=Do&&Po!==void 0?Math.min(Po,Fr):Fr,Bp=q(Ip,(g==null?void 0:g.decimal)??8).replace(/\s/g,"");dt.setFieldValue("amount",Bp)},Tp=ve=>{Sn(ve.target.value)&&dt.setFieldValue("amount",ve.target.value)},Mp=()=>{m(!0),dt.handleSubmit()},Dp=()=>{!(G!=null&&G.requestId)||!dt.values.hash||U({requestId:G.requestId,hash:dt.values.hash})},Pp=Q(I||Lp||ee||Pn);return r===vn.init?t.jsx(Iy,{activeTab:o,onTabChange:s,error:Pp,fillFrom:c,onFillFromChange:ve=>{ve==="external"&&u("wallet"),l(ve),x(),dt.setValues({amount:"",cryptocurrency:"",address:"",hash:""})},migrateFromSelectOptions:N,migrateFromCurrency:g,onMigrateFromCurrencyChange:Sp,requiresQuota:Do,quote:Po,formik:dt,isCurrenciesLoading:j,onAmountChange:Tp,balance:M,isBalanceLoading:T,onMaxClick:$p,migrateTo:d,onMigrateToChange:ve=>{ve==="external"&&l("wallet"),u(ve)},migrateToCurrency:y,feeError:Q(jp),migrateToSelectOptions:S,onMigrateToCurrencyChange:Np,initialFee:Lc,feeCurrency:Bn,isFeeLoading:wp,onClose:n,onSubmit:Mp,isLoading:A||K||Be,onFeeChange:f,fee:h}):r===vn.confirm&&G?t.jsx(uy,{onBackClick:()=>{m(!1),X(),dt.setFieldValue("hash",""),a(vn.init)},onMigrateClick:Dp,isLoading:R,formik:dt,ticker:G.currency.ticker,address:G.addressToFill,error:Q(Y),amountTotal:G.amountTotalStr}):r===vn.result&&_?t.jsx(By,{migrateFromCurrency:_.from,migrateToCurrency:_.to,feeAmount:h,feeCurrency:_.feeCurrency,amount:dt.values.amount,onClose:n,hash:dt.values.hash,addressTo:dt.values.address,fillFrom:(Ec=Ha.find(ve=>ve.value===c))==null?void 0:Ec.label,migrateTo:($c=Ha.find(ve=>ve.value===d))==null?void 0:$c.label,externalFee:G==null?void 0:G.amountDustStr,externalCurrency:G==null?void 0:G.currency}):null},Oy=({initialCurrency:e,onClose:n})=>{const[o,s]=i.useState(an.main),r=a=>{s(a)};return t.jsxs(t.Fragment,{children:[o===an.main&&t.jsx(Ay,{onClose:n,initialCurrency:e,activeTab:o,onTabChange:r}),o===an.beta&&t.jsx(Qv,{onClose:n,activeTab:o,onTabChange:r})]})},Zu=e=>{const{isOpen:n,onClose:o,initialCurrency:s}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(Oy,{initialCurrency:s,onClose:o})})},Fy=i.lazy(()=>fd(()=>import("./index-Lfd1QM11.js"),__vite__mapDeps([39,1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,6,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,40]))),Qu=e=>{const{isOpen:n,onClose:o,initialCurrency:s}=e;return t.jsx(D,{isOpen:n,onClose:o,children:t.jsx(Fy,{onClose:o,initialCurrency:s})})},qy="_actions_ko1dz_1",Wy="_title_ko1dz_6",Vy="_wrapper_ko1dz_14",Hy="_action_ko1dz_1",Xr={actions:qy,title:Wy,wrapper:Vy,action:Hy},Uy=e=>{var l;const{balanceInfo:n}=e,{isModalOpen:o,openModal:s,closeModal:r}=Mn(),a=!!((l=n.currency.migrationCurrencies)!=null&&l.length),c=()=>{s("deposit"),Ze({event:"crypto_deposit_attempt"})};return t.jsxs(t.Fragment,{children:[t.jsx("section",{className:Xr.actions,children:t.jsxs("div",{className:Xr.wrapper,children:[t.jsx(Ut,{label:"Send",icon:t.jsx(Tr,{style:{transform:"rotate(135deg)"}}),onClick:()=>s("send"),disabled:n.value<=0,className:Xr.action}),t.jsx(Ut,{label:"Deposit",icon:t.jsx(Tr,{style:{transform:"rotate(315deg)"}}),onClick:c,className:Xr.action}),a&&t.jsx(Ut,{label:"Migrate",icon:t.jsx(Hu,{}),onClick:()=>s("migrate"),className:Xr.action}),n.currency.key==="tectum-t12-tet"&&t.jsx(Ut,{as:ge,label:"Staking",icon:t.jsx(Uu,{}),to:"/staking",className:Xr.action})]})}),t.jsx(Zu,{isOpen:o("migrate"),onClose:r,initialCurrency:n.currency}),t.jsx(Yu,{isOpen:o("deposit"),onClose:r,currencyKey:n.currency.key}),t.jsx(Qu,{isOpen:o("send"),onClose:r,initialCurrency:n.currency})]})},Yy="_wrapper_1ovus_1",Ky="_header_1ovus_9",Gy="_walletKey_1ovus_13",zy="_loader_1ovus_35",zo={wrapper:Yy,header:Ky,walletKey:Gy,loader:zy},Zy=e=>{const{balanceInfo:n,sectionTitle:o,isLoading:s}=e;return!n&&s?t.jsx(Tn,{className:zo.loader}):t.jsxs("div",{className:zo.wrapper,children:[t.jsx(ct,{title:o,isLoading:s,className:zo.header,icon:n!=null&&n.currency.key?t.jsx(pn,{currencyKey:n.currency.key,alt:""}):void 0}),n&&t.jsxs(t.Fragment,{children:[t.jsx(a_,{balance:n.value,decimal:n.currency.decimal,ticker:n.currency.ticker,converted:n.conv??void 0,isLoading:s}),t.jsxs("div",{className:zo.walletKey,children:[t.jsx("span",{children:n.token}),t.jsx(it,{value:n.token})]}),t.jsx(Uy,{balanceInfo:n}),t.jsx(Cv,{currency:n.currency})]})]})},Qy=()=>{const{currencyKey:e}=jo(),{balance:n,isFetching:o,error:s}=xt(e);
62if(s)throw new Error("404");const r=n?`${n.currency.ticker} (${n.currency.protocol})`:"";return t.jsx(Zy,{sectionTitle:r,balanceInfo:n,isLoading:o})},Xy=[{value:"permanent",label:"Permanent"},{value:"3months",label:"3 Months"},{value:"6months",label:"6 Months"},{value:"1year",label:"1 Year"}],Jy="_wrapper_1p4os_1",eb="_panel_1p4os_7",tb="_documentation_1p4os_11",nb="_actions_1p4os_18",rb="_duration_1p4os_26",sb="_button_1p4os_31",ob="_keys_1p4os_37",ab="_apiKeyContainer_1p4os_47",ib="_expirationDate_1p4os_54",lb="_expiringWarning_1p4os_61",cb="_empty_1p4os_65",db="_skeleton_1p4os_74",Ct={wrapper:Jy,panel:eb,documentation:tb,actions:nb,duration:rb,button:sb,keys:ob,apiKeyContainer:ab,expirationDate:ib,expiringWarning:lb,empty:cb,skeleton:db},ub=e=>{const n=e.toISOString().slice(0,10),o=e.toTimeString().slice(0,8);return`${n}, ${o}`},pb=e=>{const{onRequestKey:n,isCreatingApiKey:o,error:s,apiKeys:r,isApiKeysLoading:a,selectedDuration:c,onDurationSelect:l}=e;return t.jsxs("section",{className:Ct.wrapper,children:[t.jsx(ct,{title:"For developers"}),t.jsx(V,{variant:"warning",title:"Caution!",message:"Your API key is sensitive information. Do not share it and keep it secure."}),t.jsxs(ze,{className:Ct.panel,children:[t.jsx(Dr,{href:"https://docs.api.softnote.com/",className:Ct.documentation,children:"Technical Documentation"}),t.jsxs("div",{className:Ct.actions,children:[t.jsx(Oe,{options:Xy,selected:c,label:"Duration",onChange:l,placeholder:"Select duration",showSearch:!1,className:Ct.duration}),t.jsx(O,{isLoading:o,className:Ct.button,onClick:n,disabled:!c,children:"Generate API Key"})]}),s&&t.jsx(V,{variant:"error",message:s,animated:!0}),t.jsx("div",{className:Ct.keys,children:a?t.jsx(H,{className:Ct.skeleton,count:2}):r.length>0?r.map(d=>t.jsxs("div",{className:Ct.apiKeyContainer,children:[t.jsx(J,{name:`apiKey-${d.apiKeyName}`,value:d.key,label:d.apiKeyName?`API Key ${d.apiKeyName}`:"API Key",readOnly:!0,withCopy:!0}),d.expiredAt?t.jsxs("div",{className:L(Ct.expirationDate,{[Ct.expiringWarning]:new Date(d.expiredAt).getTime()-Date.now()<30*24*60*60*1e3}),children:["Expires:"," ",ub(new Date(d.expiredAt))]}):t.jsx("div",{className:Ct.expirationDate,children:"Expires: Never"})]},d.key)):t.jsx("p",{className:Ct.empty,children:"No API keys yet. Choose a duration and generate one."})})]})]})},mb=e=>{const n=new Date;switch(e){case"permanent":return null;case"3months":{const o=new Date(n);return o.setMonth(o.getMonth()+3),o}case"6months":{const o=new Date(n);return o.setMonth(o.getMonth()+6),o}case"1year":{const o=new Date(n);return o.setFullYear(o.getFullYear()+1),o}default:return null}},hb=()=>{const[e,n]=i.useState(),[o,{isLoading:s,error:r}]=Se.useCreateApiKeyMutation(),{data:a,isLoading:c}=Se.useGetApiKeyQuery(),l=()=>{e&&o({expiredAt:mb(e)})},d=u=>{n(u)};return t.jsx(pb,{isCreatingApiKey:s,isApiKeysLoading:c,onRequestKey:l,error:Q(r),apiKeys:(a==null?void 0:a.apiKeys)||[],selectedDuration:e,onDurationSelect:d})},fb=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14.4749 4.52513C15.8417 5.89197 15.8417 8.10804 14.4749 9.47488C13.108 10.8417 10.892 10.8417 9.52513 9.47488C8.15829 8.10804 8.15829 5.89197 9.52513 4.52513C10.892 3.15829 13.108 3.15829 14.4749 4.52513",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 18.5001V19.5001C4 20.0521 4.448 20.5001 5 20.5001H19C19.552 20.5001 20 20.0521 20 19.5001V18.5001C20 15.4741 16.048 13.5081 12 13.5081C7.952 13.5081 4 15.4741 4 18.5001Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),_b=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M16.9504 8.33813C19.9716 9.12846 22.0025 10.6091 22.0025 12.3098C22.0025 14.8408 17.5206 16.8817 11.9983 16.8817C6.47601 16.8817 1.99414 14.8408 1.99414 12.3098C1.99414 10.6091 4.03499 9.11845 7.06625 8.32812",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0003 9.02393C17.0003 10.2868 14.7607 11.3106 11.9982 11.3106C9.23561 11.3106 6.99609 10.2868 6.99609 9.02393",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0012 9.02395V8.98849C17.0012 7.66459 16.4752 6.39491 15.5391 5.45877C14.603 4.52262 13.3333 3.9967 12.0094 3.9967V3.9967C10.6855 3.9967 9.41579 4.52262 8.47964 5.45876C7.5435 6.3949 7.01758 7.66459 7.01758 8.98849V9.02395",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0898 16.6572L17.0018 20.0033",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.90808 16.6572L6.99609 20.0033",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.0483 14.1403C12.0483 14.168 12.0259 14.1904 11.9983 14.1904C11.9706 14.1904 11.9482 14.168 11.9482 14.1403C11.9482 14.1127 11.9706 14.0903 11.9983 14.0903",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.9986 14.0903C12.0263 14.0903 12.0487 14.1127 12.0487 14.1403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.01703 12.8255C7.01703 12.8458 7.00484 12.864 6.98615 12.8717C6.96746 12.8795 6.94594 12.8752 6.93164 12.8609C6.91733 12.8466 6.91305 12.8251 6.92079 12.8064C6.92853 12.7877 6.94677 12.7755 6.96701 12.7755",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M6.96739 12.7755C6.99501 12.7755 7.01741 12.7979 7.01741 12.8255",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0873 12.8255C17.0873 12.8532 17.0649 12.8755 17.0373 12.8755C17.0097 12.8755 16.9873 12.8532 16.9873 12.8255C16.9873 12.7979 17.0097 12.7755 17.0373 12.7755",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0377 12.7755C17.0653 12.7755 17.0877 12.7979 17.0877 12.8255",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),gb="_body_1f49x_1",vb="_icons_1f49x_9",yb="_selectedIcon_1f49x_18",bb="_iconsList_1f49x_25",xb="_icon_1f49x_9",Cb="_selected_1f49x_18",kb="_buttons_1f49x_43",wb="_groupChange_1f49x_56",jb="_active_1f49x_70",Sb="_footer_1f49x_75",Et={body:gb,icons:vb,selectedIcon:yb,iconsList:bb,icon:xb,selected:Cb,buttons:kb,groupChange:wb,active:jb,footer
62:Sb},Nb=e=>{const{onClose:n,image:o}=e,[s,r]=i.useState("space"),[a,c]=i.useState(()=>({name:"",src:o})),{data:l,error:d,isLoading:u}=Se.useFetchIconsQuery(),p=C=>{r(C)},m=(l==null?void 0:l.payload.icons[s])??[],[h,{isLoading:f,isSuccess:_,error:v}]=Se.useChangeIconMutation(),g=()=>{a.name&&h({name:a.name})};return i.useEffect(()=>{_&&n()},[_,n]),t.jsxs(t.Fragment,{children:[t.jsxs(D.Body,{className:Et.body,children:[d&&t.jsx(V,{variant:"error",message:Q(d||v),animated:!0}),t.jsxs("div",{className:Et.icons,children:[t.jsx("img",{src:a.src,alt:"",className:Et.selectedIcon}),t.jsx("div",{className:Et.iconsList,children:u?t.jsx(Tn,{}):m.map(C=>t.jsx("img",{src:C.src,alt:C.name,className:L(Et.icon,{[Et.selected]:C.src===a.src}),onClick:()=>c(C)},C.name))})]}),t.jsxs("div",{className:Et.buttons,children:[t.jsx("button",{className:L(Et.groupChange,{[Et.active]:s==="space"}),onClick:()=>p("space"),children:t.jsx(_b,{})}),t.jsx("button",{className:L(Et.groupChange,{[Et.active]:s==="people"}),onClick:()=>p("people"),children:t.jsx(fb,{})})]})]}),t.jsxs(D.Footer,{className:Et.footer,children:[t.jsx(O,{variant:"secondary",onClick:n,children:"Cancel"}),t.jsx(O,{onClick:g,isLoading:f,children:"Save"})]})]})},Lb=e=>{const{isOpen:n,onClose:o,image:s}=e;return t.jsxs(D,{isOpen:n,onClose:o,children:[t.jsx(D.Header,{title:"Use an Emoji"}),t.jsx(Nb,{image:s,onClose:o})]})};var Cr=function(){return Cr=Object.assign||function(e){for(var n,o=1,s=arguments.length;o<s;o++)for(var r in n=arguments[o])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},Cr.apply(this,arguments)};function Zi(e,n){var o={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.indexOf(s)<0&&(o[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)n.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(o[s[r]]=e[s[r]])}return o}var Eb=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],$b={opacity:0,maxWidth:"100%"},Tb=E.forwardRef(function(e,n){var o=Zi(e,[]),s=o.dragMode,r=s===void 0?"crop":s,a=o.src,c=o.style,l=o.className,d=o.crossOrigin,u=o.scaleX,p=o.scaleY,m=o.enable,h=o.zoomTo,f=o.rotateTo,_=o.alt,v=_===void 0?"picture":_,g=o.ready,C=o.onInitialized,y=Zi(o,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),b={scaleY:p,scaleX:u,enable:m,zoomTo:h,rotateTo:f},x=function(){for(var S=[],j=0;j<arguments.length;j++)S[j]=arguments[j];var $=i.useRef(null);return E.useEffect(function(){S.forEach(function(T){T&&(typeof T=="function"?T($.current):T.current=$.current)})},[S]),$}(n,i.useRef(null));i.useEffect(function(){var S;!((S=x.current)===null||S===void 0)&&S.cropper&&typeof h=="number"&&x.current.cropper.zoomTo(h)},[o.zoomTo]),i.useEffect(function(){var S;!((S=x.current)===null||S===void 0)&&S.cropper&&a!==void 0&&x.current.cropper.reset().clear().replace(a)},[a]),i.useEffect(function(){if(x.current!==null){var S=new O2(x.current,Cr(Cr({dragMode:r},y),{ready:function(j){j.currentTarget!==null&&function($,T){T===void 0&&(T={});var M=T.enable,P=M===void 0||M,B=T.scaleX,I=B===void 0?1:B,A=T.scaleY,W=A===void 0?1:A,z=T.zoomTo,G=z===void 0?0:z,K=T.rotateTo;P?$.enable():$.disable(),$.scaleX(I),$.scaleY(W),K!==void 0&&$.rotateTo(K),G>0&&$.zoomTo(G)}(j.currentTarget.cropper,b),g&&g(j)}}));C&&C(S)}return function(){var j,$;($=(j=x.current)===null||j===void 0?void 0:j.cropper)===null||$===void 0||$.destroy()}},[x]);var N=function(S){return Eb.reduce(function(j,$){var T=j,M=$;return T[M],Zi(T,[typeof M=="symbol"?M:M+""])},S)}(Cr(Cr({},y),{crossOrigin:d,src:a,alt:v}));return E.createElement("div",{style:c,className:l},E.createElement("img",Cr({},N,{style:$b,ref:x})))});const Xu=e=>i.createElement("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M21.141 15.3734L17.0197 11.2521C16.6444 10.8767 16.0367 10.8767 15.6623 11.2521L11.541 15.3734",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2613 20.1734H6.74133C5.15061 20.1734 3.86133 18.8842 3.86133 17.2934V5.77343C3.86133 4.18271 5.15061 2.89343 6.74133 2.89343H18.2613C19.852 2.89343 21.1413 4.18271 21.1413 5.77343V17.2934C21.1413 18.8842 19.852 20.1734 18.2613 20.1734Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.3409 20.1734L10.2996 14.1321C9.92426 13.7567 9.31658 13.7567 8.94218 14.1321L4.28906 18.7852",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.87518 8.3989C10.0158 8.53949 10.0158 8.76743 9.87518 8.90802C9.73459 9.04861 9.50666 9.04861 9.3
626607 8.90802C9.22548 8.76743 9.22548 8.53949 9.36607 8.3989C9.50666 8.25831 9.73459 8.25831 9.87518 8.3989",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Mb=e=>i.createElement("svg",{viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M17.0017 18.5023V21.0033",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.71108 18.4666L4.52957 14.2851C3.81843 13.574 3.81843 12.421 4.52957 11.7099L8.71108 7.52835C9.42222 6.81721 10.5752 6.81721 11.2864 7.52835L15.4679 11.7099C16.179 12.421 16.179 13.574 15.4679 14.2851L11.2864 18.4666C10.5752 19.1778 9.42222 19.1778 8.71108 18.4666Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0017 20.4931C20.0248 19.2712 22.0038 16.3368 22.0038 13.076C22.0038 9.81531 20.0248 6.88088 17.0017 5.65894",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.5028 21.0033H17.0017",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.5028 4.99666H17.0017",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.0017 7.49771V4.99667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Db="_body_kwiqy_1",Pb="_cropper_kwiqy_9",Ib="_buttons_kwiqy_15",Bb="_sizeInfo_kwiqy_28",Rb="_error_kwiqy_38",Ab="_disabled_kwiqy_42",Ob="_round_kwiqy_47",Fb="_footer_kwiqy_62",qb="_uploadInput_kwiqy_66",Wb="_load_kwiqy_70",fn={body:Db,cropper:Pb,buttons:Ib,sizeInfo:Bb,error:Rb,disabled:Ab,round:Ob,footer:Fb,uploadInput:qb,load:Wb},K1=10*1024*1024,Vb=e=>{const{onClose:n}=e,[o,s]=i.useState(""),[r,a]=i.useState(0),[c,{isLoading:l,error:d,isSuccess:u}]=Se.useUploadAvatarMutation(),p=i.useRef(),m=i.useRef(null),h=i.useRef(null),f=x=>{if(x===0)return"0 B";const N=1024,S=["B","KB","MB","GB"],j=Math.floor(Math.log(x)/Math.log(N));return`${(x/Math.pow(N,j)).toFixed(1)} ${S[j]}`},_=i.useCallback(()=>{const x=A2(async()=>{if(!m.current)return;const N=m.current.cropper.getCroppedCanvas(),S=await new Promise(j=>N.toBlob(j,"image/webp",.8));S&&a(S.size)},200);return x(),()=>{x.cancel()}},[]),v=i.useCallback(()=>{_()},[_]),g=()=>{var x;(x=p.current)==null||x.rotate(90),_()},C=i.useCallback(x=>{var j;const N=(j=x.target.files)==null?void 0:j[0];if(!N)return;const S=URL.createObjectURL(N);return s(S),()=>URL.revokeObjectURL(S)},[]),y=r>K1,b=async()=>{if(!m.current||y)return;const x=await new Promise(S=>{var j;return(j=m.current)==null?void 0:j.cropper.getCroppedCanvas().toBlob(S,"image/webp",.8)});if(!x)return;const N=new FormData;N.set("avatar",x,"avatar.webp"),c(N)};return i.useEffect(()=>{var x;(x=h.current)==null||x.click()},[]),i.useEffect(()=>{u&&n()},[u,n]),t.jsxs(t.Fragment,{children:[t.jsxs(D.Body,{className:fn.body,children:[d&&t.jsx(V,{variant:"error",message:Q(d),animated:!0}),t.jsx(Tb,{onInitialized:x=>{p.current=x},ref:m,aspectRatio:1,src:o,viewMode:1,minCropBoxHeight:10,minCropBoxWidth:10,background:!1,responsive:!0,autoCropArea:1,checkOrientation:!1,guides:!1,className:fn.cropper,checkCrossOrigin:!1,crop:v}),t.jsxs("div",{className:fn.buttons,children:[t.jsx("div",{className:L(fn.sizeInfo,{[fn.error]:y}),children:`${f(r)} / ${f(K1)}`}),t.jsxs(O,{onClick:()=>{var x;return(x=h.current)==null?void 0:x.click()},variant:"secondary",className:fn.load,children:[t.jsx(Xu,{}),"Select Image"]}),t.jsx("button",{className:fn.round,onClick:g,disabled:!o,children:t.jsx(Mb,{})})]}),t.jsx("input",{id:"uploadAvatar",type:"file",accept:"image/*",onChange:C,className:fn.uploadInput,ref:h})]}),t.jsxs(D.Footer,{className:fn.footer,children:[t.jsx(O,{variant:"secondary",onClick:n,children:"Cancel"}),t.jsx(O,{onClick:b,isLoading:l,disabled:!o||y,children:"Save"})]})]})},Hb=e=>{const{isOpen:n,onClose:o}=e;return t.jsxs(D,{isOpen:n,onClose:o,children:[t.jsx(D.Header,{title:"Photo or Image"}),t.jsx(Vb,{onClose:o})]})},Ub=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14.8792 10.1678C16.4362 11.7248 16.4362 14.2493 14.8792 15.8063C13.3222 17.3633 10.7978 17.3633 9.24073 15.8063C7.68371 14.2493 7.68371 11.7248 9.24073 10.1678C10.7978 8.61081 13.3222 8.61081 14.8792 10.1678",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 9V18C21 19.105 20.105 20 19 20H5C3.895 20 3 19.105 3 18V9C3 7.895 3.895 7 5 7H7L8.462 4.496C8.641 4.189 8.97 4 9.326 4H14.63C14.981 4 15.306 4.184 15.487 4.484L17 7H19C20.105 7 21 7.895 21 9Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Yb=e=>i.createElement("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M40 20C40 26.9835 36.4215 33.1296 30.9984 36.7069C27.8436 38.7891 24.0639 40 20 40C19.7661 40 19.5335 39.9962 19.3009 39.9874C15.3351 39.8516 11.6623 38.5615 8.60807 36.4403C3.40626 32.8291 0 26.8125 0 20C0 8.95511 8.95511 0 20 0C31.0449 0 40 8.95511 40 20Z",fill:"#282B31"}),i.createElement("path",{d:"M15.955 15.5853C15.4759 14.9315 6.93072 16.4064 6.44034 14.8737C6.08072 13.7521 5.89715 9.43797 6.1788 8.77533C5.32755 10.7783 4.67496 12.9008 4.16949 15.0497C4.09531 15.3678 4.02238 15.7161 3.96831 16.0757C3.85766 16.8125 3.82497 17.5934 4.02238 18.2548C4.33798 19.3147 5.13768 19.4707 6.07569 19.5876C8.83566 19.9346 11.5768 20.4577 14.2839 21.1543C14.25 20.6677 14.2613 20.1786 14.3141 19.6945C14.4788 18.1793 15.0522 16.7195 15.955 15.5841V1
625.5853Z",fill:"#29609B"}),i.createElement("path",{d:"M35.6645 15.9537C35.6105 15.5941 35.5388 15.2458 35.4646 14.9277C34.9616 12.7776 34.3116 10.6551 33.4628 8.65082C33.7432 9.31346 33.5559 13.6276 33.195 14.7491C32.7021 16.2806 24.1594 14.7969 23.6791 15.4508C24.5807 16.5874 25.1528 18.0485 25.3162 19.5637C25.3678 20.0478 25.3791 20.5369 25.3452 21.0235C28.0536 20.3294 30.7959 19.8089 33.5559 19.4656C34.4939 19.3487 35.2936 19.194 35.6105 18.134C35.8079 17.4726 35.7764 16.6906 35.667 15.955L35.6645 15.9537Z",fill:"#5494CD"}),i.createElement("path",{d:"M31.822 24.7466C32.418 27.4362 32.6242 30.2502 32.4318 33.0454C32.0722 32.8392 31.7126 32.6342 31.3517 32.428C31.3316 33.8577 31.2134 35.2898 30.9984 36.7069C27.8436 38.7891 24.0639 40 20 40C19.7661 40 19.5335 39.9962 19.3009 39.9874V13.3321C19.3009 13.3321 20.8689 11.2838 24.1695 11.5529C23.6779 11.7867 22.6569 12.4519 22.379 13.2051C23.8828 12.7939 25.315 13.1284 26.3599 13.8665C25.8091 13.9834 25.3753 14.3921 25.3426 14.6586C26.1511 14.8258 26.9446 15.0736 27.7116 15.3942C28.9111 15.8946 30.0478 16.5774 31.0801 17.4198C30.5218 17.4412 29.9635 17.4626 29.4053 17.484C30.2402 18.0435 30.9506 18.8281 31.4686 19.7586C31.5252 19.8579 31.578 19.9598 31.6296 20.0629C31.3429 19.9258 31.0122 19.9032 30.7067 20C32.0483 21.5126 32.9788 23.488 33.3535 25.6142C32.843 25.325 32.3325 25.0358 31.822 24.7466Z",fill:"#08BED0"}),i.createElement("path",{d:"M19.3009 13.3321V39.9874C15.3351 39.8517 11.6623 38.5616 8.60807 36.4404C8.1441 34.7102 7.8813 32.9033 7.83101 31.0801C7.82723 30.9431 7.6688 30.8991 7.60593 31.0185C7.52043 31.182 7.41733 31.3354 7.29913 31.4712C7.21992 31.563 7.08412 31.5076 7.08537 31.3819C7.10172 29.36 7.43367 27.3306 8.05985 25.4131C8.1026 25.2823 7.97435 25.1729 7.87501 25.2559C7.30165 25.7236 6.76977 26.258 6.28945 26.8465C6.20143 26.9546 6.04929 26.8628 6.08198 26.722C6.57236 24.5543 7.42487 22.4783 8.58167 20.6413C8.65459 20.5256 8.54897 20.3798 8.43455 20.4376L7.41607 20.9594C7.29662 21.021 7.191 20.8626 7.27273 20.7469C7.48648 20.4414 7.70778 20.1421 7.93788 19.8504C9.07582 18.4006 10.4011 17.137 11.8546 16.1172C11.6635 16.2618 10.293 15.8054 9.89564 15.5967C9.8554 15.5753 9.82522 15.5564 9.80762 15.5413C11.1731 14.9177 13.2101 14.1557 14.6649 14.1067C14.3141 13.0769 13.4138 12.2608 11.7138 12.0684C15.955 10.9833 18.3956 12.9335 19.3009 13.3321Z",fill:"#0691AE"}),i.createElement("path",{d:"M19.7359 32.6493C24.1102 32.6493 27.6562 28.958 27.6562 24.4046C27.6562 19.8512 24.1102 16.1599 19.7359 16.1599C15.3617 16.1599 11.8157 19.8512 11.8157 24.4046C11.8157 28.958 15.3617 32.6493 19.7359 32.6493Z",fill:"white"}),i.createElement("path",{d:"M19.3009 16.1725C15.1314 16.4076 11.8194 20.0012 11.8169 24.4008C11.8144 28.8042 15.1276 32.4016 19.3009 32.6367V16.1725Z",fill:"#E0E0E0"}),i.createElement("path",{d:"M19.4115 19.6391C18.3201 19.7183 17.2564 20.1986 16.4617 21.0713C14.8108 22.8794 14.939 25.6846 16.7484 27.3343C17.4802 28.002 18.3742 28.3779 19.2883 28.471C20.1308 25.4734 20.2917 22.3928 19.4115 19.6391Z",fill:"#02A486"}),i.createElement("path",{d:"M23.0114 27.0477C24.6624 25.2395 24.5341 22.4343 22.7248 20.7846C21.788 19.9296 20.5847 19.5536 19.4115 19.6391C20.2905 22.3915 20.1308 25.4734 19.2883 28.471C20.6362 28.6068 22.0282 28.1265 23.0114 27.0489V27.0477Z",fill:"#04BF8A"}),i.createElement("path",{d:"M19.4694 26.688C20.2728 26.7685 21.1027 26.4831 21.6887 25.8406C22.6719 24.763 22.5965 23.0919 21.5177 22.1074C20.9594 21.5981 20.2414 21.3731 19.5436 21.4246C18.8935 21.4724 18.2598 21.7578 17.7857 22.2784C16.8025 23.356 16.8779 25.027 17.9567 26.0116C18.3931 26.4089 18.9262 26.634 19.4706 26.688H19.4694Z",fill:"#263238"})),Kb="_wrapper_b5jry_1",Gb="_item_b5jry_8",zb="_photo_b5jry_29",Zb="_icon_b5jry_30",Qb="_label_b5jry_59",ur={wrapper:Kb,item:Gb,photo:zb,icon:Zb,label:Qb},Xb=({onPhotoClick:e,onIconClick:n})=>t.jsxs("div",{className:ur.wrapper,children:[t.jsxs("button",{type:"button",className:ur.item,onClick:e,children:[t.jsx("span",{className:ur.photo,children:t.jsx(Ub,{})}),t.jsx("span",{className:ur.label,children:"Photo or Image"})]}),t.jsxs("button",{type:"button",className:ur.item,onClick:n,children:[t.jsx("span",{className:ur.icon,children:t.jsx(Yb,{})}),t.jsx("span",{className:ur.label,children:"Use an Emoji"})]})]}),Jb="_section_ez1sb_1",ex="_image_ez1sb_13",tx="_photo_ez1sb_23",nx="_actions_ez1sb_30",rx="_caption_ez1sb_38",Vs={section:Jb,image:ex,photo:tx,actions:nx,caption:rx},sx=({user:e})=>{const[n,o]=i.useState(!1),[s,r]=i.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:Vs.section,children:[t.jsx("div",{className:Vs.image,children:t.jsx("img",{src:e.avatar,alt:"user",className:Vs.photo})}),t.jsxs("div",{className:Vs.actions,children:[t.jsx("span",{className:Vs.caption,children:"Change photo"}),t.jsx(Xb,{onPhotoClick:()=>o(!0),onIconClick:()=>r(!0)})]})]}),t.jsx(Hb,{isOpen:n,onClose:()=>o(!1)}),t.jsx(Lb,{image:e.avatar,isOpen:s,onClose:()=>r(!1)})]})},ox="_wrapper_2lz1a_1",ax="_panel_2lz1a_7",ix="_form_2lz1a_11",lx="_error_2lz1a_18",cx="_saveButton_2lz1a_22",Hs={wrapper:ox,panel:ax,form:ix,error:lx,saveButton:cx},dx=e=>{const{user:n,isSaving:o,formik:s,error:r,handleSubmit:a,isButtonDisabled:c}=e;return t.jsxs("section",{className:Hs.wrapper,children:[t.jsx(ct,{title:"Edit profile"}),t.jsxs(ze,{className:Hs.panel,children:[t.jsx(sx,{user:n}),t.jsxs("div",{className:Hs.form,children:[t.jsx(J,{name:"id",value:n.id,readOnly:!0,label:"User ID",withCopy:!0}),t.jsx(J,{name:"username",value:s.values.username,onChange:s.handleChange,label:"Username",handleClear:()=>s.setFieldValue("username",""),placeholder:"@",error:s.errors.username}),t.jsx(J,{name:"fullName",onChange:s.handleChange,value:s.values.fullName,error:s.errors.fullName,handleClear:()=>s.setFieldValue("fullName",""),label:"Name"}),r&&t.jsx(V,{className:Hs.error,variant:"error",message:r,animated:!0}),t.jsx(O,{className:Hs.saveButton,isLoading:o,onClick:a,disabled:c,
62children:"Save"})]})]})]})},ux=()=>Ie().shape({username:ae().matches(/^[a-zA-Z0-9@._-]*$/,"Only latin characters, numbers and symbols @._- are allowed"),fullName:ae().max(256)}),px=()=>{const[e,n]=i.useState(!1),o=Zt(),{user:s}=ht(),[r,{error:a,isLoading:c,isSuccess:l}]=Se.useUpdateUserMutation(),d=Me({initialValues:{username:(s==null?void 0:s.name)??"",fullName:(s==null?void 0:s.fullName)??""},validationSchema:ux(),validateOnChange:e,onSubmit:m=>{r({name:m.username.trim()||null,fullName:m.fullName.trim().replace(/\s+/g," ")||null})}});i.useEffect(()=>{l&&o("/settings")},[l]);const u=()=>{n(!0),d.handleSubmit()},p=d.values.username===((s==null?void 0:s.name)||"")&&d.values.fullName===((s==null?void 0:s.fullName)||"");return s?t.jsx(dx,{user:s,isSaving:c,formik:d,error:Q(a),handleSubmit:u,isButtonDisabled:p}):null},Vl={ROOT:"/",BILLS:"/bills",BILLS_CURRENCY_KEY:"/bills/:currencyKey",PAY:"/pay",HISTORY:"/history",WALLET:"/wallet",WALLET_CURRENCY_KEY:"/wallet/:currencyKey",MINT_HOUSE:"/mint-house",MINT_HOUSE_HUB_OPERATION:"/mint-house/:hub/:operation",POLICY:"/policy",LOGIN:"/login",REGISTRATION:"/registration",PASSWORD_RESET:"/password-reset",SETTINGS:"/settings",SETTINGS_EDIT_PROFILE:"/settings/edit-profile",SETTINGS_VERIFICATION:"/settings/verification",SETTINGS_PRIVACY:"/settings/privacy",SETTINGS_2FA:"/settings/privacy/2fa",SETTINGS_TRANSACTION_SECURITY:"/settings/privacy/transaction-security",SETTINGS_PRIVATE_KEY:"/settings/privacy/private-key",PASSWORD_CHANGE:"/settings/privacy/password-change",SETTINGS_DEVELOPERS_API:"/settings/developers",EPOS_PAYMENT:"/epos"},Mo="/assets/logo_softnote-Dlijup2U.svg",mx="_policy_1dbdz_1",hx="_divider_1dbdz_24",G1={policy:mx,divider:hx},gc=()=>{const{pathname:e}=Fe(),n=e==="/policy";return t.jsxs("div",{className:G1.policy,children:[t.jsxs("span",{children:[new Date().getFullYear()," Tectum ®"]}),t.jsx("span",{className:G1.divider,children:"|"}),n?t.jsx("span",{children:"Privacy Policy"}):t.jsx(ge,{to:"/policy",children:"Privacy Policy"})]})},fx="_wrapper_1deyo_1",_x="_logo_1deyo_13",gx="_content_1deyo_17",vx="_title_1deyo_25",yx="_text_1deyo_35",Jr={wrapper:fx,logo:_x,content:gx,title:vx,text:yx},vc=()=>t.jsxs("section",{className:Jr.wrapper,children:[t.jsx(ge,{to:"/bills",children:t.jsx("img",{src:Mo,alt:"Tectum logo",className:Jr.logo})}),t.jsxs("div",{className:Jr.content,children:[t.jsxs("h1",{className:Jr.title,children:["404 ",t.jsx("br",{}),"not found"]}),t.jsx("p",{className:Jr.text,children:"Sorry! The page youâre looking for cannot be found."}),t.jsx(O,{as:ge,className:Jr.button,to:"/bills",children:"Back to SoftNote"})]}),t.jsx(gc,{})]});function Ju(e){if(!e)return null;try{let n=e.replace(/-/g,"+").replace(/_/g,"/");const o=n.length%4;o&&(n+="=".repeat(4-o));const s=atob(n),r=Uint8Array.from(s,c=>c.charCodeAt(0)),a=new TextDecoder("utf-8").decode(r);return JSON.parse(a)}catch{return null}}const bx=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.0001 8.89063C26.0001 6.68149 24.2093 4.89062 22.0001 4.89062H10.0001C7.79097 4.89062 6.00011 6.68147 6.0001 8.8906L6.00002 23.113C6.00001 25.3221 7.79087 27.113 10 27.113H22.0001C24.2093 27.113 26.0001 25.3221 26.0001 23.113V8.89063Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.5543 17.1127H10.4431C9.82981 17.1127 9.33203 16.6149 9.33203 16.0016V10.076C9.33203 9.46262 9.82981 8.96484 10.4431 8.96484H21.5543C22.1677 8.96484 22.6654 9.46262 22.6654 10.076V16.0016C22.6654 16.6149 22.1677 17.1127 21.5543 17.1127Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.33203 20.4462H10.4431",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.7773 20.4462H14.8885",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.2227 20.4462H22.6671",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.33203 23.7782H10.4431",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.7773 23.7782H14.8885",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),xx="data:image/svg+xml,%3csvg%20viewBox='0%200%2030%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20y='0.5'%20width='30'%20height='30'%20rx='15'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.25943%2019.498C3.21269%2019.737%203.18933%2
62019.8564%203.22282%2019.9497C3.25095%2020.028%203.3054%2020.0941%203.37686%2020.1368C3.46193%2020.1875%203.58368%2020.1875%203.82718%2020.1875L24.2448%2020.192C24.4896%2020.192%2024.612%2020.192%2024.7119%2020.1474C24.7963%2020.1097%2024.869%2020.0498%2024.9222%2019.9742C24.9852%2019.8847%2025.0088%2019.7646%2025.0558%2019.5244L26.6255%2011.5067C26.6723%2011.2677%2026.6957%2011.1482%2026.6622%2011.0549C26.6341%2010.9766%2026.5796%2010.9105%2026.5081%2010.8678C26.4231%2010.817%2026.3013%2010.817%2026.0577%2010.817L5.63833%2010.8125C5.39347%2010.8125%205.27104%2010.8125%205.1711%2010.8572C5.08666%2010.8949%205.01398%2010.9547%204.96074%2011.0304C4.89774%2011.1199%204.87424%2011.24%204.82725%2011.4803L3.25943%2019.498Z'%20fill='%23487BFF'/%3e%3cpath%20d='M19.096%2016.6435C19.1341%2016.473%2019.2932%2016.3477%2019.6736%2016.3477C20.0541%2016.3477%2020.1597%2016.4743%2020.1246%2016.6435C20.0555%2016.977%2020.2798%2017.1931%2020.6602%2017.1931C21.0616%2017.1931%2021.3364%2017.0029%2021.4%2016.6715C21.4705%2016.3122%2021.2803%2016.1079%2020.5896%2015.8682C19.8148%2015.6004%2019.3848%2015.1214%2019.533%2014.3746C19.7091%2013.4726%2020.5265%2012.9375%2021.428%2012.9375C22.4071%2012.9375%2022.9926%2013.5572%2022.781%2014.3535C22.7363%2014.521%2022.5837%2014.6494%2022.2033%2014.6494C21.8229%2014.6494%2021.7173%2014.5227%2021.7523%2014.3535L21.7594%2014.3185C21.8089%2014.0367%2021.6327%2013.8114%2021.2593%2013.8114C20.8859%2013.8114%2020.6462%2013.9946%2020.5831%2014.2904C20.5265%2014.5792%2020.7097%2014.833%2021.3719%2015.0793C22.1753%2015.3822%2022.6118%2015.7911%2022.4496%2016.608C22.2805%2017.4815%2021.5617%2018.0508%2020.498%2018.0665C19.4493%2018.0819%2018.933%2017.3723%2019.096%2016.
626435Z'%20fill='white'/%3e%3cpath%20d='M18.6752%2014.558L18.3088%2016.4463C18.2149%2016.9348%2017.973%2017.327%2017.5831%2017.6229C17.1933%2017.9188%2016.7541%2018.0668%2016.2656%2018.0668C15.7771%2018.0668%2015.3966%2017.9188%2015.1242%2017.6229C14.8517%2017.327%2014.7625%2016.9348%2014.8564%2016.4463L15.2228%2014.558C15.3168%2014.0695%2015.5587%2013.6773%2015.9485%2013.3814C16.3384%2013.0855%2016.7776%2012.9375%2017.2661%2012.9375C17.7546%2012.9375%2018.135%2013.0855%2018.4075%2013.3814C18.6799%2013.6773%2018.7692%2014.0695%2018.6752%2014.558ZM17.2872%2016.3969L17.6395%2014.6073C17.6865%2014.3631%2017.6606%2014.1705%2017.562%2014.0296C17.4634%2013.884%2017.3083%2013.8112%2017.097%2013.8112C16.8856%2013.8112%2016.7024%2013.884%2016.5474%2014.0296C16.3924%2014.1705%2016.2914%2014.3631%2016.2444%2014.6073L15.8922%2016.3969C15.8452%2016.6412%2015.871%2016.8361%2015.9697%2016.9817C16.0683%2017.1226%2016.2233%2017.1931%2016.4347%2017.1931C16.6461%2017.1931%2016.8292%2017.1226%2016.9842%2016.9817C17.1393%2016.8361%2017.2402%2016.6412%2017.2872%2016.3969Z'%20fill='white'/%3e%3cpath%20d='M12.9503%2013.8971H12.5275L12.2387%2015.3767H12.6614C13.117%2015.3767%2013.3942%2015.1301%2013.4928%2014.6369C13.582%2014.1437%2013.4012%2013.8971%2012.9503%2013.8971ZM12.0696%2016.2504L11.7807%2017.7441C11.7384%2017.9413%2011.5482%2018.04%2011.21%2018.04C11.0315%2018.04%2010.9047%2018.0141%2010.8295%2017.9625C10.7591%2017.9061%2010.7332%2017.8333%2010.752%2017.7441L11.6116%2013.3334C11.6492%2013.1268%2011.7619%2013.0234%2011.9498%2013.0234H13.2251C13.7183%2013.0234%2014.0823%2013.1644%2014.3172%2013.4462C14.552%2013.7233%2014.6201%2014.1202%2014.5215%2014.6369C14.4181%2015.1583%2014.195%2015.5575%2013.8521%2015.8347C13.5092%2016.1118%2013.0912%2016.2504%2012.598%2016.2504H12.0696Z'%20fill='white'/%3e%3cpath%20d='M8.62236%2014.9821H10.0526C10.2264%2014.9821%2010.2851%2015.1278%2010.2288%2015.419C10.1724%2015.7102%2010.0573%2015.8558%209.88354%2015.8558H8.45326L8.21371%2017.1099H9.85535C10.0245%2017.1099%2010.0832%2017.2556%2010.0315%2017.5468C9.97513%2017.838%209.86005%2017.9836%209.68626%2017.9836H7.28367C7.10518%2017.9836%207.03473%2017.8779%207.0723%2017.6666L7.91779%2013.3405C7.95536%2013.1291%208.0634%2013.0234%208.24189%2013.0234H10.6092C10.783%2013.0234%2010.8418%2013.169%2010.7854%2013.4603C10.729%2013.7515%2010.6139%2013.8971%2010.4401%2013.8971H8.83373L8.62236%2014.9821Z'%20fill='white'/%3e%3c/svg%3e",Cx=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M16.0835 14.8535C16.1108 14.8535 16.137 14.8425 16.1562 14.8231C16.1754 14.8036 16.1859 14.7773 16.1855 14.75C16.1855 14.708 16.1601 14.6702 16.1213 14.6542C16.0824 14.6383 16.0378 14.6474 16.0083 14.6774C15.9788 14.7073 15.9703 14.752 15.9868 14.7906C16.0033 14.8293 16.0415 14.8541 16.0835 14.8535",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.3274 7.02931V7.02931C27.3745 11.0768 27.3745 17.6386 23.3274 21.6861V21.6861L17.725 27.2884C16.7713 28.2418 15.2253 28.2418 14.2716 27.2884L8.66926 21.6861C6.7251 19.7428 5.63281 17.1066 5.63281 14.3577C5.63281 11.6088 6.7251 8.97262 8.66926 7.02931V7.02931C10.6126 5.08474 13.2491 3.99219 15.9983 3.99219C18.7475 3.99219 21.384 5.08474 23.3274 7.02931Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.5898 14.8535C11.6317 14.8535 11.6694 14.8283 11.6855 14.7896C11.7015 14.7509 11.6926 14.7064 11.663 14.6768C11.6334 14.6472 11.5889 14.6384 11.5502 14.6544C11.5116 14.6704 11.4863 14.7081 11.4863 14.75C11.4863 14.7775 11.4972 14.8038 11.5167 14.8232C11.5361 14.8426 11.5624 14.8535 11.5898 14.8535",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20.5757 14.8535C20.603 14.8535 20.6292 14.8425 20.6484 14.8231C20.6675 14.8036 20.6781 14.7773 20.6777 14.75C20.6777 14.708 20.6523 14.6702 20.6135 14.6542C20.5746 14.6383 20.53 14.6474 20.5005 14.6774C20.471 14.7073 20.4625 14.752 20.479 14.7906C20.4955 14.8293 20.5337 14.8541 20.5757 14.8535",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),kx="_page_fpmx1_1",wx="_link_fpmx1_16",jx="_total_fpmx1_23",Sx="_totalLabel_fpmx1_46",Nx="_totalValue_fpmx1_55",Lx="_totalSecondary_fpmx1_64",Ex="_merchant_fpmx1_71",$x="_row_fpmx1_79",Tx="_label_fpmx1_103",Mx="_value_fpmx1_110",Dx="_icon_fpmx1_128",Px="_hash_fpmx1_141",Ix="_buttons_fpmx1_158",Bx="_resultButtons_fpmx1_158",Rx="_cancelFooter_fpmx1_173",he={page:kx,link:wx,total:jx,totalLabel:Sx,totalValue:Nx,totalSecondary:Lx,merchant:Ex,row:$x,label:Tx,value:Mx,icon:Dx,hash:Px,buttons:Ix,resultButtons:Bx,cancelFooter:Rx};function Ax(e,n){const o=[{label:"Your Balance",value:n?`${q(n.value,
62n.currency.decimal)} ${n.currency.ticker.toUpperCase()}`:t.jsx(H,{})},{label:"Currency",value:n?`${Ln(n.currency.network)} (${n.currency.ticker.toUpperCase()})`:t.jsx(H,{})},{label:"Network",value:n?`${Ln(n.currency.network)} Network`:t.jsx(H,{})}];return e!=null&&e.recepientData.exchange_rate&&o.push({label:"Exchange rate",value:e.recepientData.exchange_rate}),o}function Ox(e,n,o){const s=[];return e!=null&&e.recepientData.merchant&&s.push({label:"Merchant",value:e.recepientData.merchant}),e!=null&&e.recepientData.pos&&s.push({label:"POS",value:e.recepientData.pos}),e!=null&&e.cashierId&&s.push({label:"Cashier",value:`Cashier_${e.cashierId}`}),s.push({label:"Timestamp",value:`${w6(new Date(o.timestamp))} UTC`}),s.push({label:"Event Hash",value:t.jsxs("span",{className:he.hash,children:[ys(o.hash,20),t.jsx("a",{href:`https://explorer.tectum.io/${n==null?void 0:n.currency.key}/transaction/${o.hash}`,target:"_blank",rel:"noreferrer",children:t.jsx(To,{})})]})}),s.push({label:"Currency",value:n&&`${Ln(n.currency.network)} (${n.currency.ticker.toUpperCase()})`}),s.push({label:"Network",value:n&&`${Ln(n.currency.network)} Network`}),e!=null&&e.recepientData.exchange_rate&&s.push({label:"Exchange rate",value:e.recepientData.exchange_rate}),s}const Fx=e=>{const{paymentDetails:n,balance:o,onPay:s,error:r,isPayEposLoading:a}=e,c=n.data,[l,d]=i.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(js,{title:"Payment Confirmation",subtitle:"Review the payment details and confirm the transfer."}),r&&t.jsx(V,{variant:"error",message:r,animated:!0}),(c==null?void 0:c.recepientData.total_currency)&&t.jsxs("div",{className:he.total,children:[t.jsx("span",{className:he.totalLabel,children:"Total"}),t.jsx("span",{className:he.totalValue,children:c.recepientData.total_currency}),c.recepientData.total&&t.jsx("span",{className:he.totalSecondary,children:c.recepientData.total})]}),((c==null?void 0:c.recepientData.merchant)||(c==null?void 0:c.recepientData.pos)||(c==null?void 0:c.cashierId))&&t.jsxs("div",{className:he.merchant,children:[(c==null?void 0:c.recepientData.merchant)&&t.jsxs("div",{className:he.row,children:[t.jsx("span",{className:he.label,children:"Merchant"}),t.jsx("span",{className:he.value,children:c.recepientData.merchant}),t.jsx("div",{className:he.icon,children:t.jsx("img",{src:xx,alt:"epos"})})]}),(c==null?void 0:c.recepientData.pos)&&t.jsxs("div",{className:he.row,children:[t.jsx("span",{className:he.label,children:"POS"}),t.jsx("span",{className:he.value,children:c.recepientData.pos}),t.jsx("div",{className:he.icon,children:t.jsx(Cx,{})})]}),(c==null?void 0:c.cashierId)&&t.jsxs("div",{className:he.row,children:[t.jsx("span",{className:he.label,children:"Cashier"}),t.jsxs("span",{className:he.value,children:["Cashier_",c.cashierId]}),t.jsx("div",{className:he.icon,children:t.jsx(bx,{})})]})]}),t.jsx(lt,{data:Ax(c,o)}),t.jsxs("div",{className:he.buttons,children:[t.jsx(O,{disabled:!o,onClick:s,isLoading:a,children:"Pay"}),t.jsx(O,{variant:"secondary",onClick:()=>d(!0),children:"Cancel"})]}),t.jsxs(D,{isOpen:l,onClose:()=>d(!1),fitContent:!0,children:[t.jsx(D.Header,{title:"Cancel payment?",subt
62itle:"You can return to the wallet without completing this payment."}),t.jsxs(D.Footer,{className:he.cancelFooter,children:[t.jsx(O,{as:"a",href:"/",children:"Yes, cancel payment"}),t.jsx(O,{variant:"secondary",onClick:()=>d(!1),children:"No, continue"})]})]})]})},qx=e=>{const{paymentDetails:n,balance:o,payEposData:s}=e,r=n.data;return t.jsxs(t.Fragment,{children:[t.jsx(js,{title:"Transaction Info",subtitle:"Payment completed â review the transaction details."}),t.jsx(V,{variant:"success",message:"Payment successful"}),(r==null?void 0:r.recepientData.total_currency)&&t.jsxs("div",{className:he.total,children:[t.jsx("span",{className:he.totalLabel,children:"Total"}),t.jsx("span",{className:he.totalValue,children:r.recepientData.total_currency}),r.recepientData.total&&t.jsx("span",{className:he.totalSecondary,children:r.recepientData.total})]}),t.jsx(lt,{data:Ox(r,o,s)}),t.jsxs("div",{className:he.resultButtons,children:[t.jsx(O,{variant:"secondary",as:"a",href:`https://softnotepay.com/receipt/${s.checkId}`,target:"_blank",rel:"noreferrer",children:"Receipt"}),t.jsx(O,{as:"a",href:"/",children:"Done"})]})]})},Wx=()=>{var h;const[e]=li(),n=Ju(e.get("data")),o=(h=n==null?void 0:n.data)==null?void 0:h.recepientData.currency_key,{balance:s}=xt(o),[r,a]=i.useState("confirm"),[c,l]=i.useState(""),[d,{data:u,isLoading:p}]=Ae.usePayEposMutation(),m=async()=>{var f;if(!(!s||!((f=n==null?void 0:n.data)!=null&&f.amount))){if(Number(n.data.amount)>s.value){l(t.jsxs(t.Fragment,{children:["Insufficient balance."," ",t.jsx("a",{href:Vl.WALLET,className:he.link,children:"Top up"})," ","and try again"]}));return}try{await d(n).unwrap(),a("result")}catch(_){l(Q(_))}}};return n?t.jsxs("div",{className:he.page,children:[r==="confirm"&&t.jsx(Fx,{paymentDetails:n,balance:s,onPay:m,error:c,isPayEposLoading:p}),r==="result"&&!!u&&t.jsx(qx,{paymentDetails:n,balance:s,payEposData:u})]}):t.jsx(vc,{})},Vx="_wrapper_15rvk_1",Hx="_filters_15rvk_6",Ux="_typeFilter_15rvk_13",Yx="_dateFilter_15rvk_17",Kx="_dateRangeWrapper_15rvk_21",Gx="_dateRange_15rvk_21",zx="_dateRangeClose_15rvk_40",pr={wrapper:Vx,filters:Hx,typeFilter:Ux,dateFilter:Yx,dateRangeWrapper:Kx,dateRange:Gx,dateRangeClose:zx},Zx=[{label:"All",value:"all"},{label:"Export",value:Z.EXPORT},{label:"Send",value:Z.SEND},{label:"Accrue",value:Z.ACCRUED},{label:"Burn",value:Z.BURN},{label:"Fill",value:Z.FILL},{label:"Mint",value:Z.MINT},{label:"Deposit",value:Z.IMPORT},{label:"Handover",value:Z.RECEIPT},{label:"Migrate Out",value:Z.MIGRATED_OUT},{label:"Migrate In",value:Z.MIGRATED_IN}],Qx=e=>{const{startDate:n,endDate:o,onChangeDate:s,minDate:r,datePickerOpen:a,onToggleDatePicker:c,onCloseDatePicker:l,resetDatePicker:d,fetchNext:u,isLoading:p,isFetching:m,count:h,operations:f,onClose:_,onOpen:v,open:g,operationDetail:C,error:y,type:b,onChangeType:x}=e;return t.jsxs("div",{children:[t.jsx(js,{title:"History",subtitle:"Review SoftNote and crypto activity."}),t.jsxs(ze,{className:pr.wrapper,children:[t.jsxs("div",{className:pr.filters,children:[t.jsx(Oe,{selected:b??"all",options:Zx,label:"Operation type",onChange:x,className:pr.typeFilter,showSearch:!1}),t.jsx(Wu,{isOpen:a,onToggle:c,onClose:l,startDate:n,endDate:o,onChangeDate:s,minDate:r,className:pr.dateFilter})]}),n&&o&&t.jsx("div",{className:pr.dateRangeWrapper,children:t.jsxs("div",{className:pr.dateRange,children:[ot(n)," / ",ot(o),t.jsx("div",{onClick:d,className:pr.dateRangeClose,children:t.jsx(fu,{})})]})}),f.length>0&&t.jsx(xu,{count:h,data:f,fetchNext:u,isLoading:p,isFetching:m,onOpen:v}),y&&t.jsx(V,{variant:"error",message:y,animated:!0})]}),C&&t.jsx(Vu,{operation:C,isOpen:g,onClose:_})]})},Xx=()=>{const[e,n]=i.useState(!1),[o,s]=i.useState(),[r,a]=i.useState(0),[c,l]=i.useState(null),d=i.useCallback(I=>{l(I==="all"?null:I),a(0)},[]),u=i.useCallback(I=>{s(I),n(!0)},[]),p=i.useCallback(()=>n(!1),[]),[m,h]=i.useState(!1),f=i.useCallback(()=>{h(I=>!I)},[]),_=i.useCallback(()=>{h(!1)},[]),[v,g]=i.useState(null),[C,y]=i.useState(null),b=i.useCallback((I,A)=>{I&&A&&I>
62A||(I&&A?(g(I),y(A)):I?(g(I),y(I)):A&&(g(A),y(A)),_(),a(0))},[y,g]),x=i.useCallback(()=>{g(null),y(null),a(0)},[y,g]),{data:{payload:{operations:N=[],count:S=0}={}}={},error:j,isLoading:$,isFetching:T}=Se.useGetOperationsQuery({count:ln,offset:r,start:v?ot(v):void 0,end:C?ot(C):void 0,action:c??void 0}),M=i.useCallback(()=>{a(I=>I+10)},[]),{user:P}=ht(),B=P&&P.date_create?new Date(P.date_create):null;return t.jsx(Qx,{error:Q(j),onClose:p,onOpen:u,open:e,operationDetail:o,count:S,fetchNext:M,isLoading:$,isFetching:T,resetDatePicker:x,operations:N,startDate:v,endDate:C,onChangeDate:b,minDate:B,datePickerOpen:m,onToggleDatePicker:f,onCloseDatePicker:_,type:c,onChangeType:d})},Jx=e=>i.createElement("svg",{width:12,height:7,viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M0.833008 0.833374L5.83301 5.83337L10.833 0.833374",stroke:"#717A8C",strokeWidth:1.66667,strokeLinecap:"round",strokeLinejoin:"round"}));var Te=(e=>(e.green="green",e.blue="blue",e))(Te||{});const eC="_option_8yso6_1",tC="_icon_8yso6_9",nC="_details_8yso6_17",rC="_ticker_8yso6_25",sC="_network_8yso6_36",oC="_status_8yso6_46",aC="_disabled_8yso6_65",qn={option:eC,icon:tC,details:nC,ticker:rC,network:sC,status:oC,new:"_new_8yso6_59",disabled:aC},ep=({currency:e})=>{const n=e.softNoteStatus===mn.disabled,o=e.softNoteStatus===mn.new;return t.jsxs("div",{className:L(qn.option,{[qn.disabled]:n}),children:[t.jsx(pn,{currencyKey:e.key,className:qn.icon,alt:`${e.ticker} icon`}),t.jsxs("div",{className:qn.details,children:[t.jsx("span",{className:qn.ticker,children:e.ticker}),t.jsxs("span",{className:qn.network,children:[Ln(e.network)," (",e.protocol,")"]})]}),(o||n)&&t.jsx("span",{className:L(qn.status,{[qn.new]:o}),children:o?"New":"Soon"})]})},iC="_modal_x2asc_1",lC="_body_x2asc_8",cC="_list_x2asc_14",dC="_item_x2asc_23",uC="_selected_x2asc_34",pC="_focused_x2asc_41",mC="_disabled_x2asc_49",Un={modal:iC,body:lC,list:cC,item:dC,selected:uC,focused:pC,disabled:mC},lo=e=>e.softNoteStatus===mn.disabled,z1=(e,n)=>{const o=e.findIndex(s=>s.key===n&&!lo(s));return o>=0?o:e.findIndex(s=>!lo(s))},hC=e=>{const{currencies:n,selectedCurrencyKey:o,onCurrencyClick:s,onClose:r}=e,[a,c]=i.useState(()=>z1(n,o)),l=i.useRef(null);i.useEffect(()=>{c(z1(n,o))},[n,o]),i.useEffect(()=>{var h;if(a<0)return;const m=(h=l.current)==null?void 0:h.querySelector(`[data-index="${a}"]`);m==null||m.focus({preventScroll:!0}),m==null||m.scrollIntoView({block:"nearest"})},[a]);const d=m=>{lo(m)||(s(m.key),r())},u=(m,h,f)=>{let _=m;for(;_>=0&&_<n.length;){if(!lo(n[_]))return _;_+=h}return f},p=m=>{m.key==="ArrowDown"?(m.preventDefault(),c(h=>u(h+1,1,h))):m.key==="ArrowUp"?(m.preventDefault(),c(h=>u(h-1,-1,h))):m.key==="Enter"&&a>=0?(m.preventDefault(),d(n[a])):m.key==="Escape"&&(m.preventDefault(),r())};return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Select currency",className:Un.header}),t.jsx(D.Body,{className:Un.body,children:t.jsx("ul",{ref:l,className:Un.list,role:"listbox","aria-activedescendant":a>=0?`mint-house-currency-${a}`:void 0,onKeyDown:p,children:n.map((m,h)=>{const f=m.key===o,_=lo(m);return t.jsx("li",{id:`mint-house-currency-${h}`,"data-index":h,role:"option",tabIndex:h===a?0:-1,"aria-selected":f,"aria-disabled":_,className:L(Un.item,{[Un.selected]:f,[Un.disabled]:_,[Un.focused]:h===a}),ref:v=>{v&&h===a&&(v.focus({preventScroll:!0}),v.scrollIntoView({block:"nearest"}))},onFocus:()=>c(h),onClick:()=>d(m),children:t.jsx(ep,{currency:m})},m.key)})})})]})},fC=e=>{const{currencies:n,selectedCurrencyKey:o,onCurrencyClick:s,isOpen:r,onClose:a}=e;return t.jsx(D,{isOpen:r,onClose:a,modalClassName:Un.modal,fitContent:!0,children:t.jsx(hC,{currencies:n,selectedCurrencyKey:o,onCurrencyClick:s,onClose:a})})},_C="_wrapper_1n4un_1",gC="_header_1n4un_5",vC="_sectionTitle_1n4un_9",yC="_currencySelect_1n4un_17",bC="_selectedCurrency_1n4un_45",xC="_currencyArrow_1n4un_50",CC="_currencyPlaceholder_1n4un_57",kC="_currencySkeleton_1n4un_62",wC="_currencySkeletonIcon_1n4un_70",jC="_currencySkeletonMain_1n4un_77",SC="_currencySkeletonTitle_1n4un_85",NC="_currencySkeletonSubtitle_1n4un_91",LC="_currencyError_1n4un_97",EC="_infoWrapper_1n4un_107",$C="_balance_1n4un_114",TC="_balanceSkeletonIcon_1n4un_145",MC="_balanceSkeletonLabel_1n4un_152",DC="_balanceSkeletonValue_1n4un_158",PC="_balanceRow_1n4un_164",IC="_balanceLabel_1n4un_171",BC="_balanceValue_1n4un_180",RC="_infoList_1n4un_192",AC="_info_1n4un_107",OC="_metricSkeleton_1n4un_215",FC="_metricSkeletonLabel_1n4un_228",qC="_metricSkeletonAmount_1n4un_234",WC="_metricSkeletonBills_1n4un_240",VC="_title_1n4un_246",HC="_amount_1n4un_258",UC="_bills_1n4un_270",YC="_blue_1n4un_276",KC="_green_1n4un_279",te={wrapper:_C,header:gC,sectionTitle:vC,currencySelect:yC,selectedCurrency:bC,currencyArrow:xC,currencyPlaceholder:CC,currencySkeleton:kC,currencySkeletonIcon:wC,currencySkeletonMain:jC,currencySkeletonTitle:SC,currencySkeletonSubtitle:NC,currencyError:LC,infoWrapper:EC,balance:$C,balanceSkeletonIcon:TC,balanceSkeletonLabel:MC,balanceSkeletonValue:DC,balanceRow:PC,balanceLabel:IC,balanceValue:BC,infoList:RC,info:AC,metricSkeleton:OC,metricSkeletonLabel:FC,metricSkeletonAmount:qC,metricSkeletonBills:WC,title:VC,amount:HC,bills:UC,blue:YC,green:KC},GC=e=>{const{currencies:n,currenciesError:o,isCurrenciesLoading:s,balance:r,isBalanceLoading:a,selectedCurrencyKey:c,onCurrencyClick:l,hub:d}=e,{data:u,isFetching:p,error:m}=St.useGetCurrencyInfoQuery({currencyKey:c},{skip:!c}),h=u==null?void 0:u.payload,[f,_]=i.useState(!1),v=n.find(C=>C.key===c),g=i.useMemo(()=>
62{if(!h)return[];const{mint:C,currency:y}=h;return[{key:"liquidity",label:"Liquidity",tip:"Total SoftNote bills available in your Wallet.",amount:C.amount,bills:C.count,decimal:y.decimal,ticker:y.ticker},{key:"filled",label:"Filled",tip:"Total SoftNote bills filled with liquidity.",amount:C.fill.amount,bills:C.fill.count,decimal:y.decimal,ticker:y.ticker},{key:"ready",label:"Ready",tip:"Minted SoftNote bills available to be filled with liquidity.",amount:C.amountFree,bills:C.countFree,decimal:y.decimal,ticker:y.ticker}]},[h]);return t.jsxs(ze,{className:te.wrapper,children:[t.jsx("div",{className:te.header,children:t.jsx("h2",{className:te.sectionTitle,children:"Currency"})}),t.jsx("button",{type:"button",className:te.currencySelect,onClick:()=>_(!0),disabled:s||!!o||!v,children:s?t.jsxs("div",{className:te.currencySkeleton,children:[t.jsx(H,{className:te.currencySkeletonIcon}),t.jsxs("div",{className:te.currencySkeletonMain,children:[t.jsx(H,{className:te.currencySkeletonTitle}),t.jsx(H,{className:te.currencySkeletonSubtitle})]})]}):v?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:te.selectedCurrency,children:t.jsx(ep,{currency:v})}),t.jsx(Jx,{className:te.currencyArrow})]}):t.jsx("span",{className:te.currencyPlaceholder,children:"Select currency"})}),o&&t.jsx("span",{className:te.currencyError,children:o}),t.jsxs("div",{className:te.infoWrapper,children:[t.jsx("div",{className:te.balance,children:a||r===void 0?t.jsxs(t.Fragment,{children:[t.jsx(H,{className:te.balanceSkeletonIcon}),t.jsxs("div",{className:te.balanceRow,children:[t.jsx(H,{className:te.balanceSkeletonLabel}),t.jsx(H,{className:te.balanceSkeletonValue})]})]}):t.jsxs(t.Fragment,{children:[t.jsx(pn,{currencyKey:c}),t.jsxs("div",{className:te.balanceRow,children:[t.jsx("span",{className:te.balanceLabel,children:"Balance"}),t.jsxs("span",{className:te.balanceValue,children:[q(r.value,r.currency.decimal)," ",r.currency.ticker]})]})]})}),t.jsx("div",{className:te.infoList,children:m?t.jsx(V,{variant:"error",message:Q(m),animated:!0}):p||!h?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:te.metricSkeleton,children:[t.jsx(H,{className:te.metricSkeletonLabel}),t.jsx(H,{className:te.metricSkeletonAmount}),t.jsx(H,{className:te.metricSkeletonBills})]}),t.jsxs("div",{className:te.metricSkeleton,children:[t.jsx(H,{className:te.metricSkeletonLabel}),t.jsx(H,{className:te.metricSkeletonAmount}),t.jsx(H,{className:te.metricSkeletonBills})]}),t.jsxs("div",{className:te.metricSkeleton,children:[t.jsx(H,{className:te.metricSkeletonLabel}),t.jsx(H,{className:te.metricSkeletonAmount}),t.jsx(H,{className:te.metricSkeletonBills})]})]}):g.map(C=>t.jsxs("div",{className:te.info,children:[t.jsxs("div",{className:te.title,children:[t.jsx("span",{children:C.label}),t.jsx(Ar,{value:C.tip,pointerPosition:"top"})]}),t.jsxs("span",{className:te.amount,children:[q(C.amount,C.decimal)," ",C.ticker]}),t.jsxs("span",{className:L(te.bills,{[te.green]:d===Te.green,[te.blue]:d===Te.blue}),children:[C.bills," Bills"]})]},C.key))})]}),t.jsx(fC,{isOpen:f,currencies:n,selectedCurrencyKey:c,onCurrencyClick:l,onClose:()=>_(!1)})]})};var Zn=(e=>(e.mint="mint",e.fill="fill",e))(Zn||{});const zC=()=>{const{pathname:e}=Fe(),n=e.split("/"),o={hub:n[2],operation:n[3]},s=o.hub===Te.blue&&o.operation in Zn,r=o.hub===Te.green&&o.operation in Zn;return t.jsx(hu,{items:[{color:"blue",label:"Blue Hub",selected:s,to:`/mint-house/blue/${o.operation}`},{color:"green",label:"Green Hub",selected:r,to:`/mint-house/green/${o.operation}`}]})};function ZC(){const[e,n]=i.useState({}),[o,s]=i.useState({}),r=i.useCallback((p,m)=>{n(h=>{const f={...h};return f[p]=m,f[p]<=0&&delete f[p],f})},[]),a=i.useCallback((p,m)=>{s(h=>{const f={...h};return p.length>0?f[m]=p:delete f[m],f})},[]),c=i.useCallback((p,m)=>{s(h=>{const f={...h};return f[m]||(f[m]=[]),f[m]=[...f[m],p],f})},[]),l=i.useCallback((p,m)=>{s(h=>{const f={...h};return f[m]||(f[m]=[]),f[m]=[...f[m].filter(_=>_!==p)],f[m].length===0&&delete f[m],f})},[]),d=i.useCallback(()=>{n({}),s({})},[]),u=i.useMemo(()=>Object.entries(e).reduce((p,[m,h])=>p+Number(m)*h,0),[e]);return{selectedIds:o,selectedCombination:e,setSelectedBills:r,addSelectedSoftnotesList:a,addSelectedSoftnotes:c,removeSelectedSoftnote:l,clearSelected:d,totalFillCost:u}}const QC="_wrapper_elv2i_2",XC="_sectionTitle_elv2i_10",JC="_tabs_elv2i_18",ek="_tab_elv2i_18",tk="_selected_elv2i_50",nk="_content_elv2i_78",rk="_balance_elv2i_88",sk="_balanceMeta_elv2i_104",ok="_balanceLabel_elv2i_111",ak="_balanceValue_elv2i_120",ik="_balanceSkeletonIcon_elv2i_132",lk="_balanceSkeletonLabel_elv2i_139",ck="_balanceSkeletonValue_elv2i_145",dk="_bottom_elv2i_151",We={wrapper:QC,sectionTitle:XC,tabs:JC,tab:ek,selected:tk,content:nk,balance:rk,balanceMeta:sk,balanceLabel:ok,balanceValue:ak,balanceSkeletonIcon:ik,balanceSkeletonLabel:lk,balanceSkeletonValue:ck,bottom:dk},uk="_info_3m5xa_1",pk="_totalLabel_3m5xa_10",mk="_amount_3m5xa_19",hk="_fee_3m5xa_27",fk="_feeSkeleton_3m5xa_35",_k="_button_3m5xa_41",es={info:uk,totalLabel:pk,amount:mk,fee:hk,feeSkeleton:fk,button:_k},gk=e=>{const{onNextClick:n,totalFillCost:o,currency:s,currencyFillKey:r}=e,{data:a,isFetching:c}=Ae.useGetFeeQuery({key:r||""},{skip:!r||!o}),{balance:l}=xt(r),d=((l==null?void 0:l.value)??0)<o;return o?t.jsxs("div",{className:We.bottom,children:[t.jsxs("div",{className:es.info,children:[t.jsx("span",{className:es.totalLabel,children:"Total"}),t.jsxs("span",{className:es.amount,children:[q(o,(s==null?void 0:s.decimal)??8)," ",s==null?void 0:s.ticker]}),c?t.jsx(H,{className:es.feeSkeleton}):a&&t.jsxs("span",{className:es.fee,children:["Network fee: â"," ",q(a.payload.fee*3,a.payload.currencyFee.decimal)," ",a.payload.currencyFee.ticker]})]}),t.jsx(O,{className:es.button,onClick:n,disabled:d,children:"Next"})]}):null},vk="_wrapper_19mhm_1",yk="_title_19mhm_9",bk="_select_19mhm_17",xk="_balance_19mhm_21",Ck="_balanceMeta_19mhm_37",kk="_balanceLabel_19mhm_45",wk="_balanceValue_19mhm_55",jk="_protocol_19mhm_67",Sk="_balanceSkeletonIcon_19mhm_75",Nk="_balanceSkeletonLabel_19mhm_82",Lk="_balanceSkeletonValue_19mhm_88",Ek="_balanceSkeletonProtocol_19mhm_94",kt={wrapper:vk,title:yk,select:bk,balance:xk,balanceMeta:Ck,balanceLabel:kk,balanceValue:wk,protocol:jk,balanceSkeletonIcon:Sk,balanceSkeletonLabel:Nk,balanceSkeletonValue:Lk,balanceSkeletonProtocol:Ek},$k=({options:e,isBalanceLoading:n,balance:o,selectedCurrencyKey:s,handleCurrencyKeyChange:r,isCurrencyLoading:a,disabled:c=!1})=>t.jsxs("div",{className:kt.wrapper,children:[t.jsx("h3",{className:kt.title,children:"Fill from"}),t.jsx(Oe,{options:e,className:kt.select,onChange:r,selected:s,isLoading:a,disabled:c}),s&&t.jsx("div",{className:kt.balance,children:n||o===void 0?t.jsxs(t.Fragment,{children:[t.jsx(H,{className:kt.balanceSkeletonIcon}),t.jsxs("div",{className:kt.balanceMeta,children:[t.jsx(H,{className:kt.balanceSkeletonLabel}),t.jsx(H,{className:kt.balanceSkeletonValue}),t.jsx(H,{className:kt.balanceSkeletonProtocol})]})]}):t.jsxs(t.Fragment,{children:[t.jsx(pn,{currencyKey:s}),t.jsxs("div",{className:kt.balanceMeta,children:[t.jsx("span",{className:kt.balanceLabel,children:"Balance"}),t.jsxs("span",{className:kt.balanceValue,children:[q(o.value,o.currency.decimal)," ",o.currency.ticker]}),t.jsx("span",{className:kt.protocol,children:o.currency.protocol})]})]})})]}),Tk="_wrapper_1g2qn_1",Mk="_content_1g2qn_7",Dk="_readOnly_1g2qn_20",Pk="_error_1g2qn_24",Ik="_feeError_1g2qn_28",Bk="_open_1g2qn_33",Rk="_info_1g2qn_37",Ak="_infoTitle_1g2qn_44",Ok="_amountWrapper_1g2qn_54",Fk="_amount_1g2qn_54",qk="_amountUsd_1g2qn_70",Wk="_arrow_1g2qn_78",Vk="_rotated_1g2qn_84",Hk="_selectorWrapper_1g2qn_88",Uk="_hidden_1g2qn_94",Yk="_buttonsWrapper_1g2qn_98",Kk="_buttonsLabel_1g2qn_104",Gk="_label_1g2qn_109",zk="_buttons_1g2qn_98",Zk="_button_1g2qn_98",Qk="_selected_1g2qn_142",Xk="_balance_1g2qn_146",pe={wrapper:Tk,content:Mk,readOnly:Dk,error:Pk,feeError:Ik,open:Bk,info:Rk,infoTitle:Ak,amountWrapper:Ok,amount:Fk,amountUsd:qk,arrow:Wk,rotated:Vk,selectorWrapper:Hk,hidden:Uk,buttonsWrapper:Yk,buttonsLabel:Kk,label:Gk,switch:"_switch_1g2qn_114",buttons:zk,button:Zk,selected:Qk,balance:Xk},Us=[{label:"Low",rate:1},{label:"Average",rate:3},{label:"High",rate:10}],Jk=e=>{const{value:n,initialFee:o,onChangeFee:s,readOnly:r,feeCurrency:a,isLoading:c,error:l,withLowFeeAlert:d=!1,className:u,availableAmou
62nt:p,resetTrigger:m}=e,[h,f]=i.useState(d),_=r?Us[0].rate:se.get(re.feeRate)??Us[1].rate,[v,g]=i.useState(!1),[C,y]=i.useState(!!se.get(re.feeRate)),[b,x]=i.useState(_),N=o*b,S=n!==void 0?n===""?0:n:N,j=r||o===0||(a==null?void 0:a.fixFee);i.useEffect(()=>{j&&g(!1)},[j]),i.useEffect(()=>{s&&s(q(N,(a==null?void 0:a.decimal)??8))},[N,m]),i.useEffect(()=>{C?se.set(re.feeRate,b):se.remove(re.feeRate)},[C,b]),i.useEffect(()=>{a!=null&&a.fixFee?x(Us[0].rate):x(_)},[a]);const $=T=>{c||(x(T),s&&T===b&&s(q(o*T,(a==null?void 0:a.decimal)??8).replace(/\s/g,"")))};return i.useEffect(()=>{f(d)},[d]),t.jsxs("div",{className:L(pe.wrapper,u),children:[t.jsxs("div",{className:L(pe.content,{[pe.open]:v,[pe.error]:l,[pe.readOnly]:j}),children:[t.jsxs("div",{className:pe.info,onClick:()=>g(T=>!T),children:[t.jsxs("div",{className:pe.infoTitle,children:[!j&&t.jsx(nr,{className:L(pe.arrow,{[pe.rotated]:v})}),t.jsx("span",{children:"Network Fee"})]}),t.jsx("div",{className:pe.amountWrapper,children:c?t.jsx(H,{}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:pe.amount,children:[a&&q(Number(S),a.decimal)," ",a==null?void 0:a.ticker]}),t.jsx("span",{className:pe.amountUsd,children:a&&`$${q(Number(S)*a.price,2)}`}),a&&p!==void 0&&o!==0&&t.jsxs("span",{className:pe.balance,children:["Available for fees:"," ",q(p,a.decimal)," ",a==null?void 0:a.ticker]})]})})]}),t.jsxs("div",{className:L(pe.selectorWrapper,{[pe.hidden]:!v}),children:[h&&Number(S)<o*Us[1].rate&&t.jsx(V,{variant:"warning",title:"Attention",message:"By choosing low fee, the process may take anywhere from several hours to several days.",closable:!0,onClose:()=>f(!1)}),t.jsxs("div",{className:pe.buttonsWrapper,children:[t.jsxs("div",{className:pe.buttonsLabel,children:[t.jsx("span",{className:pe.label,children:"Fee Tier"}),t.jsxs("div",{className:pe.switch,children:[t.jsx("span",{className:pe.label,children:"Remember my choice"}),t.jsx(Oa,{value:C,onChange:()=>y(T=>!T)})]})]}),t.jsx("div",{className:pe.buttons,children:Us.map(({label:T,rate:M})=>t.jsxs("button",{className:L(pe.button,{[pe.selected]:n!==void 0?q(o*M,(a==null?void 0:a.decimal)??8)===n:M===b}),onClick:()=>$(M),type:"button",children:[t.jsx("span",{className:pe.label,children:T}),c?t.jsx(H,{}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:pe.amount,children:[a&&q(M*o,a.decimal)," ",a==null?void 0:a.ticker]}),t.jsxs("span",{className:pe.amountUsd,children:["$",a&&q(M*o*a.price,2)]})]})]},M))}),s&&n!==void 0&&t.jsx(J,{name:"fee",value:n,label:`Fee ${a==null?void 0:a.ticker}`,error:l,onChange:T=>s(T.target.value),handleClear:()=>s(""),disabled:c})]})]})]}),!v&&l&&t.jsx("span",{className:pe.feeError,children:l})]})},ew=({maxFee:e,minFee:n})=>Ie().shape({fee:_s().required().min(n??0,"The fee is too low. The commission cannot be less than the external network commission.").max(e??1/0,"Insufficient balance to cover the fees")}),tw="_modalContent_1h2kp_1",nw="_table_1h2kp_7",rw="_tablelabel_1h2kp_14",sw="_softnotes_1h2kp_23",Qi={modalContent:tw,table:nw,tablelabel:rw,softnotes:sw},ow=e=>{const{onClose:n,isLoading:o,onEmit:s,hub:r,totalFillCost:a,currency:c,selectedCombination:l,currencyFillKey:d,emitError:u}=e,p=N=>{T4(N)&&y.setFieldValue("fee",N)},{data:m,isFetching:h}=Ae.useGetFeeQuery({key:d||""},{skip:!d,pollingInterval:cu*1e3}),f=m==null?void 0:m.payload.currencyFee,_=(m==null?void 0:m.payload.fee)??0,{balance:v}=xt(f==null?void 0:f.key),[g,C]=i.useState(!1),y=Me({initialValues:{fee:""},validationSchema:ew({minFee:_,maxFee:v==null?void 0:v.value}),validateOnChange:g,onSubmit:N=>{s(Number(Number(N.fee).toFixed((f==null?void 0:f.decimal)??8)))}}),b=()=>{C(!0),y.handleSubmit()},x=i.useMemo(()=>c?Object.entries(l).map(([N,S])=>({denomination:N,amount:S,type:r===Te.blue?Pe.blue:Pe.green,currency:c})):[],[c,r,l]);return t.jsxs(t.Fragment,{children:[t.jsxs(D.Body,{className:Qi.modalContent,children:[u&&t.jsx(V,{variant:"error",message:u,animated:!0}),t.jsx(lt,{data:[{label:"Bills",value:r===Te.blue?"Blue Stripe":"Green Stripe"},{label:"Currency",value:`${c==null?void 0:c.ticker} (${c==null?void 0:c.protocol})`},{label:"Total Current Fill Cost",value:`${q(a,(c==null?void 0:c.decimal)??8)} ${c==null?void 0:c.ticker}`}]}),t.jsx(Jk,{initialFee:_,feeCurrency:f,isLoading:h,value:y.values.fee,onChangeFee:p,error:y.errors.fee,withLowFeeAlert:(f==null?void 0:f.key)==="bitcoin-sha256-btc"}),t.jsxs("div",{className:Qi.softnotes,children:[t.jsx("div",{className:Qi.tablelabel,children:"SoftNote"}),t.jsx(fi,{softnotes:x,totalLabel:"This Denomination Fill Cost"})]})]}),t.jsxs(D.Footer,{children:[t.jsx(O,{onClick:n,variant:"secondary",children:"Cancel"}),t.jsx(O,{onClick:b,isLoading:o,children:"Fill"})]})]})},aw=e=>{const{isOpen:n,onClose:o,isLoading:s,onEmit:r,hub:a,totalFillCost:c,currency:l,selectedCombination:d,currencyFillKey:u,emitError:p}=e;return t.jsxs(D,{isOpen:n,onClose:o,children:[t.jsx(D.Header,{title:"Fill"}),t.jsx(ow,{onClose:o,isLoading:s,onEmit:r,hub:a,totalFillCost:c,currency:l,selectedCombination:d,currencyFillKey:u,emitError:p})]})},iw="_tabs_6kwjx_1",lw="_tab_6kwjx_1",cw="_active_6kwjx_34",dw="_disabled_6kwjx_53",Ys={tabs:iw,tab:lw,active:cw,disabled:dw},uw=e=>{const{activeTab:n,onChangeTab:o}=e;return t.jsxs("div",{className:Ys.tabs,children:[t.jsx("button",{type:"button",className:L(Ys.tab,{[Ys.active]:n===vt.user}),onClick:()=>o(vt.user),children:"My Bills"}),t.jsx("button",{type:"button",className:L(Ys.tab,{[Ys.active]:n===vt.pool}),onClick:()=>o(vt.pool),children:"Pool"})]})},pw="_row_mqjp1_1",mw="_info_mqjp1_14",hw="_title_mqjp1_22",fw="_subtitle_mqjp1_28",_w="_counter_mqjp1_34",gw="_btn_mqjp1_41",vw="_input_mqjp1_48",yw="_aside_mqjp1_55",bw="_asideLabel_mqjp1_65",xw="_asideValue_mqjp1_71",Wt={row:pw,info:mw,title:hw,subtitle:fw,counter:_w,bt
62n:gw,input:vw,aside:yw,asideLabel:bw,asideValue:xw},yc=({count:e=3})=>t.jsx(t.Fragment,{children:Array.from({length:e},(n,o)=>t.jsxs("div",{className:Wt.row,children:[t.jsxs("div",{className:Wt.info,children:[t.jsx(H,{className:Wt.title}),t.jsx(H,{className:Wt.subtitle})]}),t.jsxs("div",{className:Wt.counter,children:[t.jsx(H,{className:Wt.btn}),t.jsx(H,{className:Wt.input}),t.jsx(H,{className:Wt.btn})]}),t.jsxs("div",{className:Wt.aside,children:[t.jsx(H,{className:Wt.asideLabel}),t.jsx(H,{className:Wt.asideValue})]})]},o))}),Cw="_wrapper_10zs0_1",kw="_green_10zs0_11",ww="_amount_10zs0_15",jw="_amountSelected_10zs0_19",Sw="_blue_10zs0_24",Nw="_info_10zs0_37",Lw="_counter_10zs0_58",Ew="_disabled_10zs0_80",$w="_totalCost_10zs0_107",Tw="_forDesktop_10zs0_135",Mw="_forMobile_10zs0_139",$t={wrapper:Cw,green:kw,amount:ww,amountSelected:jw,blue:Sw,info:Nw,counter:Lw,disabled:Ew,totalCost:$w,forDesktop:Tw,forMobile:Mw},Dw=e=>{const{type:n,denomination:o,currency:s,currencyFillKey:r,onChangeAmount:a,availableAmount:c,amount:l,selectedCombination:d}=e,u=()=>{const b=l-1;b>=0&&a(b,o)},p=()=>{c!==l&&a(l+1,o)},m=b=>{const x=Number(b.target.value);_>=Number(o)*x&&x<=c&&g+x<=v&&a(x,o)},{balance:h}=xt(r),f=Object.entries(d).reduce((b,[x,N])=>{if(x===o)return b;const S=Number(x);return b+S*N},0),_=h?h.value-f:0,v=n===Pe.blue?au:iu,g=Object.entries(d).reduce((b,[x,N])=>x===o?b:b+N,0),C=_>=Number(o)*(l+1)&&c!==l&&g+l<v,y=()=>_<Number(o)*(l+1)?`Insufficient funds for ${h==null?void 0:h.currency.ticker}(${h==null?void 0:h.currency.protocol})`:c===l?"No more bills available":g+l>=v?"You have exceeded the maximum limit of bills allowed":"";return t.jsxs("div",{className:L($t.wrapper,{[$t.green]:n===Pe.green,[$t.blue]:n===Pe.blue}),children:[t.jsxs("div",{className:$t.info,children:[t.jsxs("span",{children:[q(Number(o),s.decimal)," ",s.ticker]}),t.jsxs("p",{className:$t.forDesktop,children:[c," Bill(s)"]}),t.jsxs("p",{className:$t.forMobile,children:["Cost:"," ",q(Number(o)*l,s.decimal)," ",s.ticker]})]}),t.jsxs("div",{className:$t.counter,children:[t.jsx("button",{onClick:u,className:L({[$t.disabled]:l===0}),children:"-"}),t.jsx("input",{value:l||"",placeholder:"0",onChange:m,className:L($t.amount,{[$t.amountSelected]:l>0})}),C?t.jsx("button",{onClick:p,children:"+"}):t.jsx(Ar,{value:y(),pointerPosition:"bottom-right",children:t.jsx("button",{className:$t.disabled,disabled:!0,children:"+"})})]}),t.jsxs("div",{className:$t.totalCost,children:[t.jsx("span",{children:"This Denomination Fill Cost"}),t.jsxs("p",{children:[q(Number(o)*l,s.decimal)," ",s.ticker]})]})]})},Pw="_wrapper_12me6_1",Iw="_clear_12me6_9",Bw="_disabled_12me6_20",Rw="_list_12me6_30",Aw="_alert_12me6_42",mr={wrapper:Pw,clear:Iw,disabled:Bw,list:Rw,alert:Aw},Ow=e=>{const{currency:n,stacks:o,onChangeBillAmount:s,selectedCombination:r,onClearSelectedBills:a,isLoading:c,disabled:l,emitPoolError:d,currencyFillKey:u}=e;return t.jsx("div",{className:L(mr.wrapper,{[mr.disabled]:l}),children:d?t.jsx(V,{variant:"error",message:d,className:mr.alert,animated:!0}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:L(mr.clear,{[mr.disabled]:!Object.keys(r).length}),onClick:a,children:"Clear"}),c&&t.jsx("div",{className:mr.list,children:t.jsx(yc,{})}),o&&n&&u&&!c&&o.map(p=>t.jsx(i.Fragment,{children:t.jsx("div",{className:mr.list,children:Object.entries(p.stack).map(m=>t.jsx(Dw,{type:p.type,currency:n,currencyFillKey:u,denomination:m[0],availableAmount:m[1],onChangeAmount:s,amount:r[m[0]]??0,selectedCombination:r},m[0]))})},p.type))]})})},Fw=e=>{const{disabled:n,currency:o,poolStacks:s,selectedCombination:r,isLoading:a,setSelectedBills:c,clearSelected:l,emitPoolError:d,currencyFillKey:u}=e,p=(h,f)=>{n||c(f,h)},m=()=>{l()};return i.useEffect(()=>()=>l(),[l]),t.jsx(Ow,{currency:o,currencyFillKey:u,stacks:s,onChangeBillAmount:p,selectedCombination:r,onClearSelectedBills:m,isLoading:a,disabled:n,emitPoolError:d})},qw="_wrapper_1id8j_1",Ww="_container_1id8j_9",Vw="_green_1id8j_17",Hw="_amount_1id8j_21",Uw="_amountSelected_1id8j_25",Yw="_buttonListActive_1id8j_29",Kw="_blue_1id8j_34",Gw="_info_1id8j_51",zw="_counter_1id8j_72",Zw="_disabledEl_1id8j_94",Qw="_totalCost_1id8j_121",Xw="_buttonList_1id8j_29",Jw="_listCollapse_1id8j_175",ej="_listCollapseOpen_1id8j_182",tj="_listCollapseInner_1id8j_187",nj="_list_1id8j_175",rj="_listContainer_1id8j_208",sj="_listItem_1id8j_232",oj="_serialNumber_1id8j_250",aj="_actionBtn_1id8j_259",ij="_heightAuto_1id8j_285",lj="_disabled_1id8j_94",cj="_checkbox_1id8j_305",dj="_skeleton_1id8j_324",ye={wrapper:qw,container:Ww,green:Vw,amount:Hw,amountSelected:Uw,buttonListActive:Yw,blue:Kw,info:Gw,counter:zw,disabledEl:Zw,totalCost:Qw,buttonList:Xw,listCollapse:Jw,listCollapseOpen:ej,listCollapseInner:tj,list:nj,listContainer:rj,listItem:sj,seri
62alNumber:oj,actionBtn:aj,heightAuto:ij,disabled:lj,checkbox:cj,skeleton:dj},uj=e=>{const{type:n,denomination:o,currency:s,currencyFillKey:r,availableAmount:a,denominationSelectedIds:c,onClickDelete:l,onClickAdd:d,addSelectedSoftnotesList:u,selectedCombination:p,amount:m,handleChangeBillAmount:h,disabled:f}=e,[_,v]=i.useState(!1),[g,C]=i.useState(0),y=Bt(ks),[b,{data:x,isFetching:N}]=St.useLazyGetUserSoftNotesQuery(),S=i.useMemo(()=>(x==null?void 0:x.payload)??[],[x==null?void 0:x.payload]),j=()=>{b({currencyKey:s.key,nominal:o,limit:Bs,offset:g}),C(U=>U+Bs)},$=()=>{!_&&!x&&(b({currencyKey:s.key,nominal:o,limit:Bs,offset:g}),C(Bs)),v(U=>!U)},T=(U,F)=>{c.includes(U)?(l(U,F),h(F,m-1)):(d(U,F),h(F,m+1))},M=()=>{const U=m-1;U>=0&&(h(o,U),I(U))},P=()=>{const U=m+1;a>=U&&(h(o,U),I(U))},B=U=>{const F=Number(U.target.value);z>=Number(o)*F&&F<=a&&K+F<=G&&(h(o,F),I(F))},I=i.useMemo(()=>F2(async U=>{if(U>0){v(!0);const F=Math.max(Bs,U),Y=(await b({currencyKey:s.key,nominal:o,limit:F,offset:0}).unwrap()).payload??[];u(Y.slice(0,U).map(({id:X})=>X),o),C(F)}else u([],o)},500),[u,s.key,o,b]),{balance:A}=xt(r),W=Object.entries(p).reduce((U,[F,R])=>{if(F===o)return U;const Y=Number(F);return U+Y*R},0),z=A?A.value-W:0,G=n===Pe.blue?au:iu,K=Object.entries(p).reduce((U,[F,R])=>F===o?U:U+R,0),ee=z>=Number(o)*(m+1)&&a!==m&&K+m<G,ie=()=>z<Number(o)*(m+1)?`Insufficient funds for ${A==null?void 0:A.currency.ticker}(${A==null?void 0:A.currency.protocol})`:a===m?"No more bills available":K+m>=G?"You have exceeded the maximum limit of bills allowed":"";return t.jsxs("div",{className:L(ye.wrapper,{[ye.green]:n===Pe.green,[ye.blue]:n===Pe.blue}),children:[t.jsxs("div",{className:L(ye.container,{[ye.disabled]:f}),children:[t.jsxs("div",{className:ye.info,children:[t.jsxs("span",{children:[q(Number(o),s.decimal)," ",s.ticker]}),t.jsxs("p",{children:[a," Bill(s)"]})]}),t.jsxs("div",{className:ye.counter,children:[t.jsx("button",{onClick:M,className:L({[ye.disabledEl]:m===0}),children:"-"}),t.jsx("input",{value:m||"",placeholder:"0",disabled:!ee&&m===0,onChange:B,className:L(ye.amount,{[ye.amountSelected]:m>0})}),ee?t.jsx("button",{onClick:P,children:"+"}):t.jsx(Ar,{value:ie(),pointerPosition:"bottom-right",children:t.jsx("button",{className:ye.disabledEl,disabled:!0,children:"+"})})]}),!y&&t.jsxs("div",{className:ye.totalCost,children:[t.jsx("span",{children:"This Denomination Fill Cost"}),t.jsxs("p",{children:[q(Number(o)*m,s.decimal)," ",s.ticker]})]}),t.jsx("button",{onClick:$,className:L(ye.buttonList,{[ye.buttonListActive]:_}),children:t.jsx(nr,{})})]}),t.jsx("div",{className:L(ye.listCollapse,{[ye.listCollapseOpen]:_}),children:t.jsx("div",{className:ye.listCollapseInner,children:t.jsx("div",{className:ye.list,children:t.jsx("div",{className:L(ye.listContainer,{[ye.heightAuto]:S.length<6}),children:t.jsx(xs,{hasMore:S.length<a,loader:t.jsx(H,{count:3,className:ye.skeleton}),loadMore:j,isLoading:N,children:S.map(U=>t.jsxs("div",{className:L(ye.listItem,{[ye.disabled]:!ee&&!c.includes(U.id)||f}),children:[t.jsx(ci,{onClick:()=>T(U.id,o),checked:c.includes(U.id),className:ye.checkbox}),t.jsx("span",{className:ye.serialNumber,children:U.serial}),t.jsx(it,{value:U.serial,className:ye.actionBtn})]},U.id))})})})})})]})},pj="_wrapper_zgljf_1",mj="_clear_zgljf_9",hj="_disabled_zgljf_20",fj="_empty_zgljf_30",_j="_list_zgljf_37",gj="_alert_zgljf_49",hr={wrapper:pj,clear:mj,disabled:hj,empty:fj,list:_j,alert:gj},vj=e=>{const{stacks:n,currency:o,onClickClear:s,isLoading:r,addSelectedSoftnotesList:a,onClickRemoveSoftnote:c,onClickAddSoftnote:l,disabled:d,selectedCombination:u,selectedIds:p,emitUserError:m,handleChangeBillAmount:h,currencyFillKey:f}=e,_=n?Array.isArray(n)?n:[n]:void 0,v=!r&&_&&_.every(C=>Object.keys(C.stack).length===0),g=()=>m?t.jsx(V,{variant:"error",message:m,className:hr.alert,animated:!0}):t.jsxs(t.Fragment,{children:[v?t.jsx("p",{className:hr.empty,children:"You don't have bills to fill, you can mint them in the âMintâ section"}):t.jsx("button",{className:L(hr.clear,{[hr.disabled]:d||!Object.keys(u).length}),onClick:s,children:"Clear"}),r&&t.jsx("div",{className:hr.list,children:t.jsx(yc,{})}),!v&&_&&o&&f&&!r&&_.map(C=>t.jsx("div",{className:hr.list,children:Object.entries(C.stack).map(([y,b])=>t.jsx(uj,{type:C.type,currency:o,currencyFillKey:f,denomination:y,availableAmou
62nt:b,selectedCombination:u,denominationSelectedIds:p[y]??[],onClickDelete:c,onClickAdd:l,addSelectedSoftnotesList:a,amount:u[y]??0,handleChangeBillAmount:h,disabled:d},y))},C.type))]});return t.jsx("div",{className:hr.wrapper,children:g()})},yj=e=>{const{disabled:n,selectedCombination:o,selectedIds:s,addSelectedSoftnotesList:r,addSelectedSoftnotes:a,removeSelectedSoftnote:c,clearSelected:l,userStacks:d,currency:u,isLoading:p,emitUserError:m,setSelectedBills:h,currencyFillKey:f}=e,_=(y,b)=>{n||c(y,b)},v=(y,b)=>{n||a(y,b)},g=(y,b)=>{n||h(y,b)},C=()=>{l()};return i.useEffect(()=>()=>l(),[l]),t.jsx(vj,{currency:u,currencyFillKey:f,stacks:d,selectedCombination:o,selectedIds:s,onClickClear:C,isLoading:p,onClickRemoveSoftnote:_,onClickAddSoftnote:v,addSelectedSoftnotesList:r,disabled:n,emitUserError:m,handleChangeBillAmount:g})},bj="_wrapper_8838i_1",xj="_spinner_8838i_15",Cj="_spin_8838i_15",kj="_content_8838i_27",wj="_subtitle_8838i_35",jj="_data_8838i_43",Sj="_amount_8838i_50",Nj="_blue_8838i_59",Lj="_green_8838i_66",fr={wrapper:bj,spinner:xj,spin:Cj,content:kj,subtitle:wj,data:jj,amount:Sj,blue:Nj,green:Lj},Ej={Minting:"Minting SoftNotes",Filling:"Filling SoftNotes",Burning:"Burning SoftNotes"},bc=(e,n,o,s)=>{const r=typeof e=="number"&&!Number.isNaN(e)?e:0,a=typeof n=="number"&&!Number.isNaN(n)?n:8,c=typeof o=="string"&&o.trim()?o.trim().toUpperCase():"â",l=typeof s=="number"&&!Number.isNaN(s)?s:0;return`${q(r,a)} ${c} / ${l} Bills`},xc=e=>e===Te.green?"Green Stripe Bills":"Blue Stripe Bills",tp=({type:e,amount:n,decimal:o,amountCurrency:s,count:r,hub:a=Te.blue})=>t.jsxs("div",{className:fr.wrapper,children:[t.jsx("span",{className:fr.spinner,"aria-hidden":!0}),t.jsxs("div",{className:fr.content,children:[t.jsx("h6",{className:fr.subtitle,children:Ej[e]}),t.jsxs("div",{className:fr.data,children:[t.jsx("span",{className:fr[a],children:xc(a)}),t.jsx("span",{className:fr.amount,children:bc(n,o,s,r)})]})]})]}),Cc=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15 9L9 15",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9 9L15 15",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$j="_wrapper_11vum_1",Tj="_icon_11vum_15",Mj="_content_11vum_23",Dj="_subtitle_11vum_31",Pj="_data_11vum_39",Ij="_hub_11vum_46",Bj="_amount_11vum_53",_r={wrapper:$j,icon:Tj,content:Mj,subtitle:Dj,data:Pj,hub:Ij,amount:Bj},Rj={Minting:"Minting error",Filling:"Filling error",Burning:"Burning error"},np=e=>{const{type:n,amount:o,decimal:s,amountCurrency:r,count:a,hub:c=Te.blue}=e;return t.jsxs("div",{className:_r.wrapper,children:[t.jsx(Cc,{className:_r.icon}),t.jsxs("div",{className:_r.content,children:[t.jsx("h6",{className:_r.subtitle,children:Rj[n]}),t.jsxs("div",{className:_r.data,children:[t.jsx("span",{className:_r.hub,children:xc(c)}),t.jsx("span",{className:_r.amount,children:bc(o,s,r,a)})]})]})]})},Aj=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M17.0089 7.74023H15.7526C15.4794 7.74023 15.2196 7.87148 15.0588 8.09648L10.8481 13.9358L8.94099 11.2893C8.78028 11.067 8.52314 10.9331 8.24724 10.9331H6.99099C6.81688 10.9331 6.7151 11.1313 6.81688 11.2733L10.1544 15.9018C10.2332 16.0119 10.3372 16.1016 10.4576 16.1634C10.578 16.2253 10.7114 16.2575 10.8468 16.2575C10.9822 16.2575 11.1156 16.2253 11.236 16.1634C11.3564 16.1016 11.4604 16.0119 11.5392 15.9018L17.1803 8.08041C17.2847 7.93845 17.183 7.74023 17.0089 7.74023Z",fill:"currentColor"}),i.createElement("path",{d:"M12 0C5.37321 0 0 5.37321 0 12C0 18.6268 5.37321 24 12 24C18.6268 24 24 18.6268 24 12C24 5.37321 18.6268 0 12 0ZM12 21.9643C6.49821 21.9643 2.03571 17.5018 2.03571 12C2.03571 6.49821 6.49821 2.03571 12 2.03571C17.5018 2.03571 21.9643 6.49821 21.9643 12C21.9643 17.5018 17.5018 21.9643 12 21.9643Z",fill:"currentColor"})),Oj="_wrapper_eq6p8_1",Fj="_icon_eq6p8_15",qj="_content_eq6p8_23",Wj="_subtitle_eq6p8_31",Vj="_data_eq6p8_39",Hj="_hub_eq6p8_46",Uj="_amount_eq6p8_53",gr={wrapper:Oj,icon:Fj,content:qj,subtitle:Wj,data:Vj,hub:Hj,amount:Uj},Yj={Minting:"SoftNote(s) have been minted",Filling:"SoftNote(s) have been filled",Burning:"SoftNote(s) have been burned"},rp=e=>
62{const{type:n,amount:o,decimal:s,amountCurrency:r,count:a,hub:c=Te.blue}=e;return t.jsxs("div",{className:gr.wrapper,children:[t.jsx(Aj,{className:gr.icon}),t.jsxs("div",{className:gr.content,children:[t.jsx("h6",{className:gr.subtitle,children:Yj[n]}),t.jsxs("div",{className:gr.data,children:[t.jsx("span",{className:gr.hub,children:xc(c)}),t.jsx("span",{className:gr.amount,children:bc(o,s,r,a)})]})]})]})},Kj=({lastFill:e,hub:n})=>{if(!e)return null;const o={amountCurrency:e.currency,count:e.count_bills,amount:e.amount_bills,decimal:e.decimal,type:"Filling",hub:n};switch(e.status){case mt.processing:return t.jsx(tp,{...o});case mt.success:return t.jsx(rp,{...o});case mt.error:return t.jsx(np,{...o});default:return null}},Gj=e=>{var Ne,Le;const{currencyKey:n,hub:o}=e,s=En(),[r,a]=i.useState(vt.user),[c,l]=i.useState(),[d,u]=i.useState(!1),{data:p,isFetching:m,error:h}=St.useGetUserStackQuery({currencyKey:n},{skip:r!==vt.user}),{data:f,isFetching:_,error:v}=St.useGetPoolStackQuery({currencyKey:n},{skip:r!==vt.pool}),g=i.useCallback(Be=>{l(Be)},[]),C=m||_,y=(Ne=p||f)==null?void 0:Ne.payload.currency,b=(Le=p||f)==null?void 0:Le.payload.currenciesFill,x=i.useMemo(()=>(b==null?void 0:b.map(Be=>({value:Be.key,label:`${Be.ticker} (${Be.protocol})`})))??[],[b]);i.useEffect(()=>{if(!x.length){l(void 0);return}x.find(Pn=>Pn.value===c)||l(x[0].value)},[x,c,l]);const{balance:N,isFetching:S}=xt(c),{selectedIds:j,selectedCombination:$,setSelectedBills:T,addSelectedSoftnotesList:M,addSelectedSoftnotes:P,removeSelectedSoftnote:B,clearSelected:I,totalFillCost:A}=ZC(),{lastRequest:W,refetchState:z}=_i({currencyKey:n,operationType:Mr.filling}),[G,{data:K,isLoading:ee,error:ie,reset:U}]=St.useFillMutation(),F=i.useCallback(Be=>{G({fee:Be,currencyFill:c??"",currencyKey:n,...r===vt.user?{ids:Object.values(j).flat()}:{combination:$}}),Ze({event:"fill_attempt",currency:Nt(y),summary:rr($),fillmethod:h1(r),hub:o})},[c,n,G,$,j,r,y,o]);i.useEffect(()=>{(W==null?void 0:W.status)===mt.success&&Ze({event:"fill_success",currency:Nt(y),summary:rr($)||tu(W),fillmethod:h1(r),hub:o})},[y,o,W,$,r]),i.useEffect(()=>{if(!K)return;K.payload.requestId&&(Y(),I(),z(),r===vt.user&&s(St.util.invalidateTags([{type:"EmitUserStack",id:n}])),r===vt.pool&&s(St.util.invalidateTags([{type:"EmitPoolStack",id:n}])))},[n,s,K,r,I,z]),i.useEffect(()=>{I()},[c,I]);const R=()=>{U(),u(!0)},Y=()=>u(!1),X=(W==null?void 0:W.status)===mt.processing;return t.jsxs(t.Fragment,{children:[t.jsx(V,{variant:"warning",message:$o}),t.jsx(V,{variant:"info",message:"Process of filling the minted SoftNote with liquidity. Filled bills are stored in SoftNote bills."}),t.jsx(Kj,{lastFill:W,hub:o}),o===Te.green&&t.jsx($k,{options:x,selectedCurrencyKey:c,balance:N,isBalanceLoading:S,isCurrencyLoading:C,handleCurrencyKeyChange:g,disabled:X}),t.jsx(uw,{activeTab:r,onChangeTab:a}),r===vt.user?t.jsx(yj,{disabled:X,currency:y,currencyFillKey:c,isLoading:C,addSelectedSoftnotesList:M,addSelectedSoftnotes:P,removeSelectedSoftnote:B,clearSelected:I,selectedCombination:$,selectedIds:j,userStacks:p==null?void 0:p.payload.data,emitUserError:Q(h),setSelectedBills:T}):t.jsx(Fw,{disabled:X,clearSelected:I,currency:y,currencyFillKey:c,isLoading:C,poolStacks:f==null?void 0:f.payload.data,selectedCombination:$,setSelectedBills:T,emitPoolError:Q(v)}),t.jsx(gk,{onNextClick:R,currency:y,currencyFillKey:c,totalFillCost:A}),t.jsx(aw,{isOpen:d,onClose:Y,isLoading:ee,onEmit:F,hub:o,totalFillCost:A,currency:y,selectedCombination:$,currencyFillKey:c,emitError:Q(ie)})]})};function zj(e){const{data:n,isFetching:o,error:s}=St.useGetMintDataQuery({currencyKey:e}),r=n==null?void 0:n.payload.bills,a=n==null?void 0:n.payload.currency,[c,l]=i.useState({}),d=i.useCallback((f,_)=>{l(v=>{const g={...v};return g[f]=_,g[f]<=0&&delete g[f],g})},[]),u=i.useCallback(()=>{l({})},[]),p=i.useMemo(()=>r?Object.entries(c).reduce((f,[_,v])=>{const g=r[_];return f+g*v},0):0,[r,c]),m=i.useMemo(()=>Object.values(c).reduce((f,_)=>f+_,0),[c]),h=i.useMemo(()=>Object.entries(c).reduce((f,[_,v])=>f+Number(_)*v,0),[c]);return{bills:r,currency:a,isFetching:o,error:s,selectedBills:c,setSelectedBillsCount:d,clearSelectedBills:u,totalMintCost:p,billsCount:m,billsAmount:h}}const Zj="_modalContent_7bode_1",Qj="_tablelabel_7bode_7",Xj="_softnotes_7bode_16",Xi={modalContent:Zj,tablelabel:Qj,softnotes:Xj},Jj=e=>{const{isOpen:n,onClose:o,hub:s,onMint:r,isMinting:a,mintError:c,totalMintCost:l,billsAmount:d,bills:u,currency:p,selectedBills:m}=e,h=i.useMemo(()=>p?Object.entries(m).map(([f,_])=>({denomination:f,amount:_,type:s===Te.blue?Pe.blue:Pe.green,currency:p})):[],[p,s,m]);return t.jsxs(D,{isOpen:n,onClose:o,children:[t.jsx(D.Header,{title:"Mint"}),t.jsxs(D.Body,{className:Xi.modalContent,children:[c&&t.jsx(V,{variant:"error",message:c,animated:!0}),t.jsx(lt,{data:[{label:"Bills",value:s===Te.blue?"Blue Stripe":"Green Stripe"},{label:"Currency",value:`${p==null?void 0:p.ticker} (${p==null?void 0:p.protocol})`},{label:"Potential Liquidity",value:`${q(d,(p==null?void 0:p.decimal)??8)} ${p==null?void 0:p.ticker}`},{label:"Minting Cost",value:`${q(l,8)} TET`}]}),t.jsxs("div",{className:Xi.softnotes,children:[t.jsx("div",{className:Xi.tablelabel,children:"SoftNote"}),u&&t.jsx(fi,{softnotes:h,totalLabel:"Cost to Mint in TET",calcTotal:f=>q(u[f.denomination]*f.amount,8),totalTicker:"TET"})]})]}),t.jsxs(D.Footer,{children:[t.jsx(O,{onClick:o,variant:"secondary",children:"Cancel"}),t.jsx(O,{onClick:r,isLoading:a,children:"Mint"})]})]})},eS="_info_1l17k_1",tS="_totalLabel_1l17k_9",nS="_amount_1l17k_18",rS="_bills_1l17k_26",sS="_blue_1l17k_32",oS="_green_1l17k_35",aS="_cost_1l17k_39",vr={info:eS,totalLabel:tS,amount:nS,bills:rS,blue:sS,green:oS,cost:aS},iS=e=>{const{openModal:n,hub:o,totalMintCost:s,billsAmount:r,billsCount:a,currency:c}=e;if(!s)return null;const l=a===1?"Bill":"Bills";return t.jsxs("div",{className:We.bottom,children:[t.jsxs("div",{className:vr.info,children:[t.jsx("span",{className:vr.totalLabel,children:"Total"}),t.jsxs("span",{className:vr.amount,children:[q(r,(c==null?void 0:c.decimal)??8)," ",c==null?void 0:c.ticker]}),t.jsxs("span",{className:L(vr.bills,{[vr.green]:o===Te.green,[vr.blue]:o===Te.blue}),children:[a," ",l]}),t.jsxs("span",{className:vr.cost,children:["Minting cost: ",s.toFixed(8)," TET"]}
62)]}),t.jsx(O,{onClick:n,children:"Next"})]})},lS="_wrapper_3j94h_1",cS="_green_3j94h_11",dS="_amount_3j94h_15",uS="_amountSelected_3j94h_19",pS="_blue_3j94h_24",mS="_info_3j94h_37",hS="_counter_3j94h_58",fS="_disabled_3j94h_80",_S="_totalCost_3j94h_104",tn={wrapper:lS,green:cS,amount:dS,amountSelected:uS,blue:pS,info:mS,counter:hS,disabled:fS,totalCost:_S},gS=e=>{const{color:n,denomination:o,currencyTicker:s,onChangeAmount:r,tetCost:a,amount:c,decimal:l,selectedBills:d,bills:u}=e,p=u?Object.entries(d).reduce((x,[N,S])=>{if(N===o)return x;const j=u[N];return x+j*S},0):0,{balance:m}=xt("tectum-t12-tet"),h=m?m.value-p:0,f=()=>{if(c>0){let x=c-1;x<0&&(x=0),x!==c&&r(x,o)}},_=()=>{const x=c+1;h-a*x>=0&&r(x,o)},v=x=>{const N=Number(x.target.value);h-a*N>=0&&C+N<=g&&r(N,o)},g=n===Te.blue?t8:n8,C=Object.entries(d).reduce((x,[N,S])=>N===o?x:x+S,0),y=h-a*(c+1)>=0&&C+c<g,b=()=>h-a*(c+1)<0?"Insufficient funds for TET(T12)":C+c>=g?"You have exceeded the maximum limit of bills allowed":"";return t.jsxs("div",{className:L(tn.wrapper,{[tn.green]:n===Te.green,[tn.blue]:n===Te.blue}),children:[t.jsxs("div",{className:tn.info,children:[t.jsxs("span",{children:[q(Number(o),l)," ",s]}),t.jsxs("p",{children:["Cost: ",a.toFixed(8)," TET (T12)"]})]}),t.jsxs("div",{className:tn.counter,children:[t.jsx("button",{onClick:f,className:L({[tn.disabled]:c===0}),children:"-"}),t.jsx("input",{value:c||"",placeholder:"0",disabled:!y&&c===0,onChange:v,className:L(tn.amount,{[tn.amountSelected]:c>0})}),y?t.jsx("button",{onClick:_,children:"+"}):t.jsx(Ar,{value:b(),pointerPosition:"bottom-right",children:t.jsx("button",{disabled:!0,className:tn.disabled,children:"+"})})]}),t.jsxs("div",{className:tn.totalCost,children:[t.jsx("span",{children:"Cost to Mint in TET"}),t.jsxs("p",{children:[(Number(a)*c).toFixed(8)," TET"]})]})]})},vS="_wrapper_29die_1",yS="_clear_29die_9",bS="_disabled_29die_20",xS="_subtitle_29die_30",CS="_green_29die_36",kS="_blue_29die_39",wS="_list_29die_43",jS="_maxPackages_29die_50",Ks={wrapper:vS,clear:yS,disabled:bS,subtitle:xS,green:CS,blue:kS,list:wS,maxPackages:jS},SS=e=>{const{disabled:n,color:o,isLoadingMintData:s,mintDataError:r,selectedBills:a,bills:c,currency:l,setSelectedBillsCount:d,clearSelectedBills:u}=e,p=(f,_)=>{n||d(_,f)},m=Object.keys(a).length>0,h=()=>!l||!c?null:Object.entries(c).sort(([f],[_])=>Number(f)-Number(_)).map(([f,_])=>t.jsx(gS,{color:o,currencyTicker:l.ticker,decimal:l.decimal,denomination:f,tetCost:_,amount:a[f]??0,onChangeAmount:p,bills:c,selectedBills:a},f));return t.jsx("div",{className:L(Ks.wrapper,{[Ks.disabled]:n}),children:r?t.jsx(V,{variant:"error",message:r,animated:!0}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:L(Ks.clear,{[Ks.disabled]:!m}),disabled:!m||n,onClick:u,children:"Clear"}),t.jsx("div",{className:Ks.list,children:s?t.jsx(yc,{}):h()})]})})},NS=e=>{const{hub:n,openModal:o,lastMint:s,totalMintCost:r,billsAmount:a,billsCount:c,currency:l,isLoadingMintData:d,mintDataError:u,bills:p,selectedBills:m,setSelectedBillsCount:h,clearSelectedBills:f}=e,_=(s==null?void 0:s.status)===mt.processing;return t.jsxs(t.Fragment,{children:[(s==null?void 0:s.status)===mt.processing&&t.jsx(tp,{amountCurrency:s.currency,count:s.count_bills,amount:s.amount_bills,decimal:s.decimal,type:"Minting",hub:n}),(s==null?void 0:s.status)===mt.success&&t.jsx(rp,{amountCurrency:s.currency,count:s.count_bills,amount:s.amount_bills,decimal:s.decimal,type:"Minting",hub:n}),(s==null?void 0:s.status)===mt.error&&t.jsx(np,{amountCurrency:s.currency,count:s.count_bills,amount:s.amount_bills,decimal:s.decimal,type:"Minting",hub:n}),t.jsx(SS,{disabled:_,color:n,bills:p,currency:l,isLoadingMintData:d,mintDataError:u,selectedBills:m,setSelectedBillsCount:h,clearSelectedBills:f}),t.jsx(iS,{openModal:o,hub:n,totalMintCost:r,billsAmount:a,billsCount:c,currency:l})]})},LS=e=>{const{selectedCurrencyKey:n,hub:o}=e,{balance:s,isFetching:r,updateBalance:a}=xt("tectum-t12-tet"),[c,l]=i.useState(!1),d=()=>{_(),l(!0)},u=()=>l(!1),[p,{data:m,isLoading:h,error:f,reset:_}]=St.useMintMutation(),{bills:v,currency:g,isFetching:C,error:y,selectedBills:b,setSelectedBillsCount:x,clearSelectedBills:N,totalMintCost:S,billsCount:j,billsAmount:$}=zj(n),{lastRequest:T,refetchState:M}=_i({currencyKey:n,operationType:Mr.minting}),P=async()=>{p({key:n,bills:b}),Ze({event:"mint_attempt",currency:Nt(g),summary:rr(b),hub:o})};return i.useEffect(()=>{(T==null?void 0:T.status)===mt.success&&Ze({event:"mint_success",currency:Nt(g),summary:rr(b)||tu(T),hub:o})},[g,o,T,b]),i.useEffect(()=>{if(!m)return;m.payload.request&&(N(),u(),a(),M())},[N,m,M,a]),t.jsxs(t.Fragment,{children:[t.jsx(V,{variant:"warning",message:$o}),t.jsx(V,{variant:"info",message:"Minting is the event of creating (emitting) a SoftNote entity as a Crypto wallet and digital database entry."}),t.jsx("div",{className:We.balance,children:r||s===void 0?t.jsxs(t.Fragment,{children:[t.jsx(H,{className:We.balanceSkeletonIcon}),t.jsxs("div",{className:We.balanceMeta,children:[t.jsx(H,{className:We.balanceSkeletonLabel}),t.jsx(H,{className:We.balanceSkeletonValue})]})]}
62):t.jsxs(t.Fragment,{children:[t.jsx(pn,{currencyKey:"tectum-t12-tet"}),t.jsxs("div",{className:We.balanceMeta,children:[t.jsxs("span",{className:We.balanceLabel,children:[s.currency.ticker," balance"]}),t.jsxs("span",{className:We.balanceValue,children:[q(s.value,s.currency.decimal)," ",s.currency.ticker]})]})]})}),t.jsx(NS,{hub:o,openModal:d,lastMint:T,totalMintCost:S,billsAmount:$,billsCount:j,currency:g,bills:v,isLoadingMintData:C,mintDataError:Q(y),selectedBills:b,setSelectedBillsCount:x,clearSelectedBills:N}),t.jsx(Jj,{isOpen:c,onClose:u,hub:o,onMint:P,isMinting:h,mintError:Q(f),totalMintCost:S,billsAmount:$,bills:v,currency:g,selectedBills:b})]})},sp=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M12 2C6.86851 2 3 3.88543 3 6.38456C3 8.88373 6.86855 10.7692 12 10.7692C17.1314 10.7692 21 8.88373 21 6.38456C21 3.88543 17.1315 2 12 2Z",fill:"currentColor"}),i.createElement("path",{d:"M12 12.1538C8.33909 12.1538 5.34731 11.3341 3.53091 9.9784C3.32053 9.82138 3 9.96482 3 10.2273V11.7801C3 14.1478 6.86855 15.934 12 15.934C17.1314 15.934 21 14.1478 21 11.7801V10.2274C21 9.96487 20.6795 9.82143 20.4691 9.97845C18.6527 11.3341 15.6609 12.1538 12 12.1538Z",fill:"currentColor"}),i.createElement("path",{d:"M12 17.4284C8.33909 17.4284 5.34731 16.6087 3.53091 15.2531C3.32053 15.096 3 15.2395 3 15.502V17.0548C3 19.4225 6.86851 21.2087 12 21.2087C17.1315 21.2087 21 19.4225 21 17.0548V15.502C21 15.2395 20.6795 15.0961 20.4691 15.2531C18.6527 16.6088 15.6609 17.4284 12 17.4284Z",fill:"currentColor"})),ES=e=>{const{hub:n}=e;return t.jsxs("div",{className:We.tabs,children:[t.jsxs(Er,{className:({isActive:o})=>L(We.tab,{[We.selected]:o}),to:`/mint-house/${n}/${Zn.mint}`,children:[t.jsx(sp,{}),t.jsx("span",{children:"Mint"})]}),t.jsxs(Er,{className:({isActive:o})=>L(We.tab,{[We.selected]:o}),to:`/mint-house/${n}/${Zn.fill}`,children:[t.jsx(gu,{}),t.jsx("span",{children:"Fill"})]})]})},$S=e=>{const{selectedCurrencyKey:n,hub:o}=e,{operation:s}=jo();if(s&&!(s in Zn))throw new Error("404");return t.jsxs(ze,{className:We.wrapper,children:[t.jsx("h2",{className:We.sectionTitle,children:"Choose an action"}),t.jsx(ES,{hub:o}),t.jsx("div",{className:We.content,children:t.jsxs(i.Suspense,{fallback:null,children:[s===Zn.mint&&n&&t.jsx(LS,{selectedCurrencyKey:n,hub:o},n),s===Zn.fill&&n&&t.jsx(Gj,{currencyKey:n,hub:o},n)]})})]})},TS="_wrapper_qbtzv_1",MS={wrapper:TS},DS=e=>{const{isCurrenciesLoading:n,currencies:o,currenciesError:s,balance:r,isBalanceLoading:a,selectedCurrencyKey:c,onCurrencyClick:l,hub:d}=e;return t.jsxs("div",{className:MS.wrapper,children:[t.jsx(js,{title:"Mint House",subtitle:"Create SoftNotes or fill existing bills with liquidity.",children:t.jsx(zC,{})}),t.jsx(GC,{isCurrenciesLoading:n,currencies:o,currenciesError:s,balance:r,isBalanceLoading:a,selectedCurrencyKey:c,onCurrencyClick:l,hub:d}),t.jsx($S,{selectedCurrencyKey:c,hub:d})]})},PS=()=>{const{hub:e}=jo();if(e&&!(e in Te))throw new Error("404");const{currencies:n,isFetching:o,error:s}=hi({color:e===Te.green?Pe.green:Pe.blue}),[r,a]=i.useState("");i.useEffect(()=>{if(!n.length)return;const u=n.find(p=>p.softNoteStatus>=mn.enabled);a((u==null?void 0:u.key)??"")},[n]);const{balance:c,isFetching:l}=xt(r),d=u=>{const p=n.find(m=>m.key===u);p&&(p==null?void 0:p.softNoteStatus)>=mn.enabled&&a(u)};return t.jsx(DS,{isCurrenciesLoading:o,currencies:n,currenciesError:Q(s),balance:c,isBalanceLoading:l,selectedCurrencyKey:r,onCurrencyClick:d,hub:e??Te.blue})},Z1=jn.injectEndpoints({endpoints:e=>({requestCode:e.query({query:()=>({url:"/v1/user/password/update",method:"GET"})}),changePassword:e.query({query:n=>({url:"/v1/user/password/update",method:"POST",body:n})})})});function op(){const e=En(),[n]=bt.useLazyLogoutQuery();return{logout:i.useCallback(async()=>{try{await n().unwrap()}finally{Od(),se.remove(re.passwordCodeSentTime),se.remove(re.twoFACodeSentTime),e(_o.setAuth(!1)),e(jn.util.resetApiState()),e(us.util.resetApiState()),e(wn.util.resetApiState())}},[n,e])}}const ap=e=>i.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M13.3346 4.3335L6.0013 11.6668L2.66797 8.3335",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),IS=e=>i.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})),BS="_validationItem_9sf4w_1",RS="_correct_9sf4w_15",AS="_error_9sf4w_19",OS="_visible_9sf4w_23",Zo={validationItem:BS,correct:RS,error:AS,visible:OS},Gs=e=>{const{isCorrect:n,text:o,showCross:s=!1}=e;return t.jsxs("div",{className:L(Zo.validationItem,{[Zo.correct]:n,[Zo.error]:s,[Zo.visible]:!s||!n}),children:[s?t.jsx(ku,{}):n?t.jsx(ap,{}):t.jsx(IS,{}),o]})},FS="_wrapper_td730_1",qS={wrapper:FS},kc=e=>{const{password:n,confirmPassword:o,setIsPasswordValid:s,isMatchError:r}=e,a=/^.*(?=.*[a-z])(?=.*[A-Z]).*$/,c=/^.*(?=.*\d).*$/,l=/^.*(?=.*[!@#$%&*()_-]).*$/,d=n.length>=6&&n.length<=32,u=a.test(n),p=c.test(n),m=l.test(n),h=n.length>0&&n===o,f=o.length===0||h&&!r;return i.useEffect(()=>{s(u&&p&&m&&h&&d)},[u,p,m,h,d,s]),t.jsxs("div",{className:qS.wrapper,children:[t.jsx(Gs,{text:"6 to 32 characters",isCorrect:d}),t.jsx(Gs,{text:"Lowercase and uppercase letters (a-z, A-Z)",isCorrect:u}),t.jsx(Gs,{text:"Numbers (0-9)",isCorrect:p}),t.jsx(Gs,{text:"Special characters (!@#$%-_&*())",isCorrect:m}),t.jsx(Gs,{text:"Passwords do not match",isCorrect:f,showCross:!0})]})},WS="_wrapper_18x24_1",VS="_panel_18x24_7",HS="_form_18x24_11",US="_codeLabel_18x24_18",YS="_saveButton_18x24_30",zs={wrapper:WS,panel:VS,form:HS,codeLabel:US,saveButton:YS},KS=e=>{const{formik:n,onSendClick:o,user:s,remainingTimeToResendCode:r,isRequesting
62Code:a,hasCodeSession:c,requestCodeError:l,changePasswordError:d,changePasswordLoading:u,handleSubmit:p,onChangeCode:m,onChangePassword:h}=e,[f,_]=i.useState(!1);return t.jsxs("section",{className:zs.wrapper,children:[t.jsx(ct,{title:"Change Password"}),t.jsx(V,{variant:"info",message:"To protect your account, all cryptocurrency operations will be disabled for 24 hours after changing the password."}),t.jsx(ze,{className:zs.panel,children:t.jsxs("div",{className:zs.form,children:[t.jsx(J,{name:"code",value:n.values.code,onChange:m,handleClear:()=>n.setFieldValue("code",""),label:t.jsxs("div",{className:zs.codeLabel,children:[t.jsxs("span",{children:["Code from"," ",bs((s==null?void 0:s.email)??"",15)]}),t.jsx(ar,{onClick:o,cooldownTime:r,isLoading:a})]}),error:n.errors.code,autoComplete:"one-time-code"}),l&&t.jsx(V,{variant:"error",message:l,animated:!0}),t.jsx(J,{name:"password",value:n.values.password,onChange:h,handleClear:()=>n.setFieldValue("password",""),label:"New Password",autoComplete:"new-password",showPassword:!0}),t.jsx(J,{name:"confirmPassword",value:n.values.confirmPassword,onChange:h,handleClear:()=>n.setFieldValue("confirmPassword",""),label:"Confirm Password",showPassword:!0}),t.jsx(kc,{setIsPasswordValid:_,password:n.values.password??"",confirmPassword:n.values.confirmPassword??"",isMatchError:n.errors.confirmPassword??""}),d&&t.jsx(V,{variant:"error",message:d,animated:!0}),t.jsx(O,{className:zs.saveButton,onClick:p,isLoading:u,disabled:!c||!at(n)||!f||n.values.code.length!==5,children:"Save"})]})})]})},GS=()=>Ie().shape({code:ae().required().onlyNumbers().min(5),password:ae().min(6).max(32).required(),confirmPassword:ae().required().oneOf([Gl("password")],"Passwords do not match")}),zS=()=>{const[e,n]=i.useState(!1),{logout:o}=op(),{user:s}=ht(),[r,{data:a,error:c,isFetching:l}]=Z1.useLazyRequestCodeQuery(),[d,{isSuccess:u,error:p,isFetching:m}]=Z1.useLazyChangePasswordQuery(),h=Me({initialValues:{code:"",password:"",confirmPassword:""},validateOnChange:e,validationSchema:GS(),onSubmit:async b=>{const{code:x,password:N}=b;a&&d({code:x,password:N,sk:a.payload.sk})}});i.useEffect(()=>{u&&o()},[u,o]);const[f,_]=So(re.passwordCodeSentTime),v=async()=>{try{await r().unwrap(),_()}catch{}},g=()=>{n(!0),h.handleSubmit()},C=b=>{const x=b.target.value.replace(/[^0-9]+/g,"").slice(0,5);Sn(x)&&h.setFieldValue("code",x)},y=b=>{const x=b.target.value.replace(/[^a-zA-Z0-9!@#$%\-_&*()]+/g,"");h.setFieldValue(b.target.name,x)};return t.jsx(KS,{user:s,formik:h,remainingTimeToResendCode:f,onSendClick:v,isRequestingCode:l,hasCodeSession:!!a,changePasswordError:Q(p),changePasswordLoading:m,requestCodeError:Q(c),handleSubmit:g,onChangeCode:C,onChangePassword:y})},vo=jn.injectEndpoints({endpoints:e=>({recoveryRequest:e.mutation({query:n=>({url:"/v2/password-recovery/request",method:"POST",body:n})}),recoveryEmail:e.mutation({query:n=>({url:"/v2/password-recovery/auth-email",method:"POST",body:n})}),recovery2FA:e.mutation({query:n=>({url:"/v2/password-recovery/2fa",method:"POST",body:n})}),resetPassword:e.mutation({query:n=>({url:"/v2/password-recovery",method:"POST",body:n})})})}),Ss=()=>{const{executeRecaptcha:e}=B0();return{getRecaptchaToken:i.useCallback(async o=>{if(!e)throw new Error("Execute recaptcha not yet available");return await e(o)},[e])}};var Kt=(e=>(e.initiate="initiate",e.checkCode="checkCode",e.twoFA="twoFA",e.setPassword="setPassword",e.success="success",e))(Kt||{});const Q1={step:"initiate",email:void 0,sk:void 0,auth2FaKey:void 0},ZS=()=>{const[e,n]=i.useState(Q1),o=i.useCallback(r=>{n(a=>({...a,...r}))},[]),s=i.useCallback(()=>{n(Q1)},[]);return{...e,updateState:o,resetState:s}},QS="_contactSupport_ir4zh_1",XS={contactSupport:QS},xi=({children:e,className:n})=>t.jsx(Dr,{href:"https://tawk.to/chat/62022136b9e4e21181bdf9c9/1frc53fop",className:L(XS.contactSupport,n),children:e??"Need help? Contact support."}),JS="_title_1rj5n_1",eN={title:JS},Dn=e=>{const{children:n}=e;return t.jsx("h1",{className:eN.title,children:n})},tN="_wrapper_15s6g_1",nN="_form_15s6g_10",rN="_text_15s6g_17",sN="_actions_15s6g_24",Qo={wrapper:tN,form:nN,text:rN,actions:sN},oN=e=>{const{formik:n,email:o,onBackClick:s,isLoading:r,onSubmit:a,error:c,onResendClick:l,isCodeSending:d,cooldownTime:u}=e;return t.jsxs("div",{className:Qo.wrapper,children:[t.jsx(Dn,{children:"Enter the code from email"}),t.jsxs("div",{className:Qo.form,children:[t.jsxs("p",{className:Qo.text,children:["Please enter the 5-digit verification code that was sent to"," ",o,". The code is valid for 5 minutes."]}),t.jsx(J,{type:"text",name:"code",value:n.values.code,onChange:p=>{const m=p.target.value.replace(/[^0-9]+/g,"").slice(0,Nn);n.setFieldValue("code",m)},handleClear:()=>n.setFieldValue("code",""),label:"Code",error:n.errors.code,controlButtons:t.jsx(ar,{onClick:l,cooldownTime:u,isLoading:d})}),c&&t.jsx(V,{variant:"error",message:c,animated:!0}),t.jsx(xi,{}),t.jsxs("div",{className:Qo.actions,children:[t.jsx(O,{onClick:s,variant:"secondary",children:"Back"}),t.jsx(O,{onClick:a,isLoading:r,disabled:n.values.code.length!==5,children:"Next"})]})]})]})},aN=()=>Ie().shape({code:ae().required().min(5).max(5)}),iN=({state:e})=>{const{updateState:n,email:o,resetState:s}=e,[r,a]=i.useState(!1),[c,{data:l,error:d,isLoading:u}]=vo.useRecoveryEmailMutation(),p=Me({initialValues:{code:""},validationSchema:aN(),validateOnChange:r,onSubmit:({code:y})=>{o&&c({email:o,code:y})}});i.useEffect(()=>{l!=null&&l.payload.secretKey&&n({sk:l.payload.secretKey,step:Kt.setPassword})},[l]);const m=()=>{u||(a(!0),p.handleSubmit())};i.useEffect(()=>{const y=setTimeout(()=>{s()},bi);return()=>clearTimeout(y)},[]);const[h,{isLoading:f}]=vo.useRecoveryRequestMutation(),{getRecaptchaToken:_}=Ss(),[v,g]=i.useState(60),C=async()=>{try{const y=await _("resend");if(!o)return;await h({email:o,token:y}).unwrap(),g(60)}catch(y){console.log(y)}};return i.useEffect(()=>{if(v>0){const y=setInterval(()=>{g(b=>Math.max(b-1,0))},1e3);return()=>clearInterval(y)}},[v]),t.jsx(oN,{formik:p,email:o??"",onBackClick:s,isLoading:u,onSubmit:m,error:Q(d),onResendClick:C,isCodeSending:f,cooldownTime:v})};function Ns(e){const n=e;return n===void 0?null:"data"in n&&typeof n.data=="object"&&n.data!==null&&"status"in n.data?n.data.status:null}const lN="_form_h8kek_1",cN="_wrapper_h8kek_7",dN="_actions_h8kek_16",Ji={form:lN,wrapper:cN,actions:dN},uN=e=>{const{formik:n,isLoading:o,onSubmit:s,onClickCancel:r,error:a}=e;return t.jsxs("div",{className:Ji.wrapper,children:[t.jsx(Dn,{children:"Enter your email to reset password"}),t.jsxs("div",{className:Ji.form,children:[t.jsx(J,{type:"text",name:"email",value:n.values.email||"",onChange:n.handleChange,handleClear:()=>n.setFieldValue("email",""),label:"Email",error:n.errors.email}),a&&t.jsx(V,{variant:"error",message:a,animated:!0}),t.jsxs("div",{className:Ji.actions,children:[t.jsx(O,{onClick:r,variant:"secondary",children:"Cancel"}),t.jsx(O,{onClick:s,isLoading:o,disabled:!at(n),children:"Reset Password"})]})]})]})},pN=()=>Ie().shape({email:ae().email().min(5).max(dc).required()}),mN=({state:e})=>{const{updateState:n}=e,[o,s]=i.useState(!1),[r,{isLoading:a,error:c,data:l}]=vo.useRecoveryRequestMutation(),d=l==null?void 0:l.payload.authorizationMode,{getRecaptchaToken:u}=Ss(),p=Zt(),m=Me({initialValues:{email:""},validationSchema:pN(),validateOnChange:o,onSubmit:async({email:_})=>{try{const v=await u("signIn");r({email:_,token:v})}catch(v){console.log(v)}}});i.useEffect(()=>{if(d===$r.email||Ns(c)===10100){n({email:m.values.email,step:Kt.checkCode});return}
62d===$r.auth2FA&&n({email:m.values.email,step:Kt.twoFA})},[d,c]);const h=()=>{a||m.isSubmitting||(s(!0),m.handleSubmit())},f=()=>{p("/login")};return t.jsx(uN,{formik:m,isLoading:a,onSubmit:h,onClickCancel:f,error:Q(c)})},hN="_wrapper_14ylv_1",fN="_warning_14ylv_10",_N="_form_14ylv_18",gN="_submitButton_14ylv_25",vN="_actions_14ylv_40",el={wrapper:hN,warning:fN,form:_N,submitButton:gN,actions:vN},yN=e=>{const{formik:n,onBackClick:o,isLoading:s,onSubmit:r,error:a,isPasswordValid:c,setIsPasswordValid:l}=e;return t.jsxs("div",{className:el.wrapper,children:[t.jsx(Dn,{children:"Create a password"}),t.jsxs("div",{className:el.form,children:[t.jsx(J,{name:"password",value:n.values.password||"",onChange:d=>{const u=d.target.value.replace(/[^a-zA-Z0-9!@#$%\-_&*()]+/g,"");n.setFieldValue(d.target.name,u)},handleClear:()=>n.setFieldValue("password",""),label:"Password",showPassword:!0}),t.jsx(J,{name:"confirmPassword",value:n.values.confirmPassword||"",onChange:d=>{const u=d.target.value.replace(/[^a-zA-Z0-9!@#$%\-_&*()]+/g,"");n.setFieldValue(d.target.name,u)},handleClear:()=>n.setFieldValue("confirmPassword",""),label:"Confirm password",showPassword:!0}),t.jsx(kc,{setIsPasswordValid:l,password:n.values.password??"",confirmPassword:n.values.confirmPassword??"",isMatchError:n.errors.confirmPassword??""}),a&&t.jsx(V,{variant:"error",message:a,animated:!0}),t.jsxs("div",{className:el.actions,children:[t.jsx(O,{variant:"secondary",onClick:o,children:"Back"}),t.jsx(O,{onClick:r,isLoading:s,disabled:!at(n)||!c,children:"Change Password"})]})]})]})},bN=()=>Ie().shape({password:ae().min(6).max(32).required(),confirmPassword:ae().required().oneOf([Gl("password"),null])}),xN=({state:e})=>{const{updateState:n,resetState:o,sk:s}=e,[r,a]=i.useState(!1),[c,l]=i.useState(!1),[d,{isSuccess:u,error:p,isLoading:m}]=vo.useResetPasswordMutation(),h=Me({initialValues:{password:"",confirmPassword:""},validationSchema:bN(),validateOnChange:r,onSubmit:({password:_})=>{s&&d({sk:s,password:_})}});i.useEffect(()=>{u&&n({step:Kt.success})},[u]);const f=()=>{m||(a(!0),h.handleSubmit())};return t.jsx(yN,{formik:h,onBackClick:o,isLoading:m,onSubmit:f,error:Q(p),isPasswordValid:c,setIsPasswordValid:l})},CN="_wrapper_1caj4_1",kN="_container_1caj4_10",wN="_info_1caj4_17",jN="_loginButton_1caj4_25",Xo={wrapper:CN,container:kN,info:wN,loginButton:jN},SN=e=>{const{onLoginClick:n,remainingTime:o}=e;return t.jsxs("div",{className:Xo.wrapper,children:[t.jsx(Dn,{children:"The password has been successfully changed"}),t.jsxs("div",{className:Xo.container,children:[t.jsxs("div",{className:Xo.info,children:["You will be redirected to the login page in ",o," ","seconds."]}),t.jsx(O,{className:Xo.loginButton,onClick:n,children:"Log In"})]})]})},NN=()=>{const e=Zt(),[n,o]=i.useState(lv);i.useEffect(()=>{const r=window.setInterval(()=>{o(a=>a<=1?(e("/login"),1):a-1)},1e3);return()=>{window.clearInterval(r)}},[e]);const s=()=>{e("/login")};return t.jsx(SN,{remainingTime:n,onLoginClick:s})},LN="_wrapper_1640g_1",EN="_form_1640g_10",$N="_text_1640g_17",TN="_button_1640g_24",MN="_nextButtonDisabled_1640g_30",DN="_nextButton_1640g_30",PN="_actions_1640g_34",Jo={wrapper:LN,form:EN,text:$N,button:TN,nextButtonDisabled:MN,nextButton:DN,actions:PN},IN=e=>{const{formik:n,isLoading:o,onBackClick:s,error:r}=e;return t.jsx("div",{className:Jo.wrapper,children:t.jsxs("div",{className:Jo.form,children:[t.jsx(Dn,{children:"Security verification"}),t.jsx("p",{className:Jo.text,children:"Enter the 6-digit code from Google Authenticator"}),t.jsx(J,{type:"text",name:"code",value:n.values.code,onChange:a=>{const c=a.target.value.replace(/[^0-9]+/g,"").slice(0,sr);n.setFieldValue("code",c)},label:"Code",error:n.errors.code}),r&&t.jsx(V,{variant:"error",message:r,animated:!0}),t.jsx(xi,{}),t.jsx(O,{onClick:s,variant:"secondary",isLoading:o,className:Jo.button,children:"Back"})]})})},BN=()=>Ie().shape({code:ae().required().onlyNumbers().min(sr)}),RN=({state:e})=>{const{updateState:n,resetState:o,email:s}=e,[r,a]=i.useState(!1),[c,{data:l,error:d,isLoading:u}]=vo.useRecovery2FAMutation(),p=Me({initialValues:{code:""},validationSchema:BN(),validateOnChange:r,onSubmit:({code:h})=>{s&&c({code:h,email:s})}});i.useEffect(()=>{l!=null&&l.payload.secretKey&&n({sk:l.payload.secretKey,step:Kt.setPassword})},[l]);const m=()=>{u||(a(!0),p.handleSubmit())};return i.useEffect(()=>{p.values.code.length===sr&&m()},[p.values.code]),t.jsx(IN,{formik:p,isLoading:u,onBackClick:o,error:Q(d)})},AN=()=>{const e=ZS();return{[Kt.initiate]:t.jsx(mN,{state:e}),[Kt.checkCode]:t.jsx(iN,{state:e}),[Kt.twoFA]:t.jsx(RN,{state:e}),[Kt.setPassword]:t.jsx(xN,{state:e}),[Kt.success]:t.jsx(NN,{})}[e.step]},ON=e=>i.createElement("svg",{viewBox:"0 0 29 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M9.48238 14.1797C9.65887 14.3562 9.65887 14.6439 9.48238 14.8204C9.30589 14.9968 9.01818 14.9968 8.84169 14.8204C8.6652 14.6439 8.6652 14.3562 8.84169 14.1797C9.01818
6214.002 9.30468 14.002 9.48238 14.1797",stroke:"currentColor",strokeWidth:1.8125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.8203 14.1797C14.9968 14.3562 14.9968 14.6439 14.8203 14.8204C14.6438 14.9968 14.3561 14.9968 14.1796 14.8204C14.0031 14.6439 14.0031 14.3562 14.1796 14.1797C14.3561 14.002 14.6438 14.002 14.8203 14.1797",stroke:"currentColor",strokeWidth:1.8125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.3349 17.5221V11.4779",stroke:"currentColor",strokeWidth:1.8125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.335 25.3795H9.6643C6.3267 25.3795 3.62012 22.6729 3.62012 19.3353V9.66464C3.62012 6.32704 6.3267 3.62045 9.6643 3.62045H19.335C22.6726 3.62045 25.3792 6.32704 25.3792 9.66464V19.3353C25.3792 22.6729 22.6726 25.3795 19.335 25.3795Z",stroke:"currentColor",strokeWidth:1.8125,strokeLinecap:"round",strokeLinejoin:"round"})),FN=e=>i.createElement("svg",{viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M3.99609 8.99826H22.0036",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.8654 6.49228L11.8604 6.49728L11.8654 6.50228L11.8704 6.49728L11.8654 6.49228",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.3254 6.49228L9.3204 6.49728L9.3254 6.50228L9.33041 6.49728L9.3254 6.49228",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M6.77658 6.48739L6.77157 6.4924L6.77658 6.4974L6.78158 6.4924L6.77658 6.48739",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.999 22.0041H5.99693C5.46623 22.0041 4.95722 21.7935 4.58196 21.4182C4.2067 21.043 3.99609 20.5339 3.99609 20.0032V5.99742C3.99609 5.46672 4.2067 4.95771 4.58196 4.58245C4.95722 4.20719 5.46623 3.99658 5.99693 3.99658H20.0028C20.5335 3.99658 21.0425 4.20719 21.4177 4.58245C21.793 4.95771 22.0036 5.46672 22.0036 5.99742V10.9995",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.1646 17.6518L14.2587 19.5616C14.094 19.7276 14.0014 19.9519 14.001 20.1857V21.1209C14.001 21.6085 14.3962 22.0037 14.8838 22.0037H15.8229C16.0573 22.0041 16.2821 21.9105 16.4471 21.744L18.349 19.8381C18.6974 19.9601 19.0633 20.0245 19.4323 20.0287C20.965 20.0539 22.3373 19.0829 22.8234 17.6291C23.3095 16.1753 22.7973 14.5742 21.5576 13.6724C20.318 12.7707 18.6369 12.7764 17.4035 13.6865C16.17 14.5967 15.6687 16.2013 16.1646 17.6517V17.6518Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.4318 16.532C19.4155 16.532 19.4007 16.5419 19.3944 16.557C19.3882 16.5721 19.3916 16.5895 19.4032 16.6011C19.4148 16.6127 19.4322 16.6161 19.4473 16.6099C19.4625 16.6036 19.4723 16.5888 19.4723 16.5725C19.4723 16.5501 19.4542 16.532 19.4318 16.532V16.532",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qN=e=>i.createElement("svg",{viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 16.2761V8.21173C24.9908 7.57316 24.5072 7.04154 23.8724 6.97213C21.22 6.77057 18.6771 5.83014 16.5317 4.25741C15.6227 3.58086 14.3774 3.58086 13.4683 4.25741C11.323 5.83015 8.78005 6.77057 6.12765 6.97213C5.4928 7.04153 5.00918 7.57315 5 8.21173V16.2761C5 20.9897 10.8126 24.5033 13.5796 25.9093C14.4737 26.3644 15.5318 26.3635 16.4252 25.9068C19.1939 24.4995 25 20.9944 25 16.2761Z",stroke:"currentColor",strokeWidth:1.875,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.875 16.875L13.7486 18.75",stroke:"currentColor",strokeWidth:1.875,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.125 16.875H11.875",stroke:"currentColor",strokeWidth:1.875,strokeLinecap:"round",strokeLinejoin:"round"}
62),i.createElement("path",{d:"M18.1256 13.125L16.252 11.25",stroke:"currentColor",strokeWidth:1.875,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.875 13.125H18.125",stroke:"currentColor",strokeWidth:1.875,strokeLinecap:"round",strokeLinejoin:"round"})),wc=e=>i.createElement("svg",{viewBox:"0 0 14 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M0 20.5714L8.57143 12L0 3.42857L1.71429 0L13.7143 12L1.71429 24L0 20.5714Z",fill:"currentColor"})),WN="/assets/google_authenticator-RsFWU7vF.svg",VN="_wrapper_18q7u_1",HN="_icon_18q7u_22",UN="_info_18q7u_37",YN="_arrow_18q7u_62",ea={wrapper:VN,icon:HN,info:UN,arrow:YN},KN=e=>{const{connected:n}=e;return t.jsxs(ge,{to:"/settings/privacy/2fa",className:ea.wrapper,children:[t.jsx("div",{className:ea.icon,children:t.jsx("img",{src:WN,alt:""})}),t.jsxs("div",{className:ea.info,children:[t.jsx("div",{children:"Google Authenticator"}),n?t.jsx("p",{children:"Connected"}):t.jsx("span",{children:"Not connected"})]}),t.jsx(wc,{className:ea.arrow})]})},GN="_item_1x6ot_1",zN="_icon_1x6ot_21",ZN="_label_1x6ot_38",QN="_arrow_1x6ot_45",ta={item:GN,icon:zN,label:ZN,arrow:QN},tl=e=>{const{link:n,icon:o,label:s}=e;return t.jsxs(ge,{to:n,className:ta.item,children:[t.jsx("div",{className:ta.icon,children:o}),t.jsx("span",{className:ta.label,children:s}),t.jsx(wc,{className:ta.arrow})]})},XN="_wrapper_7z3oi_1",JN="_section_7z3oi_7",eL="_links_7z3oi_12",nl={wrapper:XN,section:JN,links:eL},tL=()=>{const{user:e}=ht();return t.jsxs("section",{className:nl.wrapper,children:[t.jsx(ct,{title:"Privacy and Security"}),t.jsx("section",{className:nl.section,children:t.jsxs("div",{className:nl.links,children:[t.jsx(tl,{icon:t.jsx(qN,{}),label:"Transaction Security",link:"/settings/privacy/transaction-security"}),t.jsx(tl,{icon:t.jsx(ON,{}),label:"Change Password",link:"/settings/privacy/password-change"}),t.jsx(tl,{icon:t.jsx(FN,{}),label:"Private Key v4.1",link:"/settings/privacy/private-key"}),t.jsx(KN,{connected:(e==null?void 0:e.secure.mode)===$r.auth2FA})]})})]})},nL="data:image/svg+xml,%3csvg%20width='33'%20height='32'%20viewBox='0%200%2033%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M25.7585%2014.8161C25.1758%2010.2267%2021.2465%206.66675%2016.4998%206.66675C12.8252%206.66675%209.63317%208.81341%208.17584%2012.1987C5.31184%2013.0561%203.1665%2015.7601%203.1665%2018.6667C3.1665%2022.2094%205.95184%2025.0867%209.44384%2025.2947V25.3334H24.4865V25.3294L24.4998%2025.3334C27.4412%2025.3334%2029.8332%2022.9414%2029.8332%2020.0001C29.8316%2018.8048%2029.4293%2017.6445%2028.6907%2016.7047C27.952%2015.765%2026.9196%2015.1%2025.7585%2014.8161ZM11.1665%2016.0001H15.1665V12.0001H17.8332V16.0001H21.8332L16.4998%2022.6667L11.1665%2016.0001Z'%20fill='white'/%3e%3c/svg%3e",rL="/assets/pdf_icon-CfP9EZxr.svg",sL="_wrapper_d6dhy_1",oL="_content_d6dhy_12",aL="_block_d6dhy_18",iL="_heading_d6dhy_30",lL="_pdfDownload_d6dhy_57",cL="_pdfIcon_d6dhy_79",dL="_downloadIcon_d6dhy_80",uL="_pdfLabel_d6dhy_86",me={wrapper:sL,content:oL,block:aL,heading:iL,pdfDownload:lL,pdfIcon:cL,downloadIcon:dL,pdfLabel:uL},pL=()=>t.jsxs("section",{className:me.wrapper,children:[t.jsx(ct,{title:"Privacy Policy CrispMind Ltd"}),t.jsxs("div",{className:me.content,children:[t.jsx("div",{className:me.block,children:t.jsxs("p",{children:["At CrispMind, accessible from Tectum.io, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by CrispMind and how we use it.",t.jsx("br",{}),t.jsx("br",{}),"If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.",t.jsx("br",{}),t.jsx("br",{}),"This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in CrispMind. This policy is not applicable to any information collected offline or via channels other than this website."]})}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"CONSENT"}),t.jsx("p",{children:"By using our website, you hereby consent to our Privacy Policy and agree to its terms."})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"INFORMATION WE COLLECT"}),t.jsxs("p",{children:["The personal information that you are asked to provide, and the reasons why you are asked to provide it, will be made clear to you at the point we ask you to provide your personal information.",t.jsx("br",{}),t.jsx("br",{}),"If you contact us directly, we may receive additional information about you such as your name, email address, phone number, the contents of the message and/or attachments you may send us, and any other information you may choose to provide.",t.jsx("br",{}),t.jsx("br",{}),"When you register for an Account, we may ask for your contact information, including items such as name, company name, address, email address, and telephone number."]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"INFORMATION WE COLLECT"}),t.jsx("p",{children:"We use the information we collect in various ways, including to:"}),t.jsxs("ul",{children:[t.jsx("li",{children:"Provide, operate, and maintain our website"}),t.jsx("li",{children:"Improve, personalize, and expand our website"}),t.jsx("li",{children:"Understand and analyze how you use our website"}),t.jsx("li",{children:"Develop new products, services, features, and functionality"}),t.jsx("li",{children:"Communicate with you, either directly or through one of our partners, including for customer service, to provide you with updates and other information relating to the website, and for marketing and promotional purposes"}),t.jsx("li",{children:"Send you emails"}),t.jsx("li",{children:"Find and prevent fraud"})]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"COOKIES AND WEB BEACONS"}),t.jsxs("p",{children:["Like any other website, CrispMind uses âcookiesâ. These cookies are used to store information including visitorsâ preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the usersâ experience by customizing our web page content based on visitorsâ browser type and/or other information.",t.jsx("br",{}),t.jsx("br",{}),"For more general information on cookies, please read the âCookiesâ article from the Privacy Policy Generator."]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"ADVERTISING PARTNERâS PRIVACY POLICIES"}),t.jsxs("p",{children:["You may consult this list to find the Privacy Policy for each of the advertising partners of CrispMind.",t.jsx("br",{}),t.jsx("br",{}),"Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on CrispMind, which are sent directly to usersâ browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/
62or to personalize the advertising content that you see on websites that you visit.",t.jsx("br",{}),t.jsx("br",{}),"Note that Tectum has no access to or control over these cookies that are used by third-party advertisers."]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"THIRD-PARTY PRIVACY POLICIES"}),t.jsxs("p",{children:["CrispMindâs Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt out of certain options.",t.jsx("br",{}),t.jsx("br",{}),"You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found on the browsersâ respective websites."]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"NOTICE FOR CALIFORNIA RESIDENTS / CCPA PRIVACY RIGHTS (DO NOT SELL MY PERSONAL INFORMATION)"}),t.jsx("p",{children:"Effective January 1, 2020, California residents are protected under the California Consumer Privacy Act (CCPA). We provide data protection terms that meet this as well as the EU and UK GDPR. The âShine The Lightâ law (California Civil Code Section 1798.83) also guarantees you the ability to request and/or remove your data free of charge the information about the categories of personal information disclosed to third parties for direct marketing, as well as the names and addresses of third parties."})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"UNDER THE CCPA, AMONG OTHER RIGHTS, CALIFORNIA CONSUMERS HAVE THE RIGHT TO:"}),t.jsxs("p",{children:["Request that a business that collects a consumerâs personal data disclose the categories and specific pieces of personal data that a business has collected about consumers.",t.jsx("br",{}),t.jsx("br",{}),"Request that a business deletes any personal data about the consumer that a business has collected.",t.jsx("br",{}),t.jsx("br",{}),"Request that a business that sells a consumerâs personal data, not sell the consumerâs personal data.",t.jsx("br",{}),t.jsx("br",{}),"If you are a California resident and would like to make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us. Note that we will only accept forms asking for removal if the information provided matches the information to be removed and that we reserve the right to verify your identity before disclosing any."]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"GDPR DATA PROTECTION RIGHTS"}),t.jsxs("p",{children:["We would like to make sure you are fully aware of all of your data protection rights. Every user is entitled to the following:",t.jsx("br",{}),t.jsx("br",{}),"The right to access â You have the right to request copies of your personal data. We may charge you a small fee for this service.",t.jsx("br",{}),t.jsx("br",{}),"The right to rectification â You have the right to request that we correct any information you believe is inaccurate. You also have the right to request that we complete the information you believe is incomplete.",t.jsx("br",{}),t.jsx("br",{}),"The right to erasure â You have the right to request that we erase your personal data, under certain conditions.",t.jsx("br",{}),t.jsx("br",{}),"The right to restrict processing â You have the right to request that we restrict the processing of your personal data, under certain conditions.",t.jsx("br",{}),t.jsx("br",{}),"The right to object to processing â You have the right to object to our processing of your personal data, under certain conditions.",t.jsx("br",{}),t.jsx("br",{}),"The right to data portability â You have the right to request that we transfer the data that we have collected to another organization, or directly to you, under certain conditions.",t.jsx("br",{}),t.jsx("br",{}),"If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us."]})]}),t.jsxs("div",{className:me.block,children:[t.jsx("h2",{className:me.heading,children:"CHILDRENâS INFORMATION"}),t.jsxs("p",{children:["Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.",t.jsx("br",{}),t.jsx("br",{}),"CrispMind does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.",t.jsx("br",{}),t.jsx("br",{}),"We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify users of any changes by posting the new Privacy Policy on this page. You will receive an email if an update changes what you might have consented to."]})]}),t.jsxs("a",{href:"https://tectum.io/wp-content/uploads/2022/06/Privacy-Policy-CrispMind-2022.06.21.pdf",className:me.pdfDownload,target:"_blank",rel:"noreferrer",children:[t.jsx("img",{src:rL,alt:"",className:me.pdfIcon}),t.jsx("span",{className:me.pdfLabel,children:"Download Privacy Policy (PDF)"}),t.jsx("img",{src:nL,alt:"",className:me.downloadIcon})]})]}),t.jsx(gc,{})]}),mL=()=>t.jsx(pL,{}),hL="_wrapper_repbg_1",fL="_panel_repbg_7",_L="_form_repbg_11",gL="_showButton_repbg_18",na={wrapper:hL,panel:fL,form:_L,showButton:gL},vL=e=>{const{formik:n,isLoading:o,privateKey:s,error:r}=e;return t.jsxs("section",{className:na.wrapper,children:[t.jsx(ct,{title:"Private Key v4.1"}),t.jsx(V,{variant:"warning",title:"Caution!",message:"Your private key is sensitive information. Do not share it and keep it secure."}),t.jsx(V,{variant:"info",message:t.jsxs(t.Fragment,{children:["Use it to interact with"," ",t.jsx(Dr,{href:"https://tectum.gitbook.io/tectum_lightnode",children:"Tectum Node 4.1"})]})}),t.jsx(ze,{className:na.panel,children:s?t.jsx(J,{value:s,label:"Private Key",readOnly:!0,withCopy:!0}):t.jsxs("div",{className:na.form,children:[t.jsx(J,{autoComplete:"new-password",name:"password",value:n.values.password,onChange:n.handleChange,handleClear:()=>n.setFieldValue("password",""),label:"Password",showPassword:!0,error:n.errors.password}),t.jsx(O,{className:na.showButton,onClick:()=>n.handleSubmit(),isLoading:o,disabled:!at(n),children:"Show Private Key"}),r&&t.jsx(V,{variant:"error",message:r,animated:!0})]})})]})},yL=()=>Ie().shape({password:ae().required().min(5).max(255)}),bL=()=>{const[e,{data:n,error:o,isLoading:s}]=Se.useLazyGetPrivateKeyQuery(),r=Me({initialValues:{password:""},validateOnChange:!1,validationSchema:yL(),onSubmit:async a=>{e(a.password),Ze({event:"settings_private_key_show_attempt"})}});return i.useEffect(()=>{n&&Ze({event:"settings_private_key_show_success"})},[n]),t.jsx(vL,{privateKey:n==null?void 0:n.payload.hex,isLoading:s,formik:r,error:Q(o)})},Hl=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e}
62,i.createElement("path",{d:"M8.55286 10.1132C9.59439 11.1547 9.59439 12.8434 8.55286 13.8849C7.51133 14.9264 5.82268 14.9264 4.78115 13.8849C3.73962 12.8434 3.73962 11.1547 4.78115 10.1132C5.82268 9.07165 7.51133 9.07165 8.55286 10.1132",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.2208 4.78115C20.2624 5.82268 20.2624 7.51133 19.2208 8.55286C18.1793 9.59439 16.4906 9.59439 15.4491 8.55286C14.4076 7.51133 14.4076 5.82268 15.4491 4.78115C16.4906 3.73962 18.1793 3.73962 19.2208 4.78115",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.2208 15.4452C20.2624 16.4867 20.2624 18.1754 19.2208 19.2169C18.1793 20.2584 16.4906 20.2584 15.4491 19.2169C14.4076 18.1754 14.4076 16.4867 15.4491 15.4452C16.4906 14.4037 18.1793 14.4037 19.2208 15.4452",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.03906 10.8116L14.9591 7.85156",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.03906 13.1914L14.9591 16.1514",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),xL=e=>i.createElement("svg",{viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18V18C5.8575 18 2.5 14.6425 2.5 10.5V10.5C2.5 6.3575 5.8575 3 10 3V3C14.1425 3 17.5 6.3575 17.5 10.5V10.5C17.5 14.6425 14.1425 18 10 18Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.99984 14.6667V10.5H9.1665",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.79084 7.16732C9.67584 7.16732 9.5825 7.26065 9.58334 7.37565C9.58334 7.49065 9.67667 7.58398 9.79167 7.58398C9.90667 7.58398 10 7.49065 10 7.37565C10 7.26065 9.90667 7.16732 9.79084 7.16732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),CL="_button_13wj6_1",kL={button:CL},jc=({onClick:e,className:n,"aria-label":o})=>t.jsx("button",{type:"button",className:L(kL.button,n),onClick:e,"aria-label":o,children:t.jsx(xL,{})}),Ul=Ia.injectEndpoints({endpoints:e=>({getIncome:e.query({query:()=>({url:"/v1/users/income",method:"GET"})}),getPayments:e.query({query:n=>({url:"/v1/users/payments",method:"GET",params:n}),serializeQueryArgs:({queryArgs:n,endpointDefinition:o,endpointName:s})=>{const r={...n};return delete r.page,cs({queryArgs:r,endpointDefinition:o,endpointName:s})},merge:(n,o,{arg:{page:s}})=>{if(s===1){n.payments=o.payments,n.totalCount=o.totalCount;return}n.payments.push(...o.payments)},forceRefetch({currentArg:n,previousArg:o}){return n!==o}}),getTotalPayments:e.query({query:()=>({url:"/v1/users/payments/total",method:"GET"})})})}),wL="_item_1445s_1",jL="_icon_1445s_27",SL="_main_1445s_38",NL="_value_1445s_46",LL="_signature_1445s_56",EL="_aside_1445s_65",$L="_amount_1445s_75",Wn={item:wL,icon:jL,main:SL,value:NL,signature:LL,aside:EL,amount:$L},TL=({payment:e})=>{const{protocol:n,ticker:o}=ws(e.currencyKey);return t.jsxs("div",{className:Wn.item,children:[t.jsx("div",{className:Wn.icon,children:t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}})}),t.jsxs("div",{className:Wn.main,children:[t.jsx("div",{className:Wn.value,children:"Withdraw Referral Bonus"}),t.jsx("div",{className:Wn.signature,children:"To Wallet"})]}),t.jsxs("div",{className:Wn.aside,children:[t.jsxs("div",{className:Wn.amount,children:["+ ",e.amountStr," ",o]}),t.jsxs("div",{className:Wn.signature,children:[o," (",n,")"]})]})]})},ML="_noData_m8ss5_1",DL={noData:ML},PL=()=>{const[e,n]=i.useState(1),{data:o,isFetching:s,isLoading:r,error:a}=Ul.useGetPaymentsQuery({page:e,limit:ln}),c=(o==null?void 0:o.payments)??[],l=(o==null?void 0:o.totalCount)??0,d=c.length<l,u=()=>{!s&&d&&n(p=>p+1)};return r?t.jsx(H,{}):a?t.jsx(V,{variant:"error",message:Q(a),animated:!0}):c.length?t.jsx("div",{children:t.jsx(xs,{hasMore:d,loader:t.jsx(Tn,{}
62),loadMore:u,isLoading:s,children:c.map((p,m)=>t.jsx(TL,{payment:p},`${p.paymentPeriod}-${p.currencyKey}-${m}`))})}):t.jsx("p",{className:DL.noData,children:"No Data"})},IL="_wrapper_1ge8c_1",BL="_text_1ge8c_8",RL="_tableWrapper_1ge8c_16",AL="_table_1ge8c_16",ra={wrapper:IL,text:BL,tableWrapper:RL,table:AL},OL=[{id:1,lvl:"Level 1",info:"10%"},{id:2,lvl:"Level 2",info:"5%"},{id:3,lvl:"Level 3",info:"4%"},{id:4,lvl:"Level 4",info:"3%"},{id:5,lvl:"Level 5",info:"2%"},{id:6,lvl:"Level 6",info:"1%"}],FL=({isOpen:e,onClose:n})=>t.jsxs(D,{isOpen:e,onClose:n,fitContent:!0,children:[t.jsx(D.Header,{title:"About referrals"}),t.jsxs(D.Body,{className:ra.wrapper,children:[t.jsxs("p",{className:ra.text,children:["Referral levels explained: The table shows the percentage of rewards you get from TCT purchases.",t.jsx("br",{}),"Level 1 = your direct invites.",t.jsx("br",{}),"Level 2 = people invited by your friends.",t.jsx("br",{}),"Level 3+ = continues further."]}),t.jsx("div",{className:ra.tableWrapper,children:t.jsxs("table",{className:ra.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:"Referral Level"}),t.jsx("th",{children:"Your % from TCT purchase"})]})}),t.jsx("tbody",{children:OL.map(o=>t.jsxs("tr",{children:[t.jsx("td",{children:o.lvl}),t.jsx("td",{children:o.info})]},o.id))})]})})]})]});/** 63 * react-table 64 * 65 * Copyright (c) TanStack 66 * 67 * This source code is licensed under the MIT license found in the 68 * LICENSE.md file in the root directory of this source tree. 69 * 70 * @license MIT 71 */function X1(e,n){return e?qL(e)?i.createElement(e,n):e:null}function qL(e){return WL(e)||typeof e=="function"||VL(e)}function WL(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function VL(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function HL(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=i.useState(()=>({current:q2(n)})),[s,r]=i.useState(()=>o.current.initialState);return o.current.setOptions(a=>({...a,...e,state:{...s,...e.state},onStateChange:c=>{r(c),e.onStateChange==null||e.onStateChange(c)}})),o.current}const UL="_wrapper_1fc2u_1",YL="_limitWrapper_1fc2u_9",KL="_limitLabel_1fc2u_15",GL="_limitValue_1fc2u_22",zL="_buttons_1fc2u_26",ZL="_disabled_1fc2u_42",QL="_info_1fc2u_42",XL="_next_1fc2u_47",ft={wrapper:UL,limitWrapper:YL,limitLabel:KL,limitValue:GL,buttons:zL,disabled:ZL,info:QL,next:XL},JL=e=>{const{currentPage:n,total:o,onChangePage:s,limit:r,onChangeLimit:a,isLoading:c=!1}=e,l=Math.ceil(o/r),d=()=>{n!==1&&s(n-1)},u=()=>{n!==l&&s(n+1)};return t.jsxs("div",{className:ft.wrapper,children:[a&&t.jsxs("div",{className:ft.limitWrapper,children:[t.jsx("span",{className:ft.limitLabel,children:"Show:"}),t.jsx(Oe,{selected:String(r),onChange:p=>a(Number(p)),options:[{value:"10",label:"10"},{value:"50",label:"50"},{value:"100",label:"100"}],className:ft.limitValue})]}),t.jsxs("div",{className:ft.buttons,children:[t.jsx("button",{className:L(ft.edge,{[ft.disabled]:n===1||c}),onClick:()=>s(1),children:"First"}),t.jsx("button",{className:L(ft.prev,{[ft.disabled]:n===1||c}),onClick:d,children:t.jsx("svg",{width:"13",height:"11",viewBox:"0 0 13 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M5.67045 11L0.579545 5.90909L5.67045 0.818182L6.44318 1.57955L2.66477 5.35795H12.2727V6.46023H2.66477L6.44318 10.2273L5.67045 11Z",fill:"currentColor"})})}),t.jsxs("button",{className:ft.info,children:["Page ",n," of ",l]}),t.jsx("button",{className:L(ft.next,{[ft.disabled]:n===l||c}),onClick:u,children:t.jsx("svg",{width:"13",height:"11",viewBox:"0 0 13 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M5.67045 11L0.579545 5.90909L5.67045 0.818182L6.44318 1.57955L2.66477 5.35795H12.2727V6.46023H2.66477L6.44318 10.2273L5.67045 11Z",fill:"currentColor"})})}),t.jsx("button",{className:L(ft.edge,{[ft.disabled]:n===l||c}),onClick:()=>s(l),children:"Last"})]})]})},eE="_tableWrapper_13g0i_1",tE="_table_13g0i_1",nE="_clickableRow_13g0i_31",rl={tableWrapper:eE,table:tE,clickableRow:nE},rE=({table:e,className:n,onRowClick:o})=>t.jsx("div",{className:L(rl.tableWrapper,n),children:t.jsxs("table",{className:rl.table,children:[t.jsx("thead",{children:e.getHeaderGroups().map(s=>t.jsx("tr",{children:s.headers.map(r=>{var a;return t.jsx("th",{className:(a=r.column.columnDef.meta)==null?void 0:a.className,children:X1(r.column.columnDef.header,r.getContext())},r.id)})},s.id))}),t.jsx("tbody",{children:e.getRowModel().rows.map(s=>t.jsx("tr",{role:o?"button":void 0,onClick:()=>o&&o(s.original),className:L({[rl.clickableRow]:o}),children:s.getVisibleCells().map(r=>{var a;return t.jsx("td",{className:(a=r.column.columnDef.meta)==null?void 0:a.className,children:X1(r.column.columnDef.cell,r.getContext())},r.id)})},s.id))})]})}),sE="_wrapper_1xqbx_1",oE="_toolbar_1xqbx_8",aE="_select_1xqbx_15",iE="_total_1xqbx_20",lE="_noref_1xqbx_28",cE="_table_1xqbx_38",dE="_ref_1xqbx_65",uE="_lvl_1xqbx_69",pE="_date_1xqbx_73",bn={wrapper:sE,toolbar:oE,select:aE,total:iE,noref:lE,table:cE,ref:dE,lvl:uE,date:pE},sl=W2(),J1=[sl.accessor("userId",{header:"Referral",cell:e=>e.getValue(),meta:{className:bn.ref}}),sl.accessor("level",{header:"Level",cell:e=>e.getValue(),meta:{className:bn.lvl}}),sl.accessor("createdAt",{header:"Join Date",cell:e=>{const n=e.getValue().toString();return n?n.split("T")[0]:""},meta:{className:bn.date}})],mE=()=>{const[e,n]=i.useState(1),[o,s]=i.useState("all"),{data:r,isFetching:a}=Se.useGetReferralsQuery({limit:10,page:e,levelFilter:o==="all"?void 0:Number(o)}),c=i.useMemo(()=>a?J1.map(h=>({...h,cell:()=>t.jsx(H,{})})):J1,[a]),l=i.useMemo(()=>a&&(!(r!=null&&r.referrals)||r.referrals.length===0)?Array.from({length:5},()=>({refId:0,userId:0,level:0,createdAt:new Date})):(r==null?void 0:r.referrals)??[],[a,r==null?void 0:r.referrals]),d=HL({data:l,columns:c,getCoreRowModel:V2()}),u=h=>{n(h)},p=i.useMemo(()=>r!=null&&r.levels?[{value:"all",label:"All"},...Object.keys(r.levels).sort((h,f)=>Number(h)-Number(f)).map(h=>({value:h,label:`Level ${h}`}))]:[{value:"all",label:"All"}],[r]),m=h=>{s(h)};return!a&&!(r!=null&&r.totalCount)?t.jsx("p",{className:bn.noref,children:"You donât have any referrals yet. Start inviting friends to earn rewards."}):t.jsxs("div",{className:bn.wrapper,children:[r&&t.jsxs("div",{className:bn.toolbar,children:[t.jsx("p",{className:bn.total,children:o==="all"?`Total referrals: ${r.totalCount}`:`Level ${o}: ${r.levels[o]} referrals`}),t.jsx(Oe,{options:p,selected:o,onChange:m,className:bn.select})]}),t.jsx(rE,{table:d,className:bn.table}),!!(r!=null&&r.totalCount)&&r.totalCount>
7110&&t.jsx(JL,{currentPage:e,onChangePage:u,total:r.totalCount,limit:10,isLoading:a})]})},hE="_rewards_w29zy_1",fE="_block_w29zy_14",_E="_label_w29zy_25",gE="_amount_w29zy_32",vE="_fiat_w29zy_41",yE="_divider_w29zy_49",bE="_skeleton_w29zy_69",_t={rewards:hE,block:fE,label:_E,amount:gE,fiat:vE,divider:yE,skeleton:bE,"skeleton-loading":"_skeleton-loading_w29zy_1"},xE=()=>{const{data:e,isLoading:n}=Ul.useGetIncomeQuery(),{data:o,isLoading:s}=Ul.useGetTotalPaymentsQuery(),r=i.useMemo(()=>(e==null?void 0:e.revenues.reduce((a,c)=>ws(c.currencyKey).ticker==="TCT"?{amount:a.amount.plus(c.amount),amountInUsdt:a.amountInUsdt.plus(c.amountInUsdt)}:a,{amount:new Io(0),amountInUsdt:new Io(0)}))??{amount:new Io(0),amountInUsdt:new Io(0)},[e]);return t.jsxs("div",{className:_t.rewards,children:[t.jsxs("div",{className:_t.block,children:[t.jsx("span",{className:_t.label,children:"Upcoming rewards"}),t.jsxs("div",{className:L(_t.amount,{[_t.skeleton]:n}),children:[r.amount.toFixed()," TCT"]}),t.jsxs("span",{className:L(_t.fiat,{[_t.skeleton]:n}),children:["â $",r.amountInUsdt.toFixed()]})]}),t.jsx("div",{className:_t.divider}),t.jsxs("div",{className:_t.block,children:[t.jsx("span",{className:_t.label,children:"Earned rewards"}),t.jsxs("div",{className:L(_t.amount,{[_t.skeleton]:s}),children:[(o==null?void 0:o.amountStr)??0," TCT"]}),t.jsxs("span",{className:L(_t.fiat,{[_t.skeleton]:s}),children:["â $",(o==null?void 0:o.amountInUsdtStr)??0]})]})]})},CE=e=>i.createElement("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("rect",{x:3.5,y:7,width:14,height:14,rx:3,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.5 3.87866C9.06202 3.31517 9.82548 2.99894 10.6213 3H18.5C20.1569 3 21.5 4.34315 21.5 6V13.8787C21.5011 14.6745 21.1848 15.438 20.6213 16",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),kE=e=>i.createElement("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M12.0469 16.9066L9.98191 18.9156C9.62391 19.2636 9.02491 19.1096 8.87991 18.6316L7.50391 14.1016",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.3553 10.9275C14.3553 10.9275 11.7663 13.2635 10.4383 14.4625C10.0413 14.8205 10.0743 15.4505 10.5043 15.7675L15.8823 19.7405C16.4113 20.1315 17.1673 19.8445 17.3043 19.2005L19.9453 6.75348C20.0733 6.15148 19.4823 5.64848 18.9083 5.86948L3.3933 11.8535C2.9363 12.0295 2.9583 12.6825 3.4253 12.8285L7.5023 14.1005",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),wE=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2022 5.76303C16.5562 4.11603 14.3672 3.20803 12.0352 3.20703C7.22819 3.20703 3.31719 7.11603 3.31619 11.921C3.31419 13.45 3.71519 14.953 4.47919 16.278L3.24219 20.794L7.86419 19.582C9.14319 20.278 10.5752 20.643 12.0312 20.643H12.0352C16.8402 20.643 20.7512 16.733 20.7532 11.928C20.7542 9.60003 19.8482 7.41103 18.2022 5.76303Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.0938 13.5599L13.4997 13.1569C13.8727 12.7869 14.4628 12.7399 14.8928 13.0419C15.3088 13.3339 15.6847 13.5959 16.0347 13.8399C16.5907 14.2259 16.6578 15.0179 16.1788 15.4959L15.8198 15.8549",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.14453 8.17841L8.50353 7.81941C8.98153 7.34141 9.77353 7.40841 10.1595 7.96341C10.4025 8.31341 10.6645 8.68941 10.9575 9.10541C11.2595 9.53541 11.2135 10.1254 10.8425 10.4984L10.4395 10.9044",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.8217 15.8534C14.3407 17.3274 11.8517 16.0754 9.88672 14.1094",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.88807 14.1147C7.92307 12.1487 6.67107 9.66069 8.14507 8.17969",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.4414 10.9062C10.7604 11.4093 11.1694 11.9073 11.6314 12.3693L11.6334 12.3713C12.0954 12.8333 12.5934 13.2422 13.0964 13.5612",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),jE="_wrapper_1m2nm_1",SE="_text_1m2nm_8",NE="_field_1m2nm_18",LE="_code_1m2nm_35",EE="_buttons_1m2nm_42",$E="_button_1m2nm_42",TE="_circle_1m2nm_67",ME="_copied_1m2nm_90",Je={wrapper:jE,text:SE,field:NE,code:LE,buttons:EE,button:$E,circle:TE,copied:ME},DE=({isOpen:e,onClose:n,content:o})=>{const[s,r]=i.useState(!1),a=o.startsWith("https"),c=`Begin using SoftNote Wallet and manage your funds safely. 72Use referral ${a?"link":"code"} to start your journey: ${o}${a?"":` 73 74Use code in our Wallet: https://wallet.softnote.com/registration`}`,l=()=>{window.open(`https://t.me/share/url?url=${encodeURIComponent(c)}`,"_blank")},d=()=>{window.open(`https://wa.me/?text=${encodeURIComponent(c)}`,"_blank")},u=()=>{const h=encodeURIComponent(a?"My referral link:":"My referral code:"),f=encodeURIComponent(c);window.open(`mailto:?subject=${h}&body=${f}`,"_self")},p=()=>{navigator.share(a?{title:"Referral Link",text:c}:{title:"Referral Code",text:c})},m=()=>{navigator.clipboard.writeText(o),r(!0)};return i.useEffect(()=>{const h=setTimeout(()=>{r(!1)},1e3);return()=>clearTimeout(h)},[s]),t.jsxs(D,{isOpen:e,onClose:n,fitContent:!0,children:[t.jsx(D.Header,{title:`Share referral ${a?"Link":"Code"}`}),t.jsxs(D.Body,{className:Je.wrapper,children:[t.jsxs("p",{className:Je.text,children:["Share your ",a?"link":"code"," with friends and earn rewards! When a user registers through your invite and purchases TCT, youâll receive rewards in TCT."]}),t.jsx("div",{className:L(Je.field,{[Je.code]:!o.startsWith("https")}),children:o}),t.jsxs("div",{className:Je.buttons,children:[!!navigator.clipboard&&t.jsxs("button",{className:Je.button,onClick:m,children:[t.jsx("div",{className:Je.circle,children:s?t.jsx(ap,{className:Je.copied}):t.jsx(CE,{})}),t.jsxs("span",{children:["Copy ",a?"Link":"Code"]})]}),t.jsxs("button",{className:Je.button,onClick:l,children:[t.jsx("div",{className:Je.circle,children:t.jsx(kE,{})}),t.jsx("span",{children:"Telegram"})]}),t.jsxs("button",{className:Je.button,onClick:d,children:[t.jsx("div",{className:Je.circle,children:t.jsx(wE,{})}),t.jsx("span",{children:"WhatsApp"})]}),t.jsxs("button",{className:Je.button,onClick:u,children:[t.jsx("div",{className:Je.circle,children:"@"}),t.jsx("span",{children:"Email"})]}),!!navigator.share&&t.jsxs("button",{className:Je.button,onClick:p,children:[t.jsx("div",{className:Je.circle,children:t.jsx(Hl,{})}),t.jsx("span",{children:"Other"})]})]})]})]})},PE="_page_1am6b_1",IE="_wrapper_1am6b_8",BE="_block_1am6b_15",RE="_infoWrapper_1am6b_28",AE="_info_1am6b_28",OE="_step_1am6b_49",FE="_links_1am6b_66",qE="_link_1am6b_66",WE="_button_1am6b_78",VE="_tables_1am6b_87",HE="_tabs_1am6b_93",UE="_tab_1am6b_87",YE="_active_1am6b_120",KE="_panel_1am6b_132",qe={page:PE,wrapper:IE,block:BE,infoWrapper:RE,info:AE,step:OE,links:FE,link:qE,button:WE,tables:VE,tabs:HE,tab:UE,active:YE,panel:KE},GE=["Share your invite link or code with a friend","After signing up, your friend needs to purchase TCT","After your friend fulfills the requirements, you earn a reward"],zE=()=>{var h;const{user:e}=ht(),[n,o]=i.useState(!1),[s,r]=i.useState(!1),[a,c]=i.useState(""),[l,d]=i.useState("referrals"),u=((h=e==null?void 0:e.id)==null?void 0:h.toString())??"",p=`https://wallet.softnote.com/registration?ref=${u}`,m=f=>{c(f),o(!0)};return t.jsxs("div",{className:qe.page,children:[t.jsx(ct,{title:"Referral Program",actionElement:t.jsx(jc,{onClick:()=>r(!0),"aria-label":"About referrals"})}),t.jsxs("div",{className:qe.wrapper,children:[t.jsxs("div",{className:qe.block,children:[t.jsx("div",{className:qe.infoWrapper,children:GE.map((f,_)=>t.jsxs("div",{className:qe.info,children:[t.jsx("div",{className:qe.step,children:_+1}),t.jsx("span",{children:f})]},f))}),t.jsxs("div",{className:qe.links,children:[t.jsxs("div",{className:qe.link,children:[t.jsx(J,{name:"link",value:p,readOnly:!0,withCopy:!0}),t.jsxs(O,{className:qe.button,onClick:()=>m(p),children:[t.jsx(Hl,{})," ",t.jsx("span",{children:"Share Link"})]})]}),t.jsxs("div",{className:qe.link,children:[t.jsx(J,{name:"code",value:u,readOnly:!0,withCopy:!0}),t.jsxs(O,{className:qe.button,onClick:()=>m(u),children:[t.jsx(Hl,{})," ",t.jsx("span",{children:"Share Code"})]})]})]})]}),t.jsx(xE,{}),t.jsxs("div",{className:qe.tables,children:[t.jsxs("div",{className:qe.tabs,children:[t.jsx("button",{type:"button",className:L(qe.tab,{[qe.active]:l==="referrals"}),onClick:()=>d("referrals"),children:"Referrals"}),t.jsx("button",{type:"button",className:L(qe.tab,{[qe.active]:l==="history"}),onClick:()=>d("history"),children:"History"})]}),t.jsx(ze,{className:qe.panel,children:l==="referrals"?t.jsx(mE,{}):t.jsx(PL,{})})]}),t.jsx(DE,{isOpen:n,onClose:()=>o(!1),content:a}),t.jsx(FL,{isOpen:s,onClose:()=>r(!1)})]})]})},ZE=e=>i.createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10.6399 16.14L8.63989 14.14L10.6399 12.14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.6399 12.14L15.6399 14.14L13.6399 16.14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.1399 7.14001V5.14001C19.1399 4.03545 18.2445 3.14001 17.1399 3.14001H5.13989C4.03532 3.14001 3.13989 4.03545 3.13989 5.14001V5.14001C3.13989 6.24458 4.03532 7.14001 5.13989 7.14001H19.1399C20.2445 7.14001 21.1399 8.03545 21.1399 9.14001V19.14C21.1399 20.2446 20.2445 21.14 19.1399 21.14H5.13989C4.03532 21.14 3.13989 20.2446 3.13989 19.14V5.14001",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}
74)),QE=e=>i.createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.14 21.14H7.14001C6.03501 21.14 5.14001 20.245 5.14001 19.14V11.14C5.14001 10.035 6.03501 9.14 7.14001 9.14H17.14C18.245 9.14 19.14 10.035 19.14 11.14V19.14C19.14 20.245 18.245 21.14 17.14 21.14Z",stroke:"currentColor",strokeWidth:1.4655,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.14 9.14V7.14C16.14 4.931 14.349 3.14 12.14 3.14V3.14C9.93101 3.14 8.14001 4.931 8.14001 7.14V9.14",stroke:"currentColor",strokeWidth:1.4031,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.138 14.64C11.862 14.64 11.638 14.864 11.64 15.14C11.64 15.416 11.864 15.64 12.14 15.64C12.416 15.64 12.64 15.416 12.64 15.14C12.64 14.864 12.416 14.64 12.138 14.64",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),XE=e=>i.createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10.0542 10.3188C10.8353 11.0999 10.8353 12.3662 10.0542 13.1472C9.27318 13.9283 8.00685 13.9283 7.2258 13.1472C6.44475 12.3662 6.44475 11.0999 7.2258 10.3188C8.00685 9.53775 9.27318 9.53775 10.0542 10.3188",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.14 11.14H19.14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.14 14.64H15.14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.14 18.181C11.97 17.754 11.707 17.37 11.369 17.057V17.057C10.798 16.528 10.048 16.233 9.26901 16.233H8.01101C7.23201 16.233 6.48201 16.527 5.91101 17.057V17.057C5.57301 17.369 5.31001 17.753 5.14001 18.181",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.14 7.14H11.14C10.588 7.14 10.14 6.692 10.14 6.14V3.14C10.14 2.588 10.588 2.14 11.14 2.14H13.14C13.692 2.14 14.14 2.588 14.14 3.14V6.14C14.14 6.692 13.692 7.14 13.14 7.14Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.14 5.14H4.18101C3.05401 5.14 2.14001 6.054 2.14001 7.181V19.14C2.14001 20.245 3.03501 21.14 4.14001 21.14H20.14C21.245 21.14 22.14 20.245 22.14 19.14V7.14C22.14 6.035 21.245 5.14 20.14 5.14H14.14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),JE=e=>i.createElement("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M20.0425 21V19C20.0425 17.9391 19.6211 16.9217 18.8709 16.1716C18.1208 15.4214 17.1033 15 16.0425 15H8.04248C6.98161 15 5.9642 15.4214 5.21405 16.1716C4.46391 16.9217 4.04248 17.9391 4.04248 19V21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.0425 11C14.2516 11 16.0425 9.20914 16.0425 7C16.0425 4.79086 14.2516 3 12.0425 3C9.83334 3 8.04248 4.79086 8.04248 7C8.04248 9.20914 9.83334 11 12.0425 11Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),e$="_item_1x6ot_1",t$="_icon_1x6ot_21",n$="_label_1x6ot_38",r$="_arrow_1x6ot_45",sa={item:e$,icon:t$,label:n$,arrow:r$},oa=e=>{const{link:n,icon:o,label:s}=e;return t.jsxs(ge,{to:n,className:sa.item,children:[t.jsx("div",{className:sa.icon,children:o}),t.jsx("span",{className:sa.label,children:s}),t.jsx(wc,{className:sa.arrow})]})},s$="_list_1gh2j_1",o$={list:s$},a$=()=>t.jsxs("div",{className:o$.list,children:[t.jsx(oa,{icon:t.jsx(JE,{}),label:"Edit profile",link:"/settings/edit-profile"}),t.jsx(oa,{icon:t.jsx(XE,{}),label:"Identity verification",link:"/settings/verification"}),t.jsx(oa,{icon:t.jsx(QE,{}),label:"Privacy and Security",link:"/settings/privacy"}),t.jsx(oa,{icon:t.jsx(ZE,{}),label:"For developers",link:"/settings/developers"})]}),ip=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M21.1744 9.63937C20.8209 9.27 20.4553 8.88937 20.3175 8.55469C20.19 8.24813 20.1825 7.74 20.175 7.24781C20.1609 6.33281 20.1459 5.29594 19.425 4.575C18.7041 3.85406 17.6672 3.83906 16.7522 3.825C16.26 3.8175 15.7519 3.8
741 15.4453 3.6825C15.1116 3.54469 14.73 3.17906 14.3606 2.82562C13.7137 2.20406 12.9787 1.5 12 1.5C11.0213 1.5 10.2872 2.20406 9.63937 2.82562C9.27 3.17906 8.88937 3.54469 8.55469 3.6825C8.25 3.81 7.74 3.8175 7.24781 3.825C6.33281 3.83906 5.29594 3.85406 4.575 4.575C3.85406 5.29594 3.84375 6.33281 3.825 7.24781C3.8175 7.74 3.81 8.24813 3.6825 8.55469C3.54469 8.88844 3.17906 9.27 2.82562 9.63937C2.20406 10.2862 1.5 11.0213 1.5 12C1.5 12.9787 2.20406 13.7128 2.82562 14.3606C3.17906 14.73 3.54469 15.1106 3.6825 15.4453C3.81 15.7519 3.8175 16.26 3.825 16.7522C3.83906 17.6672 3.85406 18.7041 4.575 19.425C5.29594 20.1459 6.33281 20.1609 7.24781 20.175C7.74 20.1825 8.24813 20.19 8.55469 20.3175C8.88844 20.4553 9.27 20.8209 9.63937 21.1744C10.2862 21.7959 11.0213 22.5 12 22.5C12.9787 22.5 13.7128 21.7959 14.3606 21.1744C14.73 20.8209 15.1106 20.4553 15.4453 20.3175C15.7519 20.19 16.26 20.1825 16.7522 20.175C17.6672 20.1609 18.7041 20.1459 19.425 19.425C20.1459 18.7041 20.1609 17.6672 20.175 16.7522C20.1825 16.26 20.19 15.7519 20.3175 15.4453C20.4553 15.1116 20.8209 14.73 21.1744 14.3606C21.7959 13.7137 22.5 12.9787 22.5 12C22.5 11.0213 21.7959 10.2872 21.1744 9.63937ZM16.2806 10.2806L11.0306 15.5306C10.961 15.6004 10.8783 15.6557 10.7872 15.6934C10.6962 15.7312 10.5986 15.7506 10.5 15.7506C10.4014 15.7506 10.3038 15.7312 10.2128 15.6934C10.1217 15.6557 10.039 15.6004 9.96937 15.5306L7.71937 13.2806C7.57864 13.1399 7.49958 12.949 7.49958 12.75C7.49958 12.551 7.57864 12.3601 7.71937 12.2194C7.86011 12.0786 8.05098 11.9996 8.25 11.9996C8.44902 11.9996 8.63989 12.0786 8.78063 12.2194L10.5 13.9397L15.2194 9.21937C15.2891 9.14969 15.3718 9.09442 15.4628 9.0567C15.5539 9.01899 15.6515 8.99958 15.75 8.99958C15.8485 8.99958 15.9461 9.01899 16.0372 9.0567C16.1282 9.09442 16.2109 9.14969 16.2806 9.21937C16.3503 9.28906 16.4056 9.37178 16.4433 9.46283C16.481 9.55387 16.5004 9.65145 16.5004 9.75C16.5004 9.84855 16.481 9.94613 16.4433 10.0372C16.4056 10.1282 16.3503 10.2109 16.2806 10.2806Z",fill:"currentColor"})),i$="_user_auxq1_1",l$="_userImage_auxq1_13",c$="_userPhoto_auxq1_33",d$="_userInfo_auxq1_39",u$="_userInfoId_auxq1_49",p$="_userInfoEmail_auxq1_60",m$="_userInfoName_auxq1_60",h$="_userInfoFullName_auxq1_60",f$="_approvedIcon_auxq1_78",nn={user:i$,userImage:l$,userPhoto:c$,userInfo:d$,userInfoId:u$,userInfoEmail:p$,userInfoName:m$,userInfoFullName:h$,approvedIcon:f$},_$=()=>{const{user:e}=ht();return e?t.jsxs("div",{className:nn.user,children:[t.jsx(ge,{to:"/settings/edit-profile",className:nn.userImage,"aria-label":"Edit profile",children:t.jsx("img",{src:e.avatar,className:nn.userPhoto,alt:"user"})}),t.jsxs("div",{className:nn.userInfo,children:[t.jsxs("div",{className:nn.userInfoId,children:[t.jsxs("span",{children:["ID: ",e.id]}),t.jsx(it,{value:e.id,className:nn.copy})]}),e.fullName&&t.jsx("span",{className:nn.userInfoFullName,children:e.fullName}),e.name&&t.jsxs("span",{className:nn.userInfoName,children:["@",e.name]}),t.jsxs("div",{className:nn.userInfoEmail,children:[e.email," ",e.kyc===yt.approved&&t.jsx(ip,{className:nn.approvedIcon})]})]})]}):null},g$="_wrapper_1ab1s_1",v$={wrapper:g$},y$=()=>t.jsxs("div",{className:v$.wrapper,children:[t.jsx(ct,{title:"Settings"}),t.jsx(_$,{}),t.jsx(a$,{})]});function Ls(e){const n=En(),[o,{isLoading:s}]=Se.useLazyGetUserQuery(),{getRecaptchaToken:r}=Ss(),a=i.useCallback(async(l,d)=>{const u={attributes:{PLATFORM:"wallet.softnote.com",FORM_ID:d,INTEREST:"Wallet",EMAIL:l.email},email:l.email},p=await r("sendContact");fetch("https://softnote.com/api/contact",{method:"POST",body:JSON.stringify({contact:u,token:p})})},[]);return{completeAuth:i.useCallback(async l=>{try{tc(l);const d=await o().unwrap();n(_o.setAuth(!0)),e&&a(d.payload,e)}catch(d){console.log(d)}},[n,o,e,a]),isGettingUser:s}}function lp(e){const[n,{error:o,isLoading:s}]=bt.useEmailCodeResendMutation(),{getRecaptchaToken:r}=Ss(),[a,c]=i.useState(60),l=i.useCallback(async()=>{try{const d=await r("resend");if(!e)return;await n({email:e,token:d}).unwrap(),c(60)}catch(d){console.log(d)}},[r,e,n]);return i.useEffect(()=>{if(a>0){const d=setInterval(()=>{c(u=>Math.max(u-1,0))},1e3);return()=>clearInterval(d)}},[a]),{handleResendCode:l,isCodeSending:s,resendError:o,cooldownTime:a}}var Cn=(e=>(e.login="login",e.checkCode="checkCode",e.twoFA="twoFA",e))(Cn||{});const ed=e=>({step:(e==null?void 0:e.userKey)!==void 0?"twoFA":"login",email:void 0,userKey:e==null?void 0:e.userKey}),b$=()=>{const e=Fe(),[n,o]=i.useState(()=>ed(e.state)),s=i.useCallback(a=>{o(c=>({...c,...a}))},[]),r=i.useCallback(()=>{o({step:"login",email:void 0,userKey:void 0})},[]);return i.useEffect(()=>{o(ed(e.state))},[e.state]),{...n,updateState:s,resetState:r}},x$="_wrapper_1e5qq_1",C$="_form_1e5qq_10",k$="_text_1e5qq_17",w$="_actions_1e5qq_24",aa={wrapper:x$,form:C$,text:k$,actions:w$},j$=e=>{const{formik:n,email:o,onBackClick:s,onResendClick:r,isLoading:a,onSubmit:c,error:l,isCodeSending:d,cooldownTime:u}=e;return t.jsx("div",{className:aa.wrapper,children:t.jsxs("form",{id:"check-code-form",className:aa.form,onSubmit:c,children:[t.jsx(Dn,{children:"Enter the code from email"}),t.jsxs("p",{className:aa.text,children:["Please enter the 5-digit verification code that was sent to"," ",o,". The code is valid for 5 minutes."]}),t.jsx(J,{type:"text",name:"code",value:n.values.code,onChange:p=>{const m=p.target.value.replace(/[^0-9]+/g,"").slice(0,Nn);n.setFieldValue("code",m)},handleClear:()=>n.setFieldValue("code",""),label:"Code",error:n.errors.code,controlButtons:t.jsx(ar,{onClick:r,cooldownTime:u,isLoading:d})}),l&&t.jsx(V,{variant:"error",message:l,animated:!0}),t.jsx(xi,{}),t.jsxs("div",{className:aa.actions,children:[t.jsx(O,{onClick:s,variant:"secondary",children:"Back"}),t.jsx(O,{type:"submit",form:"check-code-form",isLoading:a,disabled:n.values.code.length!==5,children:"Next"})]})]})})},S$=()=>Ie().shape({code:ae().required().onlyNumbers().min(Nn).max(Nn)}),N$=({state:e})=>{const[n,o]=i.useState(!1),{updateState:s,resetState:r,email:a}=e,{completeAuth:c,isGettingUser:l}=Ls("wallet_login"),[d,{data:u,error:p,isLoading:m}]=bt.useAuthCheckMutation(),h=Me({initialValues:{code:""}
74,validationSchema:S$(),validateOnChange:n,onSubmit:({code:b})=>{a&&d({code:b,email:a})}});i.useEffect(()=>{if(!(u!=null&&u.payload))return;const{payload:b}=u;c(b)},[u]),i.useEffect(()=>{p&&Ns(p)===10010&&r()},[p]);const f=()=>{s({step:Cn.login})},_=b=>{b.preventDefault(),!(m||l)&&(o(!0),h.handleSubmit())};i.useEffect(()=>{const b=setTimeout(()=>{r()},bi);return()=>{clearTimeout(b)}},[]);const{handleResendCode:v,isCodeSending:g,resendError:C,cooldownTime:y}=lp(a);return t.jsx(j$,{formik:h,email:a??"",onBackClick:f,onResendClick:v,isCodeSending:g,cooldownTime:y,isLoading:m||l,onSubmit:_,error:Q(p||C)})};var yo=(e=>(e[e.success=1]="success",e[e.invalidRequest=0]="invalidRequest",e[e.auth2FA=10005]="auth2FA",e[e.emailConfirmRequired=10019]="emailConfirmRequired",e))(yo||{});const cp=e=>i.createElement("svg",{viewBox:"0 0 38 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("rect",{width:38,height:38,rx:4,fill:"#487BFF"}),i.createElement("path",{d:"M22.0096 8.93512C21.7071 8.64173 21.296 8.4873 20.8771 8.4873H13.7099C12.973 8.4873 12.3292 9.01233 12.1895 9.73811L11.6155 12.6721C11.5768 12.8883 11.7397 13.089 11.9646 13.089H13.0118C13.2134 13.089 13.3841 12.9501 13.4229 12.7493L13.9038 10.2631H20.6367L17.2004 27.7281H10.4675L10.9407 25.3191C10.9795 25.1029 10.8166 24.9022 10.5917 24.9022H9.55225C9.35057 24.9022 9.17993 25.0412 9.14114 25.2419L8.66798 27.6663C8.56714 28.1759 8.73003 28.6932 9.10236 29.0638C9.39711 29.3572 9.80822 29.5117 10.2271 29.5117H17.3943C18.1312 29.5117 18.775 28.9866 18.9147 28.2608L22.4362 10.3326C22.5371 9.82304 22.3819 9.29801 22.0096 8.93512Z",fill:"white"}),i.createElement("path",{d:"M20.9856 29.5039H22.0328C22.2345 29.5039 22.4051 29.365 22.4439 29.1642L26.4231 8.90424C26.4619 8.68805 26.299 8.4873 26.0741 8.4873H25.0269C24.8252 8.4873 24.6546 8.62628 24.6158 8.82703L20.6366 29.087C20.5978 29.3032 20.7607 29.5039 20.9856 29.5039Z",fill:"white"}),i.createElement("path",{d:"M24.6854 29.5039H25.7326C25.9343 29.5039 26.1049 29.365 26.1437 29.1642L30.1307 8.90424C30.1694 8.68805 30.0066 8.4873 29.7816 8.4873H28.7344C28.5328 8.4873 28.3621 8.62628 28.3233 8.82703L24.3441 29.0947C24.2976 29.3032 24.4682 29.5039 24.6854 29.5039Z",fill:"white"}),i.createElement("path",{d:"M7.90959 21.0106C7.97677 20.7102 8.2571 20.4893 8.92741 20.4893C9.59771 20.4893 9.78382 20.7125 9.72204 21.0106V21.0476C9.61007 21.5936 9.99542 21.979 10.6657 21.979C11.3731 21.979 11.8573 21.6438 11.9693 21.06C12.0936 20.4267 11.7585 20.0669 10.5414 19.6445C9.17607 19.1726 8.4185 18.3286 8.67951 17.0127C8.98996 15.4234 10.4302 14.4805 12.0187 14.4805C13.7439 14.4805 14.7756 15.5724 14.4026 16.9756C14.3238 17.2706 14.0551 17.4969 13.3848 17.4969C12.7145 17.4969 12.5284 17.2737 12.5902 16.9756L12.6025 16.9138C12.6898 16.4173 12.3793 16.0203 11.7214 16.0203C11.0634 16.0203 10.641 16.3431 10.5298 16.8644C10.4302 17.3733 10.753 17.8204 11.9199 18.2544C13.3354 18.788 14.1045 19.5086 13.8188 20.948C13.5207 22.4871 12.2542 23.4902 10.38 23.518C8.53202 23.5451 7.62231 22.2948 7.90959 21.0106Z",fill:"white"})),L$="_or_7feh9_1",E$={or:L$},dp=()=>t.jsxs("div",{className:E$.or,children:[t.jsx("hr",{}),t.jsx("span",{children:"or continue with"}),t.jsx("hr",{})]}),$$="_tabs_u5rs3_1",T$="_tabButton_u5rs3_13",M$="_active_u5rs3_28",Zs={tabs:$$,tabButton:T$,active:M$},up=()=>t.jsxs("div",{className:Zs.tabs,children:[t.jsx(Er,{to:"/registration",className:({isActive:e})=>L(Zs.tabButton,{[Zs.active]:e}),children:"Sign Up"}),t.jsx(Er,{to:"/login",className:({isActive:e})=>L(Zs.tabButton,{[Zs.active]:e}),children:"Sign In"})]});var pp=(e=>(e.apple="apple",e.google="google",e.facebook="facebook",e))(pp||{}),oo=(e=>(e.Init="Init",e.Success="Success",e.Timeout="Timeout",e.Confirm="Confirm",e.Authorized="Authorized",e.Cancel="Cancel",e))(oo||{});const D$=e=>i.createElement("svg",{viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M19.332 7.293C17.701 5 15.028 3.5 12 3.5C7.029 3.5 3 7.529 3 12.5C3 13.039 3.056 13.564 3.147 14.076",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.42383 20.094V17.707H6.81283",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.66797 17.7088C6.29897 20.0018 8.97197 21.5018 12 21.5018C16.971 21.5018 21 17.4728 21 12.5018C21 11.9628 20.944 11.4378 20.853 10.9258",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.5755 4.90625V7.29325H17.1865",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),P$=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("rect",{x:3,y:3,width:18,height:18,rx:5,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("rect",{x:13.5,y:7,width:3.5,height:3.5,rx:.5,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("rect",{x:7,y:7,width:3.5,height:3.5,rx:.5,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("rect",{x:7,y:13.5,width:3.5,height:3.5,rx:.5,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.255 15.25L15.25 15.255L15.245 15.25L15.25 15.245L15.255 15.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.9552 13.5508L16.9502 13.5558L16.9452 13.5508L16.9502 13.5458L16.9552 13.5508",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.5548 13.5508L13.5498 13.5558L13.5448 13.5508L13.5498 13.5458L13.5548 13.5508",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.9552 17.0508L16.9502 17.0558L16.9452 17.0508L16.9502 17.0458L16.9552 17.0508",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.5548 17.0508L13.5498 17.0558L13.5448 17.0508L13.5498 17.0458L13.5548 17.0508",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),I$=e=>i.createElement("svg",{width:160,height:118,viewBox:"0 0 160 118",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("g",{clipPath:"url(#clip0_9050_33474)"},i.createElement("mask",{id:"path-1-inside-1_9050_33474",fill:"white"},i.createElement("path",{d:"M0 10.24C0 4.5846 4.5846 0 10.24 0H149.76C155.415 0 160 4.5846 160 10.24V118H0V10.24Z"})),i.createElement("path",{d:"M0 10.24C0 4.5846 4.5846 0 10.24 0H149.76C155.415 0 160 4.5846 160 10.24V118H0V10.24Z",fill:"#12161E"}),i.createElement("rect",{x:6.82715,y:6.97656,width:13.6533,height:13.6533,rx:6.82667,fill:"#2F3748"}),i.createElement("g",{opacity:.3},i.createElement("path",{d:"M126.401 14.5212V14.4027C126.401 14.0153 126.641 13.8053 126.881 13.6441C127.115 13.4863 127.349 13.2805 127.349 12.9013C127.349 12.3774 126.925 11.9531 126.401 11.9531C125.877 11.9531 125.453 12.3774 125.453 12.9013",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M126.395 15.8164C126.33 15.8164 126.277 15.8695 126.277 15.9349C126.277 16.0003 126.33 16.0534 126.396 16.0534C126.461 16.0534 126.514 16.0003 126.514 15.9349C126.514 15.8695 126.461 15.8164 126.395 15.8164",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("rect",{x:122.132,y:9.57812,width:8.53333,height:8.53333,rx:4.26667,stroke:"white",strokeWidth:.64})),i.createElement("g",{clipPath:"url(#clip1_9050_33474)"},i.createElement("rect",{x:6.82715,y:28.3125,width:145.744,height:88.9651,rx:6.82667,fill:"url(#paint0_linear_9050_33474)"}),i.createElement("rect",{x:54.8184,y:38.5508,width:49.7608,height:9.95215,rx:3.0622,fill:"white",fillOpacity:.1}),i.createElement("rect",{x:37.5938,y:51.5664,width:84.2105,height:16.8421,rx:3.0622,fill:"white",fillOpacity:.1}),i.createElement("rect",{x:68.2158,y:69.9414,width:22.9665,height:9.1866,rx:3.0622,fill:"white",fillOpacity:.1}),i.createElement("rect",{x:25.584,y:85.9531,width:24.4976,height:24.4976,rx:3.0622,fill:"white",fillOpacity:.1}),i.createElement("rect",{x:53.4951,y:85.9531,width:24.4976,height:24.4976,rx:3.0622,fill:"white",fillOpacity:.1}),i.createElement("rect",{x:81.4062,y:85.9531,width:24.4976,height:24.4976,rx:3.0622,fill:"white",fillOpacity:.1}),i.createElement("rect",{x:109.317,y:85.9531,width:24.4976,height:24.4976,rx:3.0622,fill:"white",fillOpacity:.1}))),i.createElement("path",{d:"M-4.5933 9.91191C-4.5933 1.7197 2.04779 -4.92139 10.24 -4.92139H149.76C157.952 -4.92139 164.593 1.7197 164.593 9.91191L155.407 10.24C155.407 7.30262 152.879 4.92139 149.76 4.92139H10.24C7.12142 4.92139 4.5933 7.30262 4.5933 10.24L-4.5933 9.91191ZM160 118H0H160ZM-4.5933 118V9.91191C-4.5933 1.7197 2.04779 -4.92139 10.24 -4.92139L10.24 4.92139C7.12142 4.92139 4.5933 7.30262 4.5933 10.24V118H-4.5933ZM149.76 -4.92139C157.952 -4.92139 164.593 1.7197 164.593 9.91191V118H155.407V10.24C155.407 7.30262 152.879 4.92139 149.76 4.92139V-4.92139Z",fill:"#41454B",mask:"url(#path-1-inside-1_9050_33474)"}),i.createElement("rect",{y:70,width:160,height:48,fill:"url(#paint1_linear_9050_33474)"}),i.createElement("rect",{x:110.881,y:23.9766,width:35.4958,height:35.4958,rx:17.7479,fill:"#41454B"}),i.createElement("path",{d:"M137.205 42.5437H120.158",stroke:"white",strokeWidth:1.21008,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M135.687 39.125V37.5497C135.687 36.074 134.48 34.8672 133.005 34.8672H131.679",stroke:"white",strokeWidth:1.21008,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M121.676 39.125V37.5463C121.676 36.0681 122.873 34.8697 124.351 34.868L125.707 34.8672",stroke:"white",strokeWidth:1.21008,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M135.687 42.543V46.1982C135.687 47.673 134.48 48.8807 133.005 48.8807H131.679",stroke:"white",strokeWidth:1.21008,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M121.676 42.543V46.2016C121.676 47.6797 122.873 48.8781 124.351 48.8798L125.707 48.8807",stroke:"white",strokeWidth:1.21008,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M141.136 20.6067L140.531 28.641L134.48 25.1478L141.136 20.6067Z",fill:"#41454B"}),i.createElement("path",{d:"M150.887 14.2977H141.871",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M150.084 12.4902V11.657C150.084 10.8766 149.446 10.2383 148.665 10.2383H147.964",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M142.674 12.4902V11.6552C142.674 10.8734 143.307 10.2396 144.089 10.2387L144.806 10.2383",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M150.084 14.2969V16.2301C150.084 17.0101 149.446 17.6488 148.665 17.6488H147.964",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M142.674 14.2969V16.2319C142.674 17.0136 143.307 17.6475 144.089 17.6484L144.806 17.6488",stroke:"white",strokeWidth:.64,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("defs",null,i.createElement("linearGradient",{id:"paint0_linear_9050_33474",x1:79.6994,y1:-10.7717,x2:79.6994,y2:119.869,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#7384AA",stopOpacity:.2}),i.createElement("stop",{offset:1,stopColor:"#2261F6",stopOpacity:.05})),i.createElement("linearGradient",{id:"paint1_linear_9050_33474",x1:80.3828,y1:70,x2:80.3828,y2:118,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#20242B",stopOpacity:0}),i.createElement("stop",{offset:1,stopColor:"#20242B"})),i.createElement("clipPath",{id:"clip0_9050_33474"},i.createElement("path",{d:"M0 10.24C0 4.5846 4.5846 0 10.24 0H149.76C155.415 0 160 4.5846 160 10.24V118H0V10.24Z",fill:"white"})),i.createElement("clipPath",{id:"clip1_9050_33474"},i.createElement("rect",{x:6.82715,y:28.3125,width:145.744,height:88.9651,rx:6.82667,fill:"white"})))),B$="_qrButton_1cx99_1",R$="_qrIcon_1cx99_13",A$="_qrPanel_1cx99_18",O$="_open_1cx99_33",F$="_qrContent_1cx99_39",q$="_images_1cx99_62",W$="_qrWrapper_1cx99_69",V$="_backdrop_1cx99_78",H$="_refresh_1cx99_110",_n={qrButton:B$,qrIcon:R$,qrPanel:A$,open:O$,qrContent:F$,images:q$,qrWrapper:W$,backdrop:V$,refresh:H$},U$=()=>{var $,T,M,P,B;const[e,n]=i.useState(!1),{Canvas:o}=Ya(),[s,r]=i.useState(()=>Li()),{completeAuth:a}=Ls("wallet_login"),c=()=>{let I=se.get(re.browserId);return I||(I=Li(),se.set(re.browserId,I)),I},[l,{data:d,isFetching:u,error:p}]=bt.useLazyQrCodeGenerateQuery(),[m,{data:h,error:f,isFetching:_}]=bt.useLazyQrCodeCheckQuery(),[v,{data:g}]=bt.useLazyQrCodeAuthQuery(),C=($=d==null?void 0:d.payload)==null?void 0:$.qrCode,y=JSON.stringify({sessionId:s,qrCode:C,ipAddress:(T=d==null?void 0:d.payload)==null?void 0:T.ipAddress,currentDate:(M=d==null?void 0:d.payload)==null?void 0:M.currentDate,location:(P=d==null?void 0:d.payload)==null?void 0:P.location,device:(B=d==null?void 0:d.payload)==null?void 0:B.device}),b=h==null?void 0:h.payload.qrCodeStatus,x=b===oo.Timeout||b===oo.Cancel||f,N=!f&&b===oo.Confirm,S=p&&!u;i.useEffect(()=>{e&&!f&&l({deviceId:c(),sessionId:s},!0)},[e,f]),i.useEffect(()=>{let I;return C&&!x&&!u&&(I=setInterval(()=>{m({deviceId:c(),sessionId:s,qrCode:C})},3e3)),()=>clearInterval(I)},[C,x,u]),i.useEffect(()=>{b===oo.Success&&C&&v({deviceId:c(),sessionId:s,qrCode:C})},[b,C]),i.useEffect(()=>{g&&a(g.payload)},[g,a]);const j=async()=>{const I=Li();r(I);const A=await l({deviceId:c(),sessionId:I}).unwrap();m({deviceId:c(),sessionId:I,qrCode:A.payload.qrCode})};return t.jsxs("div",{className:_n.qrButton,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[t.jsx(P$,{className:_n.qrIcon}),t.jsx("div",{className:L(_n.qrPanel,{[_n.open]:e}),children:t.jsxs("div",{className:_n.qrContent,children:[t.jsxs("div",{className:_n.images,children:[t.jsxs("div",{className:_n.qrWrapper,children:[d&&t.jsx(o,{text:y,options:{margin:2,width:160,color:{dar
74k:"#000000",light:"#ffffff"}}}),(x||u||S||N)&&t.jsxs("div",{className:_n.backdrop,children:[!u&&(x||S)&&t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:j,disabled:u,className:_n.refresh,children:t.jsx(D$,{})}),t.jsx("span",{children:S?"Error. Please update the QR":"Refresh the QR"})]}),u&&t.jsx(Tn,{}),N&&t.jsx("span",{children:"Please confirm your login in the app"})]})]}),t.jsx(I$,{})]}),t.jsxs("p",{children:["Scan the QR code with the"," ",t.jsx("a",{href:"https://softnote.com/mobile-wallet-app",target:"_blank",rel:"noreferrer",children:"SoftNote Wallet app"})," ","for quick login"]})]})})]})},Y$=()=>Bt(ks)?null:t.jsx(U$,{}),K$="_button_ng31m_1",G$={button:K$},z$=()=>t.jsx(Er,{to:"/password-reset",className:G$.button,children:"Forgot Password?"}),Z$=(e,n,o)=>{i.useEffect(()=>{const s=document.createElement("script");return s.src=e,s.onload=n,document.head.appendChild(s),()=>{document.head.removeChild(s)}},[e,n,o])},Q$="_google_h52or_1",X$="_loading_h52or_11",td={google:Q$,loading:X$,"google-shadow-spin":"_google-shadow-spin_h52or_1"},mp=({onError:e,refId:n})=>{const o=Zt(),{completeAuth:s,isGettingUser:r}=Ls("wallet_login"),[a,{data:c,error:l,isLoading:d}]=bt.useSocialAuthMutation(),u=i.useRef(null),p=i.useCallback(f=>{const _=f.credential;if(!_){console.error("Google token Error");return}a({providerName:pp.google,s:_})},[a]),m="https://accounts.google.com/gsi/client",h=i.useCallback(()=>{window&&window.google&&u.current&&(window.google.accounts.id.initialize({client_id:"506561294071-4pft9847g9ofantkrdvhft5eujj3qkv4.apps.googleusercontent.com",callback:p}),window.google.accounts.id.renderButton(u.current,{type:"icon",theme:"filled_black",shape:"pill"}))},[p]);return i.useEffect(()=>{if(!(c!=null&&c.payload))return;const{payload:f}=c;if(f.regKey){const _=n?`?ref=${encodeURIComponent(n)}`:"";o(`/registration${_}`,{state:{regKey:f.regKey}});return}if(f.userKey&&c.status===yo.auth2FA){o("/login",{state:{userKey:f.userKey}});return}f.accessToken&&s(f)},[c,s,o,n]),i.useEffect(()=>{l&&e(Q(l))},[l,e]),Z$(m,h),t.jsx("div",{ref:u,className:L(td.google,{[td.loading]:d||r})})},J$="_wrapper_1575s_1",eT="_form_1575s_10",tT="_actions_1575s_16",nT="_passwordLabel_1575s_22",rT="_title_1575s_27",sT="_submitButton_1575s_42",oT="_error_1575s_49",aT="_beta_1575s_61",iT="_snlogo_1575s_71",ts={wrapper:J$,form:eT,actions:tT,passwordLabel:nT,title:rT,submitButton:sT,error:oT,beta:aT,snlogo:iT},lT=e=>{const{formik:n,isLoading:o,onSubmit:s,onError:r,error:a,isFromEposPage:c}=e;return t.jsxs("div",{className:ts.wrapper,children:[t.jsx(up,{}),t.jsxs("h1",{className:ts.title,children:[c?t.jsxs(t.Fragment,{children:["Access your ",t.jsx("br",{})," account to pay"]}):t.jsxs(t.Fragment,{children:["Log into your ",t.jsx("br",{})," SoftNote account"]}),t.jsx(Y$,{})]}),t.jsxs("form",{id:"login-form",className:ts.form,onSubmit:s,children:[t.jsx(J,{name:"login",value:n.values.login,onChange:n.handleChange,handleClear:()=>n.setFieldValue("login",""),label:"Email",error:n.errors.login}),t.jsx(J,{name:"password",value:n.values.password,onChange:n.handleChange,handleClear:()=>n.setFieldValue("password",""),label:t.jsxs("div",{className:ts.passwordLabel,children:[t.jsx("span",{children:"Password"}),t.jsx(z$,{})]}),error:n.errors.password,showPassword:!0}),a&&t.jsx(V,{variant:"error",message:a,animated:!0}),t.jsx("p",{className:ts.beta,children:"SoftNote Wallet works in beta mode, there may be some failures in the work."}),t.jsx(O,{form:"login-form",type:"submit",isLoading:o,disabled:!at(n),children:"Log In"}),t.jsx(dp,{}),t.jsx(mp,{onError:r}),c&&t.jsxs(O,{as:"a",href:"https://download.softnote.com",target:"_blank",rel:"noreferrer",children:[t.jsx(cp,{className:ts.snlogo})," Download the App"]})]})]})},cT=()=>Ie({login:ae().email().max(dc).trim().required(),password:ae().max(255).required()}),dT=({state:e})=>{var y,b;const s=((b=(y=Fe().state)==null?void 0:y.from)==null?void 0:b.pathname)==="/epos",[r,a]=i.useState(!1),[c,l]=i.useState(""),{updateState:d}=e,{completeAuth:u,isGettingUser:p}=Ls("wallet_login"),[m,{data:h,isLoading:f,error:_}]=bt.useAuthMutation(),{getRecaptchaToken:v}=Ss(),g=Me({initialValues:{login:"",password:""},validationSchema:cT(),validateOnChange:r,onSubmit:async({login:x,password:N})=>{const S=await v("signIn");m({login:x,password:N,token:S})}});i.useEffect(()=>{if(!h)return;const{payload:x}=h;if(x!=null&&x.userKey&&h.status===yo.auth2FA){d({step:Cn.twoFA,userKey:x.userKey});return}if(x!=null&&x.accessToken){u(x);return}h.status===yo.emailConfirmRequired&&d({step:Cn.checkCode,email:g.values.login})},[h]),i.useEffect(()=>{_&&Ns(_)===10100&&d({step:Cn.checkCode})},[_]);const C=x=>{x.preventDefault(),!(f||p||g.isSubmitting)&&(a(!0),g.handleSubmit())};return t.jsx(lT,{formik:g,isLoading:f||p,onSubmit:C,onError:l,error:Q(_)||c,isFromEposPage:s})},uT="_wrapper_hejs6_1",pT="_form_hejs6_10",mT="_text_hejs6_17",hT="_button_hejs6_24",ia={wrapper:uT,form:pT,text:mT,button:hT},fT=e=>{const{isLoading:n,onBackClick:o,error:s,formik:r}=e;return t.jsx("div",{className:ia.wrapper,children:t.jsxs("div",{className:ia.form,children:[t.jsx(Dn,{children:"Security verification"}),t.jsx("p",{className:ia.text,children:"Enter the 6-digit code from Google Authenticator"}),t.jsx(J,{type:"text",name:"code",value:r.values.code,onChange:a=>{const c=a.target.value.replace(/[^0-9]+/g,"").slice(0,sr);r.setFieldValue("code",c)},label:"Code"}),s&&t.jsx(V,{variant:"error",message:s,animated:!0}),t.jsx(xi,{}),t.jsx(O,{onClick:o,variant:"secondary",className:ia.button,isLoading:n,children:"Back"})]})})},_T=()=>Ie().shape({code:ae().required().onlyNumbers().min(sr)}),gT=({state:e})=>{const[n,o]=i.useState(!1),{userKey:s,resetState:r,updateState:a}=e,{completeAuth:c,isGettingUser:l}=Ls("wallet_login"),[d,{data:u,error:p,isLoading:m}]=bt.useAuth2FAMutation(),h=Me({initialValues:{code:""},validationSchema:_T(),validateOnChange:n,onSubmit:({code:v})=>{s&&d({code:v,userKey:s})}});i.useEffect(()=>{if(!(u!=null&&u.payload))return;const{payload:v}=u;c(v)},[u]),i.useEffect(()=>{p&&Ns(p)===10010&&r()},[p]);const f=()=>{a({step:Cn.login})};i.useEffect(()=>{const v=setTimeout(()=>{r()},bi);return()=>{clearTimeout(v)}},[]);const _=()=>{m||l||(o(!0),h.handleSubmit())};return i.useEffect(()=>{h.values.code.length===sr&&_()},[h.values.code]),t.jsx(fT,{formik:h,isLoading:m||l,onBackClick:f,error:Q(p)})},vT=()=>{const e=b$();return{[Cn.login]:t.jsx(dT,{state:e}),[Cn.checkCode]:t.jsx(N$,{state:e}),[Cn.twoFA]:t.jsx(gT,{state:e})}[e.step]};var Nr=(e=>(e.preRegistration="preRegistration",e.checkCode="checkCode",e.registration="registration",e))(Nr||{});const nd=(e,n)=>
74{const o=(e==null?void 0:e.regKey)!==void 0,r=new URLSearchParams(n).get("ref")||void 0;return{step:o?"registration":"preRegistration",email:void 0,regKey:e==null?void 0:e.regKey,refId:r}},yT=()=>{const e=Fe(),[n,o]=i.useState(()=>nd(e.state,e.search)),s=i.useCallback(a=>{o(c=>({...c,...a}))},[]),r=i.useCallback(()=>{o({step:"preRegistration",email:void 0,regKey:void 0,refId:void 0})},[]);return i.useEffect(()=>{o(nd(e.state,e.search))},[e.state,e.search]),{...n,updateState:s,resetState:r}},bT="_wrapper_1e5qq_1",xT="_form_1e5qq_10",CT="_text_1e5qq_17",kT="_actions_1e5qq_24",la={wrapper:bT,form:xT,text:CT,actions:kT},wT=e=>{const{formik:n,email:o,onBackClick:s,onResendClick:r,isLoading:a,onSubmit:c,error:l,cooldownTime:d,isCodeSending:u}=e;return t.jsx("div",{className:la.wrapper,children:t.jsxs("form",{className:la.form,id:"check-code-form",onSubmit:c,children:[t.jsx(Dn,{children:"Enter the code from email"}),t.jsxs("p",{className:la.text,children:["Please enter the 5-digit verification code that was sent to"," ",o,". The code is valid for 5 minutes."]}),t.jsx(J,{type:"text",name:"code",value:n.values.code,onChange:p=>{const m=p.target.value.replace(/[^0-9]+/g,"").slice(0,Nn);n.setFieldValue("code",m)},handleClear:()=>n.setFieldValue("code",""),label:"Code",error:n.errors.code,controlButtons:t.jsx(ar,{onClick:r,cooldownTime:d,isLoading:u})}),l&&t.jsx(V,{variant:"error",message:l,animated:!0}),t.jsxs("div",{className:la.actions,children:[t.jsx(O,{variant:"secondary",onClick:s,children:"Back"}),t.jsx(O,{form:"check-code-form",type:"submit",isLoading:a,disabled:n.values.code.length!==5,children:"Next"})]})]})})},jT=()=>Ie().shape({code:ae().required().min(5).max(5)}),ST=({state:e})=>{const[n,o]=i.useState(!1),{email:s,updateState:r,resetState:a}=e,[c,{data:l,error:d,isLoading:u}]=bt.useRegistrationEmailCodeCheckMutation(),p=Me({initialValues:{code:""},validationSchema:jT(),validateOnChange:n,onSubmit:({code:C})=>{s&&c({code:C,email:s})}});i.useEffect(()=>{if(!(l!=null&&l.payload))return;const{payload:C}=l;r({step:Nr.registration,regKey:C.regKey})},[l]),i.useEffect(()=>{d&&Ns(d)===10010&&a()},[d]);const m=()=>{r({step:Nr.preRegistration})},h=C=>{C.preventDefault(),!u&&(o(!0),p.handleSubmit())};i.useEffect(()=>{const C=setTimeout(()=>{a()},bi);return()=>{clearTimeout(C)}},[]);const{handleResendCode:f,isCodeSending:_,resendError:v,cooldownTime:g}=lp(s);return t.jsx(wT,{formik:p,email:s??"",onBackClick:m,onResendClick:f,isCodeSending:_,cooldownTime:g,isLoading:u,onSubmit:h,error:Q(d||v)})},NT="_wrapper_1ldt6_1",LT="_form_1ldt6_10",ET="_submitButton_1ldt6_16",$T="_title_1ldt6_24",TT="_refWrapper_1ldt6_36",MT="_noGap_1ldt6_43",DT="_refFieldWrapper_1ldt6_47",PT="_refFieldWrapperHidden_1ldt6_54",IT="_refTitle_1ldt6_60",BT="_refTitleFolded_1ldt6_75",RT="_arrow_1ldt6_82",AT="_rotated_1ldt6_88",Tt={wrapper:NT,form:LT,submitButton:ET,title:$T,refWrapper:TT,noGap:MT,refFieldWrapper:DT,refFieldWrapperHidden:PT,refTitle:IT,refTitleFolded:BT,arrow:RT,rotated:AT},OT=e=>{const{formik:n,isLoading:o,onSubmit:s,onError:r,error:a,showReferralId:c,refId:l,onRefClick:d}=e;return t.jsxs("div",{className:Tt.wrapper,children:[t.jsx(up,{}),t.jsxs("h1",{className:Tt.title,children:["Create your ",t.jsx("br",{})," SoftNote account"]}),t.jsxs("form",{className:Tt.form,id:"preRegistration-form",onSubmit:s,children:[t.jsx(J,{type:"text",name:"email",value:n.values.email||"",onChange:n.handleChange,handleClear:()=>n.setFieldValue("email",""),label:"Email",error:n.errors.email}),t.jsxs("div",{className:L(Tt.refWrapper,{[Tt.noGap]:!c}),children:[t.jsxs("div",{className:L(Tt.refTitle,{[Tt.refTitleFolded]:!c}),onClick:d,children:["Referral ID (Optional)",t.jsx(nr,{className:L(Tt.arrow,{[Tt.rotated]:c})})]}),t.jsx("div",{className:L(Tt.refFieldWrapper,{[Tt.refFieldWrapperHidden]:!c}),children:t.jsx(J,{type:"text",name:"ref",value:n.values.ref||"",onChange:n.handleChange,handleClear:()=>n.setFieldValue("ref",""),error:n.errors.ref})})]}),a&&t.jsx(V,{variant:"error",message:a,animated:!0}),t.jsx(O,{form:"preRegistration-form",type:"submit",className:Tt.submitButton,isLoading:o,disabled:!at(n,["ref"]),children:"Create Account"}),t.jsx(dp,{}),t.jsx(mp,{onError:r,refId:l})]})]})},FT=()=>Ie().shape({email:ae().email().min(6).max(50).trim().required(),ref:ae().onlyNumbers().min(2).max(5).trim()}),qT=({state:e})=>{const{updateState:n,refId:o}=e,[s,r]=i.useState(!1),[a,c]=i.useState(""),[l,d]=i.useState(!!o),[u,{data:p,error:m,isLoading:h}]=bt.usePreRegistrationMutation(),{getRecaptchaToken:f}=Ss(),_=Me({initialValues:{email:"",ref:o||""},validationSchema:FT(),validateOnChange:s,onSubmit:async({email:g})=>{const C=await f("signUp");u({email:g,token:C})}});i.useEffect(()=>{(p==null?void 0:p.status)===yo.emailConfirmRequired&&n({step:Nr.checkCode,email:_.values.email,refId:_.values.ref||void 0})},[p]);const v=g=>{g.preventDefault(),!(h||_.isSubmitting)&&(r(!0),_.handleSubmit())};return t.jsx(OT,{formik:_,isLoading:h,onSubmit:v,onError:c,error:Q(m)||a,showReferralId:l,refId:o,onRefClick:()=>d(g=>!g)})},WT="_wrapper_1s1cr_1",VT="_form_1s1cr_10",HT="_actions_1s1cr_17",ol={wrapper:WT,form:VT,actions:HT},UT=e=>{const{formik:n,onBackClick:o,isLoading:s,onSubmit:r,error:a,isPasswordValid:c,setIsPasswordValid:l}=e;return t.jsxs("div",{className:ol.wrapper,children:[t.jsx(Dn,{children:"Create a password"}),t.jsxs("form",{className:ol.form,id:"registration-form",onSubmit:r,children:[t.jsx(J,{name:"password",value:n.values.password,onChange:d=>{const u=d.target.value.replace(/[^a-zA-Z0-9!@#$%\-_&*()]+/g,"");n.setFieldValue(d.target.name,u)},handleClear:()=>n.setFieldValue("password",""),label:"Password",showPassword:!0}),t.jsx(J,{name:"confirmPassword",value:n.values.confirmPassword,onChange:d=>{const u=d.target.value.replace(/[^a-zA-Z0-9!@#$%\-_&*()]+/g,"");n.setFieldValue(d.target.name,u)},handleClear:()=>n.setFieldValue("confirmPassword",""),label:"Confirm password",showPassword:!0}),t.jsx(kc,{setIsPasswordValid:l,password:n.values.password,confirmPassword:n.values.confirmPassword,isMatchError:n.errors.confirmPassword}),a&&t.jsx(V,{variant:"error",message:a,animated:!0}),t.jsxs("div",{className:ol.actions,children:[t.jsx(O,{variant:"secondary",onClick:o,children:"Back"}),t.jsx(O,{type:"submit",form:"registration-form",isLoading:s,disabled:!at(n)||!c,children:"Create Account"})]})]})]})},YT=()=>Ie().shape({password:ae().min(6).max(32).required(),confirmPassword:ae().required().oneOf([Gl("password"),null])}),KT=({state:e})=>{const[n,o]=i.useState(!1),[s,r]=i.useState(!1),{regKey:a,resetState:c,refId:l}=e,{completeAuth:d,isGettingUser:u}=Ls("wallet_register"),[p,{data:m,error:h,isLoading:f}]=bt.useRegistrationMutation(),_=Me({initialValues:{password:"",confirmPassword:""},validationSchema:YT(),validateOnChange:n,onSubmit:({password:C})=>{a&&p({regKey:a,password:C,refId:l?Number(l):void 0})}});i.useEffect(()=>{if(!(m!=null&&m.payload))return;const{payload:C}=m;d(C)},[m,d]),i.useEffect(()=>{h&&Ns(h)===10010&&c()},[h]);const v=()=>{c()},g=C=>{C.preventDefault(),!(f||u||!s)&&(o(!0),_.handleSubmit())};return t.jsx(UT,{formik:_,onBackClick:v,isLoading:f||u,onSubmit:g,error:Q(h),isPasswordValid:s,setIsPasswordValid:r})},GT=()=>{const e=yT();return{[Nr.preRegistration]:t.jsx(qT,{state:e}),[Nr.checkCode]:t.jsx(ST,{state:e}),[Nr.registration]:t.jsx(KT,{state:e})}[e.step]};var rt=(e=>(e[e.none=0]="none",e[e.open=1]="open",e[e.close=2]="close",e))(rt||{}),Qn=(e=>
74(e[e.open=1]="open",e[e.completed=2]="completed",e[e.pending=3]="pending",e))(Qn||{}),Xn=(e=>(e[e.createStaking=0]="createStaking",e[e.closeStaking=1]="closeStaking",e[e.rewards=2]="rewards",e))(Xn||{});const or=Ba.injectEndpoints({endpoints:e=>({getPool:e.infiniteQuery({infiniteQueryOptions:{initialPageParam:1,getNextPageParam:(n,o,s)=>n.length<ln?void 0:s+1},query:({queryArg:{status:n,currencyKey:o},pageParam:s})=>({url:"/v1/staking/user",method:"GET",params:{rows:ln,page:s,...n!==rt.none?{status:n}:void 0,...o!=="all"?{currencyKey:o}:void 0}}),transformResponse:n=>n.stakings,providesTags:[{type:"Staking"}]}),createStaking:e.mutation({query:n=>({url:"/v1/staking",method:"POST",body:n}),invalidatesTags:n=>n?[{type:"Staking"}]:[]}),getStakingDetails:e.query({query:n=>({url:`/v1/staking/${n}`,method:"GET"})}),getStakingHistory:e.query({query:({id:n,...o})=>({url:`/v1/staking/${n}/histories`,method:"GET",params:o})}),getHistory:e.infiniteQuery({infiniteQueryOptions:{initialPageParam:1,getNextPageParam:(n,o,s)=>n.length<ln?void 0:s+1},query:({pageParam:n})=>({url:"/v1/staking/histories/user",method:"GET",params:{rows:ln,page:n}}),transformResponse:n=>n.histories,providesTags:[{type:"Staking"}]}),getRules:e.query({query:()=>({url:"/v1/staking/rules/all",method:"GET"})}),getStatistics:e.query({query:()=>({url:"/v2/staking/statistics",method:"GET"}),providesTags:[{type:"Staking"}]})})});function Or(e="tectum-t12-tet"){const{data:n}=or.useGetRulesQuery();return n==null?void 0:n.rules.find(o=>o.currencyKey===e)}function zT(e){return Math.round(Math.max(...e.map(({rate:n})=>n)))}function hp(e){const n=Math.round(e.duration/30);return n>1?`${n} months`:`${n} month`}const ZT="_tableWrapper_10x4q_1",QT="_tableHead_10x4q_5",XT="_note_10x4q_14",JT="_loader_10x4q_24",Qs={tableWrapper:ZT,tableHead:QT,note:XT,loader:JT},fp=({currencyKey:e="tectum-t12-tet"})=>{const n=Or(e);return n?t.jsxs("div",{className:Qs.tableWrapper,children:[t.jsx(lt,{data:[{label:t.jsx("span",{className:Qs.tableHead,children:"Staking term"}),value:t.jsx("span",{className:Qs.tableHead,children:"APY"})},...n.rates.map(o=>({label:hp(o),value:`${o.rate}%`}))]}),t.jsx("p",{className:Qs.note,children:"(Each month is counted as 30 days.)"})]}):t.jsx("div",{className:Qs.loader,children:t.jsx(H,{count:6})})},eM="_wrapper_1ub1u_1",tM="_text_1ub1u_8",nM="_loader_1ub1u_20",al={wrapper:eM,text:tM,loader:nM},_p=({isOpen:e,onClose:n,currencyKey:o="tectum-t12-tet"})=>{const s=Or(o),{protocol:r,ticker:a}=ws(o);return t.jsxs(D,{isOpen:e,onClose:n,fitContent:!0,children:[t.jsx(D.Header,{title:`About Staking ${a}(${r})`}),t.jsxs(D.Body,{className:al.wrapper,children:[t.jsx(fp,{currencyKey:o}),t.jsxs("div",{className:al.text,children:[t.jsx("p",{children:"Users can stake their TET for a period of 3, 6, or 12 months â the choice is yours."}),t.jsx("p",{children:"Staking Rewards:"}),s?t.jsxs(t.Fragment,{children:[t.jsx("ul",{children:s.rates.map(c=>t.jsxs("li",{children:[hp(c)," = ",c.rate,"%"]},c.duration))}),t.jsx("p",{children:"(Each month is counted as 30 days.)"})]}):t.jsx("div",{className:al.loader,children:t.jsx(H,{count:4})}),t.jsx("p",{children:"Rewards are paid in TCT (T12) tokens."}),t.jsx("p",{children:"Rewards will be automatically distributed to user wallets at the same time each day."}),t.jsx("p",{children:"Users cannot withdraw TET before the staking period ends."})]})]})]})},rM="_wrapper_jdffk_1",sM="_apy_jdffk_14",oM="_description_jdffk_26",il={wrapper:rM,apy:sM,description:oM},aM=({apy:e})=>t.jsxs("div",{className:il.wrapper,children:[t.jsxs("div",{className:il.apy,children:[e,"% APY*"]}),t.jsx("p",{className:il.description,children:"Stake TET or TCT and receive TCT. Daily payouts guaranteed."})]}),iM="_wrapper_8yz0x_1",lM="_row_8yz0x_14",cM="_label_8yz0x_21",dM="_value_8yz0x_28",uM="_green_8yz0x_38",Vt={wrapper:iM,row:lM,label:cM,value:dM,green:uM},pM=({statistics:e})=>{const n={};e.forEach(({currencyKey:s,totalAmount:r})=>{r>0&&(n[s]=r)});const o=e.reduce((s,r)=>s+r.totalReward,0);return t.jsxs("div",{className:Vt.wrapper,children:[n["tectum-t12-tet"]&&t.jsxs("div",{className:Vt.row,children:[t.jsx("span",{className:Vt.label,children:"Total Staking Amou
74nt TET"}),t.jsxs("span",{className:Vt.value,children:[q(n["tectum-t12-tet"],8)," ","TET"]})]}),n["tectum-t12-tct"]&&t.jsxs("div",{className:Vt.row,children:[t.jsx("span",{className:Vt.label,children:"Total Staking Amount TCT"}),t.jsxs("span",{className:Vt.value,children:[q(n["tectum-t12-tct"],8)," ","TCT"]})]}),t.jsxs("div",{className:Vt.row,children:[t.jsx("span",{className:Vt.label,children:"Total Revenue"}),t.jsxs("span",{className:L(Vt.value,{[Vt.green]:o>0}),children:[o>0?`+${q(o,8)}`:0," ","TCT"]})]})]})};function Ci(){const{data:e,isFetching:n,error:o}=Ae.useGetCurrenciesQuery();return{actualCurrencies:i.useMemo(()=>(e==null?void 0:e.payload.filter(r=>r.isActual))??[],[e==null?void 0:e.payload]),isFetching:n,error:o}}const mM="_text_861yt_1",hM={text:mM},ki=({className:e,currencyKey:n="tectum-t12-tet"})=>{const{ticker:o}=ws(n);return t.jsxs("div",{className:L(hM.text,e),children:[t.jsx("p",{children:"*Terms:"}),t.jsxs("p",{children:["Stake ",o," (T12) and earn TCT (T12). Rewards are distributed automatically every day. Early withdrawal is not allowed."," ",o,"(T12) cannot be withdrawn before the staking period ends."]})]})};function fM(e){const n=new Date,o=n.getUTCHours();return n.setDate(o<1?n.getDate()+e:n.getDate()+e+1),n.setUTCHours(1),n.setUTCMinutes(0),n}const _M="_container_17kt0_1",gM="_form_17kt0_7",vM="_amountLabel_17kt0_13",yM="_amountLabelText_17kt0_20",bM="_maxValueLabel_17kt0_26",xM="_fieldGroup_17kt0_31",CM="_fieldLabel_17kt0_37",kM="_lifespanOptions_17kt0_44",wM="_lifespanOption_17kt0_44",jM="_active_17kt0_64",SM="_rate_17kt0_67",NM="_days_17kt0_76",LM="_selectedRate_17kt0_94",EM="_label_17kt0_101",$M="_value_17kt0_104",TM="_reward_17kt0_109",MM="_done_17kt0_113",DM="_hash_17kt0_118",PM="_icon_17kt0_124",IM="_link_17kt0_129",ke={container:_M,form:gM,amountLabel:vM,amountLabelText:yM,maxValueLabel:bM,fieldGroup:xM,fieldLabel:CM,lifespanOptions:kM,lifespanOption:wM,active:jM,rate:SM,days:NM,selectedRate:LM,label:EM,value:$M,reward:TM,done:MM,hash:DM,icon:PM,link:IM},BM=({createStakingValues:e,onBackClick:n,onSubmit:o,isLoading:s,error:r,currencyKey:a,duration:c})=>{var m;const l=Or(a),d=((m=l==null?void 0:l.rates.find(h=>h.duration===c))==null?void 0:m.rate)??0,u=fM(c),{ticker:p}=ws(a);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Staking",subtitle:"Review staking details before confirming.",onBackClick:s?void 0:n}),t.jsxs(D.Body,{className:ke.container,children:[r&&t.jsx(V,{variant:"error",message:r,animated:!0}),t.jsx(lt,{data:[{label:"Amount",value:`${q(Number(e.amount),8)} ${p}(T12)`},{label:"Lifespan",value:`${c} days`},{label:"End Date",value:`${ot(u)}, ${nu(u)}`},{label:"Staking Rewards",value:t.jsxs("span",{className:ke.reward,children:[d,"%"]})}]}),t.jsx(ki,{currencyKey:a})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:o,isLoading:s,children:"Stake"})})]})},RM="_wrapper_dfpqa_1",AM="_tab_dfpqa_13",OM="_active_dfpqa_32",Xs={wrapper:RM,tab:AM,active:OM},FM=({currencyKey:e,onCurrencyKeyChange:n})=>t.jsxs("div",{className:Xs.wrapper,children:[t.jsx("button",{type:"button",className:L(Xs.tab,{[Xs.active]:e==="tectum-t12-tet"}),onClick:()=>n("tectum-t12-tet"),children:"TET - TCT"}),t.jsx("button",{type:"button",className:L(Xs.tab,{[Xs.active]:e==="tectum-t12-tct"}),onClick:()=>n("tectum-t12-tct"),children:"TCT - TCT"})]}),qM=({maxAmount:e,minAmount:n,decimal:o=8})=>Ie({amount:_s().minCrypto(n??0,o).maxCrypto(e??1/0,o).required()}),WM=({initialValues:e,onClose:n,onSubmit:o,currencyKey:s,onCurrencyKeyChange:r,duration:a,onDurationChange:c})=>{var g;const{balance:l,isFetching:d}=xt(s),u=Or(s),[p,m]=i.useState(!1),h=Me({initialValues:e,validationSchema:qM({maxAmount:l==null?void 0:l.value,minAmount:u==null?void 0:u.minimalStake,decimal:l==null?void 0:l.currency.decimal}),validateOnChange:p,onSubmit:o}),f=((g=u==null?void 0:u.rates.find(C=>C.duration===a))==null?void 0:g.rate)??0,_=C=>{C.preventDefault(),!d&&(m(!0),h.handleSubmit())},v=()=>{const C=q((l==null?void 0:l.value)??0,(l==null?void 0:l.currency.decimal)??8).replace(/\s/g,"");h.setFieldValue("amount",C)};return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Staking",subt
74itle:"Choose amount, currency and staking period."}),t.jsxs(D.Body,{className:ke.container,children:[t.jsx(FM,{currencyKey:s,onCurrencyKeyChange:r}),t.jsxs("form",{id:"staking-form",onSubmit:_,className:ke.form,children:[t.jsx(J,{placeholder:"0",className:ke.amount,value:h.values.amount,onChange:C=>{Sn(C.target.value)&&h.handleChange(C)},name:"amount",handleClear:()=>h.setFieldValue("amount",""),label:t.jsxs("div",{className:ke.amountLabel,children:[t.jsxs("span",{className:ke.amountLabelText,children:["Amount Debited",t.jsxs("span",{className:ke.maxValueLabel,children:["Your Balance"," ",d?"...":q((l==null?void 0:l.value)??0,(l==null?void 0:l.currency.decimal)??8)," ",Nt(l==null?void 0:l.currency)]})]}),t.jsx(fc,{onClick:v})]}),error:h.errors.amount,size:"large"}),u&&t.jsxs("div",{className:ke.fieldGroup,children:[t.jsx("span",{className:ke.fieldLabel,children:"Lifespan"}),t.jsx("div",{className:ke.lifespanOptions,children:u.rates.map(C=>t.jsxs("button",{type:"button",className:L(ke.lifespanOption,{[ke.active]:C.duration===a}),onClick:()=>c(C.duration),children:[t.jsxs("span",{className:ke.days,children:[C.duration," days"]}),t.jsxs("span",{className:ke.rate,children:[C.rate,"%"]})]},C.duration))})]}),t.jsxs("div",{className:ke.selectedRate,children:[t.jsx("span",{className:ke.label,children:"Staking Rewards:"}),t.jsxs("span",{className:ke.value,children:[f,"%"]})]})]}),t.jsx(ki,{currencyKey:s})]}),t.jsxs(D.Footer,{children:[t.jsx(O,{variant:"secondary",onClick:n,children:"Cancel"}),t.jsx(O,{type:"submit",form:"staking-form",variant:"primary",disabled:!at(h)||Number(h.values.amount)>((l==null?void 0:l.value)??0),children:"Next"})]})]})},VM=({staking:e,onClose:n,currencyKey:o})=>{var c;const s=Or(o),r=((c=s==null?void 0:s.rates.find(({duration:l})=>l===e.duration))==null?void 0:c.rate)??0,{ticker:a}=ws(o);return t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Staking",subtitle:"Your stake was created successfully."}),t.jsxs(D.Body,{className:ke.container,children:[t.jsx(V,{variant:"success",message:"Staking created successfully. Rewards are distributed daily until the period ends."}),t.jsx(lt,{data:[{label:"Hash",value:t.jsxs("div",{className:ke.hash,children:[t.jsx("span",{children:ys(e.hashTransaction,22)}),t.jsx(it,{className:ke.copy,value:e.hashTransaction}),t.jsx("a",{href:`https://explorer.tectum.io/${o}/transaction/${e.hashTransaction}`,target:"_blank",rel:"noreferrer",className:ke.link,children:t.jsx(To,{className:ke.icon})})]})},{label:"Amount",value:`${q(Number(e.amount),8)} ${a}(T12)`},{label:"Lifespan",value:`${e.duration} days`},{label:"End Date",value:zt(e.closeDate,!0)},{label:"Staking Rewards",value:t.jsxs("span",{className:ke.reward,children:[r,"%"]})}]}),t.jsx(ki,{currencyKey:o})]}),t.jsx(D.Footer,{children:t.jsx(O,{variant:"primary",onClick:n,className:ke.done,children:"Done"})})]})},HM=({onClose:e})=>{const[n,o]=i.useState("tectum-t12-tet"),[s,r]=i.useState("init"),[a,c]=i.useState({amount:""}),[l,d]=i.useState(0),u=Or(n);i.useEffect(()=>{u&&d(u.rates[0].duration)},[u]);const p=x=>{c(x),r("confirm")},{actualCurrencies:m}=Ci(),h=_c(),[f,{data:_,isLoading:v,error:g,reset:C}]=or.useCreateStakingMutation(),y=async()=>{try{const x=m==null?void 0:m.find(N=>N.key===n);if(!x)return;await f({amount:Number(a.amount),duration:l,currency:x.id}).unwrap(),r("result"),h([n])}catch{}},b=()=>{r("init"),C()};return t.jsxs(t.Fragment,{children:[s==="init"&&t.jsx(WM,{initialValues:a,onClose:e,onSubmit:p,currencyKey:n,onCurrencyKeyChange:o,duration:l,onDurationChange:d}),s==="confirm"&&t.jsx(BM,{createStakingValues:a,onBackClick:b,onSubmit:y,isLoading:v,error:Q(g),currencyKey:n,duration:l}),s==="result"&&_!==void 0&&t.jsx(VM,{staking:_,onClose:e,currencyKey:n})]})},UM=({isOpen:e,onClose:n})=>t.jsx(D,{isOpen:e,onClose:n,children:t.jsx(HM,{onClose:n})}),gp=e=>{switch(e){case Xn.createStaking:return"Create Staking";case Xn.closeStaking:return"Close Staking";case Xn.rewards:return"Reward";default:return""}};function vp(e,n){const o=e.type===Xn.rewards?"+":"",s=(n==null?void 0:n.ticker.toUpperCase())??"TET",r=q(e.amount,8);return`${o}${r} ${s}`}const YM="_label_nov79_1",KM="_amount_nov79_9",GM="_status_nov79_17",zM="_date_nov79_23",ZM="_infoItem_nov79_35",QM="_itemValue_nov79_50",XM="_itemLabel_nov79_61",yr={label:YM,amount:KM,status:GM,date:zM,infoItem:ZM,itemValue:QM,itemLabel:XM},rd={[Qn.open]:{label:"Pending",color:"#2261F6"},[Qn.completed]:{label:"Confirmed",color:"#00DC30"},[Qn.pending]:{label:"Pending",color:"#2261F6"}},JM=({operation:e,onClose:n,currency:o})=>t.jsxs(t.Fragment,{children:[t.jsxs(D.Body,{children:[t.jsx("div",{className:yr.label,children:"Amount"}),t.jsx("div",{className:yr.amount,children:vp(e,o)}),t.jsx("div",{className:yr.status,style:{color:rd[e.status].color},children:rd[e.status].label}),e.hashTransaction&&t.jsxs("div",{className:yr.infoItem,children:[t.jsx("span",{className:yr.itemLabel,children:"Transaction Hash"}),t.jsxs("span",{className:yr.itemValue,children:[t.jsx("span",{children:ys(e.hashTransaction,20)}),t.jsx(it,{value:e.hashTransaction})]})]}),t.jsx("div",{className:yr.date,children:zt(e.createdAt,!0)})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:n,children:"Close"})})]}),eD=e=>{const{isOpen:n,onClose:o,operation:s,currency:r}=e;return t.jsxs(D,{isOpen:n,onClose:o,children:[t.jsx(D.Header,{title:gp(s.type)}),t.jsx(JM,{operation:s,onClose:o,currency:r})]})},tD=e=>{switch(e){case Xn.createStaking:return t.jsx(ut,{style:{width:24,transform:"rotate(90deg)"}});case Xn.closeStaking:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});case Xn.rewards:return t.jsx(ut,{style:{width:24,transform:"rotate(-90deg)"}});default:return""}},nD="_item_tb0q0_1",rD="_pending_tb0q0_39",sD="_icon_tb0q0_49",oD="_main_tb0q0_60",aD="_value_tb0q0_68",iD="_signature_tb0q0_78",lD="_aside_tb0q0_87",cD="_amount_tb0q0_97",dD="_positiveAmount_tb0q0_106",uD="_status_tb0q0_110",Ht={item:nD,pending:rD,icon:sD,main:oD,value:aD,signature:iD,aside:lD,amount:cD,positiveAmount:dD,status:uD},pD={[Qn.pending]:"Pending",[Qn.open]:"Open"},mD=e=>{const{item:n,onClick:o,currency:s}=e,r=vp(n,s),a=r.slice(0,1),c=n.status===Qn.open||n.status===Qn.pending;return t.jsxs("div",{className:L(Ht.item,{[Ht.pending]:c}),onClick:()=>
74o(n),children:[t.jsx("div",{className:Ht.icon,children:tD(n.type)}),t.jsxs("div",{className:Ht.main,children:[t.jsx("div",{className:Ht.value,children:gp(n.type)}),t.jsx("div",{className:Ht.signature,children:"Staking"})]}),t.jsxs("div",{className:Ht.aside,children:[t.jsx("div",{className:L(Ht.amount,{[Ht.positiveAmount]:a==="+"}),children:r}),c?t.jsx("div",{className:Ht.status,children:pD[n.status]}):t.jsx("div",{className:Ht.signature,children:"Tectum (T12)"})]})]})},hD="_list_jjei7_1",fD="_date_jjei7_7",_D="_noData_jjei7_20",sd={list:hD,date:fD,noData:_D},yp=e=>{const{history:n,fetchNext:o,isLoading:s,hasMore:r}=e,[a,c]=i.useState(),[l,d]=i.useState(!1),u=_=>{c(_),d(!0)},p=()=>d(!1),{actualCurrencies:m}=Ci(),h=Object.fromEntries(m.map(_=>[_.id,_]));if(!n)return s?t.jsx(Fa,{}):null;if(!n.length)return t.jsx("div",{className:sd.noData,children:"No Data"});let f="";return t.jsxs("div",{children:[t.jsx(xs,{hasMore:r,loader:t.jsx(Fa,{}),loadMore:o,isLoading:s,children:n.map(_=>{let v=null;const g=zt(_.createdAt);return g!==f&&(v=t.jsx("div",{className:sd.date,children:bu(_.createdAt)}),f=g),t.jsxs(i.Fragment,{children:[v,t.jsx(mD,{item:_,onClick:u,currency:h[_.currency]},_.id)]},_.id)})}),a&&t.jsx(eD,{operation:a,isOpen:l,onClose:p,currency:h[a.currency]})]})},gD="_wrapper_1jkb2_1",vD={wrapper:gD},yD=()=>{const{data:e,isFetching:n,error:o,fetchNextPage:s,hasNextPage:r}=or.useGetHistoryInfiniteQuery(),a=e==null?void 0:e.pages.flat();return t.jsxs(ze,{className:vD.wrapper,children:[t.jsx(yp,{isLoading:n,fetchNext:s,history:a,hasMore:r&&!o}),o&&t.jsx(V,{variant:"error",message:Q(o),animated:!0})]})};function co(e){const n={[rt.none]:"All",[rt.open]:"Active",[rt.close]:"Completed"};return e in n?n[e]:""}const bD=e=>i.createElement("svg",{viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43.416 63H15C11.685 63 9 60.315 9 57V28.584C9 26.994 9.633 25.467 10.758 24.342L24.342 10.758C25.467 9.633 26.994 9 28.584 9H57C60.315 9 63 11.685 63 15V43.416C63 45.006 62.367 46.533 61.242 47.658L47.658 61.242C46.533 62.367 45.006 63 43.416 63V63Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M62.85 45H33C29.685 45 27 42.315 27 39V9.23401",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.21606 27H39.0001C42.3151 27 45.0001 29.685 45.0001 33V62.802",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),xD="_start_13y89_1",CD="_box_13y89_10",kD="_title_13y89_17",wD="_text_13y89_27",ll={start:xD,box:CD,title:kD,text:wD},jD=()=>t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:ll.start,children:[t.jsx(bD,{className:ll.box}),t.jsx("h4",{className:ll.title,children:"Staking inactive â start now to earn daily rewards"})]}),t.jsx(fp,{}),t.jsx(ki,{})]}),SD="_wrapper_l9thf_1",ND="_completed_l9thf_20",LD="_head_l9thf_24",ED="_status_l9thf_31",$D="_link_l9thf_40",TD="_details_l9thf_56",MD="_row_l9thf_61",DD="_label_l9thf_79",PD="_value_l9thf_84",ID="_green_l9thf_92",de={wrapper:SD,completed:ND,head:LD,status:ED,link:$D,details:TD,row:MD,label:DD,value:PD,green:ID},BD=({staking:e,currency:n})=>{const o=ru(new Date,new Date(e.closeDate)),s=(n==null?void 0:n.ticker.toUpperCase())??"TET";return t.jsxs("div",{className:L(de.wrapper,{[de.completed]:e.status===rt.close}),children:[t.jsxs("div",{className:de.head,children:[t.jsx("span",{className:de.status,children:co(e.status)}),t.jsx(ge,{to:e.id,className:de.link,children:"Details"})]}),t.jsxs("div",{className:de.details,children:[t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"Staking Volume"}),t.jsxs("span",{className:de.value,children:[q(e.amount,8)," ",s]})]}),t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"Total Rewards Distributed"}),t.jsxs("span",{className:L(de.value,{[de.green]:e.amountRewards>0}),children:[e.amountRewards>0?`+${q(e.amountRewards,8)}`:0," ","TCT"]})]}),t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"APY"}),t.jsxs("span",{className:de.value,children:[e.rate,"%"]})]}),t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"Lifespan (days)"}),t.jsxs("span",{className:de.value,children:[e.duration," days"]})]}),e.status===rt.open&&o>0&&t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"Life Left (days)"}),t.jsxs("span",{className:de.value,children:[o," ",o>1?"days":"day"]})]}),t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"Start Date"}),t.jsx("span",{className:de.value,children:zt(e.createdAt,!0)})]}),t.jsxs("div",{className:de.row,children:[t.jsx("span",{className:de.label,children:"End Date"}),t.jsx("span",{className:de.value,children:zt(e.closeDate,!0)})]})]})]})},RD="_wrapper_1bisq_1",AD="_filters_1bisq_7",OD="_select_1bisq_13",FD="_list_1bisq_17",qD="_noData_1bisq_23",WD="_skeletonList_1bisq_31",VD="_skeletonCard_1bisq_37",rn={wrapper:RD,filters:AD,select:OD,list:FD,noD
74ata:qD,skeletonList:WD,skeletonCard:VD},HD=[{value:rt.none,label:co(rt.none)},{value:rt.open,label:co(rt.open)},{value:rt.close,label:co(rt.close)}],UD=[{value:"all",label:"All"},{value:"tectum-t12-tet",label:"TET (T12)"},{value:"tectum-t12-tct",label:"TCT (T12)"}],YD=()=>{const[e,n]=i.useState(rt.none),o=v=>{v!==e&&n(v)},[s,r]=i.useState("all"),a=v=>{v!==s&&r(v)},{data:c,currentData:l,isFetching:d,error:u,fetchNextPage:p,hasNextPage:m}=or.useGetPoolInfiniteQuery({status:Number(e),currencyKey:s}),h=l==null?void 0:l.pages.flat(),{actualCurrencies:f}=Ci(),_=Object.fromEntries(f.map(v=>[v.id,v]));return c?h&&!h.length&&e===rt.none&&!d&&!u?t.jsx(jD,{}):t.jsxs("div",{className:rn.wrapper,children:[t.jsxs("div",{className:rn.filters,children:[t.jsx(Oe,{options:HD,selected:e,onChange:o,className:rn.select,label:"Status"}),t.jsx(Oe,{options:UD,selected:s,onChange:a,className:rn.select,label:"Cryptocurrency"})]}),h&&h.length?t.jsx("div",{className:rn.list,children:t.jsx(xs,{loadMore:p,hasMore:m&&!u,isLoading:d,loader:t.jsx(Tn,{}),children:h.map(v=>t.jsx(BD,{staking:v,currency:_[v.currency]},v.id))})}):d?t.jsx("div",{className:rn.skeletonList,children:t.jsx(H,{className:rn.skeletonCard,count:2})}):t.jsx("div",{className:rn.noData,children:"No Data"}),u&&t.jsx(V,{variant:"error",message:Q(u),animated:!0})]}):u?t.jsx(V,{variant:"error",message:Q(u),animated:!0}):d?t.jsx("div",{className:rn.skeletonList,children:t.jsx(H,{className:rn.skeletonCard,count:3})}):null},KD="_tabsWrapper_1tqkt_1",GD="_tabs_1tqkt_1",zD="_tab_1tqkt_1",ZD="_active_1tqkt_34",QD="_stake_1tqkt_46",br={tabsWrapper:KD,tabs:GD,tab:zD,active:ZD,stake:QD},XD=()=>{const[e,n]=li(),o=e.get("tab")??"pool",s=l=>{n({tab:l},{replace:!0})},{openModal:r,closeModal:a,isModalOpen:c}=Mn();return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:br.tabsWrapper,children:[t.jsxs("div",{className:br.tabs,children:[t.jsx("button",{className:L(br.tab,{[br.active]:o==="pool"}),onClick:()=>s("pool"),children:"Pool"}),t.jsx("button",{className:L(br.tab,{[br.active]:o==="history"}),onClick:()=>s("history"),children:"History"})]}),t.jsx(O,{className:br.stake,onClick:()=>r("create-staking"),children:"Stake"})]}),o==="pool"&&t.jsx(YD,{}),o==="history"&&t.jsx(yD,{}),t.jsx(UM,{isOpen:c("create-staking"),onClose:a})]})},JD="_page_15u0b_1",eP="_wrapper_15u0b_7",tP="_loader_15u0b_13",nP="_skeletonBanner_15u0b_19",rP="_skeletonRow_15u0b_25",ns={page:JD,wrapper:eP,loader:tP,skeletonBanner:nP,skeletonRow:rP},sP=()=>{const{openModal:e,closeModal:n,isModalOpen:o}=Mn(),{data:s,isFetching:r}=or.useGetRulesQuery(),{data:a,isFetching:c}=or.useGetStatisticsQuery(),l=s==null?void 0:s.rules,d=a==null?void 0:a.statistics,u=d&&d.some(({totalAmount:m})=>m>0),p=r||c;return t.jsxs("div",{className:ns.page,children:[t.jsx(ct,{title:"Staking",actionElement:t.jsx(jc,{onClick:()=>e("staking-info"),"aria-label":"About staking"})}),t.jsxs("div",{className:ns.wrapper,children:[p?t.jsxs("div",{className:ns.loader,children:[t.jsx(H,{className:ns.skeletonBanner}),t.jsx(H,{className:ns.skeletonRow}),t.jsx(H,{className:ns.skeletonRow})]}):u?t.jsx(pM,{statistics:d}):l?t.jsx(aM,{apy:zT(l.flatMap(({rates:m})=>m))}):null,t.jsx(XD,{})]}),t.jsx(_p,{isOpen:o("staking-info"),onClose:n})]})},oP="_details_1el6b_1",aP="_row_1el6b_13",iP="_label_1el6b_31",lP="_value_1el6b_36",cP="_status_1el6b_44",dP="_green_1el6b_52",be={details:oP,row:aP,label:iP,value:lP,status:cP,green:dP},uP=({staking:e,currency:n})=>{const o=ru(new Date,new Date(e.closeDate)),s=(n==null?void 0:n.ticker.toUpperCase())??"TET";return t.jsxs("div",{className:be.details,children:[t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"Status"}),t.jsx("span",{className:be.status,children:co(e.status)})]}),t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"Staking Volume"}),t.jsxs("span",{className:be.value,children:[q(e.amount,8)," ",s]})]}),t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"Total Rewards Distributed"}),t.jsxs("span",{className:L(be.value,{[be.green]:e.amountRewards>0}),children:[e.amountRewards>0?`+${q(e.amountRewards,8)}`:0," ","TCT"]})]}),t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"APY"}),t.jsxs("span",{className:be.value,children:[e.rate,"%"]})]}),t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"Lifespan (days)"}),t.jsxs("span",{className:be.value,children:[e.duration," days"]})]}),e.status===rt.open&&o>0&&t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"Life Left (days)"}),t.jsxs("span",{className:be.value,children:[o," ",o>1?"days":"day"]})]}),t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"Start Date"}),t.jsx("span",{className:be.value,children:zt(e.createdAt,!0)})]}),t.jsxs("div",{className:be.row,children:[t.jsx("span",{className:be.label,children:"End Date"}),t.jsx("span",{className:be.value,children:zt(e.closeDate,!0)})]})]})},pP="_wrapper_11bvq_1",mP="_header_11bvq_5",hP="_title_11bvq_12",fP="_btn_11bvq_20",ca={wrapper:pP,header:mP,title:hP,btn:fP},_P=({stakingId:e,initialHistory:n})=>{const[o,{isFetching:s,error:r}]=or.useLazyGetStakingHistoryQuery(),[a,c]=i.useState(1),l=()=>{c(f=>f+1),h({id:e,page:a+1,rows:ln})},[d,u]=i.useState(n.length===ln),[p,m]=i.useState(n),h=async f=>{try{const _=await o(f,!0).unwrap();_.histories.length<ln&&u(!1),m(v=>v&&f.page>1?[...v,..._.histories]:_.histories)}catch{}};return t.jsxs(ze,{className:ca.wrapper,children:[t.jsxs("div",{className:ca.header,children:[t.jsx("div",{className:ca.title,children:"History"}),t.jsx(ge,{to:"/staking?tab=history",className:ca.btn,children:"View All"})]}),t.jsx(yp,{isLoading:s,fetchNext:l,history:p,hasMore:d&&!r}),r&&t.jsx(V,{variant:"error",message:Q(r),animated:!0})]})},gP="_wrapper_ssk6f_1",vP={wrapper:gP},yP=()=>{const{id:e}=jo(),{openModal:n,closeModal:o,isModalOpen:s}=Mn(),r=Or(),{data:a,isFetching:c,error:l}=or.useGetStakingDetailsQuery(e),{actualCurrencies:d}=Ci(),u=a==null?void 0:a.currency,p=u?d.find(({id:m})=>m===u):void 0;if(l)throw new Error("404");if(c)return t.jsx(Tn,{});if(a&&p){const m=ic(a.amount,8),h=p.ticker.toUpperCase();return t.jsxs("div",{className:vP.wrapper,children:[t.jsx(ct,{title:`Staking - ${m} ${h}`,actionElement:r&&t.jsx(jc,{onClick:()=>n("staking-info"),"aria-label":"About staking"})}),t.jsx(uP,{staking:a,currency:p}),t.jsx(_P,{stakingId:a.id,initialHistory:a.histories??[]}),t.jsx(_p,{isOpen:s("staking-info"),onClose:o,currencyKey:p.key})]})}return null},bP=()=>Ie().shape({emailCode:ae().required().min(Nn).max(Nn),dualFactorCode:ae().required().min(sr).max(sr)}),xP="_body_1qejz_1",CP={body:xP},kP=({onClose:e,is2faEnabled:n})=>{const{user:o}=ht(),[s,r]=i.useState(!1),[a,c,l]=So(re.ts2faCodeSentTime),d=a>0,[u,{error:p,isLoading:m}]=Se.useLazySendTransactionSecurity2faCodeQuery(),[h,{isSuccess:f,isLoading:_,error:v}]=Se.useUpdateTransactionSecurity2faMutation(),g=Me({initialValues:{emailCode:"",dualFactorCode:""},validationSchema:bP(),validateOnChange:s,onSubmit:({emailCode:b,dualFactorCode:x})=>{h({emailCode:b,dualFactorCode:x,turnOffRequest:n})}}),C=()=>{r(!0),g.handleSubmit()};i.useEffect(()=>{f&&(l(),e())},[f]),i.useEffect(()=>{d||(u(),c())},[]);const y=Q(p||v);return t.jsxs(t.Fragment,{children:[t.jsxs(D.Body,{className:CP.body,children:[t.jsx(J,{label:`Enter the code from the email: ${bs((o==null?void 0:o.email)??"",15)}`,name:"emailCode",value:g.values.emailCode,onChange:b=>{Sn(b.target.value)&&g.handleChange(b)},handleClear:()=>g.setFieldValue("emailCode",""),error:g.errors.emailCode,controlButtons:t.jsx(ar,{onClick:u,cooldownTime:a,isLoading:m})}),t.jsx(J,{label:"Enter the Google Authenticator (2FA) Code",name:"dualFactorCode",value:g.values.dualFactorCode,onChange:b=>{Sn(b.target.value)&&g.handleChange(b)},handleClear:()=>g.setFieldValue("dualFactorCode",""),error:g.errors.dualFactorCode}),y&&t.jsx(V,{variant:"error",message:y,animated:!0})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:C,disabled:m,isLoading:_,children:n?"Disable":"Activate"})})]})},wP=({isOpen:e,onClose:n,is2faEnabled:o})=>t.jsxs(D,{isOpen:e,onClose:n,fitContent:!0,children:[t.jsx(D.Header,{title:"Google Authenticator",subtitle:"Confirm every transaction with a Google Authenticator code."}),t.jsx(kP,{onClose:n,is2faEnabled:o})]}),jP=()=>Ie().shape({code:ae().required().min(Nn).max(Nn)}),SP="_body_1qejz_1",NP={body:SP},LP=({onClose:e,isEmailEnabled:n})=>{const{user:o}=ht(),[s,r]=i.useState(!1),[a,c,l]=So(re.tsEmailCodeSentTime),d=a>0,[u,{error:p,isLoading:m}]=Se.useLazySendTransactionSecurityEmailCodeQuery(),[h,{isSuccess:f,isLoading:_,error:v}]=Se.useUpdateTransactionSecurityEmailMutation(),g=Me({initialValues:{code:""}
74,validationSchema:jP(),validateOnChange:s,onSubmit:({code:b})=>{h({code:b,turnOffRequest:n})}}),C=()=>{r(!0),g.handleSubmit()};i.useEffect(()=>{f&&(l(),e())},[f]),i.useEffect(()=>{d||(u(),c())},[]);const y=Q(p||v);return t.jsxs(t.Fragment,{children:[t.jsxs(D.Body,{className:NP.body,children:[t.jsx(J,{label:`Enter the code from the email: ${bs((o==null?void 0:o.email)??"",15)}`,name:"code",value:g.values.code,onChange:b=>{Sn(b.target.value)&&g.handleChange(b)},handleClear:()=>g.setFieldValue("code",""),error:g.errors.code,controlButtons:t.jsx(ar,{onClick:u,cooldownTime:a,isLoading:m})}),y&&t.jsx(V,{variant:"error",message:y,animated:!0})]}),t.jsx(D.Footer,{children:t.jsx(O,{onClick:C,disabled:m,isLoading:_,children:n?"Disable":"Activate"})})]})},EP=({isOpen:e,onClose:n,isEmailEnabled:o})=>t.jsxs(D,{isOpen:e,onClose:n,fitContent:!0,children:[t.jsx(D.Header,{title:"Email Verification",subtitle:"Confirm every transaction through your email."}),t.jsx(LP,{onClose:n,isEmailEnabled:o})]}),$P="_wrapper_1l8x7_1",TP="_list_1l8x7_7",MP="_row_1l8x7_13",DP="_content_1l8x7_26",PP="_title_1l8x7_33",IP="_description_1l8x7_41",sn={wrapper:$P,list:TP,row:MP,content:DP,title:PP,description:IP},BP=()=>{const{user:e}=ht(),[n,o]=i.useState(!1),[s,r]=i.useState(!1),a=e==null?void 0:e.transactionSecurityType,c=a===ro.JustEmail||a===ro.FullSecure,l=a===ro.Just2Fa||a===ro.FullSecure,d=(e==null?void 0:e.secure.mode)===1;return t.jsxs("section",{className:sn.wrapper,children:[t.jsx(ct,{title:"Transaction Security"}),t.jsxs("div",{className:sn.list,children:[t.jsxs("div",{className:sn.row,children:[t.jsxs("div",{className:sn.content,children:[t.jsx("span",{className:sn.title,children:"Email Verification"}),t.jsx("span",{className:sn.description,children:"Transaction verification through email"})]}),t.jsx(Oa,{value:c,onChange:()=>o(!0)})]}),d&&t.jsxs("div",{className:sn.row,children:[t.jsxs("div",{className:sn.content,children:[t.jsx("span",{className:sn.title,children:"2FA"}),t.jsx("span",{className:sn.description,children:"Transaction verification through 2FA"})]}),t.jsx(Oa,{value:l,onChange:()=>r(!0)})]})]}),t.jsx(EP,{isOpen:n,onClose:()=>o(!1),isEmailEnabled:c}),d&&t.jsx(wP,{isOpen:s,onClose:()=>r(!1),is2faEnabled:l})]})},cl=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M22.1631 11.439L20.4761 9.75098L18.7881 11.439",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20.4751 9.751V12.001C20.4751 16.972 16.4461 21 11.4751 21C6.5041 21 2.4751 16.971 2.4751 12C2.4751 7.029 6.5041 3 11.4751 3C14.3151 3 16.8451 4.319 18.4941 6.375",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.8458 14.87L11.1938 12.697V7.98499",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),RP="_wrapper_1dsjs_1",AP="_panel_1dsjs_7",OP="_copy_1dsjs_11",FP="_title_1dsjs_17",qP="_description_1dsjs_26",WP="_mount_1dsjs_34",VP="_getStarted_1dsjs_38",HP="_status_1dsjs_44",UP="_statusIcon_1dsjs_50",YP="_statusText_1dsjs_66",KP="_approvedIcon_1dsjs_74",GP="_waitingIcon_1dsjs_78",zP="_blockedIcon_1dsjs_82",tt={wrapper:RP,panel:AP,copy:OP,title:FP,description:qP,mount:WP,getStarted:VP,status:HP,statusIcon:UP,statusText:YP,approvedIcon:KP,waitingIcon:GP,blockedIcon:zP},ZP={[yt.approved]:{title:"Verified",description:"Your identity has been successfully verified.",icon:t.jsx(ip,{className:tt.approvedIcon})},[yt.waiting]:{title:"Pending review",description:"Your documents were submitted. We will notify you when the review is complete.",icon:t.jsx(cl,{className:tt.waitingIcon})},[yt.inreview]:{title:"In review",description:"Your verification is being reviewed. This usually takes a short time.",icon:t.jsx(cl,{className:tt.waitingIcon})},[yt.blocked]:{title:"Verification blocked",description:"Verification is currently unavailable for this account. Contact support if you need help.",icon:t.jsx(cl,{className:tt.blockedIcon})}},QP=e=>{const{user:n}=e,o=n.kyc===yt.incomplete||n.kyc===yt.rejected||n.kyc===yt.none,s=ZP[n.kyc];return t.jsxs("section",{className:tt.wrapper,children:[t.jsx(ct,{title:"Identity verification"}),t.jsx(ze,{className:tt.panel,children:o?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:tt.copy,children:[t.jsx("h2",{className:tt.title,children:n.kyc===yt.rejected?"Verification was not approved":"Verify your identity"}),t.jsx("p",{className:tt.description,children:n.kyc===yt.rejected?"Please try again and make sure your documents are clear and valid.":"You will need a valid ID document to complete the process."})]}),t.jsx("div",{id:"blockpass-kyc-connect",className:tt.mount,children:t.jsx(O,{className:tt.getStarted,children:"Get started"})})]}):s&&t.jsxs("div",{className:tt.status,children:[t.jsx("div",{className:tt.statusIcon,children:s.icon}),t.jsxs("div",{className:tt.statusText,children:[t.jsx("h2",{className:tt.title,children:s.title}),t.jsx("p",{className:tt.description,children:s.description})]})]})})]})},XP=()=>{const{user:e}=ht(),n=En(),o=(e==null?void 0:e.kyc)===yt.incomplete||(e==null?void 0:e.kyc)===yt.rejected||(e==null?void 0:e.kyc)===yt.none;return i.useEffect(()=>{if(!e||!o)return;const s=new window.BlockpassKYCConnect("tectum_kyc_ee043",{refId:e.id,email:e.email,elementId:"blockpass-kyc-connect"});s.startKYCConnect(),s.on("KYCConnectSuccess",()=>{n(Se.util.invalidateTags(["User"]))})},[o,e,n]),e?t.jsx(QP,{user:e}):null},JP="_wrapper_1ivjs_1",eI="_info_1ivjs_9",tI="_title_1ivjs_31",nI="_balance_1ivjs_40",rI="_balanceValue_1ivjs_44",Js={wrapper:JP,info:eI,title:tI,balance:nI,balanceValue:rI},sI=e=>{const{totalBalance:n,isLoading:o}=e;return t.jsx("div",{className:Js.wrapper,children:t.jsxs("div",{className:Js.info,children:[t.jsx("span",{className:Js.title,children:"Balance"}),t.jsx(pi,{value:n,isLoading:o,className:Js.balance,valueClassName:Js.balanceValue})]})})},oI=e=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...e},i.createElement("g",null,i.createElement("circle",{cx:15,cy:8.49986,r:1.5}),i.createElement("path",{d:"M15 12.9997V17.75C15 18.3467 14.7629 18.919 14.341 19.341C13.919 19.7629 13.3467 20 12.75 20H5.24993C4.00733 20 3 18.9927 3 17.7501V17.7501V13.25C3 12.0074 4.00736 11 5.25 11
74H9"}),i.createElement("path",{d:"M6 17H8"}),i.createElement("path",{d:"M21.5 17.5L18.5 20.5"}),i.createElement("path",{d:"M21.5 20.5V17.5H18.5"}),i.createElement("path",{d:"M2.5 6.5L5.5 3.5"}),i.createElement("path",{d:"M2.5 3.5V6.5H5.5"}),i.createElement("rect",{x:9,y:4,width:12,height:9,rx:2.25}))),aI=e=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24.01 24.01",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...e},i.createElement("g",null,i.createElement("path",{d:"M16.0067 2.00083L14.0058 4.00167L16.0067 6.0025"}),i.createElement("path",{d:"M20.0083 4.00167H14.0058"}),i.createElement("path",{d:"M21.0087 12.005C21.0079 10.6157 20.6837 9.24566 20.0618 8.00333"}),i.createElement("path",{d:"M10.0042 3.23206C5.90909 4.1646 3.00311 7.80509 3.00125 12.005"}),i.createElement("path",{d:"M8.00333 22.0092L10.0042 20.0083L8.00333 18.0075"}),i.createElement("path",{d:"M4.00167 20.0083H10.0042"}),i.createElement("path",{d:"M3.00125 12.005C3.00211 13.3943 3.32632 14.7643 3.94823 16.0067"}),i.createElement("path",{d:"M14.0058 20.7779C18.1009 19.8454 21.0069 16.2049 21.0088 12.005"}),i.createElement("path",{clipRule:"evenodd",d:"M13.0656 8.44272L15.567 10.9434C15.8485 11.2248 16.0067 11.6064 16.0067 12.0044C16.0067 12.4024 15.8487 12.7842 15.5673 13.0656L13.0666 15.567C12.7852 15.8485 12.4036 16.0067 12.0056 16.0067C11.6076 16.0067 11.2258 15.8487 10.9444 15.5673L8.44302 13.0666C8.16154 12.7852 8.00332 12.4036 8.00332 12.0056C8.00332 11.6076 8.16132 11.2258 8.44272 10.9444L10.9434 8.44302C11.2248 8.16154 11.6064 8.00332 12.0044 8.00332C12.4024 8.00332 12.7842 8.16132 13.0656 8.44272V8.44272Z",fillRule:"evenodd"}))),iI="_iframe_1c5kj_1",lI="_body_1c5kj_7",od={iframe:iI,body:lI},cI=()=>t.jsxs(t.Fragment,{children:[t.jsx(D.Header,{title:"Bank Transfers/Swaps",subtitle:"Buy, sell or swap crypto via Mt Pelerin."}),t.jsx(D.Body,{className:od.body,children:t.jsx("iframe",{allow:"usb; ethereum; clipboard-write; payment; microphone; camera",title:"Mt Pelerin exchange widget",src:"https://widget.mtpelerin.com/?_ctkn=b70ed6d9-33ea-47ba-92f6-102a3ba229e3&type=web&tabs=sell,buy,swap&tab=sell&mode=dark&primary=%23487bff&success=%23487bff",className:od.iframe})})]}),bp=({isOpen:e,onClose:n})=>t.jsx(D,{isOpen:e,onClose:n,children:t.jsx(cI,{})}),dI="_actions_8q2cp_1",uI="_title_8q2cp_6",pI="_wrapper_8q2cp_14",mI="_action_8q2cp_1",Vn={actions:dI,title:uI,wrapper:pI,action:mI},hI=()=>{const{isModalOpen:e,openModal:n,closeModal:o}=Mn(),s=Zt(),r=()=>{n("deposit"),Ze({event:"crypto_deposit_attempt"})};return t.jsxs(t.Fragment,{children:[t.jsx("section",{className:Vn.actions,children:t.jsxs("div",{className:Vn.wrapper,children:[t.jsx(Ut,{label:"Deposit",icon:t.jsx(Tr,{style:{rotate:"315deg"}}),onClick:r,className:Vn.action}),t.jsx(Ut,{label:"Send",icon:t.jsx(Tr,{style:{rotate:"135deg"}}),onClick:()=>n("send"),className:Vn.action}),t.jsx(Ut,{label:"Mint",icon:t.jsx(uu,{}),onClick:()=>s("/mint-house/blue/mint"),className:Vn.action}),t.jsx(Ut,{label:"On/Off-Ramp",icon:t.jsx(oI,{}),onClick:()=>n("swap"),className:Vn.action}),t.jsx(Ut,{label:"Migrate",icon:t.jsx(Hu,{}),onClick:()=>n("migrate"),className:Vn.action}),t.jsx(Ut,{label:"Swap",icon:t.jsx(aI,{}),className:Vn.action,disabled:!0})]})}),t.jsx(Zu,{isOpen:e("migrate"),onClose:o}),t.jsx(Yu,{isOpen:e("deposit"),onClose:o}),t.jsx(Qu,{isOpen:e("send"),onClose:o}),t.jsx(bp,{isOpen:e("swap"),onClose:o})]})},fI="_noFunds_et5nu_1",_I="_link_et5nu_16",ad={noFunds:fI,link:_I},gI=()=>{const{openModal:e}=Mn(),n=()=>{e("deposit"),Ze({event:"crypto_deposit_attempt"})};return t.jsxs("div",{className:ad.noFunds,children:[t.jsx("span",{children:"No Funds"}),t.jsxs("span",{children:["There are no funds in your balance yet. ",t.jsx("br",{})," Use"," ",t.jsx("span",{className:ad.link,onClick:n,children:"Deposit"})," ","to add funds to your wallet."]})]})},vI="_currency_4sb6m_1",yI="_drag_4sb6m_35",bI="_grip_4sb6m_65",xI="_block_4sb6m_75",CI="_leftSide_4sb6m_87",kI="_iconWrap_4sb6m_95",wI="_iconGlow_4sb6m_103",jI="_icon_4sb6m_95",SI="_details_4sb6m_127",NI="_ticker_4sb6m_134",LI="_network_4sb6m_145",EI="_rightSide_4sb6m_156",$I="_balanceContainer_4
74sb6m_162",TI="_balances_4sb6m_166",MI="_amount_4sb6m_174",DI="_converted_4sb6m_182",PI="_error_4sb6m_190",Ge={currency:vI,drag:yI,grip:bI,block:xI,leftSide:CI,iconWrap:kI,iconGlow:wI,icon:jI,details:SI,ticker:NI,network:LI,rightSide:EI,balanceContainer:$I,balances:TI,amount:MI,converted:DI,error:PI},II=({currency:e,balance:n,to:o})=>{const{attributes:s,listeners:r,setNodeRef:a,transform:c,transition:l}=Fp({id:e.id}),d={transform:qp.Transform.toString(c),transition:l};return t.jsxs("div",{className:Ge.currency,ref:a,style:d,children:[t.jsx("button",{type:"button",className:Ge.drag,"aria-label":`Reorder ${e.ticker}`,...r,...s,children:t.jsx("span",{className:Ge.grip,"aria-hidden":!0})}),t.jsxs(ge,{to:o,className:Ge.block,children:[t.jsxs("div",{className:Ge.leftSide,children:[t.jsxs("div",{className:Ge.iconWrap,children:[t.jsx(pn,{currencyKey:e.key,className:Ge.iconGlow,alt:"","aria-hidden":!0}),t.jsx(pn,{currencyKey:e.key,className:Ge.icon,alt:`${e.ticker} icon`})]}),t.jsxs("div",{className:Ge.details,children:[t.jsx("span",{className:Ge.ticker,children:e.ticker}),t.jsxs("span",{className:Ge.network,children:[e.network," (",e.protocol,")"]})]})]}),t.jsx("div",{className:Ge.rightSide,children:t.jsx("div",{className:Ge.balanceContainer,children:t.jsx("div",{className:Ge.balances,children:n?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:Ge.amount,children:q(n.value,n.currency.decimal)}),t.jsxs("span",{className:Ge.converted,children:["$",ui(n.conv||0)]})]}):t.jsx("span",{className:Ge.error,children:"The server is overloaded"})})})})]})]})},BI="_list_wrpx4_1",RI="_skeletonRow_wrpx4_9",AI="_skeletonIcon_wrpx4_32",OI="_skeletonMain_wrpx4_39",FI="_skeletonTitle_wrpx4_47",qI="_skeletonSubtitle_wrpx4_53",WI="_skeletonAside_wrpx4_59",VI="_skeletonAmount_wrpx4_67",HI="_skeletonConverted_wrpx4_73",UI="_error_wrpx4_79",YI="_empty_wrpx4_83",Mt={list:BI,skeletonRow:RI,skeletonIcon:AI,skeletonMain:OI,skeletonTitle:FI,skeletonSubtitle:qI,skeletonAside:WI,skeletonAmount:VI,skeletonConverted:HI,error:UI,empty:YI},KI=({hideZeroBalances:e=!1,selectedNetwork:n="all",totalBalance:o,actualCurrencies:s,balanceMap:r,isBalancesLoading:a,error:c})=>{const[l,d]=i.useState([]);i.useEffect(()=>{if(s.length===0){d([]);return}const f=[...s].sort((_,v)=>{var y,b;const g=((y=r.get(_.key))==null?void 0:y.conv)||0;return(((b=r.get(v.key))==null?void 0:b.conv)||0)-g});try{const _=se.get(re.cryptocurrencySort),v=_?new Map(_):null;if(!v){d(f);return}const g=[...f].sort((C,y)=>{const b=v.get(C.key)??1/0,x=v.get(y.key)??1/0;return b-x});d(g)}catch(_){console.error(_),d(f)}},[s,r]);const u=i.useMemo(()=>l.filter(f=>{if(n!=="all"&&eu(f)!==n)return!1;if(!e)return!0;const _=r.get(f.key);return _&&_.value>0}),[l,r,e,n]),p=i.useMemo(()=>u.map(f=>t.jsx(II,{currency:f,balance:r.get(f.key)||null,to:`/wallet/${f.key}`},f.id)),[u,r]),m=Wp(Si(Qp,{activationConstraint:{distance:10}}),Si(Zp,{activationConstraint:{delay:0,tolerance:5}}),Si(zp,{coordinateGetter:Gp})),h=i.useCallback(f=>{const{active:_,over:v}=f;!v||_.id===v.id||d(g=>{try{const C=g.findIndex(j=>j.id===_.id),y=g.findIndex(j=>j.id===v.id);if(C===-1||y===-1)return console.warn("Invalid drag operation: item not found"),g;const b=Vp(g,C,y),x=b[y],N=se.get(re.cryptocurrencySort)||[],S=new Map(N);return S.set(x.key,y),se.set(re.cryptocurrencySort,Array.from(S.entries())),b}catch(C){return console.error(C),g}})},[]);return c?t.jsx(V,{variant:"error",message:c,className:Mt.error,animated:!0}):a?t.jsx("div",{className:Mt.list,children:Array.from({length:5},(f,_)=>t.jsxs("div",{className:Mt.skeletonRow,children:[t.jsx(H,{className:Mt.skeletonIcon}),t.jsxs("div",{className:Mt.skeletonMain,children:[t.jsx(H,{className:Mt.skeletonTitle}),t.jsx(H,{className:Mt.skeletonSubtitle})]}),t.jsxs("div",{className:Mt.skeletonAside,children:[t.jsx(H,{className:Mt.skeletonAmount}),t.jsx(H,{className:Mt.skeletonConverted})]})]},_))}):s.length===0&&o===0?t.jsx(gI,{}):u.length===0?t.jsx("p",{className:Mt.empty,children:n==="all"?"No currencies to display":"No currencies on this network"}):t.jsx("div",{className:Mt.list,children:t.jsx(Hp,{sensors:m,collisionDetection:Up,onDragEnd:h,children:t.jsx(Yp,{items:u.map(f=>f.id),strategy:Kp,children:p})})})},GI="_container_1bcb8_1",zI="_assets_1bcb8_9",ZI="_filters_1bcb8_13",QI="_filter_1bcb8_13",XI="_networkFilter_1bcb8_26",eo={container:GI,assets:zI,filters:ZI,filter:QI,networkFilter:XI},id="all",JI=()=>{const{totalBalance:e,actualCurrencies:n,balanceMap:o,isFetching:s,error:r}=hc(),{hideZeroBalances:a,toggleHideZeroBalances:c}=mu(re.hideZeroBalancesCrypto),[l,d]=i.useState(id),u=i.useMemo(()=>{const p=new Map;
74n.forEach(h=>{if(!h.network||!h.protocol)return;const f=eu(h);p.has(f)||p.set(f,`${Ln(h.network)} (${h.protocol})`)});const m=[...p.entries()].sort(([,h],[,f])=>h.localeCompare(f)).map(([h,f])=>({value:h,label:f}));return[{value:id,label:"All networks"},...m]},[n]);return t.jsxs("div",{className:eo.container,children:[t.jsx(js,{title:"My Crypto",subtitle:"View balances and manage your crypto assets."}),t.jsx(sI,{totalBalance:e,isLoading:s}),t.jsx(hI,{}),t.jsxs(ze,{className:eo.assets,children:[t.jsxs("div",{className:eo.filters,children:[t.jsx(pu,{className:eo.filter,hideZeroBalances:a,onToggleHideZeroBalances:c}),t.jsx(Oe,{selected:l,options:u,onChange:d,className:eo.networkFilter,showSearch:!1})]}),t.jsx(KI,{hideZeroBalances:a,selectedNetwork:l,totalBalance:e,actualCurrencies:n,balanceMap:o,isBalancesLoading:s,error:Q(r)})]})]})},xp="boot-loader",eB=()=>typeof document<"u"&&!!document.getElementById(xp),tB=()=>{const e=document.getElementById(xp);!e||e.dataset.dismissed==="true"||(e.dataset.dismissed="true",e.remove())},nB="_loader_1yvoj_1",rB={loader:nB},wi=()=>eB()?null:t.jsx("div",{className:rB.loader,children:t.jsx(Ah,{})});function Cp(){const e=!!sessionStorage.getItem("isAppBannerHidden"),[n,o]=i.useState(e);i.useEffect(()=>{o(e)},[e]);const s=i.useCallback(()=>{sessionStorage.setItem("isAppBannerHidden","true"),o(!0)},[]);return{isAppBannerHidden:n,handleAppBannerClose:s}}const sB="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15.2861%2011.1004C15.264%208.713%2017.291%207.55152%2017.3837%207.49745C16.2357%205.8656%2014.4564%205.64263%2013.8312%205.62486C12.3368%205.47152%2010.8872%206.49671%2010.1259%206.49671C9.34949%206.49671%208.17722%205.63967%206.91379%205.66486C5.28796%205.6893%203.76697%206.60708%202.93278%208.03226C1.21122%2010.9382%202.49517%2015.2086%204.14456%2017.5574C4.96963%2018.7078%205.93373%2019.9923%207.19565%2019.9471C8.43022%2019.8974%208.89138%2019.1797%2010.3812%2019.1797C11.8574%2019.1797%2012.2904%2019.9471%2013.5774%2019.9182C14.9024%2019.8974%2015.7366%2018.7626%2016.5328%2017.6019C17.4862%2016.2834%2017.8692%2014.9849%2017.8843%2014.9182C17.8532%2014.9078%2015.3111%2013.9619%2015.2861%2011.1004Z'%20fill='white'/%3e%3cpath%20d='M12.8549%204.07967C13.5189%203.27004%2013.9732%202.16856%2013.8471%201.05078C12.8861%201.09226%2011.6842%201.69893%2010.992%202.49078C10.3797%203.18856%209.83268%204.33226%209.974%205.40782C11.0536%205.48634%2012.162%204.87671%2012.8549%204.07967Z'%20fill='white'/%3e%3c/svg%3e",oB="data:image/svg+xml,%3csvg%20width='18'%20height='21'%20viewBox='0%200%2018%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.580841%201.26643C0.35767%201.49421%200.228516%201.84884%200.228516%202.3081V18.6896C0.228516%2019.1488%200.35767%2019.5035%200.580841%2019.7312L0.635923%2019.7812L10.0509%2010.6053V10.3887L0.635923%201.21273L0.580841%201.26643Z'%20fill='url(%23paint0_linear_8305_55763)'/%3e%3cpath%20d='M13.1856%2013.666L10.0508%2010.6058V10.3892L13.1894%207.32898L13.2597%207.36879L16.9767%209.43083C18.0375%2010.016%2018.0375%2010.979%2016.9767%2011.5679L13.2597%2013.6262L13.1856%2013.666Z'%20fill='url(%23paint1_linear_8305_55763)'/%3e%3cpath%20d='M13.261%2013.6263L10.0521%2010.4976L0.582031%2019.7318C0.934358%2020.0929%201.50891%2020.1364%202.16228%2019.7753L13.261%2013.6263Z'%20fill='url(%23paint2_linear_8305_55763)'/%3e%3cpath%20d='M13.2591%207.36837L2.16032%201.21929C1.50695%200.861886%200.932405%200.905404%200.580078%201.26651L10.0502%2010.4971L13.2591%207.36837Z'%20fill='url(%23paint3_linear_8305_55763)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8305_55763'%20x1='9.21499'%20y1='18.8602'%20x2='-3.21244'%20y2='6.11411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2300A0FF'/%3e%3cstop%20offset='0.0066'%20stop-color='%2300A1FF'/%3e%3cstop%20offset='0.2601'%20stop-color='%2300BEFF'/%3e%3cstop%20offset='0.5122'%20stop-color='%2300D2FF'/%3e%3cstop%20offset='0.7604'%20stop-color='%2300DFFF'/%3e%3cstop%20offset='1'%20stop-color='%2300E3FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8305_55763'%20x1='18.358'%20y1='10.4965'%20x2='-0.0251895'%20y2='10.4965'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFE000'/%3e%3cstop%20offset='0.4087'%20stop-color='%23FFBD00'/%3e%3cstop%20offset='0.7
74754'%20stop-color='%23FFA500'/%3e%3cstop%20offset='1'%20stop-color='%23FF9C00'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8305_55763'%20x1='11.5161'%20y1='8.79674'%20x2='-5.33648'%20y2='-8.48797'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF3A44'/%3e%3cstop%20offset='1'%20stop-color='%23C31162'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8305_55763'%20x1='-1.80374'%20y1='25.1814'%20x2='5.7217'%20y2='17.463'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2332A071'/%3e%3cstop%20offset='0.0685'%20stop-color='%232DA771'/%3e%3cstop%20offset='0.4762'%20stop-color='%2315CF74'/%3e%3cstop%20offset='0.8009'%20stop-color='%2306E775'/%3e%3cstop%20offset='1'%20stop-color='%2300F076'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",aB="_wrapper_o3v78_1",iB="_mobileWrapper_o3v78_8",lB="_content_o3v78_21",cB="_title_o3v78_39",dB="_info_o3v78_51",uB="_buttonsWrapper_o3v78_57",pB="_downloadButton_o3v78_62",mB="_qrWrapper_o3v78_80",hB="_buttonClose_o3v78_86",fB="_mobileInfo_o3v78_98",_B="_snLogo_o3v78_104",gB="_text_o3v78_108",vB="_buttons_o3v78_57",yB="_download_o3v78_
7462",bB="_close_o3v78_138",nt={wrapper:aB,mobileWrapper:iB,content:lB,title:cB,info:dB,buttonsWrapper:uB,downloadButton:pB,qrWrapper:mB,buttonClose:hB,mobileInfo:fB,snLogo:_B,text:gB,buttons:vB,download:yB,close:bB},xB=({isVisible:e,onClose:n})=>{const{Canvas:o}=Ya();return e?t.jsx("div",{className:nt.wrapper,children:t.jsxs("div",{className:nt.content,children:[t.jsxs("div",{className:nt.info,children:[t.jsxs("div",{className:nt.title,children:[t.jsx("span",{children:"Make crypto as easy as cash â "}),t.jsx("span",{children:"download SoftNote Wallet!"})]}),t.jsxs("div",{className:nt.buttonsWrapper,children:[t.jsxs(O,{as:"a",className:nt.downloadButton,href:"https://apps.apple.com/us/app/softnote-wallet/id6615068673",target:"_blank",rel:"noreferrer",children:[t.jsx("img",{src:sB,alt:"apple"}),t.jsx("span",{children:"App Store"})]}),t.jsxs(O,{as:"a",className:nt.downloadButton,href:"https://play.google.com/store/apps/details?id=com.softnotewallet",target:"_blank",rel:"noreferrer",children:[t.jsx("img",{src:oB,alt:"apple"}),t.jsx("span",{children:"Google Play"})]})]})]}),t.jsx("button",{className:nt.buttonClose,onClick:n,children:t.jsx(Cc,{})}),t.jsx("div",{className:nt.qrWrapper,children:t.jsx(o,{text:"https://download.softnote.com",options:{margin:3,width:120,color:{dark:"#000000",light:"#ffffff"}}})})]})}):null};var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});var CB=function(n){console.warn("[react-gtm]",n)};Sc.default=CB;var kB=Sc,wB=jB(kB);function jB(e){return e&&e.__esModule?e:{default:e}}var SB={tags:function(n){var o=n.id,s=n.events,r=n.dataLayer,a=n.dataLayerName,c=n.preview,l=n.auth,d=">m_auth="+l,u=">m_preview="+c;o||(0,wB.default)("GTM Id is required");var p=` 75 <iframe src="https://www.googletagmanager.com/ns.html?id=`+o+d+u+`>m_cookies_win=x" 76 height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,m=` 77 (function(w,d,s,l,i){w[l]=w[l]||[]; 78 w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', `+JSON.stringify(s).slice(1,-1)+`}); 79 var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; 80 j.async=true;
80j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+d+u+`>m_cookies_win=x'; 81 f.parentNode.insertBefore(j,f); 82 })(window,document,'script','`+a+"','"+o+"');",h=this.dataLayer(r,a);return{iframe:p,script:m,dataLayerVar:h}},dataLayer:function(n,o){return` 83 window.`+o+" = window."+o+` || []; 84 window.`+o+".push("+JSON.stringify(n)+")"}},NB=SB,LB=NB,ld=EB(LB);function EB(e){return e&&e.__esModule?e:{default:e}}var $B={dataScript:function(n){var o=document.createElement("script");return o.innerHTML=n,o},gtm:function(n){var o=ld.default.tags(n),s=function(){var l=document.createElement("noscript");return l.innerHTML=o.iframe,l},r=function(){var l=document.createElement("script");return l.innerHTML=o.script,l},a=this.dataScript(o.dataLayerVar);return{noScript:s,script:r,dataScript:a}},initialize:function(n){var o=n.gtmId,s=n.events,r=s===void 0?{}:s,a=n.dataLayer,c=n.dataLayerName,l=c===void 0?"dataLayer":c,d=n.auth,u=d===void 0?"":d,p=n.preview,m=p===void 0?"":p,h=this.gtm({id:o,events:r,dataLayer:a||void 0,dataLayerName:l,auth:u,preview:m});a&&document.head.appendChild(h.dataScript),document.head.insertBefore(h.script(),document.head.childNodes[0]),document.body.insertBefore(h.noScript(),document.body.childNodes[0])},dataLayer:function(n){var o=n.dataLayer,s=n.dataLayerName,r=s===void 0?"dataLayer":s;if(window[r])return window[r].push(o);var a=ld.default.dataLayer(o,r),c=this.dataScript(a);document.head.insertBefore(c,document.head.childNodes[0])}},TB=$B,MB=TB,DB=PB(MB);function PB(e){return e&&e.__esModule?e:{default:e}}var IB=DB.default;const BB=md(IB),RB="_container_1qcxm_1",AB="_text_1qcxm_13",OB="_btn_1qcxm_19",FB="_link_1qcxm_33",da={container:RB,text:AB,btn:OB,link:FB},qB=({isCookieAccepted:e})=>{const[n,o]=i.useState(e),s=()=>{se.set(re.isCookieAccepted,!0),o(!0)};return i.useEffect(()=>{if(n){const a={gtmId:"GTM-58Q5H5KX"};BB.initialize(a)}},[n]),n?null:t.jsxs("div",{className:da.container,children:[t.jsxs("div",{className:da.text,children:['This website uses cookies to enhance your browsing experience and provide personalized content. By clicking "Ok" you agree to the use of cookies as described in our'," ",t.jsx(ge,{className:da.link,to:"/policy",children:"Cookie Policy"}),"."]}),t.jsx("div",{className:da.btn,onClick:s,children:"Ok"})]})},WB="_wrapper_1swsw_1",VB={wrapper:WB},HB=()=>{const e=Bt(Cs),{isAppBannerHidden:n,handleAppBannerClose:o}=Cp(),s=!!se.get(re.isCookieAccepted);return t.jsxs("div",{className:VB.wrapper,children:[!e&&t.jsx(xB,{isVisible:!n,onClose:o}),t.jsx(qB,{isCookieAccepted:s})]})},UB=()=>{const{isAppBannerHidden:e,handleAppBannerClose:n}=Cp(),o=Bt(Cs);return e||!o?null:t.jsxs("div",{className:nt.mobileWrapper,children:[t.jsxs("div",{className:nt.mobileInfo,children:[t.jsx(cp,{className:nt.snLogo}),t.jsxs("div",{className:nt.text,children:[t.jsx("span",{children:"SoftNote App"}),t.jsx("span",{children:"Safe and secure"})]})]}),t.jsxs("div",{className:nt.buttons,children:[t.jsx(O,{className:nt.download,href:"https://download.softnote.com",as:"a",target:"_blank",rel:"noreferrer",children:"Download"}),t.jsx("button",{className:nt.close,onClick:n,children:t.jsx(Cc,{})})]})]})},YB="_layout_1qp6j_1",KB={layout:YB},GB=()=>{var s,r;const e=Fe(),n=(r=(s=e.state)==null?void 0:s.from)==null?void 0:r.pathname,o=e.pathname==="/epos"||n==="/epos";return t.jsxs("div",{className:KB.layout,children:[!o&&t.jsx(UB,{}),t.jsx(i.Suspense,{fallback:t.jsx(wi,{}),children:t.jsx(vs,{})}),!o&&t.jsx(HB,{})]})},Nc=()=>(i.useEffect(()=>{tB()},[]),null),zB="_button_jlr5i_1",ZB="_visible_jlr5i_12",QB="_arrow_jlr5i_17",dl={button:zB,visible:ZB,arrow:QB},XB=300,JB=()=>{const[e,n]=i.useState(!1),o=i.useRef(0),{pathname:s}=Fe();i.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"}),o.current=0,n(!1)},[s]);const r=()=>{window.scrollTo({top:0,behavior:"smooth"})};return i.useEffect(()=>{const c=k5(()=>{const l=window.scrollY,d=l>XB,u=l<o.current;o.current=l,n(d&&u)},200);return window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),t.jsx(O,{className:L(dl.button,{[dl.visible]:e}),onClick:r,children:t.jsx(nr,{className:dl.arrow})})},eR="_wrapper_9xf78_1",tR="_google_9xf78_9",nR="_content_9xf78_22",ul={wrapper:eR,google:tR,content:nR},kp=()=>t.jsxs("footer",{className:ul.wrapper,children:[t.jsxs("span",{className:ul.google,children:["This site is protected by reCAPTCHA and the Google"," ",t.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:"Privacy Policy"})," ","and"," ",t.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:"Terms of Service"})," ","apply."]}),t.jsxs("div",{className:ul.content,children:[t.jsx(ge,{to:"/policy",children:"Privacy Policy"}),t.jsxs("span",{children:["Beta Version ",ko.appVersion]}),t.jsx("span",{children:"© 2024 Tectum Technologies. © 2023 CrispMind"})]})]}),rR="data:image/svg+xml,%3csvg%20viewBox='0%200%2035%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.4923%200.681601C22.0318%200.235035%2021.4061%200%2020.7686%200H9.8597C8.73812%200%207.75821%200.799119%207.5457%201.90378L6.67205%206.36945C6.61302%206.69849%206.86095%207.00404%207.20333%207.00404H8.79715C9.10411%207.00404%209.36385%206.79251%209.42288%206.48696L10.1549%202.7029H20.4026L15.1725%2029.2853H4.92474L5.64492%2025.6188C5.70395%2025.2898%205.45602%2
84024.9842%205.11364%2024.9842H3.53162C3.22466%2024.9842%202.96493%2025.1957%202.90589%2025.5013L2.18572%2029.1913C2.03224%2029.9669%202.28017%2030.7543%202.84686%2031.3184C3.2955%2031.765%203.92122%2032%204.55875%2032H15.4676C16.5892%2032%2017.5691%2031.2009%2017.7816%2030.0962L23.1416%202.80867C23.2951%202.03305%2023.059%201.23393%2022.4923%200.681601Z'%20fill='%237384AA'/%3e%3cpath%20d='M20.9333%2031.9883H22.5271C22.8341%2031.9883%2023.0938%2031.7767%2023.1529%2031.4712L29.2094%200.634594C29.2684%200.305545%2029.0205%200%2028.6781%200H27.0843C26.7773%200%2026.5176%200.211531%2026.4586%200.517077L20.402%2031.3537C20.343%2031.6827%2020.5909%2031.9883%2020.9333%2031.9883Z'%20fill='%237384AA'/%3e%3cpath%20d='M26.5651%2031.9883H28.159C28.4659%2031.9883%2028.7257%2031.7767%2028.7847%2031.4712L34.853%200.634594C34.9121%200.305545%2034.6641%200%2034.3218%200H32.7279C32.421%200%2032.1612%200.211531%2032.1022%200.517077L26.0457%2031.3654C25.9748%2031.6827%2026.2346%2031.9883%2026.5651%2031.9883Z'%20fill='%237384AA'/%3e%3cpath%20d='M1.0535%2019.0533C1.20218%2018.5754%201.55953%2018.2548%202.58101%2018.2548C3.60248%2018.2548%203.91503%2018.5754%203.80334%2019.0533L3.79034%2019.112C3.62597%2019.9456%204.20128%2020.5327%205.22276%2020.5327C6.30294%2020.5327%207.03089%2020.0278%207.20701%2019.1355C7.39486%2018.1726%206.89%2017.6207%205.0349%2016.9867C2.95672%2016.2704%201.80609%2014.9906%202.20529%2012.9827C2.67494%2010.5639%204.87052%209.13135%207.27745%209.13135C9.89572%209.13135%2011.3164%2010.7752%2010.9524%2012.5835C10.9524%2012.5835%2010.9149%2012.7689%2010.8641%2012.924C10.7184%2013.3685%2010.3654%2013.7224%209.34389%2013.7224C8.32241%2013.7224%208.04863%2013.3819%208.14256%2012.924L8.15803%2012.83C8.28719%2012.0786%207.81754%2011.468%206.81955%2011.468C5.83329%2011.468%205.17579%2011.9611%205.01142%2012.7479C4.85878%2013.5228%205.35191%2014.2039%207.12482%2014.8614C9.27344%2015.6716%2010.4476%2016.7636%2010.0131%2018.9593C9.55523%2021.296%207.62968%2022.8694%204.78834%2022.8694C1.99395%2022.8694%200.655464%2021.0376%201.0077%2019.2294C1.02239%2019.1559%201.0316%2019.1162%201.0535%2019.0533Z'%20fill='%23F7F8FA'/%3e%3c/svg%3e",sR=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M17.1327 12.717C17.6251 12.6466 18.0814 12.4184 18.4332 12.0668L20.334 10.166C21.2301 9.26783 21.2301 7.81379 20.334 6.91563L17.0827 3.66428C16.1845 2.76816 14.7305 2.76816 13.8323 3.66428L11.9315 5.56507C11.5799 5.9169 11.3517 6.37321 11.2812 6.86561",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.93369 10L3.66868 16.2649C2.7719 17.1632 2.7719 18.618 3.66868 19.5163L4.48102 20.3286C5.37929 21.2254 6.8341 21.2254 7.73238 20.3286L13.5611 14.4999",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11 13.0002L11.9987 12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.7048 11.7966L12.2031 5.29492",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3 3L21 21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"})),oR=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4415 9.49271L3.66868 16.2655C2.7719 17.1638 2.7719 18.6186 3.66868 19.5169L4.48102 20.3292C5.37929 21.226 6.8341 21.226 7.73238 20.3292L14.5052 13.5564C14.857 13.2048 15.3133 12.9766 15.8057 12.9061L17.1333 12.717C17.6257 12.6466 18.082 12.4184 18.4338 12.0668L20.3346 10.166C21.2307 9.26783 21.2307 7.81379 20.3346 6.91563L17.0833 3.66428C16.1851 2.76816 14.7311 2.76816 13.8329 3.66428L11.9321 5.56507C11.5805 5.9169 11.3523 6.37321 11.2819 6.86561L11.0918 8.19717C11.0203 8.68779 10.7922 9.1422 10.4415 9.49271Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11 12.9987L12.5006 11.498",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.7048 11.7966L12.2031 5.29492",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),aR=e=>i.createElement("svg",{viewBox:"0 0 295 295",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e}
84,i.createElement("g",{filter:"url(#filter0_d_2075_21207)"},i.createElement("path",{d:"M30 285L18 285C13.5817 285 10 281.418 10 277L10 265",stroke:"currentColor",strokeWidth:4,strokeLinecap:"round"})),i.createElement("g",{filter:"url(#filter1_d_2075_21207)"},i.createElement("path",{d:"M285 265L285 277C285 281.418 281.418 285 277 285L265 285",stroke:"currentColor",strokeWidth:4,strokeLinecap:"round"})),i.createElement("g",{filter:"url(#filter2_d_2075_21207)"},i.createElement("path",{d:"M265 10L277 10C281.418 10 285 13.5817 285 18L285 30",stroke:"currentColor",strokeWidth:4,strokeLinecap:"round"})),i.createElement("g",{filter:"url(#filter3_d_2075_21207)"},i.createElement("path",{d:"M10 30V18C10 13.5817 13.5817 10 18 10H30",stroke:"currentColor",strokeWidth:4,strokeLinecap:"round"})),i.createElement("defs",null,i.createElement("filter",{id:"filter0_d_2075_21207",x:0,y:255,width:40,height:40,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},i.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),i.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),i.createElement("feOffset",null),i.createElement("feGaussianBlur",{stdDeviation:4}),i.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),i.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),i.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2075_21207"}),i.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2075_21207",result:"shape"})),i.createElement("filter",{id:"filter1_d_2075_21207",x:255,y:255,width:40,height:40,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},i.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),i.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),i.createElement("feOffset",null),i.createElement("feGaussianBlur",{stdDeviation:4}),i.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),i.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),i.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2075_21207"}),i.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2075_21207",result:"shape"})),i.createElement("filter",{id:"filter2_d_2075_21207",x:255,y:0,width:40,height:40,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},i.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),i.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),i.createElement("feOffset",null),i.createElement("feGaussianBlur",{stdDeviation:4}),i.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),i.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),i.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2075_21207"}),i.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2075_21207",result:"shape"})),i.createElement("filter",{id:"filter3_d_2075_21207",x:0,y:0,width:40,height:40,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},i.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),i.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),i.createElement("feOffset",null),i.createElement("feGaussianBlur",{stdDeviation:4}),i.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),i.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),i.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2075_21207"}),i.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2075_21207",result:"shape"})))),iR="_wrapper_13xqm_1",lR="_backdrop_13xqm_7",cR="_fadeIn_13xqm_1",dR="_content_13xqm_14",uR="_slideIn_13xqm_1",pR="_alert_13xqm_24",ua={wrapper:iR,backdrop:lR,fadeIn:cR,content:dR,slideIn:uR,alert:pR},mR=e=>{const{isOpen:n,errorText:o,onScanClick:s}=e;return n?t.jsxs("div",{className:ua.wrapper,children:[t.jsx("div",{className:ua.backdrop}),t.jsxs("div",{className:ua.content,children:[t.jsx(V,{variant:"error",message:o,className:ua.alert,animated:!0}),t.jsx(O,{onClick:s,children:"Scan again"})]})]}):null},hR="_scanner_aqt6b_1",fR="_header_aqt6b_10",_R="_title_aqt6b_18",gR="_videoWrapper_aqt6b_28",vR="_video_aqt6b_28",yR="_scanRegion_aqt6b_43",bR="_close_aqt6b_52",xR="_controls_aqt6b_67",CR="_controlButton_aqt6b_80",kR="_fileUploadWrapper_aqt6b_94",wR="_fileUpload_aqt6b_94",jR="_alert_aqt6b_106",Dt={scanner:hR,header:fR,title:_R,videoWrapper:gR,video:vR,scanRegion:yR,close:bR,controls:xR,controlButton:CR,fileUploadWrapper:kR,fileUpload:wR,alert:jR},SR=480;function NR(e){const n=e.videoWidth,o=e.videoHeight,s=e.offsetWidth,r=e.offsetHeight,a=n/o,c=s/r;let l,d;a>c?(d=r,l=d*a):(l=s,d=l/a);const u=Math.min(s,r),p=Math.min(SR,u-40),m=(l-p)/2,h=(d-p)/2,f=p*n/l,_=p*o/d,v=m/l*n,g=h/d*o;return{width:f,height:_,x:v,y:g}}const LR=e=>{const{onScan:n,onClose:o}=e,s=i.useRef(null),r=i.useRef(null),a=i.useRef(),[c,l]=i.useState(()=>{var x;return((x=a.current)==null?void 0:x.isFlashOn())??!1}),d=async()=>{var x,N;await((x=a.current)==null?void 0:x.toggleFlash()),l(((N=a.current)==null?void 0:N.isFlashOn())??!1)},[u,p]=i.useState(!1),m=async x=>{const N=await x.hasFlash();p(N)},[h,f]=i.useState(""),_=i.useRef(null),[v,g]=uc(_),C=x=>{n(x.data,f)};i.useEffect(()=>{(async()=>{const S=s.current,j=r.current;
84!S||!j||(a.current=new gl(S,C,{maxScansPerSecond:5,calculateScanRegion:NR,highlightScanRegion:!0,highlightCodeOutline:!1,overlay:j}),v(),await a.current.start(),m(a.current))})();const N=a.current;return()=>{g(),N==null||N.stop()}},[g,v,o]);const y=()=>{var x;f(""),(x=a.current)==null||x.start()},b=async x=>{var S;const N=x.target.files?x.target.files[0]:null;if(N)try{const j=await gl.scanImage(N,{returnDetailedScanResult:!0});C(j)}catch{(S=a.current)==null||S.pause(),f("QR code not recognized. Ensure the code is correct and scan again.")}};return t.jsxs("div",{className:Dt.scanner,ref:_,children:[t.jsxs("div",{className:Dt.header,children:[t.jsx("button",{onClick:o,className:Dt.close,children:t.jsx(No,{})}),t.jsx("h4",{className:Dt.title,children:"Scan QR"})]}),t.jsxs("div",{className:Dt.videoWrapper,children:[t.jsx("video",{ref:s,className:Dt.video,playsInline:!0}),t.jsx("div",{ref:r,className:Dt.scanRegion,children:t.jsx(aR,{})}),t.jsxs("div",{className:Dt.controls,children:[t.jsxs("button",{className:Dt.controlButton,children:[t.jsx("label",{className:Dt.fileUploadWrapper,children:t.jsx("input",{type:"file",accept:"image/*",onChange:b,className:Dt.fileUpload})}),t.jsx(Xu,{})]}),u&&t.jsx("button",{className:Dt.controlButton,onClick:d,children:c?t.jsx(sR,{}):t.jsx(oR,{})})]}),t.jsx(mR,{isOpen:!!h,errorText:h,onScanClick:y})]})]})},ER=e=>{const{onScan:n,isEnabled:o,onClose:s}=e;return o?t.jsx(LR,{onScan:n,onClose:s}):null},$R="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.702%200L13.3706%206.82552L15.1098%202.805L22.702%200Z'%20fill='%23E27625'/%3e%3cpath%20d='M1.19629%200L10.4341%206.88161L8.78852%202.805L1.19629%200Z'%20fill='%23E27625'/%3e%3cpath%20d='M19.3543%2015.8196L16.8672%2019.5783L22.178%2021.0182L23.7114%2015.9131L19.3543%2015.8196Z'%20fill='%23E27625'/%3e%3cpath%20d='M0.205566%2015.9131L1.72027%2021.0182L7.01238%2019.5783L4.54397%2015.8196L0.205566%2015.9131Z'%20fill='%23E27625'/%3e%3cpath%20d='M6.7317%209.49927L5.25439%2011.6872L10.5091%2011.9303L10.3408%206.33899L6.7317%209.49927Z'%20fill='%23E27625'/%3e%3cpath%20d='M17.1667%209.49902L13.5015%206.26392L13.3706%2011.93L18.644%2011.687L17.1667%209.49902Z'%20fill='%23E27625'/%3e%3cpath%20d='M7.01221%2019.5795L10.2099%2018.0648L7.46101%2015.9517L7.01221%2019.5795Z'%20fill='%23E27625'/%3e%3cpath%20d='M13.689%2018.0648L16.868%2019.5795L16.4379%2015.9517L13.689%2018.0648Z'%20fill='%23E27625'/%3e%3cpath%20d='M16.868%2019.5798L13.689%2018.0651L13.9508%2020.1034L13.9134%2020.9636L16.868%2019.5798Z'%20fill='%23D7C1B3'/%3e%3cpath%20d='M7.01221%2019.5798L9.96682%2020.9636L9.94811%2020.1034L10.2099%2018.0651L7.01221%2019.5798Z'%20fill='%23D7C1B3'/%3e%3cpath%20d='M10.0224%2014.6057L7.38574%2013.8391L9.25574%2012.9976L10.0224%2014.6057Z'%20fill='%232F343B'/%3e%3cpath%20d='M13.8755%2014.6057L14.6422%2012.9976L16.5122%2013.8391L13.8755%2014.6057Z'%20fill='%232F343B'/%3e%3cpath%20d='M7.01284%2019.5783L7.48037%2015.8196L4.54443%2015.9131L7.01284%2019.5783Z'%20fill='%23CC6228'/%3e%3cpath%20d='M16.4185%2015.8196L16.8673%2019.5783L19.3544%2015.9131L16.4185%2015.8196Z'%20fill='%23CC6228'/%3e%3cpath%20d='M18.644%2011.6873L13.3706%2011.9304L13.8755%2014.6045L14.6422%2012.9963L16.5122%2013.8378L18.644%2011.6873Z'%20fill='%23CC6228'/%3e%3cpath%20d='M7.38618%2013.8378L9.25618%2012.9963L10.0229%2014.6045L10.5091%2011.9304L5.25439%2011.6873L7.38618%2013.8378Z'%20fill='%23CC6228'/%3e%3cpath%20d='M5.25439%2011.6873L7.46102%2015.9509L7.38618%2013.8378L5.25439%2011.6873Z'%20fill='%23E27625'/%3e%3cpath%20d='M16.5123%2013.8378L16.4375%2015.9509L18.6441%2011.6873L16.5123%2013.8378Z'%20fill='%23E27625'/%3e%3cpath%20d='M10.5096%2011.9304L10.0234%2014.6045L10.6405%2017.7462L10.7901%2013.5947L10.5096%2011.9304Z'%20fill='%23E27625'/%3e%3cpath%20d='M13.3706%2011.9304L13.1274%2013.5947L13.2397%2017.7462L13.8755%2014.6045L13.3706%2011.9304Z'%20fill='%23E27625'/%3e%3cpath%20d='M13.8756%2014.6048L13.2397%2017.7465L13.6885%2018.0643L16.4374%2015.9512L16.5123%2013.8381L13.8756%2014.6048Z'%20fill='%23F5841F'/%3e%3cpath%20d='M7.38574%2013.8381L7.46058%2015.9512L10.2095%2018.0643L10.6395%2017.7465L10.0224%2014.6048L7.38574%2013.8381Z'%20fill='%23F5841F'/%3e%3cpath%20d='M13.9125%2020.9621L13.9499%2020.1019L13.7068%2019.8962H10.1912L9.94811%2020.1019L9.96682%2020.9621L7.01221%2019.5782L8.0594%2020.4198L10.1538%2021.841H13.7442L15.8386%2020.4198L16.8671%2019.5782L13.9125%2020.9621Z'%20fill='%23C0AD9E'/%3e%3cpath%20d='M13.6882%2018.0648L13.2395%2017.7468H10.6401L10.21%2018.0648L9.94824%2020.103L10.1913%2019.8973H13.7069L13.95%2020.103L13.6882%2018.0648Z'%20fill='%232F343B'/%3e%3cpath%20d='M23.0951%207.27431L23.8805%203.49691L22.7024%200L13.689%206.60111L17.1672%209.4996L22.0666%2010.9021L23.1325%209.64921L22.665%209.31264L23.413%208.63941L22.852%208.20935L23.6%207.64831L23.0951%207.27431Z'%20fill='%23763E1A'/%3e%3cpath%20d='M0%203.49691L0.804102%207.27431L0.2992%207.64831L1.04721%208.20935L0.486201%208.63941L1.23421%209.31264L0.747999%209.64921L1.8326%2010.9021L6.73201%209.4996L10.2102%206.60111L1.19681%200L0%203.49691Z'%20fill='%23763E1A'/%3e%3cpath%20d='M22.0662%2010.9026L17.1668%209.50012L18.6441%2011.6881L16.4375%2015.9517L19.3547%2015.9142H23.7118L22.0662%2010.9026Z'%20fill='%23F5841F'/%3e%3cpath%20d='M6.73188%209.50012L1.83247%2010.9026L0.205566%2015.9142H4.54397L7.4612%2015.9517L5.25458%2011.6881L6.73188%209.50012Z'%20fill='%23F5841F'/%3e%3cpath%20d='M13.3701%2011.9297L13.688%206.60018L15.1092%202.80408H8.7885
847L10.2098%206.60018L10.509%2011.9297L10.6399%2013.6127V17.7454H13.2392L13.2579%2013.6127L13.3701%2011.9297Z'%20fill='%23F5841F'/%3e%3c/svg%3e",TR="_wrapper_1gfzo_1",MR="_wrapperDisabled_1gfzo_26",DR="_icon_1gfzo_42",pa={wrapper:TR,wrapperDisabled:MR,icon:DR},PR="https://metamask.io/download/",IR=()=>{const[e,n]=i.useState(!1);async function o(){try{await window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x3eb",rpcUrls:["https://rpc.softnote.com"],chainName:"Tectum",nativeCurrency:{name:"TET",symbol:"TET",decimals:18},blockExplorerUrls:["https://explorer.tectum.io/"]}]})}catch(r){console.log(r)}}const s=async()=>{if(!e)try{n(!0),window.ethereum?(await window.ethereum.request({method:"eth_requestAccounts"}),await o()):window.open(PR,"_blank")}catch(r){console.log(r)}finally{n(!1)}};return t.jsxs("div",{className:L(pa.wrapper,e?pa.wrapperDisabled:""),onClick:s,children:[t.jsx("img",{src:$R,alt:"metamask",className:pa.icon}),t.jsx("span",{className:pa.title,children:"METAMASK"})]})},BR="_wrapper_epu16_1",cd={wrapper:BR},RR=e=>{const{onClick:n}=e;return t.jsx(ge,{to:"/settings/privacy/private-key",className:cd.wrapper,onClick:n,children:t.jsx("span",{className:cd.title,children:"Get Private Key"})})},AR="_wrapper_4ralg_1",OR="_google_4ralg_9",FR="_content_4ralg_23",pl={wrapper:AR,google:OR,content:FR},qR=()=>t.jsxs("div",{className:pl.wrapper,children:[t.jsxs("span",{className:pl.google,children:["This site is protected by reCAPTCHA and the Google"," ",t.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:"Privacy Policy"})," ","and"," ",t.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:"Terms of Service"})," ","apply."]}),t.jsxs("div",{className:pl.content,children:[t.jsx(ge,{to:"/policy",children:"Privacy Policy"}),t.jsxs("span",{children:["Beta Version ",ko.appVersion]}),t.jsxs("span",{children:["© ",new Date().getFullYear()," Tectum®"]})]})]}),WR="_wrapper_ms23m_1",VR="_closeButton_ms23m_10",HR="_logo_ms23m_28",ml={wrapper:WR,closeButton:VR,logo:HR},UR=e=>{const{onClose:n}=e;return t.jsxs("div",{className:ml.wrapper,children:[t.jsx("button",{className:ml.closeButton,onClick:n,children:t.jsx(No,{})}),t.jsx(ge,{to:"/bills",className:ml.logo,onClick:n,children:t.jsx("img",{src:Mo,alt:"Softnote logo"})})]})},YR=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14.524 17.7098L13.669 21.9661H5.99974L6.27427 20.5609L8.22968 10.8292L11.5973 10.8245C11.8753 10.8245 12.1149 10.6268 12.1673 10.3534L12.3638 9.34374C12.4197 9.05642 12.1998 8.79004 11.9067 8.79004L7.04201 8.79237C6.76516 8.79237 6.52669 8.98779 6.47202 9.25999L4.51545 19.0021C4.50498 19.0277 4.49684 19.0545 4.49102 19.0812L3.94313 21.8905C3.7163 22.9897 4.56547 24.0006 5.67287 24.0006H13.8935C14.7427 24.0006 15.4604 23.391 15.6232 22.5733V22.571L16.5818 17.7982C16.6399 17.5097 16.4189 17.241 16.1246 17.241H15.094C14.8171 17.2433 14.5787 17.4376 14.524 17.7098Z",fill:"#487BFF"}),i.createElement("path",{d:"M9.14407 6.28965L9.99905 2.03335H17.6695L17.3949 3.43854L15.4395 13.1702L12.1196 13.1749C11.8416 13.1749 11.602 13.3726 11.5497 13.646L11.3531 14.6557C11.2972 14.943 11.5171 15.2094 11.8102 15.2094L16.6284 15.2071C16.9052 15.2071 17.1437 15.0116 17.1984 14.7394L19.1549 4.99729C19.1654 4.97169 19.1735 4.94494 19.1794 4.91819L19.7284 2.11012C19.9552 1.01086 19.1061 0 17.9987 0H9.77571C8.92654 0 8.20882 0.609539 8.04597 1.4273V1.42962L7.08746 6.2024C7.0293 6.49089 7.25031 6.7596 7.54461 6.7596H8.57525C8.8521 6.75727 9.09056 6.56301 9.14523 6.29081L9.14407 6.28965Z",fill:"#487BFF"})),KR=e=>i.createElement("svg",{viewBox:"0 0 35 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M22.4923 0.681601C22.0318 0.235035 21.4061 0 20.7686 0H9.8597C8.73812 0 7.75821 0.799119 7.5457 1.90378L6.67205 6.36945C6.61302 6.69849 6.86095 7.00404 7.20333 7.00404H8.79715C9.10411 7.00404 9.36385 6.79251 9.42288 6.48696L10.1549 2.7029H20.4026L15.1725 29.2853H4.92474L5.64492 25.6188C5.70395 25.2898 5.45602 24.9842 5.11364 24.9842H3.53162C3.22466 24.9842 2.96493 25.1957 2.90589 25.5013L2.18572 29.1913C2.03224 29.9669 2.28017 30.7543 2.84686 31.3184C3.2955 31.765 3.92122 32 4.55875 32H15.4676C16.5892 32 17.5691 31.2009 17.7816 30.0962L23.1416 2.80867C23.2951 2.03305 23.059 1.23393 22.4923 0.681601Z",fill:"#7384AA"}),i.createElement("path",{d:"M20.9333 31.9883H22.5271C22.8341 31.9883 23.0938 31.7767 23.1529 31.4712L29.2094 0.634594C29.2684 0.305545 29.0205 0 28.6781 0H27.0843C26.7773 0 26.5176 0.211531 26.4586 0.5170
8477L20.402 31.3537C20.343 31.6827 20.5909 31.9883 20.9333 31.9883Z",fill:"#7384AA"}),i.createElement("path",{d:"M26.5651 31.9883H28.159C28.4659 31.9883 28.7257 31.7767 28.7847 31.4712L34.853 0.634594C34.9121 0.305545 34.6641 0 34.3218 0H32.7279C32.421 0 32.1612 0.211531 32.1022 0.517077L26.0457 31.3654C25.9748 31.6827 26.2346 31.9883 26.5651 31.9883Z",fill:"#7384AA"}),i.createElement("path",{d:"M1.0535 19.0533C1.20218 18.5754 1.55953 18.2548 2.58101 18.2548C3.60248 18.2548 3.91503 18.5754 3.80334 19.0533L3.79034 19.112C3.62597 19.9456 4.20128 20.5327 5.22276 20.5327C6.30294 20.5327 7.03089 20.0278 7.20701 19.1355C7.39486 18.1726 6.89 17.6207 5.0349 16.9867C2.95672 16.2704 1.80609 14.9906 2.20529 12.9827C2.67494 10.5639 4.87052 9.13135 7.27745 9.13135C9.89572 9.13135 11.3164 10.7752 10.9524 12.5835C10.9524 12.5835 10.9149 12.7689 10.8641 12.924C10.7184 13.3685 10.3654 13.7224 9.34389 13.7224C8.32241 13.7224 8.04863 13.3819 8.14256 12.924L8.15803 12.83C8.28719 12.0786 7.81754 11.468 6.81955 11.468C5.83329 11.468 5.17579 11.9611 5.01142 12.7479C4.85878 13.5228 5.35191 14.2039 7.12482 14.8614C9.27344 15.6716 10.4476 16.7636 10.0131 18.9593C9.55523 21.296 7.62968 22.8694 4.78834 22.8694C1.99395 22.8694 0.655464 21.0376 1.0077 19.2294C1.02239 19.1559 1.0316 19.1162 1.0535 19.0533Z",fill:"#F7F8FA"})),GR=e=>i.createElement("svg",{viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M21.2576 10.3897C22.2125 14.532 20.3084 18.8058 16.5902 20.8661C12.8719 22.9264 8.23868 22.2749 5.23283 19.269C2.22698 16.2632 1.57546 11.6299 3.63577 7.91168C5.69607 4.19342 9.96993 2.28938 14.1122 3.24433",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.125 6.95964V3.79297",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.543 5.375H20.7096",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("circle",{cx:12,cy:10,r:2.5,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.5 16.5C7.89691 15.5894 8.7956 15.0005 9.78894 15H14.2111C15.2044 15.0005 16.1031 15.5894 16.5 16.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),zR=e=>i.createElement("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M16 3H19",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M1 3H12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8 10H19",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M1 10H4",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16 17H19",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M1 17H12",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.4142 1.58579C16.1953 2.36684 16.1953 3.63317 15.4142 4.41422C14.6332 5.19527 13.3668 5.19527 12.5858 4.41422C11.8047 3.63317 11.8047 2.36684 12.5858 1.58579C13.3668 0.804738 14.6332 0.804738 15.4142 1.58579",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.41422 8.5858C8.19527 9.36685 8.19527 10.6332 7.41422 11.4142C6.63317 12.1953 5.36684 12.1953 4.58579 11.4142C3.80474 10.6332 3.80474 9.36685 4.58579 8.5858C5.36684 7.80475 6.63317 7.80475 7.41422 8.5858",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.4142 15.5858C16.1953 16.3669 16.1953 17.6332 15.4142 18.4142C14.6332 19.1953 13.3668 19.1953 12.5858 18.4142C11.8047 17.6332 11.8047 16.3669 12.5858 15.5858C13.3668 14.8048 14.6332 14.8048 15.4142 15.5858",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ZR=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 11.291C3 13.974 4.42 16.336 6.599 17.825C6.598 18.68 6.6 19.832 6.6 21.041L10.131 19.294C10.735 19.41 11.359 19.473 12 19.473C16.952 19.473 21 15.83 21 11.291C21 6.752 16.952 3.109 12 3.109C7.048 3.109 3 6.752 3 11.291Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.899 12.328V12.121C11.899 11.443 12.318 11.076 12.738 10.794C13.148 10.518 13.559 10.158 13.559 9.494C13.559 8.577 12.816 7.835 11.9 7.835C10.984 7.835 10.24 8.576 10.24 9.493",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.8981 14.667C11.8151 14.667 11.7481 14.734 11.7491 14.817C11.7491 14.9 11.8161 14.967 11.8991 14.967C11.9821 14.967 12.0491 14.9 12.0491 14.817C12.0491 14.734 11.9831 14.667 11.8981 14.667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),QR="_item_h5pol_1",XR="_linkLabel_h5pol_13",JR="_linkIcon_h5pol_20",eA="_active_h5pol_26",tA="_icon_h5pol_32",nA="_label_h5pol_43",rA="_disabled_h5pol_48",gt={item:QR,linkLabel:XR,linkIcon:JR,active:eA,icon:tA,label:nA,disabled:rA},rs=e=>{const{icon:n,label:o,link:s,disabled:r,active:a,handleClick:c}=e,l=s==null?void 0:s.startsWith("http"),d=t.jsxs(t.Fragment,{children:[t.jsx("div",{className:L(gt.icon,{[gt.disabled]:r}),children:n}),t.jsxs("div",{className:L({[gt.disabled]:r},gt.linkLabel),children:[o,l&&t.jsx(To,{className:gt.linkIcon})]})]});return l?t.jsx("a",{href:s,className:L(gt.item,{[gt.disabled]:r,[gt.active]:a}),target:"_blank",rel:"noopener noreferrer",children:d}):s?t.jsx(ge,{to:s,className:L(gt.item,{[gt.disabled]:r,[gt.active]:a}),onClick:c,children:d}):t.jsx("div",{className:L(gt.item,{[gt.disabled]:r,[gt.active]:a}),onClick:c,children:d})},sA="_menu_114l1_1",oA={menu:sA},aA=e=>{const{onClick:n}=e,{pathname:o}=Fe();return t.jsx(t.Fragment,{children:t.jsxs("div",{className:oA.menu,children:[t.jsx(rs,{icon:t.jsx(Uu,{}),label:"Staking",link:"/staking",active:o.startsWith("/staking"),handleClick:n}),t.jsx(rs,{icon:t.jsx(GR,{}),label:"Referrals",link:"/referrals",active:o.startsWith("/referrals"),handleClick:n}),t.jsx(rs,{icon:t.jsx(zR,{}),label:"Settings",link:"/settings",active:o.startsWith("/settings"),handleClick:n}),t.jsx(rs,{icon:t.jsx(ZR,{}),label:"Help",link:"https://tawk.to/chat/62022136b9e4e21181bdf9c9/1frc53fop",handleClick:n}),t.jsx(rs,{icon:t.jsx(YR,{}),label:"Tectum Explorer",link:"https://explorer.tectum.io/"}),t.jsx(rs,{icon:t.jsx(KR,{}),label:"SoftNote Cash",link:"https://softnote.cash/"})]})})},iA="_button_1kv2a_1",lA={button:iA},cA=()=>{const[e,n]=i.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("button",{className:lA.button,type:"button",onClick:()=>n(!0),children:"Bank Transfers/Swaps"}),t.jsx(bp,{isOpen:e,onClose:()=>n(!1)})]})},dA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.89266 5.515C10.9652 4.11015 13.4077 3.35105 15.9114 3.33361C17.5772 3.32343 19.2286 3.64163 20.7713 4.27002C22.314 4.89841 23.7177 5.82467 24.9023 6.99586C26.0868 8.16704 27.0289 9.56019 27.
846748 11.0957C28.3206 12.6312 28.6575 14.2789 28.6662 15.9446C28.6772 18.4484 27.9458 20.8993 26.5645 22.9877C25.1833 25.076 23.2141 26.7082 20.9057 27.678C18.5973 28.6477 16.0532 28.9116 13.595 28.4363C11.1367 27.9609 8.87439 26.7677 7.0939 25.0073C5.31342 23.2469 4.09461 20.9983 3.59143 18.5455C3.08825 16.0928 3.32328 13.5459 4.26682 11.2267C5.21036 8.90743 6.82008 6.91985 8.89266 5.515ZM13.0462 14.9946C13.4181 15.2442 13.8557 15.3779 14.3036 15.3788C14.9043 15.3792 15.4806 15.1413 15.9061 14.7172C16.3316 14.2932 16.5715 13.7176 16.5731 13.1169C16.5737 12.669 16.4415 12.231 16.1932 11.8582C15.9449 11.4855 15.5917 11.1947 15.1782 11.0226C14.7646 10.8506 14.3094 10.805 13.8699 10.8917C13.4305 10.9784 13.0266 11.1934 12.7094 11.5095C12.3921 11.8257 12.1757 12.2289 12.0876 12.668C11.9994 13.1071 12.0434 13.5625 12.214 13.9767C12.3847 14.3908 12.6742 14.745 13.0462 14.9946ZM16.1248 17.8122L16.114 17.8277C16.6396 18.4183 17.4606 18.6904 18.2429 18.7569C19.0255 18.8003 19.8097 18.7099 20.5619 18.4894C21.3121 18.2934 22.0425 18.0279 22.7434 17.6963C23.4453 17.377 24.099 16.9606 24.6852 16.4594L24.6651 16.4363C24.6187 16.4734 24.5723 16.5089 24.5228 16.5429C24.3033 16.696 24.0714 16.8429 23.8395 16.982H23.8318C23.454 17.1866 23.0648 17.3694 22.6661 17.5293C21.9668 17.8189 21.2422 18.043 20.5016 18.1987C19.7656 18.3432 19.0158 18.4054 18.266 18.3843C17.516 18.3886 16.7793 18.1858 16.1372 17.7983L16.1248 17.8122ZM22.0194 15.1033C21.966 15.1851 21.9382 15.281 21.9394 15.3788C21.941 15.5088 21.9939 15.6329 22.0866 15.7241C22.1792 15.8153 22.3041 15.8662 22.4342 15.8658C22.5319 15.8655 22.6273 15.8361 22.7084 15.7815C22.7894 15.7268 22.8523 15.6493 22.8892 15.5588C22.9262 15.4683 22.9353 15.3689 22.9156 15.2731C22.8959 15.1774 22.8482 15.0897 22.7785 15.0211C22.7089 14.9526 22.6204 14.9062 22.5244 14.888C22.4284 14.8698 22.3291 14.8806 22.2392 14.9189C22.1493 14.9572 22.0728 15.0214 22.0194 15.1033ZM22.2533 19.0243C20.5619 20.742 17.5611 24.1 18.0511 27.5275C20.9394 27.012 23.529 25.4313 25.3075 23.0979C27.0861 20.7646 27.924 17.8487 27.6556 14.9271C27.3872 12.0055 26.032 9.29105 23.8581 7.32083C21.6841 5.35061 18.8499 4.26811 15.9161 4.28751C13.7807 4.2905 11.6868 4.87751 9.86102 5.985C8.03526 7.09249 6.5472 8.67828 5.55792 10.5707C4.56865 12.4631 4.11583 14.5901 4.24849 16.7213C4.38115 18.8526 5.09423 20.907 6.31055 22.6621C7.31309 20.4138 7.47771 18.433 7.69279 15.8449C7.70193 15.7349 7.71115 15.6239 7.72054 15.5117C7.88906 12.9623 8.58786 10.8489 12.9369 9.65999C13.9294 9.4219 14.9637 9.51002 16.0119 9.75584C16.9581 9.53166 18.0558 9.5193 18.6402 10.0249C18.8567 10.1939 19.0437 10.3977 19.1937 10.6278C19.2346 10.7031 19.2702 10.7811 19.3003 10.8613C20.1939 11.2138 21.0767 11.5616 21.9286 11.809C26.4121 13.0319 25.9792 15.4793 23.7838 17.5293C23.4674 17.8537 23.1377 18.1691 22.8418 18.4522C22.6202 18.6642 22.4174 18.8582 22.2533 19.0243ZM15.6322 14.0241C15.8072 13.7608 15.9001 13.4515 15.8992 13.1354C15.899 12.9261 15.8575 12.7188 15.7773 12.5255C15.697 12.3322 15.5794 12.1566 15.4312 12.0087C15.2831 11.8609 15.1072 11.7436 14.9138 11.6637C14.7203 11.5838 14.513 11.5428 14.3037 11.543C13.9875 11.5427 13.6784 11.6362 13.4155 11.8117C13.1526 11.9872 12.9476 12.2368 12.8266 12.5289C12.7057 12.8209 12.6741 13.1423 12.7359 13.4524C12.7977 13.7624 12.9502 14.0471 13.1739 14.2704C13.3977 14.4937 13.6827 14.6456 13.9928 14.7069C14.303 14.7681 14.6243 14.7359 14.9162 14.6143C15.208 14.4928 15.4572 14.2874 15.6322 14.0241Z",fill:"currentColor"}),i.createElement("circle",{cx:16.0003,cy:16,r:12.0833,stroke:"currentColor",strokeWidth:1.5})),uA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14.438 3.0378C18.1792 2.63487 21.5015 3.6265 24.3559 6.07946L24.77 6.44925C26.7903 8.33177 28.0649 10.6677 28.6294 13.4089C28.8414 14.4111 28.9263 15.436 28.8833 16.4584L28.8572 16.8972C28.7632 18.0708 28.3492 19.096 27.5226 19.9167L27.3507 20.0782C26.2731 21.05 24.8464 21.3113 23.5564 20.7917L23.3012 20.6758C22.5361 20.3034 22.0212 19.6902 21.6736 18.9102C21.4106 18.2881 21.2675 17.6228 21.2505 16.9493V14.6016C21.2505 14.5126 21.2395 14.4102 21.2361 14.3412C21.2329 14.2784 21.2021 14.2218 21.1528 14.1862L21.0981 14.1576L21.0538 14.1433C20.9886 14.1215 20.9176 14.1346 20.865 14.1745L20.8195 14.2227L20.6632 14.4545L17.9301 18.8724C17.6536 19.3181 17.4254 19.747 17.1124 20.1133L16.9718 20.2657L16.9692 20.2696C16.764 20.4905 16.5325 20.6863 16.2804 20.8516C15.5854 21.2819 14.7823 21.1121 14.3156 20.4675L14.227 20.3334C14.0085 19.9505 13.8787 19.524 13.8468
8419.086L13.839 18.8972V18.8933L13.8221 17.7409C13.8205 17.3563 13.8221 16.9701 13.8208 16.5808V14.4284C13.8204 14.3505 13.775 14.28 13.7049 14.2461C13.6858 14.237 13.6651 14.2279 13.645 14.2214L13.5825 14.2123H13.559C13.5068 14.2124 13.4569 14.2321 13.4197 14.267L13.3859 14.3086L7.87415 23.1133C7.8272 23.189 7.83547 23.2867 7.89369 23.3542C7.94415 23.4125 8.01026 23.4954 8.06556 23.5573L8.06947 23.5599C9.70787 25.319 11.7119 26.4587 14.0864 26.8594L14.7348 26.9519C17.9536 27.3289 20.8221 26.3961 23.3012 24.1927L23.3025 24.194L23.3104 24.1849C23.4725 24.0225 23.6754 23.9064 23.8976 23.849C24.0318 23.8234 24.1705 23.8254 24.3038 23.8555C24.4388 23.8861 24.5664 23.9449 24.6775 24.0274C24.7886 24.1099 24.8826 24.2144 24.951 24.3347C25.0192 24.4549 25.062 24.5904 25.076 24.7279C25.0928 24.8899 25.07 25.054 25.0109 25.2058C24.9664 25.3197 24.9019 25.4249 24.8208 25.5157L24.7348 25.6016L24.7296 25.6055C23.3907 26.863 21.7951 27.8139 20.0551 28.3933L19.7049 28.5039C18.4601 28.8791 17.1668 29.0636 15.8689 29.0508L15.3117 29.0339C10.4559 28.7907 6.16497 25.7198 4.21921 21.3021L4.03822 20.8698C2.85723 17.9038 2.79524 14.609 3.86634 11.6016C4.93766 8.59421 7.0697 6.07888 9.85983 4.52738L10.3963 4.24222C11.6616 3.609 13.0304 3.20046 14.4393 3.0391L14.438 3.0378ZM25.3351 10.3008C23.048 6.47298 18.7222 4.40528 14.3911 5.09509L13.9718 5.17191C10.7941 5.80858 8.38385 7.53066 6.73744 10.2292L6.41843 10.7813C5.28536 12.8584 4.9108 15.0925 5.20619 17.4375L5.27389 17.8985C5.45691 18.9714 5.79906 20.0128 6.28822 20.987L6.29603 21.0013C6.33357 21.0633 6.37724 21.1213 6.42494 21.1758C6.46678 21.2236 6.52823 21.249 6.5916 21.2448C6.6552 21.2404 6.71422 21.207 6.74915 21.1537C6.79275 21.0872 6.84527 21.0121 6.87936 20.9584L12.9145 11.2813L12.9171 11.2787C13.0832 11.0023 13.2985 10.7589 13.5512 10.5586L13.5499 10.5573C13.9313 10.2673 14.3291 10.1698 14.7765 10.3177C14.9573 10.3784 15.1223 10.4796 15.2596 10.612C15.3968 10.7445 15.5023 10.9062 15.5695 11.0847L15.5708 11.0886C15.6977 11.4083 15.7762 11.7455 15.8012 12.0873L15.809 12.4297L15.8077 17.4011L15.809 17.405L15.8143 17.6758C15.8161 17.7678 15.8787 17.8475 15.9679 17.8698L16.0122 17.8802C16.0947 17.9007 16.1816 17.8683 16.2296 17.7982C16.2661 17.7446 16.3271 17.6603 16.3702 17.586L16.3715 17.5873C17.2407 16.1792 18.1008 14.769 18.9809 13.3698L18.9796 13.3685C19.2416 12.962 19.5299 12.5725 19.839 12.2006L19.8403 12.198C20.0901 11.8904 20.4054 11.6411 20.7622 11.4688L20.7687 11.4662C21.1058 11.291 21.4965 11.2477 21.8637 11.3451C22.2311 11.4426 22.5497 11.6741 22.7557 11.9935L22.7583 11.9974C22.8564 12.1416 22.9403 12.2965 23.0083 12.4571C23.1375 12.7911 23.2173 13.1429 23.2439 13.4987L23.2531 13.8542V16.8177C23.2452 17.2547 23.3304 17.6892 23.5018 18.0912V18.0938C23.732 18.6169 24.1261 18.9042 24.5577 18.9961C24.9816 19.0862 25.4277 18.9853 25.7739 18.7605L25.7765 18.7592C26.2767 18.4239 26.635 17.9138 26.7804 17.3295V17.3269C26.8909 16.8557 26.9321 16.3711 26.9041 15.8881L26.895 15.5183C26.8236 13.6775 26.2881 11.882 25.3351 10.3008Z",fill:"currentColor"})),pA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4H22.0053C25.316 4 28 6.684 28 9.99467V22.0067C28 25.316 25.316 28 22.0053 28H9.99467C6.684 28 4 25.316 4 22.0053V10C4 6.68667 6.68667 4 10 4V4Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.3119 18.8266C11.733 19.043 11.0918 19.0206 10.5294 18.7643C10.1869 18.6083 9.88729 18.3716 9.65622 18.0745C9.42515 17.7774 9.26947 17.4288 9.2025 17.0584C9.13552 16.6881 9.15925 16.307 9.27164 15.9478C9.38402 15.5886 9.58174 15.262 9.84787 14.9959C10.114 14.7297 10.4406 14.532 10.7998 14.4196C11.159 14.3072 11.5401 14.2835 11.9104 14.3505C12.2808 14.4175 12.6294 14.5732 12.9265 14.8042C13.2236 15.0353 13.4603 15.3349 13.6163 15.6774H15.4497C15.2134 14.7092 14.6305 13.8612 13.8113 13.2936C12.9921 12.7261 11.9933 12.4784 11.0038 12.5975C10.0144 12.7165 9.10279 13.1939 8.4415 13.9395C7.78021 14.6851 7.41504 15.6472 7.41504 16.6438C7.41504 17.6404 7.78021 18.6024 8.4415 19.348C9.10279 20.0936 10.0144 20.5711 11.0038 20.6901C11.9933 20.8091 12.9921 20.5614 13.8113 19.9939C14.6305 19.4264 15.2134 18.5783 15.4497 17.6102H13.6163C13.36 18.1726 12.8908 18.6101 12.3119 18.8266ZM21.8888 20.3934C22.3166 20.2315 22.7128 19.9961 23.0595 19.6976C23.6899 19.1589 24.1399 18.4397 24.3488 17.6372C24.5577 16.8347 24.5154 15.9874 24.2277 15.2097C23.9399 14.432 23.4206 13.7612 22.7397 13.2879C22.0588 12.8146 21.2491 12.5615 20.4198 12.5628H20.1216C19.4099 12.619 18.725 12.8587 18.1336 13.2586V8.71924H16.4769V20.3934H18.1446V19.9737C18.6885 20.3407 19.3131 20.5705 19.9651 20.6436C20.6171 20.7167 21.2771 20.6308 21.8888 20.3934ZM22.6511 17.5474C22.7648 17.2596 22.8199 16.952 22.8132 16.6427C22.7999 16.0353 22.5494 15.4572 22.1151 15.0323C21.6809 14.6074 21.0975 14.3695 20.49 14.3695C19.8824 14.3695 19.299 14.6074 18.8648 15.0323C18.4305 15.4572 18.18 16.0353 18.1667 16.6427C18.16 16.952 18.2151 17.2596 18.3288 17.5474C18.4425 17.8351 18.6126 18.0973 18.829 18.3185C19.0454 18.5396 19.3038 18.7154 19.589 18.8353C19.8742 18.9553 20.1805 19.0171 20.49 19.0171C20.7994 19.0171 21.1057 18.9553 21.3909 18.8353C21.6761 18.7154 21.9345 18.5396 22.1509 18.3185C22.3673 18.0973 22.5374 17.8351 22.6511 17.5474Z",fill:"currentColor"})),mA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.99985H22.0053C25.316 3.99985 28 6.68385 28 9.99451V22.0065C28 25.3158 25.316 27.9998 22.0053 27.9998H9.99467C6.684 27.9998 4 25.3158 4 22.0052V9.99985C4 6.68651 6.68667 3.99985 10 3.99985V3.99985Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.7998 17.1998H21.9998",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M22.0002 11.1999H20.7402C18.7855 11.1999 17.2002 12.7852 17.2002 14.7399V15.9999V27.9999",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),hA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99467 3.99985H22.0067C25.316 3.99985 28 6.68251 28 9.99451V22.0065C28 25.3158 25.3173 27.9998 22.0053 27.9998H9.99467C6.684 27.9998 4 25.3172 4 22.0052V9.99451C4 6.68385 6.68267 3.99985 9.99467 3.99985V3.99985Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M22.5986 8.95052C22.3506 8.95186 22.1493 9.15319 22.1493 9.40119C22.1493 9.64919 22.3519 9.85052 22.5999 9.85052C22.8479 9.85052 23.0493 9.64919 23.0493 9.40119C23.0506 9.15186 22.8479 8.95052 22.5986 8.95052",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.3943 12.6057C21.2688 14.4803 21.2688 17.5195 19.3943 19.394C17.5198 21.2685 14.4806 21.2685 12.6061 19.394C10.7316 17.5195 10.7316 14.4803 12.6061 12.6057C14.4806 10.7312 17.5198 10.7312 19.3943 12.6057",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),fA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.99985H22.0053C25.316 3.99985 28 6.68385 28 9.99451V22.0065C28 25.3158 25.316 27.9998 22.0053 27.9998H9.99467C6.684 27.9998 4 25.3158 4 22.0052V9.99985C4 6.68651 6.68667 3.99985 10 3.99985V3.99985Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.8268 14.7998V21.9998",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.625 21.9999V17.7999C15.625 16.1425 16.9677 14.7999 18.625 14.7999V14.7999C20.2823 14.7999 21.625 16.1425 21.625 17.7999V21.9999",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.8235 10.4505C10.6582 10.4505 10.5235 10.5852 10.5249 10.7505C10.5249 10.9159 10.6595 11.0505 10.8249 11.0505C10.9902 11.
840505 11.1249 10.9159 11.1249 10.7505C11.1249 10.5839 10.9902 10.4505 10.8235 10.4505",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),_A=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.99985H22.0053C25.316 3.99985 28 6.68385 28 9.99451V22.0065C28 25.3158 25.316 27.9998 22.0053 27.9998H9.99467C6.684 27.9998 4 25.3158 4 22.0052V9.99985C4 6.68651 6.68667 3.99985 10 3.99985V3.99985Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4588 20.6545L12.3761 17.0892C12.3748 17.0879 9.27475 16.1212 9.27475 16.1212C8.92008 16.0105 8.90275 15.5132 9.25075 15.3799L21.0521 10.8279C21.4881 10.6599 21.9374 11.0425 21.8414 11.4999L19.8588 20.8439C19.7428 21.3919 19.0988 21.6359 18.6494 21.3025L15.8334 19.2225L14.1734 20.8385C13.9401 21.0625 13.5534 20.9625 13.4588 20.6545V20.6545Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),gA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4H22.0053C25.316 4 28 6.684 28 9.99467V22.0067C28 25.316 25.316 28 22.0053 28H9.99467C6.684 28 4 25.316 4 22.0053V10C4 6.68667 6.68667 4 10 4V4Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.6479 8.74002C21.341 8.46188 20.8667 8.48523 20.5885 8.79217L16.7956 12.9779L13.7667 8.85195C13.6254 8.65948 13.4009 8.54578 13.1622 8.54578H8.99415C8.71163 8.54578 8.45307 8.70455 8.32527 8.95651C8.19747 9.20848 8.22211 9.51089 8.38901 9.73884L13.4576 16.6616L8.43838 22.2006C8.16024 22.5075 8.18359 22.9818 8.49053 23.2599C8.79748 23.5381 9.27177 23.5147 9.54991 23.2078L14.3622 17.8971L18.2061 23.1472C18.3474 23.3402 18.5721 23.4542 18.8112 23.4542H23.0055C23.2882 23.4542 23.5468 23.2952 23.6746 23.043C23.8023 22.7908 23.7773 22.4882 23.61 22.2603L17.7016 14.2119L21.7 9.79939C2
841.9782 9.49245 21.9548 9.01815 21.6479 8.74002ZM10.4728 10.0458L19.1917 21.9542H21.5245L12.7823 10.0458H10.4728Z",fill:"currentColor"})),vA=e=>i.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.7777 8.49718C28.4723 7.15852 27.5683 6.10252 26.419 5.73985C24.3403 5.09052 16.0003 5.09052 16.0003 5.09052C16.0003 5.09052 7.66433 5.09052 5.58166 5.73985C4.43633 6.09718 3.53233 7.15318 3.22299 8.49718C2.66699 10.9265 2.66699 15.9998 2.66699 15.9998C2.66699 15.9998 2.66699 21.0732 3.22299 23.5025C3.52833 24.8412 4.43233 25.8972 5.58166 26.2598C7.66433 26.9092 16.0003 26.9092 16.0003 26.9092C16.0003 26.9092 24.3403 26.9092 26.419 26.2598C27.5643 25.9025 28.4683 24.8465 28.7777 23.5025C29.3337 21.0732 29.3337 15.9998 29.3337 15.9998C29.3337 15.9998 29.3337 10.9265 28.7777 8.49718Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3359 19.9998L20.2639 15.9998L13.3359 11.9998V19.9998Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),yA=[{id:1,title:"Facebook",link:"https://www.facebook.com/Tectum.io/",icon:t.jsx(mA,{})},{id:2,title:"Telegram",link:"https://t.me/tectumglobal",icon:t.jsx(_A,{})},{id:3,title:"LinkedIn",link:"https://www.linkedin.com/showcase/tectum-blockchain",icon:t.jsx(fA,{})},{id:4,title:"YouTube",link:"https://www.youtube.com/channel/UCn17IrKSqmIFn8illLRR2-g",icon:t.jsx(vA,{})},{id:5,title:"Instagram",link:"https://www.instagram.com/tectum_softnote",icon:t.jsx(hA,{})},{id:6,title:"X",link:"https://twitter.com/tectumsocial",icon:t.jsx(gA,{})},{id:7,title:"Crunchbase",link:"https://www.crunchbase.com/organization/tectum-blockchain",icon:t.jsx(pA,{})},{id:8,title:"CoinMarketCap",link:"https://coinmarketcap.com/currencies/tectum/",icon:t.jsx(uA,{})},{id:9,title:"CoinGecko",link:"https://www.coingecko.com/en/coins/tectum",icon:t.jsx(dA,{})}],bA="_wrapper_1upe3_1",xA="_link_1upe3_7",dd={wrapper:bA,link:xA},CA=()=>t.jsx("div",{className:dd.wrapper,children:yA.map(e=>t.jsx("a",{href:e.link,className:dd.link,target:"_blank",rel:"noreferrer",children:e.icon},e.id))}),kA="_item_w55p5_1",wA="_linkLabel_w55p5_15",jA="_linkIcon_w55p5_20",SA="_disabled_w55p5_25",to={item:kA,linkLabel:wA,linkIcon:jA,disabled:SA},NA=e=>{const{disabled:n}=e;return t.jsx("a",{href:"https://linktr.ee/tectumsoftnote",className:L(to.item,{[to.disabled]:n}),target:"_blank",rel:"noreferrer",children:t.jsxs("div",{className:L({[to.disabled]:n},to.linkLabel),children:["Tectum Space",t.jsx(To,{className:to.linkIcon})]})})},ma=e=>i.createElement("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.625 10.375H3.84375C2.32437 10.375 1.09375 9.14438 1.09375 7.625V3.84375C1.09375 2.32437 2.32437 1.09375 3.84375 1.09375H7.625C9.14438 1.09375 10.375 2.32437 10.375 3.84375V7.625C10.375 9.14438 9.14438 10.375 7.625 10.375Z",stroke:"currentColor",strokeWidth:2.0625,strokeLinecap:"round",strokeLinejoin:"round"})),LA="_wrapper_qu30h_1",EA={wrapper:LA},$A=e=>{const{color:n}=e;return t.jsxs("div",{className:EA.wrapper,children:[t.jsx(ma,{style:{color:n}}),t.jsx(ma,{}),t.jsx(ma,{}),t.jsx(ma,{})]})},TA="_wrapper_v8fjs_1",MA="_avatar_v8fjs_13",DA="_link_v8fjs_23",PA="_userInfoId_v8fjs_27",IA="_fullName_v8fjs_38",BA="_email_v8fjs_43",xr={wrapper:TA,avatar:MA,link:DA,userInfoId:PA,fullName:IA,email:BA},RA=e=>{const{user:n,onClick:o}=e;return t.jsxs("div",{className:xr.wrapper,children:[t.jsx(ge,{to:"/settings",className:xr.link,onClick:o,children:t.jsx("img",{src:(n==null?void 0:n.avatar)??"",alt:"user",className:xr.avatar})}),t.jsxs("div",{className:xr.userInfoId,children:[t.jsxs("span",{children:["ID: ",n==null?void 0:n.id]}),t.jsx(it,{value:(n==null?void 0:n.id)??"",className:xr.copy})]}),(n==null?void 0:n.fullName)&&t.jsx("span",{className:xr.fullName,children:n.fullName}),t.jsx("span",{className:xr.email,children:bs((n==null?void 0:n.email)??"",15)})]})},AA="_wrapper_1yhmg_1",OA="_button_1yhmg_7",FA="_avatar_1yhmg_26",qA="_buttonOpen_1yhmg_43",WA="_info_1yhmg_49",VA="_infoTectumId_1yhmg_61",HA="_menuPopup_1yhmg_89",UA="_open_1yhmg_110",YA="_content_1yhmg_117",KA="_menuLogout_1yhmg_139",GA="_btnsWraper_1yhmg_153",Hn={wrapper:AA,button:OA,avatar:FA,buttonOpen:qA,info:WA,infoTectumId:VA,menuPopup:HA,open:UA,content:YA,menuLogout:KA,btnsWraper:GA},zA=e=>{const{handleClickLogout:n,refModel:o,user:s,onClick:r,isOpenUserInfo:a}=e,c=Bt(ks),l=t.jsxs(t.Fragment,{children:[t.jsx(aA,{onClick:r}),t.jsxs("div",{className:Hn.btnsWraper,children:[t.jsx(IR,{}),t.jsx(cA,{}),t.jsx(RR,{onClick:r})]}),t.jsx(NA,{}),t.jsx(CA,{})]});return t.jsxs("div",{ref:o,className:Hn.wrapper,children:[t.jsx("button",{type:"button",onClick:r,className:L(Hn.button,{[Hn.buttonOpen]:a}),"aria-label":"Open profile menu","aria-expanded":a,children:t.jsx($A,{color:a?"#2261F6":"#fff"})}),t.jsxs("div",{className:L(Hn.menuPopup,{[Hn.open]:a}),children:[t.jsx(UR,{onClose:r}),t.jsx(RA,{user:s,onClick:r}),c?l:t.jsx("div",{className:Hn.content,children:l}),t.jsx(O,{onClick:n,className:Hn.menuLogout,children:"Log Out"}),t.jsx(qR,{})]})]})},ZA=()=>{const[e,n]=i.useState(!1),{logout:o}=op(),{user:s}=ht(),r=()=>{o(),n(!1)},a=()=>{n(p=>!p)},c=i.useRef();Cu(c,()=>n(!1));const l=Bt(ks),[d,u]=uc(c);return i.useEffect(()=>{if(!l)return;let p;return e?d():p=window.setTimeout(u,300),()=>clearTimeout(p)},[e,d,u,l]),t.jsx(zA,{isOpenUserInfo:e,handleClickLogout:r,onClick:a,refModel:c,user:s})};function QA(){const[e,n]=i.useState();return i.useEffect(()=>{(async()=>{n(await gl.hasCamera())})()},[]),{hasCamera:e}}const XA=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M14.7983 1.15796C14.4739 0.841889 14.0332 0.675537 13.584 0.675537H5.89928C5.10918 0.675537 4.41889 1.24113 4.26918 2.02299L1.00067 18.7247C0.959081 18.9576 1.25881 20 1.5 20H2C2.21624 20 2.88859 19.0242 2.93017 18.8079L6.1072 2.58859H13.3262L9.64186 21.403H2.42284
84L2.93017 18.8079C2.97176 18.575 2.7971 18.3588 2.55591 18.3588H1.44146C1.22522 18.3588 1.04225 18.5085 1.00067 18.7247L0.493338 21.3365C0.385219 21.8854 0.559873 22.4427 0.959081 22.842C1.27512 23.158 1.71591 23.3244 2.16502 23.3244H9.84978C10.6399 23.3244 11.3302 22.7588 11.4799 21.9769L15.2557 2.66345C15.3638 2.11448 15.1975 1.54889 14.7983 1.15796Z",fill:"currentColor"}),i.createElement("path",{d:"M13.7017 23.3161H14.8245C15.0407 23.3161 15.2237 23.1663 15.2653 22.9501L19.5318 1.12469C19.5734 0.891795 19.3987 0.675537 19.1575 0.675537H18.0348C17.8185 0.675537 17.6356 0.825254 17.594 1.04151L13.3274 22.8669C13.2858 23.0998 13.4605 23.3161 13.7017 23.3161Z",fill:"currentColor"}),i.createElement("path",{d:"M17.7017 23.3161H18.8245C19.0407 23.3161 19.2237 23.1663 19.2653 22.9501L23.5318 1.12469C23.5734 0.891795 23.3987 0.675537 23.1575 0.675537H22.0348C21.8185 0.675537 21.6356 0.825254 21.594 1.04151L17.3274 22.8669C17.2858 23.0998 17.4605 23.3161 17.7017 23.3161Z",fill:"currentColor"})),JA=e=>i.createElement("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M5.3125 10L3.4375 11.875L1.5625 10",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3.4374 10C3.4374 10.5783 3.50907 11.1383 3.63324 11.6792",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.4375 10C18.4375 5.8575 15.08 2.5 10.9375 2.5C6.795 2.5 3.4375 5.8575 3.4375 10",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.9375 17.5C15.08 17.5 18.4375 14.1425 18.4375 10",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.79492 14.2959C6.15076 16.2317 8.39409 17.5001 10.9374 17.5001",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M13.7465 12.3924L10.7031 10.5816V6.65405",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),eO=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.999 16.476H8.74902V11.975H13.998C15.241 11.975 16.249 12.983 16.249 14.226V14.226C16.249 15.469 15.242 16.476 13.999 16.476V16.476Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8.74902 11.975V7.33301H13.43C14.712 7.33301 15.751 8.37201 15.751 9.65401V9.65401C15.751 10.936 14.712 11.975 13.43 11.975",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M18.3639 5.63604C21.8787 9.15076 21.8787 14.8492 18.3639 18.3639C14.8492 21.8787 9.15074 21.8787 5.63604 18.3639C2.12132 14.8492 2.12132 9.15074 5.63604 5.63604C9.15076 2.12132 14.8492 2.12132 18.3639 5.63604",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.6802 6V7.33",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.6802 18V16.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),tO="_wrapper_1exq3_1",nO="_link_1exq3_10",rO="_linkActive_1exq3_26",hl={wrapper:tO,link:nO,linkActive:rO},sO=[{icon:XA,label:"My SoftNotes",link:"/bills",isActive:e=>e.startsWith("/bills")||e==="/pay"},{icon:eO,label:"My Crypto",link:"/wallet"},{icon:sp,label:"Mint house",link:"/mint-house/blue/mint",isActive:e=>e.startsWith("/mint-house")},{icon:JA,label:"History",link:"/history"}],ud=()=>{const{pathname:e}=Fe();return t.jsx("div",{className:hl.wrapper,children:sO.map(({icon:n,label:o,link:s,isActive:r})=>t.jsxs(Er,{to:s,className:({isActive:a})=>L(hl.link,{[hl.linkActive]:r?r(e):a}),children:[t.jsx(n,{}),t.jsx("span",{children:o})]},s))})},oO="_wrapper_1tlfh_1",aO="_container_1tlfh_12",iO="_logo_1tlfh_36",lO="_pay_1tlfh_61",ha={wrapper:oO,container:aO,logo:iO,pay:lO},cO=()=>{const e=Bt(Cs),n=e?Mo:rR,o=Zt(),{hasCamera:s}=QA(),[r,a]=i.useState(!1),c=()=>a(!0),l=()=>a(!1),d=(u,p)=>{try{const m=new URL(u);if(m.hostname!=="wallet.softnote.com"||m.pathname!==Vl.EPOS_PAYMENT)throw new Error;const h=m.searchParams.get("data");if(!Ju(h))throw new Error;l(),o(`${Vl.EPOS_PAYMENT}?data=${h}`,{replace:!0})}catch{p("Invalid ePoS QR")}};return t.jsxs(t.Fragment,{children:[t.jsx("header",{className:ha.wrapper,children:t.jsxs("div",{className:ha.container,children:[t.jsx(ge,{to:"/bills",className:ha.logo,children:t.jsx("img",{src:n,alt:"logo"})}),!e&&t.jsx(ud,{}),t.jsx(ZA,{}),e&&s&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:ha.pay,onClick:c,children:t.jsx("span",{children:"Pay"})}),t.jsx(ER,{isEnabled:r,onScan:d,onClose:l})]})]})}),e&&t.jsx(ud,{})]})},dO="_layout_1ez76_1",uO="_wrapper_1ez76_9",pO="_container_1ez76_18",fl={layout:dO,wrapper:uO,container:pO},mO=()=>{const e=Bt(Cs),o=Fe().pathname==="/epos";
84return t.jsxs("div",{className:fl.layout,children:[!o&&t.jsx(cO,{}),t.jsxs("div",{className:fl.wrapper,children:[t.jsx("div",{className:fl.container,children:t.jsxs(i.Suspense,{fallback:t.jsx(wi,{}),children:[t.jsx(Nc,{}),t.jsx(vs,{})]})}),t.jsx(JB,{}),!e&&!o&&t.jsx(kp,{})]})]})},hO="_wrapper_xzchi_1",fO="_container_xzchi_11",_O="_logo_xzchi_21",_l={wrapper:hO,container:fO,logo:_O},gO=()=>t.jsx("header",{className:_l.wrapper,children:t.jsx("div",{className:_l.container,children:t.jsx(ge,{to:"/login",className:_l.logo,children:t.jsx("img",{src:Mo,alt:"logo"})})})}),vO="_wrapper_159nc_1",yO="_container_159nc_10",pd={wrapper:vO,container:yO},bO=()=>t.jsxs("div",{className:pd.wrapper,children:[t.jsx(gO,{}),t.jsx("div",{className:pd.container,children:t.jsxs(i.Suspense,{fallback:t.jsx(wi,{}),children:[t.jsx(Nc,{}),t.jsx(vs,{})]})}),t.jsx(kp,{})]}),xO="_wrapper_fvwpc_1",CO="_logo_fvwpc_13",kO="_content_fvwpc_17",wO="_accordion_fvwpc_40",jO="_title_fvwpc_45",SO="_error_fvwpc_59",NO="_hidden_fvwpc_72",LO="_arrow_fvwpc_78",EO="_rotated_fvwpc_83",gn={wrapper:xO,logo:CO,content:kO,accordion:wO,title:jO,error:SO,hidden:NO,arrow:LO,rotated:EO},$O=({error:e})=>{const[n,o]=i.useState(!1);return t.jsxs("div",{className:gn.wrapper,children:[t.jsx(ge,{to:"/bills",children:t.jsx("img",{src:Mo,alt:"Tectum logo",className:gn.logo})}),t.jsxs("div",{className:gn.content,children:[t.jsx("h1",{children:"Technical Issue Detected"}),t.jsx("p",{children:"The page you're looking for is currently unavailable. We're working to resolve this as fast as we can. Please try again later."}),t.jsxs("div",{className:gn.accordion,children:[t.jsxs("div",{className:gn.title,onClick:()=>o(s=>!s),children:[t.jsx("span",{children:"Read More"}),t.jsx(nr,{className:L(gn.arrow,{[gn.rotated]:n})})]}),t.jsx("div",{className:L(gn.error,{[gn.hidden]:!n}),children:t.jsxs("span",{children:[e.name,": ",e.message]})})]})]}),t.jsx(gc,{})]})},TO=()=>{const e=Hd();return t.jsx(i.Suspense,{fallback:null,children:e.message==="404"?t.jsx(vc,{}):t.jsx($O,{error:e})})},MO=()=>{const e=se.get(re.accessToken),n=se.get(re.accessTokenExp);if(!e||!n)return!1;const o=new Date().getTime(),s=new Date(n).getTime();return o<s};function DO(){const e=En(),[n,o]=i.useState(!0),[s]=Se.useLazyGetUserQuery(),[r]=bt.useLazyRefreshQuery();return i.useEffect(()=>{(async()=>{try{if(MO())await s().unwrap(),e(_o.setAuth(!0));else{const l=se.get(re.refreshToken),d=await r(l).unwrap();d&&(tc(d.payload),await s().unwrap(),e(_o.setAuth(!0)))}}catch(c){console.log(c)}finally{o(!1)}})()},[e,s,r]),n}const PO=1500,IO=()=>{var e;return typeof document>"u"||!((e=document.fonts)!=null&&e.ready)?Promise.resolve():Promise.race([document.fonts.ready,new Promise(n=>{window.setTimeout(n,PO)})]).then(()=>{})};function BO(){const[e,n]=i.useState(!0);return i.useEffect(()=>{let o=!0;return IO().finally(()=>{o&&n(!1)}),()=>{o=!1}},[]),e}const RO=()=>{const e=Fe();return nc(o=>o.auth.isAuth)?t.jsx(vs,{}):t.jsx(as,{state:{from:e},to:"/login"})},AO=()=>{var s;const e=Fe(),n=nc(r=>r.auth.isAuth),o=(s=e.state)!=null&&s.from?e.state.from.pathname+e.state.from.search:"/bills";return n?t.jsx(as,{to:o,replace:!0}):t.jsx(vs,{})},OO=()=>t.jsxs(i.Suspense,{fallback:t.jsx(wi,{}),children:[t.jsx(Nc,{}),t.jsx(vs,{})]}),FO={element:t.jsx(RO,{}),children:[{element:t.jsx(mO,{}),children:[{index:!0,element:t.jsx(as,{to:"/bills",replace:!0})},{path:"/bills",children:[{index:!0,element:t.jsx(J7,{})},{path:":currencyKey",element:t.jsx(t7,{})}]},{path:"/wallet",children:[{index:!0,element:t.jsx(JI,{})},{path:"buy-tct",element:t.jsx(as,{to:"/wallet",replace:!0})},{path:":currencyKey",element:t.jsx(Qy,{})}]},{path:"/history",element:t.jsx(Xx,{})},{path:"/settings",children:[{index:!0,element:t.jsx(y$,{})},{path:"edit-profile",element:t.jsx(px,{})},{path:"verification",element:t.jsx(XP,{})},{path:"privacy",children:[{index:!0,element:t.jsx(tL,{})},{path:"transaction-security",element:t.jsx(BP,{})},{path:"password-change",element:t.jsx(zS,{})},{path:"private-key",element:t.jsx(bL,{})},{path:"2fa",element:t.jsx(d4,{})}]},{path:"developers",element:t.jsx(hb,{})}]},{path:"/mint-house",children:[{index:!0,element:t.jsx(as,{to:"/mint-house/blue/mint",replace:!0})},{path:":hub",element:t.jsx(as,{to:"/mint-house/blue/mint",replace:!0})},{path:":hub/:operation",element:t.jsx(PS,{})}]},{path:"/referrals",element:t.jsx(zE,{})},{path:"/epos",element:t.jsx(Wx,{})},{path:"/staking",children:[{index:!0,element:t.jsx(sP,{})},{path:":id",element:t.jsx(yP,{})}]}]}]},qO={element:t.jsx(AO,{}),children:[{element:t.jsx(bO,{}),children:[{path:"/login",element:t.jsx(vT,{})},{path:"/registration",element:t.jsx(GT,{})},{path:"/password-reset",element:t.jsx(AN,{})}]}]},WO=Ym([{element:t.jsx(GB,{}),errorElement:t.jsx(TO,{}),children:[qO,FO,{element:t.jsx(OO,{}),children:[{path:"/policy",element:t.jsx(mL,{})},{path:"*",element:t.jsx(vc,{})}]}]}]),VO=()=>{const e=DO(),n=BO();return e||n?null:t.jsx(eh,{router:WO})};bo(ae,"onlyNumbers",function(e){const n=o=>`${o.path} must contain only numbers`;return this.matches(/^\d+$/,e??n)});bo(ae,"noSpaces",function(e){return this.matches(/^[^\s]*$/,e??"Space is not allowed")});bo(ae,"onlyLatinSymbols",function(e){return this.matches(/^[a-zA-Z0-9@._-]*$/,e??"Only latin characters, numbers and symbols @._- are allowed")});bo(_s,"minCrypto",function(e,n=8){return this.min(e,()=>`Must be greater than or equal to ${q(e,n)}`)});bo(_s,"maxCrypto",function(e,n=8){return this.max(e,()=>`Must be less than or equal to ${q(e,n)}`)});
84function HO(){_2({mixed:{default:"This field is invalid",required:e=>`${e.path} is a required field`,oneOf:e=>`${e.path} must be one of the following values: ${e.values}`,notOneOf:e=>`${e.path} must not be one of the following values: ${e.values}`},string:{length:e=>`${e.path} must be exactly ${e.length} characters`,min:e=>`${e.path} must be at least ${e.min} characters`,max:e=>`${e.path} must be at most ${e.max} characters`,email:"Must be a valid email",url:"Must be a valid URL address",trim:"Must be a trimmed string",lowercase:"Must be a lowercase string",uppercase:"Must be an uppercase string"},number:{min:e=>`${e.path} must be greater than or equal to ${e.min}`,max:e=>`${e.path} must be less than or equal to ${e.max}`,lessThan:e=>`${e.path} must be less than ${e.less}`,moreThan:e=>`${e.path} must be greater than ${e.more}`,positive:"Must be a positive number",negative:"Must be a negative number",integer:"Must be an integer"}})}HO();function UO(){return t.jsxs(km,{children:[t.jsx(VO,{}),t.jsx($0,{theme:"dark",autoClose:1e4,style:{width:"95%",maxWidth:"572px",left:"50%",transform:"translateX(-50%)"}})]})}Cd(document.getElementById("root")).render(t.jsx(i.StrictMode,{children:t.jsx(UO,{})}));export{Ci as A,_c as B,Ae as C,Nt as D,cu as E,lu as F,qo as M,L9 as S,lt as T,V as U,J as W,it as a,D as b,O as c,N9 as d,Ln as e,q as f,H as g,Q as h,at as i,t as j,U6 as k,xt as l,H6 as m,Oe as n,ac as o,Ze as p,Sn as q,fc as r,ro as s,ys as t,kv as u,Nn as v,sr as w,ht as x,bs as y,ar as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.