1"use strict";(self.webpackChunk_aqx_member_web=self.webpackChunk_aqx_member_web||[]).push([["4743"],{47042:function(e,t,r){var n=r(82109),o=r(43157),i=r(4411),l=r(70111),a=r(51400),c=r(26244),u=r(45656),s=r(86135),d=r(5112),f=r(81194),p=r(50206),b=f("slice"),h=d("species"),m=Array,y=Math.max;n({target:"Array",proto:!0,forced:!b},{slice:function(e,t){var r,n,d,f=u(this),b=c(f),v=a(e,b),g=a(void 0===t?b:t,b);if(o(f)&&(i(r=f.constructor)&&(r===m||o(r.prototype))?r=void 0:l(r)&&null===(r=r[h])&&(r=void 0),r===m||void 0===r))return p(f,v,g);for(d=0,n=new(void 0===r?m:r)(y(g-v,0));v<g;v++,d++)v in f&&s(n,d,f[v]);return n.length=d,n}})},27852:function(e,t,r){var n,o=r(82109),i=r(21470),l=r(31236).f,a=r(17466),c=r(41340),u=r(3929),s=r(84488),d=r(84964),f=r(31913),p=i("".endsWith),b=i("".slice),h=Math.min,m=d("endsWith");o({target:"String",proto:!0,forced:!(!f&&!m&&(n=l(String.prototype,"endsWith"))&&!n.writable)&&!m},{endsWith:function(e){var t=c(s(this));u(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:h(a(r),n),i=c(e);return p?p(t,i,o):b(t,o-i.length,o)===i}})},82863:function(e,t,r){r.d(t,{$:()=>u,X:()=>c});var n=r(74512),o=r(32735),i=r(21791),l=r(58867),a=(0,o.createContext)(void 0),c=function(){var e=(0,o.useContext)(a);if(!e)throw Error("useQuoteCardDataContext must be used within a QuoteCardDataProvider");return e},u=function(e){var t,r,c=e.children,u=e.symbolDetail,s=(null!=u?u:{}).symbol,d=void 0===s?"":s,f=(0,l.n9)(["displayAsksByMarket","displayBidsByMarket"]),p=f.displayAsksByMarket,b=f.displayBidsByMarket,h=(0,o.useMemo)(function(){var e;return null!=(e=p[d])?e:[]},[p,d]),m=(0,o.useMemo)(function(){var e;return null!=(e=b[d])?e:[]},[b,d]),y=(t=(null!=u?u:{}).tradable,r=(0,i.Z)(u).isDisableTrade,(0,o.useMemo)(function(){return r||!t},[r,t]));return(0,n.jsx)(a.Provider,{value:{symbolDetail:u,asks:h,bids:m,disablePlaceOrder:y},children:c})}},29712:function(e,t,r){r.d(t,{z:()=>M,o:()=>T}),r(96752),r(92274),r(75654);var n=r(74512),o=r(32735),i=r(78459),l=r(66698),a=r(46645),c=r(99773),u=r(84823),s=r(19554),d=r(1403),f=r(50255),p=r(48260),b=r(61856),h=r(18699),m=r(55869),y=r(36333),v=r(3827),g=r(59395),x=u.Ry().shape({lotSize:(0,g.sT)(u.Z_())}),S=function(e){var t,r=e.symbolDetail,n=e.onSubmitSuccess,i=e.onSubmitError,l=e.showTradeConfirmationModal,a=e.preservedValues,u=e.customOnCancel,g=(0,d.jO)().isCentroid,S=null!=r?r:{},O=S.symbol,w=void 0===O?"":O,j=S.lotSizeStep,C=S.type,P=null!=(t=(0,f.d6)(w))?t:{},E=P.maxQuantity,T=P.minQuantity,M=(0,s.Q9)(),k=(0,v.h)(),L=(0,b.GM)().lotSizeMode,I=(0,y.w)({resolver:(0,c.X)(x),mode:"all",context:{lotSizeStep:j,hasQuoteboardHandling:!0,quoteboardMinQuantity:T,quoteboardMaxQuantity:E,sizeLabel:k,lotSizeMode:L,isCentroid:g},defaultValues:{lotSize:null==a?void 0:a.lotSize},shouldFocusError:!1}),D=I.handleSubmit,A=I.reset,R=I.setValue,Z=(0,o.useCallback)(function(e){if(r){var t,o,a,c=p._.getFillPoliciesFromOrderTypeLabel({orderTypeLabel:h.Zk.MARKET,overrideTradeFillPolicy:r.tradeFillPolicy,symbol:w}),s=(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e),o=o={fillPolicy:null!=(a=null==c?void 0:c[0])?a:p._.getFillPolicyDefaultValue({orderTypeLabel:h.Zk.MARKET,symbolCategory:C,symbol:w})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t),d=function(e){p._.createOrder({formData:s,symbolDetail:r,onSuccess:function(){n(),null==e||e(),A({lotSize:s.lotSize})},onError:function(t){i(t),null==e||e()}})};M?d():l({formValues:s,orderType:s.orderType,formMethods:I,onConfirm:function(e){d(e)},symbolDetail:r,onCancel:u})}},[I,n,i,M,A,l,C,r,w,u]),_=(0,o.useCallback)(function(){D(Z)()},[D,Z]);return{formMethods:I,onMarketPlaceOrder:function(e){w&&(R("orderType",(0,m.JH)(h.Zk.MARKET,e?h.B9.BUY:h.B9.SELL)),_())}}},O=r(23128),w=r(13266),j=r(58822),C=r(41801),P=r(16672),E=(0,o.createContext)(void 0),T=function(){var e=(0,o.useContext)(E);if(!e)throw Error("useQuoteCardFormContext must be used within a QuoteCardFormProvider");return e},M=function(e){var t,r=e.children,c=e.symbolDetail,u=e.preventResetOnUnmount,d=void 0!==u&&u,b=e.onSubmitSuccess,y=e.onSubmitError,v=e.showTradeConfirmationModal,g=e.customLimitFormMethods,x=e.customMarketFormMethods,T=e.customOnCancel,M=null!=c?c:{},k=M.symbol,L=void 0===k?"":k,I=M.type,D=(0,O.VL)(),A=(0,j.XT)(),R=(0,O.HC)(),Z=(0,w.b2)(),_=(null!=(t=(0,f.d6)(L))?t:{}).minQuantity,B=(0,o.useMemo)(function(){return!!L&&!!D&&D===L},[L,D]),z=(0,o.useRef)(void 0),Q=(0,s.Q9)(),U=S({symbolDetail:c,onSubmitSuccess:b,onSubmitError:y,showTradeConfirmationModal:v,customOnCancel:T}),F=U.formMethods,$=U.onMarketPlaceOrder,V=(0,o.useMemo)(function(){if(B)return A===h.Zk.MARKET?x:g},[A,x,g,B]),N=F.clearErrors,X=F.control,G=F.handleSubmit,H=F.formState,q=F.setValue,K=F.getValues,Y=F.reset,W=F.register,J=null!=V?V:{},ee=J.getValues,et=J.setValue,er=(null!=g?g:{}).setValue,en=(0,i.qo)({control:X}),eo=(0,o.useCallback)(function(e){if(c&&(null==c?void 0:c.lotSizeStep)&&(null==c?void 0:c.contractSize)&&_){var t=c.lotSizeStep,r=new l.BigNumber((0,P.Gt)(void 0===t?.01:t)),n=new l.BigNumber(_),o=K("lotSize"),i=o?e?new l.BigNumber(o).plus(r):new l.BigNumber(o).minus(r):r.lte(n)?n:r,a=C.c.validateAndNormalizeLotSize(i.toNumber(),c,void 0,!0,_);a&&(q("lotSize",a.lotSize,{shouldValidate:!0,shouldDirty:!0}),et&&et("lotSize",a.lotSize,{shouldValidate:!0,shouldDirty:!0}))}},[c,q,K,et,_]),ei=(0,o.useCallback)(function(e){q("lotSize",e,{shouldValidate:!0,shouldDirty:!0}),et&&et("lotSize",e,{shouldValidate:!0,shouldDirty:!0})},[q,et]),el=(0,o.useCallback)(function(){if(c){var e=K("lotSize"),t=""===e?void 0:Number(e),r=C.c.validateAndNormalizeLotSize((0,P.M7)(t),c,void 0,!0,_);r&&(q("lotSize",r.lotSize,{shouldValidate:!0,shouldDirty:!0}),et&&et("lotSize",r.lotSize,{shouldValidate:!0,shouldDirty:!0}))}},[c,K,q,et,_]),ea=(0,o.useCallback)(function(e){if(c){var t,r,n,o=p._.getFillPoliciesFromOrderTypeLabel({orderTypeLabel:h.Zk.LIMIT,symbol
1:L}),i=(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e),r=r={fillPolicy:null!=(n=null==o?void 0:o[0])?n:p._.getFillPolicyDefaultValue({orderTypeLabel:h.Zk.LIMIT,symbolCategory:I,symbol:L}),tradeExpiry:p._.getTradeExpiryDefaultValue()},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t);Q?p._.createOrder({formData:i,symbolDetail:c,onSuccess:function(){b(),Y({lotSize:i.lotSize})},onError:function(e){y(e)}}):(i.orderType&&p._.setOrderTypeFromScratch(h.Zk.LIMIT,(0,a.em)(i.orderType)?h.B9.BUY:h.B9.SELL),er&&er("price",i.price),z.current=i.price)}},[b,y,Q,Y,I,L,er,c]),ec=(0,o.useCallback)(function(){G(ea)()},[G,ea]);return(0,o.useEffect)(function(){return function(){d||Y()}},[Y,L,d]),(0,o.useEffect)(function(){if(B&&!Z){var e=K("lotSize");e&&et&&et("lotSize",e,{shouldValidate:!0,shouldDirty:!0}),z.current&&et&&(et("price",z.current,{shouldValidate:!0,shouldDirty:!0}),z.current=void 0)}},[B,et,K,Z]),(0,o.useEffect)(function(){R&&B&&ee&&(q("lotSize",ee("lotSize"),{shouldValidate:!0,shouldDirty:!0}),O.Xo.setTradeFormEditing(!1))},[B,R,ee,q]),(0,n.jsx)(E.Provider,{value:{handleLotSizeIncrease:function(){return eo(!0)},handleLotSizeDecrease:function(){return eo(!1)},handleLotSizeBlur:el,handleLotSizeChange:ei,clearErrors:N,control:X,setValue:q,register:W,watch:function(e){return en[e]},onMarketPlaceOrder:$,onLimitPlaceOrder:function(e,t){L&&(q("price",e.toString(10)),q("orderType",(0,m.JH)(h.Zk.LIMIT,t?h.B9.BUY:h.B9.SELL)),ec())},formState:H,isCurrentSymbolSelected:B,setTradeFormValue:et},children:r})}},62648:function(e,t,r){r.d(t,{e:()=>E}),r(42295);var n=r(32735),o=r(99773),i=r(84823),l=r(48881),a=r(36333),c=r(57358),u=r(19554),s=r(1403),d=r(50255),f=r(13266),p=r(58822),b=r(48260),h=r(61856),m=r(37402),y=r(18699),v=r(92963),g=r(64989),x=r(20231),S=r(3827),O=r(24936),w=r(59395);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var P=i.Ry().shape({lotSize:(0,w.sT)(i.Z_()),fillPolicy:(0,w.Ke)(i.nK()),price:i.Z_().test("test-price",g.UF,function(e){return(0,g.FY)(e)}).when(["$orderTypeLabel","$priceLabel"],function(e,t){var r=C(e,2),n=r[0],o=r[1];return n!==y.Zk.MARKET_TO_LIMIT?t.required((0,g.$A)({label:o||""})):t}),priceTrigger:i.Z_().test("test-price-trigger",g.UF,function(e){return(0,g.FY)(e)}).when(["$orderTypeLabel","$priceTriggerLabel"],function(e,t){var r=C(e,2),n=r[0],o=r[1];return n===y.Zk.STOP_LIMIT?t.required((0,g.$A)({label:o||""})):t}),stopLoss:i.Z_().test("test-stop-loss",g.UF,function(e){return(0,g.FY)(e)}).test((0,w.wQ)(m.Qr.STOP_LOSS)),takeProfit:i.Z_().test("test-take-profit",g.UF,function(e){return(0,g.FY)(e)}).test((0,w.wQ)(m.Qr.TAKE_PROFIT)),expiration:i.hT().transform(g.mf).when(["fillPolicy","$expirationLabel"],function(e,t){var r=C(e,2),n=r[0],o=r[1];return n===l.T3.GTD?t.required((0,g.$A)({label:o||""})):t}),centroidDeviation:(0,w.zA)(i.Z_())}),E=function(e){var t=e.disablePreservedValues,r=e.onSuccess,i=e.onError,l=e.showTradeConfirmationModal,m=(0,s.jO)(),y=m.isCentroid,v=m.isMT4,g=(0,c.K)(),S=(0,f._f)(["lotSizeStep","type","symbol","maxContractLotSize","minContractLotSize","contractSize"]),w=S.lotSizeStep,j=S.type,C=S.symbol,E=S.maxContractLotSize,M=S.minContractLotSize,k=S.contractSize,L=(0,u.Q9)(),I=(0,d.d6)(null!=C?C:"")||{},D=I.maxQuantity,A=I.minQuantity,R=T(),Z=R.expirationLabel,_=R.orderTypeLabel,B=R.priceLabel,z=R.priceTriggerLabel,Q=R.sizeLabel,U=(0,h.GM)().lotSizeMode,F=(0,p.tl)(),$=(0,p.zi)(),V=(0,x.A)(),N=V.fillPolicyOptions,X=V.initialFillPolicy,G=(0,n.useMemo)(function(){return(0,o.X)(P)},[]),H=(0,a.w)({resolver:G,mode:"onBlur",context:{orderTypeLabel:_,lotSizeStep:w,maxContractLotSize:E,minContractLotSize:M,contractSize:k,sizeLabel:Q,lotSizeMode:U,isFillPolicyRequired:!v,isCentroid:y,hasMarketRange:y,hasQuoteboardHandling:g,quoteboardMinQuantity:A,quoteboardMaxQuantity:D,priceLabel:B,priceTriggerLabel:z,expirationLabel:Z,buySellType:F},shouldFocusError:!1,defaultValues:{lotSize:$.lotSize,units:$.units,fillPolicy:X}}),q=H.handleSubmit,K=H.reset,Y=H.setValue,W=H.trigger,J=(0,n.useCallback)(function(e){var t=function(t){b._.createOrder({formData:e,onSuccess:function(){var n;
1r(),null==t||t(),K({fillPolicy:null!=(n=null==N?void 0:N[0])?n:b._.getFillPolicyDefaultValue({orderTypeLabel:_,symbolCategory:j}),tradeExpiry:b._.getTradeExpiryDefaultValue(),lotSize:e.lotSize,units:e.units})},onError:function(e){i(e),null==t||t()}})};L?t():l({formValues:e,formMethods:H,onConfirm:function(e){t(e)}})},[L,i,r,K,_,l,j,H,N]),ee=(0,n.useCallback)(function(e){q(J)(e)},[q,J]);return(0,n.useEffect)(function(){var e;Y("fillPolicy",null!=(e=null==N?void 0:N[0])?e:b._.getFillPolicyDefaultValue({orderTypeLabel:_,symbolCategory:j})),Y("tradeExpiry",b._.getTradeExpiryDefaultValue())},[N,_,Y,j,C]),(0,n.useEffect)(function(){W(["stopLoss","takeProfit"])},[F,W]),(0,O.Z)(H,void 0!==t&&t),{formMethods:H,onSubmit:ee}},T=function(){var e=(0,s.$X)(),t=(0,p.XT)(),r=(0,S.h)();return(0,n.useMemo)(function(){var n=(0,v.qn)(v.tV.PRICE,e),o=(0,v.qn)(v.tV.PRICE_TRIGGER,e);return{expirationLabel:(0,v.qn)(v.tV.EXPIRATION,e),priceLabel:n,priceTriggerLabel:o,orderTypeLabel:t,sizeLabel:r}},[e,t,r])}},86853:function(e,t,r){r.d(t,{B:()=>E}),r(42295);var n=r(32735),o=r(99773),i=r(84823),l=r(48881),a=r(36333),c=r(57358),u=r(479),s=r(19554),d=r(1403),f=r(50255),p=r(13266),b=r(58822),h=r(48260),m=r(61856),y=r(37402),v=r(18699),g=r(92963),x=r(64989),S=r(20231),O=r(3827),w=r(24936),j=r(59395);function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var P=i.Ry().shape({lotSize:(0,j.sT)(i.Z_()),fillPolicy:(0,j.Ke)(i.nK()),stopLoss:i.Z_().test("test-stop-loss",x.UF,function(e){return(0,x.FY)(e)}).test((0,j.wQ)(y.Qr.STOP_LOSS)).test((0,j._o)(y.Qr.STOP_LOSS)),takeProfit:i.Z_().test("test-take-profit",x.UF,function(e){return(0,x.FY)(e)}).test((0,j.wQ)(y.Qr.TAKE_PROFIT)).test((0,j._o)(y.Qr.TAKE_PROFIT)),expiration:i.hT().transform(x.mf).when(["fillPolicy","$expirationLabel"],function(e,t){var r=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return C(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],o=r[1];return n===l.T3.GTD?t.required((0,x.$A)({label:o||""})):t})}),E=function(e){var t=e.disablePreservedValues,r=e.onSuccess,i=e.onError,l=e.showTradeConfirmationModal,y=(0,d.jO)(),x=y.isMT4,j=y.isCentroid,C=(0,d.$X)(),E=(0,c.K)(),T=(0,b.XT)(),M=(0,s.Q9)(),k=(0,p._f)(["lotSizeStep","type","symbol","minContractLotSize","maxContractLotSize","contractSize","bid","ask"]),L=k.lotSizeStep,I=k.type,D=k.symbol,A=k.minContractLotSize,R=k.maxContractLotSize,Z=k.contractSize,_=k.bid,B=k.ask,z=(0,f.d6)(null!=D?D:"")||{},Q=z.maxQuantity,U=z.minQuantity,F=(0,O.h)(),$=(0,m.GM)().lotSizeMode,V=(0,b.tl)(),N=(0,b.zi)(),X=(0,S.A)(),G=X.fillPolicyOptions,H=X.initialFillPolicy,q=(0,n.useMemo)(function(){return(0,g.qn)(g.tV.EXPIRATION,C)},[C]),K=(0,n.useMemo)(function(){return(0,o.X)(P)},[]),Y=(0,a.w)({resolver:K,mode:"onBlur",shouldFocusError:!1,context:{lotSizeStep:L,maxContractLotSize:R,minContractLotSize:A,contractSize:Z,sizeLabel:F,lotSizeMode:$,isFillPolicyRequired:!x,isCentroid:j,hasQuoteboardHandling:E,quoteboardMinQuantity:U,quoteboardMaxQuantity:Q,expirationLabel:q,buySellType:V,entryPrice:V===v.B9.BUY?_:B,priceLabel:V===v.B9.BUY?u.ag.t("Sell Price"):u.ag.t("Buy Price")},defaultValues:{lotSize:N.lotSize,units:N.units,fillPolicy:H}}),W=Y.handleSubmit,J=Y.reset,ee=Y.setValue,et=Y.trigger,er=(0,n.useCallback)(function(e){var t=function(t){h._.createOrder({formData:e,onSuccess:function(){var n;r(),null==t||t(),J({fillPolicy:null!=(n=null==G?void 0:G[0])?n:h._.getFillPolicyDefaultValue({orderTypeLabel:T,symbolCategory:I}),lotSize:e.lotSize,units:e.units})},onError:function(e){i(e),null==t||t()}})};M?t():l({formValues:e,formMethods:Y,onConfirm:function(e){t(e)}})},[Y,M,i,r,T,J,l,I,G]),en=(0,n.useCallback)(function(e){W(er)(e)},[W,er]);return(0,n.useEffect)(function(){var e;ee("fillPolicy",null!=(e=null==G?void 0:G[0])?e:h._.getFillPolicyDefaultValue({orderTypeLabel:T,symbolCategory:I}))},[G,T,ee,I,D]),(0,n.useEffect)(function(){et(["stopLoss","takeProfit"])},[V,et]),(0,w.Z)(Y,void 0!==t&&t),{formMethods:Y,onSubmit:en}}},24936:function(e,t,r){r.d(t,{Z:()=>i});var n=r(32735),o=r(58822);function i(e,t){(0,n.useEffect)(function(){return function(){if(!t){var r=e.getValues();(r.lotSize||r.units)&&(0,o.NB)({lotSize:r.lotSize,units:r.units})}}},[e,t])}},58867:function(e,t,r){r.d(t,{n9:()=>l,u1:()=>u,kH:()=>c,Ro:()=>a});
1var n=r(81993),o=r(7433),i=r(19777),l=(0,o.nv)(i.q),a=function(e){return(0,n.useService)(i.q,function(t){return t.livePricesMap[e]})},c=function(){return(0,n.useService)(i.q,function(e){return e.symbolDepthMap})},u=function(e){return(0,n.useService)(i.q,function(t){return t.symbolDepthMap[e]})};r(87606)},73036:function(e,t,r){r.d(t,{Ng:()=>l,X8:()=>i,XK:()=>a}),r(92274),r(75654),r(36809),r(68233),r(42295);var n=r(33481),o=/\d/,i=function(e,t){return null==e?"--":void 0!==t?(0,n.Wi)(e,t,!1):e.toString(10)},l=function(e,t){if(null==e)return{prefix:"--",suffix:""};var r=i(e,t);if(r.length<=3)return{prefix:"",suffix:r};for(var n=r,l="",a=3;a>0;){var c=n.slice(-1);l="".concat(c).concat(l),n=n.substring(0,n.length-1),o.test(c)&&(a-=1)}return{prefix:n,suffix:l}},a=function(e,t){if(0!==t.length&&0!==e){for(var r=0,n=0,o=e,i=0;i<t.length;i++){var l=t[i],a=l.size,c=l.price;if(o>=a){if(r+=c*a,o-=a,n+=a,0===o)break}else{r+=c*o,n+=o;break}}return e>n?void 0:r/e}}},69100:function(e,t,r){r.d(t,{Z:()=>f}),r(27852),r(15306),r(74916),r(9653);var n=r(74512),o=r(32735),i=r(10281),l=r(62715),a=r(71225),c=r(18909),u=r(38074),s=r(6454),d=r(16672);let f=function(e){var t=e.title,r=e.value,i=e.type,a=e.placeholder,f=e.errorMessage,h=e.decimal,m=e.onChange,y=e.onBlur,v=e.maxDigits,g=e.formatThousands,x=void 0!==g&&g,S=e.disabled,O=(0,o.useMemo)(function(){return r&&i===s.nc.DECIMAL&&x&&!r.endsWith(".")&&"-"!==r?(0,d.ni)({value:parseFloat(null==r?void 0:r.replace(/,/g,""))}):r},[x,i,r]),w=(0,o.useMemo)(function(){switch(i){case s.nc.DECIMAL:return(0,d.dF)({maxDecimals:h,maxDigits:v});case s.nc.NUMBER:return(0,d.dF)({maxDecimals:0,maxDigits:v});default:return}},[h,v,i]),j=(0,o.useCallback)(function(e){if(""!==e&&"-"!==e&&"--"!==e){if(i===s.nc.NUMBER){var t=Number(e.replace(/,/g,""));return isNaN(t)?void 0:t}if(i===s.nc.DECIMAL){if(e.endsWith(".")||"-"===e)return e;var r=e.replace(/,/g,"");return isNaN(Number(r))?e:r}return e}},[i]),C=(0,o.useCallback)(function(e){var t=e.target.value;(!w||!t||w.test(t))&&m(j(t))},[w,j,m]),P=(0,o.useCallback)(function(e){var t=e.target.value;if(i===s.nc.DECIMAL&&t){var r=(0,d.TK)(t);if(r!==t)return void m(r)}(0,d.BJ)(t,i,m)},[m,i]);return(0,n.jsxs)(b,{children:[(0,n.jsx)(u.ZP,{typography:l.wZ.TEXT_M_REGULAR,children:t}),(0,n.jsx)(p,{children:(0,n.jsx)(c.ZP,{variant:c.Bv.BORDERED_TEXT,placeholder:a,value:O,onChange:C,onBlur:y||P,error:f,disabled:S})})]})};var p=i.ZP.div.withConfig({componentId:"sc-e6696636-0"})(["display:flex;flex-direction:column;font-size:","px;font-size:",";"],l.F6.TEXT_M,l.Yy.REGULAR),b=i.ZP.div.withConfig({componentId:"sc-e6696636-1"})(["display:flex;justify-content:space-between;align-items:center;gap:","px;"],a.A.M)},54901:function(e,t,r){r.d(t,{X:()=>n});var n=40},93512:function(e,t,r){r.d(t,{$:()=>n.Z,g:()=>n.g});var n=r(74702)},74702:function(e,t,r){r.d(t,{g:()=>a,Z:()=>u});var n,o=r(74512);r(32735);var i=r(80199),l=r(33007),a=((n={})[n.OPEN=0]="OPEN",n[n.CLOSE=1]="CLOSE",n),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.OPEN,t=arguments.length>1?arguments[1]:void 0;switch(e){case a.OPEN:return t.success;case a.CLOSE:default:return t.text.disabled}};let u=function(e){var t=e.marketStatus,r=(0,l.VC)().theme;return(0,o.jsx)(i.ZP,{icon:i.Ro.CLOCK,size:i.sk.SM,color:c(t,r.themeColors)})}},90488:function(e,t,r){r.r(t),r.d(t,{default:()=>t5});var n=r(74512),o=r(32735),i=r(51978);r(32564);var l=r(10281),a=r(71225);r(15296),r(92274),r(67285);var c=r(50255);function u(){var e=(0,c.jD)(),t=(0,c.Sr)();return(0,o.useMemo)(function(){return e.filter(function(e){var r=t[e];return r&&r.shown}).sort(function(e,r){var n,o,i,l;return(null!=(i=null==(n=t[e])?void 0:n.order)?i:9999)-(null!=(l=null==(o=t[r])?void 0:o.order)?l:9999)})},[t,e])}var s=r(61305),d=r(23128),f=r(59440),p=r(37507),b=r(30856),h=r(62648),m=r(86853),y=r(65528),v=r(15861),g=(0,o.createContext)(void 0),x=function(){var e=(0,o.useContext)(g);if(!e)throw Error("useQuoteboardPageContext must be used within a QuoteboardPageProvider");return e},S=function(e){var t=e.children,r=(0,v.R)(),o=r.onSuccessDefault,i=r.onSuccessOCTOrMarket,l=r.onError,a=(0,m.B)({onSuccess:i,onError:l,showTradeConfirmationModal:y.d,disablePreservedValues:!0}),c=a.onSubmit,u=a.formMethods,s=(0,h.e)({onSuccess:o,onError:l,showTradeConfirmationModal:y.d,disablePreservedValues:!0}),d=s.onSubmit,f=s.formMethods;return(0,n.jsx)(g.Provider,{value:{customLimitFormMethods:f,customLimitSubmit:d,customMarketFormMethods:u,customMarketSubmit:c},children:t})},O=r(81182),w=r(62715),j=r(45954),C=r(38074),P=r(1403),E=r(24439),T=r(18699),M=r(25932),k=l.ZP.div.withConfig({componentId:"sc-6f81bf9c-0"})(["width:fit-content;padding:","px;background-color:",";border-bottom:2px solid ",";"],a.A.XS,function(e){return e.theme.themeColors.background.default},function(e){return e.theme.themeColors.primary}),L=l.ZP.div.withConfig({componentId:"sc-6f81bf9c-1"})(["border:none;background-color:",";display:block;height:1px;width:100%;"],function(e){return e.theme.themeColors.border.default}),I=l.ZP.div.withConfig({componentId:"sc-6f81bf9c-2"})(["background-color:",";border-radius:3px;"],function(e){return e.theme.themeColors.background.subtle});r(41539);var D=r(15961),A=r(89494),R=r(58867),Z=r(11505);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var B=function(){var e,t=(e=(0,o.useState)(window.innerWidth),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return _(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],n=t[1];return(0,o.useEffect)(function(){var e=function(){n(window.innerWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]),r},z=r(55979),Q=r(82863),U=r(29712),F=r(6807),$=function(e){(0,o.useEffect)(function(){return E.K.subscribeDOMTopic(e),function(){E.K.isSymbolSubscribed(e)&&E.K.unsubscribeDOMTopic(e)}},[e])},V=r(52510);r(88674);var N=r(80199),X=r(66698),G=function(e){var t,r=e.priceLevelsSymbolDetail,n=e.asks,i=e.bids,l=e.headerHeight,a=e.rowHeight,c=null!=r?r:{},u=c.decimal,s=c.symbol,d=null!=(t=(0,R.u1)(void 0===s?"":s))?t:0,f=(0,o.useCallback)(function(e){return new X.BigNumber(e).decimalPlaces(null!=u?u:0).toNumber()},[u]);return(0,o.useMemo)(function(){var e=[];if(n.forEach(function(t){e.push({ask:t,askPriceAdjusted:f(t.price)})}
1),i.forEach(function(t,r){var n=f(t.price);e[r]?(e[r].bid=t,e[r].bidPriceAdjusted=n):e.push({bid:t,bidPriceAdjusted:n})}),e.length<d)for(;e.length<d;)e.push({});return{maxHeight:e.length>0?e.length*a+l:0,priceLevels:e}},[n,i,f,d,l,a])};r(96752);var H=r(78459),q=function(){var e=(0,U.o)().control,t=(0,H.qo)({control:e,name:"lotSize"});return(0,o.useMemo)(function(){return t?Number(t):void 0},[t])},K=r(33007),Y=(0,o.lazy)(function(){return r.e("3669").then(r.bind(r,85388))}),W=l.ZP.div.withConfig({componentId:"sc-8f3dc294-0"})(["margin-top:","px;"],a.A.REGULAR),J=l.ZP.button.withConfig({componentId:"sc-8f3dc294-1"})(["cursor:pointer;display:flex;justify-content:center;width:100%;background-color:transparent;border:none;outline:none;"]),ee=l.ZP.div.withConfig({componentId:"sc-8f3dc294-2"})(["height:0px;overflow:hidden;transition:height 0.25s;&.expanded{height:","px;}"],function(e){return e.$maxHeight}),et=l.ZP.div.withConfig({componentId:"sc-8f3dc294-3"})(["height:","px;> div{height:100%;}"],function(e){return e.$maxHeight});let er=function(){var e=(0,Q.X)(),t=e.symbolDetail,r=e.asks,l=e.bids,a=(0,K.VC)().theme,u=t.decimal,s=t.symbol,d=void 0===s?"":s,f=(0,c.Hy)(d),p=(null!=f?f:{}).isExpand,b=G({priceLevelsSymbolDetail:{decimal:void 0===u?0:u,symbol:d},asks:r,bids:l,headerHeight:z.A,rowHeight:z.Q}),h=b.maxHeight,m=b.priceLevels,y=q(),v=(0,o.useCallback)(function(e){i.c.updateDOMTableExpand({symbol:d,isExpand:e})},[d]);return(0,n.jsxs)(W,{children:[(0,n.jsx)(ee,{className:p?"expanded":"",$maxHeight:h,children:(0,n.jsx)(et,{$maxHeight:h,children:(0,n.jsx)(o.Suspense,{children:(0,n.jsx)(Y,{inputSize:y,priceLevels:m,symbolDetail:t})})})}),(0,n.jsx)(J,{"data-testid":F.Of.QUOTEBOARD_CARD_DROPDOWN,className:p?"expanded":"",onClick:function(){return v(!p)},children:(0,n.jsx)(N.ZP,{icon:p?N.Ro.ARROW_UP:N.Ro.ARROW_DOWN,color:a.themeColors.text.muted})})]})};r(92222);var en=r(32972),eo=r(73036),ei=function(e){var t=e.disablePlaceOrder,r=e.buySellSymbolDetail,n=e.asks,i=e.bids,l=e.inputSize,a=e.onMarketPlaceOrder,u=(0,O.$G)().t,s=(0,P.YR)(),d=null!=r?r:{},f=d.decimal,p=d.symbol,b=(0,c.u3)(void 0===p?"":p).minQuantity,h=(0,o.useMemo)(function(){var e=u("BUY"),t=u("SELL");return{leftIsBuy:!s,rightIsBuy:!!s,rightBtnLabelText:s?e:t,leftBtnLabelText:s?t:e}},[u,s]),m=h.leftIsBuy,y=h.rightIsBuy,v=h.rightBtnLabelText,g=h.leftBtnLabelText,x=(0,o.useMemo)(function(){var e=null!=l?l:b;if(!e)return{};var t=s?i:n,r=s?n:i,o=(0,eo.XK)(e,r),a=(0,eo.XK)(e,t),c=void 0,u=o&&a;return u&&s?c=o-a:u&&(c=a-o),{effectiveRightPrice:o,effectiveLeftPrice:a,spread:c}},[l,b,n,i,s]),S=x.effectiveRightPrice,w=x.effectiveLeftPrice,j=x.spread,C=(0,o.useCallback)(function(){a(m)},[a,m]),E=(0,o.useCallback)(function(){a(y)},[a,y]),T=(0,o.useMemo)(function(){return{leftBtnTestId:s?F.Of.QUOTEBOARD_CARD_BUTTON_SELL:F.Of.QUOTEBOARD_CARD_BUTTON_BUY,leftBtnVolumeTestId:s?F.Of.QUOTEBOARD_CARD_BUTTON_SELL_VOLUME:F.Of.QUOTEBOARD_CARD_BUTTON_BUY_VOLUME,rightBtnTestId:s?F.Of.QUOTEBOARD_CARD_BUTTON_BUY:F.Of.QUOTEBOARD_CARD_BUTTON_SELL,rightBtnVolumeTestId:s?F.Of.QUOTEBOARD_CARD_BUTTON_BUY_VOLUME:F.Of.QUOTEBOARD_CARD_BUTTON_SELL_VOLUME}},[s]);return{leftBtn:{isBuy:m,label:g,onClick:C,price:w,testId:T.leftBtnTestId,volumeTestId:T.leftBtnVolumeTestId},rightBtn:{isBuy:y,label:v,onClick:E,price:S,testId:T.rightBtnTestId,volumeTestId:T.rightBtnVolumeTestId},disablePlaceOrder:t,spread:j,volume:l,minQuantity:b,priceDecimals:void 0===f?3:f}},el=r(479),ea=r(28931);function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ec(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ec(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var es=function(e){var t=e.disabled,r=e.maxDecimals,o=e.qtyLabel,i=e.isBuy,l=e.isRight,a=e.isRTL,c=e.value,u=e.hovered;return(0,n.jsxs)(em,{$disabled:t,$hovered:null!=u&&u,$isBuy:i,$isRight:l,$isRTL:a,children:[(0,n.jsx)(eg,{disabled:t,typography:w.wZ.TEXT_XS_REGULAR,children:o}),(0,n.jsx)(eg,{disabled:t,typography:w.wZ.TEXT_XS_REGULAR,children:(0,en.r)(c,r)})]})},ed=function(e){var t=e.disabled,r=e.decimal,i=e.orderType,l=e.value,a=(0,o.useMemo)(function(){return(0,eo.Ng)(l,r)},[r,l]),c=a.prefix,u=a.suffix;return(0,n.jsxs)(eh,{children:[(0,n.jsxs)(ex,{disabled:t,typography:w.wZ.TEXT_M_REGULAR,children:[(0,n.jsx)(ey,{dir:"ltr",children:c}),(0,n.jsx)(ef,{disabled:t,typography:w.wZ.DISPLAY_S_BOLD,children:u})]}),(0,n.jsx)(ef,{disabled:t,typography:w.wZ.TEXT_M_REGULAR,children:i})]})},ef=function(e){var t,r,o=e.children,i=e.disabled,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["children","disabled"]),a=(0,K.VC)().theme;return(0,n.jsx)(C.ZP,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({color:i?a.themeColors.text.muted:a.themeColors.white,renderAs:"span"},l),r=r={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))},ep=l.ZP.div.withConfig({componentId:"sc-7f1995c2-0"})(["display:flex;gap:","px;position:relative;"],8),eb=l.ZP.button.withConfig({componentId:"sc-7f1995c2-1"})(["border:none;cursor:pointer;"," outline:none;position:relative;height:","px;width:calc(50% - ","px);background-color:",";&:hover{background-color:",";}&:active{background-color:",";}"],function(e){var t=e.$isRight;return e.$isRTL,"border-radius: ".concat(t?"0px 8px 8px 0px":"8px 0px 0px 8px",";")},64,4,function(e){var t=e.disabled,r=e.$isBuy,n=e.theme;return t?n.themeColors.background.base:r?n.themeColors.pnl.positive.default:n.themeColors.pnl.negative.default},function(e){var t=e.disabled,r=e.$isBuy,n=e.theme;return t?n.themeColors.background.base:r?n.themeColors.pnl.positive.hover:n.themeColors.pnl.negative.hover},function(e){var t=e.disabled,r=e.$isBuy,n=e.theme;return t?n.themeColors.background.base:r?n.themeColors.pnl.positive.active:n.themeColors.pnl.negative.active}),eh=l.ZP.span.withConfig({componentId:"sc-7f1995c2-2"})(["display:flex;flex-direction:column;justify-content:center;text-align:center;position:absolute;top:","px;height:calc(100% - ","px);width:calc(100% - 12px);"],12,12),em=l.ZP.span.withConfig({componentId:"sc-7f1995c2-3"})(["gap:4px;padding:2px 8px;max-height:","px;width:80px;display:flex;flex-direction:row;background-color:",";position:absolute;top:0px;"," &:before{content:'';position:absolute;top:0px;border-top:","px solid ",";width:1px;","}"],14,function(e){var t=e.$disabled,r=e.$hovered,n=e.$isBuy,o=e.theme;return t?o.themeColors.text.disabled:r?n?o.themeColors.pnl.positive.active:o.themeColors.pnl.negative.active:n?o.themeColors.pnl.positive.hover:o.themeColors.pnl.negative.hover},function(e){var t=e.$isRight;return e.$isRTL?t?(0,l.iv)(["justify-content:flex-start;left:0px;"]):"\n justify-content: flex-end;\n right: 0px;\n ":t?(0,l.iv)(["justify-content:flex-start;left:0px;"]):(0,l.iv)(["justify-content:flex-end;right:0px;"])},14,function(e){var t=e.$disabled,r=e.$isBuy,n=e.$hovered,o=e.theme;return t?o.themeColors.text.disabled:n?r?o.themeColors.pnl.positive.active:o.theme
1Colors.pnl.negative.active:r?o.themeColors.pnl.positive.hover:o.themeColors.pnl.negative.hover},function(e){return e.$isRight?(0,l.iv)(["inset-inline-end:-","px;border-inline-end:","px solid transparent;"],8,7):(0,l.iv)(["inset-inline-start:-","px;border-inline-start:","px solid transparent;"],8,7)}),ey=l.ZP.span.withConfig({componentId:"sc-7f1995c2-4"})(["font-size:14px;margin-top:2px;"]),ev=(0,l.ZP)(C.ZP).withConfig({componentId:"sc-7f1995c2-5"})(["cursor:auto;position:absolute;bottom:0px;left:calc(50% - ","px);background-color:",";display:flex;align-items:center;justify-content:center;padding:0px ","px;height:22px;width:","px;"],40,function(e){return e.theme.themeColors.background.default},8,64),eg=(0,l.ZP)(ef).withConfig({componentId:"sc-7f1995c2-6"})(["white-space:nowrap;"]),ex=(0,l.ZP)(ef).withConfig({componentId:"sc-7f1995c2-7"})(["display:flex;justify-content:center;align-items:center;flex-direction:row;gap:2px;"]);let eS=function(){var e,t=(0,Q.X)(),r=t.symbolDetail,i=t.asks,l=t.bids,a=t.disablePlaceOrder,u=(0,U.o)().onMarketPlaceOrder,s=null!=r?r:{},d=s.decimal,f=void 0===d?3:d,p=s.symbol,b=void 0===p?"":p,h=null!=(e=(0,c.u3)(b))?e:{},m=h.defaultMinQuantity,y=h.minQuantity,v=q(),g=v&&v>=(void 0===m?0:m)?v:void 0,x=(0,el.dZ)(),S=(0,en.N)(y),O=(0,ea.GL)(),j=ei({buySellSymbolDetail:{decimal:f,symbol:b},asks:i,bids:l,disablePlaceOrder:a,inputSize:g,onMarketPlaceOrder:u}),C=j.leftBtn,P=j.rightBtn,E=j.spread,T=C.isBuy,M=C.label,k=C.price,L=C.onClick,I=C.testId,D=P.isBuy,A=P.label,R=P.price,Z=P.onClick,_=P.testId,B=eu((0,o.useState)(!1),2),z=B[0],F=B[1],$=eu((0,o.useState)(!1),2),V=$[0],N=$[1],X=(0,o.useCallback)(function(){return F(!0)},[]),G=(0,o.useCallback)(function(){return F(!1)},[]),H=(0,o.useCallback)(function(){return N(!0)},[]),K=(0,o.useCallback)(function(){return N(!1)},[]);return(0,n.jsxs)(ep,{children:[(0,n.jsxs)(eb,{$hovered:z,$isBuy:T,$isRTL:x,"data-testid":I,onClick:L,onMouseEnter:X,onMouseLeave:G,disabled:a,children:[(0,n.jsx)(es,{disabled:a,isBuy:T,maxDecimals:S,qtyLabel:O,hovered:z,value:g,isRTL:x}),(0,n.jsx)(ed,{disabled:a,decimal:f,orderType:M,value:k})]}),(0,n.jsxs)(eb,{$isBuy:D,$isRight:!0,$isRTL:x,$hovered:V,"data-testid":_,onClick:Z,onMouseEnter:H,onMouseLeave:K,disabled:a,children:[(0,n.jsx)(ed,{disabled:a,decimal:f,orderType:A,value:R}),(0,n.jsx)(es,{disabled:a,isBuy:D,isRTL:x,maxDecimals:S,qtyLabel:O,hovered:V,value:g,isRight:!0})]}),(0,n.jsx)(ev,{typography:w.wZ.TEXT_S_REGULAR,children:(0,eo.X8)(E,f)})]})};r(39714);var eO=r(18354),ew=r(18909);r(75654);var ej=function(e){var t=e.disableAutofill,r=e.symbolId,n=e.setValue,i=e.setTradeFormValue,l=(0,o.useRef)(void 0),a=(0,c.u3)(r).minQuantity;(0,o.useEffect)(function(){a&&l.current!==a&&!t&&(n("lotSize",a.toString(10),{shouldValidate:!0,shouldDirty:!0}),i&&i("lotSize",a.toString(10),{shouldValidate:!0,shouldDirty:!0}),l.current=a)},[t,a,n,i])},eC=r(92963);let eP=function(e){var t,r,i=e.disabled,l=(0,O.$G)().t,a=(0,Q.X)(),u=a.disablePlaceOrder,s=a.symbolDetail,d=(0,U.o)(),f=d.clearErrors,p=d.formState,b=d.handleLotSizeIncrease,h=d.handleLotSizeDecrease,m=d.handleLotSizeBlur,y=d.handleLotSizeChange,v=d.isCurrentSymbolSelected,g=d.register,x=d.setTradeFormValue,S=d.setValue,w=d.watch,j=s.lotSizeStep,C=s.symbol,E=(0,P.$X)(),T=(0,c.u3)(C).defaultMinQuantity;ej({symbolId:C,setValue:S,setTradeFormValue:x});var M=w("lotSize"),k=p.errors.lotSize,L=(0,o.useMemo)(function(){return(null==T?void 0:T.toString(10))||"0.01"},[T]),I=(0,o.useMemo)(function(){return(0,eC.r9)(eC.tM.SIZE,E)||l("Size")},[E,l]);return(0,o.useEffect)(function(){v||f("lotSize")},[v]),(0,n.jsx)(eO.e1,{variant:eO.vI.ITEM_WITH_FIELD_LABEL,label:I,children:(0,n.jsx)(ew.ZP,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({variant:ew.Bv.BORDERED_NUMERIC},g("lotSize")),r=r={placeholder:l("Min: {{value}}",{value:L}),value:M,error:null==k?void 0:k.message,onClickPlus:b,onClickSubtract:h,onBlur:m,onCh
1ange:function(e){return y(e.target.value)},disabled:i||u,dataTestId:F.Of.QUOTEBOARD_CARD_INPUT_QUANTITY,maxDecimals:(0,en.N)(j)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))})};r(21249);var eE=r(33481),eT=r(30070),eM=function(e){var t=(0,O.$G)().t,r=null!=e?e:{},n=r.symbol,i=r.tickRulesGroup,l=r.decimal,a=(0,R.Ro)(null!=n?n:""),c=null!=a?a:{},u=c.open,s=c.close,d=c.high,f=c.low,p=(0,o.useCallback)(function(e){return e?(0,eT.W)(e,(0,eE.os)(e,i,l),!0):"--"},[i,l]);return(0,o.useMemo)(function(){return[{title:t("Open"),value:p(u),key:"open"},{title:t("Close"),value:p(s),key:"close"},{title:t("High"),value:p(d),key:"high"},{title:t("Low"),value:p(f),key:"low"}]},[t,u,d,f,p,s])},ek=(0,l.ZP)(C.ZP).withConfig({componentId:"sc-17ea291b-0"})(["text-align:end;"]),eL=l.ZP.span.withConfig({componentId:"sc-17ea291b-1"})(["border:none;background-color:",";display:block;"],function(e){return e.theme.themeColors.border.default}),eI=l.ZP.div.withConfig({componentId:"sc-accc4239-0"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:8px 24px;"]),eD=l.ZP.div.withConfig({componentId:"sc-accc4239-1"})(["display:flex;justify-content:space-between;align-items:center;"]);let eA=function(){var e=(0,K.VC)().theme,t=eM((0,Q.X)().symbolDetail);return(0,n.jsx)(eI,{children:t.map(function(t){return(0,n.jsxs)(eD,{children:[(0,n.jsx)(C.ZP,{typography:w.wZ.TEXT_M_REGULAR,color:e.themeColors.text.muted,children:t.title}),(0,n.jsx)(ek,{typography:w.wZ.TEXT_M_REGULAR,children:t.value})]},t.key)})})};var eR=l.ZP.div.withConfig({componentId:"sc-9f6ba20f-0"})(["display:flex;flex-direction:column;gap:12px;padding:14px 12px 0;"]);let eZ=function(){return(0,n.jsxs)(eR,{children:[(0,n.jsx)(eA,{}),(0,n.jsx)(eP,{}),(0,n.jsx)(eS,{})]})};r(82526),r(41817);var e_=r(694),eB=r(16672),ez=r(13589),eQ=r(93512),eU=r(42014),eF=l.ZP.div.withConfig({componentId:"sc-23b5ae78-0"})(["display:flex;justify-content:space-between;padding:12px;"]),e$=l.ZP.div.withConfig({componentId:"sc-23b5ae78-1"})(["display:flex;flex-direction:column;"]),eV=(0,l.ZP)(e$).withConfig({componentId:"sc-23b5ae78-2"})(["gap:4px;"]),eN=(0,l.ZP)(e$).withConfig({componentId:"sc-23b5ae78-3"})(["justify-content:flex-end;& > div{justify-content:flex-end;}"]),eX=(0,l.ZP)(eU.g).withConfig({componentId:"sc-23b5ae78-4"})(["display:flex;gap:2px;"]),eG=l.ZP.div.withConfig({componentId:"sc-23b5ae78-5"})(["display:flex;align-items:center;gap:4px;"]);let eH=function(){var e=(0,O.$G)().t,t=(0,K.VC)().theme,r=(0,Q.X)().symbolDetail,i=r.symbol,l=r.description,a=r.tickRulesGroup,c=r.decimal,u=r.online,s=(0,R.Ro)(i),d=null!=s?s:{},f=d.open,p=d.bid,b=(0,e_.e)({prevClose:(0,eB.U8)(f),lastPrice:(0,eB.U8)(p)}),h=b.priceDifference,m=b.priceGained,y=b.percentageDifference,v=b.percentageGained,g=(0,ez.By)(m),x=(0,o.useMemo)(function(){return u?eQ.g.OPEN:eQ.g.CLOSE},[u]);return(0,n.jsxs)(eF,{children:[(0,n.jsxs)(eV,{"data-testid":F.Of.QUOTEBOARD_CARD_SYMBOL,children:[(0,n.jsxs)(eG,{children:[(0,n.jsx)(eQ.$,{marketStatus:x}),(0,n.jsx)(C.ZP,{typography:w.wZ.TEXT_L_MEDIUM,children:i})]}),(0,n.jsx)(C.ZP,{typography:w.wZ.TEXT_M_REGULAR,children:l})]}),(0,n.jsxs)(eN,{children:[(0,n.jsx)(ek,{typography:w.wZ.TEXT_M_REGULAR,color:t.themeColors.text.muted,children:e("Last Price")}),(0,n.jsx)(eU.g,{"data-testid":F.Of.QUOTEBOARD_CARD_LASTPRICE,typography:w.wZ.DISPLAY_XS_MEDIUM,withArrow:!0,profitLoss:g,children:p?(0,eT.W)(p,(0,eE.os)(p,a,c),!0):"--"}),(0,n.jsxs)(eX,{"data-testid":F.Of.QUOTEBOARD_CARD_PROFIT,typography:w.wZ.TEXT_M_REGULAR,profitLoss:(0,ez.By)(v),children:[(0,n.jsxs)("span",{children:[h>=0&&"+","number"==typeof h?"".concat((0,eT.W)(h,(0,eE.os)(h,a,c),!1)):"--"]}),(0,n.jsxs)("span",{children:["(",!!v&&"+","number"==typeof y?"".concat((0,eT.W)(y,2,!1),"%"):"--",")"]})]})]})]})};var eq=l.ZP.div.withConfig({componentId:"sc-2edfa4d4-0"})(["border-radius:12px;cursor:pointer;",""],function(e){var t=e.$customHighlightColor,r=e.$highlighted,n=e.theme,o=null!=t?t:n.themeColors.primary;return(0,l.iv)(["border:1px solid ",";"],r?o:n.themeColors.border.default)}),eK=(0,l.ZP)(eL).withConfig({componentId:"sc-2edfa4d4-1"})(["width:100%;height:1px;"]);let eY=(0,o.memo)(function(e){var t,r=e.onSelectSymbol,i=e.symbolId,l=x(),a=l.customLimitFormMethods,u=l.customMarketFormMethods,s=(0,c.M8)(i),f=(0,d.VL)(),p=(0,V.VC)().theme,b=(0,P.rW)(),h=(0,v.R)(),m=h.onSuccessOCTOrMarket,g=h.onError;$(i);var S=null!=(t=null==b?void 0:b.themeColourCode)?t:p.themeColors.primary,O=(0,o.useMemo)(function(){return f===i},[f,i]),w=(0,o.useCallback)(function(){r(i)},[r,i]);return s?(0,n.jsx)(U.z,{symbolDetail:s,showTradeConfirmationModal:y.d,onSubmitSuccess:m,onSubmitError:g,customLimitFormMethods:a,customMarketFormMethods:u,children:(0,n.jsx)(Q.$,{symbolDetail:s,children:(0,n.jsxs)(eq,{className:O?"selected":"",$customHighlightColor:S,$highlighted:O,"data-testid":F.Of.QUOTEBOARD_CARD,onClick:w,children:[(0,n.jsx)(eH,{}),(0,n.jsx)(eK,{}),(0,n.jsx)(eZ,{}),(0,n.jsx)(er,{})]})})}):null});var eW=a.A.M,eJ=a.A.REGULAR,e0=l.ZP.div.withConfig({componentId:"sc-aa0c2c91-0"})(["max-width:","px;width:100%;"],352),e1=l.ZP.div.withConfig({componentId:"sc-aa0c2c91-1"})(["padding:14px ","px ","px;height:100%;box-sizing:border-box;& > div > div{overscroll-behavior:none;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar;&::-webkit-scrollbar{display:none;}}"],a.A.M,a.A.XS);let e2=function(e){var t=e.gridWidth,r=e.onSelectSymbol,i=u(),l=(0,c.Sr)(),a=(0,c.it)(["userQuoteboardSymbolMap"]).userQuoteboardSymbolMap,s=(0,R.kH)(),d=(0,o.useRef)(null),f=(0,o.useRef)(void 0),p=1480>=B(),b=(0,o.useMemo)(function(){for(var e=p?eJ:eW,r=p?14:eW,n=Math.max(Math.floor(t/(352+e)),1),o=Math.ceil(i.length/n),c=[],u=[],d=0;d<o;d++)for(var f=0;f<n;f++){var b,h,m=i[n*d+f];if(m&&l[m]){var y=null!=(h=null==(b=a[m])?void 0:b.isExpand)&&h,v=0;s[m]&&y&&(v=s[m]),c[d]?c[d]=Math.max(c[d],v):c[d]=v}}
1return c.forEach(function(e){var t=0===e?0:z.A+z.Q*e;u.push(304+t+r)}),{columnCount:n,columnGap:e,rowCount:o,rowHeights:u}},[t,i,l,a,s,p]),h=b.columnGap,m=b.columnCount,y=b.rowCount,v=b.rowHeights,g=(0,o.useCallback)(function(e){var t=e.columnIndex,o=e.rowIndex,i=e.style,l=e.data[m*o+t];return l?(0,n.jsx)(e0,{style:i,children:(0,n.jsx)(eY,{symbolId:l,onSelectSymbol:r})},l):null},[r,m]),x=(0,o.useCallback)(function(e){var t;return null!=(t=v[e])?t:0},[v]);return(0,o.useEffect)(function(){!d.current||f.current&&(0,Z.YG)(f.current,v)||(d.current.resetAfterRowIndex(0),f.current=v)},[v]),(0,n.jsx)(e1,{children:(0,n.jsx)(D.ZP,{children:function(e){var r=e.height;return(0,n.jsx)(A.cd,{height:r,width:t,columnCount:m,columnWidth:function(){return 352+h},rowCount:y,rowHeight:x,itemData:i,ref:d,children:g})}})})};r(47941);var e3=r(59867),e9=r(96838),e5=r(88651),e8=r(15226),e6=r(56740),e4=l.ZP.div.withConfig({componentId:"sc-76f0721a-0"})(["display:flex;justify-content:space-between;align-items:center;padding-inline-end:","px;"],a.A.XS),e7=l.ZP.div.withConfig({componentId:"sc-76f0721a-1"})(["display:flex;align-items:center;gap:","px;"],a.A.XS),te=r(97186);r(26833),r(69826);var tt=r(74040);function tr(e,t,r,n,o,i,l){try{var a=e[i](l),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}function tn(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function l(e){tr(i,n,o,l,a,"next",e)}function a(e){tr(i,n,o,l,a,"throw",e)}l(void 0)})}}function to(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function ti(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function tl(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var u=[a,c];if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var ta=function(e){var t=e.type,r=e.onCancel,l=(0,O.$G)().t,a=(0,c.w9)(),u=a.defaultQuoteboardSymbolMap,s=a.editingQuoteboardConfigSymbolMap,d=a.symbolsConfigLoading,f=a.userQuoteboardSymbolMap,p=(0,c.Vh)(t),b=p.isDirty,h=p.isResetDisabled,m=(0,tt.EB)(t),y=(0,o.useCallback)(function(){return tn(function(){var e,n,o;return tl(this,function(l){switch(l.label){case 0:return n=Object.values(f),o=Object.values(u),e=t===c.gZ.TRADE_VOLUME?n.map(function(e){var t,r,n=null!=(r=null==(t=u[e.symbol])?void 0:t.minQuantity)?r:e.minQuantity;return ti(to({},e),{minQuantity:n})}):t===c.gZ.SETTINGS?o.map(function(e){var t;return ti(to({},e),{minQuantity:(null==(t=n.find(function(t){return t.symbol===e.symbol}))?void 0:t.minQuantity)||e.minQuantity})}):o,[4,i.c.updateQuoteBoardConfigs(t,e)];case 1:return l.sent(),r(),[2]}})})()},[f,u,t,r]),v=(0,o.useCallback)(function(){b?(0,te.OQ)({modalTitle:l("Confirmation"),content:l("Are you sure to proceed without saving?"),okText:l("Confirm"),cancelText:l("Cancel"),onOk:function(e){var t=e.onCancel;i.c.resetEditingConfigToUserConfig(),null==t||t(),r()}}):r()},[b,r,l]),g=(0,o.useCallback)(function(){return tn(function(){var e;return tl(this,function(n){switch(n.label){case 0:return e=Object.values((0,tt.U1)(s)),[4,i.c.updateQuoteBoardConfigs(t,e)];case 1:return n.sent(),r(),[2]}})})()},[s,r,t]);return(0,n.jsx)(tc,{children:(0,n.jsxs)(tu,{children:[(0,n.jsx)(e9.ZP,{variant:e9.eF.OUTLINED_THEMED,onClick:y,disabled:h,loading:d,children:l("Reset to default")}),(0,n.jsxs)(ts,{children:[(0,n.jsx)(e9.ZP,{variant:e9.eF.OUTLINED,onClick:v,loading:d,children:l("Cancel")}),(0,n.jsx)(e9.ZP,{variant:e9.eF.FILLED_THEMED,onClick:g,disabled:m||!b,loading:d,children:l("Done")})]})]})})},tc=l.zo.div.withConfig({componentId:"sc-6debfa93-0"})(["width:100%;border-top:1px solid ",";"],function(e){return e.theme.themeColors.border.default}),tu=l.zo.div.withConfig({componentId:"sc-6debfa93-1"})(["display:flex;justify-content:space-between;align-items:center;padding:20px;gap:","px;"],a.A.XS),ts=l.zo.div.withConfig({componentId:"sc-6debfa93-2"})(["display:flex;justify-content:flex-end;align-items:center;gap:","px;"],a.A.XS);r(38559),r(66992),r(69720),r(34553);var td=r(5513),tf=r(95339),tp=r(67445),tb=r(74307);function th(){var e=(0,c.w9)().editingQuoteboardConfigSymbolMap;return(0,o.useMemo)(function(){return Object.values(e).sort(function(e,t){return e.order-t.order})},[e])}r(71934);var tm=r(759),ty=l.ZP.div.withConfig({componentId:"sc-316461fb-0"})(["display:flex;align-items:center;width:100%;height:32px;"]),tv=l.ZP.div.withConfig({componentId:"sc-316461fb-1"})(["display:flex;justify-content:space-between;align-items:center;padding:0 ","px;gap:","px;width:100%;"],a.A.L,a.A.XS),tg=l.ZP.div.withConfig({componentId:"sc-316461fb-2"})(["display:flex;align-items:center;gap:","px;"],a.A.XXS),tx=function(e){var t,r,o=e.item,i=e.handleCheckboxChange,l=o.id,a=o.shown,c=o.symbol,u=(0,tp.nB)({id:l}),s=u.setNodeRef,d=u.transform,f=u.transition,p=u.setActivatorNodeRef,b=u.listeners,h={transform:tm.ux.Transform.toString(d),transition:f};return(0,n.jsx)(ty,{ref:s,style:h,children:(0,n.jsxs)(tv,{children:[(0,n.jsxs)(tg,{children:[(0,n.jsx)(tb.Z,{checked:a,onClick:function(){return i(l,!a)}}),(0,n.jsx)(C.ZP,{typography:w.wZ.TEXT_M_REGULAR,children:c})]}),(0,n.jsx)(tS,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({ref:p},b),r=r={children:(0,n.jsx)(N.ZP,{icon:N.Ro.REORDER,size:N.sk.M})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))]})},o.id)},tS=l.ZP.span.withConfig({componentId:"sc-bcb92017-0"})(["display:flex;align-items:center;justify-content:center;width:16px;height:16px;cursor:grab;"]);function tO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function tj(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function tC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tO(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tP=l.ZP.div.withConfig({componentId:"sc-1b85e8-0"})(["max-height:",";overflow-y:auto;height:100%;width:100%;"],function(e){var t=e.$contentHeight;return"".concat(t,"px")}),tE=(0,l.ZP)(ty).withConfig({componentId:"sc-1b85e8-1"})(["border-bottom:1px solid ",";"],function(e){return e.theme.themeColors.border.subtle}),tT=(0,l.ZP)(C.ZP).withConfig({componentId:"sc-1b85e8-2"})(["text-transform:capitalize;"]),tM=l.ZP.div.withConfig({componentId:"sc-1b85e8-3"})(["padding:0 20px;"]),tk=l.ZP.div.withConfig({componentId:"sc-1b85e8-4"})(["font-size:12px;color:",";"],function(e){return e.theme.themeColors.error});let tL=function(){var e=(0,O.$G)().t,t=(0,c.w9)().editingQuoteboardConfigSymbolMap,r=(0,tt.EB)(c.gZ.SETTINGS),i=th(),l=(0,o.useMemo)(function(){return i.every(function(e){return e.shown})},[i]),a=(0,o.useCallback)(function(){c.sv.setEditingQuoteboardConfigSymbolMap(Object.fromEntries(Object.entries(t).map(function(e){var t=tC(e,2);return[t[0],tj(tw({},t[1]),{shown:!l})]})))},[l,t]),u=(0,o.useCallback)(function(e){var t=e.active,r=e.over;if(t.id!==(null==r?void 0:r.id)){for(var n=i.findIndex(function(e){return e.id===t.id}),o=i.findIndex(function(e){return e.id===(null==r?void 0:r.id)}),l=(0,tp.Rp)(i,n,o),a={},u=0;u<l.length;u++){var s=l[u];a[s.symbol]=tj(tw({},s),{order:u})}c.sv.setEditingQuoteboardConfigSymbolMap(a)}},[i]),s=(0,o.useCallback)(function(e,r){c.sv.setEditingQuoteboardConfigSymbolMap(Object.fromEntries(Object.entries(t).map(function(t){var n=tC(t,2),o=n[0],i=n[1];return[o,i.id===e?tj(tw({},i),{shown:r}):i]})))},[t]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tE,{children:(0,n.jsx)(tv,{children:(0,n.jsxs)(tg,{children:[(0,n.jsx)(tb.Z,{checked:l,onClick:a}),(0,n.jsx)(tT,{typography:w.wZ.TEXT_M_MEDIUM,children:e("Show all")})]})})}),(0,n.jsx)(tP,{$contentHeight:300,children:(0,n.jsx)(td.LB,{onDragEnd:u,modifiers:[tf.DL],children:(0,n.jsx)(tp.Fo,{items:i,strategy:tp.qw,children:i.map(function(e){return(0,n.jsx)(tx,{item:e,handleCheckboxChange:s},e.id)})})})}),r&&(0,n.jsx)(tM,{children:(0,n.jsx)(tk,{children:e("At least one symbol must be selected")})})]})};var tI=r(6454),tD=r(64989),tA=r(69100);function tR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tZ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tR(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}let t_=function(e){var t=e.editingQuoteBoardConfig,r=e.defaultMinQuantity,i=e.defaultMaxQuantity,l=t||{},a=l.id,u=l.symbol,s=l.minQuantity,d=(0,O.$G)().t,f=(0,c.w9)().editingQuoteboardConfigSymbolMap,p=tZ((0,o.useState)(s),2),b=p[0],h=p[1],m=(0,o.useMemo)(function(){var e=void 0,t=(0,tD.vg)(null!=r?r:0);if(s){var n=(0,X.BigNumber)(s);r&&n.isLessThan(r)?e=t:n.isGreaterThan(i)&&(e=(0,tD.Fq)(i))}return c.sv.setEditingQuotenboardConfigErrorById(a,!!e),e},[r,s,i,a]),y=(0,o.useCallback)(function(e,t){h(e),c.sv.setEditingQuoteboardConfigSymbolMap(Object.fromEntries(Object.entries(f).map(function(r){var n,o,i=tZ(r,2),l=i[0],a=i[1];return[l,(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},a),o=o={minQuantity:a.id===t?e:a.minQuantity},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n)]})))},[f]),v=(0,o.useCallback)(function(e){var t=e.target.value;if(t){var r=(0,eB.TK)(t);r!==t&&y(r,a)}},[y,a]);return(0,n.jsx)(tA.Z,{title:u,value:b,type:tI.nc.DECIMAL,onChange:function(e){return y(null==e?void 0:e.toString(),a)},onBlur:v,placeholder:d("Min: {{value}}",{value:r}),errorMessage:m,decimal:2},a)};var tB=l.ZP.div.withConfig({componentId:"sc-14a0af65-0"})(["width:100%;max-height:",";overflow-y:auto;"],function(e){var t=e.$contentHeight;return"".concat(t,"px")}),tz=l.ZP.div.withConfig({componentId:"sc-14a0af65-1"})(["display:flex;flex-direction:column;gap:10px;justify-content:center;padding:10px 20px;"]);let tQ=function(){var e=(0,c.w9)().defaultQuoteboardSymbolMap,t=th();return(0,n.jsx)(tB,{$contentHeight:300,children:(0,n.jsx)(tz,{children:t.map(function(t){var r=t.symbol,o=Object.values(e).find(function(e){return e.symbol===r})||{},i=o.minQuantity,l=o.maxQuantity;return(0,n.jsx)(t_,{editingQuoteBoardConfig:t,defaultMinQuantity:void 0===i?0:i,defaultMaxQuantity:void 0===l?0:l},r)})})})};function tU(e,t,r,n,o,i,l){try{var a=e[i](l),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}var tF=function(e){var t=e.type,r=e.onCancel,i=(0,O.$G)().t,l=(0,o.useMemo)(function(){switch(t){case c.gZ.SETTINGS:return i("Quote Board");case c.gZ.TRADE_VOLUME:return i("Default Trade Volume");default:return null}},[i,t]);return(0,n.jsx)(te.ZP,{variant:te.KH.CONFIRMATION,modalTitle:l,footer:(0,n.jsx)(ta,{type:t,onCancel:r}),children:function(){switch(t){case c.gZ.SETTINGS:return(0,n.jsx)(tL,{});case c.gZ.TRADE_VOLUME:return(0,n.jsx)(tQ,{});default:return null}}()})},t$=function(e){var t=function(t){var r;return(r=function(){var r;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var u=[a,c];if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return[4,null==(r=e.onCancel)?void 0:r.call(e)];case 1:return n.sent(),t(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function l(e){tU(i,n,o,l,a,"next",e)}function a(e){tU(i,n,o,l,a,"throw",e)}l(void 0)})})()};(0,e5.ZP)(function(r){var o,i;return(0,n.jsx)(tF,(o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e),i=i={onCancel:function(){return t(r)}},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o))})};function tV(e,t,r,n,o,i,l){try{var a=e[i](l),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}var tN="quoteboard-config-error-".concat((0,e5.Vj)());let tX=function(){var e=(0,O.$G)().t,t=(0,K.VC)().theme,r=(0,c.w9)(),i=r.isBadge,l=r.isOpenErrorSnackBar,a=r.editingQuoteboardConfigSymbolMap,u=(0,o.useMemo)(function(){return!a||0===Object.keys(a).length},[a]),s=(0,o.useMemo)(function(){return t.themeColors.icon.default},[t.themeColors.icon.default]),d=function(){document.getElementById(tN)&&(e6.Yu.removeAlert(tN),c.sv.setIsOpenErrorSnackBar(!1))},f=function(){c.sv.resetEditingConfigToUserConfig(),c.sv.checkAndUpdateBadgeStatus()},p=(0,o.useCallback)(function(){d(),t$({type:c.gZ.SETTINGS,onCancel:f})},[]),b=(0,o.useCallback)(function(){var e;return(e=function(){return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var u=[a,c];if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){return d(),t$({type:c.gZ.TRADE_VOLUME,onCancel:f}),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function l(e){tV(i,n,o,l,a,"next",e)}function a(e){tV(i,n,o,l,a,"throw",e)}l(void 0)})})()},[]);return(0,o.useEffect)(function(){return l&&e6.Yu.showAlert({id:tN,messageType:e6.KK.ERROR,message:e("Some symbols have invalid default quantities."),delay:0,actionLabel:e("UPDATE"),onAction:b,onClose:function(){return c.sv.setIsOpenErrorSnackBar(!1)}}),function(){return d()}},[l,e,b]),(0,n.jsxs)(e7,{children:[(0,n.jsx)(e8.Z,{variant:e8.q.BASE,disabled:!i,placement:"bottom",trigger:"mouseenter",content:(0,n.jsx)(tG,{children:(0,n.jsx)(tH,{typography:w.wZ.TEXT_M_REGULAR,children:e("One or more symbol's minimum quantity was updated. Adjust your default quantity.")})}),children:(0,n.jsx)(e3.ZP,{badgeContent:+!!i,dot:!0,children:(0,n.jsx)(e9.ZP,{variant:e9.eF.OUTLINED,size:"small",onClick:b,textColor:s,disabled:u,children:(0,n.jsx)(N.ZP,{icon:N.Ro.PREFERENCE})})})}),(0,n.jsx)(e9.ZP,{variant:e9.eF.OUTLINED,size:"small",onClick:p,textColor:s,disabled:u,children:(0,n.jsx)(N.ZP,{icon:N.Ro.SELECTOR_SETTING})})]})};var tG=l.ZP.div.withConfig({componentId:"sc-c3383a54-0"})(["display:flex;padding-inline:","px;padding-block:","px;"],a.A.XS,a.A.XXS),tH=(0,l.ZP)(C.ZP).withConfig({componentId:"sc-c3383a54-1"})(["color:",";"],function(e){return e.theme.themeColors.background.default}),tq=(0,o.forwardRef)(function(e,t){var r=e.gridWidth,l=e.loading,a=e.maxHeight,s=u(),p=(0,P.YR)(),b=(0,O.$G)().t,h=(0,c.it)(["symbolDetailsMap"]).symbolDetailsMap,m=(0,d.VL)();(0,o.useEffect)(function(){return i.c.init(),function(){i.c.resetSymbolsViewData(),E.K.resetAllDOMData()}},[]),(0,o.useEffect)(function(){return E.K.initSocketReconnectionListener(),function(){E.K.removeSocketReconnectionListener()}},[]);var y=(0,o.useCallback)(function(e){var t=h[e];t&&(d.Xo.setSelectedSymbol(e),f.N.setSymbolDetail({symbolId:t.symbol,disableChartReload:!0,buySellType:p?T.B9.SELL:T.B9.BUY}))},[p,h]);return(0,o.useEffect)(function(){m||0===s.length||y(s[0])},[s,m,y]),(0,n.jsxs)(tY,{ref:t,children:[(0,n.jsxs)(e4,{children:[(0,n.jsx)(k,{children:(0,n.jsx)(C.ZP,{typography:w.wZ.TEXT_M_MEDIUM,children:b("Quote Board")})}),(0,n.jsx)(tX,{})]}),(0,n.jsx)(L,{}),(0,n.jsxs)(tJ,{$maxHeight:a,children:[l&&(0,n.jsx)(tW,{children:(0,n.jsx)(j.ZP,{})}),!l&&s.length>0&&(0,n.jsx)(e2,{gridWidth:r,onSelectSymbol:y}),!l&&0===s.length&&(0,n.jsx)(tK,{children:(0,n.jsx)(M.Z,{variant:M.R.NO_DATA_TO_DISPLAY,label:b("You have no symbols.")})})]})]})}),tK=l.ZP.div.withConfig({componentId:"sc-30b5e1f5-0"}
1)(["height:100%;& > div{height:calc(100% - 104px);}"]),tY=(0,l.ZP)(I).withConfig({componentId:"sc-30b5e1f5-1"})(["width:100%;"]),tW=l.ZP.div.withConfig({componentId:"sc-30b5e1f5-2"})(["width:100%;height:100%;display:flex;align-items:center;justify-content:center;"]),tJ=l.ZP.div.withConfig({componentId:"sc-30b5e1f5-3"})(["background-color:",";max-height:","px;overflow:hidden;height:100%;"],function(e){return e.theme.themeColors.background.default},function(e){return e.$maxHeight});function t0(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return t0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var t2=function(e){return Math.max(e-34,0)};let t3=function(){var e=u(),t=(0,s.GR)(),r=t.rightPanelState,l=t.bottomPanelState,a=(0,c.G$)(),h=s.Pw.isExpandState(l),m=s.Pw.isExpandState(r),y=(0,o.useRef)(null),v=t1((0,o.useState)(0),2),g=v[0],S=v[1],O=t
11((0,o.useState)(0),2),w=O[0],j=O[1],C=x(),P=C.customLimitFormMethods,E=C.customLimitSubmit,T=C.customMarketFormMethods,M=C.customMarketSubmit;return(0,o.useEffect)(function(){return d.Xo.consumeIsNavigatingFromNotification()||d.Xo.clearSelectedSymbol(),function(){f.N.consumeIsNavigatingWithSymbol()||f.N.clearSymbolIdAndDetails()}},[]),(0,o.useEffect)(function(){return s.Jl.setBottomPanelState(s.zA.EXPANDED),function(){s.Jl.setBottomPanelState(s.zA.NOT_APPLIED)}},[]),(0,o.useEffect)(function(){return i.c.handleSetIsQuoteboardPage(!0),function(){i.c.handleSetIsQuoteboardPage(!1)}},[]),(0,o.useEffect)(function(){return!a&&e.length>0&&s.Jl.setRightPanelState(s.zA.EXPANDED),function(){s.Jl.setRightPanelState(s.zA.NOT_APPLIED)}},[a,e]),(0,o.useEffect)(function(){var e=function(){y.current&&!a&&(S(t2(y.current.clientHeight)),j(Math.max(y.current.offsetWidth-32,0)))};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[a,r]),(0,o.useEffect)(function(){return i.c.handleSetIsQuoteboardPage(!0),function(){i.c.handleSetIsQuoteboardPage(!1)}},[]),(0,n.jsx)(b.Z,{shouldShowOrderForm:m,shouldShowPositionTable:h,isFullScreen:!1,customLimitFormMethods:P,customLimitSubmit:E,customMarketFormMethods:T,customMarketSubmit:M,children:(0,n.jsxs)(t9,{children:[(0,n.jsx)(tq,{gridWidth:w,loading:a,maxHeight:g,ref:y}),(0,n.jsx)(p.Z,{isFolded:!h,onClick:function(){s.Pw.toggleBottomPanel(),y.current&&setTimeout(function(){S(t2(y.current.clientHeight))},100)},direction:"bottom"}),!a&&e.length>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(p.Z,{isFolded:!m,onClick:s.Pw.toggleRightPanel,direction:"right"})})]})})};var t9=l.ZP.div.withConfig({componentId:"sc-e611b82b-0"})(["display:flex;flex-direction:row;gap:","px;overflow:hidden;flex:1 0 440px;flex-shrink:0;margin-block-end:","px;min-height:579px;position:relative;& > div:nth-child(2){position:absolute;bottom:0px;}& > div:nth-child(3){position:absolute;right:0px;top:0px;}"],a.A.XS,a.A.XS);let t5=function(){return(0,o.useEffect)(function(){return i.c.handleSetIsQuoteboardPage(!0),function(){i.c.handleSetIsQuoteboardPage(!1)}},[]),(0,n.jsx)(S,{children:(0,n.jsx)(t3,{})})}},55979:function(e,t,r){r.d(t,{A:()=>n,Q:()=>o});var n=25,o=32},30856:function(e,t,r){r.d(t,{Z:()=>v}),r(41539),r(92222);var n=r(74512),o=r(32735),i=r(10281),l=r(71225),a=r(54901),c=r(77253),u=r(33179),s=r(98435),d=r(3051),f=r(57694);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var b=i.ZP.div.withConfig({componentId:"sc-b760a370-0"})(["flex:1;height:100%;display:flex;flex-direction:column;"]),h=i.ZP.div.withConfig({componentId:"sc-b760a370-1"})(["flex:1;height:100%;display:flex;flex-direction:row;"]),m=i.ZP.div.withConfig({componentId:"sc-b760a370-2"})(["flex:1;display:flex;flex-direction:column;margin-inline-end:","px;height:",";overflow:auto;"],function(e){return e.$isFullScreen?"0":l.A.XS},function(e){return e.$isFullScreen?"100vh":"calc(100vh - ".concat(a.X,"px - ").concat(u.o,"px)")}),y=i.ZP.div.withConfig({componentId:"sc-b760a370-3"})(["height:100%;max-height:351px;min-height:351px;width:100%;display:flex;"]);let v=function(e){var t,r=e.isFullScreen,i=e.shouldShowPositionTable,l=e.shouldShowOrderForm,a=e.children,u=e.customLimitFormMethods,v=e.customLimitSubmit,g=e.customMarketFormMethods,x=e.customMarketSubmit,S=(0,o.useRef)(null),O=(t=(0,o.useState)(0),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return p(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}}
1(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=O[0],j=O[1];return(0,o.useEffect)(function(){var e=S.current;if(e){var t=new ResizeObserver(function(e){e.forEach(function(e){j(e.contentRect.height)})});return t.observe(e),function(){t.disconnect()}}},[]),(0,n.jsxs)(b,{children:[!r&&(0,n.jsx)(c.Z,{}),(0,n.jsx)(s.Z,{}),(0,n.jsxs)(h,{children:[(0,n.jsxs)(m,{ref:S,$isFullScreen:r,children:[a,i&&(0,n.jsx)(y,{children:(0,n.jsx)(d.Z,{assetPage:!1})})]}),l&&(0,n.jsx)(f.Z,{customLimitFormMethods:u,customLimitSubmit:v,customMarketFormMethods:g,customMarketSubmit:x,tradeDetailsHeight:w})]})]})}}}]);
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.