PageSourceSearch

https://daimo.com/_next/static/chunks/9514.698710a11ae35b50.js

js daimo.com collected 2026-09-25 20:24:58 UTC 121,415 bytes, 1,568 lines download raw bytes

vendor: 4,104 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9514],{3555:(e,t,i)=>{let r=i(84496);t.render=function(e,t,i){var o;let n=i,a=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),n=r.getOptions(n);let s=r.getImageWidth(e.modules.size,n),l=a.getContext("2d"),c=l.createImageData(s,s);return r.qrToImageData(c.data,e,n),o=a,l.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px",l.putImageData(c,0,0),a},t.renderToDataURL=function(e,i,r){let o=r;void 0!==o||i&&i.getContext||(o=i,i=void 0),o||(o={});let n=t.render(e,i,o),a=o.type||"image/png",s=o.rendererOpts||{};return n.toDataURL(a,s.quality)}},5112:(e,t,i)=>{let r=i(12740),o=i(57034);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!r.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,i){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return i}}},5409:(e,t,i)=>{let r=i(40188),o=i(47405),n=i(9971),a=i(65328),s=i(85779),l=i(62312),c=i(76348),d=i(64616),u=i(90284),h=i(11249),p=i(89819),g=i(5112),f=i(54897);function w(e,t,i){let r,o,n=e.size,a=p.getEncodedBits(t,i);for(r=0;r<15;r++)o=(a>>r&1)==1,r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(n-15+r,8,o,!0),r<8?e.set(8,n-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(n-8,8,1,!0)}t.create=function(e,t){let i,p;if(void 0===e||""===e)throw Error("No input text");let m=o.M;return void 0!==t&&(m=o.from(t.errorCorrectionLevel,o.M),i=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),function(e,t,i,o){let p;if(Array.isArray(e))p=f.fromArray(e);else if("string"==typeof e){let r=t;if(!r){let t=f.rawSplit(e);r=h.getBestVersionForData(t,i)}p=f.fromString(e,r||40)}else throw Error("Invalid data");let m=h.getBestVersionForData(p,i);if(!m)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<m)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else t=m;let b=function(e,t,i){let o=new n;i.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(o)});let a=(r.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t))*8;for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);let s=(a-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,t,i){let o,n,a=r.getSymbolTotalCodewords(t),s=a-d.getTotalCodewordsCount(t,i),l=d.getBlocksCount(t,i),c=a%l,h=l-c,p=Math.floor(a/l),g=Math.floor(s/l),f=g+1,w=p-g,m=new u(w),b=0,y=Array(l),v=Array(l),x=0,$=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<h?g:f;y[e]=$.slice(b,b+t),v[e]=m.encode(y[e]),b+=t,x=Math.max(x,t)}let k=new Uint8Array(a),C=0;for(o=0;o<x;o++)for(n=0;n<l;n++)o<y[n].length&&(k[C++]=y[n][o]);for(o=0;o<w;o++)for(n=0;n<l;n++)k[C++]=v[n][o];return k}(o,e,t)}(t,i,p),y=new a(r.getSymbolSize(t));!function(e,t){let i=e.size,r=l.getPositions(t);for(let t=0;t<r.length;t++){let o=r[t][0],n=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1)&&!(i<=o+t))for(let r=-1;r<=7;r++)n+r<=-1||i<=n+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>
1=2&&r<=4?e.set(o+t,n+r,!0,!0):e.set(o+t,n+r,!1,!0))}}(y,t);let v=y.size;for(let e=8;e<v-8;e++){let t=e%2==0;y.set(e,6,t,!0),y.set(6,e,t,!0)}return!function(e,t){let i=s.getPositions(t);for(let t=0;t<i.length;t++){let r=i[t][0],o=i[t][1];for(let t=-2;t<=2;t++)for(let i=-2;i<=2;i++)-2===t||2===t||-2===i||2===i||0===t&&0===i?e.set(r+t,o+i,!0,!0):e.set(r+t,o+i,!1,!0)}}(y,t),w(y,i,0),t>=7&&function(e,t){let i,r,o,n=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)i=Math.floor(t/3),r=t%3+n-8-3,o=(a>>t&1)==1,e.set(i,r,o,!0),e.set(r,i,o,!0)}(y,t),!function(e,t){let i=e.size,r=-1,o=i-1,n=7,a=0;for(let s=i-1;s>0;s-=2)for(6===s&&s--;;){for(let i=0;i<2;i++)if(!e.isReserved(o,s-i)){let r=!1;a<t.length&&(r=(t[a]>>>n&1)==1),e.set(o,s-i,r),-1==--n&&(a++,n=7)}if((o+=r)<0||i<=o){o-=r,r=-r;break}}}(y,b),isNaN(o)&&(o=c.getBestMask(y,w.bind(null,y,i))),c.applyMask(o,y),w(y,i,o),{modules:y,version:t,errorCorrectionLevel:i,maskPattern:o,segments:p}}(e,i,m,p)}},9971:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},10364:e=>{"use strict";e.exports=function(e){for(var t=[],i=e.length,r=0;r<i;r++){var o=e.charCodeAt(r);if(o>=55296&&o<=56319&&i>r+1){var n=e.charCodeAt(r+1);n>=56320&&n<=57343&&(o=(o-55296)*1024+n-56320+65536,r+=1)}if(o<128){t.push(o);continue}if(o<2048){t.push(o>>6|192),t.push(63&o|128);continue}if(o<55296||o>=57344&&o<65536){t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128);continue}if(o>=65536&&o<=1114111){t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},11239:(e,t,i)=>{let r=i(42545),o=i(5409),n=i(3555),a=i(61546);function s(e,t,i,n,a){let s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!r())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(a=i,i=t,t=n=void 0):3===l&&(t.getContext&&void 0===a?(a=n,n=void 0):(a=n,n=i,i=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(i=t,t=n=void 0):2!==l||t.getContext||(n=i,i=t,t=void 0),new Promise(function(r,a){try{let a=o.create(i,n);r(e(a,t,n))}catch(e){a(e)}})}try{let r=o.create(i,n);a(null,e(r,t,n))}catch(e){a(e)}}t.create=o.create,t.toCanvas=s.bind(null,n.render),t.toDataURL=s.bind(null,n.renderToDataURL),t.toString=s.bind(null,function(e,t,i){return a.render(e,i)})},11249:(e,t,i)=>{let r=i(40188),o=i(64616),n=i(47405),a=i(5112),s=i(12740),l=r.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,i){if(!s.isValid(e))throw Error("Invalid QR Code version");void 0===i&&(i=a.BYTE);let n=(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t))*8;if(i===a.MIXED)return n;let l=n-c(i,e);switch(i){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,i){let r,o=n.from(i,n.M);if(Array.isArray(e)){if(e.length>1){for(let i=1;i<=40;i++)if(function(e,t){let i=0;return e.forEach(function(e){let r=c(e.mode,t);i+=r+e.getBitsLength()}),i}(e,i)<=t.getCapacity(i,o,a.MIXED))return i;return}if(0===e.length)return 1;r=e[0]}else r=e;return function(e,i,r){for(let o=1;o<=40;o++)if(i<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},12740:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},35844:(e,t,i)=>{let r=i(10364),o=i(5112);function n(e){this.mode=o.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)},e.exports=n},40188:(e,t)=>
vendor: 6,261 bytes, line 1
1{let i,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');i=e},t.isKanjiModeEnabled=function(){return void 0!==i},t.toSJIS=function(e){return i(e)}},42545:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},47405:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,i){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return i}}},48173:(e,t,i)=>{let r=i(96667);t.mul=function(e,t){let i=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let n=0;n<t.length;n++)i[o+n]^=r.mul(e[o],t[n]);return i},t.mod=function(e,t){let i=new Uint8Array(e);for(;i.length-t.length>=0;){let e=i[0];for(let o=0;o<t.length;o++)i[o]^=r.mul(t[o],e);let o=0;for(;o<i.length&&0===i[o];)o++;i=i.slice(o)}return i},t.generateECPolynomial=function(e){let i=new Uint8Array([1]);for(let o=0;o<e;o++)i=t.mul(i,new Uint8Array([1,r.exp(o)]));return i}},49361:(e,t,i)=>{let r=i(5112);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,i;for(t=0;t+3<=this.data.length;t+=3)i=parseInt(this.data.substr(t,3),10),e.put(i,10);let r=this.data.length-t;r>0&&(i=parseInt(this.data.substr(t),10),e.put(i,3*r+1))},e.exports=o},54897:(e,t,i)=>{let r=i(5112),o=i(49361),n=i(79303),a=i(35844),s=i(66381),l=i(57034),c=i(40188),d=i(41582);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,i){let r,o=[];for(;null!==(r=e.exec(i));)o.push({data:r[0],index:r.index,mode:t,length:r[0].length});return o}function p(e){let t,i,o=h(l.NUMERIC,r.NUMERIC,e),n=h(l.ALPHANUMERIC,r.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,r.BYTE,e),i=h(l.KANJI,r.KANJI,e)):(t=h(l.BYTE_KANJI,r.BYTE,e),i=[]),o.concat(n,t,i).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function g(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return n.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function f(e,t){let i,l=r.getBestModeForData(e);if((i=r.from(t,l))!==r.BYTE&&i.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+r.toString(i)+".\n Suggested mode is: "+r.toString(l));switch(i===r.KANJI&&!c.isKanjiModeEnabled()&&(i=r.BYTE),i){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new n(e);case r.KANJI:return new s(e);case r.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(f(t,null)):t.data&&e.push(f(t.data,t.mode)),e},[])},t.fromString=function(e,i){let o=function(e,t){let i={},o={start:{}},n=["start"];for(let a=0;a<e.length;a++){let s=e[a],l=[];for(let e=0;e<s.length;e++){let c=s[e],d=""+a+e;l.push(d),i[d]={node:c,lastCount:0},o[d]={};for(let e=0;e<n.length;e++){let a=n[e];i[a]&&i[a].node.mode===c.mode?(o[a][d]=g(i[a].lastCount+c.length,c.mode)-g(i[a].lastCount,c.mode),i[a].lastCount+=c.length):(i[a]&&(i[a].lastCount=c.length),o[a][d]=g(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}n=l}for(let e=0;e<n.length;e++)o[n[e]].end=0;return{map:o,table:i}}(function(e){let t=[];for(let i=0;i<e.length;i++){let o=e[i];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:u(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:u(o.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),i),n=d.find_path(o.map,"start","end"),a=[];for(let e=1;e<n.length-1;e++)a.push(o.table[n[e]].node);return t.fromArray(a.reduce(function(e,t){let i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},57034:(e,t)=>{let i="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(r,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(o,"g"),t.NUMERIC=RegExp(i,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let n=RegExp("^"+r+"$"),a=RegExp("^"+i+"$"),s=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return n.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},61546:(e,t,i)=>{let r=i(84496);function o(e,t){let i=e.a/255,r=t+'="'+e.hex+'"';return i<1?r+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function n(e,t,i){let r=e+t;return void 0!==i&&(r+=" "+i),r}t.render=function(e,t,i){let a=r.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*a.margin,d=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+o(a.color.dark,"stroke")+' d="'+function(e,t,i){let r="",o=0,a=!1,s=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),d=Math.floor(l/t);c||a||(a=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(r+=a?n("M",c+i,.5+d+i):n("m",o,0),o=0,a=!1),c+1<t&&e[l+1]||(r+=n("h",s),s=0)):o++}
1return r}(l,s,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+c+" ")+c+'" shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof i&&i(null,h),h}},62312:(e,t,i)=>{let r=i(40188).getSymbolSize;t.getPositions=function(e){let t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},64616:(e,t,i)=>{let r=i(47405),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[(e-1)*4+0];case r.M:return o[(e-1)*4+1];case r.Q:return o[(e-1)*4+2];case r.H:return o[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return n[(e-1)*4+0];case r.M:return n[(e-1)*4+1];case r.Q:return n[(e-1)*4+2];case r.H:return n[(e-1)*4+3];default:return}}},65328:e=>{function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,i,r){let o=e*this.size+t;this.data[o]=i,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},66381:(e,t,i)=>{let r=i(5112),o=i(40188);function n(e){this.mode=r.KANJI,this.data=e}n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=o.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i=(i>>>8&255)*192+(255&i),e.put(i,13)}},e.exports=n},76348:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let i={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,r=0,o=0,n=0,a=null,s=null;for(let l=0;l<t;l++){o=n=0,a=s=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===a?o++:(o>=5&&(r+=i.N1+(o-5)),a=t,o=1),(t=e.get(c,l))===s?n++:(n>=5&&(r+=i.N1+(n-5)),s=t,n=1)}o>=5&&(r+=i.N1+(o-5)),n>=5&&(r+=i.N1+(n-5))}return r},t.getPenaltyN2=function(e){let t=e.size,r=0;for(let i=0;i<t-1;i++)for(let o=0;o<t-1;o++){let t=e.get(i,o)+e.get(i,o+1)+e.get(i+1,o)+e.get(i+1,o+1);(4===t||0===t)&&r++}return r*i.N2},t.getPenaltyN3=function(e){let t=e.size,r=0,o=0,n=0;for(let i=0;i<t;i++){o=n=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(i,a),a>=10&&(1488===o||93===o)&&r++,n=n<<1&2047|e.get(a,i),a>=10&&(1488===n||93===n)&&r++}return r*i.N3},t.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*i.N4},t.applyMask=function(e,i){let r=i.size;for(let o=0;o<r;o++)for(let n=0;n<r;n++)i.isReserved(n,o)||i.xor(n,o,function(e,i,r){switch(e){case t.Patterns.PATTERN000:return(i+r)%2==0;case t.Patterns.PATTERN001:return i%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(i+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return i*r%2+i*r%3==0;case t.Patterns.PATTERN110:return(i*r%2+i*r%3)%2==0;case t.Patterns.PATTERN111:return(i*r%3+(i+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,n,o))},t.getBestMask=function(e,i){let r=Object.keys(t.Patterns).length,o=0,n=1/0;for(let a=0;a<r;
1a++){i(a),t.applyMask(a,e);let r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),r<n&&(n=r,o=a)}return o}},79303:(e,t,i)=>{let r=i(5112),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=r.ALPHANUMERIC,this.data=e}n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=45*o.indexOf(this.data[t]);i+=o.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=n},79514:(e,t,i)=>{"use strict";i.r(t),i.d(t,{W3mAllWalletsView:()=>tf,W3mConnectingWcBasicView:()=>eS,W3mDownloadsView:()=>ty});var r=i(53288),o=i(85159),n=i(4683),a=i(34958),s=i(53932),l=i(2153),c=i(75595);i(13470);var d=i(72769),u=i(80810),h=i(81023),p=i(37743),g=i(8445),f=i(31329);i(24444);var w=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let m=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=h.a.state.connectors,this.count=s.N.state.count,this.filteredCount=s.N.state.filteredWallets.length,this.isFetchingRecommendedWallets=s.N.state.isFetchingRecommendedWallets,this.unsubscribe.push(h.a.subscribeKey("connectors",e=>this.connectors=e),s.N.subscribeKey("count",e=>this.count=e),s.N.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),s.N.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=a.H.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!n.w.isMobile())return null;let i=s.N.state.featured.length,o=this.count+i,l=o<10?o:10*Math.floor(o/10),c=this.filteredCount>0?this.filteredCount:l,h=`${c}`;this.filteredCount>0?h=`${this.filteredCount}`:c<o&&(h=`${c}+`);let g=p.x.hasAnyConnection(u.o.CONNECTOR_ID.WALLET_CONNECT);return(0,r.qy)`
2      <wui-list-wallet
3        name="Search Wallet"
4        walletIcon="search"
5        showAllWallets
6        @click=${this.onAllWallets.bind(this)}
7        tagLabel=${h}
8        tagVariant="info"
9        data-testid="all-wallets"
10        tabIdx=${(0,d.J)(this.tabIdx)}
11        .loading=${this.isFetchingRecommendedWallets}
12        ?disabled=${g}
13        size="sm"
14      ></wui-list-wallet>
15    `}onAllWallets(){g.E.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),f.I.push("AllWallets",{redirectView:f.I.state.data?.redirectView})}};w([(0,o.MZ)()],m.prototype,"tabIdx",void 0),w([(0,o.wk)()],m.prototype,"connectors",void 0),w([(0,o.wk)()],m.prototype,"count",void 0),w([(0,o.wk)()],m.prototype,"filteredCount",void 0),w([(0,o.wk)()],m.prototype,"isFetchingRecommendedWallets",void 0),m=w([(0,c.EM)("w3m-all-wallets-widget")],m);var b=i(72300),y=i(97540),v=i(52973),x=i(26551);let $=(0,c.AH)`
16  :host {
17    margin-top: ${({spacing:e})=>e["1"]};
18  }
19  wui-separator {
20    margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1)
21      ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1);
22    width: calc(100% + ${({spacing:e})=>e["3"]} * 2);
23  }
24`;var k=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let C=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.connectors=h.a.state.connectors,this.recommended=s.N.state.recommended,this.featured=s.N.state.featured,this.explorerWallets=s.N.state.explorerWallets,this.connections=p.x.state.connections,this.connectorImages=b.j.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(h.a.subscribeKey("connectors",e=>this.connectors=e),p.x.subscribeKey("connections",e=>this.connections=e),b.j.subscribeKey("connectorImages",e=>this.connectorImages=e),s.N.subscribeKey("recommended",e=>this.recommended=e),s.N.subscribeKey("featured",e=>this.featured=e),s.N.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:s.N.state.explorerWallets}),s.N.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),n.w.isTelegram()&&n.w.isIos()&&(this.loadingTelegram=!p.x.state.wcUri,this.unsubscribe.push(p.x.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}
24disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,r.qy)`
25      <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex>
26    `}mapConnectorsToExplorerWallets(e,t){return e.map(e=>{if("MULTI_CHAIN"===e.type&&e.connectors){let i=e.connectors.map(e=>e.id),r=e.connectors.map(e=>e.name),o=e.connectors.map(e=>e.info?.rdns);return e.explorerWallet=t?.find(e=>i.includes(e.id)||r.includes(e.name)||e.rdns&&(o.includes(e.rdns)||i.includes(e.rdns)))??e.explorerWallet,e}let i=t?.find(t=>t.id===e.id||t.rdns===e.info?.rdns||t.name===e.name);return e.explorerWallet=i??e.explorerWallet,e})}processConnectorsByType(e,t=!0){let i=x.g.sortConnectorsByExplorerWallet([...e]);return t?i.filter(x.g.showConnector):i}connectorListTemplate(){let e=this.mapConnectorsToExplorerWallets(this.connectors,this.explorerWallets??[]),t=x.g.getConnectorsByType(e,this.recommended,this.featured),i=this.processConnectorsByType(t.announced.filter(e=>"walletConnect"!==e.id)),r=this.processConnectorsByType(t.injected),o=this.processConnectorsByType(t.multiChain.filter(e=>"WalletConnect"!==e.name),!1),a=t.custom,s=t.recent,l=this.processConnectorsByType(t.external.filter(e=>e.id!==u.o.CONNECTOR_ID.COINBASE_SDK)),c=t.recommended,d=t.featured,h=x.g.getConnectorTypeOrder({custom:a,recent:s,announced:i,injected:r,multiChain:o,recommended:c,featured:d,external:l}),p=this.connectors.find(e=>"walletConnect"===e.id),g=n.w.isMobile(),f=[];for(let e of h)switch(e){case"walletConnect":!g&&p&&f.push({kind:"connector",subtype:"walletConnect",connector:p});break;case"recent":x.g.getFilteredRecentWallets().forEach(e=>f.push({kind:"wallet",subtype:"recent",wallet:e}));break;case"injected":o.forEach(e=>f.push({kind:"connector",subtype:"multiChain",connector:e}
26)),i.forEach(e=>f.push({kind:"connector",subtype:"announced",connector:e})),r.forEach(e=>f.push({kind:"connector",subtype:"injected",connector:e}));break;case"featured":d.forEach(e=>f.push({kind:"wallet",subtype:"featured",wallet:e}));break;case"custom":x.g.getFilteredCustomWallets(a??[]).forEach(e=>f.push({kind:"wallet",subtype:"custom",wallet:e}));break;case"external":l.forEach(e=>f.push({kind:"connector",subtype:"external",connector:e}));break;case"recommended":x.g.getCappedRecommendedWallets(c).forEach(e=>f.push({kind:"wallet",subtype:"recommended",wallet:e}));break;default:console.warn(`Unknown connector type: ${e}`)}return f.map((e,t)=>"connector"===e.kind?this.renderConnector(e,t):this.renderWallet(e,t))}renderConnector(e,t){let i,o,n=e.connector,a=y.$.getConnectorImage(n)||this.connectorImages[n?.imageId??""],s=(this.connections.get(n.chain)??[]).some(e=>v.y.isLowerCaseMatch(e.connectorId,n.id));"multiChain"===e.subtype?(i="multichain",o="info"):"walletConnect"===e.subtype?(i="qr code",o="accent"):"injected"===e.subtype||"announced"===e.subtype?(i=s?"connected":"installed",o=s?"info":"success"):(i=void 0,o=void 0);let l=p.x.hasAnyConnection(u.o.CONNECTOR_ID.WALLET_CONNECT),c=("walletConnect"===e.subtype||"external"===e.subtype)&&l;return(0,r.qy)`
27      <w3m-list-wallet
28        displayIndex=${t}
29        imageSrc=${(0,d.J)(a)}
30        .installed=${!0}
31        name=${n.name??"Unknown"}
32        .tagVariant=${o}
33        tagLabel=${(0,d.J)(i)}
34        data-testid=${`wallet-selector-${n.id.toLowerCase()}`}
35        size="sm"
36        @click=${()=>this.onClickConnector(e)}
37        tabIdx=${(0,d.J)(this.tabIdx)}
38        ?disabled=${c}
39        rdnsId=${(0,d.J)(n.explorerWallet?.rdns||void 0)}
40        walletRank=${(0,d.J)(n.explorerWallet?.order)}
41      >
42      </w3m-list-wallet>
43    `}onClickConnector(e){let t=f.I.state.data?.redirectView;if("walletConnect"===e.subtype){h.a.setActiveConnector(e.connector),n.w.isMobile()?f.I.push("AllWallets"):f.I.push("ConnectingWalletConnect",{redirectView:t});return}if("multiChain"===e.subtype){h.a.setActiveConnector(e.connector),f.I.push("ConnectingMultiChain",{redirectView:t});return}if("injected"===e.subtype){h.a.setActiveConnector(e.connector),f.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if("announced"===e.subtype)return"walletConnect"===e.connector.id?void(n.w.isMobile()?f.I.push("AllWallets"):f.I.push("ConnectingWalletConnect",{redirectView:t})):(f.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet}),void 0);f.I.push("ConnectingExternal",{connector:e.connector,redirectView:t})}renderWallet(e,t){let i=e.wallet,o=y.$.getWalletImage(i),n=p.x.hasAnyConnection(u.o.CONNECTOR_ID.WALLET_CONNECT),a=this.loadingTelegram,s="recent"===e.subtype?"recent":void 0,l="recent"===e.subtype?"info":void 0;return(0,r.qy)`
44      <w3m-list-wallet
45        displayIndex=${t}
46        imageSrc=${(0,d.J)(o)}
47        name=${i.name??"Unknown"}
48        @click=${()=>this.onClickWallet(e)}
49        size="sm"
50        data-testid=${`wallet-selector-${i.id}`}
51        tabIdx=${(0,d.J)(this.tabIdx)}
52        ?loading=${a}
53        ?disabled=${n}
54        rdnsId=${(0,d.J)(i.rdns||void 0)}
55        walletRank=${(0,d.J)(i.order)}
56        tagLabel=${(0,d.J)(s)}
57        .tagVariant=${l}
58      >
59      </w3m-list-wallet>
60    `}onClickWallet(e){let t=f.I.state.data?.redirectView;if("featured"===e.subtype)return void h.a.selectWalletConnector(e.wallet);if("recent"===e.subtype){if(this.loadingTelegram)return;h.a.selectWalletConnector(e.wallet);return}if("custom"===e.subtype){if(this.loadingTelegram)return;f.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let i=h.a.getConnector({id:e.wallet.id,rdns:e.wallet.rdns});i?f.I.push("ConnectingExternal",{connector:i,redirectView:t}):f.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t})}};C.styles=$,k([(0,o.MZ)({type:Number})],C.prototype,"tabIdx",void 0),k([(0,o.wk)()],C.prototype,"connectors",void 0),k([(0,o.wk)()],C.prototype,"recommended",void 0),k([(0,o.wk)()],C.prototype,"featured",void 0),k([(0,o.wk)()],C.prototype,"explorerWallets",void 0),k([(0,o.wk)()],C.prototype,"connections",void 0),k([(0,o.wk)()],C.prototype,"connectorImages",void 0),k([(0,o.wk)()],C.prototype,"loadingTelegram",void 0),C=k([(0,c.EM)("w3m-connector-list")],C);var E=i(71249),R=i(54461),I=i(28754),T=i(7169),A=i(27601),M=i(22669),P=i(3819),S=i(38216);i(68616),i(64611);var W=i(38675);let N=(0,W.AH)`
61  :host {
62    flex: 1;
63    height: 100%;
64  }
65
66  button {
67    width: 100%;
68    height: 100%;
69    display: inline-flex;
70    align-items: center;
71    padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]};
72    column-gap: ${({spacing:e})=>e[1]};
73    color: ${({tokens:e})=>e.theme.textSecondary};
74    border-radius: ${({borderRadius:e})=>e[20]};
75    background-color: transparent;
76    transition: background-color ${({durations:e})=>e.lg}
77      ${({easings:e})=>e["ease-out-power-2"]};
78    will-change: background-color;
79  }
80
81  /* -- Hover & Active states ----------------------------------------------------------- */
82  button[data-active='true'] {
83    color: ${({tokens:e})=>e.theme.textPrimary};
84    background-color: ${({tokens:e})=>e.theme.foregroundTertiary};
85  }
86
87  button:hover:enabled:not([data-active='true']),
88  button:active:enabled:not([data-active='true']) {
89    wui-text,
90    wui-icon {
91      color: ${({tokens:e})=>e.theme.textPrimary};
92    }
93  }
94`;var L=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let B={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},O={lg:"md",md:"sm",sm:"sm"},j=class extends r.WF{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return(0,r.qy)`
95      <button data-active=${this.active}>
96        ${this.icon?(0,r.qy)`<wui-icon size=${O[this.size]} name=${this.icon}></wui-icon>`:""}
97        <wui-text variant=${B[this.size]}> ${this.label} </wui-text>
98      </button>
99    `}};j.styles=[P.W5,P.fD,N],L([(0,o.MZ)()],j.prototype,"icon",void 0),L([(0,o.MZ)()],j.prototype,"size",void 0),L([(0,o.MZ)()],j.prototype,"label",void 0),L([(0,o.MZ)({type:Boolean})],j.prototype,"active",void 0),j=L([(0,S.E)("wui-tab-item")],j);let z=(0,W.AH)`
100  :host {
101    display: inline-flex;
102    align-items: center;
103    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
104    border-radius: ${({borderRadius:e})=>e[32]};
105    padding: ${({spacing:e})=>e["01"]};
106    box-sizing: border-box;
107  }
108
109  :host([data-size='sm']) {
110    height: 26px;
111  }
112
113  :host([data-size='md']) {
114    height: 36px;
115  }
116`;var q=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let D=class extends r.WF{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.size="md",this.activeTab=0}render(){return this.dataset.size=this.size,this.tabs.map((e,t)=>{let i=t===this.activeTab;return(0,r.qy)`
117        <wui-tab-item
118          @click=${()=>this.onTabClick(t)}
119          icon=${e.icon}
120          size=${this.size}
121          label=${e.label}
122          ?active=${i}
123          data-active=${i}
124          data-testid="tab-${e.label?.toLowerCase()}"
125        ></wui-tab-item>
126      `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};D.styles=[P.W5,P.fD,z],q([(0,o.MZ)({type:Array})],D.prototype,"tabs",void 0),q([(0,o.MZ)()],D.prototype,"onTabChange",void 0),q([(0,o.MZ)()],D.prototype,"size",void 0),q([(0,o.wk)()],D.prototype,"activeTab",void 0),D=q([(0,S.E)("wui-tabs")],D);var _=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let U=class extends r.WF{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return(0,r.qy)`
127      <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}>
128        <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
129      </wui-flex>
130    `}generateTabs(){let e=this.platforms.map(e=>{if("browser"===e)return{label:"Browser",icon:"extension",platform:"browser"};if("mobile"===e)return{label:"Mobile",icon:"mobile",platform:"mobile"};if("qrcode"===e)return{label:"Mobile",icon:"mobile",platform:"qrcode"};if("web"===e)return{label:"Webapp",icon:"browser",platform:"web"};if("desktop"===e)return{label:"Desktop",icon:"desktop",platform:"desktop"};return{label:"Browser",icon:"extension",platform:"unsupported"}});return this.platformTabs=e.map(({platform:e})=>e),e}onTabChange(e){let t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};_([(0,o.MZ)({type:Array})],U.prototype,"platforms",void 0),_([(0,o.MZ)()],U.prototype,"onSelectPlatfrom",void 0),U=_([(0,c.EM)("w3m-connecting-header")],U);var Z=i(56121);i(35358);let F=(0,W.AH)`
131  :host {
132    width: var(--local-width);
133  }
134
135  button {
136    width: var(--local-width);
137    white-space: nowrap;
138    column-gap: ${({spacing:e})=>e[2]};
139    transition:
140      scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]},
141      background-color ${({durations:e})=>e.lg}
142        ${({easings:e})=>e["ease-out-power-2"]},
143      border-radius ${({durations:e})=>e.lg}
144        ${({easings:e})=>e["ease-out-power-1"]};
145    will-change: scale, background-color, border-radius;
146    cursor: pointer;
147  }
148
149  /* -- Sizes --------------------------------------------------- */
150  button[data-size='sm'] {
151    border-radius: ${({borderRadius:e})=>e[2]};
152    padding: 0 ${({spacing:e})=>e[2]};
153    height: 28px;
154  }
155
156  button[data-size='md'] {
157    border-radius: ${({borderRadius:e})=>e[3]};
158    padding: 0 ${({spacing:e})=>e[4]};
159    height: 38px;
160  }
161
162  button[data-size='lg'] {
163    border-radius: ${({borderRadius:e})=>e[4]};
164    padding: 0 ${({spacing:e})=>e[5]};
165    height: 48px;
166  }
167
168  /* -- Variants --------------------------------------------------------- */
169  button[data-variant='accent-primary'] {
170    background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary};
171    color: ${({tokens:e})=>e.theme.textInvert};
172  }
173
174  button[data-variant='accent-secondary'] {
175    background-color: ${({tokens:e})=>e.core.foregroundAccent010};
176    color: ${({tokens:e})=>e.core.textAccentPrimary};
177  }
178
179  button[data-variant='neutral-primary'] {
180    background-color: ${({tokens:e})=>e.theme.backgroundInvert};
181    color: ${({tokens:e})=>e.theme.textInvert};
182  }
183
184  button[data-variant='neutral-secondary'] {
185    background-color: transparent;
186    border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
187    color: ${({tokens:e})=>e.theme.textPrimary};
188  }
189
190  button[data-variant='neutral-tertiary'] {
191    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
192    color: ${({tokens:e})=>e.theme.textPrimary};
193  }
194
195  button[data-variant='error-primary'] {
196    background-color: ${({tokens:e})=>e.core.textError};
197    color: ${({tokens:e})=>e.theme.textInvert};
198  }
199
200  button[data-variant='error-secondary'] {
201    background-color: ${({tokens:e})=>e.core.backgroundError};
202    color: ${({tokens:e})=>e.core.textError};
203  }
204
205  button[data-variant='shade'] {
206    background: var(--wui-color-gray-glass-002);
207    color: var(--wui-color-fg-200);
208    border: none;
209    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
210  }
211
212  /* -- Focus states --------------------------------------------------- */
213  button[data-size='sm']:focus-visible:enabled {
214    border-radius: 28px;
215  }
216
217  button[data-size='md']:focus-visible:enabled {
218    border-radius: 38px;
219  }
220
221  button[data-size='lg']:focus-visible:enabled {
222    border-radius: 48px;
223  }
224  button[data-variant='shade']:focus-visible:enabled {
225    background: var(--wui-color-gray-glass-005);
226    box-shadow:
227      inset 0 0 0 1px var(--wui-color-gray-glass-010),
228      0 0 0 4px var(--wui-color-gray-glass-002);
229  }
230
231  /* -- Hover & Active states ----------------------------------------------------------- */
232  @media (hover: hover) {
233    button[data-size='sm']:hover:enabled {
234      border-radius: 28px;
235    }
236
237    button[data-size='md']:hover:enabled {
238      border-radius: 38px;
239    }
240
241    button[data-size='lg']:hover:enabled {
242      border-radius: 48px;
243    }
244
245    button[data-variant='shade']:hover:enabled {
246      background: var(--wui-color-gray-glass-002);
247    }
248
249    button[data-variant='shade']:active:enabled {
250      background: var(--wui-color-gray-glass-005);
251    }
252  }
253
254  button[data-size='sm']:active:enabled {
255    border-radius: 28px;
256  }
257
258  button[data-size='md']:active:enabled {
259    border-radius: 38px;
260  }
261
262  button[data-size='lg']:active:enabled {
263    border-radius: 48px;
264  }
265
266  /* -- Disabled states --------------------------------------------------- */
267  button:disabled {
268    opacity: 0.3;
269  }
270`;var H=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let J={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},K={lg:"md",md:"md",sm:"sm"},V=class extends r.WF{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=`
271    --local-width: ${this.fullWidth?"100%":"auto"};
272     `;let e=this.textVariant??J[this.size];return(0,r.qy)`
273      <button data-variant=${this.variant} data-size=${this.size} ?disabled=${this.disabled}>
274        ${this.loadingTemplate()}
275        <slot name="iconLeft"></slot>
276        <wui-text variant=${e} color="inherit">
277          <slot></slot>
278        </wui-text>
279        <slot name="iconRight"></slot>
280      </button>
281    `}loadingTemplate(){if(this.loading){let e=K[this.size],t="neutral-primary"===this.variant||"accent-primary"===this.variant?"invert":"primary";return(0,r.qy)`<wui-loading-spinner color=${t} size=${e}></wui-loading-spinner>`}return null}};V.styles=[P.W5,P.fD,F],H([(0,o.MZ)()],V.prototype,"size",void 0),H([(0,o.MZ)({type:Boolean})],V.prototype,"disabled",void 0),H([(0,o.MZ)({type:Boolean})],V.prototype,"fullWidth",void 0),H([(0,o.MZ)({type:Boolean})],V.prototype,"loading",void 0),H([(0,o.MZ)()],V.prototype,"variant",void 0),H([(0,o.MZ)()],V.prototype,"textVariant",void 0),V=H([(0,S.E)("wui-button")],V),i(13600),i(73475),i(62982);let Y=(0,W.AH)`
282  :host {
283    display: block;
284    width: 100px;
285    height: 100px;
286  }
287
288  svg {
289    width: 100px;
290    height: 100px;
291  }
292
293  rect {
294    fill: none;
295    stroke: ${e=>e.colors.accent100};
296    stroke-width: 3px;
297    stroke-linecap: round;
298    animation: dash 1s linear infinite;
299  }
300
301  @keyframes dash {
302    to {
303      stroke-dashoffset: 0px;
304    }
305  }
306`;var G=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let Q=class extends r.WF{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return(0,r.qy)`
307      <svg viewBox="0 0 110 110" width="110" height="110">
308        <rect
309          x="2"
310          y="2"
311          width="106"
312          height="106"
313          rx=${e}
314          stroke-dasharray="${116+t} ${245+t}"
315          stroke-dashoffset=${360+1.75*t}
316        />
317      </svg>
318    `}};Q.styles=[P.W5,Y],G([(0,o.MZ)({type:Number})],Q.prototype,"radius",void 0),Q=G([(0,S.E)("wui-loading-thumbnail")],Q),i(38078),i(29307),i(42195);let X=(0,W.AH)`
319  wui-flex {
320    width: 100%;
321    height: 52px;
322    box-sizing: border-box;
323    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
324    border-radius: ${({borderRadius:e})=>e[5]};
325    padding-left: ${({spacing:e})=>e[3]};
326    padding-right: ${({spacing:e})=>e[3]};
327    display: flex;
328    align-items: center;
329    justify-content: space-between;
330    gap: ${({spacing:e})=>e[6]};
331  }
332
333  wui-text {
334    color: ${({tokens:e})=>e.theme.textSecondary};
335  }
336
337  wui-icon {
338    width: 12px;
339    height: 12px;
340  }
341`;var ee=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let et=class extends r.WF{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,r.qy)`
342      <wui-flex justifyContent="space-between" alignItems="center">
343        <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text>
344        <wui-button variant="accent-secondary" size="sm">
345          ${this.buttonLabel}
346          <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon>
347        </wui-button>
347
348      </wui-flex>
349    `}};et.styles=[P.W5,P.fD,X],ee([(0,o.MZ)({type:Boolean})],et.prototype,"disabled",void 0),ee([(0,o.MZ)()],et.prototype,"label",void 0),ee([(0,o.MZ)()],et.prototype,"buttonLabel",void 0),et=ee([(0,S.E)("wui-cta-button")],et);let ei=(0,c.AH)`
350  :host {
351    display: block;
352    padding: 0 ${({spacing:e})=>e["5"]} ${({spacing:e})=>e["5"]};
353  }
354`;var er=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eo=class extends r.WF{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:t,play_store:i,chrome_store:o,homepage:a}=this.wallet,s=n.w.isMobile(),l=n.w.isIos(),d=n.w.isAndroid(),u=[t,i,a,o].filter(Boolean).length>1,h=c.Zv.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!s?(0,r.qy)`
355        <wui-cta-button
356          label=${`Don't have ${h}?`}
357          buttonLabel="Get"
358          @click=${()=>f.I.push("Downloads",{wallet:this.wallet})}
359        ></wui-cta-button>
360      `:!u&&a?(0,r.qy)`
361        <wui-cta-button
362          label=${`Don't have ${h}?`}
363          buttonLabel="Get"
364          @click=${this.onHomePage.bind(this)}
365        ></wui-cta-button>
366      `:t&&l?(0,r.qy)`
367        <wui-cta-button
368          label=${`Don't have ${h}?`}
369          buttonLabel="Get"
370          @click=${this.onAppStore.bind(this)}
371        ></wui-cta-button>
372      `:i&&d?(0,r.qy)`
373        <wui-cta-button
374          label=${`Don't have ${h}?`}
375          buttonLabel="Get"
376          @click=${this.onPlayStore.bind(this)}
377        ></wui-cta-button>
378      `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&n.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&n.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&n.w.openHref(this.wallet.homepage,"_blank")}};eo.styles=[ei],er([(0,o.MZ)({type:Object})],eo.prototype,"wallet",void 0),eo=er([(0,c.EM)("w3m-mobile-download-links")],eo);let en=(0,c.AH)`
379  @keyframes shake {
380    0% {
381      transform: translateX(0);
382    }
383    25% {
384      transform: translateX(3px);
385    }
386    50% {
387      transform: translateX(-3px);
388    }
389    75% {
390      transform: translateX(3px);
391    }
392    100% {
393      transform: translateX(0);
394    }
395  }
396
397  wui-flex:first-child:not(:only-child) {
398    position: relative;
399  }
400
401  wui-wallet-image {
402    width: 56px;
403    height: 56px;
404  }
405
406  wui-loading-thumbnail {
407    position: absolute;
408  }
409
410  wui-icon-box {
411    position: absolute;
412    right: calc(${({spacing:e})=>e["1"]} * -1);
413    bottom: calc(${({spacing:e})=>e["1"]} * -1);
414    opacity: 0;
415    transform: scale(0.5);
416    transition-property: opacity, transform;
417    transition-duration: ${({durations:e})=>e.lg};
418    transition-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
419    will-change: opacity, transform;
420  }
421
422  wui-text[align='center'] {
423    width: 100%;
424    padding: 0px ${({spacing:e})=>e["4"]};
425  }
426
427  [data-error='true'] wui-icon-box {
428    opacity: 1;
429    transform: scale(1);
430  }
431
432  [data-error='true'] > wui-flex:first-child {
433    animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both;
434  }
435
436  [data-retry='false'] wui-link {
437    display: none;
438  }
439
440  [data-retry='true'] wui-link {
441    display: block;
442    opacity: 1;
443  }
444
445  w3m-mobile-download-links {
446    padding: 0px;
447    width: 100%;
448  }
449`;var ea=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};class es extends r.WF{constructor(){super(),this.wallet=f.I.state.data?.wallet,this.connector=f.I.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=y.$.getConnectorImage(this.connector)??y.$.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=p.x.state.wcUri,this.error=p.x.state.wcError,this.ready=!1,this.showRetry=!1,this.label=void 0,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(p.x.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),p.x.subscribeKey("wcError",e=>this.error=e)),(n.w.isTelegram()||n.w.isSafari())&&n.w.isIos()&&p.x.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}
449disconnectedCallback(){this.unsubscribe.forEach(e=>e()),p.x.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,t="";return this.label?t=this.label:(t=`Continue in ${this.name}`,this.error&&(t="Connection declined")),(0,r.qy)`
450      <wui-flex
451        data-error=${(0,d.J)(this.error)}
452        data-retry=${this.showRetry}
453        flexDirection="column"
454        alignItems="center"
455        .padding=${["10","5","5","5"]}
456        gap="6"
457      >
458        <wui-flex gap="2" justifyContent="center" alignItems="center">
459          <wui-wallet-image size="lg" imageSrc=${(0,d.J)(this.imageSrc)}></wui-wallet-image>
460
461          ${this.error?null:this.loaderTemplate()}
462
463          <wui-icon-box
464            color="error"
465            icon="close"
466            size="sm"
467            border
468            borderColor="wui-color-bg-125"
469          ></wui-icon-box>
470        </wui-flex>
471
472        <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex
473          flexDirection="column"
474          alignItems="center"
475          gap="2"
476          .padding=${["2","0","0","0"]}
477        >
478          <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}>
479            ${t}
480          </wui-text>
481          <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text>
482        </wui-flex>
483
484        ${this.secondaryBtnLabel?(0,r.qy)`
485                <wui-button
486                  variant="neutral-secondary"
487                  size="md"
488                  ?disabled=${this.isRetrying||this.isLoading}
489                  @click=${this.onTryAgain.bind(this)}
490                  data-testid="w3m-connecting-widget-secondary-button"
491                >
492                  <wui-icon
493                    color="inherit"
494                    slot="iconLeft"
495                    name=${this.secondaryBtnIcon}
496                  ></wui-icon>
497                  ${this.secondaryBtnLabel}
498                </wui-button>
499              `:null}
500      </wui-flex>
501
502      ${this.isWalletConnect?(0,r.qy)`
503              <wui-flex .padding=${["0","5","5","5"]} justifyContent="center">
504                <wui-link
505                  @click=${this.onCopyUri}
506                  variant="secondary"
507                  icon="copy"
508                  data-testid="wui-link-copy"
509                >
510                  Copy link
511                </wui-link>
512              </wui-flex>
513            `:null}
514
515      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex>
516      </wui-flex>
517    `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){p.x.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=Z.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,r.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(n.w.copyToClopboard(this.uri),I.P.showSuccess("Link copied"))}catch{I.P.showError("Failed to copy")}}}es.styles=en,ea([(0,o.wk)()],es.prototype,"isRetrying",void 0),ea([(0,o.wk)()],es.prototype,"uri",void 0),ea([(0,o.wk)()],es.prototype,"error",void 0),ea([(0,o.wk)()],es.prototype,"ready",void 0),ea([(0,o.wk)()],es.prototype,"showRetry",void 0),ea([(0,o.wk)()],es.prototype,"label",void 0),ea([(0,o.wk)()],es.prototype,"secondaryBtnLabel",void 0),ea([(0,o.wk)()],es.prototype,"secondaryLabel",void 0),ea([(0,o.wk)()],es.prototype,"isLoading",void 0),ea([(0,o.MZ)({type:Boolean})],es.prototype,"isMobile",void 0),ea([(0,o.MZ)()],es.prototype,"onRetry",void 0);let el=class extends es{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",dis
517playIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.I.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=h.a.state,t=e.find(e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name);if(t)await p.x.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");T.W.close(),g.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown",view:f.I.state.view,walletRank:this.wallet?.order}})}catch(e){e instanceof A.A&&e.originalName===E.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};el=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-connecting-wc-browser")],el);let ec=class extends es{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.I.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:t}=this.wallet,{redirect:i,href:r}=n.w.formatNativeUrl(e,this.uri);p.x.setWcLinking({name:t,href:r}),p.x.setRecentWallet(this.wallet),n.w.openHref(i,"_blank")}catch{this.error=!0}}};ec=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-connecting-wc-desktop")],ec);var ed=i(67061),eu=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eh=class extends es{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=a.H.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,link_mode:t,name:i}=this.wallet,{redirect:r,redirectUniversalLink:o,href:a}=n.w.formatNativeUrl(e,this.uri,t);this.redirectDeeplink=r,this.redirectUniversalLink=o,this.target=n.w.isIframe()?"_top":"_self",p.x.setWcLinking({name:i,href:a}),p.x.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?n.w.openHref(this.redirectUniversalLink,this.target):n.w.openHref(this.redirectDeeplink,this.target)}catch(e){g.E.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=ed.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(p.x.subscribeKey("wcUri",()=>{this.onHandleURI()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){p.x.setWcError(!1),this.onConnect?.()}};eu([(0,o.wk)()],eh.prototype,"redirectDeeplink",void 0),eu([(0,o.wk)()],eh.prototype,"redirectUniversalLink",void 0),eu([(0,o.wk)()],eh.prototype,"target",void 0),eu([(0,o.wk)()],eh.prototype,"preferUniversalLinks",void 0),eu([(0,o.wk)()],eh.prototype,"isLoading",void 0),eh=eu([(0,c.EM)("w3m-connecting-wc-mobile")],eh),i(13265);var ep=i(11239);function eg(e,t,i){return e!==t&&(e-t<0?t-e:e-t)<=i+.1}let ef={generate({uri:e,size:t,logoSize:i,padding:o=8,dotColor:n="var(--apkt-colors-black)"}){let a=[],s=function(e,t){let i=Array.prototype.slice.call(ep.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),r=Math.sqrt(i.length);return i.reduce((e,t,i)=>(i%r==0?e.push([t]):e[e.length-1].push(t))&&e,[])}(e,0),l=(t-2*o)/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];
517c.forEach(({x:e,y:t})=>{let i=(s.length-7)*l*e+o,d=(s.length-7)*l*t+o;for(let e=0;e<c.length;e+=1){let t=l*(7-2*e);a.push((0,r.JW)`
518            <rect
519              fill=${2===e?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
520              width=${0===e?t-10:t}
521              rx= ${0===e?(t-10)*.45:.45*t}
522              ry= ${0===e?(t-10)*.45:.45*t}
523              stroke=${n}
524              stroke-width=${10*(0===e)}
525              height=${0===e?t-10:t}
526              x= ${0===e?d+l*e+5:d+l*e}
527              y= ${0===e?i+l*e+5:i+l*e}
528            />
529          `)}});let d=Math.floor((i+25)/l),u=s.length/2-d/2,h=s.length/2+d/2-1,p=[];s.forEach((e,t)=>{e.forEach((e,i)=>{!s[t][i]||t<7&&i<7||t>s.length-8&&i<7||t<7&&i>s.length-8||t>u&&t<h&&i>u&&i<h||p.push([t*l+l/2+o,i*l+l/2+o])})});let g={};return p.forEach(([e,t])=>{g[e]?g[e]?.push(t):g[e]=[t]}),Object.entries(g).map(([e,t])=>{let i=t.filter(e=>t.every(t=>!eg(e,t,l)));return[Number(e),i]}).forEach(([e,t])=>{t.forEach(t=>{a.push((0,r.JW)`<circle cx=${e} cy=${t} fill=${n} r=${l/2.5} />`)})}),Object.entries(g).filter(([e,t])=>t.length>1).map(([e,t])=>{let i=t.filter(e=>t.some(t=>eg(e,t,l)));return[Number(e),i]}).map(([e,t])=>{t.sort((e,t)=>e<t?-1:1);let i=[];for(let e of t){let t=i.find(t=>t.some(t=>eg(e,t,l)));t?t.push(e):i.push([e])}return[e,i.map(e=>[e[0],e[e.length-1]])]}).forEach(([e,t])=>{t.forEach(([t,i])=>{a.push((0,r.JW)`
530              <line
531                x1=${e}
532                x2=${e}
533                y1=${t}
534                y2=${i}
535                stroke=${n}
536                stroke-width=${l/1.25}
537                stroke-linecap="round"
538              />
539            `)})}),a}},ew=(0,W.AH)`
540  :host {
541    position: relative;
542    user-select: none;
543    display: block;
544    overflow: hidden;
545    aspect-ratio: 1 / 1;
546    width: 100%;
547    height: 100%;
548    background-color: ${({colors:e})=>e.white};
549    border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
550  }
551
552  :host {
553    border-radius: ${({borderRadius:e})=>e[4]};
554    display: flex;
555    align-items: center;
556    justify-content: center;
557  }
558
559  :host([data-clear='true']) > wui-icon {
560    display: none;
561  }
562
563  svg:first-child,
564  wui-image,
565  wui-icon {
566    position: absolute;
567    top: 50%;
568    left: 50%;
569    transform: translateY(-50%) translateX(-50%);
570    background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
571    box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary};
572    border-radius: ${({borderRadius:e})=>e[6]};
573  }
574
575  wui-image {
576    width: 25%;
577    height: 25%;
578    border-radius: ${({borderRadius:e})=>e[2]};
579  }
580
581  wui-icon {
582    width: 100%;
583    height: 100%;
584    color: #3396ff !important;
585    transform: translateY(-50%) translateX(-50%) scale(0.25);
586  }
587
588  wui-icon > svg {
589    width: inherit;
590    height: inherit;
591  }
592`;var em=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eb=class extends r.WF{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,(0,r.qy)`<wui-flex
593      alignItems="center"
594      justifyContent="center"
595      class="wui-qr-code"
596      direction="column"
597      gap="4"
598      width="100%"
599      style="height: 100%"
600    >
601      ${this.templateVisual()} ${this.templateSvg()}
602    </wui-flex>`}templateSvg(){return(0,r.JW)`
603      <svg height=${this.size} width=${this.size}>
604        ${ef.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})}
605      </svg>
606    `}templateVisual(){return this.imageSrc?(0,r.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?(0,r.qy)`<wui-icon
607        class="farcaster"
608        size="inherit"
609        color="inherit"
610        name="farcaster"
611      ></wui-icon>`:(0,r.qy)`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};eb.styles=[P.W5,ew],em([(0,o.MZ)()],eb.prototype,"uri",void 0),em([(0,o.MZ)({type:Number})],eb.prototype,"size",void 0),em([(0,o.MZ)()],eb.prototype,"theme",void 0),em([(0,o.MZ)()],eb.prototype,"imageSrc",void 0),em([(0,o.MZ)()],eb.prototype,"alt",void 0),em([(0,o.MZ)({type:Boolean})],eb.prototype,"arenaClear",void 0),em([(0,o.MZ)({type:Boolean})],eb.prototype,"farcaster",void 0),eb=em([(0,S.E)("wui-qr-code")],eb);let ey=(0,W.AH)`
612  :host {
613    display: block;
614    background: linear-gradient(
615      90deg,
616      ${({tokens:e})=>e.theme.foregroundSecondary} 0%,
617      ${({tokens:e})=>e.theme.foregroundTertiary} 50%,
618      ${({tokens:e})=>e.theme.foregroundSecondary} 100%
619    );
620    background-size: 200% 100%;
621    animation: shimmer 1s ease-in-out infinite;
622    border-radius: ${({borderRadius:e})=>e[2]};
623  }
624
625  :host([data-rounded='true']) {
626    border-radius: ${({borderRadius:e})=>e[16]};
627  }
628
629  @keyframes shimmer {
630    0% {
631      background-position: 200% 0;
632    }
633    100% {
634      background-position: -200% 0;
635    }
636  }
637`;var ev=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let ex=class extends r.WF{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=`
638      width: ${this.width};
639      height: ${this.height};
640    `,this.dataset.rounded=this.rounded?"true":"false",(0,r.qy)`<slot></slot>`}};ex.styles=[ey],ev([(0,o.MZ)()],ex.prototype,"width",void 0),ev([(0,o.MZ)()],ex.prototype,"height",void 0),ev([(0,o.MZ)()],ex.prototype,"variant",void 0),ev([(0,o.MZ)({type:Boolean})],ex.prototype,"rounded",void 0),ex=ev([(0,S.E)("wui-shimmer")],ex),i(60679);let e$=(0,c.AH)`
641  wui-shimmer {
642    width: 100%;
643    aspect-ratio: 1 / 1;
644    border-radius: ${({borderRadius:e})=>e[4]};
645  }
646
647  wui-qr-code {
648    opacity: 0;
649    animation-duration: ${({durations:e})=>e.xl};
650    animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
651    animation-name: fade-in;
652    animation-fill-mode: forwards;
653  }
654
655  @keyframes fade-in {
656    from {
657      opacity: 0;
658    }
659    to {
660      opacity: 1;
661    }
662  }
663`;var ek=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eC=class extends es{constructor(){super(),this.basic=!1,this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate)}firstUpdated(){this.basic||g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",dis
663playIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),(0,r.qy)`
664      <wui-flex
665        flexDirection="column"
666        alignItems="center"
667        .padding=${["0","5","5","5"]}
668        gap="5"
669      >
670        <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
671        <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text>
672        ${this.copyTemplate()}
673      </wui-flex>
674      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
675    `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;p.x.setWcLinking(void 0),p.x.setRecentWallet(this.wallet);let i=this.uri;if(this.wallet?.mobile_link){let{redirect:e}=n.w.formatNativeUrl(this.wallet?.mobile_link,this.uri,null);i=e}return(0,r.qy)` <wui-qr-code
676      size=${e}
677      theme=${Z.W.state.themeMode}
678      uri=${i}
679      imageSrc=${(0,d.J)(y.$.getWalletImage(this.wallet))}
680      color=${(0,d.J)(Z.W.state.themeVariables["--w3m-qr-color"])}
681      alt=${(0,d.J)(t)}
682      data-testid="wui-qr-code"
683    ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,r.qy)`<wui-button
684      .disabled=${e}
685      @click=${this.onCopyUri}
686      variant="neutral-secondary"
687      size="sm"
688      data-testid="copy-wc2-uri"
689    >
690      Copy link
691      <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon>
692    </wui-button>`}};eC.styles=e$,ek([(0,o.MZ)({type:Boolean})],eC.prototype,"basic",void 0),eC=ek([(0,c.EM)("w3m-connecting-wc-qrcode")],eC);let eE=class extends r.WF{constructor(){if(super(),this.wallet=f.I.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.I.state.view}})}render(){return(0,r.qy)`
693      <wui-flex
694        flexDirection="column"
695        alignItems="center"
696        .padding=${["10","5","5","5"]}
697        gap="5"
698      >
699        <wui-wallet-image
700          size="lg"
701          imageSrc=${(0,d.J)(y.$.getWalletImage(this.wallet))}
702        ></wui-wallet-image>
703
704        <wui-text variant="md-regular" color="primary">Not Detected</wui-text>
705      </wui-flex>
706
707      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
708    `}};eE=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-connecting-wc-unsupported")],eE);var eR=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eI=class extends es{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=ed.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(p.x.subscribeKey("wcUri",()=>{this.updateLoadingState()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.I.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:i,href:r}=n.w.formatUniversalUrl(e,this.uri);p.x.setWcLinking({name:t,href:r}),p.x.setRecentWallet(this.wallet),n.w.openHref(i,"_blank")}catch{this.error=!0}}};eR([(0,o.wk)()],eI.prototype,"isLoading",void 0),eI=eR([(0,c.EM)("w3m-connecting-wc-web")],eI);let eT=(0,c.AH)`
709  :host([data-mobile-fullscreen='true']) {
710    height: 100%;
711    display: flex;
712    flex-direction: column;
713  }
714
715  :host([data-mobile-fullscreen='true']) wui-ux-by-reown {
716    margin-top: auto;
717  }
718`;var eA=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eM=class extends r.WF{constructor(){super(),this.wallet=f.I.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!a.H.state.siwx,this.remoteFeatures=a.H.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(a.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
718disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return a.H.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,r.qy)`
719      ${this.headerTemplate()}
720      <div class="platform-container">${this.platformTemplate()}</div>
721      ${this.reownBrandingTemplate()}
722    `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?(0,r.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!a.H.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:i}=p.x.state,{redirectView:r}=f.I.state.data??{};if(e||a.H.state.enableEmbedded||n.w.isPairingExpired(t)||"connecting"===i){let e=p.x.getConnections(R.W.state.activeChain),t=this.remoteFeatures?.multiWallet,i=e.length>0;await p.x.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(i&&t?(f.I.replace("ProfileWallets"),I.P.showSuccess("New Wallet Added")):r?f.I.replace(r):T.W.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!a.H.state.enableNetworkSwitch&&R.W.state.activeChain){R.W.setActiveCaipNetwork(M.R.getUnsupportedNetwork(`${R.W.state.activeChain}:${R.W.state.activeCaipNetwork?.id}`)),R.W.showUnsupportedChainUI();return}e instanceof A.A&&e.originalName===E.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),p.x.setWcError(!0),I.P.showError(e.message??"Connection error"),p.x.resetWcConnection(),f.I.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:i,injected:r,rdns:o}=this.wallet,s=r?.map(({injected_id:e})=>
722e).filter(Boolean),l=[...o?[o]:s??[]],c=!a.H.state.isUniversalProvider&&l.length,d=p.x.checkInstalled(l),u=c&&d,h=t&&!n.w.isMobile();u&&!R.W.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(n.w.isMobile()?"mobile":"qrcode"),i&&this.platforms.push("web"),h&&this.platforms.push("desktop"),u||!c||R.W.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,r.qy)`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return(0,r.qy)`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return(0,r.qy)`
723          <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
724          </w3m-connecting-wc-desktop>
725        `;case"mobile":return(0,r.qy)`
726          <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
727          </w3m-connecting-wc-mobile>
728        `;case"qrcode":return(0,r.qy)`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return(0,r.qy)`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?(0,r.qy)`
729      <w3m-connecting-header
730        .platforms=${this.platforms}
731        .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
732      >
733      </w3m-connecting-header>
734    `:null}async onSelectPlatform(e){let t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};eM.styles=eT,eA([(0,o.wk)()],eM.prototype,"platform",void 0),eA([(0,o.wk)()],eM.prototype,"platforms",void 0),eA([(0,o.wk)()],eM.prototype,"isSiwxEnabled",void 0),eA([(0,o.wk)()],eM.prototype,"remoteFeatures",void 0),eA([(0,o.MZ)({type:Boolean})],eM.prototype,"displayBranding",void 0),eA([(0,o.MZ)({type:Boolean})],eM.prototype,"basic",void 0),eM=eA([(0,c.EM)("w3m-connecting-wc-view")],eM);var eP=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eS=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.isMobile=n.w.isMobile(),this.remoteFeatures=a.H.state.remoteFeatures,this.unsubscribe.push(a.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=s.N.state,{customWallets:i}=a.H.state,o=l.i.getRecentWallets(),n=e.length||t.length||i?.length||o.length;return(0,r.qy)`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}>
735        ${n?(0,r.qy)`<w3m-connector-list></w3m-connector-list>`:null}
736        <w3m-all-wallets-widget></w3m-all-wallets-widget>
737      </wui-flex>`}return(0,r.qy)`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}>
738        <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view>
739        <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}>
740          <w3m-all-wallets-widget></w3m-all-wallets-widget>
741        </wui-flex>
742      </wui-flex>
743      ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?(0,r.qy)` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}>
744      <wui-ux-by-reown></wui-ux-by-reown>
745    </wui-flex>`:null}};eP([(0,o.wk)()],eS.prototype,"isMobile",void 0),eP([(0,o.wk)()],eS.prototype,"remoteFeatures",void 0),eS=eP([(0,c.EM)("w3m-connecting-wc-basic-view")],eS);var eW=i(35507);let{I:eN}=eW.ge;var eL=i(1951);let eB=(e,t)=>{let i=e._$AN;if(void 0===i)return!1;for(let e of i)e._$AO?.(t,!1),eB(e,t);return!0},eO=e=>{let t,i;do{if(void 0===(t=e._$AM))break;(i=t._$AN).delete(e),e=t}while(0===i?.size)},ej=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),eD(t)}};function ez(e){void 0!==this._$AN?(eO(this),this._$AM=e,ej(this)):this._$AM=e}
745function eq(e,t=!1,i=0){let r=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(r))for(let e=i;e<r.length;e++)eB(r[e],!1),eO(r[e]);else null!=r&&(eB(r,!1),eO(r));else eB(this,e)}let eD=e=>{e.type==eL.OA.CHILD&&(e._$AP??=eq,e._$AQ??=ez)};class e_ extends eL.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),ej(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(eB(this,e),eO(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let eU=()=>new eZ;class eZ{}let eF=new WeakMap,eH=(0,eL.u$)(class extends e_{render(e){return eW.s6}update(e,[t]){let i=t!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),eW.s6}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,i=eF.get(t);void 0===i&&(i=new WeakMap,eF.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?eF.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),eJ=(0,W.AH)`
746  :host {
747    display: flex;
748    align-items: center;
749    justify-content: center;
750  }
751
752  label {
753    position: relative;
754    display: inline-block;
755    user-select: none;
756    transition:
757      background-color ${({durations:e})=>e.lg}
758        ${({easings:e})=>e["ease-out-power-2"]},
759      color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
760      border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
761      box-shadow ${({durations:e})=>e.lg}
762        ${({easings:e})=>e["ease-out-power-2"]},
763      width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
764      height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
765      transform ${({durations:e})=>e.lg}
766        ${({easings:e})=>e["ease-out-power-2"]},
767      opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]};
768    will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
769  }
770
771  input {
772    width: 0;
773    height: 0;
774    opacity: 0;
775  }
776
777  span {
778    position: absolute;
779    cursor: pointer;
780    top: 0;
781    left: 0;
782    right: 0;
783    bottom: 0;
784    background-color: ${({colors:e})=>e.neutrals300};
785    border-radius: ${({borderRadius:e})=>e.round};
786    border: 1px solid transparent;
787    will-change: border;
788    transition:
789      background-color ${({durations:e})=>e.lg}
790        ${({easings:e})=>e["ease-out-power-2"]},
791      color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
792      border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
793      box-shadow ${({durations:e})=>e.lg}
794        ${({easings:e})=>e["ease-out-power-2"]},
795      width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
796      height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
797      transform ${({durations:e})=>e.lg}
798        ${({easings:e})=>e["ease-out-power-2"]},
799      opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]};
800    will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
801  }
802
803  span:before {
804    content: '';
805    position: absolute;
806    background-color: ${({colors:e})=>e.white};
807    border-radius: 50%;
808  }
809
810  /* -- Sizes --------------------------------------------------------- */
811  label[data-size='lg'] {
812    width: 48px;
813    height: 32px;
814  }
815
816  label[data-size='md'] {
817    width: 40px;
818    height: 28px;
819  }
820
821  label[data-size='sm'] {
822    width: 32px;
823    height: 22px;
824  }
825
826  label[data-size='lg'] > span:before {
827    height: 24px;
828    width: 24px;
829    left: 4px;
830    top: 3px;
831  }
832
833  label[data-size='md'] > span:before {
834    height: 20px;
835    width: 20px;
836    left: 4px;
837    top: 3px;
838  }
839
840  label[data-size='sm'] > span:before {
841    height: 16px;
842    width: 16px;
843    left: 3px;
844    top: 2px;
845  }
846
847  /* -- Focus states --------------------------------------------------- */
848  input:focus-visible:not(:checked) + span,
849  input:focus:not(:checked) + span {
850    border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary};
851    background-color: ${({tokens:e})=>e.theme.textTertiary};
852    box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
853  }
854
855  input:focus-visible:checked + span,
856  input:focus:checked + span {
857    border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary};
858    box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
859  }
860
861  /* -- Checked states --------------------------------------------------- */
862  input:checked + span {
863    background-color: ${({tokens:e})=>e.core.iconAccentPrimary};
864  }
865
866  label[data-size='lg'] > input:checked + span:before {
867    transform: translateX(calc(100% - 9px));
868  }
869
870  label[data-size='md'] > input:checked + span:before {
871    transform: translateX(calc(100% - 9px));
872  }
873
874  label[data-size='sm'] > input:checked + span:before {
875    transform: translateX(calc(100% - 7px));
876  }
877
878  /* -- Hover states ------------------------------------------------------- */
879  label:hover > input:not(:checked):not(:disabled) + span {
880    background-color: ${({colors:e})=>e.neutrals400};
881  }
882
883  label:hover > input:checked:not(:disabled) + span {
884    background-color: ${({colors:e})=>e.accent080};
885  }
886
887  /* -- Disabled state --------------------------------------------------- */
888  label:has(input:disabled) {
889    pointer-events: none;
890    user-select: none;
891  }
892
893  input:not(:checked):disabled + span {
894    background-color: ${({colors:e})=>e.neutrals700};
895  }
896
897  input:checked:disabled + span {
898    background-color: ${({colors:e})=>e.neutrals700};
899  }
900
901  input:not(:checked):disabled + span::before {
902    background-color: ${({colors:e})=>e.neutrals400};
903  }
904
905  input:checked:disabled + span::before {
906    background-color: ${({tokens:e})=>e.theme.textTertiary};
907  }
908`;var eK=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eV=class extends r.WF{constructor(){super(...arguments),this.inputElementRef=eU(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return(0,r.qy)`
909      <label data-size=${this.size}>
910        <input
911          ${eH(this.inputElementRef)}
912          type="checkbox"
913          ?checked=${this.checked}
914          ?disabled=${this.disabled}
915          @change=${this.dispatchChangeEvent.bind(this)}
916        />
917        <span></span>
918      </label>
919    `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};eV.styles=[P.W5,P.fD,eJ],eK([(0,o.MZ)({type:Boolean})],eV.prototype,"checked",void 0),eK([(0,o.MZ)({type:Boolean})],eV.prototype,"disabled",void 0),eK([(0,o.MZ)()],eV.prototype,"size",void 0),eV=eK([(0,S.E)("wui-toggle")],eV);let eY=(0,W.AH)`
920  :host {
921    height: auto;
922  }
923
924  :host > wui-flex {
925    height: 100%;
926    display: flex;
927    align-items: center;
928    justify-content: center;
929    column-gap: ${({spacing:e})=>e["2"]};
930    padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]};
931    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
932    border-radius: ${({borderRadius:e})=>e["4"]};
933    box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary};
934    transition: background-color ${({durations:e})=>e.lg}
935      ${({easings:e})=>e["ease-out-power-2"]};
936    will-change: background-color;
937    cursor: pointer;
938  }
939
940  wui-switch {
941    pointer-events: none;
942  }
943`;var eG=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eQ=class extends r.WF{constructor(){super(...arguments),this.checked=!1}render(){return(0,r.qy)`
944      <wui-flex>
945        <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
946        <wui-toggle
947          ?checked=${this.checked}
948          size="sm"
949          @switchChange=${this.handleToggleChange.bind(this)}
950        ></wui-toggle>
951      </wui-flex>
952    `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};eQ.styles=[P.W5,P.fD,eY],eG([(0,o.MZ)({type:Boolean})],eQ.prototype,"checked",void 0),eQ=eG([(0,S.E)("wui-certified-switch")],eQ);let eX=(0,W.AH)`
953  :host {
954    position: relative;
955    width: 100%;
956    display: inline-flex;
957    flex-direction: column;
958    gap: ${({spacing:e})=>e[3]};
959    color: ${({tokens:e})=>e.theme.textPrimary};
960    caret-color: ${({tokens:e})=>e.core.textAccentPrimary};
961  }
962
963  .wui-input-text-container {
964    position: relative;
965    display: flex;
966  }
967
968  input {
969    width: 100%;
970    border-radius: ${({borderRadius:e})=>e[4]};
971    color: inherit;
972    background: transparent;
973    border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
974    caret-color: ${({tokens:e})=>e.core.textAccentPrimary};
975    padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]}
976      ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]};
977    font-size: ${({textSize:e})=>e.large};
978    line-height: ${({typography:e})=>e["lg-regular"].lineHeight};
979    letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing};
980    font-weight: ${({fontWeight:e})=>e.regular};
981    font-family: ${({fontFamily:e})=>e.regular};
982  }
983
984  input[data-size='lg'] {
985    padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]}
986      ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]};
987  }
988
989  @media (hover: hover) and (pointer: fine) {
990    input:hover:enabled {
991      border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
992    }
993  }
994
995  input:disabled {
996    cursor: unset;
997    border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
998  }
999
1000  input::placeholder {
1001    color: ${({tokens:e})=>e.theme.textSecondary};
1002  }
1003
1004  input:focus:enabled {
1005    border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
1006    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
1007    -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
1008    -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
1009    box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
1010  }
1011
1012  div.wui-input-text-container:has(input:disabled) {
1013    opacity: 0.5;
1014  }
1015
1016  wui-icon.wui-input-text-left-icon {
1017    position: absolute;
1018    top: 50%;
1019    transform: translateY(-50%);
1020    pointer-events: none;
1021    left: ${({spacing:e})=>e[4]};
1022    color: ${({tokens:e})=>e.theme.iconDefault};
1023  }
1024
1025  button.wui-input-text-submit-button {
1026    position: absolute;
1027    top: 50%;
1028    transform: translateY(-50%);
1029    right: ${({spacing:e})=>e[3]};
1030    width: 24px;
1031    height: 24px;
1032    border: none;
1033    background: transparent;
1034    border-radius: ${({borderRadius:e})=>e[2]};
1035    color: ${({tokens:e})=>e.core.textAccentPrimary};
1036  }
1037
1038  button.wui-input-text-submit-button:disabled {
1039    opacity: 1;
1040  }
1041
1042  button.wui-input-text-submit-button.loading wui-icon {
1043    animation: spin 1s linear infinite;
1044  }
1045
1046  button.wui-input-text-submit-button:hover {
1047    background: ${({tokens:e})=>e.core.foregroundAccent010};
1048  }
1049
1050  input:has(+ .wui-input-text-submit-button) {
1051    padding-right: ${({spacing:e})=>e[12]};
1052  }
1053
1054  input[type='number'] {
1055    -moz-appearance: textfield;
1056  }
1057
1058  input[type='search']::-webkit-search-decoration,
1059  input[type='search']::-webkit-search-cancel-button,
1060  input[type='search']::-webkit-search-results-button,
1061  input[type='search']::-webkit-search-results-decoration {
1062    -webkit-appearance: none;
1063  }
1064
1065  /* -- Keyframes --------------------------------------------------- */
1066  @keyframes spin {
1067    from {
1068      transform: rotate(0deg);
1069    }
1070    to {
1071      transform: rotate(360deg);
1072    }
1073  }
1074`;var e0=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let e1=class extends r.WF{constructor(){super(...arguments),this.inputElementRef=eU(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return(0,r.qy)` <div class="wui-input-text-container">
1075        ${this.templateLeftIcon()}
1076        <input
1077          data-size=${this.size}
1078          ${eH(this.inputElementRef)}
1079          data-testid="wui-input-text"
1080          type=${this.type}
1081          enterkeyhint=${(0,d.J)(this.enterKeyHint)}
1082          ?disabled=${this.disabled}
1083          placeholder=${this.placeholder}
1084          @input=${this.dispatchInputChangeEvent.bind(this)}
1085          @keydown=${this.onKeyDown}
1086          .value=${this.value||""}
1087        />
1088        ${this.templateSubmitButton()}
1089        <slot class="wui-input-text-slot"></slot>
1090      </div>
1091      ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?(0,r.qy)`<wui-icon
1092        class="wui-input-text-left-icon"
1093        size="md"
1094        data-size=${this.size}
1095        color="inherit"
1096        name=${this.icon}
1097      ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?(0,r.qy)`<button
1098        class="wui-input-text-submit-button ${this.loading?"loading":""}"
1099        @click=${this.onSubmit?.bind(this)}
1100        ?disabled=${this.disabled||this.loading}
1101      >
1102        ${this.loading?(0,r.qy)`<wui-icon name="spinner" size="md"></wui-icon>`:(0,r.qy)`<wui-icon name="chevronRight" size="md"></wui-icon>`}
1103      </button>`:null}templateError(){return this.errorText?(0,r.qy)`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?(0,r.qy)`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};e1.styles=[P.W5,P.fD,eX],e0([(0,o.MZ)()],e1.prototype,"icon",void 0),e0([(0,o.MZ)({type:Boolean})],e1.prototype,"disabled",void 0),e0([(0,o.MZ)({type:Boolean})],e1.prototype,"loading",void 0),e0([(0,o.MZ)()],e1.prototype,"placeholder",void 0),e0([(0,o.MZ)()],e1.prototype,"type",void 0),e0([(0,o.MZ)()],e1.prototype,"value",void 0),e0([(0,o.MZ)()],e1.prototype,"errorText",void 0),e0([(0,o.MZ)()],e1.prototype,"warningText",void 0),e0([(0,o.MZ)()],e1.prototype,"onSubmit",void 0),e0([(0,o.MZ)()],e1.prototype,"size",void 0),e0([(0,o.MZ)({attribute:!1})],e1.prototype,"onKeyDown",void 0),e1=e0([(0,S.E)("wui-input-text")],e1);let e3=(0,W.AH)`
1104  :host {
1105    position: relative;
1106    display: inline-block;
1107    width: 100%;
1108  }
1109
1110  wui-icon {
1111    position: absolute;
1112    top: 50%;
1113    transform: translateY(-50%);
1114    right: ${({spacing:e})=>e[3]};
1115    color: ${({tokens:e})=>e.theme.iconDefault};
1116    cursor: pointer;
1117    padding: ${({spacing:e})=>e[2]};
1118    background-color: transparent;
1119    border-radius: ${({borderRadius:e})=>e[4]};
1120    transition: background-color ${({durations:e})=>e.lg}
1121      ${({easings:e})=>e["ease-out-power-2"]};
1122  }
1123
1124  @media (hover: hover) {
1125    wui-icon:hover {
1126      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
1127    }
1128  }
1129`;var e2=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let e5=class extends r.WF{constructor(){super(...arguments),this.inputComponentRef=eU(),this.inputValue=""}render(){return(0,r.qy)`
1130      <wui-input-text
1131        ${eH(this.inputComponentRef)}
1132        placeholder="Search wallet"
1133        icon="search"
1134        type="search"
1135        enterKeyHint="search"
1136        size="sm"
1137        @inputChange=${this.onInputChange}
1138      >
1139        ${this.inputValue?(0,r.qy)`<wui-icon
1140              @click=${this.clearValue}
1141              color="inherit"
1142              size="sm"
1143              name="close"
1144            ></wui-icon>`:null}
1145      </wui-input-text>
1146    `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){let e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",this.inputValue="",t.focus(),t.dispatchEvent(new Event("input")))}};e5.styles=[P.W5,e3],e2([(0,o.MZ)()],e5.prototype,"inputValue",void 0),e5=e2([(0,S.E)("wui-search-bar")],e5);let e4=(0,r.JW)`<svg  viewBox="0 0 48 54" fill="none">
1147  <path
1148    d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
1149  />
1150</svg>`,e6=(0,W.AH)`
1151  :host {
1152    display: flex;
1153    flex-direction: column;
1154    justify-content: center;
1155    align-items: center;
1156    height: 104px;
1157    width: 104px;
1158    row-gap: ${({spacing:e})=>e[2]};
1159    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
1160    border-radius: ${({borderRadius:e})=>e[5]};
1161    position: relative;
1162  }
1163
1164  wui-shimmer[data-type='network'] {
1165    border: none;
1166    -webkit-clip-path: var(--apkt-path-network);
1167    clip-path: var(--apkt-path-network);
1168  }
1169
1170  svg {
1171    position: absolute;
1172    width: 48px;
1173    height: 54px;
1174    z-index: 1;
1175  }
1176
1177  svg > path {
1178    stroke: ${({tokens:e})=>e.theme.foregroundSecondary};
1179    stroke-width: 1px;
1180  }
1181
1182  @media (max-width: 350px) {
1183    :host {
1184      width: 100%;
1185    }
1186  }
1187`;var e8=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let e7=class extends r.WF{constructor(){super(...arguments),this.type="wallet"}render(){return(0,r.qy)`
1188      ${this.shimmerTemplate()}
1189      <wui-shimmer width="80px" height="20px"></wui-shimmer>
1190    `}shimmerTemplate(){return"network"===this.type?(0,r.qy)` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer>
1191        ${e4}`:(0,r.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};e7.styles=[P.W5,P.fD,e6],e8([(0,o.MZ)()],e7.prototype,"type",void 0),e7=e8([(0,S.E)("wui-card-select-loader")],e7);var e9=i(13532);let te=(0,r.AH)`
1192  :host {
1193    display: grid;
1194    width: inherit;
1195    height: inherit;
1196  }
1197`;var tt=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let ti=class extends r.WF{render(){return this.style.cssText=`
1198      grid-template-rows: ${this.gridTemplateRows};
1199      grid-template-columns: ${this.gridTemplateColumns};
1200      justify-items: ${this.justifyItems};
1201      align-items: ${this.alignItems};
1202      justify-content: ${this.justifyContent};
1203      align-content: ${this.alignContent};
1204      column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`};
1205      row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`};
1206      gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`};
1207      padding-top: ${this.padding&&e9.Z.getSpacingStyles(this.padding,0)};
1208      padding-right: ${this.padding&&e9.Z.getSpacingStyles(this.padding,1)};
1209      padding-bottom: ${this.padding&&e9.Z.getSpacingStyles(this.padding,2)};
1210      padding-left: ${this.padding&&e9.Z.getSpacingStyles(this.padding,3)};
1211      margin-top: ${this.margin&&e9.Z.getSpacingStyles(this.margin,0)};
1212      margin-right: ${this.margin&&e9.Z.getSpacingStyles(this.margin,1)};
1213      margin-bottom: ${this.margin&&e9.Z.getSpacingStyles(this.margin,2)};
1214      margin-left: ${this.margin&&e9.Z.getSpacingStyles(this.margin,3)};
1215    `,(0,r.qy)`<slot></slot>`}};ti.styles=[P.W5,te],tt([(0,o.MZ)()],ti.prototype,"gridTemplateRows",void 0),tt([(0,o.MZ)()],ti.prototype,"gridTemplateColumns",void 0),tt([(0,o.MZ)()],ti.prototype,"justifyItems",void 0),tt([(0,o.MZ)()],ti.prototype,"alignItems",void 0),tt([(0,o.MZ)()],ti.prototype,"justifyContent",void 0),tt([(0,o.MZ)()],ti.prototype,"alignContent",void 0),tt([(0,o.MZ)()],ti.prototype,"columnGap",void 0),tt([(0,o.MZ)()],ti.prototype,"rowGap",void 0),tt([(0,o.MZ)()],ti.prototype,"gap",void 0),tt([(0,o.MZ)()],ti.prototype,"padding",void 0),tt([(0,o.MZ)()],ti.prototype,"margin",void 0),ti=tt([(0,S.E)("wui-grid")],ti);var tr=i(44681);let to=(0,c.AH)`
1216  button {
1217    display: flex;
1218    flex-direction: column;
1219    justify-content: center;
1220    align-items: center;
1221    cursor: pointer;
1222    width: 104px;
1223    row-gap: ${({spacing:e})=>e["2"]};
1224    padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["0"]};
1225    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
1226    border-radius: clamp(0px, ${({borderRadius:e})=>e["4"]}, 20px);
1227    transition:
1228      color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]},
1229      background-color ${({durations:e})=>e.lg}
1230        ${({easings:e})=>e["ease-out-power-1"]},
1231      border-radius ${({durations:e})=>e.lg}
1232        ${({easings:e})=>e["ease-out-power-1"]};
1233    will-change: background-color, color, border-radius;
1234    outline: none;
1235    border: none;
1236  }
1237
1238  button > wui-flex > wui-text {
1239    color: ${({tokens:e})=>e.theme.textPrimary};
1240    max-width: 86px;
1241    white-space: nowrap;
1242    overflow: hidden;
1243    text-overflow: ellipsis;
1244    justify-content: center;
1245  }
1246
1247  button > wui-flex > wui-text.certified {
1248    max-width: 66px;
1249  }
1250
1251  @media (hover: hover) and (pointer: fine) {
1252    button:hover:enabled {
1253      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
1254    }
1255  }
1256
1257  button:disabled > wui-flex > wui-text {
1258    color: ${({tokens:e})=>e.core.glass010};
1259  }
1260
1261  [data-selected='true'] {
1262    background-color: ${({colors:e})=>e.accent020};
1263  }
1264
1265  @media (hover: hover) and (pointer: fine) {
1266    [data-selected='true']:hover:enabled {
1267      background-color: ${({colors:e})=>e.accent010};
1268    }
1269  }
1270
1271  [data-selected='true']:active:enabled {
1272    background-color: ${({colors:e})=>e.accent010};
1273  }
1274
1275  @media (max-width: 350px) {
1276    button {
1277      width: 100%;
1278    }
1279  }
1280`;var tn=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let ta=class extends r.WF{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver(e=>
1280{e.forEach(e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type==="certified";return(0,r.qy)`
1281      <button>
1282        ${this.imageTemplate()}
1283        <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1">
1284          <wui-text
1285            variant="md-regular"
1286            color="inherit"
1287            class=${(0,d.J)(e?"certified":void 0)}
1288            >${this.wallet?.name}</wui-text
1289          >
1290          ${e?(0,r.qy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null}
1291        </wui-flex>
1292      </button>
1293    `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,r.qy)`
1294      <wui-wallet-image
1295        size="lg"
1296        imageSrc=${(0,d.J)(this.imageSrc)}
1297        name=${(0,d.J)(this.wallet?.name)}
1298        .installed=${this.wallet?.installed??!1}
1299        badgeSize="sm"
1300      >
1301      </wui-wallet-image>
1302    `:this.shimmerTemplate()}shimmerTemplate(){return(0,r.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=y.$.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await y.$.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,g.E.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:f.I.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};ta.styles=to,tn([(0,o.wk)()],ta.prototype,"visible",void 0),tn([(0,o.wk)()],ta.prototype,"imageSrc",void 0),tn([(0,o.wk)()],ta.prototype,"imageLoading",void 0),tn([(0,o.wk)()],ta.prototype,"isImpressed",void 0),tn([(0,o.MZ)()],ta.prototype,"explorerId",void 0),tn([(0,o.MZ)()],ta.prototype,"walletQuery",void 0),tn([(0,o.MZ)()],ta.prototype,"certified",void 0),tn([(0,o.MZ)()],ta.prototype,"displayIndex",void 0),tn([(0,o.MZ)({type:Object})],ta.prototype,"wallet",void 0),ta=tn([(0,c.EM)("w3m-all-wallets-list-item")],ta);let ts=(0,c.AH)`
1303  wui-grid {
1304    max-height: clamp(360px, 400px, 80vh);
1305    overflow: scroll;
1306    scrollbar-width: none;
1307    grid-auto-rows: min-content;
1308    grid-template-columns: repeat(auto-fill, 104px);
1309  }
1310
1311  :host([data-mobile-fullscreen='true']) wui-grid {
1312    max-height: none;
1313  }
1314
1315  @media (max-width: 350px) {
1316    wui-grid {
1317      grid-template-columns: repeat(2, 1fr);
1318    }
1319  }
1320
1321  wui-grid[data-scroll='false'] {
1322    overflow: hidden;
1323  }
1324
1325  wui-grid::-webkit-scrollbar {
1326    display: none;
1327  }
1328
1329  w3m-all-wallets-list-item {
1330    opacity: 0;
1331    animation-duration: ${({durations:e})=>e.xl};
1332    animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]};
1333    animation-name: fade-in;
1334    animation-fill-mode: forwards;
1335  }
1336
1337  @keyframes fade-in {
1338    from {
1339      opacity: 0;
1340    }
1341    to {
1342      opacity: 1;
1343    }
1344  }
1345
1346  wui-loading-spinner {
1347    padding-top: ${({spacing:e})=>e["4"]};
1348    padding-bottom: ${({spacing:e})=>e["4"]};
1349    justify-content: center;
1350    grid-column: 1 / span 4;
1351  }
1352`;var tl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tc="local-paginator",td=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!s.N.state.wallets.length,this.wallets=s.N.state.wallets,this.recommended=s.N.state.recommended,this.featured=s.N.state.featured,this.filteredWallets=s.N.state.filteredWallets,this.mobileFullScreen=a.H.state.enableMobileFullScreen,this.unsubscribe.push(s.N.subscribeKey("wallets",e=>this.wallets=e),s.N.subscribeKey("recommended",e=>this.recommended=e),s.N.subscribeKey("featured",e=>this.featured=e),s.N.subscribeKey("filteredWallets",e=>this.filteredWallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,r.qy)`
1353      <wui-grid
1354        data-scroll=${!this.loading}
1355        .padding=${["0","3","3","3"]}
1356        gap="2"
1357        justifyContent="space-between"
1358      >
1359        ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}
1360        ${this.paginationLoaderTemplate()}
1361      </wui-grid>
1362    `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await s.N.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>(0,r.qy)`
1363        <wui-card-select-loader type="wallet" id=${(0,d.J)(t)}></wui-card-select-loader>
1364      `)}getWallets(){let e=[...this.featured,...this.recommended];this.filteredWallets?.length>0?e.push(...this.filteredWallets):e.push(...this.wallets);let t=n.w.uniqueBy(e,"id"),i=tr.A.markWalletsAsInstalled(t);return tr.A.markWalletsWithDisplayIndex(i)}walletsTemplate(){return this.getWallets().map((e,t)=>(0,r.qy)`
1365        <w3m-all-wallets-list-item
1366          data-testid="wallet-search-item-${e.id}"
1367          @click=${()=>this.onConnectWallet(e)}
1368          .wallet=${e}
1369          explorerId=${e.id}
1370          certified=${"certified"===this.badge}
1371          displayIndex=${t}
1372        ></w3m-all-wallets-list-item>
1373      `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:i,count:r,mobileFilteredOutWalletsLength:o}=s.N.state,n=window.innerWidth<352?3:4,a=e.length+t.length,l=Math.ceil(a/n)*n-a+n;return(l-=e.length?i.length%n:0,0===r&&i.length>0)?null:0===r||[...i,...e,...t].length<r-(o??0)?this.shimmerTemplate(l,tc):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${tc}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:i}=s.N.state;i.length<t&&s.N.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){h.a.selectWalletConnector(e)}};td.styles=ts,tl([(0,o.wk)()],td.prototype,"loading",void 0),tl([(0,o.wk)()],td.prototype,"wallets",void 0),tl([(0,o.wk)()],td.prototype,"recommended",void 0),tl([(0,o.wk)()],td.prototype,"featured",void 0),tl([(0,o.wk)()],td.prototype,"filteredWallets",void 0),tl([(0,o.wk)()],td.prototype,"badge",void 0),tl([(0,o.wk)()],td.prototype,"mobileFullScreen",void 0),td=tl([(0,c.EM)("w3m-all-wallets-list")],td);let tu=(0,r.AH)`
1374  wui-grid,
1375  wui-loading-spinner,
1376  wui-flex {
1377    height: 360px;
1378  }
1379
1380  wui-grid {
1381    overflow: scroll;
1382    scrollbar-width: none;
1383    grid-auto-rows: min-content;
1384    grid-template-columns: repeat(auto-fill, 104px);
1385  }
1386
1387  :host([data-mobile-fullscreen='true']) wui-grid {
1388    max-height: none;
1389    height: auto;
1390  }
1391
1392  wui-grid[data-scroll='false'] {
1393    overflow: hidden;
1394  }
1395
1396  wui-grid::-webkit-scrollbar {
1397    display: none;
1398  }
1399
1400  wui-loading-spinner {
1401    justify-content: center;
1402    align-items: center;
1403  }
1404
1405  @media (max-width: 350px) {
1406    wui-grid {
1407      grid-template-columns: repeat(2, 1fr);
1408    }
1409  }
1410`;var th=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tp=class extends r.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=a.H.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,r.qy)`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await s.N.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=s.N.state,t=tr.A.markWalletsAsInstalled(e);return e.length?(0,r.qy)`
1411      <wui-grid
1412        data-testid="wallet-list"
1413        .padding=${["0","3","3","3"]}
1414        rowGap="4"
1415        columngap="2"
1416        justifyContent="space-between"
1417      >
1418        ${t.map((e,t)=>(0,r.qy)`
1419            <w3m-all-wallets-list-item
1420              @click=${()=>this.onConnectWallet(e)}
1421              .wallet=${e}
1422              data-testid="wallet-search-item-${e.id}"
1423              explorerId=${e.id}
1424              certified=${"certified"===this.badge}
1425              walletQuery=${this.query}
1426              displayIndex=${t}
1427            ></w3m-all-wallets-list-item>
1428          `)}
1429      </wui-grid>
1430    `:(0,r.qy)`
1431        <wui-flex
1432          data-testid="no-wallet-found"
1433          justifyContent="center"
1434          alignItems="center"
1435          gap="3"
1436          flexDirection="column"
1437        >
1438          <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box>
1439          <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium">
1440            No Wallet found
1441          </wui-text>
1442        </wui-flex>
1443      `}onConnectWallet(e){h.a.selectWalletConnector(e)}};tp.styles=tu,th([(0,o.wk)()],tp.prototype,"loading",void 0),th([(0,o.wk)()],tp.prototype,"mobileFullScreen",void 0),th([(0,o.MZ)()],tp.prototype,"query",void 0),th([(0,o.MZ)()],tp.prototype,"badge",void 0),tp=th([(0,c.EM)("w3m-all-wallets-search")],tp);var tg=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tf=class extends r.WF{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=n.w.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,r.qy)`
1444      <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center">
1445        <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
1446        <wui-certified-switch
1447          ?checked=${"certified"===this.badge}
1448          @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)}
1449          data-testid="wui-certified-switch"
1450        ></wui-certified-switch>
1451        ${this.qrButtonTemplate()}
1452      </wui-flex>
1453      ${e||this.badge?(0,r.qy)`<w3m-all-wallets-search
1454            query=${this.search}
1455            .badge=${this.badge}
1456          ></w3m-all-wallets-search>`:(0,r.qy)`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`}
1457    `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",I.P.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return n.w.isMobile()?(0,r.qy)`
1458        <wui-icon-box
1459          size="xl"
1460          iconSize="xl"
1461          color="accent-primary"
1462          icon="qrCode"
1463          border
1464          borderColor="wui-accent-glass-010"
1465          @click=${this.onWalletConnectQr.bind(this)}
1466        ></wui-icon-box>
1467      `:null}onWalletConnectQr(){f.I.push("ConnectingWalletConnect")}};tg([(0,o.wk)()],tf.prototype,"search",void 0),tg([(0,o.wk)()],tf.prototype,"badge",void 0),tf=tg([(0,c.EM)("w3m-all-wallets-view")],tf);let tw=(0,W.AH)`
1468  :host {
1469    width: 100%;
1470  }
1471
1472  button {
1473    display: flex;
1474    align-items: center;
1475    justify-content: space-between;
1476    padding: ${({spacing:e})=>e[3]};
1477    width: 100%;
1478    background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
1479    border-radius: ${({borderRadius:e})=>e[4]};
1480    transition:
1481      background-color ${({durations:e})=>e.lg}
1482        ${({easings:e})=>e["ease-out-power-2"]},
1483      scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]};
1484    will-change: background-color, scale;
1485  }
1486
1487  wui-text {
1488    text-transform: capitalize;
1489  }
1490
1491  wui-image {
1492    color: ${({tokens:e})=>e.theme.textPrimary};
1493  }
1494
1495  @media (hover: hover) {
1496    button:hover:enabled {
1497      background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
1498    }
1499  }
1500
1501  button:disabled {
1502    opacity: 0.5;
1503    cursor: not-allowed;
1504  }
1505`;var tm=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tb=class extends r.WF{constructor(){super(...arguments),this.imageSrc="google",this.loading=!1,this.disabled=!1,this.rightIcon=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",(0,r.qy)`
1506      <button
1507        ?disabled=${!!this.loading||!!this.disabled}
1508        data-loading=${this.loading}
1509        tabindex=${(0,d.J)(this.tabIdx)}
1510      >
1511        <wui-flex gap="2" alignItems="center">
1512          ${this.templateLeftIcon()}
1513          <wui-flex gap="1">
1514            <slot></slot>
1515          </wui-flex>
1516        </wui-flex>
1517        ${this.templateRightIcon()}
1518      </button>
1519    `}templateLeftIcon(){return this.icon?(0,r.qy)`<wui-image
1520        icon=${this.icon}
1521        iconColor=${(0,d.J)(this.iconColor)}
1522        ?boxed=${!0}
1523        ?rounded=${this.rounded}
1524      ></wui-image>`:(0,r.qy)`<wui-image
1525      ?boxed=${!0}
1526      ?rounded=${this.rounded}
1527      ?fullSize=${this.fullSize}
1528      src=${this.imageSrc}
1529    ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?(0,r.qy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:(0,r.qy)`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};tb.styles=[P.W5,P.fD,tw],tm([(0,o.MZ)()],tb.prototype,"imageSrc",void 0),tm([(0,o.MZ)()],tb.prototype,"icon",void 0),tm([(0,o.MZ)()],tb.prototype,"iconColor",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"loading",void 0),tm([(0,o.MZ)()],tb.prototype,"tabIdx",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"disabled",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"rightIcon",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"rounded",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"fullSize",void 0),tb=tm([(0,S.E)("wui-list-item")],tb);let ty=class extends r.WF{constructor(){super(...arguments),this.wallet=f.I.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,r.qy)`
1530      <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}>
1531        ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
1532        ${this.homepageTemplate()}
1533      </wui-flex>
1534    `}chromeTemplate(){return this.wallet?.chrome_store?(0,r.qy)`<wui-list-item
1535      variant="icon"
1536      icon="chromeStore"
1537      iconVariant="square"
1538      @click=${this.onChromeStore.bind(this)}
1539      chevron
1540    >
1541      <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text>
1542    </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?(0,r.qy)`<wui-list-item
1543      variant="icon"
1544      icon="appStore"
1545      iconVariant="square"
1546      @click=${this.onAppStore.bind(this)}
1547      chevron
1548    >
1549      <wui-text variant="md-medium" color="primary">iOS App</wui-text>
1550    </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?(0,r.qy)`<wui-list-item
1551      variant="icon"
1552      icon="playStore"
1553      iconVariant="square"
1554      @click=${this.onPlayStore.bind(this)}
1555      chevron
1556    >
1557      <wui-text variant="md-medium" color="primary">Android App</wui-text>
1558    </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?(0,r.qy)`
1559      <wui-list-item
1560        variant="icon"
1561        icon="browser"
1562        iconVariant="square-blue"
1563        @click=${this.onHomePage.bind(this)}
1564        chevron
1565      >
1566        <wui-text variant="md-medium" color="primary">Website</wui-text>
1567      </wui-list-item>
1568    `:null}openStore(e){e.href&&this.wallet&&(g.E.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),n.w.openHref(e.href,"_blank"))}onChromeStore(){this.wallet?.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){this.wallet?.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){this.wallet?.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){this.wallet?.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};ty=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-downloads-view")],ty)},84496:(e,t)=>{function i(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");
1568if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:i(e.color.dark||"#000000ff"),light:i(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,i){let r=t.getScale(e,i);return Math.floor((e+2*i.margin)*r)},t.qrToImageData=function(e,i,r){let o=i.modules.size,n=i.modules.data,a=t.getScale(o,r),s=Math.floor((o+2*r.margin)*a),l=r.margin*a,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let i=0;i<s;i++){let d=(t*s+i)*4,u=r.color.light;t>=l&&i>=l&&t<s-l&&i<s-l&&(u=c[+!!n[Math.floor((t-l)/a)*o+Math.floor((i-l)/a)]]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},85779:(e,t,i)=>{let r=i(40188).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,i=r(e),o=145===i?26:2*Math.ceil((i-13)/(2*t-2)),n=[i-7];for(let e=1;e<t-1;e++)n[e]=n[e-1]-o;return n.push(6),n.reverse()},t.getPositions=function(e){let i=[],r=t.getRowColCoords(e),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)(0!==e||0!==t)&&(0!==e||t!==o-1)&&(e!==o-1||0!==t)&&i.push([r[e],r[t]]);return i}},89819:(e,t,i)=>{let r=i(40188),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){let i=e.bit<<3|t,n=i<<10;for(;r.getBCHDigit(n)-o>=0;)n^=1335<<r.getBCHDigit(n)-o;return(i<<10|n)^21522}},90284:(e,t,i)=>{let r=i(48173);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let i=r.mod(t,this.genPoly),o=this.degree-i.length;if(o>0){let e=new Uint8Array(this.degree);return e.set(i,o),e}return i},e.exports=o},96667:(e,t)=>{let i=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)i[t]=e,r[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)i[e]=i[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return r[e]},t.exp=function(e){return i[e]},t.mul=function(e,t){return 0===e||0===t?0:i[r[e]+r[t]]}}}]);

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.