1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66],{62382:function(e,t,o){let r=o(50002),i=o(69764),n=o(61982),a=o(71136);function l(e,t,o,n,a){let l=[].slice.call(arguments,1),s=l.length,c="function"==typeof l[s-1];if(!c&&!r())throw Error("Callback required as last argument");if(c){if(s<2)throw Error("Too few arguments provided");2===s?(a=o,o=t,t=n=void 0):3===s&&(t.getContext&&void 0===a?(a=n,n=void 0):(a=n,n=o,o=t,t=void 0))}else{if(s<1)throw Error("Too few arguments provided");return 1===s?(o=t,t=n=void 0):2!==s||t.getContext||(n=o,o=t,t=void 0),new Promise(function(r,a){try{let a=i.create(o,n);r(e(a,t,n))}catch(e){a(e)}})}try{let r=i.create(o,n);a(null,e(r,t,n))}catch(e){a(e)}}t.create=i.create,t.toCanvas=l.bind(null,n.render),t.toDataURL=l.bind(null,n.renderToDataURL),t.toString=l.bind(null,function(e,t,o){return a.render(e,o)})},50002:function(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},78186:function(e,t,o){let r=o(96567).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,o=r(e),i=145===o?26:2*Math.ceil((o-13)/(2*t-2)),n=[o-7];for(let e=1;e<t-1;e++)n[e]=n[e-1]-i;return n.push(6),n.reverse()},t.getPositions=function(e){let o=[],r=t.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)(0!==e||0!==t)&&(0!==e||t!==i-1)&&(e!==i-1||0!==t)&&o.push([r[e],r[t]]);return o}},50821:function(e,t,o){let r=o(26024),i=["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 o=45*i.indexOf(this.data[t]);o+=i.indexOf(this.data[t+1]),e.put(o,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=n},31226:function(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){return(this.buffer[Math.floor(e/8)]>>>7-e%8&1)==1},put:function(e,t){for(let o=0;o<t;o++)this.putBit((e>>>t-o-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},33845:function(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,o,r){let i=e*this.size+t;this.data[i]=o,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,o){this.data[e*this.size+t]^=o},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},19329:function(e,t,o){let r=o(30961),i=o(26024);function n(e){this.mode=i.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,o=this.data.length;t<o;t++)e.put(this.data[t],8)},e.exports=n},69131:function(e,t,o){let r=o(37344),i=[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 i[(e-1)*4+0];case r.M:return i[(e-1)*4+1];case r.Q:return i[(e-1)*4+2];case r.H:return i[(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}}},37344:function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3}
1,t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,o){if(t.isValid(e))return e;try{return function(e){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)}}(e)}catch(e){return o}}},49759:function(e,t,o){let r=o(96567).getSymbolSize;t.getPositions=function(e){let t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},11165:function(e,t,o){let r=o(96567),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){let o=e.bit<<3|t,n=o<<10;for(;r.getBCHDigit(n)-i>=0;)n^=1335<<r.getBCHDigit(n)-i;return(o<<10|n)^21522}},22098:function(e,t){let o=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)o[t]=e,r[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)o[e]=o[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return r[e]},t.exp=function(e){return o[e]},t.mul=function(e,t){return 0===e||0===t?0:o[r[e]+r[t]]}},59791:function(e,t,o){let r=o(26024),i=o(96567);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 o=i.toSJIS(this.data[t]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");o=(o>>>8&255)*192+(255&o),e.put(o,13)}},e.exports=n},19550:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let o={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,i=0,n=0,a=null,l=null;for(let s=0;s<t;s++){i=n=0,a=l=null;for(let c=0;c<t;c++){let t=e.get(s,c);t===a?i++:(i>=5&&(r+=o.N1+(i-5)),a=t,i=1),(t=e.get(c,s))===l?n++:(n>=5&&(r+=o.N1+(n-5)),l=t,n=1)}i>=5&&(r+=o.N1+(i-5)),n>=5&&(r+=o.N1+(n-5))}return r},t.getPenaltyN2=function(e){let t=e.size,r=0;for(let o=0;o<t-1;o++)for(let i=0;i<t-1;i++){let t=e.get(o,i)+e.get(o,i+1)+e.get(o+1,i)+e.get(o+1,i+1);(4===t||0===t)&&r++}return r*o.N2},t.getPenaltyN3=function(e){let t=e.size,r=0,i=0,n=0;for(let o=0;o<t;o++){i=n=0;for(let a=0;a<t;a++)i=i<<1&2047|e.get(o,a),a>=10&&(1488===i||93===i)&&r++,n=n<<1&2047|e.get(a,o),a>=10&&(1488===n||93===n)&&r++}return r*o.N3},t.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let o=0;o<r;o++)t+=e.data[o];return Math.abs(Math.ceil(100*t/r/5)-10)*o.N4},t.applyMask=function(e,o){let r=o.size;for(let i=0;i<r;i++)for(let n=0;n<r;n++)o.isReserved(n,i)||o.xor(n,i,function(e,o,r){switch(e){case t.Patterns.PATTERN000:return(o+r)%2==0;case t.Patterns.PATTERN001:return o%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(o+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return o*r%2+o*r%3==0;case t.Patterns.PATTERN110:return(o*r%2+o*r%3)%2==0;case t.Patterns.PATTERN111:return(o*r%3+(o+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,n,i))},t.getBestMask=function(e,o){let r=Object.keys(t.Patterns).length,i=0,n=1/0;for(let a=0;a<r;a++){o(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,i=a)}return i}},26024:function(e,t,o){let r=o(62084),i=o(69673);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 i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.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,o){if(t.isValid(e))return e;try{return function(e){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)}}(e)}catch(e){return o}}},68645:function(e,t,o){let r=o(26024);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,o;for(t=0;t+3<=this.data.length;t+=3)o=parseInt(this.data.substr(t,3),10),e.put(o,10);let r=this.data.length-t;r>0&&(o=parseInt(this.data.substr(t),10),e.put(o,3*r+1))},e.exports=i},88843:function(e,t,o){let r=o(22098);t.mul=function(e,t){let o=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let n=0;n<t.length;n++)o[i+n]^=r.mul(e[i],t[n]);return o},t.mod=function(e,t){let o=new Uint8Array(e);for(;o.length-t.length>=0;){let e=o[0];for(let i=0;i<t.length;i++)o[i]^=r.mul(t[i],e);let i=0;for(;i<o.length&&0===o[i];)i++;o=o.slice(i)}return o},t.generateECPolynomial=function(e){let o=new Uint8Array([1]);for(let i=0;i<e;i++)o=t.mul(o,new Uint8Array([1,r.exp(i)]));return o}},69764:function(e,t,o){let r=o(96567),i=o(37344),n=o(31226),a=o(33845),l=o(78186),s=o(49759),c=o(19550),d=o(69131),u=o(55957),h=o(67274),p=o(11165),g=o(26024),f=o(93037);function w(e,t,o){let r,i;let n=e.size,a=p.getEncodedBits(t,o);for(r=0;r<15;r++)i=(a>>r&1)==1,r<6?e.set(r,8,i,!0):r<8?e.set(r+1,8,i,!0):e.set(n-15+r,8,i,!0),r<8?e.set(8,n-r-1,i,!0):r
vendor: 10,099 bytes, line 1
1<9?e.set(8,15-r-1+1,i,!0):e.set(8,15-r-1,i,!0);e.set(n-8,8,1,!0)}t.create=function(e,t){let o,p;if(void 0===e||""===e)throw Error("No input text");let m=i.M;return void 0!==t&&(m=i.from(t.errorCorrectionLevel,i.M),o=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),function(e,t,o,i){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,o)}p=f.fromString(e,r||40)}else throw Error("Invalid data");let m=h.getBestVersionForData(p,o);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,o){let i=new n;o.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(i)});let a=(r.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t))*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);let l=(a-i.getLengthInBits())/8;for(let e=0;e<l;e++)i.put(e%2?17:236,8);return function(e,t,o){let i,n;let a=r.getSymbolTotalCodewords(t),l=a-d.getTotalCodewordsCount(t,o),s=d.getBlocksCount(t,o),c=a%s,h=s-c,p=Math.floor(a/s),g=Math.floor(l/s),f=g+1,w=p-g,m=new u(w),b=0,y=Array(s),v=Array(s),C=0,x=new Uint8Array(e.buffer);for(let e=0;e<s;e++){let t=e<h?g:f;y[e]=x.slice(b,b+t),v[e]=m.encode(y[e]),b+=t,C=Math.max(C,t)}let $=new Uint8Array(a),k=0;for(i=0;i<C;i++)for(n=0;n<s;n++)i<y[n].length&&($[k++]=y[n][i]);for(i=0;i<w;i++)for(n=0;n<s;n++)$[k++]=v[n][i];return $}(i,e,t)}(t,o,p),y=new a(r.getSymbolSize(t));return function(e,t){let o=e.size,r=s.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],n=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1)&&!(o<=i+t))for(let r=-1;r<=7;r++)n+r<=-1||o<=n+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,n+r,!0,!0):e.set(i+t,n+r,!1,!0))}}(y,t),function(e){let t=e.size;for(let o=8;o<t-8;o++){let t=o%2==0;e.set(o,6,t,!0),e.set(6,o,t,!0)}}(y),function(e,t){let o=l.getPositions(t);for(let t=0;t<o.length;t++){let r=o[t][0],i=o[t][1];for(let t=-2;t<=2;t++)for(let o=-2;o<=2;o++)-2===t||2===t||-2===o||2===o||0===t&&0===o?e.set(r+t,i+o,!0,!0):e.set(r+t,i+o,!1,!0)}}(y,t),w(y,o,0),t>=7&&function(e,t){let o,r,i;let n=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)o=Math.floor(t/3),r=t%3+n-8-3,i=(a>>t&1)==1,e.set(o,r,i,!0),e.set(r,o,i,!0)}(y,t),function(e,t){let o=e.size,r=-1,i=o-1,n=7,a=0;for(let l=o-1;l>0;l-=2)for(6===l&&l--;;){for(let o=0;o<2;o++)if(!e.isReserved(i,l-o)){let r=!1;a<t.length&&(r=(t[a]>>>n&1)==1),e.set(i,l-o,r),-1==--n&&(a++,n=7)}if((i+=r)<0||o<=i){i-=r,r=-r;break}}}(y,b),isNaN(i)&&(i=c.getBestMask(y,w.bind(null,y,o))),c.applyMask(i,y),w(y,o,i),{modules:y,version:t,errorCorrectionLevel:o,maskPattern:i,segments:p}}(e,o,m,p)}},55957:function(e,t,o){let r=o(88843);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let o=r.mod(t,this.genPoly),i=this.degree-o.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(o,i),e}return o},e.exports=i},69673:function(e,t){let o="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![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(i,"g"),t.NUMERIC=RegExp(o,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let n=RegExp("^"+r+"$"),a=RegExp("^"+o+"$"),l=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 l.test(e)}},93037:function(e,t,o){let r=o(26024),i=o(68645),n=o(50821),a=o(19329),l=o(59791),s=o(69673),c=o(96567),d=o(35309);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,o){let r;let i=[];for(;null!==(r=e.exec(o));)i.push({data:r[0],index:r.index,mode:t,length:r[0].length});return i}function p(e){let t,o;let i=h(s.NUMERIC,r.NUMERIC,e),n=h(s.ALPHANUMERIC,r.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(s.BYTE,r.BYTE,e),o=h(s.KANJI,r.KANJI,e)):(t=h(s.BYTE_KANJI,r.BYTE,e),o=[]),i.concat(n,t,o).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 i.getBitsLength(e);case r.ALPHANUMERIC:return n.getBitsLength(e);case r.KANJI:return l.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function f(e,t){let o;let s=r.getBestModeForData(e);if((o=r.from(t,s))!==r.BYTE&&o.bit<s.bit)throw Error('"'+e+'" cannot be encoded with mode '+r.toString(o)+".\n Suggested mode is: "+r.toString(s));switch(o!==r.KANJI||c.isKanjiModeEnabled()||(o=r.BYTE),o){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new n(e);case r.KANJI:return new l(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,o){let i=function(e,t){let o={},i={start:{}},n=["start"];for(let a=0;a<e.length;a++){let l=e[a],s=[];for(let e=0;e<l.length;e++){let c=l[e],d=""+a+e;s.push(d),o[d]={node:c,lastCount:0},i[d]={};for(let e=0;e<n.length;e++){let a=n[e];o[a]&&o[a].node.mode===c.mode?(i[a][d]=g(o[a].lastCount+c.length,c.mode)-g(o[a].lastCount,c.mode),o[a].lastCount+=c.length):(o[a]&&(o[a].lastCount=c.length),i[a][d]=g(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}n=s}for(let e=0;e<n.length;e++)i[n[e]].end=0;return{map:i,table:o}}(function(e){let t=[];for(let o=0;o<e.length;o++){let i=e[o];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:u(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:u(i.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),o),n=d.find_path(i.map,"start","end"),a=[];for(let e=1;e<n.length-1;e++)a.push(i.table[n[e]].node);return t.fromArray(a.reduce(function(e,t){let o=e.length-1>=0?e[e.length-1]:null;return o&&o.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()))}},96567:function(e,t){let o;let 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.');o=e},t.isKanjiModeEnabled=function(){return void 0!==o},t.toSJIS=function(e){return o(e)}},62084:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},67274:function(e,t,o){let r=o(96567),i=o(69131),n=o(37344),a=o(26024),l=o(62084),s=r.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return l.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,o){if(!l.isValid(e))throw Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);let n=(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t))*8;if(o===a.MIXED)return n;let s=n-c(o,e);switch(o){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},t.getBestVersionForData=function(e,o){let r;let i=n.from(o,n.M);if(Array.isArray(e)){if(e.length>1)return function(e,o){for(let r=1;r<=40;r++)if(function(e,t){let o=0;return e.forEach(function(e){let r=c(e.mode,t);o+=r+e.getBitsLength()}),o}(e,r)<=t.getCapacity(r,o,a.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,o,r){for(let i=1;i<=40;i++)if(o<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!l.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-s>=0;)t^=7973<<r.getBCHDigit(t)-s;return e<<12|t}},61982:function(e,t,o){let r=o(65925);t.render=function(e,t,o){var i;let n=o,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 l=r.getImageWidth(e.modules.size,n),s=a.getContext("2d"),c=s.createImageData(l,l);return r.qrToImageData(c.data,e,n),i=a,s.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=l,i.width=l,i.style.height=l+"px",i.style.width=l+"px",s.putImageData(c,0,0),a},t.renderToDataURL=function(e,o,r){let i=r;void 0!==i||o&&o.getContext||(i=o,o=void 0),i||(i={});let n=t.render(e,o,i),a=i.type||"image/png",l=i.rendererOpts||{};return n.toDataURL(a,l.quality)}},71136:function(e,t,o){let r=o(65925);function i(e,t){let o=e.a/255,r=t+'="'+e.hex+'"';return o<1?r+" "+t+'-opacity="'+o.toFixed(2).slice(1)+'"':r}function n(e,t,o){let r=e+t;return void 0!==o&&(r+=" "+o),r}t.render=function(e,t,o){let a=r.getOptions(t),l=e.modules.size,s=e.modules.data,c=l+2*a.margin,d=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+i(a.color.dark,"stroke")+' d="'+function(e,t,o){let r="",i=0,a=!1,l=0;for(let s=0;s<e.length;s++){let c=Math.floor(s%t),d=Math.floor(s/t);c||a||(a=!0),e[s]?(l++,s>0&&c>
10&&e[s-1]||(r+=a?n("M",c+o,.5+d+o):n("m",i,0),i=0,a=!1),c+1<t&&e[s+1]||(r+=n("h",l),l=0)):i++}return r}(s,l,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 o&&o(null,h),h}},65925:function(e,t){function o(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("");if(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 o=parseInt(t.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:255&o,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,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:o(e.color.dark||"#000000ff"),light:o(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,o){let r=t.getScale(e,o);return Math.floor((e+2*o.margin)*r)},t.qrToImageData=function(e,o,r){let i=o.modules.size,n=o.modules.data,a=t.getScale(i,r),l=Math.floor((i+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark];for(let t=0;t<l;t++)for(let o=0;o<l;o++){let d=(t*l+o)*4,u=r.color.light;t>=s&&o>=s&&t<l-s&&o<l-s&&(u=c[n[Math.floor((t-s)/a)*i+Math.floor((o-s)/a)]?1:0]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},35309:function(e){"use strict";var t={single_source_shortest_paths:function(e,o,r){var i,n,a,l,s,c,d,u={},h={};h[o]=0;var p=t.PriorityQueue.make();for(p.push(o,0);!p.empty();)for(a in n=(i=p.pop()).value,l=i.cost,s=e[n]||{})s.hasOwnProperty(a)&&(c=l+s[a],d=h[a],(void 0===h[a]||d>c)&&(h[a]=c,p.push(a,c),u[a]=n));if(void 0!==r&&void 0===h[r])throw Error(["Could not find a path from ",o," to ",r,"."].join(""));return u},extract_shortest_path_from_predecessor_list:function(e,t){for(var o=[],r=t;r;)o.push(r),e[r],r=e[r];return o.reverse(),o},find_path:function(e,o,r){var i=t.single_source_shortest_paths(e,o,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var o,r=t.PriorityQueue,i={};for(o in e=e||{},r)r.hasOwnProperty(o)&&(i[o]=r[o]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},30961:function(e){"use strict";e.exports=function(e){for(var t=[],o=e.length,r=0;r<o;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&o>r+1){var n=e.charCodeAt(r+1);n>=56320&&n<=57343&&(i=(i-55296)*1024+n-56320+65536,r+=1)}if(i<128){t.push(i);continue}if(i<2048){t.push(i>>6|192),t.push(63&i|128);continue}if(i<55296||i>=57344&&i<65536){t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128);continue}if(i>=65536&&i<=1114111){t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},50066:function(e,t,o){"use strict";o.r(t),o.d(t,{W3mAllWalletsView:function(){return tw},W3mConnectingWcBasicView:function(){return eB},W3mDownloadsView:function(){return tv}});var r=o(20286),i=o(72670),n=o(26176),a=o(58921),l=o(73726),s=o(59894),c=o(55133);o(87835);var d=o(62937),u=o(12900),h=o(68598),p=o(2309),g=o(94923),f=o(33706);o(1963);var w=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let m=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=h.ConnectorController.state.connectors,this.count=l.ApiController.state.count,this.filteredCount=l.ApiController.state.filteredWallets.length,this.isFetchingRecommendedWallets=l.ApiController.state.isFetchingRecommendedWallets,this.unsubscribe.push(h.ConnectorController.subscribeKey("connectors",e=>this.connectors=e),l.ApiController.subscribeKey("count",e=>this.count=e),l.ApiController.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),l.ApiController.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}
1disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=a.OptionsController.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!n.j.isMobile())return null;let o=l.ApiController.state.featured.length,i=this.count+o,s=this.filteredCount>0?this.filteredCount:i<10?i:10*Math.floor(i/10),c=`${s}`;this.filteredCount>0?c=`${this.filteredCount}`:s<i&&(c=`${s}+`);let h=p.ConnectionController.hasAnyConnection(u.b.CONNECTOR_ID.WALLET_CONNECT);return(0,r.dy)` 2 <wui-list-wallet 3 name="Search Wallet" 4 walletIcon="search" 5 showAllWallets 6 @click=${this.onAllWallets.bind(this)} 7 tagLabel=${c} 8 tagVariant="info" 9 data-testid="all-wallets" 10 tabIdx=${(0,d.o)(this.tabIdx)} 11 .loading=${this.isFetchingRecommendedWallets} 12 ?disabled=${h} 13 size="sm" 14 ></wui-list-wallet> 15 `}onAllWallets(){g.X.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),f.RouterController.push("AllWallets",{redirectView:f.RouterController.state.data?.redirectView})}};w([(0,i.Cb)()],m.prototype,"tabIdx",void 0),w([(0,i.SB)()],m.prototype,"connectors",void 0),w([(0,i.SB)()],m.prototype,"count",void 0),w([(0,i.SB)()],m.prototype,"filteredCount",void 0),w([(0,i.SB)()],m.prototype,"isFetchingRecommendedWallets",void 0),m=w([(0,c.Mo)("w3m-all-wallets-widget")],m);var b=o(92476),y=o(51742),v=o(23030),C=o(13493),x=(0,c.iv)` 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`,$=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let k=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.connectors=h.ConnectorController.state.connectors,this.recommended=l.ApiController.state.recommended,this.featured=l.ApiController.state.featured,this.explorerWallets=l.ApiController.state.explorerWallets,this.connections=p.ConnectionController.state.connections,this.connectorImages=b.W.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(h.ConnectorController.subscribeKey("connectors",e=>this.connectors=e),p.ConnectionController.subscribeKey("connections",e=>this.connections=e),b.W.subscribeKey("connectorImages",e=>this.connectorImages=e),l.ApiController.subscribeKey("recommended",e=>this.recommended=e),l.ApiController.subscribeKey("featured",e=>this.featured=e),l.ApiController.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:l.ApiController.state.explorerWallets}),l.ApiController.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),n.j.isTelegram()&&n.j.isIos()&&(this.loadingTelegram=!p.ConnectionController.state.wcUri,this.unsubscribe.push(p.ConnectionController.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,r.dy)` 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 o=e.connectors.map(e=>e.id),r=e.connectors.map(e=>e.name),i=e.connectors.map(e=>e.info?.rdns),n=t?.find(e=>o.includes(e.id)||r.includes(e.name)||e.rdns&&(i.includes(e.rdns)||o.includes(e.rdns)));return e.explorerWallet=n??e.explorerWallet,e}let o=t?.find(t=>t.id===e.id||t.rdns===e.info?.rdns||t.name===e.name);return e.explorerWallet=o??e.explorerWallet,e})}processConnectorsByType(e,t=!0){let o=C.C.sortConnectorsByExplorerWallet([...e]);return t?o.filter(C.C.showConnector):o}connectorListTemplate(){let e=this.mapConnectorsToExplorerWallets(this.connectors,this.explorerWallets??[]),t=C.C.getConnectorsByType(e,this.recommended,this.featured),o=this.processConnectorsByType(t.announced.filter(e=>"walletConnect"!==e.id)),r=this.processConnectorsByType(t.injected),i=this.processConnectorsByType(t.multiChain.filter(e=>"WalletConnect"!==e.name),!1),a=t.custom,l=t.recent,s=this.processConnectorsByType(t.external.filter(e=>e.id!==u.b.CONNECTOR_ID.COINBASE_SDK)),c=t.recommended,d=t.featured,h=C.C.getConnectorTypeOrder({custom:a,recent:l,announced:o,injected:r,multiChain:i,recommended:c,featured:d,external:s}),p=this.connectors.find(e=>"walletConnect"===e.id),g=n.j.isMobile(),f=[];for(let e of h)switch(e){case"walletConnect":!g&&p&&f.push({kind:"connector",subtype:"walletConnect",connector:p});break;
26case"recent":C.C.getFilteredRecentWallets().forEach(e=>f.push({kind:"wallet",subtype:"recent",wallet:e}));break;case"injected":i.forEach(e=>f.push({kind:"connector",subtype:"multiChain",connector:e})),o.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":C.C.getFilteredCustomWallets(a??[]).forEach(e=>f.push({kind:"wallet",subtype:"custom",wallet:e}));break;case"external":s.forEach(e=>f.push({kind:"connector",subtype:"external",connector:e}));break;case"recommended":C.C.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 o,i;let n=e.connector,a=y.f.getConnectorImage(n)||this.connectorImages[n?.imageId??""],l=(this.connections.get(n.chain)??[]).some(e=>v.g.isLowerCaseMatch(e.connectorId,n.id));"multiChain"===e.subtype?(o="multichain",i="info"):"walletConnect"===e.subtype?(o="qr code",i="accent"):"injected"===e.subtype||"announced"===e.subtype?(o=l?"connected":"installed",i=l?"info":"success"):(o=void 0,i=void 0);let s=p.ConnectionController.hasAnyConnection(u.b.CONNECTOR_ID.WALLET_CONNECT),c=("walletConnect"===e.subtype||"external"===e.subtype)&&s;return(0,r.dy)` 27 <w3m-list-wallet 28 displayIndex=${t} 29 imageSrc=${(0,d.o)(a)} 30 .installed=${!0} 31 name=${n.name??"Unknown"} 32 .tagVariant=${i} 33 tagLabel=${(0,d.o)(o)} 34 data-testid=${`wallet-selector-${n.id.toLowerCase()}`} 35 size="sm" 36 @click=${()=>this.onClickConnector(e)} 37 tabIdx=${(0,d.o)(this.tabIdx)} 38 ?disabled=${c} 39 rdnsId=${(0,d.o)(n.explorerWallet?.rdns||void 0)} 40 walletRank=${(0,d.o)(n.explorerWallet?.order)} 41 > 42 </w3m-list-wallet> 43 `}onClickConnector(e){let t=f.RouterController.state.data?.redirectView;if("walletConnect"===e.subtype){h.ConnectorController.setActiveConnector(e.connector),n.j.isMobile()?f.RouterController.push("AllWallets"):f.RouterController.push("ConnectingWalletConnect",{redirectView:t});return}if("multiChain"===e.subtype){h.ConnectorController.setActiveConnector(e.connector),f.RouterController.push("ConnectingMultiChain",{redirectView:t});return}if("injected"===e.subtype){h.ConnectorController.setActiveConnector(e.connector),f.RouterController.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if("announced"===e.subtype){if("walletConnect"===e.connector.id){n.j.isMobile()?f.RouterController.push("AllWallets"):f.RouterController.push("ConnectingWalletConnect",{redirectView:t});return}f.RouterController.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}f.RouterController.push("ConnectingExternal",{connector:e.connector,redirectView:t})}renderWallet(e,t){let o=e.wallet,i=y.f.getWalletImage(o),n=p.ConnectionController.hasAnyConnection(u.b.CONNECTOR_ID.WALLET_CONNECT),a=this.loadingTelegram,l="recent"===e.subtype?"recent":void 0,s="recent"===e.subtype?"info":void 0;return(0,r.dy)` 44 <w3m-list-wallet 45 displayIndex=${t} 46 imageSrc=${(0,d.o)(i)} 47 name=${o.name??"Unknown"} 48 @click=${()=>this.onClickWallet(e)} 49 size="sm" 50 data-testid=${`wallet-selector-${o.id}`} 51 tabIdx=${(0,d.o)(this.tabIdx)} 52 ?loading=${a} 53 ?disabled=${n} 54 rdnsId=${(0,d.o)(o.rdns||void 0)} 55 walletRank=${(0,d.o)(o.order)} 56 tagLabel=${(0,d.o)(l)} 57 .tagVariant=${s} 58 > 59 </w3m-list-wallet> 60 `}onClickWallet(e){let t=f.RouterController.state.data?.redirectView;if("featured"===e.subtype){h.ConnectorController.selectWalletConnector(e.wallet);return}if("recent"===e.subtype){if(this.loadingTelegram)return;h.ConnectorController.selectWalletConnector(e.wallet);return}if("custom"===e.subtype){if(this.loadingTelegram)return;f.RouterController.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let o=h.ConnectorController.getConnector({id:e.wallet.id,rdns:e.wallet.rdns});
60o?f.RouterController.push("ConnectingExternal",{connector:o,redirectView:t}):f.RouterController.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t})}};k.styles=x,$([(0,i.Cb)({type:Number})],k.prototype,"tabIdx",void 0),$([(0,i.SB)()],k.prototype,"connectors",void 0),$([(0,i.SB)()],k.prototype,"recommended",void 0),$([(0,i.SB)()],k.prototype,"featured",void 0),$([(0,i.SB)()],k.prototype,"explorerWallets",void 0),$([(0,i.SB)()],k.prototype,"connections",void 0),$([(0,i.SB)()],k.prototype,"connectorImages",void 0),$([(0,i.SB)()],k.prototype,"loadingTelegram",void 0),k=$([(0,c.Mo)("w3m-connector-list")],k);var R=o(43715),E=o(60389),S=o(79230),T=o(35098),A=o(97509),I=o(32220),P=o(89900),B=o(68405);o(2962),o(74044);var j=o(9822),L=(0,j.iv)` 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`,O=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let M={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},N={lg:"md",md:"sm",sm:"sm"},z=class extends r.oi{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return(0,r.dy)` 95 <button data-active=${this.active}> 96 ${this.icon?(0,r.dy)`<wui-icon size=${N[this.size]} name=${this.icon}></wui-icon>`:""} 97 <wui-text variant=${M[this.size]}> ${this.label} </wui-text> 98 </button> 99 `}};z.styles=[P.ET,P.ZM,L],O([(0,i.Cb)()],z.prototype,"icon",void 0),O([(0,i.Cb)()],z.prototype,"size",void 0),O([(0,i.Cb)()],z.prototype,"label",void 0),O([(0,i.Cb)({type:Boolean})],z.prototype,"active",void 0),z=O([(0,B.M)("wui-tab-item")],z);var W=(0,j.iv)` 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`,_=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let D=class extends r.oi{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 o=t===this.activeTab;return(0,r.dy)` 117 <wui-tab-item 118 @click=${()=>this.onTabClick(t)} 119 icon=${e.icon} 120 size=${this.size} 121 label=${e.label} 122 ?active=${o} 123 data-active=${o} 124 data-testid="tab-${e.label?.toLowerCase()}" 125 ></wui-tab-item> 126 `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};D.styles=[P.ET,P.ZM,W],_([(0,i.Cb)({type:Array})],D.prototype,"tabs",void 0),_([(0,i.Cb)()],D.prototype,"onTabChange",void 0),_([(0,i.Cb)()],D.prototype,"size",void 0),_([(0,i.SB)()],D.prototype,"activeTab",void 0),D=_([(0,B.M)("wui-tabs")],D);var U=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let F=class extends r.oi{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}
126disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return(0,r.dy)` 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=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{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)}};U([(0,i.Cb)({type:Array})],F.prototype,"platforms",void 0),U([(0,i.Cb)()],F.prototype,"onSelectPlatfrom",void 0),F=U([(0,c.Mo)("w3m-connecting-header")],F);var H=o(86066);o(1965);var q=(0,j.iv)` 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`,K=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let V={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},Y={lg:"md",md:"md",sm:"sm"},X=class extends r.oi{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??V[this.size];return(0,r.dy)` 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=Y[this.size],t="neutral-primary"===this.variant||"accent-primary"===this.variant?"invert":"primary";return(0,r.dy)`<wui-loading-spinner color=${t} size=${e}></wui-loading-spinner>`}return null}};X.styles=[P.ET,P.ZM,q],K([(0,i.Cb)()],X.prototype,"size",void 0),K([(0,i.Cb)({type:Boolean})],X.prototype,"disabled",void 0),K([(0,i.Cb)({type:Boolean})],X.prototype,"fullWidth",void 0),K([(0,i.Cb)({type:Boolean})],X.prototype,"loading",void 0),K([(0,i.Cb)()],X.prototype,"variant",void 0),K([(0,i.Cb)()],X.prototype,"textVariant",void 0),X=K([(0,B.M)("wui-button")],X),o(31192),o(6210),o(71509);var J=(0,j.iv)` 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`,Q=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let G=class extends r.oi{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.dy)` 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 `}};G.styles=[P.ET,J],Q([(0,i.Cb)({type:Number})],G.prototype,"radius",void 0),G=Q([(0,B.M)("wui-loading-thumbnail")],G),o(79263),o(33394),o(27939);var Z=(0,j.iv)` 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`,ee=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let et=class extends r.oi{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,r.dy)` 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.ET,P.ZM,Z],ee([(0,i.Cb)({type:Boolean})],et.prototype,"disabled",void 0),ee([(0,i.Cb)()],et.prototype,"label",void 0),ee([(0,i.Cb)()],et.prototype,"buttonLabel",void 0),et=ee([(0,B.M)("wui-cta-button")],et);var eo=(0,c.iv)` 350 :host { 351 display: block; 352 padding: 0 ${({spacing:e})=>e["5"]} ${({spacing:e})=>e["5"]}; 353 } 354`,er=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let ei=class extends r.oi{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:o,chrome_store:i,homepage:a}=this.wallet,l=n.j.isMobile(),s=n.j.isIos(),d=n.j.isAndroid(),u=[t,o,a,i].filter(Boolean).length>1,h=c.Hg.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!l?(0,r.dy)` 355 <wui-cta-button 356 label=${`Don't have ${h}?`} 357 buttonLabel="Get" 358 @click=${()=>f.RouterController.push("Downloads",{wallet:this.wallet})} 359 ></wui-cta-button> 360 `:!u&&a?(0,r.dy)` 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&&s?(0,r.dy)` 367 <wui-cta-button 368 label=${`Don't have ${h}?`} 369 buttonLabel="Get" 370 @click=${this.onAppStore.bind(this)} 371 ></wui-cta-button> 372 `:o&&d?(0,r.dy)` 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.j.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&n.j.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&n.j.openHref(this.wallet.homepage,"_blank")}};ei.styles=[eo],er([(0,i.Cb)({type:Object}
378)],ei.prototype,"wallet",void 0),ei=er([(0,c.Mo)("w3m-mobile-download-links")],ei);var en=(0,c.iv)` 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`,ea=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};class el extends r.oi{constructor(){super(),this.wallet=f.RouterController.state.data?.wallet,this.connector=f.RouterController.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.f.getConnectorImage(this.connector)??y.f.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=p.ConnectionController.state.wcUri,this.error=p.ConnectionController.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.ConnectionController.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),p.ConnectionController.subscribeKey("wcError",e=>this.error=e)),(n.j.isTelegram()||n.j.isSafari())&&n.j.isIos()&&p.ConnectionController.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),p.ConnectionController.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.dy)` 450 <wui-flex 451 data-error=${(0,d.o)(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.o)(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.dy)` 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>
498 499 `:null} 500 </wui-flex> 501 502 ${this.isWalletConnect?(0,r.dy)` 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.ConnectionController.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=H.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,r.dy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(n.j.copyToClopboard(this.uri),S.SnackController.showSuccess("Link copied"))}catch{S.SnackController.showError("Failed to copy")}}}el.styles=en,ea([(0,i.SB)()],el.prototype,"isRetrying",void 0),ea([(0,i.SB)()],el.prototype,"uri",void 0),ea([(0,i.SB)()],el.prototype,"error",void 0),ea([(0,i.SB)()],el.prototype,"ready",void 0),ea([(0,i.SB)()],el.prototype,"showRetry",void 0),ea([(0,i.SB)()],el.prototype,"label",void 0),ea([(0,i.SB)()],el.prototype,"secondaryBtnLabel",void 0),ea([(0,i.SB)()],el.prototype,"secondaryLabel",void 0),ea([(0,i.SB)()],el.prototype,"isLoading",void 0),ea([(0,i.Cb)({type:Boolean})],el.prototype,"isMobile",void 0),ea([(0,i.Cb)()],el.prototype,"onRetry",void 0);let es=class extends el{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.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.RouterController.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=h.ConnectorController.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.ConnectionController.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");T.I.close(),g.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown",view:f.RouterController.state.view,walletRank:this.wallet?.order}})}catch(e){e instanceof A.g&&e.originalName===R.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.X.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.X.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};es=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a}([(0,c.Mo)("w3m-connecting-wc-browser")],es);let ec=class extends el{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.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.RouterController.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:o,href:r}=n.j.formatNativeUrl(e,this.uri);p.ConnectionController.setWcLinking({name:t,href:r}),p.ConnectionController.setRecentWallet(this.wallet),n.j.openHref(o,"_blank")}catch{this.error=!0}}};ec=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a}([(0,c.Mo)("w3m-connecting-wc-desktop")],ec);var ed=o(45861),eu=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eh=class extends el{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=a.OptionsController.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:o}=this.wallet,{redirect:r,redirectUniversalLink:i,href:a}=n.j.formatNativeUrl(e,this.uri,t);this.redirectDeeplink=r,this.redirectUniversalLink=i,this.target=n.j.isIframe()?"_top":"_self",p.ConnectionController.setWcLinking({name:o,href:a}),p.ConnectionController.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?n.j.openHref(this.redirectUniversalLink,this.target):n.j.openHref(this.redirectDeeplink,this.target)}catch(e){g.X.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.bq.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(p.ConnectionController.subscribeKey("wcUri",()=>{this.onHandleURI()})),g.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.RouterController.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){p.ConnectionController.setWcError(!1),this.onConnect?.()}};eu([(0,i.SB)()],eh.prototype,"redirectDeeplink",void 0),eu([(0,i.SB)()],eh.prototype,"redirectUniversalLink",void 0),eu([(0,i.SB)()],eh.prototype,"target",void 0),eu([(0,i.SB)()],eh.prototype,"preferUniversalLinks",void 0),eu([(0,i.SB)()],eh.prototype,"isLoading",void 0),eh=eu([(0,c.Mo)("w3m-connecting-wc-mobile")],eh),o(13128);var ep=o(62382);function eg(e,t,o){return e!==t&&(e-t<0?t-e:e-t)<=o+.1}let ef={generate({uri:e,size:t,logoSize:o,padding:i=8,dotColor:n="var(--apkt-colors-black)"}){let a=[],l=function(e,t){let o=Array.prototype.slice.call(ep.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),r=Math.sqrt(o.length);return o.reduce((e,t,o)=>(o%r==0?e.push([t]):e[e.length-1].push(t))&&e,[])}(e,0),s=(t-2*i)/l.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];
517c.forEach(({x:e,y:t})=>{let o=(l.length-7)*s*e+i,d=(l.length-7)*s*t+i;for(let e=0;e<c.length;e+=1){let t=s*(7-2*e);a.push((0,r.YP)` 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=${0===e?10:0} 525 height=${0===e?t-10:t} 526 x= ${0===e?d+s*e+5:d+s*e} 527 y= ${0===e?o+s*e+5:o+s*e} 528 /> 529 `)}});let d=Math.floor((o+25)/s),u=l.length/2-d/2,h=l.length/2+d/2-1,p=[];l.forEach((e,t)=>{e.forEach((e,o)=>{!l[t][o]||t<7&&o<7||t>l.length-8&&o<7||t<7&&o>l.length-8||t>u&&t<h&&o>u&&o<h||p.push([t*s+s/2+i,o*s+s/2+i])})});let g={};return p.forEach(([e,t])=>{g[e]?g[e]?.push(t):g[e]=[t]}),Object.entries(g).map(([e,t])=>{let o=t.filter(e=>t.every(t=>!eg(e,t,s)));return[Number(e),o]}).forEach(([e,t])=>{t.forEach(t=>{a.push((0,r.YP)`<circle cx=${e} cy=${t} fill=${n} r=${s/2.5} />`)})}),Object.entries(g).filter(([e,t])=>t.length>1).map(([e,t])=>{let o=t.filter(e=>t.some(t=>eg(e,t,s)));return[Number(e),o]}).map(([e,t])=>{t.sort((e,t)=>e<t?-1:1);let o=[];for(let e of t){let t=o.find(t=>t.some(t=>eg(e,t,s)));t?t.push(e):o.push([e])}return[e,o.map(e=>[e[0],e[e.length-1]])]}).forEach(([e,t])=>{t.forEach(([t,o])=>{a.push((0,r.YP)` 530 <line 531 x1=${e} 532 x2=${e} 533 y1=${t} 534 y2=${o} 535 stroke=${n} 536 stroke-width=${s/1.25} 537 stroke-linecap="round" 538 /> 539 `)})}),a}};var ew=(0,j.iv)` 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`,em=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eb=class extends r.oi{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.dy)`<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.YP)` 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.dy)`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?(0,r.dy)`<wui-icon 607 class="farcaster" 608 size="inherit" 609 color="inherit" 610 name="farcaster" 611 ></wui-icon>`:(0,r.dy)`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};eb.styles=[P.ET,ew],em([(0,i.Cb)()],eb.prototype,"uri",void 0),em([(0,i.Cb)({type:Number})],eb.prototype,"size",void 0),em([(0,i.Cb)()],eb.prototype,"theme",void 0),em([(0,i.Cb)()],eb.prototype,"imageSrc",void 0),em([(0,i.Cb)()],eb.prototype,"alt",void 0),em([(0,i.Cb)({type:Boolean})],eb.prototype,"arenaClear",void 0),em([(0,i.Cb)({type:Boolean})],eb.prototype,"farcaster",void 0),eb=em([(0,B.M)("wui-qr-code")],eb);var ey=(0,j.iv)` 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`,ev=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eC=class extends r.oi{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.dy)`<slot></slot>`}};eC.styles=[ey],ev([(0,i.Cb)()],eC.prototype,"width",void 0),ev([(0,i.Cb)()],eC.prototype,"height",void 0),ev([(0,i.Cb)()],eC.prototype,"variant",void 0),ev([(0,i.Cb)({type:Boolean})],eC.prototype,"rounded",void 0),eC=ev([(0,B.M)("wui-shimmer")],eC),o(86425);var ex=(0,c.iv)` 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`,e$=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let ek=class extends el{constructor(){super(),this.basic=!1,this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate)}firstUpdated(){this.basic||g.X.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.RouterController.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),(0,r.dy)` 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.ConnectionController.setWcLinking(void 0),p.ConnectionController.setRecentWallet(this.wallet);let o=this.uri;if(this.wallet?.mobile_link){let{redirect:e}=n.j.formatNativeUrl(this.wallet?.mobile_link,this.uri,null);o=e}return(0,r.dy)` <wui-qr-code 676 size=${e} 677 theme=${H.ThemeController.state.themeMode} 678 uri=${o} 679 imageSrc=${(0,d.o)(y.f.getWalletImage(this.wallet))} 680 color=${(0,d.o)(H.ThemeController.state.themeVariables["--w3m-qr-color"])} 681 alt=${(0,d.o)(t)} 682 data-testid="wui-qr-code" 683 ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,r.dy)`<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>`}};ek.styles=ex,e$([(0,i.Cb)({type:Boolean})],ek.prototype,"basic",void 0),ek=e$([(0,c.Mo)("w3m-connecting-wc-qrcode")],ek);let eR=class extends r.oi{constructor(){if(super(),this.wallet=f.RouterController.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");g.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.RouterController.state.view}})}render(){return(0,r.dy)` 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.o)(y.f.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 `}};eR=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a}([(0,c.Mo)("w3m-connecting-wc-unsupported")],eR);var eE=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eS=class extends el{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.bq.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(p.ConnectionController.subscribeKey("wcUri",()=>{this.updateLoadingState()})),g.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.RouterController.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:o,href:r}=n.j.formatUniversalUrl(e,this.uri);p.ConnectionController.setWcLinking({name:t,href:r}),p.ConnectionController.setRecentWallet(this.wallet),n.j.openHref(o,"_blank")}catch{this.error=!0}}};eE([(0,i.SB)()],eS.prototype,"isLoading",void 0),eS=eE([(0,c.Mo)("w3m-connecting-wc-web")],eS);var eT=(0,c.iv)` 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`,eA=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eI=class extends r.oi{constructor(){super(),this.wallet=f.RouterController.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!a.OptionsController.state.siwx,this.remoteFeatures=a.OptionsController.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(a.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
718disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return a.OptionsController.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,r.dy)` 719 ${this.headerTemplate()} 720 <div class="platform-container">${this.platformTemplate()}</div> 721 ${this.reownBrandingTemplate()} 722 `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?(0,r.dy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!a.OptionsController.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:o}=p.ConnectionController.state,{redirectView:r}=f.RouterController.state.data??{};if(e||a.OptionsController.state.enableEmbedded||n.j.isPairingExpired(t)||"connecting"===o){let e=p.ConnectionController.getConnections(E.R.state.activeChain),t=this.remoteFeatures?.multiWallet,o=e.length>0;await p.ConnectionController.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(o&&t?(f.RouterController.replace("ProfileWallets"),S.SnackController.showSuccess("New Wallet Added")):r?f.RouterController.replace(r):T.I.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!a.OptionsController.state.enableNetworkSwitch&&E.R.state.activeChain){E.R.setActiveCaipNetwork(I.f.getUnsupportedNetwork(`${E.R.state.activeChain}:${E.R.state.activeCaipNetwork?.id}`)),E.R.showUnsupportedChainUI();return}e instanceof A.g&&e.originalName===R.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.X.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.X.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),p.ConnectionController.setWcError(!0),S.SnackController.showError(e.message??"Connection error"),p.ConnectionController.resetWcConnection(),f.RouterController.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:o,injected:r,rdns:i}=this.wallet,l=r?.map(({injected_id:e})=>
722e).filter(Boolean),s=[...i?[i]:l??[]],c=!a.OptionsController.state.isUniversalProvider&&s.length,d=p.ConnectionController.checkInstalled(s),u=c&&d,h=t&&!n.j.isMobile();u&&!E.R.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(n.j.isMobile()?"mobile":"qrcode"),o&&this.platforms.push("web"),h&&this.platforms.push("desktop"),u||!c||E.R.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,r.dy)`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return(0,r.dy)`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return(0,r.dy)` 723 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 724 </w3m-connecting-wc-desktop> 725 `;case"mobile":return(0,r.dy)` 726 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 727 </w3m-connecting-wc-mobile> 728 `;case"qrcode":return(0,r.dy)`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return(0,r.dy)`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?(0,r.dy)` 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"}))}};eI.styles=eT,eA([(0,i.SB)()],eI.prototype,"platform",void 0),eA([(0,i.SB)()],eI.prototype,"platforms",void 0),eA([(0,i.SB)()],eI.prototype,"isSiwxEnabled",void 0),eA([(0,i.SB)()],eI.prototype,"remoteFeatures",void 0),eA([(0,i.Cb)({type:Boolean})],eI.prototype,"displayBranding",void 0),eA([(0,i.Cb)({type:Boolean})],eI.prototype,"basic",void 0),eI=eA([(0,c.Mo)("w3m-connecting-wc-view")],eI);var eP=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eB=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.isMobile=n.j.isMobile(),this.remoteFeatures=a.OptionsController.state.remoteFeatures,this.unsubscribe.push(a.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=l.ApiController.state,{customWallets:o}=a.OptionsController.state,i=s.M.getRecentWallets(),n=e.length||t.length||o?.length||i.length;return(0,r.dy)`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}> 735 ${n?(0,r.dy)`<w3m-connector-list></w3m-connector-list>`:null} 736 <w3m-all-wallets-widget></w3m-all-wallets-widget> 737 </wui-flex>`}return(0,r.dy)`<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.dy)` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}> 744 <wui-ux-by-reown></wui-ux-by-reown> 745 </wui-flex>`:null}};eP([(0,i.SB)()],eB.prototype,"isMobile",void 0),eP([(0,i.SB)()],eB.prototype,"remoteFeatures",void 0),eB=eP([(0,c.Mo)("w3m-connecting-wc-basic-view")],eB);var ej=o(90269);/** 746 * @license 747 * Copyright 2020 Google LLC 748 * SPDX-License-Identifier: BSD-3-Clause 749 */let{I:eL}=ej._$LH,eO=e=>void 0===e.strings;var eM=o(60279);/** 750 * @license 751 * Copyright 2017 Google LLC 752 * SPDX-License-Identifier: BSD-3-Clause 753 */let eN=(e,t)=>{let o=e._$AN;if(void 0===o)return!1;for(let e of o)e._$AO?.(t,!1),eN(e,t);return!0},ez=e=>{let t,o;do{if(void 0===(t=e._$AM))break;(o=t._$AN).delete(e),e=t}while(0===o?.size)},eW=e=>{for(let t;t=e._$AM;e=t){let o=t._$AN;if(void 0===o)t._$AN=o=new Set;else if(o.has(e))break;o.add(e),eU(t)}};function e_(e){void 0!==this._$AN?(ez(this),this._$AM=e,eW(this)):this._$AM=e}function eD(e,t=!1,o=0){let r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size){if(t){if(Array.isArray(r))for(let e=o;e<r.length;e++)eN(r[e],!1),ez(r[e]);else null!=r&&(eN(r,!1),ez(r))}else eN(this,e)}}let eU=e=>{e.type==eM.pX.CHILD&&(e._$AP??=eD,e._$AQ??=e_)};class eF extends eM.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,o){super._$AT(e,t,o),eW(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(eN(this,e),ez(this))}setValue(e){if(eO(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}/** 754 * @license 755 * Copyright 2020 Google LLC 756 * SPDX-License-Identifier: BSD-3-Clause 757 */let eH=()=>new eq;class eq{}let eK=new WeakMap,eV=(0,eM.XM)(class extends eF{render(e){return ej.Ld}update(e,[t]){let o=t!==this.G;return o&&void 0!==this.G&&this.rt(void 0),(o||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),ej.Ld}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,o=eK.get(t);void 0===o&&(o=new WeakMap,eK.set(t,o)),void 0!==o.get(this.G)&&this.G.call(this.ht,void 0),o.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?eK.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var eY=(0,j.iv)` 758 :host { 759 display: flex; 760 align-items: center; 761 justify-content: center; 762 } 763 764 label { 765 position: relative; 766 display: inline-block; 767 user-select: none; 768 transition: 769 background-color ${({durations:e})=>e.lg} 770 ${({easings:e})=>e["ease-out-power-2"]}, 771 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 772 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 773 box-shadow ${({durations:e})=>e.lg} 774 ${({easings:e})=>e["ease-out-power-2"]}, 775 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 776 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 777 transform ${({durations:e})=>e.lg} 778 ${({easings:e})=>e["ease-out-power-2"]}, 779 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 780 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 781 } 782 783 input { 784 width: 0; 785 height: 0; 786 opacity: 0; 787 } 788 789 span { 790 position: absolute; 791 cursor: pointer; 792 top: 0; 793 left: 0; 794 right: 0; 795 bottom: 0; 796 background-color: ${({colors:e})=>e.neutrals300}; 797 border-radius: ${({borderRadius:e})=>e.round}; 798 border: 1px solid transparent; 799 will-change: border; 800 transition: 801 background-color ${({durations:e})=>e.lg} 802 ${({easings:e})=>e["ease-out-power-2"]}, 803 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 804 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 805 box-shadow ${({durations:e})=>e.lg} 806 ${({easings:e})=>e["ease-out-power-2"]}, 807 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 808 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 809 transform ${({durations:e})=>e.lg} 810 ${({easings:e})=>e["ease-out-power-2"]}, 811 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 812 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 813 } 814 815 span:before { 816 content: ''; 817 position: absolute; 818 background-color: ${({colors:e})=>e.white}; 819 border-radius: 50%; 820 } 821 822 /* -- Sizes --------------------------------------------------------- */ 823 label[data-size='lg'] { 824 width: 48px; 825 height: 32px; 826 } 827 828 label[data-size='md'] { 829 width: 40px; 830 height: 28px; 831 } 832 833 label[data-size='sm'] { 834 width: 32px; 835 height: 22px; 836 } 837 838 label[data-size='lg'] > span:before { 839 height: 24px; 840 width: 24px; 841 left: 4px; 842 top: 3px; 843 } 844 845 label[data-size='md'] > span:before { 846 height: 20px;
847 width: 20px; 848 left: 4px; 849 top: 3px; 850 } 851 852 label[data-size='sm'] > span:before { 853 height: 16px; 854 width: 16px; 855 left: 3px; 856 top: 2px; 857 } 858 859 /* -- Focus states --------------------------------------------------- */ 860 input:focus-visible:not(:checked) + span, 861 input:focus:not(:checked) + span { 862 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 863 background-color: ${({tokens:e})=>e.theme.textTertiary}; 864 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 865 } 866 867 input:focus-visible:checked + span, 868 input:focus:checked + span { 869 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 870 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 871 } 872 873 /* -- Checked states --------------------------------------------------- */ 874 input:checked + span { 875 background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; 876 } 877 878 label[data-size='lg'] > input:checked + span:before { 879 transform: translateX(calc(100% - 9px)); 880 } 881 882 label[data-size='md'] > input:checked + span:before { 883 transform: translateX(calc(100% - 9px)); 884 } 885 886 label[data-size='sm'] > input:checked + span:before { 887 transform: translateX(calc(100% - 7px)); 888 } 889 890 /* -- Hover states ------------------------------------------------------- */ 891 label:hover > input:not(:checked):not(:disabled) + span { 892 background-color: ${({colors:e})=>e.neutrals400}; 893 } 894 895 label:hover > input:checked:not(:disabled) + span { 896 background-color: ${({colors:e})=>e.accent080}; 897 } 898 899 /* -- Disabled state --------------------------------------------------- */ 900 label:has(input:disabled) { 901 pointer-events: none; 902 user-select: none; 903 } 904 905 input:not(:checked):disabled + span { 906 background-color: ${({colors:e})=>e.neutrals700}; 907 } 908 909 input:checked:disabled + span { 910 background-color: ${({colors:e})=>e.neutrals700}; 911 } 912 913 input:not(:checked):disabled + span::before { 914 background-color: ${({colors:e})=>e.neutrals400}; 915 } 916 917 input:checked:disabled + span::before { 918 background-color: ${({tokens:e})=>e.theme.textTertiary}; 919 } 920`,eX=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eJ=class extends r.oi{constructor(){super(...arguments),this.inputElementRef=eH(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return(0,r.dy)` 921 <label data-size=${this.size}> 922 <input 923 ${eV(this.inputElementRef)} 924 type="checkbox" 925 ?checked=${this.checked} 926 ?disabled=${this.disabled} 927 @change=${this.dispatchChangeEvent.bind(this)} 928 /> 929 <span></span> 930 </label> 931 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};eJ.styles=[P.ET,P.ZM,eY],eX([(0,i.Cb)({type:Boolean})],eJ.prototype,"checked",void 0),eX([(0,i.Cb)({type:Boolean})],eJ.prototype,"disabled",void 0),eX([(0,i.Cb)()],eJ.prototype,"size",void 0),eJ=eX([(0,B.M)("wui-toggle")],eJ);var eQ=(0,j.iv)` 932 :host { 933 height: auto; 934 } 935 936 :host > wui-flex { 937 height: 100%; 938 display: flex; 939 align-items: center; 940 justify-content: center; 941 column-gap: ${({spacing:e})=>e["2"]}; 942 padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]}; 943 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 944 border-radius: ${({borderRadius:e})=>e["4"]}; 945 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; 946 transition: background-color ${({durations:e})=>e.lg} 947 ${({easings:e})=>e["ease-out-power-2"]}; 948 will-change: background-color; 949 cursor: pointer; 950 } 951 952 wui-switch { 953 pointer-events: none; 954 } 955`,eG=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let eZ=class extends r.oi{constructor(){super(...arguments),this.checked=!1}
955render(){return(0,r.dy)` 956 <wui-flex> 957 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 958 <wui-toggle 959 ?checked=${this.checked} 960 size="sm" 961 @switchChange=${this.handleToggleChange.bind(this)} 962 ></wui-toggle> 963 </wui-flex> 964 `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};eZ.styles=[P.ET,P.ZM,eQ],eG([(0,i.Cb)({type:Boolean})],eZ.prototype,"checked",void 0),eZ=eG([(0,B.M)("wui-certified-switch")],eZ);var e0=(0,j.iv)` 965 :host { 966 position: relative; 967 width: 100%; 968 display: inline-flex; 969 flex-direction: column; 970 gap: ${({spacing:e})=>e[3]}; 971 color: ${({tokens:e})=>e.theme.textPrimary}; 972 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 973 } 974 975 .wui-input-text-container { 976 position: relative; 977 display: flex; 978 } 979 980 input { 981 width: 100%; 982 border-radius: ${({borderRadius:e})=>e[4]}; 983 color: inherit; 984 background: transparent; 985 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 986 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 987 padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]} 988 ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]}; 989 font-size: ${({textSize:e})=>e.large}; 990 line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; 991 letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; 992 font-weight: ${({fontWeight:e})=>e.regular}; 993 font-family: ${({fontFamily:e})=>e.regular}; 994 } 995 996 input[data-size='lg'] { 997 padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]} 998 ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]}; 999 } 1000 1001 @media (hover: hover) and (pointer: fine) { 1002 input:hover:enabled { 1003 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 1004 } 1005 } 1006 1007 input:disabled { 1008 cursor: unset; 1009 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 1010 } 1011 1012 input::placeholder { 1013 color: ${({tokens:e})=>e.theme.textSecondary}; 1014 } 1015 1016 input:focus:enabled { 1017 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 1018 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1019 -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1020 -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1021 box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1022 } 1023 1024 div.wui-input-text-container:has(input:disabled) { 1025 opacity: 0.5; 1026 } 1027 1028 wui-icon.wui-input-text-left-icon { 1029 position: absolute; 1030 top: 50%; 1031 transform: translateY(-50%); 1032 pointer-events: none; 1033 left: ${({spacing:e})=>e[4]}; 1034 color: ${({tokens:e})=>e.theme.iconDefault}; 1035 } 1036 1037 button.wui-input-text-submit-button { 1038 position: absolute; 1039 top: 50%; 1040 transform: translateY(-50%); 1041 right: ${({spacing:e})=>e[3]}; 1042 width: 24px; 1043 height: 24px; 1044 border: none; 1045 background: transparent; 1046 border-radius: ${({borderRadius:e})=>e[2]}; 1047 color: ${({tokens:e})=>e.core.textAccentPrimary}; 1048 } 1049 1050 button.wui-input-text-submit-button:disabled { 1051 opacity: 1; 1052 } 1053 1054 button.wui-input-text-submit-button.loading wui-icon { 1055 animation: spin 1s linear infinite; 1056 } 1057 1058 button.wui-input-text-submit-button:hover { 1059 background: ${({tokens:e})=>e.core.foregroundAccent010}; 1060 } 1061 1062 input:has(+ .wui-input-text-submit-button) { 1063 padding-right: ${({spacing:e})=>e[12]}; 1064 } 1065 1066 input[type='number'] { 1067 -moz-appearance: textfield; 1068 } 1069 1070 input[type='search']::-webkit-search-decoration, 1071 input[type='search']::-webkit-search-cancel-button, 1072 input[type='search']::-webkit-search-results-button, 1073 input[type='search']::-webkit-search-results-decoration { 1074 -webkit-appearance: none; 1075 } 1076 1077 /* -- Keyframes --------------------------------------------------- */ 1078 @keyframes spin { 1079 from { 1080 transform: rotate(0deg); 1081 } 1082 to { 1083 transform: rotate(360deg); 1084 } 1085 } 1086`,e1=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let e3=class extends r.oi{constructor(){super(...arguments),this.inputElementRef=eH(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return(0,r.dy)` <div class="wui-input-text-container"> 1087 ${this.templateLeftIcon()} 1088 <input 1089 data-size=${this.size} 1090 ${eV(this.inputElementRef)} 1091 data-testid="wui-input-text" 1092 type=${this.type} 1093 enterkeyhint=${(0,d.o)(this.enterKeyHint)} 1094 ?disabled=${this.disabled} 1095 placeholder=${this.placeholder}
1096 @input=${this.dispatchInputChangeEvent.bind(this)} 1097 @keydown=${this.onKeyDown} 1098 .value=${this.value||""} 1099 /> 1100 ${this.templateSubmitButton()} 1101 <slot class="wui-input-text-slot"></slot> 1102 </div> 1103 ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?(0,r.dy)`<wui-icon 1104 class="wui-input-text-left-icon" 1105 size="md" 1106 data-size=${this.size} 1107 color="inherit" 1108 name=${this.icon} 1109 ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?(0,r.dy)`<button 1110 class="wui-input-text-submit-button ${this.loading?"loading":""}" 1111 @click=${this.onSubmit?.bind(this)} 1112 ?disabled=${this.disabled||this.loading} 1113 > 1114 ${this.loading?(0,r.dy)`<wui-icon name="spinner" size="md"></wui-icon>`:(0,r.dy)`<wui-icon name="chevronRight" size="md"></wui-icon>`} 1115 </button>`:null}templateError(){return this.errorText?(0,r.dy)`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?(0,r.dy)`<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}))}};e3.styles=[P.ET,P.ZM,e0],e1([(0,i.Cb)()],e3.prototype,"icon",void 0),e1([(0,i.Cb)({type:Boolean})],e3.prototype,"disabled",void 0),e1([(0,i.Cb)({type:Boolean})],e3.prototype,"loading",void 0),e1([(0,i.Cb)()],e3.prototype,"placeholder",void 0),e1([(0,i.Cb)()],e3.prototype,"type",void 0),e1([(0,i.Cb)()],e3.prototype,"value",void 0),e1([(0,i.Cb)()],e3.prototype,"errorText",void 0),e1([(0,i.Cb)()],e3.prototype,"warningText",void 0),e1([(0,i.Cb)()],e3.prototype,"onSubmit",void 0),e1([(0,i.Cb)()],e3.prototype,"size",void 0),e1([(0,i.Cb)({attribute:!1})],e3.prototype,"onKeyDown",void 0),e3=e1([(0,B.M)("wui-input-text")],e3);var e2=(0,j.iv)` 1116 :host { 1117 position: relative; 1118 display: inline-block; 1119 width: 100%; 1120 } 1121 1122 wui-icon { 1123 position: absolute; 1124 top: 50%; 1125 transform: translateY(-50%); 1126 right: ${({spacing:e})=>e[3]}; 1127 color: ${({tokens:e})=>e.theme.iconDefault}; 1128 cursor: pointer; 1129 padding: ${({spacing:e})=>e[2]}; 1130 background-color: transparent; 1131 border-radius: ${({borderRadius:e})=>e[4]}; 1132 transition: background-color ${({durations:e})=>e.lg} 1133 ${({easings:e})=>e["ease-out-power-2"]}; 1134 } 1135 1136 @media (hover: hover) { 1137 wui-icon:hover { 1138 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1139 } 1140 } 1141`,e5=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let e4=class extends r.oi{constructor(){super(...arguments),this.inputComponentRef=eH(),this.inputValue=""}render(){return(0,r.dy)` 1142 <wui-input-text 1143 ${eV(this.inputComponentRef)} 1144 placeholder="Search wallet" 1145 icon="search" 1146 type="search" 1147 enterKeyHint="search" 1148 size="sm" 1149 @inputChange=${this.onInputChange} 1150 > 1151 ${this.inputValue?(0,r.dy)`<wui-icon 1152 @click=${this.clearValue} 1153 color="inherit" 1154 size="sm" 1155 name="close" 1156 ></wui-icon>`:null} 1157 </wui-input-text> 1158 `}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")))}};e4.styles=[P.ET,e2],e5([(0,i.Cb)()],e4.prototype,"inputValue",void 0),e4=e5([(0,B.M)("wui-search-bar")],e4);let e6=(0,r.YP)`<svg viewBox="0 0 48 54" fill="none"> 1159 <path 1160 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" 1161 /> 1162</svg>`;var e8=(0,j.iv)` 1163 :host { 1164 display: flex; 1165 flex-direction: column; 1166 justify-content: center;
1167 align-items: center; 1168 height: 104px; 1169 width: 104px; 1170 row-gap: ${({spacing:e})=>e[2]}; 1171 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1172 border-radius: ${({borderRadius:e})=>e[5]}; 1173 position: relative; 1174 } 1175 1176 wui-shimmer[data-type='network'] { 1177 border: none; 1178 -webkit-clip-path: var(--apkt-path-network); 1179 clip-path: var(--apkt-path-network); 1180 } 1181 1182 svg { 1183 position: absolute; 1184 width: 48px; 1185 height: 54px; 1186 z-index: 1; 1187 } 1188 1189 svg > path { 1190 stroke: ${({tokens:e})=>e.theme.foregroundSecondary}; 1191 stroke-width: 1px; 1192 } 1193 1194 @media (max-width: 350px) { 1195 :host { 1196 width: 100%; 1197 } 1198 } 1199`,e9=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let e7=class extends r.oi{constructor(){super(...arguments),this.type="wallet"}render(){return(0,r.dy)` 1200 ${this.shimmerTemplate()} 1201 <wui-shimmer width="80px" height="20px"></wui-shimmer> 1202 `}shimmerTemplate(){return"network"===this.type?(0,r.dy)` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer> 1203 ${e6}`:(0,r.dy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};e7.styles=[P.ET,P.ZM,e8],e9([(0,i.Cb)()],e7.prototype,"type",void 0),e7=e9([(0,B.M)("wui-card-select-loader")],e7);var te=o(38852),tt=(0,r.iv)` 1204 :host { 1205 display: grid; 1206 width: inherit; 1207 height: inherit; 1208 } 1209`,to=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let tr=class extends r.oi{render(){return this.style.cssText=` 1210 grid-template-rows: ${this.gridTemplateRows}; 1211 grid-template-columns: ${this.gridTemplateColumns}; 1212 justify-items: ${this.justifyItems}; 1213 align-items: ${this.alignItems}; 1214 justify-content: ${this.justifyContent}; 1215 align-content: ${this.alignContent}; 1216 column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; 1217 row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; 1218 gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; 1219 padding-top: ${this.padding&&te.H.getSpacingStyles(this.padding,0)}; 1220 padding-right: ${this.padding&&te.H.getSpacingStyles(this.padding,1)}; 1221 padding-bottom: ${this.padding&&te.H.getSpacingStyles(this.padding,2)}; 1222 padding-left: ${this.padding&&te.H.getSpacingStyles(this.padding,3)}; 1223 margin-top: ${this.margin&&te.H.getSpacingStyles(this.margin,0)}; 1224 margin-right: ${this.margin&&te.H.getSpacingStyles(this.margin,1)}; 1225 margin-bottom: ${this.margin&&te.H.getSpacingStyles(this.margin,2)}; 1226 margin-left: ${this.margin&&te.H.getSpacingStyles(this.margin,3)}; 1227 `,(0,r.dy)`<slot></slot>`}};tr.styles=[P.ET,tt],to([(0,i.Cb)()],tr.prototype,"gridTemplateRows",void 0),to([(0,i.Cb)()],tr.prototype,"gridTemplateColumns",void 0),to([(0,i.Cb)()],tr.prototype,"justifyItems",void 0),to([(0,i.Cb)()],tr.prototype,"alignItems",void 0),to([(0,i.Cb)()],tr.prototype,"justifyContent",void 0),to([(0,i.Cb)()],tr.prototype,"alignContent",void 0),to([(0,i.Cb)()],tr.prototype,"columnGap",void 0),to([(0,i.Cb)()],tr.prototype,"rowGap",void 0),to([(0,i.Cb)()],tr.prototype,"gap",void 0),to([(0,i.Cb)()],tr.prototype,"padding",void 0),to([(0,i.Cb)()],tr.prototype,"margin",void 0),tr=to([(0,B.M)("wui-grid")],tr);var ti=o(64456),tn=(0,c.iv)` 1228 button { 1229 display: flex; 1230 flex-direction: column; 1231 justify-content: center; 1232 align-items: center; 1233 cursor: pointer; 1234 width: 104px; 1235 row-gap: ${({spacing:e})=>e["2"]}; 1236 padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["0"]}; 1237 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1238 border-radius: clamp(0px, ${({borderRadius:e})=>e["4"]}, 20px); 1239 transition: 1240 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 1241 background-color ${({durations:e})=>e.lg} 1242 ${({easings:e})=>e["ease-out-power-1"]}, 1243 border-radius ${({durations:e})=>e.lg} 1244 ${({easings:e})=>e["ease-out-power-1"]}; 1245 will-change: background-color, color, border-radius; 1246 outline: none; 1247 border: none; 1248 } 1249 1250 button > wui-flex > wui-text { 1251 color: ${({tokens:e})=>e.theme.textPrimary}; 1252 max-width: 86px; 1253 white-space: nowrap; 1254 overflow: hidden; 1255 text-overflow: ellipsis; 1256 justify-content: center; 1257 } 1258 1259 button > wui-flex > wui-text.certified { 1260 max-width: 66px; 1261 } 1262 1263 @media (hover: hover) and (pointer: fine) { 1264 button:hover:enabled { 1265 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1266 } 1267 } 1268 1269 button:disabled > wui-flex > wui-text { 1270 color: ${({tokens:e})=>e.core.glass010}; 1271 } 1272 1273 [data-selected='true'] { 1274 background-color: ${({colors:e})=>e.accent020}; 1275 } 1276 1277 @media (hover: hover) and (pointer: fine) { 1278 [data-selected='true']:hover:enabled { 1279 background-color: ${({colors:e})=>e.accent010}; 1280 } 1281 } 1282 1283 [data-selected='true']:active:enabled { 1284 background-color: ${({colors:e})=>e.accent010}; 1285 } 1286 1287 @media (max-width: 350px) { 1288 button { 1289 width: 100%; 1290 } 1291 } 1292`,ta=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let tl=class extends r.oi{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=>
1292{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.dy)` 1293 <button> 1294 ${this.imageTemplate()} 1295 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1"> 1296 <wui-text 1297 variant="md-regular" 1298 color="inherit" 1299 class=${(0,d.o)(e?"certified":void 0)} 1300 >${this.wallet?.name}</wui-text 1301 > 1302 ${e?(0,r.dy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 1303 </wui-flex> 1304 </button> 1305 `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,r.dy)` 1306 <wui-wallet-image 1307 size="lg" 1308 imageSrc=${(0,d.o)(this.imageSrc)} 1309 name=${(0,d.o)(this.wallet?.name)} 1310 .installed=${this.wallet?.installed??!1} 1311 badgeSize="sm" 1312 > 1313 </wui-wallet-image> 1314 `:this.shimmerTemplate()}shimmerTemplate(){return(0,r.dy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=y.f.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await y.f.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,g.X.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:f.RouterController.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};tl.styles=tn,ta([(0,i.SB)()],tl.prototype,"visible",void 0),ta([(0,i.SB)()],tl.prototype,"imageSrc",void 0),ta([(0,i.SB)()],tl.prototype,"imageLoading",void 0),ta([(0,i.SB)()],tl.prototype,"isImpressed",void 0),ta([(0,i.Cb)()],tl.prototype,"explorerId",void 0),ta([(0,i.Cb)()],tl.prototype,"walletQuery",void 0),ta([(0,i.Cb)()],tl.prototype,"certified",void 0),ta([(0,i.Cb)()],tl.prototype,"displayIndex",void 0),ta([(0,i.Cb)({type:Object})],tl.prototype,"wallet",void 0),tl=ta([(0,c.Mo)("w3m-all-wallets-list-item")],tl);var ts=(0,c.iv)` 1315 wui-grid { 1316 max-height: clamp(360px, 400px, 80vh); 1317 overflow: scroll; 1318 scrollbar-width: none; 1319 grid-auto-rows: min-content; 1320 grid-template-columns: repeat(auto-fill, 104px); 1321 } 1322 1323 :host([data-mobile-fullscreen='true']) wui-grid { 1324 max-height: none; 1325 } 1326 1327 @media (max-width: 350px) { 1328 wui-grid { 1329 grid-template-columns: repeat(2, 1fr); 1330 } 1331 } 1332 1333 wui-grid[data-scroll='false'] { 1334 overflow: hidden; 1335 } 1336 1337 wui-grid::-webkit-scrollbar {
1338 display: none; 1339 } 1340 1341 w3m-all-wallets-list-item { 1342 opacity: 0; 1343 animation-duration: ${({durations:e})=>e.xl}; 1344 animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]}; 1345 animation-name: fade-in; 1346 animation-fill-mode: forwards; 1347 } 1348 1349 @keyframes fade-in { 1350 from { 1351 opacity: 0; 1352 } 1353 to { 1354 opacity: 1; 1355 } 1356 } 1357 1358 wui-loading-spinner { 1359 padding-top: ${({spacing:e})=>e["4"]}; 1360 padding-bottom: ${({spacing:e})=>e["4"]}; 1361 justify-content: center; 1362 grid-column: 1 / span 4; 1363 } 1364`,tc=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let td="local-paginator",tu=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!l.ApiController.state.wallets.length,this.wallets=l.ApiController.state.wallets,this.recommended=l.ApiController.state.recommended,this.featured=l.ApiController.state.featured,this.filteredWallets=l.ApiController.state.filteredWallets,this.mobileFullScreen=a.OptionsController.state.enableMobileFullScreen,this.unsubscribe.push(l.ApiController.subscribeKey("wallets",e=>this.wallets=e),l.ApiController.subscribeKey("recommended",e=>this.recommended=e),l.ApiController.subscribeKey("featured",e=>this.featured=e),l.ApiController.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.dy)` 1365 <wui-grid 1366 data-scroll=${!this.loading} 1367 .padding=${["0","3","3","3"]} 1368 gap="2" 1369 justifyContent="space-between" 1370 > 1371 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 1372 ${this.paginationLoaderTemplate()} 1373 </wui-grid> 1374 `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await l.ApiController.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.dy)` 1375 <wui-card-select-loader type="wallet" id=${(0,d.o)(t)}></wui-card-select-loader> 1376 `)}getWallets(){let e=[...this.featured,...this.recommended];this.filteredWallets?.length>0?e.push(...this.filteredWallets):e.push(...this.wallets);let t=n.j.uniqueBy(e,"id"),o=ti.J.markWalletsAsInstalled(t);return ti.J.markWalletsWithDisplayIndex(o)}walletsTemplate(){return this.getWallets().map((e,t)=>(0,r.dy)` 1377 <w3m-all-wallets-list-item 1378 data-testid="wallet-search-item-${e.id}" 1379 @click=${()=>this.onConnectWallet(e)} 1380 .wallet=${e} 1381 explorerId=${e.id} 1382 certified=${"certified"===this.badge} 1383 displayIndex=${t} 1384 ></w3m-all-wallets-list-item> 1385 `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:o,count:r,mobileFilteredOutWalletsLength:i}=l.ApiController.state,n=window.innerWidth<352?3:4,a=e.length+t.length,s=Math.ceil(a/n)*n-a+n;return(s-=e.length?o.length%n:0,0===r&&o.length>0)?null:0===r||[...o,...e,...t].length<r-(i??0)?this.shimmerTemplate(s,td):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${td}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:o}=l.ApiController.state;o.length<t&&l.ApiController.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){h.ConnectorController.selectWalletConnector(e)}};tu.styles=ts,tc([(0,i.SB)()],tu.prototype,"loading",void 0),tc([(0,i.SB)()],tu.prototype,"wallets",void 0),tc([(0,i.SB)()],tu.prototype,"recommended",void 0),tc([(0,i.SB)()],tu.prototype,"featured",void 0),tc([(0,i.SB)()],tu.prototype,"filteredWallets",void 0),tc([(0,i.SB)()],tu.prototype,"badge",void 0),tc([(0,i.SB)()],tu.prototype,"mobileFullScreen",void 0),tu=tc([(0,c.Mo)("w3m-all-wallets-list")],tu);var th=(0,r.iv)` 1386 wui-grid, 1387 wui-loading-spinner, 1388 wui-flex { 1389 height: 360px; 1390 } 1391 1392 wui-grid { 1393 overflow: scroll; 1394 scrollbar-width: none; 1395 grid-auto-rows: min-content; 1396 grid-template-columns: repeat(auto-fill, 104px); 1397 } 1398 1399 :host([data-mobile-fullscreen='true']) wui-grid { 1400 max-height: none; 1401 height: auto; 1402 } 1403 1404 wui-grid[data-scroll='false'] { 1405 overflow: hidden; 1406 } 1407 1408 wui-grid::-webkit-scrollbar {
1409 display: none; 1410 } 1411 1412 wui-loading-spinner { 1413 justify-content: center; 1414 align-items: center; 1415 } 1416 1417 @media (max-width: 350px) { 1418 wui-grid { 1419 grid-template-columns: repeat(2, 1fr); 1420 } 1421 } 1422`,tp=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let tg=class extends r.oi{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=a.OptionsController.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,r.dy)`<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 l.ApiController.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=l.ApiController.state,t=ti.J.markWalletsAsInstalled(e);return e.length?(0,r.dy)` 1423 <wui-grid 1424 data-testid="wallet-list" 1425 .padding=${["0","3","3","3"]} 1426 rowGap="4" 1427 columngap="2" 1428 justifyContent="space-between" 1429 > 1430 ${t.map((e,t)=>(0,r.dy)` 1431 <w3m-all-wallets-list-item 1432 @click=${()=>this.onConnectWallet(e)} 1433 .wallet=${e} 1434 data-testid="wallet-search-item-${e.id}" 1435 explorerId=${e.id} 1436 certified=${"certified"===this.badge} 1437 walletQuery=${this.query} 1438 displayIndex=${t} 1439 ></w3m-all-wallets-list-item> 1440 `)} 1441 </wui-grid> 1442 `:(0,r.dy)` 1443 <wui-flex 1444 data-testid="no-wallet-found" 1445 justifyContent="center" 1446 alignItems="center" 1447 gap="3" 1448 flexDirection="column" 1449 > 1450 <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box> 1451 <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium"> 1452 No Wallet found 1453 </wui-text> 1454 </wui-flex> 1455 `}onConnectWallet(e){h.ConnectorController.selectWalletConnector(e)}};tg.styles=th,tp([(0,i.SB)()],tg.prototype,"loading",void 0),tp([(0,i.SB)()],tg.prototype,"mobileFullScreen",void 0),tp([(0,i.Cb)()],tg.prototype,"query",void 0),tp([(0,i.Cb)()],tg.prototype,"badge",void 0),tg=tp([(0,c.Mo)("w3m-all-wallets-search")],tg);var tf=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let tw=class extends r.oi{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=n.j.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,r.dy)` 1456 <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center"> 1457 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 1458 <wui-certified-switch 1459 ?checked=${"certified"===this.badge} 1460 @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)} 1461 data-testid="wui-certified-switch" 1462 ></wui-certified-switch> 1463 ${this.qrButtonTemplate()} 1464 </wui-flex> 1465 ${e||this.badge?(0,r.dy)`<w3m-all-wallets-search 1466 query=${this.search} 1467 .badge=${this.badge} 1468 ></w3m-all-wallets-search>`:(0,r.dy)`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`} 1469 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",S.SnackController.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return n.j.isMobile()?(0,r.dy)` 1470 <wui-icon-box 1471 size="xl" 1472 iconSize="xl" 1473 color="accent-primary" 1474 icon="qrCode" 1475 border 1476 borderColor="wui-accent-glass-010" 1477 @click=${this.onWalletConnectQr.bind(this)} 1478 ></wui-icon-box> 1479 `:null}onWalletConnectQr(){f.RouterController.push("ConnectingWalletConnect")}};tf([(0,i.SB)()],tw.prototype,"search",void 0),tf([(0,i.SB)()],tw.prototype,"badge",void 0),tw=tf([(0,c.Mo)("w3m-all-wallets-view")],tw);var tm=(0,j.iv)` 1480 :host { 1481 width: 100%; 1482 } 1483 1484 button { 1485 display: flex; 1486 align-items: center; 1487 justify-content: space-between; 1488 padding: ${({spacing:e})=>e[3]}; 1489 width: 100%; 1490 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 1491 border-radius: ${({borderRadius:e})=>e[4]}; 1492 transition: 1493 background-color ${({durations:e})=>e.lg} 1494 ${({easings:e})=>e["ease-out-power-2"]}, 1495 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 1496 will-change: background-color, scale; 1497 } 1498 1499 wui-text { 1500 text-transform: capitalize; 1501 } 1502 1503 wui-image { 1504 color: ${({tokens:e})=>e.theme.textPrimary}; 1505 } 1506 1507 @media (hover: hover) { 1508 button:hover:enabled { 1509 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1510 } 1511 } 1512 1513 button:disabled { 1514 opacity: 0.5;
1515 cursor: not-allowed; 1516 } 1517`,tb=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a};let ty=class extends r.oi{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.dy)` 1518 <button 1519 ?disabled=${!!this.loading||!!this.disabled} 1520 data-loading=${this.loading} 1521 tabindex=${(0,d.o)(this.tabIdx)} 1522 > 1523 <wui-flex gap="2" alignItems="center"> 1524 ${this.templateLeftIcon()} 1525 <wui-flex gap="1"> 1526 <slot></slot> 1527 </wui-flex> 1528 </wui-flex> 1529 ${this.templateRightIcon()} 1530 </button> 1531 `}templateLeftIcon(){return this.icon?(0,r.dy)`<wui-image 1532 icon=${this.icon} 1533 iconColor=${(0,d.o)(this.iconColor)} 1534 ?boxed=${!0} 1535 ?rounded=${this.rounded} 1536 ></wui-image>`:(0,r.dy)`<wui-image 1537 ?boxed=${!0} 1538 ?rounded=${this.rounded} 1539 ?fullSize=${this.fullSize} 1540 src=${this.imageSrc} 1541 ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?(0,r.dy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:(0,r.dy)`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};ty.styles=[P.ET,P.ZM,tm],tb([(0,i.Cb)()],ty.prototype,"imageSrc",void 0),tb([(0,i.Cb)()],ty.prototype,"icon",void 0),tb([(0,i.Cb)()],ty.prototype,"iconColor",void 0),tb([(0,i.Cb)({type:Boolean})],ty.prototype,"loading",void 0),tb([(0,i.Cb)()],ty.prototype,"tabIdx",void 0),tb([(0,i.Cb)({type:Boolean})],ty.prototype,"disabled",void 0),tb([(0,i.Cb)({type:Boolean})],ty.prototype,"rightIcon",void 0),tb([(0,i.Cb)({type:Boolean})],ty.prototype,"rounded",void 0),tb([(0,i.Cb)({type:Boolean})],ty.prototype,"fullSize",void 0),ty=tb([(0,B.M)("wui-list-item")],ty);let tv=class extends r.oi{constructor(){super(...arguments),this.wallet=f.RouterController.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,r.dy)` 1542 <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}> 1543 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 1544 ${this.homepageTemplate()} 1545 </wui-flex> 1546 `}chromeTemplate(){return this.wallet?.chrome_store?(0,r.dy)`<wui-list-item 1547 variant="icon" 1548 icon="chromeStore" 1549 iconVariant="square" 1550 @click=${this.onChromeStore.bind(this)} 1551 chevron 1552 > 1553 <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text> 1554 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?(0,r.dy)`<wui-list-item 1555 variant="icon" 1556 icon="appStore" 1557 iconVariant="square" 1558 @click=${this.onAppStore.bind(this)} 1559 chevron 1560 > 1561 <wui-text variant="md-medium" color="primary">iOS App</wui-text> 1562 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?(0,r.dy)`<wui-list-item 1563 variant="icon" 1564 icon="playStore" 1565 iconVariant="square" 1566 @click=${this.onPlayStore.bind(this)} 1567 chevron 1568 > 1569 <wui-text variant="md-medium" color="primary">Android App</wui-text> 1570 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?(0,r.dy)` 1571 <wui-list-item 1572 variant="icon" 1573 icon="browser" 1574 iconVariant="square-blue" 1575 @click=${this.onHomePage.bind(this)} 1576 chevron 1577 > 1578 <wui-text variant="md-medium" color="primary">Website</wui-text> 1579 </wui-list-item> 1580 `:null}openStore(e){e.href&&this.wallet&&(g.X.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),n.j.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"})}};tv=function(e,t,o,r){var i,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,o,a):i(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a}([(0,c.Mo)("w3m-downloads-view")],tv)}}]);
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.