-
Notifications
You must be signed in to change notification settings - Fork 1
/
11.9a87a59d63fa9ac28dc3.js
1 lines (1 loc) · 72.9 KB
/
11.9a87a59d63fa9ac28dc3.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"0h+8":function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.getOrigin=t.httpRequest=void 0;var o=r(n("o0o1")),a=r(n("yXPU"));n("NNYk"),t.httpRequest=function(){var e=(0,a.default)(o.default.mark((function e(t,n){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n="text"),e.next=3,fetch(t,{credentials:"same-origin"});case 3:if(!(r=e.sent).ok){e.next=23;break}if("json"!==n){e.next=12;break}return e.next=8,r.text();case 8:return e.abrupt("return",JSON.parse(e.sent));case 12:if("binary"!==n){e.next=18;break}return e.next=15,r.arrayBuffer();case 15:return e.abrupt("return",e.sent);case 18:return e.next=20,r.text();case 20:return e.abrupt("return",e.sent);case 21:e.next=24;break;case 23:throw new Error("httpRequest error: "+t+" "+r.statusText);case 24:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.getOrigin=function(e){var t=e.match(/^.+\:\/\/[^\/]+/);return Array.isArray(t)&&t.length>0?t[0]:"unknown"}},"284h":function(e,t,n){var r=n("cDf5");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}},"2mvV":function(e,t,n){},"2vh7":function(e,t,n){},"41k7":function(e,t,n){},"4VkS":function(e,t,n){"use strict";n.r(t),n("f4g2"),n("WPTD"),n("Rlsf"),n("EqmL"),n("cC/c");var r=n("1oSv"),o=n("hga2"),a=n.n(o),i=n("jSND");function s(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t,n,r,o,a,i){try{var s=e[a](i),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){u(a,r,o,i,s,"next",e)}function s(e){u(a,r,o,i,s,"throw",e)}i(void 0)}))}}var f=a.a,l=o.DEVICE_EVENT,d=o.DEVICE;function p(e){return h.apply(this,arguments)}function h(){return(h=c(regeneratorRuntime.mark((function e(t){var n,o,a,u,p,h,E,m,v,w,b,y,_,S,T,N,x,R,g,I,O,A;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return(A=c(regeneratorRuntime.mark((function e(t){var r,o,a,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s(m.values())[0],o=new i.Transaction(t,{chain:h(n)}),e.next=4,I(r,t);case 4:if((a=e.sent).success){e.next=7;break}throw new Error(a.payload.error);case 7:return o.v=(u=a.payload).v,o.r=u.r,o.s=u.s,e.abrupt("return","0x".concat(o.serialize().toString("hex")));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)},O=function(e){return A.apply(this,arguments)},I=function(e,t){return f.ethereumSignTransaction({path:e,transaction:{nonce:t.nonce,gasPrice:t.gasPrice,gasLimit:t.gas,to:t.to,value:t.value||"",data:t.data||"",chainId:n}})},g=function(e){return new Promise((function(t,n){w.sendAsync({jsonrpc:"2.0",method:"eth_getBalance",params:[e,"latest"],id:42},(function(e,r){e&&n(e);var o=r&&r.result;t(null!=o?new p(o).toString(10):null)}))}))},R=function(){return(R=c(regeneratorRuntime.mark((function e(){var t,n,r,o,a,i,s,u,c,l,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=d.length>0&&void 0!==d[0]?d[0]:10,n=d.length>1?d[1]:void 0,v){e.next=4;break}return e.abrupt("return",[void 0]);case 4:if(o=[],!((r=m.size)>0)||n){e.next=8;break}return e.abrupt("return",y());case 8:for(a=r;a<t+r;a++)i="".concat(E,"/").concat(a,"'/0/0"),o.push({path:i,showOnTrezor:!1});return e.prev=9,e.next=12,f.ethereumGetAddress({bundle:o});case 12:s=e.sent,e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(9),v=!1,new Error(s.payload.error);case 19:if(s.success){e.next=22;break}throw v=!1,new Error(s.payload.error);case 22:return Array.isArray(s.payload)?s.payload.forEach((function(e){var t=e.serializedPath;m.set(e.address.toLowerCase(),t)})):(c=(u=s.payload).serializedPath,m.set(u.address.toLowerCase(),c)),l=y(),e.abrupt("return",l);case 25:case"end":return e.stop()}}),e,null,[[9,15]])})))).apply(this,arguments)},x=function(){return R.apply(this,arguments)},N=function(e){var t=s(m.entries()),n=t.findIndex((function(t){return(n=t,1,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),1!==n.length);r=!0);}catch(u){o=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}())[0]===e;var n}));t.unshift(t.splice(n,1)[0]),m=new Map(t)},T=function(){return(T=c(regeneratorRuntime.mark((function e(){var t,n,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:10,e.next=3,x(t,!0);case 3:return n=e.sent,e.abrupt("return",Promise.all(n.map((function(e){return new Promise(function(){var t=c(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(e);case 2:n({address:e,balance:t.sent});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}))));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)},S=function(){return T.apply(this,arguments)},_=function(){return v?y()[0]:void 0},y=function(){return Array.from(m.keys())},b=function(){return v=!0,x(1)},o=t.email,a=t.appUrl,u=t.rpcUrl,p=t.BigNumber,h=t.networkName,n=t.networkId,E="m/44'/60'",m=new Map,v=!1,f.manifest({email:o,appUrl:a}),f.on(l,(function(e){e.type===d.DISCONNECT&&(v=!1,m=new Map)})),(w=Object(r.a)({getAccounts:function(e){x().then((function(t){return e(null,t)})).catch((function(t){return e(t,null)}))},signTransaction:function(e,t){O(e).then((function(e){return t(null,e)})).catch((function(e){return t(e,null)}))},rpcUrl:u})).getPrimaryAddress=_,w.getAllAccountsAndBalances=S,w.enable=b,w.setPrimaryAccount=N,w.getBalance=g,w.send=w.sendAsync,e.abrupt("return",w);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.default=function(e){var t,n=e.rpcUrl,r=e.networkId,o=e.email,a=e.appUrl,i=e.preferred;return{name:e.label||"Trezor",svg:e.svg||'\n\t<svg width="40px" height="40px" viewBox="0 0 114 166" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t<g id="Styles" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n\t\t\t<path d="M17,51.453125 L17,40 C17,17.90861 34.90861,-1.0658141e-14 57,-1.0658141e-14 C79.09139,-1.0658141e-14 97,17.90861 97,40 L97,51.453125 L113.736328,51.453125 L113.736328,139.193359 L57.5,166 L0,139.193359 L0,51.453125 L17,51.453125 Z M37,51.453125 L77,51.453125 L77,40 L76.9678398,40 C76.3750564,29.406335 67.6617997,21 57,21 C46.3382003,21 37.6249436,29.406335 37.0321602,40 L37,40 L37,51.453125 Z M23,72 L23,125 L56.8681641,140.966797 L91,125 L91,72 L23,72 Z" id="Trezor-logo" fill="currentColor"></path>\n\t\t</g>\n\t</svg>\n',iconSrc:e.iconSrc,wallet:(t=c(regeneratorRuntime.mark((function e(t){var i,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.BigNumber,s=t.networkName,e.next=3,p({rpcUrl:n,networkId:r,email:o,appUrl:a,BigNumber:i,networkName:s});case 3:return e.abrupt("return",{provider:u=e.sent,interface:{name:"Trezor",connect:u.enable,disconnect:function(){return u.stop()},address:{get:function(){var e=c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.getPrimaryAddress());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},network:{get:function(){var e=c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},balance:{get:function(){var e=c(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.getPrimaryAddress(),e.abrupt("return",t&&u.getBalance(t));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}}});case 5:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),type:"hardware",desktop:!0,preferred:i}}},"4aYt":function(e,t,n){"use strict";t.__esModule=!0,t.NOTIFICATION=t.BLOCK=t.CONNECT=t.ERROR=void 0,t.ERROR="blockchain-error",t.CONNECT="blockchain-connect",t.BLOCK="blockchain-block",t.NOTIFICATION="blockchain-notification"},B6Vc:function(e,t,n){"use strict";n("284h")(n("4aYt"))},C2mV:function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.popupConsole=t.enableByPrefix=t.getLog=t.enable=t.init=t.default=void 0;var n={DescriptorStream:"color: #77ab59",DeviceList:"color: #36802d",Device:"color: #bada55",Core:"color: #c9df8a",IFrame:"color: #FFFFFF; background: #f4a742;",Popup:"color: #f48a00"},r=function(){function e(e,t){void 0===t&&(t=!1),this.prefix=e,this.enabled=t,this.messages=[],this.css=n[e]||"color: #000000; background: #FFFFFF;"}var t=e.prototype;return t.addMessage=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];this.messages.push({level:e,prefix:t,message:r,timestamp:(new Date).getTime()})},t.log=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;this.addMessage.apply(this,["log",this.prefix].concat(t)),this.enabled&&(r=console).log.apply(r,[this.prefix].concat(t))},t.error=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;this.addMessage.apply(this,["error",this.prefix].concat(t)),this.enabled&&(r=console).error.apply(r,[this.prefix].concat(t))},t.warn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;this.addMessage.apply(this,["warn",this.prefix].concat(t)),this.enabled&&(r=console).warn.apply(r,[this.prefix].concat(t))},t.debug=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;this.addMessage.apply(this,["debug",this.prefix].concat(t)),this.enabled&&(r=console).log.apply(r,["%c"+this.prefix,this.css].concat(t))},e}();t.default=r;var o={};t.init=function(e,t){var n=new r(e,"boolean"==typeof t&&t);return o[e]=n,n},t.enable=function(e){for(var t=Object.keys(o),n=0;n<t.length;n++)o[t[n]].enabled=e},t.getLog=function(e){for(var t=[],n=Object.keys(o),r=0;r<n.length;r++)t=t.concat(o[n[r]].messages);return t.sort((function(e,t){return e.timestamp-t.timestamp})),t},t.enableByPrefix=function(e,t){o[e]&&(o[e].enabled=t)},t.popupConsole=function(t,n){var r=e.console,o={error:r.error,info:r.info,debug:r.debug,log:r.log},a=[],i=function(e,o){return function(){for(var i=(new Date).toUTCString(),s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return a.push([o,i].concat(u)),n.apply(void 0,[{type:t,level:o,time:i,args:JSON.stringify(u)}]),e.apply(r,u)}};for(var s in o)r[s]=i(o[s],s)}}).call(this,n("yLpj"))},Dc05:function(e,t,n){"use strict";var r=n("284h");t.__esModule=!0,n("sVx8"),r(n("tM+K")),r(n("jRTs")),r(n("IlcN")),r(n("uE4B")),r(n("cSd0"));var o=r(n("mrGe"));Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=o[e])})),r(n("2vh7")),r(n("Vdba")),r(n("xCEQ")),r(n("ozwZ")),r(n("OEdX")),r(n("RJS7")),r(n("41k7"));var a=n("2mvV");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=a[e])}))},IlcN:function(e,t,n){"use strict";t.__esModule=!0,t.ADDRESS_VALIDATION=t.BUNDLE_PROGRESS=t.LOGIN_CHALLENGE_RESPONSE=t.LOGIN_CHALLENGE_REQUEST=t.CUSTOM_MESSAGE_RESPONSE=t.CUSTOM_MESSAGE_REQUEST=t.CHANGE_SETTINGS=t.RECEIVE_FEE=t.RECEIVE_ACCOUNT=t.CHANGE_ACCOUNT=t.RECEIVE_DEVICE=t.RECEIVE_PASSPHRASE=t.RECEIVE_PIN=t.RECEIVE_CONFIRMATION=t.RECEIVE_PERMISSION=t.REQUEST_BUTTON=t.INSUFFICIENT_FUNDS=t.UPDATE_CUSTOM_FEE=t.SELECT_FEE=t.SELECT_ACCOUNT=t.SELECT_DEVICE=t.SET_OPERATION=t.LOADING=t.CONNECT=t.INVALID_PASSPHRASE_ACTION=t.INVALID_PASSPHRASE=t.REQUEST_PASSPHRASE_ON_DEVICE=t.REQUEST_PASSPHRASE=t.INVALID_PIN=t.REQUEST_PIN=t.REQUEST_CONFIRMATION=t.REQUEST_PERMISSION=t.CLOSE_UI_WINDOW=t.REQUEST_UI_WINDOW=t.RECEIVE_BROWSER=t.BROWSER_OUTDATED=t.BROWSER_NOT_SUPPORTED=t.DEVICE_NEEDS_BACKUP=t.FIRMWARE_NOT_COMPATIBLE=t.FIRMWARE_NOT_SUPPORTED=t.FIRMWARE_OUTDATED=t.FIRMWARE_OLD=t.SEEDLESS=t.INITIALIZE=t.BOOTLOADER=t.TRANSPORT=t.IFRAME_HANDSHAKE=void 0,t.IFRAME_HANDSHAKE="iframe-handshake",t.TRANSPORT="ui-no_transport",t.BOOTLOADER="ui-device_bootloader_mode",t.INITIALIZE="ui-device_not_initialized",t.SEEDLESS="ui-device_seedless",t.FIRMWARE_OLD="ui-device_firmware_old",t.FIRMWARE_OUTDATED="ui-device_firmware_outdated",t.FIRMWARE_NOT_SUPPORTED="ui-device_firmware_unsupported",t.FIRMWARE_NOT_COMPATIBLE="ui-device_firmware_not_compatible",t.DEVICE_NEEDS_BACKUP="ui-device_needs_backup",t.BROWSER_NOT_SUPPORTED="ui-browser_not_supported",t.BROWSER_OUTDATED="ui-browser_outdated",t.RECEIVE_BROWSER="ui-receive_browser",t.REQUEST_UI_WINDOW="ui-request_window",t.CLOSE_UI_WINDOW="ui-close_window",t.REQUEST_PERMISSION="ui-request_permission",t.REQUEST_CONFIRMATION="ui-request_confirmation",t.REQUEST_PIN="ui-request_pin",t.INVALID_PIN="ui-invalid_pin",t.REQUEST_PASSPHRASE="ui-request_passphrase",t.REQUEST_PASSPHRASE_ON_DEVICE="ui-request_passphrase_on_device",t.INVALID_PASSPHRASE="ui-invalid_passphrase",t.INVALID_PASSPHRASE_ACTION="ui-invalid_passphrase_action",t.CONNECT="ui-connect",t.LOADING="ui-loading",t.SET_OPERATION="ui-set_operation",t.SELECT_DEVICE="ui-select_device",t.SELECT_ACCOUNT="ui-select_account",t.SELECT_FEE="ui-select_fee",t.UPDATE_CUSTOM_FEE="ui-update_custom_fee",t.INSUFFICIENT_FUNDS="ui-insufficient_funds",t.REQUEST_BUTTON="ui-button",t.RECEIVE_PERMISSION="ui-receive_permission",t.RECEIVE_CONFIRMATION="ui-receive_confirmation",t.RECEIVE_PIN="ui-receive_pin",t.RECEIVE_PASSPHRASE="ui-receive_passphrase",t.RECEIVE_DEVICE="ui-receive_device",t.CHANGE_ACCOUNT="ui-change_account",t.RECEIVE_ACCOUNT="ui-receive_account",t.RECEIVE_FEE="ui-receive_fee",t.CHANGE_SETTINGS="ui-change_settings",t.CUSTOM_MESSAGE_REQUEST="ui-custom_request",t.CUSTOM_MESSAGE_RESPONSE="ui-custom_response",t.LOGIN_CHALLENGE_REQUEST="ui-login_challenge_request",t.LOGIN_CHALLENGE_RESPONSE="ui-login_challenge_response",t.BUNDLE_PROGRESS="ui-bundle_progress",t.ADDRESS_VALIDATION="ui-address_validation"},MVZn:function(e,t,n){var r=n("lSNA");e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}},MbSw:function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.create=function(e,t){var n,r=function(e){},i=function(e){},s=new Promise(function(){var t=(0,a.default)(o.default.mark((function t(a,s){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a,i=s,"function"!=typeof e){t.next=11;break}return t.prev=3,t.next=6,e();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(3),s(t.t0);case 11:"string"==typeof e&&(n=e);case 12:case"end":return t.stop()}}),t,this,[[3,8]])})));return function(e,n){return t.apply(this,arguments)}}());return{id:n,device:t,resolve:r,reject:i,promise:s}},t.createAsync=function(e){var t=function(e){},n=function(e){},r=new Promise((function(e,r){t=e,n=r})),i=function(){var t=(0,a.default)(o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e();case 2:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}();return{resolve:t,reject:n,promise:r,run:function(){return i(),r}}},t.resolveTimeoutPromise=function(e,t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))},t.rejectTimeoutPromise=function(e,t){return new Promise((function(n,r){setTimeout((function(){r(t)}),e)}))};var o=r(n("o0o1")),a=r(n("yXPU"))},NGBi:function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.parse=t.DEFAULT_PRIORITY=void 0;var o=r(n("MVZn")),a="7.0.1".split(".").map((function(e){return parseInt(e)})),i="https://connect.trezor.io/"+a[0]+(a[1]>0?"."+a[1]:"")+"/";t.DEFAULT_PRIORITY=2;var s={configSrc:"data/config.json",version:"7.0.1",debug:!1,origin:null,priority:2,trustedHost:!1,connectSrc:i,iframeSrc:i+"iframe.html",popup:!0,popupSrc:i+"popup.html",webusbSrc:i+"webusb.html",transportReconnect:!1,webusb:!0,pendingTransportEvent:!0,supportedBrowser:"undefined"==typeof navigator||!/Trident|MSIE/.test(navigator.userAgent),extension:null,manifest:null};t.parse=function(e){if(!e)return s;var t,n=(0,o.default)({},s);return e.hasOwnProperty("debug")&&(Array.isArray(e),"boolean"==typeof e.debug?n.debug=e.debug:"string"==typeof e.debug&&(n.debug="true"===e.debug)),"string"==typeof e.connectSrc?n.connectSrc=e.connectSrc:"undefined"!=typeof window&&"string"==typeof window.__TREZOR_CONNECT_SRC&&(n.connectSrc=window.__TREZOR_CONNECT_SRC),n.iframeSrc=n.connectSrc+"iframe.html",n.popupSrc=n.connectSrc+"popup.html",n.webusbSrc=n.connectSrc+"webusb.html","boolean"==typeof e.transportReconnect&&(n.transportReconnect=e.transportReconnect),"boolean"==typeof e.webusb&&(n.webusb=e.webusb),"boolean"==typeof e.popup&&(n.popup=e.popup),"boolean"==typeof e.pendingTransportEvent&&(n.pendingTransportEvent=e.pendingTransportEvent),"undefined"!=typeof window&&"file:"===window.location.protocol&&(n.origin="file://"+window.location.pathname,n.webusb=!1),"string"==typeof e.extension&&(n.extension=e.extension),"object"==typeof e.manifest&&(n.manifest="string"!=typeof(t=e.manifest).email?null:"string"!=typeof t.appUrl?null:{email:t.email,appUrl:t.appUrl}),s=n}},NNYk:function(e,t,n){"use strict";n.r(t),n.d(t,"Headers",(function(){return c})),n.d(t,"Request",(function(){return m})),n.d(t,"Response",(function(){return w})),n.d(t,"DOMException",(function(){return y})),n.d(t,"fetch",(function(){return _}));var r={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function s(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function d(e){var t=new FileReader,n=l(t);return t.readAsArrayBuffer(e),n}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,n,r=f(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=l(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=i(e),t=s(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},c.prototype.delete=function(e){delete this.map[i(e)]},c.prototype.get=function(e){return e=i(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},c.prototype.set=function(e,t){this.map[i(e)]=s(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e,t){var n,r,o=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new c(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),E.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function v(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},h.call(m.prototype),h.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];w.redirect=function(e,t){if(-1===b.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})};var y=self.DOMException;try{new y}catch(S){(y=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),y.prototype.constructor=y}function _(e,t){return new Promise((function(n,o){var a=new m(e,t);if(a.signal&&a.signal.aborted)return o(new y("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL"),n(new w("response"in i?i.response:i.responseText,r))},i.onerror=function(){o(new TypeError("Network request failed"))},i.ontimeout=function(){o(new TypeError("Network request failed"))},i.onabort=function(){o(new y("Aborted","AbortError"))},i.open(a.method,a.url,!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&r.blob&&(i.responseType="blob"),a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}_.polyfill=!0,self.fetch||(self.fetch=_,self.Headers=c,self.Request=m,self.Response=w)},Ne8P:function(e,t,n){"use strict";t.__esModule=!0,t.RESPONSE=t.CALL=t.ERROR=t.BOOTSTRAP=void 0,t.BOOTSTRAP="iframe-bootstrap",t.ERROR="iframe-error",t.CALL="iframe-call",t.RESPONSE="iframe-response"},NktQ:function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.NO_COIN_INFO=t.BACKEND_NO_URL=t.WEBUSB_ERROR_MESSAGE=t.INVALID_PIN_ERROR_MESSAGE=t.WRONG_PREVIOUS_SESSION_ERROR_MESSAGE=t.INVALID_STATE=t.CALL_OVERRIDE=t.INITIALIZATION_FAILED=t.DEVICE_USED_ELSEWHERE=t.PERMISSIONS_NOT_GRANTED=t.POPUP_CLOSED=t.INVALID_PARAMETERS=t.DEVICE_CALL_IN_PROGRESS=t.DEVICE_NOT_FOUND=t.WRONG_TRANSPORT_CONFIG=t.NO_TRANSPORT=t.MANIFEST_NOT_SET=t.BROWSER_NOT_SUPPORTED=t.POPUP_TIMEOUT=t.IFRAME_TIMEOUT=t.IFRAME_INITIALIZED=t.IFRAME_BLOCKED=t.NO_IFRAME=t.invalidParameter=t.TrezorError=void 0;var o=r(n("VbXa")),a=function(e){function t(t,n){var r;return(r=e.call(this,n)||this).code=t,r.message=n,r}return(0,o.default)(t,e),t}((0,r(n("oShl")).default)(Error));t.TrezorError=a;var i=function(e){return new a("Connect_InvalidParameter",e)};t.invalidParameter=i;var s=new a(100,"TrezorConnect not yet initialized");t.NO_IFRAME=s;var u=new a("iframe_blocked","TrezorConnect iframe was blocked");t.IFRAME_BLOCKED=u;var c=new a(101,"TrezorConnect has been already initialized");t.IFRAME_INITIALIZED=c;var f=new a(102,"Iframe timeout");t.IFRAME_TIMEOUT=f;var l=new a(103,"Popup timeout");t.POPUP_TIMEOUT=l;var d=new a(104,"Browser not supported");t.BROWSER_NOT_SUPPORTED=d;var p=new a(105,"Manifest not set. Read more at https://github.com/trezor/connect/blob/develop/docs/index.md");t.MANIFEST_NOT_SET=p;var h=new a(500,"Transport is missing");t.NO_TRANSPORT=h;var E=new a(5002,"Wrong config response");t.WRONG_TRANSPORT_CONFIG=E;var m=new a(501,"Device not found");t.DEVICE_NOT_FOUND=m;var v=new a(503,"Device call in progress");t.DEVICE_CALL_IN_PROGRESS=v;var w=new a(504,"Invalid parameters");t.INVALID_PARAMETERS=w;var b=new Error("Popup closed");t.POPUP_CLOSED=b;var y=new a(403,"Permissions not granted");t.PERMISSIONS_NOT_GRANTED=y;var _=new a(700,"Device is used in another window");t.DEVICE_USED_ELSEWHERE=_;var S=new a("Failure_Initialize","Initialization failed");t.INITIALIZATION_FAILED=S;var T=new a("Failure_ActionOverride","override");t.CALL_OVERRIDE=T;var N=new a("Failure_PassphraseState","Passphrase is incorrect");t.INVALID_STATE=N,t.WRONG_PREVIOUS_SESSION_ERROR_MESSAGE="wrong previous session",t.INVALID_PIN_ERROR_MESSAGE="PIN invalid",t.WEBUSB_ERROR_MESSAGE="NetworkError: Unable to claim interface.";var x=new a("Backend_init","Url not found");t.BACKEND_NO_URL=x;var R=i("Coin not found.");t.NO_COIN_INFO=R},Nsbk:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},OEdX:function(e,t,n){},PJYZ:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},Ql4R:function(e,t,n){"use strict";var r=n("284h"),o=n("TqRt");t.__esModule=!0,t.default=void 0;var a=o(n("o0o1")),i=o(n("yXPU")),s=o(n("VbXa")),u=o(n("PJYZ")),c=o(n("lSNA")),f=o(n("+qE3")),l=r(n("jRTs")),d=r(n("NktQ")),p=n("RJKs"),h=n("0h+8"),E=n("MbSw");t.default=function(e){function t(t){var n;return n=e.call(this)||this,(0,c.default)((0,u.default)((0,u.default)(n)),"requestTimeout",0),(0,c.default)((0,u.default)((0,u.default)(n)),"closeInterval",0),(0,c.default)((0,u.default)((0,u.default)(n)),"extension",!1),(0,c.default)((0,u.default)((0,u.default)(n)),"extensionTabId",0),n.settings=t,n.src=t.popupSrc,n.origin=(0,h.getOrigin)(t.popupSrc),n.handleLazyLoading=n.handleLazyLoading.bind((0,u.default)((0,u.default)(n))),n.extension="undefined"!=typeof chrome&&chrome.runtime&&void 0!==chrome.runtime.onConnect,n.extension&&(n.handleExtensionConnect=n.handleExtensionConnect.bind((0,u.default)((0,u.default)(n))),n.handleExtensionMessage=n.handleExtensionMessage.bind((0,u.default)((0,u.default)(n))),chrome.runtime.onConnect.addListener(n.handleExtensionConnect)),n}(0,s.default)(t,e);var n=t.prototype;return n.request=function(e){var t=this;if(void 0===e&&(e=!1),this.locked)this._window&&(this.extension?chrome.tabs.update(this._window.id,{active:!0}):this._window.focus());else{this.lazyLoad=e?(0,E.create)(l.INIT):null,this.lazyLoad&&(this.extension||window.addEventListener("message",this.handleLazyLoading,!1));var n=this.open.bind(this);this.locked=!0,this.settings.supportedBrowser?this.requestTimeout=window.setTimeout((function(){t.requestTimeout=0,n()}),e||this.extension?1:850):n()}},n.cancel=function(){this.close()},n.unlock=function(){this.locked=!1},n.open=function(){var e=this;this.settings.supportedBrowser?(this.openWrapper(this.lazyLoad?this.src+"#loading":this.src),this.closeInterval=window.setInterval((function(){e._window&&(e.extension?chrome.tabs.get(e._window.id,(function(t){t||(e.close(),e.emit(l.CLOSED))})):e._window.closed&&(e.close(),e.emit(l.CLOSED)))}),500),this.openTimeout=window.setTimeout((function(){e._window&&!e._window.closed||(e.close(),(0,p.showPopupRequest)(e.open.bind(e),(function(){e.emit(l.CLOSED)})))}),2e3)):this.openWrapper(this.src+"#unsupported")},n.openWrapper=function(e){var t=this;this.extension?chrome.windows.getCurrent(null,(function(n){"normal"!==n.type?chrome.windows.create({url:e},(function(e){chrome.tabs.query({windowId:e.id,active:!0},(function(e){t._window=e[0]}))})):chrome.tabs.query({currentWindow:!0,active:!0},(function(n){t.extensionTabId=n[0].id,chrome.tabs.create({url:e,index:n[0].index+1},(function(e){t._window=e}))}))})):(this._window=window.open("","_blank"),this._window&&(this._window.location.href=e))},n.handleExtensionConnect=function(e){if("trezor-connect"===e.name){if(!this._window||this._window&&this._window.id!==e.sender.tab.id)return void e.disconnect();this.extensionPort=e,this.extensionPort.onMessage.addListener(this.handleExtensionMessage)}else"trezor-usb-permissions"===e.name&&e.postMessage({broadcast:this.broadcast})},n.handleExtensionMessage=function(e){this.extensionPort&&(e===l.EXTENSION_REQUEST?this.extensionPort.postMessage({type:l.EXTENSION_REQUEST,broadcast:this.broadcast}):e===l.INIT&&this.lazyLoad?this.lazyLoad.resolve(!0):e===l.EXTENSION_USB_PERMISSIONS?chrome.tabs.query({currentWindow:!0,active:!0},(function(e){chrome.tabs.create({url:"trezor-usb-permissions.html",index:e[0].index+1},(function(e){}))})):e===l.CLOSE_WINDOW&&(this.emit(l.CLOSED),this.close()))},n.setBroadcast=function(e){this.broadcast=e},n.handleLazyLoading=function(e){this.lazyLoad&&e.data&&e.data===l.INIT&&(this.lazyLoad.resolve(!0),window.removeEventListener("message",this.handleLazyLoading,!1))},n.resolveLazyLoad=function(){var e=(0,i.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.lazyLoad){e.next=5;break}return e.next=3,this.lazyLoad.promise;case 3:e.next=6;break;case 5:throw d.POPUP_CLOSED.message;case 6:this.extension?this.extensionPort&&this.extensionPort.postMessage({type:l.INIT}):this._window&&this._window.postMessage({type:l.INIT},this.origin);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),n.close=function(){this.locked=!1,this.requestTimeout&&(window.clearTimeout(this.requestTimeout),this.requestTimeout=0),this.openTimeout&&(window.clearTimeout(this.openTimeout),this.openTimeout=0),this.closeInterval&&(window.clearInterval(this.closeInterval),this.closeInterval=0),this.extensionPort&&(this.extensionPort.disconnect(),this.extensionPort=null),this.extensionTabId&&(chrome.tabs.update(this.extensionTabId,{active:!0}),this.extensionTabId=0),this.lazyLoad&&(this.lazyLoad=null),this._window&&(this.extension?chrome.tabs.remove(this._window.id):this._window.close(),this._window=null)},n.postMessage=function(e){var t=this;if(!this.requestTimeout)return!this._window&&"ui_request_window"!==e.type&&this.openTimeout?(this.close(),void(0,p.showPopupRequest)(this.open.bind(this),(function(){t.emit(l.CLOSED)}))):void(this._window&&this._window.postMessage(e,this.origin))},n.onBeforeUnload=function(){this.close()},n.cancelOpenTimeout=function(){window.clearTimeout(this.openTimeout)},t}(f.default)},RJKs:function(e,t,n){"use strict";t.__esModule=!0,t.showPopupRequest=void 0;var r="TrezorConnectInteractionLayer";t.showPopupRequest=function(e,t){if(!document.getElementById(r)){var n=document.createElement("div");n.id=r,n.className="trezorconnect-container",n.innerHTML='\n <div class="trezorconnect-container" id="TrezorConnectInteractionLayer">\n <div class="trezorconnect-window">\n <div class="trezorconnect-head">\n <svg class="trezorconnect-logo" x="0px" y="0px" viewBox="0 0 163.7 41.9" width="78px" height="20px" preserveAspectRatio="xMinYMin meet">\n <polygon points="101.1,12.8 118.2,12.8 118.2,17.3 108.9,29.9 118.2,29.9 118.2,35.2 101.1,35.2 101.1,30.7 110.4,18.1 101.1,18.1"/>\n <path d="M158.8,26.9c2.1-0.8,4.3-2.9,4.3-6.6c0-4.5-3.1-7.4-7.7-7.4h-10.5v22.3h5.8v-7.5h2.2l4.1,7.5h6.7L158.8,26.9z M154.7,22.5 h-4V18h4c1.5,0,2.5,0.9,2.5,2.2C157.2,21.6,156.2,22.5,154.7,22.5z"/>\n <path d="M130.8,12.5c-6.8,0-11.6,4.9-11.6,11.5s4.9,11.5,11.6,11.5s11.7-4.9,11.7-11.5S137.6,12.5,130.8,12.5z M130.8,30.3 c-3.4,0-5.7-2.6-5.7-6.3c0-3.8,2.3-6.3,5.7-6.3c3.4,0,5.8,2.6,5.8,6.3C136.6,27.7,134.2,30.3,130.8,30.3z"/>\n <polygon points="82.1,12.8 98.3,12.8 98.3,18 87.9,18 87.9,21.3 98,21.3 98,26.4 87.9,26.4 87.9,30 98.3,30 98.3,35.2 82.1,35.2 "/>\n <path d="M24.6,9.7C24.6,4.4,20,0,14.4,0S4.2,4.4,4.2,9.7v3.1H0v22.3h0l14.4,6.7l14.4-6.7h0V12.9h-4.2V9.7z M9.4,9.7 c0-2.5,2.2-4.5,5-4.5s5,2,5,4.5v3.1H9.4V9.7z M23,31.5l-8.6,4l-8.6-4V18.1H23V31.5z"/>\n <path d="M79.4,20.3c0-4.5-3.1-7.4-7.7-7.4H61.2v22.3H67v-7.5h2.2l4.1,7.5H80l-4.9-8.3C77.2,26.1,79.4,24,79.4,20.3z M71,22.5h-4V18 h4c1.5,0,2.5,0.9,2.5,2.2C73.5,21.6,72.5,22.5,71,22.5z"/>\n <polygon points="40.5,12.8 58.6,12.8 58.6,18.1 52.4,18.1 52.4,35.2 46.6,35.2 46.6,18.1 40.5,18.1 "/>\n </svg>\n <div class="trezorconnect-close">\n <svg x="0px" y="0px" viewBox="24 24 60 60" width="24px" height="24px" preserveAspectRatio="xMinYMin meet">\n <polygon class="st0" points="40,67.9 42.1,70 55,57.1 67.9,70 70,67.9 57.1,55 70,42.1 67.9,40 55,52.9 42.1,40 40,42.1 52.9,55 "/>\n </svg>\n </div>\n </div>\n <div class="trezorconnect-body">\n <h3>Popup was blocked</h3>\n <p>Please click to “Continue” to open popup manually</p>\n <button class="trezorconnect-open">Continue</button>\n </div>\n </div>\n </div>\n',document.body&&document.body.appendChild(n),n.getElementsByClassName("trezorconnect-open")[0].onclick=function(){e(),document.body&&document.body.removeChild(n)},n.getElementsByClassName("trezorconnect-close")[0].onclick=function(){t(),document.body&&document.body.removeChild(n)}}}},RJS7:function(e,t,n){},SksO:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},VbXa:function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},Vdba:function(e,t,n){},W6j3:function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.clearTimeout=t.dispose=t.postMessage=t.init=t.messagePromises=t.error=t.timeout=t.initPromise=t.origin=t.instance=void 0;var o,a,i=r(n("o0o1")),s=r(n("yXPU")),u=n("MbSw"),c=n("IlcN"),f=n("NktQ"),l=r(n("we8g"));t.instance=o,t.origin=a;var d=(0,u.create)();t.initPromise=d;var p,h=0;t.timeout=h,t.error=p;var E=0,m={};t.messagePromises=m;var v=function(){var e=(0,s.default)(i.default.mark((function e(n){var r,s,u,l,p;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=document.getElementById("trezorconnect"))?t.instance=o=r:(t.instance=o=document.createElement("iframe"),o.frameBorder="0",o.width="0px",o.height="0px",o.style.position="absolute",o.style.display="none",o.style.border="0px",o.style.width="0px",o.style.height="0px",o.id="trezorconnect"),s="&version="+n.version+"&manifest="+encodeURIComponent(btoa(JSON.stringify(n.manifest))),u=n.iframeSrc+"?"+Date.now()+s,o.setAttribute("src",u),n.webusb&&o.setAttribute("allow","usb"),(l=o.src.match(/^.+\:\/\/[^\/]+/))&&l.length>0&&(t.origin=a=l[0]),t.timeout=h=window.setTimeout((function(){d.reject(f.IFRAME_TIMEOUT)}),1e4),p=function(){if(o){try{var e=o.contentWindow.location.origin;if(!e||"null"===e)return void b()}catch(r){}var t;"undefined"!=typeof chrome&&chrome.runtime&&void 0!==chrome.runtime.onConnect&&(chrome.runtime.onConnect.addListener((function(){})),t=chrome.runtime.id),o.contentWindow.postMessage({type:c.IFRAME_HANDSHAKE,payload:{settings:n,extension:t}},a),o.onload=void 0}else d.reject(f.IFRAME_BLOCKED)},o.attachEvent?o.attachEvent("onload",p):o.onload=p,document.body&&(document.body.appendChild(o),w()),e.prev=12,e.next=15,d.promise;case 15:e.next=20;break;case 17:throw e.prev=17,e.t0=e.catch(12),e.t0.message||e.t0;case 20:return e.prev=20,window.clearTimeout(h),t.timeout=h=0,e.finish(20);case 24:case"end":return e.stop()}}),e,this,[[12,17,20,24]])})));return function(t){return e.apply(this,arguments)}}();t.init=v;var w=function(){if(!o)throw f.IFRAME_BLOCKED;var e=o.ownerDocument,t=e.head||e.getElementsByTagName("head")[0],n=document.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id","TrezorConnectStylesheet"),n.styleSheet?n.styleSheet.cssText=l.default:n.appendChild(document.createTextNode(l.default)),t.append(n)},b=function(){window.clearTimeout(h),t.error=p=f.IFRAME_BLOCKED.message,y(),d.reject(f.IFRAME_BLOCKED)};t.postMessage=function(e,t){if(void 0===t&&(t=!0),!o)throw f.IFRAME_BLOCKED;return t?(e.id=++E,m[E]=(0,u.create)(),o.contentWindow.postMessage(e,a),m[E].promise):(o.contentWindow.postMessage(e,a),null)};var y=function(){if(o&&o.parentNode)try{o.parentNode.removeChild(o)}catch(p){}t.instance=o=null,t.timeout=h=0};t.dispose=y,t.clearTimeout=function(){window.clearTimeout(h)}},cDf5:function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},cSd0:function(e,t,n){},fbQx:function(e,t,n){},hga2:function(e,t,n){"use strict";var r=n("284h"),o=n("TqRt");t.__esModule=!0;var a={UI_EVENT:!0,DEVICE_EVENT:!0,TRANSPORT_EVENT:!0,BLOCKCHAIN_EVENT:!0,TRANSPORT:!0,UI:!0,DEVICE:!0,BLOCKCHAIN:!0};t.BLOCKCHAIN=t.DEVICE=t.UI=t.TRANSPORT=t.default=void 0;var i=o(n("MVZn")),s=o(n("lSNA")),u=o(n("o0o1")),c=o(n("yXPU")),f=o(n("+qE3")),l=n("sVx8");t.UI_EVENT=l.UI_EVENT,t.DEVICE_EVENT=l.DEVICE_EVENT,t.TRANSPORT_EVENT=l.TRANSPORT_EVENT,t.BLOCKCHAIN_EVENT=l.BLOCKCHAIN_EVENT;var d=r(n("tM+K"));t.TRANSPORT=d;var p=r(n("jRTs")),h=r(n("Ne8P")),E=r(n("IlcN"));t.UI=E;var m=r(n("uE4B"));t.DEVICE=m;var v=r(n("4aYt"));t.BLOCKCHAIN=v;var w=r(n("NktQ")),b=o(n("Ql4R")),y=r(n("W6j3")),_=o(n("sZ4M")),S=r(n("C2mV")),T=n("n0n0"),N=n("NGBi"),x=(r(n("Dc05")),n("B6Vc"));Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||(t[e]=x[e]))}));var R=n("fbQx");Object.keys(R).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||(t[e]=R[e]))}));var g,I,O=new f.default,A=(0,S.init)("[trezor-connect.js]"),C=function(){var e=new b.default(g);return e.on(p.CLOSED,(function(){y.postMessage({type:p.CLOSED},!1)})),e},U=function(e){if(e.origin===y.origin){var t=(0,T.parseMessage)(e.data),n=t.id||0,r=t.event,o=t.type,a=t.payload;switch(A.log("handleMessage",t),r){case l.RESPONSE_EVENT:y.messagePromises[n]?(delete t.type,delete t.event,y.messagePromises[n].resolve(t),delete y.messagePromises[n]):A.warn("Unknown message id "+n);break;case l.DEVICE_EVENT:case l.TRANSPORT_EVENT:case l.BLOCKCHAIN_EVENT:O.emit(r,t),O.emit(o,a);break;case l.UI_EVENT:if(o===h.BOOTSTRAP){y.clearTimeout();break}if(o===p.BOOTSTRAP){I.cancelOpenTimeout();break}O.emit(r,t),O.emit(o,a),o===E.IFRAME_HANDSHAKE?a.error?y.initPromise.reject(new Error(a.error)):(I.setBroadcast(a.broadcast),y.initPromise.resolve()):o===p.CANCEL_POPUP_REQUEST?I.cancel():o===E.CLOSE_UI_WINDOW&&I.close();break;default:A.log("Undefined message",r,e)}}},L=function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t={}),!y.instance){e.next=3;break}throw w.IFRAME_INITIALIZED;case 3:if(g||(g=(0,N.parse)(t)),g.manifest){e.next=6;break}throw w.MANIFEST_NOT_SET;case 6:if(g.supportedBrowser){e.next=8;break}throw w.BROWSER_NOT_SUPPORTED;case 8:return I||(I=C()),A.enabled=g.debug,window.addEventListener("message",U),window.addEventListener("beforeunload",(function(){I&&I.onBeforeUnload(),y.dispose()})),e.next=14,y.init(g);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y.instance||y.timeout){e.next=19;break}if((g=(0,N.parse)(g)).manifest){e.next=4;break}return e.abrupt("return",{success:!1,payload:{error:w.MANIFEST_NOT_SET.message}});case 4:if(g.supportedBrowser){e.next=6;break}return e.abrupt("return",{success:!1,payload:{error:w.BROWSER_NOT_SUPPORTED.message}});case 6:return(I=C()).request(!0),e.prev=8,e.next=11,L(g);case 11:return e.next=13,I.resolveLazyLoad();case 13:e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(8),I.close(),e.abrupt("return",{success:!1,payload:{error:e.t0}});case 19:if(!y.timeout){e.next=23;break}return e.abrupt("return",{success:!1,payload:{error:w.NO_IFRAME.message}});case 23:if(!y.error){e.next=25;break}return e.abrupt("return",{success:!1,payload:{error:y.error}});case 25:return g.popup&&I.request(),e.prev=26,e.next=29,y.postMessage({type:h.CALL,payload:t});case 29:if(!(n=e.sent)){e.next=35;break}return n.payload.error!==w.DEVICE_CALL_IN_PROGRESS.message&&I.unlock(),e.abrupt("return",n);case 35:return I.unlock(),e.abrupt("return",{success:!1,payload:{error:"No response from iframe"}});case 37:e.next=43;break;case 39:return e.prev=39,e.t1=e.catch(26),A.error("__call error",e.t1),e.abrupt("return",e.t1);case 43:case"end":return e.stop()}}),e,this,[[8,15],[26,39]])})));return function(t){return e.apply(this,arguments)}}(),P=function(){};(0,s.default)(P,"manifest",(function(e){g=(0,N.parse)({manifest:e})})),(0,s.default)(P,"init",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"on",(function(e,t){O.on(e,t)})),(0,s.default)(P,"off",(function(e,t){O.removeListener(e,t)})),(0,s.default)(P,"uiResponse",(function(e){y.postMessage((0,i.default)({event:l.UI_EVENT},e))})),(0,s.default)(P,"changeSettings",(function(e){var t=(0,N.parse)(e);A.enabled=t.debug,y.postMessage({type:E.CHANGE_SETTINGS,payload:t},!1)})),(0,s.default)(P,"blockchainDisconnect",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"blockchainDisconnect"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"blockchainEstimateFee",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"blockchainEstimateFee"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"blockchainSubscribe",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"blockchainSubscribe"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"blockchainUnsubscribe",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"blockchainUnsubscribe"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"customMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){var n,r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"==typeof t.callback){e.next=2;break}return e.abrupt("return",{success:!1,payload:{error:'Parameter "callback" is not a function'}});case 2:return n=t.callback,delete t.callback,r=function(){var e=(0,c.default)(u.default.mark((function e(t){var r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.data)||r.type!==E.CUSTOM_MESSAGE_REQUEST){e.next=6;break}return e.next=4,n(r.payload);case 4:y.postMessage({event:l.UI_EVENT,type:E.CUSTOM_MESSAGE_RESPONSE,payload:e.sent||{message:"release"}});case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),window.addEventListener("message",r,!1),e.next=8,B((0,i.default)({method:"customMessage"},t));case 8:return o=e.sent,window.removeEventListener("message",r),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"requestLogin",function(){var e=(0,c.default)(u.default.mark((function e(t){var n,r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.callback){e.next=12;break}return n=t.callback,delete t.callback,r=function(){var e=(0,c.default)(u.default.mark((function e(t){var r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.data)||r.type!==E.LOGIN_CHALLENGE_REQUEST){e.next=13;break}return e.prev=2,e.next=5,n();case 5:y.postMessage({event:l.UI_EVENT,type:E.LOGIN_CHALLENGE_RESPONSE,payload:e.sent}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.warn("TrezorConnect.requestLogin: callback error",e.t0),y.postMessage({event:l.UI_EVENT,type:E.LOGIN_CHALLENGE_RESPONSE,payload:e.t0.message});case 13:case"end":return e.stop()}}),e,this,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),window.addEventListener("message",r,!1),e.next=7,B((0,i.default)({method:"requestLogin"},t,{asyncChallenge:!0}));case 7:return o=e.sent,window.removeEventListener("message",r),e.abrupt("return",o);case 12:return e.next=14,B((0,i.default)({method:"requestLogin"},t));case 14:return e.abrupt("return",e.sent);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"resetDevice",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"resetDevice"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"cardanoGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"cardanoGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"cardanoGetPublicKey",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"cardanoGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"cardanoSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"cardanoSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"cipherKeyValue",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"cipherKeyValue"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"composeTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"composeTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"debugLinkDecision",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"debugLinkDecision"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"debugLinkGetState",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"debugLinkGetState"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"ethereumGetAccountInfo",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"ethereumGetAccountInfo"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"ethereumGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"ethereumGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"ethereumGetPublicKey",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"ethereumGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"ethereumSignMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"ethereumSignMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"ethereumSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"ethereumSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"ethereumVerifyMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"ethereumVerifyMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"getAccountInfo",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"getAccountInfo"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"getAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"getAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"getDeviceState",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"getDeviceState"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"getFeatures",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"getFeatures"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"getPublicKey",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"getPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"liskGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"liskGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"liskGetPublicKey",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"liskGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"liskSignMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"liskSignMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"liskSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"liskSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"liskVerifyMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"liskVerifyMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"nemGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"nemGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"nemSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"nemSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"pushTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"pushTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"rippleGetAccountInfo",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"rippleGetAccountInfo"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"rippleGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"rippleGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"rippleSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"rippleSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"signMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"signMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"signTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"signTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"stellarGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"stellarGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"stellarSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"stellarSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"tezosGetAddress",function(){var e=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,B((0,i.default)({method:"tezosGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"tezosGetPublicKey",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"tezosGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"tezosSignTransaction",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"tezosSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"verifyMessage",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"verifyMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"wipeDevice",function(){var e=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,i.default)({method:"wipeDevice"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),(0,s.default)(P,"dispose",(function(){y.dispose(),I&&I.close()})),(0,s.default)(P,"cancel",(function(){I&&I.emit(p.CLOSED)})),(0,s.default)(P,"renderWebUSBButton",(function(e){(0,_.default)(e,g.webusbSrc,y.origin)})),t.default=P},jRTs:function(e,t,n){"use strict";t.__esModule=!0,t.CLOSE_WINDOW=t.CANCEL_POPUP_REQUEST=t.CLOSED=t.CLOSE=t.HANDSHAKE=t.OPEN_TIMEOUT=t.OPENED=t.LOG=t.EXTENSION_USB_PERMISSIONS=t.EXTENSION_REQUEST=t.BOOTSTRAP=t.INIT=void 0,t.INIT="popup-init",t.BOOTSTRAP="popup-bootstrap",t.EXTENSION_REQUEST="popup-extension_request",t.EXTENSION_USB_PERMISSIONS="open-usb-permissions",t.LOG="popup-log",t.OPENED="popup-opened",t.OPEN_TIMEOUT="popup-open_timeout",t.HANDSHAKE="popup-handshake",t.CLOSE="popup-close",t.CLOSED="popup-closed",t.CANCEL_POPUP_REQUEST="ui-cancel-popup-request",t.CLOSE_WINDOW="window.close"},mrGe:function(e,t,n){},n0n0:function(e,t,n){"use strict";t.__esModule=!0,t.parseMessage=void 0,t.parseMessage=function(e){var t={event:e.event,type:e.type,payload:e.payload};return"number"==typeof e.id&&(t.id=e.id),"boolean"==typeof e.success&&(t.success=e.success),t}},o0o1:function(e,t,n){e.exports=n("ls82")},oShl:function(e,t,n){var r=n("Nsbk"),o=n("SksO"),a=n("xfeJ"),i=n("sXyB");function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},s(t)}e.exports=s},ozwZ:function(e,t,n){},sVx8:function(e,t,n){"use strict";t.__esModule=!0,t.BLOCKCHAIN_EVENT=t.RESPONSE_EVENT=t.TRANSPORT_EVENT=t.DEVICE_EVENT=t.UI_EVENT=t.CORE_EVENT=void 0,t.CORE_EVENT="CORE_EVENT",t.UI_EVENT="UI_EVENT",t.DEVICE_EVENT="DEVICE_EVENT",t.TRANSPORT_EVENT="TRANSPORT_EVENT",t.RESPONSE_EVENT="RESPONSE_EVENT",t.BLOCKCHAIN_EVENT="BLOCKCHAIN_EVENT"},sXyB:function(e,t,n){var r=n("SksO");function o(t,n,a){return e.exports=o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},o.apply(null,arguments)}e.exports=o},sZ4M:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,t.default=function(e,t,n){var r=document.querySelectorAll(e||".trezor-webusb-button"),o=t+"?"+Date.now();r.forEach((function(e){if(e.getElementsByTagName("iframe").length<1){var t=e.getBoundingClientRect(),r=document.createElement("iframe");r.frameBorder="0",r.width=Math.round(t.width)+"px",r.height=Math.round(t.height)+"px",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex="1",r.setAttribute("allow","usb"),r.setAttribute("scrolling","no"),r.onload=function(){r.contentWindow.postMessage({},n)},r.src=o,e.append(r)}}))}},"tM+K":function(e,t,n){"use strict";t.__esModule=!0,t.START_PENDING=t.RECONNECT=t.REQUEST=t.STREAM=t.UPDATE=t.ERROR=t.START=void 0,t.START="transport-start",t.ERROR="transport-error",t.UPDATE="transport-update",t.STREAM="transport-stream",t.REQUEST="transport-request_device",t.RECONNECT="transport-reconnect",t.START_PENDING="transport-start_pending"},uE4B:function(e,t,n){"use strict";t.__esModule=!0,t.UNREADABLE=t.WAIT_FOR_SELECTION=t.WORD=t.PASSPHRASE_ON_DEVICE=t.PASSPHRASE=t.PIN=t.BUTTON=t.LOADING=t.USED_ELSEWHERE=t.RELEASED=t.ACQUIRED=t.RELEASE=t.ACQUIRE=t.CHANGED=t.DISCONNECT=t.CONNECT_UNACQUIRED=t.CONNECT=void 0,t.CONNECT="device-connect",t.CONNECT_UNACQUIRED="device-connect_unacquired",t.DISCONNECT="device-disconnect",t.CHANGED="device-changed",t.ACQUIRE="device-acquire",t.RELEASE="device-release",t.ACQUIRED="device-acquired",t.RELEASED="device-released",t.USED_ELSEWHERE="device-used_elsewhere",t.LOADING="device-loading",t.BUTTON="button",t.PIN="pin",t.PASSPHRASE="passphrase",t.PASSPHRASE_ON_DEVICE="passphrase_on_device",t.WORD="word",t.WAIT_FOR_SELECTION="device-wait_for_selection",t.UNREADABLE="unreadable-device"},we8g:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,t.default='.trezorconnect-container{position:fixed!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important;z-index:10000!important;width:100%!important;height:100%!important;top:0!important;left:0!important;background:rgba(0,0,0,.35)!important;overflow:auto!important;padding:20px!important;margin:0!important}.trezorconnect-container .trezorconnect-window{position:relative!important;display:block!important;width:370px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif!important;margin:auto!important;border-radius:3px!important;background-color:#fff!important;text-align:center!important;overflow:hidden!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head{text-align:left;padding:12px 24px!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-logo{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-close{cursor:pointer!important;height:24px!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-close svg{fill:#757575;-webkit-transition:fill .3s ease-in-out!important;transition:fill .3s ease-in-out!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-close:hover svg{fill:#494949}.trezorconnect-container .trezorconnect-window .trezorconnect-body{padding:24px 24px 32px!important;background:#FBFBFB!important;border-top:1px solid #EBEBEB}.trezorconnect-container .trezorconnect-window .trezorconnect-body h3{color:#505050!important;font-size:16px!important;font-weight:500!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body p{margin:8px 0 24px!important;font-weight:400!important;color:#A9A9A9!important;font-size:12px!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body button{width:100%!important;padding:12px 24px!important;margin:0!important;border-radius:3px!important;font-size:14px!important;font-weight:300!important;cursor:pointer!important;background:#01B757!important;color:#fff!important;border:0!important;-webkit-transition:background-color .3s ease-in-out!important;transition:background-color .3s ease-in-out!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body button:hover{background-color:#00AB51!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body button:active{background-color:#009546!important}/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0IiwiJHN0ZGluIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNBLHlCQUNJLFNBQUEsZ0JBQ0EsUUFBQSxzQkFDQSxRQUFBLHVCQUNBLFFBQUEsc0JBRUEsUUFBQSxlQUNBLG1CQUFBLG1CQUNBLHNCQUFBLGlCQUNBLHVCQUFBLGlCQUNBLG1CQUFBLGlCQUNBLGVBQUEsaUJBRUEsa0JBQUEsaUJBQ0Esb0JBQUEsaUJBQ0EsZUFBQSxpQkNmTSxZQUFhLGlCREFyQixRQUFTLGdCQWtCSCxNQUFBLGVBQ0EsT0FBQSxlQUNBLElBQUEsWUFDQSxLQUFBLFlBQ0EsV0FBQSwwQkFDQSxTQUFBLGVBQ0EsUUFBQSxlQUNBLE9BQUEsWUNkUiwrQ0RYRSxTQUFVLG1CQTZCQSxRQUFBLGdCQUNBLE1BQUEsZ0JBQ0EsWUFBQSxjQUFBLG1CQUFBLFdBQUEsT0FBQSxpQkFBQSxNQUFBLHFCQUNBLE9BQUEsZUNmVixjQUFlLGNEakJmLGlCQWlCRSxlQWtCWSxXQUFBLGlCQ2ZkLFNBQVUsaUJEbUJJLG1FQUNBLFdBQUEsS0NoQmQsUUFBUyxLQUFLLGVEeEJkLFFBQVMsc0JBMENTLFFBQUEsdUJBQ0EsUUFBQSxzQkNmbEIsUUFBUyxlRGlCSyxrQkE1QlosaUJBOEJvQixvQkFBQSxpQkNoQmxCLGVBQWdCLGlCRC9CWixZQWlCTixpQkFzQ1EsdUZBQ0EsaUJBQUEsRUNwQlYsYUFBYyxFRHBDVixTQUFVLEVBMkRBLEtBQUEsRUFFQSx3RkNwQmQsT0FBUSxrQkR6Q1IsT0FBUSxlQWlFTSw0RkFDQSxLQUFBLFFBQ0EsbUJBQUEsS0FBQSxJQUFBLHNCQ3BCZCxXQUFZLEtBQUssSUFBSyxzQkR3QlIsa0dBQ0EsS0FBQSxRQUVBLG1FQUNBLFFBQUEsS0FBQSxLQUFBLGVBQ0EsV0FBQSxrQkFDQSxXQUFBLElBQUEsTUFBQSxRQUVBLHNFQUNBLE1BQUEsa0JBQ0EsVUFBQSxlQ3JCZCxZQUFhLGNEd0JLLHFFQ3JCbEIsT0FBUSxJQUFJLEVBQUksZUR3QkYsWUFBQSxjQUNJLE1BQUEsa0JDdEJsQixVQUFXLGVBRWIsMEVBQ0UsTUFBTyxlQUNQLFFBQVMsS0FBSyxlQUNkLE9BQVEsWUFDUixjQUFlLGNBQ2YsVUFBVyxlQUNYLFlBQWEsY0FDYixPQUFRLGtCQUNSLFdBQVksa0JBQ1osTUFBTyxlQUNQLE9BQVEsWUFDUixtQkFBb0IsaUJBQWlCLElBQUssc0JBQzFDLFdBQVksaUJBQWlCLElBQUssc0JBRXBDLGdGQUNFLGlCQUFrQixrQkFFcEIsaUZBQ0UsaUJBQWtCIn0= */'},xCEQ:function(e,t,n){},xfeJ:function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},yXPU:function(e,t){function n(e,t,n,r,o,a,i){try{var s=e[a](i),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,u,"next",e)}function u(e){n(i,o,a,s,u,"throw",e)}s(void 0)}))}}}}]);