1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae699769-d96f-4c89-a147-eedbb2880681",e._sentryDebugIdIdentifier="sentry-dbid-ae699769-d96f-4c89-a147-eedbb2880681")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3500],{2899:(e,t,a)=>{a.d(t,{w:()=>i});var s=a(86917),l=a(25722),n=a(49819),r=a(57849);let i=e=>{var t;let{depositMethod:a,settleMethod:i,isLoading:o,onError:d}=e,c=(0,n.IT)(r.q7,{variables:{depositMethodId:null==a?void 0:a.id,settleMethodId:null==i?void 0:i.id},skip:!a||!i,onError:d}),{loading:u,data:m}=c,h=(0,l._)(c,["loading","data"]),f=u||o,x=null==m||null==(t=m.rate)?void 0:t.rate,p=a&&i&&x&&!f?{depositAsset:a.asset.id,settleAsset:i.asset.id,rate:x}:{isLoading:!0};return(0,s._)({rateProps:p,data:m,loading:u},h)}},4650:(e,t,a)=>{a.d(t,{B:()=>d});var s=a(49819),l=a(7687),n=a(53024),r=a(66656),i=a(57849),o=a(47996);let d=e=>{let{assetId:t,setValue:a,watch:d,fieldName:c}=e,{usdToFiatRate:u,fiatCurrency:m}=(0,o.P)(),[h,f]=(0,r.useState)(!1),x=d(c),{data:p,loading:v}=(0,s.IT)(i.JW,{variables:{base:t?(0,n.Ip)(t):t,quote:l.A0.USD},pollInterval:3e4,skip:!t}),g=(0,r.useMemo)(()=>{if((null==p?void 0:p.price)&&u){let e=parseFloat(p.price);if(e>0)return 1/(e*u)}},[p,u]),b=(0,r.useCallback)(e=>{if(!g)return null;let t=parseFloat(e);return Number.isNaN(t)?null:(t*g).toString()},[g]),y=(0,r.useCallback)(e=>{if(!(null==p?void 0:p.price)||!u)return null;let t=parseFloat(e),a=parseFloat(p.price);return Number.isNaN(t)||a<=0?null:(t*a*u).toFixed(2)},[p,u]),w=(0,r.useMemo)(()=>{var e;return h&&x&&null!=(e=b(x))?e:x},[x,h,b]),j=(0,r.useCallback)(()=>{if(!x||"0"===x||""===x)return void f(e=>!e);if(h){let e=b(x);e&&(a(c,e,{shouldValidate:!0}),f(!1))}else if((null==p?void 0:p.price)&&u){let e=parseFloat(x),t=parseFloat(p.price);!Number.isNaN(e)&&t>0&&(a(c,(e*t*u).toFixed(2),{shouldValidate:!0}),f(!0))}},[x,h,p,u,b,a,c]),k=(0,r.useCallback)(()=>{if(!h)return;if(!x||"0"===x||""===x)return void f(!1);let e=b(x);e&&a(c,e,{shouldValidate:!0}),f(!1)},[h,x,b,a,c]),S=(0,r.useCallback)(function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{fiatCurrency:e?m:void 0,isFiatInputMode:e&&h,onToggleFiatMode:e?t||j:void 0,usdToCryptoRate:e?g:void 0,showFiatValueAsToggle:e&&a}},[m,h,j,g]),N=v||h&&!g;return{isFiatInputMode:h,fiatToCryptoRate:g,fiatCurrency:m,cryptoAmount:w,toggleFiatMode:j,disableFiatMode:k,convertFiatToCrypto:b,convertCryptoToFiat:y,getShiftInputProps:S,isLoading:N,isPriceLoading:v}}},6101:(e,t,a)=>{a.d(t,{k:()=>l});var s=a(66656);let l=()=>{let[e,t]=(0,s.useState)(!1);return{isOpen:e,handleToggleSelect:()=>{t(!e)}}}},7259:(e,t,a)=>{a.d(t,{n:()=>r});var s=a(17514),l=a(64344),n=a(46967);let r=()=>{let e=(0,s.c)("address");return(t,a)=>{let s=((e,t)=>e?(0,l.O)(t)&&(0,l.O)(e)?{kind:"accountId"}:{kind:"address",assetLabel:(0,n.eQ)(e)}:{kind:"default"})(t,a);switch(s.kind){case"accountId":return e("placeholderAccountId");case"address":return e("placeholderAddress",{asset:s.assetLabel});default:return e("placeholderDefault")}}}},7754:(e,t,a)=>{a.d(t,{$:()=>i,P:()=>r.P});var s=a(76908),l=a(28418);a(66656);var n=a(83612),r=a(64925);let i=e=>{let t="cursor-pointer dark:bg-darkest-gray/60 bg-flashbang-white hover:bg-light-smoke/50 font-text dark:hover:bg-darkest-gray mb-1 flex w-full items-center\n justify-between rounded-md px-5 py-3 transition-all no-underline",a=(0,n.A)("connector"in e?e.connector:e.name),i=a.text===r.P.generic.text,{name:o,icon:d}="connector"in e?e.connector:e,c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",Object.assign({className:"flex items-center gap-4"},{children:[(0,s.jsx)("div",Object.assign({className:"flex aspect-square w-9 items-center justify-center rounded-full"},{children:(0,s.jsx)("img",{className:(0,l.QP)("h-6 w-6",i&&"invert-0 dark:invert h-8 w-8"),src:a.icon||d,alt:`${o} icon`})})),(0,s.jsx)("span",Object.assign({className:"dark:text-flashbang-white text-new-black text-lg uppercase"},{children:o}))]})),(0,s.jsx)("img",{src:"data:image/svg+xml,%3csvg fill='none' height='14' viewBox='0 0 8 14' width='8' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m1.50023 13 4.64828-4.64828c.18754-.18754.2929-.44189.2929-.70711v-1.28922c0-.26522-.10536-.51957-.2929-.70711l-4.64828-4.64828' stroke='white' stroke-linecap='round' stroke-width='1.5'/%3e%3c/svg%3e",className:"invert dark:invert-0",alt:"Arrow facing right"})]});if("href"in e)return(0,s.jsx)("a",Object.assign({href:e.href||"#",rel:"noopener noreferrer",target:"_blank",className:t},{children:c}));if("connector"in e){let{connector:a,onConnect:l}=e;return(0,s.jsx)("button",Object.assign({type:"button",onClick:()=>{let e=l(a);e&&"function"==typeof e.catch&&e.catch(()=>{console.error("Error connecting your wallet")})},className:t},{children:c}))}let{onConnect:u}=e;return(0,s.jsx)("button",Object.assign({type:"button",onClick:()=>
1{if(u){let e=u();e&&"function"==typeof e.catch&&e.catch(()=>{console.error("Error connecting you wallet")})}},className:t},{children:c}))}},13500:(e,t,a)=>{a.d(t,{l:()=>b});var s,l,n,r=a(76908),i=a(28418),o=a(66656);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(null,arguments)}let c=e=>o.createElement("svg",d({viewBox:"0 0 19 58",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=o.createElement("path",{d:"m3.2 3.647 10.312 17.367a16 16 0 0 1-.057 16.433l-10.255 17",stroke:"currentColor",strokeWidth:6,strokeLinecap:"round",strokeLinejoin:"round"})));function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(null,arguments)}let m=e=>o.createElement("svg",u({viewBox:"0 0 78 86",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l||(l=o.createElement("path",{d:"M33.304 2.866a11.392 11.392 0 0 1 11.392 0L70.909 18a11.392 11.392 0 0 1 5.696 9.866v30.268c0 4.07-2.171 7.83-5.696 9.866L44.696 83.134a11.392 11.392 0 0 1-11.392 0L7.091 68a11.392 11.392 0 0 1-5.696-9.866V27.866c0-4.07 2.171-7.83 5.696-9.866L33.304 2.866Z",stroke:"currentColor"})));function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(null,arguments)}let f=e=>o.createElement("svg",h({viewBox:"0 0 114 104",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=o.createElement("path",{d:"M3.052 59.997a15.5 15.5 0 0 1 0-15.5L23.414 9.23a15.5 15.5 0 0 1 13.424-7.75h40.724a15.5 15.5 0 0 1 13.424 7.75l20.362 35.268a15.5 15.5 0 0 1 0 15.5l-20.362 35.27a15.5 15.5 0 0 1-13.424 7.749H36.838a15.5 15.5 0 0 1-13.424-7.75L3.052 59.997Z",stroke:"currentColor"}))),x={1:{columns:{sm:1,md:1,lg:1},gridClasses:"sm:grid-cols-1"},2:{columns:{sm:1,md:2,lg:2},gridClasses:"sm:grid-cols-1 md:grid-cols-2"},3:{columns:{sm:1,md:3,lg:3},gridClasses:"sm:grid-cols-1 md:grid-cols-3"},4:{columns:{sm:2,md:2,lg:4},gridClasses:"sm:grid-cols-2 lg:grid-cols-4"}},p={columns:{sm:2,md:3,lg:5},gridClasses:"sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5"},v=["h-px","flex-1"],g=(e,t,a)=>[e?"sm:opacity-100":"sm:opacity-0",t?"md:opacity-100":"md:opacity-0",a?"lg:opacity-100":"lg:opacity-0"],b=({steps:e,title:t})=>{let a=e.length,{columns:s,gridClasses:l}=(e=>e<=0?x[1]:x[e]||p)(a);return 0===a?null:(0,r.jsx)("section",Object.assign({id:"shift-process","aria-label":"How it works"},{children:(0,r.jsx)("div",Object.assign({className:"mx-auto w-full max-w-7xl py-10 sm:py-16"},{children:(0,r.jsxs)("div",Object.assign({className:"flex flex-col items-center gap-x-16"},{children:[(0,r.jsx)("h2",Object.assign({className:"dark:text-flashbang-white text-new-black font-display my-0 mb-8 w-full text-center text-2xl sm:mb-12 sm:text-[2.5rem] sm:leading-[1.15]"},{children:t})),(0,r.jsx)("div",Object.assign({className:(0,i.QP)("grid w-full grid-cols-1 gap-y-8",l)},{children:e.map((e,t,a)=>{let l=t===a.length-1,n=[...v];if(0===t)n.push("bg-none","opacity-100");else{n.push("dark:bg-flashbang-white","bg-new-black","opacity-0");let e=t%s.sm!=0,a=t%s.md!=0,l=t%s.lg!=0;n.push(...g(e,a,l))}let o=[...v];if(l)o.push("bg-none","opacity-100");else{o.push("dark:bg-flashbang-white","bg-new-black","opacity-0");let e=(t+1)%s.sm!=0,a=(t+1)%s.md!=0,l=(t+1)%s.lg!=0;o.push(...g(e,a,l))}return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",Object.assign({className:(0,i.QP)("mb-4 flex items-center justify-center sm:mb-8")},{children:[(0,r.jsx)("div",{className:(0,i.QP)(n)}),(0,r.jsxs)("div",Object.assign({className:(0,i.QP)("text-new-black relative",t===a.length-1?"dark:text-matrix-green":"dark:text-flashbang-white")},{children:[(0,r.jsx)(f,{className:"hidden h-28 w-28 sm:block"}),(0,r.jsx)(m,{className:"h-22 w-22 sm:hidden"}),(0,r.jsx)("span",Object.assign({className:"font-display absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-3xl"},{children:t+1})),t<a.length-1&&(0,r.jsx)(c,{className:"absolute -bottom-2 left-1/2 w-3 -translate-x-1/2 rotate-90 sm:-right-3 sm:left-[unset] sm:top-1/2 sm:w-5 sm:-translate-y-1/2 sm:rotate-0"})]})),(0,r.jsx)("div",{className:(0,i.QP)(o)})]})),(0,r.jsx)("p",Object.assign({className:"dark:text-flashbang-white text-new-black font-text m-0 px-8 text-center text-lg font-medium uppercase"},{children:e}))]},`${e}-horizontal-step`)})}))]}))}))}))}},20794:(e,t,a)=>{a.d(t,{A:()=>r});var s,l=a(66656);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let r=e=>l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:48,viewBox:"0 -960 960 960"},e),s||(s=l.createElement("path",{fill:"currentColor",d:"M220-80q-24.75 0-42.375-17.625T160-140v-434q0-24.75 17.625-42.375T220-634h70v-96q0-78.85 55.606-134.425T480.106-920 614.5-864.425 670-730v96h70q24.75 0 42.375 17.625T800-574v434q0 24.75-17.625 42.375T740-80zm0-60h520v-434H220zm260.168-140Q512-280 534.5-302.031T557-355q0-30-22.668-54.5t-54.5-24.5-54.332 24.5-22.5 55 22.668 52.5 54.5 22M350-634h260v-96q0-54.167-37.882-92.083-37.883-37.917-92-37.917Q426-860 388-822.083 350-784.167 350-730zM220-140v-434z"})))},21137:(e,t,a)=>{a.d(t,{E:()=>d});var s=a(29288),l=a(66656),n=a(11878),r=a(8442),i=a(62012),o=a(97024);let d=e=>{let{message:t,show:a=!0}=e,[d,c]=(0,l.useState)(!1),{show:u,showNewMessage:m}=(0,n.B)(),{isBooted:h,bootNow:f}=(0,r.H)(),x=(0,o.o)().get(i.jw.OPEN_SUPPORT),{isReady:p}=(0,s.useRouter)();(0,l.useEffect)(()=>
1{if(x&&!d&&a&&p){if(!h)return void f();u(),m(t),c(!0)}},[x,a,p,h])}},27727:(e,t,a)=>{a.d(t,{M:()=>l});var s=a(66656);let l=e=>{let{distance:t="100px",threshold:a=0}=e,[l,n]=(0,s.useState)(!1),r=(0,s.useRef)(null);return(0,s.useEffect)(()=>{n(!1);let e=new IntersectionObserver((e,t)=>{e[0].isIntersecting&&(n(!0),t.disconnect())},{rootMargin:t,threshold:a});return r.current&&e.observe(r.current),()=>{e.disconnect()}},[t,a]),{isNearScreen:l,fromRef:r}}},33500:(e,t,a)=>{let s;a.d(t,{iv:()=>tM,f2:()=>tY,eA:()=>x});var l,n,r=a(86917),i=a(97722),o=a(49819),d=a(7687),c=a(53024),u=a(83141),m=a(66656),h=a(48041),f=a(57849);let x=e=>{var t;let{orderId:a}=e,{data:s,stopPolling:l}=(0,o.IT)(f.QF,{variables:{orderId:a||""},pollInterval:1e3,skip:!a}),{settled:n,refunded:x}=d.U_;(0,m.useEffect)(()=>{if(null==s?void 0:s.order){let{deposits:e}=s.order,t=e&&e.length>0?e[e.length-1]:null;t&&(t.status===x||t.status===n)&&l()}},[null==s||null==(t=s.order)?void 0:t.deposits]);let{depositMethod:p,settleMethod:v}=(0,h.u)(),g=(null==s?void 0:s.order)?(0,i._)((0,r._)({},s.order),{depositMethod:(0,c.JV)(s.order.depositMethod),settleMethod:(0,c.JV)(s.order.settleMethod)}):null,b=g&&(0,u.s_)(g.deposits),y=[d.U_.settled,d.U_.refunded].includes((null==b?void 0:b.status)||""),w=a&&g||!p?!!g&&!y:!!p&&!!v;return{props:g?{order:g}:{depositMethod:p,settleMethod:v},shouldShowOrderTopbar:w}};var p=a(76908),v=a(76180),g=a(50087),b=a(27230),y=a(54381),w=a.n(y),j=a(29288),k=a(12605);let S=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var N=a(47380),E=a(22602),C=a(97024),M=a(21137),O=a(62012),R=a(28048),A=a(81817),T=a(64344);let I=e=>{let{depositMethod:t,settleMethod:a,depositMethods:s,settleMethods:l}=e;return!(t.fixedOnly&&a.variableOnly||t.variableOnly&&a.fixedOnly||(0,T.O)(a)&&!(0,T.O)(t))&&!!s[t.id]&&!!l[a.id]&&!!a.enabled&&!!t.enabled};var L=a(50457),_=a(31465),P=a(17514),F=a(20794),z=a(53397),Q=a(18535);let D=e=>{let{disabled:t,depositMethod:a,settleMethod:s,onChange:l,orderType:n}=e,r=(0,P.c)("orderType"),i=!!(null==a?void 0:a.fixedOnly)||!!(null==s?void 0:s.fixedOnly),o=!!(null==a?void 0:a.variableOnly)||!!(null==s?void 0:s.variableOnly),{layoutName:c}=(0,Q.A)();(0,m.useEffect)(()=>{i&&n===d.ZN.variable&&l(d.ZN.fixed),o&&n===d.ZN.fixed&&l(d.ZN.variable)},[i,o]);let u=Object.values(d.ZN).map(e=>{let a=e===d.ZN.fixed?o:i,s=e===d.ZN.fixed?r("fixedRate"):r("variableRate");return{label:s,ariaLabel:s,selected:n===e,onSelect:()=>l(e),disabled:t||a,disabledDescription:a?r("unavailableForPair"):void 0}}),h=(0,p.jsxs)("div",{children:[(0,p.jsx)("strong",{children:r("tooltipVariableTitle")})," ",r("tooltipVariableBody"),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),(0,p.jsx)("strong",{children:r("tooltipFixedTitle")})," ",r("tooltipFixedBody")]});return(0,p.jsx)(z.B,{options:u,tooltipChildren:h,position:c===g.kX.MOBILE_XS?"center":"start",groupLabel:r("rateType"),"data-sentry-element":"TabSelector","data-sentry-component":"OrderTypeToggle","data-sentry-source-file":"OrderTypeToggle.tsx"})};var q=a(37322),V=a(37682),B=a.n(V);function U(){return(U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let Z=e=>m.createElement("svg",U({xmlns:"http://www.w3.org/2000/svg",width:48,viewBox:"0 -960 960 960"},e),l||(l=m.createElement("path",{fill:"currentColor",d:"M160-200v-60h80v-280q0-83 50-147.5T420-774v-26q0-25 17.5-42.5T480-860t42.5 17.5T540-800v26q80 22 130 86.5T720-540v280h80v60zm320 100q-33 0-56.5-23.5T400-180h160q0 33-23.5 56.5T480-100M300-260h360v-280q0-75-52.5-127.5T480-720t-127.5 52.5T300-540z"})));var W=a(49777),G=a(26477),H=a(50866),K=a(30990);let J=B()(()=>a.e(5770).then(a.bind(a,95770)).then(e=>e.PriceAlertCreateModal),{loadableGenerated:{webpack:()=>[95770]},loading:W.q}),$=B()(()=>Promise.all([a.e(5072),a.e(8898)]).then(a.bind(a,58898)).then(e=>e.LinkTelegramModal),{loadableGenerated:{webpack:()=>[58898]}}),Y=()=>{a.e(5770).then(a.bind(a,95770)).catch(()=>{}),Promise.all([a.e(5072),a.e(8898)]).then(a.bind(a,58898)).catch(()=>{})},X=e=>{let{fromAssetId:t,telegramPairedAt:a,refetchSession:s}=e,{isEnabled:l}=(0,H.u)(g.mM),{accountSecret:n}=(0,G.j)(),[r,i]=(0,m.useState)(!1),[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(!1);return l&&t&&n?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"contents",onMouseEnter:Y,onFocus:Y,children:(0,p.jsx)(q.m,{id:"price-alert-button",place:"top",Icon:Z,iconSize:20,content:K.c.priceAlert.setAlert,onClick:()=>{i(!0),d(!0)},className:"text-darker-gray dark:text-flashbang-white ml-2 p-0","data-sentry-element":"Tooltip","data-sentry-source-file":"PriceAlertButton.tsx"})}),r&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(J,{isOpen:o,hasPairedTelegram:!!a,onClose:()=>d(!1),onPairTelegramClick:()=>{d(!1),u(!0)},fromAssetId:t}),(0,p.jsx)($,{modalIsOpen:c,closeModal:()=>u(!1),onPaired:async()=>{try{var e,t;if(!(null==(t=(await s()).data)||null==(e=t.session)?void 0:e.telegramPairedAt))return}catch(e){return}u(!1),d(!0)}})]})]}):null};var ee=a(2024);let et=e=>{let{balances:t}=(0,ee.X)();return(0,m.useMemo)(()=>{var a;let s=null==e?void 0:e.asset.id;if(s)return null==(a=t.find(e=>e.asset.toUpperCase()===s.toUpperCase()))?void 0:a.current},[t,null==e?void 0:e.asset.id])},ea=function(e,t){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=s=>{let{key:l}=s,{activeElement:n}=document,r=(null==n?void 0:n.tagName)==="INPUT",i=!!(null==n?void 0:n.closest('[role="dialog"]'));l!==e||!a||r||i||t()};(0,m.useEffect)(()=>(window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}),[a])};var es=a(6101),el=a(40317),en=a(40194),er=a(5601),ei=a(37920);let eo=["amount too high","amount too low","greater than zero"],{DepositAmount:ed,SettleAmount:ec,Quote:eu,IsLoadingQuote:em}=A.Q3,eh=()=>{let[e,{loading:t,error:a}]=(0,el.n)(er.vL),{depositMethod:s,settleMethod:l,setValue:n}=(0,h.u)(),r=(0,ei.A)();return(0,m.useEffect)(()=>{n(em,t)},[t,n]),{handleRequestQuote:async(t,a,i)=>{let{onError:o}=i||{};if(!a||!s||!l)return;let c=t===ed?s:l;try{let{data:r}=await e({variables:{input:{depositMethod:s.id,settleMethod:l.id,[t]:(0,d.n2)(a,c.decimals)}}});if(!(null==r?void 0:r.requestQuote))return;let{requestQuote:i}=r;n(eu,i)}catch(e){n(eu,null),n(t===ed?ec:ed,""),null==o||o(),e instanceof en.K4&&!eo.some(t=>e instanceof en.K4&&e.message.toLowerCase().includes(t.toLowerCase()))&&
1(0,b.P0)({text:r(null==e?void 0:e.message),type:"error",toastId:e.name})}},loading:t,error:a}};var ef=a(2899),ex=a(53146),ep=a(4984),ev=a(25722),eg=a(67496),eb=a(57377),ey=a(80803),ew=a(59824);let ej=e=>{let{id:t,suggestions:a,activeIndex:s,onSelect:l,className:n}=e,r=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let e=r.current;if(!e||s<0)return;let t=e.children[s];t&&t.scrollIntoView({block:"nearest"})},[s]),(0,p.jsx)("div",{className:(0,ew.QP)("ph-no-capture absolute left-0 right-0 top-full z-50 mt-1 overflow-hidden rounded-lg border-2 border-new-black dark:border-flashbang-white bg-flashbang-white dark:bg-new-black shadow-lg",n),"data-sentry-component":"AddressAutocomplete","data-sentry-source-file":"AddressAutocomplete.tsx",children:(0,p.jsx)("ul",{ref:r,role:"listbox",id:t,"aria-label":"Saved addresses",className:"max-h-48 overflow-y-auto",children:a.map((e,a)=>(0,p.jsxs)("li",{id:"".concat(t,"-option-").concat(a),role:"option","aria-selected":a===s,className:"flex cursor-pointer flex-col px-4 py-2.5 transition-colors ".concat(a===s?"bg-smoke/50 dark:bg-darker-gray/50":"hover:bg-smoke/50 dark:hover:bg-darker-gray/50"),onMouseDown:t=>{t.preventDefault(),l(e)},children:[(0,p.jsx)("span",{className:"text-sm font-medium dark:text-flashbang-white",children:e.label}),(0,p.jsx)("span",{className:"font-text w-full break-all text-xs text-darker-gray dark:text-smoke",children:e.address})]},e.id))})})};var ek=a(21996),eS=a(59487),eN=a(74455),eE=a(77387),eC=a(7259),eM=a(94881),eO=a(93735);let eR=e=>(0,d.Rb)(e.toLowerCase())?"evm":e.toLowerCase(),eA=(e,t)=>eR(e.chain)===eR(t);var eT=a(46598);let eI=e=>{var t,a,s;let{predefinedSettleAddress:l,disabled:n}=e,o=(0,m.useId)(),c=(0,m.useId)(),u=(0,P.c)("createOrder"),f=(0,P.c)("common"),x=(0,eC.n)(),[v,g]=(0,m.useState)(!1),[b,y]=(0,m.useState)(!1),[w,j]=(0,m.useState)(-1),[k,S]=(0,m.useState)(null),{depositMethod:N,settleMethod:E,setValue:C,register:M,resetField:O,formState:{errors:T},trigger:I,settleAddress:L,orderType:_,getValues:F}=(0,h.u)(),{handleRequestQuote:z}=eh(),{findByAddress:Q,isFull:D,isLocked:q,isLoading:V}=(0,eO.J)(),{accountSecret:B}=(0,G.j)(),{logEvent:U}=(0,eT.s)(),Z=E?(e=>{let{transport:t,network:a}=e;return t===d.mM.erc20||t===d.qq.ethereum?d.qq.ethereum:t===d.mM.trc20||t===d.qq.tron?d.qq.tron:a})(E):void 0,W=(0,m.useRef)(Z);(0,m.useEffect)(()=>{let e=W.current;void 0!==e&&e!==Z&&L&&!l&&O(A.Q3.SettleAddress,{defaultValue:""}),W.current=Z},[Z]),(0,eM.V)({errors:T,trigger:I});let H=(0,m.useCallback)(async(e,t)=>(C(e,t),I(e)),[C,I]),K=(0,m.useCallback)(async(e,t)=>{try{await z(e,t);let a=F(A.Q3.Quote);(null==a?void 0:a.depositAmount)&&C(A.Q3.DepositAmount,a.depositAmount,{shouldValidate:!0})}catch(e){(0,R.A)(["Failed to request quote after QR scan",e],R._.ERROR)}},[z,C,F]);(0,m.useEffect)(()=>{l&&C(A.Q3.SettleAddress,l,{shouldValidate:!0})},[l,Z]);let J=((e,t)=>{let{entries:a}=(0,eO.J)();return(0,m.useMemo)(()=>{if(!e||0===a.length)return[];let s=t.trim().toLowerCase();return a.filter(t=>!!eA(t,e)&&(!s||t.label.toLowerCase().includes(s)||t.address.toLowerCase().includes(s)))},[a,e,t])})(b?null==E?void 0:E.network:void 0,null!=L?L:""),$=b&&J.length>0&&!L,Y=null!=(s=null==L?void 0:L.trim())?s:"",X=!!Y&&L===Y&&(0,eg.ii)(null==E?void 0:E.id).test(Y),ee=!!B&&!!E&&!V&&!q,et=ee&&!n,ea=ee&&Y?Q(Y):void 0,es=ea&&(null==E?void 0:E.network)&&X&&eA(ea,E.network)?ea:void 0,el=et&&!D&&!T.settleAddress&&!ea&&X;(0,m.useEffect)(()=>{S(e=>e&&e.network!==(null==E?void 0:E.network)?null:e)},[null==E?void 0:E.network]),(0,m.useEffect)(()=>{if(!$)return void j(e=>-1!==e?-1:e);j(e=>0===J.length?-1:e>=J.length?J.length-1:e)},[$,J.length]);let en=(0,m.useCallback)(()=>{j(-1),y(!0)},[]),er=(0,m.useCallback)(e=>{var t;let a=J.findIndex(t=>t.id===e.id);U("address_book_autocomplete_select",{address_type:Z,network:null!=(t=null==E?void 0:E.network)?t:null,selection_index:a>=0?a:null,source:"create_order",suggestion_count:J.length}),H(A.Q3.SettleAddress,e.address).catch(e=>(0,R.A)([e],R._.ERROR)),y(!1)},[Z,U,H,null==E?void 0:E.network,J]),ei=(0,m.useCallback)(e=>{S({address:e,network:null==E?void 0:E.network}),y(!1)},[null==E?void 0:E.network]),eo=(0,m.useCallback)(e=>{if($)if("ArrowDown"===e.key)e.preventDefault(),j(e=>Math.min(e+1,J.length-1));else if("ArrowUp"===e.key)e.preventDefault(),j(e=>Math.max(e-1,-1));else if("Enter"===e.key&&w>=0){e.preventDefault();let t=J[w];t&&er(t)}else"Escape"===e.key&&y(!1)},[$,J,w,er]),ed=M(A.Q3.SettleAddress,{required:u("receivingAddressRequired"),pattern:{value:(0,eg.ii)(null==E?void 0:E.id),message:u("invalidAddress")}}),{onBlur:ec}=ed,eu=(0,ev._)(ed,["onBlur"]),em=x(E,N);return[void 0,null,""].includes(l)?(0,p.jsxs)("div",{className:"ph-no-capture py-2","data-sentry-component":"CreateOrderAddress","data-sentry-source-file":"CreateOrderAddress.tsx",children:[(0,p.jsxs)("div",{className:"relative",children:[(0,p.jsxs)("div",{className:"relative",children:[es&&(0,p.jsxs)("div",{className:"mb-1 flex h-5 min-w-0 items-end gap-2",children:[(0,p.jsx)(ey.J,{className:"shrink-0",htmlFor:A.Q3.SettleAddress,children:u("receivingAddress")}),(0,p.jsx)("div",{id:c,className:"ml-auto flex min-w-0 flex-1 justify-end overflow-hidden",children:(0,p.jsx)(ek.sF,{label:es.label})})]}),(0,p.jsxs)(eb.p,(0,i._)((0,r._)({},eu),{onBlur:e=>{ec(e).catch(e=>(0,R.A)([e],R._.ERROR)),y(!1)},onFocus:en,onKeyDown:eo,"aria-autocomplete":"list","aria-controls":$?o:void 0,"aria-describedby":es?c:void 0,"aria-activedescendant":$&&w>=0?"".concat(o,"-option-").concat(w):void 0,label:es?void 0:u("receivingAddress"),id:A.Q3.SettleAddress,className:"pr-22",placeholder:em,errorMessage:null==(t=T.settleAddress)?void 0:t.message,disabled:!!l||n,"data-sentry-element":"Input","data-sentry-source-file":"CreateOrderAddress.tsx",children:[!Y&&(0,p.jsx)("button",{type:"button",onClick:()=>{g(!v)},className:"dark:text-flashbang-white text-new-black dark:focus:shadow-outline-white focus:shadow-outline-new-black absolute top-2.5 right-3 z-10 rounded-md p-3 cursor-pointer",disabled:!!l||n,tabIndex:0,children:(0,p.jsx)("div",{className:"h-8 w-8",children:(0,p.jsx)(eN.l,{})})}),el&&(0,p.jsx)("div",{className:"absolute right-3 bottom-5 z-10",children:(0,p.jsx)(ek.iO,{onAction:()=>ei(Y)})})]})),$&&(0,p.jsx)(ej,{id:o,suggestions:J,activeIndex:w,onSelect:er})]}),E&&!L&&(0,p.jsx)("div",{className:"min-[896px]:absolute min-[896px]:right-16 lg:right-24 min-[896px]:top-[calc(50%+0.5rem)] min-[896px]:-translate-y-1/2",children:(0,p.jsx)("div",{className:"flex w-full justify-center pt-6 text-center min-[896px]:mt-0 min-[896px]:block min-[896px]:w-auto min-[896px]:pt-0",children:(0,p.jsx)(eS.A,{method:E,fieldId:A.Q3.SettleAddress,setFormValue:H})})})]}
1),k&&(0,p.jsx)(ek.Ph,{isOpen:!0,address:k.address,network:k.network,onClose:()=>S(null),analyticsSource:"create_order"}),E&&(0,p.jsx)(eE.A,{settleAsset:E.asset.id,modalIsOpen:v,closeModal:()=>{g(!1)},inputId:A.Q3.SettleAddress,memoId:A.Q3.Memo,amountId:_===d.ZN.fixed?A.Q3.SettleAmount:void 0,setFormValue:C,onAmountScanned:K}),(null==E?void 0:E.hasMemo)&&(0,p.jsxs)("div",{className:"pt-5",children:[(0,p.jsx)(eb.p,(0,i._)((0,r._)({},M(A.Q3.Memo,{pattern:{value:eg._h,message:f("invalidMemo")}})),{label:u(E.id===d.$7.xrp?"destinationTagOptional":"memoOptional"),id:A.Q3.Memo,placeholder:E.id===d.$7.xrp?u("destinationTag"):f("memoPlaceholder"),errorMessage:null==(a=T.memo)?void 0:a.message})),(0,p.jsx)("div",{className:"text-darker-gray dark:text-smoke pt-2",children:u("exchangeMemoHint",{assetId:E.asset.id})})]})]}):null};var eL=a(29195),e_=a(22560),eP=a(7272),eF=a(26846),ez=a(45055),eQ=a(69457),eD=a(6947),eq=a(26472),eV=a(95187);let eB=e=>{var t,a;let{isOpen:s,methods:l,pinnedMethods:n,onChange:o,onClose:d,selected:u,type:m}=e,h=(0,P.c)("createOrder")(m===A.gz.From?"youSend":"youReceive"),{data:f}=(0,eQ.D)(),x=null==f?void 0:f.userWalletBalance,v=(0,eD.Q)(l,x),{filters:g,clearFilters:b,setCategorySelected:y,setNetworkSelected:w}=(0,eq.W)(v),j=null==n?void 0:n.filter(e=>null!==e).map(e=>({id:e.id,networkDisplayName:e.label||null,networkLogoURI:(0,eV.S)(e),logoURI:(0,eF.q)(e),name:(0,c.Kd)(e.asset),symbol:e.asset.id,paused:!!e.paused})),k=(0,i._)((0,r._)({},g),{setCategorySelected:y,setNetworkSelected:w,clearFilters:b,categorySelected:null!=(t=g.categorySelected)?t:void 0,networkSelected:null!=(a=g.networkSelected)?a:void 0});return(0,p.jsx)(ez.bN,{options:v,pinnedOptions:j,isOpen:s,onClose:d,onSelect:e=>o(e),selected:u,title:h,filters:k,"data-sentry-element":"CoinSelector","data-sentry-component":"OptionSelector","data-sentry-source-file":"OptionSelector.tsx"})};var eU=a(52984),eZ=a(47996),eW=a(4650);let{DepositMethod:eG,SettleMethod:eH,OrderType:eK}=A.Q3,eJ=()=>{let{data:e}=(0,E.A)(),t=null==e?void 0:e.depositMethods,a=null==e?void 0:e.settleMethods,{depositMethod:s,settleMethod:l,reset:n,orderType:o}=(0,h.u)(),d=s&&l&&(null==t?void 0:t[l.id])&&(null==a?void 0:a[s.id])&&I({depositMethod:t[l.id],settleMethod:a[s.id],depositMethods:t,settleMethods:a});return{canSwitchMethod:d,switchMethods:(e,c)=>{d&&(null==e||e(),n((0,i._)((0,r._)({},A.Q8),{[eK]:o,[eH]:a[s.id],[eG]:t[l.id]})),null==c||c())}}};var e$=a(67313),eY=a(51530),eX=a(52066),e0=a(35766),e1=a(2149),e2=a(46967),e3=a(49579),e4=a(51382),e6=a(20375),e5=a(7754),e7=a(92165),e8=a(83612),e9=a(69831);function te(){return(te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let tt=e=>m.createElement("svg",te({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16"},e),n||(n=m.createElement("g",{fill:"currentColor"},m.createElement("path",{d:"M19.679 7.887h-1.352c-.122 0-.327-.008-.327-.13V6.393c0-.123.006-.284-.117-.284h-1.358c-.122 0-.303-.038-.303-.16V4.591c0-.123-.018-.26-.14-.26h-1.355c-.122 0-.283-.063-.283-.185V2.783c0-.122-.069-.22-.191-.22q-.666.005-1.358.004c-.123 0-.228.1-.228.223v1.35c0 .124-.057.191-.18.191H7.502c-.123 0-.169-.067-.169-.19V2.79c0-.123-.126-.222-.249-.222-.455 0-.883 0-1.322-.004-.123-.001-.206.097-.206.22v1.376c0 .123-.158.172-.281.172H3.91c-.123 0-.132.15-.132.272v1.358c0 .123-.19.148-.313.148h-1.36c-.123 0-.327.174-.327.297v1.36c0 .123.005.12-.117.12H.32C.2 7.887 0 8.089 0 8.21v4.929c0 .123.199.303.321.303H1.66c.123 0 .118-.18.118-.303v-3.137c0-.123.204-.115.327-.115h1.373c.123 0 .3-.008.3.115v3.157c0 .122.06.222.183.222.456 0 .917 0 1.356.003.123.002.239-.097.239-.22V11.81c0-.123.027-.144.15-.144h8.59c.122 0 .221.06.221.183 0 .456 0 .916-.004 1.36 0 .123.097.234.22.234h1.354c.122 0 .135-.162.135-.285v-3.152c0-.123.186-.118.309-.118h1.381c.123 0 .31-.005.31.118v3.134c0 .122.012.303.135.303h1.321c.123 0 .322-.18.322-.303V8.2c0-.123-.199-.314-.321-.314m-12.346-.14c0 .122-.139.14-.261.14H5.714c-.123 0-.158-.018-.158-.14V6.39c0-.122.035-.282.158-.282h1.357c.123 0 .262.16.262.283zm7.111.003c0 .123-.037.137-.16.137H12.93c-.123 0-.263-.014-.263-.137V6.394c0-.123.14-.285.263-.285h1.355c.122 0 .16.162.16.285z"}),m.createElement("path",{d:"m8.869 13.4-1-.001-2.162-.008a.22.22 0 0 0-.223.221c.004.445.003.918.003 1.363 0 .122.099.248.222.248h3.143c.123 0 .256-.153.256-.275v-1.326c0-.123-.117-.223-.24-.223M14.375 13.399c-.035.002-.053.027-.088.027-1.059 0-2.1.024-3.158.024h-.1c-.056 0-.138.053-.138.176v1.329c0 .123.137.272.26.272h3.14c.122 0 .155-.15.155-.272v-1.346c0-.123-.013-.215-.071-.21M3.933 2.559h1.345c.123 0 .221-.096.22-.219q-.004-.668-.004-1.336c0-.123-.1-.223-.222-.223h-1.34c-.122 0-.15.104-.15.226v1.337c0 .123.028.215.15.215M14.701 2.571c.445-.
1004.873-.004 1.318-.004.123 0 .204-.1.204-.223V1.005c0-.123-.03-.224-.152-.224h-1.336c-.123 0-.29.102-.29.224v1.346c0 .123.133.221.256.22"}))));var ta=a(97695);let ts=e=>{var t,a,s,l,n;let{balance:r,label:i,openSelector:o,selected:c,disabled:u,paused:m,isLoading:f}=e,{depositMethod:x}=(0,h.u)(),{formatUsdToSelectedFiat:v,fiatCurrency:g}=(0,eZ.P)(),b=(0,eX.x)({assetId:null==c?void 0:c.symbol,amount:"1"}),y="".concat(i,"-label"),{loading:w}=(0,E.A)(),{connector:j,connectorName:k}=(0,eY.l)(),S="".concat(i,"-tooltip"),N=!c||f,C=!N&&!!r,M=(0,e9.q)((null==c||null==(t=c.network)?void 0:t.name)||null),O=C?"".concat((0,d.qC)((0,e_.NJ)(r))," ").concat(c.symbol):null,{isMobileScreen:R}=(0,Q.A)(),A=(0,e8.A)(j||k),T=!!(null==c?void 0:c.isInternal),I=null!=(n=null==c?void 0:c.isUsdStablecoin)&&n,L=!(I&&d.A0.USD===g),_=(null==j?void 0:j.name)===e5.P.generic.text;return(0,p.jsx)("div",{className:"mb-1 md:my-2","data-sentry-component":"SelectCoinButton","data-sentry-source-file":"SelectCoinButton.tsx",children:(0,p.jsx)("button",{"aria-label":"Select token ".concat(i),className:"dark:bg-new-black bg-flashbang-white group relative z-0 h-40 w-full rounded-md p-0 shadow-sm disabled:opacity-100 not-disabled:cursor-pointer md:h-[clamp(10rem,27vh,15rem)] dark:focus:shadow-outline-white focus:shadow-outline-new-black",disabled:u||f||w,onClick:o,type:"button",tabIndex:0,children:(0,p.jsx)("div",{className:"dark:border-flashbang-white border-new-black h-full rounded-md border border-b-[6px]",children:(0,p.jsx)("div",{className:"relative h-full w-[99%]","aria-live":"polite","aria-busy":N,children:(0,p.jsx)("div",{className:"dark:border-r-darker-gray border-r-new-black dark:bg-new-black\n dark:text-flashbang-white bg-flashbang-white text-new-black 'place-items-center' mx-2 flex h-full\n w-[95%] justify-center py-0 pl-2 pr-2 text-lg",children:(0,p.jsxs)("div",{className:"flex place-items-center gap-2",children:[(0,p.jsx)("div",{className:"just relative mr-3 grid",children:c&&!f?(0,p.jsx)(e6.H,{token:{asset:"".concat(null==x?void 0:x.asset.name," Icon"),network:"".concat(null==(a=c.network)?void 0:a.name,"-icon")},tokenImage:"string"==typeof c.logoURI?c.logoURI:c.logoURI.src,networkImage:(e=>!e||N?"":"string"==typeof e.logoURI?e.logoURI:e.logoURI.src)(c.network),size:"xxLarge",priority:!0}):(0,p.jsx)(e4.E,{className:"h-24 w-24 rounded-full"})}),(0,p.jsxs)("div",{className:"pl-2",children:[(0,p.jsx)("div",{className:"flex",children:(0,p.jsxs)("div",{className:"flex flex-col items-start",children:[(0,p.jsx)(ey.J,{as:"span",id:y,className:(0,ew.QP)(!C&&"pb-2","md:pb-2"),"data-sentry-element":"Label","data-sentry-source-file":"SelectCoinButton.tsx",children:i}),(0,p.jsxs)("div",{className:"flex flex-col",children:[(0,p.jsxs)("div",{className:"text flex items-center pr-2 text-left w-auto",children:[N?(0,p.jsxs)("span",{className:"flex items-baseline",children:[(0,p.jsx)(e4.E,{className:"mb-2 h-9 w-16 rounded-md"}),(0,p.jsx)(e4.E,{className:"ml-2 h-4 w-12 rounded-md"})]}):(0,p.jsxs)("span",{className:"flex items-baseline",children:[(0,p.jsx)("span",{className:(0,ew.QP)("mr-2 font-bold md:text-3xl",C?"text-2xl":"text-3xl"),children:c.symbol}),""===b?(0,p.jsx)(e4.E,{className:"ml-2 h-4 w-12 rounded-md"}):!m&&""!==b&&L?(0,p.jsx)("span",{className:"dark:text-smoke text-new-black font-text text-xs md:text-sm flex items-baseline",children:v(b,I&&d.A0.USD===g?(e=>e<1?2:(0,e2.iG)(e))(parseFloat(b)):void 0)}):null]}),m&&(0,p.jsx)(q.m,{iconSize:"1.5rem",id:S,place:(null==c?void 0:c.id)!==(null==x?void 0:x.id)&&R?"bottom":"top",Icon:ta.A,content:K.c.selectCoin.unavailable,className:"z-50"})]}),N?(0,p.jsx)(e4.E,{className:"mb-2 h-6 w-24 rounded-md"}):(0,p.jsx)("span",{className:"dark:text-light-smoke hidden w-auto text-left text-lg md:bottom-4 md:block",children:c.name})]}),N?(0,p.jsx)(e4.E,{className:"h-8 w-28 rounded-md md:w-40"}):(null==c||null==(s=c.network)?void 0:s.name)&&(0,p.jsxs)("div",{className:(0,ew.QP)("font-display inline-block rounded-sm border px-1.5 py-1 text-sm font-normal text-new-black dark:text-flashbang-white",C?"mt-0":"mt-2","md:mt-2"),style:M,children:[null==(l=c.network)?void 0:l.name," ",(0,p.jsx)("span",{className:"font-display hidden lg:inline-block",children:" Network"})]})]})}),C&&(0,p.jsxs)("div",{className:"dark:text-smoke text-new-black font-text mt-4 flex items-center text-left text-sm font-light",children:[T?(0,p.jsx)(tt,{"aria-label":"Account Icon",className:"mr-2 w-5 text-new-black dark:text-flashbang-white"}):_?(0,p.jsx)(e7.u,{size:20,className:"mr-2 h-5 w-5"}):(0,p.jsx)("img",{src:A.icon,className:"mr-2 w-5",width:20,height:20,alt:"".concat(A.text," Icon"),"data-sentry-component":"renderBalanceIcon","data-sentry-source-file":"SelectCoinButton.tsx"}),(0,p.jsxs)("span",{children:[(0,p.jsx)("span",{className:"xs:inline hidden",children:"Balance:\xa0"}),O]})]})]})]})})})})})})};var tl=a(88389);let tn=e=>{let{disabled:t,afterMethodSwitch:a,beforeMethodSwitch:l}=e,{canSwitchMethod:n,switchMethods:r}=eJ(),[i,o]=(0,m.useState)(!1);return(0,p.jsx)("div",{className:"dark:bg-new-black bg-flashbang-white absolute z-10 rounded-full md:top-[calc(clamp(5rem,14vh,7.5rem)_-_18px)]","data-sentry-component":"MethodSwitch","data-sentry-source-file":"MethodSwitch.tsx",children:(0,p.jsx)("button",{className:(0,ew.QP)("cursor-pointer dark:text-flashbang-white text-new-black dark:border-flashbang-white bg-flashbang-white dark:bg-new-black dark:focus:shadow-outline-white focus:shadow-outline-new-black flex h-12 w-12 items-center justify-center rounded-full border p-3 disabled:cursor-not-allowed",n&&!t&&"group"),disabled:!n||t,onClick:()=>{clearTimeout(s),o(!0),s=setTimeout(()=>
1o(!1),1500),n&&!t&&r(l,a)},type:"button",tabIndex:0,"aria-label":"Reverse shift","data-attr":"shift-method-switch-button",children:(0,p.jsx)(tl.A,{className:(0,ew.QP)("w-6 rotate-90 sm:rotate-0",!i&&"transition-all duration-500 ease-in-out sm:group-hover:-rotate-180 sm:group-hover:opacity-80 sm:group-focus:-rotate-180 sm:group-focus:opacity-80"),"data-sentry-element":"TokenSwitchIcon","data-sentry-source-file":"MethodSwitch.tsx"})})})};var tr=a(9540),ti=a(64703);let{DepositAmount:to,DepositMethod:td,SettleAmount:tc,SettleMethod:tu,ActiveInputSide:tm}=A.Q3,{From:th,To:tf}=A.gz,tx=e=>{let{onMethodChange:t,depositOptionSelector:a,settleOptionSelector:s,predefinedSettleAmount:l,predefinedSettleAddress:n,isLoading:r,isSubmitting:i}=e,{formatUsdToSelectedFiat:u,fiatCurrency:x}=(0,eZ.P)(),v=(0,P.c)("createOrder"),g=(0,ei.A)(),{switchMethods:y}=eJ(),w=(0,eP.xW)(),k=(0,j.useRouter)(),{depositMethod:S,settleMethod:N,setValue:C,quote:M,depositAmount:O,orderType:I,settleAmount:L}=(0,h.u)(),{data:_}=(0,E.A)(),{data:F,loadingEVM:z,refetchEVM:Q}=(0,eQ.D)(),D=(0,eU.s)(),q=null==_?void 0:_.depositMethods,V=null==_?void 0:_.settleMethods,{handleRequestQuote:B,loading:U,error:Z}=eh(),[W,G]=(0,m.useState)(null),H=(0,m.useRef)(!0),K=(0,m.useRef)(!0),J=(0,m.useRef)(!1),$=(0,m.useRef)(!1),[Y,X]=[(0,e0.A)(S),(0,e0.A)(N)],[ee]=[(0,e$.oF)(S),(0,e$.oF)(N)],es=(0,eX.x)({assetId:null==N?void 0:N.asset.id,amount:L||"0"}),{isFiatInputMode:el,fiatToCryptoRate:en,toggleFiatMode:er,disableFiatMode:eo,convertFiatToCrypto:ed,convertCryptoToFiat:ec}=(0,eW.B)({assetId:null==S?void 0:S.asset.id,setValue:C,watch:w.watch,fieldName:to}),{isFiatInputMode:eu,fiatToCryptoRate:em,toggleFiatMode:ef,disableFiatMode:ep,convertCryptoToFiat:ev}=(0,eW.B)({assetId:null==N?void 0:N.asset.id,setValue:C,watch:w.watch,fieldName:tc}),{isConnected:eb}=(0,eY.l)(),ey=(0,T.O)(S),{data:ew}=(0,o.IT)(f._W,{variables:{depositMethodId:null==S?void 0:S.id,settleMethodId:null==N?void 0:N.id},skip:!(null==S?void 0:S.id)||!(null==N?void 0:N.id)}),{data:ej}=(0,o.IT)(f.tW,{variables:{depositMethodId:null==S?void 0:S.id,settleMethodId:null==N?void 0:N.id},skip:!(null==S?void 0:S.id)||!(null==N?void 0:N.id)}),{recentDepositMethods:ek,recentSettleMethods:eS}=(0,ex.w)(),eN=et(S),eE=(e,a)=>{if(!q||!V)return void(0,b.P0)({text:v("cannotFindMethods"),type:"error"});let s=a===th?td:tu,l=a===th?q[e]:V[e];if(a===th&&l.id===(null==N?void 0:N.id)||a===tf&&l.id===(null==S?void 0:S.id))return void((null==N?void 0:N.id)&&(null==S?void 0:S.id)&&y(()=>{null==t||t({from:null==N?void 0:N.id,to:null==S?void 0:S.id})}));C(s,l,{shouldValidate:!0}),(null==N?void 0:N.id)&&(null==S?void 0:S.id)&&(null==t||t(a===th?{from:e,to:null==N?void 0:N.id}:{from:null==S?void 0:S.id,to:e}))},eC=async(e,t)=>{var a;let s=e===to?tc:to;if(!t)return void C(s,"");let l=e===to?el:eu,n=e===to?en:em;if(l&&!n)return;let r=t;if(l&&n){let e=(0,d.n)(t);e.isNaN()||(r=e.times(n).toString())}let i=(0,d.n)(r);if(i.isNaN())return;let o=e===to&&ew&&(i.lt(ew.depositRange.min)||i.gt(null!=(a=ew.depositRange.max)?a:"0")),c=e===tc&&i.eq(0);if(o||c)return void C(s,"");if(e===to||e===tc){G(e);try{await B(e,r)}catch(e){e instanceof Error&&(0,b.P0)({type:"error",text:g(null==e?void 0:e.message)})}}},eM=async()=>{a.handleToggleSelect()},eO=async()=>{s.handleToggleSelect()};(e=>{let{walletBalance:t,loadingEVM:a,evmBalanceAddress:s,depositMethod:l,settleMethod:n,depositMethodBalance:r,settleMethodBalance:i,refetchEVM:o}=e,c=(0,m.useRef)(0),u=(0,m.useRef)(new Set),[h,f]=(0,m.useState)(0),x=(0,m.useRef)(void 0);(0,m.useEffect)(()=>{let e=e=>{clearTimeout(x.current),x.current=setTimeout(()=>f(e=>e+1),e)},m=(e,a)=>{if(!t.userWalletBalance||!(0,tr.dw)(e.network))return null;let l=t.userWalletBalance.find(t=>t.network===e.network&&t.network!==d.qq.solana&&(0,ti.C)(t.tokenAddress,e.tokenAddress));if(!a.balance)return null;if(!l){if(!(0,d.n)(a.balance).dp(4).gt("0.0001"))return null;let t="".concat(null!=s?s:"",":").concat(e.id,":").concat((0,d.n)(a.balance).toFixed(6));return u.current.has(t)?null:{missingRowKey:t}}return(0,d.n)(l.balance).toFixed(6)!==(0,d.n)(a.balance).toFixed(6)?{}:null};return(async()=>
1{if(a)return;let t=[l&&(null==r?void 0:r.isBalanceResolved)?m(l,r):null,n&&(null==i?void 0:i.isBalanceResolved)?m(n,i):null].filter(e=>null!==e);if(!t.length)return;let s=6e4-(Date.now()-c.current);if(s>0)return void e(s);c.current=Date.now(),t.forEach(e=>{e.missingRowKey&&u.current.add(e.missingRowKey)}),await o()===void 0&&(c.current=0,t.forEach(e=>{e.missingRowKey&&u.current.delete(e.missingRowKey)})),e(6e4)})().catch(e=>(0,R.A)([e],R._.ERROR)),()=>clearTimeout(x.current)},[t,a,s,l,n,r,i,o,h])})({walletBalance:F,loadingEVM:z,evmBalanceAddress:D,depositMethod:S,settleMethod:N,depositMethodBalance:Y,settleMethodBalance:X,refetchEVM:Q}),(0,m.useEffect)(()=>{let e=W===to?tc:to;if(M){let t=M[e];if(e===tc&&eu){let e=ev(t);e&&(t=e)}else if(e===to&&el){let e=ec(t);e&&(t=e)}C(e,t,{shouldValidate:!0})}},[M,el,eu,ec,ev]),(0,m.useEffect)(()=>{if(H.current){H.current=!1;return}if(!L)return;G(tc);let e=L;if(eu&&em&&L){let t=(0,d.n)(L);t.isNaN()||(e=t.times(em).toString())}B(tc,e,{onError:()=>C(tc,"")}).catch(e=>(0,R.A)([e],R._.ERROR))},[null==S?void 0:S.id]),(0,m.useEffect)(()=>{if(K.current){K.current=!1;return}if(!O)return;G(to);let e=O;if(el&&en&&O){let t=(0,d.n)(O);t.isNaN()||(e=t.times(en).toString())}B(to,e,{onError:()=>C(to,"")}).catch(e=>(0,R.A)([e],R._.ERROR))},[null==N?void 0:N.id]),(0,m.useEffect)(()=>{let e=el&&!J.current;J.current=el,e&&en&&O&&(0,d.n)(O).gt(0)&&eC(to,O).catch(e=>(0,R.A)([e],R._.ERROR))},[el]),(0,m.useEffect)(()=>{let e=eu&&!$.current;$.current=eu,e&&em&&L&&(0,d.n)(L).gt(0)&&eC(tc,L).catch(e=>(0,R.A)([e],R._.ERROR))},[eu]),(0,m.useEffect)(()=>{l&&N&&(C(tc,l,{shouldValidate:!0}),eC(tc,l).catch(e=>(0,R.A)([e],R._.ERROR)))},[l,N]);let eR=()=>X.shouldShowBalance?X.balance:"",eA=(0,m.useMemo)(()=>q?(0,e1.s7)({depositMethods:q,isFixed:I===d.ZN.fixed,isSettleMethodFixedOnly:!!(null==N?void 0:N.fixedOnly),isSettleMethodVariableOnly:!!(null==N?void 0:N.variableOnly),isEmbedded:!1}):null,[q,N]),eT=(0,m.useMemo)(()=>V?(0,e1.NR)({settleMethods:V,isDepositMethodFixedOnly:!!(null==S?void 0:S.fixedOnly),isDepositMethodVariableOnly:!!(null==S?void 0:S.variableOnly),isCommissionBalanceDeposit:ey}):null,[V,S]),eI=(0,m.useMemo)(()=>S?{logoURI:(0,eF.q)(S),name:(0,c.Kd)(S.asset),symbol:S.asset.id,isUsdStablecoin:S.asset.isUsdStablecoin,network:(0,e3.u)(S),id:S.id,isInternal:(0,T.O)(S)}:void 0,[S]),ez=(0,m.useMemo)(()=>S?{logoURI:(0,eF.q)(S),name:(0,c.Kd)(S.asset),symbol:S.asset.id,network:(0,e3.u)(S),id:S.id}:void 0,[S]),eD=(0,m.useMemo)(()=>N?{logoURI:(0,eF.q)(N),name:(0,c.Kd)(N.asset),symbol:N.asset.id,isUsdStablecoin:N.asset.isUsdStablecoin,network:(0,e3.u)(N),id:N.id,isInternal:(0,T.O)(N)}:void 0,[N]),eq=(0,m.useMemo)(()=>N?{logoURI:(0,eF.q)(N),name:(0,c.Kd)(N.asset),symbol:N.asset.id,network:(0,e3.u)(N),id:N.id}:void 0,[N]),eV=(0,m.useMemo)(()=>{let e=(e=>({lessThanMax:t=>null!=e&&!!e.depositRange.max&&(0,eg.vh)(t,e.depositRange.max),validateGreaterThanZero:eg.c_,greaterThanMin:t=>null!=e&&!!e.depositRange.min&&(0,eg.qW)(t,e.depositRange.min)}))(ew),t=e=>t=>el&&en?e(ed("".concat(t))||t):e(t);return{lessThanMax:t(e.lessThanMax),validateGreaterThanZero:e.validateGreaterThanZero,greaterThanMin:t(e.greaterThanMin)}},[ew,el,en,ed]),eG=(0,m.useMemo)(()=>{var e;if(W!==tc||!Z||!L)return null;let t=(0,e2.XK)(Z.message);if("generic"===t)return"Error fetching quote";let a="amountTooLow"===t,s=a?null==ej?void 0:ej.settleRange.min:null==ej?void 0:ej.settleRange.max;if(!s)return a?"Amount too low":"Amount too high";let l=a?"Min":"Max",n=e=>a?(0,e_.cT)(e):(0,e_.NJ)(e);if(eu&&x){let e=ev(s);if(e)return"".concat(l,": ").concat((0,d.qC)(n(e))," ").concat(x)}return"".concat(l,": ").concat(n(s)," ").concat(null!=(e=null==N?void 0:N.asset.id)?e:"").trim()},[W,Z,ej,L,eu,x,ev,null==N?void 0:N.asset.id]),eH=I===d.ZN.fixed||ey,eK=![void 0,null,""].includes(n),e4=!!i;(0,m.useEffect)(()=>{e4&&(a.isOpen&&a.handleToggleSelect(),s.isOpen&&s.handleToggleSelect())},[e4]),(0,m.useEffect)(()=>{let e=(e,t)=>{let{shallow:a}=t;a||(eo(),ep(),C(tm,W))};return k.events.on("routeChangeStart",e),()=>k.events.off("routeChangeStart",e)},[k.events,eo,ep,C,W]);let e6=(0,m.useRef)(!!(O||L)),e5=(0,m.useRef)(!1);return(0,m.useEffect)(()=>
1{if(e5.current||!e6.current||I!==d.ZN.fixed||M||U||!S||!N)return;let e=w.getValues(tm),t=null;if(e===to&&O?t=to:e===tc&&L?t=tc:O?t=to:L&&(t=tc),!t)return;e5.current=!0;let a=t===to?O:L;eC(t,a).catch(e=>(0,R.A)([e],R._.ERROR))},[I,M,U,S,N]),ea("1",a.handleToggleSelect,!s.isOpen&&!e4),ea("2",s.handleToggleSelect,!a.isOpen&&!e4),(0,p.jsxs)("div",{className:"flex flex-col gap-x-1 gap-y-1 z-10 relative sm:flex-row","data-sentry-component":"ShiftInputGroup","data-sentry-source-file":"ShiftInputGroup.tsx",children:[(0,p.jsxs)("div",{className:"flex-1 z-0",children:[(0,p.jsx)(ts,{balance:ey?null!=eN?eN:"0":Y.shouldShowBalance?Y.balance:"",openSelector:eM,selected:eI,label:v("youSend"),disabled:e4,paused:!!(null==S?void 0:S.paused),isLoading:r,"data-sentry-element":"SelectCoinButton","data-sentry-source-file":"ShiftInputGroup.tsx"}),eH&&(0,p.jsx)("div",{className:"-mt-6 md:-mt-7",children:(0,p.jsx)(eL.T,{decimals:null==S?void 0:S.decimals,id:to,formMethods:w,selected:ez,max:(()=>{var e;if((null==ew||null==(e=ew.depositRange)?void 0:e.max)&&!l)return ey?null!=eN?eN:"0":ew.depositRange.max})(),min:(null==ew?void 0:ew.depositRange.min)||"",label:v("amountYouSend"),hideIcon:!0,hideLabel:!0,isLoading:U&&W===tc||r,handleAmountChange:eC,validation:{required:!0,validate:eV},isConnected:eb,disabled:!!l,balance:ey?null!=eN?eN:"0":ee.shouldShowBalance?ee.spendableBalance:"",hideBalance:!0,flattenTop:!0,fiatCurrency:x,isFiatInputMode:el,onToggleFiatMode:()=>{(!O||"0"===O||(0,d.n)(O).eq(0))&&(C(A.Q3.Quote,null),C(tc,"")),el||ep(),er()},usdToCryptoRate:en})})]}),(0,p.jsx)("div",{className:"z-10 relative flex h-0 items-center justify-center sm:h-auto md:my-0",children:(0,p.jsx)(tn,{beforeMethodSwitch:()=>(null==N?void 0:N.id)&&(null==S?void 0:S.id)?null==t?void 0:t({from:null==N?void 0:N.id,to:null==S?void 0:S.id}):void 0,disabled:!!l||eK||r||e4,"data-sentry-element":"MethodSwitch","data-sentry-source-file":"ShiftInputGroup.tsx"})}),(0,p.jsxs)("div",{className:"flex-1 z-0",children:[(0,p.jsx)(ts,{balance:eR(),openSelector:eO,selected:eD,label:v("youReceive"),disabled:eK||e4,paused:!!(null==N?void 0:N.paused),isLoading:r,"data-sentry-element":"SelectCoinButton","data-sentry-source-file":"ShiftInputGroup.tsx"}),eH&&(0,p.jsx)("div",{className:"-mt-6 md:-mt-7",children:(0,p.jsx)(eL.T,{decimals:null==N?void 0:N.decimals,id:tc,formMethods:w,selected:eq,label:v("amountYouReceive"),fiatValue:u(es),hideLabel:!0,hideIcon:!0,isLoading:U&&W===to||r,handleAmountChange:eC,validation:{required:!0},disabled:!!l,balance:eR(),errorMessage:eG,hideBalance:!0,flattenTop:!0,fiatCurrency:x,isFiatInputMode:eu,onToggleFiatMode:()=>{(!L||"0"===L||(0,d.n)(L).eq(0))&&(C(A.Q3.Quote,null),C(to,"")),eu||eo(),ef()},usdToCryptoRate:em,showFiatValueAsToggle:!el})})]}),eA&&S&&(0,p.jsx)(eB,{isOpen:a.isOpen,methods:eA,onChange:e=>eE(e,th),pinnedMethods:null==ek?void 0:ek.filter(e=>!(null==e?void 0:e.paused)&&(null==e?void 0:e.enabled)),onClose:a.handleToggleSelect,selected:S.id,type:th}),eT&&N&&(0,p.jsx)(eB,{isOpen:s.isOpen,methods:eT,pinnedMethods:null==eS?void 0:eS.filter(e=>!(null==e?void 0:e.paused)&&(null==e?void 0:e.enabled)),onChange:e=>eE(e,tf),onClose:s.handleToggleSelect,selected:N.id,type:tf})]})};var tp=a(70058),tv=a(86784),tg=a(66750);let tb=e=>(t,a)=>{let{data:s}=a;if(!s)return;let l="createFixedOrder"in s?s.createFixedOrder:s.createVariableOrder;t.writeQuery({query:f.QF,variables:{orderId:l.id},data:{order:l}});let n=e?t.identify({__typename:"Account",id:e}):void 0;if(n)return void t.evict({id:n,fieldName:"ordersNext"});t.evict({id:"ROOT_QUERY",fieldName:"session"})};var ty=a(23727);let tw=(0,m.lazy)(()=>a.e(1690).then(a.bind(a,19309)).then(e=>({default:e.WithdrawCommissionModal}))),tj="createOrderForm",{DepositMethod:tk,SettleMethod:tS}=A.Q3,tN=e=>{var t,a,s;let{depositMethod:l,settleMethod:n,onRedirectToOrder:o,onMethodChange:c,parentAffiliateId:u,isLoading:f}=e,{depositMethod:x,settleMethod:v,orderType:g,setValue:y,formState:{isValid:w},handleSubmit:k,quote:S,getValues:C,reset:M}=(0,h.u)(),{loading:O}=eh(),R=(0,P.c)("createOrder"),z=(0,ei.A)(),[Q,q]=(0,m.useState)(!1),{onSubmit:V,loading:B}=(e=>{let{predefinedOrderType:t,parentAffiliateId:a,onRedirectToOrder:s}=e,{depositAmount:l,depositMethod:n,memo:o,quote:c,settleAddress:u,settleMethod:f,orderType:x,setValue:p}=(0,h.u)(),{createAccount:v,loading:g}=(0,tp.T)(),{logEvent:y}=(0,eT.s)(),w=(0,tv.O)(),k=(0,P.c)("errors"),S=(0,ei.A)(),[N,E]=(0,m.useState)(!1),C=(0,j.useRouter)(),M=(0,m.useRef)(null),O=(0,m.useRef)(!1),R=(0,T.O)(f),I=(0,T.O)(n),L=t||x,{accountSecret:_}=(0,G.j)(),[F,{loading:z}]=(0,el.n)(er.BW),[Q,{loading:D}]=(0,el.n)(er.zM),[q,{data:V,loading:B}]=(0,ex.W)(),U=null==V?void 0:V.session;(0,m.useEffect)(()=>
1{if(!_)return;let e=async()=>{await q({context:{headers:{"x-sideshift-secret":_}}})};U||e().catch(e=>{e instanceof Error&&!e.message.includes("Add x-sideshift-secret header")&&(0,b.P0)({type:"error",text:S(e.message)})})},[V,q,_]),(0,m.useEffect)(()=>{let e=e=>{try{let{pathname:t}=new URL(e,window.location.origin),a=M.current;a&&t.endsWith("/orders/".concat(a))&&(E(!1),M.current=null)}catch(e){E(!1),M.current=null}};return C.events.on("routeChangeComplete",e),()=>{C.events.off("routeChangeComplete",e)}},[C.events]);let Z=()=>{let e=w||(a===(null==U?void 0:U.id)?void 0:a);return{settleDestination:{address:R&&!I&&U?U.id:u,memo:o||void 0},quoteId:L===d.ZN.fixed?null==c?void 0:c.id:void 0,depositMethod:(null==n?void 0:n.id)||"",settleMethod:(null==f?void 0:f.id)||"",affiliateId:e,extra:I?{withdrawalAmount:l}:void 0}},W=async e=>{let t;if(e.data&&("createFixedOrder"in e.data?t=e.data.createFixedOrder:"createVariableOrder"in e.data&&(t=e.data.createVariableOrder)),I&&(document.body.style.overflow="unset"),t){let e=u.toLowerCase(),a={eth:"eth domain",sol:"solana domain"},l=Object.keys(a).find(t=>e.endsWith(".".concat(t))),n=l?a[l]:"normal address";y("create-order",(0,i._)((0,r._)({},(0,tg.$M)(t,{statusOverride:tg.Re.Created})),{addressType:n})),M.current=t.id,E(!0);try{await s(t)}catch(e){E(!1),M.current=null}}},H=e=>{(0,b.P0)({text:S(e.message),type:"error"})},K=async e=>{if(!c)return void(0,b.P0)({text:k("quoteMissing"),type:"error"});let{settleDestination:t,affiliateId:a,extra:s}=Z();try{let l=await Q({variables:{input:{settleDestination:t,affiliateId:a,extra:s,quoteId:c.id}},context:{headers:{"x-sideshift-secret":e}},update:tb(null==U?void 0:U.id)});p(A.Q3.Quote,null),await W(l)}catch(e){e instanceof Error?H(e):H(Error(k("unknownError")))}},J=async e=>{if(!n||!f)return void(0,b.P0)({text:k("methodsMissing"),type:"error"});let t=Z();try{let a=await F({variables:{input:t},context:{headers:{"x-sideshift-secret":e}},update:tb(null==U?void 0:U.id)});await W(a)}catch(e){e instanceof Error?H(e):H(Error(k("unknownError")))}};return{onSubmit:async()=>{if(O.current)return!1;O.current=!0;try{let e=_;if(!e)try{e=await v()}catch(e){return(0,b.P0)({text:k("failedToCreateAccount"),type:"error"}),!1}if(!e||""===e.trim())return(0,b.P0)({text:k("orderWithoutValidAccount"),type:"error"}),!1;return L===d.ZN.fixed?await K(e):await J(e),!0}finally{O.current=!1}},loading:z||D||B||g||N}})({onRedirectToOrder:o,parentAffiliateId:u}),{data:U}=(0,E.A)(),{telegramPairedAt:Z,refetch:W}=(0,ex.w)(),{depositMethods:H,settleMethods:K}=U||{},J=(0,T.O)(x)&&(0,T.O)(v),$=(0,es.k)(),Y=(0,es.k)(),ee=(0,T.O)(x),en=et(x),eo=!!(en&&(0,d.n)(en).gt(0)),{rateProps:ed}=(0,ef.w)({depositMethod:x,settleMethod:v,isLoading:f,onError:e=>(0,b.P0)({type:"error",text:z(e.message),toastId:"".concat(null==e?void 0:e.name,"-").concat(null==x?void 0:x.id)})}),ec=n&&l&&K&&H?I({depositMethod:l,depositMethods:H,settleMethod:n,settleMethods:K}):null,eu=(0,m.useCallback)(e=>{let{from:t,to:a}=e,s=null==H?void 0:H[t],l=null==K?void 0:K[a];s&&l&&(y(tk,s,{shouldValidate:!0}),y(tS,l,{shouldValidate:!0}),null==c||c({from:t,to:a}))},[H,c,y,K]);(e=>{let{depositMethod:t,settleMethod:a,updateMethods:s,isAllowedShiftPair:l}=e,n=(0,N.B)();(0,m.useEffect)(()=>{t&&a&&s&&!1===l&&(null==n?void 0:n.defaultDepositMethod)&&s({from:n.defaultDepositMethod,to:n.defaultSettleMethod})},[l,n,null==t?void 0:t.id,null==a?void 0:a.id,s])})({depositMethod:l,settleMethod:n,updateMethods:c?eu:void 0,isAllowedShiftPair:ec});let em="beta"===ty.env.REACT_APP_BACKEND_OVERRIDE,ev=!!(null==x?void 0:x.paused)||!!(null==v?void 0:v.paused),eg=(0,m.useMemo)(()=>O||!w||ev||"isLoading"in ed||!J&&!em&&(null==x?void 0:x.id)===(null==v?void 0:v.id)||ee&&!eo,[O,w,ev,ed,J,em,null==x?void 0:x.id,null==v?void 0:v.id,ee,eo]),eb=(0,m.useMemo)(()=>g===d.ZN.fixed&&S?(0,i._)((0,r._)({},ed),{rate:S.rate}):(0,r._)({},ed),[ed,S,O]);(0,m.useEffect)(()=>{l&&n&&ec&&!x&&!v&&!f&&(y(tk,l),y(tS,n))},[null==n?void 0:n.id,null==l?void 0:l.id,ec,f]);let ey=k(async()=>{await V()&&Q&&q(!1)});ea("Enter",ey,!eg&&!B&&!$.isOpen&&!Y.isOpen);let ew=(0,m.useMemo)(()=>{var e,t,a,s;let l=null!=(a=null==x||null==(e=x.asset)?void 0:e.name)?a:R("depositCoinFallback"),n=null!=(s=null==v||null==(t=v.asset)?void 0:t.name)?s:R("settleCoinFallback");return R("shiftButtonAriaLabel",{depositCoin:l,settleCoin:n})},[null==x||null==(t=x.asset)?void 0:t.name,null==v||null==(a=v.asset)?void 0:a.name,R]),ej=(0,m.useMemo)(()=>"isLoading"in ed?R("waitingForRate"):!J&&!em&&x&&v&&x.id===v.id?R("cannotShiftSameCoins"):ev?R("shiftPairPaused"):O?R("loadingQuote"):w?void 0:R("enterAmountToShift"),[ed,x,v,ev,O,w,J,em,R]),ek=(0,m.useMemo)(()=>"isLoading"in ed?R("waitingForRateLabel"):x&&v&&x.id===v.id?R("cannotShiftSameCoins"):ev?R("shiftPairPausedLabel"):R("shift"),[ed,ev,x,v,R]);return(0,p.jsxs)("section",{"aria-label":"Create a shift","data-sentry-component":"CreateOrder","data-sentry-source-file":"CreateOrder.tsx",children:[(0,p.jsx)("form",{id:tj,className:"mx-auto w-full max-w-4xl pb-12 md:pb-[clamp(1.75rem,6vh,3rem)]",onSubmit:ey,children:(0,p.jsxs)("div",{className:"md:pt-[clamp(0rem,2vh,1rem)]",children:[(0,p.jsxs)("div",{className:"relative",children:[(0,p.jsx)(D,{depositMethod:x,settleMethod:v,disabled:f,orderType:g,onChange:e=>{let t=C();localStorage.setItem(ep.lO.SELECTED_ORDER_TYPE,JSON.stringify(e)),M((0,i._)((0,r._)({},t),{[A.Q3.OrderType]:e}))},"data-sentry-element":"OrderTypeToggle","data-sentry-source-file":"CreateOrder.tsx"}),(0,p.jsxs)("div",{className:"right-0 top-0 flex h-full items-center justify-center pt-6 sm:absolute sm:pt-0 md:pb-4",children:[(0,p.jsx)(_.t,(0,i._)((0,r._)({Icon:g===d.ZN.fixed?F.A:null,approximate:g===d.ZN.variable},eb),{"data-sentry-element":"Rate","data-sentry-source-file":"CreateOrder.tsx"})),(0,p.jsx)(X,{fromAssetId:null==v?void 0:v.asset.id,telegramPairedAt:Z,refetchSession:W,"data-sentry-element":"PriceAlertButton","data-sentry-source-file":"CreateOrder.tsx"})]})]}),(0,p.jsxs)("div",{className:"pt-4",children:[(0,p.jsx)(tx,{depositOptionSelector:$,settleOptionSelector:Y,isLoading:f,isSubmitting:B,onMethodChange:c,"data-sentry-element":"ShiftInputGroup","data-sentry-source-file":"CreateOrder.tsx"}),(0,p.jsx)("div",{className:"my-2",children:(0,p.jsx)(eI,{disabled:f||B,"data-sentry-element":"CreateOrderAddress","data-sentry-source-file":"CreateOrder.tsx"})}),(0,p.jsx)("div",{className:"flex flex-col gap-x-2 gap-y-4 pt-4 md:flex-row md:justify-center",children:ee?(0,p.jsx)(L.$,{role:"button",type:"button",variant:"primary",className:"w-full",disabled:eg,onClick:()=>q(!0),tabIndex:0,children:eo?R("continue"):R("noCommissionBalance",{assetId:null!=(s=null==x?void 0:x.asset.id)?s:""})}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(L.$,{variant:"primary",buttonSize:"normal",role:"button",type:"submit",disabled:eg,isLoading:B,className:"w-full",tabIndex:0,"aria-label":ew,"aria-disabled":eg,"aria-describedby":ej?"shift-disabled-reason":void 0,children:ek},"shift"),ej&&(0,p.jsx)("span",{id:"shift-disabled-reason",className:"sr-only",children:ej})]})}),(0,p.jsx)("div",{className:"dark:border-darker-gray border-smoke flex min-w-48 flex-1 items-center justify-center md:justify-end lg:border-b lg:py-4"})]})]})}),(0,p.jsx)(m.Suspense,{fallback:null,"data-sentry-element":"Suspense","data-sentry-source-file":"CreateOrder.tsx",children:(0,p.jsx)(tw,{formId:tj,isLoading:B,isOpen:Q,closeModal:()=>q(!1),"data-sentry-element":"WithdrawCommissionModal","data-sentry-source-file":"CreateOrder.tsx"})})]})},tE=e=>{let{loading:t}=e,{depositMethod:a,settleMethod:s,updateMethods:l,redirectToOrder:n}=(()=>{let{initialDepositMethod:e,initialSettleMethod:t}=(0,m.useContext)(k.M),{data:a,loading:s,error:l}=(0,E.A)(),n=(0,j.useRouter)(),{from:r,to:i,methodId:o}=n.query,d=(0,N.B)(),c=(0,m.useRef)(null),u=w().get(g._6),h=(0,C.o)(),f=null==a?void 0:a.depositMethods,x=null==a?void 0:a.settleMethods,p=(null==u?void 0:u.split("/")[0])||(null==d?void 0:d.defaultDepositMethod),v=(null==u?void 0:u.split("/")[1])||(null==d?void 0:d.defaultSettleMethod),y=e=>"string"==typeof e?e:"",M=y(r)||y(o)||y(p),O=y(i)||y(v),R=f&&M&&f[M]||e,A=x&&O&&x[O]||t;return(0,m.useEffect)(()=>
1{if(!f||!x||!d)return;let e=y(r)||void 0,t=y(i)||void 0,a=(e=>{let{from:t,to:a,depositMethods:s,settleMethods:l,defaultShift:n}=e,r=!!t&&!S(s,t),i=!!a&&!S(l,a),o=!!t&&!!a&&t===a;if(!r&&!i)return o?{path:"/swap/".concat(t),reason:"sameMethodPair"}:null;let{defaultDepositMethod:d,defaultSettleMethod:c}=n,u=r||!t?d:t,m=i||!a?c:a;if(u===m){var h,f;r?u=null!=(h=[d,c].find(e=>e!==m&&S(s,e)))?h:u:m=null!=(f=[c,d].find(e=>e!==u&&S(l,e)))?f:m}return u===m?{path:"/swap/".concat(u),reason:"invalidMethod"}:{path:"/shift/".concat(u,"/").concat(m),reason:"invalidMethod"}})({from:e,to:t,depositMethods:f,settleMethods:x,defaultShift:d});if(!a){c.current=null;return}let s="".concat(e,"/").concat(t);if(c.current===s)return;c.current=s,"invalidMethod"===a.reason&&((0,b.P0)({type:"error",text:"Could not find a Shift Pair for ".concat(e,"/").concat(t,". You are being redirected...")}),w().remove(g._6));let l=h.toString();n.replace(l?"".concat(a.path,"?").concat(l):a.path).catch(()=>{c.current=null})},[r,i,f,x,d]),(0,m.useEffect)(()=>{n.prefetch("/orders/[id]")},[]),{depositMethod:R,settleMethod:A,updateMethods:(0,m.useCallback)(e=>{let{from:t,to:a}=e;if(t===a)return;let s="/shift/".concat(t,"/").concat(a),l=new Date;l.setTime(l.getTime()+31536e7),w().set(g._6,"".concat(t,"/").concat(a),{path:"/",expires:l}),"/swap/[methodId]"===n.pathname?n.push("/swap/".concat(t),"/swap/".concat(t),{shallow:!0}):"/shift/[from]/[to]"===n.pathname&&n.push(s,s,{shallow:!0})},[]),redirectToOrder:(0,m.useCallback)(async e=>{let t=new URLSearchParams(window.location.search).toString();await n.push("/orders/".concat(e.id).concat(t?"?".concat(t):""))},[n.push]),loadingFacts:s,error:l}})(),{setValue:r,settleMethod:i}=(0,h.u)(),o=(0,C.o)(),c=o.get(O.jw.DEPOSIT_ADDRESS),u=o.get(O.jw.SETTLE_ADDRESS),f=o.get(O.jw.MEMO),x=(0,m.useRef)(!1),v=(0,m.useRef)(!1);return(0,M.E)({message:"Deposit address: ".concat(c," \n"),show:!!c}),(0,m.useEffect)(()=>{var e,t;let l=null;try{let e=window.sessionStorage.getItem(g.Z2);if(e){let t=JSON.parse(e);if(t&&"object"==typeof t){let e=Reflect.get(t,"settleAddress"),a=Reflect.get(t,"memo"),s=Reflect.get(t,"shiftPair"),n=Reflect.get(t,"orderType");l="string"==typeof e&&"string"==typeof a&&"string"==typeof s?{settleAddress:e,memo:a,shiftPair:s,orderType:(e=>e===d.ZN.fixed||e===d.ZN.variable)(n)?n:void 0}:null}else l=null;if(!l)try{window.sessionStorage.removeItem(g.Z2)}catch(e){}}}catch(e){l=null}if(!l&&x.current)return;l&&(v.current=!0);let n=a&&s?"".concat(a.id,"/").concat(s.id):null;if((null==l?void 0:l.shiftPair)&&n&&l.shiftPair!==n){try{window.sessionStorage.removeItem(g.Z2)}catch(e){}v.current=!1,l=null}let o=null!=(e=null==l?void 0:l.settleAddress)?e:u,c=null!=(t=null==l?void 0:l.memo)?t:f;if((!l||i)&&(i&&null!=o&&r(A.Q3.SettleAddress,o,{shouldValidate:!0}),null!=c&&r(A.Q3.Memo,c,{shouldValidate:!0}),(null==l?void 0:l.orderType)&&r(A.Q3.OrderType,l.orderType,{shouldValidate:!0}),(u||f)&&(x.current=!0),l&&i))try{window.sessionStorage.removeItem(g.Z2),v.current=!1}catch(e){}},[u,f,i,r,a,s]),(0,m.useEffect)(()=>()=>{if(v.current)try{window.sessionStorage.removeItem(g.Z2)}catch(e){}},[]),(0,p.jsx)(tN,{depositMethod:a,settleMethod:s,onRedirectToOrder:e=>{window.scrollTo({top:0,left:0,behavior:"smooth"}),n(e).catch(e=>(0,R.A)([e],R._.ERROR))},onMethodChange:l,isLoading:t,"data-sentry-element":"CreateOrder","data-sentry-component":"CreateOrderWithQuery","data-sentry-source-file":"CreateOrderWithQuery.tsx"})};var tC=a(73117);let tM=e=>{let{title:t,subtitle:a,isLoading:s}=e,{props:l,shouldShowOrderTopbar:n}=x({orderId:null}),{isMobileScreen:i}=(0,Q.A)(),o=!i;return(0,p.jsxs)("div",{className:"mx-auto min-h-[90vh] w-full max-w-7xl pb-10 flex flex-col justify-center","data-sentry-component":"ShiftApp","data-sentry-source-file":"ShiftApp.tsx",children:[!!t&&!!a&&(0,p.jsxs)("div",{className:"mb-2 flex w-full flex-col items-center justify-between sm:pt-4 sm:-mb-2",children:[(0,p.jsx)("h1",{className:"xs:text-3xl mb-2 mt-0 text-center text-2xl sm:text-4xl lg:mt-2",children:(0,p.jsx)("span",{className:"font-display lowercase tracking-wider",children:t})}),(0,p.jsx)("p",{className:"my-0 text-center font-light leading-6 max-w-5xl",children:a})]}),(0,p.jsx)("div",{children:(0,p.jsxs)(v.Z,{variant:"extraPadding","data-sentry-element":"Card","data-sentry-source-file":"ShiftApp.tsx",children:[n&&(0,p.jsx)("div",{className:(0,ew.QP)("transition-opacity duration-400 ease-out motion-reduce:transition-none motion-reduce:opacity-100",o?"opacity-100":"opacity-0",o?"visible":"invisible",o?"h-auto":"h-0"),
1children:(0,p.jsx)(tC.T,(0,r._)({},l))}),(0,p.jsx)("div",{className:"grid min-h-128",children:(0,p.jsx)(tE,{loading:s,"data-sentry-element":"CreateOrderWithQuery","data-sentry-source-file":"ShiftApp.tsx"})})]})})]})};var tO=a(13500),tR=a(27004),tA=a(27727);let tT=(0,m.lazy)(()=>a.e(2678).then(a.bind(a,32678)).then(e=>({default:e.IntegrationsSection}))),tI=()=>(0,p.jsx)("section",{id:"integrations","data-sentry-component":"IntegrationsSectionSkeleton","data-sentry-source-file":"LazyIntegrationsSection.tsx",children:(0,p.jsx)("div",{className:"mx-auto w-full max-w-7xl pt-10 sm:pt-16",children:(0,p.jsxs)("div",{className:"flex flex-col items-center gap-x-10 gap-y-8 lg:flex-row lg:justify-between",children:[(0,p.jsxs)("div",{className:"flex flex-col items-center lg:items-start",children:[(0,p.jsx)("div",{className:"mb-8 h-8 w-64 animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"}),(0,p.jsx)("div",{className:"mb-8 space-y-2",children:[1,2,3].map(e=>(0,p.jsxs)("div",{className:"flex items-center gap-3",children:[(0,p.jsx)("div",{className:"h-4 w-4 animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"}),(0,p.jsx)("div",{className:"h-4 w-32 animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"})]},e))}),(0,p.jsx)("div",{className:"h-12 w-32 animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"})]}),(0,p.jsx)("div",{className:"xs:grid-cols-2 grid w-full max-w-3xl flex-1 grid-cols-1 grid-rows-2 sm:grid-cols-3",children:[1,2,3,4,5,6].map(e=>(0,p.jsx)("div",{className:"xs:py-16 border-smoke flex items-center justify-center py-8 px-4 dark:border-darker-gray",children:(0,p.jsx)("div",{className:"h-16 w-40 animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"})},e))})]})})}),tL=()=>{let{isNearScreen:e,fromRef:t}=(0,tA.M)({distance:"250px"});return(0,p.jsx)("div",{ref:t,"data-sentry-component":"LazyIntegrationsSection","data-sentry-source-file":"LazyIntegrationsSection.tsx",children:e?(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)(tI,{}),children:(0,p.jsx)(tT,{})}):(0,p.jsx)(tI,{})})};var t_=a(63041);let tP=m.lazy(()=>a.e(9107).then(a.bind(a,79107)).then(e=>({default:e.RecentShifts}))),tF=()=>(0,p.jsx)("section",{id:"recent-shifts","data-sentry-component":"RecentShiftsSkeleton","data-sentry-source-file":"LazyRecentShifts.tsx",children:(0,p.jsx)("div",{className:"mx-auto w-full max-w-7xl py-10 sm:py-16",children:(0,p.jsxs)("div",{className:"flex flex-col items-center justify-between",children:[(0,p.jsx)(e4.E,{className:"h-6 xs:h-8 sm:h-10 md:h-12 lg:h-14 mb-6 md:mb-0 w-48","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyRecentShifts.tsx"}),Array.from({length:10},(e,t)=>(0,p.jsx)(t_.X.Row,{style:{padding:"8px"},children:(0,p.jsx)(t_.X.Cell,{width:"100%",className:"pr-0 text-center flex justify-center",children:(0,p.jsx)(e4.E,{className:"h-6 xs:h-8 sm:h-10 md:h-12 lg:h-14 w-3/4 lg:w-full rounded-md"})})},"recent-shifts-skeleton-row-".concat(t)))]})})}),tz=()=>{let{isNearScreen:e,fromRef:t}=(0,tA.M)({distance:"150px"});return(0,p.jsx)("div",{ref:t,"data-sentry-component":"LazyRecentShifts","data-sentry-source-file":"LazyRecentShifts.tsx",children:(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)(tF,{}),"data-sentry-element":"Suspense","data-sentry-source-file":"LazyRecentShifts.tsx",children:e?(0,p.jsx)(tP,{}):null})})};var tQ=a(85868);let tD=m.lazy(()=>a.e(8176).then(a.bind(a,18176)).then(e=>({default:e.VolumeStats}))),tq=()=>(0,p.jsx)("section",{id:"volume","data-sentry-component":"VolumeStatsSkeleton","data-sentry-source-file":"LazyVolumeStats.tsx",children:(0,p.jsxs)("div",{className:"mx-auto w-full max-w-7xl py-10 sm:py-20",children:[(0,p.jsx)(e4.E,{className:"xs:h-8 mb-10 h-7 w-32 rounded-md sm:h-9 md:mb-16 md:h-10","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"}),(0,p.jsxs)("div",{className:"flex flex-col-reverse gap-10 md:grid md:grid-cols-3 md:gap-14",children:[(0,p.jsx)("div",{className:"md:col-span-2",children:(0,p.jsx)(e4.E,{className:"h-[420px] w-full rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"})}),(0,p.jsxs)("div",{className:"md:col-span-1 md:flex md:flex-col md:justify-end md:pb-6",children:[(0,p.jsxs)("div",{className:"dark:border-darker-gray border-smoke mb-6 grid grid-cols-2 grid-rows-2 gap-8 border-b pb-8 md:gap-12 md:pb-12",children:[(0,p.jsxs)("div",{className:"flex flex-col items-center md:items-start",children:[(0,p.jsx)(e4.E,{className:"xs:h-4 mb-2 h-3 w-20 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"}),(0,p.jsx)(e4.E,{className:"xs:h-4 h-3 w-16 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"})]}),(0,p.jsxs)("div",{className:"flex flex-col items-center md:items-start",children:[(0,p.jsx)(e4.E,{className:"xs:h-4 mb-2 h-3 w-16 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"}),(0,p.jsx)(e4.E,{className:"xs:h-4 h-3 w-20 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"})]}),(0,p.jsxs)("div",{className:"flex flex-col items-center md:items-start",children:[(0,p.jsx)(e4.E,{className:"xs:h-4 mb-2 h-3 w-18 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"}),(0,p.jsx)(e4.E,{className:"xs:h-4 h-3 w-24 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"})]}),(0,p.jsxs)("div",{className:"flex flex-col items-center md:items-start",children:[(0,p.jsx)(e4.E,{className:"xs:h-4 mb-2 h-3 w-16 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"}),(0,p.jsx)(e4.E,{className:"xs:h-4 h-3 w-20 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"})]})]}),(0,p.jsxs)("div",{className:"flex flex-col items-center md:items-start",children:[(0,p.jsx)(e4.E,{className:"mb-2 h-4 w-16 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"}),(0,p.jsx)(e4.E,{className:"h-6 w-32 rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyVolumeStats.tsx"})]})]})]})]})}),tV=()=>{let{isNearScreen:e,fromRef:t}=(0,tA.M)({distance:"150px"});return(0,p.jsx)("div",{ref:t,"data-sentry-component":"LazyVolumeStats","data-sentry-source-file":"LazyVolumeStats.tsx",children:(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)(tq,{}),"data-sentry-element":"Suspense","data-sentry-source-file":"LazyVolumeStats.tsx",children:e?(0,p.jsx)(tD,{}):null})})},tB=(0,m.lazy)(()=>a.e(9561).then(a.bind(a,69561)).then(e=>({default:e.Testimonials}))),tU=()=>(0,p.jsx)("section",{"aria-hidden":"true","data-sentry-component":"TestimonialsSkeleton","data-sentry-source-file":"LazyTestimonials.tsx",children:(0,p.jsxs)("div",{className:"container mx-auto w-full max-w-6xl px-0 py-16",children:[(0,p.jsx)(e4.E,{className:"mb-8 h-10 w-80 max-w-full rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyTestimonials.tsx"}),(0,p.jsx)(e4.E,{className:"mx-auto mb-12 h-6 w-64 max-w-full rounded-md","data-sentry-element":"Skeleton","data-sentry-source-file":"LazyTestimonials.tsx"}),(0,p.jsx)("div",{className:"grid auto-rows-auto grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3},(e,t)=>(0,p.jsx)(e4.E,{className:"h-48 w-full rounded-md"},"testimonial-skeleton-".concat(t)))})]})}),tZ=()=>(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)(tU,{}),"data-sentry-element":"Suspense","data-sentry-component":"LazyTestimonials","data-sentry-source-file":"LazyTestimonials.tsx",children:(0,p.jsx)(tB,{"data-sentry-element":"Testimonials","data-sentry-source-file":"LazyTestimonials.tsx"})});var tW=a(18393),tG=a(75440);let tH=(0,m.lazy)(()=>a.e(2678).then(a.bind(a,32678)).then(e=>({default:e.IntegrationsSection}))),tK=(0,m.lazy)(()=>a.e(9107).then(a.bind(a,79107)).then(e=>({default:e.RecentShifts}))),tJ=(0,m.lazy)(()=>a.e(8176).then(a.bind(a,18176)).then(e=>({default:e.VolumeStats}))),t$=()=>(0,p.jsx)("br",{"data-sentry-component":"renderLineBreak","data-sentry-source-file":"ShiftSections.tsx"}),tY=()=>{let e=(0,P.c)("shift"),{isUsDomain:t}=(0,tW.Y)(),a=[e.rich("stepSelectCoins",{br:t$}),e("stepDepositCoin"),e("stepReceiveCoins")];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(tQ.$,{"data-sentry-element":"LazyTrustedBy","data-sentry-source-file":"ShiftSections.tsx"}),(0,p.jsx)(tZ,{"data-sentry-element":"LazyTestimonials","data-sentry-source-file":"ShiftSections.tsx"}),(0,p.jsx)(v.Z,{variant:"extraPadding","data-sentry-element":"Card","data-sentry-source-file":"ShiftSections.tsx",children:(0,p.jsx)(tO.l,{steps:a,title:e("shiftProcessTitle"),"data-sentry-element":"HorizontalStepsSection","data-sentry-source-file":"ShiftSections.tsx"})}),(0,p.jsx)(v.Z,{variant:"extraPadding","data-sentry-element":"Card","data-sentry-source-file":"ShiftSections.tsx",children:(0,tR.A)()||tG.Am?(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)("div",{className:"animate-pulse bg-gray-200 rounded-sm h-32"}),children:(0,p.jsx)(tK,{})}):(0,p.jsx)(tz,{})}),!t&&(0,p.jsx)(v.Z,{variant:"extraPadding",children:(0,tR.A)()||tG.Am?(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)("div",{className:"animate-pulse bg-gray-200 rounded-sm h-32"}),children:(0,p.jsx)(tJ,{})}):(0,p.jsx)(tV,{})}),!t&&((0,tR.A)()||tG.Am?(0,p.jsx)(m.Suspense,{fallback:(0,p.jsx)("div",{className:"animate-pulse bg-gray-200 rounded-sm h-32"}),children:(0,p.jsx)(tH,{})}):(0,p.jsx)(tL,{}))]})}},48041:(e,t,a)=>{a.d(t,{u:()=>r});var s=a(86917),l=a(7272),n=a(81817);let r=()=>{let e=(0,l.xW)(),{watch:t}=e,a=t(n.Q3.DepositAmount),r=t(n.Q3.DepositMethod),i=t(n.Q3.Memo),o=t(n.Q3.OrderType),d=t(n.Q3.Quote),c=t(n.Q3.SettleAddress),u=t(n.Q3.SettleAmount),m=t(n.Q3.SettleMethod),h=t(n.Q3.IsLoadingQuote);return(0,s._)({depositAmount:a,depositMethod:r,memo:i,orderType:o,quote:d,settleAddress:c,settleAmount:u,settleMethod:m,isLoadingQuote:h},e)}},49777:(e,t,a)=>{a.d(t,{q:()=>n});var s=a(76908),l=a(93004);let n=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"bg-new-black/30 f
1ixed inset-0 z-20 w-screen"}),(0,s.jsx)("div",{className:"fixed inset-0 z-30 flex items-center justify-center",children:(0,s.jsx)(l.y,{size:"2rem","data-sentry-element":"Spinner","data-sentry-source-file":"ModalLoadingOverlay.tsx"})})]})},57089:(e,t,a)=>{a.d(t,{Y:()=>n});var s=a(10052),l=a(2168);let n=e=>(0,s.s)((0,l.Af)(e)).slice(2)},59487:(e,t,a)=>{a.d(t,{A:()=>g});var s=a(76908),l=a(7687),n=a(83141),r=a(7754),i=a(92165),o=a(83612),d=a(29410),c=a.n(d),u=a(66656),m=a(46598),h=a(68970),f=a(15675),x=a(51530);let p=[l.$7.btc];var v=a(10146);let g=e=>{let t,{method:a,fieldId:d,setFormValue:g}=e,[b,y]=(0,u.useState)(!1),{setModalIsOpen:w,setTransactionState:j,setModalOptions:k,TransactionStates:S}=(0,f.h)(),{isConnected:N,evmAddress:E,solanaAddress:C,connector:M}=(0,x.l)(),{logEvent:O}=(0,m.s)(),R=(0,o.A)(M),{isWebBtcAvailable:A,getWebBtcAddress:T}=(()=>{let e=!!window.webbtc,t=async()=>{var t;if(!e)throw Error("webbtc is not available");await (null==(t=window.webbtc)?void 0:t.enable())};return{getWebBtcAddress:async()=>{var a;if(!e)throw Error("webbtc is not available");await t();let s=await (null==(a=window.webbtc)?void 0:a.getAddress());return null==s?void 0:s.address},isWebBtcAvailable:e}})(),I=(0,h.a)(),L=A&&(t=a.id,p.includes(t)),_=a.network===l.qq.solana,P=(null==R?void 0:R.text)===r.P.generic.text,F=N||!!(0,v.j)(),z=_?C:E||(0,v.j)();(0,u.useEffect)(()=>{b&&a.network===l.qq.solana&&C&&(g(d,C),w(!1),y(!1)),b&&z&&F&&a.network!==l.qq.solana&&(g(d,z),w(!1),y(!1))},[b,z,d,g,C,a.network,w,F]);let Q=async e=>{null==e||e.preventDefault(),O("Get Address from WebBtc button click");let t=await T();t&&g(d,t)},D=async e=>{if(null==e||e.preventDefault(),O("Get Address from MetaMask button click"),!E){w(!0),y(!0),j(S.PENDING_WALLET_CONNECTION);return}E&&g(d,E)},q=async e=>{if(null==e||e.preventDefault(),O("Get Address from Solana button click"),!C){w(!0),y(!0),k({settleMethod:a}),j(S.PENDING_WALLET_CONNECTION);return}C&&g(d,C)},V="cursor-pointer dark:border-smoke dark:hover:border-flashbang-white border-dark-gray dark:text-flashbang-white text-new-black dark:focus:shadow-outline-white focus:shadow-outline-new-black flex items-center rounded-md border px-3 py-1 text-base uppercase tracking-wide";return _?(0,s.jsx)("button",{type:"button",onClick:q,className:V,tabIndex:0,children:(0,s.jsx)("span",{children:"Get address from Solana wallet"})}):L?(0,s.jsx)("button",{type:"button",onClick:Q,className:V,tabIndex:0,children:(0,s.jsx)("span",{children:"Get address from bitcoin wallet"})}):(0,n.rt)(a)&&I?(0,s.jsxs)("button",{type:"button",onClick:D,className:V,tabIndex:0,children:[E&&(null==R?void 0:R.icon)&&(0,s.jsx)("div",{className:"mr-2 flex aspect-square w-7 items-center justify-center rounded-full",children:P?(0,s.jsx)(i.u,{size:20,className:"h-5 w-5"}):(0,s.jsx)(c(),{unoptimized:!0,src:null==R?void 0:R.icon,alt:"".concat(null==M?void 0:M.name," Icon"),className:"w-5",width:20,height:20})}),(0,s.jsxs)("span",{children:["Get address from ",E?null==M?void 0:M.name:"Wallet"]})]}):null}},66750:(e,t,a)=>{a.d(t,{$M:()=>o,Re:()=>n,q4:()=>i});var s=a(83141),l=a(57089),n=function(e){return e.AwaitingDeposit="awaiting_deposit",e.Complete="complete",e.Created="created",e.Dead="dead",e.Expired="expired",e.Processing="processing",e.Refund="refund",e.Refunded="refunded",e.Refunding="refunding",e.Reviewing="reviewing",e.Unknown="unknown",e}({});let r={dead:"dead",pending:"processing",processing:"processing",refund:"refund",refunded:"refunded",refunding:"refunding",review:"reviewing",settled:"complete",settling:"processing"},i=e=>{var t;if(e.expired)return"expired";if(!((null==(t=e.deposits)?void 0:t.length)>0))return"awaiting_deposit";let{status:a}=(0,s.s_)(e.deposits);return r[a]||"unknown"},o=(e,t)=>{var a,n;return{analytics_order_id:(0,l.Y)(e.id),status:null!=(a=null==t?void 0:t.statusOverride)?a:i(e),deposit_method:e.depositMethod.id,settle_method:e.settleMethod.id,order_type:null!=(n=e.type)?n:"unknown",amount_bucket:(e=>null==e||Number.isNaN(e)?null:e<100?"lt_100":e<500?"100_500":e<1e3?"500_1k":e<5e3?"1k_5k":e<1e4?"5k_10k":e<25e3?"10k_25k":"25k_plus")((e=>{var t;if(!(null==(t=e.deposits)?void 0:t.length))return null;let{depositAmountUsd:a}=(0,s.s_)(e.deposits);if(!a)return null;let l=Number.parseFloat(a);return Number.isNaN(l)?null:l})(e))}}},67313:(e,t,a)=>{a.d(t,{_o:()=>i._o,oF:()=>u});var s=a(86917),l=a(97722),n=a(7687),r=a(9540),i=a(50087),o=a(33030),d=a(21362),c=a(35766);let u=e=>{let t=!!(e&&!((0,n.Rb)(null==e?void 0:e.network)&&(null==e?void 0:e.tokenAddress))),{balance:a,shouldShowBalance:u}=(0,c.A)(e),{data:m}=(0,d.X)({chainId:e?(0,r.Xb)(e):1,formatUnits:"wei",query:{enabled:t}});return(0,l._)((0,s._)({},((e,t,a)=>{if(!t||!a||!e)return{spendableBalance:e,gasCost:"0"};let s=n.ns.times((0,o.c)(a),i._o).toString();return{spendableBalance:n.ns.lt(s,e)?n.ns.minus(e,s):"0",gasCost:s}})(a||"",t,null==m?void 0:m.maxFeePerGas)),{shouldShowBalance:u})}},70058:(e,t,a)=>{a.d(t,{T:()=>x});var s=a(40317),l=a(7687),n=a(54381),r=a.n(n),i=a(50087),o=a(57849),d=a(75440),c=a(4984),u=a(28048),m=a(46598),h=a(26477),f=a(86784);let x=()=>{let{setAccountSecret:e}=(0,h.j)(),{identify:t}=(0,m.s)(),a=(0,f.O)(),[n,{loading:x,error:p}]=(0,s.n)(o.A2),v=a||(0,c.Gq)(c.lO.PARENT_AFFILIATE_ID)||r().get(i.YP)||void 0;return{createAccount:async()=>{try{var a;let{data:s}=await n({variables:{affiliate:v}});if(null==s||null==(a=s.createAccount)?void 0:a.secret)return(0,d.QX)(l.xz,s.createAccount.secret),e(s.createAccount.secret),s.createAccount.id&&t(s.createAccount.id),s.createAccount.secret;throw Error("Failed to create account")}catch(e){throw e instanceof Error?(0,u.A)(["Create account error: ".concat(e.message),e],u._.ERROR):(0,u.A)(["Create account error: ".concat(e),e],u._.ERROR),e}},loading:x,error:p}}},73117:(e,t,a)=>{a.d(t,{T:()=>y});var s,l,n=a(76908),r=a(7687),i=a(26846);a(28418);var o=a(66656),d=a(92849);a(22865),function(e){e.COMPLETE="COMPLETE",e.CURRENT="CURRENT",e.PROCESSING="PROCESSING",e.UNSTARTED="UNSTARTED",e.FAILED="FAILED"}(s||(s={})),s.COMPLETE,d.A,s.CURRENT,s.FAILED,s.PROCESSING,s.UNSTARTED,s.COMPLETE,s.CURRENT,s.PROCESSING,s.FAILED,s.UNSTARTED,s.COMPLETE,s.CURRENT,s.PROCESSING,s.UNSTARTED,s.FAILED;var c=a(20375),u=a(17514);function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let h=e=>o.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 29"},e),l||(l=o.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:3.5,d:"m2 27 10-10.294v-4.412L2 2"})));var f=a(22602),x=a(83141),p=function(e){return e[e.CREATE_ORDER=0]="CREATE_ORDER",e[e.SEND_DEPOSIT=1]="SEND_DEPOSIT",e[e.RECEIVE_SETTLEMENT=2]="RECEIVE_SETTLEMENT",e}(p||{}),v=a(95187),g=a(59824);let b=e=>{let{method:t}=e,{asset:a,network:s}=t,l=(0,i.q)(t),r=(0,v.S)(t);return(0,n.jsx)(c.H,{token:{asset:"".concat(a.name," logo"),network:"".concat(s,"-icon")},tokenImage:l,networkImage:r,"data-sentry-element":"TokenImage","data-sentry-component":"CoinIcon","data-sentry-source-file":"OrderTopbar.tsx"})},y=e=>{var t;let{order:a,depositMethod:l,settleMethod:i}=e,d=(0,u.c)("order"),{steps:c}=(e=>{var t;let a=(0,u.c)("order"),{order:l,depositMethod:n,settleMethod:i}=e||{},{pending:o,processing:d,settling:c,settled:m,refund:h,refunding:f,refunded:v,review:g}=r.U_,{UNSTARTED:b,PROCESSING:y,CURRENT:w,COMPLETE:j,FAILED:k}=s,S=!!(null==l?void 0:l.deposits)&&l.deposits.length>0,N=[h,f,v].includes((null==l||null==(t=l.deposits[0])?void 0:t.status)||"");return{steps:[{id:p.CREATE_ORDER,title:a("stepChoosePair"),subtitle:"".concat((null==l?void 0:l.depositMethod.asset.id)||(null==n?void 0:n.asset.id)," / ").concat((null==l?void 0:l.settleMethod.asset.id)||(null==i?void 0:i.asset.id)," (").concat((null==l?void 0:l.settleMethod.transport)||(null==i?void 0:i.transport),")").toUpperCase(),status:l?j:w},{id:p.SEND_DEPOSIT,title:a("stepSendAsset",{assetId:(null==l?void 0:l.depositMethod.asset.id)||(null==n?void 0:n.asset.id)||""}),status:(()=>
1{if(!l)return b;if(l.expired&&!S)return k;if(!S)return w;let{deposits:e}=l,{status:t}=(0,x.s_)(e);switch(t){case o:case d:return y;default:return j}})()},{id:p.RECEIVE_SETTLEMENT,title:a("stepReceiveAsset",{assetId:(N?null==l?void 0:l.depositMethod.asset.id:(null==l?void 0:l.settleMethod.asset.id)||(null==i?void 0:i.asset.id))||""}),status:(()=>{if(!S)return b;let{deposits:e}=l,{status:t}=(0,x.s_)(e);switch(t){case c:case f:return y;case h:case g:return w;case m:case v:return j;default:return b}})()}]}})({order:a,depositMethod:l,settleMethod:i}),{data:m}=(0,f.A)(),v=(0,o.useRef)(null),[y,w]=(0,o.useState)(!1),{refund:j,refunding:k,refunded:S}=r.U_,N=[j,k,S].includes((null==a||null==(t=a.deposits[0])?void 0:t.status)||""),E=(l||(null==a?void 0:a.depositMethod))&&(i||(null==a?void 0:a.settleMethod)),C=l||(null==a?void 0:a.depositMethod),M=N&&a&&(null==m?void 0:m.depositMethods)?m.depositMethods[a.refundMethodId||a.depositMethod.id]:i||(null==a?void 0:a.settleMethod),O=c.find(e=>[s.PROCESSING,s.CURRENT,s.FAILED].includes(e.status))||c[c.length-1];return(e=>{let{shouldFire:t,callback:a,targetElementRef:s}=e,l=e=>{(null==s?void 0:s.current)&&e.target&&!s.current.contains(e.target)&&a()};(0,o.useEffect)(()=>(t?document.addEventListener("click",l):document.removeEventListener("click",l),()=>{document.removeEventListener("click",l)}),[t])})({targetElementRef:v,shouldFire:y,callback:()=>w(!1)}),(0,n.jsx)("div",{className:"flex items-center gap-4 pb-6 md:pb-8 md:pt-6","data-sentry-component":"OrderTopbar","data-sentry-source-file":"OrderTopbar.tsx",children:c.map((e,t)=>{let a=E&&C&&e.id===p.SEND_DEPOSIT,s=E&&M&&e.id===p.RECEIVE_SETTLEMENT;return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsxs)("div",{className:(0,g.QP)("flex items-center",0===t&&"hidden sm:inline"),children:[(0,n.jsxs)("span",{className:(0,g.QP)("text-new-black dark:text-flashbang-white font-text hidden text-sm uppercase transition duration-300 sm:inline",e.id===O.id?"opacity-100":"opacity-40"),children:[d("stepNumber",{number:t+1}),"\xa0"]}),a&&(0,n.jsx)(b,{method:C}),s&&(0,n.jsx)(b,{method:M}),(0,n.jsx)("span",{className:(0,g.QP)("text-new-black dark:text-flashbang-white font-text text-sm uppercase transition duration-300",e.id===O.id?"opacity-100":"opacity-40",(a||s)&&"ml-2"),children:e.title})]}),t<c.length-1&&(0,n.jsx)(h,{className:(0,g.QP)("text-new-black dark:text-flashbang-white h-4 transition duration-300",e.id===O.id?"opacity-100":"opacity-40",0===t&&"hidden sm:inline")})]},e.id)})})}},74455:(e,t,a)=>{a.d(t,{l:()=>o});var s=a(76908),l=a(17514),n=a(29410),r=a.n(n);let i={src:"/_next/static/media/qr-code.468d78c0.svg",height:32,width:32,blurWidth:0,blurHeight:0},o=()=>{let e=(0,l.c)("common");return(0,s.jsx)(r(),{width:32,height:32,className:"invert dark:invert-0",src:i,alt:e("scanQrAlt"),"data-sentry-element":"Image","data-sentry-component":"QrIcon","data-sentry-source-file":"QrIcon.tsx"})}},77387:(e,t,a)=>{a.d(t,{A:()=>w});var s=a(76908),l=a(8328),n=a(27004),r=a(37682),i=a.n(r),o=a(29410),d=a.n(o),c=a(66656);let u={src:"/_next/static/media/camera-flip.b5f4840d.svg",height:24,width:28,blurWidth:0,blurHeight:0};var m=a(32507),h=a(93315),f=a(18535),x=a(75440),p=a(28048),v=a(86917);let g=e=>{let t=new URL(e),a=t.searchParams.get("amount");return(0,v._)({address:t.pathname},!!a&&{amount:a})},b=[["web+stellar",e=>{try{let t=new URL(e),a=t.searchParams.get("memo"),s=t.searchParams.get("amount");return(0,v._)({address:t.searchParams.get("destination")||""},!!a&&{memo:a},!!s&&{amount:s})}catch(e){return(0,p.A)(["Parsing XLM data from QR code failed.",e],p._.ERROR),{address:""}}}],["ethereum:",g],["bitcoin:",g],["solana:",g],["dogecoin:",g],["litecoin:",g]],y=i()(()=>a.e(5362).then(a.t.bind(a,45362,23)),{loadableGenerated:{webpack:()=>[45362]},ssr:!1,loading:()=>(0,s.jsx)(h.A,{})}),w=e=>{let{closeModal:t,modalIsOpen:a,settleAsset:r,inputId:i,memoId:o,amountId:h,setFormValue:g,onAmountScanned:w}=e,[j,k]=(0,c.useState)(),[S,N]=(0,c.useState)(!1),{isMobileScreen:E,isTabletScreen:C}=(0,f.A)(),M=E||C,[O,R]=(0,c.useState)(M?"environment":"user"),A=async e=>{if(e&&!S){N(!0);try{let{address:a,memo:s,amount:l}=(e=>{let t={address:e};for(let[a,s]of b)if(e.startsWith(a))return t=s(e);if(e.includes("?"))try{let[a,s]=e.split("?"),l=new URLSearchParams(s),n=l.get("amount"),r=l.get("memo");t=(0,v._)({address:a},!!n&&{amount:n},!!r&&{memo:r})}catch(e){(0,p.A)(["Parsing QR data without protocol failed.",e],p._.ERROR)}return t})(e);g(i,a,{shouldValidate:!0}),s&&g(o,s),l&&h&&(g(h,l,{shouldValidate:!0}),w&&await w(h,l)),t()}finally{N(!1)}}}
1,T=M||x.Am||(0,n.A)();return(0,s.jsxs)(l.a,{isOpen:a,handleClose:()=>{k(void 0),N(!1),t()},title:"Scan ".concat(r," address QR Code"),"data-sentry-element":"Modal","data-sentry-component":"QrScanner","data-sentry-source-file":"QrScanner.tsx",children:[(0,s.jsxs)("div",{className:"border-punk-red relative mx-8 mb-8 overflow-hidden rounded-lg border-2 sm:mx-auto sm:w-60 ",children:[(0,s.jsx)(y,{delay:300,facingMode:O,onError:e=>{k("Your camera is blocked or disabled."),(0,p.A)([e],p._.ERROR)},onScan:A,showViewFinder:!1,style:{width:"100%"},"data-sentry-element":"QrReader","data-sentry-source-file":"QrScanner.tsx"}),T&&(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{null==e||e.preventDefault(),(()=>{if("user"===O)return R("environment");R("user")})()})(),className:"absolute bottom-2 right-2 flex h-12 w-12 items-center justify-center rounded-full bg-black/60 shadow-lg","aria-label":"Flip camera",children:(0,s.jsx)(d(),{src:u,width:24,height:24,alt:"Flip camera",className:"relative"})})]}),j&&(0,s.jsx)(m.A,{toast:!0,message:j})]})}},80803:(e,t,a)=>{a.d(t,{J:()=>s.J});var s=a(83845)},83141:(e,t,a)=>{a.d(t,{E9:()=>r,g2:()=>i,iI:()=>n,rt:()=>o,s_:()=>l});var s=a(7687);let l=e=>e.find(e=>e.depositAmount&&e.settleRate&&e.settleAmount)||e[0],n=e=>e===s.qq.tron,r=e=>{let t=Math.round(e);if(t<60)return"".concat(Math.max(1,t),"s");let a=Math.floor(t/60),s=t%60;return 0===s?"".concat(a,"m"):"".concat(a,"m ").concat(s,"s")},i=(e,t)=>e.averageDepositSeconds&&t.averageSettleSeconds?Math.ceil((parseFloat(e.averageDepositSeconds)+parseFloat(t.averageSettleSeconds))/60):null,o=e=>["".concat(s.qq.ethereum),"".concat(s.mM.erc20)].includes(e.transport)&&e.network!==s.qq.ronin},83612:(e,t,a)=>{a.d(t,{A:()=>l}),a(66656);var s=a(64925);let l=e=>{if("string"==typeof e)switch(e){case"Phantom":return{icon:"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_1415_22)'%3e%3cmask id='mask0_1415_22' style='mask-type:luminance' maskUnits='userSpaceOnUse' x='0' y='0' width='40' height='40'%3e%3cpath d='M40 0H0V40H40V0Z' fill='white'/%3e%3c/mask%3e%3cg mask='url(%23mask0_1415_22)'%3e%3cpath d='M40 0H0V40H40V0Z' fill='%23AB9FF2'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.4076 25.4938C15.8371 27.9004 13.2053 30.946 9.70332 30.946C8.04785 30.946 6.45605 30.2644 6.45605 27.3041C6.45605 19.7648 16.7497 8.09375 26.3005 8.09375C31.7338 8.09375 33.8987 11.8634 33.8987 16.1442C33.8987 21.639 30.333 27.9217 26.7886 27.9217C25.6637 27.9217 25.1119 27.3041 25.1119 26.3244C25.1119 26.0688 25.1544 25.792 25.2393 25.4938C24.0295 27.5597 21.6949 29.4764 19.5088 29.4764C17.917 29.4764 17.1105 28.4754 17.1105 27.0698C17.1105 26.5587 17.2166 26.0262 17.4076 25.4938ZM25.6349 15.9956C25.6349 17.243 24.8989 17.8667 24.0756 17.8667C23.2399 17.8667 22.5164 17.243 22.5164 15.9956C22.5164 14.7482 23.2399 14.1245 24.0756 14.1245C24.8989 14.1245 25.6349 14.7482 25.6349 15.9956ZM30.3126 15.9956C30.3126 17.243 29.5766 17.8667 28.7534 17.8667C27.9176 17.8667 27.1941 17.243 27.1941 15.9956C27.1941 14.7482 27.9176 14.1245 28.7534 14.1245C29.5766 14.1245 30.3126 14.7482 30.3126 15.9956Z' fill='%23FFFDF8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_1415_22'%3e%3crect width='40' height='40' rx='7' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",text:"Phantom"};case"Solflare":return{icon:"data:image/svg+xml,%3csvg width='800' height='800' viewBox='0 0 800 800' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='800' height='800' fill='%23FFEF46'/%3e%3cpath d='M195 558.869L216.829 582.205L252.063 549.951L427.263 612C536.44 539.524 595 490.361 595 429.81C595 389.587 571.171 367.258 518.566 349.879L478.874 336.468L587.549 232.196L565.72 208.861L533.469 237.147L381.103 187C333.96 202.378 274.394 247.597 274.394 292.758C274.352 297.952 275.025 303.126 276.394 308.136C237.194 330.477 221.286 351.343 221.286 377.148C221.286 401.478 234.189 425.82 275.389 439.197L308.143 450.127L195 558.869ZM271.434 351.32C271.434 341.899 276.394 332.947 284.84 325.492C293.766 338.4 309.16 349.822 333.48 357.745L386.051 375.124
1L356.76 403.422L305.16 386.546C281.331 378.543 271.411 366.675 271.411 351.297M314.074 495.357L347.823 463.092L411.343 483.935C444.589 494.854 455.994 509.26 452.486 545.492L314.074 495.357ZM323 243.092L471.914 292.736L439.674 323.525L362.246 297.743C335.457 288.814 326.509 274.408 323.046 244.121L323 243.092ZM396.406 416.307L425.743 388.067L480.337 405.937C516.074 417.793 533.949 439.642 533.949 470.387C533.949 493.722 525.023 509.111 507.16 528.983L501.697 534.939L503.686 521.025C511.64 470.387 496.714 448.595 447.571 432.657L396.509 416.307H396.406Z' fill='%2302050A'/%3e%3c/svg%3e",text:"Solflare"};case"Backpack":return{icon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='21' viewBox='0 0 14 21' fill='none'%3e%3cpath fill='%23e33e3f' d='M12.4726 14.7075c.72 0 1.0799 0 1.3035.2236.2237.2236.2237.5836.2237 1.3036v1.0182c0 1.4399 0 2.1598-.4473 2.6072-.4473.4473-1.1673.4473-2.6072.4473H3.05449c-1.43989 0-2.159855 0-2.607187-.4473C-.00002836 19.4127 0 18.6928 0 17.2529v-1.0182c0-.72 6.3e-7-1.08.223637-1.3036.223666-.2236.583647-.2236 1.303603-.2236z'/%3e%3cpath fill='%23e33e3f' fill-rule='evenodd' d='M6.99999 2.93489c7.10181 0 6.99991 4.7344 6.99991 6.99991v2.5454c0 .4217-.3419.7636-.7636.7636H.763716c-.421749 0-.76363672-.3419-.76363672-.7636V9.9348c0-2.26551-.10189028-6.99991 6.99991072-6.99991m0 1.80404c-1.19494 0-2.16361.96868-2.16361 2.16364.00002 1.19488.9687 2.16361 2.16361 2.16361 1.19496 0 2.16361-.96873 2.16361-2.16361 0-1.19496-.96865-2.16364-2.16361-2.16364' clip-rule='evenodd'/%3e%3cpath fill='%23e33e3f' d='M6.99796 0c1.53239 0 2.87385.53561 3.22864 1.40788.0534.15049.0801.22576.0326.28164-.0475.05587-.1394.03922-.32327.0059-.47509-.08611-1.14773-.14532-1.73992-.16282-.37787-.02031-.77647-.03082-1.1959-.03082-.41922 0-.81765.01054-1.19534.03082-.59502.01749-1.27004.07669-1.74689.1599-.1799.0314-.2699.04707-.31704-.00864-.04714-.05573-.02109-.12962.03108-.27735C4.12382.536991 5.46599.0000047 6.99796 0'/%3e%3c/svg%3e",text:"Backpack"};case"MetaMask":return{icon:s.P.injected.icon,text:"MetaMask"};case"Trezor":return{icon:s.P.trezor.icon,text:s.P.trezor.text};default:return{icon:s.P.generic.icon,text:s.P.generic.text}}return(null==e?void 0:e.icon)?{icon:e.icon.trim(),text:e.name||s.P.generic.text}:"MetaMask"===(null==e?void 0:e.name)?{icon:s.P.injected.icon,text:s.P.injected.text}:"coinbaseWallet"===(null==e?void 0:e.type)?{icon:s.P.coinbase.icon,text:"coinbaseWallet"}:"walletConnect"===(null==e?void 0:e.type)?{icon:s.P.walletconnect.icon,text:"walletConnect"}:{icon:s.P.generic.icon,text:s.P.generic.text}}},85002:(e,t,a)=>{a.d(t,{S:()=>s,o:()=>l});let s="grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-10 md:grid-cols-4",l=[{name:"Trezor",className:"order-1 md:order-2"},{name:"Bitcoin.com",className:"order-2 md:order-3"},{name:"Edge",className:"order-3 md:order-4"},{name:"Aqua Wallet",className:"order-4 md:order-1"}]},85868:(e,t,a)=>{a.d(t,{$:()=>d});var s=a(76908),l=a(66656),n=a(59824),r=a(85002);let i=()=>(0,s.jsxs)("div",{className:"mx-auto w-full max-w-5xl pt-6 pb-16 sm:pt-16 sm:pb-28","data-sentry-component":"TrustedBySkeleton","data-sentry-source-file":"TrustedBySkeleton.tsx",children:[(0,s.jsx)("div",{className:"h-8 w-32 mx-auto mb-10 sm:mb-12 animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"}),(0,s.jsx)("div",{className:r.S,children:r.o.map(e=>{let{className:t,name:a}=e;return(0,s.jsx)("div",{className:(0,n.QP)("flex w-full justify-center",t),children:(0,s.jsx)("div",{className:"h-9 w-full max-w-[120px] animate-pulse rounded-sm bg-gray-200 dark:bg-gray-700"})},a)})})]}),o=(0,l.lazy)(()=>a.e(3534).then(a.bind(a,13534)).then(e=>({default:e.TrustedBy}))),d=()=>(0,s.jsx)(l.Suspense,{fallback:(0,s.jsx)(i,{}),"data-sentry-element":"Suspense","data-sentry-component":"LazyTrustedBy","data-sentry-source-file":"LazyTrustedBy.tsx",children:(0,s.jsx)(o,{"data-sentry-element":"TrustedBy","data-sentry-source-file":"LazyTrustedBy.tsx"})})},86784:(e,t,a)=>{a.d(t,{O:()=>r});var s=a(50087),l=a(82933),n=a(23727);let r=()=>{let{initialIsUsDomain:e}=(0,l.r)();return e?"beta"===n.env.REACT_APP_BACKEND_OVERRIDE?s.uc:s.pj:null}},88389:(e,t,a)=>{a.d(t,{A:()=>r});var s,l=a(66656);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let r=e=>l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 16"},e),s||(s=l.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M16.486 8.299H1.5M12.879
113.366l3.743-3.744c.271-.27.423-.638.423-1.022v-.588c0-.383-.152-.75-.423-1.022l-3.743-3.743"})))},92165:(e,t,a)=>{a.d(t,{u:()=>s.u});var s=a(16844);a(2847)},93315:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(76908),l=a(51382),n=a(59824);let r=e=>{let{width:t="160",height:a="28",radius:r="4"}=e,i=e=>/(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/i.test(e.trim()),o=parseInt(r,10),d="rounded-[4px]";if("4"===r);else if(o>=50)d="rounded-full";else{let e=i(r)?r:"".concat(r,"px");d="rounded-[".concat(e,"]")}let c=parseFloat(t),u=parseFloat(a),m=t&&!Number.isNaN(c)&&Number.isFinite(c)&&!i(t)?"".concat(t,"px"):t,h=a&&!Number.isNaN(u)&&Number.isFinite(u)&&!i(a)?"".concat(a,"px"):a;return(0,s.jsx)(l.E,{width:m,height:h,className:(0,n.QP)("mb-3",d),"data-sentry-element":"Skeleton","data-sentry-component":"LoadingPlaceholder","data-sentry-source-file":"LoadingPlaceholder.tsx"})}},94881:(e,t,a)=>{a.d(t,{V:()=>r});var s=a(7453),l=a(66656),n=a(28048);let r=e=>{let{errors:t,trigger:a}=e,r=(0,s.Ym)(),i=(0,l.useRef)(void 0);(0,l.useEffect)(()=>{let e=i.current;if(i.current=r,e===r)return;let s=Object.keys(t).filter(e=>"root"!==e&&!e.includes("."));0!==s.length&&a(s).catch(e=>(0,n.A)([e],n._.ERROR))},[r,t,a])}},97695:(e,t,a)=>{a.d(t,{A:()=>o});var s,l,n,r=a(66656);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let o=e=>r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 40 32"},e),r.createElement("g",{clipPath:"url(#a)"},r.createElement("mask",{id:"b",width:40,height:32,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},s||(s=r.createElement("path",{fill:"#fff",d:"M0 0h40v32H0z"}))),l||(l=r.createElement("g",{mask:"url(#b)"},r.createElement("path",{fill:"#E89D3B",fillOpacity:.1,stroke:"#E89D3B",strokeWidth:2,d:"m21.403 1.524 16.839 27.428c.623 1.016-.157 2.286-1.404 2.286H3.16c-1.247 0-2.027-1.27-1.402-2.286L18.597 1.525c.624-1.
1016 2.183-1.016 2.806 0z"}),r.createElement("path",{fill:"currentColor",d:"m21.428 12.19-.34 7.99h-2.167l-.35-7.99zM20 21.84q.645 0 1.088.494.45.483.45 1.158c.008.43-.152.847-.45 1.168a1.42 1.42 0 0 1-1.088.483q-.63 0-1.088-.484a1.67 1.67 0 0 1-.45-1.168q0-.675.45-1.157.46-.492 1.088-.493"})))),n||(n=r.createElement("defs",null,r.createElement("clipPath",{id:"a"},r.createElement("path",{fill:"#fff",d:"M0 0h40v32H0z"})))))}}]);
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.