1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="45f8938f-01a1-cf6d-eb47-78b1abbb4a28")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,678814,e=>{"use strict";var s=e.i(66965),a=e.i(122071),t=e.i(850336),l=e.i(52389),r=e.i(304046);e.s(["WalletSelector",0,function({className:e}){let n=(0,t.useTranslations)("walletSelector")("connectWallet"),i=(0,l.useIsNetworkDown)();return(0,s.jsx)(l.NetworkDownTooltip,{isNetworkDown:i,children:(0,s.jsx)(a.Button,{variant:"secondary",onClick:r.openWalletSelectorModal,disabled:i,className:e,children:n})})}])},802784,549854,e=>{"use strict";var s=e.i(66965),a=e.i(297122),t=e.i(67303),l=e.i(726439);e.i(913780);var r=e.i(440584),n=e.i(122071),i=e.i(759928),o=e.i(850336),c=e.i(641642);e.i(459542);var d=e.i(898607),u=e.i(352415);e.i(369933);var x=e.i(37337),m=e.i(288299),p=e.i(456082),h=e.i(341592),g=e.i(675079),b=e.i(367179),v=e.i(999006);e.i(79278);var f=e.i(128943),j=e.i(805626);e.i(464970);var N=e.i(392820),w=e.i(893787),y=e.i(361149);let C=()=>{let{state:e,subaccountAddress:s}=(0,j.useAuthState)(),{disconnect:a,cleanupAfterLogout:t}=(0,v.useWriteDexSdk)(),l=(0,y.useRemoveSessionKey)();return(0,c.useCallback)(()=>{if("SESSION_KEY_IMPORTED"===e&&s){l(s),t();return}"WALLET_CONNECTED"===e&&a()},[e,s,l,t,a])};e.s(["useLogout",0,C],549854);var k=e.i(328332),S=e.i(623747),T=e.i(635722),I=e.i(341690),A=e.i(304046),E=e.i(127272),D=e.i(437438),O=e.i(479495),R=e.i(874147),L=e.i(480335);let _=e=>`${h.SELECTED_SUBACCOUNT_ITEM_KEY}-${e}`,M=({subaccountAddress:e,renderTrigger:a,placement:l="bottom-start"})=>{let{account:n,chainName:o}=(0,N.useDecibelWallet)(),d=n?.address.toString(),{subaccounts:u,isLoadingSubaccounts:x}=(0,k.useSubaccountsWithPrimary)(),{data:m,isPending:p}=(0,i.useQuery)({...(0,b.userOwnedVaultsQuery)({ownerAddr:d??""}),enabled:!!d}),h=m?.items??[],j=(0,w.useDelegatedSubaccounts)(d),{connectedVault:y}=(0,v.useWriteDexSdk)(),C=n?.ansName??(0,t.truncateAddress)(d??""),T=(0,c.useMemo)(()=>{var s;let a;if(!n)return null;let t=u.find(s=>(0,S.addressesEqual)(s.subaccount_address,e));if(t)return{address:t.subaccount_address,label:t.custom_label};if(y)return{address:(0,r.getPrimarySubaccountAddr)(y.vault_address,g.sdkConfig.compatVersion,g.sdkConfig.deployment.package),label:y.vault_name};let l=j.find(s=>(0,S.addressesEqual)(s.subaccountAddress,e));return l?{address:l.subaccountAddress,label:l.label}:(s=n.address.toString(),(a=(0,f.getLocalStorageItem)(_(s.toLowerCase())))?JSON.parse(a):null)},[y,j,u,e,n]);return((0,c.useEffect)(()=>{if(n&&T){var e;e=n.address.toString(),(0,f.setLocalStorageItem)(_(e.toLowerCase()),T)}},[T,n]),T)?(0,s.jsx)(E.Popover,{trigger:a?a(T):(0,s.jsx)(P,{item:T}),placement:l,children:({setIsOpen:e})=>(0,s.jsxs)("div",{className:G,children:[(0,s.jsx)(B,{address:C,setIsOpen:e,chainName:o}),x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)($,{}),(0,s.jsx)($,{})]}):(0,s.jsx)(s.Fragment,{children:u.map(a=>(0,s.jsx)(F,{item:{address:a.subaccount_address,label:a.custom_label},setIsOpen:e},a.subaccount_address))}),p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)($,{}),(0,s.jsx)($,{})]}):(0,s.jsx)(s.Fragment,{children:h.map(a=>(0,s.jsx)(F,{item:{address:a.subaccount_address,label:a.vault_name},isVault:!0,setIsOpen:e},a.subaccount_address))}),j.map(a=>(0,s.jsx)(F,{item:{address:a.subaccountAddress,label:a.label},isDelegated:!0,setIsOpen:e},a.subaccountAddress))]})}):(0,s.jsx)(V,{})},W=({subaccountAddress:e,renderTrigger:a,placement:l="bottom-start"})=>{let r=(0,y.useGetImportedSessionKeys)(),n=r.find(s=>(0,S.addressesEqual)(s.subaccountAddress,e));return n?(0,s.jsx)(E.Popover,{trigger:a?a({address:e,label:n.label??""}):(0,s.jsx)(P,{item:{address:e,label:n.label??""}}),placement:l,children:({setIsOpen:e})=>(0,s.jsxs)("div",{className:G,children:[(0,s.jsx)(B,{address:(0,t.truncateAddress)(n.ownerAddress??n.accountAddress),setIsOpen:e}),r.map(a=>(0,s.jsx)(F,{item:{address:a.subaccountAddress,label:a.label??""},setIsOpen:e},a.subaccountAddress))]})}):null},P=({ref:e,className:a,item:r,...i})=>{let c=(0,t.truncateAddress)(r.address),m=(0,o.useTranslations)("accounts");return(0,s.jsx)(n.Button,{ref:e,variant:"text",TailIcon:l.IconCaretDown,className:(0,u.cx)(K,a),ariaLabel:m("openAccountDropdown"),...i,children:(0,s.jsxs)("div",{className:(0,x.flex)({align:"center",gap:"8"}),children:[(0,s.jsx)("p",{className:(0,d.css)({hideBelow:"sm",textStyle:"highlight.md",color:"text.secondary",truncate:!0,maxW:"160"}),children:r.label}),(0,s.jsx)("p",{className:(0,d.css)({textStyle:"highlight.lg",desktop:{textStyle:"highlight.md"},color:"text.tertiary"}),children:c})]})})},B=({address:e,setIsOpen:a,chainName:t})=>{let r=(0,o.useTranslations)("accountControls"),{disconnect:n}=(0,v.useWriteDexSdk)(),{state:i,keylessInfo:c}=(0,j.useAuthState)();return(0,s.jsx)("div",{className:Y,children:(0,s.jsxs)("div",{className:z,children:["WALLET_CONNECTED"===i&&(0,s.jsx)(I.Clickable,{onClick:()=>{n(),a(!1)},"aria-label":r("disconnect"),children:(0,s.jsxs)("div",{className:(0,x.flex)({align:"center",gap:"8",w:"max"}),children:[(0,s.jsx)("p",{className:(0,d.css)({color:"text.secondary"}),children:r("disconnect")}),(0,s.jsx)(l.IconSignOut,{className:(0,d.css)({color:"text.tertiary",w:"16",h:"16"})})]})}),(0,s.jsxs)("div",{className:(0,x.flex)({align:"center",gap:"8"}),children:[(0,s.jsx)("p",{className:(0,d.css)({color:"text.tertiary"}),children:r("walletConnection")}),(0,s.jsxs)("p",{className:(0,d.css)({color:"text.tertiary"}),children:[e,t?` (${t})`:""]}),c?(0,s.jsx)(U,{keylessInfo:c}):null]})]})})},U=({keylessInfo:e})=>(0,s.jsx)(R.Tooltip,{content:e.email,disabled:!e.email,children:(0,s.jsx)("div",{className:(0,x.flex)({align:"center",gap:"8"}),children:(0,c.createElement)((0,L.getKeylessProviderIcon)(e.provider),{className:(0,d.css)({w:"12",h:"12"})})})}),F=({item:e,setIsOpen:a,isVault:r,isDelegated:i})=>{let c=(0,o.useTranslations)("accountControls"),u=C(),{subaccountAddress:p,state:h}=(0,j.useAuthState)(),{switchSubaccountAddress:g}=(0,v.useWriteDexSdk)(),b=(0,t.truncateAddress)(e.address),f=(0,S.addressesEqual)(e.address,p);return(0,s.jsxs)("div",{className:q,children:[(0,s.jsxs)("div",{className:(0,m.stack)({gap:"2",minW:"
20",flex:"1"}),children:[(0,s.jsxs)("div",{className:(0,x.flex)({gap:"8",align:"center",minW:"0"}),children:[(0,s.jsx)("p",{className:(0,d.css)({color:"text.secondary",truncate:!0}),children:e.label}),r&&(0,s.jsx)(O.Tag,{variant:"gold",className:H,children:c("vault")}),i&&(0,s.jsx)(O.Tag,{variant:"gold",className:H,children:c("delegated")})]}),(0,s.jsx)("p",{className:(0,d.css)({color:"text.tertiary"}),children:b})]}),(0,s.jsxs)("div",{className:(0,x.flex)({align:"center",gap:"4",flexShrink:"0"}),children:[!f&&(0,s.jsx)(n.Button,{size:"sm",variant:"secondary",className:(0,d.css)({color:"text.tertiary"}),onClick:()=>{g(e.address),a(!1)},children:c("switch")}),"SESSION_KEY_IMPORTED"===h&&f&&(0,s.jsx)(I.Clickable,{onClick:u,"aria-label":c("disconnect"),children:(0,s.jsx)(l.IconSignOut,{className:(0,d.css)({color:"text.tertiary",w:"16",h:"16"})})}),(0,s.jsx)(T.CopyButton,{value:e.address,size:"sm",variant:"secondary",warningMessage:c("subaccountCopyWarning"),className:(0,d.css)({"& svg":{color:"text.tertiary",_hover:{color:"text.secondary"}}})})]})]})},V=()=>{let[e,a]=(0,c.useState)(!0),t=(0,c.useRef)(null),{disconnect:l}=(0,v.useWriteDexSdk)(),r=(0,o.useTranslations)("accounts");return((0,c.useEffect)(()=>(t.current=setTimeout(()=>{a(!1)},p.ACCOUNT_RECONNECT_TIMEOUT_MS),()=>{t.current&&clearTimeout(t.current)}),[]),e)?(0,s.jsx)(D.Skeleton,{className:(0,d.css)({w:"192",h:"32",rounded:"300"})}):(0,s.jsx)(n.Button,{variant:"primary",onClick:()=>{l(),setTimeout(()=>{(0,A.openWalletSelectorModal)()},p.ACCOUNT_RECONNECT_DELAY_MS)},children:r("reconnect")})},K=(0,d.css)({px:"0!","&[data-state='open'] svg":{transform:"rotate(180deg)"},"&[data-state='closed'] svg":{transform:"rotate(0deg)"},"& svg":{transitionPreset:"transform"}}),G=(0,m.stack)({gap:"0",pb:"4",bg:"background.primary",rounded:"300",minW:"288",maxH:"480",overflowY:"auto",shadow:"default"}),Y=(0,m.stack)({p:"4",bg:"background.primary",position:"sticky",rounded:"200",top:"0",zIndex:"[1]"}),z=(0,m.stack)({gap:"2",w:"full",bg:"background.secondary",rounded:"200",py:"4",px:"8"}),$=()=>(0,s.jsxs)("div",{className:q,children:[(0,s.jsxs)("div",{className:(0,m.stack)({gap:"2",w:"max"}),children:[(0,s.jsx)(D.Skeleton,{className:(0,d.css)({w:"120",h:"16",rounded:"200"})}),(0,s.jsx)(D.Skeleton,{className:(0,d.css)({w:"160",h:"14",rounded:"200"})})]}),(0,s.jsxs)("div",{className:(0,x.flex)({align:"center",gap:"4"}),children:[(0,s.jsx)(D.Skeleton,{className:(0,d.css)({w:"64",h:"28",rounded:"200"})}),(0,s.jsx)(D.Skeleton,{className:(0,d.css)({w:"28",h:"28",rounded:"200"})})]})]}),q=(0,x.flex)({w:"full",align:"center",justifyContent:"space-between",gap:"8",py:"4",px:"12"}),H=(0,d.css)({flexShrink:"0"});e.s(["AccountDropdown",0,({subaccountAddress:e,renderTrigger:t,placement:l})=>{let r=(0,o.useTranslations)("general"),{state:n}=(0,j.useAuthState)(),i=g.sdkConfig.network===a.Network.TESTNET,c="SESSION_KEY_IMPORTED"===n?(0,s.jsx)(W,{subaccountAddress:e,renderTrigger:t,placement:l}):(0,s.jsx)(M,{subaccountAddress:e,renderTrigger:t,placement:l});return t?c:(0,s.jsxs)("div",{className:(0,x.flex)({flexDirection:{base:"column-reverse",desktop:"row"},align:{base:"flex-start",desktop:"center"},gap:{base:"4",desktop:"8"},mt:{desktopDown:i?"-8":void 0}}),children:[i&&(0,s.jsx)(O.Tag,{variant:"gold",className:(0,d.css)({desktopDown:{mt:"-8"}}),children:r("testnet")}),c]})}],802784)},833103,e=>{"use strict";var s=e.i(66965),a=e.i(579676),t=e.i(40501),l=e.i(726439),r=e.i(347262),n=e.i(850336);e.i(459542);var i=e.i(898607);let o=(0,i.css)({zIndex:"dialog",position:"fixed",inset:"0",bg:"dialog.backdrop","&[data-state='open']":{animationStyle:"fade-in"},"&[data-state='closed']":{animationStyle:"fade-out"}}),c=(0,i.css)({zIndex:"dialog",position:"fixed",top:"0",bottom:"0",left:"0",transform:"translateX(-100%)","&[data-state='open']":{animationStyle:"slide-in-from-left"},"&[data-state='closed']":{animationStyle:"slide-out-to-left"}});e.s(["Drawer",0,function({trigger:e,renderContent:l,mountOnlyWhenVisible:r=!1}){return(0,s.jsx)(a.Dialog.Root,{modal:!0,restoreFocus:!0,lazyMount:r,unmountOnExit:r,children:(0,s.jsx)(a.Dialog.Context,{children:({open:r,setOpen:n})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Dialog.Trigger,{asChild:!0,children:e}
2),(0,s.jsxs)(t.Portal,{children:[(0,s.jsx)(a.Dialog.Backdrop,{className:o}),(0,s.jsx)(a.Dialog.Positioner,{children:(0,s.jsx)(a.Dialog.Content,{className:c,children:l({close:()=>n(!1),isOpen:r})})})]})]})})})},"DrawerCloseButton",0,function({close:e}){let a=(0,n.useTranslations)("general");return(0,s.jsx)("div",{className:(0,i.css)({position:"absolute",top:"[22px]",left:"24"}),children:(0,s.jsx)(r.IconButton,{size:"lg",variant:"text",onClick:e,ariaLabel:a("close"),className:(0,i.css)({p:"12!",m:"-12"}),children:(0,s.jsx)(l.IconX,{})})})}])},322459,e=>{"use strict";var s=e.i(66965),a=e.i(726439),t=e.i(122071),l=e.i(696163),r=e.i(850336),n=e.i(641642);e.i(459542);var i=e.i(898607),o=e.i(352415);e.i(369933);var c=e.i(288299),d=e.i(694523),u=e.i(525565),x=e.i(271249),m=e.i(37337),p=e.i(496322);function h({close:e,currentLayout:a,onSave:l}){let o=(0,r.useTranslations)("layoutConfigurations"),f=(0,r.useTranslations)("general"),[j,N]=(0,n.useState)(a);return(0,s.jsxs)(x.ModalContent,{className:g,children:[(0,s.jsxs)("div",{className:(0,c.stack)({gap:"12"}),children:[(0,s.jsx)("h2",{className:(0,i.css)({textStyle:"heading.2xs",color:"text.secondary"}),children:o("title")}),(0,s.jsx)(u.RadioGroup.Root,{value:j,onValueChange:e=>N(e.value),className:(0,p.grid)({gridTemplateColumns:"repeat(2, 1fr)",columnGap:"8",rowGap:"12"}),children:d.VISIBLE_LAYOUTS.map(e=>(0,s.jsxs)(u.RadioGroup.Item,{value:e,className:b,children:[(0,s.jsx)(u.RadioGroup.ItemControl,{className:(0,i.css)({srOnly:!0})}),(0,s.jsx)(u.RadioGroup.ItemText,{className:(0,i.css)({flex:"1"}),children:(0,s.jsx)(v,{layout:e})}),(0,s.jsx)(u.RadioGroup.ItemHiddenInput,{})]},e))})]}),(0,s.jsxs)("div",{className:(0,m.flex)({gap:"4",justifyContent:"flex-end"}),children:[(0,s.jsx)(t.Button,{variant:"secondary",onClick:e,children:f("cancel")}),(0,s.jsx)(t.Button,{onClick:()=>{l(j),e()},children:f("save")})]})]})}let g=(0,c.stack)({w:"[443px]",gap:"16",p:"20"}),b=(0,i.css)({cursor:"pointer",rounded:"200",borderWidth:"100",borderColor:"transparent",p:"0",overflow:"hidden","&[data-state=checked]":{borderColor:"brandYellow.500"}});function v({layout:e}){switch(e){case d.TradeLayout.DEFAULT:return(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(C,{}),(0,s.jsx)(A,{}),(0,s.jsx)(O,{})]});case d.TradeLayout.ORDERBOOK_LEFT:return(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(A,{}),(0,s.jsx)(C,{}),(0,s.jsx)(O,{})]});case d.TradeLayout.ORDER_FORM_LEFT:return(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(O,{}),(0,s.jsx)(C,{}),(0,s.jsx)(A,{})]});case d.TradeLayout.COMPACT_LEFT:return(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(O,{}),(0,s.jsx)(A,{}),(0,s.jsx)(C,{})]});case d.TradeLayout.CHART_FULL:return(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(k,{}),(0,s.jsx)(O,{})]});default:throw Error(`Unknown layout: ${e}`)}}let f=(0,i.css)({display:"flex",gap:"2",p:"2",h:"[82px]"}),j=(0,i.css)({position:"absolute",w:"[10px]",rounded:"50",bg:"background.positive"}),N=(0,i.css)({position:"absolute",w:"[10px]",rounded:"50",bg:"background.negative"}),w=[{left:2.5,top:40.5,h:20.5,bullish:!0},{left:14.5,top:32,h:17.5,bullish:!0},{left:26.5,top:38,h:15,bullish:!1},{left:38.5,top:38,h:20,bullish:!1},{left:50.5,top:26,h:23.5,bullish:!0},{left:62.5,top:21,h:17.5,bullish:!0},{left:74.5,top:29.5,h:17.5,bullish:!1},{left:86.5,top:11.5,h:27,bullish:!0}],y=[{left:2.5,top:50.5,h:20.5,bullish:!0},{left:14.5,top:42,h:17.5,bullish:!0},{left:26.5,top:48,h:15,bullish:!1},{left:38.5,top:48,h:20,bullish:!1},{left:50.5,top:36,h:23.5,bullish:!0},{left:62.5,top:31,h:17.5,bullish:!0},{left:74.5,top:39.5,h:17.5,bullish:!1},{left:86.5,top:21.5,h:27,bullish:!0},{left:98,top:39.5,h:12,bullish:!1},{left:110,top:16.5,h:26,bullish:!0},{left:122,top:8.5,h:28,bullish:!0},{left:134,top:-.5,h:17,bullish:!0}];function C({className:e}){return(0,s.jsx)("div",{className:(0,o.cx)(T,e),children:w.map((e,a)=>(0,s.jsx)("div",{style:{left:`${e.left}px`,top:`${e.top}px`,height:`${e.h}px`},className:e.bullish?j:N},a))})}function k(){return(0,s.jsx)("div",{className:I,children:y.map((e,a)=>(0,s.jsx)("div",{style:{left:`${e.left}px`,top:`${e.top}px`,height:`${e.h}px`},className:e.bullish?j:N},a))})}let S=i.css.raw({bg:"background.primary",borderWidth:"[0.5px]",borderColor:"border.secondary",rounded:"50",overflow:"hidden",position:"relative"}),T=(0,i.css)(S,{flex:"1",minW:"0"}),I=(0,i.css)(S,{flex:"[1 0 0]",minW:"0"});function A({className:e}
2){return(0,s.jsxs)("div",{className:(0,o.cx)(D,e),children:[(0,s.jsx)("div",{className:(0,i.css)({w:"full",h:"[10px]",rounded:"50",bg:"green.100"})}),(0,s.jsx)("div",{className:(0,i.css)({w:"[34.5px]",h:"[10px]",rounded:"50",bg:"green.100"})}),(0,s.jsx)("div",{className:(0,i.css)({w:"[21px]",h:"[10px]",rounded:"50",bg:"green.100"})}),(0,s.jsx)("div",{className:(0,i.css)({h:"[6px]"})}),(0,s.jsx)("div",{className:(0,i.css)({w:"[21px]",h:"[10px]",rounded:"50",bg:"text.negative"})}),(0,s.jsx)("div",{className:(0,i.css)({w:"[34.5px]",h:"[10px]",rounded:"50",bg:"text.negative"})}),(0,s.jsx)("div",{className:(0,i.css)({w:"full",h:"[10px]",rounded:"50",bg:"text.negative"})})]})}let E=i.css.raw({w:"[45px]",flexShrink:0,bg:"background.secondary",rounded:"50",overflow:"hidden",display:"flex",flexDirection:"column",gap:"2"}),D=(0,i.css)(E);function O({className:e}){return(0,s.jsxs)("div",{className:(0,o.cx)(R,e),children:[(0,s.jsxs)("div",{className:(0,i.css)({display:"flex",gap:"2"}),children:[(0,s.jsx)("div",{className:(0,i.css)({h:"[10px]",w:"[21.5px]",rounded:"50",bg:"green.100"})}),(0,s.jsx)("div",{className:(0,i.css)({h:"[10px]",w:"[21.5px]",rounded:"50",bg:"text.negative"})})]}),(0,s.jsx)("div",{className:(0,i.css)({flex:"1",rounded:"50",bg:"background.secondary"})}),(0,s.jsx)("div",{className:(0,i.css)({h:"[10px]",rounded:"50",bg:"yellow.500"})})]})}let R=(0,i.css)(E);var L=e.i(874147),_=e.i(52389),M=e.i(999006);e.i(79278);var W=e.i(794078);e.i(464970);var P=e.i(392820),B=e.i(142817),U=e.i(875783),F=e.i(341690),V=e.i(288441),K=e.i(127272),G=e.i(621335),Y=e.i(588208);function z(){let e=(0,r.useTranslations)("advancedSettings"),{writeDexSdk:a}=(0,M.useWriteDexSdk)(),t=(0,_.useIsNetworkDown)(),{tradingMode:l,updateTradingMode:n}=(0,Y.useUserPreferences)();return(0,s.jsxs)("div",{className:(0,c.stack)({gap:"8"}),children:[(0,s.jsx)("p",{className:(0,i.css)({textStyle:"body.md"}),children:e("orderFormLayout")}),(0,s.jsx)(G.RadioTabGroup,{disabled:!a||t,value:l,onChange:n,variant:"layoutSelector",options:[{value:Y.TradingModes.BASIC,label:(0,s.jsxs)($,{className:H,children:[(0,s.jsx)("div",{className:(0,o.cx)(X,(0,i.css)({gridRow:"1",gridColumn:"1"}))}),(0,s.jsx)("div",{className:(0,o.cx)(Z,(0,i.css)({gridRow:"1",gridColumn:"2"}))}),(0,s.jsx)("div",{className:(0,o.cx)(Q,(0,i.css)({gridRow:"2 / 4",gridColumn:"1 / -1"}))}),(0,s.jsx)("div",{className:(0,o.cx)(ee,(0,i.css)({gridRow:"4",gridColumn:"1 / -1"}))})]})},{value:Y.TradingModes.ADVANCED,label:(0,s.jsxs)($,{className:J,children:[(0,s.jsx)("div",{className:(0,o.cx)(Q,(0,i.css)({gridRow:"1 / 4",gridColumn:"1 / -1"}))}),(0,s.jsx)("div",{className:(0,o.cx)(X,(0,i.css)({gridRow:"4",gridColumn:"1"}))}),(0,s.jsx)("div",{className:(0,o.cx)(Z,(0,i.css)({gridRow:"4",gridColumn:"2"}))})]})}]})]})}function $({children:e,className:a,...t}){return(0,s.jsx)("div",{className:(0,o.cx)(q,a),...t,children:e})}let q=(0,c.stack)({h:"96",w:"96",p:"4"}),H=(0,p.grid)({gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr 1fr 1fr",gridGap:"4"}),J=(0,p.grid)({gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr 1fr 1fr",gridGap:"4"}),Q=(0,i.css)({rounded:"200",bg:"tradingModeLayout.neutral"}),X=(0,i.css)({rounded:"200",bg:"tradingModeLayout.positive"}),Z=(0,i.css)({rounded:"200",bg:"tradingModeLayout.negative"}),ee=(0,i.css)({rounded:"200",bg:"tradingModeLayout.primary"}),es=e=>{let t=(0,_.useIsNetworkDown)(),{writeDexSdk:l}=(0,M.useWriteDexSdk)(),{connected:o}=(0,P.useDecibelWallet)(),c=(0,r.useTranslations)("general"),[d,u]=(0,n.use
2State)(null),x=(0,s.jsx)(F.Clickable,{className:ea,...e,ref:u,disabled:t||!l,children:(0,s.jsx)(a.IconGear,{className:(0,i.css)({h:"20",w:"20"})})});if(t)return(0,s.jsx)(_.NetworkDownTooltip,{isNetworkDown:!0,anchorElement:d,children:x});if(!l){let e=c(o?"enableTrading":"connectWallet");return(0,s.jsx)(L.Tooltip,{placement:"bottom-end",content:e,disabled:!1,anchorElement:d,children:x})}return x},ea=(0,o.cx)((0,i.css)({p:"8",m:"-8","&[data-state='open'] svg":{transform:"rotate(90deg)"},"&[data-state='closed'] svg":{transform:"rotate(0deg)"},"& svg":{transitionPreset:"transform"}}),(0,l.insetFocusRing)());function et({closePopover:e}){let a=(0,r.useTranslations)("advancedSettings"),[l,n]=(0,W.useCookieState)(d.TRADE_LAYOUT_COOKIE);return(0,s.jsx)(t.Button,{variant:"secondary",fullWidth:!0,onClick:()=>{var a;e(),a={currentLayout:l,onSave:n},(0,x.openModal)({id:"layout-configurations-modal",renderContent:e=>(0,s.jsx)(h,{...e,...a})})},children:a("moreConfigurations")})}let el=(0,c.stack)({gap:"8",p:"8",bg:"background.primary",rounded:"200",shadow:"default",borderWidth:"100",borderColor:"border.secondary"});e.s(["AdvancedSettings",0,({isMobile:e})=>{let a=(0,r.useTranslations)("advancedSettings"),[t,l]=(0,B.useCacheSessionKeysStorage)(),{isMuted:n,setIsMuted:o}=(0,U.useTradingSound)();return(0,s.jsx)(K.Popover,{modal:!0,mountOnlyWhenVisible:!0,trigger:(0,s.jsx)(es,{}),children:({setIsOpen:r})=>(0,s.jsxs)("div",{className:el,children:[(0,s.jsx)(V.Checkbox,{checkboxPosition:"right",name:"session-keys-remember",checked:t,onChange:e=>{l(!0===e)},className:(0,i.css)({w:"full",justifyContent:"space-between"}),children:a("rememberSessionKeys")}),(0,s.jsx)(V.Checkbox,{checkboxPosition:"right",name:"mute-trading-sounds",checked:n,onChange:e=>{o(!0===e)},className:(0,i.css)({w:"full",justifyContent:"space-between"}),children:a("muteTradingSounds")}),!e&&(0,s.jsx)(z,{}),!e&&(0,s.jsx)(et,{closePopover:()=>r(!1)})]})})}],322459)},987192,e=>{"use strict";var s=e.i(271249),a=e.i(641642);e.s(["openLanguageSwitcherModal",0,function(){e.A(810966).then(e=>{(0,s.openModal)({id:"language-switcher-modal",renderContent:s=>(0,a.createElement)(e.LanguageSwitcherModal,s)})})}])},904256,e=>{"use strict";var s=e.i(66965),a=e.i(271249);let t=(0,e.i(599623).default)(()=>e.A(750631).then(e=>e.PwaInstallModalContent),{loadableGenerated:{modules:[103425]},ssr:!1});e.s(["openPwaInstallModal",0,()=>{(0,a.openModal)({id:"pwa-install",renderContent:e=>(0,s.jsx)(t,{...e})})}])},491570,873920,729305,629124,87919,986650,e=>{"use strict";var s=e.i(66965),a=e.i(67303),t=e.i(726439),l=e.i(122071),r=e.i(347262),n=e.i(696163),i=e.i(44580),o=e.i(123562),c=e.i(850336),d=e.i(641642);e.i(459542);var u=e.i(898607),x=e.i(280088),m=e.i(352415);e.i(369933);var p=e.i(37337),h=e.i(288299),g=e.i(987192),b=e.i(904256),v=e.i(304046),f=e.i(526398),j=e.i(428949),N=e.i(252323),w=e.i(805626),y=e.i(549854),C=e.i(341690),k=e.i(833103);e.i(918152);var S=e.i(712882),T=e.i(271249),I=e.i(623747),A=e.i(981674),E=e.i(661018),D=e.i(640304);let O="view-as-recent";function R(){try{let e=localStorage.getItem(O);return e?JSON.parse(e):[]}catch{return[]}}function L(){(0,T.openModal)({id:"view-as-modal",renderContent:e=>(0,s.jsx)(_,{...e})})}function _({close:e}){let a=(0,c.useTranslations)("viewAsUser"),{activateViewAs:t}=(0,N.useViewAs)(),[r,n]=(0,d.useState)(""),[i]=(0,d.useState)(()=>R()),o=s=>{let a=s.trim();if(a){let s;(s=R().filter(e=>!(0,I.addressesEqual)(e,a))).unshift(a),localStorage.setItem(O,JSON.stringify(s.slice(0,5))),t(a),e()}};return(0,s.jsxs)(T.ModalContent,{className:(0,u.css)({w:"[425px]",p:"16"}),children:[(0,s.jsx)(D.ModalCloseButton,{close:e}),(0,s.jsxs)("div",{className:(0,h.stack)({gap:"20"}),children:[(0,s.jsxs)("div",{className:(0,h.stack)({gap:"12"}),children:[(0,s.jsx)("h2",{className:(0,u.css)({textStyle:"heading.3xs",color:"text.primary",pt:"12"}),children:a("viewAsUser")}),(0,s.jsx)("p",{className:(0,u.css)({textStyle:"body.md",color:"text.tertiary"}),children:a("viewAsDescription")})]}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),o(r)},className:(0,h.stack)({gap:"8"}),children:[(0,s.jsx)(A.FormField,{label:a("walletAddress"),children:e=>(0,s.jsx)(E.Input,{...e,value:r,onChange:e=>n(e.target.value),placeholder:"0x..."})}),(0,s.jsx)(l.Button,{type:"submit",variant:"primary",size:"md",fullWidth:!0,disabled:!r.trim(),children:a("viewAs")})]}),i.length>0&&(0,s.jsxs)("div",{className:(0,h.stack)({gap:"8"}),children:[(0,s.jsx)("span",{className:(0,u.css)({textStyle:"body.md",color:"text.tertiary"}),children:a("recentAddresses")}),i.map(e=>(0,s.jsx)(C.Clickable,{onClick:()=>o(e),className:(0,u.css)({bg:"background.canvas",border:"1px solid",borderColor:"border.primary",borderRadius:"200",px:"12",py:"8",color:"text.secondary",textStyle:"body.md",textAlign:"left",_hover:{borderColor:"border.tertiary",color:"text.primary"},transitionPreset:"colors"}),title:e,children:(0,S.truncateAddress)(e)},e))]})]})]})}e.s(["openViewAsModal",0,L],873920);var M=e.i(865373),W=e.i(758926);let P=e=>!e.hidden,B=e=>"options"in e?{...e,options:e.options.filter(P)}:e,U=[{tx:"trade",path:"/trade"},{tx:"markets",path:"/markets"},{tx:"leaderboard",path:"/leaderboard"},{tx:"portfolio",path:"/portfolio"},{tx:"vaults",path:"/vaults"},{tx:"points",path:"/points"},{tx:"rewards",path:"/rewards"},{tx:"affiliates",path:"/affiliates"},{tx:"more",options:[{tx:"accounts",path:"/accounts"},{tx:"api",path:"/api"},{tx:"announcements",path:"/announcements"},{tx:"cardVault",path:"/card-vault"},{tx:"docs",path:W.DOCS_URL,newTab:!0},{tx:"feedback",path:W.FEEDBACK_URL,newTab:!0},{tx:"termsOfService",path:W.TERMS_OF_SERVICE_URL,newTab:!0},{tx:"privacyPolicy",path:W.PRIVACY_POLICY_URL,newTab:!0}]}];function F(){return(0,d.useMemo)(()=>U.filter(P).map(B),[])}function V(e){return e.map(e=>"options"in e?e.options.filter(P):[e]).flat()}let K=(e,s)=>e.startsWith(s);e.s(["flattenNavItems",0,V,"getIsPathActive",0,K,"useNavItems",0,F],729305);var G=e.i(479495);let Y=(0,u.css)({ml:"8",letterSpacing:"[0.05em]",textTransform:"uppercase"});function z({label:e}){return(0,s.jsx)(G.Tag,{variant:"secondary",className:Y,children:e})}e.s(["NewBadge",0,z],629124);var $=e.i(266870);function q(){let{accountAddress:e}=(0,w.useAuthState)(),{data:s}=(0,$.useRewardsList)(e);return s.counts.claimable}function H(){let e=(0,c.useTranslations)("navItems"),a=q();return 0===a?null:(0,s.jsxs)("span",{className:J,children:[a,(0,s.jsx)("span",{className:(0,u.css)({srOnly:!0}),children:e("claimableRewardsBadge")})]})}let J=(0,u.css)({ml:"8",minW:"[18px]",h:"[18px]",px:"4",display:"inline-flex",alignItems:"center",justifyContent:"center",rounded:"full",bg:"tag.background.gold",color:"tag.text.gold",fontSize:"11",lineHeight:"[1]",fontWeight:"medium",fontVariantNumeric:"tabular-nums",flexShrink:0});e.s(["RewardsCountBadge",0,H],87919);let Q=(0,h.stack)({mt:"20",gap:"0",px:"24",pt:"8",pb:"[max(env(safe-area-inset-bottom, 0px), 8px)]",overflow:"auto"}
2),X=(0,h.stack)({align:"flex-start",gap:"4",py:"12",cursor:"pointer",flexShrink:0,textAlign:"left"}),Z=(0,x.cva)({base:{display:"flex",alignItems:"center",py:"12",cursor:"pointer",textDecoration:"none",textStyle:"subheading.xs",color:"text.tertiary",transitionPreset:"colors",_hover:{color:"text.primary"}},variants:{variant:{active:{color:"text.secondary"},inactive:{color:"text.tertiary"}}}});e.s(["MobileNavDrawer",0,function({close:e}){let x=(0,c.useTranslations)("navItems"),S=(0,c.useTranslations)("footer"),T=(0,c.useTranslations)("pwaInstall"),I=(0,c.useTranslations)("walletSelector"),A=(0,o.usePathname)(),E=F(),{isViewAsAllowed:D}=(0,N.useViewAs)(),O=(0,f.useAnalytics)(),R=(0,f.useAnalyticsRef)(),{installed:_,inAppBrowser:W,platform:P,iosSafari:B}=(0,j.usePwaInstall)(),{state:U,subaccountAddress:G}=(0,w.useAuthState)(),Y=(0,y.useLogout)(),$=(0,d.useCallback)(()=>{e(),(0,g.openLanguageSwitcherModal)()},[e]),q=(0,d.useCallback)(()=>{O.cardVault.navTabClicked(),e()},[O,e]),J=(0,d.useCallback)(()=>{e(),L()},[e]),ee=(0,d.useCallback)(()=>{R.current.pwa.drawerCtaClicked(),e(),(0,b.openPwaInstallModal)()},[R,e]),es=(0,d.useCallback)(()=>{Y(),e()},[Y,e]),ea=(0,d.useCallback)(()=>{e(),(0,v.openWalletSelectorModal)()},[e]);return(0,s.jsxs)("div",{className:(0,h.stack)({position:"relative",bg:"background.primary",pt:"20",minW:"[min(312px,100vw)]",h:"full",gap:"0"}),children:[(0,s.jsx)(k.DrawerCloseButton,{close:e}),(0,s.jsx)("div",{className:(0,u.css)({position:"absolute",top:"[22px]",right:"24"}),children:(0,s.jsx)(r.IconButton,{size:"lg",variant:"text",onClick:$,ariaLabel:S("changeLanguage"),"data-testid":"mobile-nav-language-button",className:(0,u.css)({p:"12!",m:"-12"}),children:(0,s.jsx)(t.IconGlobe,{className:(0,u.css)({w:"20",h:"20"})})})}),(0,s.jsx)(i.default,{href:"/",className:(0,m.cx)((0,n.focusRing)(),(0,u.css)({alignSelf:"center"})),onClick:e,children:(0,s.jsx)(M.DecibelLogoWordmark,{className:(0,u.css)({color:"white"})})}),(0,s.jsxs)("div",{className:Q,children:[V(E).map((a,t)=>{let l=K(A,a.path),r="cardVault"===a.tx;return(0,s.jsxs)(i.default,{target:a.newTab?"_blank":void 0,className:(0,m.cx)(Z({variant:l?"active":"inactive"}),(0,n.focusRing)()),href:a.path,onClick:r?q:e,children:[x(a.tx),"new"===a.badge&&(0,s.jsx)(z,{label:x("newBadge")}),"rewards"===a.tx&&(0,s.jsx)(H,{})]},t)}),D&&(0,s.jsx)(C.Clickable,{onClick:J,className:(0,m.cx)(Z({variant:"inactive"}),(0,n.focusRing)(),(0,u.css)({textAlign:"left"})),children:x("viewAsUser")}),("WALLET_CONNECTED"===U||"SESSION_KEY_IMPORTED"===U)&&(0,s.jsxs)(C.Clickable,{onClick:es,"aria-label":I("disconnect"),className:(0,m.cx)(X,(0,n.focusRing)()),children:[(0,s.jsxs)("div",{className:(0,p.flex)({align:"center",gap:"8"}),children:[(0,s.jsx)(t.IconSignOut,{className:(0,u.css)({color:"icon.tertiary",w:"20",h:"20"})}),(0,s.jsx)("span",{className:(0,u.css)({textStyle:"subheading.xs",color:"text.tertiary"}),children:I("disconnect")})]}),(0,s.jsx)("span",{className:(0,u.css)({textStyle:"subheading.xs",color:"text.disabled"}),children:(0,a.truncateAddress)(G)})]}),"DISCONNECTED"===U&&(0,s.jsx)(l.Button,{variant:"secondary",onClick:ea,className:(0,u.css)({flexShrink:0,my:"12"}),children:I("connectWallet")}),!_&&!W&&("ios"!==P||B)&&(0,s.jsx)(l.Button,{variant:"brand",onClick:ee,className:(0,u.css)({flexShrink:0,my:"12"}),LeadIcon:t.IconDeviceMobile,children:T("drawerCta")})]})]})}],491570);let ee=(0,u.css)({position:"relative",display:"inline-flex"}),es=(0,x.cva)({base:{position:"absolute",top:"0",right:"-2",w:"[7px]",h:"[7px]",rounded:"full",bg:"tag.text.gold"},variants:{halo:{canvas:{boxShadow:"[0 0 0 4px token(colors.background.canvas)]"},primary:{boxShadow:"[0 0 0 4px token(colors.background.primary)]"}}}});e.s(["NavMenuIcon",0,function({halo:e}){let a=q();return(0,s.jsxs)("span",{className:ee,children:[(0,s.jsx)(t.IconList,{}),a>0&&(0,s.jsx)("span",{"aria-hidden":!0,className:es({halo:e}),"data-testid":"nav-menu-claim-dot"})]})}],986650)}]); 3 4//# debugId=45f8938f-01a1-cf6d-eb47-78b1abbb4a28 5//# sourceMappingURL=05u1dz5ner4j9.js.map
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.