1"use strict";(self.webpackChunk_aqx_member_web=self.webpackChunk_aqx_member_web||[]).push([["7215"],{27094:function(e,t,n){n.d(t,{D2:()=>f,qn:()=>m,WL:()=>j,jE:()=>C,hQ:()=>g,mZ:()=>u,vo:()=>v,ex:()=>b,ke:()=>d,OM:()=>a,On:()=>E,sv:()=>s,Yu:()=>i,cY:()=>p,D$:()=>l,uA:()=>x,V8:()=>y,sL:()=>c,Qi:()=>h}),n(66251),n(92274),n(32735);var r=n(81993),o=n(50887),i=function(){return(0,r.useService)(o.A,function(e){return e.currentSymbol})},l=function(){return(0,r.useService)(o.A,function(e){return e.priceAlertsMap})},c=function(e){return(0,r.useService)(o.A,function(t){return t.priceAlertsMap[e]})},a=function(e){return(0,r.useService)(o.A,function(t){return t.symbolDetailsMap[e]})},s=function(){return(0,r.useService)(o.A,function(e){var t;return e.priceAlertsMap[null!=(t=e.currentSymbol)?t:""]})},u=function(e){return(0,r.useService)(o.A,function(t){return t.livePricesMap[null!=e?e:""]})},d=function(){return(0,r.useService)(o.A,function(e){var t;return!!e.symbolDisabledMap[null!=(t=e.currentSymbol)?t:""]})},f=function(e){return(0,r.useService)(o.A,function(t){return!!t.symbolDisabledMap[null!=e?e:""]})},p=function(){return(0,r.useService)(o.A,function(e){return e.symbolExpandedMap})},b=function(e){return(0,r.useService)(o.A,function(t){return!!t.symbolExpandedMap[null!=e?e:""]})},h=function(){return(0,r.useService)(o.A,function(e){return e.priceAlertsLoading})},m=function(){return(0,r.useService)(o.A,function(e){return e.submitting})},y=function(){return(0,r.useService)(o.A,function(e){return e.showBulkEdit})},g=function(){return(0,r.useService)(o.A,function(e){return e.selectedAlerts})},x=function(){return(0,r.useService)(o.A,function(e){return e.editAlertId})},v=function(){return(0,r.useService)(o.A,function(e){return e.activeTab})},E=function(){return(0,r.useService)(o.A,function(e){return e.showAlertForm})},j=function(){return(0,r.useService)(o.A,function(e){return e.alertConfig})},C=function(){return(0,r.useService)(o.A,function(e){return e.onDeleteResetList})}},88996:function(e,t,n){n.d(t,{Z:()=>x}),n(82526),n(41817);var r,o=n(74512),i=n(32735),l=n(10281),c=n(81182),a=n(96838),s=n(71225),u=n(80199),d=n(97186),f=n(38074),p=n(61644),b=n(27094),h=n(15959);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(m(r={},p.tf.DUPLICATED_PRICE_ALERT,u.Ro.SNACKBAR_ERROR),m(r,p.tf.PRICE_ALERT_LIMIT_REACHED,u.Ro.SNACKBAR_ERROR),m(r,p.tf.SYMBOL_TEMPORARILY_DISABLED,u.Ro.SNACKBAR_ALERT),r),g=l.ZP.div.withConfig({componentId:"sc-c152c145-0"})(["display:flex;justify-content:flex-end;padding:","px;"],s.A.L);let x=function(){var e=(0,c.$G)().t,t=(0,b.WL)(),n=t.symbolLimit,r=t.accountLimit,l=e("Ok");return{handleShowError:(0,i.useCallback)(function(e){var t=(0,h.WL)(e,n,r),i=t.description,c=t.testID,s=t.title,p=y[e];(0,d.OQ)({dataTestId:c,title:s,titlePrefix:(0,o.jsx)(u.ZP,{icon:p,size:u.sk.L}),children:(0,o.jsx)(f.ZP,{children:i}),footer:function(e){return(0,o.jsx)(g,{children:(0,o.jsx)(a.ZP,{variant:a.eF.FILLED_THEMED,onClick:function(){return null==e?void 0:e()},children:l})})}})},[l,n,r])}}},86788:function(e,t,n){n.d(t,{Z:()=>r9}),n(88674),n(41539),n(26699),n(32023),n(21249);var r,o,i=n(74512),l=n(32735),c=n(10281),a=n(69062),s=n(13266),u=[{label:"Equity",value:a.lp.EQUITIES,disabled:!0},{label:"Option",value:a.lp.OPTION,disabled:!0}],d=n(59440),f=n(53055),p=n(25932);n(69826);var b=n(81182),h=n(11750),m=n(96838),y=n(71225),g=n(80199);n(90619),n(80153),n(92274),n(75654);var x=n(86544),v=n(62715),E=n(97438),j=n(87347);function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}let A=(0,x.Y)(function(e){var t=e.tab,n=e.selected,r=e.selectedIndex,o=e.onSelect,c=t||{},a=c.value,s=c.disabled,u=c.label,d=(0,l.useMemo)(function(){return n?C({},j.R$[v.wZ.TEXT_S_MEDIUM]):C({},j.R$[v.wZ.TEXT_S_REGULAR])},[n]);return(0,i.jsx)(O,{className:(0,E.y)({selected:n,disabled:s}),onClick:function(){s||null==o||o(a)},$selectedIndex:r,style:d,children:u})});var O=c.ZP.div.withConfig({componentId:"sc-334a68c5-0"})(["padding:","px 6px;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;border-top:1px solid ",";border-bottom:1px solid ",";border-right:1px solid ",";color:",";&:hover{color:",";}&:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid ",";}&:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;}&.selected{border-color:",";color:",";&:hover{color:",";}}&.disabled{cursor:not-allowed;color:",";&:hover{color:",";}}",""],y.A.XXS,function(e){return e.theme.themeColors.border.strong},function(e){return e.theme.themeColors.border.strong},function(e){return e.theme.themeColors.border.strong},function(e){return e.theme.themeColors.text.subtle},function(e){return e.theme.themeColors.text.strong},function(e){return e.theme.themeColors.border.strong},function(e){return e.theme.themeColors.primary},function(e){return e.theme.themeColors.primary},function(e){return e.theme.themeColors.primary},function(e){return e.theme.themeColors.text.disabled},function(e){return e.theme.themeColors.text.disabled},function(e){var t=e.$selectedIndex,n=e.theme;return(0,c.iv)(["&:nth-child(","){border-right-color:",";}
1"],t,n.themeColors.primary)});function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var S=(0,x.Y)(function(e){var t,n=e.tabGroupData,r=void 0===n?[]:n,o=e.selectedTab,c=e.onSelect,a=e.dataTestId,s=(t=(0,l.useState)(0),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return T(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}}(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.")}()),u=s[0],d=s[1];(0,l.useEffect)(function(){d(r.findIndex(function(e){return e.value===o}))},[o,r]);var f=function(e){c&&(null==c||c(e))};return 0===r.length?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)(P,{"data-testid":a,children:r.map(function(e){var t=e.value===o;return(0,i.jsx)(A,{selected:t,onSelect:f,tab:e,selectedIndex:u},String(e.value).toString())})})}),P=c.ZP.div.withConfig({componentId:"sc-f8568a8a-0"})(["display:flex;border-radius:3px;height:24px;position:relative;"]),w=n(907),R=n(87565);n(68233);var I=n(6807),_=n(6053),L=n(1403),Z=n(17197),k=n(16889),D=n(11961),M=n(34965),N=n(33007),U=n(39690);n(82526),n(41817);var F=n(45954),G=n(38074);let X=(0,l.memo)(function(){var e=(0,f.l6)(["symbol","description"])||{},t=e.symbol,n=e.description,r=(0,f.s9)();return(0,i.jsx)(B,{children:r?(0,i.jsx)(F.ZP,{}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)($,{children:[(0,i.jsx)(V,{typography:v.wZ.TEXT_L_MEDIUM,children:t}),(0,i.jsx)(H,{typography:v.wZ.TEXT_M_REGULAR,children:n})]})})})});var B=c.ZP.div.withConfig({componentId:"sc-86e0f6c3-0"})(["display:flex;justify-content:center;align-items:flex-start;gap:","px;"],y.A.M),$=c.ZP.div.withConfig({componentId:"sc-86e0f6c3-1"})(["display:flex;flex-direction:column;"]),V=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-86e0f6c3-2"})([""]),H=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-86e0f6c3-3"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle});let Y=(0,l.memo)(function(){var e=(0,s._f)(["symbol","description"])||{},t=e.symbol,n=e.description,r=(0,s.b2)();return(0,i.jsx)(W,{children:r?(0,i.jsx)(F.ZP,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q,{typography:v.wZ.TEXT_L_MEDIUM,children:t}),(0,i.jsx)(z,{typography:v.wZ.TEXT_M_REGULAR,children:n})]})})});var W=c.ZP.div.withConfig({componentId:"sc-6e5fa775-0"})(["display:flex;justify-content:center;align-items:flex-start;gap:","px;"],y.A.XS),q=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-6e5fa775-1"})([""]),z=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-6e5fa775-2"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle});n(92222);var K=n(694),Q=n(16672),J=n(33481),ee=n(30070),et=n(13589),en=n(42014);let er=function(){var e=(0,b.$G)().t,t=(0,f.l6)(["prevClose","low","high","lastPrice","tickRulesGroup","decimal"]),n=t.prevClose,r=t.low,o=t.high,l=t.lastPrice,c=t.tickRulesGroup,a=t.decimal,s=(0,K.e)({prevClose:(0,Q.U8)(null!=n?n:0),lastPrice:(0,Q.U8)(null!=l?l:0)}),u=s.percentageDifference,d=s.percentageGained,p=s.priceGained;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ei,{children:[(0,i.jsx)(eo,{typography:v.wZ.TEXT_M_REGULAR,children:e("Last Price")}),(0,i.jsx)(ec,{children:(0,i.jsx)(en.g,{typography:v.wZ.TEXT_XL_MEDIUM,withArrow:!0,profitLoss:(0,et.By)(p),children:(0,ee.W)(l,(0,J.os)(l,c,a),!0)})})]}),(0,i.jsxs)(ei,{children:[(0,i.jsx)(eo,{typography:v.wZ.TEXT_M_REGULAR,children:e("Chg (%)")}),(0,i.jsx)(el,{}),(0,i.jsx)(en.g,{typography:v.wZ.TEXT_M_REGULAR,profitLoss:(0,et.By)(d),children:void 0!==(0,Q.M7)(u)?"".concat((0,ee.W)(u,2,!1),"%"):"--"})]}),(0,i.jsxs)(ei,{children:[(0,i.jsx)(eo,{typography:v.wZ.TEXT_M_REGULAR,children:e("24hr High")}),(0,i.jsx)(el,{}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:(0,ee.W)(o,(0,J.os)(o,c,a),!0)})]}),(0,i.jsxs)(ei,{children:[(0,i.jsx)(eo,{typography:v.wZ.TEXT_M_REGULAR,children:e("24hr Low")}),(0,i.jsx)(el,{}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:(0,ee.W)(r,(0,J.os)(r,c,a),!0)})]})]})};var eo=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-4048e3b2-0"})(["color:",";"],function(e){return e.theme.themeColors.text.muted}),ei=c.ZP.div.withConfig({componentId:"sc-4048e3b2-1"})(["display:flex;flex-direction:column;"]),el=c.ZP.div.withConfig({componentId:"sc-4048e3b2-2"})(["height:3px;"]),ec=c.ZP.div.withConfig({componentId:"sc-4048e3b2-3"})(["display:flex;"]);let ea=(0,l.memo)(function(){var e=(0,f.l6)(["symbol","description"])||{},t=e.symbol,n=e.description,r=(0,f.s9)();return(0,i.jsx)(es,{children:r?(0,i.jsx)(F.ZP,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eu,{children:[(0,i.jsx)(ed,{typography:v.wZ.TEXT_L_MEDIUM,children:t}),(0,i.jsx)(ep,{}),(0,i.jsx)(ef,{typography:v.wZ.TEXT_M_REGULAR,width:"200px",tooltip:n,children:n})]}),(0,i.jsx)(er,{})]})})});var es=c.ZP.div.withConfig({componentId:"sc-1900c174-0"})(["display:flex;justify-content:center;align-items:flex-start;gap:","px;"],y.A.M),eu=c.ZP.div.withConfig({componentId:"sc-1900c174-1"})(["display:flex;flex-direction:column;"]),ed=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-1900c174-2"})([""]),ef=(0,c.ZP)(G.ZP).attrs({variant:G.fD.WITH_TOOLTIP}).withConfig({componentId:"sc-1900c174-3"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle}),ep=c.ZP.div.withConfig({componentId:"sc-1900c174-4"})(["height:3px;"]),eb=n(15226);let eh=function(){var e=(0,b.$G)().t,t=(0,f.l6)(["open","bid","high","low","tickRulesGroup","decimal","spread","ask"]),n=t.o
1pen,r=t.bid,o=t.high,c=t.low,a=t.tickRulesGroup,s=t.decimal,u=t.spread,d=t.ask,p=(0,K.e)({prevClose:(0,Q.U8)(null!=n?n:0),lastPrice:(0,Q.U8)(null!=r?r:0)}),h=p.percentageDifference,m=p.percentageGained,y=p.priceGained,x=(0,l.useMemo)(function(){return null!=u?u:(null!=d?d:0)-(null!=r?r:0)},[d,r,u]),E=(0,l.useMemo)(function(){return h>=0?"+":""},[h]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ey,{children:[(0,i.jsx)(em,{typography:v.wZ.TEXT_M_REGULAR,children:e("Last Price")}),(0,i.jsx)(ex,{children:(0,i.jsx)(en.g,{typography:v.wZ.TEXT_XL_MEDIUM,withArrow:!0,profitLoss:(0,et.By)(y),children:(0,ee.W)(r,(0,J.os)(r,a,s),!0)})})]}),(0,i.jsxs)(ey,{children:[(0,i.jsxs)(ev,{children:[(0,i.jsx)(em,{typography:v.wZ.TEXT_M_REGULAR,children:e("Chg (%)")}),(0,i.jsx)(eb.Z,{variant:eb.q.BASE,placement:"top",trigger:"mouseenter",content:(0,i.jsx)(eE,{children:e("(Current Price - Previous Close Price) / Previous Close Price x 100%")}),children:(0,i.jsx)(g.ZP,{icon:g.Ro.INFO,size:g.sk.S})})]}),(0,i.jsx)(eg,{}),(0,i.jsxs)(en.g,{typography:v.wZ.TEXT_M_REGULAR,profitLoss:(0,et.By)(m),children:[E,(0,ee.W)(h,2,!1),"%"]})]}),(0,i.jsxs)(ey,{children:[(0,i.jsx)(em,{typography:v.wZ.TEXT_M_REGULAR,children:e("Spread")}),(0,i.jsx)(eg,{}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:(0,ee.W)(x,(0,J.os)(x,a,s),!1)})]}),(0,i.jsxs)(ey,{children:[(0,i.jsx)(em,{typography:v.wZ.TEXT_M_REGULAR,children:e("24hr High")}),(0,i.jsx)(eg,{}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:(0,ee.W)(o,(0,J.os)(o,a,s),!0)})]}),(0,i.jsxs)(ey,{children:[(0,i.jsx)(em,{typography:v.wZ.TEXT_M_REGULAR,children:e("24hr Low")}),(0,i.jsx)(eg,{}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:(0,ee.W)(c,(0,J.os)(c,a,s),!0)})]})]})};var em=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-9f3dd1e4-0"})(["color:",";"],function(e){return e.theme.themeColors.text.muted}),ey=c.ZP.div.withConfig({componentId:"sc-9f3dd1e4-1"})(["display:flex;flex-direction:column;"]),eg=c.ZP.div.withConfig({componentId:"sc-9f3dd1e4-2"})(["height:3px;"]),ex=c.ZP.div.withConfig({componentId:"sc-9f3dd1e4-3"})(["display:flex;"]),ev=c.ZP.div.withConfig({componentId:"sc-9f3dd1e4-4"})(["display:flex;align-items:center;gap:","px;"],y.A.XXXS),eE=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-9f3dd1e4-5"})(["color:",";padding:","px ","px;"],function(e){return e.theme.themeColors.background.default},y.A.XXS,y.A.XS);let ej=(0,l.memo)(function(){var e=(0,f.l6)(["symbol","description"])||{},t=e.symbol,n=e.description,r=(0,f.s9)();return(0,i.jsx)(eC,{children:r?(0,i.jsx)(F.ZP,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eA,{children:[(0,i.jsx)(eO,{dataTestId:I.Of.SYMBOL_OVERVIEW_ID,typography:v.wZ.TEXT_L_MEDIUM,children:t}),(0,i.jsx)(eT,{typography:v.wZ.TEXT_M_REGULAR,children:n})]}),(0,i.jsx)(eh,{})]})})});var eC=c.ZP.div.withConfig({componentId:"sc-9ddaf3cb-0"})(["display:flex;justify-content:center;align-items:flex-start;gap:","px;"],y.A.M),eA=c.ZP.div.withConfig({componentId:"sc-9ddaf3cb-1"})(["display:flex;flex-direction:column;"]),eO=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-9ddaf3cb-2"})([""]),eT=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-9ddaf3cb-3"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle});let eS=function(e){var t=e.selectedTab,n=(0,L.jO)().isHorizon,r=(0,l.useMemo)(function(){if(!n)return(0,i.jsx)(ej,{});switch(t){case a.lp.OPTION:return(0,i.jsx)(ea,{});case a.lp.FUTURES:return(0,i.jsx)(Y,{});default:return(0,i.jsx)(X,{})}},[n,t]);return(0,i.jsx)(i.Fragment,{children:r})};var eP=n(97186),ew=n(88651),eR=n(74370),eI=n(68995),e_=n(61644),eL=n(27094),eZ=n(15959),ek=n(52783);n(26833),n(47941);var eD=n(15961),eM=n(89494),eN=n(36870);n(71934),n(42295),n(36364),n(96752),n(66403);var eU=n(99773),eF=n(84823),eG=n(36333),eX=n(64989);function eB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n(10086);let e$=function(e){var t=(0,eL.Yu)(),n=(0,eL.D$)(),r=(0,l.useMemo)(function(){var r=void 0,o=t,i=!1;return Object.entries(n).forEach(function(t){var n=function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return eB(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eB(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.")}(),l=n[0];Object.values(n[1].alerts).forEach(function(t){t.alertId===e&&(r=t,o=l,i=!0)})}),{formAlertDetails:r,formSymbol:o,isEdit:i}},[t,e,n]),o=r.formAlertDetails,i=r.formSymbol,c=r.isEdit,a=(0,eL.OM)(null!=i?i:"");return{isEdit:c,formAlertDetails:o,formDisabled:(0,eL.D2)(i),formSymbol:i,formSymbolDetail:a}};function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eV(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 eY=eF.Ry().shape({condition:eF.Z_().when(["$conditionLabel"],function(e,t){var n=eH(e,1)[0];return t.required(function(){return(0,eX.pw)({label:n})})}).when(["$conditionLabel"],function(e,t){var n=eH(e,1)[0];return t.oneOf(Object.values(eN.hl),(0,eX.UF)({label:n}))}),target:eF.Z_().when(["condition","$targetPercentageLabel","$targetValueLabel"],function(e,t){var n=eH(e,3),r=n[0],o=n[1],i=n[2];return t.required(function(){return(0,eX.pw)({label:(0,eZ.T1)(r)?o:i})})}).when(["condition","$targetPercentageLabel","$targetValueLabel"],function(e,t){var n=eH(e,3),r=n[0],o=n[1],i=n[2];return t.test("test-valid-target-value",function(){return(0,eX.UF)({label:(0,eZ.T1)(r)?o:i})},function(e){return(0,eX.FY)(e)})}).when(["condition","$symbolDecimalsByIntegration","$symbolPointStep"],function(e,t){var n=eH(e,3),r=n[0],o=n[1],i=n[2],l=(0,eZ.T1)(r),c=l?e_.TB:o,a=l?e_.fB:(0,eZ.e9)(c),s=l?e_.iN:null!=i?i:e_.Gg;return t.test("test-min-value",function(){return(0,eX.Z_)(s.toFixed(c),l)},function(e){return!!(e&&Number(e)>=s)}).test("test-max-value",function(){return(0,eX.qz)(a.toFixed(c),l)},function(e){return!!(e&&Number(e)<=a)})}),frequency:eF.Z_().when(["$frequencyLabel"],function(e,t){var n=eH(e,1)[0];return t.required(function(){return(0,eX.pw)({label:n})})}).when(["$frequencyLabel"],function(e,t){var n=eH(e,1)[0];return t.oneOf(Object.values(eN.rd),(0,eX.UF)({label:n}))})});let eW=function(e){var t,n,r=e.onError,o=e.onRequerySuccess,i=e.onSuccessCallback,c=e.isMobileWeb,a=void 0!==c&&c,s=e.alertId,u=(0,eZ.DK)(e_.FV.TARGET_VALUE_PERCENT).name,d=(0,eZ.DK)(e_.FV.TARGET_VALUE).name,f=(0,eZ.DK)(e_.FV.CONDITION).name,p=(0,eZ.DK)(e_.FV.FREQUENCY).name,b=e$(s),h=b.formAlertDetails,m=b.formSymbol,y=b.formSymbolDetail,g=b.formDisabled,x=b.isEdit,v=(0,l.useMemo)(function(){return(0,eU.X)(eY)},[]),E=(0,l.useMemo)(function(){if(!y)return e_.TB;var e=y.decimal,t=y.pointStep,n=void 0===t?e_.sz:t,r=y.tickRulesGroup;return(0,J.os)(n,r,e)},[y]),j=(0,l.useMemo)(function(){var e;return y&&null!=(e=y.pointStep)?e:e_.sz},[y]),C=(0,eG.w)({resolver:v,mode:"onBlur",shouldFocusError:!1,context:{conditionLabel:f,frequencyLabel:p,symbolDecimalsByIntegration:E,symbolPointStep:j,targetPercentageLabel:u,targetValueLabel:d},defaultValues:{condition:null==h?void 0:h.condition,target:(null==h?void 0:h.targetPrice)?h.targetPrice.toFixed(E):void 0,frequency:null!=(t=null==h?void 0:h.frequencyCondition)?t:eN.rd.ONLY_ONCE}}),A=C.formState,O=C.handleSubmit,T=C.watch,S=null!=(n=A.errors)?n:{},P=S.condition,w=S.target,R=S.frequency;(0,l.useEffect)(function(){if(h){var e;C.reset({condition:h.condition,target:h.targetPrice?h.targetPrice.toFixed(E):void 0,frequency:null!=(e=h.frequencyCondition)?e:eN.rd.ONLY_ONCE})}},[h,E,C]);var I=T("condition"),_=T("target"),L=T("frequency"),k=(0,l.useCallback)(function(e){if(m&&(!x||h)){var t,n,l=e.condition,c=e.frequency,s=e.target;x&&h?Z.Z.updateAlert({newAlert:(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},h),n=n={targetValue:Number(s),frequencyCondition:c,condition:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),formSymbol:m,isMobileWeb:a,onError:r,onRequerySuccess:o,onSuccessCallback:i}):x||Z.Z.createAlert({values:{symbol:m,condition:l,frequencyCondition:c,targetValue:Number(s)},formSymbol:m,isMobileWeb:a,onError:r,onRequerySuccess:o,onSuccessCallback:i})}},[h,x,a,r,o,i,m]);return{formAlertDetails:h,formSymbol:m,formSymbolDetail:y,formDisabled:g,isEdit:x,formMethods:C,onSubmit:(0,l.useCallback)(function(e){O(k)(e)},[O,k]),submitDisabled:(0,l.useMemo)(function(){return!!(!I||P||!_||w||!L||R)},[I,P,_,w,L,R])}};var eq=n(73407),ez=n(56740),eK=n(88996),eQ=(0,l.createContext)(void 0),eJ=function(){var e=(0,l.useContext)(eQ);if(!e)throw Error("usePriceAlertFormContext must be used within a PriceAlertFormProvider");return e},e0=function(e){var t=e.children,n=(0,b.$G)().t,r=(0,eK.Z)().handleShowError,o=(0,eL.uA)(),c=(0,s.EQ)(),a=(0,l.useCallback)(function(){Z.Z.hideAlertForm()},[]),u=eW({onRequerySuccess:(0,l.useCallback)(function(e){c===e&&eR._.syncPriceAlerts()},[c]),onSuccessCallback:a,onError:(0,l.useCallback)(function(e){var t,o=e.code,i=e.message;return o===eq.c4.A_1045||o===eq.c4.A_1046?(ez.Yu.showAlert({message:(0,eq.yi)(o,i),messageType:ez.KK.ERROR}),!0):o===eq.c4.A_1041||o===eq.c4.A_1042?(r(e_.tf.DUPLICATED_PRICE_ALERT),!0):o===eq.c4.A_1043||o===eq.c4.A_1044?(r(e_.tf.PRICE_ALERT_LIMIT_REACHED),!0):null!=(t=e.message)&&!!t.includes(eq.Rm)&&(ez.Yu.showAlert({message:n("Network error."),messageType:ez.KK.ERROR,description:n("Please try again later.")}),!0)},[r,n]),isMobileWeb:!(0,eX.BU)(),alertId:o}),d=u.isEdit,f=u.formSymbol,p=u.formSymbolDetail,h=u.formDisabled,m=u.formMethods,y=u.onSubmit,g=u.submitDisabled;return(0,i.jsx)(eQ.Provider,{value:{isEdit:d,formSymbol:f,formSymbolDetail:p,formDisabled:h,formMethods:m,onSubmit:y,submitDisabled:g},children:t})},e1=c.ZP.div.withConfig({componentId:"sc-9ed824a1-0"})(["display:flex;flex-direction:",";"],function(e){var t=e.$isAllSymbolsTab,n=e.$isRTLDirection;return t&&n?"row-reverse":"row"}),e2=c.ZP.div.withConfig({componentId:"sc-9ed824a1-1"})(["border-bottom:","px solid ",";"],e_.fR,function(e){return e.theme.themeColors.border.subtle}),e3=c.ZP.div.withConfig({componentId:"sc-9ed824a1-2"})(["height:212px;"]),e4=c.ZP.div.withConfig({componentId:"sc-9ed824a1-3"})(["display:flex;padding-inline:","px;padding-block:","px;padding-bottom:","px;"],y.A.M,y.A.XS,y.A.S),e8=ek.N,e9=(0,c.ZP)(e2).withConfig({componentId:"sc-7dffbbcd-0"})(["display:flex;justify-content:space-between;align-items:center;min-height:26px;padding:","px ","px;"],y.A.XS,y.A.L),e6=(0,c.ZP)(m.ZP).withConfig({componentId:"sc-7dffbbcd-1"})(["height:26px;"]);let e7=function(e){var t=e.noOfAlerts,n=e.shouldShowCreate,r=(0,b.$G)().t,o=(0,eK.Z)().handleShowError,c=eJ().formMethods.reset,a=(0,l.useCallback)(function(){if(Z.Z.checkAlertLimitReached())return void o(e_.tf.PRICE_ALERT_LIMIT_REACHED);c({condition:void 0,target:void 0,frequency:eN.rd.ONLY_ONCE}),Z.Z.showAlertForm()},[o,c]);return(0,i.jsxs)(e9,{children:[(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_MEDIUM,children:r("Total Alerts ({{noOfAlerts}})",{noOfAlerts:t})}),n&&(0,i.jsx)(e6,{onClick:a,variant:m.eF.OUTLINED_THEMED,size:"regular",leftSection:(0,i.jsx)(g.ZP,{icon:g.Ro.PLUS}),children:r("Create Alert")})]})};var e5=n(25220),te=(0,c.ZP)(e3).withConfig({componentId:"sc-bf54f7c1-0"})(["padding-top:","px;"],y.A.XXL),tt=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-bf54f7c1-1"})(["margin-top:","px;"],y.A.XS);let tn=function(e){var t=e.isAllSymbolsTab,n=(0,N.VC)().theme;return(0,i.jsx)(te,{children:(0,i.jsx)(e5.Z,{children:(0,i.jsx)(tt,{typography:v.wZ.TEXT_M_REGULAR,color:n.themeColors.text.placeholder,children:(0,eZ.Eo)(t)})})})};var tr=(0,c.ZP)(e3).withConfig({componentId:"sc-43e79dbf-0"})(["align-items:center;display:flex;justify-content:center;"]);let to=function(){return(0,i.jsx)(tr,{children:(0,i.jsx)(F.ZP,{size:F.iO.L})})};var ti=function(e){var t=e.onResetAccordionHeight,n=(0,eL.jE)();(0,l.useEffect)(function(){n&&(t(0),Z.Z.setOnDeleteResetList(!1))},[n,t])},tl=n(86151),tc=n(74307);n(32435),n(48868),n(54861),n(81874),n(66251);let ta=function(e){var t=(0,eL.hQ)(),n=(0,l.useMemo)(function(){return new Set(t)},[t]),r=(0,l.useCallback)(function(e){n.has(e)?Z.Z.deselectAlertIds([e]):Z.Z.selectAlertIds([e])},[n]),o=(0,l.useCallback)(function(e){Z.Z.handlePriceAlertToggle(e)},[]),i=(0,l.useMemo)(function(){return Object.keys(e).every(function(e){return n.has(e)})},[e,n]),c=(0,l.useCallback)(function(){var t=Object.keys(e);0!==t.length&&(i?Z.Z.deselectAlertIds(t):Z.Z.selectAlertIds(t))},[i,e]);return{isSymbolHeaderChecked:i,selectedAlertsSet:n,onAlertCheckboxToggle:r,onPressAlertToggle:o,onSymbolCheckboxToggle:c}},ts=function(e){var t=e.directionColors,n=e.priceAlertsObj;return{priceAlertsFormatted:(0,l.useMemo)(function(){return Object.values(n).map(function(e){var n=e.condition,r=e.decimal,o=e.frequencyCondition,i=e.targetPrice,l=e.tickRulesGroup,c=(0,eZ.gl)(n,t),a=(0,eZ.SO)({condition:n,targetPrice
1:i},{decimal:r,tickRulesGroup:l});return{alert:e,conditionLabel:(0,eZ.jM)(n),directionColor:c,formattedTarget:a,frequencyLabel:(0,eZ.hR)(o)}})},[t,n]),testIDs:{item:I.Of.PRICE_ALERT_MANAGEMENT_ALERT_ITEM,checkbox:I.Of.PRICE_ALERT_MANAGEMENT_ALERT_ITEM_CHECKBOX}}},tu=function(){var e=(0,b.$G)().t,t=(0,l.useRef)(null);return{handleConfirmDelete:(0,l.useCallback)(function(n,r,o){if(0!==n.length){var l=n.length,c=(0,eZ.jr)(l),a=c.description,s=c.title;(0,eP.OQ)({ref:t,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_DELETE_MODAL,title:s,titlePrefix:(0,i.jsx)(g.ZP,{icon:g.Ro.SNACKBAR_ERROR,size:g.sk.L}),children:(0,i.jsx)(G.ZP,{children:a}),okText:e("Confirm"),cancelText:e("Cancel"),onOk:function(e){var i,l=e.onCancel;null==t||null==(i=t.current)||i.openLoading(),Z.Z.deleteAlertIds({alertIds:n,onSuccessCallback:function(){var e;null==l||l(),null==t||null==(e=t.current)||e.closeLoading(),null==r||r()},onErrorCallback:function(){var e;null==t||null==(e=t.current)||e.closeLoading()},onDeleteRequerySuccess:o,isDesktop:!0})}})}},[e])}};var td=n(70629),tf=n(479);let tp=function(e){var t=e.icon,n=e.onClick,r=e.tooltip,o=(0,N.VC)().theme;return(0,i.jsx)(eb.Z,{placement:"top",trigger:"mouseenter",content:(0,i.jsx)(e4,{children:(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,color:o.themeColors.white,children:r})}),children:(0,i.jsx)(m.ZP,{variant:m.eF.ICON_ONLY,icon:t,onClick:n})})};var tb=function(e){switch(e){case eN.hl.BELOW:case eN.hl.CROSS_BELOW:case eN.hl.NEGATIVE_DAILY_CHANGE_REACHES:return g.Ro.LINE_ARROW_DOWN;case eN.hl.ABOVE:case eN.hl.CROSS_ABOVE:case eN.hl.POSITIVE_DAILY_CHANGE_REACHES:default:return g.Ro.LINE_ARROW_UP}};function th(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tm=(0,c.ZP)(e2).withConfig({componentId:"sc-fbeb61a1-0"})(["display:flex;flex-direction:",";gap:","px;justify-content:",";max-height:","px;padding:","px ","px;&:hover{background-color:",";}&:active{background-color:",";}"],function(e){var t=e.$isAllSymbolsTab,n=e.$isRTLDirection;return t&&n?"row-reverse":"row"},y.A.S,function(e){return e.$showBulkEdit?"flex-start":"space-between"},e_.l1,y.A.REGULAR,y.A.L,function(e){return e.theme.themeColors.background.subtle},function(e){return e.theme.themeColors.background.active}),ty=(0,c.ZP)(e1).withConfig({componentId:"sc-fbeb61a1-1"})(["align-items:center;justify-content:flex-end;gap:","px;"],y.A.REGULAR),tg=(0,c.ZP)(e1).withConfig({componentId:"sc-fbeb61a1-2"})(["align-items:center;gap:","px;"],y.A.XS),tx=c.ZP.div.withConfig({componentId:"sc-fbeb61a1-3"})(["display:flex;flex-direction:column;gap:","px;"],y.A.XXS),tv=c.ZP.div.withConfig({componentId:"sc-fbeb61a1-4"})(["display:flex;flex-direction:row;"]),tE=c.ZP.div.withConfig({componentId:"sc-fbeb61a1-5"})(["display:flex;align-items:center;"]);let tj=(0,l.memo)(function(e){var t,n=e.handleClickDelete,r=e.handleClickToggle,o=e.handlePressItem,c=e.onAlertCheckboxToggle,a=e.isSelected,s=e.priceAlertFormatted,u=e.symbolDisabled,d=e.testIDs,f=(0,N.VC)().theme,p=(0,eL.vo)(),h=(0,tf.dZ)(),m=(0,eL.V8)(),y=(0,b.$G)().t,x=s.alert,E=s.conditionLabel,j=s.directionColor,C=s.formattedTarget,A=s.frequencyLabel,O=x.alertId,T=x.condition,S=x.toggle,P=tb(T),w=p===e_.Ef.ALL_SYMBOLS,R=(t=(0,l.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return th(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return th(e,t)}}(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.")}()),_=R[0],L=R[1],Z=(0,l.useCallback)(function(){return L(!0)},[]),k=(0,l.useCallback)(function(){return L(!1)},[]),D=(0,l.useCallback)(function(){m&&c(O)},[O,c,m]),M=(0,l.useCallback)(function(){o(O)}
1,[O,o]),U=(0,l.useCallback)(function(e){r(x,e)},[x,r]),F=(0,l.useCallback)(function(){n(O)},[O,n]);return(0,i.jsxs)(tm,{"data-testid":d.item,$isAllSymbolsTab:w,$isRTLDirection:h,$showBulkEdit:m,onMouseEnter:Z,onMouseLeave:k,onClick:D,children:[m&&(0,i.jsx)(tE,{children:(0,i.jsx)(tc.Z,{checked:a,dataTestId:d.checkbox})}),(0,i.jsxs)(tg,{$isAllSymbolsTab:w,$isRTLDirection:h,children:[(0,i.jsx)(g.ZP,{size:g.sk.L,color:j,icon:P}),(0,i.jsxs)(tx,{dir:w&&h?"rtl":void 0,children:[(0,i.jsxs)(tv,{children:[(0,i.jsxs)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:[E,"\xa0"]}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_MEDIUM,children:C})]}),(0,i.jsx)(G.ZP,{color:f.themeColors.text.subtle,typography:v.wZ.TEXT_M_REGULAR,children:A})]})]}),(0,i.jsx)(ty,{$isAllSymbolsTab:w,$isRTLDirection:h,children:!m&&(0,i.jsxs)(i.Fragment,{children:[_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tp,{icon:g.Ro.EDIT,onClick:M,tooltip:y("Edit")}),(0,i.jsx)(tp,{icon:g.Ro.DELETE,onClick:F,tooltip:y("Delete")})]}),(0,i.jsx)(td.Z,{checked:S,onClick:U,dataTestId:S?I.Of.PRICE_ALERT_MANAGEMENT_ALERT_ITEM_TOGGLE_ON:I.Of.PRICE_ALERT_MANAGEMENT_ALERT_ITEM_TOGGLE_OFF,disabled:u})]})})]})}),tC=function(e){var t=e.onDeleteSuccess,n=e.onDeleteRequerySuccess,r=e.symbolDisabled,o=e.symbolPriceAlerts,c=(0,N.VC)().theme,a=o.alerts,u=(0,s.EQ)(),d=(0,eL.V8)(),f=tu().handleConfirmDelete,p=ta(a),b=p.selectedAlertsSet,h=p.onAlertCheckboxToggle,m=p.onPressAlertToggle,y=ts({directionColors:(0,l.useMemo)(function(){return{positive:c.themeColors.pnl.positive.default,negative:c.themeColors.pnl.negative.default}},[c]),priceAlertsObj:a}),g=y.priceAlertsFormatted,x=y.testIDs,v=(0,l.useCallback)(function(e){Z.Z.handleEditAlert(e,function(){Z.Z.showAlertForm()})},[]),E=(0,l.useCallback)(function(e){u===e.symbol&&eR._.syncTogglePriceAlerts(e)},[u]),j=(0,l.useCallback)(function(e,t){t.stopPropagation(),m({priceAlert:e,onSuccess:E,isDesktop:!0})},[m,E]),C=(0,l.useCallback)(function(e){d?h(e):v(e)},[d,h,v]),A=(0,l.useCallback)(function(e){f([e],t,n)},[f,t,n]);return(0,i.jsx)(i.Fragment,{children:g.map(function(e){return(0,i.jsx)(tj,{isSelected:b.has(e.alert.alertId),priceAlertFormatted:e,symbolDisabled:r,testIDs:x,handleClickDelete:A,handleClickToggle:j,handlePressItem:C,onAlertCheckboxToggle:h},e.alert.alertId)})})};var tA=n(63450);let tO=function(e){(0,l.useEffect)(function(){return Z.Z.subscribeSymbolTopic(e),function(){Z.Z.isSymbolSubscribed(e)&&Z.Z.unsubscribeSymbolTopic(e)}},[e])};var tT=n(94290),tS=n(58016),tP=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-b12cc8b1-0"})(["text-align:",";"],function(e){var t=e.$isAllSymbolsTab,n=e.$isRTLDirection;return t&&n?"start":"end"});let tw=function(e){var t,n,r,o,c,a,s,u,d,f,p,b,h,m,y,g,x,E,j,C=e.isAllSymbolsTab,A=e.symbolDetail,O=null!=A?A:{},T=O.decimal,S=O.symbol,P=O.tickRulesGroup,w=(0,N.VC)().theme,R=(0,eL.mZ)(S),I=(0,tf.dZ)(),_=null!=R?R:{},Z=_.bid,k=_.open,D=_.prevClose,M=(n=(t={decimal:null!=T?T:0,priceInfo:{bid:null!=Z?Z:0,open:null!=k?k:0,prevClose:null!=D?D:0,tickRulesGroup:null!=P?P:[]},changeColors:{positive:w.themeColors.pnl.positive.default,negative:w.themeColors.pnl.negative.default}}).decimal,r=t.changeColors,o=t.priceInfo,c=t.currentPriceFallback,a=t.decimalFallback,s=t.isCopyTradeOrder,u=o.bid,d=o.open,f=o.prevClose,p=o.tickRulesGroup,b=(0,L.$X)(),h=(0,L.jO)().isHorizon?f:d,y=(m=(0,K.e)({prevClose:(0,Q.U8)(null!=h?h:0),lastPrice:(0,Q.U8)(null!=u?u:0)})).percentageDifference,g=m.percentageGained,x=(0,tS.b)(null!=u?u:c,p,null!=n?n:a,b),E=(0,l.useMemo)(function(){if(!s||(0,eX.BI)(u))return g?r.positive:r.negative},[u,r.negative,r.positive,s,g]),j=(0,l.useMemo)(function(){var e=(0,tS.w)(y);return"".concat(g?"+":"").concat(e)},[y,g]),{changeColor:E,formattedPrice:x,percentageGained:g,percentageStr:j}),U=M.changeColor,F=M.formattedPrice,G=M.percentageStr,X=C&&I?"".concat(G.substring(1)).concat(G.substring(0,1)):G;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tP,{$isAllSymbolsTab:C,$isRTLDirection:I,typography:v.wZ.TEXT_L_MEDIUM,children:F}),(0,i.jsx)(tP,{$isAllSymbolsTab:C,$isRTLDirection:I,typography:v.wZ.TEXT_M_REGULAR,color:U,children:X})]})};var tR=(0,c.ZP)(e1).withConfig({componentId:"sc-da13f7b2-0"})(["align-items:center;gap:","px;"],y.A.XXS),tI=(0,c.ZP)(m.ZP).withConfig({componentId:"sc-da13f7b2-1"})(["align-self:center;
1"]),t_=(0,c.ZP)(e1).withConfig({componentId:"sc-da13f7b2-2"})([""," justify-content:space-between;min-height:38px;"],function(e){return e.$isAllSymbolsTab?"flex: 1;":""}),tL=c.ZP.div.withConfig({componentId:"sc-da13f7b2-3"})(["display:flex;flex-direction:column;gap:","px;"],y.A.XXXS),tZ=c.ZP.div.withConfig({componentId:"sc-da13f7b2-4"})(["display:flex;flex-direction:row;gap:","px;",""],y.A.XXS,function(e){var t=e.$isAllSymbolsTab,n=e.$isRTLDirection;return t&&n?"justify-content: flex-end;":""}),tk=c.ZP.div.withConfig({componentId:"sc-da13f7b2-5"})(["gap:","px;"],y.A.XXXS),tD=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-da13f7b2-6"})(["white-space:nowrap;text-overflow:ellipsis;"]);let tM=function(e){var t=e.isAllSymbolsTab,n=e.symbol,r=e.symbolDetail,o=e.symbolDisabled,c=null!=r?r:{},a=c.description,s=c.type,u=(0,eK.Z)().handleShowError,d=(0,tf.dZ)();tO(n);var f=(0,l.useCallback)(function(e){e.stopPropagation(),u(e_.tf.SYMBOL_TEMPORARILY_DISABLED)},[u]);return(0,i.jsxs)(t_,{$isAllSymbolsTab:t,$isRTLDirection:d,"data-testid":"".concat(I.Of.PRICE_ALERT_MANAGEMENT_SYMBOL_HEADER,"-").concat(n),children:[(0,i.jsxs)(tL,{children:[(0,i.jsxs)(tR,{$isAllSymbolsTab:t,$isRTLDirection:d,children:[o&&(0,i.jsx)(tI,{variant:m.eF.ICON_ONLY,icon:g.Ro.SNACKBAR_ALERT,iconSize:g.sk.M,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_SYMBOL_DISABLED_ICON,onClick:f}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_L_REGULAR,children:n})]}),(0,i.jsxs)(tZ,{$isAllSymbolsTab:t,$isRTLDirection:d,children:[s&&(0,i.jsx)(tA.ZP,{size:"xsmall",variant:tA.L9.LIGHT,children:(0,tT.Ot)(s)}),(0,i.jsx)(tD,{typography:v.wZ.TEXT_M_REGULAR,children:a})]})]}),(0,i.jsx)(tk,{children:(0,i.jsx)(tw,{isAllSymbolsTab:t,symbolDetail:r})})]})};var tN=(0,c.ZP)(e2).withConfig({componentId:"sc-b14e63e5-0"})(["display:flex;justify-content:space-between;align-items:center;gap:","px;padding:","px ","px;width:100%;"],y.A.REGULAR,y.A.REGULAR,y.A.L),tU=(0,c.ZP)(g.ZP).withConfig({componentId:"sc-b14e63e5-1"})(["transform:",";transition:transform 0.15s ease;"],function(e){return e.$expanded?"rotate(180deg)":"rotate(0deg)"});let tF=function(e){var t=e.itemIndex,n=e.onResetAccordionHeight,r=e.priceAlerts,o=r.alerts,c=r.symbol,a=(0,eL.OM)(c),u=(0,eL.D2)(c),d=(0,eL.ex)(c),f=(0,s.EQ)(),p=(0,eL.V8)(),b=ta(o),h=b.isSymbolHeaderChecked,m=b.onSymbolCheckboxToggle,y=(0,l.useCallback)(function(e){null==e||e.stopPropagation(),m()},[m]),x=(0,l.useCallback)(function(e){Z.Z.setExpandedForSymbol(c,e),n(t)},[n,t,c]),v=(0,l.useCallback)(function(){n(t)},[t,n]),E=(0,l.useCallback)(function(e){f===c&&eR._.removeSyncPriceAlerts(e)},[f,c]);return(0,i.jsx)(tl.Z,{variant:tl.y.BASE,selector:function(e){var t=e.expanded;return(0,i.jsxs)(tN,{children:[p&&(0,i.jsx)(tc.Z,{checked:h,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_SYMBOL_HEADER_CHECKBOX,onClick:y}),a&&(0,i.jsx)(tM,{isAllSymbolsTab:!0,symbol:c,symbolDetail:a,symbolDisabled:u}),(0,i.jsx)(tU,{icon:g.Ro.CHEVRON_DOWN,$expanded:t})]})},withArrow:!1,dataTestId:"".concat(I.Of.PRICE_ALERT_MANAGEMENT_ACCORDION,"-").concat(c),onSwitchExpandVisibility:x,defaultExpanded:d,children:(0,i.jsx)(tC,{onDeleteSuccess:v,onDeleteRequerySuccess:E,symbolDisabled:u,symbolPriceAlerts:r})})};var tG=e8-43-35,tX=c.ZP.div.withConfig({componentId:"sc-120d21ff-0"})(["max-height:","px;min-height:","px;"],function(e){return e.$containerHeight},function(e){return e.$containerHeight}),tB=c.ZP.div.withConfig({componentId:"sc-120d21ff-1"})(["overflow:hidden;"]);let t$=function(){var e=(0,eL.D$)(),t=(0,eL.Qi)(),n=(0,eL.cY)(),r=(0,l.useRef)(null),o=(0,l.useMemo)(function(){var t=Object.values(e),r=0,o=[],i=t.reduce(function(e,t){var i=t.alerts,l=63+(n[t.symbol]?Object.keys(i).length:0)*61;return r+=l,o.push(l),e+Object.keys(i).length},0);return{containerHeight:Math.min(r,tG),noOfAlerts:i,priceAlertsArr:t,symbolAlertsHeightArr:o}},[n,e]),c=o.containerHeight,a=o.noOfAlerts,s=o.priceAlertsArr,u=o.symbolAlertsHeightArr,d=(0,l.useCallback)(function(e){var t;return null!=(t=u[e])?t:0},[u]),f=(0,l.useCallback)(function(e){r.current&&r.current.resetAfterIndex(e)},[]);ti({onResetAccordionHeight:f});var p=(0,l.useCallback)(function(e){var t=e.data,n=e.index,r=e.style,o=t[n];return o?(0,i.jsx)(tB,{style:r,children:(0,i.jsx)(tF,{priceAlerts:o,itemIndex:n,onResetAccordionHeight:f})},o.symbol):null},[f]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e7,{noOfAlerts:a}),t?(0,i.jsx)(to,{}):(0,i.jsx)(i.Fragment,{children:s.length>0?(0,i.jsx)(tX,{$containerHeight:c,children:(0,i.jsx)(eD.ZP,{children:function(e){var t=e.height,n=e.width;return(0,i.jsx)(eM.S_,{ref:r,width:n,height:t,itemData:s,itemSize:d,itemCount:s.length,children:p})}})}):(0,i.jsx)(tn,{isAllSymbolsTab:!0})})]})};var tV=c.ZP.div.withConfig({componentId:"sc-ba554d2f-0"})(["max-height:","px;overflow:auto;"],e8-35-63-43),tH=(0,c.ZP)(e2).withConfig({componentId:"sc-ba554d2f-1"})(["padding:","px ","px;"],y.A.REGULAR,y.A.L);let tY=function(){var e=(0,eL.Yu)(),t=(0,eL.sv)(),n=(0,eL.Qi)(),r=(0,eL.ke)(),o=(0,eL.OM)(null!=e?e:""),c=(0,eL.V8)(),a=(null==t?void 0:t.alerts)?Object.values(t.alerts).length:0,s=(0,l.useCallback)(function(e){eR._.removeSyncPriceAlerts(e)},[]);return e?(0,i.jsxs)("div",{children:[o&&(0,i.jsx)(tH,{children:(0,i.jsx)(tM,{symbol:e,symbolDetail:o,symbolDisabled:r})}),(0,i.jsx)(e7,{noOfAlerts:a,shouldShowCreate:!c}),n?(0,i.jsx)(to,{}):(0,i.jsx)(i.Fragment,{children:t?(0,i.jsx)(tV,{children:(0,i.jsx)(tC,{onDeleteRequerySuccess:s,symbolDisabled:r,symbolPriceAlerts:t})}):(0,i.jsx)(tn,{})})]}):(0,i.jsx)(tn,{})};var tW=((r={}).ERROR="ERROR",r.WARNING="WARNING",r.SUCCESS="SUCCESS",r.DEFAULT="DEFAULT",r.THEMED="THEMED",r),tq=n(31378);let tz=function(e){var t=e.color,n=e.dataTestId,r=e.backgroundColor,o=e.icon,l=e.iconSize,c=void 0===l?g.sk.M:l,a=e.iconColor,s=e.children,u=e.paddingSize,d=e.title,f=e.buttonLabel,p=e.buttonTestID,b=e.buttonVariant,h=void 0===b?m.eF.OUTLINED:b,x=e.onPressCTA;return(0,i.jsxs)(tK,{$backgroundColor:r,$color:t,$paddingSize:(void 0===u?"medium":u)==="medium"?y.A.M:y.A.REGULAR,"data-testid":n,children:[o&&(0,i.jsx)(g.ZP,{icon:o,size:c,color:a}),(0,i.jsxs)(tJ,{children:[d&&(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_SEMIBOLD,children:d}),"string"==typeof s?(0,i.jsx)(tQ,{typography:v.wZ.TEXT_M_REGULAR,children:s}):(0,i.jsx)(i.Fragment,{children:s}),x&&f&&(0,i.jsx)("div",{children:(0,i.jsx)(t0,{size:"small",variant:h,onClick:x,dataTestId:null!=p?p:"",children:f})})]})]})};var tK=c.ZP.div.withConfig({componentId:"sc-c6d0c11a-0"})(["border-radius:","px;display:flex;flex-direction:row;gap:","px;padding:","px;"," ",""],y.A.XS,y.A.S,function(e){return e.$paddingSize},function(e){var t=e.$backgroundColor;return t?"background-color: ".concat(t,";"):""},function(e){var t=e.$color;return t?"color: ".concat(t,";"):""}),tQ=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-c6d0c11a-1"})(["display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;"]),tJ=c.ZP.div.withConfig({componentId:"sc-c6d0c11a-2"})(["display:flex;flex-direction:column;flex:1;gap:","px;max-width:100%;padding-right:","px;"],y.A.XXXS,y.A.XXXS),t0=(0,c.ZP)(m.ZP).withConfig({componentId:"sc-c6d0c11a-3"})(["margin-top:","px;"],y.A.XXS);let t1=function(e){var t,n,r=(0,tq.eP)().theme;return(0,i.jsx)(tz,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={backgroundColor:r.themeColors.tag.others.background,color:r.themeColors.text.default,icon:g.Ro.SNACKBAR_INFORMATION},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},t2=function(e){var t,n,r=(0,tq.eP)().theme;return(0,i.jsx)(tz,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={backgroundColor:r.themeColors.tag.error.background,color:r.themeColors.text.default,icon:g.Ro.SNACKBAR_ERROR},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},t3=function(e){var t,n,r=(0,tq.eP)().theme;return(0,i.jsx)(tz,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={backgroundColor:r.themeColors.tag.success.background,color:r.themeColors.text.default,icon:g.Ro.SNACKBAR_SUCCESS},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};var t4=n(11153);let t8=function(e){var t,n,r=(0,tq.eP)().theme,o=r.themeColors.primary,l=(0,t4.m4)(o,.08);return(0,i.jsx)(tz,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={backgroundColor:l,color:r.themeColors.text.default,icon:g.Ro.SNACKBAR_INFORMATION,iconColor:o,buttonVariant:m.eF.FILLED_THEMED},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},t9=function(e){var t,n,r=(0,tq.eP)().theme;return(0,i.jsx)(tz,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={backgroundColor:r.themeColors.tag.warning.background,color:r.themeColors.text.default,icon:g.Ro.SNACKBAR_ALERT},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};function t6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function t7(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var t5=function(e){switch(e.variant){case tW.ERROR:return(0,i.jsx)(t2,t7(t6({},e),{variant:tW.ERROR}));case tW.SUCCESS:return(0,i.jsx)(t3,t7(t6({},e),{variant:tW.SUCCESS}));case tW.WARNING:return(0,i.jsx)(t9,t7(t6({},e),{variant:tW.WARNING}));case tW.THEMED:return(0,i.jsx)(t8,t7(t6({},e),{variant:tW.THEMED}));case tW.DEFAULT:default:return(0,i.jsx)(t1,t7(t6({},e),{variant:tW.DEFAULT}))}},ne=(0,x.Y)(t5);function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}t5.displayName="UIPageAlert";let nn=function(e){var t,n=e.formDisabled,r=e.formMethods,o=e.formSymbolDetail,i=r.formState,c=r.setValue,a=r.trigger,s=r.watch,u=(t=(0,l.useState)(void 0),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nt(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nt(e,t)}}(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.")}()),d=u[0],f=u[1],p=s("target"),b=s("condition"),h=(0,eZ.T1)(b),m=h?e_.iN:e_.Gg,y=(0,l.useCallback)(function(e){c("condition",e),c("target","");var t=i.touchedFields.target,n=i.dirtyFields.target;(t||n)&&a("target")},[c,a,i.touchedFields,i.dirtyFields]),g=(0,l.useCallback)(function(e){c("frequency",e)},[c]),x=(0,l.useCallback)(function(e){c("target",e,{shouldValidate:!0,shouldDirty:!0}),f(void 0)},[c]),v=(0,l.useMemo)(function(){var e=null!=o?o:{},t=e.decimal,n=e.pointStep,r=e.tickRulesGroup;return(0,eZ.oo)({decimal:t,isPercentCondition:h,pointStep:n,tickRulesGroup:r})},[h,o]),E=v.decimalsByIntegration,j=v.pointStep,C=h?e_.fB:(0,eZ.e9)(E),A=(0,l.useCallback)(function(e){if(!o){c("target",Number(0).toFixed(E),{shouldValidate:!0,shouldDirty:!0}),f(void 0);return}var t=(""!==e&&void 0!==e?(0,Q.Gt)(Number(e)):0)+j;c("target",Math.min(t,C).toFixed(E),{shouldValidate:!0,shouldDirty:!0}),t>C?f((0,eX.qz)(C.toFixed(E),h)):f(void 0)},[E,o,h,C,j,c]),O=(0,l.useCallback)(function(e){if(!o)return void c("target",Number(0).toFixed(E),{shouldValidate:!0,shouldDirty:!0});c("target",Math.max((""!==e&&void 0!==e?(0,Q.Gt)(Number(e)):0)-j,m).toFixed(E),{shouldValidate:!0,shouldDirty:!0}),f(void 0)},[E,o,m,j,c]),T=!!(n||!b);return{handleConditionChange:y,handleFrequencyChange:g,handleTargetValueChange:x,handleClickAdd:A,handleClickMinus:O,handleOnBlur:(0,l.useCallback)(function(){if(!T){if(""===p||void 0===p)return void c("target",m.toFixed(E),{shouldValidate:!0,shouldDirty:!0});c("target",Math.min(Math.max(m,Number(p)),C).toFixed(E),{shouldValidate:!0,shouldDirty:!0})}},[E,T,C,m,c,p]),clearAddBtnError:(0,l.useCallback)(function(){return f(void 0)},[]),addBtnError:d,isTargetValueDisabled:T}};n(68309);var nr=n(82647),no=n(18354),ni=n(67492);let nl=function(e){var t=(0,b.$G)().t;return(0,l.useMemo)(function(){return e_.qu.map(function(n){var r="".concat(I.Of.PRICE_ALERT_MANAGEMENT_CONDITION_OPT,"-").concat(n);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,eZ.jM)(n,t),value:n},e?{testID:r}:{dataTestId:r})})},[e,t])},nc=function(e){var t=e.handleConditionChange,n=eJ(),r=n.formDisabled,o=n.formMethods,l=o.formState,c=o.watch,a=(0,eZ.DK)(e_.FV.CONDITION),s=a.name,u=a.placeholder,d=nl(),f=c("condition"),p=l.errors.condition;return(0,i.jsx)(no.ZP,{variant:no.vI.ITEM_WITH_FIELD_LABEL,label:s,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_CONDITION_FORM_ITEM,children:(0,i.jsx)(ni.Z,{disabled:r,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_CONDITION_SELECT_PICKER,options:d,onSelect:t,error:null==p?void 0:p.message,selectedValue:f,placeholder:u,dropdownPlacement:nr.s1.TOP_START})})},na=function(e){var t=(0,b.$G)().t;return(0,l.useMemo)(function(){return e_.mz.map(function(n){var r="".concat(I.Of.PRICE_ALERT_MANAGEMENT_FREQUENCY_OPT,"-").concat(n);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,eZ.hR)(n,t),value:n},e?{testID:r}:{dataTestId:r})})},[e,t])},ns=function(e){var t=e.handleFrequencyChange,n=eJ(),r=n.formDisabled,o=n.formMethods,l=o.formState,c=o.watch,a=(0,eZ.DK)(e_.FV.FREQUENCY),s=a.name,u=a.placeholder,d=na(),f=c("frequency"),p=l.errors.frequency;return(0,i.jsx)(no.ZP,{variant:no.vI.ITEM_WITH_FIELD_LABEL,label:s,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_FREQUENCY_FORM_ITEM,children:(0,i.jsx)(ni.Z,{dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_FREQUENCY_SELECT_PICKER,options:d,onSelect:t,error:null==p?void 0:p.message,selectedValue:f,placeholder:u,disabled:r,dropdownPlacement:nr.s1.TOP_START})})};var nu=n(18909);let nd=function(e){var t=e.addBtnError,n=e.clearAddBtnError,r=e.formDisabled,o=e.handleTargetValueChange,c=e.handleClickAdd,a=e.handleClickMinus,s=e.handleOnBlur,u=eJ().formMethods,d=u.formState,f=u.watch,p=f("target"),b=f("condition"),h=(0,eZ.T1)(b),m=(0,eZ.DK)(e_.FV.TARGET_VALUE),y=m.name,g=m.placeholder,x=(0,eZ.DK)(e_.FV.TARGET_VALUE_PERCENT),v=x.name,E=x.placeholder,j=(0,eZ.yG)(),C=d.errors.target,A=(0,l.useCallback)(function(e){var t;s(),(null==(t=e.relatedTarget)?void 0:t.getAttribute("data-testid"))!==(0,eZ.K0)()&&n()},[n,s]);return(0,i.jsx)(no.ZP,{variant:no.vI.ITEM_WITH_FIELD_LABEL_INFO,label:h?v:y,tooltipContentSections:h?void 0:[{paragraphs:[j]}],tooltipTrigger:"mouseenter",dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_TARGET_VALUE_FORM_ITEM,children:(0,i.jsx)(nu.ZP,{variant:nu.Bv.BORDERED_NUMERIC,onChangeText:o,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_TARGET_VALUE_INPUT,value:p,error:(null==C?void 0:C.message)||t,placeholder:h?E:g,onClickPlus:c,onClickSubtract:a,addButtonDataTestId:(0,eZ.K0)(),subtractButtonDataTestId:(0,eZ.YQ)(),onBlur:A,disabled:r})})};var nf=(0,c.ZP)(e2).withConfig({componentId:"sc-3698b09-0"})(["display:flex;flex-direction:column;gap:","px;padding:","px ","px;"],y.A.S,y.A.M,y.A.L),np=c.ZP.div.withConfig({componentId:"sc-3698b09-1"})(["display:grid;grid-template-columns:repeat(2,1fr);column-gap:","px;row-gap:","px;padding:","px ","px ","px;"],y.A.XXS,y.A.M,y.A.L,y.A.L,y.A.XXL),nb=c.ZP.div.withConfig({componentId:"sc-3698b09-2"})(["grid-column:span 2;"]);let nh=function(){var e=eJ(),t=e.formDisabled,n=e.formMethods,r=e.formSymbol,o=e.formSymbolDetail,l=nn({formDisabled:t,formMethods:n,formSymbolDetail:o}),c=l.handleConditionChange,a=l.handleFrequencyChange,s=l.handleTargetValueChange,u=l.handleClickAdd,d=l.handleClickMinus,f=l.handleOnBlur,p=l.addBtnError,b=l.clearAddBtnError,h=l.isTargetValueDisabled,m=(0,eL.mZ)(null!=r?r:"");return(0,i.jsxs)("div",{children:[o&&r&&m&&(0,i.jsxs)(nf,{children:[(0,i.jsx)(tM,{symbolDetail:o,symbol:r}),t&&(0,i.jsx)(ne,{variant:tW.WARNING,paddingSize:"regular",dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_SYMBOL_DISABLED_ALERT,children:(0,eZ.cn)()})]}),(0,i.jsxs)(np,{children:[(0,i.jsx)(nb,{children:(0,i.jsx)(nc,{handleConditionChange:c})}),(0,i.jsx)("div",{children:(0,i.jsx)(nd,{addBtnError:p,clearAddBtnError:b,formDisabled:h,handleClickAdd:u,handleClickMinus:d,handleOnBlur:f,handleTargetValueChange:s})}),(0,i.jsx)("div",{children:(0,i.jsx)(ns,{handleFrequencyChange:a})})]})]})};var nm=c.ZP.div.withConfig({componentId:"sc-d6a5f8bc-0"})(["display:flex;flex-direction:column;width:","px;max-height:","px;background:",";"],ek.N,e8,function(e){return e.theme.themeColors.background.default});let ny=function(){var e=(0,eL.vo)(),t=(0,eL.On)(),n=(0,b.$G)().t.language,r=(0,l.useMemo)(function(){return(0,eZ.Yx)()},[n]);
1return(0,i.jsx)(nm,{children:t?(0,i.jsx)(nh,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eI.Z,{variant:eI.N.UNDERLINED,tabList:r,selectedValue:e,onClick:function(e){Z.Z.handleChangeTab(e)},stretch:!0}),e===e_.Ef.CURRENT_SYMBOL&&(0,i.jsx)(tY,{}),e===e_.Ef.ALL_SYMBOLS&&(0,i.jsx)(t$,{})]})})};var ng=c.ZP.div.withConfig({componentId:"sc-ab0cd91f-0"})(["display:flex;justify-content:space-between;align-items:center;padding:","px ","px;gap:","px;"],y.A.M,y.A.L,y.A.M),nx=c.ZP.div.withConfig({componentId:"sc-ab0cd91f-1"})(["display:flex;align-items:center;gap:","px;"],y.A.REGULAR),nv=(0,c.ZP)(ng).withConfig({componentId:"sc-4feb33cc-0"})(["align-items:center;display:flex;justify-content:flex-end;"]);let nE=function(){var e=(0,b.$G)().t,t=eJ(),n=t.isEdit,r=t.formDisabled,o=t.formSymbolDetail,c=t.submitDisabled,a=t.onSubmit,s=(0,eL.qn)(),u=(0,l.useCallback)(function(){Z.Z.hideAlertForm()},[]),d=(0,l.useCallback)(function(){a()},[a]);return(0,i.jsxs)(nv,{children:[(0,i.jsx)(m.ZP,{variant:m.eF.OUTLINED_THEMED,onClick:u,children:e("Cancel")}),!r&&(0,i.jsx)(m.ZP,{variant:m.eF.FILLED_THEMED,onClick:d,dataTestId:n?I.Of.PRICE_ALERT_MANAGEMENT_UPDATE_ALERT_SUBMIT_BUTTON:I.Of.PRICE_ALERT_MANAGEMENT_CREATE_ALERT_SUBMIT_BUTTON,disabled:!o||c,loading:s,children:e(n?"Update":"Create")})]})};n(70189),n(66992),n(33948),n(78783),n(29944);let nj=function(){var e=(0,eL.vo)(),t=(0,eL.Yu)(),n=(0,eL.D$)(),r=(0,eL.hQ)(),o=(0,l.useMemo)(function(){var r=new Set([]),o=new Set([]);return Object.values(n).forEach(function(e){var n=e.alerts,i=e.symbol;Object.keys(n).forEach(function(e){i===t&&r.add(e),o.add(e)})}),Array.from(e===e_.Ef.CURRENT_SYMBOL?r:o)},[t,e,n]),i=(0,l.useMemo)(function(){return{isAllCheckboxesSelected:o.length>0&&r.length===o.length,isAllSelectedDisabled:0===o.length}},[o,r]),c=i.isAllCheckboxesSelected,a=i.isAllSelectedDisabled,s=(0,l.useCallback)(function(){r.length<o.length?Z.Z.selectAllAlertIds(o):Z.Z.deselectAllAlertIds()},[o,r]);return{effectiveAlertIds:o,isAllCheckboxesSelected:c,isAllSelectedDisabled:a,handleToggleSelectAll:s}},nC=function(){var e=(0,eL.Yu)(),t=(0,eL.D$)(),n=(0,eL.V8)(),r=(0,eL.vo)(),o=(0,l.useCallback)(function(){Z.Z.setShowBulkEdit(!0)},[]),i=(0,l.useCallback)(function(){Z.Z.setShowBulkEdit(!1),Z.Z.deselectAllAlertIds()},[]);return{showBulkEdit:n,shouldShowBulkEditMode:(0,l.useMemo)(function(){if(r===e_.Ef.CURRENT_SYMBOL){var n,o;return Object.keys(null!=(o=null==(n=t[null!=e?e:""])?void 0:n.alerts)?o:{}).length>0}return r===e_.Ef.ALL_SYMBOLS&&Object.keys(t).length>0},[r,t,e]),handleHideBulkEdit:i,handleShowBulkEdit:o}};var nA=c.ZP.div.withConfig({componentId:"sc-ce0649f5-0"})(["display:flex;align-items:center;gap:","px;"],y.A.XS);let nO=function(){var e=(0,b.$G)().t,t=nj(),n=t.isAllCheckboxesSelected,r=t.isAllSelectedDisabled,o=t.handleToggleSelectAll,c=nC().handleHideBulkEdit,a=tu().handleConfirmDelete,u=(0,eL.hQ)(),d=(0,s.EQ)(),f=(0,eL.sL)(null!=d?d:""),p=u.length>0,h=(0,eZ.Xo)(u),y=(0,l.useCallback)(function(){Z.Z.setOnDeleteResetList(!0)},[]),g=(0,l.useCallback)(function(e){var t,n=new Set(Object.keys(null!=(t=null==f?void 0:f.alerts)?t:[]));e.some(function(e){return n.has(e)})&&eR._.removeSyncPriceAlerts(e)},[f]),x=(0,l.useCallback)(function(){0!==u.length&&a(u,y,g)},[a,u,g,y]);return(0,i.jsxs)(ng,{children:[(0,i.jsxs)(nA,{onClick:o,"data-testid":I.Of.PRICE_ALERT_MANAGEMENT_FOOTER_SELECT_ALL,children:[(0,i.jsx)(tc.Z,{checked:n,disabled:r}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:e("Select All")})]}),(0,i.jsxs)(nx,{children:[(0,i.jsx)(m.ZP,{variant:m.eF.OUTLINED_THEMED,onClick:c,children:e("Cancel")}),(0,i.jsx)(m.ZP,{variant:m.eF.FILLED_THEMED,dataTestId:I.Of.PRICE_ALERT_MANAGEMENT_FOOTER_DELETE_SELECTED,onClick:x,disabled:!p,children:h})]})]})},nT=function(e){var t=e.onCancel,n=(0,b.$G)().t,r=nC(),o=r.handleShowBulkEdit,l=r.shouldShowBulkEditMode;return(0,i.jsxs)(ng,{children:[(0,i.jsx)(nx,{children:l&&(0,i.jsx)(m.ZP,{variant:m.eF.OUTLINED_THEMED,onClick:o,children:n("Manage Alerts")})}),(0,i.jsx)(nx,{children:(0,i.jsx)(m.ZP,{variant:m.eF.FILLED_THEMED,onClick:t,children:n("Close")})})]})},nS=function(e){var t=e.onCancel,n=(0,eL.On)(),r=(0,eL.V8)();return n?(0,i.jsx)(nE,{}):r?(0,i.jsx)(nO,{onCancel:t}):(0,i.jsx)(nT,{onCancel:t})},nP=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,eL.vo)(),r=(0,eL.WL)(),o=(0,eL.V8)(),i=(0,b.$G)().t,c=(0,l.useMemo)(function(){var l=(0,eZ.E0)(n),c=o?(0,eZ.dp)():(0,eZ.FT)(r.symbolLimit,r.accountLimit),a=o?l:i("Price Alert Limit"),s=o?l:i("Price Alert Management");return e&&(s=(0,eZ.dJ)(t),a=void 0,c=void 0),{bottomSheetMessage:c,bottomSheetTitle:a,title:s}},[r,n,e,t,o,i]);return{bottomSheetMessage:c.bottomSheetMessage,bottomSheetTitle:c.bottomSheetTitle,title:c.title}};var nw=c.ZP.div.withConfig({componentId:"sc-889a67b5-0"})(["display:flex;align-items:center;justify-content:center;gap:","px;"],y.A.XXS);let nR=function(){var e=nP((0,eL.On)(),eJ().isEdit),t=e.bottomSheetMessage,n=e.title,r=(0,N.VC)().theme;return(0,i.jsxs)(nw,{children:[(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_L_MEDIUM,children:n}),t&&(0,i.jsx)(eb.Z,{placement:"top",trigger:"mouseenter",content:(0,i.jsx)(e4,{children:(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,color:r.themeColors.white,children:t})}),children:(0,i.jsx)(g.ZP,{icon:g.Ro.INFO,size:g.sk.M})})]})};var nI=function(e){var t=e.onCancel,n=(0,b.$G)().t;return(0,l.useEffect)(function(){return Z.Z.init(),function(){Z.Z.resetPriceAlerts(),eR._.initPriceAlerts({cleanBeforeDispatch:!0})}},[]),(0,i.jsx)(e0,{children:(0,i.jsx)(eP.ZP,{variant:eP.KH.CONFIRMATION,okText:n("Close"),onOk:t,modalTitleNode:(0,i.jsx)(nR,{}
1),showFooterDivider:!0,footer:(0,i.jsx)(nS,{onCancel:t}),children:(0,i.jsx)(ny,{})})})};let n_=function(e){(0,ew.ZP)(function(t){var n,r;return(0,i.jsx)(nI,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={onCancel:function(){return t()}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n))})};function nL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let nZ=function(e){var t,n=e||{},r=n.selectedTab,o=n.onChangeTab,c=n.tabGroupData,u=n.onToggleFullScreen,d=n.isFullScreen,f=n.onToggleTradeForm,p=(0,b.$G)().t,y=(0,N.VC)().theme,x=(0,h.TH)(),v=(0,L.rW)(),E=(0,s.b2)(),j=(0,s.M8)(),C=(0,s._f)(["symbol","watch"])||{},A=C.symbol,O=C.watch,T=x.pathname===w.oI.SIGNAL,P=(0,k.sd)(),F=(0,k.pJ)(),G=(0,k.RS)(),X=(t=(0,l.useState)(null!=O&&O),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nL(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nL(e,t)}}(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.")}()),B=X[0],$=X[1],V=(0,_.lE)().isKycAlertVisible;(0,l.useEffect)(function(){T||$(null!=O&&O)},[O,A,T]);var H=(0,l.useMemo)(function(){if(T&&P){var e=(F.find(function(e){return e.id===P.id})||P).watch||!1,t=F.some(function(e){return e.id===P.id});return G===R.mU.FAVOURITE?t:e}return B},[T,P,F,G,B]),Y=(0,l.useMemo)(function(){return(0,U.z)(v)},[v]).hasPriceAlertAccess,W=(0,l.useCallback)(function(e){o(e)},[o]),q=(0,l.useCallback)(function(){if(T&&P){var e=!H;D.j.onFavouriteSignal(P.id,e)}else{var t=!H;$(t),M.l.onFavouriteSymbol(null!=A?A:"",t)}},[T,P,H,A]),z=(0,l.useCallback)(function(){return r!==a.lp.FUTURES?(0,i.jsx)(S,{selectedTab:r,onSelect:W,tabGroupData:c}):null},[r,W,c]),K=(0,l.useCallback)(function(){return d&&f?(0,i.jsx)(m.ZP,{variant:m.eF.FILLED_THEMED,onClick:f,children:p("Trade")}):null},[d,f,p]),Q=(0,l.useCallback)(function(){Z.Z.goToPriceAlertManagement(j,function(){n_()})},[j]);return(0,i.jsxs)(nk,{children:[(0,i.jsx)(nD,{children:(0,i.jsx)(eS,{selectedTab:r})}),(0,i.jsxs)(nM,{children:[z(),K(),Y&&(0,i.jsx)(m.ZP,{variant:m.eF.ICON_ONLY,onClick:Q,icon:g.Ro.PRICE_ALERT,dataTestId:"trade-analysis-price-alert",disabled:V}),(0,i.jsx)(m.ZP,{variant:m.eF.ICON_ONLY,onClick:q,icon:H?g.Ro.STAR_FAVOURITE:g.Ro.STAR_UNFAVOURITE,textColor:H?y.themeColors.primary:y.themeColors.icon.default,hoverTextColor:y.themeColors.primary,activeTextColor:y.themeColors.primary,dataTestId:"".concat(I.Of.CHART_STAR_SYMBOL,"-").concat(H?"watch":"unWatch")}),(0,i.jsx)(m.ZP,{variant:m.eF.ICON_ONLY,icon:d?g.Ro.FULLSCREEN_MINIMISE:g.Ro.FULLSCREEN_OPEN,dataTestId:d?I.Of.CHART_EXIT_FULLSCREEN:I.Of.CHART_TOGGLE_FULLSCREEN,onClick:u,textColor:d?y.themeColors.primary:y.themeColors.icon.default,activeTextColor:y.themeColors.primary,hoverTextColor:d?y.themeColors.primary:y.themeColors.icon.hover})]}),E&&(0,i.jsx)(nN,{})]})};var nk=c.ZP.div.withConfig({componentId:"sc-2e9cc642-0"})(["position:relative;display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0 ","px;background-color:",";height:52px;border-bottom:1px solid ",";"],y.A.REGULAR,function(e){return e.theme.themeColors.background.default},function(e){return e.theme.themeColors.border.subtle}),nD=c.ZP.div.withConfig({componentId:"sc-2e9cc642-1"})(["display:flex;flex-direction:row;flex-grow:1;"]),nM=c.ZP.div.withConfig({componentId:"sc-2e9cc642-2"})(["display:flex;justify-content:flex-end;align-items:center;gap:","px;"],y.A.XS),nN=c.ZP.div.withConfig({componentId:"sc-2e9cc642-3"})(["position:absolute;top:0;left:0;right:0;bottom:0;background-color:",";opacity:0.5;z-index:1;"],function(e){return e.theme.themeColors.background.default}),nU=n(62919),nF=n(79380),nG=n(16212);let nX=function(e){var t,n,r=e.sortType,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["sortType"]);return(0,i.jsxs)(m.ZP,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({variant:m.eF.OUTLINED_THEMED},o),n=n={size:"small",uppercase:!1,children:[(0,i.jsx)(nB,{children:(0,i.jsx)(g.ZP,{icon:r===nG.x.ASC?g.Ro.SORT_ASC_DESC_ASC:g.Ro.SORT_ASC_DESC_DESC})}),r===nG.x.ASC?"Ascending":"Descending"]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};var nB=c.ZP.div.withConfig({componentId:"sc-9c2d10aa-0"})(["margin-inline-end:","px;"],y.A.XXS);let n$=function(e){var t=(0,N.VC)().theme,n=e.selectedOptionSide,r=e.onSelectOptionSide,o=e.selectedOptionCount,l=e.onSelectOptionCount,c=e.dataOptionSide,a=e.dataOptionCount,s=e.selectedOptionStatus,u=e.onSelectOptionStatus,d=e.dataOptionStatus,f=e.sortType,p=e.onSelectSortType,b=e.onToggleFilter;return(0,i.jsxs)(nV,{children:[(0,i.jsxs)(nH,{children:[(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_REGULAR,children:"Single Option"}),a&&(null==a?void 0:a.length)>0&&(0,i.jsx)(ni.Z,{size:"small",options:a||[],onSelect:l,selectedValue:o,dropdownWidth:"152px",dropdownPlacement:nr.s1.BOTTOM_START}),(0,i.jsx)(S,{tabGroupData:c||[],onSelect:r,selectedTab:n}),(0,i.jsx)(S,{tabGroupData:d||[],onSelect:u,selectedTab:s}),(0,i.jsx)(nX,{sortType:f,onClick:p})]}),(0,i.jsx)(nY,{children:b&&(0,i.jsx)(m.ZP,{variant:m.eF.OUTLINED,size:"small",onClick:b,textColor:t.themeColors.text.muted,children:(0,i.jsx)(g.ZP,{icon:g.Ro.SELECTOR_SETTING})})})]})};var nV=c.ZP.div.withConfig({componentId:"sc-e1bec317-0"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:","px ","px;background-color:",";"],y.A.XS,y.A.REGULAR,function(e){return e.theme.themeColors.background.default}),nH=c.ZP.div.withConfig({componentId:"sc-e1bec317-1"})(["display:flex;flex-direction:row;align-items:center;gap:","px;"],y.A.XS),nY=c.ZP.div.withConfig({componentId:"sc-e1bec317-2"})(["display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:","px;"],y.A.XS);n(47042),n(2707);var nW=n(82337);let nq=function(e){var t=e||{},n=t.value,r=t.shouldReverse,o=(0,N.VC)().theme;return(0,i.jsxs)(nz,{$shouldReverse:r,children:[(0,i.jsx)(nK,{children:(0,i.jsx)(g.ZP,{icon:"CALL"===n?g.Ro.LINE_ARROW_OUTWARD_RIGHT:g.Ro.LINE_ARROW_DOWNWARD_RIGHT,color:o.themeColors.background.default})}),(0,i.jsx)(G.ZP,{typography:v.wZ.TEXT_M_MEDIUM,children:n})]})};var nz=c.ZP.div.withConfig({componentId:"sc-478d8305-0"})(["display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-direction:",";"],function(e){return e.$shouldReverse?"row-reverse":"row"}),nK=c.ZP.div.withConfig({componentId:"sc-478d8305-1"})(["background-color:",";border-radius:","px;"],function(e){return e.theme.themeColors.primary},y.A.XXS);let nQ=(0,l.forwardRef)(function(e,t){var n,r,o,l=e||{},c=l.data,a=l.showCallPutLabel,s=null!=(r=null==c?void 0:c.expiration)?r:"",u=null!=(o=null==c?void 0:c.daysToExpiration)?o:0,d=(0,f.cy)(s);if(!c||!c.daysToExpiration||0===Object.keys(null==c||null==(n=c.optionPriceList[0])?void 0:n.call).length)return(0,i.jsx)(i.Fragment,{});var p=function(e){nU.h.onSelectOptionExpirationId(e)};return(0,i.jsx)(nJ,{onClick:function(){return p(s)},ref:t,children:void 0!==a&&a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n0,{children:[(0,i.jsxs)(n3,{children:[(0,i.jsx)(g.ZP,{icon:d?g.Ro.CHEVRON_UP:g.Ro.CHEVRON_DOWN}),(0,i.jsxs)(n4,{typography:v.wZ.TEXT_M_REGULAR,children:[(0,nW.ZP)(c.expiration).format("DD MMM YYYY")," (",u," days)"]})]}),d&&(0,i.jsx)(nq,{value:"CALL"})]}),(0,i.jsx)(n1,{}),(0,i.jsx)(n2,{children:d&&(0,i.jsx)(nq,{value:"PUT",shouldReverse:!0})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n1,{}),(0,i.jsx)(n0,{children:(0,i.jsxs)(n3,{children:[(0,i.jsx)(g.ZP,{icon:d?g.Ro.CHEVRON_UP:g.Ro.CHEVRON_DOWN}),(0,i.jsxs)(n4,{typography:v.wZ.TEXT_M_REGULAR,children:[(0,nW.ZP)(c.expiration).format("DD MMM YYYY")," (",(0,nW.ZP)(c.expiration).diff((0,nW.ZP)(),"day")," days)"]})]})}),(0,i.jsx)(n2,{})]})})});var nJ=c.ZP.div.withConfig({componentId:"sc-f46cdb1e-0"})(["display:flex;height:27px;position:absolute;top:28px;inset-inline-start:0;width:100%;width:100%;border-bottom:1px solid ",";align-items:center;background-color:",";cursor:pointer;&:hover{background-color:",";}"],function(e){return e.theme.themeColors.border.subtle},function(e){return e.theme.themeColors.background.subtle},function(e){return e.theme.themeColors.background.active}),n0=c.ZP.div.withConfig({componentId:"sc-f46cdb1e-1"})(["flex:1;display:flex;justify-content:space-between;align-items:center;"]),n1=c.ZP.div.withConfig({componentId:"sc-f46cdb1e-2"})(["display:flex;width:80px;"]),n2=c.ZP.div.withConfig({componentId:"sc-f46cdb1e-3"})(["flex:1;display:flex;"]),n3=c.ZP.div.withConfig({componentId:"sc-f46cdb1e-4"})(["padding:0 10px;gap:","px;display:flex;align-items:center;"],y.A.XS),n4=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-f46cdb1e-5"})(["color:",";"],function(e){return e.theme.themeColors.text.strong}),n8=n(99747),n9=n(28815),n6=[{key:n9.eE.BID,label:"bid",visible:!0},{key:n9.eE.ASK,label:"ask",visible:!0},{key:n9.eE.LAST,label:"last",visible:!0},{key:n9.eE.CHANGE,label:"change",visible:!0},{key:n9.eE.VOLUME,label:"volume",visible:!0},{key:n9.eE.OPEN_INTEREST,label:"openInterest",visible:!0}
1,{key:n9.eE.IMPLIED_VOLATILITY,label:"impliedVolatility",visible:!0},{key:n9.eE.DELTA,label:"delta",visible:!0},{key:n9.eE.GAMMA,label:"gamma",visible:!0},{key:n9.eE.VEGA,label:"vega",visible:!0},{key:n9.eE.THETA,label:"theta",visible:!0}],n7=((o={})[o.HOVER=.16]="HOVER",o),n5=c.ZP.div.withConfig({componentId:"sc-3b997b16-0"})(["display:flex;width:100%;flex:1;justify-content:flex-start;overflow:auto;position:relative;background-color:",";-ms-overflow-style:-ms-autohiding-scrollbar;&::-webkit-scrollbar{display:none;}"],function(e){return e.theme.themeColors.border.subtle}),re=c.ZP.div.withConfig({componentId:"sc-3b997b16-1"})(["overflow-x:scroll;overscroll-behavior:none;scrollbar-width:none;width:100%;-ms-overflow-style:-ms-autohiding-scrollbar;&::-webkit-scrollbar{display:none;}"]),rt=c.ZP.div.withConfig({componentId:"sc-3b997b16-2"})(["min-width:80px;border-collapse:seperate;border-spacing:0;overflow-x:scroll;overscroll-behavior:none;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar;&::-webkit-scrollbar{display:none;}"]),rn=c.ZP.table.withConfig({componentId:"sc-3b997b16-3"})(["width:80px;border-collapse:seperate;border-spacing:0;table-layout:fixed;"]),rr=c.ZP.table.withConfig({componentId:"sc-3b997b16-4"})(["width:100%;background-color:",";border-collapse:seperate;border-spacing:0;"],function(e){return e.theme.themeColors.background.default}),ro=c.ZP.tr.withConfig({componentId:"sc-3b997b16-5"})(["height:","px;width:100%;cursor:pointer;background-color:",";&:hover{background-color:",";}"],28,function(e){return e.theme.themeColors.background.default},function(e){var t=e.theme;return(0,n8.m4)(t.themeColors.primary,n7.HOVER)}),ri=c.ZP.th.withConfig({componentId:"sc-3b997b16-6"})(["background-color:",";min-width:","px;position:sticky;top:0;border:none;z-index:2;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;"],function(e){return e.theme.themeColors.background.default},80),rl=c.ZP.td.withConfig({componentId:"sc-3b997b16-7"})(["border:1px solid ",";min-width:","px;text-align:center;border-inline-end:none;border-top:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;"],function(e){return e.theme.themeColors.border.subtle},80),rc=c.ZP.td.withConfig({componentId:"sc-3b997b16-8"})(["border-bottom:1px solid ",";background-color:",";min-width:","px;text-align:start;border-inline-end:1px solid ",";"],function(e){return e.theme.themeColors.border.subtle},function(e){return e.theme.themeColors.background.subtle},80,function(e){return e.theme.themeColors.background.subtle});let ra=function(e){var t=e.isOpen,n=e.date,r=e.daysToExpiration;return n?(0,i.jsxs)(rs,{children:[(0,i.jsx)(g.ZP,{icon:void 0!==t&&t?g.Ro.CHEVRON_UP:g.Ro.CHEVRON_DOWN}),(0,i.jsxs)(ru,{typography:v.wZ.TEXT_M_REGULAR,children:[(0,nW.IM)(n,nW.Xz)," (",r," days)"]})]}):(0,i.jsx)(i.Fragment,{})};var rs=c.ZP.div.withConfig({componentId:"sc-7f72e28e-0"})(["padding:0 10px;gap:","px;display:flex;align-items:center;"],y.A.XS),ru=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-7f72e28e-1"})(["color:",";"],function(e){return e.theme.themeColors.text.strong});let rd=function(e){var t=e||{},n=t.expirationId,r=t.optionDataColumns,o=(0,f.AR)(),l=(0,f.EV)(n),c=l.expiration,a=l.daysToExpiration,s=(0,f.cy)(n),u=function(e){nU.h.onSelectOptionExpirationId(e)},d=o===nF.j.ALL;return(0,i.jsxs)(ro,{onClick:function(){return u(c)},children:[(0,i.jsx)(rf,{colSpan:3,children:(0,i.jsx)(ra,{date:c,daysToExpiration:a,isOpen:s})}),r.slice(3).map(function(e,t){return t===r.slice(3).length-1&&s&&d?(0,i.jsx)(rp,{children:(0,i.jsx)(nq,{value:"CALL"})},e.key):(0,i.jsx)(rc,{},e.key)})]})};var rf=(0,c.ZP)(rc).withConfig({componentId:"sc-8b073345-0"})(["position:sticky;inset-inline-start:0;"]),rp=(0,c.ZP)(rc).withConfig({componentId:"sc-8b073345-1"})(["position:sticky;inset-inline-end:0;text-align:end;"]),rb=n(87364);let rh=function(e){var t=e.value,n=e.visible,r=void 0===n||n,o=e.className;return(0,i.jsx)(ry,{$visible:r,className:o,children:(0,i.jsx)(rm,{typography:v.wZ.TEXT_M_REGULAR,children:r&&(0,rb.Nu)(t)})})};var rm=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-26d27d29-0"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle}),ry=(0,c.ZP)(ri).withConfig({componentId:"sc-26d27d29-1"})(["border-inline-start:1px solid ",";border-bottom:1px solid ",";&:first-child{border-inline-start:none;}&.first-hidden-column{border-inline-start:1px solid ",";}"],function(e){var t=e.theme;return e.$visible?t.themeColors.border.subtle:t.themeColors.background.default},function(e){return e.theme.themeColors.border.subtle},function(e){return e.theme.themeColors.border.subtle});let rg=function(e){var t=e.value;return(0,i.jsx)(rv,{children:(0,i.jsx)(rx,{typography:v.wZ.TEXT_M_REGULAR,children:(0,rb.Nu)(t)})})};var rx=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-3d49ea82-0"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle}),rv=(0,c.ZP)(ri).withConfig({componentId:"sc-3d49ea82-1"})(["border:1px solid ",";border-top:none;border-bottom:1px solid ",";"],function(e){return e.theme.themeColors.border.default},function(e){return e.theme.themeColors.border.subtle}),rE=n(58822),rj=n(48260),rC=n(18699);let rA=function(e){var t=e.isSelected,n=e.value,r=e.tickRulesGroup,o=e.decimal;return(0,i.jsx)(rO,{$isSelected:t,typography:v.wZ.TEXT_M_REGULAR,children:(0,J.Wi)(n,(0,J.os)(n,r,o))})};var rO=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-199f4e7a-0"})(["color:",";"],function(e){var t=e.theme;return e.$isSelected?t.themeColors.background.default:t.themeColors.text.subtle});let rT=function(e){var t=e||{},n=t.prevClose,r=t.lastPrice,o=(0,K.e)({prevClose:(0,Q.U8)(n),lastPrice:(0,Q.U8)(r)}),l=o.percentageDifference,c=o.percentageGained;return(0,i.jsx)(rS,{children:(0,i.jsx)(en.g,{typography:v.wZ.TEXT_M_REGULAR,profitLoss:(0,et.By)(c),children:void 0!==(0,Q.M7)(l)?"".concat((0,J.Wi)(l,2,!1),"%"):"--"})})};var rS=c.ZP.div.withConfig({componentId:"sc-3039d6b9-0"})(["display:flex;justify-content:center;"]),rP=function(e){var t,n=e.dataKey,r=e.optionDetail,o=e.buySellType,l=r||{},c=l.prevClose,a=l.lastPrice,s=l.tickRulesGroup,u=l.ask,d=l.bid,f=l.decimal;switch(n){case n9.eE.CHANGE:return(0,i.jsx)(rT,{prevClose:c,lastPrice:a});case n9.eE.ASK:case n9.eE.BID:var p=n===n9.eE.ASK?u:d,b=n===n9.eE.ASK?rC.B9.BUY:rC.B9.SELL;return(0,i.jsx)(rA,{isSelected:o===b,value:p,tickRulesGroup:s});case n9.eE.LAST:return(0,i.jsx)(rR,{typography:v.wZ.TEXT_M_REGULAR,children:(0,J.Wi)(r[n],(0,J.os)(r[n],r.tickRulesGroup,f))});default:return(0,i.jsx)(rR,{typography:v.wZ.TEXT_M_REGULAR,children:null!=(t=(0,J.Wi)(r[n],3,!0,!0))?t:"--"})}};let rw=function(e){var t=e.inTheMoney,n=e.visible,r=void 0===n||n,o=e.dataKey,c=e.buySellType,a=e.symbol,s=e.expiration,u=(0,f.hY)(a,s),d=(0,N.VC)().theme,p=(0,l.useMemo)(function(){return o===n9.eE.BID&&c===rC.B9.SELL?d.themeColors.pnl.negative.default:o===n9.eE.ASK&&c===rC.B9.BUY?d.themeColors.pnl.positive.default:"transparent"},[o,c,d]);return u?(0,i.jsx)(rI,{$inTheMoney:t,$visible:r,$cellColor:p,onClick:function(){o===n9.eE.BID?(rj._.setBuySellType(rC.B9.SELL),nU.h.onSelectOption(a,rC.B9.SELL)):(rj._.setBuySellType(rC.B9.BUY),nU.h.onSelectOption(a,rC.B9.BUY))},children:r&&(0,i.jsx)(rP,{dataKey:o,optionDetail:u,buySellType:c})}):(0,i.jsx)(i.Fragment,{})};var rR=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-df23471d-0"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle}),rI=(0,c.ZP)(rl).withConfig({componentId:"sc-df23471d-1"})(["border-inline-start:",";border-inline-end:none;border-bottom:1px solid ",";&.first-hidden-columns{border-inline-start:1px solid ",";}&:first-child{border-inline-start:none;}&:last-child{border-inline-end:none;}background-color:",";border-color:",";"],function(e){return e.$visible?"1px solid":"none"},function(e){return e.theme.themeColors.border.subtle},function(e){var t=e.theme;return e.$inTheMoney?t.themeColors.background.default:t.themeColors.border.subtle},function(e){return e.$cellColor},function(e){var t=e.theme;return e.$inTheMoney?t.themeColors.background.default:t.themeColors.border.subtle});let r_=function(e){var t=e.value;return(0,i.jsx)(rZ,{children:(0,i.jsx)(rL,{typography:v.wZ.TEXT_M_REGULAR,children:(0,J.Wi)(t,2)})})};var rL=(0,c.ZP)(G.ZP).withConfig({componentId:"sc-94738a5a-0"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle}),rZ=(0,c.ZP)(rl).withConfig({componentId:"sc-94738a5a-1"})(["border-inline-end:1px solid ",";border-inline-start:1px solid ",";"],function(e){return e.theme.themeColors.border.default},function(e){return e.theme.themeColors.border.default});let rk=(0,l.memo)(function(e){var t=e||{},n=t.symbol,r=t.expiration,o=t.strikePrice,c=t.displayData,a=t.symbolSide,u=(0,f.fU)(o,a),d=(0,s.us)(n),p=(0,rE._4)(d);return(0,l.useMemo)(function(){return(0,i.jsx)(rD,{$inTheMoney:u,$symbolSide:a,$buySellType:p,className:d?"selected":"",children:c.map(function(e){var t=e.key;return(0,i.jsx)(rw,{dataKey:t,visible:e.visible,inTheMoney:u,buySellType:p,symbol:n,expiration:r},t)})})},[p,c,r,u,d,n,a])});var rD=(0,c.ZP)(ro).withConfig({componentId:"sc-f36ffaf4-0"})(["background-color:",";position:relative;&::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;box-sizing:border-box;}&.selected::after{border:1px solid ",";}"],function(e){var t=e.theme,n=e.$inTheMoney,r=e.$symbolSide;return(0,rb.Y)({$inTheMoney:n,$symbolSide:r,theme:t})},function(e){var t=e.theme,n=e.$buySellType;return(0,rb.G$)({theme:t,$buySellType:n})});let rM=function(e){var t=e.expirationId,n=e.optionDataColumns,r=e.symbolSide,o=(0,f.PI)(),l=(0,f.oN)({expirationId:t,side:r,sortedBy:{key:"strikePrice",direction:o}});return(0,f.cy)(t)?(0,i.jsx)(i.Fragment,{children:l.map(function(e){return(0,i.jsx)(rk,{symbol:null==e?void 0:e.symbol,expiration:null==e?void 0:e.expiration,strikePrice:null==e?void 0:e.strikePrice,displayData:n,symbolSide:r},null==e?void 0:e.symbol)})}):(0,i.jsx)(i.Fragment,{})},rN=(0,l.memo)(function(e){var t=(e||{}).optionDataColumns,n=(0,f.gU)(),r=(0,l.useMemo)(function(){return 0===n.length?(0,i.jsx)(i.Fragment,{}):n.map(function(e){return(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(rd,{expirationId:e,optionDataColumns:t}),(0,i.jsx)(rM,{expirationId:e,optionDataColumns:t,symbolSide:a.s1.CALL})]},e)})},[t,n]);return(0,i.jsxs)(rr,{children:[(0,i.jsx)("thead",{children:(0,i.jsx)(ro,{children:t.map(function(e){return(0,i.jsx)(rh,{value:e.label,visible:e.visible},e.key)})})}),(0,i.jsx)("tbody",{children:r})]})}),rU=function(e,t){var n=(0,l.useCallback)(function(n){n.preventDefault(),n.stopPropagation();var r=n.deltaY,o=n.deltaX,i=[e,t].find(function(e){return null!==e.current});(null==i?void 0:i.current)&&(Math.abs(r)>Math.abs(o)?i.current.scrollTop+=r:i.current.scrollLeft+=o)},[e,t]);return{scrollDivRef:(0,l.useCallback)(function(e){null!==e&&e.addEventListener("wheel",n,{passive:!1})},[n])}};n(57327),n(32564);let rF=function(e,t,n){var r=(0,l.useCallback)(function(r){var o=r.target,i=o.scrollTop,l=o.scrollLeft;if([n,e,t].filter(function(e){return e.current!==o}
1).forEach(function(e){e.current&&(e.current.scrollTop=i)}),[e.current,t.current].includes(o)){var c=o===e.current?t:e;c.current&&(c.current.scrollLeft=c.current.scrollWidth-l-c.current.clientWidth)}},[e,t,n]),o=(0,l.useCallback)(function(){e.current&&setTimeout(function(){if(e.current){var t;e.current.scrollLeft=null==e||null==(t=e.current)?void 0:t.scrollWidth}},0)},[e]);return{handleScroll:r,scrollToTop:(0,l.useCallback)(function(){[e,t,n].forEach(function(e){e.current&&(e.current.scrollTop=0)})},[e,t,n]),initScrollToEnd:o}};function rG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n(34553),n(39714);let rX=function(){var e,t=(e=(0,l.useState)(null),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return rG(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rG(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=t[0],r=t[1],o=(0,f.jy)(),i=(0,f.Ly)(),c=(0,f.gU)();return(0,l.useEffect)(function(){var e=Object.values(o);e.length>0&&r(e[0])},[o,c]),{updatePinContentOnScroll:(0,l.useCallback)(function(e){var t=e.target.scrollTop,n=0,l=Object.values(o),c=l.findIndex(function(e){var r,o=(i.includes(null==e||null==(r=e.expiration)?void 0:r.toString())?e.optionPriceList.length+1:1)*28;return n+o>t||(n+=o,!1)});r(l[c]||null)},[i,o]),pinContent:n,setPinContent:r}},rB=function(e){var t=e||{},n=t.expirationId,r=t.optionDataColumns,o=(0,f.AR)(),l=(0,f.EV)(n),c=l.expiration,a=l.daysToExpiration,s=(0,f.cy)(n),u=function(e){nU.h.onSelectOptionExpirationId(e)},d=o===nF.j.ALL;return(0,i.jsxs)(ro,{onClick:function(){return u(c)},children:[(0,i.jsx)(r$,{colSpan:3,children:d?s?(0,i.jsx)(nq,{value:"PUT",shouldReverse:!0}):(0,i.jsx)("div",{}):(0,i.jsx)(ra,{date:c,daysToExpiration:a,isOpen:s})}),r.slice(3).map(function(e){return(0,i.jsx)(rc,{},e.key)})]})};var r$=(0,c.ZP)(rc).withConfig({componentId:"sc-4b4e3040-0"})(["position:sticky;inset-inline-start:0;"]);let rV=function(e){var t=(e||{}).optionDataColumns,n=(0,f.gU)(),r=!0,o=(0,l.useMemo)(function(){return n.map(function(e){return 0===n.length?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(rB,{expirationId:e,optionDataColumns:t}),(0,i.jsx)(rM,{expirationId:e,optionDataColumns:t,symbolSide:a.s1.PUT})]},e)})},[t,n]);return(0,i.jsxs)(rr,{children:[(0,i.jsx)("thead",{children:(0,i.jsx)(ro,{children:t.map(function(e){return!1===e.visible&&r?(r=!1,(0,i.jsx)(rh,{value:e.label,visible:e.visible,className:"first-hidden-column"},e.key)):(0,i.jsx)(rh,{value:e.label,visible:e.visible},e.key)})})}),(0,i.jsx)("tbody",{children:o})]})},rH=function(e){var t=(e||{}).expirationId,n=(0,f.EV)(t).expiration;if(!n)return(0,i.jsx)(i.Fragment,{});var r=function(e){nU.h.onSelectOptionExpirationId(e)};return(0,i.jsx)(ro,{onClick:function(){return r(n.toString())},children:(0,i.jsx)(rc,{})})},rY=function(e){var t=e.expirationId,n=(0,f.cy)(t),r=(0,f.PI)(),o=(0,f.Sr)({expirationId:t,sortedBy:r});return(0,i.jsx)(i.Fragment,{children:n&&o.map(function(e){var t;return(0,i.jsx)(rW,{children:(0,i.jsx)(r_,{value:e})},null==(t=String(e))?void 0:t.toString())})})};var rW=(0,c.ZP)(ro).withConfig({componentId:"sc-c339d561-0"})(["&:hover{background-color:",";}"],function(e){return e.theme.themeColors.background.default});let rq=function(){var e=(0,f.gU)(),t=(0,l.useMemo)(function(){return e.map(function(t){return e.length?(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(rH,{expirationId:t}),(0,i.jsx)(rY,{expirationId:t})]},t):(0,i.jsx)(i.Fragment,{})})},[e]);return(0,i.jsxs)(rn,{children:[(0,i.jsx)("thead",{children:(0,i.jsx)(ro,{children:(0,i.jsx)(rg,{value:"Strike"})})}),(0,i.jsx)("tbody",{children:t})]})};function rz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let rK=function(e){var t=(e||{}).dataHeaderColumns,n=void 0===t?[]:t,r=(0,f.AR)(),o=(0,l.useRef)(0),c=(0,l.useRef)(null),a=(0,l.useRef)(null),s=(0,l.useRef)(null),u=rF(c,a,s),d=u.handleScroll,p=u.initScrollToEnd,b=u.scrollToTop,h=rU(c,a).scrollDivRef,m=rX(),y=m.pinContent,g=m.updatePinContentOnScroll,x=(0,f.gU)(),v=(0,l.useMemo)(function(){return n.slice().sort(function(e,t){return e.visible&&!t.visible?-1:!e.visible&&t.visible?1:0})},[n]),E=(0,l.useCallback)(function(e){var t=e.target;t===s.current&&(o.current=t.scrollTop),g(e),d(e)},[d,g]);(0,l.useEffect)(function(){var e=[c,a,s];return e.forEach(function(e){var t;null==(t=e.current)||t.addEventListener("scroll",E)}),function(){e.forEach(function(e){var t;null==(t=e.current)||t.removeEventListener("scroll",E)})}},[c,a,s,E,r]),(0,l.useEffect)(function(){s.current&&(s.current.scrollTop=o.current)},[r]),(0,l.useEffect)(function(){r===nF.j.ALL&&p()},[p,r]),(0,l.useEffect)(function(){b()},[b,x]);var j=(0,l.useMemo)(function(){return(0,i.jsx)(rN,{optionDataColumns:r===nF.j.ALL?((function(e){if(Array.isArray(e))return rz(e)})(v)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(v)||function(e,t){if(e){if("string"==typeof e)return rz(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rz(e,t)}}(v)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).reverse():v})},[v,r]),C=(0,l.useMemo)(function(){return(0,i.jsx)(rV,{optionDataColumns:v})},[v]),A=(0,l.useMemo)(function(){return(0,i.jsx)(rq,{})},[]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(n5,{children:[r===nF.j.ALL&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(re,{ref:c,children:j}),(0,i.jsx)(rt,{ref:s,children:A}),(0,i.jsx)(re,{ref:a,children:C})]}),r===nF.j.CALL&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(rt,{ref:s,children:A}),(0,i.jsx)(re,{ref:c,children:j})]}),r===nF.j.PUT&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(rt,{ref:s,children:A}),(0,i.jsx)(re,{ref:a,children:C})]}),(0,i.jsx)(nQ,{ref:h,data:y,showCallPutLabel:r===nF.j.ALL})]})})};function rQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rJ=[{label:"All",value:nF.j.ALL},{label:"Call",value:nF.j.CALL},{label:"Put",value:nF.j.PUT}];let r0=function(){var e,t=(e=(0,l.useState)([]),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return rQ(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rQ(e,t)}}
1(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=t[0],r=t[1],o=(0,f.PI)(),c=(0,f.$k)(),u=(0,f.gU)(),d=(0,f.cm)(),p=(0,s._f)(["symbol","type"]),b=p.symbol,h=p.type,m=(0,f.AR)();(0,l.useEffect)(function(){return d&&nU.h.init(d),function(){nU.h.reset()}},[d]),(0,l.useEffect)(function(){return nU.h.initSocketReconnectionListener(),function(){nU.h.removeSocketReconnectionListener()}},[]),(0,l.useEffect)(function(){b&&h===a.lp.OPTION&&nU.h.getOptionExpirationIdsFromSymbolDetail()},[b,h]),(0,l.useEffect)(function(){return function(){nU.h.reset()}},[]),(0,l.useEffect)(function(){r(n6)},[]);var y=(0,l.useCallback)(function(e){nU.h.onSelectOptionSide(e)},[]),g=(0,l.useCallback)(function(){var e=o===nG.x.ASC?nG.x.DESC:nG.x.ASC;nU.h.onSelectOptionSortType(e)},[o]);return(0,i.jsx)(l.Suspense,{fallback:(0,i.jsx)(F.ZP,{absolute:!0}),children:(0,i.jsxs)(r1,{children:[(0,i.jsx)(r2,{}),(0,i.jsx)(n$,{dataOptionSide:rJ,selectedOptionSide:m,onSelectOptionSide:y,sortType:o,onSelectSortType:g}),(0,i.jsx)(r2,{}),c||0===u.length?(0,i.jsx)(F.ZP,{absolute:!0}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(rK,{dataHeaderColumns:n})})]})})};var r1=c.ZP.div.withConfig({componentId:"sc-64ebcd7e-0"})(["display:flex;flex:1;overflow:auto;flex-direction:column;border:1px solid ",";-ms-overflow-style:-ms-autohiding-scrollbar;&::-webkit-scrollbar{display:none;}"],function(e){return e.theme.themeColors.border.subtle}),r2=c.ZP.div.withConfig({componentId:"sc-64ebcd7e-1"}
1)(["height:1px;width:100%;background-color:",";"],function(e){return e.theme.themeColors.border.subtle});function r3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function r4(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var r8=(0,l.lazy)(function(){return Promise.all([n.e("412"),n.e("9792"),n.e("7993"),n.e("8012"),n.e("6245"),n.e("8333")]).then(n.bind(n,27451))});let r9=function(e){var t=e.onToggleFullScreen,n=e.isFullScreen,r=e.onToggleTradeForm,o=(0,s.Yp)(),c=(0,s.EQ)(),b=(0,f.cm)(),h=((0,f.l6)(["tradableSecurityTypes"])||{}).tradableSecurityTypes,m=void 0===h?[]:h,y=(0,l.useCallback)(function(e){e!==o&&(e===a.lp.EQUITIES&&b&&d.N.setSymbolDetail({symbolId:b}),d.N.setTradingTab(e))},[o,b]),g=(0,l.useMemo)(function(){if(!m||(null==m?void 0:m.length)===0)return[];var e=null==m?void 0:m.some(function(e){return e!==a.lp.OPTION}),t=null==m?void 0:m.includes(a.lp.OPTION);return u.map(function(n){return n.value===a.lp.OPTION?r4(r3({},n),{disabled:!t}):r4(r3({},n),{disabled:!e})})},[m]),x=(0,l.useMemo)(function(){return c?(0,i.jsx)(l.Suspense,{fallback:(0,i.jsx)("div",{}),children:(0,i.jsx)(r8,{})}):(0,i.jsx)(p.Z,{variant:p.R.NO_DATA_TO_DISPLAY})},[c]),v=(0,l.useMemo)(function(){return c?(0,i.jsx)(r0,{}):(0,i.jsx)(p.Z,{variant:p.R.NO_DATA_TO_DISPLAY})},[c]),E=(0,l.useMemo)(function(){return(0,i.jsx)(nZ,{tabGroupData:g,selectedTab:o,onChangeTab:y,onToggleFullScreen:t,isFullScreen:n,onToggleTradeForm:r})},[o,y,t,r,n,g]);return(0,i.jsxs)(r6,{$isFullScreen:n,children:[E,o===a.lp.OPTION?v:x]})};var r6=c.ZP.div.withConfig({componentId:"sc-e6455a2f-0"})(["flex:1;display:flex;flex-direction:column;overflow:auto;height:",";background-color:",";-ms-overflow-style:-ms-autohiding-scrollbar;&::-webkit-scrollbar{display:none;}"],function(e){return e.$isFullScreen?"100vh":"auto"},function(e){return e.theme.themeColors.background.default})}}]);
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.