PageSourceSearch

https://www.subexile.com/assets/receive-CbJMnvsZ.js

js subexile.com collected 2026-10-09 22:37:44 UTC 6,749 bytes, 131 lines download raw bytes

1import{aV as g,aW as $,aX as v,aY as k,aZ as y,a_ as x,a$ as l,aJ as c,aD as w,b8 as m,b9 as h,b3 as C,ba as N,aH as R,aI as A,aC as I,aL as S,bb as f}from"./StreamTime-DI769hsu.js";import"./index-BQzdqvc6.js";import"./browser-CGB6innj.js";import"./useQuery-zS-TgrXn.js";import"./pause-_tIiCZ0I.js";import"./play-Cp7IkjkQ.js";import"./music-2-e2rM917k.js";import"./users-DXvjka3B.js";import"./artistAudioCatalog-n0QY9cHE.js";import"./list-music-nXv6L69I.js";import"./artistSlug-DAGM17IP.js";const T=g`
2  button {
3    width: 100%;
4    display: flex;
5    align-items: center;
6    justify-content: space-between;
7    gap: ${({spacing:e})=>e[4]};
8    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
9    border-radius: ${({borderRadius:e})=>e[3]};
10    border: none;
11    padding: ${({spacing:e})=>e[3]};
12    transition: background-color ${({durations:e})=>e.lg}
13      ${({easings:e})=>e["ease-out-power-2"]};
14    will-change: background-color;
15  }
16
17  /* -- Hover & Active states ----------------------------------------------------------- */
18  button:hover:enabled,
19  button:active:enabled {
20    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
21  }
22
23  wui-text {
24    flex: 1;
25    color: ${({tokens:e})=>e.theme.textSecondary};
26  }
27
28  wui-flex {
29    width: auto;
30    display: flex;
31    align-items: center;
32    gap: ${({spacing:e})=>e["01"]};
33  }
34
35  wui-icon {
36    color: ${({tokens:e})=>e.theme.iconDefault};
37  }
38
39  .network-icon {
40    position: relative;
41    width: 20px;
42    height: 20px;
43    border-radius: ${({borderRadius:e})=>e[4]};
44    overflow: hidden;
45    margin-left: -8px;
46  }
47
48  .network-icon:first-child {
49    margin-left: 0px;
50  }
51
52  .network-icon:after {
53    position: absolute;
54    inset: 0;
55    content: '';
56    display: block;
57    height: 100%;
58    width: 100%;
59    border-radius: ${({borderRadius:e})=>e[4]};
60    box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010};
61  }
62`;var b=function(e,t,o,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(i=(s<3?a(i):s>3?a(t,o,i):a(t,o))||i);return s>3&&i&&Object.defineProperty(t,o,i),i};let d=class extends x{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return l`
63      <button>
64        <wui-text variant="md-regular" color="inherit">${this.text}</wui-text>
65        <wui-flex>
66          ${this.networksTemplate()}
67          <wui-icon name="chevronRight" size="sm" color="inherit"></wui-icon>
68        </wui-flex>
69      </button>
70    `}networksTemplate(){const t=this.networkImages.slice(0,5);return l` <wui-flex class="networks">
71      ${t?.map(o=>l` <wui-flex class="network-icon"> <wui-image src=${o}></wui-image> </wui-flex>`)}
72    </wui-flex>`}};d.styles=[$,v,T];b([k({type:Array})],d.prototype,"networkImages",void 0);b([k()],d.prototype,"text",void 0);d=b([y("wui-compatible-network")],d);const _=g`
73  wui-compatible-network {
74    margin-top: ${({spacing:e})=>e[4]};
75    width: 100%;
76  }
77
78  wui-qr-code {
79    width: unset !important;
80    height: unset !important;
81  }
82
83  wui-icon {
84    align-items: normal;
85  }
86`;var p=function(e,t,o,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(i=(s<3?a(i):s>3?a(t,o,i):a(t,o))||i);return s>3&&i&&Object.defineProperty(t,o,i),i};let u=class extends x{constructor(){super(),this.unsubscribe=[],this.address=c.getAccountData()?.address,this.profileName=c.getAccountData()?.profileName,this.network=c.state.activeCaipNetwork,this.unsubscribe.push(c.subscribeChainProp("accountState",t=>{t?(this.address=t.address,this.profileName=t.profileName):w.showError("Account not found")}),c.subscribeKey("activeCaipNetwork",t=>{t?.id&&(this.network=t)}))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const t=m.getNetworkImage(this.network);return l` <wui-flex
87      flexDirection="column"
88      .padding=${["0","4","4","4"]}
89      alignItems="center"
90    >
91      <wui-chip-button
92        data-testid="receive-address-copy-button"
93        @click=${this.onCopyClick.bind(this)}
94        text=${C.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
95        icon="copy"
96        size="sm"
97        imageSrc=${t||""}
98        variant="gray"
99      ></wui-chip-button>
99
100      <wui-flex
101        flexDirection="column"
102        .padding=${["4","0","0","0"]}
103        alignItems="center"
104        gap="4"
105      >
106        <wui-qr-code
107          size=${232}
108          theme=${h.state.themeMode}
109          uri=${this.address}
110          ?arenaClear=${!0}
111          color=${N(h.state.themeVariables["--apkt-qr-color"]??h.state.themeVariables["--w3m-qr-color"])}
112          data-testid="wui-qr-code"
113        ></wui-qr-code>
114        <wui-text variant="lg-regular" color="primary" align="center">
115          Copy your address or scan this QR code
116        </wui-text>
117        <wui-button @click=${this.onCopyClick.bind(this)} size="sm" variant="neutral-secondary">
118          <wui-icon slot="iconLeft" size="sm" color="inherit" name="copy"></wui-icon>
119          <wui-text variant="md-regular" color="inherit">Copy address</wui-text>
120        </wui-button>
121      </wui-flex>
122      ${this.networkTemplate()}
123    </wui-flex>`}networkTemplate(){const t=c.getAllRequestedCaipNetworks(),o=c.checkIfSmartAccountEnabled(),r=c.state.activeCaipNetwork,s=t.filter(n=>n?.chainNamespace===r?.chainNamespace);if(R(r?.chainNamespace)===A.ACCOUNT_TYPES.SMART_ACCOUNT&&o)return r?l`<wui-compatible-network
124        @click=${this.onReceiveClick.bind(this)}
125        text="Only receive assets on this network"
126        .networkImages=${[m.getNetworkImage(r)??""]}
127      ></wui-compatible-network>`:null;const a=(s?.filter(n=>n?.assets?.imageId)?.slice(0,5)).map(m.getNetworkImage).filter(Boolean);return l`<wui-compatible-network
128      @click=${this.onReceiveClick.bind(this)}
129      text="Only receive assets on these networks"
130      .networkImages=${a}
131    ></wui-compatible-network>`}onReceiveClick(){I.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(S.copyToClopboard(this.address),w.showSuccess("Address copied"))}catch{w.showError("Failed to copy")}}};u.styles=_;p([f()],u.prototype,"address",void 0);p([f()],u.prototype,"profileName",void 0);p([f()],u.prototype,"network",void 0);u=p([y("w3m-wallet-receive-view")],u);export{u as W3mWalletReceiveView};

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.