LavaPack.loadBundle([[3558,{"../../../../../shared/constants/gas":3404,"../../../../../shared/modules/conversion.utils":3431,"../../../../../shared/modules/gas.utils":3434,"../../../../contexts/gasFee":4046,"../../../../helpers/utils/gas":4093,"../../../../selectors":4436,"./useCustomTimeEstimate":3557,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useGasItemFeeDetails=void 0;var a=e("react"),r=e("react-redux"),o=e("../../../../../shared/constants/gas"),i=e("../../../../../shared/modules/gas.utils"),s=e("../../../../helpers/utils/gas"),l=e("../../../../selectors"),c=e("../../../../contexts/gasFee"),u=e("../../../../../shared/modules/conversion.utils"),d=e("./useCustomTimeEstimate");n.useGasItemFeeDetails=e=>{const{editGasMode:t,estimateUsed:n,gasFeeEstimates:p,gasLimit:f,maxFeePerGas:m,maxPriorityFeePerGas:h,transaction:g}=(0,c.useGasFeeContext)(),[y,v]=(0,a.useState)(!1),b=(0,r.useSelector)(l.getAdvancedGasFeeValues);let _,E,T;const{dappSuggestedGasFees:w}=g;if(null!=p&&p[e])_=p[e].suggestedMaxFeePerGas,E=p[e].suggestedMaxPriorityFeePerGas;else if(e===o.PriorityLevels.dAppSuggested&&w)_=(0,u.hexWEIToDecGWEI)(w.maxFeePerGas||w.gasPrice),E=(0,u.hexWEIToDecGWEI)(w.maxPriorityFeePerGas||_);else if(e===o.PriorityLevels.custom)n===o.PriorityLevels.custom?(_=m,E=h):b&&t!==o.EditGasModes.swaps&&(_=b.maxBaseFee,E=b.priorityFee);else if(e===o.PriorityLevels.tenPercentIncreased&&g.previousGas){var k,O;_=(0,u.hexWEIToDecGWEI)((0,s.addTenPercentAndRound)(null===(k=g.previousGas)||void 0===k?void 0:k.maxFeePerGas)),E=(0,u.hexWEIToDecGWEI)((0,s.addTenPercentAndRound)(null===(O=g.previousGas)||void 0===O?void 0:O.maxPriorityFeePerGas))}const{waitTimeEstimate:N}=(0,d.useCustomTimeEstimate)({gasFeeEstimates:p,maxFeePerGas:_,maxPriorityFeePerGas:E});T=p[e]?e===o.PriorityLevels.high?null==p?void 0:p.high.minWaitTimeEstimate:null==p?void 0:p.low.maxWaitTimeEstimate:N;const C=_?(0,i.getMaximumGasTotalInHexWei)({gasLimit:(0,u.decimalToHex)(f),maxFeePerGas:(0,u.decGWEIToHexWEI)(_)}):null;return(0,a.useEffect)((()=>{if(!(t!==o.EditGasModes.cancel&&t!==o.EditGasModes.speedUp||e!==o.PriorityLevels.medium&&e!==o.PriorityLevels.high)){const t=!(0,s.gasEstimateGreaterThanGasUsedPlusTenPercent)(g.previousGas||g.txParams,p,e);v(t)}}),[t,p,e,g]),{estimateGreaterThanGasUse:y,maxFeePerGas:_,maxPriorityFeePerGas:E,minWaitTime:T,hexMaximumTransactionFee:C}}}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js"}],[3559,{"../../../../../shared/constants/gas":3404,"../../../../helpers/constants/design-system":4070,"../../../../helpers/utils/gas":4093,"../../../../helpers/utils/util":4108,"../../../ui/typography":4039,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=u(e("prop-types")),o=e("../../../../../shared/constants/gas"),i=e("../../../../helpers/constants/design-system"),s=e("../../../../helpers/utils/gas"),l=e("../../../../helpers/utils/util"),c=u(e("../../../ui/typography"));function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const p=({editGasMode:e,estimateGreaterThanGasUse:t,gasLimit:n,priorityLevel:r,maxFeePerGas:u,maxPriorityFeePerGas:d,transaction:p,t:f})=>{const m=(0,a.useMemo)((()=>{switch(r){case o.PriorityLevels.low:return f("lowGasSettingToolTipMessage",[a.default.createElement("span",{key:r},a.default.createElement("b",null,f("low")))]);case o.PriorityLevels.medium:return t?f("disabledGasOptionToolTipMessage",[a.default.createElement("span",{key:`disabled-priority-level-${r}`},f(r))]):f("mediumGasSettingToolTipMessage",[a.default.createElement("span",{key:r},a.default.createElement("b",null,f("medium")))]);case o.PriorityLevels.high:return t?f("disabledGasOptionToolTipMessage",[a.default.createElement("span",{key:`disabled-priority-level-${r}`},f(r))]):e===o.EditGasModes.swaps?f("swapSuggestedGasSettingToolTipMessage"):f("highGasSettingToolTipMessage",[a.default.createElement("span",{key:r},a.default.createElement("b",null,f("high")))]);case o.PriorityLevels.custom:return f("customGasSettingToolTipMessage",[a.default.createElement("span",{key:r},a.default.createElement("b",null,f("custom")))]);case o.PriorityLevels.dAppSuggested:return null!=p&&p.origin?f("dappSuggestedGasSettingToolTipMessage",[a.default.createElement("span",{key:null==p?void 0:p.origin},null==p?void 0:p.origin)]):null;default:return""}}),[e,t,r,p,f]);let h;r===o.PriorityLevels.low?h=f("curveLowGasEstimate"):r===o.PriorityLevels.medium?h=f("curveMediumGasEstimate"):r===o.PriorityLevels.high&&(h=f("curveHighGasEstimate"));const g=(0,s.isMetamaskSuggestedGasEstimate)(r)&&!(r===o.PriorityLevels.high&&e===o.EditGasModes.swaps)&&!t;return a.default.createElement("div",{className:"edit-gas-tooltip__container"},g?a.default.createElement("img",{alt:h,src:`./images/curve-${r}.svg`}):null,m&&a.default.createElement("div",{className:"edit-gas-tooltip__container__message"},a.default.createElement(c.default,{variant:i.TypographyVariant.H7},m)),r===o.PriorityLevels.custom||t?null:a.default.createElement("div",{className:"edit-gas-tooltip__container__values"},a.default.createElement("div",null,a.default.createElement(c.default,{variant:i.TypographyVariant.H7,fontWeight:i.FONT_WEIGHT.BOLD,className:"edit-gas-tooltip__container__label"},f("maxBaseFee")),u&&a.default.createElement(c.default,{variant:i.TypographyVariant.H7,color:i.TextColor.textAlternative,className:"edit-gas-tooltip__container__value"},(0,l.roundToDecimalPlacesRemovingExtraZeroes)(u,4))),a.default.createElement("div",null,a.default.createElement(c.default,{variant:i.TypographyVariant.H7,fontWeight:i.FONT_WEIGHT.BOLD,className:"edit-gas-tooltip__container__label"},f("priorityFeeProperCase")),d&&a.default.createElement(c.default,{variant:i.TypographyVariant.H7,color:i.TextColor.textAlternative,className:"edit-gas-tooltip__container__value"},(0,l.roundToDecimalPlacesRemovingExtraZeroes)(d,4))),a.default.createElement("div",null,a.default.createElement(c.default,{variant:i.TypographyVariant.H7,fontWeight:i.FONT_WEIGHT.BOLD,className:"edit-gas-tooltip__container__label"},f("gasLimit")),n&&a.default.createElement(c.default,{variant:i.TypographyVariant.H7,color:i.TextColor.textAlternative,className:"edit-gas-tooltip__container__value"},(0,l.roundToDecimalPlacesRemovingExtraZeroes)(n,4)))))};p.propTypes={estimateGreaterThanGasUse:r.default.bool,priorityLevel:r.default.string,maxFeePerGas:r.default.oneOfType([r.default.number,r.default.string]),maxPriorityFeePerGas:r.default.oneOfType([r.default.number,r.default.string]),t:r.default.func,editGasMode:r.default.string,gasLimit:r.default.number,transaction:r.default.object};var f=p;n.default=f}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/edit-gas-tooltip.js"}],[3560,{"./edit-gas-fee-popover":3554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./edit-gas-fee-popover"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/index.js"}],[3561,{"./network-statistics":3562},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./network-statistics"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/network-statistics/index.js"}],[3562,{"../../../../contexts/gasFee":4046,"../../../../contexts/i18n":4047,"../../../../helpers/constants/design-system":4070,"../../../../helpers/utils/gas":4093,"../../../../helpers/utils/util":4108,"../../../ui/typography/typography":4040,"./status-slider":3563,"./tooltips":3565,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("../../../../helpers/constants/design-system"),o=e("../../../../helpers/utils/util"),i=e("../../../../helpers/utils/gas"),s=e("../../../../contexts/i18n"),l=e("../../../../contexts/gasFee"),c=p(e("../../../ui/typography/typography")),u=e("./tooltips"),d=p(e("./status-slider"));function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var m=()=>{const e=(0,a.useContext)(s.I18nContext),{gasFeeEstimates:t}=(0,l.useGasFeeContext)(),n=(0,i.formatGasFeeOrFeeRange)(null==t?void 0:t.estimatedBaseFee,{precision:0}),p=(0,i.formatGasFeeOrFeeRange)(null==t?void 0:t.latestPriorityFeeRange,{precision:[1,0]}),f=null==t?void 0:t.networkCongestion;return a.default.createElement("div",{className:"network-statistics"},a.default.createElement(c.default,{color:r.TextColor.textAlternative,fontWeight:r.FONT_WEIGHT.BOLD,marginTop:3,marginBottom:3,variant:r.TypographyVariant.H8},e("networkStatus")),a.default.createElement("div",{className:"network-statistics__info"},(0,o.isNullish)(n)?null:a.default.createElement("div",{className:"network-statistics__field","data-testid":"formatted-latest-base-fee"},a.default.createElement(u.BaseFeeTooltip,null,a.default.createElement("span",{className:"network-statistics__field-data"},n),a.default.createElement("span",{className:"network-statistics__field-label"},e("baseFee")))),(0,o.isNullish)(p)?null:a.default.createElement("div",{className:"network-statistics__field","data-testid":"formatted-latest-priority-fee-range"},a.default.createElement(u.PriorityFeeTooltip,null,a.default.createElement("span",{className:"network-statistics__field-data"},p),a.default.createElement("span",{className:"network-statistics__field-label"},e("priorityFee")))),(0,o.isNullish)(f)?null:a.default.createElement("div",{className:"network-statistics__field"},a.default.createElement(d.default,null))))};n.default=m}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/network-statistics/network-statistics.js"}],[3563,{"./status-slider":3564},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./status-slider"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/network-statistics/status-slider/index.js"}],[3564,{"../../../../../../shared/constants/gas":3404,"../../../../../contexts/gasFee":4046,"../../../../../hooks/useI18nContext":4129,"../tooltips":3565,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=(a=e("react"))&&a.__esModule?a:{default:a},o=e("../../../../../../shared/constants/gas"),i=e("../../../../../contexts/gasFee"),s=e("../../../../../hooks/useI18nContext"),l=e("../tooltips");const c=["#037DD6","#1876C8","#2D70BA","#4369AB","#57629E","#6A5D92","#805683","#9A4D71","#B44561","#C54055","#D73A49"];var u=()=>{const e=(0,s.useI18nContext)(),{gasFeeEstimates:t}=(0,i.useGasFeeContext)(),n=(e=>{const t=e??.5,n=Math.round(10*t),a=c[n],r=10*n;return t>=o.NetworkCongestionThresholds.busy?{statusLabel:"busy",tooltipLabel:"highLowercase",color:a,sliderTickValue:r}:t>=o.NetworkCongestionThresholds.stable?{statusLabel:"stable",tooltipLabel:"stableLowercase",color:a,sliderTickValue:r}:{statusLabel:"notBusy",tooltipLabel:"lowLowercase",color:a,sliderTickValue:r}})(t.networkCongestion);return r.default.createElement(l.NetworkStabilityTooltip,{color:n.color,tooltipLabel:n.tooltipLabel},r.default.createElement("div",{className:"status-slider"},r.default.createElement("div",{className:"status-slider__arrow-container"},r.default.createElement("div",{className:"status-slider__arrow-border",style:{marginLeft:`${n.sliderTickValue}%`},"data-testid":"status-slider-arrow-border"},r.default.createElement("div",{className:"status-slider__arrow",style:{borderTopColor:n.color},"data-testid":"status-slider-arrow"}))),r.default.createElement("div",{className:"status-slider__line"}),r.default.createElement("div",{className:"status-slider__label",style:{color:n.color},"data-testid":"status-slider-label"},e(n.statusLabel))))};n.default=u}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/network-statistics/status-slider/status-slider.js"}],[3565,{"../../../../helpers/constants/design-system":4070,"../../../../hooks/useI18nContext":4129,"../../../ui/box":3900,"../../../ui/tooltip":4035,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PriorityFeeTooltip=n.NetworkStabilityTooltip=n.BaseFeeTooltip=void 0;var a=c(e("react")),r=c(e("prop-types")),o=e("../../../../hooks/useI18nContext"),i=c(e("../../../ui/box")),s=c(e("../../../ui/tooltip")),l=e("../../../../helpers/constants/design-system");function c(e){return e&&e.__esModule?e:{default:e}}const u=({children:e,html:t,title:n})=>a.default.createElement(s.default,{position:"top",html:t,title:n},a.default.createElement(i.default,{display:l.DISPLAY.FLEX,flexDirection:l.FLEX_DIRECTION.COLUMN},e));u.propTypes={children:r.default.node.isRequired,html:r.default.node,title:r.default.string};const d=({children:e})=>{const t=(0,o.useI18nContext)();return a.default.createElement(u,{html:t("networkStatusBaseFeeTooltip",[a.default.createElement("strong",{key:"base_fee_medium_estimate",className:"network-status__tooltip-label"},t("medium")),a.default.createElement("strong",{key:"base_fee_high_estimate",className:"network-status__tooltip-label"},t("high"))])},e)};n.BaseFeeTooltip=d,d.propTypes={children:r.default.node.isRequired};const p=({children:e})=>{const t=(0,o.useI18nContext)();return a.default.createElement(u,{title:t("networkStatusPriorityFeeTooltip")},e)};n.PriorityFeeTooltip=p,p.propTypes={children:r.default.node.isRequired};const f=({children:e,color:t,tooltipLabel:n})=>{const r=(0,o.useI18nContext)();return a.default.createElement(u,{html:r("networkStatusStabilityFeeTooltip",[a.default.createElement("strong",{key:"network-status__tooltip",className:"network-status__tooltip-label",style:{color:t}},r(n))])},e)};n.NetworkStabilityTooltip=f,f.propTypes={children:r.default.node.isRequired,color:r.default.string.isRequired,tooltipLabel:r.default.string.isRequired}}}},{package:"$root$",file:"ui/components/app/edit-gas-fee-popover/network-statistics/tooltips.js"}],[3566,{"../../../../shared/constants/gas":3404,"../../../../shared/modules/conversion.utils":3431,"../../../../shared/modules/transaction.utils":3444,"../../../contexts/i18n":4047,"../../../hooks/gasFeeInput/useGasFeeInputs":4114,"../../../hooks/useIncrementedGasFees":4130,"../../../store/actions":4443,"../../ui/button":3904,"../../ui/loading-heartbeat":3970,"../../ui/popover":3999,"../edit-gas-display":3551,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=_;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=y(e("prop-types")),o=e("react-redux"),i=e("../../../hooks/gasFeeInput/useGasFeeInputs"),s=e("../../../../shared/modules/transaction.utils"),l=e("../../../../shared/constants/gas"),c=y(e("../../ui/popover")),u=y(e("../../ui/button")),d=y(e("../edit-gas-display")),p=e("../../../contexts/i18n"),f=e("../../../store/actions"),m=y(e("../../ui/loading-heartbeat")),h=e("../../../hooks/useIncrementedGasFees"),g=e("../../../../shared/modules/conversion.utils");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}function _({popoverTitle:e="",confirmButtonText:t="",editGasDisplayProps:n={},transaction:r,mode:y,onClose:v,minimumGasLimit:_=l.GAS_LIMITS.SIMPLE}){const E=(0,a.useContext)(p.I18nContext),T=(0,o.useDispatch)(),[w,k]=(0,a.useState)(!1),O=(0,g.hexToDecimal)(_),N=(0,h.useIncrementedGasFees)(r);let C=r;y!==l.EditGasModes.speedUp&&y!==l.EditGasModes.cancel||(C={...r,userFeeLevel:l.CUSTOM_GAS_ESTIMATE,txParams:{...r.txParams,...N}});const{estimatedMinimumNative:P,gasPrice:M,setGasPrice:S,gasLimit:x,setGasLimit:j,properGasLimit:I,estimateToUse:A,hasGasErrors:R,gasErrors:D,onManualChange:L,balanceError:$}=(0,i.useGasFeeInputs)(l.GasRecommendations.medium,C,_,y),W=A===l.CUSTOM_GAS_ESTIMATE||(0,s.txParamsAreDappSuggested)(C),q=(0,a.useCallback)((()=>{v?v():T((0,f.hideModal)())}),[v,T]),F=(0,a.useCallback)((async()=>{C&&y||q();const e={gas:(0,g.decimalToHex)(x),gasLimit:(0,g.decimalToHex)(x),estimateUsed:A,gasPrice:(0,g.decGWEIToHexWEI)(M)},t={...C.txParams},n={...C,userEditedGasLimit:x!==Number(r.originalGasEstimate),userFeeLevel:A||l.CUSTOM_GAS_ESTIMATE,txParams:{...t,...e}};switch(y){case l.EditGasModes.cancel:T((0,f.createCancelTransaction)(C.id,e));break;case l.EditGasModes.speedUp:T((0,f.createSpeedUpTransaction)(C.id,e));break;case l.EditGasModes.modifyInPlace:e.userEditedGasLimit=n.userEditedGasLimit,e.userFeeLevel=n.userFeeLevel,T((0,f.showLoadingIndication)()),await T((0,f.updateTransactionGasFees)(n.id,e)),T((0,f.hideLoadingIndication)())}q()}),[C,y,T,q,x,M,r.originalGasEstimate,A]);let B=E("editGasTitle");e?B=e:y===l.EditGasModes.speedUp?B=E("speedUpPopoverTitle"):y===l.EditGasModes.cancel&&(B=E("cancelPopoverTitle"));const G=t||E("save");return a.default.createElement(c.default,{title:B,onClose:q,className:"edit-gas-popover__wrapper",footer:a.default.createElement(u.default,{type:"primary",onClick:F,disabled:R||$||!W},G)},a.default.createElement("div",{style:{padding:"0 20px 20px 20px",position:"relative"}},a.default.createElement(m.default,null),a.default.createElement(d.default,b({dappSuggestedGasFeeAcknowledged:w,setDappSuggestedGasFeeAcknowledged:k,estimatedMinimumNative:P,gasPrice:M,setGasPrice:S,gasLimit:x,setGasLimit:j,properGasLimit:I,mode:y,transaction:C,onManualChange:L,minimumGasLimit:O,balanceError:$,txParamsHaveBeenCustomized:W,gasErrors:D},n))))}_.propTypes={popoverTitle:r.default.string,editGasDisplayProps:r.default.object,confirmButtonText:r.default.string,onClose:r.default.func,transaction:r.default.object,mode:r.default.oneOf(Object.values(l.EditGasModes)),minimumGasLimit:r.default.string}}}},{package:"$root$",file:"ui/components/app/edit-gas-popover/edit-gas-popover.component.js"}],[3567,{"./edit-gas-popover.component":3566},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./edit-gas-popover.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/edit-gas-popover/index.js"}],[3568,{"../../../../helpers/constants/design-system":4070,"../../../../hooks/useI18nContext":4129,"../../../../selectors":4436,"../../../ui/box":3900,"../../../ui/info-tooltip/info-tooltip":3965,"../../../ui/typography/typography":4040,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),r=e("react-redux"),o=e("../../../../helpers/constants/design-system"),i=e("../../../../hooks/useI18nContext"),s=e("../../../../selectors"),l=d(e("../../../ui/box")),c=d(e("../../../ui/info-tooltip/info-tooltip")),u=d(e("../../../ui/typography/typography"));function d(e){return e&&e.__esModule?e:{default:e}}var p=()=>{const e=(0,i.useI18nContext)(),t=(0,r.useSelector)(s.getIsMainnet);return a.default.createElement(l.default,{display:"flex"},a.default.createElement(l.default,{marginRight:1},e("gas")),a.default.createElement("span",{className:"gas-details-item-title__estimate"},"(",e("transactionDetailGasInfoV2"),")"),a.default.createElement(c.default,{contentText:a.default.createElement(a.default.Fragment,null,a.default.createElement(u.default,{variant:o.TypographyVariant.H7},e("transactionDetailGasTooltipIntro",[t?e("networkNameEthereum"):""])),a.default.createElement(u.default,{variant:o.TypographyVariant.H7},e("transactionDetailGasTooltipExplanation")),a.default.createElement(u.default,{variant:o.TypographyVariant.H7},a.default.createElement("a",{href:"https://community.metamask.io/t/what-is-gas-why-do-transactions-take-so-long/3172",target:"_blank",rel:"noopener noreferrer"},e("transactionDetailGasTooltipConversion")))),position:"bottom"}))};n.default=p}}},{package:"$root$",file:"ui/components/app/gas-details-item/gas-details-item-title/gas-details-item-title.js"}],[3569,{"./gas-details-item-title":3568},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./gas-details-item-title"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/gas-details-item/gas-details-item-title/index.js"}],[3570,{"../../../contexts/gasFee":4046,"../../../helpers/constants/common":4068,"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../ui/box":3900,"../../ui/loading-heartbeat":3970,"../gas-timing/gas-timing.component":3572,"../transaction-detail-item/transaction-detail-item.component":3753,"../user-preferenced-currency-display":3767,"./gas-details-item-title":3569,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=v(e("react")),r=v(e("prop-types")),o=v(e("classnames")),i=e("react-redux"),s=e("../../../helpers/constants/design-system"),l=e("../../../helpers/constants/common"),c=e("../../../selectors"),u=e("../../../contexts/gasFee"),d=e("../../../hooks/useI18nContext"),p=v(e("../../ui/box")),f=v(e("../../ui/loading-heartbeat")),m=v(e("../gas-timing/gas-timing.component")),h=v(e("../transaction-detail-item/transaction-detail-item.component")),g=v(e("../user-preferenced-currency-display")),y=v(e("./gas-details-item-title"));function v(e){return e&&e.__esModule?e:{default:e}}const b=({userAcknowledgedGasMissing:e=!1})=>{const t=(0,d.useI18nContext)(),{estimateUsed:n,hasSimulationError:r,maximumCostInHexWei:v,minimumCostInHexWei:b,maxPriorityFeePerGas:_,maxFeePerGas:E}=(0,u.useGasFeeContext)(),{useNativeCurrencyAsPrimaryCurrency:T}=(0,i.useSelector)(c.getPreferences),w=(0,i.useSelector)(c.getUseCurrencyRateCheck);return r&&!e?null:a.default.createElement(h.default,{key:"gas-item",detailTitle:a.default.createElement(y.default,null),detailTitleColor:s.TextColor.textDefault,detailText:w&&a.default.createElement("div",{className:"gas-details-item__currency-container"},a.default.createElement(f.default,{estimateUsed:n}),a.default.createElement(g.default,{type:l.SECONDARY,value:b,hideLabel:Boolean(T)})),detailTotal:a.default.createElement("div",{className:"gas-details-item__currency-container"},a.default.createElement(f.default,{estimateUsed:n}),a.default.createElement(g.default,{type:l.PRIMARY,value:b,hideLabel:!T})),subText:a.default.createElement(a.default.Fragment,null,a.default.createElement(p.default,{key:"editGasSubTextFeeLabel",display:"inline-flex",className:(0,o.default)("gas-details-item__gasfee-label",{"gas-details-item__gas-fee-warning":"high"===n})},a.default.createElement(f.default,{estimateUsed:n}),a.default.createElement(p.default,{marginRight:1},a.default.createElement("strong",null,"high"===n&&"⚠ ",t("editGasSubTextFeeLabel"))),a.default.createElement("div",{key:"editGasSubTextFeeValue",className:"gas-details-item__currency-container"},a.default.createElement(f.default,{estimateUsed:n}),a.default.createElement(g.default,{key:"editGasSubTextFeeAmount",type:l.PRIMARY,value:v,hideLabel:!T})))),subTitle:a.default.createElement(m.default,{maxPriorityFeePerGas:_.toString(),maxFeePerGas:E.toString()})})};b.propTypes={userAcknowledgedGasMissing:r.default.bool};var _=b;n.default=_}}},{package:"$root$",file:"ui/components/app/gas-details-item/gas-details-item.js"}],[3571,{"./gas-details-item":3570},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./gas-details-item"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/gas-details-item/index.js"}],[3572,{"../../../../shared/constants/gas":3404,"../../../contexts/gasFee":4046,"../../../contexts/i18n":4047,"../../../ducks/metamask/metamask":4062,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/gas":4072,"../../../hooks/usePrevious":4133,"../../../store/actions":4443,"../../ui/typography/typography":4040,"bignumber.js":1853,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=_;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=y(e("prop-types")),i=y(e("classnames")),s=y(e("bignumber.js")),l=e("../../../../shared/constants/gas"),c=e("../../../hooks/usePrevious"),u=e("../../../contexts/i18n"),d=e("../../../contexts/gasFee"),p=e("../../../ducks/metamask/metamask"),f=y(e("../../ui/typography/typography")),m=e("../../../helpers/constants/design-system"),h=e("../../../store/actions"),g=e("../../../helpers/constants/gas");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}const b=(e=1,t)=>{const n=Math.ceil(e/1e3);return n<=90?t("gasTimingSeconds",[n]):t("gasTimingMinutes",[Math.ceil(n/60)])};function _({maxFeePerGas:e=0,maxPriorityFeePerGas:t=0,gasWarnings:n}){const o=(0,r.useSelector)(p.getGasEstimateType),y=(0,r.useSelector)(p.getGasFeeEstimates),v=(0,r.useSelector)(p.getIsGasEstimatesLoading),[_,E]=(0,a.useState)(null),T=(0,a.useContext)(u.I18nContext),{estimateUsed:w}=(0,d.useGasFeeContext)(),k=(null==y?void 0:y.low)&&Number(t)<Number(y.low.suggestedMaxPriorityFeePerGas),O=(0,c.usePrevious)(e),N=(0,c.usePrevious)(t),C=(0,c.usePrevious)(k);if((0,a.useEffect)((()=>{const n=t,a=e;(k||n&&n!==N||a&&a!==O)&&(0,h.getGasFeeTimeEstimate)(new s.default(n,10).toString(10),new s.default(a,10).toString(10)).then((r=>{e===a&&t===n&&E(r)})),!1!==k&&!0===C&&E(null)}),[t,e,k,O,N,C]),(null==n?void 0:n.maxPriorityFee)===g.GAS_FORM_ERRORS.MAX_PRIORITY_FEE_TOO_LOW||(null==n?void 0:n.maxFee)===g.GAS_FORM_ERRORS.MAX_FEE_TOO_LOW)return a.default.createElement(f.default,{variant:m.TypographyVariant.H7,fontWeight:m.FONT_WEIGHT.BOLD,className:(0,i.default)("gas-timing","gas-timing--negative")},T("editGasTooLow"));if(v||o!==l.GasEstimateTypes.feeMarket)return null;const{low:P={},medium:M={},high:S={}}=y;let x="",j="positive";return Number(t)>=Number(M.suggestedMaxPriorityFeePerGas)?x=Number(t)<Number(S.suggestedMaxPriorityFeePerGas)?T("gasTimingPositive",[b(P.maxWaitTimeEstimate,T)]):T("gasTimingVeryPositive",[b(S.minWaitTimeEstimate,T)]):("low"===w&&(j="negative"),x=k?_&&"unknown"!==_&&"unknown"!==(null==_?void 0:_.upperTimeBound)?T("gasTimingNegative",[b(Number(null==_?void 0:_.upperTimeBound),T)]):T("editGasTooLow"):T("gasTimingNegative",[b(P.maxWaitTimeEstimate,T)])),a.default.createElement(f.default,{variant:m.TypographyVariant.H7,className:(0,i.default)("gas-timing",{[`gas-timing--${j}`]:j})},x)}_.propTypes={maxPriorityFeePerGas:o.default.string,maxFeePerGas:o.default.string,gasWarnings:o.default.object}}}},{package:"$root$",file:"ui/components/app/gas-timing/gas-timing.component.js"}],[3573,{"./gas-timing.component":3572},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./gas-timing.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/gas-timing/index.js"}],[3574,{"../../../contexts/i18n":4047,"../../../helpers/constants/design-system":4070,"../../component-library":3840,"../../ui/box":3900,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=u(e("prop-types")),o=u(e("classnames")),i=e("../../../contexts/i18n"),s=e("../../component-library"),l=u(e("../../ui/box")),c=e("../../../helpers/constants/design-system");function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p({buttonText:e,onLongPressed:t}){const n=(0,a.useContext)(i.I18nContext),r=(0,a.useRef)(!1),[u,d]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),m=e=>{e.stopPropagation()},h=()=>{r.current&&d(!0)},g=(0,a.useCallback)((e=>{t(),f(!0),m(e)}),[t]),y=()=>{d(!1),f(!1)},v=(0,a.useCallback)((()=>a.default.createElement(l.default,{className:(0,o.default)("hold-to-reveal-button__absolute-fill",{"hold-to-reveal-button__absolute-fill":u,"hold-to-reveal-button__main-icon-show":p})},a.default.createElement(l.default,{className:"hold-to-reveal-button__absolute-fill"},a.default.createElement("svg",{className:"hold-to-reveal-button__circle-svg"},a.default.createElement("circle",{className:"hold-to-reveal-button__circle-background",cx:14,cy:14,r:13}))),a.default.createElement(l.default,{className:"hold-to-reveal-button__absolute-fill"},a.default.createElement("svg",{className:"hold-to-reveal-button__circle-svg"},a.default.createElement("circle",{onTransitionEnd:h,className:"hold-to-reveal-button__circle-foreground",cx:14,cy:14,r:13}))),a.default.createElement(l.default,{display:c.DISPLAY.FLEX,alignItems:c.AlignItems.center,justifyContent:c.JustifyContent.center,className:"hold-to-reveal-button__lock-icon-container"},a.default.createElement("img",{src:"images/lock-icon.svg",alt:n("padlock"),className:"hold-to-reveal-button__lock-icon"})))),[u,p,n]),b=(0,a.useCallback)((()=>u?a.default.createElement("div",{className:(0,o.default)("hold-to-reveal-button__absolute-fill",{"hold-to-reveal-button__unlock-icon-hide":p}),onAnimationEnd:y},a.default.createElement("div",{onAnimationEnd:m,className:"hold-to-reveal-button__absolute-fill hold-to-reveal-button__circle-static-outer-container"},a.default.createElement("svg",{className:"hold-to-reveal-button__circle-svg"},a.default.createElement("circle",{className:"hold-to-reveal-button__circle-static-outer",cx:14,cy:14,r:14}))),a.default.createElement("div",{onAnimationEnd:m,className:"hold-to-reveal-button__absolute-fill hold-to-reveal-button__circle-static-inner-container"},a.default.createElement("svg",{className:"hold-to-reveal-button__circle-svg"},a.default.createElement("circle",{className:"hold-to-reveal-button__circle-static-inner",cx:14,cy:14,r:12}))),a.default.createElement("div",{className:"hold-to-reveal-button__unlock-icon-container",onAnimationEnd:g},a.default.createElement("img",{src:"images/unlock-icon.svg",alt:n("padlock"),className:"hold-to-reveal-button__unlock-icon"}))):null),[u,p,g,n]);return a.default.createElement(s.Button,{onMouseDown:()=>{r.current=!0},onMouseUp:()=>{r.current=!1},className:"hold-to-reveal-button__button-hold",textProps:{display:c.DISPLAY.FLEX,alignItems:c.AlignItems.center}},a.default.createElement(l.default,{className:"hold-to-reveal-button__icon-container",marginRight:2},v(),b()),e)}p.propTypes={buttonText:r.default.string.isRequired,onLongPressed:r.default.func.isRequired}}}},{package:"$root$",file:"ui/components/app/hold-to-reveal-button/hold-to-reveal-button.js"}],[3575,{"./hold-to-reveal-button":3574},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./hold-to-reveal-button"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/hold-to-reveal-button/index.js"}],[3576,{"../../ui/button":3904,"../../ui/check-box":3910,"../../ui/tooltip":4035,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=c(e("classnames")),o=c(e("prop-types")),i=c(e("../../ui/button")),s=c(e("../../ui/check-box")),l=c(e("../../ui/tooltip"));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}const d=({acceptText:e,checkboxText:t,checkboxTooltipText:n,classNames:o=[],descriptionText:c,ignoreText:u,infoText:d,onAccept:p,onIgnore:f})=>{const[m,h]=(0,a.useState)(!1),g=t&&a.default.createElement(s.default,{id:"homeNotification_checkbox",checked:m,className:"home-notification__checkbox",onClick:()=>h((e=>!e))});return a.default.createElement("div",{className:(0,r.default)("home-notification",...o)},a.default.createElement("div",{className:"home-notification__content"},a.default.createElement("div",{className:"home-notification__content-container"},a.default.createElement("div",{className:"home-notification__text"},c)),d?a.default.createElement(l.default,{position:"top",title:d,wrapperClassName:"home-notification__tooltip-wrapper"},a.default.createElement("i",{className:"fa fa-info-circle"})):null),a.default.createElement("div",{className:"home-notification__buttons"},p&&e?a.default.createElement(i.default,{type:"primary",className:"home-notification__accept-button",onClick:p},e):null,f&&u?a.default.createElement(i.default,{type:"secondary",className:"home-notification__ignore-button",onClick:()=>f(m)},u):null,t?a.default.createElement("div",{className:"home-notification__checkbox-wrapper"},n?a.default.createElement(l.default,{position:"top",title:n,wrapperClassName:"home-notification__checkbox-label-tooltip"},g):g,a.default.createElement("label",{className:"home-notification__checkbox-label",htmlFor:"homeNotification_checkbox"},t)):null))};d.propTypes={acceptText:o.default.node,checkboxText:o.default.node,checkboxTooltipText:o.default.node,classNames:o.default.array,descriptionText:o.default.node.isRequired,ignoreText:o.default.node,infoText:o.default.node,onAccept:o.default.func,onIgnore:o.default.func};var p=d;n.default=p}}},{package:"$root$",file:"ui/components/app/home-notification/home-notification.component.js"}],[3577,{"./home-notification.component":3576},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./home-notification.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/home-notification/index.js"}],[3578,{"../../../../shared/constants/metametrics":3408,"../../../contexts/metametrics":4048,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../../store/actions":4443,"../../ui/box/box":3899,"../../ui/button":3904,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,a.useContext)(p.MetaMetricsContext),t=(0,i.useI18nContext)(),n=(0,o.useHistory)(),h=(0,r.useSelector)(m.getIsTokenDetectionSupported),g=(0,r.useSelector)(m.getIsTokenDetectionInactiveOnMainnet),y=h||g||Boolean(!1);return a.default.createElement(c.default,{className:"import-token-link",textAlign:u.TEXT_ALIGN.CENTER},y&&a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{className:"import-token-link__link","data-testid":"refresh-list-button",type:"link",onClick:()=>(0,d.detectNewTokens)()},t("refreshList")),t("or")),a.default.createElement(l.default,{className:"import-token-link__link","data-testid":"import-token-button",type:"link",onClick:()=>{n.push(s.IMPORT_TOKEN_ROUTE),e({event:f.MetaMetricsEventName.TokenImportButtonClicked,category:f.MetaMetricsEventCategory.Navigation,properties:{location:"Home"}})}},y?t("importTokens"):t("importTokens").charAt(0).toUpperCase()+t("importTokens").slice(1)))};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=e("react-router-dom"),i=e("../../../hooks/useI18nContext"),s=e("../../../helpers/constants/routes"),l=h(e("../../ui/button")),c=h(e("../../ui/box/box")),u=e("../../../helpers/constants/design-system"),d=e("../../../store/actions"),p=e("../../../contexts/metametrics"),f=e("../../../../shared/constants/metametrics"),m=e("../../../selectors");function h(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}}}},{package:"$root$",file:"ui/components/app/import-token-link/import-token-link.component.js"}],[3579,{"./import-token-link.component":3578},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./import-token-link.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/import-token-link/index.js"}],[3580,{"./ledger-instruction-field":3581},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./ledger-instruction-field"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/ledger-instruction-field/index.js"}],[3581,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../../shared/constants/hardware-wallets":3405,"../../../ducks/app/app":4054,"../../../ducks/metamask/metamask":4062,"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../../store/actions":4443,"../../ui/button":3904,"../../ui/dialog":3924,"../../ui/typography/typography":4040,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=_;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=y(e("prop-types")),i=e("../../../../shared/constants/hardware-wallets"),s=e("../../../../shared/constants/app"),l=e("../../../ducks/app/app"),c=y(e("../../ui/typography/typography")),u=y(e("../../ui/button")),d=e("../../../hooks/useI18nContext"),p=e("../../../helpers/constants/design-system"),f=y(e("../../ui/dialog")),m=e("../../../../app/scripts/lib/util"),h=e("../../../ducks/metamask/metamask"),g=e("../../../store/actions");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}const b=(e,t=!0,n=p.TextColor.textDefault)=>t&&a.default.createElement(c.default,{boxProps:{margin:0},color:n,fontWeight:p.FONT_WEIGHT.BOLD,variant:p.TypographyVariant.H7},e);function _({showDataInstruction:e}){const t=(0,d.useI18nContext)(),n=(0,r.useDispatch)(),o=(0,r.useSelector)(l.getLedgerWebHidConnectedStatus),c=(0,r.useSelector)(h.getLedgerTransportType),y=(0,r.useSelector)(l.getLedgerTransportStatus),v=(0,m.getEnvironmentType)()===s.ENVIRONMENT_TYPE_FULLSCREEN;(0,a.useEffect)((()=>{(async()=>{if(c===i.LedgerTransportTypes.webhid&&o===i.WebHIDConnectedStatuses.connected&&y===i.HardwareTransportStates.none)try{const e=await(0,g.attemptLedgerTransportCreation)();n((0,l.setLedgerTransportStatus)(e?i.HardwareTransportStates.verified:i.HardwareTransportStates.unknownFailure))}catch(e){e.message.match("Failed to open the device")?n((0,l.setLedgerTransportStatus)(i.HardwareTransportStates.deviceOpenFailure)):e.message.match("the device is already open")?n((0,l.setLedgerTransportStatus)(i.HardwareTransportStates.verified)):n((0,l.setLedgerTransportStatus)(i.HardwareTransportStates.unknownFailure))}})(),(async()=>{if(c===i.LedgerTransportTypes.webhid&&o!==i.WebHIDConnectedStatuses.connected){const e=(await window.navigator.hid.getDevices()).some((e=>e.vendorId===Number(i.LEDGER_USB_VENDOR_ID)));n((0,l.setLedgerWebHidConnectedStatus)(e?i.WebHIDConnectedStatuses.connected:i.WebHIDConnectedStatuses.notConnected))}})()}),[n,c,o,y]),(0,a.useEffect)((()=>()=>{n((0,l.setLedgerTransportStatus)(i.HardwareTransportStates.none))}),[n]);const _=c===i.LedgerTransportTypes.live,E=c===i.LedgerTransportTypes.webhid,T=(0,m.getPlatform)()===s.PLATFORM_FIREFOX;return a.default.createElement("div",null,a.default.createElement("div",{className:"confirm-detail-row"},a.default.createElement(f.default,{type:"message"},a.default.createElement("div",{className:"ledger-live-dialog"},b(t("ledgerConnectionInstructionHeader")),b(`- ${t("ledgerConnectionInstructionStepOne")}`,!T&&_),b(`- ${t("ledgerConnectionInstructionStepTwo")}`,!T&&_),b(`- ${t("ledgerConnectionInstructionStepThree")}`),b(`- ${t("ledgerConnectionInstructionStepFour")}`,e),b(a.default.createElement("span",null,a.default.createElement(u.default,{type:"link",onClick:async()=>{v?window.location.reload():global.platform.openExtensionInBrowser(null,null,!0)}},t("ledgerConnectionInstructionCloseOtherApps"))),y===i.HardwareTransportStates.deviceOpenFailure),b(a.default.createElement("span",null,a.default.createElement(u.default,{type:"link",onClick:async()=>{if(v){const e=(await window.navigator.hid.requestDevice({filters:[{vendorId:i.LEDGER_USB_VENDOR_ID}]})).some((e=>e.vendorId===Number(i.LEDGER_USB_VENDOR_ID)));n((0,l.setLedgerWebHidConnectedStatus)({webHidConnectedStatus:e?i.WebHIDConnectedStatuses.connected:i.WebHIDConnectedStatuses.notConnected}))}else global.platform.openExtensionInBrowser(null,null,!0)}},t(v?"clickToConnectLedgerViaWebHID":"openFullScreenForLedgerWebHid"))),E&&o===i.WebHIDConnectedStatuses.notConnected,p.TextColor.WARNING_DEFAULT)))))}_.propTypes={showDataInstruction:o.default.bool}}}},{package:"$root$",file:"ui/components/app/ledger-instruction-field/ledger-instruction-field.js"}],[3582,{"./loading-network-screen.container":3584},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./loading-network-screen.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/loading-network-screen/index.js"}],[3583,{"../../../../shared/constants/network":3409,"../../../../shared/constants/time":3415,"../../ui/button":3904,"../../ui/loading-screen":3973,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=c(e("prop-types")),o=c(e("../../ui/button")),i=c(e("../../ui/loading-screen")),s=e("../../../../shared/constants/time"),l=e("../../../../shared/constants/network");function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends a.PureComponent{constructor(...e){super(...e),d(this,"state",{showErrorScreen:!1}),d(this,"componentDidMount",(()=>{this.cancelCallTimeout=setTimeout(this.cancelCall,this.props.cancelTime||15*s.SECOND)})),d(this,"getConnectingLabel",(function(e){if(e)return e;const{provider:t,providerId:n}=this.props,a=t.type,{t:r}=this.context;switch(a){case l.NETWORK_TYPES.MAINNET:return r("connectingToMainnet");case l.NETWORK_TYPES.GOERLI:return r("connectingToGoerli");case l.NETWORK_TYPES.SEPOLIA:return r("connectingToSepolia");case l.NETWORK_TYPES.LINEA_TESTNET:return r("connectingToLineaTestnet");default:return r("connectingTo",[n])}})),d(this,"renderDeprecatedRpcUrlWarning",(()=>{const{showNetworkDropdown:e}=this.props;return a.default.createElement("div",{className:"loading-overlay__error-screen"},a.default.createElement("span",{className:"loading-overlay__emoji"},"😞"),a.default.createElement("span",null,this.context.t("currentRpcUrlDeprecated")),a.default.createElement("div",{className:"loading-overlay__error-buttons"},a.default.createElement(o.default,{type:"secondary",onClick:()=>{window.clearTimeout(this.cancelCallTimeout),e()}},this.context.t("switchNetworks"))))})),d(this,"renderErrorScreenContent",(()=>{const{showNetworkDropdown:e,setProviderArgs:t,setProviderType:n}=this.props;return a.default.createElement("div",{className:"loading-overlay__error-screen"},a.default.createElement("span",{className:"loading-overlay__emoji"},"😞"),a.default.createElement("span",null,this.context.t("somethingWentWrong")),a.default.createElement("div",{className:"loading-overlay__error-buttons"},a.default.createElement(o.default,{type:"secondary",onClick:()=>{window.clearTimeout(this.cancelCallTimeout),e()}},this.context.t("switchNetworks")),a.default.createElement(o.default,{type:"primary",onClick:()=>{this.setState({showErrorScreen:!1}),n(...t),window.clearTimeout(this.cancelCallTimeout),this.cancelCallTimeout=setTimeout(this.cancelCall,this.props.cancelTime||15*s.SECOND)}},this.context.t("tryAgain"))))})),d(this,"cancelCall",(()=>{const{isNetworkLoading:e}=this.props;e&&this.setState({showErrorScreen:!0})})),d(this,"componentDidUpdate",(e=>{const{provider:t}=this.props,{provider:n}=e;t.type!==n.type&&(window.clearTimeout(this.cancelCallTimeout),this.setState({showErrorScreen:!1}),this.cancelCallTimeout=setTimeout(this.cancelCall,this.props.cancelTime||15*s.SECOND))})),d(this,"componentWillUnmount",(()=>{window.clearTimeout(this.cancelCallTimeout)}))}render(){const{rollbackToPreviousProvider:e,showDeprecatedRpcUrlWarning:t}=this.props;let n;return n=this.state.showErrorScreen?this.renderErrorScreenContent():t?this.renderDeprecatedRpcUrlWarning():this.getConnectingLabel(this.props.loadingMessage),a.default.createElement(i.default,{header:a.default.createElement("div",{className:"page-container__header-close",onClick:e}),showLoadingSpinner:!this.state.showErrorScreen,loadingMessage:n})}}n.default=p,d(p,"contextTypes",{t:r.default.func}),d(p,"propTypes",{loadingMessage:r.default.string,cancelTime:r.default.number,provider:r.default.oneOfType([r.default.string,r.default.object]),providerId:r.default.oneOfType([r.default.string,r.default.number]),showNetworkDropdown:r.default.func,setProviderArgs:r.default.array,setProviderType:r.default.func,rollbackToPreviousProvider:r.default.func,isNetworkLoading:r.default.bool,showDeprecatedRpcUrlWarning:r.default.bool})}}},{package:"$root$",file:"ui/components/app/loading-network-screen/loading-network-screen.component.js"}],[3584,{"../../../../shared/constants/network":3409,"../../../selectors":4436,"../../../store/actions":4443,"./loading-network-screen.component":3583,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../../shared/constants/network"),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("../../../store/actions")),s=e("../../../selectors"),l=(a=e("./loading-network-screen.component"))&&a.__esModule?a:{default:a};function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const u=["0x3","0x2a","0x4"];var d=(0,r.connect)((e=>{const{loadingMessage:t}=e.appState,{provider:n}=e.metamask,{rpcUrl:a,chainId:r,ticker:i,nickname:l,type:c}=n,d=c===o.NETWORK_TYPES.RPC?[a,r,i,l]:[n.type],p=null==n?void 0:n.chainId,f=u.includes(p),m=(null==n?void 0:n.rpcUrl)&&new URL(n.rpcUrl).host.endsWith(".infura.io"),h=f&&m;return{isNetworkLoading:(0,s.isNetworkLoading)(e),loadingMessage:t,setProviderArgs:d,provider:n,providerId:(0,s.getNetworkIdentifier)(e),showDeprecatedRpcUrlWarning:h}}),(e=>({setProviderType:t=>{e(i.setProviderType(t))},rollbackToPreviousProvider:()=>e(i.rollbackToPreviousProvider()),showNetworkDropdown:()=>e(i.showNetworkDropdown())})))(l.default);n.default=d}}},{package:"$root$",file:"ui/components/app/loading-network-screen/loading-network-screen.container.js"}],[3585,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../../shared/constants/keyring":3406,"../../../../shared/constants/metametrics":3408,"../../../contexts/metametrics":4048,"../../../helpers/constants/routes":4074,"../../../helpers/utils/util":4108,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../../store/actions":4443,"../../component-library/icon/deprecated":3836,"../../ui/menu":3981,"@metamask/etherscan-link":1221,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=T;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a},i=e("react-router-dom"),s=e("react-redux"),l=e("@metamask/etherscan-link"),c=e("../../../store/actions"),u=e("../../../helpers/constants/routes"),d=e("../../../helpers/utils/util"),p=e("../../ui/menu"),f=e("../../../selectors"),m=e("../../../hooks/useI18nContext"),h=e("../../../../app/scripts/lib/util"),g=e("../../../../shared/constants/app"),y=e("../../../../shared/constants/keyring"),v=e("../../../../shared/constants/metametrics"),b=e("../../../contexts/metametrics"),_=e("../../component-library/icon/deprecated");function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function T({anchorElement:e,onClose:t}){const n=(0,m.useI18nContext)(),a=(0,s.useDispatch)(),o=(0,i.useHistory)(),E=(0,s.useSelector)(f.getCurrentKeyring),T=(0,s.useSelector)(f.getCurrentChainId),w=(0,s.useSelector)(f.getRpcPrefsForCurrentProvider),k=(0,s.useSelector)(f.getSelectedIdentity),{address:O}=k,N=(0,l.getAccountLink)(O,T,w),{blockExplorerUrl:C}=w,P=(0,d.getURLHostName)(C),M=(0,r.useContext)(b.MetaMetricsContext),S=(0,s.useSelector)(f.getBlockExplorerLinkText),x=E.type!==y.KeyringType.hdKeyTree;return r.default.createElement(p.Menu,{anchorElement:e,className:"account-options-menu",onHide:t},r.default.createElement(p.MenuItem,{onClick:"addBlockExplorer"===S.firstPart?()=>{o.push(`${u.NETWORKS_ROUTE}#blockExplorerUrl`)}:()=>{M({event:v.MetaMetricsEventName.ExternalLinkClicked,category:v.MetaMetricsEventCategory.Navigation,properties:{link_type:v.MetaMetricsEventLinkType.AccountTracker,location:"Account Options",url_domain:(0,d.getURLHostName)(N)}}),global.platform.openTab({url:N}),t()},subtitle:P?r.default.createElement("span",{className:"account-options-menu__explorer-origin"},P):null,iconName:_.ICON_NAMES.EXPORT},n(S.firstPart,""===S.secondPart?null:[n(S.secondPart)])),(0,h.getEnvironmentType)()===g.ENVIRONMENT_TYPE_FULLSCREEN?null:r.default.createElement(p.MenuItem,{onClick:()=>{M({event:v.MetaMetricsEventName.AppWindowExpanded,category:v.MetaMetricsEventCategory.Navigation,properties:{location:"Account Options"}}),global.platform.openExtensionInBrowser(),t()},iconName:_.ICON_NAMES.EXPAND},n("expandView")),r.default.createElement(p.MenuItem,{"data-testid":"account-options-menu__account-details",onClick:()=>{a((0,c.showModal)({name:"ACCOUNT_DETAILS"})),M({event:v.MetaMetricsEventName.NavAccountDetailsOpened,category:v.MetaMetricsEventCategory.Navigation,properties:{location:"Account Options"}}),t()},iconName:_.ICON_NAMES.SCAN_BARCODE},n("accountDetails")),r.default.createElement(p.MenuItem,{"data-testid":"account-options-menu__connected-sites",onClick:()=>{M({event:v.MetaMetricsEventName.NavConnectedSitesOpened,category:v.MetaMetricsEventCategory.Navigation,properties:{location:"Account Options"}}),o.push(u.CONNECTED_ROUTE),t()},iconName:_.ICON_NAMES.CONNECT},n("connectedSites")),x?r.default.createElement(p.MenuItem,{"data-testid":"account-options-menu__remove-account",onClick:()=>{a((0,c.showModal)({name:"CONFIRM_REMOVE_ACCOUNT",identity:k})),t()},iconName:_.ICON_NAMES.TRASH},n("removeAccount")):null)}T.propTypes={anchorElement:o.default.instanceOf(window.Element),onClose:o.default.func.isRequired},T.defaultProps={anchorElement:undefined}}}},{package:"$root$",file:"ui/components/app/menu-bar/account-options-menu.js"}],[3586,{"./menu-bar":3587},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./menu-bar"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/menu-bar/index.js"}],[3587,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../../shared/constants/metametrics":3408,"../../../contexts/metametrics":4048,"../../../helpers/constants/routes":4074,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../component-library":3840,"../../component-library/icon/deprecated":3836,"../../multichain/global-menu":3881,"../connected-status-indicator":3531,"../selected-account":3688,"./account-options-menu":3585,react:3177,"react-redux":3130,"react-router-dom":3150,"webextension-polyfill":3385},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,f.useI18nContext)(),t=(0,a.useContext)(h.MetaMetricsContext),n=(0,o.useHistory)(),[b,_]=(0,a.useState)(!1),E=(0,i.useSelector)(m.getOriginOfCurrentTab),T=(0,a.useRef)(!1),w=(0,c.getEnvironmentType)()===u.ENVIRONMENT_TYPE_POPUP&&E&&E!==r.default.runtime.id;return a.default.createElement("div",{className:"menu-bar"},w?a.default.createElement(l.default,{onClick:()=>n.push(p.CONNECTED_ACCOUNTS_ROUTE)}):null,a.default.createElement(s.default,null),a.default.createElement("span",{style:{display:"inherit"},ref:T},a.default.createElement(g.ButtonIcon,{iconName:y.ICON_NAMES.MORE_VERTICAL,className:"menu-bar__account-options","data-testid":"account-options-menu-button",ariaLabel:e("accountOptions"),onClick:()=>{t({event:d.MetaMetricsEventName.NavAccountMenuOpened,category:d.MetaMetricsEventCategory.Navigation,properties:{location:"Home"}}),_(!0)}})),b&&a.default.createElement(v.default,{anchorElement:T.current,onClose:()=>_(!1)}))};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=b(e("webextension-polyfill")),o=e("react-router-dom"),i=e("react-redux"),s=b(e("../selected-account")),l=b(e("../connected-status-indicator")),c=e("../../../../app/scripts/lib/util"),u=e("../../../../shared/constants/app"),d=e("../../../../shared/constants/metametrics"),p=e("../../../helpers/constants/routes"),f=e("../../../hooks/useI18nContext"),m=e("../../../selectors"),h=e("../../../contexts/metametrics"),g=e("../../component-library"),y=e("../../component-library/icon/deprecated"),v=(e("../../multichain/global-menu"),b(e("./account-options-menu")));function b(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}}}},{package:"$root$",file:"ui/components/app/menu-bar/menu-bar.js"}],[3588,{"prop-types":3032,react:3177,"react-dom":3077,"react-transition-group/CSSTransitionGroup":3163},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("prop-types")),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=e("react-dom"),i=l(e("react-transition-group/CSSTransitionGroup"));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u extends r.Component{constructor(...e){super(...e),c(this,"globalClickOccurred",(e=>{const{target:t}=e,n=(0,o.findDOMNode)(this);var a,r;this.props.isOpen&&t!==n&&!this.container.contains(e.target)&&(null===(a=(r=this.props).onClickOutside)||void 0===a||a.call(r,e))}))}renderPrimary(){const{isOpen:e}=this.props;if(!e)return null;const t=this.props.innerStyle||{};return r.default.createElement("div",{className:"menu-droppo",key:"menu-droppo-drawer","data-testid":"menu-droppo",style:t},this.props.children)}componentDidMount(){if(this&&document.body){document.body.addEventListener("click",this.globalClickOccurred);const e=(0,o.findDOMNode)(this);this.container=e}}componentWillUnmount(){this&&document.body&&document.body.removeEventListener("click",this.globalClickOccurred)}render(){const{containerClassName:e="",style:t}=this.props,n=this.props.speed||"300ms",{useCssTransition:a}=this.props,o={position:"fixed",...t,zIndex:"zIndex"in this.props?this.props.zIndex:0};return r.default.createElement("div",{style:o,className:`menu-droppo-container ${e}`,"data-testid":e},r.default.createElement("style",null,`\n          .menu-droppo-enter {\n            transition: transform ${n} ease-in-out;\n            transform: translateY(-200%);\n          }\n\n          .menu-droppo-enter.menu-droppo-enter-active {\n            transition: transform ${n} ease-in-out;\n            transform: translateY(0%);\n          }\n\n          .menu-droppo-leave {\n            transition: transform ${n} ease-in-out;\n            transform: translateY(0%);\n          }\n\n          .menu-droppo-leave.menu-droppo-leave-active {\n            transition: transform ${n} ease-in-out;\n            transform: translateY(-200%);\n          }\n        `),a?r.default.createElement(i.default,{className:"css-transition-group",transitionName:"menu-droppo",transitionEnterTimeout:parseInt(n,10),transitionLeaveTimeout:parseInt(n,10)},this.renderPrimary()):this.renderPrimary())}}n.default=u,c(u,"propTypes",{isOpen:a.default.bool.isRequired,innerStyle:a.default.object,children:a.default.node.isRequired,onClickOutside:a.default.func,containerClassName:a.default.string,zIndex:a.default.number,style:a.default.object.isRequired,useCssTransition:a.default.bool,speed:a.default.string})}}},{package:"$root$",file:"ui/components/app/menu-droppo.js"}],[3589,{"./metamask-template-renderer":3590,"./section-shape":3592},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"SectionShape",{enumerable:!0,get:function(){return o.SectionShape}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./metamask-template-renderer"))&&a.__esModule?a:{default:a},o=e("./section-shape")}}},{package:"$root$",file:"ui/components/app/metamask-template-renderer/index.js"}],[3590,{"./safe-component-list":3591,"./section-shape":3592,lodash:2932,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("lodash"),o=e("./safe-component-list"),i=e("./section-shape");function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}function c(e){const{element:t}=e,n=o.safeComponentList[t];if(!n)throw new Error(`${t} is not in the safe component list for MetaMask template renderer`);return n}const u=({sections:e})=>{if(!e)return null;if("string"==typeof e)return e;if(e&&"object"==typeof e&&!Array.isArray(e)){const t=c(e);return a.default.createElement(t,e.props,"object"==typeof e.children?a.default.createElement(u,{sections:e.children}):null==e?void 0:e.children)}return a.default.createElement(a.default.Fragment,null,e.reduce(((e,t)=>{if(!0===(null==t?void 0:t.hide))return e;if("string"==typeof t)e.push(t);else{if(!t.key)throw new Error("When using array syntax in MetaMask Template Language, you must specify a key for each child of the array");if("object"==typeof(null==t?void 0:t.children))e.push(a.default.createElement(u,{sections:t,key:t.key}));else{const n=c(t);e.push(a.default.createElement(n,l({key:t.key},t.props),null==t?void 0:t.children))}}return e}),[]))};u.propTypes={sections:i.ValidChildren};var d=(0,a.memo)(u,((e,t)=>(0,r.isEqual)(e.sections,t.sections)));n.default=d}}},{package:"$root$",file:"ui/components/app/metamask-template-renderer/metamask-template-renderer.js"}],[3591,{"../../../pages/confirmation/components/confirmation-network-switch":4202,"../../ui/box":3900,"../../ui/button":3904,"../../ui/chip":3913,"../../ui/definition-list":3922,"../../ui/popover":3999,"../../ui/text-field":4025,"../../ui/textarea/textarea":4027,"../../ui/tooltip/tooltip":4036,"../../ui/truncated-definition-list":4037,"../../ui/typography":4039,"../../ui/url-icon":4044,"../metamask-translation":3593,"../network-display":3651},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.safeComponentList=void 0;var a=y(e("../../ui/button")),r=y(e("../../ui/chip")),o=y(e("../../ui/definition-list")),i=y(e("../../ui/truncated-definition-list")),s=y(e("../../ui/popover")),l=y(e("../../ui/typography")),c=y(e("../../ui/box")),u=y(e("../metamask-translation")),d=y(e("../network-display")),p=y(e("../../ui/textarea/textarea")),f=y(e("../../ui/text-field")),m=y(e("../../../pages/confirmation/components/confirmation-network-switch")),h=y(e("../../ui/url-icon")),g=y(e("../../ui/tooltip/tooltip"));function y(e){return e&&e.__esModule?e:{default:e}}const v={a:"a",b:"b",i:"i",p:"p",div:"div",span:"span",Box:c.default,Button:a.default,Chip:r.default,ConfirmationNetworkSwitch:m.default,DefinitionList:o.default,MetaMaskTranslation:u.default,NetworkDisplay:d.default,Popover:s.default,TextArea:p.default,TextField:f.default,Tooltip:g.default,TruncatedDefinitionList:i.default,Typography:l.default,UrlIcon:h.default};n.safeComponentList=v}}},{package:"$root$",file:"ui/components/app/metamask-template-renderer/safe-component-list.js"}],[3592,{"prop-types":3032},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValidChildren=n.SectionShape=void 0;var a,r=(a=e("prop-types"))&&a.__esModule?a:{default:a};const o={props:r.default.object,element:r.default.string,key:r.default.string};n.SectionShape=o;const i=r.default.oneOfType([r.default.string,r.default.shape(o),r.default.arrayOf(r.default.oneOfType([r.default.shape(o),r.default.string]))]);n.ValidChildren=i,o.children=i}}},{package:"$root$",file:"ui/components/app/metamask-template-renderer/section-shape.js"}],[3593,{"./metamask-translation":3594},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./metamask-translation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/metamask-translation/index.js"}],[3594,{"../../../hooks/useI18nContext":4129,"../metamask-template-renderer":3589,"../metamask-template-renderer/section-shape":3592,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=c;var a=l(e("react")),r=l(e("prop-types")),o=e("../../../hooks/useI18nContext"),i=l(e("../metamask-template-renderer")),s=e("../metamask-template-renderer/section-shape");function l(e){return e&&e.__esModule?e:{default:e}}function c({translationKey:e,variables:t}){return(0,o.useI18nContext)()(e,null==t?void 0:t.map((t=>{if("object"==typeof t&&!Array.isArray(t)&&t.element){var n,r,o,s;if(!t.key)throw new Error(`When using MetaMask Template Language in a MetaMaskTranslation variable, you must provide a key for the section regardless of syntax.\n            Section with element '${t.element}' for translationKey: '${e}' has no key property`);if(t.children&&Array.isArray(t.children)&&t.children.length>2)throw new Error("MetaMaskTranslation only renders templates with a single section and maximum two children");if((null===(n=t.children)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.children)!==undefined&&"string"!=typeof t.children[0].children||(null===(o=t.children)||void 0===o||null===(s=o[1])||void 0===s?void 0:s.children)!==undefined&&"string"!=typeof t.children[1].children)throw new Error("MetaMaskTranslation does not allow for component trees of non trivial depth");return a.default.createElement(i.default,{key:`${e}-${t.key}`,sections:t})}return t})))}c.propTypes={translationKey:r.default.string.isRequired,variables:r.default.arrayOf(r.default.oneOfType([r.default.string,r.default.number,r.default.shape(s.SectionShape)]))}}}},{package:"$root$",file:"ui/components/app/metamask-translation/metamask-translation.js"}],[3595,{"./modal-content":3596,"./modal.component":3598},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ModalContent",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a.default}});var a=o(e("./modal.component")),r=o(e("./modal-content"));function o(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/components/app/modal/index.js"}],[3596,{"./modal-content.component":3597},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./modal-content.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modal/modal-content/index.js"}],[3597,{"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a};function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}class s extends r.PureComponent{render(){const{title:e,description:t}=this.props;return r.default.createElement("div",{className:"modal-content"},e?r.default.createElement("div",{className:"modal-content__title"},e):null,t&&r.default.createElement("div",{className:"modal-content__description"},t))}}n.default=s,function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(s,"propTypes",{title:o.default.string,description:o.default.string})}}},{package:"$root$",file:"ui/components/app/modal/modal-content/modal-content.component.js"}],[3598,{"../../ui/button":3904,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=s(e("prop-types")),o=s(e("classnames")),i=s(e("../../ui/button"));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u extends a.PureComponent{render(){const{children:e,headerText:t,onClose:n,onSubmit:r,submitType:s,submitText:l,submitDisabled:c,onCancel:u,cancelType:d,cancelText:p,contentClass:f,containerClass:m,hideFooter:h}=this.props;return a.default.createElement("div",{className:(0,o.default)("modal-container",m)},t&&a.default.createElement("div",{className:"modal-container__header"},a.default.createElement("div",{className:"modal-container__header-text"},t),a.default.createElement("div",{className:"modal-container__header-close","data-testid":"modal-header-close",onClick:n})),a.default.createElement("div",{className:(0,o.default)("modal-container__content",f)},e),h?null:a.default.createElement("div",{className:"modal-container__footer"},u&&a.default.createElement(i.default,{type:d,onClick:u,className:"modal-container__footer-button"},p),a.default.createElement(i.default,{type:s,onClick:r,disabled:c,className:"modal-container__footer-button"},l)))}}n.default=u,c(u,"propTypes",{children:r.default.node,contentClass:r.default.string,containerClass:r.default.string,headerText:r.default.string,onClose:r.default.func,onSubmit:r.default.func,submitType:r.default.string,submitText:r.default.string,submitDisabled:r.default.bool,hideFooter:r.default.bool,onCancel:r.default.func,cancelType:r.default.string,cancelText:r.default.string}),c(u,"defaultProps",{submitType:"primary",cancelType:"secondary"})}}},{package:"$root$",file:"ui/components/app/modal/modal.component.js"}],[3599,{"../../../../../shared/constants/metametrics":3408,"../../../../helpers/constants/routes":4074,"../../../../helpers/utils/hardware":4094,"../../../../helpers/utils/util":4108,"../../../ui/button":3904,"../../../ui/editable-label":3930,"../../../ui/qr-code":4003,"../account-modal-container":3604,"@metamask/etherscan-link":1221,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=m(e("prop-types")),o=e("@metamask/etherscan-link"),i=m(e("../account-modal-container")),s=m(e("../../../ui/qr-code")),l=m(e("../../../ui/editable-label")),c=m(e("../../../ui/button")),u=e("../../../../helpers/utils/util"),d=e("../../../../helpers/utils/hardware"),p=e("../../../../../shared/constants/metametrics"),f=e("../../../../helpers/constants/routes");function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class y extends a.Component{render(){const{selectedIdentity:e,chainId:t,showExportPrivateKeyModal:n,setAccountLabel:r,keyrings:m,rpcPrefs:h,history:g,hideModal:y,blockExplorerLinkText:v}=this.props,{name:b,address:_}=e,E=m.find((e=>e.accounts.includes(_)));let T=!0;(0,d.isHardwareKeyring)(null==E?void 0:E.type)&&(T=!1);return a.default.createElement(i.default,{className:"account-details-modal"},a.default.createElement(l.default,{className:"account-details-modal__name",defaultValue:b,onSubmit:e=>r(_,e),accounts:this.props.accounts}),a.default.createElement(s.default,{Qr:{data:_}}),a.default.createElement("div",{className:"account-details-modal__divider"}),a.default.createElement(c.default,{type:"secondary",className:"account-details-modal__button",onClick:"addBlockExplorer"===v.firstPart?()=>{y(),g.push(`${f.NETWORKS_ROUTE}#blockExplorerUrl`)}:()=>{const e=(0,o.getAccountLink)(_,t,h);this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.ExternalLinkClicked,properties:{link_type:p.MetaMetricsEventLinkType.AccountTracker,location:"Account Details Modal",url_domain:(0,u.getURLHostName)(e)}}),global.platform.openTab({url:e})}},this.context.t(v.firstPart,[v.secondPart])),T&&a.default.createElement(c.default,{type:"secondary",className:"account-details-modal__button",onClick:()=>{this.context.trackEvent({category:p.MetaMetricsEventCategory.Accounts,event:p.MetaMetricsEventName.KeyExportSelected,properties:{key_type:p.MetaMetricsEventKeyType.Pkey,location:"Account Details Modal"}}),n()}},this.context.t("exportPrivateKey")))}}n.default=y,g(y,"propTypes",{selectedIdentity:r.default.object,chainId:r.default.string,showExportPrivateKeyModal:r.default.func,setAccountLabel:r.default.func,keyrings:r.default.array,rpcPrefs:r.default.object,accounts:r.default.array,history:r.default.object,hideModal:r.default.func,blockExplorerLinkText:r.default.object}),g(y,"contextTypes",{t:r.default.func,trackEvent:r.default.func})}}},{package:"$root$",file:"ui/components/app/modals/account-details-modal/account-details-modal.component.js"}],[3600,{"../../../../selectors":4436,"../../../../store/actions":4443,"./account-details-modal.component":3599,"react-redux":3130,"react-router-dom":3150,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("redux"),i=e("react-router-dom"),s=e("../../../../store/actions"),l=e("../../../../selectors"),c=(a=e("./account-details-modal.component"))&&a.__esModule?a:{default:a};var u=(0,o.compose)(i.withRouter,(0,r.connect)((e=>({chainId:(0,l.getCurrentChainId)(e),selectedIdentity:(0,l.getSelectedIdentity)(e),keyrings:e.metamask.keyrings,rpcPrefs:(0,l.getRpcPrefsForCurrentProvider)(e),accounts:(0,l.getMetaMaskAccountsOrdered)(e),blockExplorerLinkText:(0,l.getBlockExplorerLinkText)(e,!0)})),(e=>({showExportPrivateKeyModal:()=>e((0,s.showModal)({name:"EXPORT_PRIVATE_KEY"})),setAccountLabel:(t,n)=>e((0,s.setAccountLabel)(t,n)),hideModal:()=>{e((0,s.hideModal)())}}))))(c.default);n.default=u}}},{package:"$root$",file:"ui/components/app/modals/account-details-modal/account-details-modal.container.js"}],[3601,{"./account-details-modal.container":3600},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./account-details-modal.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/account-details-modal/index.js"}],[3602,{"../../../ui/identicon":3962,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=l;var a=s(e("prop-types")),r=s(e("react")),o=s(e("classnames")),i=s(e("../../../ui/identicon"));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){const{className:n,selectedIdentity:a,showBackButton:s,backButtonAction:l,hideModal:c,children:u}=e;return r.default.createElement("div",{className:(0,o.default)(n,"account-modal"),style:{borderRadius:"4px"}},r.default.createElement("div",{className:"account-modal__container"},r.default.createElement("div",null,r.default.createElement(i.default,{address:a.address,diameter:64})),s&&r.default.createElement("div",{className:"account-modal__back",onClick:l},r.default.createElement("i",{className:"fa fa-angle-left fa-lg"}),r.default.createElement("span",{className:"account-modal__back-text"},t.t("back"))),r.default.createElement("button",{className:"account-modal__close",onClick:c}),u))}l.contextTypes={t:a.default.func},l.defaultProps={showBackButton:!1,children:null,backButtonAction:undefined},l.propTypes={className:a.default.string,selectedIdentity:a.default.object.isRequired,showBackButton:a.default.bool,backButtonAction:a.default.func,hideModal:a.default.func.isRequired,children:a.default.node}}}},{package:"$root$",file:"ui/components/app/modals/account-modal-container/account-modal-container.component.js"}],[3603,{"../../../../selectors":4436,"../../../../store/actions":4443,"./account-modal-container.component":3602,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../../store/actions"),i=e("../../../../selectors"),s=(a=e("./account-modal-container.component"))&&a.__esModule?a:{default:a};var l=(0,r.connect)((function(e,t){return{selectedIdentity:t.selectedIdentity||(0,i.getSelectedIdentity)(e)}}),(function(e){return{hideModal:()=>{e((0,o.hideModal)())}}}))(s.default);n.default=l}}},{package:"$root$",file:"ui/components/app/modals/account-modal-container/account-modal-container.container.js"}],[3604,{"./account-modal-container.container":3603},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./account-modal-container.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/account-modal-container/index.js"}],[3605,{"../../modal":3595,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=l(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a},i=l(e("../../modal"));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u extends r.PureComponent{constructor(...e){super(...e),c(this,"handleDelete",(()=>{this.props.removeNetworkConfiguration(this.props.target).then((()=>{this.props.onConfirm(),this.props.hideModal()}))}))}render(){const{t:e}=this.context;return r.default.createElement(i.default,{onSubmit:this.handleDelete,onCancel:()=>this.props.hideModal(),submitText:e("delete"),cancelText:e("cancel"),submitType:"danger-primary"},r.default.createElement(i.ModalContent,{title:e("deleteNetwork"),description:e("deleteNetworkDescription")}))}}n.default=u,c(u,"propTypes",{hideModal:o.default.func.isRequired,removeNetworkConfiguration:o.default.func.isRequired,onConfirm:o.default.func.isRequired,target:o.default.string.isRequired}),c(u,"contextTypes",{t:o.default.func})}}},{package:"$root$",file:"ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js"}],[3606,{"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../store/actions":4443,"./confirm-delete-network.component":3605,"react-redux":3130,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("react-redux"),r=e("redux"),o=l(e("../../../../helpers/higher-order-components/with-modal-props")),i=e("../../../../store/actions"),s=l(e("./confirm-delete-network.component"));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,r.compose)(o.default,(0,a.connect)(null,(e=>({removeNetworkConfiguration:t=>e((0,i.removeNetworkConfiguration)(t))}))))(s.default);n.default=c}}},{package:"$root$",file:"ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js"}],[3607,{"./confirm-delete-network.container":3606},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./confirm-delete-network.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/confirm-delete-network/index.js"}],[3608,{"../../../../../shared/constants/metametrics":3408,"../../../../helpers/constants/zendesk-url":4077,"../../../../helpers/utils/util":4108,"../../../ui/identicon":3962,"../../modal":3595,"@metamask/etherscan-link":1221,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=d(e("prop-types")),o=e("@metamask/etherscan-link"),i=d(e("../../modal")),s=e("../../../../helpers/utils/util"),l=d(e("../../../ui/identicon")),c=e("../../../../../shared/constants/metametrics"),u=d(e("../../../../helpers/constants/zendesk-url"));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends a.Component{constructor(...e){super(...e),f(this,"handleRemove",(()=>{this.props.removeAccount(this.props.identity.address).then((()=>this.props.hideModal()))})),f(this,"handleCancel",(()=>{this.props.hideModal()}))}renderSelectedAccount(){const{t:e}=this.context,{identity:t,rpcPrefs:n,chainId:r}=this.props;return a.default.createElement("div",{className:"confirm-remove-account__account"},a.default.createElement("div",{className:"confirm-remove-account__account__identicon"},a.default.createElement(l.default,{address:t.address,diameter:32})),a.default.createElement("div",{className:"confirm-remove-account__account__name"},a.default.createElement("span",{className:"confirm-remove-account__account__label"},e("name")),a.default.createElement("span",{className:"account_value"},t.name)),a.default.createElement("div",{className:"confirm-remove-account__account__address"},a.default.createElement("span",{className:"confirm-remove-account__account__label"},e("publicAddress")),a.default.createElement("span",{className:"account_value"},(0,s.addressSummary)(t.address,4,4))),a.default.createElement("div",{className:"confirm-remove-account__account__link"},a.default.createElement("a",{onClick:()=>{const e=(0,o.getAccountLink)(t.address,r,n);this.context.trackEvent({category:c.MetaMetricsEventCategory.Accounts,event:"Clicked Block Explorer Link",properties:{link_type:"Account Tracker",action:"Remove Account",block_explorer_domain:(0,s.getURLHostName)(e)}}),global.platform.openTab({url:e})},target:"_blank",rel:"noopener noreferrer",title:e("etherscanView")},a.default.createElement("i",{className:"fa fa-share-square",style:{color:"var(--color-icon-muted)"},title:e("etherscanView")}))))}render(){const{t:e}=this.context;return a.default.createElement(i.default,{headerText:`${e("removeAccount")}?`,onClose:this.handleCancel,onSubmit:this.handleRemove,onCancel:this.handleCancel,submitText:e("remove"),cancelText:e("nevermind")},a.default.createElement("div",null,this.renderSelectedAccount(),a.default.createElement("div",{className:"confirm-remove-account__description"},e("removeAccountDescription"),a.default.createElement("a",{className:"confirm-remove-account__link",rel:"noopener noreferrer",target:"_blank",href:u.default.IMPORTED_ACCOUNTS},e("learnMore")))))}}n.default=m,f(m,"propTypes",{hideModal:r.default.func.isRequired,removeAccount:r.default.func.isRequired,identity:r.default.object.isRequired,chainId:r.default.string.isRequired,rpcPrefs:r.default.object.isRequired}),f(m,"contextTypes",{t:r.default.func,trackEvent:r.default.func})}}},{package:"$root$",file:"ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js"}],[3609,{"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../selectors":4436,"../../../../store/actions":4443,"./confirm-remove-account.component":3608,"react-redux":3130,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("react-redux"),r=e("redux"),o=c(e("../../../../helpers/higher-order-components/with-modal-props")),i=e("../../../../selectors"),s=e("../../../../store/actions"),l=c(e("./confirm-remove-account.component"));function c(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.compose)(o.default,(0,a.connect)((e=>({chainId:(0,i.getCurrentChainId)(e),rpcPrefs:(0,i.getRpcPrefsForCurrentProvider)(e)})),(e=>({removeAccount:t=>e((0,s.removeAccount)(t))}))))(l.default);n.default=u}}},{package:"$root$",file:"ui/components/app/modals/confirm-remove-account/confirm-remove-account.container.js"}],[3610,{"./confirm-remove-account.container":3609},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./confirm-remove-account.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/confirm-remove-account/index.js"}],[3611,{"../../modal":3595,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=l(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a},i=l(e("../../modal"));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u extends r.PureComponent{constructor(...e){super(...e),c(this,"handleReset",(()=>{this.props.resetAccount().then((()=>this.props.hideModal()))}))}render(){const{t:e}=this.context;return r.default.createElement(i.default,{onSubmit:this.handleReset,onCancel:()=>this.props.hideModal(),submitText:e("clear"),cancelText:e("nevermind"),submitType:"danger-primary"},r.default.createElement(i.ModalContent,{title:`${e("clearActivity")}?`,description:e("clearActivityDescription")}))}}n.default=u,c(u,"propTypes",{hideModal:o.default.func.isRequired,resetAccount:o.default.func.isRequired}),c(u,"contextTypes",{t:o.default.func})}}},{package:"$root$",file:"ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js"}],[3612,{"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../store/actions":4443,"./confirm-reset-account.component":3611,"react-redux":3130,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("react-redux"),r=e("redux"),o=l(e("../../../../helpers/higher-order-components/with-modal-props")),i=e("../../../../store/actions"),s=l(e("./confirm-reset-account.component"));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,r.compose)(o.default,(0,a.connect)(null,(e=>({resetAccount:()=>e((0,i.resetAccount)())}))))(s.default);n.default=c}}},{package:"$root$",file:"ui/components/app/modals/confirm-reset-account/confirm-reset-account.container.js"}],[3613,{"./confirm-reset-account.container":3612},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./confirm-reset-account.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/confirm-reset-account/index.js"}],[3614,{"../../../../../shared/constants/transaction":3417,"../../../../helpers/constants/design-system":4070,"../../../../hooks/useCopyToClipboard":4123,"../../../../hooks/useI18nContext":4129,"../../../../pages/send/send.utils":4313,"../../../../selectors":4436,"../../../component-library":3840,"../../../component-library/icon/deprecated":3836,"../../../ui/box":3900,"../../../ui/button/button.component":3903,"../../../ui/identicon":3962,"../../../ui/nft-collection-image/nft-collection-image":3988,"../../../ui/popover":3999,"../../../ui/tooltip/tooltip":4036,"../../../ui/typography":4039,"@metamask/etherscan-link":1221,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=w;var a=T(e("react")),r=T(e("prop-types")),o=e("@metamask/etherscan-link"),i=e("react-redux"),s=T(e("../../../ui/box")),l=T(e("../../../ui/button/button.component")),c=T(e("../../../ui/tooltip/tooltip")),u=e("../../../../hooks/useI18nContext"),d=T(e("../../../ui/identicon")),p=e("../../../../pages/send/send.utils"),f=T(e("../../../ui/popover")),m=T(e("../../../ui/typography")),h=e("../../../../helpers/constants/design-system"),g=e("../../../../hooks/useCopyToClipboard"),y=e("../../../../selectors"),v=e("../../../../../shared/constants/transaction"),b=T(e("../../../ui/nft-collection-image/nft-collection-image")),_=e("../../../component-library"),E=e("../../../component-library/icon/deprecated");function T(e){return e&&e.__esModule?e:{default:e}}function w({onClose:e,tokenName:t,tokenAddress:n,toAddress:r,chainId:T,rpcPrefs:w,tokenId:k,assetName:O,assetStandard:N,isContractRequestingSignature:C}){var P,M;const S=(0,u.useI18nContext)(),[x,j]=(0,g.useCopyToClipboard)(),[I,A]=(0,g.useCopyToClipboard)(),R=(0,i.useSelector)((e=>({data:(0,y.getAddressBookEntry)(e,r)}))),D=N===v.TokenStandard.ERC721||N===v.TokenStandard.ERC1155||O&&k||t&&k;return a.default.createElement(f.default,{className:"contract-details-modal"},a.default.createElement(s.default,{paddingTop:6,paddingRight:4,paddingBottom:8,paddingLeft:4,className:"contract-details-modal__content"},a.default.createElement(m.default,{fontWeight:h.FONT_WEIGHT.BOLD,variant:h.TypographyVariant.H5,display:h.DISPLAY.FLEX,boxProps:{marginTop:0,marginBottom:0}},S("contractTitle")),a.default.createElement(m.default,{variant:h.TypographyVariant.H7,display:h.DISPLAY.FLEX,color:h.TextColor.textAlternative,boxProps:{marginTop:2,marginBottom:0}},S("contractDescription")),!C&&a.default.createElement(a.default.Fragment,null,a.default.createElement(m.default,{variant:h.TypographyVariant.H6,display:h.DISPLAY.FLEX,marginTop:4,marginBottom:2},S(D?"contractNFT":"contractToken")),a.default.createElement(s.default,{display:h.DISPLAY.FLEX,borderRadius:h.Size.SM,borderStyle:h.BorderStyle.solid,borderColor:h.BorderColor.borderDefault,className:"contract-details-modal__content__contract"},D?a.default.createElement(s.default,{margin:4},a.default.createElement(b.default,{assetName:O,tokenAddress:n})):a.default.createElement(d.default,{className:"contract-details-modal__content__contract__identicon",address:n,diameter:24}),a.default.createElement(s.default,{"data-testid":"recipient"},a.default.createElement(m.default,{fontWeight:h.FONT_WEIGHT.BOLD,variant:h.TypographyVariant.H5,marginTop:4},t||(0,p.ellipsify)(n)),t&&a.default.createElement(m.default,{variant:h.TypographyVariant.H6,display:h.DISPLAY.FLEX,color:h.TextColor.textAlternative,marginTop:0,marginBottom:4},(0,p.ellipsify)(n))),a.default.createElement(s.default,{alignItems:h.AlignItems.center,marginLeft:"auto",marginRight:4,gap:2},a.default.createElement(c.default,{position:"top",title:S(x?"copiedExclamation":"copyToClipboard")},a.default.createElement(_.ButtonIcon,{display:h.DISPLAY.FLEX,iconName:x?E.ICON_NAMES.COPY_SUCCESS:E.ICON_NAMES.COPY,onClick:()=>j(n),color:h.Color.iconMuted,ariaLabel:S(x?"copiedExclamation":"copyToClipboard")})),a.default.createElement(c.default,{position:"top",title:S("openInBlockExplorer")},a.default.createElement(_.ButtonIcon,{display:h.DISPLAY.FLEX,iconName:E.ICON_NAMES.EXPORT,color:h.Color.iconMuted,onClick:()=>{const e=(0,o.getAccountLink)(n,T,{blockExplorerUrl:(null==w?void 0:w.blockExplorerUrl)??null},null);global.platform.openTab({url:e})},ariaLabel:S("openInBlockExplorer")}))))),a.default.createElement(m.default,{variant:h.TypographyVariant.H6,display:h.DISPLAY.FLEX,marginTop:4,marginBottom:2},D&&S("contractRequestingAccess"),C&&S("contractRequestingSignature"),!D&&!C&&S("contractRequestingSpendingCap")),a.default.createElement(s.default,{display:h.DISPLAY.FLEX,borderRadius:h.Size.SM,borderStyle:h.BorderStyle.solid,borderColor:h.BorderColor.borderDefault,className:"contract-details-modal__content__contract"},a.default.createElement(d.default,{className:"contract-details-modal__content__contract__identicon",diameter:24,address:r}),a.default.createElement(s.default,{"data-testid":"recipient"},a.default.createElement(m.default,{fontWeight:h.FONT_WEIGHT.BOLD,variant:h.TypographyVariant.H5,marginTop:4},(null==R||null===(P=R.data)||void 0===P?void 0:P.name)||(0,p.ellipsify)(r)),(null==R||null===(M=R.data)||void 0===M?void 0:M.name)&&a.default.createElement(m.default,{variant:h.TypographyVariant.H6,display:h.DISPLAY.FLEX,color:h.TextColor.textAlternative,marginTop:0,marginBottom:4},(0,p.ellipsify)(r))),a.default.createElement(s.default,{alignItems:h.AlignItems.center,marginLeft:"auto",marginRight:4,gap:2},a.default.createElement(c.default,{position:"top",title:S(I?"copiedExclamation":"copyToClipboard")},a.default.createElement(_.ButtonIcon,{display:h.DISPLAY.FLEX,iconName:I?E.ICON_NAMES.COPY_SUCCESS:E.ICON_NAMES.COPY,onClick:()=>A(r),color:h.Color.iconMuted,ariaLabel:S(x?"copiedExclamation":"copyToClipboard")})),a.default.createElement(c.default,{position:"top",title:S("openInBlockExplorer")},a.default.createElement(_.ButtonIcon,{display:h.DISPLAY.FLEX,iconName:E.ICON_NAMES.EXPORT,color:h.Color.iconMuted,onClick:()=>{const e=(0,o.getAccountLink)(r,T,{blockExplorerUrl:(null==w?void 0:w.blockExplorerUrl)??null},null);global.platform.openTab({url:e})},ariaLabel:S("openInBlockExplorer")}))))),a.default.createElement(s.default,{display:h.DISPLAY.FLEX,paddingTop:6,paddingRight:4,paddingBottom:6,paddingLeft:4},a.default.createElement(l.default,{type:"primary",onClick:()=>e()},S("recoveryPhraseReminderConfirm"))))}w.propTypes={onClose:r.default.func,tokenName:r.default.string,tokenAddress:r.default.string,toAddress:r.default.string,chainId:r.default.string,rpcPrefs:r.default.object,tokenId:r.default.string,assetStandard:r.default.string,assetName:r.default.string,isContractRequestingSignature:r.default.bool}}}},{package:"$root$",file:"ui/components/app/modals/contract-details-modal/contract-details-modal.js"}],[3615,{"../../../../../shared/modules/string-utils":3442,"../../../../ducks/metamask/metamask":4062,"../../../../helpers/constants/design-system":4070,"../../../../helpers/constants/routes":4074,"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../hooks/useI18nContext":4129,"../../../../store/actions":4443,"../../../ui/typography":4039,"../../modal":3595,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=g(e("react")),r=g(e("prop-types")),o=e("react-router-dom"),i=e("react-redux"),s=g(e("../../modal")),l=g(e("../../../ui/typography")),c=e("../../../../helpers/constants/design-system"),u=g(e("../../../../helpers/higher-order-components/with-modal-props")),d=e("../../../../hooks/useI18nContext"),p=e("../../../../helpers/constants/routes"),f=e("../../../../ducks/metamask/metamask"),m=e("../../../../store/actions"),h=e("../../../../../shared/modules/string-utils");function g(e){return e&&e.__esModule?e:{default:e}}const y=({hideModal:e,tokenAddress:t})=>{const n=(0,o.useHistory)(),r=(0,d.useI18nContext)(),u=(0,i.useDispatch)(),g=(0,i.useSelector)(f.getNfts).find((({address:e})=>(0,h.isEqualCaseInsensitive)(e,t)));return a.default.createElement(s.default,{onSubmit:async()=>{if(g){await u((0,m.ignoreTokens)({tokensToIgnore:t,dontShowLoadingIndicator:!0}));const{tokenId:e}=g;n.push({pathname:`${p.ASSET_ROUTE}/${t}/${e}`})}else n.push({pathname:p.ADD_NFT_ROUTE,state:{tokenAddress:t}});e()},submitText:r("yes"),onCancel:()=>e(),cancelText:r("cancel")},a.default.createElement("div",{className:"convert-token-to-nft-modal"},a.default.createElement(l.default,{variant:c.TypographyVariant.H6,boxProps:{marginTop:2}},r(g?"convertTokenToNFTExistDescription":"convertTokenToNFTDescription"))))};y.propTypes={hideModal:r.default.func.isRequired,tokenAddress:r.default.string};var v=(0,u.default)(y);n.default=v}}},{package:"$root$",file:"ui/components/app/modals/convert-token-to-nft-modal/convert-token-to-nft-modal.js"}],[3616,{"../../../../helpers/constants/design-system":4070,"../../../../helpers/constants/zendesk-url":4077,"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../hooks/useI18nContext":4129,"../../../component-library":3840,"../../../component-library/icon/deprecated":3836,"../../../ui/box":3900,"../../../ui/button":3904,"../../../ui/text-field":4025,"../../../ui/typography":4039,"../../modal":3595,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=g(e("prop-types")),o=g(e("../../modal")),i=g(e("../../../ui/text-field")),s=g(e("../../../ui/button")),l=g(e("../../../ui/typography")),c=e("../../../../helpers/constants/design-system"),u=g(e("../../../ui/box")),d=g(e("../../../../helpers/higher-order-components/with-modal-props")),p=e("../../../../hooks/useI18nContext"),f=g(e("../../../../helpers/constants/zendesk-url")),m=e("../../../component-library"),h=e("../../../component-library/icon/deprecated");function g(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}const v=({hideModal:e,customNonceValue:t,nextNonce:n,updateCustomNonce:r,getNextNonce:d})=>{const[g,y]=(0,a.useState)(""),v=(0,p.useI18nContext)();return a.default.createElement(o.default,{onSubmit:()=>{r(""===g?t:g),d(),e()},submitText:v("save"),onCancel:()=>e(),cancelText:v("cancel"),contentClass:"customize-nonce-modal-content",containerClass:"customize-nonce-modal-container"},a.default.createElement("div",{className:"customize-nonce-modal"},a.default.createElement("div",{className:"customize-nonce-modal__main-header"},a.default.createElement(l.default,{className:"customize-nonce-modal__main-title",variant:c.TypographyVariant.H4,fontWeight:c.FONT_WEIGHT.BOLD},v("editNonceField")),a.default.createElement(m.ButtonIcon,{iconName:h.ICON_NAMES.CLOSE,className:"customize-nonce-modal__close",size:h.ICON_SIZES.SM,ariaLabel:v("close"),onClick:e})),a.default.createElement(u.default,{marginTop:2,display:c.DISPLAY.INLINE_FLEX,alignItems:c.AlignItems.center},a.default.createElement(l.default,{variant:c.TypographyVariant.H6,fontWeight:c.FONT_WEIGHT.NORMAL},v("editNonceMessage"),a.default.createElement(s.default,{type:"link",className:"customize-nonce-modal__link",rel:"noopener noreferrer",target:"_blank",href:f.default.CUSTOMIZE_NONCE},v("learnMoreUpperCase")))),a.default.createElement(u.default,{marginTop:3},a.default.createElement(u.default,{alignItems:c.AlignItems.center,display:c.DISPLAY.FLEX},a.default.createElement(l.default,{variant:c.TypographyVariant.H6,fontWeight:c.FONT_WEIGHT.BOLD,boxProps:{width:c.BLOCK_SIZES.FIVE_SIXTHS}},v("editNonceField")),a.default.createElement(u.default,{width:c.BLOCK_SIZES.ONE_SIXTH},a.default.createElement(s.default,{type:"link",className:"customize-nonce-modal__reset",onClick:()=>{y(n)}},v("reset")))),a.default.createElement("div",{className:"customize-nonce-modal__input"},a.default.createElement(i.default,{type:"number",min:"0",placeholder:t||"number"==typeof n&&n.toString(),onChange:e=>{y(e.target.value)},fullWidth:!0,margin:"dense",value:g,id:"custom-nonce-id"})))))};v.propTypes={hideModal:r.default.func.isRequired,customNonceValue:r.default.string,nextNonce:r.default.number,updateCustomNonce:r.default.func,getNextNonce:r.default.func};var b=(0,d.default)(v);n.default=b}}},{package:"$root$",file:"ui/components/app/modals/customize-nonce/customize-nonce.component.js"}],[3617,{"./customize-nonce.component":3616},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./customize-nonce.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/customize-nonce/index.js"}],[3618,{"../../../../../shared/lib/transactions-controller-utils":3425,"../../../component-library":3840,"../../../component-library/icon/deprecated":3836,"../../../ui/identicon":3962,"../../../ui/text-field":4025,"../../modal":3595,"bignumber.js":1853,classnames:1980,loglevel:2944,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=m(e("prop-types")),o=m(e("loglevel")),i=m(e("classnames")),s=m(e("bignumber.js")),l=m(e("../../modal")),c=m(e("../../../ui/identicon")),u=m(e("../../../ui/text-field")),d=e("../../../../../shared/lib/transactions-controller-utils"),p=e("../../../component-library"),f=e("../../../component-library/icon/deprecated");function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=new s.default(2).pow(256).minus(1).toString(10);class v extends a.PureComponent{constructor(...e){super(...e),g(this,"state",{customSpendLimit:this.props.customTokenAmount||"",selectedOptionIsUnlimited:!this.props.customTokenAmount})}renderModalContent(e){const{t:t}=this.context,{hideModal:n,selectedIdentity:r,tokenAmount:o,tokenSymbol:l,tokenBalance:m,customTokenAmount:h,origin:g}=this.props,{name:v,address:b}=r||{},{selectedOptionIsUnlimited:_}=this.state;return a.default.createElement("div",{className:"edit-approval-permission"},a.default.createElement("div",{className:"edit-approval-permission__header"},a.default.createElement("div",{className:"edit-approval-permission__title"},t("editPermission")),a.default.createElement(p.ButtonIcon,{iconName:f.ICON_NAMES.CLOSE,size:f.ICON_SIZES.LG,className:"edit-approval-permission__header__close",onClick:n})),a.default.createElement("div",{className:"edit-approval-permission__account-info"},a.default.createElement("div",{className:"edit-approval-permission__account-info__account"},a.default.createElement(c.default,{address:b,diameter:32}),a.default.createElement("div",{className:"edit-approval-permission__name-and-balance-container"},a.default.createElement("div",{className:"edit-approval-permission__account-info__name"},v),a.default.createElement("div",null,t("balance")))),a.default.createElement("div",{className:"edit-approval-permission__account-info__balance"},`${(0,d.toPrecisionWithoutTrailingZeros)(m,9)} ${l}`)),a.default.createElement("div",{className:"edit-approval-permission__edit-section"},a.default.createElement("div",{className:"edit-approval-permission__edit-section__title"},t("spendLimitPermission")),a.default.createElement("div",{className:"edit-approval-permission__edit-section__description"},t("allowWithdrawAndSpend",[g])),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option"},a.default.createElement("div",{className:"edit-approval-permission__edit-section__radio-button",onClick:()=>this.setState({selectedOptionIsUnlimited:!0})},a.default.createElement("div",{className:(0,i.default)({"edit-approval-permission__edit-section__radio-button-outline":!_,"edit-approval-permission__edit-section__radio-button-outline--selected":_})}),a.default.createElement("div",{className:"edit-approval-permission__edit-section__radio-button-fill"}),_&&a.default.createElement("div",{className:"edit-approval-permission__edit-section__radio-button-dot"})),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option-text"},a.default.createElement("div",{className:(0,i.default)({"edit-approval-permission__edit-section__option-label":!_,"edit-approval-permission__edit-section__option-label--selected":_})},new s.default(o).equals(new s.default(y))?t("unlimited"):t("proposedApprovalLimit")),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option-description"},t("spendLimitRequestedBy",[g])),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option-value"},`${Number(o)} ${l}`))),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option"},a.default.createElement("div",{className:"edit-approval-permission__edit-section__radio-button",onClick:()=>this.setState({selectedOptionIsUnlimited:!1})},a.default.createElement("div",{className:(0,i.default)({"edit-approval-permission__edit-section__radio-button-outline":_,"edit-approval-permission__edit-section__radio-button-outline--selected":!_})}),a.default.createElement("div",{className:"edit-approval-permission__edit-section__radio-button-fill"}),!_&&a.default.createElement("div",{className:"edit-approval-permission__edit-section__radio-button-dot"})),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option-text"},a.default.createElement("div",{className:(0,i.default)({"edit-approval-permission__edit-section__option-label":_,"edit-approval-permission__edit-section__option-label--selected":!_})},t("customSpendLimit")),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option-description"},t("enterMaxSpendLimit")),a.default.createElement("div",{className:"edit-approval-permission__edit-section__option-input"},a.default.createElement(u.default,{type:"number",placeholder:`${Number(h||o)} ${l}`,onChange:e=>{this.setState({customSpendLimit:e.target.value}),_&&this.setState({selectedOptionIsUnlimited:!1})},fullWidth:!0,margin:"dense",value:this.state.customSpendLimit,error:e}))))))}validateSpendLimit(){const{t:e}=this.context,{decimals:t,requiredMinimum:n}=this.props,{selectedOptionIsUnlimited:a,customSpendLimit:r}=this.state;if(a||!r)return undefined;let i;try{i=new s.default(r)}catch(t){return o.default.debug(`Error converting '${r}' to BigNumber:`,t),e("spendLimitInvalid")}if(i.isNegative())return e("spendLimitInvalid");const l=(0,d.calcTokenAmount)(y,t);return i.greaterThan(l)?e("spendLimitTooLarge"):n!==undefined&&i.lessThan(n)?e("spendLimitInsufficient"):undefined}render(){const{t:e}=this.context,{setCustomAmount:t,hideModal:n,customTokenAmount:r}=this.props,{selectedOptionIsUnlimited:o,customSpendLimit:i}=this.state,s=this.validateSpendLimit(),c=Boolean(i===r&&!o||s);return a.default.createElement(l.default,{onSubmit:()=>{t(o?"":i),n()},submitText:e("save"),contentClass:"edit-approval-permission-modal-content",containerClass:"edit-approval-permission-modal-container",submitDisabled:c},this.renderModalContent(s))}}n.default=v,g(v,"propTypes",{decimals:r.default.number,hideModal:r.default.func.isRequired,selectedIdentity:r.default.object,tokenAmount:r.default.string,customTokenAmount:r.default.string,tokenSymbol:r.default.string,tokenBalance:r.default.string,setCustomAmount:r.default.func,origin:r.default.string.isRequired,requiredMinimum:r.default.instanceOf(s.default)}),g(v,"contextTypes",{t:r.default.func})}}},{package:"$root$",file:"ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js"}],[3619,{"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../selectors":4436,"./edit-approval-permission.component":3618,"react-redux":3130,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("react-redux"),r=e("redux"),o=l(e("../../../../helpers/higher-order-components/with-modal-props")),i=e("../../../../selectors"),s=l(e("./edit-approval-permission.component"));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,r.compose)(o.default,(0,a.connect)((e=>{const t=e.appState.modal.modalState.props||{};return{selectedIdentity:(0,i.getSelectedIdentity)(e),...t}})))(s.default);n.default=c}}},{package:"$root$",file:"ui/components/app/modals/edit-approval-permission/edit-approval-permission.container.js"}],[3620,{"./edit-approval-permission.container":3619},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./edit-approval-permission.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/edit-approval-permission/index.js"}],[3621,{"../../../../../shared/constants/metametrics":3408,"../../../../../shared/modules/hexstring-utils":3435,"../../../ui/button":3904,"../account-modal-container":3604,"copy-to-clipboard":2032,loglevel:2944,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=p(e("loglevel")),r=p(e("prop-types")),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),i=p(e("copy-to-clipboard")),s=p(e("../../../ui/button")),l=p(e("../account-modal-container")),c=e("../../../../../shared/modules/hexstring-utils"),u=e("../../../../../shared/constants/metametrics");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends o.Component{constructor(...e){super(...e),f(this,"state",{password:"",privateKey:null,showWarning:!0}),f(this,"exportAccountAndGetPrivateKey",((e,t)=>{const{exportAccount:n}=this.props;n(e,t).then((e=>{this.context.trackEvent({category:u.MetaMetricsEventCategory.Keys,event:u.MetaMetricsEventName.KeyExportRevealed,properties:{key_type:u.MetaMetricsEventKeyType.Pkey}}),this.setState({privateKey:e,showWarning:!1})})).catch((e=>{this.context.trackEvent({category:u.MetaMetricsEventCategory.Keys,event:u.MetaMetricsEventName.KeyExportFailed,properties:{key_type:u.MetaMetricsEventKeyType.Pkey,reason:"incorrect_password"}}),a.default.error(e)}))}))}componentWillUnmount(){this.props.clearAccountDetails(),this.props.hideWarning()}renderPasswordLabel(e){return o.default.createElement("span",{className:"export-private-key-modal__password-label"},e?this.context.t("copyPrivateKey"):this.context.t("typePassword"))}renderPasswordInput(e){const t=e&&(0,c.stripHexPrefix)(e);return e?o.default.createElement("div",{className:"export-private-key-modal__private-key-display",onClick:()=>{(0,i.default)(t),this.context.trackEvent({category:u.MetaMetricsEventCategory.Keys,event:u.MetaMetricsEventName.KeyExportCopied,properties:{key_type:u.MetaMetricsEventKeyType.Pkey,copy_method:"clipboard"}})}},t):o.default.createElement("input",{type:"password",className:"export-private-key-modal__password-input",onChange:e=>this.setState({password:e.target.value})})}renderButtons(e,t,n){return o.default.createElement("div",{className:"export-private-key-modal__buttons"},!e&&o.default.createElement(s.default,{type:"secondary",large:!0,className:"export-private-key-modal__button export-private-key-modal__button--cancel",onClick:()=>{this.context.trackEvent({category:u.MetaMetricsEventCategory.Keys,event:u.MetaMetricsEventName.KeyExportCanceled,properties:{key_type:u.MetaMetricsEventKeyType.Pkey}}),n()}},this.context.t("cancel")),e?o.default.createElement(s.default,{onClick:()=>{n()},type:"primary",large:!0,className:"export-private-key-modal__button"},this.context.t("done")):o.default.createElement(s.default,{onClick:()=>{this.context.trackEvent({category:u.MetaMetricsEventCategory.Keys,event:u.MetaMetricsEventName.KeyExportRequested,properties:{key_type:u.MetaMetricsEventKeyType.Pkey}}),this.exportAccountAndGetPrivateKey(this.state.password,t)},type:"primary",large:!0,className:"export-private-key-modal__button",disabled:!this.state.password},this.context.t("confirm")))}render(){const{selectedIdentity:e,warning:t,showAccountDetailModal:n,hideModal:a,previousModalState:r}=this.props,{name:i,address:s}=e,{privateKey:u,showWarning:d}=this.state;return o.default.createElement(l.default,{className:"export-private-key-modal",selectedIdentity:e,showBackButton:"ACCOUNT_DETAILS"===r,backButtonAction:()=>n()},o.default.createElement("span",{className:"export-private-key-modal__account-name"},i),o.default.createElement("div",{className:"ellip-address-wrapper"},(0,c.toChecksumHexAddress)(s)),o.default.createElement("div",{className:"export-private-key-modal__divider"}),o.default.createElement("span",{className:"export-private-key-modal__body-title"},this.context.t("showPrivateKeys")),o.default.createElement("div",{className:"export-private-key-modal__password"},this.renderPasswordLabel(u),this.renderPasswordInput(u),d&&t?o.default.createElement("span",{className:"export-private-key-modal__password--error"},t):null),o.default.createElement("div",{className:"export-private-key-modal__password--warning"},this.context.t("privateKeyWarning")),this.renderButtons(u,s,a))}}n.default=m,f(m,"contextTypes",{t:r.default.func,trackEvent:r.default.func}),f(m,"defaultProps",{warning:null,previousModalState:null}),f(m,"propTypes",{exportAccount:r.default.func.isRequired,selectedIdentity:r.default.object.isRequired,warning:r.default.node,showAccountDetailModal:r.default.func.isRequired,hideModal:r.default.func.isRequired,hideWarning:r.default.func.isRequired,clearAccountDetails:r.default.func.isRequired,previousModalState:r.default.string})}}},{package:"$root$",file:"ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js"}],[3622,{"../../../../selectors":4436,"../../../../store/actions":4443,"./export-private-key-modal.component":3621,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../../store/actions"),i=e("../../../../selectors"),s=(a=e("./export-private-key-modal.component"))&&a.__esModule?a:{default:a};var l=(0,r.connect)((function(){let e=null;return function(t){return e=e||(0,i.getSelectedIdentity)(t),{warning:t.appState.warning,privateKey:t.appState.accountDetail.privateKey,selectedIdentity:e,previousModalState:t.appState.modal.previousModalState.name}}}),(function(e){return{exportAccount:(t,n)=>e((0,o.exportAccount)(t,n)).then((t=>(e((0,o.hideWarning)()),t))),showAccountDetailModal:()=>e((0,o.showModal)({name:"ACCOUNT_DETAILS"})),hideModal:()=>e((0,o.hideModal)()),hideWarning:()=>e((0,o.hideWarning)()),clearAccountDetails:()=>e((0,o.clearAccountDetails)())}}))(s.default);n.default=l}}},{package:"$root$",file:"ui/components/app/modals/export-private-key-modal/export-private-key-modal.container.js"}],[3623,{"./export-private-key-modal.container":3622},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./export-private-key-modal.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/export-private-key-modal/index.js"}],[3624,{"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a};function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let l,c=0;const u=e=>{const t=`anim_${++c}${Number(new Date)}`;let n=`@keyframes ${t} {`;return Object.keys(e).forEach((t=>{n+=`${t} {`,Object.keys(e[t]).forEach((a=>{const r=`:${e[t][a]};`;n+=a+r})),n+="}"})),n+="}",(e=>{l||(l=document.createElement("style"),document.getElementsByTagName("head")[0].appendChild(l),l=l.sheet||l.styleSheet),l.insertRule(e,(l.cssRules||l.rules).length)})(n),t},d={show:{animationDuration:"0.3s",animationTimingFunction:"ease-out"},hide:{animationDuration:"0.3s",animationTimingFunction:"ease-out"},showContentAnimation:u({"0%":{opacity:0},"100%":{opacity:1}}),hideContentAnimation:u({"0%":{opacity:1},"100%":{opacity:0}}),showBackdropAnimation:u({"0%":{opacity:0},"100%":{opacity:.9}}),hideBackdropAnimation:u({"0%":{opacity:.9},"100%":{opacity:0}})},p=["transitionend","animationend"];class f extends r.Component{constructor(...e){super(...e),s(this,"content",null),s(this,"state",{willHide:!0,hidden:!0}),s(this,"addTransitionListener",((e,t)=>{if(e){const n=function(a){a&&a.target!==e||(((e,t)=>{0!==p.length&&p.forEach((function(n){!function(e,t,n){e.removeEventListener(t,n,!1)}(e,n,t)}))})(e,n),t())};((e,t)=>{0!==p.length?p.forEach((function(n){!function(e,t,n){e.addEventListener(t,n,!1)}(e,n,t)})):window.setTimeout(t,0)})(e,n)}})),s(this,"handleBackdropClick",(()=>{this.props.closeOnClick&&this.hide()})),s(this,"hasHidden",(()=>this.state.hidden)),s(this,"leave",(()=>{this.setState({hidden:!0}),this.props.onHide(this.state.hideSource)})),s(this,"enter",(()=>{this.props.onShow()})),s(this,"show",(()=>{this.state.hidden&&(this.setState({willHide:!1,hidden:!1}),setTimeout(function(){this.addTransitionListener(this.content,this.enter)}.bind(this),0))})),s(this,"hide",(()=>{this.hasHidden()||this.setState({willHide:!0})})),s(this,"listenKeyboard",(e=>{"function"==typeof this.props.keyboard?this.props.keyboard(e):this.closeOnEsc(e)})),s(this,"closeOnEsc",(e=>{!this.props.keyboard||"Escape"!==e.key&&27!==e.keyCode||this.hide()})),s(this,"UNSAFE_componentDidMount",(()=>{window.addEventListener("keydown",this.listenKeyboard,!0)})),s(this,"UNSAFE_componentWillUnmount",(()=>{window.removeEventListener("keydown",this.listenKeyboard,!0)}))}render(){if(this.state.hidden)return null;const{willHide:e}=this.state,{modalStyle:t}=this.props,n={animationName:e?d.hideBackdropAnimation:d.showBackdropAnimation,animationTimingFunction:(e?d.hide:d.show).animationTimingFunction,...this.props.backdropStyle},a={animationDuration:(e?d.hide:d.show).animationDuration,animationName:e?d.hideContentAnimation:d.showContentAnimation,animationTimingFunction:(e?d.hide:d.show).animationTimingFunction,...this.props.contentStyle},o=this.props.backdrop?r.default.createElement("div",{className:"modal__backdrop",style:n,onClick:this.props.closeOnClick?this.handleBackdropClick:null}):undefined;return e&&this.addTransitionListener(this.content,this.leave),r.default.createElement("span",null,r.default.createElement("div",{className:"modal",style:t},r.default.createElement("div",{className:"modal__content",ref:e=>this.content=e,tabIndex:"-1",style:a},this.props.children)),o)}}s(f,"propTypes",{backdrop:o.default.bool,backdropStyle:o.default.object,closeOnClick:o.default.bool,contentStyle:o.default.object,keyboard:o.default.bool,modalStyle:o.default.object,onShow:o.default.func,onHide:o.default.func,children:o.default.node}),s(f,"defaultProps",{onShow:()=>undefined,onHide:()=>undefined,keyboard:!0,backdrop:!0,closeOnClick:!0,modalStyle:{},backdropStyle:{},contentStyle:{},children:[]});var m=f;n.default=m}}},{package:"$root$",file:"ui/components/app/modals/fade-modal.js"}],[3625,{"../../../../helpers/constants/routes":4074,"../../../../store/actions":4443,"../../../ui/button":3904,"../../../ui/identicon":3962,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=p(e("prop-types")),r=d(e("react")),o=e("react-redux"),i=d(e("../../../../store/actions")),s=p(e("../../../ui/identicon")),l=p(e("../../../ui/button")),c=e("../../../../helpers/constants/routes");function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}function p(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends r.Component{constructor(...e){super(...e),f(this,"state",{})}render(){const{token:e,hideToken:t,hideModal:n,history:a}=this.props,{symbol:o,address:i,image:u}=e;return r.default.createElement("div",{className:"hide-token-confirmation"},r.default.createElement("div",{className:"hide-token-confirmation__container"},r.default.createElement("div",{className:"hide-token-confirmation__title"},this.context.t("hideTokenPrompt")),r.default.createElement(s.default,{className:"hide-token-confirmation__identicon",diameter:45,address:i,image:u}),r.default.createElement("div",{className:"hide-token-confirmation__symbol"},o),r.default.createElement("div",{className:"hide-token-confirmation__copy"},this.context.t("readdToken")),r.default.createElement("div",{className:"hide-token-confirmation__buttons"},r.default.createElement(l.default,{type:"secondary",className:"hide-token-confirmation__button","data-testid":"hide-token-confirmation__cancel",onClick:()=>n()},this.context.t("cancel")),r.default.createElement(l.default,{type:"primary",className:"hide-token-confirmation__button","data-testid":"hide-token-confirmation__hide",onClick:()=>{t(i),a.push(c.DEFAULT_ROUTE)}},this.context.t("hide")))))}}f(m,"contextTypes",{t:a.default.func}),f(m,"propTypes",{hideToken:a.default.func.isRequired,hideModal:a.default.func.isRequired,token:a.default.shape({symbol:a.default.string,address:a.default.string,image:a.default.string}),history:a.default.object});var h=(0,o.connect)((function(e){return{token:e.appState.modal.modalState.props.token,history:e.appState.modal.modalState.props.history}}),(function(e){return{hideModal:()=>e(i.hideModal()),hideToken:t=>{e(i.ignoreTokens({tokensToIgnore:t})).then((()=>{e(i.hideModal())}))}}}))(m);n.default=h}}},{package:"$root$",file:"ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js"}],[3626,{"./hide-token-confirmation-modal":3625},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./hide-token-confirmation-modal"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/hide-token-confirmation-modal/index.js"}],[3627,{"../../../../helpers/constants/design-system":4070,"../../../../helpers/constants/zendesk-url":4077,"../../../../helpers/higher-order-components/with-modal-props":4085,"../../../../hooks/useI18nContext":4129,"../../../component-library":3840,"../../../component-library/icon/deprecated":3836,"../../../ui/box":3900,"../../hold-to-reveal-button":3575,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=f(e("prop-types")),r=f(e("react")),o=f(e("../../../../helpers/higher-order-components/with-modal-props")),i=f(e("../../../ui/box")),s=e("../../../component-library"),l=e("../../../component-library/icon/deprecated"),c=e("../../../../helpers/constants/design-system"),u=f(e("../../hold-to-reveal-button")),d=e("../../../../hooks/useI18nContext"),p=f(e("../../../../helpers/constants/zendesk-url"));function f(e){return e&&e.__esModule?e:{default:e}}const m=({onLongPressed:e,hideModal:t})=>{const n=(0,d.useI18nContext)();return r.default.createElement(i.default,{className:"hold-to-reveal-modal",display:c.DISPLAY.FLEX,flexDirection:c.FLEX_DIRECTION.COLUMN,justifyContent:c.JustifyContent.flexStart,padding:6},r.default.createElement(i.default,{display:c.DISPLAY.FLEX,flexDirection:c.FLEX_DIRECTION.ROW,alignItems:c.AlignItems.center,justifyContent:c.JustifyContent.spaceBetween,marginBottom:6},r.default.createElement(s.Text,{variant:c.TextVariant.headingSm},n("holdToRevealTitle")),r.default.createElement(s.ButtonIcon,{className:"hold-to-reveal-modal__close",iconName:l.ICON_NAMES.CLOSE,size:c.Size.SM,onClick:()=>{t()},ariaLabel:n("close")})),r.default.createElement(i.default,{display:c.DISPLAY.FLEX,flexDirection:c.FLEX_DIRECTION.COLUMN,gap:4,marginBottom:6},r.default.createElement(s.Text,{variant:c.TextVariant.bodyMd},n("holdToRevealContent1",[r.default.createElement(s.Text,{key:"hold-to-reveal-2",variant:c.TextVariant.bodyMdBold,as:"span"},n("holdToRevealContent2"))])),r.default.createElement(s.Text,{variant:c.TextVariant.bodyMdBold},n("holdToRevealContent3",[r.default.createElement(s.Text,{key:"hold-to-reveal-4",variant:c.TextVariant.bodyMd,as:"span",display:c.DISPLAY.INLINE},n("holdToRevealContent4")),r.default.createElement(s.Button,{key:"hold-to-reveal-5",type:s.BUTTON_TYPES.LINK,size:c.Size.auto,href:p.default.NON_CUSTODIAL_WALLET,target:"_blank",rel:"noopener noreferrer"},n("holdToRevealContent5"))]))),r.default.createElement(u.default,{buttonText:n("holdToReveal"),onLongPressed:()=>{e(),t()},marginLeft:"auto",marginRight:"auto"}))};m.propTypes={onLongPressed:a.default.func.isRequired,hideModal:a.default.func};var h=(0,o.default)(m);n.default=h}}},{package:"$root$",file:"ui/components/app/modals/hold-to-reveal-modal/hold-to-reveal-modal.js"}],[3628,{"./hold-to-reveal-modal":3627},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./hold-to-reveal-modal"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/hold-to-reveal-modal/index.js"}],[3629,{"./modal":3630},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Modal",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./modal"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/index.js"}],[3630,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../helpers/utils/is-mobile-view":4098,"../../../pages/onboarding-flow/add-network-modal":4247,"../../../store/actions":4443,"./account-details-modal":3601,"./confirm-delete-network":3607,"./confirm-remove-account":3610,"./confirm-reset-account":3613,"./convert-token-to-nft-modal/convert-token-to-nft-modal":3615,"./customize-nonce":3617,"./edit-approval-permission":3620,"./export-private-key-modal":3623,"./fade-modal":3624,"./hide-token-confirmation-modal":3626,"./hold-to-reveal-modal":3628,"./new-account-modal":3631,"./qr-scanner":3636,"./reject-transactions":3639,"./transaction-confirmed":3642,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=P(e("prop-types")),r=C(e("react")),o=e("react-redux"),i=C(e("../../../store/actions")),s=P(e("../../../helpers/utils/is-mobile-view")),l=e("../../../../app/scripts/lib/util"),c=e("../../../../shared/constants/app"),u=P(e("../../../pages/onboarding-flow/add-network-modal")),d=P(e("./account-details-modal")),p=P(e("./export-private-key-modal")),f=P(e("./hide-token-confirmation-modal")),m=P(e("./qr-scanner")),h=P(e("./hold-to-reveal-modal")),g=P(e("./confirm-remove-account")),y=P(e("./confirm-reset-account")),v=P(e("./transaction-confirmed")),b=P(e("./fade-modal")),_=P(e("./reject-transactions")),E=P(e("./confirm-delete-network")),T=P(e("./edit-approval-permission")),w=P(e("./new-account-modal")),k=P(e("./customize-nonce")),O=P(e("./convert-token-to-nft-modal/convert-token-to-nft-modal"));function N(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(N=function(e){return e?n:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=N(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}function P(e){return e&&e.__esModule?e:{default:e}}const M={transform:"translate3d(-50%, 0, 0px)",border:"1px solid var(--color-border-default)",borderRadius:"8px",backgroundColor:"var(--color-background-default)",boxShadow:"var(--shadow-size-sm) var(--color-shadow-default)"},S={...M,width:"344px",top:"15%"},x={...M,width:"309px",top:"12.5%"},j={mobileModalStyle:{width:"95%",boxShadow:"var(--shadow-size-xs) var(--color-shadow-default)",borderRadius:"4px",top:"10%",transform:"none",left:"0",right:"0",margin:"0 auto"},laptopModalStyle:{width:"335px",boxShadow:"var(--shadow-size-xs) var(--color-shadow-default)",borderRadius:"4px",top:"10%",transform:"none",left:"0",right:"0",margin:"0 auto"},contentStyle:{borderRadius:"4px"}},I={ONBOARDING_ADD_NETWORK:{contents:r.default.createElement(u.default,null),...j},NEW_ACCOUNT:{contents:r.default.createElement(w.default,null),mobileModalStyle:{width:"95%",top:"10%",boxShadow:"var(--shadow-size-xs) var(--color-shadow-default)",transform:"none",left:"0",right:"0",margin:"0 auto",borderRadius:"10px"},laptopModalStyle:{width:"375px",top:"10%",boxShadow:"var(--shadow-size-xs) var(--color-shadow-default)",transform:"none",left:"0",right:"0",margin:"0 auto",borderRadius:"10px"},contentStyle:{borderRadius:"10px"}},ACCOUNT_DETAILS:{contents:r.default.createElement(d.default,null),...j},EXPORT_PRIVATE_KEY:{contents:r.default.createElement(p.default,null),...j},HOLD_TO_REVEAL_SRP:{contents:r.default.createElement(h.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},HIDE_TOKEN_CONFIRMATION:{contents:r.default.createElement(f.default,null),mobileModalStyle:{width:"95%",top:(0,l.getEnvironmentType)()===c.ENVIRONMENT_TYPE_POPUP?"52vh":"36.5vh"},laptopModalStyle:{width:(0,l.getEnvironmentType)()===c.ENVIRONMENT_TYPE_POPUP?"357px":"449px",top:"calc(33% + 45px)",paddingLeft:(0,l.getEnvironmentType)()===c.ENVIRONMENT_TYPE_POPUP?"16px":null,paddingRight:(0,l.getEnvironmentType)()===c.ENVIRONMENT_TYPE_POPUP?"16px":null}},CONFIRM_RESET_ACCOUNT:{contents:r.default.createElement(y.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},CONFIRM_REMOVE_ACCOUNT:{contents:r.default.createElement(g.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},CONVERT_TOKEN_TO_NFT:{contents:r.default.createElement(O.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},CONFIRM_DELETE_NETWORK:{contents:r.default.createElement(E.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},EDIT_APPROVAL_PERMISSION:{contents:r.default.createElement(T.default,null),mobileModalStyle:{width:"95vw",height:"100vh",top:"50px",transform:"none",left:"0",right:"0",margin:"0 auto"},laptopModalStyle:{width:"auto",height:"0px",top:"80px",left:"0px",transform:"none",margin:"0 auto",position:"relative"},contentStyle:{borderRadius:"8px"}},TRANSACTION_CONFIRMED:{disableBackdropClick:!0,contents:r.default.createElement(v.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},QR_SCANNER:{contents:r.default.createElement(m.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},REJECT_TRANSACTIONS:{contents:r.default.createElement(_.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},CUSTOMIZE_NONCE:{contents:r.default.createElement(k.default,null),mobileModalStyle:{...x},laptopModalStyle:{...S},contentStyle:{borderRadius:"8px"}},DEFAULT:{contents:[],mobileModalStyle:{},laptopModalStyle:{}}},A={backgroundColor:"var(--color-overlay-default)"};class R extends r.Component{hide(){this.modalRef.hide()}show(){this.modalRef.show()}UNSAFE_componentWillReceiveProps(e,t){e.active?this.show():this.props.active&&this.hide()}render(){const e=I[this.props.modalState.name||"DEFAULT"],{contents:t,disableBackdropClick:n=!1}=e,a=e[(0,s.default)()?"mobileModalStyle":"laptopModalStyle"],o=e.contentStyle||{};return r.default.createElement(b.default,{keyboard:!1,onHide:()=>{e.onHide&&e.onHide({hideWarning:this.props.hideWarning}),this.props.hideModal(e.customOnHideOpts)},ref:e=>{this.modalRef=e},modalStyle:a,contentStyle:o,backdropStyle:A,closeOnClick:!n},t)}}var D,L,$;D=R,L="propTypes",$={active:a.default.bool.isRequired,hideModal:a.default.func.isRequired,hideWarning:a.default.func.isRequired,modalState:a.default.object.isRequired},(L=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(L))in D?Object.defineProperty(D,L,{value:$,enumerable:!0,configurable:!0,writable:!0}):D[L]=$;var W=(0,o.connect)((function(e){return{active:e.appState.modal.open,modalState:e.appState.modal.modalState}}),(function(e){return{hideModal:t=>{e(i.hideModal()),t&&t.action&&e(t.action(...t.args))},hideWarning:()=>{e(i.hideWarning())}}}))(R);n.default=W}}},{package:"$root$",file:"ui/components/app/modals/modal.js"}],[3631,{"./new-account-modal.container":3633},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./new-account-modal.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/new-account-modal/index.js"}],[3632,{"../../../component-library":3840,"../../../component-library/icon/deprecated":3836,"../../../ui/button/button.component":3903,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=l(e("prop-types")),o=l(e("../../../ui/button/button.component")),i=e("../../../component-library"),s=e("../../../component-library/icon/deprecated");function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends a.Component{constructor(...e){super(...e),u(this,"state",{alias:this.context.t("newAccountNumberName",[this.props.newAccountNumber])}),u(this,"onChange",(e=>{this.setState({alias:e.target.value})})),u(this,"onSubmit",(()=>{this.props.onSave(this.state.alias).then(this.props.hideModal)})),u(this,"onKeyPress",(e=>{"Enter"===e.key&&this.state.alias&&this.onSubmit()}))}render(){const{t:e}=this.context;return a.default.createElement("div",{className:"new-account-modal"},a.default.createElement("div",{className:"new-account-modal__content"},a.default.createElement("div",{className:"new-account-modal__content__header"},e("newAccount"),a.default.createElement(i.ButtonIcon,{className:"new-account-modal__content__header-close",ariaLabel:e("close"),onClick:this.props.hideModal,iconName:s.ICON_NAMES.CLOSE})),a.default.createElement("div",{className:"new-account-modal__input-label"},e("accountName")),a.default.createElement("input",{type:"text",className:"new-account-modal__input",onChange:this.onChange,onKeyPress:this.onKeyPress,value:this.state.alias,autoFocus:!0})),a.default.createElement("div",{className:"new-account-modal__footer"},a.default.createElement(o.default,{type:"secondary",onClick:this.props.hideModal},e("cancel")),a.default.createElement(o.default,{type:"primary",onClick:this.onSubmit,disabled:!this.state.alias},e("save"))))}}n.default=d,u(d,"contextTypes",{t:r.default.func}),u(d,"propTypes",{hideModal:r.default.func.isRequired,newAccountNumber:r.default.number.isRequired,onSave:r.default.func.isRequired})}}},{package:"$root$",file:"ui/components/app/modals/new-account-modal/new-account-modal.component.js"}],[3633,{"../../../../store/actions":4443,"./new-account-modal.component":3632,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("../../../../store/actions")),i=(a=e("./new-account-modal.component"))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var l=(0,r.connect)((function(e){return{...e.appState.modal.modalState.props||{}}}),(function(e){return{hideModal:()=>e(o.hideModal()),createAccount:t=>e(o.addNewAccount()).then((n=>(t&&e(o.setAccountLabel(n,t)),n)))}}),(function(e,t){const{onCreateNewAccount:n}=e,{createAccount:a}=t;return{...e,...t,onSave:e=>a(e).then((e=>n(e)))}}))(i.default);n.default=l}}},{package:"$root$",file:"ui/components/app/modals/new-account-modal/new-account-modal.container.js"}],[3634,{"./nickname-popovers.component":3635},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./nickname-popovers.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/nickname-popovers/index.js"}],[3635,{"../../../../selectors":4436,"../../../../store/actions":4443,"../../../ui/nickname-popover":3989,"../../../ui/update-nickname-popover/update-nickname-popover":4043,"@metamask/etherscan-link":1221,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=d(e("prop-types")),i=e("@metamask/etherscan-link"),s=e("../../../../store/actions"),l=e("../../../../selectors"),c=d(e("../../../ui/nickname-popover")),u=d(e("../../../ui/update-nickname-popover/update-nickname-popover"));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const f="SHOW_NICKNAME_POPOVER",m="ADD_NICKNAME_POPOVER",h=({address:e,onClose:t})=>{const n=(0,r.useDispatch)(),[o,d]=(0,a.useState)(f),p=(0,r.useSelector)(l.getAddressBook),h=(0,r.useSelector)(l.getCurrentChainId),g=p.find((t=>t.address===e)),y=null==g?void 0:g.name,v=(0,r.useSelector)(l.getRpcPrefsForCurrentProvider),b=(0,i.getAccountLink)(e,h,{blockExplorerUrl:(null==v?void 0:v.blockExplorerUrl)??null},null);return o===m?a.default.createElement(u.default,{address:e,nickname:y||null,memo:(null==g?void 0:g.memo)||null,onClose:()=>d(f),onAdd:(e,t,a)=>n((0,s.addToAddressBook)(e,t,a))}):a.default.createElement(c.default,{address:e,nickname:y||null,onClose:t,onAdd:()=>d(m),explorerLink:b})};h.propTypes={address:o.default.string,onClose:o.default.func};var g=h;n.default=g}}},{package:"$root$",file:"ui/components/app/modals/nickname-popovers/nickname-popovers.component.js"}],[3636,{"./qr-scanner.container":3638},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var a;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=((a=e("./qr-scanner.container"))&&a.__esModule?a:{default:a}).default;n.default=r}}},{package:"$root$",file:"ui/components/app/modals/qr-scanner/index.js"}],[3637,{"../../../../../app/scripts/lib/util":82,"../../../../../shared/constants/app":3401,"../../../../../shared/constants/time":3415,"../../../../helpers/utils/util":4108,"../../../../helpers/utils/webcam-utils":4109,"../../../ui/page-container/page-container-footer/page-container-footer.component":3995,"../../../ui/spinner":4017,"@zxing/library":1668,loglevel:2944,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=m(e("prop-types")),o=m(e("loglevel")),i=e("@zxing/library"),s=e("../../../../../app/scripts/lib/util"),l=e("../../../../../shared/constants/app"),c=e("../../../../../shared/constants/time"),u=m(e("../../../ui/spinner")),d=m(e("../../../../helpers/utils/webcam-utils")),p=e("../../../../helpers/utils/util"),f=m(e("../../../ui/page-container/page-container-footer/page-container-footer.component"));function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y="ACCESSING_CAMERA",v="NEED_TO_ALLOW_ACCESS",b="READY";class _ extends a.Component{constructor(e){super(e),g(this,"checkEnvironment",(async()=>{try{const{environmentReady:e}=await d.default.checkStatus();if(!e&&(0,s.getEnvironmentType)()!==l.ENVIRONMENT_TYPE_FULLSCREEN){const e=(0,p.getURL)(window.location.href),t=null==e?void 0:e.hash,n=t?t.substring(1):null;global.platform.openExtensionInBrowser(n)}}catch(e){this.mounted&&this.setState({error:e})}this.initCamera()})),g(this,"checkPermissions",(async()=>{try{const{permissions:e}=await d.default.checkStatus();if(e){if(await new Promise((e=>setTimeout(e,2*c.SECOND))),!this.mounted)return;this.setState({ready:b})}else this.mounted&&(this.permissionChecker=setTimeout(this.checkPermissions,c.SECOND))}catch(e){this.mounted&&this.setState({error:e})}})),g(this,"initCamera",(async()=>{this.codeReader||(this.codeReader=new i.BrowserQRCodeReader);try{await this.codeReader.getVideoInputDevices(),this.checkPermissions();const e=await this.codeReader.decodeFromInputVideoDevice(undefined,"video"),t=this.parseContent(e.text);if(!this.mounted)return;"unknown"===t.type?this.setState({error:new Error(this.context.t("unknownQrCode"))}):(this.props.qrCodeDetected(t),this.stopAndClose())}catch(e){if(!this.mounted)return;"NotAllowedError"===e.name?(o.default.info(`Permission denied: '${e}'`),this.setState({ready:v})):this.setState({error:e})}})),g(this,"stopAndClose",(()=>{this.codeReader&&this.teardownCodeReader(),this.props.hideModal()})),g(this,"tryAgain",(()=>{clearTimeout(this.permissionChecker),this.codeReader&&this.teardownCodeReader(),this.setState(this.getInitialState(),(()=>{this.checkEnvironment()}))})),this.state=this.getInitialState(),this.codeReader=null,this.permissionChecker=null,this.mounted=!1,this.props.qrCodeDetected(null)}componentDidMount(){this.mounted=!0,this.checkEnvironment()}componentDidUpdate(e,t){const{ready:n}=this.state;t.ready!==n&&(n===b?this.initCamera():n===v&&this.checkPermissions())}getInitialState(){return{ready:y,error:null}}componentWillUnmount(){this.mounted=!1,clearTimeout(this.permissionChecker),this.teardownCodeReader()}teardownCodeReader(){this.codeReader&&(this.codeReader.reset(),this.codeReader.stop(),this.codeReader=null)}parseContent(e){let t="unknown",n={};return e.split("ethereum:").length>1?(t="address",n={address:e.split("ethereum:")[1]}):"0x"===e.substring(0,2).toLowerCase()&&(t="address",n={address:e}),{type:t,values:n}}renderError(){const{t:e}=this.context,{error:t}=this.state;let n,r;return"NO_WEBCAM_FOUND"===t.type?(n=e("noWebcamFoundTitle"),r=e("noWebcamFound")):t.message===e("unknownQrCode")?r=e("unknownQrCode"):(n=e("unknownCameraErrorTitle"),r=e("unknownCameraError")),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"qr-scanner__image"},a.default.createElement("img",{src:"images/webcam.svg",width:"70",height:"70",alt:""})),n?a.default.createElement("div",{className:"qr-scanner__title"},n):null,a.default.createElement("div",{className:"qr-scanner__error"},r),a.default.createElement(f.default,{onCancel:this.stopAndClose,onSubmit:this.tryAgain,cancelText:e("cancel"),submitText:e("tryAgain")}))}renderVideo(){const{t:e}=this.context,{ready:t}=this.state;let n;return t===y?n=e("accessingYourCamera"):t===b?n=e("scanInstructions"):t===v&&(n=e("youNeedToAllowCameraAccess")),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"qr-scanner__title"},`${e("scanQrCode")}`),a.default.createElement("div",{className:"qr-scanner__content"},a.default.createElement("div",{className:"qr-scanner__content__video-wrapper"},a.default.createElement("video",{id:"video",style:{display:t===b?"block":"none"}}),t===b?null:a.default.createElement(u.default,{color:"var(--color-warning-default)"}))),a.default.createElement("div",{className:"qr-scanner__status"},n))}render(){const{error:e}=this.state;return a.default.createElement("div",{className:"qr-scanner"},a.default.createElement("div",{className:"qr-scanner__close",onClick:this.stopAndClose}),e?this.renderError():this.renderVideo())}}n.default=_,g(_,"propTypes",{hideModal:r.default.func.isRequired,qrCodeDetected:r.default.func.isRequired}),g(_,"contextTypes",{t:r.default.func})}}},{package:"$root$",file:"ui/components/app/modals/qr-scanner/qr-scanner.component.js"}],[3638,{"../../../../store/actions":4443,"./qr-scanner.component":3637,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../../store/actions"),i=(a=e("./qr-scanner.component"))&&a.__esModule?a:{default:a};var s=(0,r.connect)(null,(e=>({hideModal:()=>e((0,o.hideModal)()),qrCodeDetected:t=>e((0,o.qrCodeDetected)(t))})))(i.default);n.default=s}}},{package:"$root$",file:"ui/components/app/modals/qr-scanner/qr-scanner.container.js"}],[3639,{"./reject-transactions.container":3641},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./reject-transactions.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/reject-transactions/index.js"}],[3640,{"../../modal":3595,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(e("prop-types")),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=s(e("../../modal"));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class c extends r.PureComponent{constructor(...e){super(...e),l(this,"onSubmit",(async()=>{const{onSubmit:e,hideModal:t}=this.props;await e(),t()}))}render(){const{t:e}=this.context,{hideModal:t,unapprovedTxCount:n,isRequestType:a}=this.props;return r.default.createElement(o.default,{headerText:e(a?"rejectRequestsN":"rejectTxsN",[n]),onClose:t,onSubmit:this.onSubmit,onCancel:t,submitText:e("rejectAll"),cancelText:e("cancel")},r.default.createElement("div",null,r.default.createElement("div",{className:"reject-transactions__description"},e(a?"rejectRequestsDescription":"rejectTxsDescription",[n]))))}}n.default=c,l(c,"contextTypes",{t:a.default.func.isRequired}),l(c,"propTypes",{onSubmit:a.default.func.isRequired,hideModal:a.default.func.isRequired,unapprovedTxCount:a.default.number.isRequired,isRequestType:a.default.bool})}}},{package:"$root$",file:"ui/components/app/modals/reject-transactions/reject-transactions.component.js"}],[3641,{"../../../../helpers/higher-order-components/with-modal-props":4085,"./reject-transactions.component":3640,"react-redux":3130,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("react-redux"),r=e("redux"),o=s(e("../../../../helpers/higher-order-components/with-modal-props")),i=s(e("./reject-transactions.component"));function s(e){return e&&e.__esModule?e:{default:e}}var l=(0,r.compose)(o.default,(0,a.connect)(((e,t)=>{const{unapprovedTxCount:n}=t;return{unapprovedTxCount:n}})))(i.default);n.default=l}}},{package:"$root$",file:"ui/components/app/modals/reject-transactions/reject-transactions.container.js"}],[3642,{"./transaction-confirmed.container":3644},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-confirmed.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/modals/transaction-confirmed/index.js"}],[3643,{"../../../../helpers/constants/design-system":4070,"../../../component-library/icon/deprecated":3836,"../../modal":3595,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=l(e("prop-types")),o=l(e("../../modal")),i=e("../../../component-library/icon/deprecated"),s=e("../../../../helpers/constants/design-system");function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends a.PureComponent{constructor(...e){super(...e),u(this,"handleSubmit",(()=>{const{hideModal:e,onSubmit:t}=this.props;e(),t&&"function"==typeof t&&t()}))}render(){const{t:e}=this.context;return a.default.createElement(o.default,{onSubmit:this.handleSubmit,submitText:e("ok")},a.default.createElement("div",{className:"transaction-confirmed__content"},a.default.createElement(i.Icon,{name:i.ICON_NAMES.CHECK,color:s.IconColor.successDefault,size:i.ICON_SIZES.XL}),a.default.createElement("div",{className:"transaction-confirmed__title"},`${e("confirmed")}!`),a.default.createElement("div",{className:"transaction-confirmed__description"},e("initialTransactionConfirmed"))))}}n.default=d,u(d,"contextTypes",{t:r.default.func}),u(d,"propTypes",{onSubmit:r.default.func,hideModal:r.default.func})}}},{package:"$root$",file:"ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js"}],[3644,{"../../../../helpers/higher-order-components/with-modal-props":4085,"./transaction-confirmed.component":3643},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(e("../../../../helpers/higher-order-components/with-modal-props")),r=o(e("./transaction-confirmed.component"));function o(e){return e&&e.__esModule?e:{default:e}}var i=(0,a.default)(r.default);n.default=i}}},{package:"$root$",file:"ui/components/app/modals/transaction-confirmed/transaction-confirmed.container.js"}],[3645,{"./multi-layer-fee-message":3646},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./multi-layer-fee-message"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/multilayer-fee-message/index.js"}],[3646,{"../../../../shared/constants/common":3403,"../../../../shared/modules/Numeric":3427,"../../../../shared/modules/conversion.utils":3431,"../../../contexts/i18n":4047,"../../../helpers/constants/common":4068,"../../../helpers/utils/optimism/fetchEstimatedL1Fee":4102,"../transaction-detail-item/transaction-detail-item.component":3753,"../user-preferenced-currency-display":3767,"@sentry/browser":1403,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=g;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=m(e("prop-types")),o=e("@sentry/browser"),i=m(e("../transaction-detail-item/transaction-detail-item.component")),s=m(e("../user-preferenced-currency-display")),l=m(e("../../../helpers/utils/optimism/fetchEstimatedL1Fee")),c=e("../../../helpers/constants/common"),u=e("../../../contexts/i18n"),d=e("../../../../shared/modules/conversion.utils"),p=e("../../../../shared/constants/common"),f=e("../../../../shared/modules/Numeric");function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function g({transaction:e,layer2fee:t,nativeCurrency:n,plainStyle:r}){const m=(0,a.useContext)(u.I18nContext),[h,g]=(0,a.useState)(null);let y,v="unknown";null!==h&&(y=new f.Numeric(h,16,p.EtherDenomination.WEI),v=`${y.toDenomination(p.EtherDenomination.ETH).toFixed(12)} ${n}`);const b=(0,d.sumHexes)(t||"0x0",h||"0x0"),_=(0,d.sumHexes)(b||"0x0",e.txParams.value||"0x0"),E=`${new f.Numeric(_,16,p.EtherDenomination.WEI).toDenomination(p.EtherDenomination.ETH).toFixed(12)} ${n}`;(0,a.useEffect)((()=>{(async()=>{try{const t=await(0,l.default)(e.chainId,e.txParams);g(t)}catch(e){(0,o.captureException)(e),g(null)}})()}),[e]);const T=a.default.createElement(s.default,{type:c.SECONDARY,value:b,showFiat:!0,hideLabel:!0}),w=a.default.createElement(s.default,{type:c.SECONDARY,value:_,showFiat:!0,hideLabel:!0});return a.default.createElement("div",{className:"multi-layer-fee-message"},a.default.createElement(i.default,{key:"total-item-gas-fee",detailTitle:m("gasFee"),detailTotal:v,detailText:T,noBold:r,flexWidthValues:r}),a.default.createElement(i.default,{key:"total-item-total",detailTitle:m("total"),detailTotal:E,detailText:w,subTitle:m("transactionDetailMultiLayerTotalSubtitle"),noBold:r,flexWidthValues:r}))}g.propTypes={transaction:r.default.object,layer2fee:r.default.string,nativeCurrency:r.default.string,plainStyle:r.default.bool}}}},{package:"$root$",file:"ui/components/app/multilayer-fee-message/multi-layer-fee-message.js"}],[3647,{"./multiple-notifications.component":3648},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./multiple-notifications.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/multiple-notifications/index.js"}],[3648,{classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=i(e("classnames")),o=i(e("prop-types"));function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class c extends a.PureComponent{constructor(...e){super(...e),l(this,"state",{showAll:!1})}render(){const{showAll:e}=this.state,{children:t,classNames:n}=this.props,o=t.filter(Boolean);return 0===o.length?null:a.default.createElement("div",{className:(0,r.default)(...n,{"home-notification-wrapper--show-all":e,"home-notification-wrapper--show-first":!e})},o,a.default.createElement("div",{className:"home-notification-wrapper__i-container",onClick:()=>this.setState({showAll:!e})},o.length>1?a.default.createElement("i",{className:(0,r.default)("fa fa-sm fa-sort-amount",{flipped:!e})}):null))}}n.default=c,l(c,"defaultProps",{children:[],classNames:[]}),l(c,"propTypes",{children:o.default.array,classNames:o.default.array})}}},{package:"$root$",file:"ui/components/app/multiple-notifications/multiple-notifications.component.js"}],[3649,{"./network-account-balance-header":3650},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./network-account-balance-header"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/network-account-balance-header/index.js"}],[3650,{"../../../../shared/constants/network":3409,"../../../contexts/i18n":4047,"../../../helpers/constants/design-system":4070,"../../ui/box/box":3899,"../../ui/icon-with-fallback":3944,"../../ui/identicon":3962,"../../ui/typography":4039,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=m;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=p(e("prop-types")),o=p(e("../../ui/icon-with-fallback")),i=p(e("../../ui/identicon")),s=e("../../../helpers/constants/design-system"),l=p(e("../../ui/box/box")),c=e("../../../contexts/i18n"),u=p(e("../../ui/typography")),d=e("../../../../shared/constants/network");function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function m({networkName:e,accountName:t,accountBalance:n,tokenName:r,accountAddress:p,chainId:f}){const m=(0,a.useContext)(c.I18nContext),h=d.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[f],g=h?"network-account-balance-header__network-account__ident-icon-ethereum":"network-account-balance-header__network-account__ident-icon-ethereum--gray";return a.default.createElement(l.default,{display:s.DISPLAY.FLEX,flexDirection:s.FLEX_DIRECTION.ROW,padding:4,className:"network-account-balance-header",alignItems:s.AlignItems.center,justifyContent:s.JustifyContent.spaceBetween},a.default.createElement(l.default,{display:s.DISPLAY.FLEX,flexDirection:s.FLEX_DIRECTION.ROW,alignItems:s.AlignItems.center,gap:2},a.default.createElement(l.default,{display:s.DISPLAY.FLEX,flexDirection:s.FLEX_DIRECTION.ROW,alignItems:s.AlignItems.center},a.default.createElement(i.default,{address:p,diameter:32}),a.default.createElement(o.default,{name:e,size:16,icon:h,wrapperClassName:g})),a.default.createElement(l.default,{display:s.DISPLAY.FLEX,alignItems:s.AlignItems.flexStart,flexDirection:s.FLEX_DIRECTION.COLUMN},a.default.createElement(u.default,{variant:s.TypographyVariant.H6,color:s.TextColor.textAlternative,marginBottom:0},e),a.default.createElement(u.default,{variant:s.TypographyVariant.H6,color:s.TextColor.textDefault,fontWeight:s.FONT_WEIGHT.BOLD,marginTop:0},t))),a.default.createElement(l.default,{display:s.DISPLAY.FLEX,alignItems:s.AlignItems.flexEnd,flexDirection:s.FLEX_DIRECTION.COLUMN},a.default.createElement(u.default,{variant:s.TypographyVariant.H6,color:s.TextColor.textAlternative,marginBottom:0},m("balance")),a.default.createElement(u.default,{variant:s.TypographyVariant.H6,color:s.TextColor.textDefault,fontWeight:s.FONT_WEIGHT.BOLD,marginTop:0,align:s.TEXT_ALIGN.END},n," ",r)))}m.propTypes={networkName:r.default.string,accountName:r.default.string,accountBalance:r.default.string,tokenName:r.default.string,accountAddress:r.default.string,chainId:r.default.string}}}},{package:"$root$",file:"ui/components/app/network-account-balance-header/network-account-balance-header.js"}],[3651,{"./network-display":3652},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./network-display"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/network-display/index.js"}],[3652,{"../../../../shared/constants/network":3409,"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../component-library/icon/deprecated":3836,"../../ui/chip/chip":3912,"../../ui/color-indicator":3915,"../../ui/loading-indicator":3971,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=g;var a=h(e("react")),r=h(e("prop-types")),o=h(e("classnames")),i=e("react-redux"),s=e("../../../../shared/constants/network"),l=h(e("../../ui/loading-indicator")),c=h(e("../../ui/color-indicator")),u=e("../../../helpers/constants/design-system"),d=h(e("../../ui/chip/chip")),p=e("../../../hooks/useI18nContext"),f=e("../../../selectors"),m=e("../../component-library/icon/deprecated");function h(e){return e&&e.__esModule?e:{default:e}}function g({indicatorSize:e,disabled:t,labelProps:n,targetNetwork:r,onClick:h}){const g=(0,i.useSelector)(f.isNetworkLoading),y=(0,i.useSelector)((e=>({nickname:e.metamask.provider.nickname,type:e.metamask.provider.type}))),v=(0,p.useI18nContext)(),{nickname:b,type:_}=r??y;return a.default.createElement(d.default,{dataTestId:"network-display",borderColor:h?u.BorderColor.borderDefault:u.BorderColor.borderMuted,onClick:h,leftIcon:a.default.createElement(l.default,{alt:v("attemptingConnect"),title:v("attemptingConnect"),isLoading:g},a.default.createElement(c.default,{color:_===s.NETWORK_TYPES.RPC?u.IconColor.iconMuted:_,size:e,type:c.default.TYPES.FILLED,iconClassName:_===s.NETWORK_TYPES.RPC&&e!==u.Size.XS?"fa fa-question":undefined})),rightIcon:h?a.default.createElement(m.Icon,{name:m.ICON_NAMES.ARROW_DOWN,size:m.ICON_SIZES.XS}):null,label:_===s.NETWORK_TYPES.RPC?b??v("privateNetwork"):v(_),className:(0,o.default)("network-display",{"network-display--disabled":t,"network-display--clickable":"function"==typeof h}),labelProps:{variant:u.TypographyVariant.H7,...n}})}g.propTypes={indicatorSize:r.default.oneOf(Object.values(u.Size)),labelProps:d.default.propTypes.labelProps,targetNetwork:r.default.shape({type:r.default.oneOf([...Object.keys(s.BUILT_IN_NETWORKS),s.NETWORK_TYPES.RPC]),nickname:r.default.string}),disabled:r.default.bool,onClick:r.default.func},g.defaultProps={indicatorSize:u.Size.LG}}}},{package:"$root$",file:"ui/components/app/network-display/network-display.js"}],[3653,{"./nft-default-image":3654},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./nft-default-image"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/nft-default-image/index.js"}],[3654,{"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../ui/typography":4039,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=u;var a=c(e("react")),r=c(e("prop-types")),o=c(e("classnames")),i=c(e("../../ui/typography")),s=e("../../../helpers/constants/design-system"),l=e("../../../hooks/useI18nContext");function c(e){return e&&e.__esModule?e:{default:e}}function u({name:e,tokenId:t,handleImageClick:n}){const r=(0,l.useI18nContext)(),c=n?"button":"div";return a.default.createElement(c,{tabIndex:0,"data-testid":"nft-default-image",className:(0,o.default)("nft-default",{"nft-default--clickable":n}),onClick:n},a.default.createElement(i.default,{variant:s.TypographyVariant.H6,className:"nft-default__text"},e??r("unknownCollection")," ",a.default.createElement("br",null)," #",t))}u.propTypes={name:r.default.string,tokenId:r.default.string,handleImageClick:r.default.func}}}},{package:"$root$",file:"ui/components/app/nft-default-image/nft-default-image.js"}],[3655,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../../shared/constants/network":3409,"../../../../shared/constants/transaction":3417,"../../../../shared/modules/conversion.utils":3431,"../../../../shared/modules/string-utils":3442,"../../../ducks/metamask/metamask":4062,"../../../ducks/send":4064,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../helpers/utils/nfts":4100,"../../../helpers/utils/util":4108,"../../../hooks/useCopyToClipboard":4123,"../../../hooks/useI18nContext":4129,"../../../hooks/usePrevious":4133,"../../../pages/asset/components/asset-navigation":4157,"../../../selectors":4436,"../../../store/actions":4443,"../../component-library":3840,"../../component-library/icon/deprecated":3836,"../../ui/box":3900,"../../ui/button":3904,"../../ui/card":3908,"../../ui/info-tooltip":3963,"../../ui/tooltip":4035,"../../ui/typography/typography":4040,"../nft-default-image":3653,"../nft-options/nft-options":3656,lodash:2932,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=$;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=L(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=D(e("prop-types")),o=e("react-redux"),i=e("react-router-dom"),s=e("lodash"),l=D(e("../../ui/box")),c=D(e("../../ui/card")),u=D(e("../../ui/typography/typography")),d=e("../../../helpers/constants/design-system"),p=e("../../../hooks/useI18nContext"),f=e("../../../helpers/utils/util"),m=e("../../../helpers/utils/nfts"),h=e("../../../selectors"),g=D(e("../../../pages/asset/components/asset-navigation")),y=e("../../../ducks/metamask/metamask"),v=e("../../../helpers/constants/routes"),b=e("../../../store/actions"),_=e("../../../../shared/constants/network"),E=e("../../../../app/scripts/lib/util"),T=e("../../../../shared/constants/app"),w=D(e("../nft-options/nft-options")),k=D(e("../../ui/button")),O=e("../../../ducks/send"),N=D(e("../../ui/info-tooltip")),C=e("../../../hooks/usePrevious"),P=e("../../../hooks/useCopyToClipboard"),M=e("../../../../shared/modules/string-utils"),S=e("../../../../shared/constants/transaction"),x=D(e("../nft-default-image")),j=e("../../component-library"),I=e("../../component-library/icon/deprecated"),A=D(e("../../ui/tooltip")),R=e("../../../../shared/modules/conversion.utils");function D(e){return e&&e.__esModule?e:{default:e}}function L(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(L=function(e){return e?n:t})(e)}function $({nft:e}){var t;const{image:n,imageOriginal:r,name:D,description:L,address:$,tokenId:W,standard:q,isCurrentlyOwned:F,lastSale:B,imageThumbnail:G}=e,H=(0,p.useI18nContext)(),U=(0,i.useHistory)(),V=(0,o.useDispatch)(),z=(0,o.useSelector)(h.getIpfsGateway),Y=(0,o.useSelector)(y.getNftContracts),X=(0,o.useSelector)(h.getCurrentChainId),[K,Z]=(0,P.useCopyToClipboard)(),Q=null===(t=Y.find((({address:e})=>(0,M.isEqualCaseInsensitive)(e,$))))||void 0===t?void 0:t.name,J=(0,o.useSelector)((e=>(0,h.getSelectedIdentity)(e).name)),ee=(0,m.getNftImageAlt)(e),te=(0,f.getAssetImageURL)(r??n,z),ne=te.startsWith("data:"),ae=(0,f.formatDate)(new Date(null==B?void 0:B.event_timestamp).getTime(),"M/d/y"),re=(0,C.usePrevious)(e);(0,a.useEffect)((()=>{(0,s.isEqual)(re,e)||(0,b.checkAndUpdateSingleNftOwnershipStatus)(e)}),[e,re]);const oe=(()=>{switch(X){case _.CHAIN_IDS.MAINNET:return`https://opensea.io/assets/${$}/${W}`;case _.CHAIN_IDS.POLYGON:return`https://opensea.io/assets/matic/${$}/${W}`;case _.CHAIN_IDS.GOERLI:case _.CHAIN_IDS.SEPOLIA:return`https://testnets.opensea.io/assets/${$}/${W}`;default:return null}})(),ie=q!==S.TokenStandard.ERC721,se=(0,E.getEnvironmentType)()===T.ENVIRONMENT_TYPE_POPUP,le=async()=>{await V((0,O.startNewDraftTransaction)({type:S.AssetType.NFT,details:e})),U.push(v.SEND_ROUTE)},ce=()=>!1===F?a.default.createElement("div",{style:{height:"30px"}}):a.default.createElement(l.default,{display:d.DISPLAY.FLEX,width:se?d.BLOCK_SIZES.FULL:d.BLOCK_SIZES.HALF,margin:se?[4,0]:null},a.default.createElement(k.default,{type:"primary",onClick:le,disabled:ie,className:"nft-details__send-button","data-testid":"nft-send-button"},H("send")),ie?a.default.createElement(N.default,{position:"top",contentText:H("sendingDisabled")}):null);return a.default.createElement(a.default.Fragment,null,a.default.createElement(g.default,{accountName:J,assetName:Q,onBack:()=>U.push(v.DEFAULT_ROUTE),optionsButton:a.default.createElement(w.default,{onViewOnOpensea:oe?()=>global.platform.openTab({url:oe}):null,onRemove:()=>{V((0,b.removeAndIgnoreNft)($,W)),V((0,b.setNewNftAddedMessage)("")),V((0,b.setRemoveNftMessage)("success")),U.push(v.DEFAULT_ROUTE)}})}),a.default.createElement(l.default,{className:"nft-details"},a.default.createElement("div",{className:"nft-details__top-section"},a.default.createElement(c.default,{padding:0,justifyContent:d.JustifyContent.center,className:"nft-details__card"},n?a.default.createElement("img",{className:"nft-details__image",src:te,alt:ee}):a.default.createElement(x.default,{name:D,tokenId:W})),a.default.createElement(l.default,{flexDirection:d.FLEX_DIRECTION.COLUMN,className:"nft-details__info",justifyContent:d.JustifyContent.spaceBetween},a.default.createElement("div",null,a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H4,fontWeight:d.FONT_WEIGHT.BOLD,boxProps:{margin:0,marginBottom:2}},D),a.default.createElement(u.default,{color:d.TextColor.textMuted,variant:d.TypographyVariant.H5,boxProps:{margin:0,marginBottom:4},overflowWrap:d.OVERFLOW_WRAP.BREAK_WORD},"#",W)),L?a.default.createElement("div",null,a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H6,fontWeight:d.FONT_WEIGHT.BOLD,className:"nft-details__description",boxProps:{margin:0,marginBottom:2}},H("description")),a.default.createElement(u.default,{color:d.TextColor.textAlternative,variant:d.TypographyVariant.H6,overflowWrap:d.OVERFLOW_WRAP.BREAK_WORD,boxProps:{margin:0,marginBottom:4}},L)):null,se?null:ce())),a.default.createElement(l.default,{marginBottom:2},B?a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW},a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H6,fontWeight:d.FONT_WEIGHT.BOLD,boxProps:{margin:0,marginBottom:4,marginRight:2},className:"nft-details__link-title"},H("lastSold")),a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW,className:"nft-details__contract-wrapper"},a.default.createElement(u.default,{color:d.TextColor.textAlternative,variant:d.TypographyVariant.H6,overflowWrap:d.OVERFLOW_WRAP.BREAK_WORD,boxProps:{margin:0,marginBottom:4}},ae))),a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW},a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H6,fontWeight:d.FONT_WEIGHT.BOLD,boxProps:{margin:0,marginBottom:4,marginRight:2},className:"nft-details__link-title"},H("lastPriceSold")),a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW,className:"nft-details__contract-wrapper"},a.default.createElement(u.default,{color:d.TextColor.textAlternative,variant:d.TypographyVariant.H6,overflowWrap:d.OVERFLOW_WRAP.BREAK_WORD,boxProps:{margin:0,marginBottom:4}},`${Number((0,R.decWEIToDecETH)(B.total_price))} ${B.payment_token.symbol}`)))):null,a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW},a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H6,fontWeight:d.FONT_WEIGHT.BOLD,boxProps:{margin:0,marginBottom:4,marginRight:2},className:"nft-details__link-title"},H("source")),a.default.createElement(u.default,{variant:d.TypographyVariant.H6,boxProps:{margin:0,marginBottom:4},className:"nft-details__image-source",color:ne?d.TextColor.textDefault:d.TextColor.primaryDefault},ne?a.default.createElement(a.default.Fragment,null,te):a.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:te,title:te},te))),G?a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW},a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H6,fontWeight:d.FONT_WEIGHT.BOLD,boxProps:{margin:0,marginBottom:4,marginRight:2},className:"nft-details__link-title"},H("link")),a.default.createElement(u.default,{variant:d.TypographyVariant.H6,boxProps:{margin:0,marginBottom:4},className:"nft-details__image-source",color:ne?d.TextColor.textDefault:d.TextColor.primaryDefault},a.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:te,title:te},G))):null,a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW},a.default.createElement(u.default,{color:d.TextColor.textDefault,variant:d.TypographyVariant.H6,fontWeight:d.FONT_WEIGHT.BOLD,boxProps:{margin:0,marginBottom:4,marginRight:2},className:"nft-details__link-title"},H("contractAddress")),a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexDirection:d.FLEX_DIRECTION.ROW,className:"nft-details__contract-wrapper"},a.default.createElement(u.default,{color:d.TextColor.textAlternative,variant:d.TypographyVariant.H6,overflowWrap:d.OVERFLOW_WRAP.BREAK_WORD,boxProps:{margin:0,marginBottom:4}},(0,f.shortenAddress)($)),a.default.createElement(A.default,{wrapperClassName:"nft-details__tooltip-wrapper",position:"bottom",title:H(K?"copiedExclamation":"copyToClipboard")},a.default.createElement(j.ButtonIcon,{ariaLabel:"copy",color:d.IconColor.iconAlternative,className:"nft-details__contract-copy-button","data-testid":"nft-address-copy",onClick:()=>{Z($)},iconName:K?I.ICON_NAMES.COPY_SUCCESS:I.ICON_NAMES.COPY})))),se?ce():null,a.default.createElement(u.default,{color:d.TextColor.textAlternative,variant:d.TypographyVariant.H7},H("nftDisclaimer")))))}$.propTypes={nft:r.default.shape({address:r.default.string.isRequired,tokenId:r.default.string.isRequired,isCurrentlyOwned:r.default.bool,name:r.default.string,description:r.default.string,image:r.default.string,standard:r.default.string,imageThumbnail:r.default.string,imagePreview:r.default.string,imageOriginal:r.default.string,creator:r.default.shape({address:r.default.string,config:r.default.string,profile_img_url:r.default.string}),lastSale:r.default.shape({event_timestamp:r.default.string,total_price:r.default.string,payment_token:r.default.shape({symbol:r.default.string})})})}}}},{package:"$root$",file:"ui/components/app/nft-details/nft-details.js"}],[3656,{"../../../contexts/i18n":4047,"../../../helpers/constants/design-system":4070,"../../component-library":3840,"../../component-library/icon/deprecated":3836,"../../ui/menu":3981,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a},i=e("../../../contexts/i18n"),s=e("../../ui/menu"),l=e("../../component-library"),c=e("../../component-library/icon/deprecated"),u=e("../../../helpers/constants/design-system");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const p=({onRemove:e,onViewOnOpensea:t})=>{const n=(0,r.useContext)(i.I18nContext),[a,o]=(0,r.useState)(!1),d=(0,r.useRef)(!1);return r.default.createElement("div",{ref:d},r.default.createElement(l.ButtonIcon,{iconName:c.ICON_NAMES.MORE_VERTICAL,className:"nft-options__button","data-testid":"nft-options__button",onClick:()=>o(!0),color:u.Color.textDefault,ariaLabel:n("nftOptions")}),a?r.default.createElement(s.Menu,{"data-testid":"close-nft-options-menu",anchorElement:d.current,onHide:()=>o(!1)},t?r.default.createElement(s.MenuItem,{iconName:c.ICON_NAMES.EXPORT,"data-testid":"nft-options__view-on-opensea",onClick:()=>{o(!1),t()}},n("viewOnOpensea")):null,r.default.createElement(s.MenuItem,{iconName:c.ICON_NAMES.TRASH,"data-testid":"nft-item-remove",onClick:()=>{o(!1),e()}},n("removeNFT"))):null)};p.propTypes={onRemove:o.default.func.isRequired,onViewOnOpensea:o.default.func};var f=p;n.default=f}}},{package:"$root$",file:"ui/components/app/nft-options/nft-options.js"}],[3657,{"./nfts-detection-notice":3658},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./nfts-detection-notice"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/nfts-detection-notice/index.js"}],[3658,{"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../hooks/useI18nContext":4129,"../../ui/box":3900,"../../ui/button":3904,"../../ui/dialog":3924,"../../ui/typography/typography":4040,react:3177,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,c.useI18nContext)(),t=(0,r.useHistory)();return a.default.createElement(o.default,{className:"nfts-detection-notice"},a.default.createElement(i.default,{type:"message",className:"nfts-detection-notice__message"},a.default.createElement(o.default,{display:l.DISPLAY.FLEX},a.default.createElement(o.default,{paddingTop:1},a.default.createElement("i",{style:{fontSize:"1rem",color:"var(--color-primary-default)"},className:"fa fa-info-circle"})),a.default.createElement(o.default,{paddingLeft:2},a.default.createElement(s.default,{color:l.TextColor.textDefault,align:l.TEXT_ALIGN.LEFT,variant:l.TypographyVariant.H7,fontWeight:l.FONT_WEIGHT.BOLD},e("newNFTsDetected")),a.default.createElement(s.default,{color:l.TextColor.textDefault,align:l.TEXT_ALIGN.LEFT,variant:l.TypographyVariant.H7,boxProps:{marginBottom:4}},e("newNFTDetectedMessage")),a.default.createElement(u.default,{type:"link",onClick:e=>{e.preventDefault(),t.push(`${d.EXPERIMENTAL_ROUTE}#autodetect-nfts`)},className:"nfts-detection-notice__message__link"},e("selectNFTPrivacyPreference"))))))};var a=p(e("react")),r=e("react-router-dom"),o=p(e("../../ui/box")),i=p(e("../../ui/dialog")),s=p(e("../../ui/typography/typography")),l=e("../../../helpers/constants/design-system"),c=e("../../../hooks/useI18nContext"),u=p(e("../../ui/button")),d=e("../../../helpers/constants/routes");function p(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/components/app/nfts-detection-notice/nfts-detection-notice.js"}],[3659,{"./nfts-items":3660},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./nfts-items"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/nfts-items/index.js"}],[3660,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../ducks/metamask/metamask":4062,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../helpers/utils/nfts":4100,"../../../helpers/utils/util":4108,"../../../hooks/useI18nContext":4129,"../../../hooks/usePrevious":4133,"../../../selectors":4436,"../../../store/actions":4443,"../../component-library/icon/deprecated":3836,"../../ui/box":3900,"../../ui/card":3908,"../../ui/typography/typography":4040,"../nft-default-image":3653,lodash:2932,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=C;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=k(e("prop-types")),o=e("react-redux"),i=e("react-router-dom"),s=e("lodash"),l=k(e("../../ui/box")),c=k(e("../../ui/typography/typography")),u=k(e("../../ui/card")),d=e("../../../helpers/constants/design-system"),p=e("../../../../shared/constants/app"),f=e("../../../../app/scripts/lib/util"),m=e("../../../selectors"),h=e("../../../helpers/constants/routes"),g=e("../../../helpers/utils/util"),y=e("../../../helpers/utils/nfts"),v=e("../../../store/actions"),b=e("../../../hooks/usePrevious"),_=e("../../../ducks/metamask/metamask"),E=e("../../../hooks/useI18nContext"),T=e("../../component-library/icon/deprecated"),w=k(e("../nft-default-image"));function k(e){return e&&e.__esModule?e:{default:e}}function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}const N=(0,f.getEnvironmentType)()===p.ENVIRONMENT_TYPE_POPUP?d.BLOCK_SIZES.ONE_THIRD:d.BLOCK_SIZES.ONE_SIXTH;function C({collections:e={},previouslyOwnedCollection:t={}}){var n;const r=(0,o.useDispatch)(),p=Object.keys(e),f=(0,o.useSelector)(_.getNftsDropdownState),k=(0,b.usePrevious)(p),O=(0,o.useSelector)(m.getSelectedAddress),C=(0,o.useSelector)(m.getCurrentChainId),P=(0,E.useI18nContext)();(0,a.useEffect)((()=>{var e,t;if(C!==undefined&&O!==undefined&&!(0,s.isEqual)(k,p)&&((null==f||null===(e=f[O])||void 0===e?void 0:e[C])===undefined||0===Object.keys(null==f||null===(t=f[O])||void 0===t?void 0:t[C]).length)){const e={};p.forEach((t=>{e[t]=!0}));const t={...f,[O]:{...null==f?void 0:f[O],[C]:e}};r((0,v.updateNftDropDownState)(t))}}),[p,k,f,O,C,r]);const M=(0,o.useSelector)(m.getIpfsGateway),S=(0,i.useHistory)(),x=({nfts:e,collectionName:t,collectionImage:n,key:o})=>{var i,s;if(!e.length)return null;const p=null===(i=f[O])||void 0===i||null===(s=i[C])||void 0===s?void 0:s[o];return a.default.createElement("div",{className:"nfts-items__collection",key:`collection-${o}`},a.default.createElement("button",{className:"nfts-items__collection-wrapper","data-testid":"collection-expander-button",onClick:()=>{((e,t)=>{const n={...f[O][C],[e]:!t},a={...f,[O]:{[C]:n}};r((0,v.updateNftDropDownState)(a))})(o,p)}},a.default.createElement(l.default,{marginBottom:2,display:d.DISPLAY.FLEX,alignItems:d.AlignItems.center,justifyContent:d.JustifyContent.spaceBetween,className:"nfts-items__collection-accordion-title"},a.default.createElement(l.default,{alignItems:d.AlignItems.center,className:"nfts-items__collection-header"},((e,t)=>{var n;return e?a.default.createElement("img",{alt:t,src:(0,g.getAssetImageURL)(e,M),className:"nfts-items__collection-image"}):a.default.createElement("div",{className:"nfts-items__collection-image-alt"},(null==t||null===(n=t[0])||void 0===n?void 0:n.toUpperCase())??null)})(n,t),a.default.createElement(c.default,{color:d.Color.textDefault,variant:d.TypographyVariant.H5,margin:2},`${t??P("unknownCollection")} (${e.length})`)),a.default.createElement(l.default,{alignItems:d.AlignItems.flexEnd},a.default.createElement(T.Icon,{name:p?T.ICON_NAMES.ARROW_DOWN:T.ICON_NAMES.ARROW_RIGHT,color:d.Color.iconDefault})))),p?a.default.createElement(l.default,{display:d.DISPLAY.FLEX,flexWrap:d.FLEX_WRAP.WRAP,gap:4},e.map(((e,t)=>{const{image:n,address:r,tokenId:o,backgroundColor:i,name:s}=e,c=(0,g.getAssetImageURL)(n,M),p=(0,y.getNftImageAlt)(e),f=()=>S.push(`${h.ASSET_ROUTE}/${r}/${o}`);return a.default.createElement(l.default,{"data-testid":"nft-wrapper",width:N,key:`nft-${t}`,className:"nfts-items__item-wrapper"},a.default.createElement(u.default,{padding:0,justifyContent:d.JustifyContent.center,className:"nfts-items__item-wrapper__card"},c?a.default.createElement("button",{className:"nfts-items__item",style:{backgroundColor:i},onClick:f},a.default.createElement("img",{className:"nfts-items__item-image","data-testid":"nft-image",src:c,alt:p})):a.default.createElement(w.default,{name:s,tokenId:o,handleImageClick:f})))}))):null)};return a.default.createElement("div",{className:"nfts-items"},a.default.createElement(l.default,{paddingTop:6,paddingBottom:6,paddingLeft:4,paddingRight:4,flexDirection:d.FLEX_DIRECTION.COLUMN},a.default.createElement(a.default.Fragment,null,p.map((t=>{const{nfts:n,collectionName:a,collectionImage:r}=e[t];return x({nfts:n,collectionName:a,collectionImage:r,key:t,isPreviouslyOwnedCollection:!1})})),x({nfts:t.nfts,collectionName:t.collectionName,collectionImage:null===(n=t.nfts[0])||void 0===n?void 0:n.image,isPreviouslyOwnedCollection:!0,key:"previouslyOwned"}))))}C.propTypes={previouslyOwnedCollection:r.default.shape({nfts:r.default.arrayOf(r.default.shape({address:r.default.string.isRequired,tokenId:r.default.string.isRequired,name:r.default.string,description:r.default.string,image:r.default.string,standard:r.default.string,imageThumbnail:r.default.string,imagePreview:r.default.string,creator:r.default.shape({address:r.default.string,config:r.default.string,profile_img_url:r.default.string})})),collectionName:r.default.string,collectionImage:r.default.string}),collections:r.default.shape({nfts:r.default.arrayOf(r.default.shape({address:r.default.string.isRequired,tokenId:r.default.string.isRequired,name:r.default.string,description:r.default.string,image:r.default.string,standard:r.default.string,imageThumbnail:r.default.string,imagePreview:r.default.string,creator:r.default.shape({address:r.default.string,config:r.default.string,profile_img_url:r.default.string})})),collectionImage:r.default.string,collectionName:r.default.string})}}}},{package:"$root$",file:"ui/components/app/nfts-items/nfts-items.js"}],[3661,{"./nfts-tab":3662},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./nfts-tab"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/nfts-tab/index.js"}],[3662,{"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../helpers/constants/zendesk-url":4077,"../../../hooks/useI18nContext":4129,"../../../hooks/useNftsCollections":4131,"../../../selectors":4436,"../../../store/actions":4443,"../../ui/box":3900,"../../ui/button":3904,"../../ui/typography/typography":4040,"../nfts-detection-notice":3657,"../nfts-items":3659,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=_;var a=b(e("react")),r=b(e("prop-types")),o=e("react-redux"),i=e("react-router-dom"),s=b(e("../../ui/box")),l=b(e("../../ui/button")),c=b(e("../../ui/typography/typography")),u=b(e("../nfts-detection-notice")),d=b(e("../nfts-items")),p=e("../../../helpers/constants/design-system"),f=e("../../../hooks/useI18nContext"),m=e("../../../selectors"),h=e("../../../helpers/constants/routes"),g=e("../../../store/actions"),y=e("../../../hooks/useNftsCollections"),v=b(e("../../../helpers/constants/zendesk-url"));function b(e){return e&&e.__esModule?e:{default:e}}function _({onAddNFT:e}){const t=(0,o.useSelector)(m.getUseNftDetection),n=(0,o.useSelector)(m.getIsMainnet),r=(0,i.useHistory)(),b=(0,f.useI18nContext)(),_=(0,o.useDispatch)(),{nftsLoading:E,collections:T,previouslyOwnedCollection:w}=(0,y.useNftsCollections)();return E?a.default.createElement("div",{className:"nfts-tab__loading"},b("loadingNFTs")):a.default.createElement(s.default,{className:"nfts-tab"},Object.keys(T).length>0||w.nfts.length>0?a.default.createElement(d.default,{collections:T,previouslyOwnedCollection:w}):a.default.createElement(a.default.Fragment,null,n&&!t?a.default.createElement(u.default,null):null,a.default.createElement(s.default,{padding:12},a.default.createElement(s.default,{justifyContent:p.JustifyContent.center},a.default.createElement("img",{src:"./images/no-nfts.svg"})),a.default.createElement(s.default,{marginTop:4,marginBottom:12,justifyContent:p.JustifyContent.center,flexDirection:p.FLEX_DIRECTION.COLUMN,className:"nfts-tab__link"},a.default.createElement(c.default,{color:p.TextColor.textMuted,variant:p.TypographyVariant.H4,align:p.TEXT_ALIGN.CENTER,fontWeight:p.FONT_WEIGHT.BOLD},b("noNFTs")),a.default.createElement(l.default,{type:"link",target:"_blank",rel:"noopener noreferrer",href:v.default.NFT_TOKENS},b("learnMoreUpperCase"))))),a.default.createElement(s.default,{marginBottom:4,justifyContent:p.JustifyContent.center,flexDirection:p.FLEX_DIRECTION.COLUMN},a.default.createElement(c.default,{color:p.TextColor.textMuted,variant:p.TypographyVariant.H5,align:p.TEXT_ALIGN.CENTER},b("missingNFT")),a.default.createElement(s.default,{alignItems:p.AlignItems.center,justifyContent:p.JustifyContent.center},!n&&Object.keys(T).length<1?null:a.default.createElement(a.default.Fragment,null,a.default.createElement(s.default,{className:"nfts-tab__link",justifyContent:p.JustifyContent.flexEnd},n&&!t?a.default.createElement(l.default,{type:"link",onClick:()=>{r.push(h.EXPERIMENTAL_ROUTE)}},b("enableAutoDetect")):a.default.createElement(l.default,{type:"link",onClick:()=>{n&&_((0,g.detectNfts)()),(0,g.checkAndUpdateAllNftsOwnershipStatus)()}},b("refreshList"))),a.default.createElement(c.default,{color:p.TextColor.textMuted,variant:p.TypographyVariant.H6,align:p.TEXT_ALIGN.CENTER},b("or"))),a.default.createElement(s.default,{justifyContent:p.JustifyContent.flexStart,className:"nfts-tab__link"},a.default.createElement(l.default,{type:"link",onClick:e},b("importNFTs"))))))}_.propTypes={onAddNFT:r.default.func.isRequired}}}},{package:"$root$",file:"ui/components/app/nfts-tab/nfts-tab.js"}],[3663,{"./permission-page-container-content":3664,"./permission-page-container.container":3667},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PermissionPageContainerContent",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a.default}});var a=o(e("./permission-page-container.container")),r=o(e("./permission-page-container-content"));function o(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/components/app/permission-page-container/index.js"}],[3664,{"./permission-page-container-content.component":3665},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./permission-page-container-content.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/permission-page-container/permission-page-container-content/index.js"}],[3665,{"../../../ui/tooltip":4035,"../../permissions-connect-header":3670,"../../permissions-connect-permission-list":3672,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(e("prop-types")),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=c(e("../../permissions-connect-header")),i=c(e("../../../ui/tooltip")),s=c(e("../../permissions-connect-permission-list"));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends r.PureComponent{renderRequestedPermissions(){const{selectedPermissions:e,subjectMetadata:t}=this.props;return r.default.createElement("div",{className:"permission-approval-container__content__requested"},r.default.createElement(s.default,{permissions:e,targetSubjectMetadata:t}))}renderAccountTooltip(e){const{selectedIdentities:t}=this.props,{t:n}=this.context;return r.default.createElement(i.default,{key:"all-account-connect-tooltip",position:"bottom",wrapperClassName:"permission-approval-container__bold-title-elements",html:r.default.createElement("div",{style:{display:"flex",flexDirection:"column"}},t.slice(0,6).map(((e,t)=>r.default.createElement("div",{key:`tooltip-identity-${t}`},e.addressLabel))),t.length>6?n("plusXMore",[t.length-6]):null)},e)}getTitle(){var e;const{subjectMetadata:t,selectedIdentities:n,allIdentitiesSelected:a,selectedPermissions:r}=this.props,{t:o}=this.context;return t.extensionId?o("externalExtension",[t.extensionId]):r.eth_accounts?a?o("connectToAll",[this.renderAccountTooltip(o("connectToAllAccounts"))]):n.length>1?o("connectToMultiple",[this.renderAccountTooltip(o("connectToMultipleNumberOfAccounts",[n.length]))]):o("connectTo",[null===(e=n[0])||void 0===e?void 0:e.addressLabel]):o("permissionRequestCapitalized")}render(){const{subjectMetadata:e}=this.props,{t:t}=this.context,n=this.getTitle();return r.default.createElement("div",{className:"permission-approval-container__content"},r.default.createElement("div",{className:"permission-approval-container__content-container"},r.default.createElement(o.default,{iconUrl:e.iconUrl,iconName:e.name,headerTitle:n,headerText:e.extensionId?t("allowExternalExtensionTo",[e.extensionId]):t("allowThisSiteTo"),siteOrigin:e.origin}),r.default.createElement("section",{className:"permission-approval-container__permissions-container"},this.renderRequestedPermissions())))}}n.default=d,u(d,"propTypes",{subjectMetadata:a.default.shape({name:a.default.string.isRequired,origin:a.default.string.isRequired,subjectType:a.default.string.isRequired,extensionId:a.default.string,iconUrl:a.default.string}),selectedPermissions:a.default.object.isRequired,selectedIdentities:a.default.array,allIdentitiesSelected:a.default.bool}),u(d,"defaultProps",{selectedIdentities:[],allIdentitiesSelected:!1}),u(d,"contextTypes",{t:a.default.func})}}},{package:"$root$",file:"ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js"}],[3666,{".":3663,"../../../../shared/constants/metametrics":3408,"../../ui/page-container":3992,"../permissions-connect-footer":3668,lodash:2932,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("prop-types")),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=e("lodash"),i=e("../../../../shared/constants/metametrics"),s=e("../../ui/page-container"),l=d(e("../permissions-connect-footer")),c=e(".");function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f extends r.Component{constructor(...e){super(...e),p(this,"state",{selectedPermissions:this.getRequestedMethodState(this.getRequestedMethodNames(this.props))}),p(this,"onCancel",(()=>{const{request:e,rejectPermissionsRequest:t}=this.props;t(e.metadata.id)})),p(this,"onSubmit",(()=>{const{request:e,approvePermissionsRequest:t,rejectPermissionsRequest:n,selectedIdentities:a}=this.props,r={...e,permissions:{...e.permissions},approvedAccounts:a.map((e=>e.address))};Object.keys(this.state.selectedPermissions).forEach((e=>{this.state.selectedPermissions[e]||delete r.permissions[e]})),Object.keys(r.permissions).length>0?t(r):n(r.metadata.id)}))}componentDidUpdate(){const e=this.getRequestedMethodNames(this.props);(0,o.isEqual)(Object.keys(this.state.selectedPermissions),e)||this.setState({selectedPermissions:this.getRequestedMethodState(e)})}getRequestedMethodState(e){return e.reduce(((e,t)=>(e[t]=!0,e)),{})}getRequestedMethodNames(e){return Object.keys(e.request.permissions||{})}componentDidMount(){this.context.trackEvent({category:i.MetaMetricsEventCategory.Auth,event:"Tab Opened",properties:{action:"Connect",legacy_event:!0}})}render(){const{requestMetadata:e,targetSubjectMetadata:t,selectedIdentities:n,allIdentitiesSelected:a}=this.props;return r.default.createElement("div",{className:"page-container permission-approval-container"},r.default.createElement(c.PermissionPageContainerContent,{requestMetadata:e,subjectMetadata:t,selectedPermissions:this.state.selectedPermissions,selectedIdentities:n,allIdentitiesSelected:a}),r.default.createElement("div",{className:"permission-approval-container__footers"},r.default.createElement(l.default,null),r.default.createElement(s.PageContainerFooter,{cancelButtonType:"default",onCancel:()=>this.onCancel(),cancelText:this.context.t("cancel"),onSubmit:()=>this.onSubmit(),submitText:this.context.t("connect"),buttonSizeLarge:!1})))}}n.default=f,p(f,"propTypes",{approvePermissionsRequest:a.default.func.isRequired,rejectPermissionsRequest:a.default.func.isRequired,selectedIdentities:a.default.array,allIdentitiesSelected:a.default.bool,request:a.default.object,requestMetadata:a.default.object,targetSubjectMetadata:a.default.shape({name:a.default.string,origin:a.default.string.isRequired,subjectType:a.default.string.isRequired,extensionId:a.default.string,iconUrl:a.default.string})}),p(f,"defaultProps",{request:{},requestMetadata:{},selectedIdentities:[],allIdentitiesSelected:!1}),p(f,"contextTypes",{t:a.default.func,trackEvent:a.default.func})}}},{package:"$root$",file:"ui/components/app/permission-page-container/permission-page-container.component.js"}],[3667,{"../../../selectors":4436,"./permission-page-container.component":3666,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../selectors"),i=(a=e("./permission-page-container.component"))&&a.__esModule?a:{default:a};var s=(0,r.connect)(((e,t)=>{const{selectedIdentities:n}=t,a=(0,o.getMetaMaskIdentities)(e);return{allIdentitiesSelected:Object.keys(n).length===Object.keys(a).length&&n.length>1}}))(i.default);n.default=s}}},{package:"$root$",file:"ui/components/app/permission-page-container/permission-page-container.container.js"}],[3668,{"./permissions-connect-footer.component":3669},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./permissions-connect-footer.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/permissions-connect-footer/index.js"}],[3669,{"../../../helpers/constants/zendesk-url":4077,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,o,i=u(e("prop-types")),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),l=u(e("../../../helpers/constants/zendesk-url"));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}class d extends s.Component{render(){const{t:e}=this.context;return s.default.createElement("div",{className:"permissions-connect-footer"},s.default.createElement("div",{className:"permissions-connect-footer__text"},s.default.createElement("div",null,e("onlyConnectTrust")),s.default.createElement("div",{className:"permissions-connect-footer__text--link",onClick:()=>{global.platform.openTab({url:l.default.USER_GUIDE_DAPPS})}},e("learnMoreUpperCase"))))}}n.default=d,a=d,r="contextTypes",o={t:i.default.func},(r=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(r))in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o}}},{package:"$root$",file:"ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js"}],[3670,{"./permissions-connect-header.component":3671},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./permissions-connect-header.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/permissions-connect-header/index.js"}],[3671,{"../../../helpers/constants/design-system":4070,"../../ui/box":3900,"../../ui/site-origin":4015,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=u(e("prop-types")),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=u(e("classnames")),i=u(e("../../ui/site-origin")),s=u(e("../../ui/box")),l=e("../../../helpers/constants/design-system");function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f extends r.Component{renderHeaderIcon(){const{iconUrl:e,iconName:t,siteOrigin:n,leftIcon:a,rightIcon:o}=this.props;return r.default.createElement("div",{className:"permissions-connect-header__icon"},r.default.createElement(i.default,{chip:!0,siteOrigin:n,title:n,iconSrc:e,name:t,leftIcon:a,rightIcon:o}))}render(){const{boxProps:e,className:t,headerTitle:n,headerText:a}=this.props;return r.default.createElement(s.default,d({className:(0,o.default)("permissions-connect-header",t),flexDirection:l.FLEX_DIRECTION.COLUMN,justifyContent:l.JustifyContent.center},e),this.renderHeaderIcon(),r.default.createElement("div",{className:"permissions-connect-header__title"},n),r.default.createElement("div",{className:"permissions-connect-header__subtitle"},a))}}n.default=f,p(f,"propTypes",{className:a.default.string,iconUrl:a.default.string,iconName:a.default.string.isRequired,siteOrigin:a.default.string.isRequired,headerTitle:a.default.node,boxProps:a.default.shape({...s.default.propTypes}),headerText:a.default.string,leftIcon:a.default.node,rightIcon:a.default.node}),p(f,"defaultProps",{iconUrl:null,headerTitle:"",headerText:"",boxProps:{}})}}},{package:"$root$",file:"ui/components/app/permissions-connect-header/permissions-connect-header.component.js"}],[3672,{"./permissions-connect-permission-list":3673},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./permissions-connect-permission-list"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/permissions-connect-permission-list/index.js"}],[3673,{"../../../helpers/utils/permission":4103,"../../../hooks/useI18nContext":4129,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=c;var a=s(e("react")),r=s(e("prop-types")),o=e("../../../helpers/utils/permission"),i=e("../../../hooks/useI18nContext");function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){const{label:n,leftIcon:r,permissionName:i}=e;return a.default.createElement("div",{className:"permission",key:`${i}-${t}`},"string"==typeof r?a.default.createElement("i",{className:r}):r,n,(0,o.getRightIcon)(e))}function c({permissions:e,targetSubjectMetadata:t}){const n=(0,i.useI18nContext)();return a.default.createElement("div",{className:"permissions-connect-permission-list"},(0,o.getWeightedPermissions)(n,e,t).map(l))}c.propTypes={permissions:r.default.object.isRequired,targetSubjectMetadata:r.default.object.isRequired}}}},{package:"$root$",file:"ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.js"}],[3674,{"../../../../app/scripts/lib/util":82,"../../../../shared/constants/app":3401,"../../../../shared/constants/time":3415,"../../../helpers/utils/webcam-utils":4109,"../../../hooks/useI18nContext":4129,"../../ui/page-container/page-container-footer/page-container-footer.component":3995,"./enhanced-reader":3675,"@ngraveio/bc-ur":1370,loglevel:2944,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=m(e("loglevel")),o=e("@ngraveio/bc-ur"),i=m(e("prop-types")),s=e("../../../../app/scripts/lib/util"),l=e("../../../../shared/constants/app"),c=m(e("../../../helpers/utils/webcam-utils")),u=m(e("../../ui/page-container/page-container-footer/page-container-footer.component")),d=e("../../../hooks/useI18nContext"),p=e("../../../../shared/constants/time"),f=m(e("./enhanced-reader"));function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}const g="ACCESSING_CAMERA",y="NEED_TO_ALLOW_ACCESS",v="READY",b=({isReadingWallet:e,handleCancel:t,handleSuccess:n,setErrorTitle:i})=>{const m=(0,d.useI18nContext)(),[h,b]=(0,a.useState)(g),[_,E]=(0,a.useState)(null),[T,w]=(0,a.useState)(new o.URDecoder);let k=null;const O=(0,a.useRef)(!1),N=async()=>{try{const{environmentReady:e}=await c.default.checkStatus();if(!e&&(0,s.getEnvironmentType)()!==l.ENVIRONMENT_TYPE_FULLSCREEN){const e=new URL(window.location.href).hash,t=e?e.substring(1):null;global.platform.openExtensionInBrowser(t)}}catch(e){O.current&&E(e)}return M()},C=async()=>{try{const{permissions:e}=await c.default.checkStatus();if(e){if(await new Promise((e=>setTimeout(e,2*p.SECOND))),!O.current)return;b(v)}else O.current&&(k=setTimeout(C,p.SECOND),b(y))}catch(e){O.current&&E(e)}},P=t=>{try{if(!t)return;if(T.receivePart(t),T.isComplete()){const e=T.resultUR();n(e).catch(E)}}catch(t){i(m(e?"QRHardwareUnknownQRCodeTitle":"QRHardwareInvalidTransactionTitle")),E(new Error(m("unknownQrCode")))}},M=()=>{try{C()}catch(e){if(!O.current)return;"NotAllowedError"===e.name?(r.default.info(`Permission denied: '${e}'`),b(y)):E(e)}};(0,a.useEffect)((()=>(O.current=!0,N(),()=>{O.current=!1,clearTimeout(k)})),[]),(0,a.useEffect)((()=>{h===v?M():h===y&&C()}),[h]);const S=()=>{clearTimeout(k),b(g),E(null),w(new o.URDecoder),N()};return a.default.createElement("div",{className:"qr-scanner"},_?(()=>{let n,r;return"NO_WEBCAM_FOUND"===_.type?(n=m("noWebcamFoundTitle"),r=m("noWebcamFound")):_.message===m("unknownQrCode")?r=m(e?"QRHardwareUnknownWalletQRCode":"unknownQrCode"):_.message===m("QRHardwareMismatchedSignId")?r=m("QRHardwareMismatchedSignId"):(n=m("unknownCameraErrorTitle"),r=m("unknownCameraError")),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"qr-scanner__image"},a.default.createElement("img",{src:"images/webcam.svg",width:"70",height:"70",alt:""})),n?a.default.createElement("div",{className:"qr-scanner__title"},n):null,a.default.createElement("div",{className:"qr-scanner__error"},r),a.default.createElement(u.default,{onCancel:()=>{i(""),t()},onSubmit:()=>{i(""),S()},cancelText:m("cancel"),submitText:m("tryAgain"),submitButtonType:"confirm"}))})():(()=>{let e;return h===g?e=m("accessingYourCamera"):h===v?e=m("QRHardwareScanInstructions"):h===y&&(e=m("youNeedToAllowCameraAccess")),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"qr-scanner__content"},a.default.createElement(f.default,{handleScan:P})),e&&a.default.createElement("div",{className:"qr-scanner__status"},e))})())};b.propTypes={isReadingWallet:i.default.bool.isRequired,handleCancel:i.default.func.isRequired,handleSuccess:i.default.func.isRequired,setErrorTitle:i.default.func.isRequired};var _=b;n.default=_}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/base-reader.js"}],[3675,{"../../../../shared/constants/time":3415,"../../ui/spinner":4017,"@zxing/browser":1657,"@zxing/library":1668,loglevel:2944,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("@zxing/library"),o=e("@zxing/browser"),i=u(e("loglevel")),s=u(e("prop-types")),l=e("../../../../shared/constants/time"),c=u(e("../../ui/spinner"));function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const p=({handleScan:e})=>{const[t,n]=(0,a.useState)(!1),s=(0,a.useMemo)((()=>{const e=new Map;return e.set(r.DecodeHintType.POSSIBLE_FORMATS,[r.BarcodeFormat.QR_CODE]),new o.BrowserQRCodeReader(e,{delayBetweenScanAttempts:100*l.MILLISECOND,delayBetweenScanSuccess:100*l.MILLISECOND})}),[]);return(0,a.useEffect)((()=>{const t=document.getElementById("video"),a=()=>{n(!0)};t.addEventListener("canplay",a);const r=s.decodeFromVideoDevice(undefined,"video",(t=>{t&&e(t.getText())}));return()=>{t.removeEventListener("canplay",a),r.then((e=>{e&&e.stop()})).catch(i.default.info)}}),[]),a.default.createElement("div",{className:"qr-scanner__content__video-wrapper"},a.default.createElement("video",{id:"video",style:{display:t?"block":"none",width:"100%",filter:"blur(4px)"}}),t?null:a.default.createElement(c.default,{color:"var(--color-warning-default)"}))};p.propTypes={handleScan:s.default.func.isRequired};var f=p;n.default=f}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/enhanced-reader.js"}],[3676,{"./qr-hardware-popover":3677},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var a;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=((a=e("./qr-hardware-popover"))&&a.__esModule?a:{default:a}).default;n.default=r}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/index.js"}],[3677,{"../../../../shared/constants/app":3401,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../../store/actions":4443,"../../ui/popover":3999,"./qr-hardware-sign-request":3678,"./qr-hardware-wallet-importer":3682,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=e("../../../selectors"),i=p(e("../../ui/popover")),s=e("../../../hooks/useI18nContext"),l=e("../../../store/actions"),c=e("../../../../shared/constants/app"),u=p(e("./qr-hardware-wallet-importer")),d=p(e("./qr-hardware-sign-request"));function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var m=()=>{var e;const t=(0,s.useI18nContext)(),n=(0,r.useSelector)(o.getCurrentQRHardwareState),{sync:p,sign:f}=n,m=null==p?void 0:p.reading,h=null==f?void 0:f.request,g=m||h,[y,v]=(0,a.useState)(""),{txData:b}=(0,r.useSelector)((e=>e.confirmTransaction)),_=(0,a.useMemo)((()=>b),[null==f||null===(e=f.request)||void 0===e?void 0:e.requestId]),E=(0,r.useDispatch)(),T=(0,a.useCallback)((()=>E((0,l.cancelSyncQRHardware)())),[E]),w=(0,a.useCallback)((()=>{let e=l.cancelTx;switch(_.type){case c.MESSAGE_TYPE.PERSONAL_SIGN:e=l.cancelPersonalMsg;break;case c.MESSAGE_TYPE.ETH_SIGN:e=l.cancelMsg;break;case c.MESSAGE_TYPE.ETH_SIGN_TYPED_DATA:e=l.cancelTypedMsg;break;default:e=l.cancelTx}E(e(_)),E((0,l.cancelQRHardwareSignRequest)())}),[E,_]),k=(0,a.useMemo)((()=>{let e="";return h?e=t("QRHardwareSignRequestTitle"):m&&(e=t("QRHardwareWalletImporterTitle")),""!==y&&(e=y),e}),[h,m,t,y]);return g?a.default.createElement(i.default,{title:k,onClose:m?T:w},m&&a.default.createElement(u.default,{handleCancel:T,setErrorTitle:v}),h&&a.default.createElement(d.default,{setErrorTitle:v,handleCancel:w,request:f.request})):null};n.default=m}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-popover.js"}],[3678,{"./qr-hardware-sign-request.component":3680},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var a;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=((a=e("./qr-hardware-sign-request.component"))&&a.__esModule?a:{default:a}).default;n.default=r}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-sign-request/index.js"}],[3679,{"../../../../helpers/constants/design-system":4070,"../../../../hooks/useI18nContext":4129,"../../../ui/box":3900,"../../../ui/page-container":3992,"../../../ui/typography":4039,"@ngraveio/bc-ur":1370,buffer:1943,"prop-types":3032,"qrcode.react":3069,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=p(e("qrcode.react")),o=e("@ngraveio/bc-ur"),i=p(e("prop-types")),s=p(e("../../../ui/typography")),l=p(e("../../../ui/box")),c=e("../../../../hooks/useI18nContext"),u=e("../../../../helpers/constants/design-system"),d=e("../../../ui/page-container");function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const m=({type:e,cbor:n,cancelQRHardwareSignRequest:i,toRead:p})=>{const f=(0,c.useI18nContext)(),m=(0,a.useMemo)((()=>new o.UREncoder(new o.UR(t.from(n,"hex"),e),400)),[n,e]),[h,g]=(0,a.useState)(m.nextPart());return(0,a.useEffect)((()=>{const e=setInterval((()=>{g(m.nextPart())}),100);return()=>{clearInterval(e)}}),[m]),a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null,a.default.createElement(s.default,{align:u.TEXT_ALIGN.CENTER},f("QRHardwareSignRequestSubtitle"))),a.default.createElement(l.default,{paddingTop:4,paddingBottom:4,display:u.DISPLAY.FLEX,alignItems:u.AlignItems.center,flexDirection:u.FLEX_DIRECTION.COLUMN},a.default.createElement("div",{style:{padding:20,backgroundColor:"var(--qr-code-white-background)"}},a.default.createElement(r.default,{value:h.toUpperCase(),size:250}))),a.default.createElement(l.default,{paddingBottom:4,paddingLeft:4,paddingRight:4},a.default.createElement(s.default,{align:u.TEXT_ALIGN.CENTER},f("QRHardwareSignRequestDescription"))),a.default.createElement(d.PageContainerFooter,{onCancel:i,onSubmit:p,cancelText:f("QRHardwareSignRequestCancel"),submitText:f("QRHardwareSignRequestGetSignature"),submitButtonType:"confirm"}))};m.propTypes={type:i.default.string.isRequired,cbor:i.default.string.isRequired,cancelQRHardwareSignRequest:i.default.func.isRequired,toRead:i.default.func.isRequired};var h=m;n.default=h}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-sign-request/player.js"}],[3680,{"../../../../store/actions":4443,"./player":3679,"./reader":3681,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=l(e("prop-types")),o=e("../../../../store/actions"),i=l(e("./player")),s=l(e("./reader"));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const u=({request:e,handleCancel:t,setErrorTitle:n})=>{const[r,l]=(0,a.useState)("play"),c=(0,a.useCallback)((()=>l("read")),[]);return"play"===r?(()=>{const{payload:n}=e;return a.default.createElement(i.default,{type:n.type,cbor:n.cbor,cancelQRHardwareSignRequest:t,toRead:c})})():a.default.createElement(s.default,{cancelQRHardwareSignRequest:t,submitQRHardwareSignature:o.submitQRHardwareSignature,requestId:e.requestId,setErrorTitle:n})};u.propTypes={request:r.default.object.isRequired,handleCancel:r.default.func.isRequired,setErrorTitle:r.default.func.isRequired};var d=u;n.default=d}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-sign-request/qr-hardware-sign-request.component.js"}],[3681,{"../../../../hooks/useI18nContext":4129,"../base-reader":3674,"@keystonehq/bc-ur-registry-eth":524,"prop-types":3032,react:3177,uuid:3351},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=u(e("react")),r=e("@keystonehq/bc-ur-registry-eth"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("uuid")),i=u(e("prop-types")),s=u(e("../base-reader")),l=e("../../../../hooks/useI18nContext");function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}const d=({submitQRHardwareSignature:e,cancelQRHardwareSignRequest:t,requestId:n,setErrorTitle:i})=>{const c=(0,l.useI18nContext)();return a.default.createElement(s.default,{isReadingWallet:!1,handleCancel:()=>{t()},handleSuccess:async t=>{if("eth-signature"===t.type){const a=r.ETHSignature.fromCBOR(t.cbor).getRequestId(),s=o.stringify(a);if(s===n)return await e(s,t.cbor.toString("hex"));throw i(c("QRHardwareInvalidTransactionTitle")),new Error(c("QRHardwareMismatchedSignId"))}throw i(c("QRHardwareInvalidTransactionTitle")),new Error(c("unknownQrCode"))},setErrorTitle:i})};d.propTypes={submitQRHardwareSignature:i.default.func.isRequired,cancelQRHardwareSignRequest:i.default.func.isRequired,requestId:i.default.string.isRequired,setErrorTitle:i.default.func.isRequired};var p=d;n.default=p}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-sign-request/reader.js"}],[3682,{"./qr-hardware-wallet-importer.component":3683},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var a;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=((a=e("./qr-hardware-wallet-importer.component"))&&a.__esModule?a:{default:a}).default;n.default=r}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-wallet-importer/index.js"}],[3683,{"../../../../hooks/useI18nContext":4129,"../../../../store/actions":4443,"../base-reader":3674,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),r=l(e("prop-types")),o=e("../../../../store/actions"),i=l(e("../base-reader")),s=e("../../../../hooks/useI18nContext");function l(e){return e&&e.__esModule?e:{default:e}}const c=({handleCancel:e,setErrorTitle:t})=>{const n=(0,s.useI18nContext)();return a.default.createElement(i.default,{isReadingWallet:!0,handleCancel:e,handleSuccess:async e=>{if("crypto-hdkey"===e.type)return await(0,o.submitQRHardwareCryptoHDKey)(e.cbor.toString("hex"));if("crypto-account"===e.type)return await(0,o.submitQRHardwareCryptoAccount)(e.cbor.toString("hex"));throw t(n("QRHardwareUnknownQRCodeTitle")),new Error(n("unknownQrCode"))},setErrorTitle:t})};c.propTypes={handleCancel:r.default.func.isRequired,setErrorTitle:r.default.func.isRequired};var u=c;n.default=u}}},{package:"$root$",file:"ui/components/app/qr-hardware-popover/qr-hardware-wallet-importer/qr-hardware-wallet-importer.component.js"}],[3684,{"./recovery-phrase-reminder":3685},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./recovery-phrase-reminder"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/recovery-phrase-reminder/index.js"}],[3685,{"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../hooks/useI18nContext":4129,"../../ui/box":3900,"../../ui/button":3904,"../../ui/popover":3999,"../../ui/typography":4039,"prop-types":3032,react:3177,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=m;var a=f(e("react")),r=f(e("prop-types")),o=e("react-router-dom"),i=e("../../../hooks/useI18nContext"),s=f(e("../../ui/box")),l=f(e("../../ui/button")),c=f(e("../../ui/popover")),u=f(e("../../ui/typography")),d=e("../../../helpers/constants/design-system"),p=e("../../../helpers/constants/routes");function f(e){return e&&e.__esModule?e:{default:e}}function m({onConfirm:e,hasBackedUp:t}){const n=(0,i.useI18nContext)(),r=(0,o.useHistory)();return a.default.createElement(c.default,{centerTitle:!0,title:n("recoveryPhraseReminderTitle")},a.default.createElement(s.default,{paddingRight:4,paddingBottom:6,paddingLeft:4,className:"recovery-phrase-reminder"},a.default.createElement(u.default,{color:d.TextColor.textDefault,align:d.TEXT_ALIGN.CENTER,variant:d.TypographyVariant.paragraph,boxProps:{marginTop:0,marginBottom:4}},n("recoveryPhraseReminderSubText")),a.default.createElement(s.default,{marginTop:4,marginBottom:8},a.default.createElement("ul",{className:"recovery-phrase-reminder__list"},a.default.createElement("li",null,a.default.createElement(u.default,{as:"span",color:d.TextColor.textDefault,fontWeight:d.FONT_WEIGHT.BOLD},n("recoveryPhraseReminderItemOne"))),a.default.createElement("li",null,n("recoveryPhraseReminderItemTwo")),a.default.createElement("li",null,t?n("recoveryPhraseReminderHasBackedUp"):a.default.createElement(a.default.Fragment,null,n("recoveryPhraseReminderHasNotBackedUp"),a.default.createElement(s.default,{display:d.DISPLAY.INLINE_BLOCK,marginLeft:1},a.default.createElement(l.default,{type:"link",onClick:()=>{r.push(p.ONBOARDING_UNLOCK_ROUTE)},style:{fontSize:"inherit",padding:0}},n("recoveryPhraseReminderBackupStart"))))))),a.default.createElement(s.default,{justifyContent:d.JustifyContent.center},a.default.createElement(s.default,{width:d.BLOCK_SIZES.TWO_FIFTHS},a.default.createElement(l.default,{type:"primary",onClick:e},n("recoveryPhraseReminderConfirm"))))))}m.propTypes={hasBackedUp:r.default.bool.isRequired,onConfirm:r.default.func.isRequired}}}},{package:"$root$",file:"ui/components/app/recovery-phrase-reminder/recovery-phrase-reminder.js"}],[3686,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SECURITY_PROVIDER_MESSAGE_SEVERITIES=void 0;n.SECURITY_PROVIDER_MESSAGE_SEVERITIES={NOT_MALICIOUS:0,MALICIOUS:1,NOT_SAFE:2}}}},{package:"$root$",file:"ui/components/app/security-provider-banner-message/security-provider-banner-message.constants.js"}],[3687,{"../../../../.storybook/i18n":1,"../../../helpers/constants/design-system":4070,"../../component-library":3840,"../../ui/typography/typography":4040,"./security-provider-banner-message.constants":3686,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=u(e("prop-types")),o=e("../../../helpers/constants/design-system"),i=e("../../../../.storybook/i18n"),s=e("../../component-library"),l=u(e("../../ui/typography/typography")),c=e("./security-provider-banner-message.constants");function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p({securityProviderResponse:e}){const t=(0,a.useContext)(i.I18nContext);let n,r,u;return e.flagAsDangerous===c.SECURITY_PROVIDER_MESSAGE_SEVERITIES.MALICIOUS?(n=""===e.reason_header?t("requestFlaggedAsMaliciousFallbackCopyReasonTitle"):e.reason_header,r=""===e.reason?t("requestFlaggedAsMaliciousFallbackCopyReason"):e.reason,u=o.SEVERITIES.DANGER):e.flagAsDangerous===c.SECURITY_PROVIDER_MESSAGE_SEVERITIES.NOT_SAFE?(n=t("requestMayNotBeSafe"),r=t("requestMayNotBeSafeError"),u=o.SEVERITIES.WARNING):(n=t("requestNotVerified"),r=t("requestNotVerifiedError"),u=o.SEVERITIES.WARNING),a.default.createElement(s.BannerAlert,{marginTop:4,marginRight:4,marginLeft:4,title:n,severity:u},a.default.createElement(l.default,{variant:o.TypographyVariant.H6},r),a.default.createElement(l.default,{variant:o.TypographyVariant.H7,color:o.Color.textAlternative},t("thisIsBasedOn"),a.default.createElement(s.ButtonLink,{size:o.Size.inherit,href:"https://opensea.io/",target:"_blank"},t("openSeaNew"))))}p.propTypes={securityProviderResponse:r.default.object}}}},{package:"$root$",file:"ui/components/app/security-provider-banner-message/security-provider-banner-message.js"}],[3688,{"./selected-account.container":3690},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var a;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=((a=e("./selected-account.container"))&&a.__esModule?a:{default:a}).default;n.default=r}}},{package:"$root$",file:"ui/components/app/selected-account/index.js"}],[3689,{"../../../../shared/constants/time":3415,"../../../../shared/modules/hexstring-utils":3435,"../../../helpers/constants/design-system":4070,"../../../helpers/utils/util":4108,"../../component-library/icon/deprecated":3836,"../../ui/tooltip":4035,"copy-to-clipboard":2032,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=p(e("prop-types")),o=p(e("copy-to-clipboard")),i=e("../../../helpers/utils/util"),s=p(e("../../ui/tooltip")),l=e("../../../../shared/modules/hexstring-utils"),c=e("../../../../shared/constants/time"),u=e("../../component-library/icon/deprecated"),d=e("../../../helpers/constants/design-system");function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.Component{constructor(...e){super(...e),m(this,"state",{copied:!1})}componentDidMount(){this.copyTimeout=null}componentWillUnmount(){this.copyTimeout&&(clearTimeout(this.copyTimeout),this.copyTimeout=null)}render(){const{t:e}=this.context,{selectedIdentity:t}=this.props,n=(0,l.toChecksumHexAddress)(t.address);return a.default.createElement("div",{className:"selected-account"},a.default.createElement(s.default,{wrapperClassName:"selected-account__tooltip-wrapper",position:"bottom",title:this.state.copied?e("copiedExclamation"):e("copyToClipboard")},a.default.createElement("button",{className:"selected-account__clickable","data-testid":"selected-account-click",onClick:()=>{this.setState({copied:!0}),this.copyTimeout=setTimeout((()=>this.setState({copied:!1})),3*c.SECOND),(0,o.default)(n)}},a.default.createElement("div",{className:"selected-account__name"},t.name),a.default.createElement("div",{className:"selected-account__address"},(0,i.shortenAddress)(n),a.default.createElement("div",{className:"selected-account__copy"},a.default.createElement(u.Icon,{name:this.state.copied?u.ICON_NAMES.COPY_SUCCESS:u.ICON_NAMES.COPY,size:u.ICON_SIZES.SM,color:d.IconColor.iconAlternative}))))))}}m(h,"contextTypes",{t:r.default.func}),m(h,"propTypes",{selectedIdentity:r.default.object.isRequired});var g=h;n.default=g}}},{package:"$root$",file:"ui/components/app/selected-account/selected-account.component.js"}],[3690,{"../../../selectors":4436,"./selected-account.component":3689,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../selectors"),i=(a=e("./selected-account.component"))&&a.__esModule?a:{default:a};var s=(0,r.connect)((e=>({selectedIdentity:(0,o.getSelectedIdentity)(e)})))(i.default);n.default=s}}},{package:"$root$",file:"ui/components/app/selected-account/selected-account.container.js"}],[3691,{"./set-approval-for-all-warning":3692},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./set-approval-for-all-warning"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/set-approval-for-all-warning/index.js"}],[3692,{"../../../helpers/constants/design-system":4070,"../../../helpers/utils/util":4108,"../../../hooks/useI18nContext":4129,"../../component-library/icon/deprecated":3836,"../../ui/box":3900,"../../ui/button":3904,"../../ui/identicon":3962,"../../ui/popover":3999,"../../ui/typography":4039,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),r=m(e("prop-types")),o=e("../../../hooks/useI18nContext"),i=m(e("../../ui/popover")),s=m(e("../../ui/box")),l=m(e("../../ui/button")),c=m(e("../../ui/typography")),u=e("../../../helpers/constants/design-system"),d=m(e("../../ui/identicon")),p=e("../../../helpers/utils/util"),f=e("../../component-library/icon/deprecated");function m(e){return e&&e.__esModule?e:{default:e}}const h=({collectionName:e,senderAddress:t,name:n,total:r,isERC721:m,onSubmit:h,onCancel:g})=>{const y=(0,o.useI18nContext)(),v=a.default.createElement(s.default,{display:u.DISPLAY.FLEX,flexDirection:u.FLEX_DIRECTION.COLUMN,justifyContent:u.JustifyContent.SPACE_BETWEEN,className:"set-approval-for-all-warning__footer"},a.default.createElement(l.default,{className:"set-approval-for-all-warning__footer__approve-button",type:"danger-primary",onClick:h},y("approveButtonText")),a.default.createElement(l.default,{className:"set-approval-for-all-warning__footer__cancel-button",type:"secondary",onClick:g},y("reject")));return a.default.createElement(i.default,{className:"set-approval-for-all-warning__content",footer:v},a.default.createElement(s.default,{display:u.DISPLAY.FLEX,flexDirection:u.FLEX_DIRECTION.ROW,padding:4,className:"set-approval-for-all-warning__content__header"},a.default.createElement(f.Icon,{name:f.ICON_NAMES.DANGER,className:"set-approval-for-all-warning__content__header__warning-icon"}),a.default.createElement(c.default,{variant:u.TypographyVariant.H4,fontWeight:u.FONT_WEIGHT.BOLD},y("yourNFTmayBeAtRisk"))),a.default.createElement(s.default,{display:u.DISPLAY.FLEX,padding:4,justifyContent:u.JustifyContent.spaceBetween,className:"set-approval-for-all-warning__content__account"},a.default.createElement(s.default,{display:u.DISPLAY.FLEX},a.default.createElement(d.default,{address:t,diameter:32}),a.default.createElement(c.default,{variant:u.TypographyVariant.H5,marginLeft:2,className:"set-approval-for-all-warning__content__account-name"},a.default.createElement("b",null,n)," ",` (${(0,p.shortenAddress)(t)})`)),m&&r&&a.default.createElement(c.default,null,`${y("total")}: ${r}`)),a.default.createElement(c.default,{color:u.TextColor.textAlternative,margin:4,marginTop:4,marginBottom:4,variant:u.TypographyVariant.H6},y("nftWarningContent",[a.default.createElement("strong",{key:"non_custodial_bold",className:"set-approval-for-all-warning__content__bold"},y("nftWarningContentBold",[e||""])),a.default.createElement("strong",{key:"non_custodial_grey"},y("nftWarningContentGrey"))])))};h.propTypes={collectionName:r.default.string,senderAddress:r.default.string,name:r.default.string,total:r.default.string,isERC721:r.default.bool,onSubmit:r.default.func,onCancel:r.default.func};var g=h;n.default=g}}},{package:"$root$",file:"ui/components/app/set-approval-for-all-warning/set-approval-for-all-warning.js"}],[3693,{"./signature-request-original.container":3697},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-original.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request-original/index.js"}],[3694,{"./signature-request-original-warning":3695},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-original-warning"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request-original/signature-request-original-warning/index.js"}],[3695,{"../../../../helpers/constants/design-system":4070,"../../../../helpers/utils/util":4108,"../../../../hooks/useI18nContext":4129,"../../../component-library/icon/deprecated":3836,"../../../ui/box":3900,"../../../ui/button":3904,"../../../ui/identicon":3962,"../../../ui/popover":3999,"../../../ui/typography":4039,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),r=m(e("prop-types")),o=e("../../../../hooks/useI18nContext"),i=m(e("../../../ui/popover")),s=m(e("../../../ui/box")),l=m(e("../../../ui/button")),c=m(e("../../../ui/typography")),u=e("../../../../helpers/constants/design-system"),d=m(e("../../../ui/identicon")),p=e("../../../../helpers/utils/util"),f=e("../../../component-library/icon/deprecated");function m(e){return e&&e.__esModule?e:{default:e}}const h=({senderAddress:e,name:t,onSubmit:n,onCancel:r})=>{const m=(0,o.useI18nContext)();return a.default.createElement(i.default,{className:"signature-request-warning__content"},a.default.createElement(s.default,{display:u.DISPLAY.FLEX,flexDirection:u.FLEX_DIRECTION.ROW,padding:4,className:"signature-request-warning__content__header"},a.default.createElement(f.Icon,{name:f.ICON_NAMES.DANGER,color:u.IconColor.errorDefault,className:"signature-request-warning__content__header__warning-icon"}),a.default.createElement(c.default,{variant:u.TypographyVariant.H4,fontWeight:u.FONT_WEIGHT.BOLD},m("yourFundsMayBeAtRisk"))),a.default.createElement(s.default,{display:u.DISPLAY.FLEX,padding:4,justifyContent:u.JustifyContent.spaceBetween,className:"signature-request-warning__content__account"},a.default.createElement(s.default,{display:u.DISPLAY.FLEX},a.default.createElement(d.default,{address:e,diameter:32}),a.default.createElement(c.default,{variant:u.TypographyVariant.H5,marginLeft:2,className:"signature-request-warning__content__account-name"},a.default.createElement("b",null,t)," ",` (${(0,p.shortenAddress)(e)})`))),a.default.createElement(c.default,{color:u.TextColor.textAlternative,margin:4,marginTop:4,marginBottom:4,variant:u.TypographyVariant.H6},m("signatureRequestWarning",[a.default.createElement("a",{href:"https://consensys.net/blog/metamask/the-seal-of-approval-know-what-youre-consenting-to-with-permissions-and-approvals-in-metamask/",target:"_blank",type:"link",key:"non_custodial_link",rel:"noopener noreferrer",style:{color:"var(--color-primary-default)"}},m("learnMoreUpperCase"))])),a.default.createElement(s.default,{display:u.DISPLAY.FLEX,flexDirection:u.FLEX_DIRECTION.COLUMN,justifyContent:u.JustifyContent.spaceBetween,padding:4,className:"signature-request-warning__footer"},a.default.createElement(l.default,{className:"signature-request-warning__footer__sign-button",type:"danger-primary",onClick:n},m("sign")),a.default.createElement(l.default,{className:"signature-request-warning__footer__reject-button",type:"secondary",onClick:r},m("reject"))))};h.propTypes={senderAddress:r.default.string,name:r.default.string,onSubmit:r.default.func,onCancel:r.default.func};var g=h;n.default=g}}},{package:"$root$",file:"ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js"}],[3696,{"../../../../shared/constants/app":3401,"../../../../shared/constants/common":3403,"../../../../shared/constants/network":3409,"../../../../shared/modules/Numeric":3427,"../../../../shared/modules/conversion.utils":3431,"../../../../shared/modules/hexstring-utils":3435,"../../../helpers/constants/design-system":4070,"../../../helpers/utils/confirm-tx.util":4090,"../../../helpers/utils/util":4108,"../../ui/button":3904,"../../ui/page-container":3992,"../../ui/site-origin":4015,"../../ui/typography/typography":4040,"../confirm-page-container/confirm-page-container-navigation":3511,"../ledger-instruction-field":3580,"../network-account-balance-header":3649,"../security-provider-banner-message/security-provider-banner-message":3687,"../security-provider-banner-message/security-provider-banner-message.constants":3686,"./signature-request-original-warning":3694,buffer:1943,classnames:1980,"prop-types":3032,react:3177,"react-inspector":3085},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=N(e("prop-types")),o=N(e("classnames")),i=e("react-inspector"),s=N(e("../ledger-instruction-field")),l=e("../../../../shared/constants/app"),c=e("../../../helpers/utils/util"),u=e("../../../../shared/modules/hexstring-utils"),d=N(e("../../ui/button")),p=N(e("../../ui/site-origin")),f=N(e("../network-account-balance-header")),m=N(e("../../ui/typography/typography")),h=e("../../ui/page-container"),g=e("../../../helpers/constants/design-system"),y=e("../../../../shared/constants/network"),v=e("../../../../shared/modules/Numeric"),b=e("../../../../shared/constants/common"),_=N(e("../confirm-page-container/confirm-page-container-navigation")),E=N(e("../security-provider-banner-message/security-provider-banner-message")),T=e("../security-provider-banner-message/security-provider-banner-message.constants"),w=e("../../../helpers/utils/confirm-tx.util"),k=e("../../../../shared/modules/conversion.utils"),O=N(e("./signature-request-original-warning"));function N(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function P(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class M extends a.Component{constructor(...e){super(...e),P(this,"state",{showSignatureRequestWarning:!1}),P(this,"msgHexToText",(e=>{try{const n=(0,u.stripHexPrefix)(e),a=t.from(n,"hex");return 32===a.length?e:a.toString("utf8")}catch(t){return e}})),P(this,"renderTypedData",(e=>{const{t:t}=this.context,{domain:n,message:r}=JSON.parse(e);return a.default.createElement("div",{className:"request-signature__typed-container"},n?a.default.createElement("div",null,a.default.createElement("h1",null,t("domain")),a.default.createElement(i.ObjectInspector,{data:n,expandLevel:1,name:"domain"})):"",r?a.default.createElement("div",null,a.default.createElement("h1",null,t("message")),a.default.createElement(i.ObjectInspector,{data:r,expandLevel:1,name:"message"})):"")})),P(this,"renderBody",(()=>{var e,t;let n;const r=`${this.context.t("youSign")}:`,{txData:i,subjectMetadata:s}=this.props,{type:u,msgParams:{data:d}}=i;u===l.MESSAGE_TYPE.PERSONAL_SIGN?n=[{name:this.context.t("message"),value:this.msgHexToText(d)}]:u===l.MESSAGE_TYPE.ETH_SIGN_TYPED_DATA?n=d:u===l.MESSAGE_TYPE.ETH_SIGN&&(n=[{name:this.context.t("message"),value:d}]);const f=i.msgParams.origin?null==s?void 0:s[i.msgParams.origin]:null;return a.default.createElement("div",{className:"request-signature__body"},(null==i||null===(e=i.securityProviderResponse)||void 0===e?void 0:e.flagAsDangerous)!==undefined&&(null==i||null===(t=i.securityProviderResponse)||void 0===t?void 0:t.flagAsDangerous)!==T.SECURITY_PROVIDER_MESSAGE_SEVERITIES.NOT_MALICIOUS||null!=i&&i.securityProviderResponse&&0===Object.keys(i.securityProviderResponse).length?a.default.createElement(E.default,{securityProviderResponse:i.securityProviderResponse}):null,a.default.createElement("div",{className:"request-signature__origin"},a.default.createElement(p.default,{title:i.msgParams.origin,siteOrigin:i.msgParams.origin,iconSrc:null==f?void 0:f.iconUrl,iconName:(0,c.getURLHostName)(null==f?void 0:f.origin)||(null==f?void 0:f.origin),chip:!0})),a.default.createElement(m.default,{className:"request-signature__content__title",variant:g.TypographyVariant.H3,fontWeight:g.FONT_WEIGHT.BOLD},this.context.t("sigRequest")),a.default.createElement(m.default,{className:"request-signature__content__subtitle",variant:g.TypographyVariant.H7,color:g.TextColor.textAlternative,align:g.TEXT_ALIGN.CENTER,margin:12,marginTop:3},this.context.t("signatureRequestGuidance")),a.default.createElement("div",{className:(0,o.default)("request-signature__notice")},r),a.default.createElement("div",{className:"request-signature__rows"},n.map((({name:e,value:t},n)=>("boolean"==typeof t&&(t=t.toString()),a.default.createElement("div",{className:"request-signature__row",key:`request-signature-row-${n}`},a.default.createElement("div",{className:"request-signature__row-title"},(0,c.sanitizeString)(`${e}:`)),a.default.createElement("div",{className:"request-signature__row-value"},(0,c.sanitizeString)(t))))))))})),P(this,"onSubmit",(async e=>{const{clearConfirmTransaction:t,history:n,mostRecentOverviewPage:a,sign:r}=this.props;await r(e),t(),n.push(a)})),P(this,"onCancel",(async e=>{const{clearConfirmTransaction:t,history:n,mostRecentOverviewPage:a,cancel:r}=this.props;await r(e),t(),n.push(a)})),P(this,"renderFooter",(()=>{const{cancel:e,sign:t,clearConfirmTransaction:n,history:r,mostRecentOverviewPage:o,txData:{type:i},hardwareWalletRequiresConnection:s}=this.props,{t:c}=this.context;return a.default.createElement(h.PageContainerFooter,{cancelText:c("reject"),submitText:c("sign"),onCancel:async t=>{await e(t),n(),r.push(o)},onSubmit:async e=>{i===l.MESSAGE_TYPE.ETH_SIGN?this.setState({showSignatureRequestWarning:!0}):(await t(e),n(),r.push(o))},disabled:s})})),P(this,"handleCancelAll",(()=>{const{cancelAll:e,clearConfirmTransaction:t,history:n,mostRecentOverviewPage:a,showRejectTransactionsConfirmationModal:r,messagesCount:o}=this.props;r({unapprovedTxCount:o,onSubmit:async()=>{await e(),t(),n.push(a)}})})),P(this,"render",(()=>{const{messagesCount:e,nativeCurrency:t,currentCurrency:n,fromAccount:{address:r,balance:o,name:i},conversionRate:l}=this.props,{showSignatureRequestWarning:c}=this.state,{t:u}=this.context,p=u("rejectRequestsN",[e]),m=this.getNetworkName(),h=l?(0,w.formatCurrency)((0,k.getValueFromWeiHex)({value:o,fromCurrency:t,toCurrency:n,conversionRate:l,numberOfDecimals:6,toDenomination:b.EtherDenomination.ETH}),n):new v.Numeric(o,16,b.EtherDenomination.WEI).toDenomination(b.EtherDenomination.ETH).round(6).toBase(10).toString();return a.default.createElement("div",{className:"request-signature__container"},a.default.createElement("div",{className:"request-signature__navigation"},a.default.createElement(_.default,null)),a.default.createElement("div",{className:"request-signature__account"},a.default.createElement(f.default,{networkName:m,accountName:i,accountBalance:h,tokenName:l?null==n?void 0:n.toUpperCase():t,accountAddress:r})),this.renderBody(),this.props.isLedgerWallet?a.default.createElement("div",{className:"confirm-approve-content__ledger-instruction-wrapper"},a.default.createElement(s.default,{showDataInstruction:!0})):null,c&&a.default.createElement(O.default,{senderAddress:r,name:i,onSubmit:async e=>await this.onSubmit(e),onCancel:async e=>await this.onCancel(e)}),this.renderFooter(),e>1?a.default.createElement(d.default,{type:"link",className:"request-signature__container__reject",onClick:()=>this.handleCancelAll()},p):null)}))}getNetworkName(){const{provider:e}=this.props,t=e.type,{t:n}=this.context;switch(t){case y.NETWORK_TYPES.MAINNET:return n("mainnet");case y.NETWORK_TYPES.GOERLI:return n("goerli");case y.NETWORK_TYPES.SEPOLIA:return n("sepolia");case y.NETWORK_TYPES.LINEA_TESTNET:return n("lineatestnet");case y.NETWORK_TYPES.LOCALHOST:return n("localhost");default:return e.nickname||n("unknownNetwork")}}}n.default=M,P(M,"contextTypes",{t:r.default.func.isRequired}),P(M,"propTypes",{fromAccount:r.default.shape({address:r.default.string.isRequired,balance:r.default.string,name:r.default.string}).isRequired,cancel:r.default.func.isRequired,clearConfirmTransaction:r.default.func.isRequired,history:r.default.object.isRequired,mostRecentOverviewPage:r.default.string.isRequired,sign:r.default.func.isRequired,txData:r.default.object.isRequired,subjectMetadata:r.default.object,hardwareWalletRequiresConnection:r.default.bool,isLedgerWallet:r.default.bool,nativeCurrency:r.default.string.isRequired,currentCurrency:r.default.string.isRequired,conversionRate:r.default.number,messagesCount:r.default.number,showRejectTransactionsConfirmationModal:r.default.func.isRequired,cancelAll:r.default.func.isRequired,provider:r.default.object})}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"$root$",file:"ui/components/app/signature-request-original/signature-request-original.component.js"}],[3697,{"../../../../shared/constants/app":3401,"../../../ducks/confirm-transaction/confirm-transaction.duck":4055,"../../../ducks/history/history":4059,"../../../ducks/metamask/metamask":4062,"../../../helpers/utils/util":4108,"../../../selectors":4436,"../../../store/actions":4443,"./signature-request-original.component":3696,"react-redux":3130,"react-router-dom":3150,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("redux"),i=e("react-router-dom"),s=e("../../../../shared/constants/app"),l=e("../../../store/actions"),c=e("../../../selectors"),u=e("../../../helpers/utils/util"),d=e("../../../ducks/confirm-transaction/confirm-transaction.duck"),p=e("../../../ducks/history/history"),f=e("../../../ducks/metamask/metamask"),m=(a=e("./signature-request-original.component"))&&a.__esModule?a:{default:a};var h=(0,o.compose)(i.withRouter,(0,r.connect)((function(e,t){const{msgParams:{from:n}}=t.txData,{provider:a}=e.metamask,r=(0,c.doesAddressRequireLedgerHidConnection)(e,n),o=(0,f.isAddressLedger)(e,n),i=(0,c.unconfirmedMessagesHashSelector)(e),s=(0,c.getTotalUnapprovedMessagesCount)(e),{useNativeCurrencyAsPrimaryCurrency:l}=(0,c.getPreferences)(e);return{requester:null,requesterAddress:null,mostRecentOverviewPage:(0,p.getMostRecentOverviewPage)(e),hardwareWalletRequiresConnection:r,isLedgerWallet:o,nativeCurrency:(0,f.getNativeCurrency)(e),currentCurrency:(0,c.getCurrentCurrency)(e),conversionRate:l?null:(0,c.conversionRateSelector)(e),allAccounts:(0,c.accountsWithSendEtherInfoSelector)(e),subjectMetadata:(0,c.getSubjectMetadata)(e),messagesList:i,messagesCount:s,provider:a}}),(function(e){return{goHome:()=>e((0,l.goHome)()),clearConfirmTransaction:()=>e((0,d.clearConfirmTransaction)()),showRejectTransactionsConfirmationModal:({onSubmit:t,unapprovedTxCount:n})=>e((0,l.showModal)({name:"REJECT_TRANSACTIONS",onSubmit:t,unapprovedTxCount:n,isRequestType:!0})),cancelAll:t=>e((0,l.cancelMsgs)(t))}}),(function(e,t,n){const{signPersonalMessage:a,signTypedMessage:r,cancelPersonalMessage:o,cancelTypedMessage:i,signMessage:l,cancelMessage:c,txData:d}=n,{allAccounts:p,messagesList:f,...m}=e,{type:h,msgParams:{from:g}}=d,y=(0,u.getAccountByAddress)(p,g),{cancelAll:v}=t;let b,_;return h===s.MESSAGE_TYPE.PERSONAL_SIGN?(b=o,_=a):h===s.MESSAGE_TYPE.ETH_SIGN_TYPED_DATA?(b=i,_=r):h===s.MESSAGE_TYPE.ETH_SIGN&&(b=c,_=l),{...n,...m,...t,fromAccount:y,txData:d,cancel:b,sign:_,cancelAll:()=>v((0,u.valuesFor)(f))}})))(m.default);n.default=h}}},{package:"$root$",file:"ui/components/app/signature-request-original/signature-request-original.container.js"}],[3698,{"./signature-request-siwe":3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-siwe"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/index.js"}],[3699,{"./signature-request-siwe-header":3700},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-siwe-header"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe-header/index.js"}],[3700,{"../../../../contexts/i18n":4047,"../../../ui/tooltip":4035,"../../account-list-item":3447,"../../permissions-connect-header":3670,"../signature-request-siwe-icon":3701,"../signature-request-siwe-tag":3704,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=f;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=d(e("prop-types")),o=d(e("../../account-list-item")),i=e("../../../../contexts/i18n"),s=d(e("../../permissions-connect-header")),l=d(e("../signature-request-siwe-icon")),c=d(e("../signature-request-siwe-tag")),u=d(e("../../../ui/tooltip"));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f({fromAccount:e,domain:t,isSIWEDomainValid:n,subjectMetadata:r}){const d=(0,a.useContext)(i.I18nContext);return a.default.createElement("div",{className:"signature-request-siwe-header"},a.default.createElement(s.default,{iconUrl:r.iconUrl,iconName:r.name,headerTitle:d("SIWESiteRequestTitle"),headerText:d("SIWESiteRequestSubtitle"),siteOrigin:t,className:n?"":"bad-domain",leftIcon:!n&&a.default.createElement(u.default,{position:"bottom",html:a.default.createElement("p",null,d("SIWEDomainWarningBody",[t]))},a.default.createElement(l.default,null)),rightIcon:!n&&a.default.createElement(u.default,{position:"bottom",html:a.default.createElement("p",null,d("SIWEDomainWarningBody",[t]))},a.default.createElement(c.default,{text:d("SIWEDomainWarningLabel")}))}),e&&a.default.createElement(o.default,{account:e,className:"signature-request-siwe-header__account-list-item"}))}f.propTypes={fromAccount:r.default.object,domain:r.default.string,isSIWEDomainValid:r.default.bool,subjectMetadata:r.default.object}}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe-header/signature-request-siwe-header.js"}],[3701,{"../../../../helpers/constants/design-system":4070,"../../../component-library/icon/deprecated":3836,"../../../ui/box":3900,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(e("react")),r=e("../../../../helpers/constants/design-system"),o=s(e("../../../ui/box")),i=e("../../../component-library/icon/deprecated");function s(e){return e&&e.__esModule?e:{default:e}}var l=()=>a.default.createElement(o.default,{className:"signature-request-siwe-icon",display:r.DISPLAY.INLINE_FLEX,alignItems:r.AlignItems.center,backgroundColor:r.Color.errorDefault,justifyContent:r.JustifyContent.center},a.default.createElement(i.Icon,{name:i.ICON_NAMES.DANGER,color:r.Color.errorInverse}));n.default=l}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe-icon/index.js"}],[3702,{"./signature-request-siwe-message":3703},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-siwe-message"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe-message/index.js"}],[3703,{"../../../../helpers/constants/design-system":4070,"../../../ui/box":3900,"../../../ui/typography":4039,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),r=l(e("prop-types")),o=l(e("../../../ui/box")),i=l(e("../../../ui/typography")),s=e("../../../../helpers/constants/design-system");function l(e){return e&&e.__esModule?e:{default:e}}const c=({data:e})=>a.default.createElement(o.default,{className:"signature-request-siwe-message"},a.default.createElement(o.default,{flexDirection:s.FLEX_DIRECTION.COLUMN},e.map((({label:e,value:t},n)=>a.default.createElement(o.default,{key:n.toString(),marginTop:2,marginBottom:2},a.default.createElement(i.default,{variant:s.TypographyVariant.H4,marginTop:2,marginBottom:2},e),a.default.createElement(i.default,{className:"signature-request-siwe-message__sub-text",variant:s.TypographyVariant.H6,marginTop:2,marginBottom:2},t))))));c.propTypes={data:r.default.arrayOf(r.default.shape({label:r.default.string,value:r.default.oneOfType([r.default.string,r.default.number])}))};var u=a.default.memo(c);n.default=u}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe-message/signature-request-siwe-message.js"}],[3704,{"../../../../helpers/constants/design-system":4070,"../../../ui/box":3900,"../../../ui/typography/typography":4040,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),r=l(e("prop-types")),o=e("../../../../helpers/constants/design-system"),i=l(e("../../../ui/box")),s=l(e("../../../ui/typography/typography"));function l(e){return e&&e.__esModule?e:{default:e}}const c=({text:e})=>a.default.createElement(i.default,{className:"signature-request-siwe-tag",marginRight:1,display:o.DISPLAY.INLINE_FLEX,alignItems:o.AlignItems.center,backgroundColor:o.BackgroundColor.errorDefault,borderRadius:o.Size.XL,paddingLeft:4,paddingRight:4},a.default.createElement(s.default,{fontWeight:o.FONT_WEIGHT.BOLD,margin:0,variant:o.TypographyVariant.H7,color:o.TextColor.errorInverse},e));var u=c;n.default=u,c.propTypes={text:r.default.string}}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe-tag/index.js"}],[3705,{"../../../../shared/modules/siwe":3441,"../../../contexts/i18n":4047,"../../../ducks/metamask/metamask":4062,"../../../helpers/constants/design-system":4070,"../../../helpers/utils/util":4108,"../../../selectors":4436,"../../component-library":3840,"../../ui/check-box":3910,"../../ui/page-container":3992,"../../ui/popover":3999,"../ledger-instruction-field":3580,"../security-provider-banner-message/security-provider-banner-message":3687,"../security-provider-banner-message/security-provider-banner-message.constants":3686,"./signature-request-siwe-header":3699,"./signature-request-siwe-message":3702,loglevel:2944,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=k;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=T(e("prop-types")),o=e("react-redux"),i=T(e("loglevel")),s=e("../../component-library"),l=T(e("../../ui/popover")),c=T(e("../../ui/check-box")),u=e("../../../contexts/i18n"),d=e("../../ui/page-container"),p=e("../../../ducks/metamask/metamask"),f=e("../../../selectors"),m=e("../../../helpers/utils/util"),h=e("../../../../shared/modules/siwe"),g=e("../../../helpers/constants/design-system"),y=T(e("../security-provider-banner-message/security-provider-banner-message")),v=e("../security-provider-banner-message/security-provider-banner-message.constants"),b=T(e("../ledger-instruction-field")),_=T(e("./signature-request-siwe-header")),E=T(e("./signature-request-siwe-message"));function T(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function k({txData:e,cancelPersonalMessage:t,signPersonalMessage:n}){var r,T;const w=(0,o.useSelector)(f.accountsWithSendEtherInfoSelector),k=(0,o.useSelector)(f.getSubjectMetadata),{msgParams:{from:O,origin:N,siwe:{parsedMessage:C}}}=e,P=(0,o.useSelector)((e=>(0,p.isAddressLedger)(e,O))),M=(0,m.getAccountByAddress)(w,O),S=k[N],x=(0,a.useContext)(u.I18nContext),j=O.toLowerCase()===C.address.toLowerCase(),I=(()=>{let e=!1;if(N){const{host:t}=new URL(N);e=C.domain===t}return e})(),[A,R]=(0,a.useState)(!1),[D,L]=(0,a.useState)(!1),$=(0,a.useCallback)((async e=>{try{await n(e)}catch(e){i.default.error(e)}}),[n]),W=(0,a.useCallback)((async e=>{try{await t(e)}catch(e){i.default.error(e)}}),[t]);return a.default.createElement("div",{className:"signature-request-siwe"},a.default.createElement(_.default,{fromAccount:M,domain:N,isSIWEDomainValid:I,subjectMetadata:S}),(null==e||null===(r=e.securityProviderResponse)||void 0===r?void 0:r.flagAsDangerous)!==undefined&&(null==e||null===(T=e.securityProviderResponse)||void 0===T?void 0:T.flagAsDangerous)!==v.SECURITY_PROVIDER_MESSAGE_SEVERITIES.NOT_MALICIOUS||null!=e&&e.securityProviderResponse&&0===Object.keys(e.securityProviderResponse).length?a.default.createElement(y.default,{securityProviderResponse:e.securityProviderResponse}):null,a.default.createElement(E.default,{data:(0,h.formatMessageParams)(C,x)}),!j&&a.default.createElement(s.BannerAlert,{severity:g.SEVERITIES.WARNING,marginLeft:4,marginRight:4,marginBottom:4},x("SIWEAddressInvalid",[C.address,M.address])),P&&a.default.createElement("div",{className:"confirm-approve-content__ledger-instruction-wrapper"},a.default.createElement(b.default,{showDataInstruction:!0})),!I&&a.default.createElement(s.BannerAlert,{severity:g.SEVERITIES.DANGER,marginLeft:4,marginRight:4,marginBottom:4},a.default.createElement(s.Text,{variant:g.TextVariant.bodyMdBold},x("SIWEDomainInvalidTitle"))," ",a.default.createElement(s.Text,null,x("SIWEDomainInvalidText"))),a.default.createElement(d.PageContainerFooter,{footerClassName:"signature-request-siwe__page-container-footer",onCancel:W,onSubmit:I?$:()=>R(!0),cancelText:x("cancel"),submitText:x("signin"),submitButtonType:I?"primary":"danger-primary"}),A&&a.default.createElement(l.default,{onClose:()=>R(!1),title:x("SIWEWarningTitle"),subtitle:x("SIWEWarningSubtitle"),className:"signature-request-siwe__warning-popover",footerClassName:"signature-request-siwe__warning-popover__footer",footer:a.default.createElement(d.PageContainerFooter,{footerClassName:"signature-request-siwe__warning-popover__footer__warning-footer",onCancel:()=>R(!1),cancelText:x("cancel"),cancelButtonType:"default",onSubmit:$,submitText:x("confirm"),submitButtonType:"danger-primary",disabled:!D})},a.default.createElement("div",{className:"signature-request-siwe__warning-popover__checkbox-wrapper"},a.default.createElement(c.default,{id:"signature-request-siwe_domain-checkbox",checked:D,className:"signature-request-siwe__warning-popover__checkbox-wrapper__checkbox",onClick:()=>L((e=>!e))}),a.default.createElement("label",{className:"signature-request-siwe__warning-popover__checkbox-wrapper__label",htmlFor:"signature-request-siwe_domain-checkbox"},x("SIWEDomainWarningBody",[C.domain])))))}k.propTypes={txData:r.default.object.isRequired,cancelPersonalMessage:r.default.func.isRequired,signPersonalMessage:r.default.func.isRequired}}}},{package:"$root$",file:"ui/components/app/signature-request-siwe/signature-request-siwe.js"}],[3706,{"./signature-request.container":3714},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request/index.js"}],[3707,{"./signature-request-data":3708},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-data"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request-data/index.js"}],[3708,{"../../../../../shared/modules/hexstring-utils":3435,"../../../../helpers/constants/design-system":4070,"../../../../helpers/utils/util":4108,"../../../../selectors":4436,"../../../ui/box":3900,"../../../ui/typography":4039,"../../transaction-decoding/components/decoding/address":3743,lodash:2932,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=e("lodash"),i=m(e("prop-types")),s=e("../../../../selectors"),l=m(e("../../transaction-decoding/components/decoding/address")),c=e("../../../../../shared/modules/hexstring-utils"),u=m(e("../../../ui/box")),d=m(e("../../../ui/typography")),p=e("../../../../helpers/constants/design-system"),f=e("../../../../helpers/utils/util");function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function g({data:e}){const t=(0,r.useSelector)(s.getMemoizedMetaMaskIdentities);return a.default.createElement(u.default,{className:"signature-request-data__node"},Object.entries(e).map((([e,{value:n,type:r}],o)=>a.default.createElement(u.default,{className:"signature-request-data__node",key:`${e}-${o}`,paddingLeft:2,display:"object"!=typeof n||null===n?p.DISPLAY.FLEX:null},a.default.createElement(d.default,{as:"span",color:p.TextColor.textDefault,marginLeft:4,fontWeight:"object"==typeof n?p.FONT_WEIGHT.BOLD:p.FONT_WEIGHT.NORMAL},(0,f.sanitizeString)(e.charAt(0).toUpperCase()+e.slice(1)),":"," "),"object"==typeof n&&null!==n?a.default.createElement(g,{data:n}):a.default.createElement(d.default,{as:"span",color:p.TextColor.textDefault,marginLeft:4,className:"signature-request-data__node__value"},"address"===r&&(0,c.isValidHexAddress)(n,{mixedCaseUseChecksum:!0})?a.default.createElement(d.default,{variant:p.TypographyVariant.H7,color:p.TextColor.infoDefault,className:"signature-request-data__node__value__address"},a.default.createElement(l.default,{addressOnly:!0,checksummedRecipientAddress:(0,c.toChecksumHexAddress)(n),recipientName:(0,s.getAccountName)(t,n)})):(0,f.sanitizeString)(`${n}`))))))}g.propTypes={data:i.default.oneOfType([i.default.object,i.default.array]).isRequired};var y=(0,a.memo)(g,((e,t)=>(0,o.isEqual)(e.data,t.data)));n.default=y}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request-data/signature-request-data.js"}],[3709,{"./signature-request-footer.component":3710},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-footer.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request-footer/index.js"}],[3710,{"../../../ui/page-container":3992,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=(a=e("prop-types"))&&a.__esModule?a:{default:a},i=e("../../../ui/page-container");function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class c extends r.PureComponent{render(){const{cancelAction:e,signAction:t,disabled:n=!1}=this.props;return r.default.createElement(i.PageContainerFooter,{cancelText:this.context.t("reject"),submitText:this.context.t("sign"),onCancel:e,onSubmit:t,disabled:n})}}n.default=c,l(c,"propTypes",{cancelAction:o.default.func.isRequired,signAction:o.default.func.isRequired,disabled:o.default.bool}),l(c,"contextTypes",{t:o.default.func})}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js"}],[3711,{"./signature-request-message":3712},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./signature-request-message"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request-message/index.js"}],[3712,{"../../../../contexts/i18n":4047,"../../../../helpers/constants/design-system":4070,"../../../ui/box":3900,"../../../ui/typography":4039,"../signature-request-data":3707,lodash:2932,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=f;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=d(e("prop-types")),o=e("lodash"),i=e("../../../../contexts/i18n"),s=d(e("../../../ui/box")),l=d(e("../../../ui/typography")),c=e("../../../../helpers/constants/design-system"),u=d(e("../signature-request-data"));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f({data:e,onMessageScrolled:t,setMessageRootRef:n,messageRootRef:r,messageIsScrollable:d,primaryType:p}){const f=(0,a.useContext)(i.I18nContext),[m,h]=(0,a.useState)(!1);return a.default.createElement(s.default,{display:c.DISPLAY.FLEX,flexDirection:c.FLEX_DIRECTION.COLUMN,onScroll:(0,o.debounce)((()=>{if(!r||m)return;const{scrollTop:e,offsetHeight:n,scrollHeight:a}=r;Math.round(e)+n>=a&&(h(!0),t())}),25),className:"signature-request-message"},d?a.default.createElement(s.default,{display:c.DISPLAY.FLEX,alignItems:c.AlignItems.center,justifyContent:c.JustifyContent.center,borderColor:c.BorderColor.borderDefault,backgroundColor:c.BackgroundColor.backgroundDefault,color:c.Color.iconDefault,onClick:()=>{h(!0),t(),null==r||r.scrollTo(0,null==r?void 0:r.scrollHeight)},className:"signature-request-message__scroll-button","data-testid":"signature-request-scroll-button"},a.default.createElement("i",{className:"fa fa-arrow-down","aria-label":f("scrollDown")})):null,a.default.createElement(s.default,{backgroundColor:c.BackgroundColor.backgroundDefault,paddingBottom:3,paddingTop:3,paddingRight:3,margin:2,borderRadius:c.BorderRadius.XL,borderColor:c.BorderColor.borderMuted,className:"signature-request-message__root",ref:n},a.default.createElement(l.default,{fontWeight:c.FONT_WEIGHT.BOLD,color:c.TextColor.textDefault,marginLeft:4,className:"signature-request-message__title"},p),a.default.createElement(u.default,{data:e.value})))}f.propTypes={data:r.default.object.isRequired,onMessageScrolled:r.default.func,setMessageRootRef:r.default.func,messageRootRef:r.default.object,messageIsScrollable:r.default.bool,primaryType:r.default.string}}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request-message/signature-request-message.js"}],[3713,{"../../../../shared/constants/common":3403,"../../../../shared/constants/metametrics":3408,"../../../../shared/constants/network":3409,"../../../../shared/modules/Numeric":3427,"../../../../shared/modules/conversion.utils":3431,"../../../helpers/constants/design-system":4070,"../../../helpers/utils/confirm-tx.util":4090,"../../../helpers/utils/util":4108,"../../ui/button":3904,"../../ui/site-origin":4015,"../../ui/typography/typography":4040,"../confirm-page-container/confirm-page-container-navigation":3511,"../ledger-instruction-field":3580,"../modals/contract-details-modal/contract-details-modal":3614,"../network-account-balance-header":3649,"../security-provider-banner-message/security-provider-banner-message":3687,"../security-provider-banner-message/security-provider-banner-message.constants":3686,"./signature-request-footer":3709,"./signature-request-message":3711,lodash:2932,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=N(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("lodash"),o=O(e("prop-types")),i=O(e("../ledger-instruction-field")),s=e("../../../helpers/utils/util"),l=e("../../../../shared/constants/metametrics"),c=O(e("../../ui/site-origin")),u=O(e("../../ui/button")),d=O(e("../../ui/typography/typography")),p=O(e("../modals/contract-details-modal/contract-details-modal")),f=e("../../../helpers/constants/design-system"),m=O(e("../network-account-balance-header")),h=e("../../../../shared/constants/network"),g=e("../../../../shared/modules/Numeric"),y=e("../../../../shared/constants/common"),v=O(e("../confirm-page-container/confirm-page-container-navigation")),b=O(e("../security-provider-banner-message/security-provider-banner-message")),_=e("../security-provider-banner-message/security-provider-banner-message.constants"),E=e("../../../helpers/utils/confirm-tx.util"),T=e("../../../../shared/modules/conversion.utils"),w=O(e("./signature-request-footer")),k=O(e("./signature-request-message"));function O(e){return e&&e.__esModule?e:{default:e}}function N(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(N=function(e){return e?n:t})(e)}function C(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class P extends a.PureComponent{constructor(...e){super(...e),C(this,"state",{hasScrolledMessage:!1,showContractDetails:!1}),C(this,"memoizedParseMessage",(0,r.memoize)((e=>{const{message:t,domain:n={},primaryType:a,types:r}=JSON.parse(e);return{sanitizedMessage:(0,s.sanitizeMessage)(t,a,r),domain:n,primaryType:a}}))),C(this,"handleCancelAll",(()=>{const{cancelAll:e,clearConfirmTransaction:t,history:n,mostRecentOverviewPage:a,showRejectTransactionsConfirmationModal:r,unapprovedMessagesCount:o}=this.props;r({unapprovedTxCount:o,onSubmit:async()=>{await e(),t(),n.push(a)}})}))}setMessageRootRef(e){this.messageRootRef=e}formatWallet(e){return`${e.slice(0,8)}...${e.slice(e.length-8,e.length)}`}getNetworkName(){const{provider:e}=this.props,t=e.type,{t:n}=this.context;switch(t){case h.NETWORK_TYPES.MAINNET:return n("mainnet");case h.NETWORK_TYPES.GOERLI:return n("goerli");case h.NETWORK_TYPES.SEPOLIA:return n("sepolia");case h.NETWORK_TYPES.LINEA_TESTNET:return n("lineatestnet");case h.NETWORK_TYPES.LOCALHOST:return n("localhost");default:return e.nickname||n("unknownNetwork")}}render(){var e,t,n,r;const{txData:{msgParams:{data:o,origin:h,version:O},type:N},fromAccount:{address:C,balance:P,name:M},cancel:S,sign:x,isLedgerWallet:j,hardwareWalletRequiresConnection:I,chainId:A,rpcPrefs:R,txData:D,subjectMetadata:L,nativeCurrency:$,currentCurrency:W,conversionRate:q,unapprovedMessagesCount:F}=this.props,{t:B,trackEvent:G}=this.context,{sanitizedMessage:H,domain:{verifyingContract:U},primaryType:V}=this.memoizedParseMessage(o),z=B("rejectRequestsN",[F]),Y=this.getNetworkName(),X=q?(0,E.formatCurrency)((0,T.getValueFromWeiHex)({value:P,fromCurrency:$,toCurrency:W,conversionRate:q,numberOfDecimals:6,toDenomination:y.EtherDenomination.ETH}),W):new g.Numeric(P,16,y.EtherDenomination.WEI).toDenomination(y.EtherDenomination.ETH).round(6).toBase(10).toString(),K=(null===(e=this.messageRootRef)||void 0===e?void 0:e.scrollHeight)>(null===(t=this.messageRootRef)||void 0===t?void 0:t.clientHeight),Z=D.msgParams.origin?null==L?void 0:L[D.msgParams.origin]:null;return a.default.createElement("div",{className:"signature-request"},a.default.createElement(v.default,null),a.default.createElement("div",{className:"request-signature__account","data-testid":"request-signature-account"},a.default.createElement(m.default,{networkName:Y,accountName:M,accountBalance:X,tokenName:q?null==W?void 0:W.toUpperCase():$,accountAddress:C})),a.default.createElement("div",{className:"signature-request-content"},(null==D||null===(n=D.securityProviderResponse)||void 0===n?void 0:n.flagAsDangerous)!==undefined&&(null==D||null===(r=D.securityProviderResponse)||void 0===r?void 0:r.flagAsDangerous)!==_.SECURITY_PROVIDER_MESSAGE_SEVERITIES.NOT_MALICIOUS||null!=D&&D.securityProviderResponse&&0===Object.keys(D.securityProviderResponse).length?a.default.createElement(b.default,{securityProviderResponse:D.securityProviderResponse}):null,a.default.createElement("div",{className:"signature-request__origin"},a.default.createElement(c.default,{siteOrigin:h,iconSrc:null==Z?void 0:Z.iconUrl,iconName:(0,s.getURLHostName)(h)||h,chip:!0})),a.default.createElement(d.default,{className:"signature-request__content__title",variant:f.TypographyVariant.H3,fontWeight:f.FONT_WEIGHT.BOLD,boxProps:{marginTop:4}},this.context.t("sigRequest")),a.default.createElement(d.default,{className:"request-signature__content__subtitle",variant:f.TypographyVariant.H7,color:f.TextColor.textAlternative,align:f.TEXT_ALIGN.CENTER,margin:12,marginTop:3},this.context.t("signatureRequestGuidance")),U?a.default.createElement("div",null,a.default.createElement(u.default,{type:"link",onClick:()=>this.setState({showContractDetails:!0}),className:"signature-request-content__verify-contract-details","data-testid":"verify-contract-details"},a.default.createElement(d.default,{variant:f.TypographyVariant.H7,color:f.TextColor.primaryDefault},this.context.t("verifyContractDetails")))):null),j?a.default.createElement("div",{className:"confirm-approve-content__ledger-instruction-wrapper"},a.default.createElement(i.default,{showDataInstruction:!0})):null,a.default.createElement(k.default,{data:H,onMessageScrolled:()=>this.setState({hasScrolledMessage:!0}),setMessageRootRef:this.setMessageRootRef.bind(this),messageRootRef:this.messageRootRef,messageIsScrollable:K,primaryType:V}),a.default.createElement(w.default,{cancelAction:e=>{S(e),G({category:l.MetaMetricsEventCategory.Transactions,event:"Cancel",properties:{action:"Sign Request",legacy_event:!0,type:N,version:O}})},signAction:e=>{x(e),G({category:l.MetaMetricsEventCategory.Transactions,event:"Confirm",properties:{action:"Sign Request",legacy_event:!0,type:N,version:O}})},disabled:I||K&&!this.state.hasScrolledMessage}),this.state.showContractDetails&&a.default.createElement(p.default,{toAddress:U,chainId:A,rpcPrefs:R,onClose:()=>this.setState({showContractDetails:!1}),isContractRequestingSignature:!0}),F>1?a.default.createElement(u.default,{type:"link",className:"signature-request__reject-all-button","data-testid":"signature-request-reject-all",onClick:e=>{e.preventDefault(),this.handleCancelAll()}},z):null)}}n.default=P,C(P,"propTypes",{txData:o.default.object.isRequired,fromAccount:o.default.shape({address:o.default.string.isRequired,balance:o.default.string,name:o.default.string}).isRequired,isLedgerWallet:o.default.bool,cancel:o.default.func.isRequired,sign:o.default.func.isRequired,hardwareWalletRequiresConnection:o.default.bool.isRequired,chainId:o.default.string,rpcPrefs:o.default.object,nativeCurrency:o.default.string,currentCurrency:o.default.string.isRequired,conversionRate:o.default.number,provider:o.default.object,subjectMetadata:o.default.object,unapprovedMessagesCount:o.default.number,clearConfirmTransaction:o.default.func.isRequired,history:o.default.object,mostRecentOverviewPage:o.default.string,showRejectTransactionsConfirmationModal:o.default.func.isRequired,cancelAll:o.default.func.isRequired}),C(P,"contextTypes",{t:o.default.func,trackEvent:o.default.func})}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request.component.js"}],[3714,{"../../../../shared/constants/app":3401,"../../../ducks/confirm-transaction/confirm-transaction.duck":4055,"../../../ducks/history/history":4059,"../../../ducks/metamask/metamask":4062,"../../../helpers/utils/util":4108,"../../../selectors":4436,"../../../store/actions":4443,"./signature-request.component":3713,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../selectors"),i=e("../../../ducks/metamask/metamask"),s=e("../../../helpers/utils/util"),l=e("../../../../shared/constants/app"),c=e("../../../store/actions"),u=e("../../../ducks/history/history"),d=e("../../../ducks/confirm-transaction/confirm-transaction.duck"),p=(a=e("./signature-request.component"))&&a.__esModule?a:{default:a};var f=(0,r.connect)((function(e,t){const{txData:n}=t,{msgParams:{from:a}}=n,{provider:r}=e.metamask,s=(0,o.doesAddressRequireLedgerHidConnection)(e,a),l=(0,i.isAddressLedger)(e,a),c=(0,o.getCurrentChainId)(e),d=(0,o.getRpcPrefsForCurrentProvider)(e),p=(0,o.unconfirmedMessagesHashSelector)(e),f=(0,o.getTotalUnapprovedMessagesCount)(e),{useNativeCurrencyAsPrimaryCurrency:m}=(0,o.getPreferences)(e);return{provider:r,isLedgerWallet:l,hardwareWalletRequiresConnection:s,chainId:c,rpcPrefs:d,unconfirmedMessagesList:p,unapprovedMessagesCount:f,mostRecentOverviewPage:(0,u.getMostRecentOverviewPage)(e),nativeCurrency:(0,i.getNativeCurrency)(e),currentCurrency:(0,o.getCurrentCurrency)(e),conversionRate:m?null:(0,o.conversionRateSelector)(e),subjectMetadata:(0,o.getSubjectMetadata)(e),allAccounts:(0,o.accountsWithSendEtherInfoSelector)(e)}}),(function(e){return{clearConfirmTransaction:()=>e((0,d.clearConfirmTransaction)()),showRejectTransactionsConfirmationModal:({onSubmit:t,unapprovedTxCount:n})=>e((0,c.showModal)({name:"REJECT_TRANSACTIONS",onSubmit:t,unapprovedTxCount:n,isRequestType:!0})),cancelAll:t=>e((0,c.cancelMsgs)(t))}}),(function(e,t,n){const{allAccounts:a,isLedgerWallet:r,hardwareWalletRequiresConnection:o,chainId:i,rpcPrefs:c,nativeCurrency:u,currentCurrency:d,conversionRate:p,provider:f,subjectMetadata:m,unconfirmedMessagesList:h,unapprovedMessagesCount:g,mostRecentOverviewPage:y}=e,{signPersonalMessage:v,signTypedMessage:b,cancelPersonalMessage:_,cancelTypedMessage:E,signMessage:T,cancelMessage:w,txData:k}=n,{cancelAll:O}=t,{type:N,msgParams:{from:C}}=k,P=(0,s.getAccountByAddress)(a,C);let M,S;return N===l.MESSAGE_TYPE.PERSONAL_SIGN?(M=_,S=v):N===l.MESSAGE_TYPE.ETH_SIGN_TYPED_DATA?(M=E,S=b):N===l.MESSAGE_TYPE.ETH_SIGN&&(M=w,S=T),{...n,...t,fromAccount:P,txData:k,cancel:M,sign:S,isLedgerWallet:r,hardwareWalletRequiresConnection:o,chainId:i,rpcPrefs:c,nativeCurrency:u,currentCurrency:d,conversionRate:p,provider:f,subjectMetadata:m,unapprovedMessagesCount:g,mostRecentOverviewPage:y,cancelAll:()=>O((0,s.valuesFor)(h))}}))(p.default);n.default=f}}},{package:"$root$",file:"ui/components/app/signature-request/signature-request.container.js"}],[3715,{"./srp-input":3717},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./srp-input"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/srp-input/index.js"}],[3716,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parseSecretRecoveryPhrase=void 0;n.parseSecretRecoveryPhrase=e=>{var t;return(null===(t=(e||"").trim().toLowerCase().match(/\w+/gu))||void 0===t?void 0:t.join(" "))||""}}}},{package:"$root$",file:"ui/components/app/srp-input/parse-secret-recovery-phrase.js"}],[3717,{"../../../helpers/constants/design-system":4070,"../../../helpers/utils/util":4108,"../../../hooks/useI18nContext":4129,"../../ui/actionable-message":3897,"../../ui/dropdown":3928,"../../ui/show-hide-toggle":4009,"../../ui/text-field":4025,"../../ui/typography":4039,"./parse-secret-recovery-phrase":3716,"@ethersproject/hdnode":431,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=y;var a=e("@ethersproject/hdnode"),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),o=h(e("prop-types")),i=e("../../../hooks/useI18nContext"),s=h(e("../../ui/text-field")),l=e("../../../helpers/utils/util"),c=h(e("../../ui/actionable-message")),u=h(e("../../ui/dropdown")),d=h(e("../../ui/typography")),p=h(e("../../ui/show-hide-toggle")),f=e("../../../helpers/constants/design-system"),m=e("./parse-secret-recovery-phrase");function h(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y({onChange:e,srpText:t}){const[n,o]=(0,r.useState)(""),[h,g]=(0,r.useState)(!1),[y,v]=(0,r.useState)(new Array(12).fill("")),[b,_]=(0,r.useState)(new Array(12).fill(!1)),[E,T]=(0,r.useState)(12),w=(0,i.useI18nContext)(),k=(0,r.useCallback)((t=>{let n="";const r=t.join(" ").trim();t.some((e=>""!==e))&&(t.some((e=>""===e))?n=w("seedPhraseReq"):(e=>e!==e.toLowerCase())(r)?n=w("invalidSeedPhraseCaseSensitive"):(0,a.isValidMnemonic)(r)||(n=w("invalidSeedPhrase"))),v(t),o(n),e(n?"":r)}),[v,o,w,e]),O=(0,r.useCallback)((e=>{_((t=>{const n=t.slice();return n[e]?n[e]=!1:(n.fill(!1),n[e]=!0),n}))}),[]),N=(0,r.useCallback)(((e,t)=>{h&&g(!1);const n=y.slice();n[e]=t.trim(),k(n)}),[y,k,h]),C=(0,r.useCallback)((e=>{let t=(0,m.parseSecretRecoveryPhrase)(e).split(" ");if(t.length>24)return void g(!0);h&&g(!1);let n=E;t.length!==E&&(n=t.length<12?12:t.length%3==0?t.length:t.length+(3-t.length%3),T(n)),t.length<n&&(t=t.concat(new Array(n-t.length).fill(""))),_(new Array(n).fill(!1)),k(t),(0,l.clearClipboard)()}),[E,k,h,g]),P=[];for(let e=12;e<=24;e+=3)P.push({name:w("srpInputNumberOfWords",[`${e}`]),value:`${e}`});return r.default.createElement("div",{className:"import-srp__container"},r.default.createElement("label",{className:"import-srp__srp-label"},r.default.createElement(d.default,{align:f.TEXT_ALIGN.LEFT,variant:f.TypographyVariant.H4,fontWeight:f.FONT_WEIGHT.BOLD},t)),r.default.createElement(c.default,{className:"import-srp__paste-tip",iconFillColor:"var(--color-info-default)",message:w("srpPasteTip"),useIcon:!0}),r.default.createElement(u.default,{className:"import-srp__number-of-words-dropdown",onChange:e=>{const t=parseInt(e,10);if(Number.isNaN(t))throw new Error("Unable to parse option as integer");let n=y.slice(0,t);n.length<t&&(n=n.concat(new Array(t-n.length).fill(""))),T(t),_(new Array(t).fill(!1)),k(n)},options:P,selectedOption:`${E}`}),r.default.createElement("div",{className:"import-srp__srp"},[...Array(E).keys()].map((e=>{const t=`import-srp__srp-word-${e}`;return r.default.createElement("div",{key:e,className:"import-srp__srp-word"},r.default.createElement("label",{htmlFor:t,className:"import-srp__srp-word-label"},r.default.createElement(d.default,null,`${e+1}.`)),r.default.createElement(s.default,{id:t,"data-testid":t,type:b[e]?"text":"password",onChange:t=>{t.preventDefault(),N(e,t.target.value)},value:y[e],autoComplete:"off",onPaste:e=>{const t=e.clipboardData.getData("text");t.trim().match(/\s/u)&&(e.preventDefault(),C(t))}}),r.default.createElement(p.default,{id:`${t}-checkbox`,ariaLabelHidden:w("srpWordHidden"),ariaLabelShown:w("srpWordShown"),shown:b[e],"data-testid":`${t}-checkbox`,onChange:()=>O(e),title:w("srpToggleShow")}))}))),n?r.default.createElement(c.default,{className:"import-srp__srp-error",iconFillColor:"var(--color-error-default)",message:n,type:"danger",useIcon:!0}):null,h?r.default.createElement(c.default,{className:"import-srp__srp-too-many-words-error",iconFillColor:"var(--color-error-default)",message:w("srpPasteFailedTooManyWords"),primaryAction:{label:w("dismiss"),onClick:()=>g(!1)},type:"danger",useIcon:!0}):null)}y.propTypes={onChange:o.default.func.isRequired,srpText:o.default.string.isRequired}}}},{package:"$root$",file:"ui/components/app/srp-input/srp-input.js"}],[3718,{"./step-progress-bar":3719},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ThreeStepProgressBar",{enumerable:!0,get:function(){return a.ThreeStepProgressBar}}),Object.defineProperty(n,"TwoStepProgressBar",{enumerable:!0,get:function(){return a.TwoStepProgressBar}}),Object.defineProperty(n,"threeStepStages",{enumerable:!0,get:function(){return a.threeStepStages}}),Object.defineProperty(n,"twoStepStages",{enumerable:!0,get:function(){return a.twoStepStages}});var a=e("./step-progress-bar")}}},{package:"$root$",file:"ui/components/app/step-progress-bar/index.js"}],[3719,{"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../ui/box":3900,classnames:1980,lodash:2932,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ThreeStepProgressBar=p,n.TwoStepProgressBar=f,n.twoStepStages=n.threeStepStages=void 0;var a=u(e("react")),r=u(e("classnames")),o=u(e("prop-types")),i=e("lodash"),s=e("../../../hooks/useI18nContext"),l=u(e("../../ui/box")),c=e("../../../helpers/constants/design-system");function u(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}n.threeStepStages={PASSWORD_CREATE:1,RECOVERY_PHRASE_VIDEO:2,RECOVERY_PHRASE_REVIEW:3,RECOVERY_PHRASE_CONFIRM:4,ONBOARDING_COMPLETE:5};function p({stage:e,...t}){const n=(0,s.useI18nContext)();return a.default.createElement(l.default,t,a.default.createElement("ul",{className:"progressbar"},a.default.createElement("li",{className:(0,r.default)({active:e>=1,complete:e>1})},(0,i.capitalize)(n("createPassword"))),a.default.createElement("li",{className:(0,r.default)({active:e>=2,complete:e>3})},(0,i.capitalize)(n("secureWallet"))),a.default.createElement("li",{className:(0,r.default)({active:e>=4,complete:e>5})},(0,i.capitalize)(n("confirmRecoveryPhrase")))))}function f({stage:e,...t}){const n=(0,s.useI18nContext)();return a.default.createElement(l.default,d({width:c.BLOCK_SIZES.FULL},t),a.default.createElement("ul",{className:"progressbar two-steps"},a.default.createElement("li",{className:(0,r.default)({active:e>=1,complete:e>1})},(0,i.capitalize)(n("confirmRecoveryPhrase"))),a.default.createElement("li",{className:(0,r.default)("two-steps",{active:e>=2,complete:e>2})},(0,i.capitalize)(n("createPassword")))))}n.twoStepStages={RECOVERY_PHRASE_CONFIRM:1,PASSWORD_CREATE:2},p.propTypes={stage:o.default.number,...l.default.propTypes},f.propTypes={stage:o.default.number,...l.default.propTypes}}}},{package:"$root$",file:"ui/components/app/step-progress-bar/step-progress-bar.js"}],[3720,{"./tab-bar":3721},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./tab-bar"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/tab-bar/index.js"}],[3721,{"../../component-library/icon/deprecated":3836,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(e("react")),r=s(e("prop-types")),o=s(e("classnames")),i=e("../../component-library/icon/deprecated");function s(e){return e&&e.__esModule?e:{default:e}}const l=e=>{const{tabs:t=[],onSelect:n,isActive:r}=e;return a.default.createElement("div",{className:"tab-bar"},t.map((({key:e,content:t,icon:s})=>a.default.createElement("button",{key:e,className:(0,o.default)("tab-bar__tab pointer",{"tab-bar__tab--active":r(e,t)}),onClick:()=>n(e)},a.default.createElement("div",{className:"tab-bar__tab__content"},a.default.createElement("div",{className:"tab-bar__tab__content__icon"},s),a.default.createElement("div",{className:"tab-bar__tab__content__title"},t)),a.default.createElement(i.Icon,{name:i.ICON_NAMES.ARROW_RIGHT,size:i.ICON_SIZES.SM,className:"tab-bar__tab__caret"})))))};l.propTypes={isActive:r.default.func.isRequired,tabs:r.default.array,onSelect:r.default.func};var c=l;n.default=c}}},{package:"$root$",file:"ui/components/app/tab-bar/tab-bar.js"}],[3722,{"./token-cell":3723},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./token-cell"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/token-cell/index.js"}],[3723,{"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../../hooks/useTokenFiatAmount":4144,"../../../selectors":4436,"../../component-library":3840,"../../multichain":3882,"../asset-list-item":3488,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=m;var a=f(e("classnames")),r=f(e("prop-types")),o=f(e("react")),i=e("react-redux"),s=f(e("../asset-list-item")),l=e("../../../selectors"),c=e("../../../hooks/useI18nContext"),u=e("../../../hooks/useTokenFiatAmount"),d=(e("../../multichain"),e("../../component-library")),p=e("../../../helpers/constants/design-system");function f(e){return e&&e.__esModule?e:{default:e}}function m({address:e,decimals:t,balanceError:n,image:r,symbol:f,string:m,onClick:h,isERC721:g}){const y=(0,i.useSelector)(l.getSelectedAddress),v=(0,c.useI18nContext)(),b=(0,i.useSelector)(l.getTokenList),_=Object.values(b).find((e=>e.symbol===f)),E=(null==_||_.name,null==_||_.iconUrl,(0,u.useTokenFiatAmount)(e,m,f)),T=n?o.default.createElement(d.Text,{as:"span"},v("troubleTokenBalances"),o.default.createElement(d.ButtonLink,{href:`https://ethplorer.io/address/${y}`,externalLink:!0,onClick:e=>e.stopPropagation(),textProps:{color:p.TextColor.warningDefault}},v("here"))):null;return o.default.createElement(o.default.Fragment,null,o.default.createElement(s.default,{className:(0,a.default)("token-cell",{"token-cell--outdated":Boolean(n)}),iconClassName:"token-cell__icon",onClick:()=>h(e),tokenAddress:e,tokenSymbol:f,tokenDecimals:t,tokenImage:r,warning:T,primary:`${m||0}`,secondary:E,isERC721:g}))}m.propTypes={address:r.default.string,balanceError:r.default.object,symbol:r.default.string,decimals:r.default.number,string:r.default.string,onClick:r.default.func.isRequired,isERC721:r.default.bool,image:r.default.string},m.defaultProps={balanceError:null}}}},{package:"$root$",file:"ui/components/app/token-cell/token-cell.js"}],[3724,{"./token-list-display":3725},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./token-list-display"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/token-list-display/index.js"}],[3725,{"../../../ducks/metamask/metamask":4062,"../../../hooks/useI18nContext":4129,"../../../hooks/useTokenTracker":4145,"../../../selectors":4436,"../../ui/identicon":3962,"../../ui/token-balance":4030,lodash:2932,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=m;var a=f(e("react")),r=f(e("prop-types")),o=e("react-redux"),i=e("lodash"),s=e("../../../selectors"),l=e("../../../hooks/useTokenTracker"),c=f(e("../../ui/identicon")),u=f(e("../../ui/token-balance")),d=e("../../../hooks/useI18nContext"),p=e("../../../ducks/metamask/metamask");function f(e){return e&&e.__esModule?e:{default:e}}function m({clickHandler:e}){const t=(0,d.useI18nContext)(),n=(0,o.useSelector)(s.getShouldHideZeroBalanceTokens),r=(0,o.useSelector)(p.getTokens,i.isEqual),{loading:f,tokensWithBalances:m}=(0,l.useTokenTracker)(r,!0,n);if(f)return a.default.createElement("div",{className:"loading-span"},t("loadingTokens"));const h=m.filter((e=>!e.isERC721));return a.default.createElement(a.default.Fragment,null,h.map((n=>{const{address:r,symbol:o,image:i}=n;return a.default.createElement("div",{key:r,className:"token-list-item",onClick:()=>e(n)},a.default.createElement(c.default,{address:r,diameter:36,image:i}),a.default.createElement("div",{className:"token-list-item__data"},a.default.createElement("div",{className:"token-list-item__symbol"},o),a.default.createElement("div",{className:"token-list-item__balance"},a.default.createElement("span",{className:"token-list-item__balance__label"},`${t("balance")}:`),a.default.createElement(u.default,{token:n}))))})))}m.propTypes={clickHandler:r.default.func}}}},{package:"$root$",file:"ui/components/app/token-list-display/token-list-display.js"}],[3726,{"./token-list":3727},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./token-list"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/token-list/index.js"}],[3727,{"../../../ducks/metamask/metamask":4062,"../../../hooks/useI18nContext":4129,"../../../hooks/useTokenTracker":4145,"../../../selectors":4436,"../token-cell":3722,lodash:2932,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=m;var a=p(e("react")),r=p(e("prop-types")),o=e("lodash"),i=e("react-redux"),s=p(e("../token-cell")),l=e("../../../hooks/useI18nContext"),c=e("../../../hooks/useTokenTracker"),u=e("../../../selectors"),d=e("../../../ducks/metamask/metamask");function p(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(this,arguments)}function m({onTokenClick:e}){const t=(0,l.useI18nContext)(),n=(0,i.useSelector)(u.getShouldHideZeroBalanceTokens),r=(0,i.useSelector)(d.getTokens,o.isEqual),{loading:p,tokensWithBalances:m}=(0,c.useTokenTracker)(r,!0,n);return p?a.default.createElement("div",{style:{display:"flex",height:"250px",alignItems:"center",justifyContent:"center",padding:"30px"}},t("loadingTokens")):a.default.createElement("div",null,m.map(((t,n)=>a.default.createElement(s.default,f({key:n},t,{onClick:e})))))}m.propTypes={onTokenClick:r.default.func.isRequired}}}},{package:"$root$",file:"ui/components/app/token-list/token-list.js"}],[3728,{"./transaction-activity-log.container":3733},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-activity-log.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/index.js"}],[3729,{"./transaction-activity-log-icon.component":3730},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-activity-log-icon.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/transaction-activity-log-icon/index.js"}],[3730,{"../../../../helpers/constants/design-system":4070,"../../../component-library/icon/deprecated":3836,"../transaction-activity-log.constants":3732,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ACTIVITY_ICONS=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=c(e("prop-types")),o=c(e("classnames")),i=e("../transaction-activity-log.constants"),s=e("../../../component-library/icon/deprecated"),l=e("../../../../helpers/constants/design-system");function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={[i.TRANSACTION_CREATED_EVENT]:s.ICON_NAMES.ADD,[i.TRANSACTION_SUBMITTED_EVENT]:s.ICON_NAMES.ARROW_UP,[i.TRANSACTION_RESUBMITTED_EVENT]:s.ICON_NAMES.PROGRAMMING_ARROWS,[i.TRANSACTION_CONFIRMED_EVENT]:s.ICON_NAMES.CHECK,[i.TRANSACTION_DROPPED_EVENT]:s.ICON_NAMES.CLOSE,[i.TRANSACTION_ERRORED_EVENT]:s.ICON_NAMES.DANGER,[i.TRANSACTION_CANCEL_ATTEMPTED_EVENT]:s.ICON_NAMES.CLOSE,[i.TRANSACTION_CANCEL_SUCCESS_EVENT]:s.ICON_NAMES.CLOSE};n.ACTIVITY_ICONS=p;class f extends a.PureComponent{render(){const{className:e,eventKey:t}=this.props,n=p[t];return a.default.createElement("div",{className:(0,o.default)("transaction-activity-log-icon",e)},n?a.default.createElement(s.Icon,{name:n,color:l.Color.iconDefault,size:s.ICON_SIZES.SM}):null)}}n.default=f,d(f,"contextTypes",{t:r.default.func}),d(f,"propTypes",{className:r.default.string,eventKey:r.default.oneOf(Object.keys(p))})}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js"}],[3731,{"../../../../shared/constants/metametrics":3408,"../../../../shared/modules/conversion.utils":3431,"../../../helpers/utils/util":4108,"./transaction-activity-log-icon":3729,"./transaction-activity-log.constants":3732,"@metamask/etherscan-link":1221,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=p(e("prop-types")),o=p(e("classnames")),i=e("@metamask/etherscan-link"),s=e("../../../helpers/utils/util"),l=e("../../../../shared/constants/metametrics"),c=e("../../../../shared/modules/conversion.utils"),u=p(e("./transaction-activity-log-icon")),d=e("./transaction-activity-log.constants");function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.PureComponent{constructor(...e){super(...e),m(this,"handleActivityClick",(e=>{const{rpcPrefs:t}=this.props,n=(0,i.getBlockExplorerLink)(e,t);this.context.trackEvent({category:l.MetaMetricsEventCategory.Transactions,event:"Clicked Block Explorer Link",properties:{link_type:"Transaction Block Explorer",action:"Activity Details",block_explorer_domain:(0,s.getURLHostName)(n)}}),global.platform.openTab({url:n})}))}renderInlineRetry(e){const{t:t}=this.context,{inlineRetryIndex:n,primaryTransaction:r={},onRetry:o,isEarliestNonce:i}=this.props,{status:s}=r;return i&&s!==d.CONFIRMED_STATUS&&e===n?a.default.createElement("div",{className:"transaction-activity-log__action-link",onClick:o},t("speedUpTransaction")):null}renderInlineCancel(e){const{t:t}=this.context,{inlineCancelIndex:n,primaryTransaction:r={},onCancel:o,isEarliestNonce:i}=this.props,{status:s}=r;return i&&s!==d.CONFIRMED_STATUS&&e===n?a.default.createElement("div",{className:"transaction-activity-log__action-link",onClick:o},t("speedUpCancellation")):null}renderActivity(e,t){const{conversionRate:n,nativeCurrency:r}=this.props,{eventKey:o,value:i,timestamp:l}=e,d=`${(0,c.getValueFromWeiHex)({value:i,fromCurrency:"ETH",toCurrency:"ETH",conversionRate:n,numberOfDecimals:6})} ${r}`,p=(0,s.formatDate)(l,"T 'on' M/d/y"),f=this.context.t(o,[d,p]);return a.default.createElement("div",{key:t,className:"transaction-activity-log__activity"},a.default.createElement(u.default,{className:"transaction-activity-log__activity-icon",eventKey:o}),a.default.createElement("div",{className:"transaction-activity-log__entry-container"},a.default.createElement("div",{className:"transaction-activity-log__activity-text",title:f,onClick:()=>this.handleActivityClick(e)},f),this.renderInlineRetry(t),this.renderInlineCancel(t)))}render(){const{t:e}=this.context,{className:t,activities:n}=this.props;return 0===n.length?null:a.default.createElement("div",{className:(0,o.default)("transaction-activity-log",t)},a.default.createElement("div",{className:"transaction-activity-log__title"},e("activityLog")),a.default.createElement("div",{className:"transaction-activity-log__activities-container"},n.map(((e,t)=>this.renderActivity(e,t)))))}}n.default=h,m(h,"contextTypes",{t:r.default.func,trackEvent:r.default.func}),m(h,"propTypes",{activities:r.default.array,className:r.default.string,conversionRate:r.default.number,inlineRetryIndex:r.default.number,inlineCancelIndex:r.default.number,nativeCurrency:r.default.string,onCancel:r.default.func,onRetry:r.default.func,primaryTransaction:r.default.object,isEarliestNonce:r.default.bool,rpcPrefs:r.default.object})}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/transaction-activity-log.component.js"}],[3732,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_UPDATED_EVENT=n.TRANSACTION_SUBMITTED_EVENT=n.TRANSACTION_RESUBMITTED_EVENT=n.TRANSACTION_ERRORED_EVENT=n.TRANSACTION_DROPPED_EVENT=n.TRANSACTION_CREATED_EVENT=n.TRANSACTION_CONFIRMED_EVENT=n.TRANSACTION_CANCEL_SUCCESS_EVENT=n.TRANSACTION_CANCEL_ATTEMPTED_EVENT=n.SUBMITTED_STATUS=n.DROPPED_STATUS=n.CONFIRMED_STATUS=void 0;n.TRANSACTION_CREATED_EVENT="transactionCreated";n.TRANSACTION_SUBMITTED_EVENT="transactionSubmitted";n.TRANSACTION_RESUBMITTED_EVENT="transactionResubmitted";n.TRANSACTION_CONFIRMED_EVENT="transactionConfirmed";n.TRANSACTION_DROPPED_EVENT="transactionDropped";n.TRANSACTION_UPDATED_EVENT="transactionUpdated";n.TRANSACTION_ERRORED_EVENT="transactionErrored";n.TRANSACTION_CANCEL_ATTEMPTED_EVENT="transactionCancelAttempted";n.TRANSACTION_CANCEL_SUCCESS_EVENT="transactionCancelSuccess";n.SUBMITTED_STATUS="submitted";n.CONFIRMED_STATUS="confirmed";n.DROPPED_STATUS="dropped"}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/transaction-activity-log.constants.js"}],[3733,{"../../../ducks/metamask/metamask":4062,"../../../selectors":4436,"./transaction-activity-log.component":3731,"./transaction-activity-log.constants":3732,"./transaction-activity-log.util":3734,lodash:2932,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("lodash"),i=e("../../../selectors"),s=e("../../../ducks/metamask/metamask"),l=(a=e("./transaction-activity-log.component"))&&a.__esModule?a:{default:a},c=e("./transaction-activity-log.util"),u=e("./transaction-activity-log.constants");const d=e=>({eventKey:t})=>t===e;var p=(0,r.connect)((e=>({conversionRate:(0,i.conversionRateSelector)(e),nativeCurrency:(0,s.getNativeCurrency)(e),rpcPrefs:(0,i.getRpcPrefsForCurrentProvider)(e)})),null,((e,t,n)=>{const{transactionGroup:{transactions:a=[],primaryTransaction:r}={},...i}=n,s=(0,c.combineTransactionHistories)(a);return{...e,...t,...i,activities:s,inlineRetryIndex:(0,o.findLastIndex)(s,d(u.TRANSACTION_RESUBMITTED_EVENT)),inlineCancelIndex:(0,o.findLastIndex)(s,d(u.TRANSACTION_CANCEL_ATTEMPTED_EVENT)),primaryTransaction:r}}))(l.default);n.default=p}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/transaction-activity-log.container.js"}],[3734,{"../../../../shared/constants/transaction":3417,"../../../../shared/modules/conversion.utils":3431,"../../../helpers/utils/confirm-tx.util":4090,"./transaction-activity-log.constants":3732},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.combineTransactionHistories=function(e=[]){if(!e.length)return[];const t=[];e.forEach(((e,n)=>{const a=m(e,0===n);t.push(...a)}));return function(e){const t=[],n=Boolean(e.find((({eventKey:e})=>e===i.TRANSACTION_CONFIRMED_EVENT||e===i.TRANSACTION_CANCEL_SUCCESS_EVENT)));let a=!1;return e.forEach((e=>{e.eventKey===i.TRANSACTION_DROPPED_EVENT?n||a||(t.push(e),a=!0):t.push(e)})),t}(t.sort(((e,t)=>e.timestamp-t.timestamp)))},n.getActivities=m;var a=e("../../../../shared/constants/transaction"),r=e("../../../../shared/modules/conversion.utils"),o=e("../../../helpers/utils/confirm-tx.util"),i=e("./transaction-activity-log.constants");const s="/status",l="/txParams/gasPrice",c="/txParams/gas",u="/estimatedBaseFee",d="/blockTimestamp",p={[s]:!0,[l]:!0,[c]:!0,[d]:!0},f={[i.SUBMITTED_STATUS]:i.TRANSACTION_SUBMITTED_EVENT,[i.CONFIRMED_STATUS]:i.TRANSACTION_CONFIRMED_EVENT,[i.DROPPED_STATUS]:i.TRANSACTION_DROPPED_EVENT};function m(e,t=!1){const{id:n,chainId:m,metamaskNetworkId:h,hash:g,history:y=[],txParams:{gas:v,gasPrice:b,maxPriorityFeePerGas:_},txReceipt:{status:E}={},type:T,estimatedBaseFee:w}=e,k=w&&_&&(0,r.sumHexes)(w,_);let O="0x0",N="0x0";const C=y.reduce(((e,y,_)=>{if(0===_&&!Array.isArray(y)&&y.txParams){const{time:a,estimatedBaseFee:o,txParams:{value:s,gas:l="0x0",gasPrice:c,maxPriorityFeePerGas:u}={}}=y,d=o&&u&&(0,r.sumHexes)(o,u);if(O=l,N=d||c||b||"0x0",t)return e.concat({id:n,hash:g,chainId:m,metamaskNetworkId:h,eventKey:i.TRANSACTION_CREATED_EVENT,timestamp:a,value:s})}else if(Array.isArray(y)){const t=[];return y.forEach((r=>{const{op:_,path:E,value:w,timestamp:C}=r,P=C||y[0]&&y[0].timestamp;if(E in p&&"replace"===_||E===u&&"add"===_)switch(E){case s:{const e="0x0"===O&&"0x0"===N?(0,o.getHexGasTotal)({gasLimit:v,gasPrice:k||b}):(0,o.getHexGasTotal)({gasLimit:O,gasPrice:N});if(w in f){let r=f[w];w===i.SUBMITTED_STATUS?T===a.TransactionType.retry?r=i.TRANSACTION_RESUBMITTED_EVENT:T===a.TransactionType.cancel&&(r=i.TRANSACTION_CANCEL_ATTEMPTED_EVENT):w===i.CONFIRMED_STATUS&&T===a.TransactionType.cancel&&(r=i.TRANSACTION_CANCEL_SUCCESS_EVENT),t.push({id:n,hash:g,eventKey:r,timestamp:P,chainId:m,metamaskNetworkId:h,value:e})}break}case l:case c:case u:{const e=t[t.length-1]||{},{lastEventKey:n}=e;if(E===c)O=w;else if(E===l)N=w;else if(E===u){var M;N=k||(null==y||null===(M=y.txParams)||void 0===M?void 0:M.gasPrice),e.value=(0,o.getHexGasTotal)({gasLimit:v,gasPrice:N})}n!==i.TRANSACTION_SUBMITTED_EVENT&&n!==i.TRANSACTION_RESUBMITTED_EVENT||(e.value=(0,o.getHexGasTotal)({gasLimit:O,gasPrice:N}));break}case d:{const t=e.find((e=>e.eventKey===i.TRANSACTION_CONFIRMED_EVENT));t!==undefined&&(t.timestamp=new Date(1e3*parseInt(r.value,16)).getTime());break}default:t.push({id:n,hash:g,chainId:m,metamaskNetworkId:h,eventKey:i.TRANSACTION_UPDATED_EVENT,timestamp:P})}})),e.concat(t)}return e}),[]);return"0x0"===E?C.concat({id:n,hash:g,chainId:m,metamaskNetworkId:h,eventKey:i.TRANSACTION_ERRORED_EVENT}):C}}}},{package:"$root$",file:"ui/components/app/transaction-activity-log/transaction-activity-log.util.js"}],[3735,{"./transaction-alerts":3736},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-alerts"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-alerts/index.js"}],[3736,{"../../../../shared/constants/gas":3404,"../../../contexts/gasFee":4046,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/zendesk-url":4077,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../component-library":3840,"../../ui/simulation-error-message":4011,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),r=m(e("prop-types")),o=e("react-redux"),i=e("../../../../shared/constants/gas"),s=e("../../../selectors"),l=e("../../../contexts/gasFee"),c=e("../../../hooks/useI18nContext"),u=e("../../component-library"),d=m(e("../../ui/simulation-error-message")),p=e("../../../helpers/constants/design-system"),f=m(e("../../../helpers/constants/zendesk-url"));function m(e){return e&&e.__esModule?e:{default:e}}const h=({userAcknowledgedGasMissing:e,setUserAcknowledgedGasMissing:t})=>{const{estimateUsed:n,hasSimulationError:r,supportsEIP1559:m,isNetworkBusy:h}=(0,l.useGasFeeContext)(),g=(0,o.useSelector)(s.submittedPendingTransactionsSelector),y=(0,c.useI18nContext)();return a.default.createElement("div",{className:"transaction-alerts"},m&&r&&a.default.createElement(d.default,{userAcknowledgedGasMissing:e,setUserAcknowledgedGasMissing:t}),m&&(null==g?void 0:g.length)>0&&a.default.createElement(u.BannerAlert,{severity:p.SEVERITIES.WARNING},a.default.createElement(u.Text,{as:"p"},a.default.createElement("strong",null,1===(null==g?void 0:g.length)?y("pendingTransactionSingle",[null==g?void 0:g.length]):y("pendingTransactionMultiple",[null==g?void 0:g.length]))," ",y("pendingTransactionInfo"),y("learnCancelSpeeedup",[a.default.createElement(u.ButtonLink,{key:"cancelSpeedUpInfo",href:f.default.SPEEDUP_CANCEL,rel:"noopener noreferrer",target:"_blank"},y("cancelSpeedUp"))]))),n===i.PriorityLevels.low&&a.default.createElement(u.BannerAlert,{"data-testid":"low-gas-fee-alert",severity:p.SEVERITIES.WARNING},y("lowPriorityMessage")),m&&h?a.default.createElement(u.BannerAlert,{severity:p.SEVERITIES.WARNING},y("networkIsBusy")):null)};h.propTypes={userAcknowledgedGasMissing:r.default.bool,setUserAcknowledgedGasMissing:r.default.func};var g=h;n.default=g}}},{package:"$root$",file:"ui/components/app/transaction-alerts/transaction-alerts.js"}],[3737,{"./transaction-breakdown.container":3741},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-breakdown.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-breakdown/index.js"}],[3738,{"./transaction-breakdown-row.component":3739},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-breakdown-row.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-breakdown/transaction-breakdown-row/index.js"}],[3739,{classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,o,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),s=c(e("prop-types")),l=c(e("classnames"));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class d extends i.PureComponent{render(){const{title:e,children:t,className:n,divider:a=!1}=this.props;return i.default.createElement("div",{className:(0,l.default)("transaction-breakdown-row",a?"transaction-breakdown-row--with-bottom-border":"",n),"data-testid":"transaction-breakdown-row"},i.default.createElement("div",{className:"transaction-breakdown-row__title","data-testid":"transaction-breakdown-row-title"},e),i.default.createElement("div",{className:"transaction-breakdown-row__value","data-testid":"transaction-breakdown-row-value"},t))}}n.default=d,a=d,r="propTypes",o={title:s.default.string,children:s.default.node,className:s.default.string,divider:s.default.bool},(r=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(r))in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o}}},{package:"$root$",file:"ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js"}],[3740,{"../../../../shared/constants/common":3403,"../../../helpers/constants/common":4068,"../../ui/currency-display":3920,"../../ui/hex-to-decimal":3938,"../user-preferenced-currency-display":3767,"./transaction-breakdown-row":3738,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=p(e("prop-types")),o=p(e("classnames")),i=p(e("../../ui/currency-display")),s=p(e("../user-preferenced-currency-display")),l=p(e("../../ui/hex-to-decimal")),c=e("../../../helpers/constants/common"),u=e("../../../../shared/constants/common"),d=p(e("./transaction-breakdown-row"));function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.PureComponent{render(){const{t:e}=this.context,{gas:t,gasPrice:n,maxFeePerGas:r,primaryCurrency:p,className:f,nonce:m,nativeCurrency:h,showFiat:g,totalInHex:y,gasUsed:v,isTokenApprove:b,baseFee:_,priorityFee:E,hexGasTotal:T,isEIP1559Transaction:w,isMultiLayerFeeNetwork:k,l1HexGasTotal:O}=this.props;return a.default.createElement("div",{className:(0,o.default)("transaction-breakdown",f)},a.default.createElement("div",{className:"transaction-breakdown__title"},e("transaction")),a.default.createElement(d.default,{divider:!0,title:e("nonce")},void 0===m?null:a.default.createElement(l.default,{className:"transaction-breakdown__value",value:m})),a.default.createElement(d.default,{title:e(b?"spendingCap":"amount")},a.default.createElement("span",{className:"transaction-breakdown__value transaction-breakdown__value--amount"},p)),a.default.createElement(d.default,{title:k?e("transactionHistoryL2GasLimitLabel"):`${e("gasLimit")} (${e("units")})`,className:"transaction-breakdown__row-title"},void 0===t?"?":a.default.createElement(l.default,{className:"transaction-breakdown__value",value:t})),"string"==typeof v&&a.default.createElement(d.default,{title:`${e("gasUsed")} (${e("units")})`,className:"transaction-breakdown__row-title"},a.default.createElement(l.default,{className:"transaction-breakdown__value",value:v})),w&&void 0!==_?a.default.createElement(d.default,{title:e("transactionHistoryBaseFee")},a.default.createElement(i.default,{className:"transaction-breakdown__value","data-testid":"transaction-breakdown__base-fee",currency:h,denomination:u.EtherDenomination.GWEI,value:_,numberOfDecimals:10,hideLabel:!0})):null,w&&void 0!==E?a.default.createElement(d.default,{title:e("transactionHistoryPriorityFee")},a.default.createElement(i.default,{className:"transaction-breakdown__value","data-testid":"transaction-breakdown__priority-fee",currency:h,denomination:u.EtherDenomination.GWEI,value:E,numberOfDecimals:10,hideLabel:!0})):null,!w&&a.default.createElement(d.default,{title:e(k?"transactionHistoryL2GasPriceLabel":"advancedGasPriceTitle")},void 0===n?"?":a.default.createElement(i.default,{className:"transaction-breakdown__value","data-testid":"transaction-breakdown__gas-price",currency:h,denomination:u.EtherDenomination.GWEI,value:n,numberOfDecimals:9,hideLabel:!0})),w&&a.default.createElement(d.default,{title:e("transactionHistoryTotalGasFee")},a.default.createElement(s.default,{className:"transaction-breakdown__value","data-testid":"transaction-breakdown__effective-gas-price",currency:h,denomination:u.EtherDenomination.ETH,numberOfDecimals:6,value:T,type:c.PRIMARY}),g&&a.default.createElement(s.default,{className:"transaction-breakdown__value",type:c.SECONDARY,value:T})),w&&a.default.createElement(d.default,{divider:!0,title:e("transactionHistoryMaxFeePerGas")},a.default.createElement(s.default,{className:"transaction-breakdown__value",currency:h,denomination:u.EtherDenomination.ETH,numberOfDecimals:9,value:r,type:c.PRIMARY}),g&&a.default.createElement(s.default,{className:"transaction-breakdown__value",type:c.SECONDARY,value:r})),k&&a.default.createElement(d.default,{title:e("transactionHistoryL1GasLabel")},a.default.createElement(s.default,{className:"transaction-breakdown__value","data-testid":"transaction-breakdown__l1-gas-total",numberOfDecimals:18,value:O,type:c.PRIMARY}),g&&a.default.createElement(s.default,{className:"transaction-breakdown__value",type:c.SECONDARY,value:O})),a.default.createElement(d.default,{title:e("total")},a.default.createElement(s.default,{className:"transaction-breakdown__value transaction-breakdown__value--eth-total",type:c.PRIMARY,value:y,numberOfDecimals:k?18:null}),g&&a.default.createElement(s.default,{className:"transaction-breakdown__value",type:c.SECONDARY,value:y})))}}n.default=h,m(h,"contextTypes",{t:r.default.func}),m(h,"propTypes",{className:r.default.string,nativeCurrency:r.default.string,showFiat:r.default.bool,nonce:r.default.string,primaryCurrency:r.default.string,isTokenApprove:r.default.bool,gas:r.default.oneOfType([r.default.string,r.default.number]),gasPrice:r.default.oneOfType([r.default.string,r.default.number]),maxFeePerGas:r.default.oneOfType([r.default.string,r.default.number]),gasUsed:r.default.oneOfType([r.default.string,r.default.number]),totalInHex:r.default.oneOfType([r.default.string,r.default.number]),baseFee:r.default.oneOfType([r.default.string,r.default.number]),priorityFee:r.default.oneOfType([r.default.string,r.default.number]),hexGasTotal:r.default.string,isEIP1559Transaction:r.default.bool,isMultiLayerFeeNetwork:r.default.bool,l1HexGasTotal:r.default.string}),m(h,"defaultProps",{showFiat:!0})}}},{package:"$root$",file:"ui/components/app/transaction-breakdown/transaction-breakdown.component.js"}],[3741,{"../../../../shared/modules/conversion.utils":3431,"../../../../shared/modules/transaction.utils":3444,"../../../ducks/metamask/metamask":4062,"../../../helpers/utils/confirm-tx.util":4090,"../../../selectors":4436,"./transaction-breakdown.component":3740,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../selectors"),i=e("../../../ducks/metamask/metamask"),s=e("../../../helpers/utils/confirm-tx.util"),l=e("../../../../shared/modules/transaction.utils"),c=e("../../../../shared/modules/conversion.utils"),u=(a=e("./transaction-breakdown.component"))&&a.__esModule?a:{default:a};var d=(0,r.connect)(((e,t)=>{const{transaction:n,isTokenApprove:a}=t,{txParams:{gas:r,gasPrice:u,maxFeePerGas:d,value:p}={},txReceipt:{gasUsed:f,effectiveGasPrice:m,l1Fee:h}={},baseFeePerGas:g}=n,y="string"==typeof f?f:r,v=m&&g&&(0,c.subtractHexes)(m,g),b=u||m,_=y&&b&&(0,s.getHexGasTotal)({gasLimit:y,gasPrice:b})||"0x0";let E=(0,c.sumHexes)(_,p);const T=(0,o.getIsMultiLayerFeeNetwork)(e)&&h!==undefined;return T&&(E=(0,c.sumHexes)(E,h)),{nativeCurrency:(0,i.getNativeCurrency)(e),showFiat:(0,o.getShouldShowFiat)(e),totalInHex:E,gas:r,gasPrice:u,maxFeePerGas:d,gasUsed:f,isTokenApprove:a,hexGasTotal:_,priorityFee:v,baseFee:g,isEIP1559Transaction:(0,l.isEIP1559Transaction)(n),isMultiLayerFeeNetwork:T,l1HexGasTotal:h}}))(u.default);n.default=d}}},{package:"$root$",file:"ui/components/app/transaction-breakdown/transaction-breakdown.container.js"}],[3742,{"../../../../../../helpers/utils/util":4108,"../../../../../../hooks/useI18nContext":4129,"../../../../../../selectors":4436,"../../../../../ui/identicon":3962,"../../../../modals/nickname-popovers":3634,"copy-to-clipboard":2032,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=p(e("prop-types")),i=p(e("copy-to-clipboard")),s=e("../../../../../../helpers/utils/util"),l=p(e("../../../../../ui/identicon")),c=e("../../../../../../hooks/useI18nContext"),u=e("../../../../../../selectors"),d=p(e("../../../../modals/nickname-popovers"));function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const m=({checksummedRecipientAddress:e,onRecipientClick:t,addressOnly:n,recipientEns:o,recipientName:p})=>{const f=(0,c.useI18nContext)(),[m,h]=(0,a.useState)(!1),g=(0,r.useSelector)(u.getMemoizedAddressBook).find((t=>t.address.toLowerCase()===e.toLowerCase())),y=null==g?void 0:g.name,v=(0,r.useSelector)((t=>(0,u.getMemoizedMetadataContractName)(t,e))),b=n?p||y||v||o||(0,s.shortenAddress)(e):p||y||v||o||f("newContract");return a.default.createElement("div",{className:"tx-insight tx-insight-component tx-insight-component-address",onClick:()=>{(0,i.default)(e),t&&t()}},a.default.createElement("div",{className:"tx-insight-component-address__sender-icon"},a.default.createElement(l.default,{address:e,diameter:18})),a.default.createElement("div",{className:"tx-insight-component-address__name",onClick:()=>h(!0)},b),m?a.default.createElement(d.default,{onClose:()=>h(!1),address:e}):null)};m.propTypes={checksummedRecipientAddress:o.default.string,recipientName:o.default.string,recipientEns:o.default.string,addressOnly:o.default.bool,onRecipientClick:o.default.func};var h=m;n.default=h}}},{package:"$root$",file:"ui/components/app/transaction-decoding/components/decoding/address/address.component.js"}],[3743,{"./address.component":3742},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./address.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-decoding/components/decoding/address/index.js"}],[3744,{"../../../../../../contexts/i18n":4047,"../../../../../../helpers/constants/design-system":4070,"../../../../../../selectors":4436,"../../../../../ui/button":3904,"../../../../../ui/typography":4039,"@metamask/etherscan-link":1221,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-redux"),o=p(e("prop-types")),i=e("@metamask/etherscan-link"),s=e("../../../../../../selectors"),l=e("../../../../../../contexts/i18n"),c=e("../../../../../../helpers/constants/design-system"),u=p(e("../../../../../ui/button")),d=p(e("../../../../../ui/typography"));function p(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const m=({fetchVia:e,address:t})=>{const n=(0,a.useContext)(l.I18nContext),o=(0,r.useSelector)(s.getCurrentChainId),p=(0,r.useSelector)(s.getRpcPrefsForCurrentProvider),f=(0,i.getAccountLink)(t,o,p),m=()=>a.default.createElement(a.default.Fragment,null,a.default.createElement(d.default,{variant:c.TypographyVariant.H7,className:"accreditation__prefix",boxProps:{margin:0}},n("transactionDecodingAccreditationVerified",[a.default.createElement(u.default,{type:"link",className:"accreditation__link",onClick:()=>{global.platform.openTab({url:f})},target:"_blank",rel:"noopener noreferrer",title:n("etherscanView"),key:"accreditation-link-button"},e)])),a.default.createElement(d.default,{variant:c.TypographyVariant.H7,boxProps:{margin:0}},n("transactionDecodingAccreditationDecoded")));return a.default.createElement("div",{className:"accreditation"},a.default.createElement("div",{className:"accreditation__icon"},a.default.createElement("i",{className:"fa fa-info-circle"})),a.default.createElement("div",{className:"accreditation__info"},a.default.createElement(m,null)))};m.propTypes={fetchVia:o.default.string.isRequired,address:o.default.string.isRequired};var h=m;n.default=h}}},{package:"$root$",file:"ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js"}],[3745,{"./accreditation.component":3744},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./accreditation.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-decoding/components/ui/accreditation/index.js"}],[3746,{"../../../../../../contexts/i18n":4047,"../../../../../../helpers/constants/design-system":4070,"../../../../../../hooks/useCopyToClipboard":4123,"../../../../../component-library/icon/deprecated":3836,"../../../../../ui/tooltip/tooltip":4036,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=u(e("prop-types")),o=u(e("../../../../../ui/tooltip/tooltip")),i=e("../../../../../../contexts/i18n"),s=e("../../../../../../hooks/useCopyToClipboard"),l=e("../../../../../component-library/icon/deprecated"),c=e("../../../../../../helpers/constants/design-system");function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const p=({data:e})=>{const t=(0,a.useContext)(i.I18nContext),[n,r]=(0,s.useCopyToClipboard)();return a.default.createElement("div",{className:"copy-raw-data"},a.default.createElement(o.default,{position:"right",title:n?t("copiedExclamation"):""},a.default.createElement("button",{onClick:()=>{r(e)},className:"copy-raw-data__button"},a.default.createElement("div",{className:"copy-raw-data__icon"},a.default.createElement(l.Icon,{name:n?l.ICON_NAMES.COPY_SUCCESS:l.ICON_NAMES.COPY,color:c.IconColor.iconDefault})),a.default.createElement("div",{className:"copy-raw-data__label"},t("copyRawTransactionData")))))};p.propTypes={data:r.default.string.isRequired};var f=p;n.default=f}}},{package:"$root$",file:"ui/components/app/transaction-decoding/components/ui/copy-raw-data/copy-raw-data.component.js"}],[3747,{"./copy-raw-data.component":3746},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./copy-raw-data.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-decoding/components/ui/copy-raw-data/index.js"}],[3748,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.FETCH_SUPPORTED_NETWORKS_URI=n.FETCH_PROJECT_INFO_URI=void 0;const a="https://tx-insights.metaswap.codefi.network",r=`${a}/fetch-project`;n.FETCH_PROJECT_INFO_URI=r;const o=`${a}/networks`;n.FETCH_SUPPORTED_NETWORKS_URI=o}}},{package:"$root$",file:"ui/components/app/transaction-decoding/constants.js"}],[3749,{"./transaction-decoding.component":3750},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-decoding.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-decoding/index.js"}],[3750,{"../../../../shared/lib/fetch-with-cache":3419,"../../../../shared/modules/conversion.utils":3431,"../../../../shared/modules/hexstring-utils":3435,"../../../contexts/i18n":4047,"../../../selectors":4436,"../../ui/error-message":3932,"../../ui/spinner":4017,"./components/decoding/address":3743,"./components/ui/accreditation":3745,"./components/ui/copy-raw-data":3747,"./constants":3748,"./transaction-decoding.util":3751,"@truffle/codec":1547,"@truffle/decoder":1642,"browser-util-inspect":1913,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=k;var a=w(e("react")),r=E(e("prop-types")),o=E(e("browser-util-inspect")),i=e("@truffle/decoder"),s=e("react-redux"),l=w(e("@truffle/codec")),c=E(e("../../ui/spinner")),u=E(e("../../ui/error-message")),d=E(e("../../../../shared/lib/fetch-with-cache")),p=e("../../../selectors"),f=e("../../../contexts/i18n"),m=e("../../../../shared/modules/hexstring-utils"),h=e("../../../../shared/modules/conversion.utils"),g=e("./transaction-decoding.util"),y=e("./constants"),v=E(e("./components/decoding/address")),b=E(e("./components/ui/copy-raw-data")),_=E(e("./components/ui/accreditation"));function E(e){return e&&e.__esModule?e:{default:e}}function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}function k({to:e="",inputData:t=""}){const n=(0,a.useContext)(f.I18nContext),[r,E]=(0,a.useState)([]),[T,w]=(0,a.useState)(""),[k,O]=(0,a.useState)(""),{address:N}=(0,s.useSelector)(p.getSelectedAccount),C=(0,h.hexToDecimal)((0,s.useSelector)(p.getCurrentChainId)),[P,M]=(0,a.useState)(!1),[S,x]=(0,a.useState)(!1),[j,I]=(0,a.useState)("");(0,a.useEffect)((()=>{(async()=>{M(!0);try{if(!(await(0,d.default)(y.FETCH_SUPPORTED_NETWORKS_URI,{method:"GET"})).some((e=>e.active&&Number(e.chainId)===Number(C))))throw new Error(n("transactionDecodingUnsupportedNetworkError",[C]));const a=`${y.FETCH_PROJECT_INFO_URI}?${new URLSearchParams({to:e,"network-id":C})}`,r=await(0,d.default)(a,{method:"GET"}),{info:o,fetchedVia:s,address:l}=r;l&&w(l),s&&O(s);const c=await(0,i.forAddress)(e,{provider:global.ethereumProvider,projectInfo:o}),u=await c.decodeTransaction({from:N,to:e,input:t,blockNumber:null}),p=(0,g.transformTxDecoding)(null==u?void 0:u.arguments);E(p),M(!1)}catch(e){M(!1),x(!0),null!=e&&e.message.match("400")?I(n("txInsightsNotSupported")):I(null==e?void 0:e.message)}})()}),[n,N,e,C,t]);const A=({name:e,kind:t,typeClass:r,value:i})=>{if("error"===t)return a.default.createElement("span",{className:"sol-item solidity-error"},a.default.createElement("span",null,n("malformedData")));switch(r){case"int":return a.default.createElement("span",{className:"sol-item solidity-int"},[i.asBN||i.asString].toString());case"uint":return a.default.createElement("span",{className:"sol-item solidity-uint"},[i.asBN||i.asString].toString());case"bool":return a.default.createElement("span",{className:"sol-item"},String(i.asBoolean));case"bytes":return a.default.createElement("span",{className:"sol-item solidity-bytes"},i.asHex);case"string":return a.default.createElement("span",{className:"sol-item solidity-string"},i.asString);case"array":return a.default.createElement("details",null,a.default.createElement("summary",{className:"typography--color-black"},e,": "),a.default.createElement("ol",null,i.map(((e,t)=>{var n,r;return a.default.createElement("li",{key:`${null===(n=e.type)||void 0===n?void 0:n.typeClass}-${t}`},A({typeClass:null===(r=e.type)||void 0===r?void 0:r.typeClass,value:e.value,kind:e.kind}))}))));case"address":{const e=null==i?void 0:i.asAddress;return a.default.createElement(v.default,{addressOnly:!0,checksummedRecipientAddress:(0,m.toChecksumHexAddress)(e)})}default:return a.default.createElement("pre",{className:"sol-item solidity-raw"},(0,o.default)(new l.Format.Utils.Inspect.ResultInspector(i)))}},R=({name:e,kind:t,typeClass:n,type:r,value:o,children:i},s)=>i?a.default.createElement("li",{key:`${n}-${s}`},a.default.createElement("details",{open:0===s?"open":""},a.default.createElement("summary",null,e,": "),a.default.createElement("ol",null,i.map(R)))):a.default.createElement("li",{className:"solidity-value",key:`solidity-value-${s}`},a.default.createElement("div",{className:"solidity-named-item solidity-item"},"array"===n||Array.isArray(o)?null:a.default.createElement("span",{className:"param-name typography--color-black"},e,": "),a.default.createElement("span",{className:"sol-item solidity-uint"},A({name:e,typeClass:n,type:r,value:o,kind:t}))));return a.default.createElement("div",{className:"tx-insight"},P?a.default.createElement("div",{className:"tx-insight-loading"},a.default.createElement(c.default,{color:"var(--color-warning-default)"})):S?a.default.createElement("div",{className:"tx-insight-error"},a.default.createElement(u.default,{errorMessage:j})):a.default.createElement("div",{className:"tx-insight-content"},a.default.createElement("div",{className:"tx-insight-content__tree-component"},a.default.createElement("ol",null,r.map(R))),a.default.createElement("div",{className:"tx-insight-content__copy-raw-tx"},a.default.createElement(b.default,{data:t})),k&&T?a.default.createElement("div",{className:"tx-insight-content__accreditation"},a.default.createElement(_.default,{address:T,fetchVia:k})):null))}k.propTypes={to:r.default.string,inputData:r.default.string.isRequired}}}},{package:"$root$",file:"ui/components/app/transaction-decoding/transaction-decoding.component.js"}],[3751,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.transformTxDecoding=void 0;const a=e=>e.map((e=>{const t=e.name,n=e.value,r=n.kind,o=n.type.typeClass,i={name:t,kind:r,typeClass:o,type:n.type};return"struct"===o?{...i,children:a(n.value)}:{...i,value:n.value?n.value:n}}));n.transformTxDecoding=a}}},{package:"$root$",file:"ui/components/app/transaction-decoding/transaction-decoding.util.js"}],[3752,{"./transaction-detail-item.component":3753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-detail-item.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-detail-item/index.js"}],[3753,{"../../../helpers/constants/design-system":4070,"../../ui/typography/typography":4040,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=c;var a=l(e("react")),r=l(e("prop-types")),o=l(e("classnames")),i=l(e("../../ui/typography/typography")),s=e("../../../helpers/constants/design-system");function l(e){return e&&e.__esModule?e:{default:e}}function c({detailTitle:e="",detailText:t="",detailTitleColor:n=s.Color.textDefault,detailTotal:r="",subTitle:l="",subText:c="",boldHeadings:u=!0,flexWidthValues:d=!1}){return a.default.createElement("div",{className:"transaction-detail-item"},a.default.createElement("div",{className:"transaction-detail-item__row"},a.default.createElement(i.default,{color:n,fontWeight:u?s.FONT_WEIGHT.BOLD:s.FONT_WEIGHT.NORMAL,variant:s.TypographyVariant.H6,boxProps:{display:s.DISPLAY.FLEX,flexWrap:s.FLEX_WRAP.NO_WRAP,alignItems:s.AlignItems.center}},e),a.default.createElement("div",{className:(0,o.default)("transaction-detail-item__detail-values",{"transaction-detail-item__detail-values--flex-width":d})},t&&a.default.createElement(i.default,{variant:s.TypographyVariant.H6,color:s.Color.textAlternative},t),a.default.createElement(i.default,{color:s.Color.textDefault,fontWeight:u?s.FONT_WEIGHT.BOLD:s.FONT_WEIGHT.NORMAL,variant:s.TypographyVariant.H6,marginTop:1,marginBottom:1,marginLeft:1,boxProps:{textAlign:s.TEXT_ALIGN.RIGHT}},r))),a.default.createElement("div",{className:"transaction-detail-item__row"},a.default.isValidElement(l)?a.default.createElement("div",null,l):a.default.createElement(i.default,{variant:s.TypographyVariant.H7,color:s.Color.textAlternative},l),a.default.createElement(i.default,{variant:s.TypographyVariant.H7,color:s.Color.textAlternative,align:"end",className:"transaction-detail-item__row-subText"},c)))}c.propTypes={detailTitle:r.default.oneOfType([r.default.string,r.default.node]),detailTitleColor:r.default.string,detailText:r.default.oneOfType([r.default.string,r.default.node]),detailTotal:r.default.oneOfType([r.default.string,r.default.node]),subTitle:r.default.oneOfType([r.default.string,r.default.node]),subText:r.default.oneOfType([r.default.string,r.default.node]),boldHeadings:r.default.bool,flexWidthValues:r.default.bool}}}},{package:"$root$",file:"ui/components/app/transaction-detail-item/transaction-detail-item.component.js"}],[3754,{"./transaction-detail.component":3755},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-detail.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-detail/index.js"}],[3755,{"../../../contexts/gasFee":4046,"../../../hooks/useI18nContext":4129,"../../ui/box":3900,"../edit-gas-fee-button":3553,"../transaction-detail-item/transaction-detail-item.component":3753,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=d;var a=u(e("react")),r=u(e("prop-types")),o=e("../../../contexts/gasFee"),i=e("../../../hooks/useI18nContext"),s=u(e("../../ui/box")),l=u(e("../edit-gas-fee-button")),c=u(e("../transaction-detail-item/transaction-detail-item.component"));function u(e){return e&&e.__esModule?e:{default:e}}function d({rows:e=[],onEdit:t,userAcknowledgedGasMissing:n=!1,disableEditGasFeeButton:r=!1}){const c=(0,i.useI18nContext)(),{supportsEIP1559:u}=(0,o.useGasFeeContext)();return a.default.createElement("div",{className:"transaction-detail"},u&&!r&&a.default.createElement(s.default,{display:"flex",justifyContent:"flex-end",paddingTop:5},a.default.createElement(l.default,{userAcknowledgedGasMissing:n})),!u&&t&&a.default.createElement("div",{className:"transaction-detail-edit"},a.default.createElement("button",{onClick:t},c("edit"))),a.default.createElement("div",{className:"transaction-detail-rows"},e))}d.propTypes={rows:r.default.arrayOf(c.default).isRequired,onEdit:r.default.func,userAcknowledgedGasMissing:r.default.bool,disableEditGasFeeButton:r.default.bool}}}},{package:"$root$",file:"ui/components/app/transaction-detail/transaction-detail.component.js"}],[3756,{"./transaction-icon":3757},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-icon"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-icon/index.js"}],[3757,{"../../../../shared/constants/transaction":3417,"../../../store/actions":4443,"../../ui/icon/approve-icon.component":3945,"../../ui/icon/interaction-icon.component":3951,"../../ui/icon/receive-icon.component":3952,"../../ui/icon/send-icon.component":3954,"../../ui/icon/sign-icon.component":3955,"../../ui/icon/swap-icon-for-list.component":3957,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=b;var a=m(e("react")),r=e("react-redux"),o=m(e("prop-types")),i=m(e("../../ui/icon/approve-icon.component")),s=m(e("../../ui/icon/interaction-icon.component")),l=m(e("../../ui/icon/receive-icon.component")),c=m(e("../../ui/icon/send-icon.component")),u=m(e("../../ui/icon/sign-icon.component")),d=m(e("../../ui/icon/swap-icon-for-list.component")),p=e("../../../../shared/constants/transaction"),f=e("../../../store/actions");function m(e){return e&&e.__esModule?e:{default:e}}const h={[p.TransactionGroupCategory.approval]:i.default,[p.TransactionGroupCategory.interaction]:s.default,[p.TransactionGroupCategory.receive]:l.default,[p.TransactionGroupCategory.send]:c.default,[p.TransactionGroupCategory.signatureRequest]:u.default,[p.TransactionGroupCategory.swap]:d.default},g="var(--color-error-default)",y="var(--color-icon-default)",v={[p.TransactionGroupStatus.pending]:y,[p.TransactionGroupStatus.cancelled]:g,[p.TransactionStatus.approved]:y,[p.TransactionStatus.dropped]:g,[p.TransactionStatus.failed]:g,[p.TransactionStatus.rejected]:g,[p.TransactionStatus.submitted]:y,[p.TransactionStatus.unapproved]:y};function b({status:e,category:t}){const n=(0,r.useDispatch)(),o=v[e]||"var(--color-primary-default)",i=h[t];return i?a.default.createElement(i,{color:o,size:28}):(n((0,f.captureSingleException)(`The category prop passed to TransactionIcon is not supported. The prop is: ${t}`)),a.default.createElement("div",{className:"transaction-icon__grey-circle"}))}b.propTypes={status:o.default.oneOf([p.TransactionGroupStatus.cancelled,p.TransactionGroupStatus.pending,p.TransactionStatus.approved,p.TransactionStatus.confirmed,p.TransactionStatus.dropped,p.TransactionStatus.failed,p.TransactionStatus.rejected,p.TransactionStatus.submitted,p.TransactionStatus.unapproved]).isRequired,category:o.default.oneOf([p.TransactionGroupCategory.approval,p.TransactionGroupCategory.interaction,p.TransactionGroupCategory.receive,p.TransactionGroupCategory.send,p.TransactionGroupCategory.signatureRequest,p.TransactionGroupCategory.swap]).isRequired}}}},{package:"$root$",file:"ui/components/app/transaction-icon/transaction-icon.js"}],[3758,{"./transaction-list-item-details.container":3760},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-list-item-details.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-list-item-details/index.js"}],[3759,{"../../../../shared/constants/metametrics":3408,"../../../../shared/constants/time":3415,"../../../../shared/constants/transaction":3417,"../../../helpers/constants/routes":4074,"../../../helpers/utils/util":4108,"../../ui/button":3904,"../../ui/disclosure":3926,"../../ui/popover":3999,"../../ui/sender-to-recipient":4006,"../../ui/sender-to-recipient/sender-to-recipient.constants":4008,"../../ui/tooltip":4035,"../cancel-button":3493,"../transaction-activity-log":3728,"../transaction-breakdown":3737,"../transaction-decoding":3749,"@metamask/etherscan-link":1221,"copy-to-clipboard":2032,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=T(e("prop-types")),o=T(e("copy-to-clipboard")),i=e("@metamask/etherscan-link"),s=T(e("../../ui/sender-to-recipient")),l=e("../../ui/sender-to-recipient/sender-to-recipient.constants"),c=T(e("../../ui/disclosure")),u=T(e("../transaction-activity-log")),d=T(e("../transaction-breakdown")),p=T(e("../../ui/button")),f=T(e("../../ui/tooltip")),m=T(e("../cancel-button")),h=T(e("../../ui/popover")),g=e("../../../../shared/constants/time"),y=e("../../../../shared/constants/metametrics"),v=e("../../../../shared/constants/transaction"),b=e("../../../helpers/utils/util"),_=T(e("../transaction-decoding")),E=e("../../../helpers/constants/routes");function T(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function k(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O extends a.PureComponent{constructor(...e){super(...e),k(this,"state",{justCopied:!1}),k(this,"handleBlockExplorerClick",(()=>{const{transactionGroup:{primaryTransaction:e},rpcPrefs:t,isCustomNetwork:n,history:a,onClose:r}=this.props,o=(0,i.getBlockExplorerLink)(e,t);!t.blockExplorerUrl&&n?(r(),a.push(`${E.NETWORKS_ROUTE}#blockExplorerUrl`)):(this.context.trackEvent({category:y.MetaMetricsEventCategory.Transactions,event:"Clicked Block Explorer Link",properties:{link_type:"Transaction Block Explorer",action:"Transaction Details",block_explorer_domain:(0,b.getURLHostName)(o)}}),global.platform.openTab({url:o}))})),k(this,"handleCancel",(e=>{const{onCancel:t,onClose:n}=this.props;t(e),n()})),k(this,"handleRetry",(e=>{const{onClose:t,onRetry:n}=this.props;n(e),t()})),k(this,"handleCopyTxId",(()=>{const{transactionGroup:e}=this.props,{primaryTransaction:t}=e,{hash:n}=t;this.context.trackEvent({category:y.MetaMetricsEventCategory.Navigation,event:"Copied Transaction ID",properties:{action:"Activity Log",legacy_event:!0}}),this.setState({justCopied:!0},(()=>{(0,o.default)(n),setTimeout((()=>this.setState({justCopied:!1})),g.SECOND)}))}))}componentDidMount(){const{recipientAddress:e,tryReverseResolveAddress:t}=this.props;e&&t(e)}render(){var e,t,n,r;const{t:o}=this.context,{justCopied:i}=this.state,{transactionGroup:g,primaryCurrency:b,showSpeedUp:E,showRetry:T,recipientEns:w,recipientAddress:k,recipientName:O,recipientMetadataName:N,senderAddress:C,isEarliestNonce:P,senderNickname:M,title:S,onClose:x,recipientNickname:j,showCancel:I,transactionStatus:A,blockExplorerLinkText:R}=this.props,{primaryTransaction:D,initialTransaction:{type:L}}=g,{hash:$}=D;return a.default.createElement(h.default,{title:S,onClose:x},a.default.createElement("div",{className:"transaction-list-item-details"},a.default.createElement("div",{className:"transaction-list-item-details__operations"},a.default.createElement("div",{className:"transaction-list-item-details__header-buttons"},E&&a.default.createElement(p.default,{type:"primary",onClick:this.handleRetry,className:"transaction-list-item-details__header-button-rounded-button","data-testid":"speedup-button"},o("speedUp")),I&&a.default.createElement(m.default,{transaction:D,cancelTransaction:this.handleCancel,detailsModal:!0}),T&&a.default.createElement(f.default,{title:o("retryTransaction")},a.default.createElement(p.default,{type:"raised",onClick:this.handleRetry,className:"transaction-list-item-details__header-button","data-testid":"rety-button"},a.default.createElement("i",{className:"fa fa-sync"}))))),a.default.createElement("div",{className:"transaction-list-item-details__header"},a.default.createElement("div",{className:"transaction-list-item-details__tx-status"},a.default.createElement("div",null,o("status")),a.default.createElement("div",null,a.default.createElement(A,null))),a.default.createElement("div",{className:"transaction-list-item-details__tx-hash"},a.default.createElement("div",null,a.default.createElement(p.default,{type:"link",onClick:this.handleBlockExplorerClick,disabled:!$},"addBlockExplorer"===R.firstPart?o("addBlockExplorer"):o("viewOnBlockExplorer"))),a.default.createElement("div",null,a.default.createElement(f.default,{wrapperClassName:"transaction-list-item-details__header-button",containerClassName:"transaction-list-item-details__header-button-tooltip-container",title:i?o("copiedExclamation"):null},a.default.createElement(p.default,{type:"link",onClick:this.handleCopyTxId,disabled:!$},o("copyTransactionId")))))),a.default.createElement("div",{className:"transaction-list-item-details__body"},a.default.createElement("div",{className:"transaction-list-item-details__sender-to-recipient-header"},a.default.createElement("div",null,o("from")),a.default.createElement("div",null,o("to"))),a.default.createElement("div",{className:"transaction-list-item-details__sender-to-recipient-container"},a.default.createElement(s.default,{warnUserOnAccountMismatch:!1,variant:l.DEFAULT_VARIANT,addressOnly:!0,recipientEns:w,recipientAddress:k,recipientNickname:j,recipientName:O,recipientMetadataName:N,senderName:M,senderAddress:C,onRecipientClick:()=>{this.context.trackEvent({category:y.MetaMetricsEventCategory.Navigation,event:'Copied "To" Address',properties:{action:"Activity Log",legacy_event:!0}})},onSenderClick:()=>{this.context.trackEvent({category:y.MetaMetricsEventCategory.Navigation,event:'Copied "From" Address',properties:{action:"Activity Log",legacy_event:!0}})}})),a.default.createElement("div",{className:"transaction-list-item-details__cards-container"},a.default.createElement(d.default,{nonce:g.initialTransaction.txParams.nonce,isTokenApprove:L===v.TransactionType.tokenMethodApprove||L===v.TransactionType.tokenMethodSetApprovalForAll,transaction:D,primaryCurrency:b,className:"transaction-list-item-details__transaction-breakdown"}),g.initialTransaction.type!==v.TransactionType.incoming&&a.default.createElement(c.default,{title:o("activityLog"),size:"small"},a.default.createElement(u.default,{transactionGroup:g,className:"transaction-list-item-details__transaction-activity-log",onCancel:this.handleCancel,onRetry:this.handleRetry,isEarliestNonce:P})),null!==(e=g.initialTransaction)&&void 0!==e&&null!==(t=e.txParams)&&void 0!==t&&t.data?a.default.createElement(c.default,{title:"Transaction data",size:"small"},a.default.createElement(_.default,{title:o("transactionData"),to:null===(n=g.initialTransaction.txParams)||void 0===n?void 0:n.to,inputData:null===(r=g.initialTransaction.txParams)||void 0===r?void 0:r.data})):null))))}}n.default=O,k(O,"contextTypes",{t:r.default.func,trackEvent:r.default.func}),k(O,"defaultProps",{recipientEns:null}),k(O,"propTypes",{onCancel:r.default.func,onRetry:r.default.func,showCancel:r.default.bool,showSpeedUp:r.default.bool,showRetry:r.default.bool,isEarliestNonce:r.default.bool,primaryCurrency:r.default.string,transactionGroup:r.default.object,title:r.default.string.isRequired,onClose:r.default.func.isRequired,recipientEns:r.default.string,recipientAddress:r.default.string,recipientName:r.default.string,recipientMetadataName:r.default.string,rpcPrefs:r.default.object,senderAddress:r.default.string.isRequired,tryReverseResolveAddress:r.default.func.isRequired,senderNickname:r.default.string.isRequired,recipientNickname:r.default.string,transactionStatus:r.default.func,isCustomNetwork:r.default.bool,history:r.default.object,blockExplorerLinkText:r.default.object})}}},{package:"$root$",file:"ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js"}],[3760,{"../../../../shared/modules/hexstring-utils":3435,"../../../selectors":4436,"../../../store/actions":4443,"./transaction-list-item-details.component":3759,"react-redux":3130,"react-router-dom":3150,redux:3194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("redux"),i=e("react-router-dom"),s=e("../../../store/actions"),l=e("../../../selectors"),c=e("../../../../shared/modules/hexstring-utils"),u=(a=e("./transaction-list-item-details.component"))&&a.__esModule?a:{default:a};var d=(0,o.compose)(i.withRouter,(0,r.connect)(((e,t)=>{const{recipientAddress:n,senderAddress:a}=t;let r;if(n){const t=(0,c.toChecksumHexAddress)(n);r=(0,l.getEnsResolutionByAddress)(e,t)}const o=(0,l.getAddressBook)(e),i=(0,l.getMetaMaskIdentities)(e),s=(0,l.getAccountName)(i,n),u=(0,l.getMetadataContractName)(e,n),d=e=>{const t=o.find((t=>e.toLowerCase()===t.address.toLowerCase()));return t&&t.name||""},p=(0,l.getRpcPrefsForCurrentProvider)(e),f=(0,l.getIsCustomNetwork)(e);return{rpcPrefs:p,recipientEns:r,senderNickname:d(a),recipientNickname:n?d(n):null,isCustomNetwork:f,blockExplorerLinkText:(0,l.getBlockExplorerLinkText)(e),recipientName:s,recipientMetadataName:u}}),(e=>({tryReverseResolveAddress:t=>e((0,s.tryReverseResolveAddress)(t))}))))(u.default);n.default=d}}},{package:"$root$",file:"ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js"}],[3761,{"./transaction-list-item.component":3763},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-list-item.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-list-item/index.js"}],[3762,{"../../../../shared/constants/transaction":3417,"../../../ducks/swaps/swaps":4066,"../../../helpers/utils/util":4108,"../../../hooks/useI18nContext":4129,"../../../hooks/useTransactionDisplayData":4147,"../../ui/list-item":3968,"../../ui/site-origin":4015,"../cancel-button":3493,"../transaction-icon":3756,"../transaction-list-item-details":3758,"../transaction-status-label/transaction-status-label":3766,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=b;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=y(e("prop-types")),o=e("react-redux"),i=y(e("../../ui/list-item")),s=y(e("../transaction-status-label/transaction-status-label")),l=y(e("../transaction-icon")),c=e("../../../hooks/useI18nContext"),u=e("../../../hooks/useTransactionDisplayData"),d=e("../../../helpers/utils/util"),p=e("../../../../shared/constants/transaction"),f=y(e("../cancel-button")),m=e("../../../ducks/swaps/swaps"),h=y(e("../../ui/site-origin")),g=y(e("../transaction-list-item-details"));function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function b({smartTransaction:e,transactionGroup:t,isEarliestNonce:n=!1}){const r=(0,o.useDispatch)(),y=(0,c.useI18nContext)(),[v,b]=(0,a.useState)(!1),[_,E]=(0,a.useState)(!1),{primaryCurrency:T,recipientAddress:w,isPending:k,senderAddress:O}=(0,u.useTransactionDisplayData)(t),{sourceTokenSymbol:N,destinationTokenSymbol:C,time:P,status:M}=e,S=p.TransactionGroupCategory.swap,x=y("swapTokenToToken",[N,C]),j="metamask",I=(0,d.formatDateWithYearContext)(P);let A;M===p.SmartTransactionStatus.pending?A=p.TransactionGroupStatus.pending:null!=M&&M.startsWith(p.SmartTransactionStatus.cancelled)&&(A=p.TransactionGroupStatus.cancelled);const R=e.cancellable&&!v,D=(0,a.useCallback)((()=>{E((e=>!e))}),[]);return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.default,{className:"transaction-list-item transaction-list-item--unconfirmed",title:x,onClick:D,icon:a.default.createElement(l.default,{category:S,status:A}),subtitle:a.default.createElement("h3",null,a.default.createElement(s.default,{isPending:!0,isEarliestNonce:n,date:I,status:A}),a.default.createElement(h.default,{className:"transaction-list-item__origin",siteOrigin:j,title:j}))},A===p.TransactionGroupStatus.pending&&R&&a.default.createElement("div",{className:"transaction-list-item__pending-actions"},a.default.createElement(f.default,{transaction:e.uuid,cancelTransaction:t=>{null==t||t.preventDefault(),r((0,m.cancelSwapsSmartTransaction)(e.uuid)),b(!0)}}))),_&&a.default.createElement(g.default,{title:x,onClose:D,senderAddress:O,recipientAddress:w,primaryCurrency:T,isEarliestNonce:n,transactionGroup:t,transactionStatus:()=>a.default.createElement(s.default,{isPending:k,isEarliestNonce:n,date:I,status:A,statusOnly:!0})}))}b.propTypes={smartTransaction:r.default.object.isRequired,isEarliestNonce:r.default.bool,transactionGroup:r.default.object}}}},{package:"$root$",file:"ui/components/app/transaction-list-item/smart-transaction-list-item.component.js"}],[3763,{"../../../../shared/constants/gas":3404,"../../../../shared/constants/metametrics":3408,"../../../../shared/constants/transaction":3417,"../../../contexts/gasFee":4046,"../../../contexts/metametrics":4048,"../../../contexts/transaction-modal":4049,"../../../helpers/constants/routes":4074,"../../../helpers/utils/transactions.util":4106,"../../../hooks/useI18nContext":4129,"../../../hooks/useShouldShowSpeedUp":4138,"../../../hooks/useTransactionDisplayData":4147,"../../../selectors":4436,"../../ui/button":3904,"../../ui/list-item":3968,"../../ui/site-origin":4015,"../advanced-gas-fee-popover":3471,"../cancel-button":3493,"../cancel-speedup-popover":3495,"../edit-gas-fee-popover":3560,"../edit-gas-popover":3567,"../transaction-icon":3756,"../transaction-list-item-details":3758,"../transaction-status-label/transaction-status-label":3766,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=j(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=x(e("prop-types")),o=x(e("classnames")),i=e("react-router-dom"),s=e("react-redux"),l=x(e("../../ui/list-item")),c=e("../../../hooks/useTransactionDisplayData"),u=e("../../../hooks/useI18nContext"),d=x(e("../transaction-list-item-details")),p=e("../../../helpers/constants/routes"),f=e("../../../hooks/useShouldShowSpeedUp"),m=x(e("../transaction-status-label/transaction-status-label")),h=x(e("../transaction-icon")),g=e("../../../../shared/constants/metametrics"),y=e("../../../../shared/constants/transaction"),v=e("../../../../shared/constants/gas"),b=e("../../../contexts/gasFee"),_=e("../../../contexts/transaction-modal"),E=e("../../../selectors"),T=e("../../../helpers/utils/transactions.util"),w=x(e("../../ui/button")),k=x(e("../advanced-gas-fee-popover")),O=x(e("../cancel-button")),N=x(e("../cancel-speedup-popover")),C=x(e("../edit-gas-fee-popover")),P=x(e("../edit-gas-popover")),M=e("../../../contexts/metametrics"),S=x(e("../../ui/site-origin"));function x(e){return e&&e.__esModule?e:{default:e}}function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(j=function(e){return e?n:t})(e)}function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},I.apply(this,arguments)}function A({transactionGroup:e,setEditGasMode:t,isEarliestNonce:n=!1}){const r=(0,u.useI18nContext)(),s=(0,i.useHistory)(),{hasCancelled:E}=e,[T,k]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[x,j]=(0,a.useState)(!1),{supportsEIP1559:I}=(0,b.useGasFeeContext)(),{openModal:A}=(0,_.useTransactionModalContext)(),{initialTransaction:{id:R},primaryTransaction:{err:D,status:L}}=e,$=(0,a.useContext)(M.MetaMetricsContext),W=(0,a.useCallback)((async e=>{e.stopPropagation(),$({event:'Clicked "Speed Up"',category:g.MetaMetricsEventCategory.Navigation,properties:{action:"Activity Log",legacy_event:!0}}),I?(t(v.EditGasModes.speedUp),A("cancelSpeedUpTransaction")):j(!0)}),[A,t,$,I]),q=(0,a.useCallback)((e=>{e.stopPropagation(),$({event:'Clicked "Cancel"',category:g.MetaMetricsEventCategory.Navigation,properties:{action:"Activity Log",legacy_event:!0}}),I?(t(v.EditGasModes.cancel),A("cancelSpeedUpTransaction")):C(!0)}),[$,A,t,I]),F=(0,f.useShouldShowSpeedUp)(e,n),{title:B,subtitle:G,subtitleContainsOrigin:H,date:U,category:V,primaryCurrency:z,recipientAddress:Y,secondaryCurrency:X,displayedStatusKey:K,isPending:Z,senderAddress:Q}=(0,c.useTransactionDisplayData)(e),J=V===y.TransactionGroupCategory.signatureRequest,ee=V===y.TransactionGroupCategory.approval,te=L===y.TransactionStatus.unapproved,ne=V===y.TransactionGroupCategory.swap,ae=(0,o.default)("transaction-list-item",{"transaction-list-item--unconfirmed":Z||[y.TransactionStatus.failed,y.TransactionStatus.dropped,y.TransactionStatus.rejected].includes(K)}),re=(0,a.useCallback)((()=>{te?s.push(`${p.CONFIRM_TRANSACTION_ROUTE}/${R}`):k((e=>!e))}),[te,s,R]),oe=(0,a.useMemo)((()=>F&&Z&&!te?a.default.createElement(w.default,{type:"primary",onClick:E?q:W,style:E?{width:"auto"}:null},r(E?"speedUpCancellation":"speedUp")):null),[F,te,r,Z,E,W,q]),ie=!E&&Z&&!te;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{onClick:re,className:ae,title:B,icon:a.default.createElement(h.default,{category:V,status:K}),subtitle:a.default.createElement("h3",null,a.default.createElement(m.default,{isPending:Z,isEarliestNonce:n,error:D,date:U,status:K}),H?a.default.createElement(S.default,{siteOrigin:G}):a.default.createElement("span",{className:"transaction-list-item__address",title:G},G)),rightContent:!J&&!ee&&a.default.createElement(a.default.Fragment,null,a.default.createElement("h2",{title:z,className:"transaction-list-item__primary-currency"},z),a.default.createElement("h3",{className:"transaction-list-item__secondary-currency"},X))},a.default.createElement("div",{className:"transaction-list-item__pending-actions"},oe,ie&&a.default.createElement(O.default,{transaction:e.primaryTransaction,cancelTransaction:q}))),T&&a.default.createElement(d.default,{title:B,onClose:re,transactionGroup:e,primaryCurrency:z,senderAddress:Q,recipientAddress:Y,onRetry:W,showRetry:L===y.TransactionStatus.failed&&!ne,showSpeedUp:F,isEarliestNonce:n,onCancel:q,showCancel:Z&&!E,transactionStatus:()=>a.default.createElement(m.default,{isPending:Z,isEarliestNonce:n,error:D,date:U,status:K,statusOnly:!0})}),!I&&x&&a.default.createElement(P.default,{onClose:()=>j(!1),mode:v.EditGasModes.speedUp,transaction:e.primaryTransaction}),!I&&N&&a.default.createElement(P.default,{onClose:()=>C(!1),mode:v.EditGasModes.cancel,transaction:e.primaryTransaction}))}A.propTypes={transactionGroup:r.default.object.isRequired,isEarliestNonce:r.default.bool,setEditGasMode:r.default.func};const R=e=>{const{transactionGroup:t}=e,[n,r]=(0,a.useState)(),o=t.primaryTransaction,i=(0,s.useSelector)(E.checkNetworkAndAccountSupports1559)&&!(0,T.isLegacyTransaction)(null==o?void 0:o.txParams);return a.default.createElement(b.GasFeeContextProvider,{transaction:t.primaryTransaction,editGasMode:n},a.default.createElement(_.TransactionModalContextProvider,null,a.default.createElement(A,I({},e,{setEditGasMode:r})),i&&a.default.createElement(a.default.Fragment,null,a.default.createElement(N.default,null),a.default.createElement(C.default,null),a.default.createElement(k.default,null))))};R.propTypes={transactionGroup:r.default.object.isRequired};var D=R;n.default=D}}},{package:"$root$",file:"ui/components/app/transaction-list-item/transaction-list-item.component.js"}],[3764,{"./transaction-list.component":3765},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./transaction-list.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/transaction-list/index.js"}],[3765,{"../../../../shared/constants/swaps":3413,"../../../../shared/constants/transaction":3417,"../../../../shared/modules/string-utils":3442,"../../../helpers/constants/transactions":4076,"../../../hooks/useI18nContext":4129,"../../../selectors":4436,"../../../selectors/transactions":4440,"../../ui/button":3904,"../transaction-list-item":3761,"../transaction-list-item/smart-transaction-list-item.component":3762,"prop-types":3032,react:3177,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=_;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=g(e("prop-types")),o=e("react-redux"),i=e("../../../selectors/transactions"),s=e("../../../selectors"),l=e("../../../hooks/useI18nContext"),c=g(e("../transaction-list-item")),u=g(e("../transaction-list-item/smart-transaction-list-item.component")),d=g(e("../../ui/button")),p=e("../../../helpers/constants/transactions"),f=e("../../../../shared/constants/swaps"),m=e("../../../../shared/constants/transaction"),h=e("../../../../shared/modules/string-utils");function g(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}const v=({initialTransaction:{type:e,destinationTokenSymbol:t,sourceTokenSymbol:n}})=>!p.TOKEN_CATEGORY_HASH[e]&&(e!==m.TransactionType.swap||("ETH"===t||"ETH"===n)),b=(e,t,n,a)=>t?e.filter(v):n?e.filter(((e,t)=>({initialTransaction:{txParams:n}})=>(0,h.isEqualCaseInsensitive)(null==n?void 0:n.to,e)||(null==n?void 0:n.to)===f.SWAPS_CHAINID_CONTRACT_ADDRESS_MAP[t]&&n.data.match(e.slice(2)))(n,a)):e;function _({hideTokenTransactions:e,tokenAddress:t}){const[n,r]=(0,a.useState)(10),p=(0,l.useI18nContext)(),f=(0,o.useSelector)(i.nonceSortedPendingTransactionsSelector),h=(0,o.useSelector)(i.nonceSortedCompletedTransactionsSelector),g=(0,o.useSelector)(s.getCurrentChainId),y=(0,a.useMemo)((()=>b(f,e,t,g)),[e,t,f,g]),v=(0,a.useMemo)((()=>b(h,e,t,g)),[e,t,h,g]),_=(0,a.useCallback)((()=>r((e=>e+10))),[]);return a.default.createElement("div",{className:"transaction-list"},a.default.createElement("div",{className:"transaction-list__transactions"},y.length>0&&a.default.createElement("div",{className:"transaction-list__pending-transactions"},a.default.createElement("div",{className:"transaction-list__header"},`${p("queue")} (${y.length})`),y.map(((e,t)=>e.initialTransaction.transactionType===m.TransactionType.smart?a.default.createElement(u.default,{isEarliestNonce:0===t,smartTransaction:e.initialTransaction,transactionGroup:e,key:`${e.nonce}:${t}`}):a.default.createElement(c.default,{isEarliestNonce:0===t,transactionGroup:e,key:`${e.nonce}:${t}`})))),a.default.createElement("div",{className:"transaction-list__completed-transactions"},y.length>0?a.default.createElement("div",{className:"transaction-list__header"},p("history")):null,v.length>0?v.slice(0,n).map(((e,t)=>{var r;return"smart"===(null===(r=e.initialTransaction)||void 0===r?void 0:r.transactionType)?a.default.createElement(u.default,{transactionGroup:e,smartTransaction:e.initialTransaction,key:`${e.nonce}:${t}`}):a.default.createElement(c.default,{transactionGroup:e,key:`${e.nonce}:${n+t-10}`})})):a.default.createElement("div",{className:"transaction-list__empty"},a.default.createElement("div",{className:"transaction-list__empty-text"},p("noTransactions"))),v.length>n&&a.default.createElement(d.default,{className:"transaction-list__view-more",type:"secondary",onClick:_},p("viewMore")))))}_.propTypes={hideTokenTransactions:r.default.bool,tokenAddress:r.default.string},_.defaultProps={hideTokenTransactions:!1,tokenAddress:undefined}}}},{package:"$root$",file:"ui/components/app/transaction-list/transaction-list.component.js"}],[3766,{"../../../../shared/constants/transaction":3417,"../../../hooks/useI18nContext":4129,"../../ui/tooltip":4035,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=f;var a=c(e("react")),r=c(e("prop-types")),o=c(e("classnames")),i=c(e("../../ui/tooltip")),s=e("../../../hooks/useI18nContext"),l=e("../../../../shared/constants/transaction");function c(e){return e&&e.__esModule?e:{default:e}}const u="queued",d={[l.TransactionStatus.submitted]:l.TransactionGroupStatus.pending,[l.TransactionStatus.approved]:l.TransactionGroupStatus.pending,[l.TransactionStatus.signed]:l.TransactionGroupStatus.pending},p={[l.TransactionStatus.unapproved]:"transaction-status-label--unapproved",[l.TransactionStatus.rejected]:"transaction-status-label--rejected",[l.TransactionStatus.failed]:"transaction-status-label--failed",[l.TransactionStatus.dropped]:"transaction-status-label--dropped",[l.TransactionGroupStatus.cancelled]:"transaction-status-label--cancelled",[u]:"transaction-status-label--queued",[l.TransactionGroupStatus.pending]:"transaction-status-label--pending"};function f({status:e,date:t,error:n,isEarliestNonce:r,className:c,statusOnly:f}){var m;const h=(0,s.useI18nContext)(),g=(null==n||null===(m=n.rpc)||void 0===m?void 0:m.message)||(null==n?void 0:n.message);let y=e;d[e]&&(y=r?l.TransactionGroupStatus.pending:u);const v=y!==l.TransactionStatus.confirmed||f?y&&h(y):t;return a.default.createElement(i.default,{position:"top",title:g,wrapperClassName:(0,o.default)("transaction-status-label",`transaction-status-label--${y}`,c,p[y])},v)}f.propTypes={status:r.default.string,className:r.default.string,date:r.default.string,error:r.default.object,isEarliestNonce:r.default.bool,statusOnly:r.default.bool}}}},{package:"$root$",file:"ui/components/app/transaction-status-label/transaction-status-label.js"}],[3767,{"./user-preferenced-currency-display.component":3768},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./user-preferenced-currency-display.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/user-preferenced-currency-display/index.js"}],[3768,{"../../../../shared/constants/common":3403,"../../../helpers/constants/common":4068,"../../../hooks/useUserPreferencedCurrency":4151,"../../ui/currency-display":3920,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=c(e("prop-types")),o=e("../../../helpers/constants/common"),i=c(e("../../ui/currency-display")),s=e("../../../hooks/useUserPreferencedCurrency"),l=e("../../../../shared/constants/common");function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}function p({"data-testid":e,ethLogoHeight:t=14,ethNumberOfDecimals:n,fiatNumberOfDecimals:r,numberOfDecimals:o,showEthLogo:c,type:u,showFiat:p,showCurrencySuffix:f,...m}){const{currency:h,numberOfDecimals:g}=(0,s.useUserPreferencedCurrency)(u,{ethNumberOfDecimals:n,fiatNumberOfDecimals:r,numberOfDecimals:o,showFiatOverride:p}),y=(0,a.useMemo)((()=>h===l.EtherDenomination.ETH&&c&&a.default.createElement("i",{className:"fab fa-ethereum",style:{color:"var(--color-icon-default)",fontSize:t}})),[h,c,t]);return a.default.createElement(i.default,d({},m,{currency:h,"data-testid":e,numberOfDecimals:g,prefixComponent:y,suffix:f&&!c&&h}))}p.propTypes={className:r.default.string,"data-testid":r.default.string,prefix:r.default.string,value:r.default.string,numberOfDecimals:r.default.oneOfType([r.default.string,r.default.number]),hideLabel:r.default.bool,hideTitle:r.default.bool,style:r.default.object,showEthLogo:r.default.bool,ethLogoHeight:r.default.number,type:r.default.oneOf([o.PRIMARY,o.SECONDARY]),ethNumberOfDecimals:r.default.oneOfType([r.default.string,r.default.number]),fiatNumberOfDecimals:r.default.oneOfType([r.default.string,r.default.number]),showFiat:r.default.bool,showCurrencySuffix:r.default.bool}}}},{package:"$root$",file:"ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js"}],[3769,{"./user-preferenced-currency-input.container":3771},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./user-preferenced-currency-input.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/user-preferenced-currency-input/index.js"}],[3770,{"../currency-input":3538,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,o,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),s=c(e("prop-types")),l=c(e("../currency-input"));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}class p extends i.PureComponent{render(){const{useNativeCurrencyAsPrimaryCurrency:e,sendInputCurrencySwitched:t,...n}=this.props;return i.default.createElement(l.default,d({},n,{featureSecondary:Boolean(e&&t||!e&&!t)}))}}n.default=p,a=p,r="propTypes",o={useNativeCurrencyAsPrimaryCurrency:s.default.bool,sendInputCurrencySwitched:s.default.bool},(r=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(r))in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o}}},{package:"$root$",file:"ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js"}],[3771,{"../../../ducks/app/app":4054,"../../../selectors":4436,"./user-preferenced-currency-input.component":3770,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=e("react-redux"),o=e("../../../ducks/app/app"),i=e("../../../selectors"),s=(a=e("./user-preferenced-currency-input.component"))&&a.__esModule?a:{default:a};var l=(0,r.connect)((e=>{const{useNativeCurrencyAsPrimaryCurrency:t}=(0,i.getPreferences)(e);return{useNativeCurrencyAsPrimaryCurrency:t,sendInputCurrencySwitched:e.appState.sendInputCurrencySwitched}}),(e=>({onPreferenceToggle:()=>e((0,o.toggleCurrencySwitch)())})))(s.default);n.default=l}}},{package:"$root$",file:"ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js"}],[3772,{"./user-preferenced-token-input.container":3774},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./user-preferenced-token-input.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/user-preferenced-token-input/index.js"}],[3773,{"../../ui/token-input":4032,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,o,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),s=c(e("prop-types")),l=c(e("../../ui/token-input"));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}class p extends i.PureComponent{render(){const{useNativeCurrencyAsPrimaryCurrency:e,...t}=this.props;return i.default.createElement(l.default,d({},t,{showFiat:!e}))}}n.default=p,a=p,r="propTypes",o={token:s.default.shape({address:s.default.string.isRequired,decimals:s.default.number,symbol:s.default.string}).isRequired,useNativeCurrencyAsPrimaryCurrency:s.default.bool},(r=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(r))in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o}}},{package:"$root$",file:"ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js"}],[3774,{"../../../selectors":4436,"./user-preferenced-token-input.component":3773,"prop-types":3032,"react-redux":3130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("react-redux"),r=s(e("prop-types")),o=e("../../../selectors"),i=s(e("./user-preferenced-token-input.component"));function s(e){return e&&e.__esModule?e:{default:e}}const l=(0,a.connect)((e=>{const{useNativeCurrencyAsPrimaryCurrency:t}=(0,o.getPreferences)(e);return{useNativeCurrencyAsPrimaryCurrency:t}}))(i.default);l.propTypes={token:r.default.shape({address:r.default.string.isRequired,decimals:r.default.number,symbol:r.default.string}).isRequired};var c=l;n.default=c}}},{package:"$root$",file:"ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js"}],[3775,{"../../../../shared/constants/metametrics":3408,"../../../../shared/constants/transaction":3417,"../../../contexts/i18n":4047,"../../../contexts/metametrics":4048,"../../../ducks/send":4064,"../../../ducks/swaps/swaps":4066,"../../../helpers/constants/common":4068,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../helpers/utils/hardware":4094,"../../../hooks/experiences/useRamps":4111,"../../../selectors":4436,"../../component-library":3840,"../../component-library/icon/deprecated":3836,"../../ui/icon-button":3942,"../../ui/identicon":3962,"../../ui/spinner":4017,"../../ui/tooltip":4035,"../user-preferenced-currency-display":3767,"./wallet-overview":3778,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=P(e("prop-types")),o=e("react-redux"),i=P(e("classnames")),s=e("react-router-dom"),l=P(e("../../ui/identicon")),c=e("../../../contexts/i18n"),u=e("../../../helpers/constants/routes"),d=P(e("../../ui/tooltip")),p=P(e("../user-preferenced-currency-display")),f=e("../../../helpers/constants/common"),m=e("../../../selectors"),h=e("../../../ducks/swaps/swaps"),g=P(e("../../ui/icon-button")),y=e("../../../helpers/utils/hardware"),v=e("../../../contexts/metametrics"),b=e("../../../../shared/constants/metametrics"),_=P(e("../../ui/spinner")),E=e("../../../ducks/send"),T=e("../../../../shared/constants/transaction"),w=e("../../component-library"),k=e("../../component-library/icon/deprecated"),O=e("../../../helpers/constants/design-system"),N=P(e("../../../hooks/experiences/useRamps")),C=P(e("./wallet-overview"));function P(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}const S=({className:e})=>{const t=(0,o.useDispatch)(),n=(0,a.useContext)(c.I18nContext),r=(0,a.useContext)(v.MetaMetricsContext),P=(0,s.useHistory)(),M=(0,o.useSelector)(m.getCurrentKeyring),S=(0,y.isHardwareKeyring)(null==M?void 0:M.type),x=(0,o.useSelector)(m.isBalanceCached),j=(0,o.useSelector)(m.getShouldShowFiat),I=(0,o.useSelector)(m.getSelectedAccountCachedBalance),A=(0,o.useSelector)(m.getIsSwapsChain),R=(0,o.useSelector)(m.getIsBridgeChain),D=(0,o.useSelector)(m.getIsBuyableChain),L=(0,o.useSelector)(m.getNativeCurrencyImage),$=(0,o.useSelector)(m.getSwapsDefaultToken),{openBuyCryptoInPdapp:W}=(0,N.default)();return a.default.createElement(C.default,{loading:!I,balance:a.default.createElement(d.default,{position:"top",title:n("balanceOutdated"),disabled:!x},a.default.createElement("div",{className:"eth-overview__balance"},a.default.createElement("div",{className:"eth-overview__primary-container"},I?a.default.createElement(p.default,{style:{display:"contents"},className:(0,i.default)("eth-overview__primary-balance",{"eth-overview__cached-balance":x}),"data-testid":"eth-overview__primary-currency",value:I,type:f.PRIMARY,ethNumberOfDecimals:4,hideTitle:!0}):a.default.createElement(_.default,{color:"var(--color-secondary-default)",className:"loading-overlay__spinner"}),x?a.default.createElement("span",{className:"eth-overview__cached-star"},"*"):null,a.default.createElement(w.ButtonIcon,{className:"eth-overview__portfolio-button","data-testid":"home__portfolio-site",color:O.IconColor.primaryDefault,iconName:k.ICON_NAMES.DIAGRAM,ariaLabel:n("portfolio"),size:w.BUTTON_ICON_SIZES.LG,onClick:()=>{const e="https://portfolio.metamask.io";global.platform.openTab({url:`${e}?metamaskEntry=ext`}),r({category:b.MetaMetricsEventCategory.Home,event:b.MetaMetricsEventName.PortfolioLinkClicked,properties:{url:e}},{contextPropsIntoEventProperties:[b.MetaMetricsContextProp.PageTitle]})}})),j&&I&&a.default.createElement(p.default,{className:(0,i.default)({"eth-overview__cached-secondary-balance":x,"eth-overview__secondary-balance":!x}),"data-testid":"eth-overview__secondary-currency",value:I,type:f.SECONDARY,ethNumberOfDecimals:4,hideTitle:!0}))),buttons:a.default.createElement(a.default.Fragment,null,a.default.createElement(g.default,{className:"eth-overview__button",Icon:a.default.createElement(k.Icon,{name:k.ICON_NAMES.ADD,color:O.IconColor.primaryInverse}),disabled:!D,"data-testid":"eth-overview-buy",label:n("buy"),onClick:()=>{W(),r({event:b.MetaMetricsEventName.NavBuyButtonClicked,category:b.MetaMetricsEventCategory.Navigation,properties:{location:"Home",text:"Buy"}})}}),a.default.createElement(g.default,{className:"eth-overview__button","data-testid":"eth-overview-send",Icon:a.default.createElement(k.Icon,{name:k.ICON_NAMES.ARROW_2_RIGHT,color:O.IconColor.primaryInverse}),label:n("send"),onClick:()=>{r({event:b.MetaMetricsEventName.NavSendButtonClicked,category:b.MetaMetricsEventCategory.Navigation,properties:{token_symbol:"ETH",location:"Home",text:"Send"}}),t((0,E.startNewDraftTransaction)({type:T.AssetType.native})).then((()=>{P.push(u.SEND_ROUTE)}))}}),a.default.createElement(g.default,{className:"eth-overview__button",disabled:!A,Icon:a.default.createElement(k.Icon,{name:k.ICON_NAMES.SWAP_HORIZONTAL,color:O.IconColor.primaryInverse}),onClick:()=>{A&&(r({event:b.MetaMetricsEventName.NavSwapButtonClicked,category:b.MetaMetricsEventCategory.Swaps,properties:{token_symbol:"ETH",location:b.MetaMetricsSwapsEventSource.MainView,text:"Swap"}}),t((0,h.setSwapsFromToken)($)),S?global.platform.openExtensionInBrowser(u.BUILD_QUOTE_ROUTE):P.push(u.BUILD_QUOTE_ROUTE))},label:n("swap"),tooltipRender:A?null:e=>a.default.createElement(d.default,{title:n("currentlyUnavailable"),position:"bottom"},e)}),a.default.createElement(g.default,{className:"eth-overview__button",disabled:!R,"data-testid":"eth-overview-bridge",Icon:a.default.createElement(k.Icon,{name:k.ICON_NAMES.BRIDGE,color:O.IconColor.primaryInverse}),label:n("bridge"),onClick:()=>{if(R){const e=`${"https://portfolio.metamask.io"}/bridge`;global.platform.openTab({url:`${e}?metamaskEntry=ext`}),r({category:b.MetaMetricsEventCategory.Navigation,event:b.MetaMetricsEventName.BridgeLinkClicked,properties:{location:"Home",text:"Bridge"}})}},tooltipRender:R?null:e=>a.default.createElement(d.default,{title:n("currentlyUnavailable"),position:"bottom"},e)})),className:e,icon:a.default.createElement(l.default,{diameter:32,image:L,imageBorder:!0})})};S.propTypes={className:r.default.string},S.defaultProps={className:undefined};var x=S;n.default=x}}},{package:"$root$",file:"ui/components/app/wallet-overview/eth-overview.js"}],[3776,{"./eth-overview":3775,"./token-overview":3777},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"EthOverview",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"TokenOverview",{enumerable:!0,get:function(){return r.default}});var a=o(e("./eth-overview")),r=o(e("./token-overview"));function o(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/components/app/wallet-overview/index.js"}],[3777,{"../../../../shared/constants/metametrics":3408,"../../../../shared/constants/transaction":3417,"../../../contexts/i18n":4047,"../../../contexts/metametrics":4048,"../../../ducks/send":4064,"../../../ducks/swaps/swaps":4066,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/error-keys":4071,"../../../helpers/constants/routes":4074,"../../../helpers/utils/hardware":4094,"../../../hooks/experiences/useRamps":4111,"../../../hooks/useTokenFiatAmount":4144,"../../../hooks/useTokenTracker":4145,"../../../selectors":4436,"../../../store/actions":4443,"../../component-library/icon/deprecated":3836,"../../ui/currency-display":3920,"../../ui/icon-button":3942,"../../ui/identicon":3962,"../../ui/tooltip":4035,"./wallet-overview":3778,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=P(e("prop-types")),o=e("react-redux"),i=e("react-router-dom"),s=P(e("../../ui/identicon")),l=P(e("../../ui/tooltip")),c=P(e("../../ui/currency-display")),u=e("../../../contexts/i18n"),d=e("../../../helpers/utils/hardware"),p=e("../../../helpers/constants/routes"),f=e("../../../hooks/useTokenTracker"),m=e("../../../hooks/useTokenFiatAmount"),h=e("../../../ducks/send"),g=e("../../../ducks/swaps/swaps"),y=e("../../../selectors"),v=P(e("../../ui/icon-button")),b=e("../../../helpers/constants/error-keys"),_=e("../../../store/actions"),E=e("../../../contexts/metametrics"),T=e("../../../../shared/constants/metametrics"),w=e("../../../../shared/constants/transaction"),k=P(e("../../../hooks/experiences/useRamps")),O=e("../../component-library/icon/deprecated"),N=e("../../../helpers/constants/design-system"),C=P(e("./wallet-overview"));function P(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}const S=({className:e,token:t})=>{var n,r;const P=(0,o.useDispatch)(),M=(0,a.useContext)(u.I18nContext),S=(0,a.useContext)(E.MetaMetricsContext),x=(0,i.useHistory)(),j=(0,o.useSelector)(y.getCurrentKeyring),I=(0,d.isHardwareKeyring)(j.type),{tokensWithBalances:A}=(0,f.useTokenTracker)([t]),R=null===(n=A[0])||void 0===n?void 0:n.string,D=null===(r=A[0])||void 0===r?void 0:r.balance,L=(0,m.useTokenFiatAmount)(t.address,R,t.symbol),$=(0,o.useSelector)(y.getIsSwapsChain),W=(0,o.useSelector)(y.getIsBuyableChain),{openBuyCryptoInPdapp:q}=(0,k.default)();return(0,a.useEffect)((()=>{t.isERC721&&P((0,_.showModal)({name:"CONVERT_TOKEN_TO_NFT",tokenAddress:t.address}))}),[t.isERC721,t.address,P]),a.default.createElement(C.default,{balance:a.default.createElement("div",{className:"token-overview__balance"},a.default.createElement(c.default,{className:"token-overview__primary-balance",displayValue:R,suffix:t.symbol}),L?a.default.createElement(c.default,{className:"token-overview__secondary-balance",displayValue:L,hideLabel:!0}):null),buttons:a.default.createElement(a.default.Fragment,null,a.default.createElement(v.default,{className:"token-overview__button",Icon:a.default.createElement(O.Icon,{name:O.ICON_NAMES.ADD,color:N.IconColor.primaryInverse}),label:M("buy"),"data-testid":"token-overview-buy",onClick:()=>{q(),S({event:T.MetaMetricsEventName.NavBuyButtonClicked,category:T.MetaMetricsEventCategory.Navigation,properties:{location:"Token Overview",text:"Buy"}})},disabled:t.isERC721||!W}),a.default.createElement(v.default,{className:"token-overview__button",onClick:async()=>{S({event:T.MetaMetricsEventName.NavSendButtonClicked,category:T.MetaMetricsEventCategory.Navigation,properties:{token_symbol:t.symbol,location:T.MetaMetricsSwapsEventSource.TokenView,text:"Send"}});try{await P((0,h.startNewDraftTransaction)({type:w.AssetType.token,details:t})),x.push(p.SEND_ROUTE)}catch(e){if(!e.message.includes(b.INVALID_ASSET_TYPE))throw e}},Icon:a.default.createElement(O.Icon,{name:O.ICON_NAMES.ARROW_2_RIGHT,color:N.IconColor.primaryInverse}),label:M("send"),"data-testid":"eth-overview-send",disabled:t.isERC721}),a.default.createElement(v.default,{className:"token-overview__button",disabled:!$,Icon:a.default.createElement(O.Icon,{name:O.ICON_NAMES.SWAP_HORIZONTAL,color:N.IconColor.primaryInverse}),onClick:()=>{$&&(S({event:T.MetaMetricsEventName.NavSwapButtonClicked,category:T.MetaMetricsEventCategory.Swaps,properties:{token_symbol:t.symbol,location:T.MetaMetricsSwapsEventSource.TokenView,text:"Swap"}}),P((0,g.setSwapsFromToken)({...t,address:t.address.toLowerCase(),iconUrl:t.image,balance:D,string:R})),I?global.platform.openExtensionInBrowser(p.BUILD_QUOTE_ROUTE):x.push(p.BUILD_QUOTE_ROUTE))},label:M("swap"),tooltipRender:$?null:e=>a.default.createElement(l.default,{title:M("currentlyUnavailable"),position:"bottom",disabled:$},e)}),a.default.createElement(v.default,{className:"eth-overview__button",Icon:a.default.createElement(O.Icon,{name:O.ICON_NAMES.DIAGRAM,color:N.IconColor.primaryInverse}),label:M("portfolio"),"data-testid":"home__portfolio-site",onClick:()=>{const e="https://portfolio.metamask.io";global.platform.openTab({url:`${e}?metamaskEntry=ext`}),S({category:T.MetaMetricsEventCategory.Home,event:T.MetaMetricsEventName.PortfolioLinkClicked,properties:{url:e}},{contextPropsIntoEventProperties:[T.MetaMetricsContextProp.PageTitle]})}})),className:e,icon:a.default.createElement(s.default,{diameter:32,address:t.address,image:t.image})})};S.propTypes={className:r.default.string,token:r.default.shape({address:r.default.string.isRequired,decimals:r.default.number,symbol:r.default.string,image:r.default.string,isERC721:r.default.bool}).isRequired},S.defaultProps={className:undefined};var x=S;n.default=x}}},{package:"$root$",file:"ui/components/app/wallet-overview/token-overview.js"}],[3778,{classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("react")),r=i(e("prop-types")),o=i(e("classnames"));function i(e){return e&&e.__esModule?e:{default:e}}const s=({balance:e,buttons:t,className:n,icon:r,loading:i})=>a.default.createElement("div",{className:(0,o.default)("wallet-overview",n)},a.default.createElement("div",{className:"wallet-overview__balance"},i?null:r,e),a.default.createElement("div",{className:"wallet-overview__buttons"},t));s.propTypes={balance:r.default.element.isRequired,buttons:r.default.element.isRequired,className:r.default.string,icon:r.default.element.isRequired,loading:r.default.bool},s.defaultProps={className:undefined};var l=s;n.default=l}}},{package:"$root$",file:"ui/components/app/wallet-overview/wallet-overview.js"}],[3779,{"./whats-new-popup":3780},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.default}});var a,r=(a=e("./whats-new-popup"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/components/app/whats-new-popup/index.js"}],[3780,{"../../../../shared/notifications":3445,"../../../contexts/i18n":4047,"../../../ducks/locale/locale":4061,"../../../helpers/constants/design-system":4070,"../../../helpers/constants/routes":4074,"../../../helpers/constants/zendesk-url":4077,"../../../hooks/useEqualityCheck":4126,"../../../selectors":4436,"../../../store/actions":4443,"../../component-library":3840,"../../ui/button":3904,"../../ui/popover":3999,classnames:1980,"prop-types":3032,react:3177,"react-redux":3130,"react-router-dom":3150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=k;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=e("react-router-dom"),o=e("react-redux"),i=_(e("prop-types")),s=_(e("classnames")),l=e("../../../ducks/locale/locale"),c=e("../../../contexts/i18n"),u=e("../../../hooks/useEqualityCheck"),d=_(e("../../ui/button")),p=_(e("../../ui/popover")),f=e("../../component-library"),m=e("../../../store/actions"),h=e("../../../../shared/notifications"),g=e("../../../selectors"),y=e("../../../helpers/constants/routes"),v=e("../../../helpers/constants/design-system"),b=_(e("../../../helpers/constants/zendesk-url"));function _(e){return e&&e.__esModule?e:{default:e}}function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function T(e,t){return{2:()=>{global.platform.openTab({url:"https://survey.alchemer.com/s3/6173069/MetaMask-Extension-NPS-January-2021"})},3:()=>{global.platform.openTab({url:"https://community.metamask.io/t/about-the-security-category/72"})},4:()=>{(0,m.updateViewedNotifications)({4:!0}),t.push(y.BUILD_QUOTE_ROUTE)},5:()=>{(0,m.updateViewedNotifications)({5:!0}),global.platform.openTab({url:b.default.SECRET_RECOVERY_PHRASE})},8:()=>{(0,m.updateViewedNotifications)({8:!0}),t.push(y.ADVANCED_ROUTE)},10:()=>{(0,m.updateViewedNotifications)({10:!0}),t.push(`${y.SECURITY_ROUTE}#token-description`)},12:()=>{(0,m.updateViewedNotifications)({12:!0}),t.push(y.EXPERIMENTAL_ROUTE)},14:()=>{(0,m.updateViewedNotifications)({14:!0}),t.push(`${y.ADVANCED_ROUTE}#backup-userdata`)},16:()=>{(0,m.updateViewedNotifications)({16:!0})},17:()=>{(0,m.updateViewedNotifications)({17:!0})},18:()=>{(0,m.updateViewedNotifications)({18:!0}),t.push(`${y.EXPERIMENTAL_ROUTE}#transaction-security-check`)},19:()=>{(0,m.updateViewedNotifications)({19:!0}),t.push(`${y.EXPERIMENTAL_ROUTE}#autodetect-nfts`)},20:()=>{(0,m.updateViewedNotifications)({20:!0}),global.platform.openTab({url:b.default.LEDGER_FIREFOX_U2F_GUIDE})}}[e]}const w=e=>Array.isArray(e)?a.default.createElement(a.default.Fragment,null,e.map(((t,n)=>{const r=n===e.length-1;return a.default.createElement(f.Text,{key:`item-${n}`,variant:v.TextVariant.bodyMd,marginBottom:r?0:4},t)}))):a.default.createElement(f.Text,{variant:v.TextVariant.bodyMd},e);function k({onClose:e}){const t=(0,a.useContext)(c.I18nContext),n=(0,r.useHistory)(),i=(0,o.useSelector)(g.getSortedAnnouncementsToShow),y=(0,o.useSelector)(l.getCurrentLocale),[b,_]=(0,a.useState)({}),[E,k]=(0,a.useState)(!0),O=(0,a.useRef)(),N=(0,u.useEqualityCheck)(i),C=(0,a.useMemo)((()=>N.reduce(((e,t)=>({...e,[t.id]:a.default.createRef()})),{})),[N]);return(0,a.useEffect)((()=>{const e=new window.IntersectionObserver(((e,t)=>{e.forEach((e=>{if(e.isIntersecting){const[n,a]=Object.entries(C).find((([t,n])=>n.current.isSameNode(e.target)));_((e=>({...e,[n]:!0}))),t.unobserve(a.current)}}))}),{root:O.current,threshold:1});return Object.values(C).forEach((t=>{e.observe(t.current)})),()=>{e.disconnect()}}),[C,_]),a.default.createElement(p.default,{title:t("whatsNew"),headerProps:{padding:[4,4,4]},className:"whats-new-popup__popover",onClose:()=>{(0,m.updateViewedNotifications)(b),e()},popoverRef:O,showScrollDown:E&&i.length>1,onScrollDownButtonClick:e=>{e.stopPropagation(),C[i[i.length-1].id].current.scrollIntoView({behavior:"smooth"}),k(!1)}},a.default.createElement("div",{className:"whats-new-popup__notifications"},i.map((({id:e},r)=>{const o=(0,h.getTranslatedUINotifications)(t,y)[e],l=r===i.length-1;return 0===r||1===e||18===e||19===e?((e,t,n,r)=>{const{id:o,date:i,title:l,description:c,image:u,actionText:p}=e,m=T(o,n),h=u&&a.default.createElement("img",{className:"whats-new-popup__notification-image",src:u.src,height:u.height,width:u.width}),g=null==u?void 0:u.placeImageBelowDescription;return a.default.createElement("div",{className:(0,s.default)("whats-new-popup__notification whats-new-popup__first-notification",{"whats-new-popup__last-notification":r}),key:`whats-new-popop-notification-${o}`},a.default.createElement(f.Text,{variant:v.TextVariant.bodyLgMedium,marginBottom:2},l),!g&&h,a.default.createElement("div",{className:"whats-new-popup__description-and-date"},a.default.createElement("div",{className:"whats-new-popup__notification-description"},w(c)),a.default.createElement("div",{className:"whats-new-popup__notification-date"},i)),g&&h,p&&a.default.createElement(d.default,{type:"primary",className:"whats-new-popup__button",onClick:m},p),a.default.createElement("div",{className:"whats-new-popup__intersection-observable",ref:t[o]}))})(o,C,n,l):((e,t,n,r)=>{const{id:o,date:i,title:l,description:c,actionText:u}=e,d=T(o,n);return a.default.createElement("div",{className:(0,s.default)("whats-new-popup__notification",{"whats-new-popup__last-notification":r}),key:`whats-new-popop-notification-${o}`},a.default.createElement("div",{className:"whats-new-popup__notification-title"},l),a.default.createElement("div",{className:"whats-new-popup__description-and-date"},a.default.createElement("div",{className:"whats-new-popup__notification-description"},w(c)),a.default.createElement("div",{className:"whats-new-popup__notification-date"},i)),u&&a.default.createElement("div",{className:"whats-new-popup__link",onClick:d},`${u} >`),a.default.createElement("div",{className:"whats-new-popup__intersection-observable",ref:t[o]}))})(o,C,n,l)}))))}k.propTypes={onClose:i.default.func.isRequired}}}},{package:"$root$",file:"ui/components/app/whats-new-popup/whats-new-popup.js"}],[3781,{"../../ui/box/box":3899,"../../ui/identicon/blockieIdenticon/blockieIdenticon.component":3958,"../../ui/jazzicon/jazzicon.component":3967,"../avatar-base":3786,"./avatar-account.types":3782,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarAccount=void 0;var a=d(e("react")),r=d(e("classnames")),o=d(e("prop-types")),i=d(e("../../ui/jazzicon/jazzicon.component")),s=d(e("../../ui/identicon/blockieIdenticon/blockieIdenticon.component")),l=d(e("../../ui/box/box")),c=e("../avatar-base"),u=e("./avatar-account.types");function d(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}const f=({size:e=u.AvatarAccountSize.Md,address:t,className:n,variant:o=u.AvatarAccountVariant.Jazzicon,...l})=>a.default.createElement(c.AvatarBase,p({size:e,className:(0,r.default)("mm-avatar-account",n)},l),o===u.AvatarAccountVariant.Jazzicon?a.default.createElement(i.default,{className:(0,r.default)("mm-avatar-account__jazzicon"),address:t,diameter:u.AvatarAccountDiameter[e]}):a.default.createElement(s.default,{address:t,diameter:u.AvatarAccountDiameter[e],borderRadius:"50%"}));n.AvatarAccount=f,f.propTypes={size:o.default.oneOf(Object.values(u.AvatarAccountSize)),variant:o.default.oneOf(Object.values(u.AvatarAccountVariant)),address:o.default.string.isRequired,className:o.default.string,...l.default.propTypes}}}},{package:"$root$",file:"ui/components/component-library/avatar-account/avatar-account.js"}],[3782,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarAccountVariant=n.AvatarAccountSize=n.AvatarAccountDiameter=void 0;var a=e("../../../helpers/constants/design-system");let r,o;n.AvatarAccountVariant=r,function(e){e.Jazzicon="jazzicon",e.Blockies="blockies"}(r||(n.AvatarAccountVariant=r={})),n.AvatarAccountSize=o,function(e){e[e.Xs=a.Size.XS]="Xs",e[e.Sm=a.Size.SM]="Sm",e[e.Md=a.Size.MD]="Md",e[e.Lg=a.Size.LG]="Lg",e[e.Xl=a.Size.XL]="Xl"}(o||(n.AvatarAccountSize=o={}));const i={[o.Xs]:16,[o.Sm]:24,[o.Md]:32,[o.Lg]:40,[o.Xl]:48};n.AvatarAccountDiameter=i}}},{package:"$root$",file:"ui/components/component-library/avatar-account/avatar-account.types.ts"}],[3783,{"./avatar-account":3781,"./avatar-account.types":3782},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AvatarAccount",{enumerable:!0,get:function(){return a.AvatarAccount}}),Object.defineProperty(n,"AvatarAccountDiameter",{enumerable:!0,get:function(){return r.AvatarAccountDiameter}}),Object.defineProperty(n,"AvatarAccountSize",{enumerable:!0,get:function(){return r.AvatarAccountSize}}),Object.defineProperty(n,"AvatarAccountVariant",{enumerable:!0,get:function(){return r.AvatarAccountVariant}});var a=e("./avatar-account"),r=e("./avatar-account.types")}}},{package:"$root$",file:"ui/components/component-library/avatar-account/index.js"}],[3784,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AVATAR_BASE_SIZES=void 0;var a=e("../../../helpers/constants/design-system");const r={XS:a.Size.XS,SM:a.Size.SM,MD:a.Size.MD,LG:a.Size.LG,XL:a.Size.XL};n.AVATAR_BASE_SIZES=r}}},{package:"$root$",file:"ui/components/component-library/avatar-base/avatar-base.constants.js"}],[3785,{"../../../helpers/constants/design-system":4070,"../text":3865,"./avatar-base.constants":3784,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarBase=void 0;var a=c(e("react")),r=c(e("prop-types")),o=c(e("classnames")),i=e("../../../helpers/constants/design-system"),s=e("../text"),l=e("./avatar-base.constants");function c(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=({size:e=l.AVATAR_BASE_SIZES.MD,children:t,backgroundColor:n=i.BackgroundColor.backgroundAlternative,borderColor:r=i.BorderColor.borderDefault,color:c=i.TextColor.textDefault,className:d,...p})=>{let f;return f=e===l.AVATAR_BASE_SIZES.LG||e===l.AVATAR_BASE_SIZES.XL?i.TextVariant.bodyLgMedium:e===l.AVATAR_BASE_SIZES.SM||e===l.AVATAR_BASE_SIZES.MD?i.TextVariant.bodySm:i.TextVariant.bodyXs,a.default.createElement(s.Text,u({className:(0,o.default)("mm-avatar-base",`mm-avatar-base--size-${e}`,d),as:"div",display:i.DISPLAY.FLEX,justifyContent:i.JustifyContent.center,alignItems:i.AlignItems.center,borderRadius:i.BorderRadius.full,variant:f,textTransform:i.TEXT_TRANSFORM.UPPERCASE,backgroundColor:n,borderColor:r,color:c},p),t)};n.AvatarBase=d,d.propTypes={size:r.default.oneOf(Object.values(l.AVATAR_BASE_SIZES)),children:r.default.node,backgroundColor:r.default.oneOf(Object.values(i.BackgroundColor)),borderColor:r.default.oneOf(Object.values(i.BorderColor)),color:r.default.oneOf(Object.values(i.TextColor)),className:r.default.string,...s.Text.propTypes}}}},{package:"$root$",file:"ui/components/component-library/avatar-base/avatar-base.js"}],[3786,{"./avatar-base":3785,"./avatar-base.constants":3784},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AVATAR_BASE_SIZES",{enumerable:!0,get:function(){return r.AVATAR_BASE_SIZES}}),Object.defineProperty(n,"AvatarBase",{enumerable:!0,get:function(){return a.AvatarBase}});var a=e("./avatar-base"),r=e("./avatar-base.constants")}}},{package:"$root$",file:"ui/components/component-library/avatar-base/index.js"}],[3787,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AVATAR_FAVICON_SIZES=void 0;var a=e("../../../helpers/constants/design-system");const r={XS:a.Size.XS,SM:a.Size.SM,MD:a.Size.MD,LG:a.Size.LG,XL:a.Size.XL};n.AVATAR_FAVICON_SIZES=r}}},{package:"$root$",file:"ui/components/component-library/avatar-favicon/avatar-favicon.constants.js"}],[3788,{"../../../helpers/constants/design-system":4070,"../../../hooks/useI18nContext":4129,"../../ui/box/box":3899,"../avatar-base":3786,"../icon":3839,"./avatar-favicon.constants":3787,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarFavicon=void 0;var a=p(e("react")),r=p(e("prop-types")),o=p(e("classnames")),i=e("../avatar-base"),s=p(e("../../ui/box/box")),l=e("../icon"),c=e("../../../helpers/constants/design-system"),u=e("../../../hooks/useI18nContext"),d=e("./avatar-favicon.constants");function p(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(this,arguments)}const m=({size:e=c.Size.MD,src:t,name:n="avatar-favicon",className:r,fallbackIconProps:s,borderColor:d=c.BorderColor.transparent,...p})=>{const m=(0,u.useI18nContext)();return a.default.createElement(i.AvatarBase,f({size:e,display:c.DISPLAY.FLEX,alignItems:c.AlignItems.center,justifyContent:c.JustifyContent.center,className:(0,o.default)("mm-avatar-favicon",r),borderColor:d},p),t?a.default.createElement("img",{className:"mm-avatar-favicon__image",src:t,alt:m("logo",[n])}):a.default.createElement(l.Icon,f({name:l.IconName.Global,color:c.IconColor.iconDefault,size:e},s)))};n.AvatarFavicon=m,m.propTypes={src:r.default.string,name:r.default.string.isRequired,fallbackIconProps:r.default.object,size:r.default.oneOf(Object.values(d.AVATAR_FAVICON_SIZES)),borderColor:r.default.oneOf(Object.values(c.BorderColor)),className:r.default.string,...s.default.propTypes}}}},{package:"$root$",file:"ui/components/component-library/avatar-favicon/avatar-favicon.js"}],[3789,{"./avatar-favicon":3788,"./avatar-favicon.constants":3787},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AVATAR_FAVICON_SIZES",{enumerable:!0,get:function(){return r.AVATAR_FAVICON_SIZES}}),Object.defineProperty(n,"AvatarFavicon",{enumerable:!0,get:function(){return a.AvatarFavicon}});var a=e("./avatar-favicon"),r=e("./avatar-favicon.constants")}}},{package:"$root$",file:"ui/components/component-library/avatar-favicon/index.js"}],[3790,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AVATAR_ICON_SIZES=void 0;var a=e("../../../helpers/constants/design-system");const r={XS:a.Size.XS,SM:a.Size.SM,MD:a.Size.MD,LG:a.Size.LG,XL:a.Size.XL};n.AVATAR_ICON_SIZES=r}}},{package:"$root$",file:"ui/components/component-library/avatar-icon/avatar-icon.constants.js"}],[3791,{"../../../helpers/constants/design-system":4070,"../../ui/box/box":3899,"../avatar-base":3786,"../icon":3839,"./avatar-icon.constants":3790,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarIcon=void 0;var a=d(e("react")),r=d(e("prop-types")),o=d(e("classnames")),i=e("../../../helpers/constants/design-system"),s=d(e("../../ui/box/box")),l=e("../icon"),c=e("../avatar-base"),u=e("./avatar-icon.constants");function d(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}const f=({size:e=i.Size.MD,color:t=i.TextColor.primaryDefault,backgroundColor:n=i.BackgroundColor.primaryMuted,className:r,iconProps:s,iconName:u,...d})=>a.default.createElement(c.AvatarBase,p({size:e,display:i.DISPLAY.FLEX,alignItems:i.AlignItems.center,justifyContent:i.JustifyContent.center,color:t,backgroundColor:n,borderColor:i.BorderColor.transparent,className:(0,o.default)("mm-avatar-icon",r)},d),a.default.createElement(l.Icon,p({color:i.IconColor.inherit,name:u,size:e},s)));n.AvatarIcon=f,f.propTypes={iconName:r.default.oneOf(Object.values(l.IconName)).isRequired,iconProps:r.default.object,size:r.default.oneOf(Object.values(u.AVATAR_ICON_SIZES)),backgroundColor:r.default.oneOf(Object.values(i.BackgroundColor)),color:r.default.oneOf(Object.values(i.TextColor)),className:r.default.string,...s.default.propTypes}}}},{package:"$root$",file:"ui/components/component-library/avatar-icon/avatar-icon.js"}],[3792,{"./avatar-icon":3791,"./avatar-icon.constants":3790},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AVATAR_ICON_SIZES",{enumerable:!0,get:function(){return r.AVATAR_ICON_SIZES}}),Object.defineProperty(n,"AvatarIcon",{enumerable:!0,get:function(){return a.AvatarIcon}});var a=e("./avatar-icon"),r=e("./avatar-icon.constants")}}},{package:"$root$",file:"ui/components/component-library/avatar-icon/index.js"}],[3793,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AVATAR_NETWORK_SIZES=void 0;var a=e("../../../helpers/constants/design-system");const r={XS:a.Size.XS,SM:a.Size.SM,MD:a.Size.MD,LG:a.Size.LG,XL:a.Size.XL};n.AVATAR_NETWORK_SIZES=r}}},{package:"$root$",file:"ui/components/component-library/avatar-network/avatar-network.constants.js"}],[3794,{"../../../helpers/constants/design-system":4070,"../../ui/box/box":3899,"../avatar-base":3786,"./avatar-network.constants":3793,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarNetwork=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=u(e("prop-types")),o=u(e("classnames")),i=e("../avatar-base"),s=u(e("../../ui/box/box")),l=e("../../../helpers/constants/design-system"),c=e("./avatar-network.constants");function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}const f=({size:e=l.Size.MD,name:t,src:n,showHalo:r,color:s=l.TextColor.textDefault,backgroundColor:c=l.BackgroundColor.backgroundAlternative,borderColor:u=l.BorderColor.transparent,className:d,...f})=>{const[m,h]=(0,a.useState)(!1);(0,a.useEffect)((()=>{h(!n)}),[n]);const g=t&&t[0]?t[0]:"?";return a.default.createElement(i.AvatarBase,p({size:e,display:l.DISPLAY.FLEX,alignItems:l.AlignItems.center,justifyContent:l.JustifyContent.center,className:(0,o.default)("mm-avatar-network",r&&"mm-avatar-network--with-halo",d),backgroundColor:c,borderColor:u,color:s},f),m?g:a.default.createElement(a.default.Fragment,null,r&&a.default.createElement("img",{src:n,className:r?"mm-avatar-network__network-image--blurred":"","aria-hidden":"true"}),a.default.createElement("img",{className:r?"mm-avatar-network__network-image--size-reduced":"mm-avatar-network__network-image",onError:()=>{h(!0)},src:n,alt:`${t} logo`||"network logo"})))};n.AvatarNetwork=f,f.propTypes={name:r.default.string,src:r.default.string,showHalo:r.default.bool,size:r.default.oneOf(Object.values(c.AVATAR_NETWORK_SIZES)),backgroundColor:r.default.oneOf(Object.values(l.BackgroundColor)),borderColor:r.default.oneOf(Object.values(l.BorderColor)),color:r.default.oneOf(Object.values(l.TextColor)),className:r.default.string,...s.default.propTypes}}}},{package:"$root$",file:"ui/components/component-library/avatar-network/avatar-network.js"}],[3795,{"./avatar-network":3794,"./avatar-network.constants":3793},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AVATAR_NETWORK_SIZES",{enumerable:!0,get:function(){return r.AVATAR_NETWORK_SIZES}}),Object.defineProperty(n,"AvatarNetwork",{enumerable:!0,get:function(){return a.AvatarNetwork}});var a=e("./avatar-network"),r=e("./avatar-network.constants")}}},{package:"$root$",file:"ui/components/component-library/avatar-network/index.js"}],[3796,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AVATAR_TOKEN_SIZES=void 0;var a=e("../../../helpers/constants/design-system");const r={XS:a.Size.XS,SM:a.Size.SM,MD:a.Size.MD,LG:a.Size.LG,XL:a.Size.XL};n.AVATAR_TOKEN_SIZES=r}}},{package:"$root$",file:"ui/components/component-library/avatar-token/avatar-token.constants.js"}],[3797,{"../../../helpers/constants/design-system":4070,"../../ui/box/box":3899,"../avatar-base":3786,"./avatar-token.constants":3796,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AvatarToken=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(e("react")),r=u(e("classnames")),o=u(e("prop-types")),i=u(e("../../ui/box/box")),s=e("../avatar-base"),l=e("../../../helpers/constants/design-system"),c=e("./avatar-token.constants");function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}const f=({size:e=l.Size.MD,name:t,src:n,showHalo:o,color:i=l.TextColor.textDefault,backgroundColor:c=l.BackgroundColor.backgroundAlternative,borderColor:u=l.BorderColor.transparent,className:d,...f})=>{const[m,h]=(0,a.useState)(!1);(0,a.useEffect)((()=>{h(!n)}),[n]);const g=t&&t[0]?t[0]:"?";return a.default.createElement(s.AvatarBase,p({size:e,display:l.DISPLAY.FLEX,alignItems:l.AlignItems.center,justifyContent:l.JustifyContent.center,className:(0,r.default)("mm-avatar-token",o&&"mm-avatar-token--with-halo",d),backgroundColor:c,borderColor:u,color:i},f),m?g:a.default.createElement(a.default.Fragment,null,o&&a.default.createElement("img",{src:n,className:o?"mm-avatar-token__token-image--blurred":"","aria-hidden":"true"}),a.default.createElement("img",{className:o?"mm-avatar-token__token-image--size-reduced":"mm-avatar-token__token-image",onError:()=>{h(!0)},src:n,alt:`${t} logo`||"token logo"})))};n.AvatarToken=f,f.propTypes={name:o.default.string,src:o.default.string,showHalo:o.default.bool,size:o.default.oneOf(Object.values(c.AVATAR_TOKEN_SIZES)),backgroundColor:o.default.oneOf(Object.values(l.BackgroundColor)),borderColor:o.default.oneOf(Object.values(l.BorderColor)),color:o.default.oneOf(Object.values(l.TextColor)),className:o.default.string,...i.default.propTypes}}}},{package:"$root$",file:"ui/components/component-library/avatar-token/avatar-token.js"}],[3798,{"./avatar-token":3797},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AvatarToken",{enumerable:!0,get:function(){return a.AvatarToken}});var a=e("./avatar-token")}}},{package:"$root$",file:"ui/components/component-library/avatar-token/index.js"}],[3799,{"../../../helpers/constants/design-system":4070,"../../ui/box":3900,"./badge-wrapper.types":3800,classnames:1980,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BadgeWrapper=void 0;var a=l(e("react")),r=l(e("classnames")),o=e("../../../helpers/constants/design-system"),i=l(e("../../ui/box")),s=e("./badge-wrapper.types");function l(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}n.BadgeWrapper=({children:e,badge:t,badgeContainerProps:n,position:l=s.BadgeWrapperPosition.topRight,positionObj:u,anchorElementShape:d=s.BadgeWrapperAnchorElementShape.circular,className:p="",color:f,...m})=>a.default.createElement(i.default,c({className:(0,r.default)("mm-badge-wrapper",p),display:o.DISPLAY.INLINE_BLOCK},m),e,a.default.createElement(i.default,c({className:(0,r.default)("mm-badge-wrapper__badge-container",{[`mm-badge-wrapper__badge-container--${d}-${l}`]:!u}),style:{...u}},n),t))}}},{package:"$root$",file:"ui/components/component-library/badge-wrapper/badge-wrapper.tsx"}],[3800,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){let a,r;Object.defineProperty(n,"__esModule",{value:!0}),n.BadgeWrapperPosition=n.BadgeWrapperAnchorElementShape=void 0,n.BadgeWrapperPosition=a,function(e){e.topRight="top-right",e.bottomRight="bottom-right",e.topLeft="top-left",e.bottomLeft="bottom-left"}(a||(n.BadgeWrapperPosition=a={})),n.BadgeWrapperAnchorElementShape=r,function(e){e.rectangular="rectangular",e.circular="circular"}(r||(n.BadgeWrapperAnchorElementShape=r={}))}}},{package:"$root$",file:"ui/components/component-library/badge-wrapper/badge-wrapper.types.ts"}],[3801,{"./badge-wrapper":3799,"./badge-wrapper.types":3800},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BadgeWrapper",{enumerable:!0,get:function(){return a.BadgeWrapper}}),Object.defineProperty(n,"BadgeWrapperAnchorElementShape",{enumerable:!0,get:function(){return r.BadgeWrapperAnchorElementShape}}),Object.defineProperty(n,"BadgeWrapperPosition",{enumerable:!0,get:function(){return r.BadgeWrapperPosition}});var a=e("./badge-wrapper"),r=e("./badge-wrapper.types")}}},{package:"$root$",file:"ui/components/component-library/badge-wrapper/index.ts"}],[3802,{"../../../helpers/constants/design-system":4070},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BANNER_ALERT_SEVERITIES=void 0;var a=e("../../../helpers/constants/design-system");const r={DANGER:a.SEVERITIES.DANGER,INFO:a.SEVERITIES.INFO,SUCCESS:a.SEVERITIES.SUCCESS,WARNING:a.SEVERITIES.WARNING};n.BANNER_ALERT_SEVERITIES=r}}},{package:"$root$",file:"ui/components/component-library/banner-alert/banner-alert.constants.js"}],[3803,{"..":3840,"../../../helpers/constants/design-system":4070,"./banner-alert.constants":3802,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BannerAlert=void 0;var a=c(e("react")),r=c(e("prop-types")),o=c(e("classnames")),i=e(".."),s=e("../../../helpers/constants/design-system"),l=e("./banner-alert.constants");function c(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=({children:e,className:t,severity:n=s.SEVERITIES.INFO,...r})=>a.default.createElement(i.BannerBase,u({startAccessory:a.default.createElement(i.Icon,u({size:i.IconSize.Lg},(()=>{switch(n){case s.SEVERITIES.DANGER:return{name:i.IconName.Danger,color:s.IconColor.errorDefault};case s.SEVERITIES.WARNING:return{name:i.IconName.Warning,color:s.IconColor.warningDefault};case s.SEVERITIES.SUCCESS:return{name:i.IconName.Confirmation,color:s.IconColor.successDefault};default:return{name:i.IconName.Info,color:s.IconColor.primaryDefault}}})())),backgroundColor:(()=>{switch(n){case s.SEVERITIES.DANGER:return s.BackgroundColor.errorMuted;case s.SEVERITIES.WARNING:return s.BackgroundColor.warningMuted;case s.SEVERITIES.SUCCESS:return s.BackgroundColor.successMuted;default:return s.BackgroundColor.primaryMuted}})(),paddingLeft:2,className:(0,o.default)("mm-banner-alert",{[`mm-banner-alert--severity-${n}`]:Object.values(l.BANNER_ALERT_SEVERITIES).includes(n)},t)},r),e);n.BannerAlert=d,d.propTypes={className:r.default.string,severity:r.default.oneOf(Object.values(l.BANNER_ALERT_SEVERITIES)),...i.BannerBase.propTypes}}}},{package:"$root$",file:"ui/components/component-library/banner-alert/banner-alert.js"}],[3804,{"./banner-alert":3803,"./banner-alert.constants":3802},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BANNER_ALERT_SEVERITIES",{enumerable:!0,get:function(){return r.BANNER_ALERT_SEVERITIES}}),Object.defineProperty(n,"BannerAlert",{enumerable:!0,get:function(){return a.BannerAlert}});var a=e("./banner-alert"),r=e("./banner-alert.constants")}}},{package:"$root$",file:"ui/components/component-library/banner-alert/index.js"}],[3805,{"..":3840,"../../../helpers/constants/design-system":4070,"../../ui/box":3900,"../icon":3839,classnames:1980,"prop-types":3032,react:3177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BannerBase=void 0;var a=u(e("react")),r=u(e("prop-types")),o=u(e("classnames")),i=e(".."),s=e("../icon"),l=u(e("../../ui/box")),c=e("../../../helpers/constants/design-system");function u(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}const p=({className:e,title:t,titleProps:n,description:r,descriptionProps:u,children:p,actionButtonLabel:f,actionButtonOnClick:m,actionButtonProps:h,startAccessory:g,onClose:y,closeButtonProps:v,...b})=>a.default.createElement(l.default,d({className:(0,o.default)("mm-banner-base",e),display:c.DISPLAY.FLEX,gap:2,backgroundColor:c.BackgroundColor.backgroundDefault,borderRadius:c.BorderRadius.SM,padding:3},b),g&&a.default.createElement(a.default.Fragment,null,g),a.default.createElement("div",null,t&&a.default.createElement(i.Text,d({className:"mm-banner-base__title",variant:c.TextVariant.bodyLgMedium,as:"h5"},n),t),r&&a.default.createElement(i.Text,u,r),p&&"object"==typeof p?p:a.default.createElement(i.Text,null,p),f&&a.default.createElement(i.ButtonLink,d({size:c.Size.auto,onClick:m},h),f)),y&&a.default.createElement(i.ButtonIcon,d({className:"mm-banner-base__close-button",marginLeft:"auto",iconName:s.IconName.Close,size:c.Size.SM,ariaLabel:"Close",onClick:y},v)));n.BannerBase=p,p.propTypes={title:r.default.string,titleProps:r.default.shape(i.Text.PropTypes),description:r.default.string,descriptionProps:r.default.shape(i.Text.PropTypes),children:r.default.node,actionButtonLabel:r.default.string,actionButtonProps:r.default.shape(i.ButtonLink.PropTypes),actionButtonOnClick:r.default.func,startAccessory:r.default.node,onClose:r.default.func,closeButtonProps:r.default.shape(i.ButtonIcon.PropTypes),className:r.default.string,...l.default.propTypes}}}},{package:"$root$",file:"ui/components/component-library/banner-base/banner-base.js"}],[3806,{"./banner-base":3805},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BannerBase",{enumerable:!0,get:function(){return a.BannerBase}});var a=e("./banner-base")}}},{package:"$root$",file:"ui/components/component-library/banner-base/index.js"}],[3807,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){let a;Object.defineProperty(n,"__esModule",{value:!0}),n.BannerTipLogoType=void 0,n.BannerTipLogoType=a,function(e){e.Greeting="greeting",e.Chat="chat"}(a||(n.BannerTipLogoType=a={}))}}},{package:"$root$",file:"ui/components/component-library/banner-tip/banner-tip.constants.ts"}]],[],{});