forked from Romeo-Rosete/EXCHANGE-SECURITY
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path52505-192f104e881a265.js.download
1 lines (1 loc) · 10.5 KB
/
52505-192f104e881a265.js.download
1
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52505],{23294:function(e,n,o){"use strict";var t=o(67557),r=o(52322),l=o(2784),i=o(96664),a=o(38789),c=o(72779),s=o.n(c),u=o(92322),d=o(52242),f=o(28369),m=o(26207),p=o(12723),h=o.n(p),v=o(90684),w=o(38952),x=function(e,n){var o,c,p,x=e.onClose,b=e.onConfirm,C=e.isShow,y=e.defaultIsShow,_=e.modalId,g=e.unmountOnExit,M=void 0!==g&&g,Z=e.mountOnEnter,E=void 0!==Z&&Z,N=e.title,k=e.hasHeader,j=void 0===k||k,S=e.hasFooter,F=void 0===S||S,I=e.header,L=e.footer,O=e.showConfirm,z=void 0===O||O,R=e.showCancel,H=void 0===R||R,W=e.showCloseIcon,P=void 0===W||W,A=e.confirmLabel,B=e.cancelLabel,T=(e.canBgClose,e.wrapperClassName),V=(e.overlayClassName,e.actionFullWidth),Y=void 0!==V&&V,U=e.mobileFullscreen,q=void 0!==U&&U,G=e.children,K=(0,l.useRef)(null),Q=(0,d.a)(i[a.mqMd].down),D=(0,l.useState)(y),J=D[0],X=D[1],$=(0,f.Nb)(),ee=null!=$,ne=ee?null===(o=$.stacks)||void 0===o?void 0:o.length:0,oe=(0,l.useMemo)((function(){var e=!!J;return ee&&(e=$.isShow&&null!=_&&_==$.currentId),null!=C?C:e}),[C,J,ee,null===$||void 0===$?void 0:$.isShow,null===$||void 0===$?void 0:$.currentId]),te=(0,l.useMemo)((function(){return ee&&ne<=1}),[ee,ne]),re=(0,l.useState)(null),le=(re[0],re[1],(0,l.useMemo)((function(){var e=[h().wrapper];return q&&e.push(h()["mobile-fullscreen"]),T&&e.push(T),s()(e)}),[q,T])),ie=q?h()["mobile-fullscreen-header"]:"",ae=(0,l.useCallback)((function(e){x&&x(e),null==C&&X(!1)}),[C,x]);j&&(c=(0,l.isValidElement)(I)?l.cloneElement(I,(0,t.Z)({},"data-mrole","header")):(0,r.jsx)(w.Z,{className:ie,"data-mrole":"header",onClose:ae,showCloseIcon:P,mobileFullscreen:q,children:N})),F&&(p=(0,l.isValidElement)(L)?l.cloneElement(L,(0,t.Z)({},"data-mrole","footer")):(0,r.jsx)(v.Z,{actionFullWidth:Y,"data-mrole":"footer",confirmLabel:A,cancelLabel:B,onClose:ae,onConfirm:b,showConfirm:z,showCancel:H}));var ce=(0,l.useCallback)((function(e){return e.stopPropagation(),!1}),[]);return(0,l.useEffect)((function(){var e=(0,u.Z)((function(){if(oe&&K.current){var e=window.innerHeight,n=Math.floor(.8*e).toFixed(2);K.current.style.cssText="".concat("max-height",": ").concat(n,"px;")}}),300);return e(),window.addEventListener("resize",e,!0),function(){window.removeEventListener("resize",e,!0)}}),[oe,q,Q]),(0,r.jsx)(m.Z,{className:h().overlay,value:oe,unmountOnExit:M,mountOnEnter:E,needAnimation:te,onBeforeClose:ae,children:(0,r.jsx)("div",{className:le,onClick:ce,ref:K,children:(0,r.jsxs)(r.Fragment,{children:[c,(0,r.jsx)("div",{className:s()([h()["dialog-body-wrapper"],h()["dialog-common-wrapper-space"]]),"data-mrole":"body",children:G}),p]})})})};x.displayName="Modal",n.Z=(0,l.forwardRef)(x)},90684:function(e,n,o){"use strict";var t=o(62230),r=o(85244),l=o(98240),i=o(52322),a=o(2784),c=o(96664),s=o(38789),u=o(72779),d=o.n(u),f=o(52242),m=o(83475),p=o(50292),h=o.n(p),v=function(e,n){e.children;var o=e.onClose,u=e.onConfirm,p=e.showConfirm,v=void 0===p||p,w=e.showCancel,x=void 0===w||w,b=e.confirmLabel,C=e.cancelLabel,y=e.actionFullWidth,_=e.className,g=(0,l.Z)(e,["children","onClose","onConfirm","showConfirm","showCancel","confirmLabel","cancelLabel","actionFullWidth","className"]),M=(0,f.a)(c[s.mqMd].down)||y,Z=(0,a.useMemo)((function(){return b||"Confirm"}),[b]),E=(0,a.useMemo)((function(){return C||"Cancel"}),[C]),N=(0,a.useMemo)((function(){var e=[h().base];return M&&e.push(h()["full-width"]),_&&e.push(_),d()(e)}),[M,_]),k=[];return v&&k.push((0,i.jsx)(m.ZP,{onClick:u,"data-role":"dialog-action-btn",fullWidth:M,buttonSize:"lg",variant:"primary",children:Z},"confirm-button")),x&&k.push((0,i.jsx)(m.ZP,{onClick:o,"data-role":"dialog-action-btn",fullWidth:M,buttonSize:"lg",variant:"tertiary",children:E},"cancel-button")),0==k.length?null:(0,i.jsx)("div",(0,r.Z)((0,t.Z)({className:N},g),{children:k}))};v.displayName="ModalGroup",n.Z=(0,a.forwardRef)(v)},38952:function(e,n,o){"use strict";o.d(n,{Z:function(){return v}});var t=o(62230),r=o(85244),l=o(98240),i=o(52322),a=o(2784),c=o(72779),s=o.n(c),u=o(57076),d=o.n(u),f=o(68434),m=o(35986),p=o(83434),h=function(e,n){var o=e.children,c=e.title,u=e.onClose,h=e.extraAction,v=e.style,w=e.className,x=e.showCloseIcon,b=void 0===x||x,C=e.mobileFullscreen,y=void 0!==C&&C,_=(0,l.Z)(e,["children","title","onClose","extraAction","style","className","showCloseIcon","mobileFullscreen"]),g=o||c,M=(0,a.useCallback)((function(e){u&&u(e)}),[u]),Z=(0,a.useMemo)((function(){var e=[d().base];return w&&e.push(w),y&&e.push(d()["mobile-fullscreen"]),s()(e)}),[w,y]),E=(0,a.useMemo)((function(){return function(e){var n=e.isEmptyTitle,o=[d()["title-main-wrapper"],"title-wrapper"];return n&&o.push(d()["empty-title"]),s()(o)}({isEmptyTitle:!g})}),[g]),N=b?(0,i.jsx)("div",{className:s()([d()["close-icon-wrapper"],"close-i"]),onClick:M,children:(0,i.jsx)(m.Z,{})}):null;return(0,i.jsx)("div",(0,r.Z)((0,t.Z)({className:Z,style:v},_),{children:(0,i.jsxs)("div",{className:E,children:[(0,i.jsx)("div",{className:d()["extra-action-wrapper"],children:h}),(0,i.jsx)(f.Z,{className:d().title,children:(0,i.jsx)(p.Z,{textType:"heading-xl",children:g})}),N]})}))};h.displayName="ModalGroup";var v=(0,a.forwardRef)(h)},28369:function(e,n,o){"use strict";o.d(n,{EK:function(){return r},Nb:function(){return c},R_:function(){return i},W7:function(){return a},p5:function(){return s}});var t=o(2784),r={currentId:"0",stacks:[],isShow:!1},l={},i=(0,t.createContext)(r),a=(0,t.createContext)(l),c=function(){var e=(0,t.useContext)(i);return void 0===e?{}:e},s=function(){var e=(0,t.useContext)(a);return void 0===e?{}:e}},26207:function(e,n,o){"use strict";o.d(n,{Z:function(){return w}});var t=o(52322),r=o(2784),l=o(81611),i=o(41131),a=o(81541);function c(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),t=1;t<n;t++)o[t-1]=arguments[t];if("function"===typeof e)return e.apply(void 0,(0,a.Z)(o))}var s=o(11516),u=o(76409),d=o(72779),f=o.n(d),m=o(56159),p=o.n(m),h=o(82740),v=((0,h.F4)({from:{opacity:0},to:{opacity:1}}),(0,h.F4)({from:{opacity:1},to:{opacity:0}}),function(e,n){var o=e.onExit,a=e.onExiting,d=e.onExited,m=e.onEnter,h=e.onEntering,v=e.onEntered,w=e.onBeforeShow,x=e.onBeforeClose,b=e.className,C=e.unmountOnExit,y=void 0===C||C,_=e.mountOnEnter,g=void 0!==_&&_,M=e.value,Z=e.defaultValue,E=e.shouldCloseOnClick,N=void 0===E||E,k=e.shouldCloseOnEscapePress,j=void 0===k||k,S=e.preventBodyScrolling,F=void 0===S||S,I=e.children,L=e.needAnimation,O=void 0===L||L,z=e.zIndex,R=(0,r.useRef)(null),H=(0,r.useState)(null),W=(H[0],H[1],(0,r.useMemo)((function(){return function(e){var n=e.className,o=[p().base];return n&&o.push(n),f()(o)}({className:b})}),[b])),P={};null!=z&&(P.zIndex=z);var A=(0,r.useMemo)((function(){return null!=M?M:!!Z}),[]),B=(0,r.useState)(A),T=B[0],V=B[1],Y=null!=M?M:T,U=(0,r.useMemo)((function(){return"c-ui-".concat(function(){var e=(new Date).getTime(),n="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxx-4xxx".replace(/[xy]/g,(function(o){var t=16*Math.random();return e>0?(t=(e+t)%16|0,e=Math.floor(e/16)):(t=(n+t)%16|0,n=Math.floor(n/16)),("x"===o?t:3&t|8).toString(16)}))}())}),[]),q=(0,r.useCallback)((function(){!1!==c(w)&&V(!0)}),[w]),G=(0,r.useCallback)((function(){!1!==c(x)&&V(!1)}),[x]),K=((0,r.useCallback)((function(e){"Escape"===e.key&&j&&G()}),[G]),function(e){F&&function(e){var n=window.innerWidth-document.documentElement.clientWidth;e?(window.document.body.classList.add("common-overflow"),window.document.body.style.marginRight="".concat(n,"px")):(window.document.body.classList.remove("common-overflow"),window.document.body.style.marginRight="")}(e)}),Q=(0,r.useCallback)((function(e,n){K(!0),c(m,e,n)}),[m]),D=(0,r.useCallback)((function(e,n){c(h,e,n)}),[h]),J=(0,r.useCallback)((function(e,n){c(v,e,n)}),[v]),X=(0,r.useCallback)((function(e){c(o,e)}),[o]),$=(0,r.useCallback)((function(e){c(a,e)}),[a]),ee=(0,r.useCallback)((function(e){K(!1),c(d,e)}),[d]),ne=(0,r.useCallback)((function(e){e.stopPropagation(),e.target===e.currentTarget&&N&&G()}),[G]);return(0,r.useImperativeHandle)(n,(function(){return{show:q,close:G}})),(0,r.useEffect)((function(){return function(){K(!1)}}),[]),(0,t.jsx)(s.Z,{children:(0,t.jsx)(u.Z,{value:z||i.Z.OVERLAY,children:function(e){return null!=e&&(P.zIndex=e),(0,t.jsx)(l.Z,{nodeRef:R,appear:!0,unmountOnExit:y,mountOnEnter:g,timeout:O?350:0,in:Y,onExit:X,onExiting:$,onExited:ee,onEnter:Q,onEntering:D,onEntered:J,classNames:"overlay-fade",children:(0,t.jsx)("div",{onClick:ne,ref:R,className:W,style:P,"data-id":U,children:I})})}})})});v.displayName="Overlay";var w=(0,r.forwardRef)(v)},41744:function(e,n,o){"use strict";var t=o(62230),r=o(85244),l=o(98240),i=o(75190),a=o(52322),c=(o(2784),o(82740)),s=o(78320),u=o(11399),d=o(38485),f=o(37881);function m(){var e=(0,i.Z)(["\n font-weight: 600;\n font-size: 14px;\n white-space: nowrap;\n"]);return m=function(){return e},e}function p(){var e=(0,i.Z)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n\n svg {\n margin-right: 2px;\n }\n"]);return p=function(){return e},e}var h=(0,c.ZP)(s.Z).withConfig({componentId:"sc-58c82cf9-0"})(m()),v=(0,c.ZP)(f.ZP).withConfig({componentId:"sc-58c82cf9-1"})(p());n.Z=function(e){var n,o,i,c,s,f,m,p,w=e.change,x=void 0===w?0:w,b=(0,l.Z)(e,["change"]);return(0,a.jsx)(h,(0,r.Z)((0,t.Z)({"data-sensors-click":!0},b),{children:(0,a.jsxs)(v,{color:x>=0?"green":"red",style:b.style,"data-change":x>=0?"up":"down",children:[x>=0?(0,a.jsx)(d.Z,{style:{height:null!==(s=null===(n=b.style)||void 0===n?void 0:n.fontSize)&&void 0!==s?s:"14px",width:null!==(f=null===(o=b.style)||void 0===o?void 0:o.fontSize)&&void 0!==f?f:"14px"}}):(0,a.jsx)(u.Z,{style:{height:null!==(m=null===(i=b.style)||void 0===i?void 0:i.fontSize)&&void 0!==m?m:"14px",width:null!==(p=null===(c=b.style)||void 0===c?void 0:c.fontSize)&&void 0!==p?p:"14px"}}),Math.abs(x).toFixed(2)+"%",b.children]})}))}},12723:function(e){e.exports={wrapper:"Modal_wrapper__mLgF2","mobile-fullscreen":"Modal_mobile-fullscreen__7_YV9",overlay:"Modal_overlay__NilNI","dialog-body-wrapper":"Modal_dialog-body-wrapper__UMjgQ","dialog-common-wrapper-space":"Modal_dialog-common-wrapper-space__lMpSf"}},50292:function(e){e.exports={base:"ModalFooter_base__BbAOO","full-width":"ModalFooter_full-width__ZeemU"}},57076:function(e){e.exports={base:"ModalHeader_base__r8wWU","mobile-fullscreen":"ModalHeader_mobile-fullscreen__3Xd_y","title-main-wrapper":"ModalHeader_title-main-wrapper__wmbYs","empty-title":"ModalHeader_empty-title__Jykcn","close-icon-wrapper":"ModalHeader_close-icon-wrapper__ipSrp",title:"ModalHeader_title__M7_lM","extra-action-wrapper":"ModalHeader_extra-action-wrapper__Qa2Yd"}},56159:function(e){e.exports={base:"Overlay_base__RLKx6"}}}]);