1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="28dd9ee8-95f3-4281-ad02-a1498a25e807",e._sentryDebugIdIdentifier="sentry-dbid-28dd9ee8-95f3-4281-ad02-a1498a25e807")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1847,3951],{4171:(e,a,t)=>{t.r(a),t.d(a,{default:()=>u});var s=t(79237),l=t(51924),r=t(53951),i=t(70659),n=t(66960),o=t(19490),c=t(90477),d=t(76656),m=t(77962),p=t(50791);function x(e){return(0,s.jsxs)("div",{className:"flex items-center justify-between py-2",children:[(0,s.jsx)("span",{className:"text-b14 text-t3",children:e.label}),(0,s.jsx)("span",{className:"text-b14 text-t1 text-right",children:e.value})]})}function u(){let{$t:e}=(0,n.B)(),a=(0,p.hQ)(),t=a.visible,{confirmSubmit:u,displaySymbol:g,form:f,loading:h}=(0,m.N)((0,d.k)(e=>({confirmSubmit:e.actions.confirmSubmit,displaySymbol:e.runtime.displaySymbol,form:e.form,loading:e.runtime.submitting}))),b={NEUTRAL:e("Neutral"),LONG:e("Long"),SHORT:e("Short")}[f.direction],y=(0,c.cn)("text-mm14","NEUTRAL"===f.direction&&"text-p1-dark","LONG"===f.direction&&"text-p2","SHORT"===f.direction&&"text-p3"),v=e("LATEST_PRICE"===f.triggerType?"Last Price":"Mark Price"),N=f.triggerPrice?"".concat(v," ").concat((0,o.iT)(f.triggerPrice)):e("Instant"),j=f.stopLowerPrice||f.stopUpperPrice?"".concat(f.stopLowerPrice?(0,o.iT)(f.stopLowerPrice):"--","/").concat(f.stopUpperPrice?(0,o.iT)(f.stopUpperPrice):"--"):e("Manual"),w=[{label:e("Price Range"),value:"".concat((0,o.iT)(f.lowerPrice),"-").concat((0,o.iT)(f.upperPrice))},{label:e("Grid Qty"),value:(0,o.iT)(f.gridCount)},{label:e("Start Condition"),value:N},{label:e("Stop Condition"),value:j},{label:e("Close all positions when grid ends"),value:e("YES"===f.closeOnStop?"Enabled":"Disabled")}];return(0,s.jsx)(r.DialogRoot,{open:t,onOpenChange:e=>e?a.showLayer():a.hideLayer(),children:(0,s.jsx)(r.DialogContent,{className:"!rounded-r4 !border-l1 !bg-m1 shadow-3 !w-[420px] !max-w-[calc(100vw-32px)] !border !p-0",onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:(0,s.jsxs)("div",{className:"gap-s4 flex flex-col",children:[(0,s.jsx)("div",{className:"px-s6 pt-6",children:(0,s.jsxs)("div",{className:"gap-s3 flex items-start rounded-t-[12px]",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"text-tm18 text-t1 leading-[22px] font-semibold",children:[g," ",e("Perpetual")]}),(0,s.jsxs)("div",{className:"gap-s2 mt-1 flex items-center",children:[(0,s.jsx)("span",{className:"text-mm14 text-t3",children:e("Cross")}),(0,s.jsx)("span",{className:"bg-l1 h-3 w-px shrink-0"}),(0,s.jsxs)("span",{className:y,children:[b," ",f.leverage,"X"]})]})]}),(0,s.jsx)("button",{type:"button",className:"text-t3 hover:text-t1 flex h-[22px] cursor-pointer items-center justify-center py-[2px] transition-colors",onClick:()=>a.hideLayer(),children:(0,s.jsx)(l.U,{className:"size-5"})})]})}),(0,s.jsxs)("div",{className:"gap-s3 flex flex-col px-6",children:[(0,s.jsx)("div",{className:"flex flex-col",children:w.map(e=>(0,s.jsx)(x,{label:e.label,value:e.value},e.label))}),(0,s.jsx)("div",{className:"border-l1 border-t"}),(0,s.jsx)(x,{label:e("Initial Margin"),value:"".concat((0,o.iT)(f.margin)," USDT")})]}),(0,s.jsxs)("div",{className:"gap-s2 px-s6 grid grid-cols-2 pb-6",children:[(0,s.jsx)(i.$,{variant:"secondary",size:"m",className:"h-10",onClick:()=>a.hideLayer(),children:e("Cancel")}),(0,s.jsx)(i.$,{size:"m",className:"h-10",loading:h,disabled:h,onClick:u,children:e("Confirm to Create")})]})]})})})}},53951:(e,a,t)=>{t.r(a),t.d(a,{Dialog:()=>w,DialogClose:()=>g,DialogContent:()=>h,DialogDescription:()=>N,DialogFooter:()=>y,DialogHeader:()=>b,DialogOverlay:()=>f,DialogPortal:()=>u,DialogRoot:()=>p,DialogTitle:()=>v,DialogTrigger:()=>x});var s=t(79237),l=t(91405),r=t(90477),i=t(45056),n=t(12407),o=t(61058),c=t(38113),d=t(51924),m=t(70659);let p=i.bL,x=i.l9,u=i.ZL,g=i.bm,f=c.forwardRef((e,a)=>{let{className:t,...l}=e;return(0,s.jsx)(i.hJ,{ref:a,className:(0,r.Q)("bg-p6 fixed inset-0 z-300","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...l})});f.displayName=i.hJ.displayName;let h=c.forwardRef((e,a)=>{let{className:t,children:l,style:n,overlayClassName:o,...c}=e;return(0,s.jsxs)(u,{children:[(0,s.jsx)(f,{className:o}),(0,s.jsx)(i.UC,{ref:a,style:n,className:(0,r.Q)("fixed top-[50%] left-[50%] z-300 translate-x-[-50%] translate-y-[-50%] outline-none","w-[420px] max-md:w-[calc(100vw-var(--spacing-s8)-var(--spacing-s8))] max-md:max-w-[420px]","flex flex-col","border-l1 bg-m1 p-s6 shadow-3 rounded-[12px] border","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...c,children:l})]})});h.displayName=i.UC.displayName;let b=e=>{let{className:a,...t}=e;return(0,s.jsx)("div",{className:(0,r.Q)("gap-s4 flex flex-col",a),...t})};b.displayName="DialogHeader";let y=e=>{let{className:a,layout:t="horizontal",...l}=e;return(0,s.jsx)("div",{className:(0,r.Q)("gap-s2 flex w-full","horizontal"===t?"flex-row":"flex-col",a),...l})};y.displayName="DialogFooter";let v=c.forwardRef((e,a)=>{let{className:t,showClose:l=!0,onClose:n,children:o,...c}=e;return(0,s.jsxs)("div",{className:"gap-s6 flex items-center justify-between",children:[(0,s.jsx)(i.hE,{ref:a,className:(0,r.Q)("text-t1 text-tm18 flex-1",t),...c,children:o}
1),l&&(0,s.jsx)(g,{className:"flex h-[22px] cursor-pointer items-center justify-center px-0 py-[2px] focus:outline-none",onClick:n,children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(d.U,{className:"text-t3 size-5"})})})]})});v.displayName=i.hE.displayName;let N=c.forwardRef((e,a)=>{let{className:t,...l}=e;return(0,s.jsx)(i.VY,{ref:a,className:(0,r.Q)("text-t2 text-b14",t),...l})});N.displayName=i.VY.displayName;let j=(0,n.default)(()=>Promise.all([t.e(2243),t.e(3447)]).then(t.bind(t,33447)),{loadableGenerated:{webpack:()=>[33447]},ssr:!1}),w=e=>{let{trigger:a,defaultOpen:t,open:i,onOpenChange:n,title:d,description:u,showClose:f=!0,okText:w,cancelText:C,onOk:P,onCancel:T,okButtonProps:D,cancelButtonProps:S,footerLayout:L,footer:k=null,children:E,onClose:O,className:R,hideHeader:z=!1,headerClassName:U,bodyClassName:A,footerClassName:I,preventOutsideClose:Q=!1,preventEscapeClose:_=!1,variant:B="default",overlayClassName:F,onOpenAutoFocus:M}=e,$=(0,l.no)(),[H,G]=c.useState(!1);c.useEffect(()=>{G(!0)},[]);let[Y,J]=c.useState(null!=t&&t),K=void 0!==i,V=K?i:Y,W=K?n:e=>{J(e),null==n||n(e)},X=L||(w&&C?"horizontal":"single"),Z="vertical"===X?"vertical":"horizontal",q=!z&&(d||u||f),ee=(e,a,t,s,l)=>{let{className:i,onClick:n,variant:o,size:c,...d}=e||{};return{...d,variant:o||a,size:c||t,className:(0,r.Q)(s,i),onClick:((e,a)=>t=>{null==e||e(t),t.defaultPrevented||null==a||a()})(n,l)}};return"drawer"===B&&H&&$?(0,s.jsx)(j,{open:V,onOpenChange:W,trigger:a,title:d,description:u,showClose:f,okText:w,cancelText:C,onOk:P,onCancel:T,okButtonProps:D,cancelButtonProps:S,footerLayout:L,footer:k,onClose:O,className:R,hideHeader:z,headerClassName:U,bodyClassName:A,footerClassName:I,dismissible:!Q,overlayClassName:F,children:E}):(0,s.jsxs)(p,{open:V,onOpenChange:W,children:[a&&(0,s.jsx)(x,{asChild:!0,children:a}),(0,s.jsxs)(h,{"aria-describedby":u?"dialog-description":void 0,className:R,overlayClassName:F,onOpenAutoFocus:M,onInteractOutside:e=>{Q&&e.preventDefault()},onPointerDownOutside:e=>{Q&&e.preventDefault()},onEscapeKeyDown:e=>{_&&e.preventDefault()},children:[q?(0,s.jsxs)(b,{className:U,children:[(0,s.jsx)(v,{showClose:f,onClose:()=>{null==W||W(!1),null==O||O()},children:d}),u&&(0,s.jsx)(N,{children:u})]}):(0,s.jsx)(o.bL,{children:(0,s.jsx)(v,{showClose:f,children:d})}),E&&(0,s.jsx)("div",{className:(0,r.Q)(q?"mt-s4":"mt-0",A),children:E}),(()=>{if(!1===k)return null;let e=k;return k||(e=(0,s.jsx)(y,{layout:Z,children:"single"===X?(0,s.jsx)(s.Fragment,{children:w?(0,s.jsx)(m.$,{...ee(D,"primary","m","w-full",P),children:w}):C?(0,s.jsx)(g,{asChild:!0,children:(0,s.jsx)(m.$,{...ee(S,"secondary","m","w-full",T),children:C})}):null}):"vertical"===X?(0,s.jsxs)(s.Fragment,{children:[w&&(0,s.jsx)(m.$,{...ee(D,"primary","l","h-11 w-full md:h-12",P),children:w}),C&&(0,s.jsx)(g,{asChild:!0,children:(0,s.jsx)(m.$,{...ee(S,"white","l","text-t3 h-11 w-full border-none md:h-12",T),children:C})})]}):(0,s.jsxs)(s.Fragment,{children:[C&&(0,s.jsx)(g,{asChild:!0,children:(0,s.jsx)(m.$,{...ee(S,"secondary","m","h-10 flex-1",T),children:C})}),w&&(0,s.jsx)(m.$,{...ee(D,"primary","m",C?"h-10 flex-1":"h-10 w-full",P),children:w})]})})),(0,s.jsx)("div",{className:(0,r.Q)("mt-s7",I),children:e})})()]})]})};w.displayName="Dialog"},77962:(e,a,t)=>{t.d(a,{N:()=>n});var s=t(41809);let l=e=>({symbol:e,direction:"NEUTRAL",leverage:10,lowerPrice:"",upperPrice:"",gridCount:"",type:"ARITHMETIC",margin:"",triggerType:"",triggerPrice:"",stopTriggerType:"",stopLowerPrice:"",stopUpperPrice:"",closeOnStop:"YES"}),r=()=>{},i={changeForm:r,copyStrategy:r,submit:r,confirmSubmit:r,changeLeverage:r,changeMarginByPercent:r},n=(0,s.v)(e=>({activeTab:"recommend",form:l("BTC-SWAP"),advancedOpen:!1,runtime:{serviceSymbol:"BTC-SWAP",displaySymbol:"BTCUSDT",baseAsset:"BTC",balance:0,lastPrice:0,markPrice:0,isLoggedIn:!1,recommendations:[],recommendationsLoading:!1,computeData:{},gridCountMin:2,gridCountMax:50,minMargin:0,maxLeverage:150,leverageTiers:[],multiplier:0,contractPrecision:2,sliderPercent:0,perGridProfitText:"--",validationError:"",submitting:!1},initialize:a=>e(e=>e.form.symbol===a?e:{form:{...l(a),leverage:e.form.leverage}}),setActiveTab:a=>e({activeTab:a}),updateForm:a=>e(e=>({form:{...e.form,...a}})),setAdvancedOpen:a=>e({advancedOpen:a}),syncRuntime:a=>e(e=>({runtime:{...e.runtime,...a}})),actions:i,syncActions:a=>e({actions:a}),resetAfterSuccess:()=>e(e=>
1({advancedOpen:!1,form:{...e.form,lowerPrice:"",upperPrice:"",gridCount:"",margin:"",triggerType:"",triggerPrice:"",stopTriggerType:"",stopLowerPrice:"",stopUpperPrice:"",closeOnStop:"YES"}}))}))}}]);
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.