PageSourceSearch

https://stealthex.io/_next/static/chunks/pages/partners/button-832d90bda40bc322.js

js stealthex.io collected 2026-09-25 15:00:32 UTC 7,748 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1349],{27843:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var o=n(65879),r=n(11946);function a(t){var e=t.text,n=t.components;return(0,o.useMemo)(function(){return n&&0!==n.length?(0,r.Z)(e,n):e},[e,n])}},88125:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/partners/button",function(){return n(71504)}])},18250:function(t,e){"use strict";e.Z={src:"/_next/static/media/how-step-1.57d52ea7.svg",height:60,width:60,blurWidth:0,blurHeight:0}},7903:function(t,e,n){"use strict";n.d(e,{Z:function(){return U}});var o=n(38400),r=n(94966),a=n(40697),u=n(23649),s=n(31293),i=n(65879),l=n(14567),d=n(70896),c=n(20655);let b=t=>{let e=c.O.NEXT_PUBLIC_URL,n=t.buttonText.split(" ").join("-").toLowerCase(),o="/assets/button/".concat(t.color,"-").concat(n,".svg");return'<a id="stealthex-button" href="'.concat(e,"/?ref=").concat(t.ref,'"><img src="').concat(e).concat(o,'" alt="StealthEX Button" width="').concat(280,'" height="60" loading="lazy" decoding="async" style="max-width: ').concat(280,'px; height: auto; width: 100%"></a>')};var h=n(25239),g=t=>{let{button:e,pp:n}=t;if(!e)return(0,o.jsx)(h.Z,{});
1let r=b(e);return(0,o.jsx)(d.nD,{testid:"button-html-code",variant:"code",title:"Use this code to embed the button",code:{language:"html",text:r,hidden:!n}})},p=n(34880);let x=[{link:"preview",name:"preview"}];var y=t=>{let{pp:e,selectedButtonIndex:n,buttons:r,creating:a,onUpdate:u,onButtonSelect:s,onButtonAdd:c,onButtonDelete:b,onButtonRename:g}=t,y=l.qz.links.$get.useQuery({query:{role:"referral"}},{select:t=>t.body.data}),f=e?y.data:x,v=(0,i.useMemo)(()=>null==r?void 0:r.map(t=>({name:t.buttonName,id:t.button})),[r]);return r&&void 0!=n&&f&&v?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.p2,{testid:"button-variant",label:"Choose a button",options:v,listHeight:(v.length>3?3:v.length)*48,selectedIndex:n,onSelect:s,creating:a,onDelete:b,onAdd:c,onEdit:g}),(0,o.jsx)(d.gw,{testid:"button-referral-link",label:"Choose a referral link for the button",options:f.map(t=>({value:t.link,label:"".concat(t.name," ref=").concat(t.link)})),components:{Option:p.fs},listHeight:(f.length>3?3:f.length)*48,onSelect:t=>u({ref:t}),selected:r[n].ref,defaultSelectedLabel:"No referral link chosen",truncate:!0})]}):(0,o.jsx)(h.Z,{})},f=n(58152);let v=f.ZP.span.withConfig({componentId:"sc-afc0ec44-0"})(["display:flex;align-items:center;justify-content:center;gap:6px;"]),w=f.ZP.span.withConfig({componentId:"sc-afc0ec44-1"})(["display:flex;width:20px;height:20px;border-radius:6px;background:",";"],t=>t.colorIn),m=[{label:(0,o.jsxs)(v,{children:[(0,o.jsx)(w,{colorIn:"#FDE937"}),"Yellow"]}),value:"yellow"},{label:(0,o.jsxs)(v,{children:[(0,o.jsx)(w,{colorIn:"#2B2A25"}),"Dark"]}),value:"dark"},{label:(0,o.jsxs)(v,{children:[(0,o.jsx)(w,{colorIn:"#F2F2F2"}),"Light"]}),value:"light"}],j=[{label:"Get Crypto",value:"Get Crypto"},{label:"Swap Crypto",value:"Swap Crypto"},{label:"Crypto Exchange",value:"Crypto Exchange"},{label:"Exchange",value:"Exchange"}];var P=t=>{let{button:e,onUpdate:n}=t,r=t=>{e&&n(t)};return e?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.gw,{testid:"button-text",label:"Text on the button",options:j,components:{Option:p.ZP},listHeight:48*j.length,onSelect:t=>r({buttonText:t}),selected:e.buttonText}),(0,o.jsx)(d.gw,{testid:"button-color",label:"Color",options:m,components:{Option:p.ZP},listHeight:48*m.length,onSelect:t=>r({color:t}),selected:e.color})]}):(0,o.jsx)(h.Z,{})};let F={_id:"xxx",userId:"preview",button:"1",buttonName:"Button 1",color:"dark",buttonText:"Get Crypto",ref:"preview"},Z=[F];var U=t=>{var e;let{pp:n}=t,c=(0,r.a)(l.Ub.buttonForPartner.$get.getQueryKey(),async()=>{if(!n)return{body:Z,headers:new Headers};let t=await l.Ub.buttonForPartner.$get();if(t.success)return{body:t.body,headers:t.headers};throw{body:t.error,headers:t.headers}},{select:t=>t.body,staleTime:1/0}),[h,p]=(0,i.useState)(0),x=null===(e=c.data)||void 0===e?void 0:e[h],f=(0,a.NL)(),v=(0,u.D)(async t=>{if(!n)return null;let e=await l.Ub.buttonForPartner.$put({query:t});if(e.success)return e.body;throw e.error},{async onMutate(t){await f.cancelQueries({queryKey:l.Ub.buttonForPartner.$get.getQueryKey()});let e=l.Ub.buttonForPartner.$get.getQueryData(f),n=null==e?void 0:e.body.find(e=>e.button==t.button);if(n&&e){let o=e.body.map(e=>e.button==n.button?{...n,...t}:e);l.Ub.buttonForPartner.$get.setQueryData(f,{},{status:e.status,headers:e.headers,body:o})}return{previousButtons:e}},onError(t,e,n){l.Ub.buttonForPartner.$get.setQueryData(f,{},null==n?void 0:n.previousButtons)}}),w=(0,u.D)(async t=>{if(!n)return null;let e=await l.Ub.buttonForPartner.$delete({query:{button:t}});if(e.success)return e.body;throw e.error},{async onMutate(t){await f.cancelQueries({queryKey:l.Ub.buttonForPartner.$get.getQueryKey()});let e=l.Ub.buttonForPartner.$get.getQueryData(f);if(e&&x){let n=e.body.filter(e=>e.button!=t),o=e.body.findIndex(e=>e.button==t),r=e.body[o].button==x.button,a=0==o;return r?a||p(t=>t-1):p(n.findIndex(t=>t.button==x.button)),l.Ub.buttonForPartner.$get.setQueryData(f,{},{status:e.status,headers:e.headers,body:n}),{previousButtons:e,isRemovingCurrent:r,isRemovingFirst:a,prevIndex:h}}},onError(t,e,n){n&&(n.isRemovingCurrent?n.isRemovingFirst||p(t=>t+1):p(n.prevIndex),l.Ub.buttonForPartner.$get.setQueryData(f,{},n.previousButtons))}}),m=(0,u.D)(async()=>
1{if(!n)return null;let t=await l.Ub.buttonForPartner.$post();if(t.success)return t.body;throw t.error},{onSuccess(t){let e=l.Ub.buttonForPartner.$get.getQueryData(f);e&&l.Ub.buttonForPartner.$get.setQueryData(f,{},{status:e.status,headers:e.headers,body:[...e.body,null!=t?t:{...F,button:Date.now().toString(),buttonName:"Button ".concat(e.body.length+1)}]})}}),j=t=>{x&&v.mutate({button:x.button,...t})};return(0,o.jsx)(d.ZP,{preview:(0,o.jsx)(d.MB,{dark:(null==x?void 0:x.color)=="light",withShadows:!n,loading:c.isInitialLoading,children:x&&(0,o.jsx)(i.Fragment,{children:(0,s.ZP)(b(x))},x.color)}),tabs:{title:n?void 0:"Customize your button",content:(0,o.jsx)(y,{pp:n,selectedButtonIndex:h,buttons:c.data,onUpdate:j,onButtonSelect:t=>{var e;let n=null===(e=c.data)||void 0===e?void 0:e.findIndex(e=>e.button==t);void 0!=n&&-1!=n&&p(n)},creating:m.isLoading,onButtonAdd:()=>{m.mutate()},onButtonDelete:t=>{w.mutate(t)},onButtonRename:(t,e)=>{v.mutate({button:t,buttonName:e})}}),code:(0,o.jsx)(g,{button:x,pp:n}),design:(0,o.jsx)(P,{button:x,onUpdate:j})}})}},71504:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return P}});var o=n(38400),r=n(95635),a=n(27843),u=n(71607),s=n(35264),i=n.n(s),l=n(58152),d=n(18250),c=n(86237),b=n(58540),h=n(27035),g=n(68504),p=n(7903),x=n(80224),y=n(48120),f=n(39280);let v=[d.Z,c.Z,b.Z],w=()=>{let{t}=(0,u.Z)("partners-button");return(0,o.jsxs)(m,{children:[(0,o.jsx)(p.Z,{}),(0,o.jsxs)(j,{children:[(0,o.jsx)(g.n7,{title:t("hiwTitle"),steps:t("hiw",void 0,{returnObjects:!0}).map((t,e)=>{let{title:n,content:o}=t;return{title:n,content:o,icon:{lightSrc:v[e]}}})}),(0,o.jsx)(g.zB,{})]})]})},m=l.ZP.div.withConfig({componentId:"sc-f29488ac-0"})(["@media ","{margin-top:40px;}"],f.U.tabletL),j=(0,l.ZP)(h.Z).withConfig({componentId:"sc-f29488ac-1"})(["max-width:100%;@media ","{max-width:644px;padding:0;}"],f.U.tabletL);var P=!0;e.default=(0,r.j5)(t=>{let{...e}=t,{t:n}=(0,u.Z)("partners-button");return(0,o.jsxs)(x.Ye,{extraContent:(0,o.jsx)(w,{}),...e,children:[(0,o.jsx)(i(),{children:(0,y.F)(n("title"),n("description"))}),(0,o.jsx)(g.dk,{title:n("pageTitle"),subTitle:n("pageSubTitle"),text:(0,o.jsx)(a.Z,{text:n("pageDescription"),components:{br:(0,o.jsx)("br",{})}})})]})})}},function(t){t.O(0,[4121,6560,2359,1293,3546,2234,3780,3104,1107,224,7510,2888,9774,179],function(){return t(t.s=88125)}),_N_E=t.O()}]);

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.