1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a3c5d7af-1674-4d32-8fb6-fbfcc0f17e23",e._sentryDebugIdIdentifier="sentry-dbid-a3c5d7af-1674-4d32-8fb6-fbfcc0f17e23")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5369],{10163:(e,t,i)=>{var n=i(68676),r=i(91797);i(75682),i(33668),i(12090),i(45262),i(71364);var o=i(23526),a=i(52857),s=i(43390);let l=(0,s.AH)` 2 button { 3 display: block; 4 display: flex; 5 align-items: center; 6 padding: ${({spacing:e})=>e[1]}; 7 transition: background-color ${({durations:e})=>e.lg} 8 ${({easings:e})=>e["ease-out-power-2"]}; 9 will-change: background-color; 10 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 11 border-radius: ${({borderRadius:e})=>e[32]}; 12 } 13 14 wui-image { 15 border-radius: ${({borderRadius:e})=>e[32]}; 16 } 17 18 wui-text { 19 padding-left: ${({spacing:e})=>e[1]}; 20 padding-right: ${({spacing:e})=>e[1]}; 21 } 22 23 .left-icon-container { 24 width: 24px; 25 height: 24px; 26 justify-content: center; 27 align-items: center; 28 } 29 30 .left-image-container { 31 position: relative; 32 justify-content: center; 33 align-items: center; 34 } 35 36 .chain-image { 37 position: absolute; 38 border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; 39 } 40 41 /* -- Sizes --------------------------------------------------- */ 42 button[data-size='lg'] { 43 height: 32px; 44 } 45 46 button[data-size='md'] { 47 height: 28px; 48 } 49 50 button[data-size='sm'] { 51 height: 24px; 52 } 53 54 button[data-size='lg'] .token-image { 55 width: 24px; 56 height: 24px; 57 } 58 59 button[data-size='md'] .token-image { 60 width: 20px; 61 height: 20px; 62 } 63 64 button[data-size='sm'] .token-image { 65 width: 16px; 66 height: 16px; 67 } 68 69 button[data-size='lg'] .left-icon-container { 70 width: 24px; 71 height: 24px; 72 } 73 74 button[data-size='md'] .left-icon-container { 75 width: 20px; 76 height: 20px; 77 } 78 79 button[data-size='sm'] .left-icon-container { 80 width: 16px; 81 height: 16px; 82 } 83 84 button[data-size='lg'] .chain-image { 85 width: 12px; 86 height: 12px; 87 bottom: 2px; 88 right: -4px; 89 } 90 91 button[data-size='md'] .chain-image { 92 width: 10px; 93 height: 10px; 94 bottom: 2px; 95 right: -4px; 96 } 97 98 button[data-size='sm'] .chain-image { 99 width: 8px; 100 height: 8px; 101 bottom: 2px; 102 right: -3px; 103 } 104 105 /* -- Focus states --------------------------------------------------- */ 106 button:focus-visible:enabled { 107 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 108 box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; 109 } 110 111 /* -- Hover & Active states ----------------------------------------------------------- */ 112 @media (hover: hover) { 113 button:hover:enabled, 114 button:active:enabled { 115 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 116 } 117 } 118 119 /* -- Disabled states --------------------------------------------------- */ 120 button:disabled { 121 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 122 opacity: 0.5; 123 } 124`;var c=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let u={lg:"lg-regular",md:"lg-regular",sm:"md-regular"},d={lg:"lg",md:"md",sm:"sm"},h=class extends n.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.text="",this.loading=!1}render(){return this.loading?(0,n.qy)` <wui-flex alignItems="center" gap="01" padding="01"> 125 <wui-shimmer width="20px" height="20px"></wui-shimmer> 126 <wui-shimmer width="32px" height="18px" borderRadius="4xs"></wui-shimmer> 127 </wui-flex>`:(0,n.qy)` 128 <button ?disabled=${this.disabled} data-size=${this.size}> 129 ${this.imageTemplate()} ${this.textTemplate()} 130 </button> 131 `}imageTemplate(){if(this.imageSrc&&this.chainImageSrc)return(0,n.qy)`<wui-flex class="left-image-container"> 132 <wui-image src=${this.imageSrc} class="token-image"></wui-image> 133 <wui-image src=${this.chainImageSrc} class="chain-image"></wui-image> 134 </wui-flex>`;if(this.imageSrc)return(0,n.qy)`<wui-image src=${this.imageSrc} class="token-image"></wui-image>`;let e=d[this.size];return(0,n.qy)`<wui-flex class="left-icon-container"> 135 <wui-icon size=${e} name="networkPlaceholder"></wui-icon> 136 </wui-flex>`}textTemplate(){let e=u[this.size];return(0,n.qy)`<wui-text color="primary" variant=${e} 137 >${this.text}</wui-text 138 >`}};h.styles=[o.W5,o.fD,l],c([(0,r.MZ)()],h.prototype,"size",void 0),c([(0,r.MZ)()],h.prototype,"imageSrc",void 0),c([(0,r.MZ)()],h.prototype,"chainImageSrc",void 0),c([(0,r.MZ)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,r.MZ)()],h.prototype,"text",void 0),c([(0,r.MZ)({type:Boolean})],h.prototype,"loading",void 0),h=c([(0,a.E)("wui-token-button")],h)},24619:(e,t,i)=>{var n=i(68676),r=i(91797),o=i(32724),a=i(43390),s=i(23526),l=i(35287),c=i(52857);let u=(0,a.AH)` 139 :host { 140 position: relative; 141 display: inline-block; 142 } 143 144 :host([data-error='true']) > input { 145 color: ${({tokens:e})=>e.core.textError}; 146 } 147 148 :host([data-error='false']) > input { 149 color: ${({tokens:e})=>e.theme.textPrimary}; 150 } 151 152 input { 153 background: transparent; 154 height: auto; 155 box-sizing: border-box; 156 color: ${({tokens:e})=>e.theme.textPrimary}; 157 font-feature-settings: 'case' on; 158 font-size: ${({textSize:e})=>e.h4}; 159 caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 160 line-height: ${({typography:e})=>e["h4-regular-mono"].lineHeight}; 161 letter-spacing: ${({typography:e})=>e["h4-regular-mono"].letterSpacing}; 162 -webkit-appearance: none; 163 -moz-appearance: textfield; 164 padding: 0px; 165 font-family: ${({fontFamily:e})=>e.mono}; 166 } 167 168 :host([data-width-variant='auto']) input { 169 width: 100%; 170 } 171 172 :host([data-width-variant='fit']) input { 173 width: 1ch; 174 } 175 176 .wui-input-amount-fit-mirror { 177 position: absolute; 178 visibility: hidden; 179 white-space: pre; 180 font-size: var(--local-font-size); 181 line-height: 130%; 182 letter-spacing: -1.28px; 183 font-family: ${({fontFamily:e})=>e.mono}; 184 } 185 186 .wui-input-amount-fit-width { 187 display: inline-block; 188 position: relative; 189 } 190 191 input::-webkit-outer-spin-button, 192 input::-webkit-inner-spin-button { 193 -webkit-appearance: none; 194 margin: 0; 195 } 196 197 input::placeholder { 198 color: ${({tokens:e})=>e.theme.textSecondary}; 199 } 200`;var d=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,o._)(),this.disabled=!1,this.value="",this.placeholder="0",this.widthVariant="auto",this.maxDecimals=void 0,this.maxIntegers=void 0,this.fontSize="h4",this.error=!1}firstUpdated(){this.resizeInput()}updated(){this.style.setProperty("--local-font-size",a.f.textSize[this.fontSize]),this.resizeInput()}render(){return(this.dataset.widthVariant=this.widthVariant,this.dataset.error=String(this.error),this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),"auto"===this.widthVariant)?this.inputTemplate():(0,n.qy)` 201 <div class="wui-input-amount-fit-width">
202 <span class="wui-input-amount-fit-mirror"></span> 203 ${this.inputTemplate()} 204 </div> 205 `}inputTemplate(){return(0,n.qy)`<input 206 ${(0,o.K)(this.inputElementRef)} 207 type="text" 208 inputmode="decimal" 209 pattern="[0-9,.]*" 210 placeholder=${this.placeholder} 211 ?disabled=${this.disabled} 212 autofocus 213 value=${this.value??""} 214 @input=${this.dispatchInputChangeEvent.bind(this)} 215 />`}dispatchInputChangeEvent(){this.inputElementRef.value&&(this.inputElementRef.value.value=l.Z.maskInput({value:this.inputElementRef.value.value,decimals:this.maxDecimals,integers:this.maxIntegers}),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value.value,bubbles:!0,composed:!0})),this.resizeInput())}resizeInput(){if("fit"===this.widthVariant){let e=this.inputElementRef.value;if(e){let t=e.previousElementSibling;t&&(t.textContent=e.value||"0",e.style.width=`${t.offsetWidth}px`)}}}};h.styles=[s.W5,s.fD,u],d([(0,r.MZ)({type:Boolean})],h.prototype,"disabled",void 0),d([(0,r.MZ)({type:String})],h.prototype,"value",void 0),d([(0,r.MZ)({type:String})],h.prototype,"placeholder",void 0),d([(0,r.MZ)({type:String})],h.prototype,"widthVariant",void 0),d([(0,r.MZ)({type:Number})],h.prototype,"maxDecimals",void 0),d([(0,r.MZ)({type:Number})],h.prototype,"maxIntegers",void 0),d([(0,r.MZ)({type:String})],h.prototype,"fontSize",void 0),d([(0,r.MZ)({type:Boolean})],h.prototype,"error",void 0),h=d([(0,c.E)("wui-input-amount")],h)},85369:(e,t,i)=>{i.r(t),i.d(t,{W3mSendConfirmedView:()=>X,W3mSendSelectTokenView:()=>N,W3mWalletSendPreviewView:()=>Q,W3mWalletSendView:()=>S});var n=i(68676),r=i(91797),o=i(57781),a=i(93710),s=i(76148),l=i(49172),c=i(73737),u=i(86881),d=i(19884),h=i(29751),p=i(33948),f=i(85921),m=i(97384),g=i(27206);i(14274),i(93253),i(9063),i(44423);var w=i(32724);i(4899),i(26653);let y=(0,g.AH)` 216 :host { 217 width: 100%; 218 height: 100px; 219 border-radius: ${({borderRadius:e})=>e["5"]}; 220 border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; 221 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 222 transition: background-color ${({durations:e})=>e.lg} 223 ${({easings:e})=>e["ease-out-power-1"]}; 224 will-change: background-color; 225 position: relative; 226 } 227 228 :host(:hover) { 229 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 230 } 231 232 wui-flex { 233 width: 100%; 234 height: fit-content; 235 } 236 237 wui-button { 238 display: ruby; 239 color: ${({tokens:e})=>e.theme.textPrimary}; 240 margin: 0 ${({spacing:e})=>e["2"]}; 241 } 242 243 .instruction { 244 position: absolute; 245 top: 50%; 246 transform: translateY(-50%); 247 z-index: 2; 248 } 249 250 .paste { 251 display: inline-flex; 252 } 253 254 textarea { 255 background: transparent; 256 width: 100%; 257 font-family: ${({fontFamily:e})=>e.regular}; 258 font-style: normal; 259 font-size: ${({textSize:e})=>e.large}; 260 font-weight: ${({fontWeight:e})=>e.regular}; 261 line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; 262 letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; 263 color: ${({tokens:e})=>e.theme.textPrimary}; 264 caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 265 box-sizing: border-box; 266 -webkit-appearance: none; 267 -moz-appearance: textfield; 268 padding: 0px; 269 border: none; 270 outline: none; 271 appearance: none; 272 resize: none; 273 overflow: hidden; 274 } 275`;var v=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let b=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,w._)(),this.instructionElementRef=(0,w._)(),this.readOnly=!1,this.instructionHidden=!!this.value,this.pasting=!1,this.onDebouncedSearch=d.w.debounce(async e=>{if(!e.length)return void this.setReceiverAddress("");let t=s.W.state.activeChain;if(d.w.isAddress(e,t))return void this.setReceiverAddress(e);try{let t=await u.x.getEnsAddress(e);if(t){o.R.setReceiverProfileName(e),o.R.setReceiverAddress(t);let i=await u.x.getEnsAvatar(e);o.R.setReceiverProfileImageUrl(i||void 0)}}catch(t){this.setReceiverAddress(e)}finally{o.R.setLoading(!1)}})}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return this.readOnly?(0,n.qy)` <wui-flex 276 flexDirection="column" 277 justifyContent="center" 278 gap="01" 279 .padding=${["8","4","5","4"]} 280 > 281 <textarea 282 spellcheck="false" 283 ?disabled=${!0} 284 autocomplete="off" 285 .value=${this.value??""} 286 > 287 ${this.value??""}</textarea 288 > 289 </wui-flex>`:(0,n.qy)` <wui-flex 290 @click=${this.onBoxClick.bind(this)} 291 flexDirection="column" 292 justifyContent="center" 293 gap="01" 294 .padding=${["8","4","5","4"]} 295 > 296 <wui-text 297 ${(0,w.K)(this.instructionElementRef)} 298 class="instruction" 299 color="secondary" 300 variant="md-medium" 301 > 302 Type or 303 <wui-button 304 class="paste" 305 size="md" 306 variant="neutral-secondary" 307 iconLeft="copy" 308 @click=${this.onPasteClick.bind(this)} 309 > 310 <wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon> 311 Paste 312 </wui-button>
312 313 address 314 </wui-text> 315 <textarea 316 spellcheck="false" 317 ?disabled=${!this.instructionHidden} 318 ${(0,w.K)(this.inputElementRef)} 319 @input=${this.onInputChange.bind(this)} 320 @blur=${this.onBlur.bind(this)} 321 .value=${this.value??""} 322 autocomplete="off" 323 > 324${this.value??""}</textarea 325 > 326 </wui-flex>`}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:+!e},{opacity:+!!e}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){this.value||this.instructionHidden||this.focusInput()}onBlur(){this.value||!this.instructionHidden||this.pasting||this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;let e=await navigator.clipboard.readText();o.R.setReceiverAddress(e),this.focusInput()}onInputChange(e){let t=e.target;this.pasting=!1,this.value=e.target?.value,t.value&&!this.instructionHidden&&this.focusInput(),o.R.setLoading(!0),this.onDebouncedSearch(t.value)}setReceiverAddress(e){o.R.setReceiverAddress(e),o.R.setReceiverProfileName(void 0),o.R.setReceiverProfileImageUrl(void 0),o.R.setLoading(!1)}};b.styles=y,v([(0,r.MZ)()],b.prototype,"value",void 0),v([(0,r.MZ)({type:Boolean})],b.prototype,"readOnly",void 0),v([(0,r.wk)()],b.prototype,"instructionHidden",void 0),v([(0,r.wk)()],b.prototype,"pasting",void 0),b=v([(0,g.EM)("w3m-input-address")],b);var x=i(71760);i(24619),i(35327),i(10163);let k=(0,g.AH)` 327 :host { 328 width: 100%; 329 height: 100px; 330 border-radius: ${({borderRadius:e})=>e["5"]}; 331 border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; 332 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 333 transition: background-color ${({durations:e})=>e.lg} 334 ${({easings:e})=>e["ease-out-power-1"]}; 335 will-change: background-color; 336 transition: all ${({easings:e})=>e["ease-out-power-1"]} 337 ${({durations:e})=>e.lg}; 338 } 339 340 :host(:hover) { 341 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 342 } 343 344 wui-flex { 345 width: 100%; 346 height: fit-content; 347 } 348 349 wui-button { 350 width: 100%; 351 display: flex; 352 justify-content: flex-end; 353 } 354 355 wui-input-amount { 356 mask-image: linear-gradient( 357 270deg, 358 transparent 0px, 359 transparent 8px, 360 black 24px, 361 black 25px, 362 black 32px, 363 black 100% 364 ); 365 } 366 367 .totalValue { 368 width: 100%; 369 } 370`;var $=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let R=class extends n.WF{constructor(){super(...arguments),this.readOnly=!1,this.isInsufficientBalance=!1}render(){let e=this.readOnly||!this.token;return(0,n.qy)` <wui-flex 371 flexDirection="column" 372 gap="01" 373 .padding=${["5","3","4","3"]} 374 > 375 <wui-flex alignItems="center"> 376 <wui-input-amount 377 @inputChange=${this.onInputChange.bind(this)} 378 ?disabled=${e} 379 .value=${this.sendTokenAmount?String(this.sendTokenAmount):""} 380 ?error=${!!this.isInsufficientBalance} 381 ></wui-input-amount> 382 ${this.buttonTemplate()} 383 </wui-flex> 384 ${this.bottomTemplate()} 385 </wui-flex>`}buttonTemplate(){return this.token?(0,n.qy)`<wui-token-button 386 text=${this.token.symbol} 387 imageSrc=${this.token.iconUrl} 388 @click=${this.handleSelectButtonClick.bind(this)} 389 > 390 </wui-token-button>
390`:(0,n.qy)`<wui-button 391 size="md" 392 variant="neutral-secondary" 393 @click=${this.handleSelectButtonClick.bind(this)} 394 >Select token</wui-button 395 >`}handleSelectButtonClick(){this.readOnly||a.I.push("WalletSendSelectToken")}sendValueTemplate(){if(!this.readOnly&&this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return(0,n.qy)`<wui-text class="totalValue" variant="sm-regular" color="secondary" 396 >${e?`$${x.S.formatNumberToLocalString(e,2)}`:"Incorrect value"}</wui-text 397 >`}return null}maxAmountTemplate(){return this.token?(0,n.qy)` <wui-text variant="sm-regular" color="secondary"> 398 ${g.Zv.roundNumber(Number(this.token.quantity.numeric),6,5)} 399 </wui-text>`:null}actionTemplate(){return this.token?(0,n.qy)`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`:null}bottomTemplate(){return this.readOnly?null:(0,n.qy)`<wui-flex alignItems="center" justifyContent="space-between"> 400 ${this.sendValueTemplate()} 401 <wui-flex alignItems="center" gap="01" justifyContent="flex-end"> 402 ${this.maxAmountTemplate()} ${this.actionTemplate()} 403 </wui-flex> 404 </wui-flex>`}onInputChange(e){o.R.setTokenAmount(e.detail)}onMaxClick(){if(this.token){let e=x.S.bigNumber(this.token.quantity.numeric);o.R.setTokenAmount(Number(e.toFixed(20)))}}};R.styles=k,$([(0,r.MZ)({type:Object})],R.prototype,"token",void 0),$([(0,r.MZ)({type:Boolean})],R.prototype,"readOnly",void 0),$([(0,r.MZ)({type:Number})],R.prototype,"sendTokenAmount",void 0),$([(0,r.MZ)({type:Boolean})],R.prototype,"isInsufficientBalance",void 0),R=$([(0,g.EM)("w3m-input-token")],R);let A=(0,g.AH)` 405 :host { 406 display: block; 407 } 408 409 wui-flex { 410 position: relative; 411 } 412 413 wui-icon-box { 414 width: 32px; 415 height: 32px; 416 border-radius: ${({borderRadius:e})=>e["10"]} !important; 417 border: 4px solid ${({tokens:e})=>e.theme.backgroundPrimary}; 418 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 419 position: absolute; 420 top: 50%; 421 left: 50%; 422 transform: translate(-50%, -50%); 423 z-index: 3; 424 } 425 426 wui-button { 427 --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; 428 } 429 430 .inputContainer { 431 height: fit-content; 432 } 433`;var T=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let P="Insufficient Funds",C="Preview Send",S=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.isTryingToChooseDifferentWallet=!1,this.token=o.R.state.token,this.sendTokenAmount=o.R.state.sendTokenAmount,this.receiverAddress=o.R.state.receiverAddress,this.receiverProfileName=o.R.state.receiverProfileName,this.loading=o.R.state.loading,this.params=a.I.state.data?.send,this.caipAddress=s.W.getAccountData()?.caipAddress,this.message=C,this.disconnecting=!1,this.token&&!this.params&&(this.fetchBalances(),this.fetchNetworkPrice());const e=s.W.subscribeKey("activeCaipAddress",t=>{!t&&this.isTryingToChooseDifferentWallet&&(this.isTryingToChooseDifferentWallet=!1,l.W.open({view:"Connect",data:{redirectView:"WalletSend"}}).catch(()=>null),e())});this.unsubscribe.push(s.W.subscribeAccountStateProp("caipAddress",e=>{this.caipAddress=e}),o.R.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}async firstUpdated(){await this.handleSendParameters()}render(){this.getMessage();let e=!!this.params;return(0,n.qy)` <wui-flex flexDirection="column" .padding=${["0","4","4","4"]}> 434 <wui-flex class="inputContainer" gap="2" flexDirection="column"> 435 <w3m-input-token 436 .token=${this.token} 437 .sendTokenAmount=${this.sendTokenAmount} 438 ?readOnly=${e} 439 ?isInsufficientBalance=${this.message===P} 440 ></w3m-input-token> 441 <wui-icon-box size="md" variant="secondary" icon="arrowBottom"></wui-icon-box> 442 <w3m-input-address 443 ?readOnly=${e} 444 .value=${this.receiverProfileName?this.receiverProfileName:this.receiverAddress} 445 ></w3m-input-address> 446 </wui-flex> 447 ${this.buttonTemplate()} 448 </wui-flex>`}async fetchBalances(){await o.R.fetchTokenBalance(),o.R.fetchNetworkBalance()}async fetchNetworkPrice(){await c.GN.getNetworkTokenPrice()}onButtonClick(){a.I.push("WalletSendPreview",{send:this.params})}onFundWalletClick(){a.I.push("FundWallet",{redirectView:"WalletSend"})}async onConnectDifferentWalletClick(){try{this.isTryingToChooseDifferentWallet=!0,this.disconnecting=!0,await u.x.disconnect()}finally{this.disconnecting=!1}}getMessage(){this.message=C,this.receiverAddress&&!d.w.isAddress(this.receiverAddress,s.W.state.activeChain)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message=P),this.sendTokenAmount||(this.message="Add Amount"),this.sendTokenAmount&&this.token?.price&&(this.sendTokenAmount*this.token.price||(this.message="Incorrect Value")),this.token||(this.message="Select Token")}buttonTemplate(){let e=!this.message.startsWith(C),t=this.message===P,i=!!this.params;return t&&!i?(0,n.qy)` 449 <wui-flex .margin=${["4","0","0","0"]} flexDirection="column" gap="4"> 450 <wui-button 451 @click=${this.onFundWalletClick.bind(this)} 452 size="lg" 453 variant="accent-secondary" 454 fullWidth 455 > 456 Fund Wallet 457 </wui-button>
457 458 459 <wui-separator data-testid="wui-separator" text="or"></wui-separator> 460 461 <wui-button 462 @click=${this.onConnectDifferentWalletClick.bind(this)} 463 size="lg" 464 variant="neutral-secondary" 465 fullWidth 466 ?loading=${this.disconnecting} 467 > 468 Connect a different wallet 469 </wui-button> 470 </wui-flex> 471 `:(0,n.qy)`<wui-flex .margin=${["4","0","0","0"]}> 472 <wui-button 473 @click=${this.onButtonClick.bind(this)} 474 ?disabled=${e} 475 size="lg" 476 variant="accent-primary" 477 ?loading=${this.loading} 478 fullWidth 479 > 480 ${this.message} 481 </wui-button> 482 </wui-flex>`}async handleSendParameters(){if(this.loading=!0,!this.params){this.loading=!1;return}let e=Number(this.params.amount);if(isNaN(e)){h.P.showError("Invalid amount"),this.loading=!1;return}let{namespace:t,chainId:i,assetAddress:n}=this.params;if(!p.oU.SEND_PARAMS_SUPPORTED_CHAINS.includes(t)){h.P.showError(`Chain "${t}" is not supported for send parameters`),this.loading=!1;return}let r=s.W.getCaipNetworkById(i,t);if(!r){h.P.showError(`Network with id "${i}" not found`),this.loading=!1;return}try{let{balance:t,name:i,symbol:a,decimals:s}=await m.Z.fetchERC20Balance({caipAddress:this.caipAddress,assetAddress:n,caipNetwork:r});if(!i||!a||!s||!t)return void h.P.showError("Token not found");o.R.setToken({name:i,symbol:a,chainId:r.id.toString(),address:`${r.chainNamespace}:${r.id}:${n}`,value:0,price:0,quantity:{decimals:s.toString(),numeric:t.toString()},iconUrl:f.$.getTokenImage(a)??""}),o.R.setTokenAmount(e),o.R.setReceiverAddress(this.params.to)}catch(e){console.error("Failed to load token information:",e),h.P.showError("Failed to load token information")}finally{this.loading=!1}}};S.styles=A,T([(0,r.wk)()],S.prototype,"token",void 0),T([(0,r.wk)()],S.prototype,"sendTokenAmount",void 0),T([(0,r.wk)()],S.prototype,"receiverAddress",void 0),T([(0,r.wk)()],S.prototype,"receiverProfileName",void 0),T([(0,r.wk)()],S.prototype,"loading",void 0),T([(0,r.wk)()],S.prototype,"params",void 0),T([(0,r.wk)()],S.prototype,"caipAddress",void 0),T([(0,r.wk)()],S.prototype,"message",void 0),T([(0,r.wk)()],S.prototype,"disconnecting",void 0),S=T([(0,g.EM)("w3m-wallet-send-view")],S),i(62378),i(33740);let E=(0,g.AH)` 483 .contentContainer { 484 height: 440px; 485 overflow: scroll; 486 scrollbar-width: none; 487 } 488 489 .contentContainer::-webkit-scrollbar {
490 display: none; 491 } 492 493 wui-icon-box { 494 width: 40px; 495 height: 40px; 496 border-radius: ${({borderRadius:e})=>e["3"]}; 497 } 498`;var I=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let N=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalances=o.R.state.tokenBalances,this.search="",this.onDebouncedSearch=d.w.debounce(e=>{this.search=e}),this.fetchBalancesAndNetworkPrice(),this.unsubscribe.push(o.R.subscribe(e=>{this.tokenBalances=e.tokenBalances}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 499 <wui-flex flexDirection="column"> 500 ${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()} 501 </wui-flex> 502 `}async fetchBalancesAndNetworkPrice(){this.tokenBalances&&this.tokenBalances?.length!==0||(await this.fetchBalances(),await this.fetchNetworkPrice())}async fetchBalances(){await o.R.fetchTokenBalance(),o.R.fetchNetworkBalance()}async fetchNetworkPrice(){await c.GN.getNetworkTokenPrice()}templateSearchInput(){return(0,n.qy)` 503 <wui-flex gap="2" padding="3"> 504 <wui-input-text 505 @inputChange=${this.onInputChange.bind(this)} 506 class="network-search-input" 507 size="sm" 508 placeholder="Search token" 509 icon="search" 510 ></wui-input-text> 511 </wui-flex> 512 `}templateTokens(){return this.tokens=this.tokenBalances?.filter(e=>e.chainId===s.W.state.activeCaipNetwork?.caipNetworkId),this.search?this.filteredTokens=this.tokenBalances?.filter(e=>e.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,(0,n.qy)` 513 <wui-flex 514 class="contentContainer" 515 flexDirection="column" 516 .padding=${["0","3","0","3"]} 517 > 518 <wui-flex justifyContent="flex-start" .padding=${["4","3","3","3"]}> 519 <wui-text variant="md-medium" color="secondary">Your tokens</wui-text> 520 </wui-flex> 521 <wui-flex flexDirection="column" gap="2"> 522 ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(e=>(0,n.qy)`<wui-list-token 523 @click=${this.handleTokenClick.bind(this,e)} 524 ?clickable=${!0} 525 tokenName=${e.name} 526 tokenImageUrl=${e.iconUrl} 527 tokenAmount=${e.quantity.numeric} 528 tokenValue=${e.value} 529 tokenCurrency=${e.symbol} 530 ></wui-list-token>`):(0,n.qy)`<wui-flex 531 .padding=${["20","0","0","0"]} 532 alignItems="center" 533 flexDirection="column" 534 gap="4" 535 > 536 <wui-icon-box icon="coinPlaceholder" color="default" size="lg"></wui-icon-box> 537 <wui-flex 538 class="textContent" 539 gap="2" 540 flexDirection="column" 541 justifyContent="center" 542 flexDirection="column" 543 > 544 <wui-text variant="lg-medium" align="center" color="primary"> 545 No tokens found 546 </wui-text> 547 <wui-text variant="lg-regular" align="center" color="secondary"> 548 Your tokens will appear here 549 </wui-text> 550 </wui-flex> 551 <wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link> 552 </wui-flex>`} 553 </wui-flex> 554 </wui-flex> 555 `}onBuyClick(){a.I.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){o.R.setToken(e),o.R.setTokenAmount(void 0),a.I.goBack()}};N.styles=E,I([(0,r.wk)()],N.prototype,"tokenBalances",void 0),I([(0,r.wk)()],N.prototype,"tokens",void 0),I([(0,r.wk)()],N.prototype,"filteredTokens",void 0),I([(0,r.wk)()],N.prototype,"search",void 0),N=I([(0,g.EM)("w3m-wallet-send-select-token-view")],N);var D=i(13291),z=i(69913),O=i(57398);i(75682),i(33668),i(45262),i(71364);var W=i(23526),B=i(52857);i(46148);var j=i(43390);let q=(0,j.AH)` 556 :host { 557 height: 32px; 558 display: flex; 559 align-items: center; 560 gap: ${({spacing:e})=>e[1]}; 561 border-radius: ${({borderRadius:e})=>e[32]}; 562 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 563 padding: ${({spacing:e})=>e[1]}; 564 padding-left: ${({spacing:e})=>e[2]}; 565 } 566 567 wui-avatar, 568 wui-image { 569 width: 24px; 570 height: 24px; 571 border-radius: ${({borderRadius:e})=>e[16]}; 572 } 573 574 wui-icon { 575 border-radius: ${({borderRadius:e})=>e[16]}; 576 } 577`;var M=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Z=class extends n.WF{constructor(){super(...arguments),this.text=""}render(){return(0,n.qy)`<wui-text variant="lg-regular" color="primary">${this.text}</wui-text> 578 ${this.imageTemplate()}`}imageTemplate(){return this.address?(0,n.qy)`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc}></wui-image>`:(0,n.qy)`<wui-icon size="lg" color="inverse" name="networkPlaceholder"></wui-icon>`}};Z.styles=[W.W5,W.fD,q],M([(0,r.MZ)({type:String})],Z.prototype,"text",void 0),M([(0,r.MZ)({type:String})],Z.prototype,"address",void 0),M([(0,r.MZ)({type:String})],Z.prototype,"imageSrc",void 0),Z=M([(0,B.E)("wui-preview-item")],Z);var H=i(5755);let V=(0,j.AH)` 579 :host { 580 display: flex; 581 padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]}; 582 width: 100%; 583 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 584 border-radius: ${({borderRadius:e})=>e[4]}; 585 } 586 587 wui-image {
588 width: 20px; 589 height: 20px; 590 border-radius: ${({borderRadius:e})=>e[16]}; 591 } 592 593 wui-icon { 594 width: 20px; 595 height: 20px; 596 } 597`;var _=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let F=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return(0,n.qy)` 598 <wui-flex justifyContent="space-between" alignItems="center"> 599 <wui-text variant="lg-regular" color="primary"> ${this.textTitle} </wui-text> 600 ${this.templateContent()} 601 </wui-flex> 602 `}templateContent(){return this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?(0,n.qy)` <wui-text variant="md-regular" color="secondary"> ${this.textValue} </wui-text>`:(0,n.qy)`<wui-icon size="inherit" color="default" name="networkPlaceholder"></wui-icon>`}};F.styles=[W.W5,W.fD,V],_([(0,r.MZ)()],F.prototype,"imageSrc",void 0),_([(0,r.MZ)()],F.prototype,"textTitle",void 0),_([(0,r.MZ)()],F.prototype,"textValue",void 0),F=_([(0,B.E)("wui-list-content")],F);let U=(0,g.AH)` 603 :host { 604 display: flex; 605 width: auto; 606 flex-direction: column; 607 gap: ${({spacing:e})=>e["1"]}; 608 border-radius: ${({borderRadius:e})=>e["5"]}; 609 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 610 padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["2"]} 611 ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]}; 612 } 613 614 wui-list-content { 615 width: -webkit-fill-available !important; 616 } 617 618 wui-text { 619 padding: 0 ${({spacing:e})=>e["2"]}; 620 } 621 622 wui-flex { 623 margin-top: ${({spacing:e})=>e["2"]}; 624 } 625 626 .network { 627 cursor: pointer; 628 transition: background-color ${({durations:e})=>e.lg} 629 ${({easings:e})=>e["ease-out-power-1"]}; 630 will-change: background-color; 631 } 632 633 .network:focus-visible { 634 border: 1px solid ${({tokens:e})=>e.core.textAccentPrimary}; 635 background-color: ${({tokens:e})=>e.core.glass010}; 636 -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; 637 -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; 638 box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; 639 } 640 641 .network:hover { 642 background-color: ${({tokens:e})=>e.core.glass010}; 643 } 644 645 .network:active { 646 background-color: ${({tokens:e})=>e.core.glass010}; 647 } 648`;var L=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let K=class extends n.WF{constructor(){super(...arguments),this.params=a.I.state.data?.send}render(){return(0,n.qy)` <wui-text variant="sm-regular" color="secondary">Details</wui-text> 649 <wui-flex flexDirection="column" gap="1"> 650 <wui-list-content 651 textTitle="Address" 652 textValue=${g.Zv.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})} 653 > 654 </wui-list-content> 655 ${this.networkTemplate()} 656 </wui-flex>`}networkTemplate(){return this.caipNetwork?.name?(0,n.qy)` <wui-list-content 657 @click=${()=>this.onNetworkClick(this.caipNetwork)} 658 class="network" 659 textTitle="Network" 660 imageSrc=${(0,H.J)(f.$.getNetworkImage(this.caipNetwork))} 661 ></wui-list-content>`:null}onNetworkClick(e){e&&!this.params&&a.I.push("Networks",{network:e})}};K.styles=U,L([(0,r.MZ)()],K.prototype,"receiverAddress",void 0),L([(0,r.MZ)({type:Object})],K.prototype,"caipNetwork",void 0),L([(0,r.wk)()],K.prototype,"params",void 0),K=L([(0,g.EM)("w3m-wallet-send-details")],K);let Y=(0,g.AH)` 662 wui-avatar, 663 wui-image { 664 display: ruby; 665 width: 32px; 666 height: 32px; 667 border-radius: ${({borderRadius:e})=>e["20"]}; 668 } 669 670 .sendButton { 671 width: 70%; 672 --local-width: 100% !important; 673 --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; 674 } 675 676 .cancelButton { 677 width: 30%; 678 --local-width: 100% !important; 679 --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; 680 } 681`;var J=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Q=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.token=o.R.state.token,this.sendTokenAmount=o.R.state.sendTokenAmount,this.receiverAddress=o.R.state.receiverAddress,this.receiverProfileName=o.R.state.receiverProfileName,this.receiverProfileImageUrl=o.R.state.receiverProfileImageUrl,this.caipNetwork=s.W.state.activeCaipNetwork,this.loading=o.R.state.loading,this.params=a.I.state.data?.send,this.unsubscribe.push(o.R.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl,this.loading=e.loading}),s.W.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e))}
681disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` <wui-flex flexDirection="column" .padding=${["0","4","4","4"]}> 682 <wui-flex gap="2" flexDirection="column" .padding=${["0","2","0","2"]}> 683 <wui-flex alignItems="center" justifyContent="space-between"> 684 <wui-flex flexDirection="column" gap="01"> 685 <wui-text variant="sm-regular" color="secondary">Send</wui-text> 686 ${this.sendValueTemplate()} 687 </wui-flex> 688 <wui-preview-item 689 text="${this.sendTokenAmount?g.Zv.roundNumber(this.sendTokenAmount,6,5):"unknown"} ${this.token?.symbol}" 690 .imageSrc=${this.token?.iconUrl} 691 ></wui-preview-item> 692 </wui-flex> 693 <wui-flex> 694 <wui-icon color="default" size="md" name="arrowBottom"></wui-icon> 695 </wui-flex> 696 <wui-flex alignItems="center" justifyContent="space-between"> 697 <wui-text variant="sm-regular" color="secondary">To</wui-text> 698 <wui-preview-item 699 text="${this.receiverProfileName?g.Zv.getTruncateString({string:this.receiverProfileName,charsStart:20,charsEnd:0,truncate:"end"}):g.Zv.getTruncateString({string:this.receiverAddress?this.receiverAddress:"",charsStart:4,charsEnd:4,truncate:"middle"})}" 700 address=${this.receiverAddress??""} 701 .imageSrc=${this.receiverProfileImageUrl??void 0} 702 .isAddress=${!0} 703 ></wui-preview-item> 704 </wui-flex> 705 </wui-flex> 706 <wui-flex flexDirection="column" .padding=${["6","0","0","0"]}> 707 <w3m-wallet-send-details 708 .caipNetwork=${this.caipNetwork} 709 .receiverAddress=${this.receiverAddress} 710 ></w3m-wallet-send-details> 711 <wui-flex justifyContent="center" gap="1" .padding=${["3","0","0","0"]}> 712 <wui-icon size="sm" color="default" name="warningCircle"></wui-icon> 713 <wui-text variant="sm-regular" color="secondary">Review transaction carefully</wui-text> 714 </wui-flex> 715 <wui-flex justifyContent="center" gap="3" .padding=${["4","0","0","0"]}> 716 <wui-button 717 class="cancelButton" 718 @click=${this.onCancelClick.bind(this)} 719 size="lg" 720 variant="neutral-secondary" 721 > 722 Cancel 723 </wui-button> 724 <wui-button 725 class="sendButton" 726 @click=${this.onSendClick.bind(this)} 727 size="lg" 728 variant="accent-primary" 729 .loading=${this.loading} 730 > 731 Send 732 </wui-button> 733 </wui-flex> 734 </wui-flex></wui-flex 735 >`}sendValueTemplate(){if(!this.params&&this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return(0,n.qy)`<wui-text variant="md-regular" color="primary" 736 >$${e.toFixed(2)}</wui-text 737 >`}return null}async onSendClick(){if(!this.sendTokenAmount||!this.receiverAddress)return void h.P.showError("Please enter a valid amount and receiver address");try{await o.R.sendToken(),this.params?a.I.reset("WalletSendConfirmed"):(h.P.showSuccess("Transaction started"),a.I.replace("Account"))}catch(n){let e="Failed to send transaction",t=n instanceof z.A&&n.originalName===D.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST,i=n instanceof z.A&&n.originalName===D.RQ.PROVIDER_RPC_ERROR_NAME.SEND_TRANSACTION_ERROR;(t||i)&&(e=n.message),O.E.sendEvent({type:"track",event:t?"SEND_REJECTED":"SEND_ERROR",properties:o.R.getSdkEventProperties(n)}),h.P.showError(e)}}onCancelClick(){a.I.goBack()}};Q.styles=Y,J([(0,r.wk)()],Q.prototype,"token",void 0),J([(0,r.wk)()],Q.prototype,"sendTokenAmount",void 0),J([(0,r.wk)()],Q.prototype,"receiverAddress",void 0),J([(0,r.wk)()],Q.prototype,"receiverProfileName",void 0),J([(0,r.wk)()],Q.prototype,"receiverProfileImageUrl",void 0),J([(0,r.wk)()],Q.prototype,"caipNetwork",void 0),J([(0,r.wk)()],Q.prototype,"loading",void 0),J([(0,r.wk)()],Q.prototype,"params",void 0),Q=J([(0,g.EM)("w3m-wallet-send-preview-view")],Q);let G=(0,g.AH)` 738 .icon-box { 739 width: 64px; 740 height: 64px; 741 border-radius: 16px; 742 background-color: ${({spacing:e})=>e[16]}; 743 border: 8px solid ${({tokens:e})=>e.theme.borderPrimary}; 744 border-radius: ${({borderRadius:e})=>e.round}; 745 } 746`,X=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.unsubscribe.push()}render(){return(0,n.qy)` 747 <wui-flex 748 flexDirection="column" 749 alignItems="center" 750 gap="4" 751 .padding="${["1","3","4","3"]}" 752 > 753 <wui-flex justifyContent="center" alignItems="center" class="icon-box"> 754 <wui-icon size="xxl" color="success" name="checkmark"></wui-icon> 755 </wui-flex> 756 757 <wui-text variant="h6-medium" color="primary">You successfully sent asset</wui-text> 758 759 <wui-button 760 fullWidth 761 @click=${this.onCloseClick.bind(this)} 762 size="lg" 763 variant="neutral-secondary" 764 > 765 Close 766 </wui-button>
766 767 </wui-flex> 768 `}onCloseClick(){l.W.close()}};X.styles=G,X=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,g.EM)("w3m-send-confirmed-view")],X)}}]);
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.