-
Notifications
You must be signed in to change notification settings - Fork 1
/
background.js
2 lines (2 loc) · 91.4 KB
/
background.js
1
2
/*! For license information please see background.js.LICENSE.txt */
!function(){var e={3877:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(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")}()}var i=9007199254740991,a="[object Arguments]",u="[object Function]",s="[object GeneratorFunction]",c=/^(?:0|[1-9]\d*)$/;var l=Object.prototype,f=l.hasOwnProperty,p=l.toString,d=l.propertyIsEnumerable,g=Math.max;function h(e,t){var r=x(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&w(e)}(e)&&f.call(e,"callee")&&(!d.call(e,"callee")||p.call(e)==a)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var i in e)!t&&!f.call(e,i)||o&&("length"==i||y(i,n))||r.push(i);return r}function v(e,t,r){var n=e[t];f.call(e,t)&&b(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function m(e){if(!A(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=function(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||l;return e===r}(e),r=[];for(var n in e)("constructor"!=n||!t&&f.call(e,n))&&r.push(n);return r}function y(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function b(e,t){return e===t||e!==e&&t!==t}var x=Array.isArray;function w(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!function(e){var t=A(e)?p.call(e):"";return t==u||t==s}(e)}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var k=function(e){return t=function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&function(e,t,r){if(!A(r))return!1;var n=typeof t;return!!("number"==n?w(r)&&y(t,r.length):"string"==n&&t in r)&&b(r[t],e)}(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var u=r[n];u&&e(t,u,n,i)}return t},r=g(void 0===r?t.length-1:r,0),function(){for(var e=arguments,n=-1,o=g(e.length-r,0),i=Array(o);++n<o;)i[n]=e[r+n];n=-1;for(var a=Array(r+1);++n<r;)a[n]=e[n];return a[r]=i,function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(t,this,a)};var t,r}((function(e,t){!function(e,t,r,n){r||(r={});for(var o=-1,i=t.length;++o<i;){var a=t[o],u=n?n(r[a],e[a],a,r,e):void 0;v(r,a,void 0===u?e[a]:u)}}(t,function(e){return w(e)?h(e,!0):m(e)}(t),e)}));var O=k,P="chromex.dispatch",j="chromex.state",_="chromex.patch_state",E="chromex.port_name",S=function(e){return e},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},e,e.payload?{payload:t(e.payload)}:{})},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S,r=arguments.length>2?arguments[2]:void 0;return r?function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return r.apply(void 0,[n].concat(i))?e.apply(void 0,[N(n,t)].concat(i)):e.apply(void 0,[n].concat(i))}:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return e.apply(void 0,[N(r,t)].concat(o))}},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S;return function(t){return function(r,n){return t(T(r,e,n))}}},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S;return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(o.length<=r)throw new Error("Message in request could not be serialized. "+"Expected message in position ".concat(r," but only received ").concat(o.length," args."));return o[r]=N(o[r],e),t.apply(void 0,o)}}},I="updated",L="removed";function R(){var e;try{e=self.chrome||self.browser||browser}catch(t){e=browser}if(!e)throw new Error("Browser API is not present");return e}var D={portName:E,state:{},extensionId:null,serializer:S,deserializer:S,patchStrategy:function(e,t){var r=Object.assign({},e);return t.forEach((function(e){var t=e.change,n=e.key,o=e.value;switch(t){case I:r[n]=o;break;case L:Reflect.deleteProperty(r,n)}})),r}},F=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D,n=r.portName,o=void 0===n?D.portName:n,i=r.state,a=void 0===i?D.state:i,u=r.extensionId,s=void 0===u?D.extensionId:u,c=r.serializer,l=void 0===c?D.serializer:c,f=r.deserializer,p=void 0===f?D.deserializer:f,d=r.patchStrategy,g=void 0===d?D.patchStrategy:d;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!o)throw new Error("portName is required in options");if("function"!==typeof l)throw new Error("serializer must be a function");if("function"!==typeof p)throw new Error("deserializer must be a function");if("function"!==typeof g)throw new Error("patchStrategy must be one of the included patching strategies or a custom patching function");this.portName=o,this.readyResolved=!1,this.readyPromise=new Promise((function(e){return t.readyResolve=e})),this.browserAPI=R(),this.extensionId=s,this.port=this.browserAPI.runtime.connect(this.extensionId,{name:o}),this.safetyHandler=this.safetyHandler.bind(this),this.browserAPI.runtime.onMessage&&(this.safetyMessage=this.browserAPI.runtime.onMessage.addListener(this.safetyHandler)),this.serializedPortListener=C(p)((function(){var e;return(e=t.port.onMessage).addListener.apply(e,arguments)})),this.serializedMessageSender=M(l)((function(){var e;return(e=t.browserAPI.runtime).sendMessage.apply(e,arguments)}),1),this.listeners=[],this.state=a,this.patchStrategy=g,this.serializedPortListener((function(e){switch(e.type){case j:t.replaceState(e.payload),t.readyResolved||(t.readyResolved=!0,t.readyResolve());break;case _:t.patchState(e.payload)}})),this.dispatch=this.dispatch.bind(this)}var t,n,o;return t=e,n=[{key:"ready",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null!==e?this.readyPromise.then(e):this.readyPromise}},{key:"subscribe",value:function(e){var t=this;return this.listeners.push(e),function(){t.listeners=t.listeners.filter((function(t){return t!==e}))}}},{key:"patchState",value:function(e){this.state=this.patchStrategy(this.state,e),this.listeners.forEach((function(e){return e()}))}},{key:"replaceState",value:function(e){this.state=e,this.listeners.forEach((function(e){return e()}))}},{key:"getState",value:function(){return this.state}},{key:"replaceReducer",value:function(){}},{key:"dispatch",value:function(e){var t=this;return new Promise((function(r,n){t.serializedMessageSender(t.extensionId,{type:P,portName:t.portName,payload:e},null,(function(e){if(e){var t=e.error,o=e.value;if(t){var i=new Error("".concat("\nLooks like there is an error in the background page. You might want to inspect your background page for more details.\n").concat(t));n(O(i,t))}else r(o&&o.payload)}else r({message:"invalid value return"})}))}))}},{key:"safetyHandler",value:function(e){"storeReady"===e.action&&e.portName===this.portName&&(this.browserAPI.runtime.onMessage.removeListener(this.safetyHandler),this.readyResolved||(this.readyResolved=!0,this.readyResolve()))}}],n&&r(t.prototype,n),o&&r(t,o),e}();function B(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var z={portName:E,dispatchResponder:function(e,t){Promise.resolve(e).then((function(e){t({error:null,value:e})})).catch((function(e){console.error("error dispatching result:",e),t({error:e.message,value:null})}))},serializer:S,deserializer:S,diffStrategy:function(e,t){var r=[];return Object.keys(t).forEach((function(n){e[n]!==t[n]&&r.push({key:n,value:t[n],change:I})})),Object.keys(e).forEach((function(e){t.hasOwnProperty(e)||r.push({key:e,change:L})})),r}};t.IF=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,r=t.portName,n=void 0===r?z.portName:r,o=t.dispatchResponder,i=void 0===o?z.dispatchResponder:o,a=t.serializer,u=void 0===a?z.serializer:a,s=t.deserializer,c=void 0===s?z.deserializer:s,l=t.diffStrategy,f=void 0===l?z.diffStrategy:l;if(!n)throw new Error("portName is required in options");if("function"!==typeof u)throw new Error("serializer must be a function");if("function"!==typeof c)throw new Error("deserializer must be a function");if("function"!==typeof f)throw new Error("diffStrategy must be one of the included diffing strategies or a custom diff function");var p=R(),d=function(t,r,o){if(t.type===P&&t.portName===n){var a=Object.assign({},t.payload,{_sender:r}),u=null;try{u=e.dispatch(a)}catch(s){u=Promise.reject(s.message),console.error(s)}return i(u,o),!0}},g=function(t){if(t.name===n){var r=M(u)((function(){return t.postMessage.apply(t,arguments)})),o=e.getState(),i=e.subscribe((function(){var t=e.getState(),n=f(o,t);n.length&&(o=t,r({type:_,payload:n}))}));t.onDisconnect.addListener(i),r({type:j,payload:o})}},h=C(c),v=function(e){return e.type===P&&e.portName===n};h((function(){var e;return(e=p.runtime.onMessage).addListener.apply(e,arguments)}))(d,v),p.runtime.onMessageExternal?h((function(){var e;return(e=p.runtime.onMessageExternal).addListener.apply(e,arguments)}))(d,v):console.warn("runtime.onMessageExternal is not supported"),p.runtime.onConnect.addListener(g),p.runtime.onConnectExternal?p.runtime.onConnectExternal.addListener(g):console.warn("runtime.onConnectExternal is not supported"),p.tabs.query({},(function(e){var t=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;p.tabs.sendMessage(u.id,{action:"storeReady",portName:n},(function(){chrome.runtime.lastError}))}}catch(s){r=!0,o=s}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}}))}},6748:function(e,t,r){!function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function o(e,t,r){o.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function u(e,t,r){u.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function s(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t="undefined"==typeof e?"undefined":N(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e,t,r,n,f,p,d){d=d||[];var g=(f=f||[]).slice(0);if("undefined"!=typeof p){if(n){if("function"==typeof n&&n(g,p))return;if("object"===("undefined"==typeof n?"undefined":N(n))){if(n.prefilter&&n.prefilter(g,p))return;if(n.normalize){var h=n.normalize(g,p,e,t);h&&(e=h[0],t=h[1])}}}g.push(p)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var v="undefined"==typeof e?"undefined":N(e),m="undefined"==typeof t?"undefined":N(t),y="undefined"!==v||d&&d[d.length-1].lhs&&d[d.length-1].lhs.hasOwnProperty(p),b="undefined"!==m||d&&d[d.length-1].rhs&&d[d.length-1].rhs.hasOwnProperty(p);if(!y&&b)r(new i(g,t));else if(!b&&y)r(new a(g,e));else if(c(e)!==c(t))r(new o(g,e,t));else if("date"===c(e)&&e-t!==0)r(new o(g,e,t));else if("object"===v&&null!==e&&null!==t)if(d.filter((function(t){return t.lhs===e})).length)e!==t&&r(new o(g,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){var x;for(e.length,x=0;x<e.length;x++)x>=t.length?r(new u(g,x,new a(void 0,e[x]))):l(e[x],t[x],r,n,g,x,d);for(;x<t.length;)r(new u(g,x,new i(void 0,t[x++])))}else{var w=Object.keys(e),A=Object.keys(t);w.forEach((function(o,i){var a=A.indexOf(o);a>=0?(l(e[o],t[o],r,n,g,o,d),A=s(A,a)):l(e[o],void 0,r,n,g,o,d)})),A.forEach((function(e){l(void 0,t[e],r,n,g,e,d)}))}d.length=d.length-1}else e!==t&&("number"===v&&isNaN(e)&&isNaN(t)||r(new o(g,e,t)))}function f(e,t,r,n){return n=n||[],l(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function p(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":p(o[r.path[n]],r.index,r.item);break;case"D":delete o[r.path[n]];break;case"E":case"N":o[r.path[n]]=r.rhs}}else switch(r.kind){case"A":p(e[t],r.index,r.item);break;case"D":e=s(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function d(e,t,r){if(e&&t&&r&&r.kind){for(var n=e,o=-1,i=r.path?r.path.length-1:0;++o<i;)"undefined"==typeof n[r.path[o]]&&(n[r.path[o]]="number"==typeof r.path[o]?[]:{}),n=n[r.path[o]];switch(r.kind){case"A":p(r.path?n[r.path[o]]:n,r.index,r.item);break;case"D":delete n[r.path[o]];break;case"E":case"N":n[r.path[o]]=r.rhs}}}function g(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":g(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}else switch(r.kind){case"A":g(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=s(e,t)}return e}function h(e,t,r){if(e&&t&&r&&r.kind){var n,o,i=e;for(o=r.path.length-1,n=0;n<o;n++)"undefined"==typeof i[r.path[n]]&&(i[r.path[n]]={}),i=i[r.path[n]];switch(r.kind){case"A":g(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}}function v(e,t,r){e&&t&&l(e,t,(function(n){r&&!r(e,t,n)||d(e,t,n)}))}function m(e){return"color: "+M[e].color+"; font-weight: bold"}function y(e){var t=e.kind,r=e.path,n=e.lhs,o=e.rhs,i=e.index,a=e.item;switch(t){case"E":return[r.join("."),n,"\u2192",o];case"N":return[r.join("."),o];case"D":return[r.join(".")];case"A":return[r.join(".")+"["+i+"]",a];default:return[]}}function b(e,t,r,n){var o=f(e,t);try{n?r.groupCollapsed("diff"):r.group("diff")}catch(e){r.log("diff")}o?o.forEach((function(e){var t=e.kind,n=y(e);r.log.apply(r,["%c "+M[t].text,m(t)].concat(T(n)))})):r.log("\u2014\u2014 no diff \u2014\u2014");try{r.groupEnd()}catch(e){r.log("\u2014\u2014 diff end \u2014\u2014 ")}}function x(e,t,r,n){switch("undefined"==typeof e?"undefined":N(e)){case"object":return"function"==typeof e[n]?e[n].apply(e,T(r)):e[n];case"function":return e(t);default:return e}}function w(e){var t=e.timestamp,r=e.duration;return function(e,n,o){var i=["action"];return i.push("%c"+String(e.type)),t&&i.push("%c@ "+n),r&&i.push("%c(in "+o.toFixed(2)+" ms)"),i.join(" ")}}function A(e,t){var r=t.logger,n=t.actionTransformer,o=t.titleFormatter,i=void 0===o?w(t):o,a=t.collapsed,u=t.colors,s=t.level,c=t.diff,l="undefined"==typeof t.titleFormatter;e.forEach((function(o,f){var p=o.started,d=o.startedTime,g=o.action,h=o.prevState,v=o.error,m=o.took,y=o.nextState,w=e[f+1];w&&(y=w.prevState,m=w.started-p);var A=n(g),k="function"==typeof a?a((function(){return y}),g,o):a,O=E(d),P=u.title?"color: "+u.title(A)+";":"",j=["color: gray; font-weight: lighter;"];j.push(P),t.timestamp&&j.push("color: gray; font-weight: lighter;"),t.duration&&j.push("color: gray; font-weight: lighter;");var _=i(A,O,m);try{k?u.title&&l?r.groupCollapsed.apply(r,["%c "+_].concat(j)):r.groupCollapsed(_):u.title&&l?r.group.apply(r,["%c "+_].concat(j)):r.group(_)}catch(e){r.log(_)}var S=x(s,A,[h],"prevState"),N=x(s,A,[A],"action"),T=x(s,A,[v,h],"error"),C=x(s,A,[y],"nextState");if(S)if(u.prevState){var M="color: "+u.prevState(h)+"; font-weight: bold";r[S]("%c prev state",M,h)}else r[S]("prev state",h);if(N)if(u.action){var I="color: "+u.action(A)+"; font-weight: bold";r[N]("%c action ",I,A)}else r[N]("action ",A);if(v&&T)if(u.error){var L="color: "+u.error(v,h)+"; font-weight: bold;";r[T]("%c error ",L,v)}else r[T]("error ",v);if(C)if(u.nextState){var R="color: "+u.nextState(y)+"; font-weight: bold";r[C]("%c next state",R,y)}else r[C]("next state",y);c&&b(h,y,r,k);try{r.groupEnd()}catch(e){r.log("\u2014\u2014 log end \u2014\u2014")}}))}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},I,e),r=t.logger,n=t.stateTransformer,o=t.errorTransformer,i=t.predicate,a=t.logErrors,u=t.diffPredicate;if("undefined"==typeof r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var s=[];return function(e){var r=e.getState;return function(e){return function(c){if("function"==typeof i&&!i(r,c))return e(c);var l={};s.push(l),l.started=S.now(),l.startedTime=new Date,l.prevState=n(r()),l.action=c;var f=void 0;if(a)try{f=e(c)}catch(e){l.error=o(e)}else f=e(c);l.took=S.now()-l.started,l.nextState=n(r());var p=t.diff&&"function"==typeof u?u(r,c):t.diff;if(A(s,Object.assign({},t,{diff:p})),s.length=0,l.error)throw l.error;return f}}}}var O,P,j=function(e,t){return new Array(t+1).join(e)},_=function(e,t){return j("0",t-e.toString().length)+e},E=function(e){return _(e.getHours(),2)+":"+_(e.getMinutes(),2)+":"+_(e.getSeconds(),2)+"."+_(e.getMilliseconds(),3)},S="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,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},T=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},C=[];O="object"===("undefined"==typeof r.g?"undefined":N(r.g))&&r.g?r.g:"undefined"!=typeof window?window:{},(P=O.DeepDiff)&&C.push((function(){"undefined"!=typeof P&&O.DeepDiff===f&&(O.DeepDiff=P,P=void 0)})),t(o,n),t(i,n),t(a,n),t(u,n),Object.defineProperties(f,{diff:{value:f,enumerable:!0},observableDiff:{value:l,enumerable:!0},applyDiff:{value:v,enumerable:!0},applyChange:{value:d,enumerable:!0},revertChange:{value:h,enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof P},enumerable:!0},noConflict:{value:function(){return C&&(C.forEach((function(e){e()})),C=null),f},enumerable:!0}});var M={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},I={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?k()({dispatch:t,getState:r}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};e.defaults=I,e.createLogger=k,e.logger=L,e.default=L,Object.defineProperty(e,"__esModule",{value:!0})}(t)},930:function(e,t,r){var n,o,i,a=r(861).default,u=r(6690).default,s=r(9728).default,c=r(1588).default,l=r(3808).default,f=r(1655).default,p=r(6389).default,d=r(3496).default;"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self&&self,o=[e],n=function(e){"use strict";var t,r;if(null===(t=globalThis.chrome)||void 0===t||null===(r=t.runtime)||void 0===r||!r.id)throw new Error("This script should only be loaded in a browser extension.");if("undefined"===typeof globalThis.browser||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){var n="The message port closed before a response was received.",o=function(e){var t={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(t).length)throw new Error("api-metadata.json has not been included in browser-polyfill");var r=function(e){f(r,e);var t=p(r);function r(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return u(this,r),(n=t.call(this,o)).createItem=e,n}return s(r,[{key:"get",value:function(e){return this.has(e)||this.set(e,this.createItem(e)),c(l(r.prototype),"get",this).call(this,e)}}]),r}(d(WeakMap)),o=function(e){return e&&"object"===typeof e&&"function"===typeof e.then},i=function(t,r){return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];e.runtime.lastError?t.reject(new Error(e.runtime.lastError.message)):r.singleCallbackArg||o.length<=1&&!1!==r.singleCallbackArg?t.resolve(o[0]):t.resolve(o)}},g=function(e){return 1==e?"argument":"arguments"},h=function(e,t){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];if(o.length<t.minArgs)throw new Error("Expected at least ".concat(t.minArgs," ").concat(g(t.minArgs)," for ").concat(e,"(), got ").concat(o.length));if(o.length>t.maxArgs)throw new Error("Expected at most ".concat(t.maxArgs," ").concat(g(t.maxArgs)," for ").concat(e,"(), got ").concat(o.length));return new Promise((function(n,a){if(t.fallbackToNoCallback)try{r[e].apply(r,o.concat([i({resolve:n,reject:a},t)]))}catch(u){console.warn("".concat(e," API method doesn't seem to support the callback parameter, ")+"falling back to call it without a callback: ",u),r[e].apply(r,o),t.fallbackToNoCallback=!1,t.noCallback=!0,n()}else t.noCallback?(r[e].apply(r,o),n()):r[e].apply(r,o.concat([i({resolve:n,reject:a},t)]))}))}},v=function(e,t,r){return new Proxy(t,{apply:function(t,n,o){return r.call.apply(r,[n,e].concat(a(o)))}})},m=Function.call.bind(Object.prototype.hasOwnProperty),y=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Object.create(null),i={has:function(e,r){return r in t||r in o},get:function(i,a,u){if(a in o)return o[a];if(a in t){var s=t[a];if("function"===typeof s)if("function"===typeof r[a])s=v(t,t[a],r[a]);else if(m(n,a)){var c=h(a,n[a]);s=v(t,t[a],c)}else s=s.bind(t);else if("object"===typeof s&&null!==s&&(m(r,a)||m(n,a)))s=e(s,r[a],n[a]);else{if(!m(n,"*"))return Object.defineProperty(o,a,{configurable:!0,enumerable:!0,get:function(){return t[a]},set:function(e){t[a]=e}}),s;s=e(s,r[a],n["*"])}return o[a]=s,s}},set:function(e,r,n,i){return r in o?o[r]=n:t[r]=n,!0},defineProperty:function(e,t,r){return Reflect.defineProperty(o,t,r)},deleteProperty:function(e,t){return Reflect.deleteProperty(o,t)}},a=Object.create(t);return new Proxy(a,i)},b=function(e){return{addListener:function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];t.addListener.apply(t,[e.get(r)].concat(o))},hasListener:function(t,r){return t.hasListener(e.get(r))},removeListener:function(t,r){t.removeListener(e.get(r))}}},x=new r((function(e){return"function"!==typeof e?e:function(t){var r=y(t,{},{getContent:{minArgs:0,maxArgs:0}});e(r)}})),w=new r((function(e){return"function"!==typeof e?e:function(t,r,n){var i,a,u=!1,s=new Promise((function(e){i=function(t){u=!0,e(t)}}));try{a=e(t,r,i)}catch(f){a=Promise.reject(f)}var c=!0!==a&&o(a);if(!0!==a&&!c&&!u)return!1;var l=function(e){e.then((function(e){n(e)}),(function(e){var t;t=e&&(e instanceof Error||"string"===typeof e.message)?e.message:"An unexpected error occurred",n({__mozWebExtensionPolyfillReject__:!0,message:t})})).catch((function(e){console.error("Failed to send onMessage rejected reply",e)}))};return l(c?a:s),!0}})),A=function(t,r){var o=t.reject,i=t.resolve;e.runtime.lastError?e.runtime.lastError.message===n?i():o(new Error(e.runtime.lastError.message)):r&&r.__mozWebExtensionPolyfillReject__?o(new Error(r.message)):i(r)},k=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];if(o.length<t.minArgs)throw new Error("Expected at least ".concat(t.minArgs," ").concat(g(t.minArgs)," for ").concat(e,"(), got ").concat(o.length));if(o.length>t.maxArgs)throw new Error("Expected at most ".concat(t.maxArgs," ").concat(g(t.maxArgs)," for ").concat(e,"(), got ").concat(o.length));return new Promise((function(e,t){var n=A.bind(null,{resolve:e,reject:t});o.push(n),r.sendMessage.apply(r,o)}))},O={devtools:{network:{onRequestFinished:b(x)}},runtime:{onMessage:b(w),onMessageExternal:b(w),sendMessage:k.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:k.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},P={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return t.privacy={network:{"*":P},services:{"*":P},websites:{"*":P}},y(e,O,t)};e.exports=o(chrome)}else e.exports=globalThis.browser},void 0===(i="function"===typeof n?n.apply(t,o):n)||(e.exports=i)},3897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},3405:function(e,t,r){var n=r(3897);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6115:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},6690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3515:function(e,t,r){var n=r(6015),o=r(9617);function i(t,r,a){return o()?(e.exports=i=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,r){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return r&&n(i,r.prototype),i},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(null,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},9728:function(e,t,r){var n=r(4062);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},6389:function(e,t,r){var n=r(3808),o=r(9617),i=r(4993);e.exports=function(e){var t=o();return function(){var r,o=n(e);if(t){var a=n(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return i(this,r)}},e.exports.__esModule=!0,e.exports.default=e.exports},1588:function(e,t,r){var n=r(1753);function o(){return"undefined"!==typeof Reflect&&Reflect.get?(e.exports=o=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,r){var o=n(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(this,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},3808:function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1655:function(e,t,r){var n=r(6015);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},6035:function(e){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},9617:function(e){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},9498:function(e){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},2281:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},4993:function(e,t,r){var n=r(8698).default,o=r(6115);e.exports=function(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1753:function(e,t,r){var n=r(3808);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},861:function(e,t,r){var n=r(3405),o=r(9498),i=r(6116),a=r(2281);e.exports=function(e){return n(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},5036:function(e,t,r){var n=r(8698).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4062:function(e,t,r){var n=r(8698).default,o=r(5036);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(r){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6116:function(e,t,r){var n=r(3897);e.exports=function(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},3496:function(e,t,r){var n=r(3808),o=r(6015),i=r(6035),a=r(3515);function u(t){var r="function"===typeof Map?new Map:void 0;return e.exports=u=function(e){if(null===e||!i(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,u(t)}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(t){return e="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},e(t)}function t(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}function n(e,r,n){return(r=t(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if(e){if("string"===typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function s(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function c(){c=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(N){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=f;var d={};function g(){}function h(){}function v(){}var m={};l(m,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(E([])));b&&b!==r&&n.call(b,a)&&(m=b);var x=v.prototype=g.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function A(t,r){function i(o,a,u,s){var c=p(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==e(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(e){i("next",e,u,s)}),(function(e){i("throw",e,u,s)})):r.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return i("throw",e,u,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=O(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=v,o(x,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=l(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},w(A.prototype),l(A.prototype,u,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new A(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(x),l(x,s,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(c){return void r(c)}u.done?t(s):Promise.resolve(s).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,u,"next",e)}function u(e){l(i,n,o,a,u,"throw",e)}a(void 0)}))}}var p="WEBEXT_REDUX_TEST";function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,t(o.key),o)}}function h(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function m(e){return!!e&&!!e[ae]}function y(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===ue}(e)||Array.isArray(e)||!!e[ie]||!!(null===(t=e.constructor)||void 0===t?void 0:t[ie])||P(e)||j(e))}function b(e,t,r){void 0===r&&(r=!1),0===x(e)?(r?Object.keys:se)(e).forEach((function(n){r&&"symbol"==typeof n||t(n,e[n],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function x(e){var t=e[ae];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:P(e)?2:j(e)?3:0}function w(e,t){return 2===x(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t){return 2===x(e)?e.get(t):e[t]}function k(e,t,r){var n=x(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function O(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function P(e){return te&&e instanceof Map}function j(e){return re&&e instanceof Set}function _(e){return e.o||e.t}function E(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ce(e);delete t[ae];for(var r=se(t),n=0;n<r.length;n++){var o=r[n],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function S(e,t){return void 0===t&&(t=!1),T(e)||m(e)||!y(e)||(x(e)>1&&(e.set=e.add=e.clear=e.delete=N),Object.freeze(e),t&&b(e,(function(e,t){return S(t,!0)}),!0)),e}function N(){v(2)}function T(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function C(e){var t=le[e];return t||v(18,e),t}function M(e,t){le[e]||(le[e]=t)}function I(){return Q}function L(e,t){t&&(C("Patches"),e.u=[],e.s=[],e.v=t)}function R(e){D(e),e.p.forEach(B),e.p=null}function D(e){e===Q&&(Q=e.l)}function F(e){return Q={p:[],l:Q,h:e,m:!0,_:0}}function B(e){var t=e[ae];0===t.i||1===t.i?t.j():t.O=!0}function z(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.g||C("ES5").S(t,e,n),n?(r[ae].P&&(R(t),v(4)),y(e)&&(e=q(t,e),t.l||W(t,e)),t.u&&C("Patches").M(r[ae].t,e,t.u,t.s)):e=q(t,r,[]),R(t),t.u&&t.v(t.u,t.s),e!==oe?e:void 0}function q(e,t,r){if(T(t))return t;var n=t[ae];if(!n)return b(t,(function(o,i){return H(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return W(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=E(n.k):n.o,i=o,a=!1;3===n.i&&(i=new Set(o),o.clear(),a=!0),b(i,(function(t,i){return H(e,n,o,t,i,r,a)})),W(e,o,!1),r&&e.u&&C("Patches").N(n,r,e.u,e.s)}return n.o}function H(e,t,r,n,o,i,a){if(m(o)){var u=q(e,o,i&&t&&3!==t.i&&!w(t.R,n)?i.concat(n):void 0);if(k(r,n,u),!m(u))return;e.m=!1}else a&&r.add(o);if(y(o)&&!T(o)){if(!e.h.D&&e._<1)return;q(e,o),t&&t.A.l||W(e,o)}}function W(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&S(t,r)}function U(e,t){var r=e[ae];return(r?_(r):e)[t]}function G(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function V(e){e.P||(e.P=!0,e.l&&V(e.l))}function X(e){e.o||(e.o=E(e.t))}function K(e,t,r){var n=P(t)?C("MapSet").F(t,r):j(t)?C("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:I(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=fe;r&&(o=[n],i=pe);var a=Proxy.revocable(o,i),u=a.revoke,s=a.proxy;return n.k=s,n.j=u,s}(t,r):C("ES5").J(t,r);return(r?r.A:I()).p.push(n),n}function Z(e){return m(e)||v(22,e),function e(t){if(!y(t))return t;var r,n=t[ae],o=x(t);if(n){if(!n.P&&(n.i<4||!C("ES5").K(n)))return n.t;n.I=!0,r=$(t,o),n.I=!1}else r=$(t,o);return b(r,(function(t,o){n&&A(n.t,t)===o||k(r,t,e(o))})),3===o?new Set(r):r}(e)}function $(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return E(e)}function Y(){function e(e,t){var r=o[e];return r?r.enumerable=t:o[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[ae];return fe.get(t,e)},set:function(t){var r=this[ae];fe.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][ae];if(!o.P)switch(o.i){case 5:n(o)&&V(o);break;case 4:r(o)&&V(o)}}}function r(e){for(var t=e.t,r=e.k,n=se(r),o=n.length-1;o>=0;o--){var i=n[o];if(i!==ae){var a=t[i];if(void 0===a&&!w(t,i))return!0;var u=r[i],s=u&&u[ae];if(s?s.t!==a:!O(u,a))return!0}}var c=!!t[ae];return n.length!==se(t).length+(c?0:1)}function n(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n<t.length;n++)if(!t.hasOwnProperty(n))return!0;return!1}var o={};M("ES5",{J:function(t,r){var n=Array.isArray(t),o=function(t,r){if(t){for(var n=Array(r.length),o=0;o<r.length;o++)Object.defineProperty(n,""+o,e(o,!0));return n}var i=ce(r);delete i[ae];for(var a=se(i),u=0;u<a.length;u++){var s=a[u];i[s]=e(s,t||!!i[s].enumerable)}return Object.create(Object.getPrototypeOf(r),i)}(n,t),i={i:n?5:4,A:r?r.A:I(),P:!1,I:!1,R:{},l:r,t:t,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,ae,{value:i,writable:!0}),o},S:function(e,r,o){o?m(r)&&r[ae].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var r=t[ae];if(r){var o=r.t,i=r.k,a=r.R,u=r.i;if(4===u)b(i,(function(t){t!==ae&&(void 0!==o[t]||w(o,t)?a[t]||e(i[t]):(a[t]=!0,V(r)))})),b(o,(function(e){void 0!==i[e]||w(i,e)||(a[e]=!1,V(r))}));else if(5===u){if(n(r)&&(V(r),a.length=!0),i.length<o.length)for(var s=i.length;s<o.length;s++)a[s]=!1;else for(var c=o.length;c<i.length;c++)a[c]=!0;for(var l=Math.min(i.length,o.length),f=0;f<l;f++)i.hasOwnProperty(f)||(a[f]=!0),void 0===a[f]&&e(i[f])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?r(e):n(e)}})}var J,Q,ee="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),te="undefined"!=typeof Map,re="undefined"!=typeof Set,ne="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,oe=ee?Symbol.for("immer-nothing"):((J={})["immer-nothing"]=!0,J),ie=ee?Symbol.for("immer-draftable"):"__$immer_draftable",ae=ee?Symbol.for("immer-state"):"__$immer_state",ue=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),se="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ce=Object.getOwnPropertyDescriptors||function(e){var t={};return se(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},le={},fe={get:function(e,t){if(t===ae)return e;var r=_(e);if(!w(r,t))return function(e,t,r){var n,o=G(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!y(n)?n:n===U(e.t,t)?(X(e),e.o[t]=K(e.A.h,n,e)):n},has:function(e,t){return t in _(e)},ownKeys:function(e){return Reflect.ownKeys(_(e))},set:function(e,t,r){var n=G(_(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=U(_(e),t),i=null==o?void 0:o[ae];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(O(r,o)&&(void 0!==r||w(e.t,t)))return!0;X(e),V(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==U(e.t,t)||t in e.t?(e.R[t]=!1,X(e),V(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=_(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){v(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){v(12)}},pe={};b(fe,(function(e,t){pe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),pe.deleteProperty=function(e,t){return pe.set.call(this,e,t,void 0)},pe.set=function(e,t,r){return fe.set.call(this,e[0],t,r,e[0])};var de=function(){function e(e){var t=this;this.g=ne,this.D=!0,this.produce=function(e,r,n){if("function"==typeof e&&"function"!=typeof r){var o=r;r=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var n=arguments.length,a=Array(n>1?n-1:0),u=1;u<n;u++)a[u-1]=arguments[u];return i.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(a))}))}}var a;if("function"!=typeof r&&v(6),void 0!==n&&"function"!=typeof n&&v(7),y(e)){var u=F(t),s=K(t,e,void 0),c=!0;try{a=r(s),c=!1}finally{c?R(u):D(u)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return L(u,n),z(e,u)}),(function(e){throw R(u),e})):(L(u,n),z(a,u))}if(!e||"object"!=typeof e){if(void 0===(a=r(e))&&(a=e),a===oe&&(a=void 0),t.D&&S(a,!0),n){var l=[],f=[];C("Patches").M(e,a,l,f),n(l,f)}return a}v(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.produceWithPatches(r,(function(t){return e.apply(void 0,[t].concat(o))}))};var n,o,i=t.produce(e,r,(function(e,t){n=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,n,o]})):[i,n,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){y(e)||v(8),m(e)&&(e=Z(e));var t=F(this),r=K(this,e,void 0);return r[ae].C=!0,D(t),r},t.finishDraft=function(e,t){var r=(e&&e[ae]).A;return L(r,t),z(void 0,r)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!ne&&v(20),this.g=e},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=C("Patches").$;return m(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),ge=new de,he=ge.produce,ve=(ge.produceWithPatches.bind(ge),ge.setAutoFreeze.bind(ge),ge.setUseProxies.bind(ge),ge.applyPatches.bind(ge),ge.createDraft.bind(ge),ge.finishDraft.bind(ge),he);function me(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ye="function"===typeof Symbol&&Symbol.observable||"@@observable",be=function(){return Math.random().toString(36).substring(7).split("").join(".")},xe={INIT:"@@redux/INIT"+be(),REPLACE:"@@redux/REPLACE"+be(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+be()}};function we(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(e,t,r){var n;if("function"===typeof t&&"function"===typeof r||"function"===typeof r&&"function"===typeof arguments[3])throw new Error(me(0));if("function"===typeof t&&"undefined"===typeof r&&(r=t,t=void 0),"undefined"!==typeof r){if("function"!==typeof r)throw new Error(me(1));return r(Ae)(e,t)}if("function"!==typeof e)throw new Error(me(2));var o=e,i=t,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function l(){if(s)throw new Error(me(3));return i}function f(e){if("function"!==typeof e)throw new Error(me(4));if(s)throw new Error(me(5));var t=!0;return c(),u.push(e),function(){if(t){if(s)throw new Error(me(6));t=!1,c();var r=u.indexOf(e);u.splice(r,1),a=null}}}function p(e){if(!we(e))throw new Error(me(7));if("undefined"===typeof e.type)throw new Error(me(8));if(s)throw new Error(me(9));try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=u,r=0;r<t.length;r++){(0,t[r])()}return e}return p({type:xe.INIT}),(n={dispatch:p,subscribe:f,getState:l,replaceReducer:function(e){if("function"!==typeof e)throw new Error(me(10));o=e,p({type:xe.REPLACE})}})[ye]=function(){var e,t=f;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(me(11));function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}})[ye]=function(){return this},e},n}function ke(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];0,"function"===typeof e[o]&&(r[o]=e[o])}var i,a=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if("undefined"===typeof r(void 0,{type:xe.INIT}))throw new Error(me(12));if("undefined"===typeof r(void 0,{type:xe.PROBE_UNKNOWN_ACTION()}))throw new Error(me(13))}))}(r)}catch(u){i=u}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},u=0;u<a.length;u++){var s=a[u],c=r[s],l=e[s],f=c(l,t);if("undefined"===typeof f){t&&t.type;throw new Error(me(14))}o[s]=f,n=n||f!==l}return(n=n||a.length!==Object.keys(e).length)?o:e}}function Oe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function Pe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error(me(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},a=t.map((function(e){return e(o)}));return n=Oe.apply(void 0,a)(r.dispatch),i(i({},r),{},{dispatch:n})}}}function je(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"===typeof o?o(r,n,e):t(o)}}}}var _e=je();_e.withExtraArgument=je;var Ee=_e,Se=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ne=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Te=function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ce=Object.defineProperty,Me=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Fe=function(e,t,r){return t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Be=function(e,t){for(var r in t||(t={}))Re.call(t,r)&&Fe(e,r,t[r]);if(Le)for(var n=0,o=Le(t);n<o.length;n++){r=o[n];De.call(t,r)&&Fe(e,r,t[r])}return e},ze=function(e,t){return Me(e,Ie(t))},qe=function(e,t,r){return new Promise((function(n,o){var i=function(e){try{u(r.next(e))}catch(t){o(t)}},a=function(e){try{u(r.throw(e))}catch(t){o(t)}},u=function(e){return e.done?n(e.value):Promise.resolve(e.value).then(i,a)};u((r=r.apply(e,t)).next())}))},He="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?Oe:Oe.apply(null,arguments)};"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function We(e){if("object"!==typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return t===r}var Ue=function(e){function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Se(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,Te([void 0],e[0].concat(this)))):new(t.bind.apply(t,Te([void 0],e.concat(this))))},t}(Array);function Ge(e){return y(e)?ve(e,(function(){})):e}function Ve(){return function(e){return function(e){void 0===e&&(e={});var t=e.thunk,r=void 0===t||t,n=(e.immutableCheck,e.serializableCheck,new Ue);r&&(!function(e){return"boolean"===typeof e}(r)?n.push(Ee.withExtraArgument(r.extraArgument)):n.push(Ee));0;return n}(e)}}var Xe=!0;function Ke(e){var t,r=Ve(),n=e||{},o=n.reducer,i=void 0===o?void 0:o,a=n.middleware,u=void 0===a?r():a,s=n.devTools,c=void 0===s||s,l=n.preloadedState,f=void 0===l?void 0:l,p=n.enhancers,d=void 0===p?void 0:p;if("function"===typeof i)t=i;else{if(!We(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=ke(i)}var g=u;if("function"===typeof g&&(g=g(r),!Xe&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xe&&g.some((function(e){return"function"!==typeof e})))throw new Error("each middleware provided to configureStore must be a function");var h=Pe.apply(void 0,g),v=Oe;c&&(v=He(Be({trace:!Xe},"object"===typeof c&&c)));var m=[h];return Array.isArray(d)?m=Te([h],d):"function"===typeof d&&(m=d(m)),Ae(t,f,v.apply(void 0,m))}function Ze(e,t){function r(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return Be(Be({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}function $e(e){var t,r={},n=[],o={addCase:function(e,t){var n="string"===typeof e?e:e.type;if(n in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[n]=t,o},addMatcher:function(e,t){return n.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[r,n,t]}var Ye=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Je=["name","message","stack","code"],Qe=function(e,t){this.payload=e,this.meta=t},et=function(e,t){this.payload=e,this.meta=t},tt=function(e){if("object"===typeof e&&null!==e){for(var t={},r=0,n=Je;r<n.length;r++){var o=n[r];"string"===typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};!function(){function e(e,t,r){var n=Ze(e+"/fulfilled",(function(e,t,r,n){return{payload:e,meta:ze(Be({},n||{}),{arg:r,requestId:t,requestStatus:"fulfilled"})}})),o=Ze(e+"/pending",(function(e,t,r){return{payload:void 0,meta:ze(Be({},r||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=Ze(e+"/rejected",(function(e,t,n,o,i){return{payload:o,error:(r&&r.serializeError||tt)(e||"Rejected"),meta:ze(Be({},i||{}),{arg:n,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!==typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(u,s,c){var l,f=(null==r?void 0:r.idGenerator)?r.idGenerator(e):Ye(),p=new a;function d(e){l=e,p.abort()}var g=function(){return qe(this,null,(function(){var a,g,h,v,m,y;return Ne(this,(function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),v=null==(a=null==r?void 0:r.condition)?void 0:a.call(r,e,{getState:s,extra:c}),null===(x=v)||"object"!==typeof x||"function"!==typeof x.then?[3,2]:[4,v];case 1:v=b.sent(),b.label=2;case 2:if(!1===v||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return!0,m=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:l||"Aborted"})}))})),u(o(f,e,null==(g=null==r?void 0:r.getPendingMeta)?void 0:g.call(r,{requestId:f,arg:e},{getState:s,extra:c}))),[4,Promise.race([m,Promise.resolve(t(e,{dispatch:u,getState:s,extra:c,requestId:f,signal:p.signal,abort:d,rejectWithValue:function(e,t){return new Qe(e,t)},fulfillWithValue:function(e,t){return new et(e,t)}})).then((function(t){if(t instanceof Qe)throw t;return t instanceof et?n(t.payload,f,e,t.meta):n(t,f,e)}))])];case 3:return h=b.sent(),[3,5];case 4:return y=b.sent(),h=y instanceof Qe?i(null,f,e,y.payload,y.meta):i(y,f,e),[3,5];case 5:return r&&!r.dispatchConditionRejection&&i.match(h)&&h.meta.condition||u(h),[2,h]}var x}))}))}();return Object.assign(g,{abort:d,requestId:f,arg:e,unwrap:function(){return g.then(rt)}})}}),{pending:o,rejected:i,fulfilled:n,typePrefix:e})}e.withTypes=function(){return e}}();function rt(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}Object.assign;var nt="listenerMiddleware";Ze(nt+"/add"),Ze(nt+"/removeAll"),Ze(nt+"/remove");"function"===typeof queueMicrotask&&queueMicrotask.bind("undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:globalThis);var ot,it=function(e){return function(t){setTimeout(t,e)}};"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:it(10);Y();var at=r(3877),ut=r(930),st=r.n(ut),ct=(r(6748),{pass:null,accounts:[],popupChecks:{txApprove:!1},currentAccount:{accountName:"",temp1m:"",evmAddress:"",nativeAddress:"",txHistory:[]},newAccount:null,uiData:{},httpEndPoints:{qa:"https://qa-http-nodes.5ire.network",testnet:"https://rpc-testnet.5ire.network"},wsEndPoints:{qa:"wss://qa-wss-nodes.5ire.network",testnet:"wss://wss-testnet.5ire.network"},balance:{evmBalance:"",nativeBalance:"",totalBalance:""},currentNetwork:"Testnet",accountName:"",eth_accounts:"",isLogin:!1,connectedSites:[],isLoading:!1}),lt=function(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r,n="function"==typeof e.initialState?e.initialState:Ge(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},u={},s={};function c(){var t="function"===typeof e.extraReducers?$e(e.extraReducers):[e.extraReducers],r=t[0],o=void 0===r?{}:r,i=t[1],a=void 0===i?[]:i,s=t[2],c=void 0===s?void 0:s,l=Be(Be({},o),u);return function(e,t,r,n){void 0===r&&(r=[]);var o,i="function"===typeof t?$e(t):[t,r,n],a=i[0],u=i[1],s=i[2];if(function(e){return"function"===typeof e}(e))o=function(){return Ge(e())};else{var c=Ge(e);o=function(){return c}}function l(e,t){void 0===e&&(e=o());var r=Te([a[t.type]],u.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===r.filter((function(e){return!!e})).length&&(r=[s]),r.reduce((function(e,r){if(r){var n;if(m(e))return void 0===(n=r(e,t))?e:n;if(y(e))return ve(e,(function(e){return r(e,t)}));if(void 0===(n=r(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return e}),e)}return l.getInitialState=o,l}(n,(function(e){for(var t in l)e.addCase(t,l[t]);for(var r=0,n=a;r<n.length;r++){var o=n[r];e.addMatcher(o.matcher,o.reducer)}c&&e.addDefaultCase(c)}))}return i.forEach((function(e){var r,n,i=o[e],c=t+"/"+e;"reducer"in i?(r=i.reducer,n=i.prepare):r=i,a[e]=r,u[c]=r,s[e]=n?Ze(c,n):Ze(c)})),{name:t,reducer:function(e,t){return r||(r=c()),r(e,t)},actions:s,caseReducers:a,getInitialState:function(){return r||(r=c()),r.getInitialState()}}}({name:"auth",initialState:ct,reducers:{setTxPopup:function(e,t){e.popupChecks.txApprove=t.payload},setPassword:function(e,t){e.pass=t.payload},setCurrentAcc:function(e,t){e.currentAccount=t.payload},setAccounts:function(e,t){e.accounts=t.payload},pushAccounts:function(e,t){e.accounts.push(t.payload)},setLogin:function(e,t){e.isLogin=t.payload},setUIdata:function(e,t){e.uiData=t.payload},setAccountName:function(e,t){e.accountName=t.payload},setNewAccount:function(e,t){e.newAccount=t.payload},setCurrentNetwork:function(e,t){e.currentNetwork=t.payload},setBalance:function(e,t){e.balance.evmBalance=t.payload.evmBalance,e.balance.nativeBalance=t.payload.nativeBalance,e.balance.totalBalance=t.payload.totalBalance},resetBalance:function(e){e.balance={evmBalance:"",nativeBalance:""}},setTxHistory:function(e,t){e.accounts[t.payload.index].txHistory.push(t.payload.data),e.currentAccount.txHistory.push(t.payload.data)},updateTxHistory:function(e,t){var r=e.currentAccount.txHistory.find((function(e){return t.payload.isSwap?e.txHash.mainHash===t.payload.txHash&&e.isEvm:e.txHash===t.payload.txHash&&e.isEvm})),n=e.accounts.find((function(e){return e.accountName===t.payload.accountName})).txHistory.find((function(e){return t.payload.isSwap?e.txHash.mainHash===t.payload.txHash&&e.isEvm:e.txHash===t.payload.txHash&&e.isEvm}));r&&(r.status=t.payload.status?"Success":"Failed"),n&&(n.status=t.payload.status?"Success":"Failed")},setSite:function(e,t){null===e||void 0===e||e.connectedSites.push(t.payload)},toggleSite:function(e,t){var r=null===e||void 0===e?void 0:e.connectedSites.findIndex((function(e){return e.origin=t.payload.origin}));r>-1&&(e.connectedSites[r].isConnected=t.payload.isConnected)},toggleLoader:function(e,t){e.isLoading=t.payload}}}),ft=lt.actions,pt=(ft.setPassword,ft.setCurrentAcc,ft.setLogin),dt=(ft.setAccountName,ft.setAccounts,ft.setCurrentNetwork,ft.setUIdata),gt=(ft.setBalance,ft.setTxHistory,ft.setSite,ft.toggleSite),ht=ft.toggleLoader,vt=(ft.pushAccounts,ft.setNewAccount,ft.resetBalance,ft.updateTxHistory),mt=(ft.setTxPopup,lt.reducer);function yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(l){c=!0,o=l}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var bt=function(){function e(){d(this,e)}return h(e,[{key:"reload",value:function(){st().runtime.reload()}},{key:"openTab",value:function(){var e=f(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().tabs.create(t);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"openWindow",value:function(){var e=f(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().windows.create(t);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"focusWindow",value:function(){var e=f(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().windows.update(t,{focused:!0});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateWindowPosition",value:function(){var e=f(c().mark((function e(t,r,n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().windows.update(t,{left:r,top:n});case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getLastFocusedWindow",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().windows.getLastFocused();case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"closeCurrentWindow",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().windows.getCurrent();case 2:t=e.sent,st().windows.remove(t.id);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getVersion",value:function(){var e=st().runtime.getManifest(),t=e.version,r=e.version_name,n=t.split(".");if(r){if(n.length<4)throw new Error("Version missing build number: '".concat(t,"'"));return r}if(![3,4].includes(n.length))throw new Error("Invalid version: ".concat(t));if(n[2].match(/(?:(?![0-9])[\s\S])/)){var o=yt(n,3),i=o[0],a=o[1],u=o[2].match(/^([0-9]+)([A-Za-z]+)([0-9])+$/);if(null===u)throw new Error("Version contains invalid prerelease: ".concat(t));var s=yt(u,4),c=s[1],l=s[2],f=s[3];return"".concat(i,".").concat(a,".").concat(c,"-").concat(l,".").concat(f)}return t}},{key:"getPlatformInfo",value:function(e){try{return void e(st().runtime.getPlatformInfo())}catch(t){return void e(t)}}},{key:"addOnRemovedListener",value:function(e){st().windows.onRemoved.addListener(e)}},{key:"getAllWindows",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().windows.getAll();case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getActiveTabs",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().tabs.query({active:!0});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"currentTab",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().tabs.getCurrent();case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"switchToTab",value:function(){var e=f(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().tabs.update(t,{highlighted:!0});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"closeTab",value:function(){var e=f(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().tabs.remove(t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),xt=620,wt=400,At=function(){function e(t){d(this,e),this.platform=new bt,this.platform.addOnRemovedListener(this._onWindowClosed.bind(this)),this.store=t}return h(e,[{key:"markAsAutomaticallyClosed",value:function(){this._popupAutomaticallyClosed=!0}},{key:"showPopup",value:function(){var e=f(c().mark((function e(){var t,r,n,o,i,a,u,s,l,f,p,d=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:"",e.next=3,this._getPopup();case 3:return r=e.sent,e.next=6,st().storage.local.set({popupStatus:!0});case 6:if(!r){e.next=11;break}return e.next=9,this.platform.focusWindow(r.id);case 9:e.next=34;break;case 11:return n=0,o=0,e.prev=13,e.next=16,this.platform.getLastFocusedWindow();case 16:i=e.sent,o=i.top,n=i.left+(i.width-wt),e.next=26;break;case 21:e.prev=21,e.t0=e.catch(13),a=window,u=a.screenX,s=a.screenY,l=a.outerWidth,o=Math.max(s,0),n=Math.max(u+(l-wt),0);case 26:return f=st().runtime.getURL("index.html"),e.next=29,this.platform.openWindow({url:f+"?route=".concat(t),type:"popup",width:wt,height:xt,left:n,top:o});case 29:if((p=e.sent).left===n||"fullscreen"===p.state){e.next=33;break}return e.next=33,this.platform.updateWindowPosition(p.id,n,o);case 33:this._popupId=p.id;case 34:case"end":return e.stop()}}),e,this,[[13,21]])})));return function(){return e.apply(this,arguments)}}()},{key:"_onWindowClosed",value:function(){var e=f(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==this._popupId){e.next=6;break}return e.next=3,st().storage.local.set({popupStatus:!1});case 3:this._popupId=void 0,this._popupAutomaticallyClosed=void 0,this.handleClose();case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClose",value:function(){var e,t,r,n,o,i=this.store.getState(),a=null===i||void 0===i||null===(e=i.auth.uiData)||void 0===e||null===(t=e.message)||void 0===t?void 0:t.method;if(["eth_requestAccounts","eth_accounts","connect"].indexOf("method")>-1)st().tabs.sendMessage(null===i||void 0===i||null===(r=i.auth)||void 0===r||null===(n=r.uiData)||void 0===n?void 0:n.tabId,{id:null===i||void 0===i||null===(o=i.auth.uiData)||void 0===o?void 0:o.id,response:null,error:"User rejected connect permission."});else if("eth_sendTransaction"===a){var u,s,c,l;st().tabs.sendMessage(null===i||void 0===i||null===(u=i.auth)||void 0===u||null===(s=u.uiData)||void 0===s?void 0:s.tabId,{id:null===i||void 0===i||null===(c=i.auth)||void 0===c||null===(l=c.uiData)||void 0===l?void 0:l.id,response:null,error:"User rejected transactoin."})}this.store.dispatch(dt({}))}},{key:"_getPopup",value:function(){var e=f(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.platform.getAllWindows();case 2:return t=e.sent,e.abrupt("return",this._getPopupIn(t));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getPopupIn",value:function(e){var t=this;return e?e.find((function(e){return e&&"popup"===e.type&&e.id===t._popupId})):null}}]),e}(),kt=3===st().runtime.getManifest().manifest_version;function Ot(e){return new Promise((function(t,r){var n=Ke({reducer:{auth:mt},preloadedState:e});(0,at.IF)(n,{portName:p}),n.subscribe((function(){st().storage.local.set({state:n.getState()})})),kt?st().storage.session.get(["login"]).then((function(e){n.dispatch(pt(!(null===e||void 0===e||!e.login)&&e.login)),t(n)})).catch(r):st().storage.local.get(["login"]).then((function(e){n.dispatch(pt(!(null===e||void 0===e||!e.login)&&e.login)),t(n)})).catch(r)}))}function Pt(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise(function(){var t=f(c().mark((function t(r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{st().storage.local.get("state").then(function(){var t=f(c().mark((function t(n){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ot(n.state||{auth:ct});case 2:(o=t.sent).dispatch(ht(!1)),e&&st().runtime.sendMessage({type:"STORE_INITIALIZED"}),r(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}catch(n){}case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}function jt(){return(jt=f(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,st().scripting.registerContentScripts([{id:"inpage",matches:["file://*/*","http://*/*","https://*/*"],js:["./static/js/injected.js"],runAt:"document_start",world:"MAIN"}]);case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,null,[[0,5]])})))).apply(this,arguments)}var _t=function(){function e(t){d(this,e),this.store=t,this.notificationManager=new At(t)}return h(e,[{key:"showNotification",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"5ire",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"basic";st().notifications.create("",{iconUrl:st().runtime.getURL("logo192.png"),message:e,title:t,type:r})}},{key:"sendEndPoint",value:function(){var e=f(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{r=this.store.getState(),t.tabId&&st().tabs.sendMessage(t.tabId,{id:t.id,response:{result:r.auth.httpEndPoints[r.auth.currentNetwork.toLowerCase()]},error:null})}catch(n){}case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleConnect",value:function(){var e=f(c().mark((function e(t){var r,n,o,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.store.getState(),e.next=3,st().storage.local.get("popupStatus");case 3:if(!e.sent.popupStatus){e.next=7;break}return st().tabs.sendMessage(t.tabId,{id:t.id,response:null,error:"5ire extension transaction approve popup session is already active"}),e.abrupt("return");case 7:if(n="eth_requestAccounts"===(null===t||void 0===t?void 0:t.method)||"eth_accounts"===(null===t||void 0===t?void 0:t.method),null===(o=r.auth.connectedSites.find((function(e){var r;return e.origin===(null===(r=t.message)||void 0===r?void 0:r.origin)})))||void 0===o||!o.isConnected){e.next=14;break}i=n?{method:null===t||void 0===t?void 0:t.method,result:[r.auth.currentAccount.evmAddress]}:{evmAddress:r.auth.currentAccount.evmAddress,nativeAddress:r.auth.currentAccount.nativeAddress},st().tabs.sendMessage(t.tabId,{id:t.id,response:i,error:null}),e.next=17;break;case 14:return this.store.dispatch(dt(t)),e.next=17,this.notificationManager.showPopup("loginApprove");case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleDisconnect",value:function(){var e=f(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.store.dispatch(gt({origin:null===(r=t.message)||void 0===r?void 0:r.origin,isConnected:!1})),st().tabs.sendMessage(t.tabId,{id:t.id,response:"Disconnected successfully",error:null});case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleEthTransaction",value:function(){var e=f(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st().storage.local.get("popupStatus");case 2:if(!e.sent.popupStatus){e.next=6;break}return st().tabs.sendMessage(t.tabId,{id:t.id,response:null,error:"5ire extension transaction approve popup session is already active"}),e.abrupt("return");case 6:return this.store.dispatch(dt(i(i({},t),{},{message:null===t||void 0===t?void 0:t.message[0]}))),e.next=9,this.notificationManager.showPopup("approveTx");case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleValidatorNominatorTransactions",value:function(){var e=f(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("Here i got native message",t),this.store.dispatch(dt(t)),e.next=4,this.notificationManager.showPopup("nativeTx");case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function Et(e,t){return St.apply(this,arguments)}function St(){return(St=f(c().mark((function e(t,r){var n,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:r});case 2:return n=e.sent,e.next=5,n.json();case 5:return o=e.sent,e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(e){return Tt.apply(this,arguments)}function Tt(){return Tt=f(c().mark((function e(t){var r,n,o,i,a,u,s,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pt(!1);case 3:if(r=e.sent,n=new _t(r),o="object"===typeof t.txHash?t.txHash.mainHash:t.txHash,!t.statusCheck.isFound){e.next=9;break}return n.showNotification("Transaction ".concat(t.statusCheck.status," ").concat(o.slice(0,30)," ...")),e.abrupt("return");case 9:return e.next=11,r.getState();case 11:return i=e.sent,a=i.auth.currentAccount.accountName,u="swap"===t.type.toLowerCase(),s=i.auth.httpEndPoints[t.chain]||"https://rpc-testnet.5ire.network",e.next=17,Et(s,JSON.stringify({jsonrpc:"2.0",method:"eth_getTransactionReceipt",params:[o],id:1}));case 17:(l=e.sent)&&null!==l&&void 0!==l&&l.result?(r.dispatch(vt({txHash:o,accountName:a,status:Boolean(parseInt(l.result.status)),isSwap:u})),n.showNotification("Transaction ".concat(Boolean(parseInt(l.result.status))?"success":"failed"," ").concat(o.slice(0,30)," ..."))):Nt(t),e.next=23;break;case 21:e.prev=21,e.t0=e.catch(0);case 23:case"end":return e.stop()}}),e,null,[[0,21]])}))),Tt.apply(this,arguments)}try{var Ct=!1,Mt=null;st().runtime.onConnect.addListener(function(){var e=f(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("5IRE_EXT"!==t.name){e.next=6;break}return e.next=3,Pt();case 3:Mt=e.sent,Ct=!0,t.onDisconnect.addListener((function(){}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),st().runtime.onInstalled.addListener(function(){var e=f(c().mark((function e(t){var r,n,o,i,a,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!kt){e.next=22;break}r=s(st().runtime.getManifest().content_scripts),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}return o=n.value,e.t0=s,e.next=9,st().tabs.query({url:o.matches});case 9:e.t1=e.sent,i=(0,e.t0)(e.t1);try{for(i.s();!(a=i.n()).done;)u=a.value,st().scripting.executeScript({target:{tabId:u.id},files:o.js})}catch(t){i.e(t)}finally{i.f()}case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t2=e.catch(2),r.e(e.t2);case 19:return e.prev=19,r.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t){return e.apply(this,arguments)}}()),st().runtime.onStartup.addListener((function(){})),st().runtime.onMessage.addListener(function(){var e=f(c().mark((function e(t,r,n){var o,a,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("tx"===(null===t||void 0===t?void 0:t.type)&&Nt(i(i({},(n=t).data),{},{statusCheck:n.statusCheck})),Ct){e.next=6;break}return e.next=4,Pt(!1);case 4:Mt=e.sent,Ct=!0;case 6:a=new _t(Mt),u=i(i({},t),{},{tabId:null===r||void 0===r||null===(o=r.tab)||void 0===o?void 0:o.id}),e.t0=null===u||void 0===u?void 0:u.method,e.next="connect"===e.t0||"eth_requestAccounts"===e.t0||"eth_accounts"===e.t0?11:"disconnect"===e.t0?14:"eth_sendTransaction"===e.t0?17:"get_endPoint"===e.t0?20:"native_add_nominator"===e.t0||"native_renominate"===e.t0||"native_nominator_payout"===e.t0||"native_validator_payout"===e.t0||"native_stop_validator"===e.t0||"native_stop_nominator"===e.t0||"native_unbond_validator"===e.t0||"native_unbond_nominator"===e.t0||"native_withdraw_nominator"===e.t0||"native_withdraw_validator"===e.t0||"native_withdraw_nominator_unbonded"===e.t0||"native_add_validator"===e.t0||"native_validator_bondmore"===e.t0||"native_restart_validator"===e.t0||"native_nominator_bondmore"===e.t0?23:26;break;case 11:return e.next=13,a.handleConnect(u);case 13:return e.abrupt("break",26);case 14:return e.next=16,a.handleDisconnect(u);case 16:return e.abrupt("break",26);case 17:return e.next=19,a.handleEthTransaction(u);case 19:return e.abrupt("break",26);case 20:return e.next=22,a.sendEndPoint(u);case 22:return e.abrupt("break",26);case 23:return e.next=25,a.handleValidatorNominatorTransactions(u);case 25:return e.abrupt("break",26);case 26:case"end":return e.stop()}var n}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),st().runtime.onSuspend.addListener((function(){Ct=!1})),function(){jt.apply(this,arguments)}()}catch(It){console.log("Error: ",It)}}()}();